@duplicati/ngclient 0.0.72 → 0.0.74

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.
Files changed (57) hide show
  1. package/chunk-2R6YFVI3.js +1 -0
  2. package/{chunk-C4F4MUPA.js → chunk-43QTP63M.js} +1 -1
  3. package/{chunk-KIR7XCMT.js → chunk-4KMNVH5V.js} +1 -1
  4. package/{chunk-76TXW7BV.js → chunk-5KGMNBD7.js} +1 -1
  5. package/chunk-65ULQ2PN.js +1 -0
  6. package/{chunk-NIP3HERY.js → chunk-6JYRURGN.js} +1 -1
  7. package/{chunk-4BB6E7IE.js → chunk-73LQ5WSC.js} +1 -1
  8. package/{chunk-NGOETFI3.js → chunk-77KHDJR7.js} +1 -1
  9. package/{chunk-EDK7X7O7.js → chunk-AF7PONVK.js} +1 -1
  10. package/{chunk-64ENL5GH.js → chunk-BEBLA2OU.js} +1 -1
  11. package/{chunk-AGCYH6MA.js → chunk-BY56DZ7Y.js} +1 -1
  12. package/{chunk-ARE7IWR6.js → chunk-BZKHWYFG.js} +1 -1
  13. package/{chunk-YMOY5EMW.js → chunk-C6ELLTE3.js} +1 -1
  14. package/{chunk-Q5EMYWV3.js → chunk-CAGBL2MP.js} +1 -1
  15. package/{chunk-PQKOLCEE.js → chunk-D6FCW3QQ.js} +1 -1
  16. package/{chunk-REA5KDFD.js → chunk-EHIW67S3.js} +1 -1
  17. package/{chunk-YQGJVNGF.js → chunk-FJPFD4BF.js} +1 -1
  18. package/{chunk-KTPNIKXO.js → chunk-FLOZ6FQA.js} +1 -1
  19. package/chunk-GJ6GRAEW.js +1 -0
  20. package/{chunk-I24WOYYC.js → chunk-GXX5QXLE.js} +1 -1
  21. package/{chunk-CZCBXB2D.js → chunk-JZCJ723Q.js} +1 -1
  22. package/{chunk-6DHAM3ZG.js → chunk-KYQC46J2.js} +1 -1
  23. package/{chunk-7UYVE2SG.js → chunk-L5ZZZJEY.js} +1 -1
  24. package/{chunk-DNWGFNME.js → chunk-LJFKKI57.js} +1 -1
  25. package/{chunk-3FZUYC7D.js → chunk-MLT3FZMW.js} +1 -1
  26. package/{chunk-53QX2PXI.js → chunk-MLTG5TKC.js} +1 -1
  27. package/chunk-NQVULKI2.js +1 -0
  28. package/{chunk-Q3GNE2V2.js → chunk-OT7JK3TS.js} +1 -1
  29. package/{chunk-Z35537MB.js → chunk-PHQYY3GW.js} +1 -1
  30. package/{chunk-F542ZCQR.js → chunk-PRKOHXBN.js} +1 -1
  31. package/{chunk-PO2RDC4E.js → chunk-RIRYVDWF.js} +1 -1
  32. package/{chunk-2BHHXTPG.js → chunk-RNE5BRDO.js} +1 -1
  33. package/{chunk-TY6F5J2H.js → chunk-ROIHQL5Y.js} +1 -1
  34. package/{chunk-SPPLR4O6.js → chunk-SBFFXENC.js} +1 -1
  35. package/chunk-TB27CACB.js +1 -0
  36. package/{chunk-AMEYNNK2.js → chunk-VJQDP23H.js} +1 -1
  37. package/{chunk-SIIP4YWD.js → chunk-VKMKZKNR.js} +1 -1
  38. package/chunk-VUVQIS7G.js +1 -0
  39. package/chunk-WDE7EXR6.js +1 -0
  40. package/{chunk-YAE3TU4E.js → chunk-X6RAHZJI.js} +1 -1
  41. package/{chunk-TQX52V4E.js → chunk-Y7LSDVD6.js} +1 -1
  42. package/chunk-YOLNXRDT.js +1 -0
  43. package/{chunk-HDCC66NC.js → chunk-Z2E5LWHA.js} +1 -1
  44. package/chunk-Z43CKK5H.js +6 -0
  45. package/index.html +1 -1
  46. package/main-UH5FBFO3.js +1 -0
  47. package/package.json +1 -1
  48. package/chunk-2P3GS5BJ.js +0 -1
  49. package/chunk-7I3L3TYU.js +0 -6
  50. package/chunk-ASPLJ6GL.js +0 -1
  51. package/chunk-CP2S6DC4.js +0 -1
  52. package/chunk-GDWXEPO2.js +0 -1
  53. package/chunk-SVRIHRMT.js +0 -1
  54. package/chunk-TLVMA6DU.js +0 -1
  55. package/chunk-UXWUA3GY.js +0 -1
  56. package/chunk-WDEJO2DY.js +0 -1
  57. package/main-KN334FZC.js +0 -1
