@duplicati/ngclient 0.0.229 → 0.0.231
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/dest-icons/googleworkspace.png +0 -0
- package/assets/sh.woff2 +0 -0
- package/chunk--kVw-BwM.js +1 -0
- package/chunk-5Ay2I6OJ.js +2 -0
- package/chunk-6bHATzM2.js +1 -0
- package/{chunk-BZYVgHEz.js → chunk-7qu0Yols.js} +1 -1
- package/{chunk-CfoJuTJX.js → chunk-B1FMMTzB.js} +1 -1
- package/{chunk-D4UZC_u0.js → chunk-B6VmpM-T.js} +1 -1
- package/chunk-B7vxwDBG.js +1 -0
- package/chunk-BAVJD-p4.js +1 -0
- package/chunk-BC2-YuwH.js +14 -0
- package/{chunk-DaIpTiYw.js → chunk-BFfFD-XE.js} +1 -1
- package/chunk-BHERv_y8.js +1 -0
- package/chunk-BIAFFPb6.js +1 -0
- package/{chunk-BcpsSgKo.js → chunk-BRJ93eei.js} +1 -1
- package/{chunk-SycscfJp.js → chunk-BYJ0fSUP.js} +1 -1
- package/chunk-B_iekvt6.js +1 -0
- package/chunk-Baizh2Dx.js +1 -0
- package/{chunk-MvQwR7nW.js → chunk-Bcxzhjj8.js} +1 -1
- package/{chunk-JA7rUsYF.js → chunk-Bfak-Gjv.js} +1 -1
- package/{chunk-DV2SIgNN.js → chunk-Bgx4dtaL.js} +1 -1
- package/chunk-BhGD1_v8.js +2 -0
- package/{chunk-2OH1SKyQ.js → chunk-BhPCHFyT.js} +1 -1
- package/{chunk-BjkwnDTL.js → chunk-Bj1ToKwz.js} +2 -2
- package/{chunk-DDVdXEVe.js → chunk-BjSSXg5V.js} +1 -1
- package/chunk-BlfsmSZO.js +4 -0
- package/chunk-Bnu5Zyue.js +1 -0
- package/{chunk-C2bnZ62D.js → chunk-C1BwGQgo.js} +2 -2
- package/{chunk-Bc4gFy5W.js → chunk-C2H72Zk8.js} +2 -2
- package/{chunk-DJbAxHpK.js → chunk-C3KPTLNN.js} +1 -1
- package/{chunk-BAZ5npJw.js → chunk-C5p3bQwH.js} +1 -1
- package/{chunk-Cs0rlpWi.js → chunk-C6beMvkJ.js} +2 -2
- package/chunk-CAgfvBGI.js +2 -0
- package/{chunk-dScOwyAU.js → chunk-CDEvMQA2.js} +1 -1
- package/{chunk-COgNe44h.js → chunk-CI8lsvKT.js} +1 -1
- package/chunk-CP3edE1P.js +1 -0
- package/{chunk-D48AStVy.js → chunk-CQv4eyEK.js} +1 -1
- package/chunk-CTwvkMrj.js +2 -0
- package/chunk-CmexLvf7.js +2 -0
- package/chunk-Cng2PWKw.js +2 -0
- package/chunk-CqwyTVd3.js +1 -0
- package/{chunk-B-fklW6A.js → chunk-Crs56mDy.js} +2 -2
- package/{chunk-DiZeSQXj.js → chunk-CwKxis_6.js} +1 -1
- package/{chunk-DMJycFPC.js → chunk-CxjTj8X0.js} +1 -1
- package/chunk-CzJ3-6Pu.js +1 -0
- package/chunk-D2MSuPzM.js +2 -0
- package/{chunk-CMmgPgiU.js → chunk-D2aWqPl_.js} +1 -1
- package/{chunk-C9EdrQe6.js → chunk-D3SUPUQT.js} +3 -3
- package/{chunk-D28lTX0k.js → chunk-D3d-eReU.js} +1 -1
- package/chunk-D5031IDL.js +3 -0
- package/{chunk-B2fqvpov.js → chunk-D7AP6g7S.js} +1 -1
- package/chunk-D9O-afXN.js +1 -0
- package/chunk-DA5X-TzJ.js +1 -0
- package/chunk-DAM-4k69.js +2 -0
- package/chunk-DH6L3nQP.js +2 -0
- package/chunk-DH6iiZWc.js +3 -0
- package/{chunk-BZqhgAZ-.js → chunk-DKacf9Tj.js} +1 -1
- package/{chunk-GVxWY6X-.js → chunk-DKwqdnLJ.js} +1 -1
- package/{chunk-C_JveZJH.js → chunk-DNUCXG8E.js} +1 -1
- package/chunk-DPpQ_8VM.js +1 -0
- package/chunk-Da2vs6ff.js +1 -0
- package/chunk-DfcHtA-G.js +1 -0
- package/chunk-DlTsXgG2.js +2 -0
- package/{chunk-Byb051F6.js → chunk-DlqfMbsZ.js} +1 -1
- package/chunk-DoYGADYB.js +1 -0
- package/{chunk-CRU3lYvk.js → chunk-DuHXCtrV.js} +1 -1
- package/{chunk-CBdr-6_u.js → chunk-DuTbfCdT.js} +2 -2
- package/{chunk-DP9SoPGV.js → chunk-EwTTC1EW.js} +1 -1
- package/{chunk-CdKfNiwm.js → chunk-JMkz2RrF.js} +1 -1
- package/chunk-PGDvGDW-.js +1 -0
- package/{chunk-DQW8lSiz.js → chunk-PONAC1Ya.js} +1 -1
- package/chunk-RqvNv7T_.js +2 -0
- package/{chunk-CA-ER0DL.js → chunk-SycSMD-r.js} +2 -2
- package/chunk-U0VOUPLl.js +1 -0
- package/chunk-Z5fN6CGR.js +1 -0
- package/chunk-d4cdVCUg.js +2 -0
- package/{chunk-D1wHRltX.js → chunk-dCFVYHva.js} +1 -1
- package/{chunk-0sb5_LpD.js → chunk-gaP3Sx_C.js} +1 -1
- package/chunk-mnaJWx8D.js +1 -0
- package/chunk-oTpkLrqH.js +1 -0
- package/chunk-tpJJunhQ.js +1 -0
- package/index.html +1 -1
- package/locale/dayjs/ko.js +45 -0
- package/locale/dayjs/tr.js +39 -0
- package/locale/messages.de.json +168 -12
- package/locale/messages.de_CH.json +162 -6
- package/locale/messages.de_DE.json +162 -6
- package/locale/messages.en.json +66 -1
- package/locale/messages.fr.json +175 -8
- package/locale/messages.fr_CA.json +175 -8
- package/locale/messages.fr_FR.json +175 -8
- package/locale/messages.it.json +174 -7
- package/locale/messages.it_IT.json +173 -6
- package/locale/messages.ja.json +198 -15
- package/locale/messages.ja_JP.json +198 -15
- package/locale/messages.json +66 -1
- package/locale/messages.ko.json +776 -0
- package/locale/messages.nl_BE.json +174 -7
- package/locale/messages.nl_NL.json +174 -7
- package/locale/messages.tr.json +943 -0
- package/locale/messages.zh_HK.json +152 -8
- package/main-QLXVXD6E.js +16 -0
- package/package.json +1 -1
- package/chunk-A5DpxPOI.js +0 -1
- package/chunk-B12Syddi.js +0 -2
- package/chunk-B3yuN2OH.js +0 -1
- package/chunk-B6vxBiK4.js +0 -2
- package/chunk-B9zNFJSv.js +0 -1
- package/chunk-BDXLL1lt.js +0 -1
- package/chunk-BFH9sFEg.js +0 -1
- package/chunk-BIeNnIyg.js +0 -1
- package/chunk-BJ6LKfIL.js +0 -2
- package/chunk-BYHopERA.js +0 -2
- package/chunk-Bf1diO1u.js +0 -2
- package/chunk-BoCnrrB4.js +0 -1
- package/chunk-BtzP4vdU.js +0 -2
- package/chunk-C11i_gv7.js +0 -1
- package/chunk-C1t4wbdG.js +0 -1
- package/chunk-CByrJpDb.js +0 -1
- package/chunk-CI78bAye.js +0 -2
- package/chunk-CQ8rm_d9.js +0 -3
- package/chunk-CUxq_s_t.js +0 -14
- package/chunk-CXEImxhE.js +0 -1
- package/chunk-CgYrHQGO.js +0 -1
- package/chunk-CwB_t7g-.js +0 -2
- package/chunk-D0u1cyeL.js +0 -1
- package/chunk-D2XTQURr.js +0 -2
- package/chunk-DC8QqmzV.js +0 -2
- package/chunk-DDo7wKQT.js +0 -3
- package/chunk-DQwpGI_E.js +0 -2
- package/chunk-DVgkAgur.js +0 -2
- package/chunk-DVlpMN2Q.js +0 -1
- package/chunk-D_A6A07f.js +0 -1
- package/chunk-D_JCqKo8.js +0 -1
- package/chunk-Drc5kcUX.js +0 -1
- package/chunk-M21GJPzH.js +0 -4
- package/chunk-ObToq7vh.js +0 -1
- package/chunk-RKTSBnYB.js +0 -1
- package/chunk-SKxVK_pD.js +0 -1
- package/chunk-bgWe6t7y.js +0 -1
- package/chunk-cLFxUFjv.js +0 -1
- package/chunk-w_Hs_Uxi.js +0 -1
- package/chunk-wyer8fjS.js +0 -1
- package/main-PXGZLKMN.js +0 -16
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import {j as jn,m as me}from'./chunk-DoYGADYB.js';import {aj as l$1,T,ab as C,ax as De,I,N as Nt,aG as pt,az as t,aZ as ee$1,G as Ge,ai as m$1,H as qu,c0 as n$1}from'./main-QLXVXD6E.js';var y=class{constructor(t){this.loader=t;}loader;_data=Ge(void 0);_isLoading=false;_loaded=false;load(){return !this._loaded&&!this._isLoading&&(this._isLoading=true,this.loader().pipe(qu(()=>this._isLoading=false)).subscribe(t=>{this._data.set(t),this._loaded=true;})),this._data.asReadonly()}value(){return this._data.asReadonly()}isLoading(){return this._isLoading}isLoaded(){return this._loaded}reset(){this._data.set(void 0),this._loaded=false;}};function K(e){return !("personalLicensedUser"in e)}function q(e){if(K(e))return m$1(l$1({},e),{personal:e.personal,personalLicensedUser:null,personalUnlicensedUser:null});let s=e,{personalLicensedUser:t,personalUnlicensedUser:o}=s,r=n$1(s,["personalLicensedUser","personalUnlicensedUser"]);return m$1(l$1({},r),{personal:t+o,personalLicensedUser:t,personalUnlicensedUser:o})}var d=class e{#e=T(C);#s=T(De);#n=T(I);#o=new y(()=>this.getS3Config("Providers"));#i=new y(()=>this.getS3Config("Regions"));#r=new y(()=>this.getS3Config("RegionHosts"));#a=new y(()=>this.getS3Config("StorageClasses"));#l=Nt(()=>{let t=this.#o.value()(),o=this.#r.value()(),r=[...t??[],...o?.map(s=>({key:`Amazon ${s.key}`,value:s.value}))??[]];return Array.from(new Map(r.map(s=>[s.value,s])).values())});#c=new y(()=>this.getStorjConfig("Satellites"));#u=new y(()=>this.getStorjConfig("AuthenticationMethods"));#p=new y(()=>this.getOpenstackConfig("Providers"));#m=new y(()=>this.getOpenstackConfig("Versions"));#d=new y(()=>this.getGcsConfig("Locations"));#g=new y(()=>this.getGcsConfig("StorageClasses"));getS3AllProviders(){return this.#o.load(),this.#r.load(),this.#l}getS3ProvidersFiltered(t){return Nt(()=>this.getS3AllProviders()().filter(t))}getS3Providers(){return this.#o.load()}getS3Regions(){return this.#i.load()}getS3RegionHosts(){return this.#r.load()}getS3StorageClasses(){return this.#a.load()}getStorjSatellites(){return this.#c.load()}getStorjAuthenticationMethods(){return this.#u.load()}getOpenstackProviders(){return this.#p.load()}getOpenstackVersions(){return this.#m.load()}getGcsLocations(){return this.#d.load()}getGcsStorageClasses(){return this.#g.load()}getS3Config(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-getconfig",requestBody:{"s3-config":t}}).pipe(pt(o=>this.#t(o)))}createS3IamUser(t,o){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"CanCreateUser","s3-username":t,"s3-password":o}})}createS3PolicyIAM(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"s3-iamconfig",requestBody:{"s3-operation":"GetPolicyDoc",path:t}})}getStorjConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"storj-getconfig",requestBody:{"storj-config":t}}).pipe(pt(o=>this.#t(o)))}getOpenstackConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"openstack-getconfig",requestBody:{"openstack-config":t}}).pipe(pt(o=>this.#t(o)))}getGcsConfig(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"gcs-getconfig",requestBody:{"gcs-config":t}}).pipe(pt(o=>this.#t(o)))}#t(t){return (t.Result&&typeof t.Result=="object"&&Object.entries(t.Result).map(([o,r])=>({key:o,value:r})))??[]}getDuplicatiStorageBackups(t){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"duplicati-list-backups",requestBody:{action:"ListBackups",url:t}}).pipe(pt(o=>this.#t(o)),pt(o=>o.find(r=>r.key==="folders")?.value),pt(o=>JSON.parse(o)))}getFilenApiKey(t,o){return this.#e.postApiV1WebmoduleByModulekey({modulekey:"filen-get-api-key",requestBody:{"filen-operation":"GetApiKey","backup-id":o??"",url:t}}).pipe(pt(r=>this.#t(r)),pt(r=>r.find(s=>s.key==="api-key")?.value))}getOffice365Counts(t$1,o,r){let s={"Content-Type":"application/json"};return this.#n.relayIsEnabled()&&(s.timeout=`${300*1e3}`),this.#s.post(`${t.BASE}/api/v1/webmodule/office365`,JSON.stringify({"backup-id":r??"","source-prefix":o,operation:"CountItems",url:t$1}),{headers:s}).pipe(pt(i=>this.#t(i)),pt(i=>i.find(u=>u.key==="counts")?.value),pt(i=>{let u=JSON.parse(i);return {users:u.users,groups:u.groups,sites:q(u.sites)}}))}static \u0275fac=function(o){return new(o||e)};static \u0275prov=ee$1({token:e,factory:e.\u0275fac,providedIn:"root"})};var n=new jn,p={type:"error",message:$localize`Using a leading slash is most likely wrong, and will result in objects being created with a leading slash in the name.`},L={description:$localize`Unknown destination type`,sourceDescription:null,icon:"assets/dest-icons/file-system.png",isDefaultEntry:true,customFields:{path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path`,formElement:e=>n.control(e??"")}},mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>{let s=o.startsWith(`${e}:///`)?o.split(`${e}:///`)[1]:o.split(`${e}://`)[1];return l$1({destinationType:e,custom:{path:s.split("?")[0]}},l(e,t))}}},F={key:"s3",displayName:$localize`S3 Compatible`,description:$localize`Store backups in any S3 compatible bucket.`,sourceDescription:$localize`Use files from any S3 compatible bucket as a remote source.`,icon:"assets/dest-icons/s3compat.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>n.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the S3 compatible server to connect to`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3AllProviders(),isMandatory:true,formElement:e=>n.control(e??"")},{name:"auth-username",isMandatory:true},{name:"auth-password",isMandatory:true},{name:"use-ssl"}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>Ge([{key:"AWS Library",value:"aws"},{key:"MinIO Library",value:"minio"}]),validate:e=>({type:"warning",message:$localize`Invalid client selected`})}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:s}=m(t);return l$1({destinationType:e,custom:{path:s,bucket:r}},l(e,t))}}},P=[{key:"file",displayName:$localize`File system`,description:$localize`Store backups on your local file system.`,sourceDescription:$localize`Use files from your local file system as a remote source.`,icon:"assets/dest-icons/file-system.png",searchTerms:"local disk harddrive localdisk filesystem unc server share drive",sortOrder:110,customFields:{path:{type:"FolderTree",name:"path",doubleSlash:p,shortDescription:$localize`File path`,longDescription:$localize`The path to store the backup`,formElement:e=>n.control(e??""),isMandatory:true}},mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>{let r=o.startsWith("file:///"),s=decodeURIComponent(r?o.split("file:///")[1]:o.split("file://")[1]),u=s.slice(1).startsWith(":\\")||s.slice(1).startsWith(":/")||s.startsWith("\\\\")?s:"/"+s;return l$1({destinationType:e,custom:{path:u.split("?")[0]}},l(e,t))}}},{key:"duplicati",displayName:$localize`Duplicati Storage`,description:$localize`Store backups with Duplicati Storage.`,sourceDescription:$localize`Use files from Duplicati Storage as a remote source.`,icon:"assets/dest-icons/duplicati.png",searchTerms:"duplicati internal built-in",sortOrder:100,dynamicFields:[{name:"duplicati-backup-id",type:"DuplicatiBackupId",isMandatory:true,shortDescription:$localize`Unique Backup ID`,longDescription:$localize`A unique identifier for the backup job. It is recommended to not change this value.`}],mapper:{to:e=>c(e,null,null,null),from:(e,t,o)=>l$1({destinationType:e},l(e,t)),default:e=>e&&e.length>0?`duplicati://?duplicati-backup-id=${encodeURIComponent(e)}`:"duplicati://"}},{key:"ssh",displayName:$localize`SFTP (SSH)`,description:$localize`Store backups with SFTP (SSH).`,sourceDescription:$localize`Use files from SFTP (SSH) as a remote source.`,icon:"assets/dest-icons/ssh.png",searchTerms:"sftp scp secure shell",sortOrder:80,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`The server to connect to`,formElement:e=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`The port to connect to`,formElement:e=>n.control(e??"",[me.required,me.max(65535)])},path:{type:"Path",name:"path",shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,longDescription:$localize`Username`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Password`,longDescription:$localize`Password`}],advancedFields:[{type:"FileTree",name:"ssh-keyfile",accepts:".key,",shortDescription:$localize`This is a path to a private key file locally on the machine`,longDescription:$localize`This is a path to a private key file locally on the machine`},{type:"FreeText",name:"ssh-key",shortDescription:$localize`SSH private key`,longDescription:$localize`An SSH private key. Supported formats are OpenSSL, OpenSSH, PuTTY, and PEM.`}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"s3",displayName:$localize`S3 Compatible`,description:$localize`Store backups in any S3 compatible bucket.`,sourceDescription:$localize`Use files from any S3 compatible bucket as a remote source.`,icon:"assets/dest-icons/s3compat.png",searchTerms:"spaces cloud digitalocean cloudian minio linode bunnycdn oracle cloudflare alibaba huawei tencent baidu jd ucloud qiniu aliyun tcloud tencent ",sortOrder:90,customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>n.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the S3 compatible server to connect to`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3AllProviders(),isMandatory:true,formElement:e=>n.control(e??"")},{name:"use-ssl",order:2},{name:"auth-username",isMandatory:true},{name:"auth-password",isMandatory:true}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>Ge([{key:"AWS Library",value:"aws"},{key:"MinIO Library",value:"minio"}])},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3StorageClasses()},{name:"s3-location-constraint",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3Regions()}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:s}=m(t);return l$1({destinationType:e,custom:{path:s,bucket:r}},l(e,t))}}},{key:"s3",customKey:"s3-aws",displayName:$localize`Amazon S3`,description:$localize`Store backups in Amazon S3.`,sourceDescription:$localize`Use files from Amazon S3 as a remote source.`,icon:"assets/dest-icons/aws.png",searchTerms:"amazon aws",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>n.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the S3 compatible server to connect to`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3ProvidersFiltered(t=>t.value.endsWith(".amazonaws.com")),isMandatory:true,formElement:e=>n.control(e??"")},{name:"use-ssl",order:2},{name:"auth-username",isMandatory:true},{name:"auth-password",isMandatory:true}],advancedFields:[{name:"s3-client",type:"Enumeration",loadOptions:()=>Ge([{key:"AWS Library",value:"aws"},{key:"MinIO Library",value:"minio"}])},{name:"s3-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3StorageClasses()},{name:"s3-location-constraint",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getS3Regions()}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return e.dynamic["s3-server-name"]?.endsWith(".amazonaws.com")&&(e.destinationType="s3"),c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:s}=m(t);return l$1({destinationType:e,custom:{path:s,bucket:r}},l(e,t))},default:e=>"s3-aws://?use-ssl=true",intercept:e=>e.searchParams.get("s3-server-name")?.endsWith(".amazonaws.com")??false}},{key:"gcs",displayName:$localize`Google Cloud Storage`,description:$localize`Store backups in Google Cloud Storage.`,sourceDescription:$localize`Use files from Google Cloud Storage as a remote source.`,icon:"assets/dest-icons/google-cloud.png",oauthField:"authid",searchTerms:"gcp googlecloud",sortOrder:70,customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>n.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:true,longDescription:$localize`An OAuth token with access to the Google Cloud Storage. Not required if service account JSON is provided.`}],advancedFields:[{name:"gcs-location",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getGcsLocations()},{name:"gcs-storage-class",type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getGcsStorageClasses()},{name:"gcs-service-account-file",type:"FileTree",accepts:".json,",shortDescription:$localize`Service account JSON file`,longDescription:$localize`Pick the path to a file with service account JSON.`},{name:"gcs-service-account-json",type:"FreeText",shortDescription:$localize`Service account JSON`,longDescription:$localize`Paste the service account JSON here.`}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:s}=m(t);return l$1({destinationType:e,custom:{path:s,bucket:r}},l(e,t))}}},{key:"googledrive",displayName:$localize`Google Drive`,description:$localize`Store backups in Google Drive.`,sourceDescription:$localize`Use files from Google Drive as a remote source.`,icon:"assets/dest-icons/google-drive.png",oauthField:"authid",searchTerms:"gdrive",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"authid",type:"Password",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"pcloud",displayName:$localize`pCloud`,description:$localize`Store backups in pCloud.`,sourceDescription:$localize`Use files from pCloud as a remote source.`,icon:"assets/dest-icons/pcloud.png",oauthField:"authid",customFields:{server:{type:"Enumeration",name:"server",loadOptions:()=>Ge([{key:"pCloud Global",value:"api.pcloud.com"},{key:"pCloud Europe",value:"eapi.pcloud.com"}]),shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Folder path`,longDescription:$localize`Folder path`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"authid",type:"Password",oauthVersion:2,isMandatory:true}],mapper:{to:e=>{let{server:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{server:r,path:s}=m(t);return l$1({destinationType:e,custom:{server:r,path:s}},l(e,t))}}},{key:"azure",displayName:$localize`Azure Blob Storage`,description:$localize`Store backups in Azure Blob Storage.`,sourceDescription:$localize`Use files from Azure Blob Storage as a remote source.`,icon:"assets/dest-icons/azure.png",searchTerms:"microsoft ms",sortOrder:60,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Container name`,longDescription:$localize`Container name`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"onedrivev2",displayName:$localize`OneDrive`,description:$localize`Store backups in OneDrive.`,sourceDescription:$localize`Use files from OneDrive as a remote source.`,icon:"assets/dest-icons/one-drive.png",oauthField:"authid",searchTerms:"micorsoft ms",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"od4b",displayName:$localize`OneDrive Business (deprecated)`,description:$localize`Store backups in OneDrive Business. Deprecated, use Sharepoint instead.`,sourceDescription:$localize`Use files from OneDrive Business as a remote source. Deprecated, use SharePoint instead.`,icon:"assets/dest-icons/one-drive.png",searchTerms:"microsoft ms",sortOrder:-1,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>n.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:true}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"mssp",displayName:$localize`Microsoft SharePoint (deprecated)`,description:$localize`Store backups in Microsoft SharePoint using legacy API.`,sourceDescription:$localize`Use files from Microsoft SharePoint as a remote source using the legacy API.`,icon:"assets/dest-icons/sharepoint.png",searchTerms:"microsoft ms",sortOrder:-1,customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>n.control(e??"")},path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Account name`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Access key`,isMandatory:true}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"sharepoint",displayName:$localize`Microsoft SharePoint`,description:$localize`Store backups in Microsoft SharePoint.`,sourceDescription:$localize`Use files from Microsoft SharePoint as a remote source.`,icon:"assets/dest-icons/sharepoint.png",oauthField:"authid",searchTerms:"microsoft ms",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"site-id",isMandatory:true},{name:"authid",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"dropbox",displayName:$localize`Dropbox`,description:$localize`Store backups in Dropbox.`,sourceDescription:$localize`Use files from Dropbox as a remote source.`,icon:"assets/dest-icons/dropbox.png",oauthField:"authid",searchTerms:"dbx",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"box",displayName:$localize`Box.com`,description:$localize`Store backups in Box.com.`,sourceDescription:$localize`Use files from Box.com as a remote source.`,icon:"assets/dest-icons/box-com.png",oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"jottacloud",displayName:$localize`Jottacloud`,description:$localize`Store backups in Jottacloud.`,sourceDescription:$localize`Use files from Jottacloud as a remote source.`,icon:"assets/dest-icons/jottacloud.png",oauthField:"authid",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"b2",displayName:$localize`B2 Cloud Storage`,description:$localize`Store backups in B2 Cloud Storage.`,sourceDescription:$localize`Use files from B2 Cloud Storage as a remote source.`,icon:"assets/dest-icons/backblaze.png",searchTerms:"backblaze",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>n.control(e??""),isMandatory:true,validate:e=>{function t(o){if(!o)return false;let r=o.length;return !(r<6||r>63||!/^[a-zA-Z0-9.-]+$/.test(o)||!/^[a-zA-Z0-9]/.test(o)||!/[a-zA-Z0-9]$/.test(o)||/^\d{1,3}(\.\d{1,3}){3}$/.test(o)||/(\.\.)|(\.-)|(-\.)/.test(o)||o.toLowerCase().startsWith("b2-"))}return t(e)?null:{type:"error",message:$localize`Invalid bucket name.`}}},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in the bucket`,longDescription:$localize`Path in the bucket`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Application ID`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Application Key`,isMandatory:true}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:s}=m(t);return l$1({destinationType:e,custom:{path:s,bucket:r}},l(e,t))}}},{key:"e2",displayName:$localize`IDrive e2`,description:$localize`Store backups in IDrive e2.`,sourceDescription:$localize`Use files from IDrive e2 as a remote source.`,icon:"assets/dest-icons/idrive-e2.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,longDescription:$localize`Bucket name`,formElement:e=>n.control(e??""),isMandatory:true},path:{type:"String",name:"path",doubleSlash:p,shortDescription:$localize`Path in the bucket`,longDescription:$localize`Path in the bucket`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Access ID`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Access Secret`,isMandatory:true}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom;return c(e,t,null,o)},from:(e,t,o)=>{let{bucket:r,path:s}=m(t);return l$1({destinationType:e,custom:{bucket:r,path:s}},l(e,t))}}},{key:"mega",displayName:$localize`Mega.nz`,description:$localize`Store backups in Mega.nz.`,sourceDescription:$localize`Use files from Mega.nz as a remote source.`,icon:"assets/dest-icons/mega-nz.png",sortOrder:-1,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:true}],mapper:{to:e=>{let t=e.custom.path;return c(e,null,null,t)},from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"msgroup",displayName:$localize`Microsoft Office 365 Group`,description:$localize`Store backups in Microsoft Office 365 Group.`,sourceDescription:$localize`Use files from Microsoft Office 365 Group as a remote source.`,icon:"assets/dest-icons/office-365.png",oauthField:"authid",searchTerms:"ms",customFields:{groupEmail:{type:"Email",name:"groupEmail",shortDescription:$localize`Group email`,longDescription:$localize`Group email`,formElement:e=>n.control(e??"",[me.email]),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"authid",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"cloudfiles",displayName:$localize`Rackspace CloudFiles`,description:$localize`Store backups in Rackspace CloudFiles.`,sourceDescription:$localize`Use files from Rackspace CloudFiles as a remote source.`,icon:"assets/dest-icons/rackspace.png",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>n.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:true}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"rclone",displayName:$localize`Rclone`,description:$localize`Store backups in Rclone.`,sourceDescription:$localize`Use files from Rclone as a remote source.`,icon:"assets/dest-icons/rclone.png",searchTerms:"rcl",dynamicFields:[{name:"rclone-local-repository",shortDescription:$localize`Local repository`,defaultValue:""},{name:"rclone-remote-repository",shortDescription:$localize`Remote repository`,defaultValue:""},{name:"rclone-remote-path",type:"Path",shortDescription:$localize`Path on remote repository`,defaultValue:""}],mapper:{to:e=>{let t=e.dynamic["rclone-remote-repository"],o=e.dynamic["rclone-remote-path"],r=Object.entries(e.dynamic).filter(([s])=>!["rclone-remote-repository","rclone-remote-path"].includes(s));return U(e.destinationType??"rclone",t,null,o,[...Object.entries(e.advanced??{}),...r])},from:(e,t,o)=>{let{advanced:r,dynamic:s}=l(e,t),{bucket:i,path:u}=m(t);return {destinationType:e,dynamic:l$1({"rclone-remote-repository":i,"rclone-remote-path":u},s),advanced:l$1({},r)}}}},{key:"openstack",displayName:$localize`OpenStack Object Storage`,description:$localize`Store backups in OpenStack Object Storage.`,sourceDescription:$localize`Use files from OpenStack Object Storage as a remote source.`,icon:"assets/dest-icons/open-stack.png",searchTerms:"swift",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket`,longDescription:$localize`Bucket`,formElement:e=>n.control(e??""),isMandatory:true}},dynamicFields:[{name:"openstack-authuri",shortDescription:$localize`Auth URI`,type:"Enumeration",loadOptions:e=>e.get(d).getOpenstackProviders(),isMandatory:true},{name:"openstack-version",shortDescription:$localize`Version`,type:"Enumeration",loadOptions:e=>e.get(d).getOpenstackVersions()},{name:"openstack-domain-name",type:"Hostname",shortDescription:$localize`Domain name`},{name:"openstack-tenant-name",shortDescription:$localize`Tenant name`},{name:"openstack-region",shortDescription:$localize`Region`}],mapper:{to:e=>{let{bucket:t}=e.custom;return c(e,t,null,null)},from:(e,t,o)=>{let{bucket:r,path:s}=m(t);return l$1({destinationType:e,custom:{path:s,bucket:r}},l(e,t))}}},{key:"webdav",displayName:$localize`WebDAV`,description:$localize`Store backups in WebDAV.`,sourceDescription:$localize`Use files from WebDAV as a remote source.`,icon:"assets/dest-icons/webdav.png",searchTerms:"web dav",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>n.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:$localize`Use SSL`},{name:"auth-username",shortDescription:$localize`Username`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:true}],advancedFields:[{type:"FileTree",name:"debug-propfind-file",accepts:".txt,.log"}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"aftp",displayName:$localize`Alternative FTP`,description:$localize`Store backups in FTP.`,sourceDescription:$localize`Use files from FTP as a remote source.`,icon:"assets/dest-icons/ftp.png",searchTerms:"alt file transfer protocol ftps",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>n.control(e??"")},path:{type:"Path",name:"path",shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:true}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"ftp",displayName:$localize`FTP`,description:$localize`Store backups in FTP.`,sourceDescription:$localize`Use files from FTP as a remote source.`,icon:"assets/dest-icons/ftp.png",searchTerms:"file transfer protocol ftps",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>n.control(e??"")},path:{type:"Path",name:"path",shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,doubleSlash:{type:"warning",message:$localize`Using a leading slash makes the path absolute, pointing to the root of the filesystem.`},formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",shortDescription:$localize`Username`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Password`,isMandatory:true}],mapper:{to:e=>{let{port:t,server:o,path:r}=e.custom;return c(e,o,t,r)},from:(e,t,o)=>{let{server:r,port:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"sia",displayName:$localize`Sia Decentrilized Cloud`,description:$localize`Store backups in Sia Decentrilized Cloud.`,sourceDescription:$localize`Use files from Sia Decentralized Cloud as a remote source.`,icon:"assets/dest-icons/sia-cloud.png",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true}},dynamicFields:["sia-targetpath","sia-password","sia-redundancy"],mapper:{to:e=>{let t=e.custom.server,o=e.dynamic["sia-targetpath"],r=[...Object.entries(e.advanced),...Object.entries(e.dynamic).filter(([s])=>s!=="sia-targetpath")];return U(e.destinationType??"sia",t,null,o,r)},from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"cos",displayName:$localize`Tencent COS`,description:$localize`Store backups in Tencent COS.`,sourceDescription:$localize`Use files from Tencent COS as a remote source.`,icon:"assets/dest-icons/tencent-cloud.png",customFields:{bucket:{name:"bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:true,formElement:e=>n.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"cos-region",shortDescription:$localize`Region`},{name:"cos-app-id",shortDescription:$localize`COS App Id`,isMandatory:true},{name:"cos-secret-id",shortDescription:$localize`COS Secret Id`,isMandatory:true},{name:"cos-secret-key",shortDescription:$localize`COS Secret Key`,isMandatory:true}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom,r=m$1(l$1({},e),{advanced:m$1(l$1({},e.advanced),{"cos-bucket":t})});return c(r,null,null,o)},from:(e,t,o)=>{let r=l(e,t),s=r.advanced["cos-bucket"];return delete r.advanced["cos-bucket"],l$1({destinationType:e,custom:{path:h(t),bucket:s}},r)}}},{key:"tahoe",displayName:$localize`Tahoe LAFS`,description:$localize`Store backups in Tahoe LAFS.`,sourceDescription:$localize`Use files from Tahoe LAFS as a remote source.`,icon:"assets/dest-icons/tahoelafs.png",searchTerms:"least authority file system",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},port:{type:"Integer",name:"port",shortDescription:$localize`Port`,longDescription:$localize`Port`,formElement:e=>n.control(e??"")},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"use-ssl",shortDescription:$localize`Use SSL`}],mapper:{to:e=>{let{server:t,port:o,path:r}=e.custom;return c(e,t,o,r)},from:(e,t,o)=>{let{server:r,port:s,path:i}=m(t);return l$1({destinationType:e,custom:{server:r,port:s,path:i}},l(e,t))}}},{key:"smb",displayName:$localize`Windows Share (SMB)`,description:$localize`Store backups on SMB storage.`,sourceDescription:$localize`Use files from SMB storage as a remote source.`,icon:"assets/dest-icons/smb.png",searchTerms:"cifs samba",customFields:{server:{type:"Hostname",name:"server",shortDescription:$localize`Server`,longDescription:$localize`Server`,formElement:e=>n.control(e??""),isMandatory:true},share:{type:"Hostname",name:"share",shortDescription:$localize`Share Name`,longDescription:$localize`Share Name`,formElement:e=>n.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on server`,longDescription:$localize`Path on server`,formElement:e=>n.control(e??"")}},dynamicFields:["transport",{name:"auth-username",isMandatory:true},{name:"auth-password",isMandatory:true},"auth-domain"],mapper:{to:e=>{let{share:t,server:o,path:r}=e.custom;return c(e,o,null,N(t,r))},from:(e,t,o)=>{let{server:r,path:s}=m(t),i=s.split("/")[0],u=s.split("/").slice(1).join("/");return l$1({destinationType:e,custom:{server:r,share:i,path:u}},l(e,t))}}},{key:"cifs",displayName:$localize`CIFS (deprecated)`,description:$localize`Same as SMB backend, but with a different name. Use SMB instead.`,sourceDescription:$localize`Use files from CIFS storage as a remote source. Deprecated, use SMB instead.`,icon:"assets/dest-icons/smb.png",sortOrder:-1,mapper:L.mapper},{key:"filen",displayName:$localize`Filen.io`,description:$localize`Store backups in Filen.io.`,sourceDescription:$localize`Use files from Filen.io as a remote source.`,icon:"assets/dest-icons/filen.png",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on Filen`,longDescription:$localize`Path on Filen`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"auth-username",isMandatory:true},{name:"auth-password",isMandatory:true},{name:"two-factor-code",type:"Filen2FACode"}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"filejump",displayName:$localize`Filejump`,description:$localize`Store backups in Filejump.`,sourceDescription:$localize`Use files from Filejump as a remote source.`,icon:"assets/dest-icons/file-jump.png",sortOrder:-1,customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path on Filejump`,longDescription:$localize`Path on Filejump`,formElement:e=>n.control(e??"")}},dynamicFields:[{type:"Password",name:"api-token",shortDescription:$localize`API Token`,longDescription:$localize`Filejump API Token`,formElement:e=>n.control(e??""),isMandatory:true}],mapper:{to:e=>{let{path:t}=e.custom;return c(e,null,null,t)},from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},{key:"storj",customKey:"storjAccessGrant",displayName:$localize`Storj Access Grant`,description:$localize`Store backups in Storj Access Grant.`,sourceDescription:$localize`Use files from Storj with an access grant as a remote source.`,icon:"assets/dest-icons/storj.png",dynamicFields:[{name:"storj-shared-access",shortDescription:$localize`Access Grant`,isMandatory:true},{name:"storj-bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:true},{name:"storj-folder",type:"Path",shortDescription:$localize`Path on server`,doubleSlash:p},{name:"storj-satellite",shortDescription:$localize`Satellite`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getStorjSatellites(),isMandatory:true}],mapper:{to:e=>{let t={"storj-auth-method":"Acccess grant"};return `storj://storj.io/config${b([...Object.entries(e.advanced),...Object.entries(e.dynamic),...Object.entries(t)])}`},from:(e,t,o)=>{let r=l(e,t);return delete r.advanced["storj-auth-method"],l$1({destinationType:e},r)},intercept:e=>e.protocol!=="storj:"?false:!!(e.searchParams.get("storj-shared-access")||e.searchParams.get("storj-auth-method")==="Acccess grant"),default:()=>"storj://?storj-shared-access=&storj-auth-method=Acccess+grant"}},{key:"storj",customKey:"storjApiKey",displayName:$localize`Storj API Key`,description:$localize`Store backups in Storj API Key.`,sourceDescription:$localize`Use files from Storj with an API key as a remote source.`,icon:"assets/dest-icons/storj.png",dynamicFields:[{name:"storj-satellite",shortDescription:$localize`Satellite`,type:"NonValidatedSelectableString",loadOptions:e=>e.get(d).getStorjSatellites(),isMandatory:true},{name:"storj-api-key",shortDescription:$localize`API Key`,isMandatory:true},{name:"storj-secret",shortDescription:$localize`Secret`,isMandatory:true},{name:"storj-bucket",type:"Bucketname",shortDescription:$localize`Bucket`,isMandatory:true},{name:"storj-folder",type:"Path",shortDescription:$localize`Path on server`,doubleSlash:p}],mapper:{to:e=>{let t={"storj-auth-method":"API key"};return `storj://storj.io/config${b([...Object.entries(e.advanced),...Object.entries(e.dynamic),...Object.entries(t)])}`},from:(e,t,o)=>{let r=l("storjApiKey",t);return delete r.advanced["storj-auth-method"],l$1({destinationType:e},r)},intercept:e=>e.protocol!=="storj:"?false:!!(e.searchParams.get("storj-api-key")||e.searchParams.get("storj-secret")||e.searchParams.get("storj-auth-method")==="API key"),default:()=>"storj://?storj-api-key=&storj-secret=&storj-auth-method=API+key"}},{key:"aliyunoss",displayName:$localize`Aliyun OSS`,description:$localize`Store backups in Aliyun OSS`,sourceDescription:$localize`Use files from Aliyun OSS as a remote source.`,icon:"assets/dest-icons/aliyun.png",customFields:{bucket:{type:"Bucketname",name:"bucket",shortDescription:$localize`Bucket name`,formElement:e=>n.control(e??""),isMandatory:true},path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in bucket`,longDescription:$localize`Path in bucket`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"oss-endpoint",isMandatory:true},{name:"oss-access-key-id",isMandatory:true},{name:"oss-access-key-secret",isMandatory:true}],mapper:{to:e=>{let{bucket:t,path:o}=e.custom,r=m$1(l$1({},e),{advanced:m$1(l$1({},e.advanced),{"oss-bucket-name":t})});return c(r,null,null,o)},from:(e,t,o)=>{let r=l(e,t),s=r.advanced["oss-bucket-name"];return delete r.advanced["oss-bucket-name"],l$1({destinationType:e,custom:{path:h(t),bucket:s}},r)}}},{key:"office365",displayName:$localize`Microsoft 365`,description:$localize`Create backups of Microsoft 365 data.`,sourceDescription:$localize`Use Microsoft 365 data as a remote source.`,searchTerms:"office o365 office365 m365 ms365",icon:"assets/dest-icons/office365.png",isNonFree:true,dynamicFields:[{name:"auth-username",shortDescription:$localize`Client ID`,longDescription:$localize`Application (client) ID from your Azure AD app registration.`,isMandatory:true},{name:"auth-password",shortDescription:$localize`Client Secret`,longDescription:$localize`Client Secret from your Azure AD app registration.`,isMandatory:true},{name:"office365-tenant-id",shortDescription:$localize`Tenant ID`,isMandatory:true}],advancedFields:[{name:"office365-certificate-path",type:"FileTree"}],mapper:{to:e=>`office365://${b([...Object.entries(e.advanced),...Object.entries(e.dynamic)])}`,from:(e,t,o)=>{let{advanced:r,dynamic:s}=l(e,t);return {destinationType:e,advanced:l$1({},r),dynamic:l$1({},s)}}}},{key:"googleworkspace",displayName:$localize`Google Workspace`,description:$localize`Create backups of Google Workspace data.`,sourceDescription:$localize`Use Google Workspace data as a remote source.`,icon:"assets/dest-icons/googleworkspace.png",isNonFree:true,dynamicFields:[{name:"google-admin-email",type:"Email",shortDescription:$localize`Admin Email`,longDescription:$localize`Email address of the Google Workspace admin user.`,isMandatory:true},{name:"google-service-account-json",type:"FreeText",shortDescription:$localize`Service account JSON`,longDescription:$localize`Paste the service account JSON here.`,isMandatory:true}],advancedFields:[{name:"google-service-account-file",type:"FileTree",accepts:".json,",shortDescription:$localize`Service account JSON file`,longDescription:$localize`Pick the path to a file with service account JSON.`}],mapper:{to:e=>`googleworkspace://${b([...Object.entries(e.advanced),...Object.entries(e.dynamic)])}`,from:(e,t,o)=>{let{advanced:r,dynamic:s}=l(e,t);return {destinationType:e,advanced:l$1({},r),dynamic:l$1({},s)}}}},{key:"drimecloud",displayName:$localize`Drime Cloud`,description:$localize`Store backups in Drime Cloud.`,sourceDescription:$localize`Use files from Drime Cloud as a remote source.`,icon:"assets/dest-icons/drime.png",customFields:{path:{type:"Path",name:"path",doubleSlash:p,shortDescription:$localize`Path in Drime Cloud`,longDescription:$localize`Path in Drime Cloud`,formElement:e=>n.control(e??"")}},dynamicFields:[{name:"api-token",isMandatory:true}],mapper:{to:e=>c(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:h(t)}},l(e,t))}},g("rabata","Rabata.io",null,"assets/dest-icons/rabata.png",[".rabata.io"]),g("wasabi","Wasabi Hot Storage",null,"assets/dest-icons/wasabi.png",[".wasabisys.com"]),g("impossiblecloud","Impossible Cloud",null,"assets/dest-icons/impossiblecloud.png",[".impossibleapi.net"]),g("scaleway","Scaleway",null,"assets/dest-icons/scaleway.png",[".scw.cloud"]),g("hosteurope","Hosteurope",null,"assets/dest-icons/hosteurope.png",[".hosteurope.de"]),g("dunkel","Dunkel",null,"assets/dest-icons/dunkel.png",[".dunkel.de"]),g("dreamhost","DreamHost",null,"assets/dest-icons/dreamhost.png",[".dreamhost.com"]),g("dincloud","dinCloud",null,"assets/dest-icons/dincloud.png",[".dincloud.com"]),g("polisystems","Poli Systems",null,"assets/dest-icons/polisystems.png",[".polisystems.ch"]),g("ibmcos","IBM COS",null,"assets/dest-icons/ibmcos.png",[".softlayer.net"]),g("storadera","Storadera",null,"assets/dest-icons/storadera.png",[".storadera.com"]),g("infomaniak","Infomaniak",null,"assets/dest-icons/infomaniak.png",[".infomaniak.com",".infomaniak.cloud"]),g("sakuracloud","\u3055\u304F\u3089\u306E\u30AF\u30E9\u30A6\u30C9",null,"assets/dest-icons/sakuracloud.png",[".sakurastorage.jp"]),g("seagatelyve","Seagate Lyve",null,"assets/dest-icons/seagatelyve.png",[".lyvecloud.seagate.com"]),g("internxt","Internxt",null,"assets/dest-icons/internxt.png",[".internxt.com"]),g("selectel","Selectel",null,"assets/dest-icons/selectel.png",[".storage.selcloud.ru",".srvstorage.uz",".srvstorage.kz"])],H={".amazonaws.com":"Amazon S3",".impossibleapi.net":"Impossible Cloud S3",".scw.cloud":"Scaleway S3",".hosteurope.de":"Hosteurope S3",".dunkel.de":"Dunkel S3",".dreamhost.com":"DreamHost S3",".dincloud.com":"dinCloud S3",".polisystems.ch":"Poli Systems S3",".softlayer.net":"IBM COS (S3)",".storadera.com":"Storadera S3",".wasabisys.com":"Wasabi S3",".infomaniak.com":"Infomaniak S3",".infomaniak.cloud":"Infomaniak S3",".sakurastorage.jp":"\u3055\u304F\u3089\u306E\u30AF\u30E9\u30A6\u30C9 S3",".lyvecloud.seagate.com":"Seagate Lyve S3",".digitaloceanspaces.com":"DigitalOcean S3",".backblazeb2.com":"Backblaze B2 S3",".cloudian.com":"Cloudian S3",".min.io":"MinIO S3",".linodeobjects.com":"Linode S3",".bunnycdn.com":"BunnyCDN S3",".azure.com":"Microsoft Azure S3",".googleapis.com":"Google Cloud Storage S3",".ibm.com":"IBM Cloud S3",".oracle.com":"Oracle Cloud S3",".cloudflare.com":"Cloudflare S3",".alibaba.com":"Alibaba Cloud S3",".huawei.com":"Huawei Cloud S3",".tencent.com":"Tencent Cloud S3",".baidu.com":"Baidu Cloud S3",".jd.com":"JD Cloud S3",".ucloud.cn":"UCloud S3",".qiniu.com":"Qiniu Cloud S3",".aliyuncs.com":"Aliyun S3",".tcloud.com":"TCloud S3",".tencentcloudapi.com":"Tencent Cloud S3",".rabata.io":"Rabata S3",".internxt.com":"Internxt S3",".storage.selcloud.ru":"Selectel S3",".srvstorage.uz":"Selectel S3",".srvstorage.kz":"Selectel S3"};var J=new jn,v=class{host;hostname;exactHostname;pathname;port;protocol;search;username;password;searchParams;originalUrl;constructor(t){let o=new URL(t);this.originalUrl=t,this.host=o.host,this.hostname=o.hostname,this.exactHostname=this.extractExactHostname(t),this.pathname=o.pathname,this.port=o.port,this.protocol=o.protocol,this.search=o.search,this.username=o.username,this.password=o.password,this.searchParams=o.searchParams;}extractExactHostname(t){let o=t.match(/^[a-zA-Z][a-zA-Z0-9+.-]*:\/\/(?:[^@\/?#]*@)?(\[[a-fA-F0-9:.]+\]|[^:\/?#]+)/);return o?o[1]:""}};function c(e,t,o,r){return U(e.destinationType??"file",t,o,r,[...Object.entries(e.advanced),...Object.entries(e.dynamic)])}function U(e,t,o,r,s){let i=b(s),u=encodeURIComponent(X(t)),S=u==""?"":u+Y(o),k=r??"",w=k.slice(1).startsWith(":\\")&&e=="file"?"file:///":`${e}://`,$=N(S,Q(k));return `${w}${$}${i}`}function Z(e){return e==null||e===""?"":e.startsWith("/")?e.substring(1):e}function N(...e){if(e.length===0)return "";if(e.length===1)return e[0]??"";let t="";for(let o of e)o==null||o===""||(t+=t.endsWith("/")||t==""?o:"/"+o);return t}function Q(e){return e.split("/").map(encodeURIComponent).join("/")}function h(e){if(e==null||e==="")return "";if(typeof e=="string")try{e=new v(e);}catch{return ""}return decodeURIComponent(e.exactHostname??"")+decodeURIComponent(e.pathname=="/"?"":e.pathname??"")}function X(e){return e==null||e===""?"":e.endsWith("/")?e.substring(0,e.length-1):e}function Y(e){return e==null||e===""?"":":"+e.toString()}function Ee(e){return e?e.startsWith("diskimage:")?"assets/dest-icons/external-harddrive.png":V(e).icon:""}function Le(e){if(!e)return "";if(e.startsWith("diskimage:"))return $localize`Local disk`;let t=V(e);return t?t.displayName:"Unknown"}function V(e){try{let o=new v(e),r=P.find(s=>s.mapper.intercept?.(o));if(r)return r}catch{}let t=e.split("://")[0];return G(t)}var ee={file:{Display:$localize`Local`,Icon:null}};function Ne(e){if(!e)return "";let t=V(e);if(!t)return "";let o=ee[t.key];if(o?.Display)return o.Display;if(t.key==="s3"){let r="http://null?"+e.split("?")[1],i=new URL(r).searchParams.get("s3-server-name")?.toLowerCase()??"";for(let[u,S]of Object.entries(H))if(i.endsWith(u))return S}return t.displayName}function G(e){return P.find(o=>o.key===e||o.customKey===e)??P.find(o=>`${o.key}s`===e)??null??l$1({key:e,displayName:e},L)}function Ie(e){return P.filter(t=>t.key===e||t.customKey===e)}function m(e){return {bucket:decodeURIComponent(e.exactHostname),server:decodeURIComponent(e.exactHostname||e.hostname),port:e.port,path:Z(decodeURIComponent(e.pathname))}}function l(e,t){let o={},r={},s=G(e);return t.searchParams.forEach((i,u)=>{s?.dynamicFields?.some(k=>k===u||k?.name===u)?r[u]=decodeURIComponent(i):o[u]=decodeURIComponent(i);}),{advanced:o,dynamic:r}}function b(e,t=false){let o=e.map(([s,i])=>`${s}=${i?encodeURIComponent(i.toString()):""}`).join("&");return o?(t?"":"?")+o:""}function Be(e){let t=e.destinationType??"";return G(t)?.mapper.to(e)??""}function xe(e){let t=e.split("://")[0],o=e.split("://")[1],r=t==="file"?"http://dummy":o==""||o.startsWith("?")?`${t}://`+o:"http://"+o;if(!o)return null;let s=V(e),i="";if(`${s.key}s`===t&&(i+=r.indexOf("?")===-1?"?":"&",i+="use-ssl=true",e=s.key+e.substring(t.length)),t==="file"&&o.indexOf("?")!==-1&&(i+=i.indexOf("?")===-1?"?":"&",i+=o.split("?")[1]??""),t==="file"&&o.startsWith("%")&&!o.startsWith("%5C"))return G(t).mapper.from(t,new v("http://localhost"+i),e);try{let u=new v(r+i);if(u.host==="undefined")return null;let S=o.split("?")[0].split("/")[0],k=u.host!=""&&!isNaN(Number(u.host.replaceAll(".",""))),A=S.split("."),w=A.length===4&&A.every($=>$.length&&$.length<=3&&!isNaN(Number($))&&parseInt($)<=255);return k&&!w?null:s.mapper.from(s.key,u,e)}catch(u){return console.error("Error while parsing target path",e,r+i,u),null}}function _(e){return typeof e!="string"||!e.trim()?[]:e.split(`
|
|
2
|
+
`).map(t=>t.trim()).filter(t=>t).map(t=>{let[o,...r]=t.split("="),s=r.join("=").trim();return o.trim()?[o.trim(),s]:null}).filter(t=>t!==null)}function je(e){return _(e).map(([t,o])=>({Name:t,Value:o}))}function Te(e){return Object.fromEntries(_(e))}function Re(e){if(!e)return false;let t=e.length;return !(t<3||t>63||!/^[a-z0-9.-]+$/.test(e)||!/^[a-z0-9]/.test(e)||!/[a-z0-9]$/.test(e)||/^\d{1,3}(\.\d{1,3}){3}$/.test(e)||/(\.\.)|(\.-)|(-\.)/.test(e))}function We(e){if(!e||e.length>253)return false;let t=e.split(".");for(let o of t)if(!o||o.length>63||!/^[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?$/.test(o))return false;return true}function g(e,t,o,r,s){return m$1(l$1({},F),{customKey:`s3-${e}`,icon:r??F.icon,displayName:$localize`${t} (S3)`,description:$localize`Store backups in ${t} storage.`,dynamicFields:[...(F.dynamicFields??[]).filter(i=>i?.name!=="s3-server-name"),{name:"s3-server-name",order:1,shortDescription:$localize`Server`,longDescription:$localize`The hostname of the ${t} endpoint`,type:"NonValidatedSelectableString",loadOptions:i=>i.get(d).getS3ProvidersFiltered(u=>s.some(S=>u.value.endsWith(S))),isMandatory:true,formElement:i=>J.control(i??"")}],mapper:m$1(l$1({},F.mapper),{to:i=>{let{bucket:u,path:S}=i.custom;return s.some(k=>i.dynamic["s3-server-name"]?.endsWith(k))&&(i.destinationType="s3"),c(i,u,null,S)},default:i=>`s3-${e}://?use-ssl=true`,intercept:i=>s.some(u=>i.searchParams.get("s3-server-name")?.endsWith(u))??false})})}
|
|
3
|
+
export{Be as B,Ee as E,G,Ie as I,Le as L,Ne as N,Re as R,Te as T,V,We as W,d,h,je as j,xe as x};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {o as oe$1,F as Fe}from'./chunk-C9EdrQe6.js';import {T,ad as br,bB as yD,bu as N,N as Nt,b as g1,af as m1,ac as h1,U as Ue,B as y1,G as Ga,b$ as oe,c0 as ae,bv as le,d as dw,f as N$1,k as gT,L as oC,Q as Qi,s as sm,S as Sd,l as HC,x as xd,F as Fg,Y as iC,o as oT,H as Hl,j as mg,w as im,z as gg,a3 as QC,D as DE,I as Qg,aC as hg,i as iT,$ as $g,K as lC,q as PC}from'./main-PXGZLKMN.js';var X=["inputRef"],Z=["optionsRef"],ee=["*",[["","menu",""]]],te=["*","[menu]"],ie=()=>({closeOnButton:false,closeOnEsc:true});function ne(a,J){a&1&&(Qi(0,"sh-icon",5),PC(1,"caret-down"),Hl());}function se(a,J){a&1&&(Qi(0,"sh-icon",6),PC(1,"caret-right"),Hl());}var m=[],ve=(()=>{class a{constructor(){this.#i=T(br),this.#t=T(yD),this.#e=T(N),this.parentMenu=T(a,{optional:true,skipSelf:true}),this.isSubmenu=Nt(()=>this.parentMenu!==null),this.asMultiLayer=g1(false),this.openIndicator=g1(false),this.disabled=g1(false),this.customOptionElementSelectors=g1(["button"]),this.keepClickedOptionActive=g1(false),this.closeOnClick=g1(true),this.isOpen=m1(false),this.closed=h1(),this.searchable=g1(false),this.activeOptionIndex=Ue(-1),this.inputRef=y1("inputRef"),this.optionsRef=y1("optionsRef"),this.openMenusEffect=Ga(t=>{this.isOpen()&&m.push(this),t(()=>{let i=m.indexOf(this);i>-1&&m.splice(i,1);});}),this.options=oe(this.optionsRef,this.customOptionElementSelectors),this.optionsEl=Nt(()=>{let t=this.optionsRef()?.nativeElement;return t?this.options.signal().filter(i=>i.disabled?false:i.closest(".options")===t):[]}),this.inputValue=ae(this.inputRef),this.optionsId=le(),this.activeOptionId=Ue(void 0),this.abortController=null,this.optionsEffect=Ga(t=>{if(this.abortController!==null&&(this.abortController.abort(),this.abortController=null),!this.isOpen())return;if(this.searchable()&&this.#e.pause(),t(()=>{this.searchable()&&this.#e.resume();}),this.abortController=new AbortController,!this.searchable())this.#i.documentElement.addEventListener("keydown",this.keyDownEventListener,{signal:this.abortController.signal});else {let n=this.inputRef()?.nativeElement;n&&n.addEventListener("keydown",this.keyDownEventListener,{signal:this.abortController.signal});}let e=this.inputRef()?.nativeElement;e&&(queueMicrotask(()=>e.focus()),this.closeOnClick()||this.optionsRef()?.nativeElement?.addEventListener("click",s=>{let o=s.target,r=this.activeElements();if(!r.length){let c=this.optionsEl();this.activeElements.set(c),r=c;}let p=r.findIndex(c=>c===o);p>-1&&(this.activeOptionIndex.set(p),e.focus());}));}),this.keyDownEventListener=t=>{if(m.at(-1)!==this)return;let i=this.activeOptionIndex(),e=this.searchable();if(this.#e.matches(t,"menu.next"))t.preventDefault(),this.activeOptionIndex.set(this.nextActiveIndex(i));else if(this.#e.matches(t,"menu.prev"))t.preventDefault(),this.activeOptionIndex.set(this.prevActiveIndex(i));else if(this.#e.matches(t,"menu.open-submenu")){if(!e&&i>-1){let n=this.activeElements()[i];if(n.parentElement?.hasAttribute("trigger")){t.preventDefault();let o=new CustomEvent("ship-menu-open",{bubbles:true,cancelable:true,detail:{keyboard:true}});n.dispatchEvent(o);}}}else if(this.#e.matches(t,"menu.close-submenu"))!e&&this.isSubmenu()&&(t.preventDefault(),this.close("closed"));else if(this.#e.matches(t,"menu.select")){let n=t.key==="Enter",s=t.key===" "||t.key==="Spacebar";if((n||s&&!e)&&(t.preventDefault(),i>-1)){let o=this.activeElements()[i];if(o.parentElement?.hasAttribute("trigger")){let p=new CustomEvent("ship-menu-open",{bubbles:true,cancelable:true,detail:{keyboard:true}});o.dispatchEvent(p);}else o.click(),o.querySelector("sh-checkbox")||queueMicrotask(()=>this.close("active"));}}else if(t.key==="Tab"){let n=this.activeElements();if(!n.length){let s=this.optionsEl();this.activeElements.set(s),n=s;}t.shiftKey?i<=0?(t.preventDefault(),this.close("closed")):(t.preventDefault(),this.activeOptionIndex.set(this.prevActiveIndex(i))):i>=n.length-1?(t.preventDefault(),this.close("closed")):(t.preventDefault(),this.activeOptionIndex.set(this.nextActiveIndex(i)));}},this._lastElementList=[],this.activeElements=Ue([]),this.lastInputValue="",this.inputValueEffect=Ga(()=>{if(!this.searchable()){this.activeElements.set(this.optionsEl());return}let i=(this.inputValue()??"").toLowerCase();if(this.#n(),!i||i===""){let n=this.optionsEl();this.activeElements.set(n),this._lastElementList=n;for(let s=0;s<n.length;s++)this.#t.removeStyle(n[s],"order"),n[s].id||(n[s].id=`${this.optionsId}-option-${s}`),n[s].setAttribute("role","option");return}if(!i||i==="")return;let e=this._lastElementList.length&&i.length>this.lastInputValue.length?this._lastElementList:this.optionsEl();this.lastInputValue=i;for(let n=0;n<e.length;n++){let s=e[n],o=s.textContent?.toLowerCase()||"",r=this.#s(o,i);s.value=r;}e=e.filter(n=>n.value>0).sort((n,s)=>s.value-n.value);for(let n=0;n<e.length;n++)this.#t.setStyle(e[n],"order",n);this.activeElements.set(e),this._lastElementList=e;for(let n=0;n<e.length;n++)e[n].id||(e[n].id=`${this.optionsId}-option-${n}`),e[n].setAttribute("role","option");}),this.activeOptionIndexEffect=Ga(()=>{let t=this.activeElements(),i=this.activeOptionIndex();for(let e=0;e<t.length;e++)t[e].classList.remove("active"),t[e].removeAttribute("aria-selected");if(i>-1){let e=t[i];e.scrollIntoView({block:"center"}),e.classList.add("active"),e.setAttribute("aria-selected","true"),this.activeOptionId.set(e.id);}else this.activeOptionId.set(void 0);});}#i;#t;#e;toggleIsOpen(t){t.preventDefault(),t.stopPropagation(),!this.disabled()&&(this.isOpen()?this.close("fromPopover"):this.open());}open(){this.disabled()||(this.isOpen.set(true),this.searchable()&&setTimeout(()=>this.inputRef()?.nativeElement.focus()));}onShipMenuOpen(t){t.preventDefault(),t.stopPropagation(),this.open(),t.detail?.keyboard&&setTimeout(()=>{this.activeOptionIndex.set(0);},50);}#s(t,i){if(!i)return 0;let e=0,n=-1,s=0,o=true;for(let r=0;r<i.length;r++){let p=i[r];if(t.length>n+1&&t[n+1]===p)e+=r===0?100:150,n++,s++;else {let c=t.indexOf(p,n+1);if(r>0&&(o=false),c===-1)return 0;e+=100,n=c,s++;}}return o&&i.length===s&&(e+=1e3),e+=s*20,e}nextActiveIndex(t){let i=this.activeElements();if(!i.length){let n=this.optionsEl();this.activeElements.set(n),i=n;}if(t===-1||t===i.length-1)return 0;let e=t+1;return i[e].disabled?this.nextActiveIndex(e):e}prevActiveIndex(t){let i=this.activeElements();if(!i.length){let n=this.optionsEl();this.activeElements.set(n),i=n;}if(t===0||t===-1)return i.length-1;let e=t-1;return i[e].disabled?this.prevActiveIndex(e):e}close(t="closed",i){this.inputValue.set("");let e=this.inputRef()?.nativeElement;if(e&&(e.value=""),this.closeOnClick()&&((!this.keepClickedOptionActive()||t==="closed")&&this.#n(),this.isOpen.set(false),this.closed.emit(t==="active"),this.isSubmenu())){let n=this.parentMenu?.inputRef()?.nativeElement;n&&queueMicrotask(()=>n.focus());}}#n(){this.activeOptionIndex.set(-1);let t=this.optionsEl();for(let i=0;i<t.length;i++)t[i].classList.remove("active"),t[i].removeAttribute("aria-selected");}ngOnDestroy(){this.abortController&&(this.abortController.abort(),this.abortController=null);let t=m.indexOf(this);t>-1&&m.splice(t,1);}static{this.\u0275fac=function(i){return new(i||a)};}static{this.\u0275cmp=dw({type:a,selectors:[["sh-menu"]],viewQuery:function(i,e){i&1&&$g(e.inputRef,X,5)(e.optionsRef,Z,5),i&2&&lC(2);},hostVars:6,hostBindings:function(i,e){i&1&&Fg("ship-menu-open",function(s){return e.onShipMenuOpen(s)}),i&2&&Qg("disabled",e.disabled())("has-search",e.searchable())("multi-layer",e.asMultiLayer());},inputs:{asMultiLayer:[1,"asMultiLayer"],openIndicator:[1,"openIndicator"],disabled:[1,"disabled"],customOptionElementSelectors:[1,"customOptionElementSelectors"],keepClickedOptionActive:[1,"keepClickedOptionActive"],closeOnClick:[1,"closeOnClick"],isOpen:[1,"isOpen"],searchable:[1,"searchable"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:te,decls:13,vars:21,consts:[["formFieldWrapper",""],["inputRef",""],["optionsRef",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","asMultiLayer","options"],["trigger","","role","combobox","aria-haspopup","listbox",3,"click"],[1,"open-indicator"],[1,"submenu-indicator"],[1,"form-field-wrap"],[1,"small","stretch"],["type","text","placeholder","Search","role","combobox","aria-autocomplete","list"],["role","listbox",1,"options",3,"click","id"]],template:function(i,e){if(i&1){let n=gT();oC(ee),Qi(0,"sh-popover",3,0),sm("isOpenChange",function(o){return Sd(n),HC(e.isOpen,o)||(e.isOpen=o),xd(o)}),Fg("closed",function(){return e.close("fromPopover")}),Qi(2,"div",4),Fg("click",function(o){return e.toggleIsOpen(o)}),iC(3),oT(4,ne,2,0,"sh-icon",5),oT(5,se,2,0,"sh-icon",6),Hl(),Qi(6,"div",7)(7,"sh-form-field",8),mg(8,"input",9,1),Hl()(),Qi(10,"div",10,2),Fg("click",function(){return e.close("active")}),iC(12,1),Hl()();}i&2&&(im("isOpen",e.isOpen),gg("disableOpenByClick",true)("asMultiLayer",e.asMultiLayer())("options",QC(20,ie)),DE(2),Qg("is-open",e.isOpen()),hg("aria-expanded",e.isOpen())("aria-controls",e.optionsId)("aria-activedescendant",e.activeOptionId()),DE(2),iT(e.openIndicator()?4:-1),DE(),iT(e.isSubmenu()?5:-1),DE(2),Qg("hidden",e.searchable()===false),DE(),hg("aria-expanded",e.isOpen())("aria-controls",e.optionsId)("aria-activedescendant",e.activeOptionId()),DE(2),Qg("searching",e.searchable()&&e.inputValue()!==""),gg("id",e.optionsId),hg("aria-activedescendant",e.activeOptionId()));},dependencies:[oe$1,Fe,N$1],styles:[`sh-menu{--menu-mh: 20rem;display:inline-flex;position:relative}sh-menu.disabled{opacity:.5;pointer-events:none}sh-menu.stretch{width:100%}sh-menu.stretch [trigger]>*{width:100%}sh-menu.has-search sh-popover .options [title]{position:sticky;border-bottom:var(--border-10)}sh-menu.has-search .form-field-wrap{margin:.5rem .5rem 0}sh-menu.has-search .options{margin:.25rem 0 0}sh-menu.multi-layer [trigger]:has(sh-icon.open-indicator).is-open .open-indicator{transform:translateY(-50%) rotate(-90deg)}sh-menu.multi-layer [trigger]:has(sh-icon.open-indicator){display:flex}sh-menu.multi-layer [trigger]:has(sh-icon.open-indicator) .open-indicator{right:1rem}sh-menu.multi-layer [trigger] button:first-child{margin-top:0}sh-menu [trigger]:has(sh-icon.open-indicator){position:relative}sh-menu [trigger]:has(sh-icon.open-indicator)>:first-child{padding-right:2rem}sh-menu [trigger]:has(sh-icon.open-indicator) .open-indicator{position:absolute;right:.5rem;top:50%;transform:translateY(-50%);color:var(--base-8);font-size:1rem;font-weight:inherit;pointer-events:none;transition:transform 75ms ease-in-out}sh-menu [trigger]:has(sh-icon.open-indicator).is-open .open-indicator{transform:translateY(-50%) rotate(-180deg)}sh-menu [trigger]:has(sh-icon.submenu-indicator){position:relative}sh-menu [trigger]:has(sh-icon.submenu-indicator)>:first-child{padding-right:2rem!important}sh-menu [trigger]:has(sh-icon.submenu-indicator) .submenu-indicator{position:absolute;right:1rem;top:50%;transform:translateY(-50%);color:var(--base-8);font-size:1rem;font-weight:inherit;pointer-events:none;transition:transform 75ms ease-in-out}sh-menu [trigger]:has(sh-icon.submenu-indicator).is-open .submenu-indicator{transform:translateY(-50%) rotate(90deg)}sh-menu sh-popover{flex:1 0}sh-menu sh-popover .popover{padding:0}sh-menu sh-popover .popover-content{overflow:hidden}sh-menu sh-popover .form-field-wrap sh-form-field{z-index:10;background-color:var(--base-1)}sh-menu sh-popover .form-field-wrap sh-form-field.hidden{opacity:0;height:0;width:0;min-width:0;min-height:0;margin:0}sh-menu sh-popover .options{z-index:2;position:relative;display:flex;flex-direction:column;gap:.25rem;padding:0;margin:0;max-height:var(--menu-mh);overflow:auto}sh-menu sh-popover .options sh-menu:first-child,sh-menu sh-popover .options button:first-child{margin-top:.5rem}sh-menu sh-popover .options.searching button[disabled]{display:none}sh-menu sh-popover .options.searching button[value="0"]{display:none}sh-menu sh-popover .options.searching>*:not(button){display:none}sh-menu sh-popover .options:after{content:"";display:block;width:100%;min-height:.25rem;order:9999999}sh-menu sh-popover .options [title]{font:var(--paragraph-30);color:var(--base-8);padding:.5rem .75rem;margin:0;-webkit-user-select:none;user-select:none;position:relative;top:0;z-index:10;background-color:var(--base-1)}sh-menu sh-popover .options button{display:flex;justify-content:flex-start;align-items:center;text-align:left;height:auto;margin:0 .5rem;padding:.25rem .5rem;gap:0 .5rem;width:calc(100% - 1rem);border-radius:var(--shape-2);appearance:none;background-color:transparent;border:0;cursor:pointer;color:var(--base-12);transition:transform 125ms linear;transform:scale(1)}sh-menu sh-popover .options button:before{content:"";min-height:1.5rem;display:inline-block;width:0;margin-right:-.5rem}sh-menu sh-popover .options button:active{transform:scale(.98)}sh-menu sh-popover .options button[disabled]{opacity:.3;cursor:initial}sh-menu sh-popover .options button[disabled]:hover{background-color:transparent}sh-menu sh-popover .options button [suffix]{order:999;color:var(--base-8);font:var(--paragraph-30);justify-self:flex-end;display:inline-flex;flex:1 0;justify-content:flex-end}sh-menu sh-popover .options button sh-icon{font-size:1rem}sh-menu sh-popover .options button.active,sh-menu sh-popover .options button:hover{background-color:var(--base-2);color:var(--base-12)}sh-menu sh-popover .options button.focused{background-color:var(--primary-2);color:var(--base-12)}sh-menu sh-popover .options button.focused:hover{background-color:var(--primary-3)}
|
|
1
|
+
import {o as oe$1,F as Fe}from'./chunk-D3SUPUQT.js';import {T,ad as Mr,bC as ED,bv as N,N as Nt,b as I1,af as E1,ac as v1,G as Ge,E as D1,z as za,c1 as oe,c2 as ae,bw as le,h as hw,d as N$1,l as vT,M as aC,Q as Qi,p as cm,r as kd,U as UC,O as Od,V as Vg,X as cC,f as aT,$ as $l,j as vg,x as am,A as yg,a3 as KC,C as CE,Y as Yg,aC as mg,i as cT,W as Wg,K as fC,w as jC}from'./main-QLXVXD6E.js';var X=["inputRef"],Z=["optionsRef"],ee=["*",[["","menu",""]]],te=["*","[menu]"],ie=()=>({closeOnButton:false,closeOnEsc:true});function ne(a,J){a&1&&(Qi(0,"sh-icon",5),jC(1,"caret-down"),$l());}function se(a,J){a&1&&(Qi(0,"sh-icon",6),jC(1,"caret-right"),$l());}var m=[],ve=(()=>{class a{constructor(){this.#i=T(Mr),this.#t=T(ED),this.#e=T(N),this.parentMenu=T(a,{optional:true,skipSelf:true}),this.isSubmenu=Nt(()=>this.parentMenu!==null),this.asMultiLayer=I1(false),this.openIndicator=I1(false),this.disabled=I1(false),this.customOptionElementSelectors=I1(["button"]),this.keepClickedOptionActive=I1(false),this.closeOnClick=I1(true),this.isOpen=E1(false),this.closed=v1(),this.searchable=I1(false),this.activeOptionIndex=Ge(-1),this.inputRef=D1("inputRef"),this.optionsRef=D1("optionsRef"),this.openMenusEffect=za(t=>{this.isOpen()&&m.push(this),t(()=>{let i=m.indexOf(this);i>-1&&m.splice(i,1);});}),this.options=oe(this.optionsRef,this.customOptionElementSelectors),this.optionsEl=Nt(()=>{let t=this.optionsRef()?.nativeElement;return t?this.options.signal().filter(i=>i.disabled?false:i.closest(".options")===t):[]}),this.inputValue=ae(this.inputRef),this.optionsId=le(),this.activeOptionId=Ge(void 0),this.abortController=null,this.optionsEffect=za(t=>{if(this.abortController!==null&&(this.abortController.abort(),this.abortController=null),!this.isOpen())return;if(this.searchable()&&this.#e.pause(),t(()=>{this.searchable()&&this.#e.resume();}),this.abortController=new AbortController,!this.searchable())this.#i.documentElement.addEventListener("keydown",this.keyDownEventListener,{signal:this.abortController.signal});else {let n=this.inputRef()?.nativeElement;n&&n.addEventListener("keydown",this.keyDownEventListener,{signal:this.abortController.signal});}let e=this.inputRef()?.nativeElement;e&&(queueMicrotask(()=>e.focus()),this.closeOnClick()||this.optionsRef()?.nativeElement?.addEventListener("click",s=>{let o=s.target,r=this.activeElements();if(!r.length){let c=this.optionsEl();this.activeElements.set(c),r=c;}let p=r.findIndex(c=>c===o);p>-1&&(this.activeOptionIndex.set(p),e.focus());}));}),this.keyDownEventListener=t=>{if(m.at(-1)!==this)return;let i=this.activeOptionIndex(),e=this.searchable();if(this.#e.matches(t,"menu.next"))t.preventDefault(),this.activeOptionIndex.set(this.nextActiveIndex(i));else if(this.#e.matches(t,"menu.prev"))t.preventDefault(),this.activeOptionIndex.set(this.prevActiveIndex(i));else if(this.#e.matches(t,"menu.open-submenu")){if(!e&&i>-1){let n=this.activeElements()[i];if(n.parentElement?.hasAttribute("trigger")){t.preventDefault();let o=new CustomEvent("ship-menu-open",{bubbles:true,cancelable:true,detail:{keyboard:true}});n.dispatchEvent(o);}}}else if(this.#e.matches(t,"menu.close-submenu"))!e&&this.isSubmenu()&&(t.preventDefault(),this.close("closed"));else if(this.#e.matches(t,"menu.select")){let n=t.key==="Enter",s=t.key===" "||t.key==="Spacebar";if((n||s&&!e)&&(t.preventDefault(),i>-1)){let o=this.activeElements()[i];if(o.parentElement?.hasAttribute("trigger")){let p=new CustomEvent("ship-menu-open",{bubbles:true,cancelable:true,detail:{keyboard:true}});o.dispatchEvent(p);}else o.click(),o.querySelector("sh-checkbox")||queueMicrotask(()=>this.close("active"));}}else if(t.key==="Tab"){let n=this.activeElements();if(!n.length){let s=this.optionsEl();this.activeElements.set(s),n=s;}t.shiftKey?i<=0?(t.preventDefault(),this.close("closed")):(t.preventDefault(),this.activeOptionIndex.set(this.prevActiveIndex(i))):i>=n.length-1?(t.preventDefault(),this.close("closed")):(t.preventDefault(),this.activeOptionIndex.set(this.nextActiveIndex(i)));}},this._lastElementList=[],this.activeElements=Ge([]),this.lastInputValue="",this.inputValueEffect=za(()=>{if(!this.searchable()){this.activeElements.set(this.optionsEl());return}let i=(this.inputValue()??"").toLowerCase();if(this.#n(),!i||i===""){let n=this.optionsEl();this.activeElements.set(n),this._lastElementList=n;for(let s=0;s<n.length;s++)this.#t.removeStyle(n[s],"order"),n[s].id||(n[s].id=`${this.optionsId}-option-${s}`),n[s].setAttribute("role","option");return}if(!i||i==="")return;let e=this._lastElementList.length&&i.length>this.lastInputValue.length?this._lastElementList:this.optionsEl();this.lastInputValue=i;for(let n=0;n<e.length;n++){let s=e[n],o=s.textContent?.toLowerCase()||"",r=this.#s(o,i);s.value=r;}e=e.filter(n=>n.value>0).sort((n,s)=>s.value-n.value);for(let n=0;n<e.length;n++)this.#t.setStyle(e[n],"order",n);this.activeElements.set(e),this._lastElementList=e;for(let n=0;n<e.length;n++)e[n].id||(e[n].id=`${this.optionsId}-option-${n}`),e[n].setAttribute("role","option");}),this.activeOptionIndexEffect=za(()=>{let t=this.activeElements(),i=this.activeOptionIndex();for(let e=0;e<t.length;e++)t[e].classList.remove("active"),t[e].removeAttribute("aria-selected");if(i>-1){let e=t[i];e.scrollIntoView({block:"center"}),e.classList.add("active"),e.setAttribute("aria-selected","true"),this.activeOptionId.set(e.id);}else this.activeOptionId.set(void 0);});}#i;#t;#e;toggleIsOpen(t){t.preventDefault(),t.stopPropagation(),!this.disabled()&&(this.isOpen()?this.close("fromPopover"):this.open());}open(){this.disabled()||(this.isOpen.set(true),this.searchable()&&setTimeout(()=>this.inputRef()?.nativeElement.focus()));}onShipMenuOpen(t){t.preventDefault(),t.stopPropagation(),this.open(),t.detail?.keyboard&&setTimeout(()=>{this.activeOptionIndex.set(0);},50);}#s(t,i){if(!i)return 0;let e=0,n=-1,s=0,o=true;for(let r=0;r<i.length;r++){let p=i[r];if(t.length>n+1&&t[n+1]===p)e+=r===0?100:150,n++,s++;else {let c=t.indexOf(p,n+1);if(r>0&&(o=false),c===-1)return 0;e+=100,n=c,s++;}}return o&&i.length===s&&(e+=1e3),e+=s*20,e}nextActiveIndex(t){let i=this.activeElements();if(!i.length){let n=this.optionsEl();this.activeElements.set(n),i=n;}if(t===-1||t===i.length-1)return 0;let e=t+1;return i[e].disabled?this.nextActiveIndex(e):e}prevActiveIndex(t){let i=this.activeElements();if(!i.length){let n=this.optionsEl();this.activeElements.set(n),i=n;}if(t===0||t===-1)return i.length-1;let e=t-1;return i[e].disabled?this.prevActiveIndex(e):e}close(t="closed",i){this.inputValue.set("");let e=this.inputRef()?.nativeElement;if(e&&(e.value=""),this.closeOnClick()&&((!this.keepClickedOptionActive()||t==="closed")&&this.#n(),this.isOpen.set(false),this.closed.emit(t==="active"),this.isSubmenu())){let n=this.parentMenu?.inputRef()?.nativeElement;n&&queueMicrotask(()=>n.focus());}}#n(){this.activeOptionIndex.set(-1);let t=this.optionsEl();for(let i=0;i<t.length;i++)t[i].classList.remove("active"),t[i].removeAttribute("aria-selected");}ngOnDestroy(){this.abortController&&(this.abortController.abort(),this.abortController=null);let t=m.indexOf(this);t>-1&&m.splice(t,1);}static{this.\u0275fac=function(i){return new(i||a)};}static{this.\u0275cmp=hw({type:a,selectors:[["sh-menu"]],viewQuery:function(i,e){i&1&&Wg(e.inputRef,X,5)(e.optionsRef,Z,5),i&2&&fC(2);},hostVars:6,hostBindings:function(i,e){i&1&&Vg("ship-menu-open",function(s){return e.onShipMenuOpen(s)}),i&2&&Yg("disabled",e.disabled())("has-search",e.searchable())("multi-layer",e.asMultiLayer());},inputs:{asMultiLayer:[1,"asMultiLayer"],openIndicator:[1,"openIndicator"],disabled:[1,"disabled"],customOptionElementSelectors:[1,"customOptionElementSelectors"],keepClickedOptionActive:[1,"keepClickedOptionActive"],closeOnClick:[1,"closeOnClick"],isOpen:[1,"isOpen"],searchable:[1,"searchable"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:te,decls:13,vars:21,consts:[["formFieldWrapper",""],["inputRef",""],["optionsRef",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","asMultiLayer","options"],["trigger","","role","combobox","aria-haspopup","listbox",3,"click"],[1,"open-indicator"],[1,"submenu-indicator"],[1,"form-field-wrap"],[1,"small","stretch"],["type","text","placeholder","Search","role","combobox","aria-autocomplete","list"],["role","listbox",1,"options",3,"click","id"]],template:function(i,e){if(i&1){let n=vT();aC(ee),Qi(0,"sh-popover",3,0),cm("isOpenChange",function(o){return kd(n),UC(e.isOpen,o)||(e.isOpen=o),Od(o)}),Vg("closed",function(){return e.close("fromPopover")}),Qi(2,"div",4),Vg("click",function(o){return e.toggleIsOpen(o)}),cC(3),aT(4,ne,2,0,"sh-icon",5),aT(5,se,2,0,"sh-icon",6),$l(),Qi(6,"div",7)(7,"sh-form-field",8),vg(8,"input",9,1),$l()(),Qi(10,"div",10,2),Vg("click",function(){return e.close("active")}),cC(12,1),$l()();}i&2&&(am("isOpen",e.isOpen),yg("disableOpenByClick",true)("asMultiLayer",e.asMultiLayer())("options",KC(20,ie)),CE(2),Yg("is-open",e.isOpen()),mg("aria-expanded",e.isOpen())("aria-controls",e.optionsId)("aria-activedescendant",e.activeOptionId()),CE(2),cT(e.openIndicator()?4:-1),CE(),cT(e.isSubmenu()?5:-1),CE(2),Yg("hidden",e.searchable()===false),CE(),mg("aria-expanded",e.isOpen())("aria-controls",e.optionsId)("aria-activedescendant",e.activeOptionId()),CE(2),Yg("searching",e.searchable()&&e.inputValue()!==""),yg("id",e.optionsId),mg("aria-activedescendant",e.activeOptionId()));},dependencies:[oe$1,Fe,N$1],styles:[`sh-menu{--menu-mh: 20rem;display:inline-flex;position:relative}sh-menu.disabled{opacity:.5;pointer-events:none}sh-menu.stretch{width:100%}sh-menu.stretch [trigger]>*{width:100%}sh-menu.has-search sh-popover .options [title]{position:sticky;border-bottom:var(--border-10)}sh-menu.has-search .form-field-wrap{margin:.5rem .5rem 0}sh-menu.has-search .options{margin:.25rem 0 0}sh-menu.multi-layer [trigger]:has(sh-icon.open-indicator).is-open .open-indicator{transform:translateY(-50%) rotate(-90deg)}sh-menu.multi-layer [trigger]:has(sh-icon.open-indicator){display:flex}sh-menu.multi-layer [trigger]:has(sh-icon.open-indicator) .open-indicator{right:1rem}sh-menu.multi-layer [trigger] button:first-child{margin-top:0}sh-menu [trigger]:has(sh-icon.open-indicator){position:relative}sh-menu [trigger]:has(sh-icon.open-indicator)>:first-child{padding-right:2rem}sh-menu [trigger]:has(sh-icon.open-indicator) .open-indicator{position:absolute;right:.5rem;top:50%;transform:translateY(-50%);color:var(--base-8);font-size:1rem;font-weight:inherit;pointer-events:none;transition:transform 75ms ease-in-out}sh-menu [trigger]:has(sh-icon.open-indicator).is-open .open-indicator{transform:translateY(-50%) rotate(-180deg)}sh-menu [trigger]:has(sh-icon.submenu-indicator){position:relative}sh-menu [trigger]:has(sh-icon.submenu-indicator)>:first-child{padding-right:2rem!important}sh-menu [trigger]:has(sh-icon.submenu-indicator) .submenu-indicator{position:absolute;right:1rem;top:50%;transform:translateY(-50%);color:var(--base-8);font-size:1rem;font-weight:inherit;pointer-events:none;transition:transform 75ms ease-in-out}sh-menu [trigger]:has(sh-icon.submenu-indicator).is-open .submenu-indicator{transform:translateY(-50%) rotate(90deg)}sh-menu sh-popover{flex:1 0}sh-menu sh-popover .popover{padding:0}sh-menu sh-popover .popover-content{overflow:hidden}sh-menu sh-popover .form-field-wrap sh-form-field{z-index:10;background-color:var(--base-1)}sh-menu sh-popover .form-field-wrap sh-form-field.hidden{opacity:0;height:0;width:0;min-width:0;min-height:0;margin:0}sh-menu sh-popover .options{z-index:2;position:relative;display:flex;flex-direction:column;gap:.25rem;padding:0;margin:0;max-height:var(--menu-mh);overflow:auto}sh-menu sh-popover .options sh-menu:first-child,sh-menu sh-popover .options button:first-child{margin-top:.5rem}sh-menu sh-popover .options.searching button[disabled]{display:none}sh-menu sh-popover .options.searching button[value="0"]{display:none}sh-menu sh-popover .options.searching>*:not(button){display:none}sh-menu sh-popover .options:after{content:"";display:block;width:100%;min-height:.25rem;order:9999999}sh-menu sh-popover .options [title]{font:var(--paragraph-30);color:var(--base-8);padding:.5rem .75rem;margin:0;-webkit-user-select:none;user-select:none;position:relative;top:0;z-index:10;background-color:var(--base-1)}sh-menu sh-popover .options button{display:flex;justify-content:flex-start;align-items:center;text-align:left;height:auto;margin:0 .5rem;padding:.25rem .5rem;gap:0 .5rem;width:calc(100% - 1rem);border-radius:var(--shape-2);appearance:none;background-color:transparent;border:0;cursor:pointer;color:var(--base-12);transition:transform 125ms linear;transform:scale(1)}sh-menu sh-popover .options button:before{content:"";min-height:1.5rem;display:inline-block;width:0;margin-right:-.5rem}sh-menu sh-popover .options button:active{transform:scale(.98)}sh-menu sh-popover .options button[disabled]{opacity:.3;cursor:initial}sh-menu sh-popover .options button[disabled]:hover{background-color:transparent}sh-menu sh-popover .options button [suffix]{order:999;color:var(--base-8);font:var(--paragraph-30);justify-self:flex-end;display:inline-flex;flex:1 0;justify-content:flex-end}sh-menu sh-popover .options button sh-icon{font-size:1rem}sh-menu sh-popover .options button.active,sh-menu sh-popover .options button:hover{background-color:var(--base-2);color:var(--base-12)}sh-menu sh-popover .options button.focused{background-color:var(--primary-2);color:var(--base-12)}sh-menu sh-popover .options button.focused:hover{background-color:var(--primary-3)}
|
|
2
2
|
`],encapsulation:2});}}return a})();export{ve as v};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {e as ee}from'./chunk-
|
|
1
|
+
import {e as ee}from'./chunk-CzJ3-6Pu.js';import'./chunk-oTpkLrqH.js';import'./chunk-dCFVYHva.js';import'./chunk--kVw-BwM.js';import'./chunk-DuTbfCdT.js';import'./chunk-DKacf9Tj.js';import'./chunk-CI8lsvKT.js';import'./chunk-C5p3bQwH.js';import {T,m,h as hw,v,d as N,_ as _t,j as vg,Q as Qi,n as nC,$ as $l,L as Lg,F as Fg,f as aT,C as CE,Y as Yg,A as yg,a3 as KC,i as cT}from'./main-QLXVXD6E.js';import {f}from'./chunk-C3KPTLNN.js';import'./chunk-PONAC1Ya.js';import'./chunk-D3SUPUQT.js';import'./chunk-DoYGADYB.js';import'./chunk-Crs56mDy.js';import'./chunk-Bcxzhjj8.js';import'./chunk-BYJ0fSUP.js';import'./chunk-D2aWqPl_.js';import'./chunk-D3d-eReU.js';var B=()=>["/backup/new"],G=()=>["/backup/import"],K=()=>["/backup/import-destination"];function U(r,s){r&1&&(Qi(0,"sh-card",11),vg(1,"img",15),Qi(2,"h3"),nC(3,7),$l(),Qi(4,"p"),nC(5,8),$l(),Qi(6,"button",13),Lg(7,9),vg(8,"sh-icon"),Fg(),$l()()),r&2&&(CE(6),yg("routerLink",KC(1,K)));}var p=class r{hasRestoreControlFilesOperation=T(m).hasRestoreControlFilesOperation;static \u0275fac=function(i){return new(i||r)};static \u0275cmp=hw({type:r,selectors:[["app-add-backup"]],decls:24,vars:7,consts:()=>{let s;s=$localize`Add a new backup`;let i;i=$localize`New backup`;let C;C=$localize`Configure a new backup. Choose your destination, source data and schedule.`;let m;m=$localize` Add a new backup ${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON:`;let A;A=$localize`Import from file`;let S;S=$localize`Import backup configuration from a file. During import, you can adjust the settings.`;let P;P=$localize` Import from file ${"\uFFFD#22\uFFFD"}:START_TAG_SH_ICON:upload-simple${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SH_ICON:`;let T;T=$localize`Import from destination`;let g;g=$localize`Import one or more backup configurations from a remote destination.`;let E;return E=$localize` Import from destination ${"\uFFFD#8\uFFFD"}:START_TAG_SH_ICON:download-simple${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_SH_ICON:`,[s,i,C,m,A,S,P,T,g,E,[1,"backup-types"],[1,"type-a"],["src","assets/images/new-backup.png"],["shButton","",1,"raised","primary",3,"routerLink"],["src","assets/images/backup-from-config.png"],["src","assets/images/backup-from-remote.png"]]},template:function(i,C){i&1&&(vg(0,"app-status-bar"),Qi(1,"section")(2,"h2"),nC(3,0),$l(),Qi(4,"div",10)(5,"sh-card",11),vg(6,"img",12),Qi(7,"h3"),nC(8,1),$l(),Qi(9,"p"),nC(10,2),$l(),Qi(11,"button",13),Lg(12,3),vg(13,"sh-icon"),Fg(),$l()(),Qi(14,"sh-card",11),vg(15,"img",14),Qi(16,"h3"),nC(17,4),$l(),Qi(18,"p"),nC(19,5),$l(),Qi(20,"button",13),Lg(21,6),vg(22,"sh-icon"),Fg(),$l()(),aT(23,U,9,2,"sh-card",11),$l()()),i&2&&(CE(4),Yg("three-column",C.hasRestoreControlFilesOperation()),CE(7),yg("routerLink",KC(5,B)),CE(9),yg("routerLink",KC(6,G)),CE(3),cT(C.hasRestoreControlFilesOperation()?23:-1));},dependencies:[ee,v,f,N,_t],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column;gap:2rem;padding:2rem 0}div.backup-types[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem;max-width:43.75rem;padding:0 2rem}div.backup-types.three-column[_ngcontent-%COMP%]{grid-template-columns:1fr 1fr 1fr;max-width:65.625rem}@media only screen and (max-width:768px){div.backup-types[_ngcontent-%COMP%]{grid-template-columns:1fr}}sh-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;gap:1rem;padding-bottom:3rem}sh-card[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-width:18.75rem}sh-card[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-wrap:balance;text-align:center;width:75%}"]})};export{p as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import v$1 from'./chunk-BYHopERA.js';import'./chunk-BcpsSgKo.js';import {c}from'./chunk-D48AStVy.js';import'./chunk-CA-ER0DL.js';import {k}from'./chunk-w_Hs_Uxi.js';import'./chunk-D1wHRltX.js';import'./chunk-BAZ5npJw.js';import {T,aX as y,ab as C,a6 as be$1,U as Ue,N as Nt,ba as h,d as dw,bb as Fi,bc as Jt,bd as Kn,v,f as N,be as pi,aJ as ci,aH as m,b1 as m$1,Q as Qi,o as oT,bf as ig,q as PC,H as Hl,X as XT,j as mg,F as Fg,I as Qg,D as DE,i as iT,z as gg,E as nm,aa as Gl,bg as Q,G as Ga,aZ as ee,k as gT,aM as tb,a1 as cT,S as Sd,n as nC,x as xd,aN as ob,aB as rm,aR as rb,a2 as lT,as as Hd,bh as Bd,aP as Ul,aQ as Wl,ap as sT}from'./main-PXGZLKMN.js';import {f}from'./chunk-DJbAxHpK.js';import {d}from'./chunk-DQW8lSiz.js';import'./chunk-CMmgPgiU.js';import'./chunk-Drc5kcUX.js';var U=class r{#e=T(y);#n=T(Q);#i=Ue([]);recentFiles=this.#i.asReadonly();#r=5;#s=Ue(null);etaData=this.#s.asReadonly();#a=null;#t=null;#o=null;recentFileEffect=Ga(()=>{let i=this.#e.statusData();i&&i.CurrentFilename&&i.CurrentFilesize!==void 0&&this.#c(i.CurrentFilename,i.CurrentFilesize);});#c(i,e){let s=new Date;this.#i.update(c=>c.length>0&&c[0].filename===i?c:[{filename:i,filesize:e,timestamp:s},...c].slice(0,this.#r));}activateView(){this.#a=new Date;let i=this.#e.statusData();i&&i.ProcessedFileCount!==void 0&&i.ProcessedFileSize!==void 0&&(this.#t={files:i.ProcessedFileCount,bytes:i.ProcessedFileSize}),this.#o=setInterval(()=>{this.#l();},1e3);}deactivateView(){this.#a=null,this.#t=null,this.#o&&(clearInterval(this.#o),this.#o=null);}#l(){if(!this.#a||!this.#t)return;let i=this.#e.statusData();if(!i)return;let e=new Date,s=(e.getTime()-this.#a.getTime())/1e3;if(s<5)return;let c=i.ProcessedFileCount||0,P=i.ProcessedFileSize||0,I=c-this.#t.files,k=P-this.#t.bytes,x=I/s,M=k/s,A=(i.TotalFileCount||0)-c,u=(i.TotalFileSize||0)-P,O=null,T=null;x>0&&(O=A/x),M>0&&(T=u/M);let R=null,w="bytes";if(O!==null&&T!==null){let Se=Math.max(O,T);R=new Date(e.getTime()+Se*1e3),w=O>T?"files":"bytes";}else O!==null?(R=new Date(e.getTime()+O*1e3),w="files"):T!==null&&(R=new Date(e.getTime()+T*1e3),w="bytes");this.#s.set({startTime:this.#a,filesProcessedAtStart:this.#t.files,bytesProcessedAtStart:this.#t.bytes,currentFilesPerSecond:x,currentBytesPerSecond:M,estimatedCompletion:R,metric:w});}static \u0275fac=function(e){return new(e||r)};static \u0275prov=ee({token:r,factory:r.\u0275fac,providedIn:"root"})};function xe(r,i){if(r&1&&(Qi(0,"div",42)(1,"span",20),PC(2,"Processing"),Hl(),Qi(3,"sh-list",43)(4,"div",44)(5,"sh-icon"),PC(6,"file"),Hl(),Qi(7,"div",45)(8,"span",46),PC(9),Hl(),Qi(10,"span",47),PC(11),tb(12,"bytes"),Hl()()()()()),r&2){let e=nC(2);DE(8),gg("title",e.statusData()?.CurrentFilename),DE(),Gl(" ",e.statusData()?.CurrentFilename," "),DE(2),nm(rb(12,3,e.statusData()?.CurrentFilesize));}}function Me(r,i){if(r&1&&(Qi(0,"div",35)(1,"span",46),PC(2),Hl(),Qi(3,"span",47),PC(4),tb(5,"bytes"),Hl()()),r&2){let e=i.$implicit;DE(),gg("title",e.filename),DE(),nm(e.filename),DE(2),nm(rb(5,3,e.filesize));}}function Oe(r,i){r&1&&(Qi(0,"div",36),XT(1,2),Hl());}function Te(r,i){if(r&1&&(Qi(0,"sh-list")(1,"div",48)(2,"span",20),PC(3,"ETA"),Hl(),Qi(4,"span",21),PC(5),tb(6,"date"),Qi(7,"span",49),PC(8),tb(9,"relativeTime"),Hl()()(),Qi(10,"div",50)(11,"span",20),PC(12,"Files/s"),Hl(),Qi(13,"span",21),PC(14),tb(15,"number"),Hl()(),Qi(16,"div",50)(17,"span",20),PC(18,"Upload Speed"),Hl(),Qi(19,"span",21),PC(20),tb(21,"bytes"),Hl()()()),r&2){let e=nC(2);DE(5),Gl(" ",ob(6,4,e.etaData()?.estimatedCompletion,"mediumTime")," "),DE(3),Gl(" (",rb(9,7,e.etaData()?.estimatedCompletion),") "),DE(6),Gl(" ",ob(15,9,e.etaData()?.currentFilesPerSecond,"1.1-1")," "),DE(6),Gl("",rb(21,12,e.etaData()?.currentBytesPerSecond),"/s");}}function ve(r,i){if(r&1&&(Qi(0,"div",53)(1,"div",54)(2,"span",55),PC(3),Hl(),Qi(4,"span",56),PC(5),tb(6,"bytes"),Hl()(),mg(7,"sh-progress-bar",57),Hl()),r&2){let e=i.$implicit;DE(2),gg("title",e.BackendPath),DE(),nm(e.BackendPath),DE(2),Gl("",rb(6,4,e.BackendSpeed),"/s"),DE(2),gg("value",(e.BackendFileProgress||0)/(e.BackendFileSize||1)*100);}}function he(r,i){if(r&1&&(Qi(0,"div",51)(1,"sh-list"),ig(2,ve,8,6,"div",52),Hl()()),r&2){let e=nC(2);DE(2),gg("ngForOf",e.statusData()?.ActiveTransfers);}}function ye(r,i){if(r&1){let e=gT();Qi(0,"sh-card")(1,"div",13)(2,"div",14)(3,"sh-icon",15),PC(4,"clock"),Hl(),Qi(5,"h2"),PC(6),Hl()()(),Qi(7,"div",26)(8,"div",27)(9,"span",28),PC(10),tb(11,"number"),Hl()(),mg(12,"sh-progress-bar",29),Qi(13,"sh-list")(14,"div",30)(15,"span",20),PC(16,"Files"),Hl(),Qi(17,"span",21),PC(18),Hl()(),Qi(19,"div",30)(20,"span",20),PC(21,"Size"),Hl(),Qi(22,"span",21),PC(23),tb(24,"bytes"),tb(25,"bytes"),Hl()()()()(),Qi(26,"sh-card")(27,"div",13)(28,"div",14)(29,"sh-icon",15),PC(30,"file"),Hl(),Qi(31,"h3"),PC(32,"Activity"),Hl()()(),Qi(33,"div",31),ig(34,xe,13,5,"div",32),Qi(35,"div",33)(36,"span",20),XT(37,1),Hl(),Qi(38,"sh-list",34),cT(39,Me,6,5,"div",35,sT),oT(41,Oe,2,0,"div",36),Hl()()()(),Qi(42,"sh-card")(43,"div",13)(44,"div",14)(45,"sh-icon",15),PC(46,"gauge"),Hl(),Qi(47,"h3"),PC(48,"Performance"),Hl()(),Qi(49,"div",37),PC(50),tb(51,"bytes"),Hl()(),Qi(52,"div",38),ig(53,Te,22,14,"sh-list",25),Qi(54,"div",39)(55,"button",40),Fg("click",function(){Sd(e);let c=nC();return xd(c.toggleTransfers())}),PC(56),Hl(),ig(57,he,3,1,"div",41),Hl()()();}if(r&2){let e=nC();DE(6),nm(e.statusText()),DE(4),Gl("",ob(11,13,e.progress(),"1.0-0"),"%"),DE(2),gg("value",e.progress()),DE(6),rm("",e.statusData()?.ProcessedFileCount," / ",e.statusData()?.TotalFileCount),DE(5),rm(" ",rb(24,16,e.statusData()?.ProcessedFileSize)," / ",rb(25,18,e.statusData()?.TotalFileSize)," "),DE(11),gg("ngIf",e.statusData()?.CurrentFilename),DE(5),lT(e.recentFiles()),DE(2),iT(e.recentFiles().length===0?41:-1),DE(9),Gl("",rb(51,20,e.statusData()?.BackendSpeed),"/s"),DE(3),gg("ngIf",e.etaData()),DE(3),Gl(" ",e.transfersExpanded()?"Hide Details":"Show Details"," "),DE(),gg("ngIf",e.transfersExpanded());}}function Ee(r,i){if(r&1&&(Qi(0,"sh-card",75)(1,"div",13)(2,"div",14)(3,"sh-icon",15),PC(4,"calendar"),Hl(),Qi(5,"h3"),XT(6,7),Hl()()(),Qi(7,"div",76)(8,"div",77)(9,"span",78),PC(10),Hl(),Qi(11,"div",79)(12,"span",80),PC(13),tb(14,"date"),Hl(),Qi(15,"span",81),PC(16),tb(17,"relativeTime"),Hl()()(),Qi(18,"sh-icon",82),PC(19,"caret-right"),Hl()()()),r&2){let e=nC(2);DE(10),nm(e.nextBackup().backup?.Name),DE(3),nm(ob(14,3,e.nextBackup().time,"medium")),DE(3),Gl("(",rb(17,6,e.nextBackup().time),")");}}function be(r,i){r&1&&(Qi(0,"span",74),XT(1,8),Hl());}function Ne(r,i){if(r&1){let e=gT();Qi(0,"sh-card",58)(1,"div",59)(2,"div",60)(3,"div",61),Hd(),Qi(4,"svg",62),mg(5,"circle",63),Hl(),Bd(),Qi(6,"sh-icon",64),XT(7,3),Hl()()(),Qi(8,"div",65)(9,"h2"),XT(10,4),Hl(),Qi(11,"p",66),XT(12,5),Hl()(),Qi(13,"div",67)(14,"button",68),Fg("click",function(){Sd(e);let c=nC();return xd(c.pauseResume())}),Qi(15,"sh-icon"),PC(16),Hl(),PC(17),Hl()()()(),ig(18,Ee,20,8,"sh-card",69),Qi(19,"sh-card",70)(20,"div",71)(21,"span",20),XT(22,6),Hl(),Qi(23,"div",72)(24,"span",73),PC(25),Hl(),oT(26,be,2,0,"span",74),Hl()()();}if(r&2){let e=nC();DE(14),gg("color",e.clientIsRunning()?"primary":"accent"),DE(2),nm(e.clientIsRunning()?"pause":"play"),DE(),Gl(" ",e.clientIsRunning()?"Pause Execution":"Resume Execution"," "),DE(),gg("ngIf",e.nextBackup()),DE(6),Qg("running",e.clientIsRunning()),DE(),nm(e.serverState()?.ProgramState),DE(),iT(e.clientIsRunning()?-1:26);}}function Ie(r,i){if(r&1&&(Qi(0,"div",35)(1,"span",46),PC(2),Hl(),Qi(3,"span",47),PC(4),tb(5,"bytes"),Hl()()),r&2){let e=i.$implicit;DE(),gg("title",e.filename),DE(),nm(e.filename),DE(2),nm(rb(5,3,e.filesize));}}function ke(r,i){if(r&1&&(Qi(0,"sh-card",83)(1,"div",13)(2,"div",14)(3,"sh-icon",15),PC(4,"clock-counter-clockwise"),Hl(),Qi(5,"h3"),XT(6,9),Hl()()(),Qi(7,"sh-list"),ig(8,Ie,6,5,"div",84),Hl()()),r&2){let e=nC();DE(8),gg("ngForOf",e.recentFiles());}}function Ae(r,i){if(r&1&&(Qi(0,"div",19)(1,"span",20),PC(2,"Next Task:"),Hl(),Qi(3,"div",21)(4,"div"),PC(5),Hl(),Qi(6,"div",49),PC(7),tb(8,"date"),tb(9,"relativeTime"),Hl()()()),r&2){let e=nC();DE(5),nm(e.nextBackup().backup?.Name),DE(2),rm(" ",ob(8,3,e.nextBackup().time,"medium")," (",rb(9,6,e.nextBackup().time),") ");}}function Re(r,i){if(r&1){let e=gT();Ul(0),Qi(1,"button",85),Fg("click",function(){Sd(e);let c=nC();return xd(c.stop())}),Qi(2,"sh-icon"),PC(3,"stop"),Hl(),PC(4," Stop "),Hl(),Qi(5,"button",85),Fg("click",function(){Sd(e);let c=nC();return xd(c.abort())}),Qi(6,"sh-icon"),PC(7,"x-circle"),Hl(),PC(8," Abort "),Hl(),Wl();}}var J=class r{#e=T(y);#n=T(U);#i=T(C);#r=T(be$1);statusData=this.#e.statusData;serverState=this.#e.serverState;recentFiles=this.#n.recentFiles;etaData=this.#n.etaData;transfersExpanded=Ue(false);clientIsRunning=this.#e.clientIsRunning;statusText=Nt(()=>{let i=this.statusData()?.Phase;return i?h[i]||i:""});progress=Nt(()=>{let i=this.statusData();return i?(i.OverallProgress||0)*100:0});nextBackup=Nt(()=>({backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}));ngOnInit(){this.#n.activateView();}ngOnDestroy(){this.#n.deactivateView();}toggleTransfers(){this.transfersExpanded.update(i=>!i);}isTaskRunning(){return !!this.statusData()?.TaskID}taskStartTime(){return this.etaData()?.startTime}currentBackupId(){return this.statusData()?.BackupID}pauseResume(){if(this.clientIsRunning()){this.#r.open(k,{maxWidth:"550px",width:"100%"});return}this.#e.pauseResume().subscribe();}stop(){let i=this.statusData()?.TaskID;i&&this.#i.postApiV1TaskByTaskidStop({taskid:i}).subscribe();}abort(){let i=this.statusData()?.TaskID;i&&this.#i.postApiV1TaskByTaskidAbort({taskid:i}).subscribe();}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=dw({type:r,selectors:[["app-status"]],decls:29,vars:12,consts:()=>{let i;i=$localize`Live Logs`;let e;e=$localize`Recently Processed`;let s;s=$localize`No recent files`;let c;c=$localize`check-bold`;let P;P=$localize`System Ready`;let I;I=$localize`Waiting for the next scheduled backup task.`;let k;k=$localize`Server State`;let x;x=$localize`Next Scheduled Task`;let M;M=$localize`Backups are currently paused`;let A;return A=$localize`Recent Activity`,[i,e,s,c,P,I,k,x,M,A,[1,"status-page"],["class","activity-card",4,"ngIf"],[1,"logs-card"],[1,"card-header"],[1,"header-titl-group"],[1,"header-icon"],[1,"logs-content"],[3,"polling","whenFilter","backupIdFilter"],[1,"server-status-section"],[1,"status-row"],[1,"label"],[1,"value"],["class","status-row",4,"ngIf"],[1,"actions"],["shButton","",3,"click"],[4,"ngIf"],[1,"progress-content"],[1,"percentage-display"],[1,"percentage-value"],[3,"value"],["item","",1,"stat-item"],[1,"files-content"],["class","current-file-section",4,"ngIf"],[1,"recent-files-section"],[1,"recent-files-list"],["item","",1,"file-item"],["item","",1,"empty-state"],[1,"aggregate-speed"],[1,"performance-content"],[1,"transfers-section"],["shButton","","size","small",1,"toggle-btn","ghost",3,"click"],["class","transfer-details",4,"ngIf"],[1,"current-file-section"],[1,"current-file-list"],["item","",1,"file-item","current"],[1,"file-details"],[1,"filename",3,"title"],[1,"filesize"],["item","",1,"eta-item"],[1,"sub-text"],["item","",1,"metric-item"],[1,"transfer-details"],["class","transfer-item","item","",4,"ngFor","ngForOf"],["item","",1,"transfer-item"],[1,"transfer-header"],[1,"path",3,"title"],[1,"speed"],[1,"mini-progress",3,"value"],[1,"idle-hero-card"],[1,"idle-content"],[1,"status-visual"],[1,"complete-status"],[1,"border-svg"],["cx","50","cy","50","r","45",1,"border-circle"],[1,"status-icon"],[1,"status-info"],[1,"status-description"],[1,"idle-actions"],["shButton","",3,"click","color"],["class","next-task-hero",4,"ngIf"],[1,"server-state-card"],[1,"state-content"],[1,"state-line"],[1,"status-badge"],[1,"warning-text"],[1,"next-task-hero"],[1,"next-task-content"],[1,"task-main"],[1,"task-name"],[1,"task-time-group"],[1,"task-time"],[1,"task-relative"],[1,"chevron"],[1,"activity-card"],["class","file-item","item","",4,"ngFor","ngForOf"],["shButton","","color","warn",3,"click"]]},template:function(e,s){e&1&&(Qi(0,"div",10),oT(1,ye,58,22)(2,Ne,27,8),ig(3,ke,9,1,"sh-card",11),Qi(4,"sh-card",12)(5,"div",13)(6,"div",14)(7,"sh-icon",15),PC(8,"list"),Hl(),Qi(9,"h3"),XT(10,0),Hl()()(),Qi(11,"div",16),mg(12,"app-logs-live",17),Hl()(),Qi(13,"sh-card")(14,"div",18)(15,"h3"),PC(16,"Server Status"),Hl(),Qi(17,"div",19)(18,"span",20),PC(19,"State:"),Hl(),Qi(20,"span",21),PC(21),Hl()(),ig(22,Ae,10,8,"div",22),Qi(23,"div",23)(24,"button",24),Fg("click",function(){return s.pauseResume()}),Qi(25,"sh-icon"),PC(26),Hl(),PC(27),Hl(),ig(28,Re,9,0,"ng-container",25),Hl()()()()),e&2&&(Qg("idle",!s.isTaskRunning()),DE(),iT(s.isTaskRunning()?1:2),DE(2),gg("ngIf",!s.isTaskRunning()&&s.recentFiles().length>0),DE(9),gg("polling",s.isTaskRunning())("whenFilter",s.taskStartTime()?.getTime())("backupIdFilter",s.currentBackupId()),DE(9),nm(s.serverState()?.ProgramState),DE(),gg("ngIf",s.nextBackup()),DE(4),nm(s.clientIsRunning()?"pause":"play_arrow"),DE(),Gl(" ",s.clientIsRunning()?"Pause":"Resume"," "),DE(),gg("ngIf",s.isTaskRunning()));},dependencies:[Fi,Jt,Kn,f,d,v,N,v$1,c,pi,ci,m,m$1],styles:["[_nghost-%COMP%]{display:block;padding:24px;max-width:1400px;margin:0 auto}.status-page[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;gap:24px}@media(min-width:768px){.status-page[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}}@media(min-width:1200px){.status-page[_ngcontent-%COMP%]{grid-template-columns:repeat(3,1fr)}}@media(min-width:1200px){.status-page[_ngcontent-%COMP%] .logs-card[_ngcontent-%COMP%], .status-page.idle[_ngcontent-%COMP%] .idle-hero-card[_ngcontent-%COMP%]{grid-column:span 2}.status-page.idle[_ngcontent-%COMP%] .next-task-hero[_ngcontent-%COMP%], .status-page.idle[_ngcontent-%COMP%] .server-state-card[_ngcontent-%COMP%]{grid-column:3}.status-page.idle[_ngcontent-%COMP%] .activity-card[_ngcontent-%COMP%], .status-page.idle[_ngcontent-%COMP%] .logs-card[_ngcontent-%COMP%]{grid-column:1/-1}}sh-card[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;--sh-card-padding: 24px}.card-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--primary-color);font-size:24px}.card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;font-size:1.1rem;font-weight:600;color:var(--text-primary)}.progress-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px}.progress-content[_ngcontent-%COMP%] .percentage-display[_ngcontent-%COMP%]{text-align:center}.progress-content[_ngcontent-%COMP%] .percentage-display[_ngcontent-%COMP%] .percentage-value[_ngcontent-%COMP%]{font-size:3rem;font-weight:800;color:var(--primary-color);line-height:1}.progress-content[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{height:8px;border-radius:4px;--sh-progress-bar-track-color: var(--bg-secondary)}.progress-content[_ngcontent-%COMP%] .stat-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;width:100%}.progress-content[_ngcontent-%COMP%] .stat-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:.9rem}.progress-content[_ngcontent-%COMP%] .stat-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-weight:600}.files-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.files-content[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-size:.75rem;text-transform:uppercase;color:var(--text-secondary);font-weight:600;margin-bottom:4px;display:block;padding-left:12px}.files-content[_ngcontent-%COMP%] .file-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%}.files-content[_ngcontent-%COMP%] .file-item.current[_ngcontent-%COMP%]{gap:12px;justify-content:flex-start}.files-content[_ngcontent-%COMP%] .file-item.current[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--primary-color)}.files-content[_ngcontent-%COMP%] .file-item.current[_ngcontent-%COMP%] .file-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;overflow:hidden}.files-content[_ngcontent-%COMP%] .file-item[_ngcontent-%COMP%] .filename[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:12px;font-size:.9rem;font-weight:500;flex:1}.files-content[_ngcontent-%COMP%] .file-item[_ngcontent-%COMP%] .filesize[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:.85rem;font-variant-numeric:tabular-nums;white-space:nowrap}.files-content[_ngcontent-%COMP%] .empty-state[_ngcontent-%COMP%]{color:var(--text-secondary);font-style:italic;text-align:center;width:100%}.performance-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.performance-content[_ngcontent-%COMP%] .aggregate-speed[_ngcontent-%COMP%]{font-size:1.2rem;font-weight:700;color:var(--text-primary);font-variant-numeric:tabular-nums}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:.9rem}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-weight:600;font-variant-numeric:tabular-nums}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%] .sub-text[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%] .sub-text[_ngcontent-%COMP%]{color:var(--text-secondary);font-weight:400;font-size:.85rem;margin-left:4px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .toggle-btn[_ngcontent-%COMP%]{width:100%;margin-bottom:12px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;gap:4px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .transfer-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;font-size:.85rem}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .transfer-header[_ngcontent-%COMP%] .path[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:12px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .transfer-header[_ngcontent-%COMP%] .speed[_ngcontent-%COMP%]{color:var(--text-secondary);font-variant-numeric:tabular-nums}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .mini-progress[_ngcontent-%COMP%]{height:4px}.logs-content[_ngcontent-%COMP%] app-logs-live[_ngcontent-%COMP%]{height:350px;display:block}.status-badge[_ngcontent-%COMP%]{padding:4px 12px;border-radius:12px;background:var(--bg-secondary);color:var(--text-secondary);font-size:.8rem;font-weight:500;text-transform:uppercase}.status-badge.running[_ngcontent-%COMP%]{background:rgba(var(--primary-rgb),.1);color:var(--primary-color)}.actions-grid[_ngcontent-%COMP%]{margin-top:auto;display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:12px}.actions-grid[_ngcontent-%COMP%] .action-btn[_ngcontent-%COMP%]{width:100%;justify-content:center}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:32px 0;gap:32px}@media(min-width:768px){.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%]{flex-direction:row;text-align:left;justify-content:space-around;padding:48px 0}}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .status-visual[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .status-info[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:2rem;font-weight:700;margin-bottom:8px;color:var(--text-primary)}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .status-info[_ngcontent-%COMP%] .status-description[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:1.1rem;max-width:300px}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .idle-actions[_ngcontent-%COMP%]{display:flex;align-items:center}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .idle-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding-left:32px;padding-right:32px}.complete-status[_ngcontent-%COMP%]{position:relative;width:120px;height:120px;display:flex;justify-content:center;align-items:center;color:var(--primary-color)}.complete-status[_ngcontent-%COMP%] .status-icon[_ngcontent-%COMP%]{font-size:48px;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.border-svg[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--primary-color);stroke-width:5px;stroke-dasharray:282.74;stroke-dashoffset:282.74;animation:_ngcontent-%COMP%_draw-border 1.2s linear forwards}@keyframes _ngcontent-%COMP%_draw-border{to{stroke-dashoffset:0}}@keyframes _ngcontent-%COMP%_reveal-icon{to{opacity:1}}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:12px 0}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .task-main[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .task-main[_ngcontent-%COMP%] .task-name[_ngcontent-%COMP%]{font-size:1.2rem;font-weight:700;color:var(--primary-color)}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .task-main[_ngcontent-%COMP%] .task-time-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;color:var(--text-secondary);font-size:.95rem}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .chevron[_ngcontent-%COMP%]{color:var(--text-secondary);opacity:.5}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-size:.75rem;text-transform:uppercase;color:var(--text-secondary);font-weight:600}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%] .state-line[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%] .state-line[_ngcontent-%COMP%] .warning-text[_ngcontent-%COMP%]{font-size:.85rem;color:var(--error-color);font-weight:500}"]})};export{J as default};
|
|
1
|
+
import v$1 from'./chunk-Cng2PWKw.js';import'./chunk-BRJ93eei.js';import'./chunk-SycSMD-r.js';import {k}from'./chunk-oTpkLrqH.js';import'./chunk-dCFVYHva.js';import {c}from'./chunk-CQv4eyEK.js';import'./chunk-C5p3bQwH.js';import {T,aX as y,ab as C,a6 as be$1,G as Ge,N as Nt,bb as h,h as hw,bc as Fi,bd as Jt,be as Kn,v,d as N,bf as pi,aJ as ci,aH as m,b2 as m$1,Q as Qi,f as aT,bg as ag,w as jC,$ as $l,n as nC,j as vg,V as Vg,Y as Yg,C as CE,i as cT,A as yg,J as om,aa as Ql,bh as Q,z as za,aZ as ee,l as vT,aM as ob,a1 as dT,r as kd,k as iC,O as Od,aN as ab,aB as im,aR as sb,a2 as fT,as as Wd,bi as qd,aP as ql,aQ as Gl,ap as lT}from'./main-QLXVXD6E.js';import {f}from'./chunk-C3KPTLNN.js';import {d}from'./chunk-PONAC1Ya.js';import'./chunk-DoYGADYB.js';import'./chunk-D2aWqPl_.js';var U=class r{#e=T(y);#n=T(Q);#i=Ge([]);recentFiles=this.#i.asReadonly();#r=5;#s=Ge(null);etaData=this.#s.asReadonly();#a=null;#t=null;#o=null;recentFileEffect=za(()=>{let i=this.#e.statusData();i&&i.CurrentFilename&&i.CurrentFilesize!==void 0&&this.#c(i.CurrentFilename,i.CurrentFilesize);});#c(i,e){let s=new Date;this.#i.update(c=>c.length>0&&c[0].filename===i?c:[{filename:i,filesize:e,timestamp:s},...c].slice(0,this.#r));}activateView(){this.#a=new Date;let i=this.#e.statusData();i&&i.ProcessedFileCount!==void 0&&i.ProcessedFileSize!==void 0&&(this.#t={files:i.ProcessedFileCount,bytes:i.ProcessedFileSize}),this.#o=setInterval(()=>{this.#l();},1e3);}deactivateView(){this.#a=null,this.#t=null,this.#o&&(clearInterval(this.#o),this.#o=null);}#l(){if(!this.#a||!this.#t)return;let i=this.#e.statusData();if(!i)return;let e=new Date,s=(e.getTime()-this.#a.getTime())/1e3;if(s<5)return;let c=i.ProcessedFileCount||0,P=i.ProcessedFileSize||0,I=c-this.#t.files,k=P-this.#t.bytes,x=I/s,M=k/s,A=(i.TotalFileCount||0)-c,u=(i.TotalFileSize||0)-P,O=null,T=null;x>0&&(O=A/x),M>0&&(T=u/M);let R=null,w="bytes";if(O!==null&&T!==null){let Se=Math.max(O,T);R=new Date(e.getTime()+Se*1e3),w=O>T?"files":"bytes";}else O!==null?(R=new Date(e.getTime()+O*1e3),w="files"):T!==null&&(R=new Date(e.getTime()+T*1e3),w="bytes");this.#s.set({startTime:this.#a,filesProcessedAtStart:this.#t.files,bytesProcessedAtStart:this.#t.bytes,currentFilesPerSecond:x,currentBytesPerSecond:M,estimatedCompletion:R,metric:w});}static \u0275fac=function(e){return new(e||r)};static \u0275prov=ee({token:r,factory:r.\u0275fac,providedIn:"root"})};function xe(r,i){if(r&1&&(Qi(0,"div",42)(1,"span",20),jC(2,"Processing"),$l(),Qi(3,"sh-list",43)(4,"div",44)(5,"sh-icon"),jC(6,"file"),$l(),Qi(7,"div",45)(8,"span",46),jC(9),$l(),Qi(10,"span",47),jC(11),ob(12,"bytes"),$l()()()()()),r&2){let e=iC(2);CE(8),yg("title",e.statusData()?.CurrentFilename),CE(),Ql(" ",e.statusData()?.CurrentFilename," "),CE(2),om(sb(12,3,e.statusData()?.CurrentFilesize));}}function Me(r,i){if(r&1&&(Qi(0,"div",35)(1,"span",46),jC(2),$l(),Qi(3,"span",47),jC(4),ob(5,"bytes"),$l()()),r&2){let e=i.$implicit;CE(),yg("title",e.filename),CE(),om(e.filename),CE(2),om(sb(5,3,e.filesize));}}function Oe(r,i){r&1&&(Qi(0,"div",36),nC(1,2),$l());}function Te(r,i){if(r&1&&(Qi(0,"sh-list")(1,"div",48)(2,"span",20),jC(3,"ETA"),$l(),Qi(4,"span",21),jC(5),ob(6,"date"),Qi(7,"span",49),jC(8),ob(9,"relativeTime"),$l()()(),Qi(10,"div",50)(11,"span",20),jC(12,"Files/s"),$l(),Qi(13,"span",21),jC(14),ob(15,"number"),$l()(),Qi(16,"div",50)(17,"span",20),jC(18,"Upload Speed"),$l(),Qi(19,"span",21),jC(20),ob(21,"bytes"),$l()()()),r&2){let e=iC(2);CE(5),Ql(" ",ab(6,4,e.etaData()?.estimatedCompletion,"mediumTime")," "),CE(3),Ql(" (",sb(9,7,e.etaData()?.estimatedCompletion),") "),CE(6),Ql(" ",ab(15,9,e.etaData()?.currentFilesPerSecond,"1.1-1")," "),CE(6),Ql("",sb(21,12,e.etaData()?.currentBytesPerSecond),"/s");}}function ve(r,i){if(r&1&&(Qi(0,"div",53)(1,"div",54)(2,"span",55),jC(3),$l(),Qi(4,"span",56),jC(5),ob(6,"bytes"),$l()(),vg(7,"sh-progress-bar",57),$l()),r&2){let e=i.$implicit;CE(2),yg("title",e.BackendPath),CE(),om(e.BackendPath),CE(2),Ql("",sb(6,4,e.BackendSpeed),"/s"),CE(2),yg("value",(e.BackendFileProgress||0)/(e.BackendFileSize||1)*100);}}function he(r,i){if(r&1&&(Qi(0,"div",51)(1,"sh-list"),ag(2,ve,8,6,"div",52),$l()()),r&2){let e=iC(2);CE(2),yg("ngForOf",e.statusData()?.ActiveTransfers);}}function ye(r,i){if(r&1){let e=vT();Qi(0,"sh-card")(1,"div",13)(2,"div",14)(3,"sh-icon",15),jC(4,"clock"),$l(),Qi(5,"h2"),jC(6),$l()()(),Qi(7,"div",26)(8,"div",27)(9,"span",28),jC(10),ob(11,"number"),$l()(),vg(12,"sh-progress-bar",29),Qi(13,"sh-list")(14,"div",30)(15,"span",20),jC(16,"Files"),$l(),Qi(17,"span",21),jC(18),$l()(),Qi(19,"div",30)(20,"span",20),jC(21,"Size"),$l(),Qi(22,"span",21),jC(23),ob(24,"bytes"),ob(25,"bytes"),$l()()()()(),Qi(26,"sh-card")(27,"div",13)(28,"div",14)(29,"sh-icon",15),jC(30,"file"),$l(),Qi(31,"h3"),jC(32,"Activity"),$l()()(),Qi(33,"div",31),ag(34,xe,13,5,"div",32),Qi(35,"div",33)(36,"span",20),nC(37,1),$l(),Qi(38,"sh-list",34),dT(39,Me,6,5,"div",35,lT),aT(41,Oe,2,0,"div",36),$l()()()(),Qi(42,"sh-card")(43,"div",13)(44,"div",14)(45,"sh-icon",15),jC(46,"gauge"),$l(),Qi(47,"h3"),jC(48,"Performance"),$l()(),Qi(49,"div",37),jC(50),ob(51,"bytes"),$l()(),Qi(52,"div",38),ag(53,Te,22,14,"sh-list",25),Qi(54,"div",39)(55,"button",40),Vg("click",function(){kd(e);let c=iC();return Od(c.toggleTransfers())}),jC(56),$l(),ag(57,he,3,1,"div",41),$l()()();}if(r&2){let e=iC();CE(6),om(e.statusText()),CE(4),Ql("",ab(11,13,e.progress(),"1.0-0"),"%"),CE(2),yg("value",e.progress()),CE(6),im("",e.statusData()?.ProcessedFileCount," / ",e.statusData()?.TotalFileCount),CE(5),im(" ",sb(24,16,e.statusData()?.ProcessedFileSize)," / ",sb(25,18,e.statusData()?.TotalFileSize)," "),CE(11),yg("ngIf",e.statusData()?.CurrentFilename),CE(5),fT(e.recentFiles()),CE(2),cT(e.recentFiles().length===0?41:-1),CE(9),Ql("",sb(51,20,e.statusData()?.BackendSpeed),"/s"),CE(3),yg("ngIf",e.etaData()),CE(3),Ql(" ",e.transfersExpanded()?"Hide Details":"Show Details"," "),CE(),yg("ngIf",e.transfersExpanded());}}function Ee(r,i){if(r&1&&(Qi(0,"sh-card",75)(1,"div",13)(2,"div",14)(3,"sh-icon",15),jC(4,"calendar"),$l(),Qi(5,"h3"),nC(6,7),$l()()(),Qi(7,"div",76)(8,"div",77)(9,"span",78),jC(10),$l(),Qi(11,"div",79)(12,"span",80),jC(13),ob(14,"date"),$l(),Qi(15,"span",81),jC(16),ob(17,"relativeTime"),$l()()(),Qi(18,"sh-icon",82),jC(19,"caret-right"),$l()()()),r&2){let e=iC(2);CE(10),om(e.nextBackup().backup?.Name),CE(3),om(ab(14,3,e.nextBackup().time,"medium")),CE(3),Ql("(",sb(17,6,e.nextBackup().time),")");}}function be(r,i){r&1&&(Qi(0,"span",74),nC(1,8),$l());}function Ne(r,i){if(r&1){let e=vT();Qi(0,"sh-card",58)(1,"div",59)(2,"div",60)(3,"div",61),Wd(),Qi(4,"svg",62),vg(5,"circle",63),$l(),qd(),Qi(6,"sh-icon",64),nC(7,3),$l()()(),Qi(8,"div",65)(9,"h2"),nC(10,4),$l(),Qi(11,"p",66),nC(12,5),$l()(),Qi(13,"div",67)(14,"button",68),Vg("click",function(){kd(e);let c=iC();return Od(c.pauseResume())}),Qi(15,"sh-icon"),jC(16),$l(),jC(17),$l()()()(),ag(18,Ee,20,8,"sh-card",69),Qi(19,"sh-card",70)(20,"div",71)(21,"span",20),nC(22,6),$l(),Qi(23,"div",72)(24,"span",73),jC(25),$l(),aT(26,be,2,0,"span",74),$l()()();}if(r&2){let e=iC();CE(14),yg("color",e.clientIsRunning()?"primary":"accent"),CE(2),om(e.clientIsRunning()?"pause":"play"),CE(),Ql(" ",e.clientIsRunning()?"Pause Execution":"Resume Execution"," "),CE(),yg("ngIf",e.nextBackup()),CE(6),Yg("running",e.clientIsRunning()),CE(),om(e.serverState()?.ProgramState),CE(),cT(e.clientIsRunning()?-1:26);}}function Ie(r,i){if(r&1&&(Qi(0,"div",35)(1,"span",46),jC(2),$l(),Qi(3,"span",47),jC(4),ob(5,"bytes"),$l()()),r&2){let e=i.$implicit;CE(),yg("title",e.filename),CE(),om(e.filename),CE(2),om(sb(5,3,e.filesize));}}function ke(r,i){if(r&1&&(Qi(0,"sh-card",83)(1,"div",13)(2,"div",14)(3,"sh-icon",15),jC(4,"clock-counter-clockwise"),$l(),Qi(5,"h3"),nC(6,9),$l()()(),Qi(7,"sh-list"),ag(8,Ie,6,5,"div",84),$l()()),r&2){let e=iC();CE(8),yg("ngForOf",e.recentFiles());}}function Ae(r,i){if(r&1&&(Qi(0,"div",19)(1,"span",20),jC(2,"Next Task:"),$l(),Qi(3,"div",21)(4,"div"),jC(5),$l(),Qi(6,"div",49),jC(7),ob(8,"date"),ob(9,"relativeTime"),$l()()()),r&2){let e=iC();CE(5),om(e.nextBackup().backup?.Name),CE(2),im(" ",ab(8,3,e.nextBackup().time,"medium")," (",sb(9,6,e.nextBackup().time),") ");}}function Re(r,i){if(r&1){let e=vT();ql(0),Qi(1,"button",85),Vg("click",function(){kd(e);let c=iC();return Od(c.stop())}),Qi(2,"sh-icon"),jC(3,"stop"),$l(),jC(4," Stop "),$l(),Qi(5,"button",85),Vg("click",function(){kd(e);let c=iC();return Od(c.abort())}),Qi(6,"sh-icon"),jC(7,"x-circle"),$l(),jC(8," Abort "),$l(),Gl();}}var J=class r{#e=T(y);#n=T(U);#i=T(C);#r=T(be$1);statusData=this.#e.statusData;serverState=this.#e.serverState;recentFiles=this.#n.recentFiles;etaData=this.#n.etaData;transfersExpanded=Ge(false);clientIsRunning=this.#e.clientIsRunning;statusText=Nt(()=>{let i=this.statusData()?.Phase;return i?h[i]||i:""});progress=Nt(()=>{let i=this.statusData();return i?(i.OverallProgress||0)*100:0});nextBackup=Nt(()=>({backup:this.serverState()?.ProposedSchedule?.[0]?.backup,time:this.serverState()?.ProposedSchedule?.[0]?.Item2}));ngOnInit(){this.#n.activateView();}ngOnDestroy(){this.#n.deactivateView();}toggleTransfers(){this.transfersExpanded.update(i=>!i);}isTaskRunning(){return !!this.statusData()?.TaskID}taskStartTime(){return this.etaData()?.startTime}currentBackupId(){return this.statusData()?.BackupID}pauseResume(){if(this.clientIsRunning()){this.#r.open(k,{maxWidth:"550px",width:"100%"});return}this.#e.pauseResume().subscribe();}stop(){let i=this.statusData()?.TaskID;i&&this.#i.postApiV1TaskByTaskidStop({taskid:i}).subscribe();}abort(){let i=this.statusData()?.TaskID;i&&this.#i.postApiV1TaskByTaskidAbort({taskid:i}).subscribe();}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=hw({type:r,selectors:[["app-status"]],decls:29,vars:12,consts:()=>{let i;i=$localize`Live Logs`;let e;e=$localize`Recently Processed`;let s;s=$localize`No recent files`;let c;c=$localize`check-bold`;let P;P=$localize`System Ready`;let I;I=$localize`Waiting for the next scheduled backup task.`;let k;k=$localize`Server State`;let x;x=$localize`Next Scheduled Task`;let M;M=$localize`Backups are currently paused`;let A;return A=$localize`Recent Activity`,[i,e,s,c,P,I,k,x,M,A,[1,"status-page"],["class","activity-card",4,"ngIf"],[1,"logs-card"],[1,"card-header"],[1,"header-titl-group"],[1,"header-icon"],[1,"logs-content"],[3,"polling","whenFilter","backupIdFilter"],[1,"server-status-section"],[1,"status-row"],[1,"label"],[1,"value"],["class","status-row",4,"ngIf"],[1,"actions"],["shButton","",3,"click"],[4,"ngIf"],[1,"progress-content"],[1,"percentage-display"],[1,"percentage-value"],[3,"value"],["item","",1,"stat-item"],[1,"files-content"],["class","current-file-section",4,"ngIf"],[1,"recent-files-section"],[1,"recent-files-list"],["item","",1,"file-item"],["item","",1,"empty-state"],[1,"aggregate-speed"],[1,"performance-content"],[1,"transfers-section"],["shButton","","size","small",1,"toggle-btn","ghost",3,"click"],["class","transfer-details",4,"ngIf"],[1,"current-file-section"],[1,"current-file-list"],["item","",1,"file-item","current"],[1,"file-details"],[1,"filename",3,"title"],[1,"filesize"],["item","",1,"eta-item"],[1,"sub-text"],["item","",1,"metric-item"],[1,"transfer-details"],["class","transfer-item","item","",4,"ngFor","ngForOf"],["item","",1,"transfer-item"],[1,"transfer-header"],[1,"path",3,"title"],[1,"speed"],[1,"mini-progress",3,"value"],[1,"idle-hero-card"],[1,"idle-content"],[1,"status-visual"],[1,"complete-status"],[1,"border-svg"],["cx","50","cy","50","r","45",1,"border-circle"],[1,"status-icon"],[1,"status-info"],[1,"status-description"],[1,"idle-actions"],["shButton","",3,"click","color"],["class","next-task-hero",4,"ngIf"],[1,"server-state-card"],[1,"state-content"],[1,"state-line"],[1,"status-badge"],[1,"warning-text"],[1,"next-task-hero"],[1,"next-task-content"],[1,"task-main"],[1,"task-name"],[1,"task-time-group"],[1,"task-time"],[1,"task-relative"],[1,"chevron"],[1,"activity-card"],["class","file-item","item","",4,"ngFor","ngForOf"],["shButton","","color","warn",3,"click"]]},template:function(e,s){e&1&&(Qi(0,"div",10),aT(1,ye,58,22)(2,Ne,27,8),ag(3,ke,9,1,"sh-card",11),Qi(4,"sh-card",12)(5,"div",13)(6,"div",14)(7,"sh-icon",15),jC(8,"list"),$l(),Qi(9,"h3"),nC(10,0),$l()()(),Qi(11,"div",16),vg(12,"app-logs-live",17),$l()(),Qi(13,"sh-card")(14,"div",18)(15,"h3"),jC(16,"Server Status"),$l(),Qi(17,"div",19)(18,"span",20),jC(19,"State:"),$l(),Qi(20,"span",21),jC(21),$l()(),ag(22,Ae,10,8,"div",22),Qi(23,"div",23)(24,"button",24),Vg("click",function(){return s.pauseResume()}),Qi(25,"sh-icon"),jC(26),$l(),jC(27),$l(),ag(28,Re,9,0,"ng-container",25),$l()()()()),e&2&&(Yg("idle",!s.isTaskRunning()),CE(),cT(s.isTaskRunning()?1:2),CE(2),yg("ngIf",!s.isTaskRunning()&&s.recentFiles().length>0),CE(9),yg("polling",s.isTaskRunning())("whenFilter",s.taskStartTime()?.getTime())("backupIdFilter",s.currentBackupId()),CE(9),om(s.serverState()?.ProgramState),CE(),yg("ngIf",s.nextBackup()),CE(4),om(s.clientIsRunning()?"pause":"play_arrow"),CE(),Ql(" ",s.clientIsRunning()?"Pause":"Resume"," "),CE(),yg("ngIf",s.isTaskRunning()));},dependencies:[Fi,Jt,Kn,f,d,v,N,v$1,c,pi,ci,m,m$1],styles:["[_nghost-%COMP%]{display:block;padding:24px;max-width:1400px;margin:0 auto}.status-page[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;gap:24px}@media(min-width:768px){.status-page[_ngcontent-%COMP%]{grid-template-columns:repeat(2,1fr)}}@media(min-width:1200px){.status-page[_ngcontent-%COMP%]{grid-template-columns:repeat(3,1fr)}}@media(min-width:1200px){.status-page[_ngcontent-%COMP%] .logs-card[_ngcontent-%COMP%], .status-page.idle[_ngcontent-%COMP%] .idle-hero-card[_ngcontent-%COMP%]{grid-column:span 2}.status-page.idle[_ngcontent-%COMP%] .next-task-hero[_ngcontent-%COMP%], .status-page.idle[_ngcontent-%COMP%] .server-state-card[_ngcontent-%COMP%]{grid-column:3}.status-page.idle[_ngcontent-%COMP%] .activity-card[_ngcontent-%COMP%], .status-page.idle[_ngcontent-%COMP%] .logs-card[_ngcontent-%COMP%]{grid-column:1/-1}}sh-card[_ngcontent-%COMP%]{height:100%;display:flex;flex-direction:column;--sh-card-padding: 24px}.card-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px}.card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--primary-color);font-size:24px}.card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%] h2[_ngcontent-%COMP%], .card-header[_ngcontent-%COMP%] .header-titl-group[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{margin:0;font-size:1.1rem;font-weight:600;color:var(--text-primary)}.progress-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:20px}.progress-content[_ngcontent-%COMP%] .percentage-display[_ngcontent-%COMP%]{text-align:center}.progress-content[_ngcontent-%COMP%] .percentage-display[_ngcontent-%COMP%] .percentage-value[_ngcontent-%COMP%]{font-size:3rem;font-weight:800;color:var(--primary-color);line-height:1}.progress-content[_ngcontent-%COMP%] sh-progress-bar[_ngcontent-%COMP%]{height:8px;border-radius:4px;--sh-progress-bar-track-color: var(--bg-secondary)}.progress-content[_ngcontent-%COMP%] .stat-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;width:100%}.progress-content[_ngcontent-%COMP%] .stat-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:.9rem}.progress-content[_ngcontent-%COMP%] .stat-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-weight:600}.files-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.files-content[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-size:.75rem;text-transform:uppercase;color:var(--text-secondary);font-weight:600;margin-bottom:4px;display:block;padding-left:12px}.files-content[_ngcontent-%COMP%] .file-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%}.files-content[_ngcontent-%COMP%] .file-item.current[_ngcontent-%COMP%]{gap:12px;justify-content:flex-start}.files-content[_ngcontent-%COMP%] .file-item.current[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--primary-color)}.files-content[_ngcontent-%COMP%] .file-item.current[_ngcontent-%COMP%] .file-details[_ngcontent-%COMP%]{display:flex;flex-direction:column;overflow:hidden}.files-content[_ngcontent-%COMP%] .file-item[_ngcontent-%COMP%] .filename[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:12px;font-size:.9rem;font-weight:500;flex:1}.files-content[_ngcontent-%COMP%] .file-item[_ngcontent-%COMP%] .filesize[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:.85rem;font-variant-numeric:tabular-nums;white-space:nowrap}.files-content[_ngcontent-%COMP%] .empty-state[_ngcontent-%COMP%]{color:var(--text-secondary);font-style:italic;text-align:center;width:100%}.performance-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:16px}.performance-content[_ngcontent-%COMP%] .aggregate-speed[_ngcontent-%COMP%]{font-size:1.2rem;font-weight:700;color:var(--text-primary);font-variant-numeric:tabular-nums}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;width:100%}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:.9rem}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-weight:600;font-variant-numeric:tabular-nums}.performance-content[_ngcontent-%COMP%] .eta-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%] .sub-text[_ngcontent-%COMP%], .performance-content[_ngcontent-%COMP%] .metric-item[_ngcontent-%COMP%] .value[_ngcontent-%COMP%] .sub-text[_ngcontent-%COMP%]{color:var(--text-secondary);font-weight:400;font-size:.85rem;margin-left:4px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .toggle-btn[_ngcontent-%COMP%]{width:100%;margin-bottom:12px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;gap:4px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .transfer-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;font-size:.85rem}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .transfer-header[_ngcontent-%COMP%] .path[_ngcontent-%COMP%]{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-right:12px}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .transfer-header[_ngcontent-%COMP%] .speed[_ngcontent-%COMP%]{color:var(--text-secondary);font-variant-numeric:tabular-nums}.performance-content[_ngcontent-%COMP%] .transfers-section[_ngcontent-%COMP%] .transfer-item[_ngcontent-%COMP%] .mini-progress[_ngcontent-%COMP%]{height:4px}.logs-content[_ngcontent-%COMP%] app-logs-live[_ngcontent-%COMP%]{height:350px;display:block}.status-badge[_ngcontent-%COMP%]{padding:4px 12px;border-radius:12px;background:var(--bg-secondary);color:var(--text-secondary);font-size:.8rem;font-weight:500;text-transform:uppercase}.status-badge.running[_ngcontent-%COMP%]{background:rgba(var(--primary-rgb),.1);color:var(--primary-color)}.actions-grid[_ngcontent-%COMP%]{margin-top:auto;display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:12px}.actions-grid[_ngcontent-%COMP%] .action-btn[_ngcontent-%COMP%]{width:100%;justify-content:center}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:32px 0;gap:32px}@media(min-width:768px){.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%]{flex-direction:row;text-align:left;justify-content:space-around;padding:48px 0}}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .status-visual[_ngcontent-%COMP%]{display:flex;justify-content:center;align-items:center}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .status-info[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{font-size:2rem;font-weight:700;margin-bottom:8px;color:var(--text-primary)}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .status-info[_ngcontent-%COMP%] .status-description[_ngcontent-%COMP%]{color:var(--text-secondary);font-size:1.1rem;max-width:300px}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .idle-actions[_ngcontent-%COMP%]{display:flex;align-items:center}.idle-hero-card[_ngcontent-%COMP%] .idle-content[_ngcontent-%COMP%] .idle-actions[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{padding-left:32px;padding-right:32px}.complete-status[_ngcontent-%COMP%]{position:relative;width:120px;height:120px;display:flex;justify-content:center;align-items:center;color:var(--primary-color)}.complete-status[_ngcontent-%COMP%] .status-icon[_ngcontent-%COMP%]{font-size:48px;opacity:0;animation:_ngcontent-%COMP%_reveal-icon .2s linear forwards;animation-delay:1s}.border-svg[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.border-circle[_ngcontent-%COMP%]{fill:none;stroke:var(--primary-color);stroke-width:5px;stroke-dasharray:282.74;stroke-dashoffset:282.74;animation:_ngcontent-%COMP%_draw-border 1.2s linear forwards}@keyframes _ngcontent-%COMP%_draw-border{to{stroke-dashoffset:0}}@keyframes _ngcontent-%COMP%_reveal-icon{to{opacity:1}}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;padding:12px 0}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .task-main[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .task-main[_ngcontent-%COMP%] .task-name[_ngcontent-%COMP%]{font-size:1.2rem;font-weight:700;color:var(--primary-color)}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .task-main[_ngcontent-%COMP%] .task-time-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;color:var(--text-secondary);font-size:.95rem}.next-task-hero[_ngcontent-%COMP%] .next-task-content[_ngcontent-%COMP%] .chevron[_ngcontent-%COMP%]{color:var(--text-secondary);opacity:.5}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-size:.75rem;text-transform:uppercase;color:var(--text-secondary);font-weight:600}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%] .state-line[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}.server-state-card[_ngcontent-%COMP%] .state-content[_ngcontent-%COMP%] .state-line[_ngcontent-%COMP%] .warning-text[_ngcontent-%COMP%]{font-size:.85rem;color:var(--error-color);font-weight:500}"]})};export{J as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {d}from'./chunk-PONAC1Ya.js';import {L}from'./chunk-D3d-eReU.js';import {T,ab as C,bh as Q,m,G as Ge,N as Nt,aG as pt,H as qu,h as hw,v,d as N,f as aT,Q as Qi,n as nC,$ as $l,w as jC,i as cT,C as CE,au as jg,av as rC,J as om,j as vg,l as vT,V as Vg,r as kd,k as iC,O as Od,Y as Yg,L as Lg,F as Fg,A as yg,ar as Qp}from'./main-QLXVXD6E.js';function w(n,t){n&1&&vg(0,"sh-progress-bar",3);}function V(n,t){if(n&1&&(Qi(0,"a",7),Lg(1,2),vg(2,"sh-icon"),Fg(),$l()),n&2){let e=iC(2);yg("href",e.serverState()?.UpdateDownloadLink,Qp),CE(2),jg(e.serverState()?.UpdatedVersion),rC(1);}}function B(n,t){if(n&1){let e=vT();Qi(0,"button",6),Vg("click",function(){kd(e);let s=iC();return Od(s.checkForUpdates())}),jC(1,"Check for updates"),$l(),aT(2,V,3,2,"a",7);}if(n&2){let e=iC();Yg("loading",e.checkingForUpdates()),CE(2),cT(e.serverState()?.UpdateDownloadLink?2:-1);}}function J(n,t){if(n&1){let e=vT();Qi(0,"button",6),Vg("click",function(){kd(e);let s=iC();return Od(s.checkForUpdates())}),jC(1,"Checking for updates \u2026"),$l();}}function X(n,t){n&1&&vg(0,"sh-progress-bar",3);}var h=class n{#e=T(C);#n=T(Q);#t=T(m);isLoading=Ge(true);checkingForUpdates=Ge(false);serverState=this.#n.serverState;duplicatiVersion=Nt(()=>this.#t.systemInfo()?.ServerVersionName??"Unknown");generalInfo=L(this.#e.getApiV1Acknowledgements().pipe(pt(t=>t.Acknowledgements),qu(()=>this.isLoading.set(false))));checkForUpdates(){this.checkingForUpdates.set(true),this.#e.postApiV1UpdatesCheck().pipe(qu(()=>this.checkingForUpdates.set(false))).subscribe();}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=hw({type:n,selectors:[["app-general"]],decls:12,vars:5,consts:()=>{let t;t=$localize`General`;let e;e=$localize`You're running Duplicati with - ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let i;return i=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:download${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON: Download update - ${"\uFFFD0\uFFFD"}:INTERPOLATION: `,[t,e,i,[1,"indeterminate","primary"],[1,"actions"],["shButton",""],["shButton","",3,"click"],["shButton","","target","_blank",1,"primary","raised",3,"href"]]},template:function(e,i){e&1&&(aT(0,w,1,0,"sh-progress-bar",3),Qi(1,"section")(2,"h3"),nC(3,0),$l(),Qi(4,"p"),nC(5,1),$l(),Qi(6,"div",4),aT(7,B,3,3)(8,J,2,0,"button",5),aT(9,X,1,0,"sh-progress-bar",3),$l(),Qi(10,"div"),jC(11),$l()()),e&2&&(cT(i.isLoading()?0:-1),CE(5),jg(i.duplicatiVersion()),rC(5),CE(2),cT(i.serverState()?.UpdaterState==="Waiting"?7:i.serverState()?.UpdaterState==="Checking"?8:-1),CE(2),cT(i.serverState()?.UpdaterState==="Downloading"?9:-1),CE(2),om(i.generalInfo()));},dependencies:[d,v,N],styles:["[_nghost-%COMP%]{display:block;position:relative;padding:0 2.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}section[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{white-space:pre-wrap}sh-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"]})};export{h as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var o=[{path:"",loadComponent:()=>import('./chunk-DA5X-TzJ.js'),children:[{path:"",redirectTo:"stored",pathMatch:"full"},{path:"stored",loadComponent:()=>import('./chunk-CTwvkMrj.js')},{path:"live",loadComponent:()=>import('./chunk-Cng2PWKw.js')}]}],t=o;export{t as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {w as w$1}from'./chunk-CDEvMQA2.js';import {e as ee}from'./chunk-CzJ3-6Pu.js';import'./chunk-oTpkLrqH.js';import'./chunk-dCFVYHva.js';import'./chunk--kVw-BwM.js';import {k as ke}from'./chunk-BC2-YuwH.js';import'./chunk-BFfFD-XE.js';import'./chunk-CmexLvf7.js';import'./chunk-Bgx4dtaL.js';import'./chunk-D7AP6g7S.js';import'./chunk-CQv4eyEK.js';import'./chunk-DH6iiZWc.js';import'./chunk-DuTbfCdT.js';import'./chunk-DKacf9Tj.js';import'./chunk-gaP3Sx_C.js';import'./chunk-CI8lsvKT.js';import'./chunk-C5p3bQwH.js';import {T,aw as W,a5 as g,ab as C,z as za,aE as jo,h as hw,Z as lr,_ as _t,a8 as To,j as vg,Q as Qi,f as aT,n as nC,$ as $l,C as CE,i as cT,A as yg,aF as XC,aD as YC,w as jC,k as iC,aa as Ql}from'./main-QLXVXD6E.js';import'./chunk-C3KPTLNN.js';import {d}from'./chunk-PONAC1Ya.js';import'./chunk-D3SUPUQT.js';import'./chunk-DoYGADYB.js';import'./chunk-Crs56mDy.js';import'./chunk-Bcxzhjj8.js';import'./chunk-BYJ0fSUP.js';import {L}from'./chunk-D3d-eReU.js';import'./chunk-D2aWqPl_.js';var G=(i,e)=>[i,e,"general"],$=(i,e)=>[i,e,"destination"],U=(i,e)=>[i,e,"source-data"],K=(i,e)=>[i,e,"schedule"],F=(i,e)=>[i,e,"options"];function w(i,e){if(i&1&&(Qi(0,"p"),jC(1),$l()),i&2){let t=iC();CE(),Ql("Editing: ",t.backupName());}}function J(i,e){i&1&&vg(0,"sh-progress-bar",7);}function X(i,e){i&1&&(Qi(0,"section"),vg(1,"router-outlet"),$l());}var P=class i{#t=T(W);#e=T(ke);#i=T(g);#n=T(C);isDraft=this.#e.isDraft;isNew=this.#e.isNew;backupId=this.#e.backupId;backupName=this.#e.backupName;finishedLoading=this.#e.finishedLoading;#a=L(this.#t.params);#o=L(this.#t.url);paramsChanged=za(()=>{let e=this.#a()?.id,t=!!this.#o()?.find(n=>n.path==="backup-draft");e!=this.#e.backupId()&&(this.#e.backupId.set(e),e!=="new"?this.getBackup(e,t):this.getDefaults());});getDefaults(){this.#n.getApiV1Backupdefaults().pipe(jo(1)).subscribe({next:e=>{let t=e.Backup;t.Settings=[...t.Settings],this.#e.mapGeneralToForm(t),this.#e.mapDestinationToForm(t),this.#e.mapSourceDataToForm(t),this.#e.mapScheduleToForm(e.Schedule),this.#e.mapOptionsToForms(t),this.#e.applicationOptions.set(e.ApplicationOptions),this.#e.backupDefaults.set(e),this.#e.finishedLoading.set(true);}});}getBackup(e,t=false){let n=a=>{this.#e.mapScheduleToForm(a.Schedule??null),a.Backup&&(this.#e.mapGeneralToForm(a.Backup),this.#e.mapDestinationToForm(a.Backup),this.#e.mapSourceDataToForm(a.Backup),this.#e.mapOptionsToForms(a.Backup),this.#e.storeMetadata(a.Backup,t)),this.#e.finishedLoading.set(true);};if(t){this.isDraft.set(t);let a=this.#i.draftBackups().find(d=>d.id===e);if(!a){alert("Backup not found");return}n(a.data);}else this.#n.getApiV1BackupById({id:e}).subscribe({next:n});}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=hw({type:i,selectors:[["app-backup"]],features:[YC([ke])],decls:16,vars:22,consts:()=>{let e;e=$localize` General `;let t;t=$localize` Destination `;let n;n=$localize` Source Data `;let a;a=$localize` Schedule `;let d;return d=$localize` Options `,[e,t,n,a,d,[1,"primary"],["tabindex","-1","routerLinkActive","active",3,"routerLink"],[1,"indeterminate","primary"]]},template:function(t,n){t&1&&(vg(0,"app-status-bar"),Qi(1,"header"),aT(2,w,2,1,"p"),Qi(3,"sh-stepper",5)(4,"div",6),nC(5,0),$l(),Qi(6,"div",6),nC(7,1),$l(),Qi(8,"div",6),nC(9,2),$l(),Qi(10,"div",6),nC(11,3),$l(),Qi(12,"div",6),nC(13,4),$l()()(),aT(14,J,1,0,"sh-progress-bar",7)(15,X,2,0,"section")),t&2&&(CE(2),cT(n.isNew()?-1:2),CE(2),yg("routerLink",XC(7,G,n.isDraft()?"/backup-draft":"/backup",n.backupId())),CE(2),yg("routerLink",XC(10,$,n.isDraft()?"/backup-draft":"/backup",n.backupId())),CE(2),yg("routerLink",XC(13,U,n.isDraft()?"/backup-draft":"/backup",n.backupId())),CE(2),yg("routerLink",XC(16,K,n.isDraft()?"/backup-draft":"/backup",n.backupId())),CE(2),yg("routerLink",XC(19,F,n.isDraft()?"/backup-draft":"/backup",n.backupId())),CE(2),cT(n.finishedLoading()?15:14));},dependencies:[lr,_t,To,ee,w$1,d],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;height:100%}header[_ngcontent-%COMP%]{padding:1rem 1.5rem;border-bottom:1px solid var(--base-4)}header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:.5rem}header[_ngcontent-%COMP%] sh-stepper[_ngcontent-%COMP%]{width:100%}section[_ngcontent-%COMP%]{width:100%;display:flex;justify-content:center;flex:1 0;overflow-x:hidden;overflow-y:auto;-webkit-overflow-scrolling:auto}"]})};export{P as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {OptionsListComponent as Oe$1}from'./chunk-DAM-4k69.js';import {O}from'./chunk-dCFVYHva.js';import {T as Tt$1,Z as Ze$1}from'./chunk-BC2-YuwH.js';import'./chunk-BFfFD-XE.js';import {N as Ne$1}from'./chunk-CmexLvf7.js';import {I}from'./chunk-Bgx4dtaL.js';import {J}from'./chunk-D7AP6g7S.js';import'./chunk-CQv4eyEK.js';import'./chunk-DH6iiZWc.js';import {N as Nt$2}from'./chunk-DuTbfCdT.js';import'./chunk-DKacf9Tj.js';import'./chunk-gaP3Sx_C.js';import'./chunk-CI8lsvKT.js';import'./chunk-C5p3bQwH.js';import {T,ab as C,e as ee,aw as W,G as Ge,N as Nt$1,H as qu,h as hw,d as N,v,Q as Qi,V as Vg,f as aT,aP as ql,n as nC,aQ as Gl,p as cm,$ as $l,L as Lg,j as vg,F as Fg,A as yg,C as CE,i as cT,x as am,bh as Q,m,aJ as ci,z as za,cl as zu,aE as jo,bJ as fe,aH as m$1,au as jg,av as rC,aD as YC,a6 as be,at as h,Y as Yg,b0 as Hs,cm as cy,c5 as $s,ay as Gu,bK as Dy,cn as Sy,aZ as ee$1,U as UC,s as CD,y as _D,l as vT,r as kd,k as iC,O as Od,bg as ag,a3 as KC,w as jC,aM as ob,aB as im,aN as ab,aa as Ql,aR as sb}from'./main-QLXVXD6E.js';import'./chunk-C3KPTLNN.js';import {d}from'./chunk-PONAC1Ya.js';import {F as Fe}from'./chunk-D3SUPUQT.js';import {j as jn,G as Gn,T as Tn,Z as Ze,R as Rn,P as Pn,g as gn,h as hn,B as Bn,J as Jt,y as yt$1,r as rn}from'./chunk-DoYGADYB.js';import'./chunk-Crs56mDy.js';import'./chunk-Bcxzhjj8.js';import {O as O$1}from'./chunk-BYJ0fSUP.js';import'./chunk-D2aWqPl_.js';import {L}from'./chunk-D3d-eReU.js';var _e={handleExisting:"saveTimestamp",permissions:false,includeMetadata:true},Tt=new Set(["true","1","yes","on"]),Ce=i=>(i??"").trim().replace(/^--/,"").toLowerCase(),at=i=>Tt.has((i??"").trim().toLowerCase()),lt=(i,t,e,o)=>{let n=Ce(i),r=t.find(u=>Ce(u.Name)===n);if(r)return at(r.Value);let l=Object.keys(e).find(u=>Ce(u)===n);return l?at(e[l]):o},_t=(i,t)=>{let e=i??[],o=lt("restore-permissions",e,t,_e.permissions),n=lt("skip-metadata",e,t,false);return {permissions:o,includeMetadata:!n}};function gt(i,t){i&1&&(Qi(0,"p"),nC(1,3),$l());}function Ft(i,t){i&1&&(Qi(0,"sh-form-field")(1,"label",11),nC(2,4),$l(),vg(3,"input",12),CD(),$l()),i&2&&(CE(3),_D());}var ct=new jn,pt=()=>ct.group({passphrase:ct.control("")}),Oe=class i{#e=T(C);#t=T(k);#i=T(ee);#n=T(W);encryptionForm=this.#t.encryptionForm;creatingTemporaryBackup=Ge(false);settings=Ge([]);hasEncryptedBackup=Nt$1(()=>{let t=this.#t.destinationTestSignal();return t==="testing"||typeof t=="string"?true:t?.containsEncryptedBackupFiles??true});showEncryptionField=Ge(false);next(){let t=this.#t.destinationTargetUrl();if(!t)throw new Error("No target URL");this.creatingTemporaryBackup.set(true);let e=this.encryptionForm.value?.passphrase??null,o=[];e?o.push({Name:"--passphrase",Value:e}):o.push({Name:"--no-encryption",Value:"true"}),this.settings().forEach(n=>{let r=n.Name?.trim();r&&r!=="--"&&(r.startsWith("--")||(r=`--${r}`),o.push({Name:r,Value:n.Value??""}));}),this.#e.postApiV1Backups({requestBody:{Backup:{TargetURL:t,Settings:o}},temporary:true}).pipe(qu(()=>this.creatingTemporaryBackup.set(false))).subscribe({next:n=>{let r=n.ID;this.#i.navigate([`/restore-draft/${r}`]);},error:n=>{console.error(n);}});}back(){this.#t.isFileRestore()?this.#i.navigate(["destination"],{relativeTo:this.#n.parent}):this.#t.exit();}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-restore-encryption"]],decls:14,vars:5,consts:()=>{let t;t=$localize`Advanced options`;let e;e=$localize`${"\uFFFD#10\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#10\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let o;o=$localize`${"\uFFFD#13\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#13\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let n;n=$localize`The backup does not contain encrypted files.`;let r;r=$localize`Enter backup passphrase if defined.`;let l;return l=$localize`Password`,[t,e,o,n,l,[3,"submit","formGroup"],["title",""],[3,"optionsChange","options","hasFreeTextSettings"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],["for","password"],["type","password","id","password","autocomplete","disabled","placeholder",r,"formControlName","passphrase"]]},template:function(e,o){e&1&&(Qi(0,"form",5),Vg("submit",function(){return o.next()}),aT(1,gt,2,0,"p"),aT(2,Ft,4,0,"sh-form-field"),Qi(3,"sh-toggle-card"),ql(4,6),nC(5,0),Gl(),Qi(6,"app-options-list",7),cm("optionsChange",function(r){return UC(o.settings,r)||(o.settings=r),r}),$l()(),Qi(7,"div",8)(8,"button",9),Vg("click",function(){return o.back()}),Lg(9,1),vg(10,"sh-icon"),Fg(),$l(),Qi(11,"button",10),Lg(12,2),vg(13,"sh-icon"),Fg(),$l()()()),e&2&&(yg("formGroup",o.encryptionForm),CE(),cT(o.hasEncryptedBackup()?-1:1),CE(),cT(o.hasEncryptedBackup()||o.showEncryptionField()?2:-1),CE(4),am("options",o.settings),yg("hasFreeTextSettings",true));},dependencies:[Gn,Tn,Ze,Rn,Pn,gn,hn,Fe,N,v,I,Oe$1],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}"]})};var mt=()=>({standalone:true});function Ct(i,t){i&1&&vg(0,"sh-progress-bar",13);}function Ot(i,t){if(i&1&&(jC(0),ob(1,"bytes")),i&2){let e=iC().$implicit;Ql(" (",sb(1,1,e.FileSizes),") ");}}function ft(i,t){i&1&&(Qi(0,"span",20),nC(1,4),$l());}function Nt(i,t){if(i&1&&(Qi(0,"div",19),jC(1),ob(2,"date"),aT(3,Ot,2,3),aT(4,ft,2,0,"span",20),$l()),i&2){let e=t.$implicit;CE(),im(" ",e.Version,": ",ab(2,4,e.Time,"medium")," "),CE(2),cT(e.FileSizes?3:-1),CE(),cT(e.IsFullBackup===false?4:-1);}}function ht(i,t){i&1&&vg(0,"sh-progress-bar",13);}function Rt(i,t){i&1&&(Qi(0,"sh-icon",28),jC(1,"spinner"),$l());}function Pt(i,t){i&1&&(Qi(0,"sh-icon"),jC(1,"magnifying-glass"),$l());}function It(i,t){if(i&1){let e=vT();Qi(0,"button",31),Vg("click",function(){kd(e);let n=iC(4);return Od(n.clearSearch())}),Qi(1,"sh-icon"),jC(2,"x-circle"),$l(),Qi(3,"span"),nC(4,8),$l()();}}function Mt(i,t){i&1&&(Qi(0,"span"),nC(1,9),$l());}function Lt(i,t){if(i&1&&(Qi(0,"span"),nC(1,10),$l()),i&2){let e=iC(5);CE(),jg(e.searchResults().length),rC(1);}}function yt(i,t){if(i&1&&(Qi(0,"div",30),aT(1,Mt,2,0,"span")(2,Lt,2,1,"span"),$l()),i&2){let e=iC(4);CE(),cT(e.searchResults().length===0?1:2);}}function Dt(i,t){if(i&1){let e=vT();Qi(0,"div",24)(1,"sh-form-field")(2,"label",25),nC(3,6),$l(),Qi(4,"input",26),cm("ngModelChange",function(n){kd(e);let r=iC(3);return UC(r.searchQuery,n)||(r.searchQuery=n),Od(n)}),Vg("keydown.enter",function(n){kd(e);let r=iC(3);return n.preventDefault(),Od(r.performSearch())}),$l(),CD(),$l(),Qi(5,"button",27),Vg("click",function(){kd(e);let n=iC(3);return Od(n.performSearch())}),aT(6,Rt,2,0,"sh-icon",28)(7,Pt,2,0,"sh-icon"),Qi(8,"span"),nC(9,7),$l()(),aT(10,It,5,0,"button",29),$l(),aT(11,yt,3,1,"div",30);}if(i&2){let e=iC(3);CE(4),am("ngModel",e.searchQuery),yg("ngModelOptions",KC(6,mt)),_D(),CE(),yg("disabled",e.isSearching()||!e.searchQuery().trim()),CE(),cT(e.isSearching()?6:7),CE(4),cT(e.isSearchMode()?10:-1),CE(),cT(e.isSearchMode()&&!e.isSearching()?11:-1);}}function bt(i,t){if(i&1){let e=vT();aT(0,Dt,12,7),Qi(1,"app-file-tree",21),Vg("hasExtendedData",function(n){kd(e);let r=iC(2);return Od(r.extendedDataType.set(n))}),Qi(2,"label",22),nC(3,5),$l(),vg(4,"input",23),CD(),$l();}if(i&2){let e=iC(2);cT(e.canSearch()?0:-1),CE(),yg("rootPaths",e.rootPaths())("initialNodes",e.initialNodes())("backupSettings",e.backupSettings())("multiSelect",true)("showFiles",true)("loadExtendedData",true)("searchMode",e.isSearchMode())("searchResults",e.searchResults()),CE(3),_D();}}function $t(i,t){if(i&1){let e=vT();Qi(0,"sh-select",17),Vg("cleared",function(){kd(e);let n=iC();return Od(n.abortLoading())}),Qi(1,"input",18),cm("ngModelChange",function(n){kd(e);let r=iC();return UC(r.selectOption,n)||(r.selectOption=n),Od(n)}),$l(),CD(),ag(2,Nt,5,7,"ng-template"),$l(),aT(3,ht,1,0,"sh-progress-bar",13),aT(4,bt,5,9);}if(i&2){let e=iC();yg("options",e.versionOptions())("isClearable",false),CE(),am("ngModel",e.selectOption),yg("ngModelOptions",KC(6,mt)),_D(),CE(2),cT(e.isRepairing()||e.versionOptionsLoading()||e.loadingRootPath()?3:-1),CE(),cT(e.showFileTree()?4:-1);}}var Ne=new jn,St=()=>Ne.group({filesToRestore:Ne.control(""),passphrase:Ne.control(null)}),he=class i{#e=T(C);#t=T(k);#i=T(Q);#n=T(m);#o=T(ee);#a=T(W);#l=T(ci);#_=null;#r=null;#s=Ge([]);selectFilesForm=this.#t.selectFilesForm;selectFilesFormSignal=this.#t.selectFilesFormSignal;selectOption=this.#t.selectOption;backupId=this.#t.backupId;versionOptionsLoading=this.#t.versionOptionsLoading;versionOptions=this.#t.versionOptions;isFileRestore=this.#t.isFileRestore;extendedDataType=this.#t.extendedDataType;needsDatabaseRepair=Nt$1(()=>this.#t.backup()?.Backup?.IsTemporary??true);showFileTree=Ge(false);backupSettings=Ge(null);rootPaths=Ge([]);initialNodes=Ge([]);loadingRootPath=Ge(false);isRepairing=Nt$1(()=>this.#s().length>0);loadedVersions=Ge({});canSearch=Nt$1(()=>this.#n.hasV2ListOperations());searchQuery=Ge("");isSearching=Ge(false);searchResults=Ge([]);hasSearched=Ge(false);isSearchMode=Nt$1(()=>this.searchQuery().length>0&&this.hasSearched());loadingEffect=za(()=>{if(this.versionOptionsLoading())return;let e=this.versionOptions();if(e&&e?.length>0){let o=e[0].Version;this.selectOption.set(o.toString());}});backupSettingsEffect=za(()=>{let t=this.backupId(),e=this.selectOption(),o=this.isRepairing(),n=this.loadedVersions();if(!e||!t)return;let l=this.versionOptions()?.find(w=>w.Version===parseInt(e))?.Time??null;if(!l)return;let u=`${t}+${l}`,I=n[u];if(this.needsDatabaseRepair()&&(!I||o))return;let D={id:t+"",time:l};this.backupSettings.set(D),this.getRootPath(D);});repairEffect=za(()=>{if(!this.needsDatabaseRepair())return;let t=this.selectOption(),e=this.versionOptions();if(t){let o=e.find(l=>l.Version===parseInt(t));if(o===void 0)return;let n=this.backupId(),r=`${n}+${o.Time}`;if(this.#r===r||(this.#r=r,this.#s().includes(r)))return;this.#s.update(l=>[...l,r]),this.#e.postApiV1BackupByIdRepairupdate({id:n,requestBody:{only_paths:true,time:o.Time}}).pipe(zu(this.abortLoading$),qu(()=>{this.#r=null;})).subscribe(l=>{let u=l.ID;this.#i.waitForTaskToComplete(u).pipe(jo(1)).subscribe(()=>{this.#s.update(I=>I.filter(D=>D!==r)),this.loadedVersions.update(I=>(I[r]=true,I));});});}});getRootPath(t){let e={id:t.id+"",time:t.time,prefixOnly:true,folderContents:false},o=t.id+"";this.isRepairing()||this.#_===o||(this.#_=o,this.loadingRootPath.set(true),this.showFileTree.set(false),this.#n.hasV2ListOperations()?this.#e.postApiV2BackupListFolder({requestBody:{BackupId:t.id,Time:t.time,Paths:null,PageSize:0,Page:0,ReturnExtended:true}}).pipe(zu(this.abortLoading$),qu(()=>{this.showFileTree.set(true),this.loadingRootPath.set(false),this.#_=null;})).subscribe({next:n=>{let r=(n.Data??[]).find(u=>u.Metadata&&u.Metadata.ExtType&&u.Metadata.ExtType.length>0);r&&this.extendedDataType.set(r.Metadata.ExtType);let l=(n.Data??[]).map(u=>u.Path??"");l.length>0?(this.initialNodes.set([]),this.rootPaths.set(l)):(this.initialNodes.set([]),this.rootPaths.set(["/"]));}}):this.#e.getApiV1BackupByIdFiles(e).pipe(zu(this.abortLoading$),qu(()=>{this.showFileTree.set(true),this.loadingRootPath.set(false);})).subscribe({next:n=>{let r=n.Files.map(l=>l.Path??"");r.length>0?(this.initialNodes.set([]),this.rootPaths.set(r)):(this.initialNodes.set([]),this.rootPaths.set(["/"]));}}));}abortLoading$=new fe;abortLoading(){this.showFileTree.set(false),this.loadingRootPath.set(false),this.abortLoading$.next(true);}displayFn(){let t=this.versionOptions();return e=>{if(!e)return "";let o=t?.find(n=>typeof n.Version=="number"&&n.Version.toString()===e);return o?`${o.Version}: ${this.#l.transform(o.Time,"medium")}`:""}}next(){this.#o.navigate(["options"],{relativeTo:this.#a.parent});}back(){this.#t.isFileRestore()?this.#o.navigate(["encryption"],{relativeTo:this.#a.parent}):this.#t.exit();}performSearch(){let t=this.searchQuery().trim(),e=this.backupSettings(),o=(this.#t.extendedDataType()??"").length>0;if(!t||!e)return;let r=this.versionOptions()?.find(l=>l.Version===parseInt(this.selectOption()??""))?.Version;r!=null&&(this.isSearching.set(true),this.searchResults.set([]),this.hasSearched.set(true),this.#e.postApiV2BackupSearch({requestBody:{BackupId:e.id,Time:null,Version:[r],Filters:[t],Paths:null,PageSize:1e3,Page:0,ReturnExtended:o,SearchMetadata:o}}).pipe(zu(this.abortLoading$),qu(()=>this.isSearching.set(false))).subscribe({next:l=>{this.searchResults.set(l.Data??[]);},error:()=>{this.searchResults.set([]);}}));}clearSearch(){this.searchQuery.set(""),this.searchResults.set([]),this.hasSearched.set(false);}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-select-files"]],features:[YC([ci])],decls:13,vars:3,consts:()=>{let t;t=$localize`Select files`;let e;e=$localize`${"\uFFFD#9\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#9\uFFFD"}:CLOSE_TAG_SH_ICON: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let o;o=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SH_ICON: Continue `;let n;n=$localize`Select an option...`;let r;r=$localize`(partial)`;let l;l=$localize`Path`;let u;u=$localize`Enter search term...`;let I;I=$localize`Search files`;let D;D=$localize`Search`;let w;w=$localize`Clear`;let oe;oe=$localize`0 results found`;let ne;return ne=$localize`Found ${"\uFFFD0\uFFFD"}:INTERPOLATION: result(s)`,[["formRef",""],t,e,o,r,l,I,D,w,oe,ne,[3,"submit","formGroup"],[1,"title-30"],[1,"indeterminate","primary"],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],["value","Version",3,"cleared","options","isClearable"],["type","text","placeholder",n,3,"ngModelChange","ngModel","ngModelOptions"],[1,"custom-option"],[1,"partial"],[3,"hasExtendedData","rootPaths","initialNodes","backupSettings","multiSelect","showFiles","loadExtendedData","searchMode","searchResults"],["for","path"],["type","text","id","path","formControlName","filesToRestore"],[1,"search-container"],["for","search"],["type","text","id","search","placeholder",u,3,"ngModelChange","keydown.enter","ngModel","ngModelOptions"],["shButton","","type","button",1,"small",3,"click","disabled"],[1,"spinner"],["shButton","","type","button",1,"small","secondary"],[1,"search-results-info"],["shButton","","type","button",1,"small","secondary",3,"click"]]},template:function(e,o){e&1&&(Qi(0,"form",11,0),Vg("submit",function(){return o.next()}),Qi(2,"h3",12),nC(3,1),$l(),aT(4,Ct,1,0,"sh-progress-bar",13)(5,$t,5,7),Qi(6,"div",14)(7,"button",15),Vg("click",function(){return o.back()}),Lg(8,2),vg(9,"sh-icon"),Fg(),$l(),Qi(10,"button",16),Lg(11,3),vg(12,"sh-icon"),Fg(),$l()()()),e&2&&(yg("formGroup",o.selectFilesForm),CE(4),cT(o.versionOptionsLoading()?4:5),CE(5),jg(o.isFileRestore()?"Back":"Exit"),rC(8));},dependencies:[Bn,Tn,Ze,Rn,Pn,Jt,Gn,gn,hn,Ne$1,v,Fe,N,Nt$2,d,ci,m$1],styles:["[_nghost-%COMP%]{display:block;margin-top:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.partial[_ngcontent-%COMP%]{color:var(--base-9);font-style:italic}.search-container[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.search-container[_ngcontent-%COMP%] sh-form-field[_ngcontent-%COMP%]{flex:1}.search-results-info[_ngcontent-%COMP%]{color:var(--base-8);font-size:var(--small)}"]})};var k=class i{#e=T(ee);#t=T(W);#i=T(m);#n=T(be);#o=T(C);#a=T(O$1);#l=null;backupId=Ge(null);backup=Ge(null);destinationTargetUrl=Ge(null);destinationTestSignal=Ge(null);selectFilesForm=St();optionsForm=Et();encryptionForm=pt();optionsFormSignal=L(this.optionsForm.valueChanges);selectFilesFormSignal=L(this.selectFilesForm.valueChanges);selectOption=Ge(null);versionOptionsLoading=Ge(false);versionOptions=Ge([]);isSubmitting=Ge(false);isFileRestore=Ge(false);isFullWidthPage=Ge(false);extendedDataType=Ge(null);alternateRestorePath=Ge(null);alternateRestorePathSourcePrefix=Ge(null);#_=za(()=>{let t=this.backupId(),e=this.backup()?.Backup,o=this.#a.serverSettings();!t||!e||o===void 0||e.ID!==null&&e.ID!==t||this.#l!==t&&(this.#l=t,this.optionsForm.patchValue(_t(e.Settings,o)));});init(t,e=false){this.backupId.set(t),this.isFileRestore.set(e),this.alternateRestorePath.set(null),this.extendedDataType.set(null),e&&this.#e.navigate(["/restore-from-files/destination"]),e||this.getBackup();}updateTargetUrl(t){this.destinationTargetUrl.set(t);}setAlternateRestorePath(t,e){this.alternateRestorePath.set(t),this.alternateRestorePathSourcePrefix.set(e);}submit(){this.isSubmitting.set(true);let t=this.backupId();this.backup()?.Backup?.IsTemporary??false?this.#o.postApiV1BackupByIdCopytotemp({id:this.backupId()??""}).subscribe({next:o=>{this.#r(o.ID??"");},error:o=>this.showErrorDialog($localize`An error occurred while copying the backup to a temporary location: ${o.message}`)}):this.#r(t??"");}showErrorDialog(t){this.#n.open(h,{data:{title:$localize`Error occured`,message:t,confirmText:$localize`OK`,cancelText:void 0},closed:e=>{}});}#r(t){let e=this.optionsForm.value,o=this.selectFilesForm.value,n=this.selectOption(),r=this.versionOptions()?.find(l=>l.Version===(n&&parseInt(n)));this.#o.postApiV1BackupByIdRestore({id:t??"",requestBody:{paths:o.filesToRestore?.split("\0").map(l=>l.endsWith("/")||l.endsWith("\\")?`${l}*`:l)??[],passphrase:o.passphrase??null,time:r?.Time,restore_path:this.alternateRestorePath()??e.restoreFromPath,overwrite:e.handleExisting==="overwrite",permissions:e.permissions,skip_metadata:!e.includeMetadata,source_prefix:this.alternateRestorePathSourcePrefix(),connection_string_id:null}}).pipe(qu(()=>this.isSubmitting.set(false))).subscribe({next:l=>{this.#e.navigate([`./${l.ID}`,"progress"],{relativeTo:this.#t});},error:l=>{console.error("restore error",l);}});}exit(){this.#n.open(h,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:t=>{t&&(this.#s(),this.#e.navigate(["/"]));}});}getVersionOptions(){this.versionOptions();}loadFilesetsWithRetryv2(t,e=2){return this.#o.postApiV2BackupListFilesets({requestBody:{BackupId:t}}).pipe(Hs(o=>{let n=o?.error?.body?.StatusCode??o?.error?.requestBody?.StatusCode;return n==="EncryptedStorageNoPassphrase"||n==="FolderMissing"||n==="EmptyRemoteFolder"||e===0?cy(()=>o):$s(1e3).pipe(Gu(()=>this.loadFilesetsWithRetryv2(t,e-1)))}))}getBackup(){let t=this.backupId();this.versionOptionsLoading.set(true),this.#i.hasV2ListOperations()?Dy([this.#o.getApiV1BackupById({id:t}),this.loadFilesetsWithRetryv2(t)]).pipe(jo(1),qu(()=>this.versionOptionsLoading.set(false))).subscribe({next:([e,o])=>{if(o.Error)throw new Error(o.Error);if(!(e.Backup?.IsTemporary??true)&&e?.Backup?.DBPathExists===false){this.#n.open(h,{data:{title:$localize`Missing Local Database`,message:$localize`The local database for this backup is missing. Please repair or recreate the local database before restoring.`,confirmText:$localize`OK`,cancelText:void 0},closed:r=>{this.#e.navigate(["/backup",t,"database"]);}});return}this.versionOptions.set((o.Data??[]).map(r=>({Version:r.Version??-1,IsFullBackup:r.IsFullBackup??void 0,Time:r.Time??"<missing>",FileCount:r.FileCount??void 0,FileSizes:r.FileSizes??void 0}))),this.backup.set(e);},error:e=>{let o=e?.error?.body?.StatusCode??e?.error?.requestBody?.StatusCode,n=o==="EncryptedStorageNoPassphrase",r=o==="FolderMissing",l=o==="EmptyRemoteFolder",u=$localize`An error occurred while loading the backup filesets: ${e.message}`;n&&(u=$localize`The remote storage is encrypted. Please enter the passphrase to access the backup.`),r&&(u=$localize`The backup storage folder was not found.`),l&&(u=$localize`The backup storage folder does not contain any filesets.`),this.#n.open(h,{data:{title:$localize`Failed to load backup filesets`,message:u,confirmText:$localize`OK`,cancelText:void 0},closed:I=>{this.#e.navigate([n?"/restore-from-files/encryption":"/restore-from-files/destination"]);}});}}):Dy([this.#o.getApiV1BackupById({id:t}),this.#o.getApiV1BackupByIdFilesets({id:t}).pipe(Sy(3))]).pipe(jo(1),qu(()=>this.versionOptionsLoading.set(false))).subscribe({next:([e,o])=>{this.versionOptions.set(o.map(n=>({Version:n.Version??-1,IsFullBackup:(n.IsFullBackup??1)==1,Time:n.Time??"<missing>",FileCount:n.FileCount??void 0,FileSizes:n.FileSizes??void 0}))),this.backup.set(e);}});}#s(){this.selectFilesForm.reset(),this.optionsForm.reset();}static \u0275fac=function(e){return new(e||i)};static \u0275prov=ee$1({token:i,factory:i.\u0275fac,providedIn:"root"})};function vt(i,t){if(i&1){let e=vT();Qi(0,"sh-radio",27),Lg(1,6),vg(2,"input",31),CD(),Fg(),$l(),Qi(3,"sh-radio",27),Lg(4,7),Qi(5,"input",32),Vg("click",function(){kd(e);let n=iC(2);return Od(n.chooseCustomRemoteDestination())}),$l(),CD(),Fg(),$l();}i&2&&(CE(2),_D(),CE(3),_D());}function At(i,t){if(i&1){let e=vT();Qi(0,"sh-radio",27),Lg(1,8),vg(2,"input",31),CD(),Fg(),$l(),Qi(3,"sh-radio",27),Lg(4,9),Qi(5,"input",32),Vg("click",function(){kd(e);let n=iC(2);return Od(n.chooseCustomRemoteDestination())}),$l(),CD(),Fg(),$l();}i&2&&(CE(2),_D(),CE(3),_D());}function xt(i,t){if(i&1&&(Qi(0,"app-file-tree",29)(1,"label",33),jC(2,"Path"),$l(),vg(3,"input",34),CD(),$l()),i&2){let e=iC(2);yg("disabled",e.optionsFormSignal()?.restoreFrom!=="pickLocation")("enableCreateFolder",true)("resolvePaths",true),CE(3),_D();}}function Gt(i,t){if(i&1&&(Qi(0,"app-file-tree",30)(1,"label",33),jC(2,"Path"),$l(),vg(3,"input",34),CD(),$l()),i&2){let e=iC(2);yg("customRemoteMode",e.extendedDataType())("backupId",e.backupId())("sourcePrefix",e.remoteCustomSourcePrefix())("destinationUrl",e.customDestinationUrl()),CE(3),_D();}}function kt(i,t){if(i&1&&(aT(0,vt,6,0)(1,At,6,0),Qi(2,"sh-radio",27),Lg(3,5),vg(4,"input",28),CD(),Fg(),$l(),aT(5,xt,4,3,"app-file-tree",29),aT(6,Gt,4,4,"app-file-tree",30)),i&2){let e=iC();cT(e.extendedDataType()==="o365"?0:e.extendedDataType()==="gsuite"?1:-1),CE(4),_D(),CE(),cT(e.optionsFormSignal()?.restoreFrom==="pickLocation"?5:-1),CE(),cT(e.showCustomRemoteRestoreTree()?6:-1);}}function wt(i,t){if(i&1&&(Qi(0,"sh-radio",27),Lg(1,10),vg(2,"input",35),CD(),Fg(),$l(),Qi(3,"sh-radio",27),Lg(4,11),vg(5,"input",28),CD(),Fg(),$l(),Qi(6,"app-file-tree",29)(7,"label",33),jC(8,"Path"),$l(),vg(9,"input",34),CD(),$l()),i&2){let e=iC();CE(2),_D(),CE(3),_D(),CE(),yg("disabled",e.optionsFormSignal()?.restoreFrom!=="pickLocation")("enableCreateFolder",true)("resolvePaths",true),CE(3),_D();}}function Wt(i,t){i&1&&(Qi(0,"app-toggle-card",22),ql(1,23),nC(2,12),Gl(),Qi(3,"sh-toggle",27),Lg(4,13),vg(5,"input",36),CD(),Fg(),$l()()),i&2&&(yg("disableToggle",true),CE(5),_D());}function Bt(i,t){i&1&&(Qi(0,"app-toggle-card",22),ql(1,23),nC(2,14),Gl(),Qi(3,"sh-radio",27),Lg(4,15),vg(5,"input",37),CD(),Fg(),$l(),Qi(6,"sh-radio",27),Lg(7,16),vg(8,"input",38),CD(),Fg(),$l()(),Qi(9,"app-toggle-card"),ql(10,23),nC(11,17),Gl(),Qi(12,"sh-toggle",39),Lg(13,18),vg(14,"input",40),CD(),Fg(),$l(),Qi(15,"sh-toggle",39),Lg(16,19),vg(17,"input",41),CD(),Fg(),$l()()),i&2&&(yg("disableToggle",true),CE(5),_D(),CE(3),_D(),CE(6),_D(),CE(3),_D());}var V=new jn,Et=()=>V.group({restoreFrom:V.control("original"),restoreFromPath:V.control(""),handleExisting:V.control(_e.handleExisting),permissions:V.control(_e.permissions),includeMetadata:V.control(_e.includeMetadata),customRemoteIgnoreExisting:V.control(false)}),Re=class i{#e=T(k);#t=T(ee);#i=T(W);#n=T(m);#o=T(be);optionsForm=this.#e.optionsForm;optionsFormSignal=this.#e.optionsFormSignal;isSubmitting=this.#e.isSubmitting;extendedData=this.#e.extendedDataType;remoteCustomTargetUrl=Ge(null);backupId=Nt$1(()=>this.#e.backup()?.Backup?.ID??null);extendedDataType=Nt$1(()=>{let t=this.#e.extendedDataType();return t==="o365"?"o365":t==="gsuite"?"gsuite":null});remoteCustomSourceEntry=Nt$1(()=>this.#e.backup()?.Backup?.Sources?.filter(t=>t.startsWith("@")&&(t.includes("|office365://")||t.includes("|googleworkspace://")))[0]??null);remoteCustomSourceUrl=Nt$1(()=>this.remoteCustomSourceEntry()?.split("|")[1]??null);remoteCustomSourcePrefix=Nt$1(()=>this.remoteCustomSourceEntry()?.split("|")[0]??null);customDestinationUrl=Nt$1(()=>{let t=this.optionsFormSignal()?.restoreFrom,e=this.extendedDataType()!==null;return t==="same-custom"&&e?this.remoteCustomSourceUrl():t==="other-custom"&&e?this.remoteCustomTargetUrl():null});showCustomRemoteRestoreTree=Nt$1(()=>!!(this.optionsFormSignal()?.restoreFrom==="same-custom"&&this.customDestinationUrl()&&this.backupId()||this.optionsFormSignal()?.restoreFrom==="other-custom"&&this.customDestinationUrl()));isCustomRemoteRestore=Nt$1(()=>{let t=this.optionsFormSignal()?.restoreFrom;return t==="same-custom"||t==="other-custom"});chooseCustomRemoteDestination(){let t=this.extendedDataType()==="o365"?"office365://":"googleworkspace://";return this.#o.open(Tt$1,{maxWidth:"700px",maxHeight:"80vh",width:"100%",closeOnOutsideClick:false,data:{targetUrlModel:this.remoteCustomTargetUrl()||this.remoteCustomSourceUrl()||t,moduleType:"RestoreDestinationProvider",askToCreate:true,expectedResult:"any",suppressErrorDialogs:true,backupId:this.backupId(),sourcePrefix:this.remoteCustomSourcePrefix()}}).closed.subscribe(o=>{o&&(this.remoteCustomTargetUrl.set(o),this.optionsForm.controls.restoreFrom.setValue("other-custom"));}),false}#a=za(()=>{let t=this.optionsFormSignal()?.restoreFrom;this.extendedDataType()!=null&&(t==="original"||t===void 0)&&(this.optionsForm.controls.restoreFrom.setValue("pickLocation"),this.optionsForm.controls.handleExisting.setValue("overwrite")),this.extendedDataType()==null&&(t==="same-custom"||t==="other-custom")&&(this.optionsForm.controls.restoreFrom.setValue("original"),this.optionsForm.controls.handleExisting.setValue("saveTimestamp"));});goBack(){this.#t.navigate(["select-files"],{relativeTo:this.#i.parent});}submit(){let t=this.#e.selectFilesFormSignal()?.filesToRestore??[];if(t.length>0&&this.optionsFormSignal()?.restoreFrom=="original"&&(t[0].includes("/")?"/":"\\")!==this.#n.systemInfo()?.DirectorySeparator){this.#o.open(h,{data:{title:$localize`Confirm target folder`,message:$localize`This backup was created on another operating system. Restoring files without specifying a destination folder can cause files to be restored in unexpected places. Are you sure you want to continue without choosing a destination folder?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:n=>{n&&this.#e.submit();}});return}if(this.optionsFormSignal()?.restoreFrom==="same-custom"||this.optionsFormSignal()?.restoreFrom==="other-custom"){let o=this.optionsFormSignal()?.restoreFromPath;if(o&&o.startsWith("/")&&(o=o.substring(1)),!o||o.trim()===""){this.#o.open(h,{data:{title:$localize`No path specified`,message:this.extendedDataType()==="gsuite"?$localize`Please choose a path to restore to in the Google Workspace account.`:$localize`Please choose a path to restore to in the Microsoft 365 tenant.`,confirmText:$localize`OK`,cancelText:void 0}});return}let n=this.optionsFormSignal()?.customRemoteIgnoreExisting,r=this.customDestinationUrl()?.substring(this.customDestinationUrl().indexOf("?")),l=this.extendedDataType()==="gsuite"?`@googleworkspace://${encodeURIComponent(o)}${r}&google-ignore-existing=${n?"true":"false"}`:`@office365://${encodeURIComponent(o)}${r}&office365-ignore-existing=${n?"true":"false"}`;this.#e.setAlternateRestorePath(l,this.remoteCustomSourcePrefix()),this.optionsForm.controls.includeMetadata.setValue(true),this.optionsForm.controls.permissions.setValue(true);}else this.#e.setAlternateRestorePath(null,null);this.#e.submit();}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=hw({type:i,selectors:[["app-advanced-options-settings"]],decls:18,vars:6,consts:()=>{let t;t=$localize`Restore options`;let e;e=$localize`Where do you want to restore files to?`;let o;o=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON: Go back `;let n;n=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SH_ICON:arrow-right${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SH_ICON: Submit `;let r;r=$localize` Local file system ${"\uFFFD#4\uFFFD\uFFFD/#4\uFFFD"}:TAG_INPUT:`;let l;l=$localize` Same Microsoft 365 Tenant ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let u;u=$localize` Different Microsoft 365 Tenant ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let I;I=$localize` Same Google Workspace Account ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let D;D=$localize` Different Google Workspace Account ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let w;w=$localize` Original location ${"\uFFFD#2\uFFFD\uFFFD/#2\uFFFD"}:TAG_INPUT:`;let oe;oe=$localize` Pick location ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let ne;ne=$localize`Restore settings`;let P;P=$localize` Ignore existing resources in the destination ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let Pe;Pe=$localize`How do you want to handle existing files?`;let Ie;Ie=$localize` Overwrite ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let Me;Me=$localize` Save different versions with timestamp in file name ${"\uFFFD#8\uFFFD\uFFFD/#8\uFFFD"}:TAG_INPUT:`;let Le;Le=$localize`Metadata settings`;let ye;ye=$localize` Restore file metadata ${"\uFFFD#14\uFFFD\uFFFD/#14\uFFFD"}:TAG_INPUT:`;let De;return De=$localize` Restore read/write permissions ${"\uFFFD#17\uFFFD\uFFFD/#17\uFFFD"}:TAG_INPUT:`,[["formRef",""],t,e,o,n,r,l,u,I,D,w,oe,ne,P,Pe,Ie,Me,Le,ye,De,[3,"submit","formGroup"],[1,"title-30"],[3,"disableToggle"],["title",""],[1,"form-actions"],["shButton","","type","button",3,"click"],["shButton","","type","submit",1,"raised","primary"],[1,"raised","primary"],["type","radio","name","restoreFrom","value","pickLocation","formControlName","restoreFrom"],[3,"disabled","enableCreateFolder","resolvePaths"],[3,"customRemoteMode","backupId","sourcePrefix","destinationUrl"],["type","radio","name","restoreFrom","value","same-custom","formControlName","restoreFrom"],["type","radio","name","restoreFrom","value","other-custom","formControlName","restoreFrom",3,"click"],["for","path"],["type","text","id","path","formControlName","restoreFromPath"],["type","radio","name","restoreFrom","value","original","formControlName","restoreFrom"],["type","checkbox","formControlName","customRemoteIgnoreExisting"],["type","radio","name","handleExisting","value","overwrite","formControlName","handleExisting"],["type","radio","name","handleExisting","value","saveTimestamp","formControlName","handleExisting"],[1,"primary","raised"],["type","checkbox","formControlName","includeMetadata"],["type","checkbox","formControlName","permissions"]]},template:function(e,o){e&1&&(Qi(0,"form",20,0),Vg("submit",function(){return o.submit()}),Qi(2,"h3",21),nC(3,1),$l(),Qi(4,"app-toggle-card",22),ql(5,23),nC(6,2),Gl(),aT(7,kt,7,3)(8,wt,10,3),$l(),aT(9,Wt,6,1,"app-toggle-card",22)(10,Bt,18,1),Qi(11,"div",24)(12,"button",25),Vg("click",function(){return o.goBack()}),Lg(13,3),vg(14,"sh-icon"),Fg(),$l(),Qi(15,"button",26),Lg(16,4),vg(17,"sh-icon"),Fg(),$l()()()),e&2&&(yg("formGroup",o.optionsForm),CE(4),yg("disableToggle",true),CE(3),cT(o.extendedDataType()!==null?7:8),CE(2),cT(o.isCustomRemoteRestore()?9:10),CE(6),Yg("loading",o.isSubmitting()));},dependencies:[Gn,Tn,Ze,yt$1,rn,Rn,Pn,gn,hn,Ze$1,Ne$1,J,O,v,N],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}"]})};
|
|
2
|
+
var chunkSAHR4V56=/*#__PURE__*/Object.freeze({__proto__:null,createEncryptionForm:pt,default:Oe});var chunkL7FVTW5T=/*#__PURE__*/Object.freeze({__proto__:null,createRestoreSelectFilesForm:St,default:he});var chunkWWUZD2FM=/*#__PURE__*/Object.freeze({__proto__:null,createRestoreOptionsForm:Et,default:Re});export{chunkL7FVTW5T as a,chunkWWUZD2FM as b,chunkSAHR4V56 as c,k};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {F as Fe}from'./chunk-
|
|
1
|
+
import {F as Fe}from'./chunk-D3SUPUQT.js';import {j as jn,G as Gn,T as Tn,Z as Ze,R as Rn,P as Pn,g as gn,h as hn}from'./chunk-DoYGADYB.js';import {T,ah as fe,ab as C,e as ee,G as Ge,ay as Gu,H as qu,h as hw,_ as _t,d as N,v,Q as Qi,L as Lg,j as vg,$ as $l,V as Vg,F as Fg,n as nC,w as jC,f as aT,C as CE,A as yg,a3 as KC,Y as Yg,i as cT,o as oC,ac as v1,b6 as Iw,s as CD,y as _D}from'./main-QLXVXD6E.js';var q=(()=>{class r{constructor(){this.filesOver=Ge(false),this.filesDropped=v1();}onDragOver(t){t.preventDefault(),t.stopPropagation(),this.filesOver.set(true);}onDragLeave(t){t.preventDefault(),t.stopPropagation(),this.filesOver.set(false);}ondrop(t){t.preventDefault(),t.stopPropagation(),this.filesOver.set(false);let e=t.dataTransfer?.files;e&&e.length>0&&this.filesDropped.emit(e);}static{this.\u0275fac=function(e){return new(e||r)};}static{this.\u0275dir=Iw({type:r,selectors:[["","shDragDrop",""]],hostVars:2,hostBindings:function(e,i){e&1&&Vg("dragover",function(c){return i.onDragOver(c)})("dragleave",function(c){return i.onDragLeave(c)})("drop",function(c){return i.ondrop(c)}),e&2&&Yg("filesover",i.filesOver());},outputs:{filesDropped:"filesDropped"}});}}return r})();var Q=()=>["/"];function W(r,o){r&1&&(Qi(0,"sh-form-field")(1,"label",11),nC(2,2),$l(),vg(3,"input",12),CD(),$l()),r&2&&(CE(3),_D());}var p=new jn,D=class r{#t=T(fe);#e=T(C);#o=T(ee);isRestoring=Ge(false);isSecureFile=Ge(false);importForm=p.group({config:p.control(""),cmdline:p.control(false),importMetadata:p.control(false),direct:p.control(false),passphrase:p.control("")});selectedFile=Ge(null);onFileDropped(o){let e=o.target?.files?.item(0);if(e){let i=new FileReader;this.isSecureFile.set(e.type!=="application/json"),i.onload=this.#i.bind(this),i.readAsArrayBuffer(e);}}#i(o){let t=o.target?.result;this.importForm.patchValue({config:this.#r(t)});}#r(o){let t=new Uint8Array(o),e=t.byteLength,i="";for(let n=0;n<e;n++)i+=String.fromCharCode(t[n]);return btoa(i)}submit(){this.isRestoring.set(true),this.#e.postApiV1BackupsImport({requestBody:this.importForm.value}).pipe(Gu(o=>{let e={Backup:o.data.Backup};return this.#e.postApiV1Backups({requestBody:e,temporary:true})}),qu(()=>this.isRestoring.set(false))).subscribe({next:o=>{this.#o.navigate(["/restore-draft",o.ID]);},error:o=>{this.#t.error(o.message);}});}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=hw({type:r,selectors:[["app-restore-from-config"]],decls:16,vars:7,consts:()=>{let o;o=$localize` Restore from config ${"\uFFFD#3\uFFFD"}:START_TAG_DIV:${"\uFFFD#4\uFFFD"}:START_TAG_BUTTON:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:arrow-left${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Back ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD#6\uFFFD"}:START_TAG_BUTTON_1:${"[\uFFFD#5\uFFFD|\uFFFD#7\uFFFD]"}:START_TAG_SH_ICON:download-simple${"[\uFFFD/#5\uFFFD|\uFFFD/#7\uFFFD]"}:CLOSE_TAG_SH_ICON: Restore ${"[\uFFFD/#4\uFFFD|\uFFFD/#6\uFFFD]"}:CLOSE_TAG_BUTTON:${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_DIV:`,o=oC(o);let t;t=$localize`Select a configuration file`;let e;return e=$localize`Passphrase`,[o,t,e,[1,"actions"],["shButton","","type","button",1,"outlined",3,"routerLink"],["shButton","","type","submit",1,"raised","primary",3,"click","disabled"],["autocomplete","off",3,"formGroup"],["shDragDrop","",3,"fileDropped"],["for","file"],["type","file","accept",".json,.aes",3,"change"],["suffix",""],["for","passphrase"],["type","password","autocomplete","disabled","formControlName","passphrase"]]},template:function(t,e){t&1&&(Qi(0,"header")(1,"h3"),Lg(2,0),Qi(3,"div",3)(4,"button",4),vg(5,"sh-icon"),$l(),Qi(6,"button",5),Vg("click",function(){return e.submit()}),vg(7,"sh-icon"),$l()(),Fg(),$l()(),Qi(8,"form",6)(9,"sh-form-field",7),Vg("fileDropped",function(n){return e.onFileDropped(n)}),Qi(10,"label",8),nC(11,1),$l(),Qi(12,"input",9),Vg("change",function(n){return e.onFileDropped(n)}),$l(),Qi(13,"sh-icon",10),jC(14,"upload"),$l()(),aT(15,W,4,0,"sh-form-field"),$l()),t&2&&(CE(4),yg("routerLink",KC(6,Q)),CE(2),Yg("loading",e.isRestoring()),yg("disabled",e.isRestoring()),CE(2),yg("formGroup",e.importForm),CE(7),cT(e.isSecureFile()?15:-1));},dependencies:[Gn,Tn,Ze,Rn,Pn,gn,hn,_t,q,Fe,N,v],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:3rem}h3[_ngcontent-%COMP%]{font:var(--title-30);display:flex;align-items:center;justify-content:space-between}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;max-width:31.25rem}"]})};export{D as default};
|