@duplicati/ngclient 0.0.21 → 0.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/spk.woff2 +0 -0
- package/chunk-22ZYSOTR.js +1 -0
- package/chunk-37USSSCL.js +1 -0
- package/{chunk-ICX4A35N.js → chunk-3ZEBM2Q6.js} +1 -1
- package/{chunk-6FMOBX4W.js → chunk-4EODC7AQ.js} +1 -1
- package/{chunk-DUEP5NWI.js → chunk-5AC7O5ME.js} +1 -1
- package/{chunk-QILG6324.js → chunk-6GOAPINI.js} +1 -1
- package/chunk-6RIA76HG.js +1 -0
- package/chunk-73UOOUBD.js +1 -0
- package/{chunk-OLR3NLBF.js → chunk-AIWAOXTQ.js} +1 -1
- package/{chunk-HQEL6ET4.js → chunk-BHQV6I5A.js} +1 -1
- package/chunk-C6XNKGG2.js +1 -0
- package/{chunk-THXSJ5EB.js → chunk-CLHK3WG3.js} +1 -1
- package/{chunk-VCWCJ6GK.js → chunk-CLPPNSLN.js} +1 -1
- package/{chunk-4UMXA6ZN.js → chunk-EEZT434V.js} +2 -2
- package/chunk-EZH4RUS3.js +1 -0
- package/chunk-FRD2BVV6.js +6 -0
- package/chunk-GQQ7YXKJ.js +1 -0
- package/{chunk-24SCDXOT.js → chunk-ICNC6KVB.js} +1 -1
- package/chunk-IEVRQDB6.js +1 -0
- package/{chunk-EE44D7EI.js → chunk-IXLTPP72.js} +1 -1
- package/{chunk-XG5WW7WW.js → chunk-JNQHJPEL.js} +1 -1
- package/chunk-LFGIPWCL.js +1 -0
- package/chunk-LZSE733H.js +1 -0
- package/{chunk-ZHM55NRD.js → chunk-N6REZCKW.js} +1 -1
- package/chunk-ORCLDJSO.js +1 -0
- package/{chunk-HAGEM2KU.js → chunk-OVWWCW76.js} +1 -1
- package/{chunk-ETZPVGXX.js → chunk-PFVXGEM7.js} +1 -1
- package/{chunk-I62MTURC.js → chunk-Q76L4VLC.js} +1 -1
- package/chunk-QHJTF3V4.js +8 -0
- package/chunk-RWFWLGB7.js +1 -0
- package/chunk-SFRGISK2.js +1 -0
- package/{chunk-EC4YV54D.js → chunk-TKY4PPEK.js} +1 -1
- package/chunk-UVFVZQCU.js +1 -0
- package/{chunk-ZCCVAPLP.js → chunk-VC4GI7EV.js} +1 -1
- package/{chunk-AE4UH7UP.js → chunk-VOS5UL4W.js} +1 -1
- package/chunk-VUEDXCG5.js +1 -0
- package/{chunk-XWP5J7FY.js → chunk-WSTPDNCJ.js} +1 -1
- package/chunk-X53IGCHF.js +1 -0
- package/{chunk-XX4XT5RQ.js → chunk-XDYHN4IQ.js} +1 -1
- package/{chunk-SCOHUUYQ.js → chunk-XGBLG5PU.js} +1 -1
- package/{chunk-D3SNAEYH.js → chunk-Z7GRCDAT.js} +1 -1
- package/chunk-ZPJ6YV7Y.js +1 -0
- package/chunk-ZSOWH34L.js +1 -0
- package/index.html +2 -2
- package/main-KQJXLVHZ.js +1 -0
- package/package.json +1 -1
- package/{styles-EYLEETOZ.css → styles-LL6J7JBI.css} +1 -1
- package/chunk-3ZII4VBA.js +0 -1
- package/chunk-4I2FZHFA.js +0 -1
- package/chunk-5P5MCIGV.js +0 -1
- package/chunk-5XTTHY4J.js +0 -1
- package/chunk-72GO2ZEM.js +0 -1
- package/chunk-APGFOGYB.js +0 -1
- package/chunk-AT2YMZPR.js +0 -1
- package/chunk-BGMX7SZ6.js +0 -1
- package/chunk-CBPKRHET.js +0 -1
- package/chunk-HK24NYRP.js +0 -1
- package/chunk-KOIUHATU.js +0 -1
- package/chunk-M6XAG6QD.js +0 -1
- package/chunk-NN4VOZJP.js +0 -1
- package/chunk-NUWA7AOR.js +0 -8
- package/chunk-PB775LH4.js +0 -1
- package/chunk-PJY2UW7Y.js +0 -1
- package/chunk-S4TH7BUT.js +0 -1
- package/chunk-VLYQWE2X.js +0 -1
- package/chunk-WIE3F2D2.js +0 -1
- package/chunk-ZMHOWC7A.js +0 -1
- package/main-WNZU6MTP.js +0 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{a as Ae,b as Fe}from"./chunk-ZSOWH34L.js";import{a as Je}from"./chunk-SFRGISK2.js";import{a as dt,b as Rt}from"./chunk-DNHLTHLR.js";import{b as M}from"./chunk-N6REZCKW.js";import{a as xe,b as ne,c as _e,d as ie,e as oe,f as Nt,g as re,h as we,j as Pt,k as ae,l as Se,m as It,n as le,o as se,p as pe,q as H,s as me}from"./chunk-73UOOUBD.js";import{a as ce,b as Xe,d as Gt,e as Mt,g as ke,i as et,k as de,m as tt,n as At,p as nt,q as ue,t as ve,u as Me}from"./chunk-IEVRQDB6.js";import{a as te,c as W}from"./chunk-22ZYSOTR.js";import{a as Ge}from"./chunk-LZSE733H.js";import{Db as J,E as Le,Eb as X,Fb as ee,Gb as l,Hb as I,Ib as k,Jb as vt,Kb as Ft,Lb as bt,Mb as Tt,Oa as s,Ob as q,Pb as Vt,Q as ye,Qb as De,Rb as Dt,Sb as ze,Ua as S,Va as Z,W as x,Wb as Ye,Y as j,ab as d,cb as c,eb as fe,ec as G,ga as h,gc as Ot,ha as y,hb as _,ib as V,jb as D,kb as O,la as wt,lb as r,mb as o,nb as u,ob as F,p as He,pb as b,qb as Ve,qc as Ze,rb as v,sa as St,sb as C,ta as kt,tb as p,wb as N,xb as P,yb as E,zc as Et}from"./chunk-QHJTF3V4.js";import{a as U,c as xt}from"./chunk-7CGTOI24.js";function Wt(t,i){if(t&1&&(r(0,"p"),l(1),o()),t&2){let e=p();s(),I(e._data().message)}}var Kt={title:"Are you sure?",confirmText:"Confirm",cancelText:"Cancel"},Oe=class t{data=kt();_data=G(()=>U(U({},Kt),this.data()));closed=St();close(i="confirm"){this.closed.emit(i==="confirm")}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=j({type:t,selectors:[["app-confirm-dialog"]],inputs:{data:[1,"data"]},outputs:{closed:"closed"},standalone:!0,features:[q],decls:10,vars:4,consts:[["header",""],["content",""],["footer",""],["spk-button","",1,"",3,"click"],["spk-button","",1,"raised","primary",3,"click"]],template:function(e,n){e&1&&(r(0,"header",0)(1,"h3"),l(2),o()(),r(3,"div",1),d(4,Wt,2,1,"p"),o(),r(5,"footer",2)(6,"button",3),C("click",function(){return n.close("cancel")}),l(7),o(),r(8,"button",4),C("click",function(){return n.close("confirm")}),l(9),o()()),e&2&&(s(2),I(n._data().title),s(2),_(n._data().message?4:-1),s(3),I(n._data().cancelText),s(2),I(n._data().confirmText))},styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})};var it=class t{fromString(i){if(!i)return null;let e=i.match(/(\d+)([smhDWMY])/);return e&&{value:parseInt(e[1]),unit:e[2]}}toString(i,e){return`${i}${e}`}static \u0275fac=function(e){return new(e||t)};static \u0275prov=ye({token:t,factory:t.\u0275fac,providedIn:"root"})};var Ee=class t{#e=x(Ge);s3Providers=M(this.getS3Config("Providers"));s3Regions=M(this.getS3Config("Regions"));s3RegionHosts=M(this.getS3Config("RegionHosts"));s3StorageClasses=M(this.getS3Config("StorageClasses"));storjSatellites=M(this.getStorjConfig("Satellites"));storjAuthenticationMethods=M(this.getStorjConfig("AuthenticationMethods"));openstackProviders=M(this.getOpenstackConfig("Providers"));openstackVersions=M(this.getOpenstackConfig("Versions"));gcsLocations=M(this.getGcsConfig("Locations"));gcsStorageClasses=M(this.getGcsConfig("StorageClasses"));getS3Config(i){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":i}}).pipe(He(e=>this.#n(e)))}createS3IamUser(i,e){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":i,"s3-password":e}})}createS3PolicyIAM(i){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"GetPolicyDoc",path:i}})}getStorjConfig(i){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"storj-getconfig",requestBody:{"storj-config":i}}).pipe(He(e=>this.#n(e)))}getOpenstackConfig(i){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":i}}).pipe(He(e=>this.#n(e)))}getGcsConfig(i){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":i}}).pipe(He(e=>this.#n(e)))}#n(i){return(i.Result&&typeof i.Result=="object"&&Object.entries(i.Result).map(([e,n])=>({key:e,value:n})))??[]}static \u0275fac=function(e){return new(e||t)};static \u0275prov=ye({token:t,factory:t.\u0275fac,providedIn:"root"})};var be=new H,qe={file:{customFields:{path:{type:"FolderTree",name:"path",shortDescription:"File path",longDescription:"The path to store the backup",formElement:t=>be.control(t??"")}}},ssh:{customFields:{server:{type:"String",name:"server",shortDescription:"Server",longDescription:"The server to connect to",formElement:t=>be.control(t??"")},port:{type:"Integer",name:"port",shortDescription:"Port",longDescription:"The port to connect to",formElement:t=>be.control(t??"",[_e.required,_e.max(65535)])},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:t=>be.control(t??"")}},dynamicFields:["auth-username"],advancedFields:[{type:"FileTree",name:"ssh-keyfile",accepts:".key,",shortDescription:"This is a path to a private key file locally on the machine",longDescription:"This is a path to a private key file locally on the machine"}]},s3:{customFields:{bucket:{type:"String",name:"bucket",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:t=>be.control(t??"")},path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:t=>be.control(t??"")}},dynamicFields:[{name:"s3-server-name",shortDescription:"Server",type:"NonValidatedSelectableString",loadOptions:t=>t.get(Ee).s3Providers},"use-ssl","auth-username","auth-password"],advancedFields:[{name:"s3-client",type:"Enumeration",options:["aws","minio"]},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:t=>t.get(Ee).s3StorageClasses}]},gcs:{oauthField:"authid",customFields:{path:{type:"Path",name:"path",shortDescription:"Bucket name",longDescription:"Bucket name",formElement:t=>be.control(t??"")}},dynamicFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:t=>t.get(Ee).gcsLocations},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:t=>t.get(Ee).gcsStorageClasses},"authid"]},googledrive:{oauthField:"authid",customFields:{path:{type:"Path",name:"path",shortDescription:"Folder path",longDescription:"Folder path",formElement:t=>be.control(t??"")}},dynamicFields:["authid"]}};function Re(t,i){let e={},n={};return i.searchParams.forEach((a,m)=>{qe[t].dynamicFields?.includes(m)?n[m]=decodeURIComponent(a):e[m]=decodeURIComponent(a)}),{advanced:e,dynamic:n}}function We(t){let i=t.map(([e,n])=>`${e}=${n?encodeURIComponent(n.toString()):""}`).join("&");return i?"?"+i:""}var $e={file:{to:t=>{let i=We([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${t.custom.path}${i}`},from:(t,i,e)=>{let n=e.indexOf("file:///")===0,a=e.split(n?"///":"//")[1].substring(0,1)+i.hostname.substring(1);return U({destinationType:t,custom:{path:`${n?"/":""}${a}${i.pathname}`}},Re(t,i))}},ssh:{to:t=>{let i=We([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${t.custom.server}${t.custom.port?":"+t.custom.port:""}${t.custom.path.startsWith("/")?t.custom.path:"/"+t.custom.path}${i}`},from:(t,i,e)=>U({destinationType:t,custom:{server:i.hostname,port:i.port,path:i.pathname}},Re(t,i))},s3:{to:t=>{let i=We([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${t.custom.bucket}${t.custom.path.startsWith("/")?t.custom.path:"/"+t.custom.path}${i}`},from:(t,i,e)=>U({destinationType:t,custom:{path:i.pathname,bucket:i.hostname}},Re(t,i))},gcs:{to:t=>{let i=We([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${t.custom.path}${i}`},from:(t,i,e)=>{let{advanced:n,dynamic:a}=Re(t,i);return{destinationType:t,custom:{path:i.hostname+i.pathname},dynamic:a,advanced:n}}},googledrive:{to:t=>{let i=t.custom.path,e=We([...Object.entries(t.advanced),...Object.entries(t.dynamic)]);return`${t.destinationType}://${i}${e}`},from:(t,i,e)=>{let{advanced:n,dynamic:a}=Re(t,i);return{destinationType:t,custom:{path:i.hostname+i.pathname},dynamic:a,advanced:n}}},fallbackMapper:{to:t=>"",from:(t,i,e)=>U({destinationType:t},Re(t,i))}};function ot(t){let i=t.destinationType;return!i||!$e.hasOwnProperty(i)?$e.fallbackMapper.to(t)??"":$e[i].to(t)??""}function ut(t){let i=URL.canParse(t),e=t.split("://")[0],n="http://"+t.split("://")[1],a=new URL(n);if(!$e.hasOwnProperty(e))return $e.fallbackMapper.from(e,a);if(!i)throw new Error("Invalid target path");return $e[e].from(e,a,t)}var $t=/[a-zA-Z0-9_\-\+\.!@#$%^&*?_~()-]/,rt=class t{generate(i,e=$t){let n;do n=this.generatePassword(i,e);while(this.calculatePasswordStrength(n)<5);return n}generatePassword(i,e=$t){let n=this;return Array.apply(null,{length:i}).map(()=>{let a;for(;;)if(a=String.fromCharCode(n.#e()),e.test(a))return a},this).join("")}calculatePasswordStrength(i){let e=1;return i.length>=8&&e++,i.match(/[a-z]/)&&i.match(/[A-Z]/)&&e++,i.match(/\d+/)&&e++,i.match(/.[!,@,#,$,%,^,&,*,?,_,~,(,),-]/)&&e++,Math.min(e,5)}#e(){if(window.crypto&&window.crypto.getRandomValues){let i=new Uint8Array(1);return window.crypto.getRandomValues(i),i[0]}else if(window.msCrypto&&window.msCrypto.getRandomValues){let i=new Uint8Array(1);return window.msCrypto.getRandomValues(i),i[0]}else return Math.floor(Math.random()*256)}static \u0275fac=function(e){return new(e||t)};static \u0275prov=ye({token:t,factory:t.\u0275fac,providedIn:"root"})};var Qt=["formRef"];function Yt(t,i){if(t&1&&(r(0,"option",14),l(1),o()),t&2){let e=i.$implicit;c("value",e.Key),s(),I(e.DisplayName)}}function Zt(t,i){if(t&1&&u(0,"spk-progress-bar",25),t&2){let e=p(3);fe("warn",e.calculatePasswordStrength()===1)("tertiary",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),c("value",e.calculatePasswordStrength()*(100/5))}}function Jt(t,i){t&1&&(r(0,"span",20),l(1,"Passwords do not match"),o())}function Xt(t,i){t&1&&(r(0,"spk-icon"),l(1,"eye-slash"),o(),l(2," hide "))}function en(t,i){t&1&&(r(0,"spk-icon"),l(1,"eye"),o(),l(2," show "))}function tn(t,i){t&1&&(r(0,"spk-icon",27),l(1,"check"),o())}function nn(t,i){t&1&&(r(0,"spk-icon"),l(1,"copy"),o())}function on(t,i){if(t&1){let e=v();r(0,"button",26),C("click",function(){h(e);let a=p(3);return y(a.copyPassword())}),d(1,tn,2,0,"spk-icon",27)(2,nn,2,0,"spk-icon"),l(3),o()}if(t&2){let e=p(3);s(),_(e.copiedPassword()?1:2),s(2),k(" ",e.copiedPassword()?"Copied":"Copy"," password ")}}function rn(t,i){t&1&&(r(0,"spk-alert",24),l(1," Tip: Be sure to save your password. If you loose it you will lose access to your backups. "),o())}function an(t,i){if(t&1){let e=v();r(0,"div",15)(1,"spk-form-field")(2,"label",16),l(3," Create a password "),r(4,"sup"),l(5,"*"),o()(),u(6,"input",17),o(),d(7,Zt,1,9,"spk-progress-bar",18),r(8,"spk-form-field"),u(9,"input",19),d(10,Jt,2,0,"span",20),o(),r(11,"div",21)(12,"button",22),C("click",function(){h(e);let a=p(2);return y(a.showPassword.set(!a.showPassword()))}),d(13,Xt,3,0)(14,en,3,0),o(),r(15,"button",22),C("click",function(){h(e);let a=p(2);return y(a.generatePassword())}),r(16,"spk-icon"),l(17,"password"),o(),l(18," Generate password "),o(),d(19,on,4,2,"button",23),o(),d(20,rn,2,0,"spk-alert",24),o()}if(t&2){let e=p(2);s(6),c("type",e.showPassword()?"text":"password"),s(),_(e.generalForm.value.password?7:-1),s(2),c("type",e.showPassword()?"text":"password"),s(),_(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?10:-1),s(3),_(e.showPassword()?13:14),s(6),_(e.showCopyPassword()?19:-1),s(),_(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?20:-1)}}function ln(t,i){if(t&1&&(r(0,"spk-select",11)(1,"label",12),l(2,"Encryption"),o(),u(3,"input",13),D(4,Yt,2,2,"option",14,V),o(),d(6,an,21,7,"div",15)),t&2){let e=p();c("displayFn",e.displayFn()),s(4),O(e.encryptionOptions()),s(2),_(e.encryptionFieldSignal()!==""?6:-1)}}function sn(t,i){if(t&1&&(r(0,"button",9),l(1," Continue "),r(2,"spk-icon"),l(3,"arrow-right"),o()()),t&2){let e=p();c("disabled",e.generalForm.invalid)}}function pn(t,i){if(t&1&&(r(0,"spk-tooltip",10)(1,"button",9),l(2," Continue "),r(3,"spk-icon"),l(4,"arrow-right"),o()()()),t&2){let e=p();c("disabled",!(e.showCopyPassword()&&!e.copiedPassword())),s(),c("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var Be=new H,Bt=(t={name:"",description:"",encryption:"",password:"",repeatPassword:""})=>Be.group({name:Be.control(t.name,[_e.required]),description:Be.control(t.description),encryption:Be.control(t.encryption,[Rt()]),password:Be.control(t.password,[dt(i=>i?.value.encryption!=="",[_e.required])]),repeatPassword:Be.control(t.repeatPassword,[dt(i=>i?.value.encryption!=="",[_e.required])])}),_t={Key:"",DisplayName:"None"},ft=class t{#e=x(W);#n=x(te);#i=x(rt);#o=x(K);#t=x(Je);formRef=Z.required("formRef");generalForm=this.#o.generalForm;generalFormSignal=this.#o.generalFormSignal;encryptionFieldSignal=this.#o.encryptionFieldSignal;encryptionOptions=this.#o.encryptionOptions;isNew=this.#o.isNew;showPassword=S(!1);copiedPassword=S(!1);showCopyPassword=S(!1);encryptionEffect=Ot(()=>{let i=this.encryptionFieldSignal();console.log(i===""),i===""&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))},{allowSignalWrites:!0});calculatePasswordStrength=G(()=>{let e=this.generalFormSignal()?.password??"";return this.#i.calculatePasswordStrength(e)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#o.exit()}async copyPassword(){let i=this.generalForm.controls.password.value;await this.#r(i??""),this.copiedPassword.set(!0)}async#r(i){try{await navigator.clipboard.writeText(i)}catch{try{let n=document.createElement("textarea");n.value=i,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}catch(n){console.error("Failed to copy text: ",n)}}}displayFn(){let i=this.#t.systemInfo()?.EncryptionModules??[];return e=>{let n=[_t,...i].find(a=>a.Key===e);return n?`${n.DisplayName}`:""}}generatePassword(){this.copiedPassword.set(!1);let i=this.#i.generate(16);this.generalForm.controls.password.setValue(i),this.generalForm.controls.repeatPassword.setValue(i),this.showCopyPassword.set(!0)}next(){this.#e.navigate(["destination"],{relativeTo:this.#n.parent})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=j({type:t,selectors:[["app-general"]],viewQuery:function(e,n){e&1&&J(n.formRef,Qt,5),e&2&&X()},standalone:!0,features:[q],decls:22,vars:3,consts:[["formRef",""],["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],["for","backupName"],["type","text","tabindex","1","placeholder","Your backup name","formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder","Your backup description","formControlName","description"],[1,"form-actions"],["type","button","spk-button","",3,"click"],["spk-button","","type","submit",1,"raised","primary",3,"disabled"],["message","Remember to copy the password",1,"primary",3,"disabled"],[3,"displayFn"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder","Encryption","formControlName","encryption"],[3,"value"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder","Password","formControlName","password",3,"type"],[1,"raised",3,"warn","tertiary","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder","Repeat password","formControlName","repeatPassword",3,"type"],["error",""],[1,"password-actions"],["spk-button","","type","button",1,"small",3,"click"],["spk-button","","type","button",1,"small","copy"],["type","primary"],[1,"raised",3,"value"],["spk-button","","type","button",1,"small","copy",3,"click"],[1,"spk-success"]],template:function(e,n){if(e&1){let a=v();r(0,"form",1,0),C("submit",function(){return h(a),y(n.next())}),r(2,"h3",2),l(3,"General backup settings"),o(),r(4,"spk-form-field")(5,"label",3),l(6," Backup name "),r(7,"sup"),l(8,"*"),o()(),u(9,"input",4),o(),r(10,"spk-form-field")(11,"label",5),l(12,"Backup description"),o(),u(13,"textarea",6),o(),d(14,ln,7,2),r(15,"div",7)(16,"button",8),C("click",function(){return h(a),y(n.exit())}),r(17,"spk-icon"),l(18,"arrow-left"),o(),l(19," Exit "),o(),d(20,sn,4,1,"button",9)(21,pn,5,2,"spk-tooltip",10),o()()}e&2&&(c("formGroup",n.generalForm),s(14),_(n.isNew()?14:-1),s(6),_(n.encryptionFieldSignal()===""?20:21))},dependencies:[me,re,se,pe,ne,ie,oe,ae,le,de,ue,ke,ce,At,Xe,Me],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}sup[_ngcontent-%COMP%]{padding:0 .125rem;color:var(--warn-500)}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.copy[_ngcontent-%COMP%] spk-icon.spk-success[_ngcontent-%COMP%]{color:var(--success-500)}"],changeDetection:0})};var mn=["formRef"],cn=(t,i)=>({index:t,formView:i,formGroupName:"advancedOptions",destinationType:null,oauthField:null}),dn=t=>({$implicit:t});function un(t,i){if(t&1&&(r(0,"option",11),l(1),o()),t&2){let e=i.$implicit;c("value",e),s(),I(e)}}function fn(t,i){if(t&1&&(r(0,"option",11),l(1),o()),t&2){let e=i.$implicit;c("value",e.value),s(),I(e.name)}}function _n(t,i){if(t&1){let e=v();r(0,"button",23,2),C("click",function(){let a=h(e).$implicit,m=p();return y(m.addNewOption(a))}),l(2),o()}if(t&2){let e=i.$implicit;s(2),I(e.name)}}function gn(t,i){t&1&&Ve(0)}function Cn(t,i){if(t&1&&d(0,gn,1,0,"ng-container",24),t&2){let e=i.$implicit,n=i.$index;p();let a=ee(39);c("ngTemplateOutlet",a)("ngTemplateOutletContext",De(5,dn,Dt(2,cn,n,e)))}}function hn(t,i){if(t&1&&(r(0,"spk-tooltip",34)(1,"spk-icon"),l(2,"question"),o()()),t&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function yn(t,i){if(t&1&&(r(0,"app-file-tree",27)(1,"label",33),l(2),d(3,hn,3,1,"spk-tooltip",34),o(),u(4,"input",35),o()),t&2){let e,n=p().$implicit,a=p();c("startingPath",a.getFormFieldValue(0,n.formGroupName,n.formView.name))("accepts",n.formView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),s(),P("for","destination-",n.formGroupName,"-",n.index,""),s(),k(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),s(),_(n.formView.longDescription?3:-1),s(),P("id","destination-",n.formGroupName,"-",n.index,""),N("formControlName",n.formView.name)}}function xn(t,i){if(t&1&&(r(0,"spk-tooltip",34)(1,"spk-icon"),l(2,"question"),o()()),t&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function wn(t,i){if(t&1&&(r(0,"app-file-tree",28)(1,"label",33),l(2),d(3,xn,3,1,"spk-tooltip",34),o(),u(4,"input",35),o()),t&2){let e,n=p().$implicit,a=p();c("startingPath",a.getFormFieldValue(0,n.formGroupName,n.formView.name)),s(),P("for","destination-",n.formGroupName,"-",n.index,""),s(),k(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),s(),_(n.formView.longDescription?3:-1),s(),P("id","destination-",n.formGroupName,"-",n.index,""),N("formControlName",n.formView.name)}}function Sn(t,i){if(t&1&&(r(0,"spk-tooltip",34)(1,"spk-icon"),l(2,"question"),o()()),t&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function kn(t,i){t&1&&(r(0,"spk-icon",36),l(1,"link"),o())}function vn(t,i){t&1&&(r(0,"spk-icon",36),l(1,"textbox"),o())}function Fn(t,i){if(t&1&&(r(0,"spk-form-field")(1,"label",33),l(2),d(3,Sn,3,1,"spk-tooltip",34),o(),u(4,"input",35),d(5,kn,2,0,"spk-icon",36)(6,vn,2,0,"spk-icon",36),o()),t&2){let e,n=p().$implicit;s(),P("for","destination-",n.formGroupName,"-",n.index,""),s(),k(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),s(),_(n.formView.longDescription?3:-1),s(),P("id","destination-",n.formGroupName,"-",n.index,""),N("formControlName",n.formView.name),s(),_(n.formView.type==="Path"?5:6)}}function bn(t,i){if(t&1){let e=v();r(0,"span",40),C("click",function(){h(e);let a=p(2).$implicit,m=p();return y(m.oauthStartTokenCreation(a.formViewType))}),l(1,"AuthID"),o()}}function Tn(t,i){t&1&&(r(0,"spk-icon",36),l(1,"password"),o())}function Vn(t,i){if(t&1){let e=v();r(0,"spk-icon",41),C("click",function(){h(e);let a=p(2).$implicit;return y(a.formView.showPassword=!a.formView.showPassword)}),l(1," eye "),o()}}function Dn(t,i){if(t&1){let e=v();r(0,"spk-icon",41),C("click",function(){h(e);let a=p(2).$implicit;return y(a.formView.showPassword=!a.formView.showPassword)}),l(1," eye-slash "),o()}}function On(t,i){if(t&1&&(r(0,"spk-form-field")(1,"label",33),l(2),o(),u(3,"input",37),d(4,bn,2,0,"span",38)(5,Tn,2,0,"spk-icon",36)(6,Vn,2,0,"spk-icon",39)(7,Dn,2,0,"spk-icon",39),o()),t&2){let e,n=p().$implicit;s(),P("for","destination-",n.formGroupName,"-",n.index,""),s(),k(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),s(),P("id","destination-",n.formGroupName,"-",n.index,""),N("formControlName",n.formView.name),c("type",n.formView.showPassword?"text":"password"),s(),_(n.oauthField===n.formView.name?4:5),s(2),_(n.formView.showPassword?6:7)}}function En(t,i){if(t&1&&(r(0,"spk-tooltip",34)(1,"spk-icon"),l(2,"question"),o()()),t&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Nn(t,i){if(t&1&&(r(0,"option",11),l(1),o()),t&2){let e=i.$implicit;c("value",e),s(),I(e)}}function Pn(t,i){if(t&1&&(r(0,"spk-select")(1,"label",33),l(2),d(3,En,3,1,"spk-tooltip",34),o(),u(4,"input",42),F(5,10),D(6,Nn,2,2,"option",11,V),b(),o()),t&2){let e,n=p().$implicit;s(),P("for","destination-",n.formGroupName,"-",n.index,""),s(),k(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),s(),_(n.formView.longDescription?3:-1),s(),P("id","destination-",n.formGroupName,"-",n.index,""),N("formControlName",n.formView.name),s(2),O(n.formView.options)}}function In(t,i){if(t&1&&(r(0,"spk-tooltip",34)(1,"spk-icon"),l(2,"question"),o()()),t&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Gn(t,i){if(t&1&&(r(0,"option",11),l(1),o()),t&2){let e=i.$implicit;c("value",e),s(),I(e)}}function Mn(t,i){if(t&1&&(r(0,"div",29)(1,"label",33),l(2),d(3,In,3,1,"spk-tooltip",34),o(),r(4,"div",43)(5,"spk-form-field"),u(6,"input",44),r(7,"spk-icon",36),l(8,"resize"),o()(),r(9,"spk-select"),u(10,"label")(11,"input",45),F(12,10),D(13,Gn,2,2,"option",11,V),b(),o()()()),t&2){let e,n=p().$implicit,a=p();c("formGroupName",n.formView.name),s(),P("for","destination-",n.formGroupName,"-",n.index,""),s(),k(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),s(),_(n.formView.longDescription?3:-1),s(3),P("id","destination-",n.formGroupName,"-",n.index,""),s(7),O(a.sizeOptions())}}function An(t,i){if(t&1&&(r(0,"spk-tooltip",34)(1,"spk-icon"),l(2,"question"),o()()),t&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Rn(t,i){if(t&1&&(r(0,"spk-form-field")(1,"label",33),l(2),d(3,An,3,1,"spk-tooltip",34),o(),u(4,"input",46),r(5,"spk-icon",36),l(6,"numpad"),o()()),t&2){let e,n=p().$implicit;s(),P("for","destination-",n.formGroupName,"-",n.index,""),s(),k(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),s(),_(n.formView.longDescription?3:-1),s(),P("id","destination-",n.formGroupName,"-",n.index,""),N("formControlName",n.formView.name)}}function $n(t,i){if(t&1&&(r(0,"spk-tooltip",34)(1,"spk-icon"),l(2,"question"),o()()),t&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Bn(t,i){if(t&1&&(r(0,"spk-toggle",30)(1,"label",33),l(2),d(3,$n,3,1,"spk-tooltip",34),o(),u(4,"input",47),o()),t&2){let e,n=p().$implicit;s(),P("for","destination-",n.formGroupName,"-",n.index,""),s(),k(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),s(),_(n.formView.longDescription?3:-1),s(),P("id","destination-",n.formGroupName,"-",n.index,""),N("formControlName",n.formView.name)}}function Un(t,i){if(t&1&&(r(0,"spk-tooltip",34)(1,"spk-icon"),l(2,"question"),o()()),t&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Hn(t,i){t&1&&(r(0,"spk-option",49),l(1,"None"),o()),t&2&&c("value","None")}function Ln(t,i){if(t&1&&(r(0,"spk-option",11),l(1),u(2,"spk-checkbox",50),o()),t&2){let e=p().$implicit;c("value",e),s(),k(" ",e," ")}}function zn(t,i){if(t&1&&d(0,Hn,2,1,"spk-option",49)(1,Ln,3,2,"spk-option",11),t&2){let e=i.$implicit;_(e==="None"?0:1)}}function jn(t,i){if(t&1&&(r(0,"spk-select",31)(1,"label",33),l(2),d(3,Un,3,1,"spk-tooltip",34),o(),u(4,"input",48),F(5,10),D(6,zn,2,1,null,null,V),b(),o()),t&2){let e,n=p().$implicit;c("selectMultiple",!0),s(),P("for","destination-",n.formGroupName,"-",n.index,""),s(),k(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),s(),_(n.formView.longDescription?3:-1),s(),N("formControlName",n.formView.name),s(2),O(n.formView.options)}}function qn(t,i){if(t&1&&(r(0,"spk-tooltip",34)(1,"spk-icon"),l(2,"question"),o()()),t&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Wn(t,i){if(t&1&&(r(0,"spk-form-field")(1,"label",33),l(2),d(3,qn,3,1,"spk-tooltip",34),o(),u(4,"input",35),o()),t&2){let e,n=p().$implicit;s(),P("for","destination-",n.formGroupName,"-",n.index,""),s(),k(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),s(),_(n.formView.longDescription?3:-1),s(),P("id","destination-",n.formGroupName,"-",n.index,""),N("formControlName",n.formView.name)}}function Kn(t,i){if(t&1){let e=v();r(0,"div",25),F(1,26),d(2,yn,5,14,"app-file-tree",27)(3,wn,5,10,"app-file-tree",28)(4,Fn,7,10,"spk-form-field")(5,On,8,11,"spk-form-field")(6,Pn,8,9,"spk-select")(7,Mn,15,9,"div",29)(8,Rn,7,9,"spk-form-field")(9,Bn,5,9,"spk-toggle",30)(10,jn,8,7,"spk-select",31)(11,Wn,5,9,"spk-form-field"),b(),r(12,"button",32),C("click",function(){let a=h(e).$implicit,m=p();return y(m.removeFormView(a.formView,0))}),r(13,"spk-icon"),l(14,"x-circle"),o()()()}if(t&2){let e=i.$implicit;s(),c("formGroupName",e.formGroupName),s(),_(e.formView.type==="FileTree"?2:e.formView.type==="FolderTree"?3:e.formView.type==="String"||e.formView.type==="Path"?4:e.formView.type==="Password"?5:e.formView.type==="Enumeration"?6:e.formView.type==="Size"?7:e.formView.type==="Integer"?8:e.formView.type==="Boolean"?9:e.formView.type==="Flags"?10:e.formView.type==="Timespan"?11:-1)}}var Ce=new H,Qn=["Bytes","KB","MB","GB","TB","PB"],Yn=[{value:"",name:"Keep all backups"},{value:"time",name:"Delete backups that are older than"},{value:"versions",name:"Keep a specific number of backups"},{value:"smart",name:"Smart backup retention"},{value:"custom",name:"Custom backup retention"}],Ut=(t={remoteVolumeSize:50,size:"MB",backupRetention:"",advancedOptions:[]})=>Ce.group({remoteVolumeSize:Ce.group({size:Ce.control(t.remoteVolumeSize),unit:Ce.control(t.size)}),backupRetention:Ce.control(t.backupRetention),advancedOptions:Ce.group({})}),nr=(t,i)=>Ce.group({name:Ce.control(t),value:Ce.control(i)}),gt=class t{#e=x(K);#n=x(W);#i=x(te);formRef=Z.required("formRef");optionsForm=this.#e.optionsForm;selectedOptions=this.#e.selectedOptions;nonSelectedOptions=this.#e.nonSelectedOptions;isSubmitting=this.#e.isSubmitting;sizeOptions=S(Qn);rentationOptions=S(Yn);oauthStartTokenCreation(i){}getFormFieldValue(i,e,n){return this.optionsForm.controls.advancedOptions.controls[n].value}removeFormView(i,e){this.#e.removeOptionFromFormGroup(i)}addNewOption(i){this.#e.addOptionToFormGroup(i)}retentionOptionDisplayFn(){let i=this.rentationOptions();return e=>{let n=i.find(a=>a.value===e);return n?n.name:""}}displayFn(){let i=this.#e.advancedOptions();return e=>{let n=i.find(a=>a.name===e);return n?`${n.name}`:""}}goBack(){this.#n.navigate(["schedule"],{relativeTo:this.#i.parent})}submit(){this.#e.submit()}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=j({type:t,selectors:[["app-options"]],viewQuery:function(e,n){e&1&&J(n.formRef,mn,5),e&2&&X()},standalone:!0,features:[q],decls:49,vars:5,consts:[["formRef",""],["fieldTemplate",""],["option",""],[3,"submit","formGroup"],[1,"title-30"],[1,"remote-volume-wrap"],["formGroupName","remoteVolumeSize",1,"row-inputs"],["for","size"],["type","number","id","size","formControlName","size"],["type","text","placeholder","Select an option...","formControlName","unit"],["options",""],[3,"value"],["href","#",1,"spk-primary"],[3,"displayFn"],["type","text","formControlName","backupRetention"],[3,"disallowToggle"],["title",""],["spk-button","","type","button",1,"outlined","small"],["menu",""],["type","button"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["type","button",3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"field-row"],[3,"formGroupName"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles"],[3,"startingPath"],[1,"form-column",3,"formGroupName"],[1,"primary","raised"],[1,"primary",3,"selectMultiple"],["spk-button","","type","button",1,"outlined",3,"click"],[3,"for"],[1,"primary",3,"message"],["type","text",3,"id","formControlName"],["prefix",""],["autocomplete","off",3,"type","id","formControlName"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],["type","search",3,"id","formControlName"],[1,"form-row"],["type","number","formControlName","size",3,"id"],["type","search","formControlName","unit"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],["type","text","id","text",3,"formControlName"],["deselect","",3,"value"],[1,"raised","primary"]],template:function(e,n){if(e&1){let a=v();r(0,"form",3,0),C("submit",function(){return h(a),y(n.submit())}),r(2,"h3",4),l(3,"Options"),o(),r(4,"div",5)(5,"div",6)(6,"spk-form-field")(7,"label",7),l(8,"Remote volume size"),o(),u(9,"input",8),o(),r(10,"spk-select"),u(11,"input",9),F(12,10),D(13,un,2,2,"option",11,V),b(),o()(),r(15,"p"),l(16," The backups will be split up into multiple files called volumes. Here you can set the maximum size of the individual volume files. "),r(17,"a",12),l(18,"Read more"),o()()(),r(19,"spk-select",13)(20,"label",7),l(21,"Backup retention"),o(),u(22,"input",14),D(23,fn,2,2,"option",11,V),o(),r(25,"app-toggle-card",15),F(26,16),l(27," Advanced options "),r(28,"spk-menu")(29,"button",17),l(30," Add advanced option "),r(31,"spk-icon"),l(32,"plus"),o()(),F(33,18),D(34,_n,3,1,"button",19,V),b(),o(),b(),D(36,Cn,1,7,"ng-container",null,V),o(),d(38,Kn,15,2,"ng-template",null,1,Ye),r(40,"div",20)(41,"button",21),C("click",function(){return h(a),y(n.goBack())}),r(42,"spk-icon"),l(43,"arrow-left"),o(),l(44," Go back "),o(),r(45,"button",22)(46,"spk-icon"),l(47,"arrow-right"),o(),l(48," Submit "),o()()()}e&2&&(c("formGroup",n.optionsForm),s(13),O(n.sizeOptions()),s(6),c("displayFn",n.retentionOptionDisplayFn()),s(4),O(n.rentationOptions()),s(2),c("disallowToggle",!0),s(9),O(n.nonSelectedOptions()),s(2),O(n.selectedOptions()),s(9),fe("loader",n.isSubmitting()))},dependencies:[me,re,se,pe,ne,we,xe,ie,oe,ae,le,Se,Ze,tt,ue,ke,ce,de,ve,et,nt,Me,Ae,Fe],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}.form-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 2.5rem;gap:.5rem;align-items:flex-end}.remote-volume-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.advanced-option[_ngcontent-%COMP%]{display:grid;gap:.5rem;grid-template-columns:1fr 1fr 40px;align-items:flex-end}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var Zn=["formRef"];function Jn(t,i){if(t&1&&(r(0,"option",24),l(1),o()),t&2){let e=i.$implicit;c("value",e.key),s(),I(e.label)}}function Xn(t,i){if(t&1){let e=v();r(0,"div",11)(1,"spk-form-field")(2,"label",12),l(3,"Next time"),o(),r(4,"input",13,1),C("focus",function(){h(e);let a=ee(5);return y(a.showPicker())}),o(),r(6,"spk-icon",14),l(7,"clock"),o()(),r(8,"spk-form-field"),u(9,"label",15),r(10,"input",16,2),C("focus",function(){h(e);let a=ee(11);return y(a.showPicker())}),o(),r(12,"spk-icon",14),l(13,"calendar"),o()()(),F(14,17),r(15,"div",18)(16,"spk-form-field")(17,"label",19),l(18,"Run again every"),o(),u(19,"input",20),o(),r(20,"spk-select",21),u(21,"input",22),F(22,23),D(23,Jn,2,2,"option",24,V),b(),o()(),r(25,"app-toggle-card",25),F(26,26),l(27,"Allowed days"),b(),r(28,"div",27)(29,"spk-toggle",6),l(30," Monday "),u(31,"input",28),o(),r(32,"spk-toggle",6),l(33," Tuesday "),u(34,"input",29),o(),r(35,"spk-toggle",6),l(36," Wednesday "),u(37,"input",30),o(),r(38,"spk-toggle",6),l(39," Thursday "),u(40,"input",31),o(),r(41,"spk-toggle",6),l(42," Friday "),u(43,"input",32),o(),r(44,"spk-toggle",6),l(45," Saturday "),u(46,"input",33),o(),r(47,"spk-toggle",6),l(48," Sunday "),u(49,"input",34),o()()(),b()}if(t&2){let e=p();s(20),c("displayFn",e.displayFn),s(3),O(e.unitOptions),s(2),c("disallowToggle",!0)}}var A=new H,Ht=[{key:"s",label:"Seconds"},{key:"m",label:"Minutes"},{key:"h",label:"Hours"},{key:"D",label:"Days"},{key:"W",label:"Weeks"},{key:"M",label:"Months"},{key:"Y",label:"Years"}],Lt=(t={autoRun:!1,nextTime:{time:"13:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!1,tue:!1,wed:!1,thu:!1,fri:!1,sat:!1,sun:!1}}})=>A.group({autoRun:A.control(t.autoRun),nextTime:A.group({time:A.control(t.nextTime.time),date:A.control(t.nextTime.date)}),runAgain:A.group({repeatValue:A.control(t.runAgain.repeatValue),repeatUnit:A.control(t.runAgain.repeatUnit),allowedDays:A.group({mon:A.control(t.runAgain.allowedDays.mon),tue:A.control(t.runAgain.allowedDays.tue),wed:A.control(t.runAgain.allowedDays.wed),thu:A.control(t.runAgain.allowedDays.thu),fri:A.control(t.runAgain.allowedDays.fri),sat:A.control(t.runAgain.allowedDays.sat),sun:A.control(t.runAgain.allowedDays.sun)})})}),Ct=class t{#e=x(K);#n=x(W);#i=x(te);formRef=Z.required("formRef");scheduleForm=this.#e.scheduleForm;scheduleFormSignal=this.#e.scheduleFormSignal;unitOptions=Ht;displayFn(i){let e=Ht.find(n=>n.key===i);return e?`${e.label}`:""}goBack(){this.#n.navigate(["source-data"],{relativeTo:this.#i.parent})}next(){this.#n.navigate(["options"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=j({type:t,selectors:[["app-schedule"]],viewQuery:function(e,n){e&1&&J(n.formRef,Zn,5),e&2&&X()},standalone:!0,features:[q],decls:20,vars:2,consts:[["formRef",""],["timeRef",""],["dateRef",""],[3,"submit","formGroup"],[1,"title-30"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox","formControlName","autoRun"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["formGroupName","nextTime",1,"row-inputs"],["for","time"],["type","time","id","time","formControlName","time",3,"focus"],["suffix",""],["for","date"],["type","date","id","date","formControlName","date",3,"focus"],["formGroupName","runAgain"],[1,"row-inputs"],["for","repeatValue"],["type","number","id","repeatValue","formControlName","repeatValue"],[3,"displayFn"],["type","text","id","repeatUnit","formControlName","repeatUnit"],["options",""],[3,"value"],["formGroupName","allowedDays",3,"disallowToggle"],["title",""],[1,"days-wrap"],["type","checkbox","formControlName","mon"],["type","checkbox","formControlName","tue"],["type","checkbox","formControlName","wed"],["type","checkbox","formControlName","thu"],["type","checkbox","formControlName","fri"],["type","checkbox","formControlName","sat"],["type","checkbox","formControlName","sun"]],template:function(e,n){if(e&1){let a=v();r(0,"form",3,0),C("submit",function(){return h(a),y(n.next())}),r(2,"h3",4),l(3,"Schedule"),o(),r(4,"div",5)(5,"spk-toggle",6),l(6," Automatically run backups "),u(7,"input",7),o(),r(8,"p"),l(9,"If a date was missed, the job will run as soon as possible."),o()(),d(10,Xn,50,2),r(11,"div",8)(12,"button",9),C("click",function(){return h(a),y(n.goBack())}),r(13,"spk-icon"),l(14,"arrow-left"),o(),l(15," Go back "),o(),r(16,"button",10)(17,"spk-icon"),l(18,"arrow-right"),o(),l(19," Continue "),o()()()}if(e&2){let a;c("formGroup",n.scheduleForm),s(10),_((a=n.scheduleFormSignal())!=null&&a.autoRun?10:-1)}},dependencies:[me,re,se,pe,ne,we,xe,ie,oe,ae,le,Se,de,ue,ve,ce,ke,Fe],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.toggle-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.days-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};var ei=["formRef"];function ti(t,i){if(t&1&&(r(0,"option",20),l(1),o()),t&2){let e=i.$implicit;c("value",e),s(),I(e)}}function ni(t,i){if(t&1&&(r(0,"div",13)(1,"spk-form-field"),u(2,"input",17),o(),r(3,"spk-select"),u(4,"input",18),F(5,19),D(6,ti,2,2,"option",20,V),b(),o()()),t&2){let e=p();s(6),O(e.sizeOptions())}}var he=new H,ii=["Bytes","KB","MB","GB","TB","PB"],oi=["Contains","Does not contain","Is greater than","Is less than"];var zt=(t={path:"",excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>he.group({path:he.control(t.path),excludes:he.group({hidden:he.control(t.excludes.hidden),system:he.control(t.excludes.system),temporary:he.control(t.excludes.temporary),filesLargerThan:he.group({size:he.control(null),unit:he.control(null)})})}),ht=class t{#e=x(K);#n=x(W);#i=x(te);formRef=Z.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;filesLargerThan=G(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=S(ii);expressionOptions=S(oi);getPath(){return this.sourceDataForm.value.path??null}toggleFilesLargerThan(){this.sourceDataForm.controls.excludes.value.filesLargerThan?.size===null?this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:50,unit:"MB"}):this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:null,unit:null})}goBack(){this.#n.navigate(["destination"],{relativeTo:this.#i.parent})}next(){this.#n.navigate(["schedule"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=j({type:t,selectors:[["app-source-data"]],viewQuery:function(e,n){e&1&&J(n.formRef,ei,5),e&2&&X()},standalone:!0,features:[q],decls:32,vars:7,consts:[["formRef",""],[3,"submit","formGroup"],[1,"title-30"],[3,"multiSelect","startingPath"],["for","path"],["type","text","id","path","tabindex","4","placeholder","Path","formControlName","path"],["formGroupName","excludes",3,"isActive"],["title",""],[1,"raised","primary"],["type","checkbox","placeholder","Hidden files","formControlName","hidden"],["type","checkbox","placeholder","System files","formControlName","system"],["type","checkbox","placeholder","Temporary files","formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],["type","number","formControlName","size"],["type","text","formControlName","unit","placeholder","Select an option..."],["options",""],[3,"value"]],template:function(e,n){if(e&1){let a=v();r(0,"form",1,0),C("submit",function(){return h(a),y(n.next())}),r(2,"h3",2),l(3,"Source Data"),o(),r(4,"app-file-tree",3)(5,"label",4),l(6,"Folder path"),o(),u(7,"input",5),o(),r(8,"app-toggle-card",6),F(9,7),l(10,"Exclude"),b(),r(11,"spk-toggle",8),l(12," Hidden files "),u(13,"input",9),o(),r(14,"spk-toggle",8),l(15," System files "),u(16,"input",10),o(),r(17,"spk-toggle",8),l(18," Temporary files "),u(19,"input",11),o(),r(20,"spk-toggle",12),C("click",function(){return h(a),y(n.toggleFilesLargerThan())}),l(21," Files larger than "),o(),d(22,ni,8,0,"div",13),o(),r(23,"div",14)(24,"button",15),C("click",function(){return h(a),y(n.goBack())}),r(25,"spk-icon"),l(26,"arrow-left"),o(),l(27," Go back "),o(),r(28,"button",16)(29,"spk-icon"),l(30,"arrow-right"),o(),l(31," Continue "),o()()()}e&2&&(c("formGroup",n.sourceDataForm),s(4),c("multiSelect",!0)("startingPath",n.getPath()),s(4),c("isActive",!0),s(12),fe("active",n.filesLargerThan()),s(2),_(n.filesLargerThan()?22:-1))},dependencies:[me,re,se,pe,ne,we,xe,ie,oe,ae,le,Se,de,ce,ke,ue,ve,Ae,Fe],styles:["[_nghost-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.row-inputs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content;gap:.5rem}.filter-inputs[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:flex-end}.filter-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.filter-inputs[_ngcontent-%COMP%] .filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var Q=new H,K=class t{#e=x(W);#n=x(Je);#i=x(Ge);#o=x(it);generalForm=Bt();sourceDataForm=zt();scheduleForm=Lt();destinationForm=jt();optionsForm=Ut();isDraft=S(!1);backupId=S(null);isSubmitting=S(!1);finishedLoading=S(!1);backupDefaults=S(null);isNew=G(()=>this.backupId()==="new");selectedOptions=S([]);selectedAdvancedFormPair=S([]);destinationFormPair=S({oauthField:null,custom:[],dynamic:[],advanced:[]});notSelectedAdvancedFormPair=G(()=>{let i=this.destinationFormPair()?.advanced??[],e=this.selectedAdvancedFormPair()??[];return i.filter(n=>e.findIndex(a=>a.name===n.name)===-1)});selectedHttpOptions=S([]);notSelectedHttpOptions=G(()=>{let i=this.httpOptions(),e=this.selectedHttpOptions()??[];return i.filter(n=>e.findIndex(a=>a.name===n.name)===-1)});sourceDataFormSignal=M(this.sourceDataForm.valueChanges);destinationFormSignal=M(this.destinationForm.valueChanges);generalFormSignal=M(this.generalForm.valueChanges);encryptionFieldSignal=M(this.generalForm.controls.encryption.valueChanges);scheduleFormSignal=M(this.scheduleForm.valueChanges);destinationOptions=G(()=>this.#n.backendModules()??[]);httpOptions=G(()=>this.#n.systemInfo()?.GenericModules?.find(i=>i.Key==="http-options")?.Options?.map(this.#t)??[]);advancedOptions=G(()=>this.#n.systemInfo()?.Options?.map(this.#t)??[]);#t(i){return{name:i.Name,type:i.Type,shortDescription:i.ShortDescription??void 0,longDescription:i.LongDescription??void 0,options:i.ValidValues}}encryptionOptions=G(()=>{let i=this.#n.systemInfo()?.EncryptionModules??[];return[_t,...i]});nonSelectedOptions=G(()=>this.advancedOptions().sort((i,e)=>i?.name&&e?.name?i?.name.localeCompare(e?.name):0).filter(i=>this.selectedOptions()?.findIndex(e=>e.name===i.name)===-1));addAdvancedFormPairByName(i,e,n){let a=this.notSelectedAdvancedFormPair().find(m=>m.name===i);a&&this.addAdvancedFormPair(a,e,n)}addHttpOptionByName(i,e,n){let a=this.notSelectedHttpOptions().find(m=>m.name===i);a&&this.addHttpOption(a,e,n)}addAdvancedFormPair(i,e,n){let a=this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced,m=n??i.defaultValue;this.createFormField(a,i,m),this.selectedAdvancedFormPair.set([...this.selectedAdvancedFormPair(),i])}addHttpOption(i,e,n){let a=this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced,m=n??i.defaultValue;this.createFormField(a,i,m),this.selectedHttpOptions.set([...this.selectedHttpOptions(),i])}removeAdvancedFormPair(i,e){this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.removeControl(i.name),this.selectedAdvancedFormPair().findIndex(a=>a.name===i.name)!==-1?this.selectedAdvancedFormPair.update(a=>(a=a.filter(m=>m.name!==i.name),a)):this.selectedHttpOptions.update(a=>(a=a.filter(m=>m.name!==i.name),a))}removeHttpOption(i,e){this.destinationForm.controls.destinations.controls.at(e)?.controls.advanced.removeControl(i.name),this.selectedHttpOptions.update(n=>(n=n.filter(a=>a.name!==i.name),n))}submit(){this.isSubmitting.set(!0);let i=this.#s(),e=this.backupId();e==="new"||!e||this.isDraft()?this.#i.postApiV1Backups({requestBody:i}).pipe(Le(()=>this.isSubmitting.set(!1))).subscribe({next:n=>{console.log("submitted res",n),this.exit()},error:n=>{console.error("submitted error",n)}}):this.#i.putApiV1BackupById({id:e,requestBody:i}).pipe(Le(()=>this.isSubmitting.set(!1))).subscribe({next:n=>{console.log("submitted res",n),this.exit()},error:n=>{console.error("submitted error",n)}})}exit(){this.#m(),this.#e.navigate(["/"])}updateFieldsFromTargetUrl(i){this.#r(),setTimeout(()=>{this.#l(i)})}#r(){this.destinationFormPair.set({oauthField:null,custom:[],dynamic:[],advanced:[]}),this.selectedAdvancedFormPair.set([]),this.selectedHttpOptions.set([]),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset()}mapSourceDataToForm(i){let e=i.Sources??"",n=i.Filters?.map($=>`${$.Include?"":"-"}${$.Expression}`)??[],a=i.Settings?.find($=>$.Name==="--exclude-files-attributes")?.Value??"",m=i.Settings?.find($=>$.Name==="--skip-files-larger-than")??null,g=m?.Value.replace(/[0-9]/g,"")??null,R=m?.Value.replace(/[^0-9]/g,"")??null,B={path:[...e,...n].join("\0"),excludes:{hiddenFiles:a.includes("hidden"),systemFiles:a.includes("system"),tempFiles:a.includes("temporary"),filesLargerThan:g&&R?{size:parseInt(R),unit:g.toUpperCase()}:null}};this.sourceDataForm.patchValue(B)}mapDestinationToForm(i){let e=i.TargetURL?ut(i.TargetURL):null;e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}#l(i){let e=ut(i);e&&this.addDestinationFormGroup(e.destinationType,{custom:e.custom,dynamic:e.dynamic,advanced:e.advanced},!0)}mapGeneralToForm(i){let e=i.Settings?.find(m=>m.Name==="encryption-module"),n=e?.Value&&e.Value.length?e.Value:"",a={name:i.Name??"",description:i.Description??""};n&&n!==""&&(a.encryption=n),this.generalForm.patchValue(a)}mapScheduleToForm(i){if(!i){this.scheduleForm.patchValue({autoRun:!0});return}let e=this.#o.fromString(i.Repeat)??null,a={nextTime:this.#p(i.Time),runAgain:{repeatValue:e?.value??1,repeatUnit:e?.unit??"D",allowedDays:{mon:i.AllowedDays?.includes("mon")??!1,tue:i.AllowedDays?.includes("tue")??!1,wed:i.AllowedDays?.includes("wed")??!1,thu:i.AllowedDays?.includes("thu")??!1,fri:i.AllowedDays?.includes("fri")??!1,sat:i.AllowedDays?.includes("sat")??!1,sun:i.AllowedDays?.includes("sun")??!1}}};this.scheduleForm.patchValue(a)}mapOptionsToForms(i){let e=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than"],n=this.advancedOptions();i.Settings?.forEach(a=>{if(a.Name==="encryption-module")return this.generalForm.controls.encryption.setValue(a.Value??"");if(!(a.Name&&e.includes(a.Name))){if(a.Name==="dblock-size"){let m=a.Value?.replace(/[^0-9]/g,""),g=a.Value?.replace(/[0-9]/g,"");return this.optionsForm.controls.remoteVolumeSize.setValue({size:m?parseInt(m):null,unit:g?g.toUpperCase():null})}if(a.Name&&a.Value){let m=n.find(g=>g.name===a.Name);if(!m)return;this.addOptionToFormGroup(m,a.Value)}}})}getCurrentTargetUrl(){return this.#a(this.destinationForm.controls.destinations)}#s(){let i=this.generalForm.value,e=this.optionsForm.value,n=this.scheduleForm.value,a=this.sourceDataForm.value,g=this.destinationForm.value.destinations?.length?this.#a(this.destinationForm.controls.destinations):[],R=null;n.runAgain?.repeatUnit&&n.runAgain?.repeatValue&&(R=this.#o.toString(n.runAgain.repeatValue,n.runAgain.repeatUnit));let B=n.runAgain?.allowedDays?Object.entries(n.runAgain?.allowedDays).filter(([f,w])=>w).map(([f,w])=>f):[],$=a.path?.split("\0")??[],pt=i.encryption===""?{Name:"--no-encryption",Value:"True"}:{Name:"encryption-module",Value:i.encryption??null},mt=this.advancedOptions(),Ke=Object.entries(e.advancedOptions??{}).filter(([f,w])=>f&&w).map(([f,w])=>{let L=mt.find(z=>z.name===f);return L?.type==="Size"?{Name:f,Value:`${w.size}${w.unit.toLowerCase()}`}:L?.type==="Integer"?{Name:f,Value:w.toString()}:L?.type==="Boolean"?{Name:f,Value:w.toString()}:{Name:f,Value:w}}),Ne=[pt,...Ke],Pe=Object.entries(a.excludes??{}).filter(([f,w])=>w&&f!=="filesLargerThan").map(([f])=>f),T=a.excludes?.filesLargerThan;return Pe.length&&Ne.push({Name:"--exclude-files-attributes",Value:Pe.join(",")}),T&&T.size!==null&&T.unit!==null&&Ne.push({Name:"--skip-files-larger-than",Value:`${T.size}${T.unit}`}),{Backup:{Name:i.name,Description:i.description,TargetURL:g[0]??null,Sources:$.filter(f=>!f.startsWith("-")),Settings:Ne,Filters:$.filter(f=>f.startsWith("-")).map((f,w)=>({Order:w,Include:!1,Expression:f.slice(1)}))},Schedule:n.autoRun?{Repeat:R,Time:n.nextTime?.date?new Date(`${n.nextTime.date}T${n.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:B}:null}}#a(i){return i.controls.map(e=>ot(e.value))}#p(i){if(!i||i?.indexOf("T")===-1)return{time:i??"13:00"};let e=new Date(i),n={time:`${(""+e.getHours()).padStart(2,"0")}:${(""+e.getMinutes()).padStart(2,"0")}`};return i.indexOf("T")!==-1&&(n.date=e.toISOString().split("T")[0]),n}removeOptionFromFormGroup(i){let e=i.name;e&&(this.optionsForm.controls.advancedOptions.removeControl(e),this.selectedOptions.update(n=>(n=n.filter(a=>a.name!==e),n)))}addOptionToFormGroup(i,e){let n=this.optionsForm.controls.advancedOptions;this.createFormField(n,i,e??i.defaultValue),this.selectedOptions.update(a=>(a.push(i),a))}createFormField(i,e,n){if(e.type==="String"||e.type==="FileTree"||e.type==="FolderTree"||e.type==="Password"||e.type==="Enumeration"||e.type==="NonValidatedSelectableString"||e.type==="Path"){i.addControl(e.name,Q.control(n));return}if(e.type==="Size"){let a=n.replace(/[0-9]/g,""),m=n.replace(/[^0-9]/g,"");i.addControl(e.name,Q.group({size:Q.control(m?parseInt(m):50),unit:Q.control(a?a.toUpperCase():"MB")}));return}if(e.type==="Integer"){i.addControl(e.name,Q.control(n?parseInt(n):0));return}if(e.type==="Boolean"){i.addControl(e.name,Q.control(n==="true"));return}if(e.type==="Flags"){i.addControl(e.name,Q.control(n??""));return}if(e.type==="Timespan"){i.addControl(e.name,Q.control(n,[_e.pattern(/([-+]?\d{1,3}[smhDWMY])+/)]));return}}addDestinationFormGroup(i,e,n=!1){let a=this.destinationOptions().find(T=>T.Key===i),m=this.httpOptions();if(!a||!a.Options)return;let g=qe.hasOwnProperty(i)&&qe[i],R=g&&g.oauthField?g.oauthField:null,B=g&&g.customFields?g.customFields:{},$=g&&g.dynamicFields?g.dynamicFields:[],pt=g&&g.advancedFields?g.advancedFields:[],mt=g&&g.ignoredAdvancedFields?g.ignoredAdvancedFields:[];this.destinationFormPair.set({oauthField:R,custom:[],dynamic:[],advanced:[]});let Ke=Q.group({}),Ne=Q.group({}),Pe=Q.group({});B&&Object.entries(B).forEach(([T,f],w)=>{let Te=f,{formElement:L}=Te,z=xt(Te,["formElement"]);Ke.addControl(T,L(e?.custom[T])),this.destinationFormPair.update(Ie=>(Ie.custom.push(U({order:900+w},z)),Ie))});for(let T=0;T<a.Options.length;T++){let f=a.Options[T];if(f.Deprecated)continue;let w=$.find(L=>L===f.Name||L.name===f.Name);if(w){let L=w&&typeof w!="string",z={name:f.Name,type:f.Type,shortDescription:f.ShortDescription??void 0,longDescription:f.LongDescription??void 0,options:f.ValidValues,order:900+T},Te=L?U(U({},z),w):z,Qe=e?.dynamic[f.Name]??f.DefaultValue;this.createFormField(Ne,Te,Qe),this.destinationFormPair.update(Ue=>(Ue.dynamic.push(Te),Ue))}else{if(mt.find(Y=>Y===f.Name))continue;let z=pt.find(Y=>Y===f.Name||Y.name===f.Name),Te=z&&typeof z!="string",Ie=e?.advanced[f.Name],Qe=Ie??f.DefaultValue,Ue={name:f.Name,type:f.Type,shortDescription:f.ShortDescription??void 0,longDescription:f.LongDescription??void 0,options:f.ValidValues,defaultValue:Qe,order:900+T},ct=Te?U(U({},Ue),z):Ue;n&&Ie&&(this.createFormField(Pe,ct,Qe),this.selectedAdvancedFormPair.update(Y=>(Y.push(ct),Y))),this.destinationFormPair.update(Y=>(Y.advanced.push(ct),Y))}}for(let T=0;T<m.length;T++){let f=m[T],w=e?.advanced[f.name],L=w??f.defaultValue;n&&w&&(this.createFormField(Pe,f,L),this.selectedHttpOptions.update(z=>(z.push(f),z)))}this.destinationFormPair.update(T=>({oauthField:T.oauthField,custom:T.custom.sort((f,w)=>f.order-w.order),dynamic:T.dynamic.sort((f,w)=>f.order-w.order),advanced:T.advanced.sort((f,w)=>f.order-w.order)})),this.destinationForm.controls.destinations.push(qt({key:a.Key,customGroup:Ke,dynamicGroup:Ne,advancedGroup:Pe}))}#m(){this.generalForm.reset(),this.destinationForm.controls.destinations.clear(),this.destinationForm.reset(),this.sourceDataForm.reset(),this.scheduleForm.reset(),this.optionsForm.reset()}static \u0275fac=function(e){return new(e||t)};static \u0275prov=ye({token:t,factory:t.\u0275fac,providedIn:"root"})};var ri=["formRef"],ai=(t,i,e,n)=>({index:t,formView:i,formGroupName:"custom",destinationType:e,oauthField:n}),st=t=>({$implicit:t}),li=(t,i,e,n)=>({index:t,formView:i,formGroupName:"dynamic",destinationType:e,oauthField:n}),si=(t,i,e,n)=>({index:t,formView:i,formGroupName:"advanced",destinationType:e,oauthField:n}),pi=(t,i,e,n)=>({index:t,formView:i,formGroupName:"advanced",asHttpOptions:!0,destinationType:e,oauthField:n}),mi=()=>({maxWidth:"700px",width:"100%"});function ci(t,i){t&1&&(l(0," Connected "),r(1,"spk-icon"),l(2,"check"),o())}function di(t,i){t&1&&l(0," Test destination ")}function ui(t,i){if(t&1){let e=v();r(0,"button",8),C("click",function(){h(e);let a=p();return y(a.testDestination())}),d(1,ci,3,0,"spk-icon")(2,di,1,0),o()}if(t&2){let e=p();fe("success",e.successfulTest()),s(),_(e.successfulTest()?1:2)}}function fi(t,i){if(t&1){let e=v();r(0,"p",14),C("click",function(){h(e);let a=p();return y(a.removeDestinationFormGroup(a.destinationCount()-1))}),l(1," Want to select another destination? "),r(2,"span",15),l(3,"Click here"),o()()}}function _i(t,i){if(t&1){let e=v();r(0,"div",16)(1,"div",17),C("click",function(){h(e);let a=p();return y(a.addDestinationFormGroup("file"))}),r(2,"h3"),l(3,"File system"),o(),r(4,"p"),l(5,"Store backups on your local file system."),o()(),r(6,"div",17),C("click",function(){h(e);let a=p();return y(a.addDestinationFormGroup("gcs"))}),r(7,"h3"),l(8,"Google Cloud Storage"),o(),r(9,"p"),l(10,"Store backups in Google Cloud Storage."),o()(),r(11,"div",17),C("click",function(){h(e);let a=p();return y(a.addDestinationFormGroup("s3"))}),r(12,"h3"),l(13,"S3 compatible bucket"),o(),r(14,"p"),l(15,"Store backups in any S3 compatible bucket."),o()(),r(16,"div",17),C("click",function(){h(e);let a=p();return y(a.addDestinationFormGroup("ssh"))}),r(17,"h3"),l(18,"SSH"),o(),r(19,"p"),l(20,"Store backups in SSH."),o()(),r(21,"div",17),C("click",function(){h(e);let a=p();return y(a.addDestinationFormGroup("googledrive"))}),r(22,"h3"),l(23,"Google Drive"),o(),r(24,"p"),l(25,"Store backups in Google Drive."),o()()(),r(26,"p"),l(27,"More destinations are coming soon."),o()}}function gi(t,i){t&1&&Ve(0)}function Ci(t,i){if(t&1&&d(0,gi,1,0,"ng-container",23),t&2){let e,n=i.$implicit,a=i.$index;p();let m=ee(33),g=p();c("ngTemplateOutlet",m)("ngTemplateOutletContext",De(7,st,ze(2,ai,a,n,(e=g.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,g.destinationFormPair().oauthField)))}}function hi(t,i){t&1&&Ve(0)}function yi(t,i){if(t&1&&d(0,hi,1,0,"ng-container",23),t&2){let e,n=i.$implicit,a=i.$index;p();let m=ee(33),g=p();c("ngTemplateOutlet",m)("ngTemplateOutletContext",De(7,st,ze(2,li,a,n,(e=g.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,g.destinationFormPair().oauthField)))}}function xi(t,i){if(t&1){let e=v();r(0,"button",24),C("click",function(){let a=h(e).$implicit,m=p(2);return y(m.addAdvancedFormPair(a,0))}),l(1),o()}if(t&2){let e=i.$implicit;s(),k(" ",e.name," ")}}function wi(t,i){t&1&&Ve(0)}function Si(t,i){if(t&1&&d(0,wi,1,0,"ng-container",23),t&2){let e,n=i.$implicit,a=i.$index;p();let m=ee(33),g=p();c("ngTemplateOutlet",m)("ngTemplateOutletContext",De(7,st,ze(2,si,a,n,(e=g.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,g.destinationFormPair().oauthField)))}}function ki(t,i){if(t&1){let e=v();r(0,"button",24),C("click",function(){let a=h(e).$implicit,m=p(2);return y(m.addHttpOption(a,0))}),l(1),o()}if(t&2){let e=i.$implicit;s(),k(" ",e.name," ")}}function vi(t,i){t&1&&Ve(0)}function Fi(t,i){if(t&1&&d(0,vi,1,0,"ng-container",23),t&2){let e,n=i.$implicit,a=i.$index;p();let m=ee(33),g=p();c("ngTemplateOutlet",m)("ngTemplateOutletContext",De(7,st,ze(2,pi,a,n,(e=g.destinationFormSignal())==null||e.destinations==null||e.destinations[0]==null?null:e.destinations[0].destinationType,g.destinationFormPair().oauthField)))}}function bi(t,i){if(t&1&&(r(0,"spk-tooltip",35)(1,"spk-icon"),l(2,"question"),o()()),t&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Ti(t,i){if(t&1&&(r(0,"app-file-tree",27)(1,"label",34),l(2),d(3,bi,3,1,"spk-tooltip",35),o(),u(4,"input",36),o()),t&2){let e,n=p().$implicit,a=p(2);c("startingPath",a.getFormFieldValue(0,n.formGroupName,n.formView.name))("accepts",n.formView.accepts)("showFiles",!0)("showHiddenNodes",!0)("selectFiles",!0),s(),E("for","destination-",n.formGroupName,"-",n.index,"-",n.asHttpOptions?"http":"other",""),s(),k(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),s(),_(n.formView.longDescription?3:-1),s(),E("id","destination-",n.formGroupName,"-",n.index,"-",n.asHttpOptions?"http":"other",""),N("formControlName",n.formView.name)}}function Vi(t,i){if(t&1&&(r(0,"spk-tooltip",35)(1,"spk-icon"),l(2,"question"),o()()),t&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Di(t,i){if(t&1&&(r(0,"app-file-tree",28)(1,"label",34),l(2),d(3,Vi,3,1,"spk-tooltip",35),o(),u(4,"input",36),o()),t&2){let e,n=p().$implicit,a=p(2);c("startingPath",a.getFormFieldValue(0,n.formGroupName,n.formView.name)),s(),E("for","destination-",n.formGroupName,"-",n.index,"-",n.asHttpOptions?"http":"other",""),s(),k(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),s(),_(n.formView.longDescription?3:-1),s(),E("id","destination-",n.formGroupName,"-",n.index,"-",n.asHttpOptions?"http":"other",""),N("formControlName",n.formView.name)}}function Oi(t,i){if(t&1&&(r(0,"spk-tooltip",35)(1,"spk-icon"),l(2,"question"),o()()),t&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Ei(t,i){t&1&&(r(0,"spk-icon",37),l(1,"link"),o())}function Ni(t,i){t&1&&(r(0,"spk-icon",37),l(1,"textbox"),o())}function Pi(t,i){if(t&1&&(r(0,"spk-form-field")(1,"label",34),l(2),d(3,Oi,3,1,"spk-tooltip",35),o(),u(4,"input",36),d(5,Ei,2,0,"spk-icon",37)(6,Ni,2,0,"spk-icon",37),o()),t&2){let e,n=p().$implicit;s(),E("for","destination-",n.formGroupName,"-",n.index,"-",n.asHttpOptions?"http":"other",""),s(),k(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),s(),_(n.formView.longDescription?3:-1),s(),E("id","destination-",n.formGroupName,"-",n.index,"-",n.asHttpOptions?"http":"other",""),N("formControlName",n.formView.name),s(),_(n.formView.type==="Path"?5:6)}}function Ii(t,i){if(t&1){let e=v();r(0,"span",41),C("click",function(){h(e);let a=p(2).$implicit,m=p(2);return y(m.oauthStartTokenCreation(a.destinationType))}),l(1,"AuthID"),o()}}function Gi(t,i){t&1&&(r(0,"spk-icon",37),l(1,"password"),o())}function Mi(t,i){if(t&1){let e=v();r(0,"spk-icon",42),C("click",function(){h(e);let a=p(2).$implicit;return y(a.formView.showPassword=!a.formView.showPassword)}),l(1," eye "),o()}}function Ai(t,i){if(t&1){let e=v();r(0,"spk-icon",42),C("click",function(){h(e);let a=p(2).$implicit;return y(a.formView.showPassword=!a.formView.showPassword)}),l(1," eye-slash "),o()}}function Ri(t,i){if(t&1&&(r(0,"spk-form-field")(1,"label",34),l(2),o(),u(3,"input",38),d(4,Ii,2,0,"span",39)(5,Gi,2,0,"spk-icon",37)(6,Mi,2,0,"spk-icon",40)(7,Ai,2,0,"spk-icon",40),o()),t&2){let e,n=p().$implicit;s(),E("for","destination-",n.formGroupName,"-",n.index,"-",n.asHttpOptions?"http":"other",""),s(),k(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),s(),E("id","destination-",n.formGroupName,"-",n.index,"-",n.asHttpOptions?"http":"other",""),N("formControlName",n.formView.name),c("type",n.formView.showPassword?"text":"password"),s(),_(n.oauthField===n.formView.name?4:5),s(2),_(n.formView.showPassword?6:7)}}function $i(t,i){if(t&1&&(r(0,"spk-tooltip",35)(1,"spk-icon"),l(2,"question"),o()()),t&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Bi(t,i){if(t&1&&(r(0,"option",45),l(1),o()),t&2){let e=i.$implicit;c("value",e),s(),I(e)}}function Ui(t,i){if(t&1&&(r(0,"spk-select")(1,"label",34),l(2),d(3,$i,3,1,"spk-tooltip",35),o(),u(4,"input",43),F(5,44),D(6,Bi,2,2,"option",45,V),b(),o()),t&2){let e,n=p().$implicit;s(),E("for","destination-",n.formGroupName,"-",n.index,"-",n.asHttpOptions?"http":"other",""),s(),k(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),s(),_(n.formView.longDescription?3:-1),s(),E("id","destination-",n.formGroupName,"-",n.index,"-",n.asHttpOptions?"http":"other",""),N("formControlName",n.formView.name),s(2),O(n.formView.options)}}function Hi(t,i){if(t&1&&(r(0,"spk-tooltip",35)(1,"spk-icon"),l(2,"question"),o()()),t&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Li(t,i){if(t&1&&(r(0,"option",45),l(1),o()),t&2){let e=i.$implicit;c("value",e.value),s(),vt(" ",e.key," ",e.value?"("+e.value+")":""," ")}}function zi(t,i){if(t&1&&(r(0,"spk-select",29)(1,"label",34),l(2),d(3,Hi,3,1,"spk-tooltip",35),o(),u(4,"input",43),F(5,44),D(6,Li,2,3,"option",45,V),b(),o()),t&2){let e,n=p().$implicit,a=p(2);c("isFreeText",!0),s(),E("for","destination-",n.formGroupName,"-",n.index,"-",n.asHttpOptions?"http":"other",""),s(),k(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),s(),_(n.formView.longDescription?3:-1),s(),E("id","destination-",n.formGroupName,"-",n.index,"-",n.asHttpOptions?"http":"other",""),N("formControlName",n.formView.name),s(2),O(n.formView.loadOptions(a.injector)())}}function ji(t,i){if(t&1&&(r(0,"spk-tooltip",35)(1,"spk-icon"),l(2,"question"),o()()),t&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function qi(t,i){if(t&1&&(r(0,"option",45),l(1),o()),t&2){let e=i.$implicit;c("value",e),s(),I(e)}}function Wi(t,i){if(t&1&&(r(0,"div",30)(1,"label",34),l(2),d(3,ji,3,1,"spk-tooltip",35),o(),r(4,"div",46)(5,"spk-form-field"),u(6,"input",47),r(7,"spk-icon",37),l(8,"resize"),o()(),r(9,"spk-select"),u(10,"label")(11,"input",48),F(12,44),D(13,qi,2,2,"option",45,V),b(),o()()()),t&2){let e,n=p().$implicit,a=p(2);c("formGroupName",n.formView.name),s(),E("for","destination-",n.formGroupName,"-",n.index,"-",n.asHttpOptions?"http":"other",""),s(),k(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),s(),_(n.formView.longDescription?3:-1),s(3),E("id","destination-",n.formGroupName,"-",n.index,"-",n.asHttpOptions?"http":"other",""),s(7),O(a.sizeOptions())}}function Ki(t,i){if(t&1&&(r(0,"spk-tooltip",35)(1,"spk-icon"),l(2,"question"),o()()),t&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Qi(t,i){if(t&1&&(r(0,"spk-form-field")(1,"label",34),l(2),d(3,Ki,3,1,"spk-tooltip",35),o(),u(4,"input",49),r(5,"spk-icon",37),l(6,"numpad"),o()()),t&2){let e,n=p().$implicit;s(),E("for","destination-",n.formGroupName,"-",n.index,"-",n.asHttpOptions?"http":"other",""),s(),k(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),s(),_(n.formView.longDescription?3:-1),s(),E("id","destination-",n.formGroupName,"-",n.index,"-",n.asHttpOptions?"http":"other",""),N("formControlName",n.formView.name)}}function Yi(t,i){if(t&1&&(r(0,"spk-tooltip",35)(1,"spk-icon"),l(2,"question"),o()()),t&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Zi(t,i){if(t&1&&(r(0,"spk-toggle",31)(1,"label",34),l(2),d(3,Yi,3,1,"spk-tooltip",35),o(),u(4,"input",50),o()),t&2){let e,n=p().$implicit;s(),E("for","destination-",n.formGroupName,"-",n.index,"-",n.asHttpOptions?"http":"other",""),s(),k(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),s(),_(n.formView.longDescription?3:-1),s(),E("id","destination-",n.formGroupName,"-",n.index,"-",n.asHttpOptions?"http":"other",""),N("formControlName",n.formView.name)}}function Ji(t,i){if(t&1&&(r(0,"spk-tooltip",35)(1,"spk-icon"),l(2,"question"),o()()),t&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function Xi(t,i){t&1&&(r(0,"spk-option",52),l(1,"None"),o()),t&2&&c("value","None")}function eo(t,i){if(t&1&&(r(0,"spk-option",45),l(1),u(2,"spk-checkbox",53),o()),t&2){let e=p().$implicit;c("value",e),s(),k(" ",e," ")}}function to(t,i){if(t&1&&d(0,Xi,2,1,"spk-option",52)(1,eo,3,2,"spk-option",45),t&2){let e=i.$implicit;_(e==="None"?0:1)}}function no(t,i){if(t&1&&(r(0,"spk-select",32)(1,"label",34),l(2),d(3,Ji,3,1,"spk-tooltip",35),o(),u(4,"input",51),F(5,44),D(6,to,2,1,null,null,V),b(),o()),t&2){let e,n=p().$implicit;c("selectMultiple",!0),s(),E("for","destination-",n.formGroupName,"-",n.index,"-",n.asHttpOptions?"http":"other",""),s(),k(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),s(),_(n.formView.longDescription?3:-1),s(),N("formControlName",n.formView.name),s(2),O(n.formView.options)}}function io(t,i){if(t&1&&(r(0,"spk-tooltip",35)(1,"spk-icon"),l(2,"question"),o()()),t&2){let e=p(2).$implicit;c("message",e.formView.longDescription)}}function oo(t,i){if(t&1&&(r(0,"spk-form-field")(1,"label",34),l(2),d(3,io,3,1,"spk-tooltip",35),o(),u(4,"input",36),o()),t&2){let e,n=p().$implicit;s(),E("for","destination-",n.formGroupName,"-",n.index,"-",n.asHttpOptions?"http":"other",""),s(),k(" ",(e=n.formView.shortDescription)!==null&&e!==void 0?e:n.formView.name," "),s(),_(n.formView.longDescription?3:-1),s(),E("id","destination-",n.formGroupName,"-",n.index,"-",n.asHttpOptions?"http":"other",""),N("formControlName",n.formView.name)}}function ro(t,i){if(t&1){let e=v();r(0,"button",54),C("click",function(){h(e);let a=p().$implicit,m=p(2);return y(m.removeFormView(a.formView,0))}),r(1,"spk-icon"),l(2,"x-circle"),o()()}}function ao(t,i){if(t&1&&(r(0,"div",25),F(1,26),d(2,Ti,5,16,"app-file-tree",27)(3,Di,5,12,"app-file-tree",28)(4,Pi,7,12,"spk-form-field")(5,Ri,8,13,"spk-form-field")(6,Ui,8,11,"spk-select")(7,zi,8,12,"spk-select",29)(8,Wi,15,11,"div",30)(9,Qi,7,11,"spk-form-field")(10,Zi,5,11,"spk-toggle",31)(11,no,8,8,"spk-select",32)(12,oo,5,11,"spk-form-field"),b(),d(13,ro,3,0,"button",33),o()),t&2){let e=i.$implicit;fe("single-field",e.formGroupName!=="advanced"),s(),c("formGroupName",e.formGroupName),s(),_(e.formView.type==="FileTree"?2:e.formView.type==="FolderTree"?3:e.formView.type==="String"||e.formView.type==="Path"?4:e.formView.type==="Password"?5:e.formView.type==="Enumeration"?6:e.formView.type==="NonValidatedSelectableString"?7:e.formView.type==="Size"?8:e.formView.type==="Integer"?9:e.formView.type==="Boolean"?10:e.formView.type==="Flags"?11:e.formView.type==="Timespan"?12:-1),s(11),_(e.formGroupName==="advanced"?13:-1)}}function lo(t,i){if(t&1&&(F(0,9)(1,18),D(2,Ci,1,9,"ng-container",null,V),D(4,yi,1,9,"ng-container",null,V),r(6,"app-toggle-card",19),F(7,20),l(8," Advanced options "),r(9,"spk-menu")(10,"button",21),l(11," Add advanced option "),r(12,"spk-icon"),l(13,"plus"),o()(),F(14,7),D(15,xi,2,1,"button",22,V),b(),o(),b(),D(17,Si,1,9,"ng-container",null,V),o(),r(19,"app-toggle-card",19),F(20,20),l(21," Http options "),r(22,"spk-menu")(23,"button",21),l(24," Add http option "),r(25,"spk-icon"),l(26,"plus"),o()(),F(27,7),D(28,ki,2,1,"button",22,V),b(),o(),b(),D(30,Fi,1,9,"ng-container",null,V),o(),d(32,ao,14,5,"ng-template",null,1,Ye),b()()),t&2){let e=p();s(2),O(e.destinationFormPair().custom),s(2),O(e.destinationFormPair().dynamic),s(2),c("disallowToggle",!0),s(4),c("disabled",e.notSelectedAdvancedFormPair().length===0),s(5),O(e.notSelectedAdvancedFormPair()),s(2),O(e.selectedAdvancedFormPair()),s(2),c("disallowToggle",!0),s(4),c("disabled",e.notSelectedHttpOptions().length===0),s(5),O(e.notSelectedHttpOptions()),s(2),O(e.selectedHttpOptions())}}function so(t,i){if(t&1){let e=v();r(0,"spk-dialog",55),Tt("isOpenChange",function(a){h(e);let m=p();return bt(m.targetUrlDialogOpen,a)||(m.targetUrlDialogOpen=a),y(a)}),r(1,"header",56)(2,"h2"),l(3,"Edit target URL"),o(),r(4,"spk-alert",57),l(5,"Be careful, this will overwrite everything you have in your destination."),o()(),r(6,"div",58)(7,"spk-form-field"),u(8,"textarea",59),o()(),r(9,"footer",60)(10,"button",11),C("click",function(){h(e);let a=p();return y(a.closeTargetUrlDialog(!1))}),l(11,"Cancel"),o(),r(12,"button",61),C("click",function(){h(e);let a=p();return y(a.closeTargetUrlDialog(!0))}),l(13," Override target URLc "),r(14,"spk-icon"),l(15,"swap"),o()()()()}if(t&2){let e=p();Ft("isOpen",e.targetUrlDialogOpen),c("options",Vt(3,mi)),s(8),c("formControl",e.targetUrlCtrl)}}var po=["Bytes","KB","MB","GB","TB","PB"],lt=new H,jt=(t={destinations:[]})=>lt.group({destinations:lt.array(t.destinations)}),qt=({key:t,customGroup:i,dynamicGroup:e,advancedGroup:n})=>lt.group({destinationType:lt.control(t),custom:i,dynamic:e,advanced:n}),yt=class t{#e=x(W);#n=x(te);#i=x(Et);#o=x(Ge);#t=x(K);#r=x(Mt);injector=x(wt);formRef=Z.required("formRef");destinationForm=this.#t.destinationForm;destinationFormPair=this.#t.destinationFormPair;selectedAdvancedFormPair=this.#t.selectedAdvancedFormPair;notSelectedAdvancedFormPair=this.#t.notSelectedAdvancedFormPair;selectedHttpOptions=this.#t.selectedHttpOptions;notSelectedHttpOptions=this.#t.notSelectedHttpOptions;destinationOptions=this.#t.destinationOptions;destinationFormSignal=this.#t.destinationFormSignal;destinationCount=G(()=>this.destinationFormSignal()?.destinations?.length??0);sizeOptions=S(po);successfulTest=S(!1);getFormFieldValue(i,e,n){return((this.destinationForm.controls.destinations.controls?.[i]).controls?.[e]).controls[n].value}addDestinationFormGroup(i){this.#t.addDestinationFormGroup(i)}addAdvancedFormPair(i,e){this.#t.addAdvancedFormPair(i,e)}removeFormView(i,e){this.#t.removeAdvancedFormPair(i,e)}addHttpOption(i,e){this.#t.addHttpOption(i,e)}targetUrl=G(()=>this.#t.getCurrentTargetUrl()[0]);targetUrlCtrl=new Nt;targetUrlInitial=S(null);targetUrlDialogOpen=S(!1);openTargetUrlDialog(){let e=this.#t.getCurrentTargetUrl()[0];this.targetUrlCtrl.setValue(e),this.targetUrlInitial.set(e),this.targetUrlDialogOpen.set(!0)}closeTargetUrlDialog(i=!1){this.targetUrlDialogOpen.set(!1);let e=this.targetUrlCtrl.value,n=this.targetUrlInitial();!i||e===n||this.#t.updateFieldsFromTargetUrl(this.targetUrlCtrl.value)}testDestination(i=0){let n=this.#t.getCurrentTargetUrl()[i];n&&this.#o.postApiV1RemoteoperationTest({requestBody:{path:n}}).subscribe({next:()=>{this.successfulTest.set(!0),setTimeout(()=>{this.successfulTest.set(!1)},3e3)},error:a=>{let m=a.error.error.Error;if(m==="missing-folder"&&this.#r.open(Oe,{data:{title:"Create folder",message:"The remote destination folder does not exist, do you want to create it?"},closed:g=>{g&&this.#o.postApiV1RemoteoperationCreate({requestBody:{path:n}}).subscribe()}}),m.startsWith("incorrect-cert:")){let g=m.split("incorrect-cert:")[1];this.#r.open(Oe,{maxWidth:"500px",data:{title:"Trust the certificate",message:`The server is using a certificate that is not trusted.
|
|
2
|
+
If this is a self-signed certificate, you can choose to trust this certificate.
|
|
3
|
+
The server reported the certificate hash: ${g}`,confirmText:"Trust the certificate",cancelText:"Cancel"},closed:R=>{R&&this.#t.addHttpOptionByName("accept-specified-ssl-hash",g)}})}if(m.startsWith("incorrect-host-key:")){let g=m.split('incorrect-host-key:"')[1].split('",')[0],R=m.split('accepted-host-key:"')[1].split('",')[0];R?this.#r.open(Oe,{maxWidth:"500px",data:{title:"The host key has changed",message:`The host key has changed, please check with the server administrator if this is correct,
|
|
4
|
+
otherwise you could be the victim of a MAN-IN-THE-MIDDLE attack.
|
|
5
|
+
Do you want to REPLACE your CURRENT host key ${R}
|
|
6
|
+
with the REPORTED host key: ${g}?`,confirmText:"Approve",cancelText:"Cancel"},closed:B=>{B&&this.#t.addAdvancedFormPairByName("ssh-fingerprint",i,g)}}):this.#r.open(Oe,{maxWidth:"500px",data:{title:"Approve host key?",message:`No certificate was specified, please verify that the reported host key is correct: ${g}`,confirmText:"Approve",cancelText:"Cancel"},closed:B=>{B&&this.#t.addAdvancedFormPairByName("ssh-fingerprint",i,g)}})}}})}mapToTargetUrl(i){return ot(i.value)}removeDestinationFormGroup(i){this.destinationForm.controls.destinations.removeAt(i)}displayFn(i){let e=this.destinationOptions().find(n=>n.Key===i);return e?`${e.DisplayName}`:""}goBack(){this.#e.navigate(["general"],{relativeTo:this.#n.parent})}next(){this.#e.navigate(["source-data"],{relativeTo:this.#n.parent})}#l=S("https://duplicati-oauth-handler.appspot.com/").asReadonly();#s=S(Math.random().toString(36).substring(2)+Math.random().toString(36).substring(2)).asReadonly();#a=S(!1);#p=S(null);keyCreation(){}oauthStartTokenCreation(i){this.#a.set(!0);let e=450,n=600,a=this.#l()+"?type="+i+"&token="+this.#s(),m=screen.width/2-e/2,g=screen.height/2-n/2,R=window.open(a,"_blank","height="+n+",width="+e+",menubar=0,status=0,titlebar=0,toolbar=0,left="+m+",top="+g);R?.addEventListener("blur",B=>{console.log("event blur",B)}),R?.addEventListener("beforeunload",B=>{console.log("event beforeunload",B),this.#i.get(this.#l()+"fetch?callback=JSON_CALLBACK",{params:{token:this.#s()}}).pipe(Le(()=>this.#a.set(!1))).subscribe({next:$=>{console.log("res",$),$?.authid&&this.#p.set($.authid)}})})}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=j({type:t,selectors:[["app-destination"]],viewQuery:function(e,n){e&1&&J(n.formRef,ri,5),e&2&&X()},standalone:!0,features:[q],decls:29,vars:6,consts:[["formRef",""],["fieldTemplate",""],[3,"submit","formGroup"],[1,"title-30"],[1,"actions"],["spk-button","","type","button",1,"small",3,"success"],["spk-button","","type","button",1,"small"],["menu",""],["spk-button","","type","button",1,"small",3,"click"],["formArrayName","destinations"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[3,"isOpen","options"],[3,"click"],[1,"spk-primary"],[1,"most-common-destinations"],[1,"tile",3,"click"],["formGroupName","0"],[3,"disallowToggle"],["title",""],["spk-button","","type","button",1,"outlined","small",3,"disabled"],["item","","type","button"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["item","","type","button",3,"click"],[1,"field-row"],[3,"formGroupName"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles"],[3,"startingPath"],[3,"isFreeText"],[1,"form-column",3,"formGroupName"],[1,"primary","raised"],[1,"primary",3,"selectMultiple"],["spk-button","","type","button",1,"outlined"],[3,"for"],[1,"primary",3,"message"],["type","text",3,"id","formControlName"],["prefix",""],["autocomplete","off",3,"type","id","formControlName"],["prefix","",1,"link"],["suffix","",1,"clickable"],["prefix","",1,"link",3,"click"],["suffix","",1,"clickable",3,"click"],["type","search",3,"id","formControlName"],["options",""],[3,"value"],[1,"form-row"],["type","number","formControlName","size",3,"id"],["type","search","formControlName","unit"],["type","number",3,"id","formControlName"],["type","checkbox",3,"id","formControlName"],["type","text","id","text",3,"formControlName"],["deselect","",3,"value"],[1,"raised","primary"],["spk-button","","type","button",1,"outlined",3,"click"],[3,"isOpenChange","isOpen","options"],["header",""],[1,"warning"],["content",""],["id","targetUrl","autocomplete","off",3,"formControl"],["footer",""],["spk-button","","type","submit",1,"raised","primary",3,"click"]],template:function(e,n){if(e&1){let a=v();r(0,"form",2,0),C("submit",function(){return h(a),y(n.next())}),r(2,"header")(3,"h3",3),l(4," Backup destination "),r(5,"div",4),d(6,ui,3,3,"button",5),r(7,"spk-menu")(8,"button",6)(9,"spk-icon"),l(10,"dots-three-vertical"),o()(),F(11,7),r(12,"button",8),C("click",function(){return h(a),y(n.openTargetUrlDialog())}),r(13,"spk-icon"),l(14,"link"),o(),l(15," Edit target URL "),o(),b(),o()()(),d(16,fi,4,0,"p"),o(),d(17,_i,28,0)(18,lo,34,4,"ng-container",9),r(19,"div",10)(20,"button",11),C("click",function(){return h(a),y(n.goBack())}),r(21,"spk-icon"),l(22,"arrow-left"),o(),l(23," Go back "),o(),r(24,"button",12)(25,"spk-icon"),l(26,"arrow-right"),o(),l(27," Continue "),o()()(),d(28,so,16,4,"spk-dialog",13)}if(e&2){let a;c("formGroup",n.destinationForm),s(6),_(n.destinationCount()>0?6:-1),s(10),_(n.destinationCount()>0?16:-1),s(),_(n.destinationCount()===0?17:-1),s(),_(!((a=n.destinationFormSignal())==null||a.destinations==null)&&a.destinations.length?18:-1),s(10),_(n.targetUrlDialogOpen()?28:-1)}},dependencies:[me,re,se,pe,ne,we,xe,ie,oe,Pt,ae,le,Se,It,Ze,de,ue,tt,et,nt,ce,ve,Me,Gt,Xe,Fe,Ae],styles:["[_nghost-%COMP%]{display:block}header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}header[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], header[_ngcontent-%COMP%] spk-alert[_ngcontent-%COMP%]{width:100%}header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:.5rem}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}pre[_ngcontent-%COMP%]{white-space:pre-wrap}.field-row[_ngcontent-%COMP%]{display:grid;align-items:flex-end;grid-template-columns:1fr 2.5rem;gap:.5rem}.field-row.single-field[_ngcontent-%COMP%]{display:block}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.form-column[_ngcontent-%COMP%]{display:flex;flex-direction:column}.form-column[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}.form-column[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{font-size:1rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:2fr 1fr;gap:.5rem;align-items:flex-end}.clickable[_ngcontent-%COMP%]{cursor:pointer;color:var(--primary-500)}.most-common-destinations[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;padding:1rem;border:1px solid var(--base-level-40);border-radius:var(--shape-3);box-shadow:var(--shadow-1);background-color:var(--base-level-20);cursor:pointer}.most-common-destinations[_ngcontent-%COMP%] .tile[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-10);margin:0}[prefix].link[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:var(--primary-500)}textarea[_ngcontent-%COMP%] ~ grammarly-extension[_ngcontent-%COMP%]{display:none}"],changeDetection:0})};export{jt as a,qt as b,yt as c,Bt as d,_t as e,ft as f,Ut as g,nr as h,gt as i,Lt as j,Ct as k,zt as l,ht as m,K as n};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as a,k as b}from"./chunk-FRD2BVV6.js";import"./chunk-ZSOWH34L.js";import"./chunk-SFRGISK2.js";import"./chunk-DNHLTHLR.js";import"./chunk-N6REZCKW.js";import"./chunk-73UOOUBD.js";import"./chunk-IEVRQDB6.js";import"./chunk-22ZYSOTR.js";import"./chunk-JNQHJPEL.js";import"./chunk-LZSE733H.js";import"./chunk-QHJTF3V4.js";import"./chunk-7CGTOI24.js";export{a as createScheduleForm,b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as h}from"./chunk-
|
|
1
|
+
import{b as h}from"./chunk-N6REZCKW.js";import{a as s}from"./chunk-LZSE733H.js";import{Gb as o,Hb as c,Oa as p,Ob as m,W as g,Y as r,lb as t,mb as n}from"./chunk-QHJTF3V4.js";import"./chunk-7CGTOI24.js";var a=class i{#e=g(s);changelog=h(this.#e.getApiV1Changelog());static \u0275fac=function(e){return new(e||i)};static \u0275cmp=r({type:i,selectors:[["app-changelog"]],standalone:!0,features:[m],decls:4,vars:1,template:function(e,u){if(e&1&&(t(0,"h3"),o(1,"Changelog"),n(),t(2,"pre"),o(3),n()),e&2){let l;p(3),c((l=u.changelog())==null?null:l.Changelog)}},styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30)}"],changeDetection:0})};export{a as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Cb as pe,Db as F,Eb as B,Fb as de,Gb as _,Hb as ue,Ib as z,Kb as G,Lb as K,Mb as J,Oa as D,Ob as g,Pb as Z,Q,Ra as se,Ta as $,Ua as h,Va as x,W as R,Wa as re,Xa as P,Y as f,_ as oe,_b as he,ab as V,cb as Y,db as A,eb as W,ec as b,fb as X,ga as d,gb as U,gc as E,ha as u,hb as M,hc as ee,ib as ae,jb as le,kb as ce,lb as r,mb as a,nb as H,ra as N,rb as O,sa as j,sb as v,ta as p,tb as m,ua as L,ub as S,vb as l}from"./chunk-QHJTF3V4.js";import{a as I,b as q,c as ne}from"./chunk-7CGTOI24.js";var w=["*"],Ce=[[["","icon",""]],[["","title",""]],"*",[["","content",""]]],_e=["[icon]","[title]","*","[content]"];function ye(n,C){n&1&&(r(0,"spk-icon",3),_(1,"info"),a())}function ke(n,C){n&1&&(r(0,"spk-icon",3),_(1,"info"),a())}function De(n,C){n&1&&(r(0,"spk-icon",3),_(1,"check-circle"),a())}function be(n,C){n&1&&(r(0,"spk-icon",3),_(1,"warning-octagon"),a())}function we(n,C){n&1&&(r(0,"spk-icon",3),_(1,"warning"),a())}function Oe(n,C){n&1&&(r(0,"spk-icon",3),_(1,"question"),a())}function Ee(n,C){if(n&1){let e=O();r(0,"spk-icon",7),v("click",function(){d(e);let i=m();return u(i.removeAlert())}),_(1,"plus"),a()}}var Te=["dialogRef"];function xe(n,C){if(n&1){let e=O();r(0,"div",4),v("click",function(){d(e);let i=m();return u(i.isOpen.set(!1))}),a()}}var Me=["spk-button",""];var Fe=["inputWrap"];var Ie=[[["label"]],[["","prefix",""]],[["","textPrefix",""]],[["input"]],[["textarea"]],[["","textSuffix",""]],[["","suffix",""]],[["","error",""]],[["","hint",""]]],Ve=["label","[prefix]","[textPrefix]","input","textarea","[textSuffix]","[suffix]","[error]","[hint]"],fe=["triggerRef"],Ae=["popoverRef"],Re=[[["","trigger",""]],"*"],Pe=["[trigger]","*"],He=["option"],Be=["*",[["","menu",""]]],je=["*","[menu]"],Le=()=>({closeOnButton:!1,closeOnEsc:!0});var We=["optionsRef"],qe=["formFieldWrapper"],Ue=[[["label"]],[["input"]],"*",[["","deselect-indicator",""]],[["","search-indicator",""]],[["","open-indicator",""]]],Qe=["label","input","*","[deselect-indicator]","[search-indicator]","[open-indicator]"],Ne=()=>({closeOnButton:!1,closeOnEsc:!1});function $e(n,C){if(n&1){let e=O();r(0,"spk-chip",12),v("click",function(i){let o=d(e).$implicit,s=m(3);return u(s.toggleOption(o,i))}),_(1),r(2,"spk-icon"),_(3,"x-circle"),a()()}if(n&2){let e,t=C.$implicit,i=m(3);U(i.chipClass()),D(),z(" ",(e=(e=i.displayFn())==null?null:e(t))!==null&&e!==void 0?e:t," ")}}function Ye(n,C){if(n&1&&le(0,$e,4,3,"spk-chip",11,ae),n&2){let e=m(2);ce(e.inputValue().split(","))}}function Xe(n,C){if(n&1&&(r(0,"div",6),V(1,Ye,2,0),a()),n&2){let e=m();D(),M(e.inputValue().length>0?1:-1)}}function ze(n,C){if(n&1&&(r(0,"div",6),_(1),a()),n&2){let e=m();D(),ue(e._displayValue())}}function Ge(n,C){if(n&1){let e=O();r(0,"div",13),v("click",function(i){d(e);let o=m();return u(o.deselect(i))}),l(1,3),r(2,"spk-icon",14),_(3,"x-circle"),a()()}}function Ke(n,C){n&1&&(r(0,"div",8),l(1,4),r(2,"spk-icon",14),_(3,"magnifying-glass"),a()())}function Je(n,C){if(n&1&&(r(0,"div",15),l(1,5),r(2,"spk-icon",14),_(3,"caret-down"),a()()),n&2){let e=m();W("open",e.isOpen())}}var Ze=["dragImageElement"],et=[[["","sidenav",""]],[["","sidenav-closed-topbar",""]],"*"],tt=["[sidenav]","[sidenav-closed-topbar]","*"];function it(n,C){n&1&&H(0,"div",1,0)}function nt(n,C){if(n&1){let e=O();r(0,"div",7),v("drop",function(i){d(e);let o=m();return u(o.drop(i))})("dragover",function(i){d(e);let o=m();return u(o.dragOver(i))})("dragenter",function(){d(e);let i=m();return u(i.dragEnter())})("dragleave",function(){d(e);let i=m();return u(i.dragLeave())}),a()}}function ot(n,C){if(n&1){let e=O();r(0,"div",8),v("dragstart",function(i){d(e);let o=m();return u(o.dragStart(i))})("dragend",function(i){d(e);let o=m();return u(o.dragEnd(i))})("drag",function(i){d(e);let o=m();return u(o.drag(i))})("touchstart",function(i){d(e);let o=m();return u(o.touchStart(i))})("touchmove",function(i){d(e);let o=m();return u(o.touchMove(i))})("touchend",function(i){d(e);let o=m();return u(o.touchEnd(i))})("touchcancel",function(i){d(e);let o=m();return u(o.touchCancel(i))}),a()}}var st=["tooltipRef"],te=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=f({type:n,selectors:[["spk-icon"]],standalone:!0,features:[g],ngContentSelectors:w,decls:1,vars:0,template:function(t,i){t&1&&(S(),l(0))},encapsulation:2,changeDetection:0})}}return n})(),Tt=(()=>{class n{constructor(){this._el=R(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&&U(i.type())},inputs:{alertService:[1,"alertService"],type:[1,"type"],id:[1,"id"]},standalone:!0,features:[g],ngContentSelectors:_e,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&&(S(Ce),r(0,"div",1)(1,"div",2,0),l(3),a(),r(4,"div",2),V(5,ye,2,0,"spk-icon",3)(6,ke,2,0,"spk-icon",3)(7,De,2,0,"spk-icon",3)(8,be,2,0,"spk-icon",3)(9,we,2,0,"spk-icon",3)(10,Oe,2,0,"spk-icon",3),a(),r(11,"div",4),l(12,1),l(13,2),a(),V(14,Ee,2,0,"spk-icon",5),r(15,"div",6),l(16,3),a()()),t&2){let o,s=de(2);D(),A("display",s.children.length?"block":"none"),D(4),M((o=i.type())==="primary"?5:o==="accent"?6:o==="success"?7:o==="error"?8:o==="warning"?9:10),D(9),M(i.id()?14:-1)}},dependencies:[te],encapsulation:2,changeDetection:0})}}return n})();var xt=(()=>{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=crypto.randomUUID();this.alertHistory.update(i=>[q(I({},e),{isOpen:!0,animateIn:!0,animateOut:!1,id:t}),...i]),setTimeout(()=>{this.alertHistory.update(i=>i.map(o=>q(I({},o),{animateIn:o.id===t?!1:o.animateIn})))},40),setTimeout(()=>{this.hideAlert(t)},2500)}removeAlert(e){this.alertHistory.update(t=>t.map(i=>q(I({},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=>q(I({},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})(),rt={width:void 0,maxWidth:void 0,height:void 0,maxHeight:void 0,closeOnButton:!0,closeOnEsc:!0,closeOnOutsideClick:!0},at=(()=>{class n{constructor(){this.dialogRef=x("dialogRef"),this.isOpen=P(!1),this.options=p(),this.closed=j(),this.defaultOptionMerge=b(()=>I(I({},rt),this.options())),this.abortController=null,this.isOpenEffect=E(()=>{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())},{allowSignalWrites:!0})}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&&F(i.dialogRef,Te,5),t&2&&B()},inputs:{isOpen:[1,"isOpen"],options:[1,"options"]},outputs:{isOpen:"isOpenChange",closed:"closed"},standalone:!0,features:[g],ngContentSelectors:w,decls:5,vars:9,consts:[["dialogRef",""],["spkDialog",""],[1,"content"],[1,"closeable-overlay"],[1,"closeable-overlay",3,"click"]],template:function(t,i){if(t&1&&(S(),r(0,"dialog",1,0)(2,"div",2),l(3),a(),V(4,xe,1,0,"div",3),a()),t&2){let o,s,c,y;A("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:""),D(4),M(i.defaultOptionMerge().closeOnOutsideClick?4:-1)}},encapsulation:2,changeDetection:0})}}return n})(),Mt=(()=>{class n{constructor(){this.#e=document.querySelector("body"),this.#n=R(he),this.compRef=null,this.insertedCompRef=null,this.closedFieldSub=null,this.compClosedSub=null}#e;#n;open(e,t){let i=this.#n.injector,o=this.#c(),ie=t||{},{data:s,closed:c}=ie,y=ne(ie,["data","closed"]);this.compRef&&this.#r(),this.insertedCompRef=ee(e,{environmentInjector:i}),this.compRef=ee(at,{hostElement:o,environmentInjector:i,projectableNodes:[[this.insertedCompRef.location.nativeElement]]});let T=this.insertedCompRef.instance?.data,k=this.insertedCompRef.instance?.closed;if(s){if($(T))this.insertedCompRef.setInput("data",s);else if(!$(T))throw new Error("data is not an input signal on the passed component")}k instanceof N&&(this.closedFieldSub=k.subscribe((...Se)=>{c?.(...Se),this.#r()})),this.#n.attachView(this.insertedCompRef.hostView),this.#n.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(()=>ve());let ge=this;function ve(){k&&k instanceof N?k.emit(!1):c?.(void 0),ge.#r()}return this.insertedCompRef.instance}#c(){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")}#r(){this.insertedCompRef&&(this.#n.detachView(this.insertedCompRef.hostView),this.closedFieldSub?.unsubscribe(),this.insertedCompRef.destroy()),this.compRef&&(this.#n.detachView(this.compRef.hostView),this.compClosedSub?.unsubscribe(),this.compRef.destroy())}ngOnDestroy(){this.#r()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=Q({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),Ft=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=f({type:n,selectors:[["spk-button-group"]],standalone:!0,features:[g],ngContentSelectors:w,decls:1,vars:0,template:function(t,i){t&1&&(S(),l(0))},encapsulation:2,changeDetection:0})}}return n})(),lt=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=f({type:n,selectors:[["","spk-button",""]],standalone:!0,features:[g],attrs:Me,ngContentSelectors:w,decls:1,vars:0,template:function(t,i){t&1&&(S(),l(0))},encapsulation:2,changeDetection:0})}}return n})(),It=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=f({type:n,selectors:[["spk-card"]],standalone:!0,features:[g],ngContentSelectors:w,decls:1,vars:0,template:function(t,i){t&1&&(S(),l(0))},encapsulation:2,changeDetection:0})}}return n})(),Vt=(()=>{class n{#e=R(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&&v("click",function(){return i.onClick()})},standalone:!0,features:[g],ngContentSelectors:w,decls:6,vars:0,consts:[[1,"box"],[1,"inherit","default-indicator"],[1,"inherit","indeterminate-indicator"]],template:function(t,i){t&1&&(S(),r(0,"div",0)(1,"spk-icon",1),_(2,"check"),a(),r(3,"spk-icon",2),_(4,"minus"),a()(),l(5))},dependencies:[te],encapsulation:2,changeDetection:0})}}return n})(),ct=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=f({type:n,selectors:[["spk-chip"]],standalone:!0,features:[g],ngContentSelectors:w,decls:1,vars:0,template:function(t,i){t&1&&(S(),l(0))},encapsulation:2,changeDetection:0})}}return n})();var pt=(()=>{class n{#e=R(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=CSS.supports("field-sizing","content"),t=this.#e.nativeElement.querySelector("textarea");if(!e&&t!==null){let c=function(){s.style.height="auto",s.style.height=s.scrollHeight+"px"},y=function(){window.setTimeout(c,0)};var i=c,o=y;let s=this.#e.nativeElement.querySelector("textarea");s.addEventListener("change",c),s.addEventListener("cut",y),s.addEventListener("paste",y),s.addEventListener("drop",y),s.addEventListener("keydown",y),s.focus(),s.select(),c()}}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&&v("click",function(){return i.onClick()})},standalone:!0,features:[g],ngContentSelectors:Ve,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&&(S(Ie),l(0),r(1,"div",0)(2,"div",1),l(3,1),l(4,2),a(),H(5,"div",2),l(6,3),l(7,4),l(8,5),H(9,"div",3),l(10,6),a(),r(11,"div",4)(12,"div",5),l(13,7),a(),r(14,"div",6),l(15,8),a()())},encapsulation:2,changeDetection:0})}}return n})(),At=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=f({type:n,selectors:[["spk-list"]],standalone:!0,features:[g],ngContentSelectors:w,decls:1,vars:0,template:function(t,i){t&1&&(S(),l(0))},encapsulation:2,changeDetection:0})}}return n})(),dt={width:void 0,height:void 0,closeOnButton:!0,closeOnEsc:!0},me=(()=>{class n{constructor(){this.#e=4,this.SUPPORTS_ANCHOR=CSS.supports("position-anchor","--abc")&&CSS.supports("anchor-name","--abc"),this.above=p(!1),this.right=p(!1),this._above=h(this.above()),this._right=h(this.right()),this.disableOpenByClick=p(!1),this.isOpen=P(!1),this.options=p(),this.closed=j(),this.defaultOptionMerge=b(()=>I(I({},dt),this.options())),this.triggerRef=x.required("triggerRef"),this.popoverRef=x.required("popoverRef"),this.id=h("--"+crypto.randomUUID()),this.menuStyle=h(null),this.openAbort=null,this.isCalculatingPosition=b(()=>{let e=this.popoverRef()?.nativeElement;return this.isOpen()?(this.openAbort&&this.openAbort.abort(),this.openAbort=new AbortController,e?.showPopover(),document.addEventListener("keydown",i=>{i.key==="Escape"&&!this.defaultOptionMerge().closeOnEsc&&i.preventDefault(),i.key==="Escape"&&this.defaultOptionMerge().closeOnEsc&&this.isOpen.set(!1)},{capture:!0,signal:this.abortController?.signal}),!0):(e.hidePopover(),this.abortController?.abort(),this.openAbort?.abort(),this.closed.emit(),!1)}),this.abortController=null,this.calcPositionEffect=E(()=>{if(!this.isCalculatingPosition())return;this.abortController&&this.abortController.abort(),this.abortController=new AbortController;let t=this.abortController.signal;this.calculateMenuPosition(),this.#n(this.popoverRef()?.nativeElement).addEventListener("scroll",()=>this.calculateMenuPosition(),{signal:t}),document.addEventListener("resize",()=>this.calculateMenuPosition(),{signal:t})},{allowSignalWrites:!0}),this.scrollableStyles=["scroll","auto"]}#e;toggleIsOpen(e){e.preventDefault(),e.stopPropagation(),this.disableOpenByClick()||this.isOpen.set(!this.isOpen())}#n(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.popoverRef()?.nativeElement.getBoundingClientRect(),i=e.left,o=e.bottom,s=i,c=o+this.#e,y=s+t.width>window.innerWidth,T=c+t.height>window.innerHeight;if(this.SUPPORTS_ANCHOR)this._above.set(T),this._right.set(y);else{if(this.above()){let k=e.top-t.height-this.#e;k>=0&&(c=k)}else T&&(c=e.top-t.height-this.#e);if(this.right()){let k=e.right-t.width;k>=0&&(s=k)}else y&&(c=T?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-popover"]],viewQuery:function(t,i){t&1&&(F(i.triggerRef,fe,5),F(i.popoverRef,Ae,5)),t&2&&B(2)},hostVars:4,hostBindings:function(t,i){t&2&&W("above",i._above())("right",i._right())},inputs:{above:[1,"above"],right:[1,"right"],disableOpenByClick:[1,"disableOpenByClick"],isOpen:[1,"isOpen"],options:[1,"options"]},outputs:{isOpen:"isOpenChange",closed:"closed"},standalone:!0,features:[g],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=O();S(Re),r(0,"div",2,0),v("click",function(c){return d(o),u(i.toggleIsOpen(c))}),r(2,"div",3),l(3),a(),r(4,"button",4),_(5,"Open popover"),a()(),r(6,"div",5,1)(8,"div",6),v("click",function(c){return d(o),u(i.isOpen()&&i.eventClose(c))}),a(),l(9,1),a()}t&2&&(A("anchor-name",i.id()),D(6),X(i.menuStyle()),A("position-anchor",i.id()))},dependencies:[lt],encapsulation:2,changeDetection:0})}}return n})(),Rt=(()=>{class n{constructor(){this.above=p(!1),this.right=p(!1),this.keepClickedOptionActive=p(!1),this.isOpen=P(!1),this.closed=j(),this.activeOptionIndex=h(-1),this.options=re("option"),this.optionsEl=b(()=>Array.from(this.options()).map(e=>e.nativeElement).filter(e=>e.disabled!==!0)),this.optionsEffect=E(()=>{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&&pe(o,i.options,He,4),t&2&&B()},hostBindings:function(t,i){t&1&&v("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"},standalone:!0,features:[g],ngContentSelectors:je,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=O();S(Be),r(0,"spk-popover",1,0),J("isOpenChange",function(c){return d(o),K(i.isOpen,c)||(i.isOpen=c),u(c)}),v("closed",function(){return d(o),u(i.close("fromPopover"))}),r(2,"div",2),v("click",function(){return d(o),u(i.isOpen.set(!0))}),l(3),a(),r(4,"div",3),v("click",function(){return d(o),u(i.close("active"))}),l(5,1),a()()}t&2&&(G("isOpen",i.isOpen),Y("disableOpenByClick",!0)("above",i.above())("right",i.right())("options",Z(5,Le)))},dependencies:[me],encapsulation:2,changeDetection:0})}}return n})(),Pt=(()=>{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"]},standalone:!0,features:[g],decls:1,vars:2,consts:[[1,"progress-bar"]],template:function(t,i){t&1&&H(0,"div",0),t&2&&A("width",i.value(),"%")},encapsulation:2,changeDetection:0})}}return n})(),Ht=(()=>{class n{#e=R(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&&v("click",function(){return i.onClick()})},standalone:!0,features:[g],ngContentSelectors:w,decls:2,vars:0,consts:[[1,"radio"]],template:function(t,i){t&1&&(S(),H(0,"div",0),l(1))},encapsulation:2,changeDetection:0})}}return n})();var Bt=(()=>{class n{constructor(){this.value=p(null)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=f({type:n,selectors:[["spk-option"]],inputs:{value:[1,"value"]},standalone:!0,features:[g],ngContentSelectors:w,decls:1,vars:0,template:function(t,i){t&1&&(S(),l(0))},encapsulation:2,changeDetection:0})}}return n})(),ut=["primary","accent","tertiary","warn","success"],jt=(()=>{class n{constructor(){this.#e=R(se),this.#n=R(L),this.#c=new MutationObserver(e=>{for(let t of e)if(t.type==="childList"&&t.target instanceof HTMLElement){let i=[...Array.from(t.addedNodes),...Array.from(t.removedNodes)];for(let o=0;o<i.length;o++){let s=i[o];(s.nodeName==="OPTION"||s.nodeName==="SPK-OPTION")&&this.#s.set(!this.#s())}}}),this.optionsRef=x("optionsRef"),this.formFieldWrapperRef=x.required("formFieldWrapper"),this.inputWrapRef=x.required("inputWrap"),this.inputValue=P(""),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.#r=h(!1),this.#s=h(!1),this.#t=h(null),this.#a=h(null),this.#l=h(!1),this.#i=h(-1),this.isOpen=h(!1),this._isOpen=h(!1),this.#h=E(()=>{this._isOpen.set(this.isOpen()&&this.#o().length>0)},{allowSignalWrites:!0}),this.isSearchInput=b(()=>this.#t()?.type==="search"),this.optionsEl=b(()=>this.optionsRef()?.nativeElement),this.#o=b(()=>{this.#s();let e=this.optionsRef()?.nativeElement.querySelectorAll("option"),t=this.optionsRef()?.nativeElement.querySelectorAll("spk-option");return e?.length?Array.from(e):t?.length?Array.from(t):[]}),this.chipClass=b(()=>Array.from(this.#n.nativeElement.classList).filter(e=>ut.includes(e)).join(" ")),this._displayValue=b(()=>this.displayFn()?this.displayFn()(this.inputValue()):this.displayValue()??this.inputValue()),this.selectedOption=b(()=>this.#a()?this.#o().find(e=>(e.getAttribute("value")||e.getAttribute("ng-reflect-value"))===this.#a()):null),this.optionsOpenController=null,this.inputController=null,this.clickController=null,this.inputAbortController=null,this.#f=E(()=>{this.#r();let e=this.#n.nativeElement.querySelector("input");e&&(this.#y(e),e.addEventListener("inputValueChanged",t=>{this.inputValue.set(t.detail.value),this.selectMultiple()&&this.#d()}),this.#t.set(e),e.autocomplete="off",typeof e.value=="string"&&this.inputValue.set(e.value))},{allowSignalWrites:!0}),this.#m=E(()=>{this.inputController&&this.inputController.abort(),this.inputController=new AbortController;let e=this.#t();e&&e.addEventListener("keydown",t=>{(this.selectMultiple()||!this.isSearchInput()&&!this.isFreeText())&&t.preventDefault(),t.key==="Escape"?this.close():t.key==="ArrowDown"?this.#i()===null||this.#i()<0||this.#i()===this.#o().length-1?this.#i.set(this.#u()):this.#i.set(this.#i()+1):t.key==="ArrowUp"?this.#i()===null||this.#i()<0||this.#i()===0?this.#i.set(this.#o().length-1):this.#i.set(this.#i()-1):t.key==="Enter"?(this.isFreeText()&&this.close(!0),this.#i()>-1&&this.selected(this.getOptionElement(this.#i()))):t.key==="Tab"?this.close(!0):(this.#i.set(-1),this.isFreeText()&&this.calculateSelectedOptions())},{signal:this.inputController?.signal})}),this.#g=E(()=>{this.isOpen()&&this.#_()}),this.#v=E(()=>{let e=this.inputValue();this.#t()&&(this.#t().value=e??"",this.#t().dispatchEvent(new Event("input")))},{allowSignalWrites:!0}),this.#p=new MutationObserver(e=>{for(var t of e)t.type=="childList"&&t.target.classList.contains("input")&&this.#r.set(!this.#r())})}#e;#n;#c;#r;#s;#t;#a;#l;#i;#h;#o;#f;#m;#g;#v;ngOnInit(){this.#p.observe(this.inputWrapRef().nativeElement,{attributes:!0,childList:!0,subtree:!0})}getOptionElement(e){return this.#o()[e]}deselect(e,t=!1){e?.stopPropagation(),this.#t()&&(this.#t().value="",this.#t().dispatchEvent(new Event("input"))),this.#i.set(this.#u()),this.#l.set(!1),(t||!this.selectMultiple())&&(this.isOpen.set(!1),this.#t()?.blur())}selected(e){if(!e)return;let t=(e.getAttribute("value")||e.getAttribute("ng-reflect-value"))??"",i=this.#o().indexOf(e);if(e.hasAttribute("deselect"))return this.deselect(null,!0);if(this.#i.set(i),e&&!this.selectMultiple()){this.inputValue.set(t);for(let o=0;o<this.#o().length;o++){let s=this.#o()[o];(s.getAttribute("value")||s.getAttribute("ng-reflect-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.#l.set(!1),this.#a.set(null),this.selectMultiple()?this.#t()?.focus():(this.isOpen.set(!1),this.#t()?.blur())}calculateSelectedOptions(){setTimeout(()=>{let e=this.#o(),i=this.#t()?.value;for(let o=0;o<e.length;o++){let s=e[o];(s.getAttribute("value")||s.getAttribute("ng-reflect-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){this.#s.set(!this.#s());let t=this.#a();this.isSearchInput()&&!this.isFreeText()&&t&&setTimeout(()=>this.inputValue.set(t)),this.isOpen.set(!1),this.#l.set(!1),e||this.#t()?.blur(),this.#c.disconnect(),this.#C()}open(e){e.preventDefault(),!this.isOpen()&&(this.#c.observe(this.optionsEl(),{childList:!0,subtree:!0}),this.isSearchInput()&&!this.#l()&&!this.isFreeText()?(this.#a.set(this.inputValue()),this.inputValue.set(""),this.#t().focus(),this.#t().value="",this.#t().dispatchEvent(new Event("input")),this.#i.set(-1)):(this.isSearchInput()||this.selectMultiple())&&this.#t().focus(),this.#s.set(!this.#s()),this.isOpen.set(!0),this.#l.set(!0),this.#S(),this.#d())}#S(){this.clickController&&this.clickController.abort(),this.clickController=new AbortController,this.optionsEl()?.addEventListener("click",e=>{if(!e.target)return;this.#s.set(!this.#s());let t=e.target.closest("option"),i=e.target.closest("spk-option"),o=t||i;this.#o().indexOf(o)>-1&&this.selected(o)},{signal:this.clickController?.signal})}#C(){this.clickController&&this.clickController.abort()}#_(){for(let e=0;e<this.#o().length;e++){let t=this.#o()[e];this.#e.removeClass(t,"focused"),this.#i()===e&&(this.#e.addClass(t,"focused"),t.scrollIntoView({block:"center"}))}}#d(){let e=this.#t();if(!e)return;this.inputValue.set(e.value);let t=e.value.split(",");setTimeout(()=>{let i=this.#o();for(let o=0;o<i.length;o++){let s=i[o].getAttribute("ng-reflect-value");s&&t.includes(s)?this.#e.setAttribute(i[o],"selected","selected"):this.#e.removeAttribute(i[o],"selected")}})}#u(){let e=this.#o();for(let t=0;t<e.length;t++)if(!e[t].hasAttribute("deselect"))return t;return-1}#p;#y(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(),this.#p.disconnect()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=f({type:n,selectors:[["spk-select"]],viewQuery:function(t,i){t&1&&(F(i.optionsRef,We,5),F(i.formFieldWrapperRef,qe,5),F(i.inputWrapRef,Fe,5)),t&2&&B(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"},standalone:!0,features:[g],ngContentSelectors:Qe,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=O();S(Ue),r(0,"spk-popover",3,0),J("isOpenChange",function(c){return d(o),K(i.isOpen,c)||(i.isOpen=c),u(c)}),v("closed",function(){return d(o),u(i.close())}),r(2,"spk-form-field",4),v("click",function(c){return d(o),u(i.open(c))}),l(3,0,["ngProjectAs","label",5,["label"]]),r(4,"div",5,1),V(6,Xe,2,1,"div",6)(7,ze,2,1,"div",6),l(8,1),a(),V(9,Ge,4,0,"div",7)(10,Ke,4,0,"div",8)(11,Je,4,2,"div",9),a(),r(12,"div",10,2),l(14,2),a()()}t&2&&(G("isOpen",i.isOpen),Y("disableOpenByClick",!0)("options",Z(7,Ne)),D(2),U(i.readonly()?"readonly":""),D(4),M(i.selectMultiple()?6:i._displayValue()&&i.isSearchInput()&&!i.isOpen()||i._displayValue()&&!i.isSearchInput()?7:-1),D(3),M((i.inputValue()&&!i.isOpen()&&i.inputValue().length>0||i.selectedOption())&&!i.hideClearButton()?9:i.isSearchInput()&&!i.selectedOption()?10:11))},dependencies:[pt,te,ct,me],encapsulation:2,changeDetection:0})}}return n})(),Lt=(()=>{class n{constructor(){this.openWidth=280,this.openWidthTreshold=this.openWidth*.9,this.disableDrag=p(!1),this.isOpen=P(!1),this.type=p(""),this.dragImageElement=x.required("dragImageElement"),this.dragIsEnding=h(!1),this.dragIsOnScreen=h(!0),this.isDragging=h(!1),this.dragPositionX=h(0),this.dragActualPositionX=b(()=>{let e=this.dragPositionX(),t=.32;return e>this.openWidthTreshold?this.openWidthTreshold+(e-this.openWidthTreshold)*t:e}),this.draggingStyle=b(()=>this.type()!=="overlay"?null:this.isDragging()?`translateX(${this.dragActualPositionX()}px)`:this.isOpen()?`translateX(${this.openWidth}px)`:"translateX(0px)"),this.draggingEffect=E(()=>{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.#n(e)}dragStart(e){e.stopPropagation(),this.isDragging.set(!0),this.#n(e)}#n(e){e.dataTransfer?.setDragImage(this.dragImageElement().nativeElement,0,0)}drag(e){e.stopPropagation(),setTimeout(()=>{this.isDragging()&&this.dragIsOnScreen()&&this.dragPositionX.set(e.clientX)}),this.#n(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&&F(i.dragImageElement,Ze,5),t&2&&B()},hostVars:10,hostBindings:function(t,i){t&2&&W("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"},standalone:!0,features:[g],ngContentSelectors:tt,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&&(S(et),V(0,it,2,0,"div",1)(1,nt,1,0,"div",2),r(2,"div",3),l(3),a(),r(4,"div",4),V(5,ot,1,0,"div",5),r(6,"div",6),l(7,1),a(),r(8,"main"),l(9,2),a()()),t&2&&(M(i.type()==="overlay"?0:-1),D(),M(i.type()==="overlay"&&i.isDragging()?1:-1),D(3),A("transform",i.draggingStyle()),D(),M(i.type()==="overlay"&&!i.disableDrag()?5:-1))},encapsulation:2,changeDetection:0})}}return n})();var Wt=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=f({type:n,selectors:[["spk-stepper"]],standalone:!0,features:[g],ngContentSelectors:w,decls:1,vars:0,template:function(t,i){t&1&&(S(),l(0))},encapsulation:2,changeDetection:0})}}return n})();var qt=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=f({type:n,selectors:[["spk-toggle"]],standalone:!0,features:[g],ngContentSelectors:w,decls:3,vars:0,consts:[[1,"box"],[1,"knob"]],template:function(t,i){t&1&&(S(),r(0,"div",0),H(1,"div",1),a(),l(2))},encapsulation:2,changeDetection:0})}}return n})(),Ut=(()=>{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=P(!1),this.closed=j(),this.triggerRef=x.required("triggerRef"),this.tooltipRef=x.required("tooltipRef"),this.id=h("--"+crypto.randomUUID()),this.menuStyle=h(null),this.isCalculatingPosition=b(()=>{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=E(()=>{if(!this.isCalculatingPosition())return;this.abortController&&this.abortController.abort(),this.abortController=new AbortController;let t=this.abortController.signal;this.calculateMenuPosition(),this.#n(this.tooltipRef()?.nativeElement).addEventListener("scroll",()=>this.calculateMenuPosition(),{signal:t}),document.addEventListener("resize",()=>this.calculateMenuPosition(),{signal:t})},{allowSignalWrites:!0}),this.scrollableStyles=["scroll","auto"]}#e;#n(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,T=c+t.height>window.innerHeight;if(this.SUPPORTS_ANCHOR)this._above.set(T),this._right.set(y);else{if(this.above()){let k=e.top-t.height-this.#e;k>=0&&(c=k)}else T&&(c=e.top-t.height-this.#e);if(this.right()){let k=e.right-t.width;k>=0&&(s=k)}else y&&(c=T?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&&(F(i.triggerRef,fe,5),F(i.tooltipRef,st,5)),t&2&&B(2)},hostVars:6,hostBindings:function(t,i){t&2&&W("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"},standalone:!0,features:[g],ngContentSelectors:w,decls:6,vars:7,consts:[["triggerRef",""],["tooltipRef",""],[1,"trigger",3,"mouseover","mouseout"],["popover","",1,"tooltip"]],template:function(t,i){if(t&1){let o=O();S(),r(0,"div",2,0),v("mouseover",function(){return d(o),u(i.isOpen.set(!0))})("mouseout",function(){return d(o),u(i.isOpen.set(!1))}),l(2),a(),r(3,"div",3,1),_(5),a()}t&2&&(A("anchor-name",i.id()),D(3),X(i.menuStyle()),A("position-anchor",i.id()),D(2),z(" ",i.message()," "))},encapsulation:2,changeDetection:0})}}return n})(),Qt=(()=>{class n{constructor(){this.filesOver=h(!1),this.filesDropped=j()}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=oe({type:n,selectors:[["","spkDragDrop",""]],hostVars:2,hostBindings:function(t,i){t&1&&v("dragover",function(s){return i.onDragOver(s)})("dragleave",function(s){return i.onDragLeave(s)})("drop",function(s){return i.ondrop(s)}),t&2&&W("filesover",i.filesOver())},outputs:{filesDropped:"filesDropped"},standalone:!0})}}return n})();export{te as a,Tt as b,xt as c,at as d,Mt as e,Ft as f,lt as g,It as h,Vt as i,ct as j,pt as k,At as l,Rt as m,Pt as n,Ht as o,Bt as p,jt as q,Lt as r,Wt as s,qt as t,Ut as u,Qt as v};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{e as S}from"./chunk-
|
|
1
|
+
import{e as S}from"./chunk-AIWAOXTQ.js";import"./chunk-4EODC7AQ.js";import"./chunk-ZSOWH34L.js";import"./chunk-N6REZCKW.js";import"./chunk-73UOOUBD.js";import{o as C,s as v}from"./chunk-IEVRQDB6.js";import{a as f,b as k,d as w,e as g}from"./chunk-22ZYSOTR.js";import"./chunk-JNQHJPEL.js";import"./chunk-LZSE733H.js";import{Gb as p,Oa as s,Ob as d,Qb as l,W as r,Y as u,cb as a,lb as o,mb as n,nb as i}from"./chunk-QHJTF3V4.js";import"./chunk-7CGTOI24.js";var F=e=>["/restore-flow",e,"select-files"],R=e=>["/restore-flow",e,"options"],c=class e{#t=r(f);#e=r(S);backupId=this.#e.backupId;ngOnInit(){this.#e.init(this.#t.snapshot.params.id)}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=u({type:e,selectors:[["app-restore-flow"]],standalone:!0,features:[d],decls:9,vars:6,consts:[["step","","routerLinkActive","active",3,"routerLink"]],template:function(t,m){t&1&&(o(0,"spk-stepper")(1,"div",0),i(2,"spk-radio"),p(3," Select files "),n(),o(4,"div",0),i(5,"spk-radio"),p(6," Options "),n()(),o(7,"section"),i(8,"router-outlet"),n()),t&2&&(s(),a("routerLink",l(2,F,m.backupId())),s(3),a("routerLink",l(4,R,m.backupId())))},dependencies:[v,C,k,w,g],styles:["[_nghost-%COMP%]{display:block}spk-stepper[_ngcontent-%COMP%]{max-width:31.25rem;margin:2.5rem auto}section[_ngcontent-%COMP%]{max-width:31.25rem;margin:0 auto 2.5rem}"],changeDetection:0})};export{c as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Aa as G,Ba as Y,Ca as K,Da as q,Ea as W,Fa as X,Ga as J,Ha as m,La as M,N as y,Oa as Q,P as l,S as O,U as a,W as E,aa as $,bc as ee,hc as L,ic as te,jc as ne,kc as f,nc as re,oa as S,pa as I,rc as oe,ta as Z,tc as P,ua as N,uc as se,va as z,wa as w,xa as _,ya as g,za as v}from"./chunk-NUWA7AOR.js";import{a as b,b as V}from"./chunk-7CGTOI24.js";var j=class extends ne{constructor(){super(...arguments),this.supportsDOMEvents=!0}},x=class r extends j{static makeCurrent(){te(new r)}onAndCancel(n,e,t){return n.addEventListener(e,t),()=>{n.removeEventListener(e,t)}}dispatchEvent(n,e){n.dispatchEvent(e)}remove(n){n.remove()}createElement(n,e){return e=e||this.getDefaultDocument(),e.createElement(n)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(n){return n.nodeType===Node.ELEMENT_NODE}isShadowRoot(n){return n instanceof DocumentFragment}getGlobalEventTarget(n,e){return e==="window"?window:e==="document"?n:e==="body"?n.body:null}getBaseHref(n){let e=pe();return e==null?null:me(e)}resetBaseElement(){T=null}getUserAgent(){return window.navigator.userAgent}getCookie(n){return re(document.cookie,n)}},T=null;function pe(){return T=T||document.querySelector("base"),T?T.getAttribute("href"):null}function me(r){return new URL(r,document.baseURI).pathname}var ye=(()=>{class r{build(){return new XMLHttpRequest}static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac})}}return r})(),U=new O(""),ue=(()=>{class r{constructor(e,t){this._zone=t,this._eventNameToPlugin=new Map,e.forEach(o=>{o.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,t,o){return this._findPluginFor(t).addEventListener(e,t,o)}getZone(){return this._zone}_findPluginFor(e){let t=this._eventNameToPlugin.get(e);if(t)return t;if(t=this._plugins.find(s=>s.supports(e)),!t)throw new y(5101,!1);return this._eventNameToPlugin.set(e,t),t}static{this.\u0275fac=function(t){return new(t||r)(a(U),a(S))}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac})}}return r})(),C=class{constructor(n){this._doc=n}},H="ng-app-id",de=(()=>{class r{constructor(e,t,o,s={}){this.doc=e,this.appId=t,this.nonce=o,this.platformId=s,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=P(s),this.resetHostNodes()}addStyles(e){for(let t of e)this.changeUsageCount(t,1)===1&&this.onStyleAdded(t)}removeStyles(e){for(let t of e)this.changeUsageCount(t,-1)<=0&&this.onStyleRemoved(t)}ngOnDestroy(){let e=this.styleNodesInDOM;e&&(e.forEach(t=>t.remove()),e.clear());for(let t of this.getAllStyles())this.onStyleRemoved(t);this.resetHostNodes()}addHost(e){this.hostNodes.add(e);for(let t of this.getAllStyles())this.addStyleToHost(e,t)}removeHost(e){this.hostNodes.delete(e)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(e){for(let t of this.hostNodes)this.addStyleToHost(t,e)}onStyleRemoved(e){let t=this.styleRef;t.get(e)?.elements?.forEach(o=>o.remove()),t.delete(e)}collectServerRenderedStyles(){let e=this.doc.head?.querySelectorAll(`style[${H}="${this.appId}"]`);if(e?.length){let t=new Map;return e.forEach(o=>{o.textContent!=null&&t.set(o.textContent,o)}),t}return null}changeUsageCount(e,t){let o=this.styleRef;if(o.has(e)){let s=o.get(e);return s.usage+=t,s.usage}return o.set(e,{usage:t,elements:[]}),t}getStyleElement(e,t){let o=this.styleNodesInDOM,s=o?.get(t);if(s?.parentNode===e)return o.delete(t),s.removeAttribute(H),s;{let i=this.doc.createElement("style");return this.nonce&&i.setAttribute("nonce",this.nonce),i.textContent=t,this.platformIsServer&&i.setAttribute(H,this.appId),e.appendChild(i),i}}addStyleToHost(e,t){let o=this.getStyleElement(e,t),s=this.styleRef,i=s.get(t)?.elements;i?i.push(o):s.set(t,{elements:[o],usage:1})}resetHostNodes(){let e=this.hostNodes;e.clear(),e.add(this.doc.head)}static{this.\u0275fac=function(t){return new(t||r)(a(f),a(N),a(_,8),a(w))}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac})}}return r})(),k={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},B=/%COMP%/g,le="%COMP%",ge=`_nghost-${le}`,ve=`_ngcontent-${le}`,Ee=!0,Se=new O("",{providedIn:"root",factory:()=>Ee});function we(r){return ve.replace(B,r)}function Me(r){return ge.replace(B,r)}function fe(r,n){return n.map(e=>e.replace(B,r))}var ie=(()=>{class r{constructor(e,t,o,s,i,c,u,d=null){this.eventManager=e,this.sharedStylesHost=t,this.appId=o,this.removeStylesOnCompDestroy=s,this.doc=i,this.platformId=c,this.ngZone=u,this.nonce=d,this.rendererByCompId=new Map,this.platformIsServer=P(c),this.defaultRenderer=new D(e,i,u,this.platformIsServer)}createRenderer(e,t){if(!e||!t)return this.defaultRenderer;this.platformIsServer&&t.encapsulation===E.ShadowDom&&(t=V(b({},t),{encapsulation:E.Emulated}));let o=this.getOrCreateRenderer(e,t);return o instanceof A?o.applyToHost(e):o instanceof R&&o.applyStyles(),o}getOrCreateRenderer(e,t){let o=this.rendererByCompId,s=o.get(t.id);if(!s){let i=this.doc,c=this.ngZone,u=this.eventManager,d=this.sharedStylesHost,h=this.removeStylesOnCompDestroy,p=this.platformIsServer;switch(t.encapsulation){case E.Emulated:s=new A(u,d,t,this.appId,h,i,c,p);break;case E.ShadowDom:return new F(u,d,e,t,i,c,this.nonce,p);default:s=new R(u,d,t,h,i,c,p);break}o.set(t.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}static{this.\u0275fac=function(t){return new(t||r)(a(ue),a(de),a(N),a(Se),a(f),a(w),a(S),a(_))}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac})}}return r})(),D=class{constructor(n,e,t,o){this.eventManager=n,this.doc=e,this.ngZone=t,this.platformIsServer=o,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(n,e){return e?this.doc.createElementNS(k[e]||e,n):this.doc.createElement(n)}createComment(n){return this.doc.createComment(n)}createText(n){return this.doc.createTextNode(n)}appendChild(n,e){(ae(n)?n.content:n).appendChild(e)}insertBefore(n,e,t){n&&(ae(n)?n.content:n).insertBefore(e,t)}removeChild(n,e){e.remove()}selectRootElement(n,e){let t=typeof n=="string"?this.doc.querySelector(n):n;if(!t)throw new y(-5104,!1);return e||(t.textContent=""),t}parentNode(n){return n.parentNode}nextSibling(n){return n.nextSibling}setAttribute(n,e,t,o){if(o){e=o+":"+e;let s=k[o];s?n.setAttributeNS(s,e,t):n.setAttribute(e,t)}else n.setAttribute(e,t)}removeAttribute(n,e,t){if(t){let o=k[t];o?n.removeAttributeNS(o,e):n.removeAttribute(`${t}:${e}`)}else n.removeAttribute(e)}addClass(n,e){n.classList.add(e)}removeClass(n,e){n.classList.remove(e)}setStyle(n,e,t,o){o&(M.DashCase|M.Important)?n.style.setProperty(e,t,o&M.Important?"important":""):n.style[e]=t}removeStyle(n,e,t){t&M.DashCase?n.style.removeProperty(e):n.style[e]=""}setProperty(n,e,t){n!=null&&(n[e]=t)}setValue(n,e){n.nodeValue=e}listen(n,e,t){if(typeof n=="string"&&(n=L().getGlobalEventTarget(this.doc,n),!n))throw new Error(`Unsupported event target ${n} for event ${e}`);return this.eventManager.addEventListener(n,e,this.decoratePreventDefault(t))}decoratePreventDefault(n){return e=>{if(e==="__ngUnwrap__")return n;(this.platformIsServer?this.ngZone.runGuarded(()=>n(e)):n(e))===!1&&e.preventDefault()}}};function ae(r){return r.tagName==="TEMPLATE"&&r.content!==void 0}var F=class extends D{constructor(n,e,t,o,s,i,c,u){super(n,s,i,u),this.sharedStylesHost=e,this.hostEl=t,this.shadowRoot=t.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let d=fe(o.id,o.styles);for(let h of d){let p=document.createElement("style");c&&p.setAttribute("nonce",c),p.textContent=h,this.shadowRoot.appendChild(p)}}nodeOrShadowRoot(n){return n===this.hostEl?this.shadowRoot:n}appendChild(n,e){return super.appendChild(this.nodeOrShadowRoot(n),e)}insertBefore(n,e,t){return super.insertBefore(this.nodeOrShadowRoot(n),e,t)}removeChild(n,e){return super.removeChild(null,e)}parentNode(n){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(n)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},R=class extends D{constructor(n,e,t,o,s,i,c,u){super(n,s,i,c),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=o,this.styles=u?fe(u,t.styles):t.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}},A=class extends R{constructor(n,e,t,o,s,i,c,u){let d=o+"-"+t.id;super(n,e,t,s,i,c,u,d),this.contentAttr=we(d),this.hostAttr=Me(d)}applyToHost(n){this.applyStyles(),this.setAttribute(n,this.hostAttr,"")}createElement(n,e){let t=super.createElement(n,e);return super.setAttribute(t,this.contentAttr,""),t}},Te=(()=>{class r extends C{constructor(e){super(e)}supports(e){return!0}addEventListener(e,t,o){return e.addEventListener(t,o,!1),()=>this.removeEventListener(e,t,o)}removeEventListener(e,t,o){return e.removeEventListener(t,o)}static{this.\u0275fac=function(t){return new(t||r)(a(f))}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac})}}return r})(),ce=["alt","control","meta","shift"],De={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Re={alt:r=>r.altKey,control:r=>r.ctrlKey,meta:r=>r.metaKey,shift:r=>r.shiftKey},Ce=(()=>{class r extends C{constructor(e){super(e)}supports(e){return r.parseEventName(e)!=null}addEventListener(e,t,o){let s=r.parseEventName(t),i=r.eventCallback(s.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>L().onAndCancel(e,s.domEventName,i))}static parseEventName(e){let t=e.toLowerCase().split("."),o=t.shift();if(t.length===0||!(o==="keydown"||o==="keyup"))return null;let s=r._normalizeKey(t.pop()),i="",c=t.indexOf("code");if(c>-1&&(t.splice(c,1),i="code."),ce.forEach(d=>{let h=t.indexOf(d);h>-1&&(t.splice(h,1),i+=d+".")}),i+=s,t.length!=0||s.length===0)return null;let u={};return u.domEventName=o,u.fullKey=i,u}static matchEventFullKeyCode(e,t){let o=De[e.key]||e.key,s="";return t.indexOf("code.")>-1&&(o=e.code,s="code."),o==null||!o?!1:(o=o.toLowerCase(),o===" "?o="space":o==="."&&(o="dot"),ce.forEach(i=>{if(i!==o){let c=Re[i];c(e)&&(s+=i+".")}}),s+=o,s===t)}static eventCallback(e,t,o){return s=>{r.matchEventFullKeyCode(s,e)&&o.runGuarded(()=>t(s))}}static _normalizeKey(e){return e==="esc"?"escape":e}static{this.\u0275fac=function(t){return new(t||r)(a(f))}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac})}}return r})();function ft(r,n){return ee(b({rootComponent:r},Ae(n)))}function Ae(r){return{appProviders:[..._e,...r?.providers??[]],platformProviders:Ne}}function be(){x.makeCurrent()}function Oe(){return new I}function Ie(){return Z(document),document}var Ne=[{provide:w,useValue:oe},{provide:z,useValue:be,multi:!0},{provide:f,useFactory:Ie,deps:[]}];var _e=[{provide:$,useValue:"root"},{provide:I,useFactory:Oe,deps:[]},{provide:U,useClass:Te,multi:!0,deps:[f,S,w]},{provide:U,useClass:Ce,multi:!0,deps:[f]},ie,de,ue,{provide:Q,useExisting:ie},{provide:se,useClass:ye,deps:[]},[]];var ht=(()=>{class r{constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static{this.\u0275fac=function(t){return new(t||r)(a(f))}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var Le=(()=>{class r{static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275prov=l({token:r,factory:function(t){let o=null;return t?o=new(t||r):o=a(Pe),o},providedIn:"root"})}}return r})(),Pe=(()=>{class r extends Le{constructor(e){super(),this._doc=e}sanitize(e,t){if(t==null)return null;switch(e){case m.NONE:return t;case m.HTML:return v(t,"HTML")?g(t):J(this._doc,String(t)).toString();case m.STYLE:return v(t,"Style")?g(t):t;case m.SCRIPT:if(v(t,"Script"))return g(t);throw new y(5200,!1);case m.URL:return v(t,"URL")?g(t):X(String(t));case m.RESOURCE_URL:if(v(t,"ResourceURL"))return g(t);throw new y(5201,!1);default:throw new y(5202,!1)}}bypassSecurityTrustHtml(e){return G(e)}bypassSecurityTrustStyle(e){return Y(e)}bypassSecurityTrustScript(e){return K(e)}bypassSecurityTrustUrl(e){return q(e)}bypassSecurityTrustResourceUrl(e){return W(e)}static{this.\u0275fac=function(t){return new(t||r)(a(f))}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();export{ft as a,ht as b,Le as c};
|
|
1
|
+
import{Aa as g,Ba as v,Ca as G,Da as Y,Ea as K,Fa as q,Ga as W,Ha as X,Ia as J,Ja as m,Na as M,O as y,Q as l,Qa as Q,T as O,V as a,X as E,ba as $,cc as ee,jc as L,kc as te,lc as ne,mc as f,pa as S,pc as re,qa as I,tc as oe,va as Z,vc as P,wa as N,wc as se,xa as z,ya as w,za as _}from"./chunk-QHJTF3V4.js";import{a as b,b as V}from"./chunk-7CGTOI24.js";var j=class extends ne{constructor(){super(...arguments),this.supportsDOMEvents=!0}},x=class r extends j{static makeCurrent(){te(new r)}onAndCancel(n,e,t){return n.addEventListener(e,t),()=>{n.removeEventListener(e,t)}}dispatchEvent(n,e){n.dispatchEvent(e)}remove(n){n.remove()}createElement(n,e){return e=e||this.getDefaultDocument(),e.createElement(n)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(n){return n.nodeType===Node.ELEMENT_NODE}isShadowRoot(n){return n instanceof DocumentFragment}getGlobalEventTarget(n,e){return e==="window"?window:e==="document"?n:e==="body"?n.body:null}getBaseHref(n){let e=pe();return e==null?null:me(e)}resetBaseElement(){T=null}getUserAgent(){return window.navigator.userAgent}getCookie(n){return re(document.cookie,n)}},T=null;function pe(){return T=T||document.querySelector("base"),T?T.getAttribute("href"):null}function me(r){return new URL(r,document.baseURI).pathname}var ye=(()=>{class r{build(){return new XMLHttpRequest}static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac})}}return r})(),U=new O(""),ue=(()=>{class r{constructor(e,t){this._zone=t,this._eventNameToPlugin=new Map,e.forEach(o=>{o.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,t,o){return this._findPluginFor(t).addEventListener(e,t,o)}getZone(){return this._zone}_findPluginFor(e){let t=this._eventNameToPlugin.get(e);if(t)return t;if(t=this._plugins.find(s=>s.supports(e)),!t)throw new y(5101,!1);return this._eventNameToPlugin.set(e,t),t}static{this.\u0275fac=function(t){return new(t||r)(a(U),a(S))}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac})}}return r})(),C=class{constructor(n){this._doc=n}},H="ng-app-id",de=(()=>{class r{constructor(e,t,o,s={}){this.doc=e,this.appId=t,this.nonce=o,this.platformId=s,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=P(s),this.resetHostNodes()}addStyles(e){for(let t of e)this.changeUsageCount(t,1)===1&&this.onStyleAdded(t)}removeStyles(e){for(let t of e)this.changeUsageCount(t,-1)<=0&&this.onStyleRemoved(t)}ngOnDestroy(){let e=this.styleNodesInDOM;e&&(e.forEach(t=>t.remove()),e.clear());for(let t of this.getAllStyles())this.onStyleRemoved(t);this.resetHostNodes()}addHost(e){this.hostNodes.add(e);for(let t of this.getAllStyles())this.addStyleToHost(e,t)}removeHost(e){this.hostNodes.delete(e)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(e){for(let t of this.hostNodes)this.addStyleToHost(t,e)}onStyleRemoved(e){let t=this.styleRef;t.get(e)?.elements?.forEach(o=>o.remove()),t.delete(e)}collectServerRenderedStyles(){let e=this.doc.head?.querySelectorAll(`style[${H}="${this.appId}"]`);if(e?.length){let t=new Map;return e.forEach(o=>{o.textContent!=null&&t.set(o.textContent,o)}),t}return null}changeUsageCount(e,t){let o=this.styleRef;if(o.has(e)){let s=o.get(e);return s.usage+=t,s.usage}return o.set(e,{usage:t,elements:[]}),t}getStyleElement(e,t){let o=this.styleNodesInDOM,s=o?.get(t);if(s?.parentNode===e)return o.delete(t),s.removeAttribute(H),s;{let i=this.doc.createElement("style");return this.nonce&&i.setAttribute("nonce",this.nonce),i.textContent=t,this.platformIsServer&&i.setAttribute(H,this.appId),e.appendChild(i),i}}addStyleToHost(e,t){let o=this.getStyleElement(e,t),s=this.styleRef,i=s.get(t)?.elements;i?i.push(o):s.set(t,{elements:[o],usage:1})}resetHostNodes(){let e=this.hostNodes;e.clear(),e.add(this.doc.head)}static{this.\u0275fac=function(t){return new(t||r)(a(f),a(N),a(_,8),a(w))}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac})}}return r})(),k={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/",math:"http://www.w3.org/1998/Math/MathML"},B=/%COMP%/g,le="%COMP%",ge=`_nghost-${le}`,ve=`_ngcontent-${le}`,Ee=!0,Se=new O("",{providedIn:"root",factory:()=>Ee});function we(r){return ve.replace(B,r)}function Me(r){return ge.replace(B,r)}function fe(r,n){return n.map(e=>e.replace(B,r))}var ie=(()=>{class r{constructor(e,t,o,s,i,c,u,d=null){this.eventManager=e,this.sharedStylesHost=t,this.appId=o,this.removeStylesOnCompDestroy=s,this.doc=i,this.platformId=c,this.ngZone=u,this.nonce=d,this.rendererByCompId=new Map,this.platformIsServer=P(c),this.defaultRenderer=new D(e,i,u,this.platformIsServer)}createRenderer(e,t){if(!e||!t)return this.defaultRenderer;this.platformIsServer&&t.encapsulation===E.ShadowDom&&(t=V(b({},t),{encapsulation:E.Emulated}));let o=this.getOrCreateRenderer(e,t);return o instanceof A?o.applyToHost(e):o instanceof R&&o.applyStyles(),o}getOrCreateRenderer(e,t){let o=this.rendererByCompId,s=o.get(t.id);if(!s){let i=this.doc,c=this.ngZone,u=this.eventManager,d=this.sharedStylesHost,h=this.removeStylesOnCompDestroy,p=this.platformIsServer;switch(t.encapsulation){case E.Emulated:s=new A(u,d,t,this.appId,h,i,c,p);break;case E.ShadowDom:return new F(u,d,e,t,i,c,this.nonce,p);default:s=new R(u,d,t,h,i,c,p);break}o.set(t.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}static{this.\u0275fac=function(t){return new(t||r)(a(ue),a(de),a(N),a(Se),a(f),a(w),a(S),a(_))}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac})}}return r})(),D=class{constructor(n,e,t,o){this.eventManager=n,this.doc=e,this.ngZone=t,this.platformIsServer=o,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(n,e){return e?this.doc.createElementNS(k[e]||e,n):this.doc.createElement(n)}createComment(n){return this.doc.createComment(n)}createText(n){return this.doc.createTextNode(n)}appendChild(n,e){(ae(n)?n.content:n).appendChild(e)}insertBefore(n,e,t){n&&(ae(n)?n.content:n).insertBefore(e,t)}removeChild(n,e){e.remove()}selectRootElement(n,e){let t=typeof n=="string"?this.doc.querySelector(n):n;if(!t)throw new y(-5104,!1);return e||(t.textContent=""),t}parentNode(n){return n.parentNode}nextSibling(n){return n.nextSibling}setAttribute(n,e,t,o){if(o){e=o+":"+e;let s=k[o];s?n.setAttributeNS(s,e,t):n.setAttribute(e,t)}else n.setAttribute(e,t)}removeAttribute(n,e,t){if(t){let o=k[t];o?n.removeAttributeNS(o,e):n.removeAttribute(`${t}:${e}`)}else n.removeAttribute(e)}addClass(n,e){n.classList.add(e)}removeClass(n,e){n.classList.remove(e)}setStyle(n,e,t,o){o&(M.DashCase|M.Important)?n.style.setProperty(e,t,o&M.Important?"important":""):n.style[e]=t}removeStyle(n,e,t){t&M.DashCase?n.style.removeProperty(e):n.style[e]=""}setProperty(n,e,t){n!=null&&(n[e]=t)}setValue(n,e){n.nodeValue=e}listen(n,e,t){if(typeof n=="string"&&(n=L().getGlobalEventTarget(this.doc,n),!n))throw new Error(`Unsupported event target ${n} for event ${e}`);return this.eventManager.addEventListener(n,e,this.decoratePreventDefault(t))}decoratePreventDefault(n){return e=>{if(e==="__ngUnwrap__")return n;(this.platformIsServer?this.ngZone.runGuarded(()=>n(e)):n(e))===!1&&e.preventDefault()}}};function ae(r){return r.tagName==="TEMPLATE"&&r.content!==void 0}var F=class extends D{constructor(n,e,t,o,s,i,c,u){super(n,s,i,u),this.sharedStylesHost=e,this.hostEl=t,this.shadowRoot=t.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let d=fe(o.id,o.styles);for(let h of d){let p=document.createElement("style");c&&p.setAttribute("nonce",c),p.textContent=h,this.shadowRoot.appendChild(p)}}nodeOrShadowRoot(n){return n===this.hostEl?this.shadowRoot:n}appendChild(n,e){return super.appendChild(this.nodeOrShadowRoot(n),e)}insertBefore(n,e,t){return super.insertBefore(this.nodeOrShadowRoot(n),e,t)}removeChild(n,e){return super.removeChild(null,e)}parentNode(n){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(n)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},R=class extends D{constructor(n,e,t,o,s,i,c,u){super(n,s,i,c),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=o,this.styles=u?fe(u,t.styles):t.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}},A=class extends R{constructor(n,e,t,o,s,i,c,u){let d=o+"-"+t.id;super(n,e,t,s,i,c,u,d),this.contentAttr=we(d),this.hostAttr=Me(d)}applyToHost(n){this.applyStyles(),this.setAttribute(n,this.hostAttr,"")}createElement(n,e){let t=super.createElement(n,e);return super.setAttribute(t,this.contentAttr,""),t}},Te=(()=>{class r extends C{constructor(e){super(e)}supports(e){return!0}addEventListener(e,t,o){return e.addEventListener(t,o,!1),()=>this.removeEventListener(e,t,o)}removeEventListener(e,t,o){return e.removeEventListener(t,o)}static{this.\u0275fac=function(t){return new(t||r)(a(f))}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac})}}return r})(),ce=["alt","control","meta","shift"],De={"\b":"Backspace"," ":"Tab","\x7F":"Delete","\x1B":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},Re={alt:r=>r.altKey,control:r=>r.ctrlKey,meta:r=>r.metaKey,shift:r=>r.shiftKey},Ce=(()=>{class r extends C{constructor(e){super(e)}supports(e){return r.parseEventName(e)!=null}addEventListener(e,t,o){let s=r.parseEventName(t),i=r.eventCallback(s.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>L().onAndCancel(e,s.domEventName,i))}static parseEventName(e){let t=e.toLowerCase().split("."),o=t.shift();if(t.length===0||!(o==="keydown"||o==="keyup"))return null;let s=r._normalizeKey(t.pop()),i="",c=t.indexOf("code");if(c>-1&&(t.splice(c,1),i="code."),ce.forEach(d=>{let h=t.indexOf(d);h>-1&&(t.splice(h,1),i+=d+".")}),i+=s,t.length!=0||s.length===0)return null;let u={};return u.domEventName=o,u.fullKey=i,u}static matchEventFullKeyCode(e,t){let o=De[e.key]||e.key,s="";return t.indexOf("code.")>-1&&(o=e.code,s="code."),o==null||!o?!1:(o=o.toLowerCase(),o===" "?o="space":o==="."&&(o="dot"),ce.forEach(i=>{if(i!==o){let c=Re[i];c(e)&&(s+=i+".")}}),s+=o,s===t)}static eventCallback(e,t,o){return s=>{r.matchEventFullKeyCode(s,e)&&o.runGuarded(()=>t(s))}}static _normalizeKey(e){return e==="esc"?"escape":e}static{this.\u0275fac=function(t){return new(t||r)(a(f))}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac})}}return r})();function ft(r,n){return ee(b({rootComponent:r},Ae(n)))}function Ae(r){return{appProviders:[..._e,...r?.providers??[]],platformProviders:Ne}}function be(){x.makeCurrent()}function Oe(){return new I}function Ie(){return Z(document),document}var Ne=[{provide:w,useValue:oe},{provide:z,useValue:be,multi:!0},{provide:f,useFactory:Ie,deps:[]}];var _e=[{provide:$,useValue:"root"},{provide:I,useFactory:Oe,deps:[]},{provide:U,useClass:Te,multi:!0,deps:[f,S,w]},{provide:U,useClass:Ce,multi:!0,deps:[f]},ie,de,ue,{provide:Q,useExisting:ie},{provide:se,useClass:ye,deps:[]},[]];var ht=(()=>{class r{constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static{this.\u0275fac=function(t){return new(t||r)(a(f))}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var Le=(()=>{class r{static{this.\u0275fac=function(t){return new(t||r)}}static{this.\u0275prov=l({token:r,factory:function(t){let o=null;return t?o=new(t||r):o=a(Pe),o},providedIn:"root"})}}return r})(),Pe=(()=>{class r extends Le{constructor(e){super(),this._doc=e}sanitize(e,t){if(t==null)return null;switch(e){case m.NONE:return t;case m.HTML:return v(t,"HTML")?g(t):J(this._doc,String(t)).toString();case m.STYLE:return v(t,"Style")?g(t):t;case m.SCRIPT:if(v(t,"Script"))return g(t);throw new y(5200,!1);case m.URL:return v(t,"URL")?g(t):X(String(t));case m.RESOURCE_URL:if(v(t,"ResourceURL"))return g(t);throw new y(5201,!1);default:throw new y(5202,!1)}}bypassSecurityTrustHtml(e){return G(e)}bypassSecurityTrustStyle(e){return Y(e)}bypassSecurityTrustScript(e){return K(e)}bypassSecurityTrustUrl(e){return q(e)}bypassSecurityTrustResourceUrl(e){return W(e)}static{this.\u0275fac=function(t){return new(t||r)(a(f))}}static{this.\u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();export{ft as a,ht as b,Le as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{l as a,m as b}from"./chunk-FRD2BVV6.js";import"./chunk-ZSOWH34L.js";import"./chunk-SFRGISK2.js";import"./chunk-DNHLTHLR.js";import"./chunk-N6REZCKW.js";import"./chunk-73UOOUBD.js";import"./chunk-IEVRQDB6.js";import"./chunk-22ZYSOTR.js";import"./chunk-JNQHJPEL.js";import"./chunk-LZSE733H.js";import"./chunk-QHJTF3V4.js";import"./chunk-7CGTOI24.js";export{a as createSourceDataForm,b as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{L as R,Q as u,V as c,l as I,m as B,p as V,v as T,xc as v,y as f,zc as d}from"./chunk-QHJTF3V4.js";import{a as b,b as D}from"./chunk-7CGTOI24.js";var k=class{_fns;constructor(){this._fns=[]}eject(e){let p=this._fns.indexOf(e);p!==-1&&(this._fns=[...this._fns.slice(0,p),...this._fns.slice(p+1)])}use(e){this._fns=[...this._fns,e]}},t={BASE:"",CREDENTIALS:"include",ENCODE_PATH:void 0,HEADERS:void 0,PASSWORD:void 0,TOKEN:void 0,USERNAME:void 0,VERSION:"1",WITH_CREDENTIALS:!1,interceptors:{response:new k}};var y=class extends Error{url;status;statusText;body;request;constructor(e,p,i){super(i),this.name="ApiError",this.url=p.url,this.status=p.status,this.statusText=p.statusText,this.body=p.body,this.request=e}};var m=r=>typeof r=="string",P=r=>m(r)&&r!=="",S=r=>r instanceof Blob,O=r=>r instanceof FormData,w=r=>{try{return btoa(r)}catch{return Buffer.from(r).toString("base64")}},F=r=>{let e=[],p=(a,n)=>{e.push(`${encodeURIComponent(a)}=${encodeURIComponent(String(n))}`)},i=(a,n)=>{n!=null&&(n instanceof Date?p(a,n.toISOString()):Array.isArray(n)?n.forEach(o=>i(a,o)):typeof n=="object"?Object.entries(n).forEach(([o,l])=>i(`${a}[${o}]`,l)):p(a,n))};return Object.entries(r).forEach(([a,n])=>i(a,n)),e.length?`?${e.join("&")}`:""},U=(r,e)=>{let p=r.ENCODE_PATH||encodeURI,i=e.url.replace("{api-version}",r.VERSION).replace(/{(.*?)}/g,(n,o)=>e.path?.hasOwnProperty(o)?p(String(e.path[o])):n),a=r.BASE+i;return e.query?a+F(e.query):a},N=r=>{if(r.formData){let e=new FormData,p=(i,a)=>{m(a)||S(a)?e.append(i,a):e.append(i,JSON.stringify(a))};return Object.entries(r.formData).filter(([,i])=>i!=null).forEach(([i,a])=>{Array.isArray(a)?a.forEach(n=>p(i,n)):p(i,a)}),e}},g=async(r,e)=>typeof e=="function"?e(r):e,H=(r,e)=>T({token:g(e,r.TOKEN),username:g(e,r.USERNAME),password:g(e,r.PASSWORD),additionalHeaders:g(e,r.HEADERS)}).pipe(V(({token:p,username:i,password:a,additionalHeaders:n})=>{let o=Object.entries(b(b({Accept:"application/json"},n),e.headers)).filter(([,l])=>l!=null).reduce((l,[A,h])=>D(b({},l),{[A]:String(h)}),{});if(P(p)&&(o.Authorization=`Bearer ${p}`),P(i)&&P(a)){let l=w(`${i}:${a}`);o.Authorization=`Basic ${l}`}return e.body!==void 0&&(e.mediaType?o["Content-Type"]=e.mediaType:S(e.body)?o["Content-Type"]=e.body.type||"application/octet-stream":m(e.body)?o["Content-Type"]="text/plain":O(e.body)||(o["Content-Type"]="application/json")),new v(o)})),M=r=>{if(r.body)return r.mediaType?.includes("application/json")||r.mediaType?.includes("+json")?JSON.stringify(r.body):m(r.body)||S(r.body)||O(r.body)?r.body:JSON.stringify(r.body)},$=(r,e,p,i,a,n,o)=>p.request(e.method,i,{headers:o,body:a??n,withCredentials:r.WITH_CREDENTIALS,observe:"response"}),z=(r,e)=>{if(e){let p=r.headers.get(e);if(m(p))return p}},W=r=>{if(r.status!==204&&r.body!==null)return r.body},K=(r,e)=>{let i=b({400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"Im a teapot",421:"Misdirected Request",422:"Unprocessable Content",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",510:"Not Extended",511:"Network Authentication Required"},r.errors)[e.status];if(i)throw new y(r,e,i);if(!e.ok){let a=e.status??"unknown",n=e.statusText??"unknown",o=(()=>{try{return JSON.stringify(e.body,null,2)}catch{return}})();throw new y(r,e,`Generic Error: status: ${a}; status text: ${n}; body: ${o}`)}},s=(r,e,p)=>{let i=U(r,p),a=N(p),n=M(p);return H(r,p).pipe(R(o=>$(r,p,e,i,n,a,o)),R(async o=>{for(let L of r.interceptors.response._fns)o=await L(o);let l=W(o),A=z(o,p.responseHeader),h=l;return p.responseTransformer&&o.ok&&(h=await p.responseTransformer(l)),{url:i,ok:o.ok,status:o.status,statusText:o.statusText,body:A??h}}),f(o=>o.status?I({url:i,ok:o.ok,status:o.status,statusText:o.statusText,body:o.error??o.statusText}):B(()=>o)),V(o=>(K(p,o),o.body)),f(o=>B(()=>o)))};var G=class r{constructor(e){this.http=e}getApiV1Commandline(){return s(t,this.http,{method:"GET",url:"/api/v1/commandline"})}static \u0275fac=function(p){return new(p||r)(c(d))};static \u0275prov=u({token:r,factory:r.\u0275fac,providedIn:"root"})},x=class r{constructor(e){this.http=e}postApiV1Commandline(e){return s(t,this.http,{method:"POST",url:"/api/v1/commandline",body:e.requestBody,mediaType:"application/json"})}getApiV1Acknowledgements(){return s(t,this.http,{method:"GET",url:"/api/v1/acknowledgements"})}postApiV1AuthRefresh(){return s(t,this.http,{method:"POST",url:"/api/v1/auth/refresh"})}postApiV1AuthSignin(e){return s(t,this.http,{method:"POST",url:"/api/v1/auth/signin",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthLogin(e){return s(t,this.http,{method:"POST",url:"/api/v1/auth/login",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthIssuesignintoken(e){return s(t,this.http,{method:"POST",url:"/api/v1/auth/issuesignintoken",body:e.requestBody,mediaType:"application/json"})}postApiV1AuthRefreshLogout(){return s(t,this.http,{method:"POST",url:"/api/v1/auth/refresh/logout"})}postApiV1AuthIssuetokenByOperation(e){return s(t,this.http,{method:"POST",url:"/api/v1/auth/issuetoken/{operation}",path:{operation:e.operation}})}getApiV1Backupdefaults(){return s(t,this.http,{method:"GET",url:"/api/v1/backupdefaults"})}getApiV1Backups(){return s(t,this.http,{method:"GET",url:"/api/v1/backups"})}postApiV1Backups(e){return s(t,this.http,{method:"POST",url:"/api/v1/backups",query:{temporary:e.temporary,existingdb:e.existingdb},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupsImport(e){return s(t,this.http,{method:"POST",url:"/api/v1/backups/import",body:e.requestBody,mediaType:"application/json"})}getApiV1BugreportByReportid(e){return s(t,this.http,{method:"GET",url:"/api/v1/bugreport/{reportid}",path:{reportid:e.reportid},query:{token:e.token}})}getApiV1CaptchaByToken(e){return s(t,this.http,{method:"GET",url:"/api/v1/captcha/{token}",path:{token:e.token}})}postApiV1CaptchaByToken(e){return s(t,this.http,{method:"POST",url:"/api/v1/captcha/{token}",path:{token:e.token},body:e.requestBody,mediaType:"application/json"})}postApiV1Captcha(e){return s(t,this.http,{method:"POST",url:"/api/v1/captcha",body:e.requestBody,mediaType:"application/json"})}getApiV1Changelog(e={}){return s(t,this.http,{method:"GET",url:"/api/v1/changelog",query:{"from-update":e.fromUpdate}})}getApiV1CommandlineByRunid(e){return s(t,this.http,{method:"GET",url:"/api/v1/commandline/{runid}",path:{runid:e.runid},query:{offset:e.offset,pagesize:e.pagesize}})}postApiV1CommandlineByRunidAbort(e){return s(t,this.http,{method:"POST",url:"/api/v1/commandline/{runid}/abort",path:{runid:e.runid}})}postApiV1Filesystem(e){return s(t,this.http,{method:"POST",url:"/api/v1/filesystem",query:{onlyFolders:e.onlyFolders,showHidden:e.showHidden},body:e.requestBody,mediaType:"application/json"})}postApiV1FilesystemValidate(e){return s(t,this.http,{method:"POST",url:"/api/v1/filesystem/validate",body:e.requestBody,mediaType:"application/json"})}getApiV1Hyperv(){return s(t,this.http,{method:"GET",url:"/api/v1/hyperv"})}getApiV1HypervByKey(e){return s(t,this.http,{method:"GET",url:"/api/v1/hyperv/{key}",path:{key:e.key}})}getApiV1Licenses(){return s(t,this.http,{method:"GET",url:"/api/v1/licenses"})}getApiV1LogdataPoll(e){return s(t,this.http,{method:"GET",url:"/api/v1/logdata/poll",query:{level:e.level,id:e.id,offset:e.offset,pagesize:e.pagesize}})}getApiV1LogdataLog(e={}){return s(t,this.http,{method:"GET",url:"/api/v1/logdata/log",query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1Mssql(){return s(t,this.http,{method:"GET",url:"/api/v1/mssql"})}getApiV1MssqlByKey(e){return s(t,this.http,{method:"GET",url:"/api/v1/mssql/{key}",path:{key:e.key}})}getApiV1NotificationById(e){return s(t,this.http,{method:"GET",url:"/api/v1/notification/{id}",path:{id:e.id}})}deleteApiV1NotificationById(e){return s(t,this.http,{method:"DELETE",url:"/api/v1/notification/{id}",path:{id:e.id}})}getApiV1Notifications(){return s(t,this.http,{method:"GET",url:"/api/v1/notifications"})}getApiV1RemotecontrolStatus(){return s(t,this.http,{method:"GET",url:"/api/v1/remotecontrol/status"})}postApiV1RemotecontrolEnable(){return s(t,this.http,{method:"POST",url:"/api/v1/remotecontrol/enable"})}postApiV1RemotecontrolDisable(){return s(t,this.http,{method:"POST",url:"/api/v1/remotecontrol/disable"})}deleteApiV1RemotecontrolRegistration(){return s(t,this.http,{method:"DELETE",url:"/api/v1/remotecontrol/registration"})}postApiV1RemotecontrolRegister(e){return s(t,this.http,{method:"POST",url:"/api/v1/remotecontrol/register",body:e.requestBody,mediaType:"application/json"})}deleteApiV1RemotecontrolRegister(){return s(t,this.http,{method:"DELETE",url:"/api/v1/remotecontrol/register"})}postApiV1RemoteoperationDbpath(e){return s(t,this.http,{method:"POST",url:"/api/v1/remoteoperation/dbpath",body:e.requestBody,mediaType:"application/json"})}postApiV1RemoteoperationTest(e){return s(t,this.http,{method:"POST",url:"/api/v1/remoteoperation/test",query:{autocreate:e.autocreate},body:e.requestBody,mediaType:"application/json"})}postApiV1RemoteoperationCreate(e){return s(t,this.http,{method:"POST",url:"/api/v1/remoteoperation/create",body:e.requestBody,mediaType:"application/json"})}getApiV1Serversettings(){return s(t,this.http,{method:"GET",url:"/api/v1/serversettings"})}patchApiV1Serversettings(e){return s(t,this.http,{method:"PATCH",url:"/api/v1/serversettings",body:e.requestBody,mediaType:"application/json"})}getApiV1ServersettingByKey(e){return s(t,this.http,{method:"GET",url:"/api/v1/serversetting/{key}",path:{key:e.key}})}putApiV1ServersettingByKey(e){return s(t,this.http,{method:"PUT",url:"/api/v1/serversetting/{key}",path:{key:e.key},body:e.requestBody,mediaType:"application/json"})}getApiV1Serverstate(e={}){return s(t,this.http,{method:"GET",url:"/api/v1/serverstate",query:{lastEventId:e.lastEventId,longpoll:e.longpoll,duration:e.duration}})}postApiV1ServerstatePause(e={}){return s(t,this.http,{method:"POST",url:"/api/v1/serverstate/pause",query:{duration:e.duration}})}postApiV1ServerstateResume(){return s(t,this.http,{method:"POST",url:"/api/v1/serverstate/resume"})}getApiV1Systeminfo(){return s(t,this.http,{method:"GET",url:"/api/v1/systeminfo"})}getApiV1SysteminfoFiltergroups(){return s(t,this.http,{method:"GET",url:"/api/v1/systeminfo/filtergroups"})}getApiV1TaskByTaskid(e){return s(t,this.http,{method:"GET",url:"/api/v1/task/{taskid}",path:{taskid:e.taskid}})}postApiV1TaskByTaskidStopaftercurrentfile(e){return s(t,this.http,{method:"POST",url:"/api/v1/task/{taskid}/stopaftercurrentfile",path:{taskid:e.taskid}})}postApiV1TaskByTaskidStopnow(e){return s(t,this.http,{method:"POST",url:"/api/v1/task/{taskid}/stopnow",path:{taskid:e.taskid}})}postApiV1TaskByTaskidAbort(e){return s(t,this.http,{method:"POST",url:"/api/v1/task/{taskid}/abort",path:{taskid:e.taskid}})}getApiV1Uisettings(){return s(t,this.http,{method:"GET",url:"/api/v1/uisettings"})}postApiV1Uisettings(e){return s(t,this.http,{method:"POST",url:"/api/v1/uisettings",body:e.requestBody,mediaType:"application/json"})}getApiV1UisettingsByScheme(e){return s(t,this.http,{method:"GET",url:"/api/v1/uisettings/{scheme}",path:{scheme:e.scheme}})}patchApiV1UisettingsByScheme(e){return s(t,this.http,{method:"PATCH",url:"/api/v1/uisettings/{scheme}",path:{scheme:e.scheme},body:e.requestBody,mediaType:"application/json"})}postApiV1WebmoduleByModulekey(e){return s(t,this.http,{method:"POST",url:"/api/v1/webmodule/{modulekey}",path:{modulekey:e.modulekey},body:e.requestBody,mediaType:"application/json"})}getApiV1BackupById(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}",path:{id:e.id}})}putApiV1BackupById(e){return s(t,this.http,{method:"PUT",url:"/api/v1/backup/{id}",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}deleteApiV1BackupById(e){return s(t,this.http,{method:"DELETE",url:"/api/v1/backup/{id}",path:{id:e.id},query:{"delete-remote-files":e.deleteRemoteFiles,"delete-local-db":e.deleteLocalDb,"captcha-token":e.captchaToken,"captcha-answer":e.captchaAnswer,force:e.force}})}getApiV1BackupByIdFiles(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/files",path:{id:e.id},query:{filter:e.filter,time:e.time,"all-versions":e.allVersions,"prefix-only":e.prefixOnly,"folder-contents":e.folderContents}})}getApiV1BackupByIdLog(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/log",path:{id:e.id},query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1BackupByIdRemotelog(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/remotelog",path:{id:e.id},query:{offset:e.offset,pagesize:e.pagesize}})}getApiV1BackupByIdFilesets(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/filesets",path:{id:e.id},query:{"include-metadata":e.includeMetadata,"from-remote-only":e.fromRemoteOnly}})}getApiV1BackupByIdExportArgsonly(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/export-argsonly",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase}})}getApiV1BackupByIdExportCmdline(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/export-cmdline",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase}})}getApiV1BackupByIdExport(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/export",path:{id:e.id},query:{"export-passwords":e.exportPasswords,passphrase:e.passphrase,token:e.token}})}getApiV1BackupByIdIsdbusedelsewhere(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/isdbusedelsewhere",path:{id:e.id}})}getApiV1BackupByIdIsactive(e){return s(t,this.http,{method:"GET",url:"/api/v1/backup/{id}/isactive",path:{id:e.id}})}postApiV1BackupByIdDeletedb(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/deletedb",path:{id:e.id}})}postApiV1BackupByIdMovedb(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/movedb",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdUpdatedb(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/updatedb",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdRestore(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/restore",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdCreatereport(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/createreport",path:{id:e.id}})}postApiV1BackupByIdRepair(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/repair",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdRepairupdate(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/repairupdate",path:{id:e.id},body:e.requestBody,mediaType:"application/json"})}postApiV1BackupByIdVacuum(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/vacuum",path:{id:e.id}})}postApiV1BackupByIdVerify(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/verify",path:{id:e.id}})}postApiV1BackupByIdCompact(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/compact",path:{id:e.id}})}postApiV1BackupByIdStart(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/start",path:{id:e.id}})}postApiV1BackupByIdRun(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/run",path:{id:e.id}})}postApiV1BackupByIdReportRemoteSize(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/report-remote-size",path:{id:e.id}})}postApiV1BackupByIdCopytotemp(e){return s(t,this.http,{method:"POST",url:"/api/v1/backup/{id}/copytotemp",path:{id:e.id}})}static \u0275fac=function(p){return new(p||r)(c(d))};static \u0275prov=u({token:r,factory:r.\u0275fac,providedIn:"root"})},C=class r{constructor(e){this.http=e}getApiV1Progressstate(){return s(t,this.http,{method:"GET",url:"/api/v1/progressstate"})}static \u0275fac=function(p){return new(p||r)(c(d))};static \u0275prov=u({token:r,factory:r.\u0275fac,providedIn:"root"})},E=class r{constructor(e){this.http=e}getApiV1Tasks(){return s(t,this.http,{method:"GET",url:"/api/v1/tasks"})}static \u0275fac=function(p){return new(p||r)(c(d))};static \u0275prov=u({token:r,factory:r.\u0275fac,providedIn:"root"})},j=class r{constructor(e){this.http=e}postApiV1UpdatesCheck(){return s(t,this.http,{method:"POST",url:"/api/v1/updates/check"})}static \u0275fac=function(p){return new(p||r)(c(d))};static \u0275prov=u({token:r,factory:r.\u0275fac,providedIn:"root"})},q=class r{constructor(e){this.http=e}getApiV1Webmodules(){return s(t,this.http,{method:"GET",url:"/api/v1/webmodules"})}static \u0275fac=function(p){return new(p||r)(c(d))};static \u0275prov=u({token:r,factory:r.\u0275fac,providedIn:"root"})};export{x as a,C as b,E as c,q as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{O as a,Ua as b,W as d,ea as l,ec as g,fc as y,gc as h,i as f,la as v,ma as c}from"./chunk-QHJTF3V4.js";function p(s,e){!e?.injector&&l(p);let n=e?.injector??d(v),o=new f(1),i=h(()=>{let t;try{t=s()}catch(u){y(()=>o.error(u));return}y(()=>o.next(t))},{injector:n,manualCleanup:!0});return n.get(c).onDestroy(()=>{i.destroy(),o.complete()}),o.asObservable()}function m(s,e){let n=!e?.manualCleanup;n&&!e?.injector&&l(m);let o=n?e?.injector?.get(c)??d(c):null,i=w(e?.equal),t;e?.requireSync?t=b({kind:0},{equal:i}):t=b({kind:1,value:e?.initialValue},{equal:i});let u=s.subscribe({next:r=>t.set({kind:1,value:r}),error:r=>{if(e?.rejectErrors)throw r;t.set({kind:2,error:r})}});if(e?.requireSync&&t().kind===0)throw new a(601,!1);return o?.onDestroy(u.unsubscribe.bind(u)),g(()=>{let r=t();switch(r.kind){case 1:return r.value;case 2:throw r.error;case 0:throw new a(601,!1)}},{equal:e?.equal})}function w(s=Object.is){return(e,n)=>e.kind===1&&n.kind===1&&s(e.value,n.value)}export{p as a,m as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as a,d as b}from"./chunk-AIWAOXTQ.js";import"./chunk-4EODC7AQ.js";import"./chunk-ZSOWH34L.js";import"./chunk-N6REZCKW.js";import"./chunk-73UOOUBD.js";import"./chunk-IEVRQDB6.js";import"./chunk-22ZYSOTR.js";import"./chunk-JNQHJPEL.js";import"./chunk-LZSE733H.js";import"./chunk-QHJTF3V4.js";import"./chunk-7CGTOI24.js";export{a as createRestoreSelectFilesForm,b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Y}from"./chunk-
|
|
1
|
+
import{a as Y}from"./chunk-5AC7O5ME.js";import{a as J}from"./chunk-6GOAPINI.js";import{a as R}from"./chunk-3ZEBM2Q6.js";import{a as $,g as A,h as V,j as z,m as j}from"./chunk-IEVRQDB6.js";import{d as N}from"./chunk-22ZYSOTR.js";import"./chunk-JNQHJPEL.js";import"./chunk-LZSE733H.js";import{$ as y,Gb as e,Ib as u,Oa as p,Ob as D,Pb as B,Qb as S,Tb as M,Ub as I,Vb as H,W as _,Y as v,ab as s,cb as m,ga as f,ha as g,hb as d,ib as P,jb as O,kb as E,lb as a,mb as o,nb as x,ob as F,pb as w,rb as T,rc as L,sb as b,tb as c}from"./chunk-QHJTF3V4.js";import"./chunk-7CGTOI24.js";var C=class t{#t=_(J);transform(l,...n){if(!l)return"";let i=l.split(".")[0],r=parseInt(i.split(":")[0])??0,k=parseInt(i.split(":")[1])??0,q=parseInt(i.split(":")[2])??0;return this.#t.duration({hours:r,minutes:k,seconds:q}).humanize()}static \u0275fac=function(n){return new(n||t)};static \u0275pipe=y({name:"durationFormat",type:t,pure:!0,standalone:!0})};var K=()=>["/add-backup"],Q=()=>["/restore"],U=t=>["/backup",t],W=t=>["/backup",t,"export"];function X(t,l){if(t&1&&(e(0),M(1,"durationFormat")),t&2){let n=c().$implicit;u(" - (took ",I(1,1,n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.LastBackupDuration),") ")}}function Z(t,l){t&1&&e(0," N/A ")}function tt(t,l){if(t&1&&e(0),t&2){let n=c().$implicit;u(" ",n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.SourceSizeString," ")}}function et(t,l){t&1&&e(0," N/A ")}function nt(t,l){if(t&1&&e(0),t&2){let n=c().$implicit;u(" ",n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.TargetSizeString," ")}}function it(t,l){t&1&&e(0," N/A ")}function at(t,l){if(t&1&&(a(0,"spk-chip",9),e(1),o()),t&2){let n=c().$implicit;p(),u("",n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.BackupListCount," Version")}}function ot(t,l){t&1&&(a(0,"spk-chip",10),e(1,"No version yet"),o())}function lt(t,l){if(t&1){let n=T();a(0,"div",8)(1,"div",3)(2,"h3"),e(3),a(4,"spk-icon"),e(5,"database"),o()(),a(6,"p")(7,"span"),e(8,"Last successful backup:"),o(),e(9),M(10,"date"),s(11,X,2,3)(12,Z,1,0),o(),a(13,"p")(14,"span"),e(15,"Source:"),o(),s(16,tt,1,1)(17,et,1,0),o(),a(18,"p")(19,"span"),e(20,"Destination:"),o(),s(21,nt,1,1)(22,it,1,0),o()(),s(23,at,2,1,"spk-chip",9)(24,ot,2,0,"spk-chip",10),a(25,"div",11)(26,"button",12),b("click",function(){let r=f(n).$implicit,k=c(2);return g(k.startBackup(r.Backup==null?null:r.Backup.ID))}),a(27,"spk-icon"),e(28,"play-circle"),o(),e(29," Start "),o(),a(30,"button",13)(31,"spk-icon"),e(32,"pencil-simple"),o()(),a(33,"spk-menu",14)(34,"button",4)(35,"spk-icon"),e(36,"dots-three-vertical"),o()(),F(37,15),a(38,"button",16,0),e(40," Export "),a(41,"spk-icon"),e(42,"export"),o()(),a(43,"button",17,0),b("click",function(){let r=f(n).$implicit,k=c(2);return g(k.deleteBackup(r.Backup==null?null:r.Backup.ID))}),e(45," Delete "),a(46,"spk-icon"),e(47,"x-circle"),o()(),w(),o()()()}if(t&2){let n,i=l.$implicit;p(3),u(" ",(n=i.Backup==null?null:i.Backup.Name)!==null&&n!==void 0?n:"Backup name missing"," "),p(6),u(" ",H(10,9,i.Backup==null||i.Backup.Metadata==null?null:i.Backup.Metadata.LastBackupDate,"short")," "),p(2),d(!(i.Backup==null||i.Backup.Metadata==null)&&i.Backup.Metadata.LastBackupDuration?11:12),p(5),d(!(i.Backup==null||i.Backup.Metadata==null)&&i.Backup.Metadata.SourceSizeString?16:17),p(5),d(!(i.Backup==null||i.Backup.Metadata==null)&&i.Backup.Metadata.TargetSizeString?21:22),p(2),d(!(i.Backup==null||i.Backup.Metadata==null)&&i.Backup.Metadata.BackupListCount?23:24),p(7),m("routerLink",S(12,U,i.Backup==null?null:i.Backup.ID)),p(3),m("right",!0),p(5),m("routerLink",S(14,W,i.Backup==null?null:i.Backup.ID))}}function pt(t,l){if(t&1&&O(0,lt,48,16,"div",8,P),t&2){let n=c();E(n.backups())}}function ct(t,l){t&1&&e(0," No backups founds ")}var h=class t{#t=_(R);backups=this.#t.backups;backupsLoading=this.#t.backupsLoading;ngOnInit(){this.#t.getBackups(!0)}startBackup(l){this.#t.startBackup(l)}deleteBackup(l){l&&window.confirm("Are you sure you want to delete this backup?")&&this.#t.deleteBackup(l)}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=v({type:t,selectors:[["app-home"]],standalone:!0,features:[D],decls:31,vars:5,consts:[["option",""],[1,"type-a",3,"routerLink"],["src","assets/images/backup.png","alt","","width","48px"],[1,"text"],["spk-button",""],["src","assets/images/restore.png","alt","","width","48px"],[1,"content"],[1,"backups"],[1,"backup"],[1,"simple","success"],[1,"simple"],[1,"actions"],["spk-button","",3,"click"],["spk-button","",3,"routerLink"],[3,"right"],["menu",""],[3,"routerLink"],[3,"click"]],template:function(n,i){n&1&&(x(0,"app-status-bar"),a(1,"section")(2,"header")(3,"spk-card",1),x(4,"img",2),a(5,"div",3)(6,"h3"),e(7,"Backups"),o(),a(8,"p"),e(9,"Backups are stored in the cloud and can be restored at any time."),o()(),a(10,"button",4),e(11," Add "),a(12,"spk-icon"),e(13,"plus"),o()()(),a(14,"spk-card",1),x(15,"img",5),a(16,"div",3)(17,"h3"),e(18,"Restores"),o(),a(19,"p"),e(20,"Restores are stored in the cloud and can be restored at any time."),o()(),a(21,"button",4),e(22," Start "),a(23,"spk-icon"),e(24,"arrow-right"),o()()()(),a(25,"div",6)(26,"h2"),e(27,"My backups"),o(),a(28,"div",7),s(29,pt,2,0)(30,ct,1,0),o()()()),n&2&&(p(3),m("routerLink",B(3,K)),p(11),m("routerLink",B(4,Q)),p(15),d(i.backups().length?29:30))},dependencies:[N,Y,V,A,$,z,j,L,C],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem 0}header[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;padding:0 2rem;gap:1rem}spk-card[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem}spk-card[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:.25rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2rem;gap:1rem}.backups[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-level-40);border-radius:var(--shape-3);box-shadow:var(--shadow-1)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] spk-icon[_ngcontent-%COMP%]{color:var(--base-level-60)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-level-60)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-level-70)}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"./chunk-
|
|
1
|
+
import{a}from"./chunk-VC4GI7EV.js";import{Q as s,Ua as e,W as i,gc as r}from"./chunk-QHJTF3V4.js";var o=class t{#t=i(a);#a=this.#t.getItemParsed("darkTheme",!0);#e=e(!1);#s=e(window?.innerWidth<=768);#i=e(!1);isDarkMode=this.#e.asReadonly();isMobile=this.#s.asReadonly();isNavOpen=this.#i.asReadonly();constructor(){window.matchMedia("(prefers-color-scheme:dark)").matches&&this.#a&&this.setDarkMode(),r(()=>{this.#e()?document.body.classList.add("dark"):document.body.classList.remove("dark")})}ngOnInit(){window.addEventListener("resize",this.#r)}toggleNav(){this.#i.set(!this.isNavOpen())}toggleBodyClass(){this.#t.setItemParsed("darkTheme",!this.isDarkMode(),!0),this.#e.set(!this.isDarkMode())}setDarkMode(){this.#t.setItemParsed("darkTheme",!0,!0),this.#e.set(!0)}setLightMode(){this.#t.setItemParsed("darkTheme",!1,!0),this.#e.set(!1)}#r(){this.#s.set(window.innerWidth<=768)}ngOnDestroy(){window.removeEventListener("resize",this.#r)}static \u0275fac=function(n){return new(n||t)};static \u0275prov=s({token:t,factory:t.\u0275fac,providedIn:"root"})};export{o as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as c}from"./chunk-
|
|
1
|
+
import{a as c}from"./chunk-VC4GI7EV.js";import{c as h}from"./chunk-22ZYSOTR.js";import{a as u}from"./chunk-LZSE733H.js";import{B as t,N as i,Q as l,Ua as n,W as s,gc as a}from"./chunk-QHJTF3V4.js";var m=class r{#t=s(c);#i=s(h);#s=s(u);#e=n(this.#t.getItemParsed("token")??null);#r=n(this.#t.getItemParsed("tokenSetTime")??null);tokenSetTime=this.#r.asReadonly();token=this.#e.asReadonly();#o=a(()=>{if(!this.#e()){this.#t.clearAll(),this.#i.navigate(["/login"]);return}let e=Date.now();this.#t.setItemParsed("tokenSetTime",e),this.#t.setItemParsed("token",this.#e()),this.#r.set(this.#e()?e:null)},{allowSignalWrites:!0});login(e="helloworld"){return this.#s.postApiV1AuthLogin({requestBody:{Password:e,RememberMe:!0}}).pipe(t(1),i(o=>this.#e.set(o.AccessToken??null)))}refreshToken(){return this.#s.postApiV1AuthRefresh().pipe(t(1),i(e=>this.#e.set(e.AccessToken??null)))}logout(){this.#s.postApiV1AuthRefreshLogout().pipe(t(1),i(e=>{this.#e.set(null),this.#t.clearAll(),this.#i.navigate(["/login"])})).subscribe({error:e=>{this.#e.set(null),this.#t.clearAll(),this.#i.navigate(["/login"])}})}static \u0275fac=function(o){return new(o||r)};static \u0275prov=l({token:r,factory:r.\u0275fac,providedIn:"root"})};export{m as a};
|