@@ -1 +1 @@
1
- import{c as a,d as b}from"./chunk-PQKOLCEE.js";import"./chunk-6DHAM3ZG.js";import"./chunk-Q5EMYWV3.js";import"./chunk-6CRYB4HA.js";import"./chunk-22GS6UCG.js";import"./chunk-UJWW7PS7.js";import"./chunk-KJ4O6F3R.js";import"./chunk-ETEYALHD.js";import"./chunk-TS4YY2WO.js";import"./chunk-TLVMA6DU.js";import"./chunk-6LUM2XU4.js";import"./chunk-3WKDD2IN.js";import"./chunk-Q3JJWGXW.js";import"./chunk-C6Q5SG76.js";export{a as createEncryptionForm,b as default};
1
+ import{c as a,d as b}from"./chunk-D6FCW3QQ.js";import"./chunk-KYQC46J2.js";import"./chunk-CAGBL2MP.js";import"./chunk-6CRYB4HA.js";import"./chunk-22GS6UCG.js";import"./chunk-UJWW7PS7.js";import"./chunk-KJ4O6F3R.js";import"./chunk-ETEYALHD.js";import"./chunk-TS4YY2WO.js";import"./chunk-NQVULKI2.js";import"./chunk-6LUM2XU4.js";import"./chunk-3WKDD2IN.js";import"./chunk-Q3JJWGXW.js";import"./chunk-C6Q5SG76.js";export{a as createEncryptionForm,b as default};
@@ -1 +1 @@
1
- import{a as ce}from"./chunk-22GS6UCG.js";import{q as de}from"./chunk-UJWW7PS7.js";import{b as ae}from"./chunk-KJ4O6F3R.js";import{a as pe,f as ue,l as he,m as _e,o as fe,w as ge}from"./chunk-TLVMA6DU.js";import{ia as le}from"./chunk-3WKDD2IN.js";import{Ab as J,Ac as se,Bb as Y,Cb as p,Db as h,Eb as Z,F as B,Hb as G,Ib as k,Mc as W,Oc as w,Qb as R,Rb as ee,Sa as g,Sb as te,Ub as y,Vb as u,Wb as ne,Xb as I,Z as D,Za as H,ea as F,eb as K,ec as q,fa as N,fc as ie,gc as X,hc as M,jc as re,kb as v,qa as V,ra as C,tb as j,ub as U,uc as L,va as x,vb as E,vc as oe,w as z,yb as b}from"./chunk-Q3JJWGXW.js";import{a as A,b as $}from"./chunk-C6Q5SG76.js";var ve=["treeContainer"],Te=["formRef"],xe=[[["label"]],[["label"]],[["input"]]],be=["label","label","input"],Me=(o,t)=>t.id,Se=o=>({children:o,level:0}),me=o=>({$implicit:o}),Oe=(o,t)=>({children:o,level:t});function Fe(o,t){if(o&1){let e=k();p(0,"spk-button-group")(1,"button",13),y("click",function(){F(e);let s=u();return N(s.pathDiscoveryMethod.set("browse"))}),R(2,4),h(),p(3,"button",13),y("click",function(){F(e);let s=u();return N(s.pathDiscoveryMethod.set("path"))}),R(4,5),h()()}if(o&2){let e=u();g(),E("active",e.pathDiscoveryMethod()==="browse"),g(2),E("active",e.pathDiscoveryMethod()==="path")}}function Ne(o,t){o&1&&Z(0,"spk-progress-bar",9)}function ye(o,t){o&1&&(p(0,"spk-icon",18),M(1,"caret-down"),h(),p(2,"spk-icon",16),M(3,"folder-open"),h())}function we(o,t){o&1&&(p(0,"spk-icon"),M(1,"file"),h())}function ke(o,t){o&1&&(p(0,"spk-icon",18),M(1,"caret-right"),h(),p(2,"spk-icon",16),M(3,"folder"),h())}function Re(o,t){if(o&1&&v(0,ye,4,0)(1,we,2,0,"spk-icon")(2,ke,4,0),o&2){let e=u(2).$implicit;b(e.children.length?0:e.cls==="file"?1:2)}}function Ie(o,t){o&1&&(p(0,"spk-icon",16),M(1,"desktop-tower"),h())}function Le(o,t){o&1&&G(0)}function We(o,t){if(o&1&&v(0,Le,1,0,"ng-container",10),o&2){let e=u(2).$implicit,n=u().$implicit;u();let s=X(7);j("ngTemplateOutlet",s)("ngTemplateOutletContext",L(5,me,oe(2,Oe,e.children,n.level+1)))}}function Ae(o,t){if(o&1){let e=k();p(0,"div",14,3),y("click",function(){F(e);let s=u().$implicit,i=u(2);return N(i.toggleNode(s.id,s))}),p(2,"div",15),v(3,Re,3,1)(4,Ie,2,0,"spk-icon",16),h(),p(5,"div",17),y("click",function(s){F(e);let i=u().$implicit,r=u(2);return N(r.toggleSelectedNode(s,i))}),M(6),h()(),v(7,We,1,7,"ng-container")}if(o&2){let e=u().$implicit,n=u(2);E("accepted",e.accepted===!0)("active",e.evalState===n.TreeEvalEnum.Included)("indeterminate",e.isIndeterminate)("open",e.children.length)("usually-hidden",e.hidden),g(2),E("file",e.cls==="file"),g(),b(e.id!=="/"?3:4),g(3),re(" ",e.text," "),g(),b(e.children.length>0?7:-1)}}function $e(o,t){if(o&1&&v(0,Ae,8,15),o&2){let e=t.$implicit,n=u(2);b(e.hidden&&n._showHiddenNodes()||!e.hidden?0:-1)}}function Be(o,t){if(o&1&&(p(0,"spk-list"),J(1,$e,1,1,null,null,Me),h()),o&2){let e=t.$implicit;U("padding-left",e.level*.25,"rem"),g(),Y(e.children)}}function De(o,t){o&1&&G(0)}function Ve(o,t){if(o&1){let e=k();p(0,"spk-toggle",19),y("click",function(){F(e);let s=u();return N(s._showHiddenNodes.set(!s._showHiddenNodes()))}),R(1,6),h()}if(o&2){let e=u();E("active",e._showHiddenNodes()),g(),ee(e.showFiles()?"files":"folders"),te(1)}}var Ce=(i=>(i[i.ExcludedByParent=-2]="ExcludedByParent",i[i.Excluded=-1]="Excluded",i[i.None=0]="None",i[i.Included=1]="Included",i[i.IncludedByParent=2]="IncludedByParent",i))(Ce||{}),Q=class o{#t=D(ae);#o=D(ce);multiSelect=C(!1);disabled=C(!1);showFiles=C(!1);selectFiles=C(!1);accepts=C(null);startingPath=C(null);rootPath=C(void 0);backupSettings=C(null);pathRefreshTrigger=C(!1);showHiddenNodes=C(!1);hideShortcuts=C(!1);includes=V();excludes=V();_showHiddenNodes=x(!1);treeContainerRef=H("treeContainer");formRef=H("formRef");pathDiscoveryMethod=x("browse");isLoading=x(!1);currentPath=x("/");#e=x(null);treeSearchQuery=x("");treeNodes=x([]);filterGroups=this.#o.filterGroups();isByBackupSettings=W(()=>{let t=this.backupSettings();return!(t===void 0||t?.id===void 0||t?.time===void 0)});searchableTreeNodes=W(()=>{let t=this.treeSearchQuery();return t?this.treeNodes().filter(e=>e.text?.toLowerCase().includes(t.toLowerCase())):this.treeNodes()});TreeEvalEnum=Ce;treeStructure=W(()=>{let t=this.showHiddenNodes(),e=this.currentPath().split("\0").filter(a=>a!==""&&a!=="/"),n=structuredClone(e);for(let a=0;a<n.length;a++){let _=n[a].slice(1);if(_.startsWith("{")&&_.endsWith("}")){let f=_.slice(1,-1),d=this.filterGroups?.FilterGroups[f];if(d&&d.length){let T=d.map(P=>`-${P}`);n.splice(a,1,...T)}}}let s=this.searchableTreeNodes(),i=new Map,r=this.rootPath(),m=this.accepts(),l=r?{id:r,resolvedpath:r,text:r,parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"}:{id:"/",resolvedpath:"/",text:"Computer",parentPath:"",children:[],evalState:0,isIndeterminate:!1};m&&(l.accepted=!0),i.set("/",l);for(let a of s){let _=a.id.replace(r??"","").split("/").filter(Boolean),f="",d=l;for(let T of _){if(f+="/"+T,!i.has(f)){let P=a.hidden===!0&&t?0:this.#s(n,a.id,a.cls,d),S={id:a.id,isIndeterminate:this.isIndeterminate(n,a.id),evalState:P,parentPath:f,resolvedpath:a.id?.startsWith("%")?a.resolvedpath+"/":f,hidden:a.hidden,text:a.text,cls:a.cls,children:[]};m&&(S.accepted=this.matchAccepts(m,S)),i.set(f,S),d.children.push(S)}d=i.get(f)}}return[l]});#s(t,e,n,s){if(s.evalState===-1)return-2;let i=0,r=t.filter(l=>!l.startsWith("-")&&!l.startsWith("+")),m=t.filter(l=>l.startsWith("-")||l.startsWith("+"));if(r.length===0)return i;for(let l=0;l<r.length;l++){let a=r[l];if(e?.startsWith(a)){i=1;break}}if(m.length===0)return i;for(let l=0;l<m.length;l++){let a=m[l],c=a.slice(1),_=a.startsWith("-")?"exclude":"include";if(c.startsWith("/")&&c.endsWith("/")){if(n!=="folder")continue;if(e===c){i=_==="include"?1:-1;break}}if(c.startsWith("*")&&c.endsWith("*/")){if(n!=="folder")continue;let d=c.slice(1,-2);if(d==="")break;if(e?.includes(d+"/")){i=_==="include"?1:-1;break}}if(c.startsWith("[.*")&&c.endsWith("[^\\/]*]")){if(n!=="file")continue;let d=c.slice(3,-7);if(new RegExp(d).test(e)){i=_==="include"?1:-1;break}}if(c.startsWith("[")&&c.endsWith("]")){let d=c.slice(1,-1),T=this.translateCSharpRegex(d);if(new RegExp(`${T}`).test(e)){i=_==="include"?1:-1;break}}if(c.startsWith("*.")){if(n!=="file"||c.replace("*.","").length===0)continue;if(this.#n(e,c,!0)){i=_==="include"?1:-1;break}}if(c==="")continue;if(this.#n(e,c,!0)){i=_==="include"?1:-1;break}}return i}translateCSharpRegex(t){let e=t;e=e.replace(/^@/,"");let n=/\(\?<(?<name>\w+)>(?<pattern>[^)]+)\)/g;return e=e.replace(n,(s,i,r)=>`(${r})`),e=e.replace(/\\/g,"\\\\"),e}isIndeterminate(t,e){return t.some(n=>n.startsWith(e))}#n(t,e,n=!1){let s=e.replace(/\*/g,".*").replace(/\?/g,".").replace(/\[!([^\]]+)\]/g,"[^$1]");return new RegExp(`${s}${n?"$":""}`).test(t)}showHiddenNodesEffect=w(()=>this._showHiddenNodes.set(this.showHiddenNodes()));pathDiscoveryMethodEffect=w(()=>{let t=this.pathDiscoveryMethod(),e=this.#e();t==="browse"&&e&&this.currentPath.set(e.value)});matchAccepts(t,e){if(!t||e.cls==="folder"||e.id==="/")return!0;let n=t.split(",");if(n.length===0)return!0;let s="."+e.id.slice(e.id.indexOf("."));return s?n.some(i=>s.endsWith(i)):!1}currentPathEffect=w(()=>{let t=this.#e();t&&(t.value=this.currentPath(),t.dispatchEvent(new Event("input")))});inputValueChangeAbortController=null;inputRefEffect=w(()=>{let t=this.formRef()?.nativeElement?.querySelector("input");t&&(this.#a(t),this.inputValueChangeAbortController&&this.inputValueChangeAbortController.abort(),this.inputValueChangeAbortController=new AbortController,t.addEventListener("inputValueChanged",e=>{this.currentPath.set(e.detail.value)},{signal:this.inputValueChangeAbortController.signal}),this.#e.set(t),t.autocomplete="off")});ngOnInit(){let t=this.startingPath();t?(this.currentPath.set(t),this.#p(t)):this.#r(null,this.rootPath())}toggleSelectedNode(t,e){if(e.id==="/"||(t.stopPropagation(),e.evalState===-2))return;if(this.selectFiles()&&e.cls==="folder"){this.toggleNode(e.id,e);return}if(this.accepts()&&!e.accepted)return;let s=this.currentPath().split("\0").filter(r=>r!==""&&r!=="/"),i=this.isChildOfSelected(e)?`-${e.id}`:e.id;this.multiSelect()?s.includes(e.id)?this.currentPath.set(s.filter(r=>r!==e.id).join("\0")):s.some(r=>r.startsWith(i))?this.currentPath.set(s.filter(r=>r!==i).join("\0")):this.currentPath.set([...s,i].join("\0")):s.includes(e.id)?this.currentPath.set(s.filter(r=>r!==e.id).join("\0")):this.currentPath.set(e.id)}isChildOfSelected(t){return this.currentPath().split("\0").filter(n=>n!==""&&n!=="/").some(n=>t.id?.startsWith(n)||`-${t.id}`.startsWith(n))}toggleNode(t,e=null){e?.cls==="folder"&&(e?.children.length?this.treeNodes.update(n=>n.filter(s=>!s.id?.startsWith(e.id)||s.id===e.id)):this.#r(e,t))}#l(){setTimeout(()=>{let e=this.treeContainerRef()?.nativeElement?.querySelector(".active");e&&e.scrollIntoView({behavior:"smooth",block:"center"})},100)}#a(t){return Object.defineProperty(t,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").get.call(this)},set(e){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").set.call(this,e),this.dispatchEvent(new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:e}})),e}}),t}#c(t){return this.#t.postApiV1Filesystem({showHidden:!0,requestBody:{path:t},onlyFolders:!this.showFiles()})}#d(t){let e=this.backupSettings(),n={id:e.id+"",prefixOnly:!1,folderContents:!0,time:e.time,filter:t?"@"+t:void 0};return this.#t.getApiV1BackupByIdFiles(n)}#i(t){return this.isByBackupSettings()?this.#d(t):this.#c(t)}#p(t){let e=t.split("\0").filter(r=>r.startsWith("-")).map(r=>r.slice(1,-1)),n=t.split("\0").filter(r=>!r.startsWith("-")).filter(Boolean),s=n.map(r=>r.split("/").filter(Boolean)),i=[this.rootPath()??"/"];s.forEach(r=>{r.forEach((m,l)=>{let a=r.slice(0,l+1).join("/"),c=a.startsWith("%")?a:"/"+a;i.includes(c)||i.push(c)})}),this.isLoading.set(!0),z([...i.map(r=>this.#i(r))]).pipe(B(()=>this.isLoading.set(!1))).subscribe({next:r=>{this.treeNodes.update(m=>{let l=r.flatMap(c=>c.map(_=>{let f=_.id,d=f&&f.split("/").filter(Boolean).slice(0,-1).join("/"),P="/"+(f&&f.split("/").filter(Boolean).join("/")),S=n.findIndex(O=>this.multiSelect()?P.startsWith(O):P===O)>-1,Ee=n.findIndex(O=>O===f)>-1,Pe=e.findIndex(O=>O===P)>-1;return $(A({},_),{parentPath:d.startsWith("%")?d:"/"+d,isSelected:S&&!Pe||Ee})})),a=[...new Map([...m,...l].map(c=>[c.resolvedpath??c.id,c])).values()];return this.#l(),a})}})}#r(t=null,e="/"){this.isLoading.set(!0),this.#i(e).pipe(B(()=>this.isLoading.set(!1))).subscribe({next:n=>{let s=this.isByBackupSettings()?n.Files.map(i=>({text:i.Path.split("/").filter(r=>r!=="").pop(),id:i.Path,cls:i.Path.endsWith("/")?"folder":"file",leaf:t!==null,resolvedpath:i.Path,hidden:!1})):n;this.treeNodes.update(i=>{let r=s.map(l=>{let a=l.id.startsWith("%")&&l.id.endsWith("%")||l.id.endsWith("/")?"folder":"file";return $(A({},l),{cls:a,parentPath:e})}),m=[...new Map([...i,...r].map(l=>[l.resolvedpath??l.id,l])).values()];return this.hideShortcuts()?m.filter(l=>!l.id.startsWith("%")):m})}})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=K({type:o,selectors:[["app-file-tree"]],viewQuery:function(e,n){e&1&&(q(n.treeContainerRef,ve,5),q(n.formRef,Te,5)),e&2&&ie(2)},hostVars:2,hostBindings:function(e,n){e&2&&E("disabled",n.disabled())},inputs:{multiSelect:[1,"multiSelect"],disabled:[1,"disabled"],showFiles:[1,"showFiles"],selectFiles:[1,"selectFiles"],accepts:[1,"accepts"],startingPath:[1,"startingPath"],rootPath:[1,"rootPath"],backupSettings:[1,"backupSettings"],pathRefreshTrigger:[1,"pathRefreshTrigger"],showHiddenNodes:[1,"showHiddenNodes"],hideShortcuts:[1,"hideShortcuts"]},outputs:{includes:"includes",excludes:"excludes"},ngContentSelectors:be,decls:15,vars:15,consts:()=>{let t;t=$localize` Browser path `;let e;e=$localize` Manually type path `;let n;return n=$localize` Show hidden ${"\uFFFD0\uFFFD"}:INTERPOLATION: `,[["treeContainer",""],["recursiveTree",""],["formRef",""],["treeNode",""],t,e,n,[1,"section"],[1,"browse-files"],[1,"indeterminate","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"primary","raised","browse-files-toggle",3,"active"],[1,"form-field"],["type","button",3,"click"],["action","",3,"click"],[1,"icon"],[1,"spk-primary"],[1,"text",3,"click"],[1,"small"],[1,"primary","raised","browse-files-toggle",3,"click"]]},template:function(e,n){if(e&1&&(ne(xe),v(0,Fe,5,4,"spk-button-group"),p(1,"div",7),I(2,0,["ngProjectAs","label",5,["label"]]),p(3,"div",8,0),v(5,Ne,1,0,"spk-progress-bar",9)(6,Be,3,2,"ng-template",null,1,se)(8,De,1,0,"ng-container",10),h(),v(9,Ve,2,3,"spk-toggle",11),h(),p(10,"div",12,2)(12,"spk-form-field"),I(13,1,["ngProjectAs","label",5,["label"]]),I(14,2,["ngProjectAs","input",5,["input"]]),h()()),e&2){let s=X(7);b(n.multiSelect()?-1:0),g(),E("hidden",n.pathDiscoveryMethod()!=="browse"),g(2),E("visualize-accepted",n.accepts()),g(2),b(n.isLoading()?5:-1),g(3),j("ngTemplateOutlet",s)("ngTemplateOutletContext",L(13,me,L(11,Se,n.treeStructure()))),g(),b(n.accepts()?-1:9),g(),E("hidden",n.pathDiscoveryMethod()!=="path")}},dependencies:[ue,ge,pe,he,_e,fe,le,de],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem}.disabled[_nghost-%COMP%]{opacity:.5;-webkit-user-select:none;user-select:none;pointer-events:none;position:relative}.disabled[_nghost-%COMP%]:before{content:"";position:absolute;inset:0;background:transparent}.fill[_nghost-%COMP%]{height:auto;overflow:hidden;flex:1 0}.fill[_nghost-%COMP%] .section[_ngcontent-%COMP%]{height:auto;overflow:hidden;flex:1 0;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto 1fr;grid-template-areas:"label toggle" "tree tree"}.fill[_nghost-%COMP%] .browse-files[_ngcontent-%COMP%]{resize:none;height:initial;grid-area:tree}.fill[_nghost-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.fill[_nghost-%COMP%] spk-toggle[_ngcontent-%COMP%]{grid-area:toggle;flex-direction:row-reverse}.section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.form-field.hidden[_ngcontent-%COMP%]{display:none}.browse-files[_ngcontent-%COMP%]{display:flex;gap:.5rem;padding:.5rem 1rem;height:12.5rem;border:1px solid var(--base-level-40);border-radius:var(--shape-3);overflow:auto;resize:vertical;background:var(--base-level-10);position:relative}.browse-files[_ngcontent-%COMP%] spk-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]:not(.accepted){opacity:.5}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action].accepted[_ngcontent-%COMP%]{opacity:1}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%]{--list-active-bg: var(--base-level-30);gap:.125rem;padding:0;height:min-content;min-width:min-content}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0;gap:0;border:1px solid transparent}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].active[_ngcontent-%COMP%]{border-color:transparent;--list-active-bg: var(--primary-level-20)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].indeterminate[_ngcontent-%COMP%]{border-color:var(--primary-level-40)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].usually-hidden[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;height:100%;width:max-content;display:flex;align-items:center}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:3rem;gap:.25rem;height:1.5rem;display:flex;align-items:center;justify-content:center;cursor:pointer}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon.file[_ngcontent-%COMP%]{width:2rem;padding:0 .25rem}.browse-files-toggle[_ngcontent-%COMP%]{color:var(--base-level-60R)}.hidden[_ngcontent-%COMP%]{display:none}'],changeDetection:0})};export{Q as a};
1
+ import{a as ce}from"./chunk-22GS6UCG.js";import{q as de}from"./chunk-UJWW7PS7.js";import{b as ae}from"./chunk-KJ4O6F3R.js";import{a as pe,f as ue,l as he,m as _e,o as fe,w as ge}from"./chunk-NQVULKI2.js";import{ia as le}from"./chunk-3WKDD2IN.js";import{Ab as J,Ac as se,Bb as Y,Cb as p,Db as h,Eb as Z,F as B,Hb as G,Ib as k,Mc as W,Oc as w,Qb as R,Rb as ee,Sa as g,Sb as te,Ub as y,Vb as u,Wb as ne,Xb as I,Z as D,Za as H,ea as F,eb as K,ec as q,fa as N,fc as ie,gc as X,hc as M,jc as re,kb as v,qa as V,ra as C,tb as j,ub as U,uc as L,va as x,vb as E,vc as oe,w as z,yb as b}from"./chunk-Q3JJWGXW.js";import{a as A,b as $}from"./chunk-C6Q5SG76.js";var ve=["treeContainer"],Te=["formRef"],xe=[[["label"]],[["label"]],[["input"]]],be=["label","label","input"],Me=(o,t)=>t.id,Se=o=>({children:o,level:0}),me=o=>({$implicit:o}),Oe=(o,t)=>({children:o,level:t});function Fe(o,t){if(o&1){let e=k();p(0,"spk-button-group")(1,"button",13),y("click",function(){F(e);let s=u();return N(s.pathDiscoveryMethod.set("browse"))}),R(2,4),h(),p(3,"button",13),y("click",function(){F(e);let s=u();return N(s.pathDiscoveryMethod.set("path"))}),R(4,5),h()()}if(o&2){let e=u();g(),E("active",e.pathDiscoveryMethod()==="browse"),g(2),E("active",e.pathDiscoveryMethod()==="path")}}function Ne(o,t){o&1&&Z(0,"spk-progress-bar",9)}function ye(o,t){o&1&&(p(0,"spk-icon",18),M(1,"caret-down"),h(),p(2,"spk-icon",16),M(3,"folder-open"),h())}function we(o,t){o&1&&(p(0,"spk-icon"),M(1,"file"),h())}function ke(o,t){o&1&&(p(0,"spk-icon",18),M(1,"caret-right"),h(),p(2,"spk-icon",16),M(3,"folder"),h())}function Re(o,t){if(o&1&&v(0,ye,4,0)(1,we,2,0,"spk-icon")(2,ke,4,0),o&2){let e=u(2).$implicit;b(e.children.length?0:e.cls==="file"?1:2)}}function Ie(o,t){o&1&&(p(0,"spk-icon",16),M(1,"desktop-tower"),h())}function Le(o,t){o&1&&G(0)}function We(o,t){if(o&1&&v(0,Le,1,0,"ng-container",10),o&2){let e=u(2).$implicit,n=u().$implicit;u();let s=X(7);j("ngTemplateOutlet",s)("ngTemplateOutletContext",L(5,me,oe(2,Oe,e.children,n.level+1)))}}function Ae(o,t){if(o&1){let e=k();p(0,"div",14,3),y("click",function(){F(e);let s=u().$implicit,i=u(2);return N(i.toggleNode(s.id,s))}),p(2,"div",15),v(3,Re,3,1)(4,Ie,2,0,"spk-icon",16),h(),p(5,"div",17),y("click",function(s){F(e);let i=u().$implicit,r=u(2);return N(r.toggleSelectedNode(s,i))}),M(6),h()(),v(7,We,1,7,"ng-container")}if(o&2){let e=u().$implicit,n=u(2);E("accepted",e.accepted===!0)("active",e.evalState===n.TreeEvalEnum.Included)("indeterminate",e.isIndeterminate)("open",e.children.length)("usually-hidden",e.hidden),g(2),E("file",e.cls==="file"),g(),b(e.id!=="/"?3:4),g(3),re(" ",e.text," "),g(),b(e.children.length>0?7:-1)}}function $e(o,t){if(o&1&&v(0,Ae,8,15),o&2){let e=t.$implicit,n=u(2);b(e.hidden&&n._showHiddenNodes()||!e.hidden?0:-1)}}function Be(o,t){if(o&1&&(p(0,"spk-list"),J(1,$e,1,1,null,null,Me),h()),o&2){let e=t.$implicit;U("padding-left",e.level*.25,"rem"),g(),Y(e.children)}}function De(o,t){o&1&&G(0)}function Ve(o,t){if(o&1){let e=k();p(0,"spk-toggle",19),y("click",function(){F(e);let s=u();return N(s._showHiddenNodes.set(!s._showHiddenNodes()))}),R(1,6),h()}if(o&2){let e=u();E("active",e._showHiddenNodes()),g(),ee(e.showFiles()?"files":"folders"),te(1)}}var Ce=(i=>(i[i.ExcludedByParent=-2]="ExcludedByParent",i[i.Excluded=-1]="Excluded",i[i.None=0]="None",i[i.Included=1]="Included",i[i.IncludedByParent=2]="IncludedByParent",i))(Ce||{}),Q=class o{#t=D(ae);#o=D(ce);multiSelect=C(!1);disabled=C(!1);showFiles=C(!1);selectFiles=C(!1);accepts=C(null);startingPath=C(null);rootPath=C(void 0);backupSettings=C(null);pathRefreshTrigger=C(!1);showHiddenNodes=C(!1);hideShortcuts=C(!1);includes=V();excludes=V();_showHiddenNodes=x(!1);treeContainerRef=H("treeContainer");formRef=H("formRef");pathDiscoveryMethod=x("browse");isLoading=x(!1);currentPath=x("/");#e=x(null);treeSearchQuery=x("");treeNodes=x([]);filterGroups=this.#o.filterGroups();isByBackupSettings=W(()=>{let t=this.backupSettings();return!(t===void 0||t?.id===void 0||t?.time===void 0)});searchableTreeNodes=W(()=>{let t=this.treeSearchQuery();return t?this.treeNodes().filter(e=>e.text?.toLowerCase().includes(t.toLowerCase())):this.treeNodes()});TreeEvalEnum=Ce;treeStructure=W(()=>{let t=this.showHiddenNodes(),e=this.currentPath().split("\0").filter(a=>a!==""&&a!=="/"),n=structuredClone(e);for(let a=0;a<n.length;a++){let _=n[a].slice(1);if(_.startsWith("{")&&_.endsWith("}")){let f=_.slice(1,-1),d=this.filterGroups?.FilterGroups[f];if(d&&d.length){let T=d.map(P=>`-${P}`);n.splice(a,1,...T)}}}let s=this.searchableTreeNodes(),i=new Map,r=this.rootPath(),m=this.accepts(),l=r?{id:r,resolvedpath:r,text:r,parentPath:"",children:[],evalState:0,isIndeterminate:!1,cls:"folder"}:{id:"/",resolvedpath:"/",text:"Computer",parentPath:"",children:[],evalState:0,isIndeterminate:!1};m&&(l.accepted=!0),i.set("/",l);for(let a of s){let _=a.id.replace(r??"","").split("/").filter(Boolean),f="",d=l;for(let T of _){if(f+="/"+T,!i.has(f)){let P=a.hidden===!0&&t?0:this.#s(n,a.id,a.cls,d),S={id:a.id,isIndeterminate:this.isIndeterminate(n,a.id),evalState:P,parentPath:f,resolvedpath:a.id?.startsWith("%")?a.resolvedpath+"/":f,hidden:a.hidden,text:a.text,cls:a.cls,children:[]};m&&(S.accepted=this.matchAccepts(m,S)),i.set(f,S),d.children.push(S)}d=i.get(f)}}return[l]});#s(t,e,n,s){if(s.evalState===-1)return-2;let i=0,r=t.filter(l=>!l.startsWith("-")&&!l.startsWith("+")),m=t.filter(l=>l.startsWith("-")||l.startsWith("+"));if(r.length===0)return i;for(let l=0;l<r.length;l++){let a=r[l];if(e?.startsWith(a)){i=1;break}}if(m.length===0)return i;for(let l=0;l<m.length;l++){let a=m[l],c=a.slice(1),_=a.startsWith("-")?"exclude":"include";if(c.startsWith("/")&&c.endsWith("/")){if(n!=="folder")continue;if(e===c){i=_==="include"?1:-1;break}}if(c.startsWith("*")&&c.endsWith("*/")){if(n!=="folder")continue;let d=c.slice(1,-2);if(d==="")break;if(e?.includes(d+"/")){i=_==="include"?1:-1;break}}if(c.startsWith("[.*")&&c.endsWith("[^\\/]*]")){if(n!=="file")continue;let d=c.slice(3,-7);if(new RegExp(d).test(e)){i=_==="include"?1:-1;break}}if(c.startsWith("[")&&c.endsWith("]")){let d=c.slice(1,-1),T=this.translateCSharpRegex(d);if(new RegExp(`${T}`).test(e)){i=_==="include"?1:-1;break}}if(c.startsWith("*.")){if(n!=="file"||c.replace("*.","").length===0)continue;if(this.#n(e,c,!0)){i=_==="include"?1:-1;break}}if(c==="")continue;if(this.#n(e,c,!0)){i=_==="include"?1:-1;break}}return i}translateCSharpRegex(t){let e=t;e=e.replace(/^@/,"");let n=/\(\?<(?<name>\w+)>(?<pattern>[^)]+)\)/g;return e=e.replace(n,(s,i,r)=>`(${r})`),e=e.replace(/\\/g,"\\\\"),e}isIndeterminate(t,e){return t.some(n=>n.startsWith(e))}#n(t,e,n=!1){let s=e.replace(/\*/g,".*").replace(/\?/g,".").replace(/\[!([^\]]+)\]/g,"[^$1]");return new RegExp(`${s}${n?"$":""}`).test(t)}showHiddenNodesEffect=w(()=>this._showHiddenNodes.set(this.showHiddenNodes()));pathDiscoveryMethodEffect=w(()=>{let t=this.pathDiscoveryMethod(),e=this.#e();t==="browse"&&e&&this.currentPath.set(e.value)});matchAccepts(t,e){if(!t||e.cls==="folder"||e.id==="/")return!0;let n=t.split(",");if(n.length===0)return!0;let s="."+e.id.slice(e.id.indexOf("."));return s?n.some(i=>s.endsWith(i)):!1}currentPathEffect=w(()=>{let t=this.#e();t&&(t.value=this.currentPath(),t.dispatchEvent(new Event("input")))});inputValueChangeAbortController=null;inputRefEffect=w(()=>{let t=this.formRef()?.nativeElement?.querySelector("input");t&&(this.#a(t),this.inputValueChangeAbortController&&this.inputValueChangeAbortController.abort(),this.inputValueChangeAbortController=new AbortController,t.addEventListener("inputValueChanged",e=>{this.currentPath.set(e.detail.value)},{signal:this.inputValueChangeAbortController.signal}),this.#e.set(t),t.autocomplete="off")});ngOnInit(){let t=this.startingPath();t?(this.currentPath.set(t),this.#p(t)):this.#r(null,this.rootPath())}toggleSelectedNode(t,e){if(e.id==="/"||(t.stopPropagation(),e.evalState===-2))return;if(this.selectFiles()&&e.cls==="folder"){this.toggleNode(e.id,e);return}if(this.accepts()&&!e.accepted)return;let s=this.currentPath().split("\0").filter(r=>r!==""&&r!=="/"),i=this.isChildOfSelected(e)?`-${e.id}`:e.id;this.multiSelect()?s.includes(e.id)?this.currentPath.set(s.filter(r=>r!==e.id).join("\0")):s.some(r=>r.startsWith(i))?this.currentPath.set(s.filter(r=>r!==i).join("\0")):this.currentPath.set([...s,i].join("\0")):s.includes(e.id)?this.currentPath.set(s.filter(r=>r!==e.id).join("\0")):this.currentPath.set(e.id)}isChildOfSelected(t){return this.currentPath().split("\0").filter(n=>n!==""&&n!=="/").some(n=>t.id?.startsWith(n)||`-${t.id}`.startsWith(n))}toggleNode(t,e=null){e?.cls==="folder"&&(e?.children.length?this.treeNodes.update(n=>n.filter(s=>!s.id?.startsWith(e.id)||s.id===e.id)):this.#r(e,t))}#l(){setTimeout(()=>{let e=this.treeContainerRef()?.nativeElement?.querySelector(".active");e&&e.scrollIntoView({behavior:"smooth",block:"center"})},100)}#a(t){return Object.defineProperty(t,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").get.call(this)},set(e){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").set.call(this,e),this.dispatchEvent(new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:e}})),e}}),t}#c(t){return this.#t.postApiV1Filesystem({showHidden:!0,requestBody:{path:t},onlyFolders:!this.showFiles()})}#d(t){let e=this.backupSettings(),n={id:e.id+"",prefixOnly:!1,folderContents:!0,time:e.time,filter:t?"@"+t:void 0};return this.#t.getApiV1BackupByIdFiles(n)}#i(t){return this.isByBackupSettings()?this.#d(t):this.#c(t)}#p(t){let e=t.split("\0").filter(r=>r.startsWith("-")).map(r=>r.slice(1,-1)),n=t.split("\0").filter(r=>!r.startsWith("-")).filter(Boolean),s=n.map(r=>r.split("/").filter(Boolean)),i=[this.rootPath()??"/"];s.forEach(r=>{r.forEach((m,l)=>{let a=r.slice(0,l+1).join("/"),c=a.startsWith("%")?a:"/"+a;i.includes(c)||i.push(c)})}),this.isLoading.set(!0),z([...i.map(r=>this.#i(r))]).pipe(B(()=>this.isLoading.set(!1))).subscribe({next:r=>{this.treeNodes.update(m=>{let l=r.flatMap(c=>c.map(_=>{let f=_.id,d=f&&f.split("/").filter(Boolean).slice(0,-1).join("/"),P="/"+(f&&f.split("/").filter(Boolean).join("/")),S=n.findIndex(O=>this.multiSelect()?P.startsWith(O):P===O)>-1,Ee=n.findIndex(O=>O===f)>-1,Pe=e.findIndex(O=>O===P)>-1;return $(A({},_),{parentPath:d.startsWith("%")?d:"/"+d,isSelected:S&&!Pe||Ee})})),a=[...new Map([...m,...l].map(c=>[c.resolvedpath??c.id,c])).values()];return this.#l(),a})}})}#r(t=null,e="/"){this.isLoading.set(!0),this.#i(e).pipe(B(()=>this.isLoading.set(!1))).subscribe({next:n=>{let s=this.isByBackupSettings()?n.Files.map(i=>({text:i.Path.split("/").filter(r=>r!=="").pop(),id:i.Path,cls:i.Path.endsWith("/")?"folder":"file",leaf:t!==null,resolvedpath:i.Path,hidden:!1})):n;this.treeNodes.update(i=>{let r=s.map(l=>{let a=l.id.startsWith("%")&&l.id.endsWith("%")||l.id.endsWith("/")?"folder":"file";return $(A({},l),{cls:a,parentPath:e})}),m=[...new Map([...i,...r].map(l=>[l.resolvedpath??l.id,l])).values()];return this.hideShortcuts()?m.filter(l=>!l.id.startsWith("%")):m})}})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=K({type:o,selectors:[["app-file-tree"]],viewQuery:function(e,n){e&1&&(q(n.treeContainerRef,ve,5),q(n.formRef,Te,5)),e&2&&ie(2)},hostVars:2,hostBindings:function(e,n){e&2&&E("disabled",n.disabled())},inputs:{multiSelect:[1,"multiSelect"],disabled:[1,"disabled"],showFiles:[1,"showFiles"],selectFiles:[1,"selectFiles"],accepts:[1,"accepts"],startingPath:[1,"startingPath"],rootPath:[1,"rootPath"],backupSettings:[1,"backupSettings"],pathRefreshTrigger:[1,"pathRefreshTrigger"],showHiddenNodes:[1,"showHiddenNodes"],hideShortcuts:[1,"hideShortcuts"]},outputs:{includes:"includes",excludes:"excludes"},ngContentSelectors:be,decls:15,vars:15,consts:()=>{let t;t=$localize` Browser path `;let e;e=$localize` Manually type path `;let n;return n=$localize` Show hidden ${"\uFFFD0\uFFFD"}:INTERPOLATION: `,[["treeContainer",""],["recursiveTree",""],["formRef",""],["treeNode",""],t,e,n,[1,"section"],[1,"browse-files"],[1,"indeterminate","primary"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"primary","raised","browse-files-toggle",3,"active"],[1,"form-field"],["type","button",3,"click"],["action","",3,"click"],[1,"icon"],[1,"spk-primary"],[1,"text",3,"click"],[1,"small"],[1,"primary","raised","browse-files-toggle",3,"click"]]},template:function(e,n){if(e&1&&(ne(xe),v(0,Fe,5,4,"spk-button-group"),p(1,"div",7),I(2,0,["ngProjectAs","label",5,["label"]]),p(3,"div",8,0),v(5,Ne,1,0,"spk-progress-bar",9)(6,Be,3,2,"ng-template",null,1,se)(8,De,1,0,"ng-container",10),h(),v(9,Ve,2,3,"spk-toggle",11),h(),p(10,"div",12,2)(12,"spk-form-field"),I(13,1,["ngProjectAs","label",5,["label"]]),I(14,2,["ngProjectAs","input",5,["input"]]),h()()),e&2){let s=X(7);b(n.multiSelect()?-1:0),g(),E("hidden",n.pathDiscoveryMethod()!=="browse"),g(2),E("visualize-accepted",n.accepts()),g(2),b(n.isLoading()?5:-1),g(3),j("ngTemplateOutlet",s)("ngTemplateOutletContext",L(13,me,L(11,Se,n.treeStructure()))),g(),b(n.accepts()?-1:9),g(),E("hidden",n.pathDiscoveryMethod()!=="path")}},dependencies:[ue,ge,pe,he,_e,fe,le,de],styles:['[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1rem}.disabled[_nghost-%COMP%]{opacity:.5;-webkit-user-select:none;user-select:none;pointer-events:none;position:relative}.disabled[_nghost-%COMP%]:before{content:"";position:absolute;inset:0;background:transparent}.fill[_nghost-%COMP%]{height:auto;overflow:hidden;flex:1 0}.fill[_nghost-%COMP%] .section[_ngcontent-%COMP%]{height:auto;overflow:hidden;flex:1 0;display:grid;grid-template-columns:1fr auto;grid-template-rows:auto 1fr;grid-template-areas:"label toggle" "tree tree"}.fill[_nghost-%COMP%] .browse-files[_ngcontent-%COMP%]{resize:none;height:initial;grid-area:tree}.fill[_nghost-%COMP%] label[_ngcontent-%COMP%]{grid-area:label}.fill[_nghost-%COMP%] spk-toggle[_ngcontent-%COMP%]{grid-area:toggle;flex-direction:row-reverse}.section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.form-field.hidden[_ngcontent-%COMP%]{display:none}.browse-files[_ngcontent-%COMP%]{display:flex;gap:.5rem;padding:.5rem 1rem;height:12.5rem;border:1px solid var(--base-level-40);border-radius:var(--shape-3);overflow:auto;resize:vertical;background:var(--base-level-10);position:relative}.browse-files[_ngcontent-%COMP%] spk-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]:not(.accepted){opacity:.5}.browse-files.visualize-accepted[_ngcontent-%COMP%] [action].accepted[_ngcontent-%COMP%]{opacity:1}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%]{--list-active-bg: var(--base-level-30);gap:.125rem;padding:0;height:min-content;min-width:min-content}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%]{padding:0;gap:0;border:1px solid transparent}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].active[_ngcontent-%COMP%]{border-color:transparent;--list-active-bg: var(--primary-level-20)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].indeterminate[_ngcontent-%COMP%]{border-color:var(--primary-level-40)}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action].usually-hidden[_ngcontent-%COMP%]{opacity:.6}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;height:100%;width:max-content;display:flex;align-items:center}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:3rem;gap:.25rem;height:1.5rem;display:flex;align-items:center;justify-content:center;cursor:pointer}.browse-files[_ngcontent-%COMP%] spk-list[_ngcontent-%COMP%] [action][_ngcontent-%COMP%] .icon.file[_ngcontent-%COMP%]{width:2rem;padding:0 .25rem}.browse-files-toggle[_ngcontent-%COMP%]{color:var(--base-level-60R)}.hidden[_ngcontent-%COMP%]{display:none}'],changeDetection:0})};export{Q as a};
@@ -1 +1 @@
1
- import{a as b}from"./chunk-6TZWRTRA.js";import{a as $,b as y,d as B,e as h,h as v,l as G,o as L,p as U,r as K}from"./chunk-UJWW7PS7.js";import{b as N}from"./chunk-KJ4O6F3R.js";import{c as E,d as R}from"./chunk-ETEYALHD.js";import"./chunk-TS4YY2WO.js";import{a as w,c as X,g as x,l as V,w as z,y as j}from"./chunk-TLVMA6DU.js";import"./chunk-6LUM2XU4.js";import"./chunk-3WKDD2IN.js";import{Cb as r,Db as n,Eb as l,F as g,Ob as I,Pb as M,Qb as u,Sa as F,Tb as O,Ub as f,Z as p,eb as S,hc as A,kb as D,tb as d,tc as k,va as m,vb as C,yb as P}from"./chunk-Q3JJWGXW.js";import"./chunk-C6Q5SG76.js";var q=()=>["/"];function H(c,e){c&1&&(r(0,"spk-form-field")(1,"label",18),u(2,4),n(),l(3,"input",19),n())}var s=new U,T=class c{#e=p(X);#t=p(N);#o=p(b);#n=p(E);isImporting=m(!1);isSecureFile=m(!1);importForm=s.group({config:s.control(""),cmdline:s.control(!1),importMetadata:s.control(!1),direct:s.control(!1),passphrase:s.control("")});selectedFile=m(null);onFileDropped(e){let t=e.target?.files?.item(0);if(t){let i=new FileReader;this.isSecureFile.set(t.type!=="application/json"),i.onload=this.#i.bind(this),i.readAsArrayBuffer(t)}}#i(e){let o=e.target?.result;this.importForm.patchValue({config:this.#r(o)})}#r(e){let o=new Uint8Array(e),t=o.byteLength,i="";for(let a=0;a<t;a++)i+=String.fromCharCode(o[a]);return btoa(i)}submit(){this.isImporting.set(!0),this.#t.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(g(()=>this.isImporting.set(!1))).subscribe({next:e=>{let o=this.#o.addDraftBackup(e.data);this.#n.navigate(["/backup-draft",o])},error:e=>{this.#e.error(e.message)}})}static \u0275fac=function(o){return new(o||c)};static \u0275cmp=S({type:c,selectors:[["app-import"]],decls:24,vars:7,consts:()=>{let e;e=$localize` Import backup configuration ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SPK_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SPK_ICON: Back ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SPK_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SPK_ICON: Import ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,e=O(e);let o;o=$localize`Select a configuration file`;let t;t=$localize`Import Metadata`;let i;i=$localize`Save now`;let a;return a=$localize`Passphrase`,[e,o,t,i,a,[1,"actions"],["spk-button","","type","button",1,"outlined",3,"routerLink"],["spk-button","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["spkDragDrop","",3,"fileDropped"],["for","file"],["type","file","accept",".json,.aes",3,"change"],["suffix",""],[1,"primary","raised"],["for","importMetadata"],["type","checkbox","formControlName","importMetadata"],["for","direct"],["type","checkbox","formControlName","direct"],["for","passphrase"],["type","password","formControlName","passphrase"]]},template:function(o,t){o&1&&(r(0,"header")(1,"h3"),I(2,0),r(3,"div",5)(4,"button",6),l(5,"spk-icon"),n(),r(6,"button",7),f("click",function(){return t.submit()}),l(7,"spk-icon"),n()(),M(),n()(),r(8,"form",8)(9,"spk-form-field",9),f("fileDropped",function(a){return t.onFileDropped(a)}),r(10,"label",10),u(11,1),n(),r(12,"input",11),f("change",function(a){return t.onFileDropped(a)}),n(),r(13,"spk-icon",12),A(14,"upload"),n()(),D(15,H,4,0,"spk-form-field"),r(16,"spk-toggle",13)(17,"label",14),u(18,2),n(),l(19,"input",15),n(),r(20,"spk-toggle",13)(21,"label",16),u(22,3),n(),l(23,"input",17),n()()),o&2&&(F(4),d("routerLink",k(6,q)),F(2),C("loader",t.isImporting()),d("disabled",t.isImporting()),F(2),d("formGroup",t.importForm),F(7),P(t.isSecureFile()?15:-1))},dependencies:[K,v,y,$,B,h,G,L,R,j,V,w,x,z],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}"],changeDetection:0})};export{T as default};
1
+ import{a as b}from"./chunk-6TZWRTRA.js";import{a as $,b as y,d as B,e as h,h as v,l as G,o as L,p as U,r as K}from"./chunk-UJWW7PS7.js";import{b as N}from"./chunk-KJ4O6F3R.js";import{c as E,d as R}from"./chunk-ETEYALHD.js";import"./chunk-TS4YY2WO.js";import{a as w,c as X,g as x,l as V,w as z,y as j}from"./chunk-NQVULKI2.js";import"./chunk-6LUM2XU4.js";import"./chunk-3WKDD2IN.js";import{Cb as r,Db as n,Eb as l,F as g,Ob as I,Pb as M,Qb as u,Sa as F,Tb as O,Ub as f,Z as p,eb as S,hc as A,kb as D,tb as d,tc as k,va as m,vb as C,yb as P}from"./chunk-Q3JJWGXW.js";import"./chunk-C6Q5SG76.js";var q=()=>["/"];function H(c,e){c&1&&(r(0,"spk-form-field")(1,"label",18),u(2,4),n(),l(3,"input",19),n())}var s=new U,T=class c{#e=p(X);#t=p(N);#o=p(b);#n=p(E);isImporting=m(!1);isSecureFile=m(!1);importForm=s.group({config:s.control(""),cmdline:s.control(!1),importMetadata:s.control(!1),direct:s.control(!1),passphrase:s.control("")});selectedFile=m(null);onFileDropped(e){let t=e.target?.files?.item(0);if(t){let i=new FileReader;this.isSecureFile.set(t.type!=="application/json"),i.onload=this.#i.bind(this),i.readAsArrayBuffer(t)}}#i(e){let o=e.target?.result;this.importForm.patchValue({config:this.#r(o)})}#r(e){let o=new Uint8Array(e),t=o.byteLength,i="";for(let a=0;a<t;a++)i+=String.fromCharCode(o[a]);return btoa(i)}submit(){this.isImporting.set(!0),this.#t.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(g(()=>this.isImporting.set(!1))).subscribe({next:e=>{let o=this.#o.addDraftBackup(e.data);this.#n.navigate(["/backup-draft",o])},error:e=>{this.#e.error(e.message)}})}static \u0275fac=function(o){return new(o||c)};static \u0275cmp=S({type:c,selectors:[["app-import"]],decls:24,vars:7,consts:()=>{let e;e=$localize` Import backup configuration ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SPK_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SPK_ICON: Back ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SPK_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SPK_ICON: Import ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,e=O(e);let o;o=$localize`Select a configuration file`;let t;t=$localize`Import Metadata`;let i;i=$localize`Save now`;let a;return a=$localize`Passphrase`,[e,o,t,i,a,[1,"actions"],["spk-button","","type","button",1,"outlined",3,"routerLink"],["spk-button","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["spkDragDrop","",3,"fileDropped"],["for","file"],["type","file","accept",".json,.aes",3,"change"],["suffix",""],[1,"primary","raised"],["for","importMetadata"],["type","checkbox","formControlName","importMetadata"],["for","direct"],["type","checkbox","formControlName","direct"],["for","passphrase"],["type","password","formControlName","passphrase"]]},template:function(o,t){o&1&&(r(0,"header")(1,"h3"),I(2,0),r(3,"div",5)(4,"button",6),l(5,"spk-icon"),n(),r(6,"button",7),f("click",function(){return t.submit()}),l(7,"spk-icon"),n()(),M(),n()(),r(8,"form",8)(9,"spk-form-field",9),f("fileDropped",function(a){return t.onFileDropped(a)}),r(10,"label",10),u(11,1),n(),r(12,"input",11),f("change",function(a){return t.onFileDropped(a)}),n(),r(13,"spk-icon",12),A(14,"upload"),n()(),D(15,H,4,0,"spk-form-field"),r(16,"spk-toggle",13)(17,"label",14),u(18,2),n(),l(19,"input",15),n(),r(20,"spk-toggle",13)(21,"label",16),u(22,3),n(),l(23,"input",17),n()()),o&2&&(F(4),d("routerLink",k(6,q)),F(2),C("loader",t.isImporting()),d("disabled",t.isImporting()),F(2),d("formGroup",t.importForm),F(7),P(t.isSecureFile()?15:-1))},dependencies:[K,v,y,$,B,h,G,L,R,j,V,w,x,z],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}"],changeDetection:0})};export{T as default};
@@ -1 +1 @@
1
- import{a as z}from"./chunk-PO2RDC4E.js";import"./chunk-I24WOYYC.js";import"./chunk-ASPLJ6GL.js";import"./chunk-CP2S6DC4.js";import{a as G}from"./chunk-6TZWRTRA.js";import"./chunk-UJWW7PS7.js";import"./chunk-2P3GS5BJ.js";import{b as L}from"./chunk-KJ4O6F3R.js";import{d as E}from"./chunk-ETEYALHD.js";import"./chunk-TS4YY2WO.js";import{a as R,g as f,h as k,k as w,o as X}from"./chunk-TLVMA6DU.js";import"./chunk-6LUM2XU4.js";import"./chunk-3WKDD2IN.js";import"./chunk-GK7T43YY.js";import{Ab as x,Bb as $,Cb as e,Db as i,Eb as s,Fb as D,Gb as b,Ob as h,Pb as y,Qb as c,Rb as A,Sa as p,Sb as I,Vb as S,Z as d,eb as O,hc as l,kb as m,kc as B,qb as M,rb as P,tb as u,tc as g,uc as v,yb as F,zb as N}from"./chunk-Q3JJWGXW.js";import"./chunk-C6Q5SG76.js";var W=()=>[k,f,R,E],j=()=>["/restore-from-files"],K=()=>["/restore/from-config"],q=t=>["/restore",t];function V(t,r){if(t&1&&(e(0,"spk-card",5),s(1,"img",10),e(2,"div",7)(3,"h3"),c(4,1),i(),e(5,"p"),l(6),i()(),e(7,"button",8),h(8,2),s(9,"spk-icon"),y(),i()()),t&2){let n,a,o=r.$implicit;p(4),A((n=o.Backup==null?null:o.Backup.Name)!==null&&n!==void 0?n:"Backup name missing"),I(4),p(2),B(" ",(a=o.Backup==null||o.Backup.Metadata==null?null:o.Backup.Metadata.SourceSizeString)!==null&&a!==void 0?a:"-"," / ",(a=o.Backup==null||o.Backup.Metadata==null?null:o.Backup.Metadata.BackupListCount)!==null&&a!==void 0?a:"-"," "),p(),u("routerLink",v(4,q,o.Backup==null?null:o.Backup.ID))}}function H(t,r){if(t&1&&x(0,V,10,6,"spk-card",5,N),t&2){let n=S(2);$(n.backups())}}function J(t,r){t&1&&(D(0),c(1,3),b())}function Q(t,r){if(t&1&&m(0,H,2,0)(1,J,2,0,"ng-container"),t&2){let n=S();F(n.backups().length?0:1)}}function U(t,r){t&1&&(e(0,"div",11),s(1,"spk-progress-bar",12),e(2,"div",7)(3,"h3"),c(4,4),i()()())}var C=class t{#e=d(G);#t=d(L);backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;ngOnInit(){this.#e.getBackups()}restoreNow(r){this.#t.postApiV1BackupByIdRestore({id:r.Backup?.ID,requestBody:{}})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=O({type:t,selectors:[["app-restore"]],decls:32,vars:5,consts:()=>{let r;r=$localize`Where do you want to restore from?`;let n;n=$localize`Restore ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let a;a=$localize` Restore ${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let o;o=$localize`No backups founds`;let T;return T=$localize`Loading backups...`,[r,n,a,o,T,[1,"type-a"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["spk-button","",3,"routerLink"],["src","assets/images/restore.png","alt","","width","48px"],["src","assets/images/folder.png","alt","","width","48px"],[1,"loading-list"],[1,"indeterminate","primary"]]},template:function(n,a){n&1&&(s(0,"app-status-bar"),e(1,"section")(2,"h2"),c(3,0),i(),e(4,"spk-card",5),s(5,"img",6),e(6,"div",7)(7,"h3"),l(8,"Direct restore from backup files"),i(),e(9,"p"),l(10,"Point to your backup files and restore from there."),i()(),e(11,"button",8),l(12," Start "),e(13,"spk-icon"),l(14,"play-circle"),i()()(),e(15,"spk-card",5),s(16,"img",9),e(17,"div",7)(18,"h3"),l(19,"Restore from configuration"),i(),e(20,"p"),l(21,"Load destination from an exported job or a storage provider"),i()(),e(22,"button",8),l(23," Start "),e(24,"spk-icon"),l(25,"play-circle"),i()()(),e(26,"spk-divider"),l(27,"Or existing"),i(),m(28,Q,2,1)(29,U,5,0),M(30,28,W,null,29),i()),n&2&&(p(11),u("routerLink",g(3,j)),p(11),u("routerLink",g(4,K)),p(8),P(!a.backupsLoading()))},dependencies:[z,k,f,w,R,X,E],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{font:var(--title-30);text-align:center;padding:2rem}section[_ngcontent-%COMP%]{max-width:43.75rem;margin:0 auto;padding:2rem 0;display:flex;flex-direction:column;gap:1rem}spk-divider[_ngcontent-%COMP%]{color:var(--base-level-60)}spk-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;--card-padding: 2rem}spk-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}"],changeDetection:0})};export{C as default};
1
+ import{a as z}from"./chunk-RIRYVDWF.js";import"./chunk-GXX5QXLE.js";import"./chunk-GJ6GRAEW.js";import"./chunk-65ULQ2PN.js";import{a as G}from"./chunk-6TZWRTRA.js";import"./chunk-UJWW7PS7.js";import"./chunk-TB27CACB.js";import{b as L}from"./chunk-KJ4O6F3R.js";import{d as E}from"./chunk-ETEYALHD.js";import"./chunk-TS4YY2WO.js";import{a as R,g as f,h as k,k as w,o as X}from"./chunk-NQVULKI2.js";import"./chunk-6LUM2XU4.js";import"./chunk-3WKDD2IN.js";import"./chunk-GK7T43YY.js";import{Ab as x,Bb as $,Cb as e,Db as i,Eb as s,Fb as D,Gb as b,Ob as h,Pb as y,Qb as c,Rb as A,Sa as p,Sb as I,Vb as S,Z as d,eb as O,hc as l,kb as m,kc as B,qb as M,rb as P,tb as u,tc as g,uc as v,yb as F,zb as N}from"./chunk-Q3JJWGXW.js";import"./chunk-C6Q5SG76.js";var W=()=>[k,f,R,E],j=()=>["/restore-from-files"],K=()=>["/restore/from-config"],q=t=>["/restore",t];function V(t,r){if(t&1&&(e(0,"spk-card",5),s(1,"img",10),e(2,"div",7)(3,"h3"),c(4,1),i(),e(5,"p"),l(6),i()(),e(7,"button",8),h(8,2),s(9,"spk-icon"),y(),i()()),t&2){let n,a,o=r.$implicit;p(4),A((n=o.Backup==null?null:o.Backup.Name)!==null&&n!==void 0?n:"Backup name missing"),I(4),p(2),B(" ",(a=o.Backup==null||o.Backup.Metadata==null?null:o.Backup.Metadata.SourceSizeString)!==null&&a!==void 0?a:"-"," / ",(a=o.Backup==null||o.Backup.Metadata==null?null:o.Backup.Metadata.BackupListCount)!==null&&a!==void 0?a:"-"," "),p(),u("routerLink",v(4,q,o.Backup==null?null:o.Backup.ID))}}function H(t,r){if(t&1&&x(0,V,10,6,"spk-card",5,N),t&2){let n=S(2);$(n.backups())}}function J(t,r){t&1&&(D(0),c(1,3),b())}function Q(t,r){if(t&1&&m(0,H,2,0)(1,J,2,0,"ng-container"),t&2){let n=S();F(n.backups().length?0:1)}}function U(t,r){t&1&&(e(0,"div",11),s(1,"spk-progress-bar",12),e(2,"div",7)(3,"h3"),c(4,4),i()()())}var C=class t{#e=d(G);#t=d(L);backups=this.#e.backups;backupsLoading=this.#e.backupsLoading;ngOnInit(){this.#e.getBackups()}restoreNow(r){this.#t.postApiV1BackupByIdRestore({id:r.Backup?.ID,requestBody:{}})}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=O({type:t,selectors:[["app-restore"]],decls:32,vars:5,consts:()=>{let r;r=$localize`Where do you want to restore from?`;let n;n=$localize`Restore ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let a;a=$localize` Restore ${"\uFFFD#9\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let o;o=$localize`No backups founds`;let T;return T=$localize`Loading backups...`,[r,n,a,o,T,[1,"type-a"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["spk-button","",3,"routerLink"],["src","assets/images/restore.png","alt","","width","48px"],["src","assets/images/folder.png","alt","","width","48px"],[1,"loading-list"],[1,"indeterminate","primary"]]},template:function(n,a){n&1&&(s(0,"app-status-bar"),e(1,"section")(2,"h2"),c(3,0),i(),e(4,"spk-card",5),s(5,"img",6),e(6,"div",7)(7,"h3"),l(8,"Direct restore from backup files"),i(),e(9,"p"),l(10,"Point to your backup files and restore from there."),i()(),e(11,"button",8),l(12," Start "),e(13,"spk-icon"),l(14,"play-circle"),i()()(),e(15,"spk-card",5),s(16,"img",9),e(17,"div",7)(18,"h3"),l(19,"Restore from configuration"),i(),e(20,"p"),l(21,"Load destination from an exported job or a storage provider"),i()(),e(22,"button",8),l(23," Start "),e(24,"spk-icon"),l(25,"play-circle"),i()()(),e(26,"spk-divider"),l(27,"Or existing"),i(),m(28,Q,2,1)(29,U,5,0),M(30,28,W,null,29),i()),n&2&&(p(11),u("routerLink",g(3,j)),p(11),u("routerLink",g(4,K)),p(8),P(!a.backupsLoading()))},dependencies:[z,k,f,w,R,X,E],styles:["[_nghost-%COMP%]{display:block}h2[_ngcontent-%COMP%]{font:var(--title-30);text-align:center;padding:2rem}section[_ngcontent-%COMP%]{max-width:43.75rem;margin:0 auto;padding:2rem 0;display:flex;flex-direction:column;gap:1rem}spk-divider[_ngcontent-%COMP%]{color:var(--base-level-60)}spk-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;--card-padding: 2rem}spk-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}"],changeDetection:0})};export{C as default};
@@ -1 +1 @@
1
- import{b as ae}from"./chunk-6CRYB4HA.js";import{a as te}from"./chunk-PO2RDC4E.js";import"./chunk-I24WOYYC.js";import"./chunk-ASPLJ6GL.js";import"./chunk-CP2S6DC4.js";import{a as j}from"./chunk-6TZWRTRA.js";import{b as H,d as J,g as Q,q as Y}from"./chunk-UJWW7PS7.js";import"./chunk-2P3GS5BJ.js";import{b as W}from"./chunk-KJ4O6F3R.js";import{a as z,d as q}from"./chunk-ETEYALHD.js";import"./chunk-TS4YY2WO.js";import{a as Z,g as x,l as ee}from"./chunk-TLVMA6DU.js";import"./chunk-6LUM2XU4.js";import"./chunk-3WKDD2IN.js";import"./chunk-GK7T43YY.js";import{Cb as i,D as g,Db as a,Eb as l,F as u,Mc as C,N as k,Ob as r,Oc as h,Pb as p,Qb as T,Rb as L,Sa as s,Sb as U,Ub as A,Z as D,eb as y,hc as E,kb as v,mc as w,nc as X,oc as V,q as O,tb as F,va as c,vb as P,xb as G,yb as K}from"./chunk-Q3JJWGXW.js";import"./chunk-C6Q5SG76.js";function ie(S,t){S&1&&(i(0,"spk-icon",18),E(1,"check"),a())}function ne(S,t){S&1&&(i(0,"spk-icon",18),E(1,"warning"),a())}var m=class S{#a=D(z);#i=D(j);#e=D(W);#t="";backupId=ae(this.#a.params.pipe(O(t=>t.id)));activeBackup=C(()=>{let t=this.#i.backups().find(_=>_.Backup?.ID===this.backupId());return this.#t=t?.Backup?.DBPath??"",t});backupFilePath=c("");lastValidatedPath=c("");isValidatedPath=C(()=>this.lastValidatedPath()===this.backupFilePath());backupFilePathEffect=h(()=>{let t=this.backupFilePath();t!==""&&this.#e.postApiV1FilesystemValidate({requestBody:{path:t}}).subscribe({next:()=>this.lastValidatedPath.set(t)})});isRestoring=c(!1);isRepairing=c(!1);isDeleting=c(!1);isSavingDbPath=c(!1);isSavingAndRepairing=c(!1);isMovingDb=c(!1);activeBackupEffect=h(()=>{let t=this.activeBackup();if(!t)return;let _=t.Backup?.DBPath??"";this.backupFilePath.set(_)});repairDatabase(){this.isRepairing.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),u(()=>this.isRepairing.set(!1))).subscribe()}deleteDatabase(){this.isDeleting.set(!0),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(g(1),u(()=>this.isDeleting.set(!1))).subscribe()}restoreDatabase(){this.isRestoring.set(!0),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(g(1),k(()=>this.#e.postApiV1BackupByIdRepair({id:this.backupId()})),u(()=>this.isRestoring.set(!1))).subscribe()}resetDatabasePath(){this.backupFilePath.set(this.#t)}saveDatabasePath(){this.isSavingDbPath.set(!0),this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:this.backupFilePath()}}).pipe(u(()=>this.isSavingDbPath.set(!1))).subscribe()}saveAndRepairDatabasePath(){this.isSavingAndRepairing.set(!0),this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:this.backupFilePath()}}).pipe(k(()=>this.#e.postApiV1BackupByIdRepair({id:this.backupId()})),u(()=>this.isSavingAndRepairing.set(!1)))}moveDatabasePath(){this.isMovingDb.set(!0),this.#e.postApiV1BackupByIdMovedb({id:this.backupId(),requestBody:{path:this.backupFilePath()}}).pipe(u(()=>this.isMovingDb.set(!1))).subscribe()}static \u0275fac=function(_){return new(_||S)};static \u0275cmp=y({type:S,selectors:[["app-database"]],decls:46,vars:15,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let _;_=$localize`Local database for ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. This makes it faster to perform many operations, and reduces the amount of data that needs to be downloaded for each operation. `;let n;n=$localize`Maintainance`;let d;d=$localize` If the backup and the remote storage is out of sync, Duplicati will require that you perform a repair operation to synchronize the database. If the repair is unsuccessful, you can delete the local database and re-generate. `;let f;f=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:wrench${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Repair `;let b;b=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:trash${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Delete `;let B;B=$localize`${"\uFFFD#25\uFFFD"}:START_TAG_SPK_ICON:clock-counter-clockwise${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SPK_ICON: Restore (delete and repair) `;let I;I=$localize`Placement`;let M;M=$localize`${"\uFFFD#36\uFFFD"}:START_TAG_SPK_ICON:backspace${"\uFFFD/#36\uFFFD"}:CLOSE_TAG_SPK_ICON: Reset `;let N;N=$localize`${"\uFFFD#39\uFFFD"}:START_TAG_SPK_ICON:floppy-disk${"\uFFFD/#39\uFFFD"}:CLOSE_TAG_SPK_ICON: Save `;let $;$=$localize`${"\uFFFD#42\uFFFD"}:START_TAG_SPK_ICON:wrench${"\uFFFD/#42\uFFFD"}:CLOSE_TAG_SPK_ICON: Save & Repair `;let R;return R=$localize`${"\uFFFD#45\uFFFD"}:START_TAG_SPK_ICON:flow-arrow${"\uFFFD/#45\uFFFD"}:CLOSE_TAG_SPK_ICON: Move existing database `,[t,_,e,n,d,f,b,B,I,M,N,$,R,[1,"back"],["type","button","spk-button","","routerLink","/",1,"small"],[1,"actions","maintainance"],["spk-button","",3,"click"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],[1,"actions","placement"],["spk-button","",3,"click","disabled"]]},template:function(_,e){if(_&1&&(l(0,"app-status-bar"),i(1,"section")(2,"div",13)(3,"button",14),r(4,0),l(5,"spk-icon"),p(),a()(),i(6,"article")(7,"h1"),T(8,1),a(),i(9,"p"),T(10,2),a()(),i(11,"article")(12,"h2"),T(13,3),a(),i(14,"p"),T(15,4),a(),i(16,"div",15)(17,"button",16),A("click",function(){return e.repairDatabase()}),r(18,5),l(19,"spk-icon"),p(),a(),i(20,"button",16),A("click",function(){return e.deleteDatabase()}),r(21,6),l(22,"spk-icon"),p(),a(),i(23,"button",16),A("click",function(){return e.restoreDatabase()}),r(24,7),l(25,"spk-icon"),p(),a()()(),i(26,"article")(27,"h2"),T(28,8),a(),i(29,"spk-form-field")(30,"input",17),V("ngModelChange",function(d){return X(e.backupFilePath,d)||(e.backupFilePath=d),d}),a(),v(31,ie,2,0,"spk-icon",18)(32,ne,2,0,"spk-icon",18),a(),i(33,"div",19)(34,"button",20),A("click",function(){return e.resetDatabasePath()}),r(35,9),l(36,"spk-icon"),p(),a(),i(37,"button",20),A("click",function(){return e.saveDatabasePath()}),r(38,10),l(39,"spk-icon"),p(),a(),i(40,"button",20),A("click",function(){return e.saveAndRepairDatabasePath()}),r(41,11),l(42,"spk-icon"),p(),a(),i(43,"button",20),A("click",function(){return e.moveDatabasePath()}),r(44,12),l(45,"spk-icon"),p(),a()()()()),_&2){let n;s(8),L((n=e.activeBackup())==null||n.Backup==null?null:n.Backup.Name),U(8),s(9),P("loader",e.isRepairing()),s(3),P("loader",e.isDeleting()),s(3),P("loader",e.isRestoring()),s(6),G(e.isValidatedPath()?"success":"warn"),s(),w("ngModel",e.backupFilePath),s(),K(e.isValidatedPath()?31:32),s(3),F("disabled",!e.isValidatedPath()),s(3),F("disabled",!e.isValidatedPath()),s(3),F("disabled",!e.isValidatedPath()),s(3),F("disabled",!e.isValidatedPath())}},dependencies:[Y,H,J,Q,te,x,ee,Z,q],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem}article[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}h1[_ngcontent-%COMP%]{font:var(--title-20)}h2[_ngcontent-%COMP%]{font:var(--title-30)}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{m as default};
1
+ import{b as ae}from"./chunk-6CRYB4HA.js";import{a as te}from"./chunk-RIRYVDWF.js";import"./chunk-GXX5QXLE.js";import"./chunk-GJ6GRAEW.js";import"./chunk-65ULQ2PN.js";import{a as j}from"./chunk-6TZWRTRA.js";import{b as H,d as J,g as Q,q as Y}from"./chunk-UJWW7PS7.js";import"./chunk-TB27CACB.js";import{b as W}from"./chunk-KJ4O6F3R.js";import{a as z,d as q}from"./chunk-ETEYALHD.js";import"./chunk-TS4YY2WO.js";import{a as Z,g as x,l as ee}from"./chunk-NQVULKI2.js";import"./chunk-6LUM2XU4.js";import"./chunk-3WKDD2IN.js";import"./chunk-GK7T43YY.js";import{Cb as i,D as g,Db as a,Eb as l,F as u,Mc as C,N as k,Ob as r,Oc as h,Pb as p,Qb as T,Rb as L,Sa as s,Sb as U,Ub as A,Z as D,eb as y,hc as E,kb as v,mc as w,nc as X,oc as V,q as O,tb as F,va as c,vb as P,xb as G,yb as K}from"./chunk-Q3JJWGXW.js";import"./chunk-C6Q5SG76.js";function ie(S,t){S&1&&(i(0,"spk-icon",18),E(1,"check"),a())}function ne(S,t){S&1&&(i(0,"spk-icon",18),E(1,"warning"),a())}var m=class S{#a=D(z);#i=D(j);#e=D(W);#t="";backupId=ae(this.#a.params.pipe(O(t=>t.id)));activeBackup=C(()=>{let t=this.#i.backups().find(_=>_.Backup?.ID===this.backupId());return this.#t=t?.Backup?.DBPath??"",t});backupFilePath=c("");lastValidatedPath=c("");isValidatedPath=C(()=>this.lastValidatedPath()===this.backupFilePath());backupFilePathEffect=h(()=>{let t=this.backupFilePath();t!==""&&this.#e.postApiV1FilesystemValidate({requestBody:{path:t}}).subscribe({next:()=>this.lastValidatedPath.set(t)})});isRestoring=c(!1);isRepairing=c(!1);isDeleting=c(!1);isSavingDbPath=c(!1);isSavingAndRepairing=c(!1);isMovingDb=c(!1);activeBackupEffect=h(()=>{let t=this.activeBackup();if(!t)return;let _=t.Backup?.DBPath??"";this.backupFilePath.set(_)});repairDatabase(){this.isRepairing.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),u(()=>this.isRepairing.set(!1))).subscribe()}deleteDatabase(){this.isDeleting.set(!0),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(g(1),u(()=>this.isDeleting.set(!1))).subscribe()}restoreDatabase(){this.isRestoring.set(!0),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(g(1),k(()=>this.#e.postApiV1BackupByIdRepair({id:this.backupId()})),u(()=>this.isRestoring.set(!1))).subscribe()}resetDatabasePath(){this.backupFilePath.set(this.#t)}saveDatabasePath(){this.isSavingDbPath.set(!0),this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:this.backupFilePath()}}).pipe(u(()=>this.isSavingDbPath.set(!1))).subscribe()}saveAndRepairDatabasePath(){this.isSavingAndRepairing.set(!0),this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:this.backupFilePath()}}).pipe(k(()=>this.#e.postApiV1BackupByIdRepair({id:this.backupId()})),u(()=>this.isSavingAndRepairing.set(!1)))}moveDatabasePath(){this.isMovingDb.set(!0),this.#e.postApiV1BackupByIdMovedb({id:this.backupId(),requestBody:{path:this.backupFilePath()}}).pipe(u(()=>this.isMovingDb.set(!1))).subscribe()}static \u0275fac=function(_){return new(_||S)};static \u0275cmp=y({type:S,selectors:[["app-database"]],decls:46,vars:15,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let _;_=$localize`Local database for ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. This makes it faster to perform many operations, and reduces the amount of data that needs to be downloaded for each operation. `;let n;n=$localize`Maintainance`;let d;d=$localize` If the backup and the remote storage is out of sync, Duplicati will require that you perform a repair operation to synchronize the database. If the repair is unsuccessful, you can delete the local database and re-generate. `;let f;f=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:wrench${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Repair `;let b;b=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:trash${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Delete `;let B;B=$localize`${"\uFFFD#25\uFFFD"}:START_TAG_SPK_ICON:clock-counter-clockwise${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SPK_ICON: Restore (delete and repair) `;let I;I=$localize`Placement`;let M;M=$localize`${"\uFFFD#36\uFFFD"}:START_TAG_SPK_ICON:backspace${"\uFFFD/#36\uFFFD"}:CLOSE_TAG_SPK_ICON: Reset `;let N;N=$localize`${"\uFFFD#39\uFFFD"}:START_TAG_SPK_ICON:floppy-disk${"\uFFFD/#39\uFFFD"}:CLOSE_TAG_SPK_ICON: Save `;let $;$=$localize`${"\uFFFD#42\uFFFD"}:START_TAG_SPK_ICON:wrench${"\uFFFD/#42\uFFFD"}:CLOSE_TAG_SPK_ICON: Save & Repair `;let R;return R=$localize`${"\uFFFD#45\uFFFD"}:START_TAG_SPK_ICON:flow-arrow${"\uFFFD/#45\uFFFD"}:CLOSE_TAG_SPK_ICON: Move existing database `,[t,_,e,n,d,f,b,B,I,M,N,$,R,[1,"back"],["type","button","spk-button","","routerLink","/",1,"small"],[1,"actions","maintainance"],["spk-button","",3,"click"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],[1,"actions","placement"],["spk-button","",3,"click","disabled"]]},template:function(_,e){if(_&1&&(l(0,"app-status-bar"),i(1,"section")(2,"div",13)(3,"button",14),r(4,0),l(5,"spk-icon"),p(),a()(),i(6,"article")(7,"h1"),T(8,1),a(),i(9,"p"),T(10,2),a()(),i(11,"article")(12,"h2"),T(13,3),a(),i(14,"p"),T(15,4),a(),i(16,"div",15)(17,"button",16),A("click",function(){return e.repairDatabase()}),r(18,5),l(19,"spk-icon"),p(),a(),i(20,"button",16),A("click",function(){return e.deleteDatabase()}),r(21,6),l(22,"spk-icon"),p(),a(),i(23,"button",16),A("click",function(){return e.restoreDatabase()}),r(24,7),l(25,"spk-icon"),p(),a()()(),i(26,"article")(27,"h2"),T(28,8),a(),i(29,"spk-form-field")(30,"input",17),V("ngModelChange",function(d){return X(e.backupFilePath,d)||(e.backupFilePath=d),d}),a(),v(31,ie,2,0,"spk-icon",18)(32,ne,2,0,"spk-icon",18),a(),i(33,"div",19)(34,"button",20),A("click",function(){return e.resetDatabasePath()}),r(35,9),l(36,"spk-icon"),p(),a(),i(37,"button",20),A("click",function(){return e.saveDatabasePath()}),r(38,10),l(39,"spk-icon"),p(),a(),i(40,"button",20),A("click",function(){return e.saveAndRepairDatabasePath()}),r(41,11),l(42,"spk-icon"),p(),a(),i(43,"button",20),A("click",function(){return e.moveDatabasePath()}),r(44,12),l(45,"spk-icon"),p(),a()()()()),_&2){let n;s(8),L((n=e.activeBackup())==null||n.Backup==null?null:n.Backup.Name),U(8),s(9),P("loader",e.isRepairing()),s(3),P("loader",e.isDeleting()),s(3),P("loader",e.isRestoring()),s(6),G(e.isValidatedPath()?"success":"warn"),s(),w("ngModel",e.backupFilePath),s(),K(e.isValidatedPath()?31:32),s(3),F("disabled",!e.isValidatedPath()),s(3),F("disabled",!e.isValidatedPath()),s(3),F("disabled",!e.isValidatedPath()),s(3),F("disabled",!e.isValidatedPath())}},dependencies:[Y,H,J,Q,te,x,ee,Z,q],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem}article[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}h1[_ngcontent-%COMP%]{font:var(--title-20)}h2[_ngcontent-%COMP%]{font:var(--title-30)}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{m as default};
@@ -1 +1 @@
1
- import{a}from"./chunk-ASPLJ6GL.js";import"./chunk-3WKDD2IN.js";import"./chunk-Q3JJWGXW.js";import"./chunk-C6Q5SG76.js";export{a as BytesPipe};
1
+ import{a}from"./chunk-GJ6GRAEW.js";import"./chunk-3WKDD2IN.js";import"./chunk-Q3JJWGXW.js";import"./chunk-C6Q5SG76.js";export{a as BytesPipe};
@@ -0,0 +1 @@
1
+ import{$a as A,Ab as ue,Bb as he,Cb as r,Db as l,Eb as H,Gc as ge,Ib as T,Mc as x,Oc as D,Qc as ie,Sa as S,T as Q,Ub as C,Vb as g,Wb as m,Xa as ae,Xb as a,Z as M,Za as V,_a as U,dc as G,ea as d,eb as f,ec as R,fa as u,fc as j,gb as ce,gc as fe,hc as k,ic as me,jc as K,kb as E,mc as J,nc as Z,oc as ee,pa as z,pb as pe,qa as P,ra as p,sa as L,tb as Y,tc as te,ua as $,ub as I,va as h,vb as B,wb as X,xb as N,yb as O,zb as de}from"./chunk-Q3JJWGXW.js";import{a as F,b as W,c as le}from"./chunk-C6Q5SG76.js";var b=["*"],ye=[[["","icon",""]],[["","title",""]],"*",[["","content",""]]],ke=["[icon]","[title]","*","[content]"];function we(n,v){n&1&&(r(0,"spk-icon",3),k(1,"info"),l())}function be(n,v){n&1&&(r(0,"spk-icon",3),k(1,"info"),l())}function De(n,v){n&1&&(r(0,"spk-icon",3),k(1,"check-circle"),l())}function Oe(n,v){n&1&&(r(0,"spk-icon",3),k(1,"warning-octagon"),l())}function xe(n,v){n&1&&(r(0,"spk-icon",3),k(1,"warning"),l())}function Ee(n,v){n&1&&(r(0,"spk-icon",3),k(1,"question"),l())}function Te(n,v){if(n&1){let e=T();r(0,"spk-icon",7),C("click",function(){d(e);let i=g();return u(i.removeAlert())}),k(1,"plus"),l()}}var Me=["dialogRef"];function Ve(n,v){if(n&1){let e=T();r(0,"div",4),C("click",function(){d(e);let i=g();return u(i.isOpen.set(!1))}),l()}}var Ie=["spk-button",""];var Ce=["triggerRef"],Re=["popoverRef"],Fe=[[["","trigger",""]],"*"],Pe=["[trigger]","*"];var Ae=()=>({closeOnButton:!1,closeOnEsc:!0});var He=["inputWrap"];var je=[[["label"]],[["","prefix",""]],[["","textPrefix",""]],[["input"]],[["textarea"]],[["","textSuffix",""]],[["","suffix",""]],[["","error",""]],[["","hint",""]]],Le=["label","[prefix]","[textPrefix]","input","textarea","[textSuffix]","[suffix]","[error]","[hint]"];var Be=["option"],We=["*",[["","menu",""]]],qe=["*","[menu]"];var Ne=()=>({closeOnButton:!1,closeOnEsc:!1});var Qe=["optionsRef"],ze=["formFieldWrapper"],$e=[[["label"]],[["input"]],"*",[["","deselect-indicator",""]],[["","search-indicator",""]],[["","open-indicator",""]]],Ue=["label","input","*","[deselect-indicator]","[search-indicator]","[open-indicator]"];function Ye(n,v){if(n&1){let e=T();r(0,"spk-chip",12),C("click",function(i){let o=d(e).$implicit,s=g(3);return u(s.toggleOption(o,i))}),k(1),r(2,"spk-icon"),k(3,"x-circle"),l()()}if(n&2){let e,t=v.$implicit,i=g(3);N(i.chipClass()),S(),K(" ",(e=(e=i.displayFn())==null?null:e(t))!==null&&e!==void 0?e:t," ")}}function Xe(n,v){if(n&1&&ue(0,Ye,4,3,"spk-chip",11,de),n&2){let e=g(2);he(e.inputValue().split(","))}}function Ge(n,v){if(n&1&&(r(0,"div",6),E(1,Xe,2,0),l()),n&2){let e=g();S(),O(e.inputValue().length>0?1:-1)}}function Ke(n,v){if(n&1&&(r(0,"div",6),k(1),l()),n&2){let e=g();S(),me(e._displayValue())}}function Je(n,v){if(n&1){let e=T();r(0,"div",13),C("click",function(i){d(e);let o=g();return u(o.deselect(i))}),a(1,3),r(2,"spk-icon",14),k(3,"x-circle"),l()()}}function Ze(n,v){n&1&&(r(0,"div",8),a(1,4),r(2,"spk-icon",14),k(3,"magnifying-glass"),l()())}function et(n,v){if(n&1&&(r(0,"div",15),a(1,5),r(2,"spk-icon",14),k(3,"caret-down"),l()()),n&2){let e=g();B("open",e.isOpen())}}var tt=["dragImageElement"],it=[[["","sidenav",""]],[["","sidenav-closed-topbar",""]],"*"],nt=["[sidenav]","[sidenav-closed-topbar]","*"];function ot(n,v){n&1&&H(0,"div",1,0)}function st(n,v){if(n&1){let e=T();r(0,"div",7),C("drop",function(i){d(e);let o=g();return u(o.drop(i))})("dragover",function(i){d(e);let o=g();return u(o.dragOver(i))})("dragenter",function(){d(e);let i=g();return u(i.dragEnter())})("dragleave",function(){d(e);let i=g();return u(i.dragLeave())}),l()}}function rt(n,v){if(n&1){let e=T();r(0,"div",8),C("dragstart",function(i){d(e);let o=g();return u(o.dragStart(i))})("dragend",function(i){d(e);let o=g();return u(o.dragEnd(i))})("drag",function(i){d(e);let o=g();return u(o.drag(i))})("touchstart",function(i){d(e);let o=g();return u(o.touchStart(i))})("touchmove",function(i){d(e);let o=g();return u(o.touchMove(i))})("touchend",function(i){d(e);let o=g();return u(o.touchEnd(i))})("touchcancel",function(i){d(e);let o=g();return u(o.touchCancel(i))}),l()}}var lt=[[["","table-header",""]],"*",[["","table-no-rows",""]]],at=["[table-header]","*","[table-no-rows]"];function ct(n,v){n&1&&H(0,"spk-progress-bar",0)}function pt(n,v){n&1&&(r(0,"div",1),a(1,2),l())}var dt=["tooltipRef"];var ne=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=f({type:n,selectors:[["spk-icon"]],ngContentSelectors:b,decls:1,vars:0,template:function(t,i){t&1&&(m(),a(0))},encapsulation:2,changeDetection:0})}}return n})(),Qt=(()=>{class n{constructor(){this._el=M(L),this.alertService=p(null),this.type=p("error"),this.id=p(null)}removeAlert(){this.id()&&this.alertService()&&this.alertService()?.removeAlert(this.id())}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=f({type:n,selectors:[["spk-alert"]],hostVars:2,hostBindings:function(t,i){t&2&&N(i.type())},inputs:{alertService:[1,"alertService"],type:[1,"type"],id:[1,"id"]},ngContentSelectors:ke,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(t,i){if(t&1&&(m(ye),r(0,"div",1)(1,"div",2,0),a(3),l(),r(4,"div",2),E(5,we,2,0,"spk-icon",3)(6,be,2,0,"spk-icon",3)(7,De,2,0,"spk-icon",3)(8,Oe,2,0,"spk-icon",3)(9,xe,2,0,"spk-icon",3)(10,Ee,2,0,"spk-icon",3),l(),r(11,"div",4),a(12,1),a(13,2),l(),E(14,Te,2,0,"spk-icon",5),r(15,"div",6),a(16,3),l()()),t&2){let o,s=fe(2);S(),I("display",s.children.length?"block":"none"),S(4),O((o=i.type())==="primary"?5:o==="accent"?6:o==="success"?7:o==="error"?8:o==="warning"?9:10),S(9),O(i.id()?14:-1)}},dependencies:[ne],encapsulation:2,changeDetection:0})}}return n})();function oe(){return Date.now().toString(36)+Math.random().toString(36).substring(2)}var zt=(()=>{class n{constructor(){this.alertHistory=h([]),this.alertHistoryIsOpen=h(!1),this.alertHistoryIsHidden=h(!0)}error(e){this.addAlert({type:"error",title:e??"An error occured"})}success(e){this.addAlert({type:"success",title:e})}question(e){this.addAlert({type:"question",title:e})}warning(e){this.addAlert({type:"warning",title:e})}info(e){this.addAlert({type:"primary",title:e})}addAlert(e){let t=oe();this.alertHistory.update(i=>[W(F({},e),{isOpen:!0,animateIn:!0,animateOut:!1,id:t}),...i]),setTimeout(()=>{this.alertHistory.update(i=>i.map(o=>W(F({},o),{animateIn:o.id===t?!1:o.animateIn})))},40),setTimeout(()=>{this.hideAlert(t)},2500)}removeAlert(e){this.alertHistory.update(t=>t.map(i=>W(F({},i),{animateOut:i.id===e?!1:i.animateOut}))),setTimeout(()=>{this.alertHistory.update(t=>t.filter(i=>i.id!==e))},300)}hideAlert(e){this.alertHistory.update(t=>t.map(i=>W(F({},i),{isOpen:i.id===e?!1:i.isOpen})))}setHidden(e){this.alertHistoryIsHidden.set(e)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=Q({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),ut={width:void 0,maxWidth:void 0,height:void 0,maxHeight:void 0,closeOnButton:!0,closeOnEsc:!0,closeOnOutsideClick:!0},ht=(()=>{class n{constructor(){this.dialogRef=V("dialogRef"),this.isOpen=A(!1),this.options=p(),this.closed=P(),this.defaultOptionMerge=x(()=>F(F({},ut),this.options())),this.abortController=null,this.isOpenEffect=D(()=>{let e=this.dialogRef()?.nativeElement;this.abortController&&this.abortController.abort(),this.abortController=new AbortController,this.isOpen()?(e?.showModal(),e?.addEventListener("close",()=>{this.isOpen.set(!1),this.closed.emit()},{signal:this.abortController?.signal}),document.addEventListener("keydown",t=>{t.key==="Escape"&&!this.defaultOptionMerge().closeOnEsc&&t.preventDefault(),t.key==="Escape"&&this.defaultOptionMerge().closeOnEsc&&this.isOpen.set(!1)},{signal:this.abortController?.signal})):(this.closed.emit(),e?.close())})}ngOnDestroy(){this.abortController?.abort()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=f({type:n,selectors:[["spk-dialog"]],viewQuery:function(t,i){t&1&&R(i.dialogRef,Me,5),t&2&&j()},inputs:{isOpen:[1,"isOpen"],options:[1,"options"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:b,decls:5,vars:9,consts:[["dialogRef",""],["spkDialog",""],[1,"content"],[1,"closeable-overlay"],[1,"closeable-overlay",3,"click"]],template:function(t,i){if(t&1&&(m(),r(0,"dialog",1,0)(2,"div",2),a(3),l(),E(4,Ve,1,0,"div",3),l()),t&2){let o,s,c,y;I("width",(o=i.defaultOptionMerge().width)!==null&&o!==void 0?o:"")("max-width",(s=i.defaultOptionMerge().maxWidth)!==null&&s!==void 0?s:"")("max-height",(c=i.defaultOptionMerge().maxHeight)!==null&&c!==void 0?c:"")("height",(y=i.defaultOptionMerge().height)!==null&&y!==void 0?y:""),S(4),O(i.defaultOptionMerge().closeOnOutsideClick?4:-1)}},encapsulation:2,changeDetection:0})}}return n})(),$t=(()=>{class n{constructor(){this.#e=document.querySelector("body"),this.#i=M(pe),this.compRef=null,this.insertedCompRef=null,this.closedFieldSub=null,this.compClosedSub=null}#e;#i;open(e,t){let i=this.#i.injector,o=this.#o(),re=t||{},{data:s,closed:c}=re,y=le(re,["data","closed"]);this.compRef&&this.#t(),this.insertedCompRef=ie(e,{environmentInjector:i}),this.compRef=ie(ht,{hostElement:o,environmentInjector:i,projectableNodes:[[this.insertedCompRef.location.nativeElement]]});let w=this.insertedCompRef.instance?.data,_=this.insertedCompRef.instance?.closed;if(s){if($(w))this.insertedCompRef.setInput("data",s);else if(!$(w))throw new Error("data is not an input signal on the passed component")}_ instanceof z&&(this.closedFieldSub=_.subscribe((...Se)=>{c?.(...Se),this.#t()})),this.#i.attachView(this.insertedCompRef.hostView),this.#i.attachView(this.compRef.hostView),this.insertedCompRef.changeDetectorRef.detectChanges(),this.compRef.changeDetectorRef.detectChanges(),this.compRef.instance.isOpen.set(!0),this.compRef.setInput("options",y),this.compRef.instance.closed.subscribe(()=>se());let q=this;function se(){_&&_ instanceof z?_.emit(!1):c?.(void 0),q.#t()}return this.insertedCompRef.instance}#o(){let e=document.createElement("spk-dialog-ref");return e.id="spk-dialog-ref",document.getElementById("spk-dialog-ref")||this.#e.append(e),document.getElementById("spk-dialog-ref")}#t(){this.insertedCompRef&&(this.#i.detachView(this.insertedCompRef.hostView),this.closedFieldSub?.unsubscribe(),this.insertedCompRef.destroy()),this.compRef&&(this.#i.detachView(this.compRef.hostView),this.compClosedSub?.unsubscribe(),this.compRef.destroy())}ngOnDestroy(){this.#t()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=Q({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),Ut=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=f({type:n,selectors:[["spk-button-group"]],ngContentSelectors:b,decls:1,vars:0,template:function(t,i){t&1&&(m(),a(0))},encapsulation:2,changeDetection:0})}}return n})(),ft=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=f({type:n,selectors:[["","spk-button",""]],attrs:Ie,ngContentSelectors:b,decls:1,vars:0,template:function(t,i){t&1&&(m(),a(0))},encapsulation:2,changeDetection:0})}}return n})(),Yt=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=f({type:n,selectors:[["spk-card"]],ngContentSelectors:b,decls:1,vars:0,template:function(t,i){t&1&&(m(),a(0))},encapsulation:2,changeDetection:0})}}return n})(),Xt=(()=>{class n{#e=M(L);onClick(){this.#e.nativeElement.querySelector("input")&&this.#e.nativeElement.querySelector("input").focus()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=f({type:n,selectors:[["spk-checkbox"]],hostBindings:function(t,i){t&1&&C("click",function(){return i.onClick()})},ngContentSelectors:b,decls:6,vars:0,consts:[[1,"box"],[1,"inherit","default-indicator"],[1,"inherit","indeterminate-indicator"]],template:function(t,i){t&1&&(m(),r(0,"div",0)(1,"spk-icon",1),k(2,"check"),l(),r(3,"spk-icon",2),k(4,"minus"),l()(),a(5))},dependencies:[ne],encapsulation:2,changeDetection:0})}}return n})(),mt=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=f({type:n,selectors:[["spk-chip"]],ngContentSelectors:b,decls:1,vars:0,template:function(t,i){t&1&&(m(),a(0))},encapsulation:2,changeDetection:0})}}return n})();var gt=["scroll","auto"],vt={width:void 0,height:void 0,closeOnButton:!0,closeOnEsc:!0},_e=(()=>{class n{constructor(){this.#e=M(ge),this.#i=4,this.SUPPORTS_ANCHOR=typeof CSS<"u"&&CSS.supports("position-anchor","--abc")&&CSS.supports("anchor-name","--abc"),this.above=p(!1),this.right=p(!1),this.markForCheck=p(null),this._above=h(this.above()),this._right=h(this.right()),this.disableOpenByClick=p(!1),this.isOpen=A(!1),this.options=p(),this.closed=P(),this.defaultOptionMerge=x(()=>F(F({},vt),this.options())),this.triggerRef=V.required("triggerRef"),this.popoverRef=V.required("popoverRef"),this.id=h("--"+oe()),this.menuStyle=h(null),this.openAbort=null,this.openEffect=D(()=>{let e=this.popoverRef()?.nativeElement;if(this.isOpen()){this.openAbort&&this.openAbort.abort(),this.openAbort=new AbortController;let i={signal:this.openAbort?.signal};e?.showPopover(),document.addEventListener("keydown",o=>{o.key==="Escape"&&!this.defaultOptionMerge().closeOnEsc&&o.preventDefault(),o.key==="Escape"&&this.defaultOptionMerge().closeOnEsc&&this.isOpen.set(!1)},i),setTimeout(()=>{this.#o(this.popoverRef()?.nativeElement).addEventListener("scroll",()=>this.#t(),i),window.addEventListener("resize",()=>this.#t(),i),this.#t()})}else e.hidePopover(),this.openAbort?.abort(),this.closed.emit()}),this.markForCheckEffect=D(()=>{this.markForCheck()&&this.#e.markForCheck()})}#e;#i;toggleIsOpen(e){e.preventDefault(),e.stopPropagation(),this.disableOpenByClick()||this.isOpen.set(!this.isOpen())}eventClose(e){e.stopPropagation(),e.preventDefault(),this.isOpen.set(!1)}#o(e){let t=e.parentElement;for(;t;){if(gt.indexOf(window.getComputedStyle(t).overflowY)>-1&&t.scrollHeight>t.clientHeight)return t;t=t.parentElement}return document.documentElement}#t(){let e=this.triggerRef()?.nativeElement.getBoundingClientRect(),t=this.popoverRef()?.nativeElement.getBoundingClientRect(),i=e.left,o=e.bottom,s=i,c=o+this.#i,y=s+t.width>window.innerWidth,w=c+t.height>window.innerHeight;if(this.SUPPORTS_ANCHOR)this._above.set(w),this._right.set(y);else{if(s=i,c=o+this.#i,w){let q=e.top-t.height-this.#i;q<0||(c=q)}y&&(s=e.right-t.width,s<0&&(s=0));let _={left:s+"px",top:c+"px"};this.menuStyle.set(_)}}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=f({type:n,selectors:[["spk-popover"]],viewQuery:function(t,i){t&1&&(R(i.triggerRef,Ce,5),R(i.popoverRef,Re,5)),t&2&&j(2)},hostVars:4,hostBindings:function(t,i){t&2&&B("above",i._above())("right",i._right())},inputs:{above:[1,"above"],right:[1,"right"],markForCheck:[1,"markForCheck"],disableOpenByClick:[1,"disableOpenByClick"],isOpen:[1,"isOpen"],options:[1,"options"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:Pe,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(t,i){if(t&1){let o=T();m(Fe),r(0,"div",2,0),C("click",function(c){return d(o),u(i.toggleIsOpen(c))}),r(2,"div",3),a(3),l(),r(4,"button",4),k(5,"Open popover"),l()(),r(6,"div",5,1)(8,"div",6),C("click",function(c){return d(o),u(i.isOpen()&&i.eventClose(c))}),l(),a(9,1),l()}t&2&&(I("anchor-name",i.id()),S(6),X(i.menuStyle()),I("position-anchor",i.id()))},dependencies:[ft],encapsulation:2,changeDetection:0})}}return n})();var Gt=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=f({type:n,selectors:[["spk-divider"]],ngContentSelectors:b,decls:1,vars:0,template:function(t,i){t&1&&(m(),a(0))},encapsulation:2,changeDetection:0})}}return n})(),Ct=(()=>{class n{#e=M(L);onClick(){this.#e.nativeElement.querySelector("input")&&this.#e.nativeElement.querySelector("input").focus(),this.#e.nativeElement.querySelector("textarea")&&this.#e.nativeElement.querySelector("textarea").focus()}ngOnInit(){let e=typeof CSS<"u"&&CSS.supports("field-sizing","content"),t=this.#e.nativeElement.querySelector("textarea");if(!e&&t!==null){let s=function(){t.style.height="auto",t.style.height=t.scrollHeight+"px"},c=function(){window.setTimeout(s,0)};var i=s,o=c;t.addEventListener("change",s),t.addEventListener("cut",c),t.addEventListener("paste",c),t.addEventListener("drop",c),t.addEventListener("keydown",c),t.focus(),t.select(),s()}}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=f({type:n,selectors:[["spk-form-field"]],hostBindings:function(t,i){t&1&&C("click",function(){return i.onClick()})},ngContentSelectors:Le,decls:16,vars:0,consts:[[1,"input-wrap"],[1,"prefix"],[1,"prefix-space"],[1,"suffix-space"],[1,"helpers"],[1,"error"],[1,"hint"]],template:function(t,i){t&1&&(m(je),a(0),r(1,"div",0)(2,"div",1),a(3,1),a(4,2),l(),H(5,"div",2),a(6,3),a(7,4),a(8,5),H(9,"div",3),a(10,6),l(),r(11,"div",4)(12,"div",5),a(13,7),l(),r(14,"div",6),a(15,8),l()())},encapsulation:2,changeDetection:0})}}return n})();var Kt=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=f({type:n,selectors:[["spk-list"]],ngContentSelectors:b,decls:1,vars:0,template:function(t,i){t&1&&(m(),a(0))},encapsulation:2,changeDetection:0})}}return n})(),Jt=(()=>{class n{constructor(){this.above=p(!1),this.right=p(!1),this.keepClickedOptionActive=p(!1),this.isOpen=A(!1),this.closed=P(),this.activeOptionIndex=h(-1),this.options=U("option"),this.optionsEl=x(()=>Array.from(this.options()).map(e=>e.nativeElement).filter(e=>e.disabled!==!0)),this.optionsEffect=D(()=>{if(!this.isOpen())return;let e=this.activeOptionIndex(),t=this.optionsEl();if(e>-1)for(let i=0;i<t.length;i++){if(i===e){t[i].scrollIntoView({block:"center"}),t[i].classList.add("active");continue}t[i].classList.remove("active")}})}onKeyDown(e){if(!this.isOpen())return;e.preventDefault();let t=this.optionsEl(),i=this.activeOptionIndex();e.key==="ArrowDown"?i===-1||i===t.length-1?this.activeOptionIndex.set(0):this.activeOptionIndex.set(i+1):e.key==="ArrowUp"?i===-1||i===0?this.activeOptionIndex.set(t.length-1):this.activeOptionIndex.set(i-1):e.key==="Enter"?i>-1&&(t[i].click(),setTimeout(()=>this.close("active"))):e.key==="Tab"?this.close("closed"):this.activeOptionIndex.set(-1)}close(e="closed",t){(!this.keepClickedOptionActive()||e==="closed")&&this.#e(),this.isOpen.set(!1),this.closed.emit(e==="active")}#e(){this.activeOptionIndex.set(-1);let e=this.optionsEl();for(let t=0;t<e.length;t++)e[t].classList.remove("active")}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=f({type:n,selectors:[["spk-menu"]],contentQueries:function(t,i,o){t&1&&G(o,i.options,Be,4),t&2&&j()},hostBindings:function(t,i){t&1&&C("keydown",function(s){return i.onKeyDown(s)})},inputs:{above:[1,"above"],right:[1,"right"],keepClickedOptionActive:[1,"keepClickedOptionActive"],isOpen:[1,"isOpen"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:qe,decls:6,vars:6,consts:[["formFieldWrapper",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","above","right","options"],["trigger","",3,"click"],[1,"options",3,"click"]],template:function(t,i){if(t&1){let o=T();m(We),r(0,"spk-popover",1,0),ee("isOpenChange",function(c){return d(o),Z(i.isOpen,c)||(i.isOpen=c),u(c)}),C("closed",function(){return d(o),u(i.close("fromPopover"))}),r(2,"div",2),C("click",function(){return d(o),u(i.isOpen.set(!0))}),a(3),l(),r(4,"div",3),C("click",function(){return d(o),u(i.close("active"))}),a(5,1),l()()}t&2&&(J("isOpen",i.isOpen),Y("disableOpenByClick",!0)("above",i.above())("right",i.right())("options",te(5,Ae)))},dependencies:[_e],encapsulation:2,changeDetection:0})}}return n})(),_t=(()=>{class n{constructor(){this.value=p(void 0)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=f({type:n,selectors:[["spk-progress-bar"]],inputs:{value:[1,"value"]},decls:1,vars:2,consts:[[1,"progress-bar"]],template:function(t,i){t&1&&H(0,"div",0),t&2&&I("width",i.value(),"%")},encapsulation:2,changeDetection:0})}}return n})(),Zt=(()=>{class n{#e=M(L);onClick(){this.#e.nativeElement.querySelector("input")&&this.#e.nativeElement.querySelector("input").focus()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=f({type:n,selectors:[["spk-radio"]],hostBindings:function(t,i){t&1&&C("click",function(){return i.onClick()})},ngContentSelectors:b,decls:2,vars:0,consts:[[1,"radio"]],template:function(t,i){t&1&&(m(),H(0,"div",0),a(1))},encapsulation:2,changeDetection:0})}}return n})();var ve=(()=>{class n{constructor(){this.#e=M(L),this.value=p(null),this.#i=D(()=>{this.#e.nativeElement.value=this.value()})}#e;#i;hasAttribute(e){return this.#e.nativeElement.hasAttribute(e)}removeAttribute(e){this.#e.nativeElement.removeAttribute(e)}setAttribute(e,t){this.#e.nativeElement.setAttribute(e,t)}getAttribute(e){return this.#e.nativeElement.getAttribute(e)}addClass(e){this.#e.nativeElement.classList.add(e)}removeClass(e){this.#e.nativeElement.classList.remove(e)}scrollIntoView(e){this.#e.nativeElement.scrollIntoView(e)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=f({type:n,selectors:[["spk-option"]],inputs:{value:[1,"value"]},ngContentSelectors:b,decls:1,vars:0,template:function(t,i){t&1&&(m(),a(0))},encapsulation:2,changeDetection:0})}}return n})(),St=["primary","accent","tertiary","warn","success"],ei=(()=>{class n{constructor(){this.#e=M(ae),this.#i=M(L),this.optionsRef=V("optionsRef"),this.options=U(ve),this.formFieldWrapperRef=V.required("formFieldWrapper"),this.inputWrapRef=V.required("inputWrap"),this.inputValue=A(""),this.readonly=p(!1),this.isFreeText=p(!1),this.selectMultiple=p(!1),this.hideClearButton=p(!1),this.displayValue=p(""),this.displayFn=p(e=>`${e}`),this.above=p(!1),this.right=p(!1),this.change=P(),this.#o=h(!1),this.#t=h(null),this.#s=h(null),this.#r=h(!1),this.#n=h(-1),this.isOpen=h(!1),this._isOpen=h(!1),this.isSearchInput=x(()=>this.#t()?.type==="search"),this.chipClass=x(()=>Array.from(this.#i.nativeElement.classList).filter(e=>St.includes(e)).join(" ")),this._displayValue=x(()=>this.displayFn()?this.displayFn()(this.inputValue()):this.displayValue()??this.inputValue()),this.selectedOption=x(()=>this.#s()?this.options().find(e=>e.value()===this.#s()):null),this.optionsOpenController=null,this.inputController=null,this.clickController=null,this.inputAbortController=null,this.#p=D(()=>{this.#o();let e=this.#i.nativeElement.querySelector("input");e&&(e.disabled=this.readonly(),this.#v(e),e.addEventListener("inputValueChanged",t=>{this.inputValue.set(t.detail.value),this.selectMultiple()&&this.#a()}),this.#t.set(e),e.autocomplete="off",typeof e.value=="string"&&this.inputValue.set(e.value))}),this.#d=D(()=>{this.inputController&&this.inputController.abort(),this.inputController=new AbortController;let e=this.#t();e&&(e.addEventListener("focus",()=>{this.isOpen.set(!0)}),e.addEventListener("keydown",t=>{(this.selectMultiple()||!this.isSearchInput()&&!this.isFreeText())&&t.preventDefault(),t.key==="Escape"?this.close():t.key==="ArrowDown"?this.#n()===null||this.#n()<0||this.#n()===this.options().length-1?this.#n.set(this.#c()):this.#n.set(this.#n()+1):t.key==="ArrowUp"?this.#n()===null||this.#n()<0||this.#n()===0?this.#n.set(this.options().length-1):this.#n.set(this.#n()-1):t.key==="Enter"?(this.isFreeText()&&this.close(!0),this.#n()>-1&&this.selected(this.getOptionElement(this.#n()))):t.key==="Tab"?this.close(!0):(this.#n.set(-1),this.isFreeText()&&this.calculateSelectedOptions())},{signal:this.inputController?.signal}))}),this.#u=D(()=>{this.isOpen()&&this.#g()}),this.#h=D(()=>{let e=this.inputValue();this.#t()&&(this.#t().value=e??"",this.#t().dispatchEvent(new Event("input")))}),this.#l=typeof MutationObserver<"u"&&new MutationObserver(e=>{for(var t of e)t.type=="childList"&&t.target.classList.contains("input")&&this.#o.set(!this.#o())})}#e;#i;#o;#t;#s;#r;#n;#p;#d;#u;#h;ngOnInit(){typeof MutationObserver<"u"&&this.#l.observe(this.inputWrapRef().nativeElement,{attributes:!0,childList:!0,subtree:!0})}getOptionElement(e){return this.options()[e]}deselect(e,t=!1){e?.stopPropagation(),this.#t()&&(this.#t().value="",this.#t().dispatchEvent(new Event("input"))),this.#n.set(this.#c()),this.#r.set(!1),(t||!this.selectMultiple())&&(this.isOpen.set(!1),this.#t()?.blur())}selected(e){if(!e)return;let t=e.value(),i=this.options().indexOf(e);if(e.hasAttribute("deselect"))return this.deselect(null,!0);if(this.#n.set(i),e&&!this.selectMultiple()){this.inputValue.set(t);for(let o=0;o<this.options().length;o++){let s=this.options()[o];s.value()===t?this.#e.setAttribute(s,"selected","selected"):this.#e.removeAttribute(s,"selected")}}else e&&this.selectMultiple()&&(this.inputValue().includes(t)?(this.#e.removeAttribute(e,"selected"),this.toggleOption(t)):(this.#e.setAttribute(e,"selected","selected"),this.inputValue.set(this.inputValue().length?`${this.inputValue()},${t}`:t)));this.#r.set(!1),this.#s.set(null),this.selectMultiple()?this.#t()?.focus():(this.isOpen.set(!1),this.#t()?.blur()),this.change.emit(this.inputValue())}calculateSelectedOptions(){setTimeout(()=>{let e=this.options(),i=this.#t()?.value;for(let o=0;o<e.length;o++){let s=e[o];s.value()===i?this.#e.setAttribute(s,"selected","selected"):this.#e.removeAttribute(s,"selected")}})}toggleOption(e,t){t&&(t.preventDefault(),t.stopPropagation()),this.inputValue.set(this.inputValue().startsWith(e+",")?this.inputValue().replace(e+",",""):this.inputValue().includes(","+e)?this.inputValue().replace(","+e,""):this.inputValue().replace(e,""))}close(e=!1){let t=this.#s();this.isSearchInput()&&!this.isFreeText()&&t&&setTimeout(()=>this.inputValue.set(t)),this.isOpen.set(!1),this.#r.set(!1),e||this.#t()?.blur(),this.#m()}open(e){e.preventDefault(),!this.isOpen()&&(this.isSearchInput()&&!this.#r()&&!this.isFreeText()?(this.#s.set(this.inputValue()),this.inputValue.set(""),this.#t().focus(),this.#t().value="",this.#t().dispatchEvent(new Event("input")),this.#n.set(-1)):(this.isSearchInput()||this.selectMultiple())&&this.#t().focus(),this.isOpen.set(!0),this.#r.set(!0),this.#f(),this.#a())}#f(){this.clickController&&this.clickController.abort(),this.clickController=new AbortController,this.optionsRef()?.nativeElement?.addEventListener("click",e=>{if(!e.target)return;let t=e.target.closest("spk-option"),i=this.options().find(o=>o.value()===t.value);i&&this.selected(i)},{signal:this.clickController?.signal})}#m(){this.clickController&&this.clickController.abort()}#g(){for(let e=0;e<this.options().length;e++){let t=this.options()[e];t.removeClass("focused"),this.#n()===e&&(t.addClass("focused"),t.scrollIntoView({block:"center"}))}}#a(){let e=this.#t();if(!e)return;this.inputValue.set(e.value);let t=e.value.split(",");setTimeout(()=>{let i=this.options();for(let o=0;o<i.length;o++){let s=i[o].value();s&&t.includes(s)?this.#e.setAttribute(i[o],"selected","selected"):this.#e.removeAttribute(i[o],"selected")}})}#c(){let e=this.options();for(let t=0;t<e.length;t++)if(!e[t].hasAttribute("deselect"))return t;return-1}#l;#v(e){return Object.defineProperty(e,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").get.call(this)},set(t){Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value").set.call(this,t);let o=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:t}});return this.dispatchEvent(o),t}}),e}ngOnDestroy(){this.clickController&&this.clickController.abort(),this.inputController&&this.inputController.abort(),this.optionsOpenController&&this.optionsOpenController.abort(),typeof MutationObserver<"u"&&this.#l.disconnect()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=f({type:n,selectors:[["spk-select"]],contentQueries:function(t,i,o){t&1&&G(o,i.options,ve,4),t&2&&j()},viewQuery:function(t,i){t&1&&(R(i.optionsRef,Qe,5),R(i.formFieldWrapperRef,ze,5),R(i.inputWrapRef,He,5)),t&2&&j(3)},inputs:{inputValue:[1,"inputValue"],readonly:[1,"readonly"],isFreeText:[1,"isFreeText"],selectMultiple:[1,"selectMultiple"],hideClearButton:[1,"hideClearButton"],displayValue:[1,"displayValue"],displayFn:[1,"displayFn"],above:[1,"above"],right:[1,"right"]},outputs:{inputValue:"inputValueChange",change:"change"},ngContentSelectors:Ue,decls:15,vars:8,consts:[["formFieldWrapper",""],["inputWrap",""],["optionsRef",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","options"],["trigger","",3,"click"],["ngProjectAs","input",5,["input"],1,"input"],[1,"display-value"],["suffix","",1,"deselect-indicator"],["suffix","",1,"search-indicator"],["suffix","",1,"select-open-indicator",3,"open"],[1,"sparkle-options"],[1,"small","simple",3,"class"],[1,"small","simple",3,"click"],["suffix","",1,"deselect-indicator",3,"click"],[1,"default-indicator"],["suffix","",1,"select-open-indicator"]],template:function(t,i){if(t&1){let o=T();m($e),r(0,"spk-popover",3,0),ee("isOpenChange",function(c){return d(o),Z(i.isOpen,c)||(i.isOpen=c),u(c)}),C("closed",function(){return d(o),u(i.close())}),r(2,"spk-form-field",4),C("click",function(c){return d(o),u(i.open(c))}),a(3,0,["ngProjectAs","label",5,["label"]]),r(4,"div",5,1),E(6,Ge,2,1,"div",6)(7,Ke,2,1,"div",6),a(8,1),l(),E(9,Je,4,0,"div",7)(10,Ze,4,0,"div",8)(11,et,4,2,"div",9),l(),r(12,"div",10,2),a(14,2),l()()}t&2&&(J("isOpen",i.isOpen),Y("disableOpenByClick",!0)("options",te(7,Ne)),S(2),N(i.readonly()?"readonly":""),S(4),O(i.selectMultiple()?6:i._displayValue()&&i.isSearchInput()&&!i.isOpen()||i._displayValue()&&!i.isSearchInput()?7:-1),S(3),O((i.inputValue()&&!i.isOpen()&&i.inputValue().length>0||i.selectedOption())&&!i.hideClearButton()?9:i.isSearchInput()&&!i.selectedOption()?10:11))},dependencies:[Ct,ne,mt,_e],encapsulation:2,changeDetection:0})}}return n})(),ti=(()=>{class n{constructor(){this.openWidth=280,this.openWidthTreshold=this.openWidth*.9,this.disableDrag=p(!1),this.isOpen=A(!1),this.type=p(""),this.dragImageElement=V.required("dragImageElement"),this.dragIsEnding=h(!1),this.dragIsOnScreen=h(!0),this.isDragging=h(!1),this.dragPositionX=h(0),this.dragActualPositionX=x(()=>{let e=this.dragPositionX(),t=.32;return e>this.openWidthTreshold?this.openWidthTreshold+(e-this.openWidthTreshold)*t:e}),this.draggingStyle=x(()=>this.type()!=="overlay"?null:this.isDragging()?`translateX(${this.dragActualPositionX()}px)`:this.isOpen()?`translateX(${this.openWidth}px)`:"translateX(0px)"),this.draggingEffect=D(()=>{this.isDragging()&&document.body.classList.add("dragging")})}drop(e){e.stopPropagation(),this.#e(e.clientX)}#e(e){this.isDragging.set(!1),e<=0?this.isOpen.set(!1):e>this.openWidthTreshold?this.isOpen.set(!0):e<this.openWidthTreshold&&(!this.isOpen()&&e<this.openWidthTreshold*.6?this.isOpen.set(!0):this.isOpen.set(!1))}dragEnd(e){(e.clientX<0||!this.dragIsOnScreen())&&this.#e(0)}dragEnter(){this.dragIsOnScreen.set(!0)}dragLeave(){this.dragIsOnScreen.set(!1)}dragOver(e){e.preventDefault(),this.#i(e)}dragStart(e){e.stopPropagation(),this.isDragging.set(!0),this.#i(e)}#i(e){e.dataTransfer?.setDragImage(this.dragImageElement().nativeElement,0,0)}drag(e){e.stopPropagation(),setTimeout(()=>{this.isDragging()&&this.dragIsOnScreen()&&this.dragPositionX.set(e.clientX)}),this.#i(e)}touchStart(e){e.stopPropagation(),this.isDragging.set(!0)}touchMove(e){e.stopPropagation(),setTimeout(()=>{this.isDragging()&&this.dragIsOnScreen()&&this.dragPositionX.set(e.touches[0].clientX)})}touchEnd(e){e.stopPropagation(),this.#e(e.changedTouches[0].clientX)}touchCancel(e){e.stopPropagation(),this.isDragging.set(!1)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=f({type:n,selectors:[["spk-sidenav"]],viewQuery:function(t,i){t&1&&R(i.dragImageElement,tt,5),t&2&&j()},hostVars:10,hostBindings:function(t,i){t&2&&B("open",i.isOpen())("closed",!i.isOpen())("overlay",i.type()==="overlay")("simple",i.type()==="simple")("is-dragging",i.isDragging())},inputs:{disableDrag:[1,"disableDrag"],isOpen:[1,"isOpen"],type:[1,"type"]},outputs:{isOpen:"isOpenChange"},ngContentSelectors:nt,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(t,i){t&1&&(m(it),E(0,ot,2,0,"div",1)(1,st,1,0,"div",2),r(2,"div",3),a(3),l(),r(4,"div",4),E(5,rt,1,0,"div",5),r(6,"div",6),a(7,1),l(),r(8,"main"),a(9,2),l()()),t&2&&(O(i.type()==="overlay"?0:-1),S(),O(i.type()==="overlay"&&i.isDragging()?1:-1),S(3),I("transform",i.draggingStyle()),S(),O(i.type()==="overlay"&&!i.disableDrag()?5:-1))},encapsulation:2,changeDetection:0})}}return n})();var ii=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=f({type:n,selectors:[["spk-stepper"]],ngContentSelectors:b,decls:1,vars:0,template:function(t,i){t&1&&(m(),a(0))},encapsulation:2,changeDetection:0})}}return n})();var ni=(()=>{class n{constructor(){this.tableColumns=p([]),this.loading=p(!1),this.columnSizes=x(()=>this.tableColumns().reduce((e,t,i)=>i===this.tableColumns().length-1?`${e} max-content`:`${e} 1fr`,"")),this.data=p([]),this.dataChange=P(),this.#e=null,this.#i=h(!1),this.sortByColumn=A(null),this.e=D(()=>{let e=this.sortByColumn();if(e===null)return this.#i()||(this.#e=this.data(),this.#i.set(!0)),this.dataChange.emit(JSON.parse(JSON.stringify(this.#e)));let t=e.startsWith("-")?e.slice(1):e,i=e.startsWith("-"),o=this.data().sort((s,c)=>{let y=s[t],w=c[t],_=0;return typeof y=="number"&&typeof w=="number"&&(_=y-w),y instanceof Date&&w instanceof Date&&(_=y.getTime()-w.getTime()),typeof y=="string"&&typeof w=="string"&&(_=y.localeCompare(w,void 0,{sensitivity:"base"})),i?-_:_});this.dataChange.emit(o)})}#e;#i;toggleSort(e){let t=this.sortByColumn(),i=t===e?`-${e}`:t===`-${e}`?null:e;this.sortByColumn.set(i)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=f({type:n,selectors:[["spk-table"]],hostVars:2,hostBindings:function(t,i){t&2&&I("grid-template-columns",i.columnSizes())},inputs:{tableColumns:[1,"tableColumns"],loading:[1,"loading"],data:[1,"data"],sortByColumn:[1,"sortByColumn"]},outputs:{dataChange:"dataChange",sortByColumn:"sortByColumnChange"},ngContentSelectors:at,decls:6,vars:2,consts:[[1,"indeterminate","primary"],[1,"no-rows"]],template:function(t,i){t&1&&(m(lt),r(0,"thead"),a(1),E(2,ct,1,0,"spk-progress-bar",0),l(),r(3,"tbody"),a(4,1),l(),E(5,pt,2,0,"div",1)),t&2&&(S(2),O(i.loading()?2:-1),S(3),O(i.loading()?-1:5))},dependencies:[_t],encapsulation:2,changeDetection:0})}}return n})(),oi=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=f({type:n,selectors:[["spk-tabs"]],ngContentSelectors:b,decls:1,vars:0,template:function(t,i){t&1&&(m(),a(0))},encapsulation:2,changeDetection:0})}}return n})();var si=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=f({type:n,selectors:[["spk-toggle"]],ngContentSelectors:b,decls:3,vars:0,consts:[[1,"box"],[1,"knob"]],template:function(t,i){t&1&&(m(),r(0,"div",0),H(1,"div",1),l(),a(2))},encapsulation:2,changeDetection:0})}}return n})(),ri=(()=>{class n{constructor(){this.#e=4,this.SUPPORTS_ANCHOR=CSS.supports("position-anchor","--abc")&&CSS.supports("anchor-name","--abc"),this.disabled=p(!1),this.above=p(!1),this.right=p(!1),this._above=h(this.above()),this._right=h(this.right()),this.message=p.required(),this.isOpen=A(!1),this.closed=P(),this.triggerRef=V.required("triggerRef"),this.tooltipRef=V.required("tooltipRef"),this.id=h("--"+oe()),this.menuStyle=h(null),this.isCalculatingPosition=x(()=>{let e=this.tooltipRef()?.nativeElement;return this.isOpen()?(e?.showPopover(),!0):(e.hidePopover(),this.abortController?.abort(),this.closed.emit(),!1)}),this.abortController=null,this.calcPositionEffect=D(()=>{if(!this.isCalculatingPosition())return;this.abortController&&this.abortController.abort(),this.abortController=new AbortController;let t=this.abortController.signal;this.calculateMenuPosition(),this.#i(this.tooltipRef()?.nativeElement).addEventListener("scroll",()=>this.calculateMenuPosition(),{signal:t}),document.addEventListener("resize",()=>this.calculateMenuPosition(),{signal:t})}),this.scrollableStyles=["scroll","auto"]}#e;#i(e){let t=e.parentElement;for(;t;){if(this.scrollableStyles.indexOf(window.getComputedStyle(t).overflowY)>-1&&t.scrollHeight>t.clientHeight)return t;t=t.parentElement}return document.documentElement}eventClose(e){e.stopPropagation(),e.preventDefault(),this.isOpen.set(!1)}ngOnDestroy(){this.abortController&&this.abortController.abort()}calculateMenuPosition(){let e=this.triggerRef()?.nativeElement.getBoundingClientRect(),t=this.tooltipRef()?.nativeElement.getBoundingClientRect(),i=e.left,o=e.bottom,s=i,c=o+this.#e,y=s+t.width>window.innerWidth,w=c+t.height>window.innerHeight;if(this.SUPPORTS_ANCHOR)this._above.set(w),this._right.set(y);else{if(this.above()){let _=e.top-t.height-this.#e;_>=0&&(c=_)}else w&&(c=e.top-t.height-this.#e);if(this.right()){let _=e.right-t.width;_>=0&&(s=_)}else y&&(c=w?e.top+e.height-t.height:e.top,s=e.left-t.width-this.#e);this.menuStyle.set({left:s+"px",top:c+"px"})}}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=f({type:n,selectors:[["spk-tooltip"]],viewQuery:function(t,i){t&1&&(R(i.triggerRef,Ce,5),R(i.tooltipRef,dt,5)),t&2&&j(2)},hostVars:6,hostBindings:function(t,i){t&2&&B("above",i._above())("right",i._right())("disabled",i.disabled())},inputs:{disabled:[1,"disabled"],above:[1,"above"],right:[1,"right"],message:[1,"message"],isOpen:[1,"isOpen"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:b,decls:6,vars:7,consts:[["triggerRef",""],["tooltipRef",""],[1,"trigger",3,"mouseover","mouseout"],["popover","",1,"tooltip"]],template:function(t,i){if(t&1){let o=T();m(),r(0,"div",2,0),C("mouseover",function(){return d(o),u(i.isOpen.set(!0))})("mouseout",function(){return d(o),u(i.isOpen.set(!1))}),a(2),l(),r(3,"div",3,1),k(5),l()}t&2&&(I("anchor-name",i.id()),S(3),X(i.menuStyle()),I("position-anchor",i.id()),S(2),K(" ",i.message()," "))},encapsulation:2,changeDetection:0})}}return n})();var li=(()=>{class n{constructor(){this.filesOver=h(!1),this.filesDropped=P()}onDragOver(e){e.preventDefault(),e.stopPropagation(),this.filesOver.set(!0)}onDragLeave(e){e.preventDefault(),e.stopPropagation(),this.filesOver.set(!1)}ondrop(e){e.preventDefault(),e.stopPropagation(),this.filesOver.set(!1);let t=e.dataTransfer?.files;t&&t.length>0&&this.filesDropped.emit(t)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275dir=ce({type:n,selectors:[["","spkDragDrop",""]],hostVars:2,hostBindings:function(t,i){t&1&&C("dragover",function(s){return i.onDragOver(s)})("dragleave",function(s){return i.onDragLeave(s)})("drop",function(s){return i.ondrop(s)}),t&2&&B("filesover",i.filesOver())},outputs:{filesDropped:"filesDropped"}})}}return n})();export{ne as a,Qt as b,zt as c,ht as d,$t as e,Ut as f,ft as g,Yt as h,Xt as i,mt as j,Gt as k,Ct as l,Kt as m,Jt as n,_t as o,Zt as p,ve as q,ei as r,ti as s,ii as t,ni as u,oi as v,si as w,ri as x,li as y};
@@ -1 +1 @@
1
- import{a as k}from"./chunk-PO2RDC4E.js";import"./chunk-I24WOYYC.js";import"./chunk-ASPLJ6GL.js";import"./chunk-CP2S6DC4.js";import"./chunk-6TZWRTRA.js";import"./chunk-UJWW7PS7.js";import"./chunk-2P3GS5BJ.js";import"./chunk-KJ4O6F3R.js";import{d as S}from"./chunk-ETEYALHD.js";import"./chunk-TS4YY2WO.js";import{a as T,g as M,h as f}from"./chunk-TLVMA6DU.js";import"./chunk-6LUM2XU4.js";import"./chunk-3WKDD2IN.js";import"./chunk-GK7T43YY.js";import{Cb as e,Db as n,Eb as _,Ob as s,Pb as l,Qb as i,Sa as c,eb as D,tb as r,tc as d}from"./chunk-Q3JJWGXW.js";import"./chunk-C6Q5SG76.js";var E=()=>["/backup/new"],F=()=>["/backup/import"],u=class C{static \u0275fac=function(t){return new(t||C)};static \u0275cmp=D({type:C,selectors:[["app-add-backup"]],decls:23,vars:4,consts:()=>{let a;a=$localize`Add a new backup`;let t;t=$localize`New backup`;let p;p=$localize`Configure a new backup. Choose your destination, source data and schedule.`;let A;A=$localize` Add a new backup ${"\uFFFD#13\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let g;g=$localize`Import from file`;let P;P=$localize`Import backup configuration from a file. During import you can adjust the setings.`;let m;return m=$localize` Import from file ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:upload-simple${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[a,t,p,A,g,P,m,[1,"backup-types"],[1,"type-a"],["src","assets/images/new-backup.png"],["spk-button","",1,"raised","primary",3,"routerLink"]]},template:function(t,p){t&1&&(_(0,"app-status-bar"),e(1,"section")(2,"h2"),i(3,0),n(),e(4,"div",7)(5,"spk-card",8),_(6,"img",9),e(7,"h3"),i(8,1),n(),e(9,"p"),i(10,2),n(),e(11,"button",10),s(12,3),_(13,"spk-icon"),l(),n()(),e(14,"spk-card",8),_(15,"img",9),e(16,"h3"),i(17,4),n(),e(18,"p"),i(19,5),n(),e(20,"button",10),s(21,6),_(22,"spk-icon"),l(),n()()()()),t&2&&(c(11),r("routerLink",d(2,E)),c(9),r("routerLink",d(3,F)))},dependencies:[k,M,f,T,S],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:2rem;padding:2rem 0}div.backup-types[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;max-width:700px}spk-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem;padding-bottom:3rem}spk-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:300px}spk-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;text-align:center;width:75%}"],changeDetection:0})};export{u as default};
1
+ import{a as k}from"./chunk-RIRYVDWF.js";import"./chunk-GXX5QXLE.js";import"./chunk-GJ6GRAEW.js";import"./chunk-65ULQ2PN.js";import"./chunk-6TZWRTRA.js";import"./chunk-UJWW7PS7.js";import"./chunk-TB27CACB.js";import"./chunk-KJ4O6F3R.js";import{d as S}from"./chunk-ETEYALHD.js";import"./chunk-TS4YY2WO.js";import{a as T,g as M,h as f}from"./chunk-NQVULKI2.js";import"./chunk-6LUM2XU4.js";import"./chunk-3WKDD2IN.js";import"./chunk-GK7T43YY.js";import{Cb as e,Db as n,Eb as _,Ob as s,Pb as l,Qb as i,Sa as c,eb as D,tb as r,tc as d}from"./chunk-Q3JJWGXW.js";import"./chunk-C6Q5SG76.js";var E=()=>["/backup/new"],F=()=>["/backup/import"],u=class C{static \u0275fac=function(t){return new(t||C)};static \u0275cmp=D({type:C,selectors:[["app-add-backup"]],decls:23,vars:4,consts:()=>{let a;a=$localize`Add a new backup`;let t;t=$localize`New backup`;let p;p=$localize`Configure a new backup. Choose your destination, source data and schedule.`;let A;A=$localize` Add a new backup ${"\uFFFD#13\uFFFD"}:START_TAG_SPK_ICON:plus${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let g;g=$localize`Import from file`;let P;P=$localize`Import backup configuration from a file. During import you can adjust the setings.`;let m;return m=$localize` Import from file ${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:upload-simple${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[a,t,p,A,g,P,m,[1,"backup-types"],[1,"type-a"],["src","assets/images/new-backup.png"],["spk-button","",1,"raised","primary",3,"routerLink"]]},template:function(t,p){t&1&&(_(0,"app-status-bar"),e(1,"section")(2,"h2"),i(3,0),n(),e(4,"div",7)(5,"spk-card",8),_(6,"img",9),e(7,"h3"),i(8,1),n(),e(9,"p"),i(10,2),n(),e(11,"button",10),s(12,3),_(13,"spk-icon"),l(),n()(),e(14,"spk-card",8),_(15,"img",9),e(16,"h3"),i(17,4),n(),e(18,"p"),i(19,5),n(),e(20,"button",10),s(21,6),_(22,"spk-icon"),l(),n()()()()),t&2&&(c(11),r("routerLink",d(2,E)),c(9),r("routerLink",d(3,F)))},dependencies:[k,M,f,T,S],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:2rem;padding:2rem 0}div.backup-types[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;max-width:700px}spk-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem;padding-bottom:3rem}spk-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:300px}spk-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;text-align:center;width:75%}"],changeDetection:0})};export{u as default};
@@ -1 +1 @@
1
- import{c as a,d as b,e as c}from"./chunk-7I3L3TYU.js";import"./chunk-6DHAM3ZG.js";import"./chunk-Q5EMYWV3.js";import"./chunk-DNHLTHLR.js";import"./chunk-6CRYB4HA.js";import"./chunk-22GS6UCG.js";import"./chunk-Z5NZYMJN.js";import"./chunk-UJWW7PS7.js";import"./chunk-KJ4O6F3R.js";import"./chunk-ETEYALHD.js";import"./chunk-TS4YY2WO.js";import"./chunk-TLVMA6DU.js";import"./chunk-6LUM2XU4.js";import"./chunk-3WKDD2IN.js";import"./chunk-Q3JJWGXW.js";import"./chunk-C6Q5SG76.js";export{a as createDestinationForm,b as createDestinationFormGroup,c as default};
1
+ import{c as a,d as b,e as c}from"./chunk-Z43CKK5H.js";import"./chunk-KYQC46J2.js";import"./chunk-CAGBL2MP.js";import"./chunk-DNHLTHLR.js";import"./chunk-6CRYB4HA.js";import"./chunk-22GS6UCG.js";import"./chunk-Z5NZYMJN.js";import"./chunk-UJWW7PS7.js";import"./chunk-KJ4O6F3R.js";import"./chunk-ETEYALHD.js";import"./chunk-TS4YY2WO.js";import"./chunk-NQVULKI2.js";import"./chunk-6LUM2XU4.js";import"./chunk-3WKDD2IN.js";import"./chunk-Q3JJWGXW.js";import"./chunk-C6Q5SG76.js";export{a as createDestinationForm,b as createDestinationFormGroup,c as default};
@@ -1 +1 @@
1
- import{b,c as L,d as N,e as M,h as k,l as v,o as P,p as O,r as x}from"./chunk-UJWW7PS7.js";import{a as S}from"./chunk-2P3GS5BJ.js";import"./chunk-KJ4O6F3R.js";import{c as y}from"./chunk-ETEYALHD.js";import"./chunk-TS4YY2WO.js";import{a as E,b as F,g as G,l as T}from"./chunk-TLVMA6DU.js";import"./chunk-6LUM2XU4.js";import"./chunk-3WKDD2IN.js";import{Cb as t,Db as i,Eb as p,F as c,Sa as m,Ub as w,Z as s,eb as g,hc as n,kb as f,tb as h,va as l,vb as _,yb as C}from"./chunk-Q3JJWGXW.js";import"./chunk-C6Q5SG76.js";function A(r,e){r&1&&(t(0,"spk-alert",1),n(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 u=new O,d=class r{#e=s(y);#t=s(S);failedLogin=l(!1);isLoading=l(!1);loginForm=u.group({user:u.control(""),pass:u.control("",L.required)});submit(){let e=this.loginForm.value.pass;this.loginForm.value.user||e&&(this.isLoading.set(!0),this.#t.login(e).pipe(c(()=>{this.isLoading.set(!1),this.failedLogin.set(!0)})).subscribe({next:()=>this.#e.navigate(["/"])}))}static \u0275fac=function(o){return new(o||r)};static \u0275cmp=g({type:r,selectors:[["app-login"]],decls:15,vars:4,consts:()=>{let e;return e=$localize`Enter your password`,[[3,"submit","formGroup"],["type","warning"],[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"]]},template:function(o,a){o&1&&(t(0,"form",0),w("submit",function(){return a.submit()}),f(1,A,2,0,"spk-alert",1),t(2,"div",2),p(3,"input",3),t(4,"spk-form-field")(5,"label",4),n(6," Password "),t(7,"a",5)(8,"spk-icon"),n(9,"question"),i()()(),p(10,"input",6),i(),t(11,"button",7),n(12," Login "),t(13,"spk-icon"),n(14,"arrow-right"),i()()()()),o&2&&(h("formGroup",a.loginForm),m(),C(a.failedLogin()?1:-1),m(10),_("loader",a.isLoading()))},dependencies:[x,k,b,N,M,v,P,T,E,G,F],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:1.5rem}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}"],changeDetection:0})};export{d as default};
1
+ import{b,c as L,d as N,e as M,h as k,l as v,o as P,p as O,r as x}from"./chunk-UJWW7PS7.js";import{b as S}from"./chunk-TB27CACB.js";import"./chunk-KJ4O6F3R.js";import{c as y}from"./chunk-ETEYALHD.js";import"./chunk-TS4YY2WO.js";import{a as E,b as F,g as G,l as T}from"./chunk-NQVULKI2.js";import"./chunk-6LUM2XU4.js";import"./chunk-3WKDD2IN.js";import{Cb as t,Db as i,Eb as p,F as c,Sa as m,Ub as w,Z as s,eb as g,hc as n,kb as f,tb as h,va as l,vb as _,yb as C}from"./chunk-Q3JJWGXW.js";import"./chunk-C6Q5SG76.js";function A(r,e){r&1&&(t(0,"spk-alert",1),n(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 u=new O,d=class r{#e=s(y);#t=s(S);failedLogin=l(!1);isLoading=l(!1);loginForm=u.group({user:u.control(""),pass:u.control("",L.required)});submit(){let e=this.loginForm.value.pass;this.loginForm.value.user||e&&(this.isLoading.set(!0),this.#t.login(e).pipe(c(()=>{this.isLoading.set(!1),this.failedLogin.set(!0)})).subscribe({next:()=>this.#e.navigate(["/"])}))}static \u0275fac=function(o){return new(o||r)};static \u0275cmp=g({type:r,selectors:[["app-login"]],decls:15,vars:4,consts:()=>{let e;return e=$localize`Enter your password`,[[3,"submit","formGroup"],["type","warning"],[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"]]},template:function(o,a){o&1&&(t(0,"form",0),w("submit",function(){return a.submit()}),f(1,A,2,0,"spk-alert",1),t(2,"div",2),p(3,"input",3),t(4,"spk-form-field")(5,"label",4),n(6," Password "),t(7,"a",5)(8,"spk-icon"),n(9,"question"),i()()(),p(10,"input",6),i(),t(11,"button",7),n(12," Login "),t(13,"spk-icon"),n(14,"arrow-right"),i()()()()),o&2&&(h("formGroup",a.loginForm),m(),C(a.failedLogin()?1:-1),m(10),_("loader",a.isLoading()))},dependencies:[x,k,b,N,M,v,P,T,E,G,F],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:1.5rem}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}"],changeDetection:0})};export{d as default};
@@ -1 +1 @@
1
- import{a as ie}from"./chunk-I24WOYYC.js";import{a as ne}from"./chunk-CP2S6DC4.js";import{b as oe,d as ae,g as se,i as le,q as b}from"./chunk-UJWW7PS7.js";import{b as f}from"./chunk-KJ4O6F3R.js";import{a as re,b as _e,e as pe,g as ue,i as L,l as ce,o as de,p as Se,q as Te,r as me}from"./chunk-TLVMA6DU.js";import{pa as te}from"./chunk-3WKDD2IN.js";import{a as ge}from"./chunk-GK7T43YY.js";import{Ab as P,Bb as N,Cb as l,Db as s,Eb as h,F as E,Ib as j,Mc as w,Ob as F,Pb as y,Qb as p,Sa as r,Tb as q,Ub as u,Vb as O,Z as c,ea as K,eb as C,fa as W,hb as V,hc as m,ic as $,jc as Z,kb as G,kc as J,lc as Y,mc as M,nc as D,oc as R,qa as k,tb as T,va as _,vb as d,xc as x,yb as U,yc as Q,zb as A,zc as ee}from"./chunk-Q3JJWGXW.js";var v=class o{#e=c(ge);transform(n,...t){return this.#e.locale(),this.#e(n).fromNow()}static \u0275fac=function(t){return new(t||o)};static \u0275pipe=V({name:"appRelativeTime",type:o,pure:!0})};function Pe(o,n){if(o&1){let t=j();l(0,"spk-radio",10),u("click",function(){let i=K(t).$implicit,a=O();return W(a.pauseOption.set(i.value))}),m(1),s()}if(o&2){let t=n.$implicit,e=O();d("active",e.pauseOption()===t.value),r(),Z(" ",t.label," ")}}var Ne=[{label:$localize`5 minuts`,value:"5m"},{label:$localize`10 minuts`,value:"10m"},{label:$localize`15 minuts`,value:"15m"},{label:$localize`30 minuts`,value:"30m"},{label:$localize`1 hour`,value:"1h"},{label:$localize`4 hours`,value:"4h"},{label:$localize`8 hours`,value:"8h"},{label:$localize`24 hours`,value:"24h"},{label:$localize`Until resumed`,value:void 0}],B=class o{#e=c(f);pauseOptions=_(Ne);closed=k();isSubmitting=_(!1);pauseTransfers=_(!1);pauseOption=_(void 0);submit(){this.isSubmitting.set(!0);let n=this.pauseTransfers()||null,t=this.pauseOption();this.#e.postApiV1ServerstatePause({duration:t,pauseTransfers:n}).pipe(E(()=>this.isSubmitting.set(!1))).subscribe({next:e=>{this.closed.emit()}})}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=C({type:o,selectors:[["app-pause-dialog"]],outputs:{closed:"closed"},decls:17,vars:4,consts:()=>{let n;n=$localize`Pause settings`;let t;t=$localize` Also pause transfers `;let e;e=$localize`If you pause transfers they could time out and cause retries or failures.`;let i;i=$localize`Cancel`;let a;return a=$localize` Update settings `,[n,t,e,i,a,["header",""],["content",""],[1,"radios"],[1,"primary","raised",3,"active"],[1,"check-wrap"],[1,"primary","raised",3,"click"],["type","warning"],["footer",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"click"]]},template:function(t,e){t&1&&(l(0,"header",5)(1,"h3"),p(2,0),s()(),l(3,"div",6)(4,"div",7),P(5,Pe,2,3,"spk-radio",8,A),s(),l(7,"div",9)(8,"spk-checkbox",10),u("click",function(){return e.pauseTransfers.set(!e.pauseTransfers())}),p(9,1),s(),l(10,"spk-alert",11),p(11,2),s()()(),l(12,"footer",12)(13,"button",13),u("click",function(){return e.closed.emit()}),p(14,3),s(),l(15,"button",14),u("click",function(){return e.submit()}),p(16,4),s()()),t&2&&(r(5),N(e.pauseOptions()),r(3),d("active",e.pauseTransfers()),r(7),d("loader",e.isSubmitting()))},dependencies:[b,Se,L,_e],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})};function Me(o,n){if(o&1&&(l(0,"spk-option",14),m(1),s()),o&2){let t=n.$implicit;T("value",t),r(),$(t)}}function De(o,n){if(o&1&&(l(0,"spk-option",14),m(1),s()),o&2){let t=n.$implicit;T("value",t),r(),$(t)}}var Re=["Byte/s","KByte/s","MByte/s","GByte/s","TByte/s","PByte/s"],X={Byte:"B",KByte:"KB",MByte:"MB",GByte:"GB",TByte:"TB",PByte:"PB"},Ce=Object.entries(X).reduce((o,[n,t])=>(o[t]=n,o),{}),I=class o{#e=c(f);closed=k();isSubmitting=_(!1);sizeOptions=_(Re);maxUploadActive=_(!1);maxDownloadActive=_(!1);maxUpload=_(0);maxDownload=_(0);maxUploadUnit=_("MByte/s");maxDownloadUnit=_("MByte/s");ngOnInit(){this.init()}init(){this.#e.getApiV1Serversettings().subscribe({next:n=>{let t=n?.["max-upload-speed"]?.split(/(\d+)/),e=n?.["max-download-speed"]?.split(/(\d+)/),i=t[1]??"",a=e[1]??"",S=t[2]??"MB",g=e[2]??"MB",fe=i===""?10:parseInt(i),Ae=a===""?10:parseInt(a);console.log(i),this.maxUploadUnit.set(Ce[S]+"/s"),this.maxDownloadUnit.set(Ce[g]+"/s"),this.maxUploadActive.set(i!==""),this.maxDownloadActive.set(a!==""),this.maxUpload.set(fe),this.maxDownload.set(Ae)}})}blockDecimalKeys(n){if([".",","].includes(n.key))return n.preventDefault()}cleanupInputAfterPasting(n){n.preventDefault();let t=n.clipboardData?.getData("text/plain");if(!t)return;let e=t.replaceAll(/[\.,]/g,"");n.target.value=e}submit(){this.isSubmitting.set(!0);let n=this.maxUploadActive()?`${this.maxUpload()}${X[this.maxUploadUnit().replace("/s","")]}`:"",t=this.maxDownloadActive()?`${this.maxDownload()}${X[this.maxDownloadUnit().replace("/s","")]}`:"";this.#e.patchApiV1Serversettings({requestBody:{"max-upload-speed":n,"max-download-speed":t}}).pipe(E(()=>this.isSubmitting.set(!1))).subscribe({next:e=>{this.closed.emit(!0)}})}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=C({type:o,selectors:[["app-throttle-settings-dialog"]],outputs:{closed:"closed"},decls:30,vars:14,consts:()=>{let n;n=$localize`Throttle network speed`;let t;t=$localize` Max upload speed `;let e;e=$localize` Max download speed `;let i;i=$localize` Note that speeds are entered in bytes, and line speeds are typically reported in bits. Use a factor of 8 to convert, such that an 8 mbit/s line is equivalent to 1 MByte/s. `;let a;a=$localize`Cancel`;let S;return S=$localize` Update settings `,[n,t,e,i,a,S,["header",""],["content",""],[1,"column"],[1,"field-row"],[1,"primary","raised",3,"click"],["type","number",3,"paste","keydown","ngModelChange","ngModel","disabled"],[3,"hideClearButton"],["type","text",3,"ngModelChange","ngModel"],[3,"value"],["footer",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"click"]]},template:function(t,e){t&1&&(l(0,"header",6)(1,"h3"),p(2,0),s()(),l(3,"div",7)(4,"div",8)(5,"div",9)(6,"spk-checkbox",10),u("click",function(){return e.maxUploadActive.set(!e.maxUploadActive())}),p(7,1),s(),l(8,"spk-form-field")(9,"input",11),u("paste",function(a){return e.cleanupInputAfterPasting(a)})("keydown",function(a){return e.blockDecimalKeys(a)}),R("ngModelChange",function(a){return D(e.maxUpload,a)||(e.maxUpload=a),a}),s()(),l(10,"spk-select",12)(11,"input",13),R("ngModelChange",function(a){return D(e.maxUploadUnit,a)||(e.maxUploadUnit=a),a}),s(),P(12,Me,2,2,"spk-option",14,A),s()(),l(14,"div",9)(15,"spk-checkbox",10),u("click",function(){return e.maxDownloadActive.set(!e.maxDownloadActive())}),p(16,2),s(),l(17,"spk-form-field")(18,"input",11),u("paste",function(a){return e.cleanupInputAfterPasting(a)})("keydown",function(a){return e.blockDecimalKeys(a)}),R("ngModelChange",function(a){return D(e.maxDownload,a)||(e.maxDownload=a),a}),s()(),l(19,"spk-select",12)(20,"input",13),R("ngModelChange",function(a){return D(e.maxDownloadUnit,a)||(e.maxDownloadUnit=a),a}),s(),P(21,De,2,2,"spk-option",14,A),s()(),l(23,"p"),p(24,3),s()()(),l(25,"footer",15)(26,"button",16),u("click",function(){return e.closed.emit(!1)}),p(27,4),s(),l(28,"button",17),u("click",function(){return e.submit()}),p(29,5),s()()),t&2&&(r(6),d("active",e.maxUploadActive()),r(3),M("ngModel",e.maxUpload),T("disabled",!e.maxUploadActive()),r(),T("hideClearButton",!0),r(),M("ngModel",e.maxUploadUnit),r(),N(e.sizeOptions()),r(3),d("active",e.maxDownloadActive()),r(3),M("ngModel",e.maxDownload),T("disabled",!e.maxDownloadActive()),r(),T("hideClearButton",!0),r(),M("ngModel",e.maxDownloadUnit),r(),N(e.sizeOptions()),r(7),d("loader",e.isSubmitting()))},dependencies:[b,oe,le,ae,se,me,Te,ce,L],styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}.column[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.field-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;width:100%}"],changeDetection:0})};function Ie(o,n){if(o&1&&(l(0,"div"),m(1),s(),h(2,"spk-progress-bar",7)),o&2){let t=O();r(),J("",t.statusData().actionText," - ",t.statusData().statusText,""),r(),T("value",t.statusData().progress*100)}}function ke(o,n){if(o&1&&(l(0,"div",4),m(1),x(2,"appRelativeTime"),x(3,"date"),s()),o&2){let t,e=O();r(),Y(" ",(t=e.nextBackup().backup)==null||t.Backup==null?null:t.Backup.Name," - ",Q(2,3,e.nextBackup().time)," at ",ee(3,5,e.nextBackup().time,"shortTime")," ")}}function he(o,n){o&1&&(l(0,"div",4),p(1,1),s())}function Fe(o,n){o&1&&(F(0,0,1),h(1,"spk-icon"),y())}function ye(o,n){o&1&&(F(0,0,2),h(1,"spk-icon"),y())}var Oe=new Date,H=class o{#e=c(f);#t=c(ie);#n=c(pe);#i=c(ne);minsAgo=Oe.setMinutes(Oe.getMinutes()-1);statusData=this.#t.statusData;serverState=this.#t.serverState;isRunning=w(()=>this.serverState()?.ProgramState==="Running");isResuming=_(!1);nextBackup=w(()=>({backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}));openThrottleSettingsDialog(){this.#n.open(I,{maxWidth:"550px",width:"100%"})}openPauseDialog(){this.#n.open(B,{maxWidth:"550px",width:"100%"})}pauseResume(){if(this.isRunning()){this.openPauseDialog();return}this.isResuming.set(!0),this.#e.postApiV1ServerstateResume().pipe(E(()=>this.isResuming.set(!1))).subscribe()}ngAfterViewInit(){let n=this.#i.relayIsEnabled()?"longpoll":"websocket";this.#t.setConnectionMethod(n)}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=C({type:o,selectors:[["app-status-bar"]],decls:13,vars:4,consts:()=>{let n;n=$localize`${"\uFFFD*8: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/*8:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*9: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/*9:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,n=q(n);let t;return t=$localize`Loading...`,[n,t,[1,"current-backup"],[1,"current-backup-progress"],[1,"label"],[1,"current-backup-actions"],["spk-button","",3,"click"],[1,"raised","primary",3,"value"]]},template:function(t,e){if(t&1&&(l(0,"div",2)(1,"div",3),G(2,Ie,3,3)(3,ke,4,8,"div",4)(4,he,2,0,"div",4),s(),l(5,"div",5)(6,"button",6),u("click",function(){return e.pauseResume()}),F(7,0),G(8,Fe,2,0)(9,ye,2,0),y(),s(),l(10,"button",6),u("click",function(){return e.openThrottleSettingsDialog()}),l(11,"spk-icon"),m(12,"speedometer"),s()()()()),t&2){let i;r(2),U((i=e.serverState())!=null&&i.ActiveTask&&(!((i=e.statusData())==null||i.task==null)&&i.task.Status)&&((i=e.statusData())==null||i.task==null?null:i.task.Status)!=="Completed"?2:e.nextBackup().backup||e.nextBackup().time?3:4),r(4),d("loader",e.isResuming()),r(2),U(e.isRunning()?8:9)}},dependencies:[de,v,te,re,ue],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1rem;min-height:3.875rem;border-bottom:1px solid var(--base-level-40)}.current-backup[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;gap:.5rem}.current-backup-progress[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;min-width:18.75rem}.current-backup-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{H as a};
1
+ import{a as ie}from"./chunk-GXX5QXLE.js";import{b as oe,d as ae,g as se,i as le,q as b}from"./chunk-UJWW7PS7.js";import{a as ne}from"./chunk-TB27CACB.js";import{b as f}from"./chunk-KJ4O6F3R.js";import{a as re,b as _e,e as pe,g as ue,i as L,l as ce,o as de,p as Se,q as Te,r as me}from"./chunk-NQVULKI2.js";import{pa as te}from"./chunk-3WKDD2IN.js";import{a as ge}from"./chunk-GK7T43YY.js";import{Ab as P,Bb as N,Cb as l,Db as s,Eb as h,F as E,Ib as j,Mc as w,Ob as F,Pb as y,Qb as p,Sa as r,Tb as q,Ub as u,Vb as O,Z as c,ea as K,eb as C,fa as W,hb as V,hc as m,ic as $,jc as Z,kb as G,kc as J,lc as Y,mc as M,nc as D,oc as R,qa as k,tb as T,va as _,vb as d,xc as x,yb as U,yc as Q,zb as A,zc as ee}from"./chunk-Q3JJWGXW.js";var v=class o{#e=c(ge);transform(n,...t){return this.#e.locale(),this.#e(n).fromNow()}static \u0275fac=function(t){return new(t||o)};static \u0275pipe=V({name:"appRelativeTime",type:o,pure:!0})};function Pe(o,n){if(o&1){let t=j();l(0,"spk-radio",10),u("click",function(){let i=K(t).$implicit,a=O();return W(a.pauseOption.set(i.value))}),m(1),s()}if(o&2){let t=n.$implicit,e=O();d("active",e.pauseOption()===t.value),r(),Z(" ",t.label," ")}}var Ne=[{label:$localize`5 minuts`,value:"5m"},{label:$localize`10 minuts`,value:"10m"},{label:$localize`15 minuts`,value:"15m"},{label:$localize`30 minuts`,value:"30m"},{label:$localize`1 hour`,value:"1h"},{label:$localize`4 hours`,value:"4h"},{label:$localize`8 hours`,value:"8h"},{label:$localize`24 hours`,value:"24h"},{label:$localize`Until resumed`,value:void 0}],B=class o{#e=c(f);pauseOptions=_(Ne);closed=k();isSubmitting=_(!1);pauseTransfers=_(!1);pauseOption=_(void 0);submit(){this.isSubmitting.set(!0);let n=this.pauseTransfers()||null,t=this.pauseOption();this.#e.postApiV1ServerstatePause({duration:t,pauseTransfers:n}).pipe(E(()=>this.isSubmitting.set(!1))).subscribe({next:e=>{this.closed.emit()}})}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=C({type:o,selectors:[["app-pause-dialog"]],outputs:{closed:"closed"},decls:17,vars:4,consts:()=>{let n;n=$localize`Pause settings`;let t;t=$localize` Also pause transfers `;let e;e=$localize`If you pause transfers they could time out and cause retries or failures.`;let i;i=$localize`Cancel`;let a;return a=$localize` Update settings `,[n,t,e,i,a,["header",""],["content",""],[1,"radios"],[1,"primary","raised",3,"active"],[1,"check-wrap"],[1,"primary","raised",3,"click"],["type","warning"],["footer",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"click"]]},template:function(t,e){t&1&&(l(0,"header",5)(1,"h3"),p(2,0),s()(),l(3,"div",6)(4,"div",7),P(5,Pe,2,3,"spk-radio",8,A),s(),l(7,"div",9)(8,"spk-checkbox",10),u("click",function(){return e.pauseTransfers.set(!e.pauseTransfers())}),p(9,1),s(),l(10,"spk-alert",11),p(11,2),s()()(),l(12,"footer",12)(13,"button",13),u("click",function(){return e.closed.emit()}),p(14,3),s(),l(15,"button",14),u("click",function(){return e.submit()}),p(16,4),s()()),t&2&&(r(5),N(e.pauseOptions()),r(3),d("active",e.pauseTransfers()),r(7),d("loader",e.isSubmitting()))},dependencies:[b,Se,L,_e],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})};function Me(o,n){if(o&1&&(l(0,"spk-option",14),m(1),s()),o&2){let t=n.$implicit;T("value",t),r(),$(t)}}function De(o,n){if(o&1&&(l(0,"spk-option",14),m(1),s()),o&2){let t=n.$implicit;T("value",t),r(),$(t)}}var Re=["Byte/s","KByte/s","MByte/s","GByte/s","TByte/s","PByte/s"],X={Byte:"B",KByte:"KB",MByte:"MB",GByte:"GB",TByte:"TB",PByte:"PB"},Ce=Object.entries(X).reduce((o,[n,t])=>(o[t]=n,o),{}),I=class o{#e=c(f);closed=k();isSubmitting=_(!1);sizeOptions=_(Re);maxUploadActive=_(!1);maxDownloadActive=_(!1);maxUpload=_(0);maxDownload=_(0);maxUploadUnit=_("MByte/s");maxDownloadUnit=_("MByte/s");ngOnInit(){this.init()}init(){this.#e.getApiV1Serversettings().subscribe({next:n=>{let t=n?.["max-upload-speed"]?.split(/(\d+)/),e=n?.["max-download-speed"]?.split(/(\d+)/),i=t[1]??"",a=e[1]??"",S=t[2]??"MB",g=e[2]??"MB",fe=i===""?10:parseInt(i),Ae=a===""?10:parseInt(a);console.log(i),this.maxUploadUnit.set(Ce[S]+"/s"),this.maxDownloadUnit.set(Ce[g]+"/s"),this.maxUploadActive.set(i!==""),this.maxDownloadActive.set(a!==""),this.maxUpload.set(fe),this.maxDownload.set(Ae)}})}blockDecimalKeys(n){if([".",","].includes(n.key))return n.preventDefault()}cleanupInputAfterPasting(n){n.preventDefault();let t=n.clipboardData?.getData("text/plain");if(!t)return;let e=t.replaceAll(/[\.,]/g,"");n.target.value=e}submit(){this.isSubmitting.set(!0);let n=this.maxUploadActive()?`${this.maxUpload()}${X[this.maxUploadUnit().replace("/s","")]}`:"",t=this.maxDownloadActive()?`${this.maxDownload()}${X[this.maxDownloadUnit().replace("/s","")]}`:"";this.#e.patchApiV1Serversettings({requestBody:{"max-upload-speed":n,"max-download-speed":t}}).pipe(E(()=>this.isSubmitting.set(!1))).subscribe({next:e=>{this.closed.emit(!0)}})}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=C({type:o,selectors:[["app-throttle-settings-dialog"]],outputs:{closed:"closed"},decls:30,vars:14,consts:()=>{let n;n=$localize`Throttle network speed`;let t;t=$localize` Max upload speed `;let e;e=$localize` Max download speed `;let i;i=$localize` Note that speeds are entered in bytes, and line speeds are typically reported in bits. Use a factor of 8 to convert, such that an 8 mbit/s line is equivalent to 1 MByte/s. `;let a;a=$localize`Cancel`;let S;return S=$localize` Update settings `,[n,t,e,i,a,S,["header",""],["content",""],[1,"column"],[1,"field-row"],[1,"primary","raised",3,"click"],["type","number",3,"paste","keydown","ngModelChange","ngModel","disabled"],[3,"hideClearButton"],["type","text",3,"ngModelChange","ngModel"],[3,"value"],["footer",""],["spk-button","",3,"click"],["spk-button","",1,"raised","primary",3,"click"]]},template:function(t,e){t&1&&(l(0,"header",6)(1,"h3"),p(2,0),s()(),l(3,"div",7)(4,"div",8)(5,"div",9)(6,"spk-checkbox",10),u("click",function(){return e.maxUploadActive.set(!e.maxUploadActive())}),p(7,1),s(),l(8,"spk-form-field")(9,"input",11),u("paste",function(a){return e.cleanupInputAfterPasting(a)})("keydown",function(a){return e.blockDecimalKeys(a)}),R("ngModelChange",function(a){return D(e.maxUpload,a)||(e.maxUpload=a),a}),s()(),l(10,"spk-select",12)(11,"input",13),R("ngModelChange",function(a){return D(e.maxUploadUnit,a)||(e.maxUploadUnit=a),a}),s(),P(12,Me,2,2,"spk-option",14,A),s()(),l(14,"div",9)(15,"spk-checkbox",10),u("click",function(){return e.maxDownloadActive.set(!e.maxDownloadActive())}),p(16,2),s(),l(17,"spk-form-field")(18,"input",11),u("paste",function(a){return e.cleanupInputAfterPasting(a)})("keydown",function(a){return e.blockDecimalKeys(a)}),R("ngModelChange",function(a){return D(e.maxDownload,a)||(e.maxDownload=a),a}),s()(),l(19,"spk-select",12)(20,"input",13),R("ngModelChange",function(a){return D(e.maxDownloadUnit,a)||(e.maxDownloadUnit=a),a}),s(),P(21,De,2,2,"spk-option",14,A),s()(),l(23,"p"),p(24,3),s()()(),l(25,"footer",15)(26,"button",16),u("click",function(){return e.closed.emit(!1)}),p(27,4),s(),l(28,"button",17),u("click",function(){return e.submit()}),p(29,5),s()()),t&2&&(r(6),d("active",e.maxUploadActive()),r(3),M("ngModel",e.maxUpload),T("disabled",!e.maxUploadActive()),r(),T("hideClearButton",!0),r(),M("ngModel",e.maxUploadUnit),r(),N(e.sizeOptions()),r(3),d("active",e.maxDownloadActive()),r(3),M("ngModel",e.maxDownload),T("disabled",!e.maxDownloadActive()),r(),T("hideClearButton",!0),r(),M("ngModel",e.maxDownloadUnit),r(),N(e.sizeOptions()),r(7),d("loader",e.isSubmitting()))},dependencies:[b,oe,le,ae,se,me,Te,ce,L],styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}.column[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.field-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;width:100%}"],changeDetection:0})};function Ie(o,n){if(o&1&&(l(0,"div"),m(1),s(),h(2,"spk-progress-bar",7)),o&2){let t=O();r(),J("",t.statusData().actionText," - ",t.statusData().statusText,""),r(),T("value",t.statusData().progress*100)}}function ke(o,n){if(o&1&&(l(0,"div",4),m(1),x(2,"appRelativeTime"),x(3,"date"),s()),o&2){let t,e=O();r(),Y(" ",(t=e.nextBackup().backup)==null||t.Backup==null?null:t.Backup.Name," - ",Q(2,3,e.nextBackup().time)," at ",ee(3,5,e.nextBackup().time,"shortTime")," ")}}function he(o,n){o&1&&(l(0,"div",4),p(1,1),s())}function Fe(o,n){o&1&&(F(0,0,1),h(1,"spk-icon"),y())}function ye(o,n){o&1&&(F(0,0,2),h(1,"spk-icon"),y())}var Oe=new Date,H=class o{#e=c(f);#t=c(ie);#n=c(pe);#i=c(ne);minsAgo=Oe.setMinutes(Oe.getMinutes()-1);statusData=this.#t.statusData;serverState=this.#t.serverState;isRunning=w(()=>this.serverState()?.ProgramState==="Running");isResuming=_(!1);nextBackup=w(()=>({backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}));openThrottleSettingsDialog(){this.#n.open(I,{maxWidth:"550px",width:"100%"})}openPauseDialog(){this.#n.open(B,{maxWidth:"550px",width:"100%"})}pauseResume(){if(this.isRunning()){this.openPauseDialog();return}this.isResuming.set(!0),this.#e.postApiV1ServerstateResume().pipe(E(()=>this.isResuming.set(!1))).subscribe()}ngAfterViewInit(){let n=this.#i.relayIsEnabled()?"longpoll":"websocket";this.#t.setConnectionMethod(n)}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=C({type:o,selectors:[["app-status-bar"]],decls:13,vars:4,consts:()=>{let n;n=$localize`${"\uFFFD*8: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/*8:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*9: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/*9:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,n=q(n);let t;return t=$localize`Loading...`,[n,t,[1,"current-backup"],[1,"current-backup-progress"],[1,"label"],[1,"current-backup-actions"],["spk-button","",3,"click"],[1,"raised","primary",3,"value"]]},template:function(t,e){if(t&1&&(l(0,"div",2)(1,"div",3),G(2,Ie,3,3)(3,ke,4,8,"div",4)(4,he,2,0,"div",4),s(),l(5,"div",5)(6,"button",6),u("click",function(){return e.pauseResume()}),F(7,0),G(8,Fe,2,0)(9,ye,2,0),y(),s(),l(10,"button",6),u("click",function(){return e.openThrottleSettingsDialog()}),l(11,"spk-icon"),m(12,"speedometer"),s()()()()),t&2){let i;r(2),U((i=e.serverState())!=null&&i.ActiveTask&&(!((i=e.statusData())==null||i.task==null)&&i.task.Status)&&((i=e.statusData())==null||i.task==null?null:i.task.Status)!=="Completed"?2:e.nextBackup().backup||e.nextBackup().time?3:4),r(4),d("loader",e.isResuming()),r(2),U(e.isRunning()?8:9)}},dependencies:[de,v,te,re,ue],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:1rem;min-height:3.875rem;border-bottom:1px solid var(--base-level-40)}.current-backup[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%;gap:.5rem}.current-backup-progress[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;min-width:18.75rem}.current-backup-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{H as a};
@@ -1 +1 @@
1
- import{f as a,g as b,h as c}from"./chunk-7I3L3TYU.js";import"./chunk-6DHAM3ZG.js";import"./chunk-Q5EMYWV3.js";import"./chunk-DNHLTHLR.js";import"./chunk-6CRYB4HA.js";import"./chunk-22GS6UCG.js";import"./chunk-Z5NZYMJN.js";import"./chunk-UJWW7PS7.js";import"./chunk-KJ4O6F3R.js";import"./chunk-ETEYALHD.js";import"./chunk-TS4YY2WO.js";import"./chunk-TLVMA6DU.js";import"./chunk-6LUM2XU4.js";import"./chunk-3WKDD2IN.js";import"./chunk-Q3JJWGXW.js";import"./chunk-C6Q5SG76.js";export{b as NONE_OPTION,a as createGeneralForm,c as default};
1
+ import{f as a,g as b,h as c}from"./chunk-Z43CKK5H.js";import"./chunk-KYQC46J2.js";import"./chunk-CAGBL2MP.js";import"./chunk-DNHLTHLR.js";import"./chunk-6CRYB4HA.js";import"./chunk-22GS6UCG.js";import"./chunk-Z5NZYMJN.js";import"./chunk-UJWW7PS7.js";import"./chunk-KJ4O6F3R.js";import"./chunk-ETEYALHD.js";import"./chunk-TS4YY2WO.js";import"./chunk-NQVULKI2.js";import"./chunk-6LUM2XU4.js";import"./chunk-3WKDD2IN.js";import"./chunk-Q3JJWGXW.js";import"./chunk-C6Q5SG76.js";export{b as NONE_OPTION,a as createGeneralForm,c as default};
@@ -1 +1 @@
1
- import{b as $}from"./chunk-6CRYB4HA.js";import{a as R}from"./chunk-PO2RDC4E.js";import"./chunk-I24WOYYC.js";import"./chunk-ASPLJ6GL.js";import"./chunk-CP2S6DC4.js";import"./chunk-6TZWRTRA.js";import"./chunk-UJWW7PS7.js";import"./chunk-2P3GS5BJ.js";import{b as k}from"./chunk-KJ4O6F3R.js";import{a as A,d as N}from"./chunk-ETEYALHD.js";import"./chunk-TS4YY2WO.js";import{a as B,g as O}from"./chunk-TLVMA6DU.js";import"./chunk-6LUM2XU4.js";import"./chunk-3WKDD2IN.js";import"./chunk-GK7T43YY.js";import{Ab as S,Bb as g,Cb as F,Db as a,Eb as r,Mc as M,Ob as _,Pb as c,Qb as u,Sa as i,Tb as T,Ub as I,Z as m,eb as C,hc as E,jc as L,kb as p,va as l,yb as s,zb as f}from"./chunk-Q3JJWGXW.js";import"./chunk-C6Q5SG76.js";function b(e,t){e&1&&u(0,2,1)}function P(e,t){e&1&&u(0,2,2)}function h(e,t){e&1&&u(0,2,3)}function v(e,t){e&1&&u(0,2,4)}function U(e,t){if(e&1&&(E(0),r(1,"br")),e&2){let n=t.$implicit;L(" ",n," ")}}var D=class e{#t=m(k);#e=m(A);#n=$(this.#e.params);runId=M(()=>this.#n()?.runId);offset=l(0);status=l("starting");messageLog=l([]);interval=setInterval(()=>{this.#t.getApiV1CommandlineByRunid({runid:this.runId(),offset:this.offset(),pagesize:100}).subscribe(t=>{this.offset.set(t.Count),this.evalStatus(t),this.messageLog.update(n=>[...n,...t.Items])})},1e3);evalStatus(t){t.Started===!0&&t.Finished===!0&&(this.status.set("finished"),clearInterval(this.interval)),t.Started===!0&&t.Finished===!1&&this.status.set("started")}abort(){this.#t.postApiV1CommandlineByRunidAbort({runid:this.runId()}).subscribe({next:t=>{this.status.set("aborted"),clearInterval(this.interval)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=C({type:e,selectors:[["app-commandline-result"]],decls:18,vars:4,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let n;n=$localize` Running commandline task... ${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON:Abort${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_BUTTON:`;let o;return o=$localize`${"\uFFFD*11:1\uFFFD"}:START_BLOCK_IF: Starting... ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*12:2\uFFFD"}:START_BLOCK_IF_1: Started! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*13:3\uFFFD"}:START_BLOCK_IF_2: Finished! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*14:4\uFFFD"}:START_BLOCK_IF_3: Aborted! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:`,o=T(o),[t,n,o,[1,"back"],["type","button","spk-button","","routerLink","/",1,"small"],["type","button","spk-button","",1,"small",3,"click"],[1,"status"]]},template:function(n,o){n&1&&(r(0,"app-status-bar"),F(1,"section")(2,"div",3)(3,"button",4),_(4,0),r(5,"spk-icon"),c(),a()(),F(6,"h3"),_(7,1),F(8,"button",5),I("click",function(){return o.abort()}),a(),c(),a(),F(9,"div",6),_(10,2),p(11,b,1,0)(12,P,1,0)(13,h,1,0)(14,v,1,0),c(),a(),F(15,"code"),S(16,U,2,1,null,null,f),a()()),n&2&&(i(11),s(o.status()==="starting"?11:-1),i(),s(o.status()==="started"?12:-1),i(),s(o.status()==="finished"?13:-1),i(),s(o.status()==="aborted"?14:-1),i(2),g(o.messageLog()))},dependencies:[R,B,O,N],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;padding:2.5rem;gap:1.25rem}code[_ngcontent-%COMP%]{background-color:var(--grey-800);color:var(--grey-100);padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{D as default};
1
+ import{b as $}from"./chunk-6CRYB4HA.js";import{a as R}from"./chunk-RIRYVDWF.js";import"./chunk-GXX5QXLE.js";import"./chunk-GJ6GRAEW.js";import"./chunk-65ULQ2PN.js";import"./chunk-6TZWRTRA.js";import"./chunk-UJWW7PS7.js";import"./chunk-TB27CACB.js";import{b as k}from"./chunk-KJ4O6F3R.js";import{a as A,d as N}from"./chunk-ETEYALHD.js";import"./chunk-TS4YY2WO.js";import{a as B,g as O}from"./chunk-NQVULKI2.js";import"./chunk-6LUM2XU4.js";import"./chunk-3WKDD2IN.js";import"./chunk-GK7T43YY.js";import{Ab as S,Bb as g,Cb as F,Db as a,Eb as r,Mc as M,Ob as _,Pb as c,Qb as u,Sa as i,Tb as T,Ub as I,Z as m,eb as C,hc as E,jc as L,kb as p,va as l,yb as s,zb as f}from"./chunk-Q3JJWGXW.js";import"./chunk-C6Q5SG76.js";function b(e,t){e&1&&u(0,2,1)}function P(e,t){e&1&&u(0,2,2)}function h(e,t){e&1&&u(0,2,3)}function v(e,t){e&1&&u(0,2,4)}function U(e,t){if(e&1&&(E(0),r(1,"br")),e&2){let n=t.$implicit;L(" ",n," ")}}var D=class e{#t=m(k);#e=m(A);#n=$(this.#e.params);runId=M(()=>this.#n()?.runId);offset=l(0);status=l("starting");messageLog=l([]);interval=setInterval(()=>{this.#t.getApiV1CommandlineByRunid({runid:this.runId(),offset:this.offset(),pagesize:100}).subscribe(t=>{this.offset.set(t.Count),this.evalStatus(t),this.messageLog.update(n=>[...n,...t.Items])})},1e3);evalStatus(t){t.Started===!0&&t.Finished===!0&&(this.status.set("finished"),clearInterval(this.interval)),t.Started===!0&&t.Finished===!1&&this.status.set("started")}abort(){this.#t.postApiV1CommandlineByRunidAbort({runid:this.runId()}).subscribe({next:t=>{this.status.set("aborted"),clearInterval(this.interval)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=C({type:e,selectors:[["app-commandline-result"]],decls:18,vars:4,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let n;n=$localize` Running commandline task... ${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON:Abort${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_BUTTON:`;let o;return o=$localize`${"\uFFFD*11:1\uFFFD"}:START_BLOCK_IF: Starting... ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*12:2\uFFFD"}:START_BLOCK_IF_1: Started! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*13:3\uFFFD"}:START_BLOCK_IF_2: Finished! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*14:4\uFFFD"}:START_BLOCK_IF_3: Aborted! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:`,o=T(o),[t,n,o,[1,"back"],["type","button","spk-button","","routerLink","/",1,"small"],["type","button","spk-button","",1,"small",3,"click"],[1,"status"]]},template:function(n,o){n&1&&(r(0,"app-status-bar"),F(1,"section")(2,"div",3)(3,"button",4),_(4,0),r(5,"spk-icon"),c(),a()(),F(6,"h3"),_(7,1),F(8,"button",5),I("click",function(){return o.abort()}),a(),c(),a(),F(9,"div",6),_(10,2),p(11,b,1,0)(12,P,1,0)(13,h,1,0)(14,v,1,0),c(),a(),F(15,"code"),S(16,U,2,1,null,null,f),a()()),n&2&&(i(11),s(o.status()==="starting"?11:-1),i(),s(o.status()==="started"?12:-1),i(),s(o.status()==="finished"?13:-1),i(),s(o.status()==="aborted"?14:-1),i(2),g(o.messageLog()))},dependencies:[R,B,O,N],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;padding:2.5rem;gap:1.25rem}code[_ngcontent-%COMP%]{background-color:var(--grey-800);color:var(--grey-100);padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{D as default};
@@ -1 +1 @@
1
- import{i as a,j as b}from"./chunk-7I3L3TYU.js";import"./chunk-6DHAM3ZG.js";import"./chunk-Q5EMYWV3.js";import"./chunk-DNHLTHLR.js";import"./chunk-6CRYB4HA.js";import"./chunk-22GS6UCG.js";import"./chunk-Z5NZYMJN.js";import"./chunk-UJWW7PS7.js";import"./chunk-KJ4O6F3R.js";import"./chunk-ETEYALHD.js";import"./chunk-TS4YY2WO.js";import"./chunk-TLVMA6DU.js";import"./chunk-6LUM2XU4.js";import"./chunk-3WKDD2IN.js";import"./chunk-Q3JJWGXW.js";import"./chunk-C6Q5SG76.js";export{a as createOptionsForm,b as default};
1
+ import{i as a,j as b}from"./chunk-Z43CKK5H.js";import"./chunk-KYQC46J2.js";import"./chunk-CAGBL2MP.js";import"./chunk-DNHLTHLR.js";import"./chunk-6CRYB4HA.js";import"./chunk-22GS6UCG.js";import"./chunk-Z5NZYMJN.js";import"./chunk-UJWW7PS7.js";import"./chunk-KJ4O6F3R.js";import"./chunk-ETEYALHD.js";import"./chunk-TS4YY2WO.js";import"./chunk-NQVULKI2.js";import"./chunk-6LUM2XU4.js";import"./chunk-3WKDD2IN.js";import"./chunk-Q3JJWGXW.js";import"./chunk-C6Q5SG76.js";export{a as createOptionsForm,b as default};
@@ -0,0 +1 @@
1
+ import{b as u}from"./chunk-KJ4O6F3R.js";import{c as h}from"./chunk-ETEYALHD.js";import{D as r,F as g,P as c,T as o,Z as a,d as f,g as p,va as i}from"./chunk-Q3JJWGXW.js";var l=class t{#i=i(null);#t=window.self!==window.top;#s=i(this.#t);relayIsEnabled=this.#s.asReadonly();config=this.#i.asReadonly();configLoaded=this.#t?new p:null;isLoading=i(this.#t);parentIframeListner=null;parentOrigin="*";fetchConfig(){this.#n(),this.#t&&(this.#s.set(!0),this.parentIframeListner=new AbortController,this.#e("connected"),window.addEventListener("message",e=>{if(e.data.startsWith("access:")){let s=e.data.replace("access:",""),n=JSON.parse(s);if(!n?.accessToken||!n?.clientId){this.#e("error:invalid-config"),this.#s.set(!1);return}if(typeof n.clientId!="string"){this.#e("error:invalid-config"),this.#s.set(!1);return}if(typeof n.accessToken!="string"){this.#e("error:invalid-config"),this.#s.set(!1);return}console.info("postMessage config set"),this.#i.set(n),this.configLoaded?.next(!0),this.isLoading.set(!1),this.#e("handshake-complete")}},{signal:this.parentIframeListner.signal}))}#e(e){window.parent.postMessage(e,"*")}#n(){this.parentIframeListner&&(this.parentIframeListner.abort(),this.parentIframeListner=null)}setConfig(e){this.#i.set(e)}clearConfig(){this.#i.set(null)}static \u0275fac=function(s){return new(s||t)};static \u0275prov=o({token:t,factory:t.\u0275fac,providedIn:"root"})};var d="dummytoken",m=class t{#i=a(h);#t=a(u);#s=a(l);#e=i(null);#n=i(!1);token=this.#e.asReadonly();isLoggingOut=this.#n.asReadonly();login(e){return this.#t.postApiV1AuthLogin({requestBody:{Password:e,RememberMe:!0}}).pipe(r(1),c(s=>this.#e.set(s.AccessToken??null)))}refreshToken(){return this.#s.relayIsEnabled()?(this.#e.set(d),new f(e=>{e.next({AccessToken:d}),e.complete()})):this.#t.postApiV1AuthRefresh().pipe(r(1),c(e=>this.#e.set(e.AccessToken??null)))}logout(){this.#n.set(!0),this.#t.postApiV1AuthRefreshLogout().pipe(r(1),g(()=>{this.#n.set(!1),this.#e.set(null),this.#i.navigate(["/login"])})).subscribe()}static \u0275fac=function(s){return new(s||t)};static \u0275prov=o({token:t,factory:t.\u0275fac,providedIn:"root"})};export{l as a,m as b};
@@ -1,2 +1,2 @@
1
- import{b as K}from"./chunk-6CRYB4HA.js";import{b as X}from"./chunk-KJ4O6F3R.js";import{a as z,d as J,g as q}from"./chunk-TLVMA6DU.js";import"./chunk-6LUM2XU4.js";import"./chunk-3WKDD2IN.js";import{Ab as P,Bb as R,Cb as i,Db as a,Eb as g,Ib as u,Ob as A,Oc as W,Pb as D,Qa as E,Qb as y,Sa as l,Ub as S,Vb as f,Yb as w,Z as v,ea as d,eb as h,fa as _,hc as c,ic as C,jc as I,kb as k,kc as N,mc as $,nc as B,oc as V,pc as U,q as T,tb as F,tc as G,va as m,yb as x,zb as M}from"./chunk-Q3JJWGXW.js";import{a as b,b as O}from"./chunk-C6Q5SG76.js";var j=()=>({maxWidth:"700px",width:"100%"});function H(s,t){if(s&1&&(i(0,"a",9)(1,"spk-icon"),c(2,"link"),a()()),s&2){let e=f().$implicit;w("href",e.Url,E)}}function Q(s,t){if(s&1){let e=u();i(0,"div",2)(1,"h4"),c(2),k(3,H,3,1,"a",9),a(),i(4,"p"),c(5),g(6,"br"),i(7,"i"),c(8),a()(),i(9,"div",10)(10,"button",11),S("click",function(){let o=d(e).$implicit,r=f();return _(r.openLicense(o))}),A(11,1),g(12,"spk-icon"),D(),a()()()}if(s&2){let e=t.$implicit;l(2),N(" ",e.Title," - ",e.data==null?null:e.data.license," "),l(),x(e.Url?3:-1),l(2),I(" ",e.data==null?null:e.data.description," "),l(3),C(e.data==null?null:e.data.notes)}}var L=class s{#e=v(X);licenses=K(this.#e.getApiV1Licenses().pipe(T(t=>t.map(e=>O(b({},e),{data:e.Jsondata?JSON.parse(e.Jsondata):null})))));dialogIsOpen=m(!1);dialogLicense=m(null);#t=W(()=>{this.dialogLicense()&&this.dialogIsOpen.set(!0)});openLicense(t){this.dialogLicense.set(t)}closeLicense(){this.dialogIsOpen.set(!1),this.dialogLicense.set(null)}breakIntoLines(t){let e=t.split(`
1
+ import{b as K}from"./chunk-6CRYB4HA.js";import{b as X}from"./chunk-KJ4O6F3R.js";import{a as z,d as J,g as q}from"./chunk-NQVULKI2.js";import"./chunk-6LUM2XU4.js";import"./chunk-3WKDD2IN.js";import{Ab as P,Bb as R,Cb as i,Db as a,Eb as g,Ib as u,Ob as A,Oc as W,Pb as D,Qa as E,Qb as y,Sa as l,Ub as S,Vb as f,Yb as w,Z as v,ea as d,eb as h,fa as _,hc as c,ic as C,jc as I,kb as k,kc as N,mc as $,nc as B,oc as V,pc as U,q as T,tb as F,tc as G,va as m,yb as x,zb as M}from"./chunk-Q3JJWGXW.js";import{a as b,b as O}from"./chunk-C6Q5SG76.js";var j=()=>({maxWidth:"700px",width:"100%"});function H(s,t){if(s&1&&(i(0,"a",9)(1,"spk-icon"),c(2,"link"),a()()),s&2){let e=f().$implicit;w("href",e.Url,E)}}function Q(s,t){if(s&1){let e=u();i(0,"div",2)(1,"h4"),c(2),k(3,H,3,1,"a",9),a(),i(4,"p"),c(5),g(6,"br"),i(7,"i"),c(8),a()(),i(9,"div",10)(10,"button",11),S("click",function(){let o=d(e).$implicit,r=f();return _(r.openLicense(o))}),A(11,1),g(12,"spk-icon"),D(),a()()()}if(s&2){let e=t.$implicit;l(2),N(" ",e.Title," - ",e.data==null?null:e.data.license," "),l(),x(e.Url?3:-1),l(2),I(" ",e.data==null?null:e.data.description," "),l(3),C(e.data==null?null:e.data.notes)}}var L=class s{#e=v(X);licenses=K(this.#e.getApiV1Licenses().pipe(T(t=>t.map(e=>O(b({},e),{data:e.Jsondata?JSON.parse(e.Jsondata):null})))));dialogIsOpen=m(!1);dialogLicense=m(null);#t=W(()=>{this.dialogLicense()&&this.dialogIsOpen.set(!0)});openLicense(t){this.dialogLicense.set(t)}closeLicense(){this.dialogIsOpen.set(!1),this.dialogLicense.set(null)}breakIntoLines(t){let e=t.split(`
2
2
  `),n="";for(let o=0;o<e.length;o++)n+=`<li>${e[o]}</li>`;return n}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=h({type:s,selectors:[["app-libraries"]],decls:15,vars:5,consts:()=>{let t;t=$localize`Libraries`;let e;return e=$localize` Details ${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-square-in${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[t,e,[1,"license"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],[1,"license-dialog"],["footer",""],["spk-button","","type","button",3,"click"],[3,"href"],[1,"actions"],["spk-button","",3,"click"]]},template:function(e,n){if(e&1){let o=u();i(0,"h3"),y(1,0),a(),P(2,Q,13,5,"div",2,M),i(4,"spk-dialog",3),V("isOpenChange",function(p){return d(o),B(n.dialogIsOpen,p)||(n.dialogIsOpen=p),_(p)}),i(5,"header",4)(6,"h3"),c(7),a()(),i(8,"div",5),U(9),i(10,"div",6),c(11),a()(),i(12,"footer",7)(13,"button",8),S("click",function(){return d(o),_(n.dialogLicense.set(null))}),c(14,"Close"),a()()()}if(e&2){let o,r;l(2),R(n.licenses()),l(2),$("isOpen",n.dialogIsOpen),F("options",G(4,j)),l(3),C((o=n.dialogLicense())==null?null:o.Title);let p=(r=(r=n.dialogLicense())==null?null:r.License)!==null&&r!==void 0?r:"";l(4),I(" ",p," ")}},dependencies:[z,q,J],styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}h4[_ngcontent-%COMP%]{font:var(--paragraph-10)}a[_ngcontent-%COMP%]{text-decoration:none}.license[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-level-40);display:flex;flex-direction:column;align-items:flex-start;gap:.5rem}.license[_ngcontent-%COMP%]:first-of-type{border-top:1px solid var(--base-level-40)}.license[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.25rem;align-items:center}.license-dialog[_ngcontent-%COMP%]{background-color:var(--base-level-10);color:var(--base-level-70);padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;max-height:31.25rem;white-space:pre;border:1px solid var(--base-level-40)}"],changeDetection:0})};export{L as default};
@@ -1 +1 @@
1
- import{b as A}from"./chunk-6CRYB4HA.js";import{b as S}from"./chunk-KJ4O6F3R.js";import{c as M}from"./chunk-TS4YY2WO.js";import{o as P}from"./chunk-TLVMA6DU.js";import"./chunk-6LUM2XU4.js";import"./chunk-3WKDD2IN.js";import{Cb as i,Db as r,Eb as _,F as p,Qb as C,Sa as c,Z as o,eb as g,hc as u,ic as E,kb as d,q as l,va as m,yb as f}from"./chunk-Q3JJWGXW.js";import"./chunk-C6Q5SG76.js";function G(t,e){t&1&&_(0,"spk-progress-bar",1)}var a=class t{#n=o(M);#e=o(S);isLoading=m(!0);generalInfo=A(this.#e.getApiV1Acknowledgements().pipe(l(e=>e.Acknowledgements),p(()=>this.isLoading.set(!1))));static \u0275fac=function(n){return new(n||t)};static \u0275cmp=g({type:t,selectors:[["app-general"]],decls:6,vars:2,consts:()=>{let e;return e=$localize`General`,[e,[1,"indeterminate","primary"]]},template:function(n,s){n&1&&(d(0,G,1,0,"spk-progress-bar",1),i(1,"section")(2,"h3"),C(3,0),r(),i(4,"div"),u(5),r()()),n&2&&(f(s.isLoading()?0:-1),c(5),E(s.generalInfo()))},dependencies:[P],styles:["[_nghost-%COMP%]{display:block;position:relative}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}section[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{white-space:pre-wrap}spk-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}"],changeDetection:0})};export{a as default};
1
+ import{b as A}from"./chunk-6CRYB4HA.js";import{b as S}from"./chunk-KJ4O6F3R.js";import{c as M}from"./chunk-TS4YY2WO.js";import{o as P}from"./chunk-NQVULKI2.js";import"./chunk-6LUM2XU4.js";import"./chunk-3WKDD2IN.js";import{Cb as i,Db as r,Eb as _,F as p,Qb as C,Sa as c,Z as o,eb as g,hc as u,ic as E,kb as d,q as l,va as m,yb as f}from"./chunk-Q3JJWGXW.js";import"./chunk-C6Q5SG76.js";function G(t,e){t&1&&_(0,"spk-progress-bar",1)}var a=class t{#n=o(M);#e=o(S);isLoading=m(!0);generalInfo=A(this.#e.getApiV1Acknowledgements().pipe(l(e=>e.Acknowledgements),p(()=>this.isLoading.set(!1))));static \u0275fac=function(n){return new(n||t)};static \u0275cmp=g({type:t,selectors:[["app-general"]],decls:6,vars:2,consts:()=>{let e;return e=$localize`General`,[e,[1,"indeterminate","primary"]]},template:function(n,s){n&1&&(d(0,G,1,0,"spk-progress-bar",1),i(1,"section")(2,"h3"),C(3,0),r(),i(4,"div"),u(5),r()()),n&2&&(f(s.isLoading()?0:-1),c(5),E(s.generalInfo()))},dependencies:[P],styles:["[_nghost-%COMP%]{display:block;position:relative}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}section[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{white-space:pre-wrap}spk-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}"],changeDetection:0})};export{a as default};