@duplicati/ngclient 0.0.234 → 0.0.236

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (150) hide show
  1. package/assets/sh.woff2 +0 -0
  2. package/chunk-0pQRcAhF.js +1 -0
  3. package/chunk-1DRz_1dv.js +1 -0
  4. package/chunk-2QKZNH3T.js +1 -0
  5. package/chunk-3iAIXnG6.js +14 -0
  6. package/chunk-5q0UK__c.js +3 -0
  7. package/chunk-644SEuYO.js +1 -0
  8. package/chunk-6oGy_iFC.js +1 -0
  9. package/{chunk-CTH9uShX.js → chunk-8A93BNds.js} +1 -1
  10. package/chunk-9Pc-waxi.js +1 -0
  11. package/{chunk-BFquKzMb.js → chunk-B20GDhu-.js} +1 -1
  12. package/{chunk-GKdOPH_4.js → chunk-B5S2d_Pm.js} +2 -2
  13. package/chunk-BFsdrFDX.js +1 -0
  14. package/chunk-BG8y51P2.js +2 -0
  15. package/chunk-BIZHZ66x.js +2 -0
  16. package/chunk-BM5sEnUl.js +1 -0
  17. package/chunk-BO1Nqy2x.js +1 -0
  18. package/chunk-BSB0qCYy.js +2 -0
  19. package/{chunk-xwdrpTfz.js → chunk-BSCOyYHH.js} +2 -2
  20. package/chunk-BWDCVcaP.js +1 -0
  21. package/{chunk-B0ETfgeR.js → chunk-BZPh4AYw.js} +11 -11
  22. package/chunk-Bc_wPl6H.js +1 -0
  23. package/chunk-Bdg6GNH8.js +3 -0
  24. package/{chunk-DqoYKCmi.js → chunk-Be4WXTyA.js} +3 -3
  25. package/{chunk-BDhLEYas.js → chunk-Bfg1Kjif.js} +1 -1
  26. package/{chunk-FZcbbWYC.js → chunk-BmOgPfpY.js} +1 -1
  27. package/chunk-BpG_gjhd.js +1 -0
  28. package/chunk-BszFCrvn.js +2 -0
  29. package/chunk-Bx7WLGmZ.js +2 -0
  30. package/{chunk-UUMQmD5I.js → chunk-BxBZMjtQ.js} +2 -2
  31. package/chunk-BxLcE6zQ.js +1 -0
  32. package/chunk-Bz49u_nH.js +2 -0
  33. package/chunk-BzRnxKOJ.js +1 -0
  34. package/{chunk-DP2sLJDC.js → chunk-C0w3mWOI.js} +1 -1
  35. package/chunk-C1PIQTOq.js +2 -0
  36. package/{chunk-BnFO-7ok.js → chunk-C8Zr0vl3.js} +1 -1
  37. package/chunk-C9fglVxt.js +1 -0
  38. package/chunk-CBaqwuDY.js +1 -0
  39. package/chunk-CC4z1keD.js +1 -0
  40. package/chunk-CH0tv6BB.js +1 -0
  41. package/chunk-CMLjueVV.js +1 -0
  42. package/chunk-CNwmuSlJ.js +1 -0
  43. package/chunk-COhlvPYj.js +1 -0
  44. package/{chunk-B-T54LAJ.js → chunk-CRhQXQUC.js} +1 -1
  45. package/chunk-CSPT2xlQ.js +1 -0
  46. package/chunk-CUlaXyK0.js +1 -0
  47. package/{chunk-BaknLOqq.js → chunk-CUo9Jt8-.js} +1 -1
  48. package/chunk-CWCU9i20.js +1 -0
  49. package/chunk-CYA8bL3v.js +2 -0
  50. package/{chunk-D5zSyubd.js → chunk-CZu3210D.js} +1 -1
  51. package/{chunk-KNmRQWOM.js → chunk-CaQaYVo7.js} +1 -1
  52. package/chunk-CgrVW_eL.js +1 -0
  53. package/{chunk-BaNH2nfC.js → chunk-Ci645E9t.js} +1 -1
  54. package/chunk-CpY-WOcD.js +2 -0
  55. package/chunk-CqNJ2t71.js +1 -0
  56. package/chunk-D0owcdvy.js +1 -0
  57. package/chunk-D39Om4Mk.js +1 -0
  58. package/chunk-D72BQ7G7.js +1 -0
  59. package/chunk-DCP61JTN.js +1 -0
  60. package/{chunk-Cv4o9u3S.js → chunk-DF2Ac802.js} +1 -1
  61. package/chunk-DLYD6dRM.js +1 -0
  62. package/{chunk-DCsYP4vf.js → chunk-DM-zhIVI.js} +1 -1
  63. package/{chunk-pxcB56N0.js → chunk-DOUmqK2E.js} +1 -1
  64. package/{chunk-5kQsbzck.js → chunk-DQ3vKQCE.js} +1 -1
  65. package/chunk-DR-utttZ.js +1 -0
  66. package/chunk-DWyjU7VC.js +1 -0
  67. package/chunk-DgUP0uNQ.js +1 -0
  68. package/chunk-Dgq3OqWW.js +2 -0
  69. package/chunk-Djpe9Lo0.js +1 -0
  70. package/chunk-DkT-0-DS.js +1 -0
  71. package/chunk-Dn7TWCfq.js +1 -0
  72. package/chunk-DxIS2uYj.js +2 -0
  73. package/chunk-DyDoCZiX.js +1 -0
  74. package/chunk-DzP0W6ua.js +1 -0
  75. package/chunk-Ied7KwvV.js +1 -0
  76. package/{chunk-Dyq6iPbF.js → chunk-Mj9aFt3b.js} +1 -1
  77. package/chunk-OEmUbdHQ.js +2 -0
  78. package/{chunk-0lYdrxte.js → chunk-OpdQrdKp.js} +1 -1
  79. package/chunk-VrjhL6gl.js +2 -0
  80. package/chunk-Z-8b6Hyr.js +1 -0
  81. package/chunk-bJwp1ogZ.js +4 -0
  82. package/chunk-hTxREuXu.js +1 -0
  83. package/chunk-mVyxhVwu.js +2 -0
  84. package/chunk-oBjabFaf.js +2 -0
  85. package/chunk-qUlwoHQn.js +2 -0
  86. package/{chunk-B-c3Zv6R.js → chunk-vtWJkNZ_.js} +1 -1
  87. package/chunk-zcgLq6FT.js +3 -0
  88. package/index.html +1 -1
  89. package/main-X6MUEPX4.js +21 -0
  90. package/package.json +1 -1
  91. package/assets/dest-icons/sia_logo_dark.92db63f5.svg +0 -6
  92. package/chunk-1-oPQ4n-.js +0 -1
  93. package/chunk-5EFCeqK3.js +0 -3
  94. package/chunk-AHhgJqe4.js +0 -2
  95. package/chunk-B1dNb-QT.js +0 -1
  96. package/chunk-B8PnvglY.js +0 -2
  97. package/chunk-BAmgFjXY.js +0 -1
  98. package/chunk-BFVhQEGw.js +0 -1
  99. package/chunk-BGcVKmjp.js +0 -1
  100. package/chunk-BHrABvoK.js +0 -1
  101. package/chunk-BNG7N21y.js +0 -1
  102. package/chunk-BQapkAzp.js +0 -1
  103. package/chunk-BRqx-u9-.js +0 -2
  104. package/chunk-BaR3Dslz.js +0 -1
  105. package/chunk-Bg98dUtr.js +0 -2
  106. package/chunk-BiSIt2zb.js +0 -2
  107. package/chunk-BkLND74M.js +0 -1
  108. package/chunk-BqbJuWHd.js +0 -3
  109. package/chunk-C4zj812G.js +0 -1
  110. package/chunk-C5G4RPpS.js +0 -1
  111. package/chunk-CA-0mTsq.js +0 -1
  112. package/chunk-CAEYxmzQ.js +0 -1
  113. package/chunk-CGnsbLNG.js +0 -1
  114. package/chunk-CPjYiawK.js +0 -1
  115. package/chunk-CQHKuUqk.js +0 -2
  116. package/chunk-CSYDDxaa.js +0 -2
  117. package/chunk-CUNe6D-d.js +0 -2
  118. package/chunk-CUaDFQyH.js +0 -1
  119. package/chunk-CnyuuWJ3.js +0 -1
  120. package/chunk-CsgB8OpN.js +0 -1
  121. package/chunk-CspKioFm.js +0 -4
  122. package/chunk-CxOam2tf.js +0 -1
  123. package/chunk-CxUx2RFx.js +0 -1
  124. package/chunk-D0qGkLVr.js +0 -1
  125. package/chunk-D4S_1RMU.js +0 -1
  126. package/chunk-D6WUhpxO.js +0 -14
  127. package/chunk-D7C8xyJI.js +0 -1
  128. package/chunk-D9dEfxn4.js +0 -1
  129. package/chunk-DB1KeglF.js +0 -1
  130. package/chunk-DGO0_pkA.js +0 -2
  131. package/chunk-DKOaWS_j.js +0 -2
  132. package/chunk-DXh9g32e.js +0 -1
  133. package/chunk-DYfv4gJW.js +0 -1
  134. package/chunk-DZMTCfoN.js +0 -1
  135. package/chunk-DcU0yXkQ.js +0 -1
  136. package/chunk-Dg-uYwbp.js +0 -2
  137. package/chunk-DmwtL4h3.js +0 -2
  138. package/chunk-DnTA-m4k.js +0 -2
  139. package/chunk-Du0Hd0t6.js +0 -1
  140. package/chunk-DzYR8wiz.js +0 -2
  141. package/chunk-OIDsf_Aq.js +0 -1
  142. package/chunk-S-sgDIKw.js +0 -1
  143. package/chunk-UCY_7-Of.js +0 -1
  144. package/chunk-X3dwwJIr.js +0 -2
  145. package/chunk-_J1lTnCH.js +0 -1
  146. package/chunk-i6kMmbhY.js +0 -1
  147. package/chunk-oobMnyEm.js +0 -3
  148. package/chunk-sgM_r5NM.js +0 -1
  149. package/chunk-umUQn7LQ.js +0 -1
  150. package/main-XKLDSNLY.js +0 -16
@@ -0,0 +1,3 @@
1
+ import {j as jn,m as me}from'./chunk-Bfg1Kjif.js';import {ak as l$1,T,ab as J$1,ay as De,I as I$1,N as Nt,ad as sy,aI as pt,aA as N,a_ as ee$1,G as Ge,aj as m$1,C as Zu,bW as n$1}from'./main-X6MUEPX4.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(Zu(()=>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 J(e){return !("personalLicensedUser"in e)}function q(e){if(J(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(J$1);#s=T(De);#i=T(I$1);#o=new y(()=>this.getS3Config("Providers"));#a=new y(()=>this.getS3Config("Regions"));#r=new y(()=>this.getS3Config("RegionHosts"));#l=new y(()=>this.getS3Config("StorageClasses"));#c=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())});#u=new y(()=>this.getStorjConfig("Satellites"));#p=new y(()=>this.getStorjConfig("AuthenticationMethods"));#m=new y(()=>this.getOpenstackConfig("Providers"));#d=new y(()=>this.getOpenstackConfig("Versions"));#g=new y(()=>this.getGcsConfig("Locations"));#h=new y(()=>this.getGcsConfig("StorageClasses"));getS3AllProviders(){return this.#o.load(),this.#r.load(),this.#c}getS3ProvidersFiltered(t){return Nt(()=>this.getS3AllProviders()().filter(t))}getS3Providers(){return this.#o.load()}getS3Regions(){return this.#a.load()}getS3RegionHosts(){return this.#r.load()}getS3StorageClasses(){return this.#l.load()}getStorjSatellites(){return this.#u.load()}getStorjAuthenticationMethods(){return this.#p.load()}getOpenstackProviders(){return this.#m.load()}getOpenstackVersions(){return this.#d.load()}getGcsLocations(){return this.#g.load()}getGcsStorageClasses(){return this.#h.load()}getS3Config(t){return sy(()=>this.#e.postApiV1WebmoduleByModulekey({path:{modulekey:"s3-getconfig"},body:{"s3-config":t}})).pipe(pt(o=>this.#t(o)))}createS3IamUser(t,o){return sy(()=>this.#e.postApiV1WebmoduleByModulekey({path:{modulekey:"s3-iamconfig"},body:{"s3-operation":"CanCreateUser","s3-username":t,"s3-password":o}}))}createS3PolicyIAM(t){return sy(()=>this.#e.postApiV1WebmoduleByModulekey({path:{modulekey:"s3-iamconfig"},body:{"s3-operation":"GetPolicyDoc",path:t}}))}getStorjConfig(t){return sy(()=>this.#e.postApiV1WebmoduleByModulekey({path:{modulekey:"storj-getconfig"},body:{"storj-config":t}})).pipe(pt(o=>this.#t(o)))}getOpenstackConfig(t){return sy(()=>this.#e.postApiV1WebmoduleByModulekey({path:{modulekey:"openstack-getconfig"},body:{"openstack-config":t}})).pipe(pt(o=>this.#t(o)))}getGcsConfig(t){return sy(()=>this.#e.postApiV1WebmoduleByModulekey({path:{modulekey:"gcs-getconfig"},body:{"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 sy(()=>this.#e.postApiV1WebmoduleByModulekey({path:{modulekey:"duplicati-list-backups"},body:{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 sy(()=>this.#e.postApiV1WebmoduleByModulekey({path:{modulekey:"filen-get-api-key"},body:{"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,o,r){let s={"Content-Type":"application/json"};return this.#i.relayIsEnabled()&&(s.timeout=`${300*1e3}`),this.#s.post(`${N()}/api/v1/webmodule/office365`,JSON.stringify({"backup-id":r??"","source-prefix":o,operation:"CountItems",url:t}),{headers:s}).pipe(pt(i=>this.#t(i)),pt(i=>i.find(c=>c.key==="counts")?.value),pt(i=>{let c=JSON.parse(i);return {users:c.users,groups:c.groups,sites:q(c.sites)}}))}getOffice365Permissions(t,o,r){return this.#n("office365",t,o,r)}getGsuitePermissions(t,o,r){return this.#n("googleworkspace",t,o,r)}#n(t,o,r,s){return this.#s.post(`${N()}/api/v1/webmodule/${t}`,JSON.stringify({"backup-id":s??"","source-prefix":r,operation:"CheckPermissions",url:o}),{headers:{"Content-Type":"application/json"}}).pipe(pt(i=>this.#t(i)),pt(i=>i.find(c=>c.key==="permissions")?.value),pt(i=>JSON.parse(i)))}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.`},I={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=>u(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))}}},P={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 u(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))}}},O=[{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=>u(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]),c=s.slice(1).startsWith(":\\")||s.slice(1).startsWith(":/")||s.startsWith("\\\\")?s:"/"+s;return l$1({destinationType:e,custom:{path:c.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=>u(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 u(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 u(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"),u(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 u(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=>u(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:f(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 u(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=>u(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:f(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=>u(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:f(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 u(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 u(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=>u(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:f(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=>u(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:f(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=>u(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:f(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=>u(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:f(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 u(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 u(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 u(e,null,null,t)},from:(e,t,o)=>l$1({destinationType:e,custom:{path:f(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=>u(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:f(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 u(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 V(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:c}=m(t);return {destinationType:e,dynamic:l$1({"rclone-remote-repository":i,"rclone-remote-path":c},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 u(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,s=typeof r=="string"?r.replace(/^\/+/,""):r;return u(e,t,o,s)},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 u(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 u(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 V(e.destinationType??"sia",t,null,o,r)},from:(e,t,o)=>l$1({destinationType:e,custom:{path:f(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 u(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:f(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 u(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 u(e,o,null,x(t,r))},from:(e,t,o)=>{let{server:r,path:s}=m(t),i=s.split("/")[0],c=s.split("/").slice(1).join("/");return l$1({destinationType:e,custom:{server:r,share:i,path:c}},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:I.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=>u(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:f(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 u(e,null,null,t)},from:(e,t,o)=>l$1({destinationType:e,custom:{path:f(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${v([...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${v([...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 u(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:f(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://${v([...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://${v([...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=>u(e,null,null,e.custom.path),from:(e,t,o)=>l$1({destinationType:e,custom:{path:f(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"])],_={".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 Z=new jn,F=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 u(e,t,o,r){return V(e.destinationType??"file",t,o,r,[...Object.entries(e.advanced),...Object.entries(e.dynamic)])}function V(e,t,o,r,s){let i=v(s),c=encodeURIComponent(Y(t)),S=c==""?"":c+ee(o),k=r??"",E=k.slice(1).startsWith(":\\")&&e=="file"?"file:///":`${e}://`,$=x(S,X(k));return `${E}${$}${i}`}function Q(e){return e==null||e===""?"":e.startsWith("/")?e.substring(1):e}function x(...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 X(e){return e.split("/").map(encodeURIComponent).join("/")}function f(e){if(e==null||e==="")return "";if(typeof e=="string")try{e=new F(e);}catch{return ""}return decodeURIComponent(e.exactHostname??"")+decodeURIComponent(e.pathname=="/"?"":e.pathname??"")}function Y(e){return e==null||e===""?"":e.endsWith("/")?e.substring(0,e.length-1):e}function ee(e){return e==null||e===""?"":":"+e.toString()}function Le(e){return e?e.startsWith("diskimage:")?"assets/dest-icons/external-harddrive.png":G(e).icon:""}function Ne(e){if(!e)return "";if(e.startsWith("diskimage:"))return $localize`Local disk`;let t=G(e);return t?t.displayName:"Unknown"}function G(e){try{let o=new F(e),r=O.find(s=>s.mapper.intercept?.(o));if(r)return r}catch{}let t=e.split("://")[0];return A(t)}var te={file:{Display:$localize`Local`,Icon:null}};function Ie(e){if(!e)return "";let t=G(e);if(!t)return "";let o=te[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[c,S]of Object.entries(_))if(i.endsWith(c))return S}return t.displayName}function A(e){return O.find(o=>o.key===e||o.customKey===e)??O.find(o=>`${o.key}s`===e)??null??l$1({key:e,displayName:e},I)}function xe(e){return O.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:Q(decodeURIComponent(e.pathname))}}function l(e,t){let o={},r={},s=A(e);return t.searchParams.forEach((i,c)=>{s?.dynamicFields?.some(k=>k===c||k?.name===c)?r[c]=decodeURIComponent(i):o[c]=decodeURIComponent(i);}),{advanced:o,dynamic:r}}function v(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 A(t)?.mapper.to(e)??""}function je(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=G(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 A(t).mapper.from(t,new F("http://localhost"+i),e);try{let c=new F(r+i);if(c.host==="undefined")return null;let S=o.split("?")[0].split("/")[0],k=c.host!=""&&!isNaN(Number(c.host.replaceAll(".",""))),w=S.split("."),E=w.length===4&&w.every($=>$.length&&$.length<=3&&!isNaN(Number($))&&parseInt($)<=255);return k&&!E?null:s.mapper.from(s.key,c,e)}catch(c){return console.error("Error while parsing target path",e,r+i,c),null}}function K(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 Te(e){return K(e).map(([t,o])=>({Name:t,Value:o}))}function Re(e){return Object.fromEntries(K(e))}function We(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 He(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({},P),{customKey:`s3-${e}`,icon:r??P.icon,displayName:$localize`${t} (S3)`,description:$localize`Store backups in ${t} storage.`,dynamicFields:[...(P.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(c=>s.some(S=>c.value.endsWith(S))),isMandatory:true,formElement:i=>Z.control(i??"")}],mapper:m$1(l$1({},P.mapper),{to:i=>{let{bucket:c,path:S}=i.custom;return s.some(k=>i.dynamic["s3-server-name"]?.endsWith(k))&&(i.destinationType="s3"),u(i,c,null,S)},default:i=>`s3-${e}://?use-ssl=true`,intercept:i=>s.some(c=>i.searchParams.get("s3-server-name")?.endsWith(c))??false})})}
3
+ export{A,Be as B,G,He as H,Ie as I,Le as L,Ne as N,Re as R,Te as T,We as W,d,f,je as j,xe as x};
@@ -0,0 +1 @@
1
+ import {bZ as e,a_ as ee}from'./main-X6MUEPX4.js';var d=/[a-zA-Z0-9_\-\+\.!@#$%^&*?_~()-]/,m=class n{generate(r,t=d){let a;do a=this.generatePassword(r,t);while(this.calculatePasswordStrength(a)<5);return a}generatePassword(r,t=d){return Array.apply(null,{length:r}).map(()=>{let a;for(;;)if(a=String.fromCharCode(e()),t.test(a))return a},this).join("")}calculatePasswordStrength(r){let t=1;return r.length>=8&&t++,r.match(/[a-z]/)&&r.match(/[A-Z]/)&&t++,r.match(/\d+/)&&t++,r.match(/.[!,@,#,$,%,^,&,*,?,_,~,(,),-]/)&&t++,Math.min(t,5)}static \u0275fac=function(t){return new(t||n)};static \u0275prov=ee({token:n,factory:n.\u0275fac,providedIn:"root"})};function b(n,r,t="conditional"){return a=>{if(!a.parent)return null;let e=null;if(n(a.parent)){let o=Array.isArray(r)?r:[r];for(let l of o){let i=l(a);if(i!==null){e=i;break}}}if(t&&e){let o={};o[t]=e,e=o;}return e}}function g(){return n=>{let r=n.parent;return r&&queueMicrotask(()=>{Object.values(r.controls).forEach(t=>{t!==n&&t.updateValueAndValidity();});}),null}}function y(n,r,t,a="conditional"){return e=>{if(!e.parent)return null;let o=null,l=e.parent.get(n);if(!l)return console.warn("Conditional field not found"),null;if(Array.isArray(r)?r.includes(l.value):l.value===r){let f=Array.isArray(t)?t:[t];for(let A of f){let u=A(e);if(u!==null){o=u;break}}}return o}}export{b,g,m,y};
@@ -0,0 +1 @@
1
+ import {t as te}from'./chunk-Ied7KwvV.js';import'./chunk-CNwmuSlJ.js';import'./chunk-B20GDhu-.js';import'./chunk-2QKZNH3T.js';import'./chunk-CaQaYVo7.js';import'./chunk-B5S2d_Pm.js';import'./chunk-CZu3210D.js';import'./chunk-DF2Ac802.js';import {T,ab as J$1,ax as W,N as Nt,G as Ge,B as w1,a$ as x1,ad as sy,g as gw,a as N,v,_ as _t,d as Ig,Z as Zi,F as Fg,j as jg,W as Wl,w as Hg,l as lT,a1 as pT,b as bE,z as vg,b0 as eb,c as uT,a2 as hT,s as sC,O as qg,R as hC,o as oC,H as HC,aa as Yl,aq as dT}from'./main-X6MUEPX4.js';import'./chunk-C8Zr0vl3.js';import'./chunk-Be4WXTyA.js';import'./chunk-Bfg1Kjif.js';import'./chunk-BxBZMjtQ.js';import'./chunk-qUlwoHQn.js';import'./chunk-Dn7TWCfq.js';import {L}from'./chunk-DM-zhIVI.js';import'./chunk-CUo9Jt8-.js';var w=["logOutput"],K=o=>({state:o});function x(o,t){o&1&&oC(0,3,1);}function q(o,t){o&1&&oC(0,3,2);}function H(o,t){o&1&&oC(0,3,3);}function J(o,t){o&1&&oC(0,3,4);}function X(o,t){if(o&1&&(HC(0),Ig(1,"br")),o&2){let e=t.$implicit;Yl(" ",e," ");}}var z=o=>{if(typeof o!="object"||o===null)return;let t=o;if(typeof t.status=="number")return t.status;let e=t.error;if(typeof e!="object"||e===null)return;let n=e.status;return typeof n=="number"?n:void 0},S=class o{#e=T(J$1);#n=T(W);#i=L(this.#n.params);#s=L(this.#n.queryParams);runId=Nt(()=>this.#i()?.runId);stateId=Nt(()=>this.#s()?.state);offset=Ge(0);status=Ge("starting");messageLog=Ge([]);logOutput=w1.required("logOutput");autoScrollEnabled=Ge(true);scrollToBottomEffect=x1(()=>{if(this.messageLog(),!this.autoScrollEnabled())return;let t=this.logOutput().nativeElement;t.scrollTop=t.scrollHeight;});interval=setInterval(()=>this.#a(),1e3);#a(){sy(()=>this.#e.getApiV1CommandlineByRunid({path:{runid:this.runId()},query:{offset:this.offset(),pagesize:100}})).subscribe({next:t=>{let e=t.Items??[],n=(t.Offset??this.offset())+e.length;this.messageLog.update(s=>[...s,...e]),this.offset.set(n),this.evalStatus(t);},error:t=>this.#o(t)});}evalStatus(t){if(t.Started!==true)return;let e=this.offset()>=(t.Count??this.offset());if(t.Finished===true&&e){this.status.set("finished"),this.#t();return}this.status.set("started");}updateAutoScroll(){let t=this.logOutput().nativeElement,e=t.scrollHeight-t.scrollTop-t.clientHeight;this.autoScrollEnabled.set(e<=2);}abort(){sy(()=>this.#e.postApiV1CommandlineByRunidAbort({path:{runid:this.runId()}})).subscribe({next:()=>{this.status.set("aborted"),this.#t();},error:t=>this.#o(t,"finished")});}#o(t,e){z(t)===404&&(e&&this.status.set(e),this.#t());}#t(){clearInterval(this.interval);}ngOnDestroy(){this.#t();}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=gw({type:o,selectors:[["app-commandline-result"]],viewQuery:function(e,n){e&1&&qg(n.logOutput,w,5),e&2&&hC();},decls:19,vars:7,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let e;e=$localize` Running commandline task... ${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON:Abort${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_BUTTON:`;let n;return n=$localize`${"\uFFFD*11:1\uFFFD"}:START_BLOCK_IF: Starting... ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*12:2\uFFFD"}:START_BLOCK_IF_1: Started! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*13:3\uFFFD"}:START_BLOCK_IF_2: Finished! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*14:4\uFFFD"}:START_BLOCK_IF_3: Aborted! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:`,n=sC(n),[["logOutput",""],t,e,n,[1,"back"],["type","button","shButton","","routerLink","../",1,"small",3,"queryParams"],["type","button","shButton","",1,"small",3,"click"],[1,"status"],[3,"scroll"]]},template:function(e,n){e&1&&(Ig(0,"app-status-bar"),Zi(1,"section")(2,"div",4)(3,"button",5),Fg(4,1),Ig(5,"sh-icon"),jg(),Wl()(),Zi(6,"h3"),Fg(7,2),Zi(8,"button",6),Hg("click",function(){return n.abort()}),Wl(),jg(),Wl(),Zi(9,"div",7),Fg(10,3),lT(11,x,1,0),lT(12,q,1,0),lT(13,H,1,0),lT(14,J,1,0),jg(),Wl(),Zi(15,"code",8,0),Hg("scroll",function(){return n.updateAutoScroll()}),pT(17,X,2,1,null,null,dT),Wl()()),e&2&&(bE(3),vg("queryParams",eb(5,K,n.stateId())),bE(8),uT(n.status()==="starting"?11:-1),bE(),uT(n.status()==="started"?12:-1),bE(),uT(n.status()==="finished"?13:-1),bE(),uT(n.status()==="aborted"?14:-1),bE(3),hT(n.messageLog()));},dependencies:[te,N,v,_t],styles:["[_nghost-%COMP%]{display:block;height:100%;min-height:0;width:100%}section[_ngcontent-%COMP%]{box-sizing:border-box;display:flex;flex-direction:column;height:100%;min-height:0;width:100%;padding:2.5rem;gap:1.25rem}code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);flex:1 1 auto;min-height:0;overflow:auto;white-space:pre}"]})};export{S as default};
@@ -1,2 +1,2 @@
1
- import {E as E1,bb as ce,h as hw,S as aC,Y as cC,f as NC}from'./main-XKLDSNLY.js';var p=["*"],f=(()=>{class a{constructor(){this.color=E1(null),this.variant=E1(null),this.hostClasses=ce("card",{color:this.color,variant:this.variant});}static{this.\u0275fac=function(r){return new(r||a)};}static{this.\u0275cmp=hw({type:a,selectors:[["sh-card"]],hostVars:2,hostBindings:function(r,s){r&2&&NC(s.hostClasses());},inputs:{color:[1,"color"],variant:[1,"variant"]},ngContentSelectors:p,decls:1,vars:0,template:function(r,s){r&1&&(aC(),cC(0));},styles:[`sh-card{--card-bg: var(--base-1);--card-ibg: var(--base-2);--card-bc: var(--base-4);--card-sh: var(--box-shadow-10);--card-p: 1.5rem;--card-shp: .5rem;display:block;padding:var(--card-p);position:relative;z-index:0;border:var(--border-10);border-color:var(--card-bc);box-shadow:var(--card-sh);border-radius:var(--shape-3);overflow:hidden}sh-card:before,sh-card:after{content:"";position:absolute}sh-card:before{background-color:var(--card-bg);inset:0;z-index:-2;border-radius:inherit}sh-card:after{background-color:var(--card-ibg);border-radius:var(--shape-2);inset:var(--card-shp);z-index:-1}sh-card.type-b{--card-bg: var(--base-2);--card-ibg: var(--base-1);--card-sh: none;--card-shp: .25rem}sh-card.type-c{--card-bg: transparent;--card-ibg: var(--card-bg);--card-p: 0}
1
+ import {E as E1,bd as ce,g as gw,S as lC,Y as uC,x as xC}from'./main-X6MUEPX4.js';var p=["*"],f=(()=>{class a{constructor(){this.color=E1(null),this.variant=E1(null),this.hostClasses=ce("card",{color:this.color,variant:this.variant});}static{this.\u0275fac=function(r){return new(r||a)};}static{this.\u0275cmp=gw({type:a,selectors:[["sh-card"]],hostVars:2,hostBindings:function(r,s){r&2&&xC(s.hostClasses());},inputs:{color:[1,"color"],variant:[1,"variant"]},ngContentSelectors:p,decls:1,vars:0,template:function(r,s){r&1&&(lC(),uC(0));},styles:[`sh-card{--card-bg: var(--base-1);--card-ibg: var(--base-2);--card-bc: var(--base-4);--card-sh: var(--box-shadow-10);--card-p: 1.5rem;--card-shp: .5rem;display:block;padding:var(--card-p);position:relative;z-index:0;border:var(--border-10);border-color:var(--card-bc);box-shadow:var(--card-sh);border-radius:var(--shape-3);overflow:hidden}sh-card:before,sh-card:after{content:"";position:absolute}sh-card:before{background-color:var(--card-bg);inset:0;z-index:-2;border-radius:inherit}sh-card:after{background-color:var(--card-ibg);border-radius:var(--shape-2);inset:var(--card-shp);z-index:-1}sh-card.type-b{--card-bg: var(--base-2);--card-ibg: var(--base-1);--card-sh: none;--card-shp: .25rem}sh-card.type-c{--card-bg: transparent;--card-ibg: var(--card-bg);--card-p: 0}
2
2
  `],encapsulation:2});}}return a})();export{f};
@@ -0,0 +1 @@
1
+ import {T,ab as J,G as Ge,N as Nt,Q as Qa,ad as sy,C as Zu,a_ as ee}from'./main-X6MUEPX4.js';var v=[{value:"Disabled",label:$localize`Disabled`},{value:"Verbose",label:$localize`Verbose`},{value:"ExplicitOnly",label:$localize`Explicit only`},{value:"Profiling",label:$localize`Profiling`},{value:"Retry",label:$localize`Retry`},{value:"Information",label:$localize`Information`},{value:"DryRun",label:$localize`Dry run`},{value:"Warning",label:$localize`Warning`},{value:"Error",label:$localize`Error`}],c=class a{#l=T(J);#e=Ge([]);LOG_LEVELS=v;logLevel=Ge("Disabled");logLevelByLabel=Nt(()=>v.find(e=>e.value===this.logLevel())?.label);whenFilter=Ge(null);backupIdFilter=Ge(null);id=Ge(0);logs=Nt(()=>this.whenFilter()&&this.backupIdFilter()?this.#e().filter(e=>e.BackupID===this.backupIdFilter()&&new Date(e.When).getTime()>=this.whenFilter()&&e.BackupID===this.backupIdFilter()):this.#e());timerInterval;logsLoading=Ge(false);isPolling=Ge(false);pagination=Ge({offset:0,pagesize:100});logLevelEffect=Qa(()=>{this.isPolling()?(this.#e.set([]),this.id.set(0),queueMicrotask(()=>this.loadLogs()),this.timerInterval&&clearInterval(this.timerInterval),this.timerInterval=setInterval(()=>{this.loadLogs();},3e3)):this.clearPolling();});setWhenFilter(e){this.whenFilter.set(e);}setBackupIdFilter(e){this.backupIdFilter.set(e);}loadLogs(){this.logsLoading.set(true),sy(()=>this.#l.getApiV1LogdataPoll({query:{id:this.id(),level:this.logLevel(),pagesize:this.pagination().pagesize}})).pipe(Zu(()=>this.logsLoading.set(false))).subscribe({next:e=>{let i=e.reverse(),t=this.#i(i);t>0&&this.id.set(t),this.#e.set([...i,...this.#e()]);}});}updateLogLevel(e){this.logLevel.set(e),e==="Disabled"&&this.clearPolling();}#i(e){return e.reduce((i,t)=>Math.max(i,t.ID),0)}destroy(){this.logLevel.set("Disabled"),this.clearPolling();}clearPolling(){this.timerInterval&&clearInterval(this.timerInterval),this.timerInterval=void 0;}static \u0275fac=function(i){return new(i||a)};static \u0275prov=ee({token:a,factory:a.\u0275fac,providedIn:"root"})};export{c};
@@ -1,2 +1,2 @@
1
- import {T,ae as eo,bu as N,D as w1,bU as B$1,af as D1,bV as re,E as E1,bb as ce,h as hw,S as aC,W as Eg,Y as cC,d as aT,f as NC,C as CE,g as cT,H as Hg,aC as yg,M as qg,R as fC,l as vT,V as Ul,an as Bg,O as Od,k as iC,P as Pd,X as Wl,aq as Tg}from'./main-XKLDSNLY.js';var H=["internalInput"],B=["*"];function K(t,Q){if(t&1){let n=vT();Ul(0,"input",3,0),Bg("change",function(i){Od(n);let l=iC();return Pd(l.onInternalInputChange(i))}),Wl();}if(t&2){let n=iC();Tg("checked",n.checked()),yg("disabled",n.disabled()?"":null);}}var O=(()=>{class t{constructor(){this.#e=T(eo),this.#i=T(N),this.internalInput=w1("internalInput"),this.projectedInputs=B$1("input:not(.internal-input)",{childList:true,attributes:true}),this.checked=D1(false),this.currentClassList=re(),this.color=E1(null),this.variant=E1(null),this.readonly=E1(false),this.disabled=E1(false),this.noInternalInput=E1(false),this.hostClasses=ce("radio",{color:this.color,variant:this.variant,readonly:this.readonly});}#e;#i;onInternalInputChange(n){if(this.disabled())return;let e=n.target;this.checked.set(e.checked);}onKeyDown(n){if(this.#i.matches(n,"radio.select")){let e=this.internalInput()?.nativeElement;e&&getComputedStyle(e).display!=="none"?e.click():this.#e.nativeElement.click(),n.preventDefault();}}static{this.\u0275fac=function(e){return new(e||t)};}static{this.\u0275cmp=hw({type:t,selectors:[["sh-radio"]],viewQuery:function(e,i){e&1&&qg(i.internalInput,H,5),e&2&&fC();},hostVars:6,hostBindings:function(e,i){e&1&&Hg("keydown",function(x){return i.onKeyDown(x)}),e&2&&(yg("disabled",i.disabled()?"":null)("role",i.noInternalInput()?"radio":null)("aria-checked",i.noInternalInput()?i.checked():null)("tabindex",i.noInternalInput()?i.disabled()?"-1":"0":null),NC(i.hostClasses()));},inputs:{checked:[1,"checked"],color:[1,"color"],variant:[1,"variant"],readonly:[1,"readonly"],disabled:[1,"disabled"],noInternalInput:[1,"noInternalInput"]},outputs:{checked:"checkedChange"},ngContentSelectors:B,decls:3,vars:3,consts:[["internalInput",""],[1,"radio","sh-sheet"],["type","radio",1,"internal-input",3,"checked"],["type","radio",1,"internal-input",3,"change","checked"]],template:function(e,i){e&1&&(aC(),Eg(0,"div",1),cC(1),aT(2,K,2,2,"input",2)),e&2&&(NC(i.currentClassList()),CE(2),cT(i.projectedInputs().length===0&&!i.noInternalInput()?2:-1));},styles:[`.sh-radio,sh-radio{--radiod-c: var(--base-8);--radiod-o: 0;--radio-bc: var(--base-4);display:flex;align-items:center;gap:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none;position:relative}.sh-radio:focus-visible>.radio,.sh-radio:has(input:focus-visible)>.radio,sh-radio:focus-visible>.radio,sh-radio:has(input:focus-visible)>.radio{outline:2px solid var(--primary-8);outline-offset:2px}.sh-radio>input,sh-radio>input{appearance:none;position:absolute;inset:0;cursor:pointer}.sh-radio>input:focus,.sh-radio>input:focus-visible,sh-radio>input:focus,sh-radio>input:focus-visible{outline:none}.sh-radio:has(>input:not(.internal-input))>input.internal-input,sh-radio:has(>input:not(.internal-input))>input.internal-input{display:none}.sh-radio:has(input[disabled]),.sh-radio[disabled]:not([disabled=false]),sh-radio:has(input[disabled]),sh-radio[disabled]:not([disabled=false]){opacity:.5;pointer-events:none;-webkit-user-select:none;user-select:none;cursor:initial}.sh-radio:has(input:checked),.sh-radio.active,sh-radio:has(input:checked),sh-radio.active{--radiod-o: 1}.sh-radio .radio,sh-radio .radio{display:flex;align-items:center;justify-content:center;width:1.25rem;height:1.25rem;cursor:pointer;position:relative;border-radius:50%}.sh-radio .radio:after,sh-radio .radio:after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);border-radius:50%;width:.375rem;height:.375rem;background-color:var(--radiod-c);opacity:var(--radiod-o);transition:opacity 125ms linear}.sh-radio.primary,sh-radio.primary{--radiod-c: var(--primary-8)}.sh-radio.accent,sh-radio.accent{--radiod-c: var(--accent-8)}.sh-radio.warn,sh-radio.warn{--radiod-c: var(--warn-8)}.sh-radio.error,sh-radio.error{--radiod-c: var(--error-8)}.sh-radio.success,sh-radio.success{--radiod-c: var(--success-8)}.sh-radio.flat,.sh-radio.raised,sh-radio.flat,sh-radio.raised{--radiod-c: #fff}.sh-radio.raised:not(:has(input:checked)):not(.active) .radio,.sh-radio.flat:not(:has(input:checked)):not(.active) .radio,sh-radio.raised:not(:has(input:checked)):not(.active) .radio,sh-radio.flat:not(:has(input:checked)):not(.active) .radio{background:transparent;border:var(--border-10);border-color:var(--radio-bc)}
1
+ import {T,af as eo,bn as N,B as w1,bN as B$1,ag as D1,bO as re,E as E1,bd as ce,g as gw,S as lC,V as Eg,Y as uC,l as lT,x as xC,b as bE,c as uT,w as Hg,aE as yg,O as qg,R as hC,i as ET,U as ql,ao as Bg,P as Pd,h as aC,L as Ld,X as Gl,ar as Tg}from'./main-X6MUEPX4.js';var H=["internalInput"],B=["*"];function K(t,Q){if(t&1){let n=ET();ql(0,"input",3,0),Bg("change",function(i){Pd(n);let l=aC();return Ld(l.onInternalInputChange(i))}),Gl();}if(t&2){let n=aC();Tg("checked",n.checked()),yg("disabled",n.disabled()?"":null);}}var O=(()=>{class t{constructor(){this.#e=T(eo),this.#i=T(N),this.internalInput=w1("internalInput"),this.projectedInputs=B$1("input:not(.internal-input)",{childList:true,attributes:true}),this.checked=D1(false),this.currentClassList=re(),this.color=E1(null),this.variant=E1(null),this.readonly=E1(false),this.disabled=E1(false),this.noInternalInput=E1(false),this.hostClasses=ce("radio",{color:this.color,variant:this.variant,readonly:this.readonly});}#e;#i;onInternalInputChange(n){if(this.disabled())return;let e=n.target;this.checked.set(e.checked);}onKeyDown(n){if(this.#i.matches(n,"radio.select")){let e=this.internalInput()?.nativeElement;e&&getComputedStyle(e).display!=="none"?e.click():this.#e.nativeElement.click(),n.preventDefault();}}static{this.\u0275fac=function(e){return new(e||t)};}static{this.\u0275cmp=gw({type:t,selectors:[["sh-radio"]],viewQuery:function(e,i){e&1&&qg(i.internalInput,H,5),e&2&&hC();},hostVars:6,hostBindings:function(e,i){e&1&&Hg("keydown",function(x){return i.onKeyDown(x)}),e&2&&(yg("disabled",i.disabled()?"":null)("role",i.noInternalInput()?"radio":null)("aria-checked",i.noInternalInput()?i.checked():null)("tabindex",i.noInternalInput()?i.disabled()?"-1":"0":null),xC(i.hostClasses()));},inputs:{checked:[1,"checked"],color:[1,"color"],variant:[1,"variant"],readonly:[1,"readonly"],disabled:[1,"disabled"],noInternalInput:[1,"noInternalInput"]},outputs:{checked:"checkedChange"},ngContentSelectors:B,decls:3,vars:3,consts:[["internalInput",""],[1,"radio","sh-sheet"],["type","radio",1,"internal-input",3,"checked"],["type","radio",1,"internal-input",3,"change","checked"]],template:function(e,i){e&1&&(lC(),Eg(0,"div",1),uC(1),lT(2,K,2,2,"input",2)),e&2&&(xC(i.currentClassList()),bE(2),uT(i.projectedInputs().length===0&&!i.noInternalInput()?2:-1));},styles:[`.sh-radio,sh-radio{--radiod-c: var(--base-8);--radiod-o: 0;--radio-bc: var(--base-4);display:flex;align-items:center;gap:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none;position:relative}.sh-radio:focus-visible>.radio,.sh-radio:has(input:focus-visible)>.radio,sh-radio:focus-visible>.radio,sh-radio:has(input:focus-visible)>.radio{outline:2px solid var(--primary-8);outline-offset:2px}.sh-radio>input,sh-radio>input{appearance:none;position:absolute;inset:0;cursor:pointer}.sh-radio>input:focus,.sh-radio>input:focus-visible,sh-radio>input:focus,sh-radio>input:focus-visible{outline:none}.sh-radio:has(>input:not(.internal-input))>input.internal-input,sh-radio:has(>input:not(.internal-input))>input.internal-input{display:none}.sh-radio:has(input[disabled]),.sh-radio[disabled]:not([disabled=false]),sh-radio:has(input[disabled]),sh-radio[disabled]:not([disabled=false]){opacity:.5;pointer-events:none;-webkit-user-select:none;user-select:none;cursor:initial}.sh-radio:has(input:checked),.sh-radio.active,sh-radio:has(input:checked),sh-radio.active{--radiod-o: 1}.sh-radio .radio,sh-radio .radio{display:flex;align-items:center;justify-content:center;width:1.25rem;height:1.25rem;cursor:pointer;position:relative;border-radius:50%}.sh-radio .radio:after,sh-radio .radio:after{content:"";position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);border-radius:50%;width:.375rem;height:.375rem;background-color:var(--radiod-c);opacity:var(--radiod-o);transition:opacity 125ms linear}.sh-radio.primary,sh-radio.primary{--radiod-c: var(--primary-8)}.sh-radio.accent,sh-radio.accent{--radiod-c: var(--accent-8)}.sh-radio.warn,sh-radio.warn{--radiod-c: var(--warn-8)}.sh-radio.error,sh-radio.error{--radiod-c: var(--error-8)}.sh-radio.success,sh-radio.success{--radiod-c: var(--success-8)}.sh-radio.flat,.sh-radio.raised,sh-radio.flat,sh-radio.raised{--radiod-c: #fff}.sh-radio.raised:not(:has(input:checked)):not(.active) .radio,.sh-radio.flat:not(:has(input:checked)):not(.active) .radio,sh-radio.raised:not(:has(input:checked)):not(.active) .radio,sh-radio.flat:not(:has(input:checked)):not(.active) .radio{background:transparent;border:var(--border-10);border-color:var(--radio-bc)}
2
2
  `],encapsulation:2});}}return t})();export{O};
@@ -1,3 +1,3 @@
1
- import {c}from'./chunk-D5zSyubd.js';import {E as E1,bb as ce,h as hw,f as NC,T,ae as eo,bu as N,af as D1,ac as I1,N as Nt$1,G as Ge$1,c9 as C1,bY as Wr,D as w1,bv as le,b as me,z as za,bZ as ei,c as N$1,l as vT,S as aC,ak as dm,Q as Qi,p as lm,O as Od,U as UC,P as Pd,H as Hg,Y as cC,d as aT,$ as $l,a1 as dT,al as WC,C as CE,w as cm,y as vg,a3 as KC,L as Kg,g as cT,a2 as fT,M as qg,R as fC,ca as Wg,ap as lT,s as jC,k as iC,aa as Ql,ao as qC,i as Ig,K as im,aC as yg,bi as cg,a$ as JC,b_ as wg,aF as XC}from'./main-XKLDSNLY.js';import {D}from'./chunk-Cv4o9u3S.js';import {o as oe,F as Fe$1}from'./chunk-DqoYKCmi.js';import {U}from'./chunk-BaknLOqq.js';var m=(()=>{class n{constructor(){this.color=E1(null),this.hostClasses=ce("spinner",{color:this.color});}static{this.\u0275fac=function(e){return new(e||n)};}static{this.\u0275cmp=hw({type:n,selectors:[["sh-spinner"]],hostAttrs:["role","status","aria-busy","true"],hostVars:2,hostBindings:function(e,s){e&2&&NC(s.hostClasses());},inputs:{color:[1,"color"]},decls:0,vars:0,template:function(e,s){},styles:[`sh-spinner{--spinner-c: var(--base-8);--spinner-size: 2.5rem;--spinner-thickness: .3125rem;width:var(--spinner-size);height:var(--spinner-size);display:grid;place-content:center;color:var(--spinner-c);position:relative}sh-spinner:before{content:"";width:var(--spinner-size);height:var(--spinner-size);border:var(--spinner-thickness) solid currentColor;border-bottom-color:transparent;border-radius:50%;display:flex;box-sizing:border-box;animation:rotation 1s linear infinite;margin:auto;inset:0;position:absolute}sh-spinner.primary{--spinner-c: var(--primary-8)}sh-spinner.accent{--spinner-c: var(--accent-8)}sh-spinner.warn{--spinner-c: var(--warn-8)}sh-spinner.error{--spinner-c: var(--error-8)}sh-spinner.success{--spinner-c: var(--success-8)}
2
- `],encapsulation:2});}}return n})();var Ve=["optionsWrap"],Ie=[[["label"]],[["","prefix",""]],[["","boxPrefix",""]],[["input"]],[["textarea"]]],we=["label","[prefix]","[boxPrefix]","input","textarea"],Me=["ngProjectAs","label",5,["label"]],Fe=["ngProjectAs","[prefix]",5,["","prefix",""]],Ee=["ngProjectAs","[boxPrefix]",5,["","boxPrefix",""]],Le=()=>({closeOnButton:false,closeOnEsc:false}),Te=(i,l)=>({$implicit:i,last:l}),ie=i=>({$implicit:i});function De(i,l){if(i&1&&jC(0),i&2){let e=iC();Ql(" ",e.spacedSelectedOptions()," ");}}function Ne(i,l){i&1&&wg(0);}function Ae(i,l){if(i&1&&cg(0,Ne,1,0,"ng-container",13),i&2){let e=iC(3),t=e.$implicit,n=e.$index,o=e.$count;iC(2);let s=qC(3);vg("ngTemplateOutlet",s)("ngTemplateOutletContext",XC(2,Te,t,n===o-1));}}function ke(i,l){if(i&1&&jC(0),i&2){let e=iC(3).$implicit,t=iC(2);Ql(" ",t.getLabel(e)," ");}}function $e(i,l){if(i&1){let e=vT();Qi(0,"sh-chip",12),Hg("click",function(n){Od(e);let o=iC(2).$index,s=iC(2);return Pd(s.removeSelectedOptionByIndex(n,o))}),aT(1,Ae,1,5,"ng-container")(2,ke,1,1),Qi(3,"sh-icon"),jC(4,"x-bold"),$l()();}if(i&2){let e=iC(4),t=qC(3);NC(e.selectClasses()),CE(),cT(t?1:2);}}function Re(i,l){i&1&&wg(0);}function Pe(i,l){if(i&1&&cg(0,Re,1,0,"ng-container",13),i&2){let e=iC(4),t=e.$implicit,n=e.$index,o=e.$count;iC(2);let s=qC(3);vg("ngTemplateOutlet",s)("ngTemplateOutletContext",XC(2,Te,t,n===o-1));}}function je(i,l){if(i&1&&jC(0),i&2){let e=iC(4),t=e.$implicit,n=e.$index,o=e.$count,s=iC(2);Ql(" ",n===o-1?s.getLabel(t):s.getLabel(t)+","," ");}}function ze(i,l){if(i&1&&aT(0,Pe,1,5,"ng-container")(1,je,1,1),i&2){iC(5);let e=qC(3);cT(e?0:1);}}function Be(i,l){if(i&1&&aT(0,ze,2,1),i&2){iC(4);let e=qC(6);cT(e?-1:0);}}function Ke(i,l){if(i&1&&aT(0,$e,5,3,"sh-chip",11)(1,Be,1,1),i&2){iC(3);let e=qC(5);cT(e?0:1);}}function We(i,l){if(i&1&&aT(0,Ke,2,1),i&2){let e=l.$implicit;cT(e?0:-1);}}function qe(i,l){if(i&1&&dT(0,We,1,1,null,null,lT),i&2){iC();let e=qC(2);fT(e);}}function Qe(i,l){i&1&&wg(0);}function Ue(i,l){if(i&1&&cg(0,Qe,1,0,"ng-container",14),i&2){iC(2);let e=qC(0);vg("ngTemplateOutlet",e);}}function He(i,l){if(i&1&&jC(0),i&2){let e=iC(2);Ql(" ",e.placeholderText()??""," ");}}function Xe(i,l){if(i&1&&aT(0,Ue,1,1,"ng-container")(1,He,1,1),i&2){iC();let e=qC(0);cT(e?0:1);}}function Ge(i,l){i&1&&(Qi(0,"sh-icon",6),jC(1,"caret-down"),$l());}function Je(i,l){i&1&&Ig(0,"sh-spinner",7);}function Ye(i,l){i&1&&(Qi(0,"sh-icon",6),jC(1,"list-magnifying-glass"),$l());}function Ze(i,l){i&1&&(Qi(0,"sh-icon",6),jC(1,"magnifying-glass"),$l());}function et(i,l){if(i&1){let e=vT();Qi(0,"sh-icon",15),Hg("click",function(n){Od(e);let o=iC();return Pd(o.clear(n))}),jC(1,"x-bold"),$l();}}function tt(i,l){i&1&&(Qi(0,"sh-icon",6),jC(1,"caret-down"),$l());}function it(i,l){i&1&&(Qi(0,"sh-icon",6),jC(1,"caret-up"),$l());}function nt(i,l){if(i&1&&(Qi(0,"p",9),jC(1),$l()),i&2){let e=iC(3);CE(),im(e.freeTextTitle());}}function ot(i,l){i&1&&wg(0);}function st(i,l){if(i&1&&cg(0,ot,1,0,"ng-container",13),i&2){iC(2);let e=qC(0);iC();let t=qC(1);vg("ngTemplateOutlet",t)("ngTemplateOutletContext",JC(2,ie,e));}}function lt(i,l){i&1&&wg(0);}function at(i,l){if(i&1&&cg(0,lt,1,0,"ng-container",13),i&2){iC(2);let e=qC(0);iC();let t=qC(4);vg("ngTemplateOutlet",t)("ngTemplateOutletContext",JC(2,ie,e));}}function rt(i,l){if(i&1&&jC(0),i&2){iC(2);let e=qC(1);Ql(" ",e," ");}}function ct(i,l){i&1&&Ig(0,"sh-divider");}function pt(i,l){if(i&1){let e=vT();aT(0,nt,2,1,"p",9),Qi(1,"li",16),Hg("click",function(){Od(e);let n=iC(2);return Pd(n.toggleOptionByIndex(-1))}),aT(2,st,1,4,"ng-container")(3,at,1,4,"ng-container")(4,rt,1,1),$l(),aT(5,ct,1,0,"sh-divider");}if(i&2){let e=iC(2),t=qC(1),n=qC(4);cT(e.freeTextTitle()?0:-1),CE(),Kg("selected",e.isSelected(-1))("focused",e.focusedOptionIndex()===-1),vg("id",e.getOptionId(-1)),yg("aria-selected",e.isSelected(-1)),CE(),cT(t?2:n?3:4),CE(3),cT(e.freeTextTitle()&&e.filteredOptions().length>0?5:-1);}}function dt(i,l){if(i&1&&(dm(0)(1),aT(2,pt,6,9)),i&2){let e=iC(),t=WC(e.computedFreeTextOption());CE();let n=WC(e.getValue(t));CE(),cT(n.length>0?2:-1);}}function ut(i,l){if(i&1&&(Qi(0,"p",9),jC(1),$l()),i&2){let e=iC();CE(),im(e.optionTitle());}}function ht(i,l){if(i&1&&Ig(0,"sh-checkbox",18),i&2){let e=iC().$index,t=iC();NC(t.selectClasses()),vg("checked",t.isSelected(e));}}function _t(i,l){i&1&&wg(0);}function ft(i,l){if(i&1&&cg(0,_t,1,0,"ng-container",13),i&2){let e=iC().$implicit;iC();let t=qC(4);vg("ngTemplateOutlet",t)("ngTemplateOutletContext",JC(2,ie,e));}}function mt(i,l){if(i&1&&jC(0),i&2){let e=iC().$implicit,t=iC();Ql(" ",t.getLabel(e)," ");}}function xt(i,l){if(i&1){let e=vT();Qi(0,"li",16),Hg("click",function(){let n=Od(e).$index,o=iC();return Pd(o.toggleOptionByIndex(n))}),aT(1,ht,1,3,"sh-checkbox",17),aT(2,ft,1,4,"ng-container")(3,mt,1,1),$l();}if(i&2){let e=l.$index,t=iC(),n=qC(4);Kg("selected",t.isSelected(e))("focused",e===t.focusedOptionIndex()),vg("id",t.getOptionId(e)),yg("aria-selected",t.isSelected(e)),CE(),cT(t.selectMultiple()?1:-1),CE(),cT(n?2:3);}}var Nt=(()=>{class i{constructor(){this.#i=T(eo),this.#n=T(N),this.value=E1(),this.label=E1(),this.asFreeText=E1(false),this.color=E1(null),this.variant=E1(null),this.size=E1(null),this.optionTitle=E1(null),this.freeTextTitle=E1(null),this.freeTextPlaceholder=E1("Type to create a new option"),this.validateFreeText=E1(),this.placeholder=E1(),this.readonly=D1(false),this.disabled=D1(false),this.hostClasses=ce("select",{color:this.color,variant:this.variant,size:this.size,readonly:this.readonly}),this.lazySearch=E1(false),this.inlineSearch=E1(false),this.asText=E1(false),this.isClearable=E1(true),this.selectMultiple=E1(false),this.optionTemplate=E1(null),this.selectedOptionTemplate=E1(null),this.placeholderTemplate=E1(null),this.freeTextOptionTemplate=E1(null),this.isOpen=D1(false),this.isLoading=D1(false),this.options=D1([]),this.selectedOptions=D1([]),this.cleared=I1(),this.onAddNewFreeTextOption=I1(),this.spacedSelectedOptions=Nt$1(()=>{let e=this.selectedOptions(),t=this.value();return e.map(n=>t?this.#e(n,t):n).join(", ")}),this.computedFreeTextOption=Nt$1(()=>{let e=this.inputValue(),t=this.value(),n=t?{}:e;return t&&typeof n=="object"&&(n[t]=e),n}),this.#o=Ge$1(null),this.#t=false,this.inlineTemplate=C1(Wr),this.optionsWrapRef=w1.required("optionsWrap"),this.inputRefInput=Ge$1(null),this.#s=typeof MutationObserver<"u"?new MutationObserver(e=>{for(var t of e)t&&(t.target.nodeName==="INPUT"||t.target.nodeName==="TEXTAREA")&&(this.inputRefInput.set(new eo(t.target)),this.#s.disconnect());}):void 0,this.inputValue=Ge$1(""),this.prevInputValue=Ge$1(null),this.focusedOptionIndex=Ge$1(-1),this._isClearable=Nt$1(()=>this.selectMultiple()||this.isClearable()),this.selectClasses=Nt$1(()=>this.#i.nativeElement.classList.toString()),this.stretch=Nt$1(()=>this.selectClasses().includes("stretch")),this.small=Nt$1(()=>this.selectClasses().includes("small")),this.placeholderText=Nt$1(()=>{let e=this.placeholder(),t=this.inputRefEl();return e||t?.placeholder||null}),this.selectedOptionValues=Nt$1(()=>{let e=this.selectedOptions(),t=this.value();return t?e.map(n=>this.#e(n,t)):e}),this.filteredOptions=Nt$1(()=>{let e=this.options()||[],t=this.label(),n=this.value(),o=this.inlineSearch(),s=this.inputValue().toLowerCase(),c=this.#d(s);if(e.length<=0)return [];if(!o||s==="")return e;let _=e.filter(p=>{let h=t?(this.#e(p,t)??"").toString().toLowerCase():(p??"").toString().toLowerCase(),b=((n?this.#e(p,n):p)??"").toString().toLowerCase(),y=c.test(h),j=c.test(b);return y||j}).map(p=>{let h=t?(this.#e(p,t)??"").toString().toLowerCase():(p??"").toString().toLowerCase(),b=((n?this.#e(p,n):p)??"").toString().toLowerCase(),y=this.#l(h,s),j=this.#l(b,s);return {item:p,score:Math.max(y,j)}});return _.sort((p,h)=>h.score-p.score),_.map(p=>p.item)}),this.componentId=le(),this.inputRefEl=Nt$1(()=>{let e=this.inputRefInput();if(e===null)return;let t=e?e.nativeElement:null;return t?(t.autocomplete="off",t.setAttribute("role","combobox"),t.setAttribute("id",`combobox-${this.componentId}`),t.setAttribute("aria-haspopup","listbox"),t.setAttribute("aria-owns",`optionsWrapId-${this.componentId}`),t.setAttribute("aria-controls",`optionsWrapId-${this.componentId}`),this.#p(t),t.addEventListener("focus",()=>{this.readonly()||this.open();}),t.addEventListener("input",n=>{let o=n.target.value,s=this.inputValue();o!==s&&(this.focusedOptionIndex.set(this.asFreeText()?-1:0),this.inputValue.set(o),this.updateInputElValue());}),t.addEventListener("inputValueChanged",n=>{let o=n.detail.value,s=this.inputValue(),c=me(()=>this.selectedOptions().length);o===s&&(o!==""||c>0)||(this.setSelectedOptionsFromValue(o),this.setInputValueFromOptions(this.selectedOptions()),this.#a());}),t):(console.warn("<sh-select> input element not found are you missing to pass an <input> or <textarea> element to select component?"),null)}),this.focusEffect=za(()=>{let e=this.inputRefEl();if(!e)return;let t=this.focusedOptionIndex();t>=0||t===-1&&this.asFreeText()?e.setAttribute("aria-activedescendant",this.getOptionId(t)):e.removeAttribute("aria-activedescendant");}),this.openAbortController=null,this.isOpenEffect=za(()=>{if(this.isOpen()){this.openAbortController||(this.openAbortController=new AbortController);let t=this.inputRefEl(),o=this.asFreeText()?-1:0;if(!t)return;t.setAttribute("aria-expanded",this.isOpen().toString()),t.addEventListener("keydown",s=>{if((this.#n.matches(s,"select.close")||s.key==="Tab")&&(s.preventDefault(),this.close()),this.#n.matches(s,"select.select")&&(!(s.key===" "||s.key==="Spacebar")||!this.hasSearch())&&(s.preventDefault(),this.isLoading()?this.#t=true:this.toggleOptionByIndex(this.focusedOptionIndex(),void 0,true)),this.#n.matches(s,"select.next")){s.preventDefault();let c=this.focusedOptionIndex()+1;this.focusedOptionIndex.set(c>this.filteredOptions().length-1?o:c);}else if(this.#n.matches(s,"select.prev")){s.preventDefault();let c=this.focusedOptionIndex()-1;this.focusedOptionIndex.set(c<o?this.filteredOptions().length-1:c);}},{signal:this.openAbortController?.signal});}else {let t=this.inputRefEl();if(!t)return;t.setAttribute("aria-expanded",this.isOpen().toString()),this.openAbortController&&(this.openAbortController.abort(),this.openAbortController=null);}}),this.#r=za(()=>{let e=this.isLoading(),t=this.filteredOptions();me(()=>{!e&&this.#t&&(this.#t=false,t.length>0&&this.toggleOptionByIndex(0,void 0,true));});}),this._inputValue="",this.inputValueEffect=za(()=>{let e=this.inputValue();this._inputValue=e;}),this.inputRefElEffect=za(()=>{let e=this.inputRefEl();if(!e)return;let t=me(()=>this.selectedOptions().length);e.value===this._inputValue&&(e.value!==""||t>0)||(this.disabled.set(e.disabled),me(()=>{this.setSelectedOptionsFromValue(e.value),this.setInputValueFromOptions(this.selectedOptions());}));}),this.inputReadonlyEffect=za(()=>{let e=this.inputRefEl();if(!e)return;this.readonly()||!this.hasSearch()?e.setAttribute("readonly","true"):e.removeAttribute("readonly");}),this.selectedLabels=Nt$1(()=>{let e=this.selectedOptions();return this.label()?e.map(n=>this.getLabel(n)).join(", "):e.join(", ")}),this.inputState=Nt$1(()=>(this.selectedOptions().length>0||this.asFreeText()&&this.inputValue().length>0)&&!this.isOpen()?"selected":this.isLoading()?"loading":this.isOpen()&&(this.lazySearch()||this.inlineSearch())?"open-searching":this.isOpen()?"open":this.inlineSearch()||this.lazySearch()?"searching":"closed"),this.hasSearch=Nt$1(()=>this.inlineSearch()||this.lazySearch()),this.#c=za(()=>{if(this.selectMultiple()&&this.hasSearch())return;let e=this.selectedOptions(),t=this.value(),n=e.map(o=>t?this.#e(o,t):o).join(",");this.inputValue.set(n);});}#i;#n;#o;#t;#s;#l(e,t){if(!t)return 0;let n=0,o=-1,s=0,c=true;for(let C=0;C<t.length;C++){let _=t[C];if(e.length>o+1&&e[o+1]===_)n+=C===0?100:150,o++,s++;else {let p=e.indexOf(_,o+1);if(C>0&&(c=false),p===-1)return 0;n+=100,o=p,s++;}}return c&&t.length===s&&(n+=1e3),n+=s*20,n}#r;#c;ngOnInit(){this.setInitInput();}setInitInput(){let e=this.#i.nativeElement.querySelector("input");if(e){this.inputRefInput.set(new eo(e));return}let t=this.#i.nativeElement.querySelector("textarea");if(t){this.inputRefInput.set(new eo(t));return}typeof MutationObserver<"u"&&this.#s.observe(this.#i.nativeElement,{attributes:true,childList:true,subtree:true,characterData:true});}setSelectedOptionsFromValue(e){let t=this.options()||[],n=this.value(),o=this.selectMultiple(),s=e.toString().split(",");if(s.length===0){this.selectedOptions.set([]);return}let c=o?s:[s[0]],C=t.filter(p=>{let h=n?this.#e(p,n)?.toString():p?.toString();return h!=null&&c.includes(h)}),_=C.length>0;this.selectedOptions.set(o?C:_?[C[0]]:[]);}setInputValueFromOptions(e){let t=this.value();if(e.length===0){this.inputValue.set(""),this.updateInputElValue();return}let n=e.map(o=>t?this.#e(o,t):o).join(",");n!==this.inputValue()&&(this.inputValue.set(n),this.updateInputElValue());}getValue(e){let t=this.value();return t?this.#e(e,t):e}getLabel(e){let t=this.label();return t?this.#e(e,t):e}getOptionId(e){return `opt-${this.componentId}-${e}`}toggleOptionByIndex(e,t,n=false){let o=this.filteredOptions()[e];if(this.asFreeText()&&e===-1){let h=this.computedFreeTextOption(),b=this.getValue(h);if(!(this.validateFreeText()??(z=>true))(b))return;this.options.update(z=>z.findIndex(ye=>this.getValue(ye)===b)>-1?z:(this.onAddNewFreeTextOption.emit(b),[h,...z])),e=0,o=h;}else if(!o){this.close();return}t&&t.stopPropagation();let s=this.selectMultiple(),c=this._isClearable(),C=this.value(),_=this.selectedOptionValues(),p=C?this.#e(o,C):o;this.prevInputValue.set(null),this.#o.set(null),this.selectedOptions.update(h=>{let b=_.indexOf(p);if(b>-1){let y=[...h.slice(0,b),...h.slice(b+1)];return c||y.length>0?y:h}else return this.focusedOptionIndex.set(e),s?[...h,o]:[o]}),s?this.inputRefEl()?.focus():this.isOpen.set(false),this.setInputValueFromOptions(this.selectedOptions()),s&&this.hasSearch()&&(this.inputValue.set(""),this.updateInputElValue());}removeSelectedOptionByIndex(e,t){e.stopPropagation(),this.selectedOptions.update(n=>[...n.slice(0,t),...n.slice(t+1)]),this.setInputValueFromOptions(this.selectedOptions());}isSelected(e){let t=this.value(),n=this.filteredOptions()[e],o=t?this.#e(n,t):n;return this.selectedOptionValues().indexOf(o)>-1}open(){this.isOpen()||(this.#t=false,this.isOpen.set(true),this.hasSearch()?(this.prevInputValue.set(this.inputValue()??""),this.inputValue.set(""),this.updateInputElValue()):this.#o.set(this.selectedOptions()),this.selectMultiple()||this.#a());}#a(){let e=this.selectedOptionValues()[0],t=this.value();if(e){let n=this.filteredOptions().findIndex(o=>t?this.#e(o,t)===e:o===e);this.focusedOptionIndex.set(n);}else this.focusedOptionIndex.set(-1);}close(){this.#t=false,this.isOpen.set(false);let e=this.prevInputValue(),t=this.#o();if(this.asFreeText()&&!this.selectMultiple()){this.updateInputElValue();return}this.hasSearch()&&e&&(this.inputValue.set(e),this.setInputValueFromOptions(this.selectedOptions())),!this.hasSearch()&&t!==null&&this.setInputValueFromOptions(t),this.selectMultiple()&&this.setInputValueFromOptions(this.selectedOptions());}clear(e){e?.stopPropagation(),this.#t=false,this.inputValue.set(""),this.selectedOptions.set([]),this.isOpen.set(false),this.prevInputValue.set(null),this.cleared.emit(),this.updateInputElValue();}updateInputElValue(){let e=this.inputRefEl(),t=this.inputValue();!e||e.value===t||(e.value=t,e.dispatchEvent(new Event("input")));}#e(e,t){return t.split(".").reduce((n,o)=>n?.[o],e)}#p(e){Object.defineProperty(e,"value",{configurable:true,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"value").get.call(this)},set(t){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"value").set.call(this,t);let o=new CustomEvent("inputValueChanged",{bubbles:true,cancelable:true,detail:{value:t}});return this.dispatchEvent(o),t}});}#d(e){let t=(e??"").toLowerCase(),n="^";for(let o of t)n+=".*"+this.#u(o);return n+=".*$",new RegExp(n,"i")}#u(e){return e.replace(/[-\/\\^$+?.()|[\]{}]/g,"\\$&")}ngOnDestroy(){this.openAbortController&&(this.openAbortController.abort(),this.openAbortController=null),typeof MutationObserver<"u"&&this.#s.disconnect();}static{this.\u0275fac=function(t){return new(t||i)};}static{this.\u0275cmp=hw({type:i,selectors:[["sh-select"]],contentQueries:function(t,n,o){t&1&&Wg(o,n.inlineTemplate,Wr,5),t&2&&fC();},viewQuery:function(t,n){t&1&&qg(n.optionsWrapRef,Ve,5),t&2&&fC();},hostVars:4,hostBindings:function(t,n){t&2&&(NC(n.hostClasses()),Kg("multiple",n.selectMultiple()));},inputs:{value:[1,"value"],label:[1,"label"],asFreeText:[1,"asFreeText"],color:[1,"color"],variant:[1,"variant"],size:[1,"size"],optionTitle:[1,"optionTitle"],freeTextTitle:[1,"freeTextTitle"],freeTextPlaceholder:[1,"freeTextPlaceholder"],validateFreeText:[1,"validateFreeText"],placeholder:[1,"placeholder"],readonly:[1,"readonly"],disabled:[1,"disabled"],lazySearch:[1,"lazySearch"],inlineSearch:[1,"inlineSearch"],asText:[1,"asText"],isClearable:[1,"isClearable"],selectMultiple:[1,"selectMultiple"],optionTemplate:[1,"optionTemplate"],selectedOptionTemplate:[1,"selectedOptionTemplate"],placeholderTemplate:[1,"placeholderTemplate"],freeTextOptionTemplate:[1,"freeTextOptionTemplate"],isOpen:[1,"isOpen"],isLoading:[1,"isLoading"],options:[1,"options"],selectedOptions:[1,"selectedOptions"]},outputs:{readonly:"readonlyChange",disabled:"disabledChange",isOpen:"isOpenChange",isLoading:"isLoadingChange",options:"optionsChange",selectedOptions:"selectedOptionsChange",cleared:"cleared",onAddNewFreeTextOption:"onAddNewFreeTextOption"},ngContentSelectors:we,decls:33,vars:29,consts:[["formFieldWrapper",""],["optionsWrap",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","options"],["trigger","",3,"click","color","variant","size"],["ngProjectAs","input",5,["input"],1,"input"],[1,"selected-value"],["suffix",""],["suffix","",1,"primary"],["role","listbox",1,"ship-options",3,"id"],["title",""],["role","option",1,"option",3,"id","selected","focused"],[1,"small",3,"class"],[1,"small",3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngTemplateOutlet"],["suffix","",3,"click"],["role","option",1,"option",3,"click","id"],[3,"class","checked"],[3,"checked"]],template:function(t,n){if(t&1){let o=vT();aC(Ie),dm(0)(1)(2)(3)(4)(5)(6),Qi(7,"sh-popover",2,0),lm("isOpenChange",function(c){return Od(o),UC(n.isOpen,c)||(n.isOpen=c),Pd(c)}),Hg("closed",function(){return n.close()}),Qi(9,"sh-form-field",3),Hg("click",function(){return n.open()}),cC(10,0,Me),cC(11,1,Fe),cC(12,2,Ee),Qi(13,"div",4)(14,"div",5),aT(15,De,1,1)(16,qe,2,0)(17,Xe,2,1),cC(18,3),cC(19,4),$l()(),aT(20,Ge,2,0,"sh-icon",6)(21,Je,1,0,"sh-spinner",7)(22,Ye,2,0,"sh-icon",6)(23,Ze,2,0,"sh-icon",6)(24,et,2,0,"sh-icon",6)(25,tt,2,0,"sh-icon",6)(26,it,2,0,"sh-icon",6),$l(),Qi(27,"div",8,1),aT(29,dt,3,3),aT(30,ut,2,1,"p",9),dT(31,xt,4,8,"li",10,lT),$l()();}if(t&2){WC(n.placeholderTemplate());let o=n.optionTemplate();CE(),WC(n.freeTextOptionTemplate());let s=n.selectedOptionTemplate(),c=n.inlineTemplate();CE();let C=WC(n.selectedOptions()),_=n.inputState();CE(),WC(s||o||c),CE(),WC(o||c),CE(),WC(!n.asText()&&n.selectMultiple()),CE();let p=WC(n.isOpen()&&n.hasSearch());CE(),cm("isOpen",n.isOpen),vg("disableOpenByClick",true)("options",KC(28,Le)),CE(2),Kg("stretch",n.stretch())("small",n.small())("readonly",n.readonly()||n.disabled()),vg("color",n.color())("variant",n.variant())("size",n.size()),CE(4),Kg("show-search-text",p),CE(),Kg("is-selected",_==="selected"),CE(),cT(n.asFreeText()&&n.inputValue().length>0&&!n.isOpen()?15:C.length>0?16:p?-1:17),CE(5),cT(_==="closed"?20:_==="loading"?21:_==="open-searching"?22:_==="searching"?23:_==="selected"&&n._isClearable()?24:_==="selected"&&!n._isClearable()?25:26),CE(7),vg("id","optionsWrapId-"+n.componentId),CE(2),cT(n.asFreeText()?29:-1),CE(),cT(n.optionTitle()&&n.filteredOptions().length>0?30:-1),CE(),fT(n.filteredOptions());}},dependencies:[ei,oe,Fe$1,N$1,U,m,D,c],styles:[`sh-select{--miw: 13.125rem;--select-option-mih: min-content;--select-options-mh: 11.25rem;display:flex}sh-select sh-form-field{display:flex;--ff-mw: var(--miw)}sh-select sh-popover{flex:1 0}sh-select sh-popover:has(.ship-options:empty) .popover{opacity:0}sh-select .selected-value{width:100%;display:flex;flex-wrap:wrap;align-items:center;gap:.25rem;color:var(--base-8)}sh-select .selected-value input{margin:0}sh-select .selected-value.is-selected{color:var(--base-12)}sh-select sh-form-field .input-wrap .input{position:relative;display:flex;flex-wrap:wrap;--ff-space: .4375rem .625rem}sh-select sh-form-field .input-wrap .input textarea,sh-select sh-form-field .input-wrap .input input{opacity:0;width:0;height:0;position:absolute}sh-select sh-form-field .input-wrap .input.show-search-text input{opacity:1;height:initial;min-width:min-content;field-sizing:content;font:var(--paragraph-30);position:relative}sh-select sh-form-field .input-wrap .input.show-search-text textarea{opacity:1;height:initial;margin:.25rem 0 0}sh-select sh-form-field.small .input-wrap .input{--ff-space: .3125rem .5rem}sh-select sh-form-field.small .input-wrap .input sh-chip{--chip-h: 1.25rem;font-size:80%}.ship-options{padding:.5rem 0;display:flex;flex-direction:column;max-height:var(--select-options-mh);overflow-y:auto;overflow-x:hidden}.ship-options p[title]{padding:.25rem 1rem}.ship-options sh-divider{margin:.5rem 0}.ship-options .option{display:flex;justify-content:flex-start;align-items:center;min-height:var(--select-option-mih);margin:0 .5rem;padding:.5rem;gap:.5rem;width:calc(100% - 1rem);border-radius:var(--shape-2);appearance:none;background-color:transparent;border:0;cursor:pointer;color:var(--base-12);-webkit-user-select:none;user-select:none}.ship-options .option[disabled]{opacity:.3;cursor:initial}.ship-options .option[disabled]:hover{background-color:transparent}.ship-options .option sh-icon{font-size:1rem}.ship-options .option span.placeholder{color:var(--base-7)}.ship-options .option.active,.ship-options .option:checked,.ship-options .option:hover{background-color:var(--base-2);color:var(--base-12)}.ship-options .option.focused{background-color:var(--primary-1);color:var(--base-12)}.ship-options .option.focused:hover{background-color:var(--primary-2)}
1
+ import {c}from'./chunk-CZu3210D.js';import {E as E1,bd as ce,g as gw,x as xC,T,af as eo,bn as N,ag as D1,ac as I1,N as Nt$1,G as Ge$1,ca as C1,bR as Wr,B as w1,bo as le,m as me,Q as Qa,bS as ei,a as N$1,i as ET,S as lC,al as dm,Z as Zi,n as lm,P as Pd,p as qC,L as Ld,w as Hg,Y as uC,l as lT,W as Wl,a1 as pT,am as GC,b as bE,y as cm,z as vg,a3 as XC,K as Kg,c as uT,a2 as hT,O as qg,R as hC,cb as Wg,aq as dT,H as HC,h as aC,aa as Yl,ap as zC,d as Ig,J as im,aE as yg,b4 as cg,b0 as eb,bT as wg,aH as tb}from'./main-X6MUEPX4.js';import {D}from'./chunk-DF2Ac802.js';import {o as oe,F as Fe$1}from'./chunk-Be4WXTyA.js';import {U}from'./chunk-CUo9Jt8-.js';var m=(()=>{class n{constructor(){this.color=E1(null),this.hostClasses=ce("spinner",{color:this.color});}static{this.\u0275fac=function(e){return new(e||n)};}static{this.\u0275cmp=gw({type:n,selectors:[["sh-spinner"]],hostAttrs:["role","status","aria-busy","true"],hostVars:2,hostBindings:function(e,s){e&2&&xC(s.hostClasses());},inputs:{color:[1,"color"]},decls:0,vars:0,template:function(e,s){},styles:[`sh-spinner{--spinner-c: var(--base-8);--spinner-size: 2.5rem;--spinner-thickness: .3125rem;width:var(--spinner-size);height:var(--spinner-size);display:grid;place-content:center;color:var(--spinner-c);position:relative}sh-spinner:before{content:"";width:var(--spinner-size);height:var(--spinner-size);border:var(--spinner-thickness) solid currentColor;border-bottom-color:transparent;border-radius:50%;display:flex;box-sizing:border-box;animation:rotation 1s linear infinite;margin:auto;inset:0;position:absolute}sh-spinner.primary{--spinner-c: var(--primary-8)}sh-spinner.accent{--spinner-c: var(--accent-8)}sh-spinner.warn{--spinner-c: var(--warn-8)}sh-spinner.error{--spinner-c: var(--error-8)}sh-spinner.success{--spinner-c: var(--success-8)}
2
+ `],encapsulation:2});}}return n})();var Ve=["optionsWrap"],Ie=[[["label"]],[["","prefix",""]],[["","boxPrefix",""]],[["input"]],[["textarea"]]],we=["label","[prefix]","[boxPrefix]","input","textarea"],Me=["ngProjectAs","label",5,["label"]],Fe=["ngProjectAs","[prefix]",5,["","prefix",""]],Ee=["ngProjectAs","[boxPrefix]",5,["","boxPrefix",""]],Le=()=>({closeOnButton:false,closeOnEsc:false}),Te=(i,l)=>({$implicit:i,last:l}),ie=i=>({$implicit:i});function De(i,l){if(i&1&&HC(0),i&2){let e=aC();Yl(" ",e.spacedSelectedOptions()," ");}}function Ne(i,l){i&1&&wg(0);}function Ae(i,l){if(i&1&&cg(0,Ne,1,0,"ng-container",13),i&2){let e=aC(3),t=e.$implicit,n=e.$index,o=e.$count;aC(2);let s=zC(3);vg("ngTemplateOutlet",s)("ngTemplateOutletContext",tb(2,Te,t,n===o-1));}}function ke(i,l){if(i&1&&HC(0),i&2){let e=aC(3).$implicit,t=aC(2);Yl(" ",t.getLabel(e)," ");}}function $e(i,l){if(i&1){let e=ET();Zi(0,"sh-chip",12),Hg("click",function(n){Pd(e);let o=aC(2).$index,s=aC(2);return Ld(s.removeSelectedOptionByIndex(n,o))}),lT(1,Ae,1,5,"ng-container")(2,ke,1,1),Zi(3,"sh-icon"),HC(4,"x-bold"),Wl()();}if(i&2){let e=aC(4),t=zC(3);xC(e.selectClasses()),bE(),uT(t?1:2);}}function Re(i,l){i&1&&wg(0);}function Pe(i,l){if(i&1&&cg(0,Re,1,0,"ng-container",13),i&2){let e=aC(4),t=e.$implicit,n=e.$index,o=e.$count;aC(2);let s=zC(3);vg("ngTemplateOutlet",s)("ngTemplateOutletContext",tb(2,Te,t,n===o-1));}}function je(i,l){if(i&1&&HC(0),i&2){let e=aC(4),t=e.$implicit,n=e.$index,o=e.$count,s=aC(2);Yl(" ",n===o-1?s.getLabel(t):s.getLabel(t)+","," ");}}function ze(i,l){if(i&1&&lT(0,Pe,1,5,"ng-container")(1,je,1,1),i&2){aC(5);let e=zC(3);uT(e?0:1);}}function Be(i,l){if(i&1&&lT(0,ze,2,1),i&2){aC(4);let e=zC(6);uT(e?-1:0);}}function Ke(i,l){if(i&1&&lT(0,$e,5,3,"sh-chip",11)(1,Be,1,1),i&2){aC(3);let e=zC(5);uT(e?0:1);}}function We(i,l){if(i&1&&lT(0,Ke,2,1),i&2){let e=l.$implicit;uT(e?0:-1);}}function qe(i,l){if(i&1&&pT(0,We,1,1,null,null,dT),i&2){aC();let e=zC(2);hT(e);}}function Qe(i,l){i&1&&wg(0);}function Ue(i,l){if(i&1&&cg(0,Qe,1,0,"ng-container",14),i&2){aC(2);let e=zC(0);vg("ngTemplateOutlet",e);}}function He(i,l){if(i&1&&HC(0),i&2){let e=aC(2);Yl(" ",e.placeholderText()??""," ");}}function Xe(i,l){if(i&1&&lT(0,Ue,1,1,"ng-container")(1,He,1,1),i&2){aC();let e=zC(0);uT(e?0:1);}}function Ge(i,l){i&1&&(Zi(0,"sh-icon",6),HC(1,"caret-down"),Wl());}function Je(i,l){i&1&&Ig(0,"sh-spinner",7);}function Ye(i,l){i&1&&(Zi(0,"sh-icon",6),HC(1,"list-magnifying-glass"),Wl());}function Ze(i,l){i&1&&(Zi(0,"sh-icon",6),HC(1,"magnifying-glass"),Wl());}function et(i,l){if(i&1){let e=ET();Zi(0,"sh-icon",15),Hg("click",function(n){Pd(e);let o=aC();return Ld(o.clear(n))}),HC(1,"x-bold"),Wl();}}function tt(i,l){i&1&&(Zi(0,"sh-icon",6),HC(1,"caret-down"),Wl());}function it(i,l){i&1&&(Zi(0,"sh-icon",6),HC(1,"caret-up"),Wl());}function nt(i,l){if(i&1&&(Zi(0,"p",9),HC(1),Wl()),i&2){let e=aC(3);bE(),im(e.freeTextTitle());}}function ot(i,l){i&1&&wg(0);}function st(i,l){if(i&1&&cg(0,ot,1,0,"ng-container",13),i&2){aC(2);let e=zC(0);aC();let t=zC(1);vg("ngTemplateOutlet",t)("ngTemplateOutletContext",eb(2,ie,e));}}function lt(i,l){i&1&&wg(0);}function at(i,l){if(i&1&&cg(0,lt,1,0,"ng-container",13),i&2){aC(2);let e=zC(0);aC();let t=zC(4);vg("ngTemplateOutlet",t)("ngTemplateOutletContext",eb(2,ie,e));}}function rt(i,l){if(i&1&&HC(0),i&2){aC(2);let e=zC(1);Yl(" ",e," ");}}function ct(i,l){i&1&&Ig(0,"sh-divider");}function pt(i,l){if(i&1){let e=ET();lT(0,nt,2,1,"p",9),Zi(1,"li",16),Hg("click",function(){Pd(e);let n=aC(2);return Ld(n.toggleOptionByIndex(-1))}),lT(2,st,1,4,"ng-container")(3,at,1,4,"ng-container")(4,rt,1,1),Wl(),lT(5,ct,1,0,"sh-divider");}if(i&2){let e=aC(2),t=zC(1),n=zC(4);uT(e.freeTextTitle()?0:-1),bE(),Kg("selected",e.isSelected(-1))("focused",e.focusedOptionIndex()===-1),vg("id",e.getOptionId(-1)),yg("aria-selected",e.isSelected(-1)),bE(),uT(t?2:n?3:4),bE(3),uT(e.freeTextTitle()&&e.filteredOptions().length>0?5:-1);}}function dt(i,l){if(i&1&&(dm(0)(1),lT(2,pt,6,9)),i&2){let e=aC(),t=GC(e.computedFreeTextOption());bE();let n=GC(e.getValue(t));bE(),uT(n.length>0?2:-1);}}function ut(i,l){if(i&1&&(Zi(0,"p",9),HC(1),Wl()),i&2){let e=aC();bE(),im(e.optionTitle());}}function ht(i,l){if(i&1&&Ig(0,"sh-checkbox",18),i&2){let e=aC().$index,t=aC();xC(t.selectClasses()),vg("checked",t.isSelected(e));}}function _t(i,l){i&1&&wg(0);}function ft(i,l){if(i&1&&cg(0,_t,1,0,"ng-container",13),i&2){let e=aC().$implicit;aC();let t=zC(4);vg("ngTemplateOutlet",t)("ngTemplateOutletContext",eb(2,ie,e));}}function mt(i,l){if(i&1&&HC(0),i&2){let e=aC().$implicit,t=aC();Yl(" ",t.getLabel(e)," ");}}function xt(i,l){if(i&1){let e=ET();Zi(0,"li",16),Hg("click",function(){let n=Pd(e).$index,o=aC();return Ld(o.toggleOptionByIndex(n))}),lT(1,ht,1,3,"sh-checkbox",17),lT(2,ft,1,4,"ng-container")(3,mt,1,1),Wl();}if(i&2){let e=l.$index,t=aC(),n=zC(4);Kg("selected",t.isSelected(e))("focused",e===t.focusedOptionIndex()),vg("id",t.getOptionId(e)),yg("aria-selected",t.isSelected(e)),bE(),uT(t.selectMultiple()?1:-1),bE(),uT(n?2:3);}}var Nt=(()=>{class i{constructor(){this.#i=T(eo),this.#n=T(N),this.value=E1(),this.label=E1(),this.asFreeText=E1(false),this.color=E1(null),this.variant=E1(null),this.size=E1(null),this.optionTitle=E1(null),this.freeTextTitle=E1(null),this.freeTextPlaceholder=E1("Type to create a new option"),this.validateFreeText=E1(),this.placeholder=E1(),this.readonly=D1(false),this.disabled=D1(false),this.hostClasses=ce("select",{color:this.color,variant:this.variant,size:this.size,readonly:this.readonly}),this.lazySearch=E1(false),this.inlineSearch=E1(false),this.asText=E1(false),this.isClearable=E1(true),this.selectMultiple=E1(false),this.optionTemplate=E1(null),this.selectedOptionTemplate=E1(null),this.placeholderTemplate=E1(null),this.freeTextOptionTemplate=E1(null),this.isOpen=D1(false),this.isLoading=D1(false),this.options=D1([]),this.selectedOptions=D1([]),this.cleared=I1(),this.onAddNewFreeTextOption=I1(),this.spacedSelectedOptions=Nt$1(()=>{let e=this.selectedOptions(),t=this.value();return e.map(n=>t?this.#e(n,t):n).join(", ")}),this.computedFreeTextOption=Nt$1(()=>{let e=this.inputValue(),t=this.value(),n=t?{}:e;return t&&typeof n=="object"&&(n[t]=e),n}),this.#o=Ge$1(null),this.#t=false,this.inlineTemplate=C1(Wr),this.optionsWrapRef=w1.required("optionsWrap"),this.inputRefInput=Ge$1(null),this.#s=typeof MutationObserver<"u"?new MutationObserver(e=>{for(var t of e)t&&(t.target.nodeName==="INPUT"||t.target.nodeName==="TEXTAREA")&&(this.inputRefInput.set(new eo(t.target)),this.#s.disconnect());}):void 0,this.inputValue=Ge$1(""),this.prevInputValue=Ge$1(null),this.focusedOptionIndex=Ge$1(-1),this._isClearable=Nt$1(()=>this.selectMultiple()||this.isClearable()),this.selectClasses=Nt$1(()=>this.#i.nativeElement.classList.toString()),this.stretch=Nt$1(()=>this.selectClasses().includes("stretch")),this.small=Nt$1(()=>this.selectClasses().includes("small")),this.placeholderText=Nt$1(()=>{let e=this.placeholder(),t=this.inputRefEl();return e||t?.placeholder||null}),this.selectedOptionValues=Nt$1(()=>{let e=this.selectedOptions(),t=this.value();return t?e.map(n=>this.#e(n,t)):e}),this.filteredOptions=Nt$1(()=>{let e=this.options()||[],t=this.label(),n=this.value(),o=this.inlineSearch(),s=this.inputValue().toLowerCase(),c=this.#d(s);if(e.length<=0)return [];if(!o||s==="")return e;let _=e.filter(p=>{let h=t?(this.#e(p,t)??"").toString().toLowerCase():(p??"").toString().toLowerCase(),b=((n?this.#e(p,n):p)??"").toString().toLowerCase(),y=c.test(h),j=c.test(b);return y||j}).map(p=>{let h=t?(this.#e(p,t)??"").toString().toLowerCase():(p??"").toString().toLowerCase(),b=((n?this.#e(p,n):p)??"").toString().toLowerCase(),y=this.#l(h,s),j=this.#l(b,s);return {item:p,score:Math.max(y,j)}});return _.sort((p,h)=>h.score-p.score),_.map(p=>p.item)}),this.componentId=le(),this.inputRefEl=Nt$1(()=>{let e=this.inputRefInput();if(e===null)return;let t=e?e.nativeElement:null;return t?(t.autocomplete="off",t.setAttribute("role","combobox"),t.setAttribute("id",`combobox-${this.componentId}`),t.setAttribute("aria-haspopup","listbox"),t.setAttribute("aria-owns",`optionsWrapId-${this.componentId}`),t.setAttribute("aria-controls",`optionsWrapId-${this.componentId}`),this.#p(t),t.addEventListener("focus",()=>{this.readonly()||this.open();}),t.addEventListener("input",n=>{let o=n.target.value,s=this.inputValue();o!==s&&(this.focusedOptionIndex.set(this.asFreeText()?-1:0),this.inputValue.set(o),this.updateInputElValue());}),t.addEventListener("inputValueChanged",n=>{let o=n.detail.value,s=this.inputValue(),c=me(()=>this.selectedOptions().length);o===s&&(o!==""||c>0)||(this.setSelectedOptionsFromValue(o),this.setInputValueFromOptions(this.selectedOptions()),this.#a());}),t):(console.warn("<sh-select> input element not found are you missing to pass an <input> or <textarea> element to select component?"),null)}),this.focusEffect=Qa(()=>{let e=this.inputRefEl();if(!e)return;let t=this.focusedOptionIndex();t>=0||t===-1&&this.asFreeText()?e.setAttribute("aria-activedescendant",this.getOptionId(t)):e.removeAttribute("aria-activedescendant");}),this.openAbortController=null,this.isOpenEffect=Qa(()=>{if(this.isOpen()){this.openAbortController||(this.openAbortController=new AbortController);let t=this.inputRefEl(),o=this.asFreeText()?-1:0;if(!t)return;t.setAttribute("aria-expanded",this.isOpen().toString()),t.addEventListener("keydown",s=>{if((this.#n.matches(s,"select.close")||s.key==="Tab")&&(s.preventDefault(),this.close()),this.#n.matches(s,"select.select")&&(!(s.key===" "||s.key==="Spacebar")||!this.hasSearch())&&(s.preventDefault(),this.isLoading()?this.#t=true:this.toggleOptionByIndex(this.focusedOptionIndex(),void 0,true)),this.#n.matches(s,"select.next")){s.preventDefault();let c=this.focusedOptionIndex()+1;this.focusedOptionIndex.set(c>this.filteredOptions().length-1?o:c);}else if(this.#n.matches(s,"select.prev")){s.preventDefault();let c=this.focusedOptionIndex()-1;this.focusedOptionIndex.set(c<o?this.filteredOptions().length-1:c);}},{signal:this.openAbortController?.signal});}else {let t=this.inputRefEl();if(!t)return;t.setAttribute("aria-expanded",this.isOpen().toString()),this.openAbortController&&(this.openAbortController.abort(),this.openAbortController=null);}}),this.#r=Qa(()=>{let e=this.isLoading(),t=this.filteredOptions();me(()=>{!e&&this.#t&&(this.#t=false,t.length>0&&this.toggleOptionByIndex(0,void 0,true));});}),this._inputValue="",this.inputValueEffect=Qa(()=>{let e=this.inputValue();this._inputValue=e;}),this.inputRefElEffect=Qa(()=>{let e=this.inputRefEl();if(!e)return;let t=me(()=>this.selectedOptions().length);e.value===this._inputValue&&(e.value!==""||t>0)||(this.disabled.set(e.disabled),me(()=>{this.setSelectedOptionsFromValue(e.value),this.setInputValueFromOptions(this.selectedOptions());}));}),this.inputReadonlyEffect=Qa(()=>{let e=this.inputRefEl();if(!e)return;this.readonly()||!this.hasSearch()?e.setAttribute("readonly","true"):e.removeAttribute("readonly");}),this.selectedLabels=Nt$1(()=>{let e=this.selectedOptions();return this.label()?e.map(n=>this.getLabel(n)).join(", "):e.join(", ")}),this.inputState=Nt$1(()=>(this.selectedOptions().length>0||this.asFreeText()&&this.inputValue().length>0)&&!this.isOpen()?"selected":this.isLoading()?"loading":this.isOpen()&&(this.lazySearch()||this.inlineSearch())?"open-searching":this.isOpen()?"open":this.inlineSearch()||this.lazySearch()?"searching":"closed"),this.hasSearch=Nt$1(()=>this.inlineSearch()||this.lazySearch()),this.#c=Qa(()=>{if(this.selectMultiple()&&this.hasSearch())return;let e=this.selectedOptions(),t=this.value(),n=e.map(o=>t?this.#e(o,t):o).join(",");this.inputValue.set(n);});}#i;#n;#o;#t;#s;#l(e,t){if(!t)return 0;let n=0,o=-1,s=0,c=true;for(let C=0;C<t.length;C++){let _=t[C];if(e.length>o+1&&e[o+1]===_)n+=C===0?100:150,o++,s++;else {let p=e.indexOf(_,o+1);if(C>0&&(c=false),p===-1)return 0;n+=100,o=p,s++;}}return c&&t.length===s&&(n+=1e3),n+=s*20,n}#r;#c;ngOnInit(){this.setInitInput();}setInitInput(){let e=this.#i.nativeElement.querySelector("input");if(e){this.inputRefInput.set(new eo(e));return}let t=this.#i.nativeElement.querySelector("textarea");if(t){this.inputRefInput.set(new eo(t));return}typeof MutationObserver<"u"&&this.#s.observe(this.#i.nativeElement,{attributes:true,childList:true,subtree:true,characterData:true});}setSelectedOptionsFromValue(e){let t=this.options()||[],n=this.value(),o=this.selectMultiple(),s=e.toString().split(",");if(s.length===0){this.selectedOptions.set([]);return}let c=o?s:[s[0]],C=t.filter(p=>{let h=n?this.#e(p,n)?.toString():p?.toString();return h!=null&&c.includes(h)}),_=C.length>0;this.selectedOptions.set(o?C:_?[C[0]]:[]);}setInputValueFromOptions(e){let t=this.value();if(e.length===0){this.inputValue.set(""),this.updateInputElValue();return}let n=e.map(o=>t?this.#e(o,t):o).join(",");n!==this.inputValue()&&(this.inputValue.set(n),this.updateInputElValue());}getValue(e){let t=this.value();return t?this.#e(e,t):e}getLabel(e){let t=this.label();return t?this.#e(e,t):e}getOptionId(e){return `opt-${this.componentId}-${e}`}toggleOptionByIndex(e,t,n=false){let o=this.filteredOptions()[e];if(this.asFreeText()&&e===-1){let h=this.computedFreeTextOption(),b=this.getValue(h);if(!(this.validateFreeText()??(z=>true))(b))return;this.options.update(z=>z.findIndex(ye=>this.getValue(ye)===b)>-1?z:(this.onAddNewFreeTextOption.emit(b),[h,...z])),e=0,o=h;}else if(!o){this.close();return}t&&t.stopPropagation();let s=this.selectMultiple(),c=this._isClearable(),C=this.value(),_=this.selectedOptionValues(),p=C?this.#e(o,C):o;this.prevInputValue.set(null),this.#o.set(null),this.selectedOptions.update(h=>{let b=_.indexOf(p);if(b>-1){let y=[...h.slice(0,b),...h.slice(b+1)];return c||y.length>0?y:h}else return this.focusedOptionIndex.set(e),s?[...h,o]:[o]}),s?this.inputRefEl()?.focus():this.isOpen.set(false),this.setInputValueFromOptions(this.selectedOptions()),s&&this.hasSearch()&&(this.inputValue.set(""),this.updateInputElValue());}removeSelectedOptionByIndex(e,t){e.stopPropagation(),this.selectedOptions.update(n=>[...n.slice(0,t),...n.slice(t+1)]),this.setInputValueFromOptions(this.selectedOptions());}isSelected(e){let t=this.value(),n=this.filteredOptions()[e],o=t?this.#e(n,t):n;return this.selectedOptionValues().indexOf(o)>-1}open(){this.isOpen()||(this.#t=false,this.isOpen.set(true),this.hasSearch()?(this.prevInputValue.set(this.inputValue()??""),this.inputValue.set(""),this.updateInputElValue()):this.#o.set(this.selectedOptions()),this.selectMultiple()||this.#a());}#a(){let e=this.selectedOptionValues()[0],t=this.value();if(e){let n=this.filteredOptions().findIndex(o=>t?this.#e(o,t)===e:o===e);this.focusedOptionIndex.set(n);}else this.focusedOptionIndex.set(-1);}close(){this.#t=false,this.isOpen.set(false);let e=this.prevInputValue(),t=this.#o();if(this.asFreeText()&&!this.selectMultiple()){this.updateInputElValue();return}this.hasSearch()&&e&&(this.inputValue.set(e),this.setInputValueFromOptions(this.selectedOptions())),!this.hasSearch()&&t!==null&&this.setInputValueFromOptions(t),this.selectMultiple()&&this.setInputValueFromOptions(this.selectedOptions());}clear(e){e?.stopPropagation(),this.#t=false,this.inputValue.set(""),this.selectedOptions.set([]),this.isOpen.set(false),this.prevInputValue.set(null),this.cleared.emit(),this.updateInputElValue();}updateInputElValue(){let e=this.inputRefEl(),t=this.inputValue();!e||e.value===t||(e.value=t,e.dispatchEvent(new Event("input")));}#e(e,t){return t.split(".").reduce((n,o)=>n?.[o],e)}#p(e){Object.defineProperty(e,"value",{configurable:true,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"value").get.call(this)},set(t){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(e),"value").set.call(this,t);let o=new CustomEvent("inputValueChanged",{bubbles:true,cancelable:true,detail:{value:t}});return this.dispatchEvent(o),t}});}#d(e){let t=(e??"").toLowerCase(),n="^";for(let o of t)n+=".*"+this.#u(o);return n+=".*$",new RegExp(n,"i")}#u(e){return e.replace(/[-\/\\^$+?.()|[\]{}]/g,"\\$&")}ngOnDestroy(){this.openAbortController&&(this.openAbortController.abort(),this.openAbortController=null),typeof MutationObserver<"u"&&this.#s.disconnect();}static{this.\u0275fac=function(t){return new(t||i)};}static{this.\u0275cmp=gw({type:i,selectors:[["sh-select"]],contentQueries:function(t,n,o){t&1&&Wg(o,n.inlineTemplate,Wr,5),t&2&&hC();},viewQuery:function(t,n){t&1&&qg(n.optionsWrapRef,Ve,5),t&2&&hC();},hostVars:4,hostBindings:function(t,n){t&2&&(xC(n.hostClasses()),Kg("multiple",n.selectMultiple()));},inputs:{value:[1,"value"],label:[1,"label"],asFreeText:[1,"asFreeText"],color:[1,"color"],variant:[1,"variant"],size:[1,"size"],optionTitle:[1,"optionTitle"],freeTextTitle:[1,"freeTextTitle"],freeTextPlaceholder:[1,"freeTextPlaceholder"],validateFreeText:[1,"validateFreeText"],placeholder:[1,"placeholder"],readonly:[1,"readonly"],disabled:[1,"disabled"],lazySearch:[1,"lazySearch"],inlineSearch:[1,"inlineSearch"],asText:[1,"asText"],isClearable:[1,"isClearable"],selectMultiple:[1,"selectMultiple"],optionTemplate:[1,"optionTemplate"],selectedOptionTemplate:[1,"selectedOptionTemplate"],placeholderTemplate:[1,"placeholderTemplate"],freeTextOptionTemplate:[1,"freeTextOptionTemplate"],isOpen:[1,"isOpen"],isLoading:[1,"isLoading"],options:[1,"options"],selectedOptions:[1,"selectedOptions"]},outputs:{readonly:"readonlyChange",disabled:"disabledChange",isOpen:"isOpenChange",isLoading:"isLoadingChange",options:"optionsChange",selectedOptions:"selectedOptionsChange",cleared:"cleared",onAddNewFreeTextOption:"onAddNewFreeTextOption"},ngContentSelectors:we,decls:33,vars:29,consts:[["formFieldWrapper",""],["optionsWrap",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","options"],["trigger","",3,"click","color","variant","size"],["ngProjectAs","input",5,["input"],1,"input"],[1,"selected-value"],["suffix",""],["suffix","",1,"primary"],["role","listbox",1,"ship-options",3,"id"],["title",""],["role","option",1,"option",3,"id","selected","focused"],[1,"small",3,"class"],[1,"small",3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngTemplateOutlet"],["suffix","",3,"click"],["role","option",1,"option",3,"click","id"],[3,"class","checked"],[3,"checked"]],template:function(t,n){if(t&1){let o=ET();lC(Ie),dm(0)(1)(2)(3)(4)(5)(6),Zi(7,"sh-popover",2,0),lm("isOpenChange",function(c){return Pd(o),qC(n.isOpen,c)||(n.isOpen=c),Ld(c)}),Hg("closed",function(){return n.close()}),Zi(9,"sh-form-field",3),Hg("click",function(){return n.open()}),uC(10,0,Me),uC(11,1,Fe),uC(12,2,Ee),Zi(13,"div",4)(14,"div",5),lT(15,De,1,1)(16,qe,2,0)(17,Xe,2,1),uC(18,3),uC(19,4),Wl()(),lT(20,Ge,2,0,"sh-icon",6)(21,Je,1,0,"sh-spinner",7)(22,Ye,2,0,"sh-icon",6)(23,Ze,2,0,"sh-icon",6)(24,et,2,0,"sh-icon",6)(25,tt,2,0,"sh-icon",6)(26,it,2,0,"sh-icon",6),Wl(),Zi(27,"div",8,1),lT(29,dt,3,3),lT(30,ut,2,1,"p",9),pT(31,xt,4,8,"li",10,dT),Wl()();}if(t&2){GC(n.placeholderTemplate());let o=n.optionTemplate();bE(),GC(n.freeTextOptionTemplate());let s=n.selectedOptionTemplate(),c=n.inlineTemplate();bE();let C=GC(n.selectedOptions()),_=n.inputState();bE(),GC(s||o||c),bE(),GC(o||c),bE(),GC(!n.asText()&&n.selectMultiple()),bE();let p=GC(n.isOpen()&&n.hasSearch());bE(),cm("isOpen",n.isOpen),vg("disableOpenByClick",true)("options",XC(28,Le)),bE(2),Kg("stretch",n.stretch())("small",n.small())("readonly",n.readonly()||n.disabled()),vg("color",n.color())("variant",n.variant())("size",n.size()),bE(4),Kg("show-search-text",p),bE(),Kg("is-selected",_==="selected"),bE(),uT(n.asFreeText()&&n.inputValue().length>0&&!n.isOpen()?15:C.length>0?16:p?-1:17),bE(5),uT(_==="closed"?20:_==="loading"?21:_==="open-searching"?22:_==="searching"?23:_==="selected"&&n._isClearable()?24:_==="selected"&&!n._isClearable()?25:26),bE(7),vg("id","optionsWrapId-"+n.componentId),bE(2),uT(n.asFreeText()?29:-1),bE(),uT(n.optionTitle()&&n.filteredOptions().length>0?30:-1),bE(),hT(n.filteredOptions());}},dependencies:[ei,oe,Fe$1,N$1,U,m,D,c],styles:[`sh-select{--miw: 13.125rem;--select-option-mih: min-content;--select-options-mh: 11.25rem;display:flex}sh-select sh-form-field{display:flex;--ff-mw: var(--miw)}sh-select sh-popover{flex:1 0}sh-select sh-popover:has(.ship-options:empty) .popover{opacity:0}sh-select .selected-value{width:100%;display:flex;flex-wrap:wrap;align-items:center;gap:.25rem;color:var(--base-8)}sh-select .selected-value input{margin:0}sh-select .selected-value.is-selected{color:var(--base-12)}sh-select sh-form-field .input-wrap .input{position:relative;display:flex;flex-wrap:wrap;--ff-space: .4375rem .625rem}sh-select sh-form-field .input-wrap .input textarea,sh-select sh-form-field .input-wrap .input input{opacity:0;width:0;height:0;position:absolute}sh-select sh-form-field .input-wrap .input.show-search-text input{opacity:1;height:initial;min-width:min-content;field-sizing:content;font:var(--paragraph-30);position:relative}sh-select sh-form-field .input-wrap .input.show-search-text textarea{opacity:1;height:initial;margin:.25rem 0 0}sh-select sh-form-field.small .input-wrap .input{--ff-space: .3125rem .5rem}sh-select sh-form-field.small .input-wrap .input sh-chip{--chip-h: 1.25rem;font-size:80%}.ship-options{padding:.5rem 0;display:flex;flex-direction:column;max-height:var(--select-options-mh);overflow-y:auto;overflow-x:hidden}.ship-options p[title]{padding:.25rem 1rem}.ship-options sh-divider{margin:.5rem 0}.ship-options .option{display:flex;justify-content:flex-start;align-items:center;min-height:var(--select-option-mih);margin:0 .5rem;padding:.5rem;gap:.5rem;width:calc(100% - 1rem);border-radius:var(--shape-2);appearance:none;background-color:transparent;border:0;cursor:pointer;color:var(--base-12);-webkit-user-select:none;user-select:none}.ship-options .option[disabled]{opacity:.3;cursor:initial}.ship-options .option[disabled]:hover{background-color:transparent}.ship-options .option sh-icon{font-size:1rem}.ship-options .option span.placeholder{color:var(--base-7)}.ship-options .option.active,.ship-options .option:checked,.ship-options .option:hover{background-color:var(--base-2);color:var(--base-12)}.ship-options .option.focused{background-color:var(--primary-1);color:var(--base-12)}.ship-options .option.focused:hover{background-color:var(--primary-2)}
3
3
  `],encapsulation:2});}}return i})();export{Nt as N,m};
@@ -0,0 +1 @@
1
+ import {w}from'./chunk-DOUmqK2E.js';import {t as te}from'./chunk-Ied7KwvV.js';import'./chunk-CNwmuSlJ.js';import'./chunk-B20GDhu-.js';import'./chunk-2QKZNH3T.js';import {I}from'./chunk-OpdQrdKp.js';import'./chunk-CaQaYVo7.js';import'./chunk-B5S2d_Pm.js';import {c as c$1}from'./chunk-CZu3210D.js';import {D}from'./chunk-DF2Ac802.js';import {T,ax as W,a5 as m,G as Ge,aI as pt$1,N as Nt$1,g as gw,_ as _t$1,a as N,v,aJ as m$1,aK as c,aL as ci,i as ET,d as Ig,Z as Zi,F as Fg,j as jg,W as Wl,al as dm,l as lT,n as lm,o as oC,b as bE,am as GC,c as uT,y as cm,P as Pd,p as qC,L as Ld,ab as J,E as E1,aM as vb,ad as sy,az as Yu,C as Zu,aN as hi,a1 as pT,a2 as hT,s as sC,H as HC,aO as sb,h as aC,ap as zC,aa as Yl,aP as lb,z as vg,ak as l,aq as dT,w as Hg,J as im,aD as sm,K as Kg,aQ as am,aR as zl,aS as Ql,aT as cb,av as Vg,aw as iC,aU as ub}from'./main-X6MUEPX4.js';import {d}from'./chunk-C8Zr0vl3.js';import'./chunk-Be4WXTyA.js';import'./chunk-Bfg1Kjif.js';import'./chunk-BxBZMjtQ.js';import'./chunk-qUlwoHQn.js';import'./chunk-Dn7TWCfq.js';import {L,$}from'./chunk-DM-zhIVI.js';import'./chunk-CUo9Jt8-.js';function Dn(n,t){n&1&&Ig(0,"sh-progress-bar",58);}function Pn(n,t){n&1&&Ig(0,"div",61);}function Rn(n,t){n&1&&Ig(0,"div",61);}function In(n,t){n&1&&Ig(0,"div",62);}function $n(n,t){n&1&&Ig(0,"div",63);}function Mn(n,t){if(n&1&&(Zi(0,"details",72)(1,"summary"),Fg(2,15),Ig(3,"sh-icon"),Zi(4,"div",74),Ig(5,"sh-icon",66),Wl(),jg(),Wl(),Zi(6,"div",75)(7,"p"),oC(8,16),sb(9,"date"),Wl(),Zi(10,"p"),oC(11,17),sb(12,"date"),Wl(),Zi(13,"p"),oC(14,18),sb(15,"durationFormat"),Wl(),Zi(16,"p"),oC(17,19),Wl(),Ig(18,"sh-divider"),Zi(19,"p"),oC(20,20),Wl(),Zi(21,"p"),oC(22,21),Wl()()(),Zi(23,"details",72)(24,"summary"),Fg(25,22),Ig(26,"sh-icon"),Zi(27,"div",74),Ig(28,"sh-icon",66),Wl(),jg(),Wl(),Zi(29,"div",75)(30,"p"),oC(31,23),sb(32,"date"),Wl(),Zi(33,"p"),oC(34,24),sb(35,"date"),Wl(),Zi(36,"p"),oC(37,25),sb(38,"durationFormat"),Wl(),Ig(39,"sh-divider"),Zi(40,"p"),oC(41,26),sb(42,"bytes"),Wl(),Zi(43,"p"),oC(44,27),sb(45,"bytes"),Wl(),Zi(46,"p"),oC(47,28),sb(48,"bytes"),Wl(),Ig(49,"sh-divider"),Zi(50,"p"),oC(51,29),Wl(),Zi(52,"p"),oC(53,30),Wl()()()),n&2){let e=aC(2).$implicit;bE(9),Vg(lb(9,17,e.data?.TestResults?.BeginTime,"medium")),iC(8),bE(3),Vg(lb(12,20,e.data?.TestResults?.EndTime,"medium")),iC(11),bE(3),Vg(cb(15,23,e.data?.TestResults?.Duration)),iC(14),bE(2),Vg(e.data?.TestResults?.VerificationsActualLength),iC(17),bE(3),Vg(e.data?.TestResults?.WarningsActualLength),iC(20),bE(2),Vg(e.data?.TestResults?.ErrorsActualLength),iC(22),bE(10),Vg(lb(32,25,e.data?.CompactResults?.BeginTime,"medium")),iC(31),bE(3),Vg(lb(35,28,e.data?.CompactResults?.EndTime,"medium")),iC(34),bE(3),Vg(cb(38,31,e.data?.CompactResults?.Duration)),iC(37),bE(4),Vg(e.data?.CompactResults?.DeletedFileCount)(ub(42,33,e.data?.CompactResults?.DeletedFileSize,true,true)),iC(41),bE(3),Vg(e.data?.CompactResults?.DownloadedFileCount)(ub(45,37,e.data?.CompactResults?.DownloadedFileSize,true,true)),iC(44),bE(3),Vg(e.data?.CompactResults?.UploadedFileCount)(ub(48,41,e.data?.CompactResults?.UploadedFileSize,true,true)),iC(47),bE(3),Vg(e.data?.CompactResults?.WarningsActualLength),iC(51),bE(2),Vg(e.data?.CompactResults?.ErrorsActualLength),iC(53);}}function fn(n,t){n&1&&(Zi(0,"p"),HC(1,"No messages"),Wl());}function hn(n,t){n&1&&(Fg(0,43,1),Ig(1,"sh-icon"),jg());}function yn(n,t){n&1&&(Fg(0,43,2),Ig(1,"sh-icon"),jg());}function vn(n,t){if(n&1){let e=ET();Zi(0,"div",76)(1,"code"),HC(2),Wl(),Zi(3,"button",77),Hg("click",function(F){let c=Pd(e).$implicit,L=aC(5);return Ld(L.copyToClipboard(F,c,c))}),Fg(4,43),lT(5,hn,2,0,"sh-icon")(6,yn,2,0,"sh-icon"),jg(),Wl()();}if(n&2){let e=t.$implicit,o=aC(5);bE(2),im(e),bE(3),uT(o.copied()==e?5:6);}}function Bn(n,t){n&1&&(Zi(0,"p"),HC(1,"No warnings"),Wl());}function xn(n,t){n&1&&(Fg(0,44,1),Ig(1,"sh-icon"),jg());}function bn(n,t){n&1&&(Fg(0,44,2),Ig(1,"sh-icon"),jg());}function kn(n,t){if(n&1){let e=ET();Zi(0,"div",76)(1,"code"),HC(2),Wl(),Zi(3,"button",77),Hg("click",function(F){let c=Pd(e).$implicit,L=aC(5);return Ld(L.copyToClipboard(F,c,c))}),Fg(4,44),lT(5,xn,2,0,"sh-icon")(6,bn,2,0,"sh-icon"),jg(),Wl()();}if(n&2){let e=t.$implicit,o=aC(5);bE(2),im(e),bE(3),uT(o.copied()==e?5:6);}}function Kn(n,t){n&1&&(Zi(0,"p"),HC(1,"No errors"),Wl());}function Un(n,t){n&1&&(Fg(0,45,1),Ig(1,"sh-icon"),jg());}function wn(n,t){n&1&&(Fg(0,45,2),Ig(1,"sh-icon"),jg());}function Jn(n,t){if(n&1){let e=ET();Zi(0,"div",76)(1,"code"),HC(2),Wl(),Zi(3,"button",77),Hg("click",function(F){let c=Pd(e).$implicit,L=aC(5);return Ld(L.copyToClipboard(F,c,c))}),Fg(4,45),lT(5,Un,2,0,"sh-icon")(6,wn,2,0,"sh-icon"),jg(),Wl()();}if(n&2){let e=t.$implicit,o=aC(5);bE(2),im(e),bE(3),uT(o.copied()==e?5:6);}}function Xn(n,t){if(n&1&&(Zi(0,"details",72)(1,"summary"),Fg(2,31),Ig(3,"sh-icon"),Zi(4,"div",74),Ig(5,"sh-icon",66),Wl(),jg(),Wl(),Zi(6,"div",75)(7,"p"),oC(8,32),sb(9,"date"),Wl(),Zi(10,"p"),oC(11,33),sb(12,"date"),Wl(),Zi(13,"p"),oC(14,34),sb(15,"durationFormat"),Wl(),Ig(16,"sh-divider"),Zi(17,"p"),oC(18,35),sb(19,"bytes"),Wl(),Zi(20,"p"),oC(21,36),Wl(),Zi(22,"p"),oC(23,37),Wl(),Zi(24,"p"),oC(25,38),Wl(),Zi(26,"p"),oC(27,39),Wl(),Ig(28,"sh-divider"),Zi(29,"details",78)(30,"summary"),Fg(31,40),Ig(32,"sh-icon"),Zi(33,"div",74),Ig(34,"sh-icon",66),Wl(),jg(),Wl(),Zi(35,"div",75),lT(36,fn,2,0,"p"),pT(37,vn,7,2,"div",76,dT),Wl()(),Zi(39,"details",79)(40,"summary"),Fg(41,41),Ig(42,"sh-icon"),Zi(43,"div",74),Ig(44,"sh-icon",66),Wl(),jg(),Wl(),Zi(45,"div",75),lT(46,Bn,2,0,"p"),pT(47,kn,7,2,"div",76,dT),Wl()(),Zi(49,"details",80)(50,"summary"),Fg(51,42),Ig(52,"sh-icon"),Zi(53,"div",74),Ig(54,"sh-icon",66),Wl(),jg(),Wl(),Zi(55,"div",75),lT(56,Kn,2,0,"p"),pT(57,Jn,7,2,"div",76,dT),Wl()(),Ig(59,"sh-divider"),Wl()()),n&2){let e=t.$implicit;bE(5),Vg(e.Destination),iC(2),bE(4),Vg(lb(9,16,e.BeginTime,"medium")),iC(8),bE(3),Vg(lb(12,19,e.EndTime,"medium")),iC(11),bE(3),Vg(cb(15,22,e.Duration)),iC(14),bE(4),Vg(e.CopiedFileCount)(ub(19,24,e.CopiedFileSize,true,true)),iC(18),bE(2),Vg(e.DeletedFileCount),iC(21),bE(2),Vg(e.RenamedFileCount),iC(23),bE(2),Vg(e.VerifiedFileCount),iC(25),bE(2),Vg(e.FailedVerificationCount),iC(27),bE(7),Vg(e.MessagesActualLength),iC(31),bE(2),uT(e.Messages?.length===0?36:-1),bE(),hT(e.Messages),bE(7),Vg(e.WarningsActualLength),iC(41),bE(2),uT(e.Warnings?.length===0?46:-1),bE(),hT(e.Warnings),bE(7),Vg(e.ErrorsActualLength),iC(51),bE(2),uT(e.Errors?.length===0?56:-1),bE(),hT(e.Errors);}}function zn(n,t){if(n&1&&pT(0,Xn,60,28,"details",72,dT),n&2){let e=aC(2).$implicit;hT(e.data?.RemoteSynchronizationResults);}}function Vn(n,t){if(n&1&&(Zi(0,"details",72)(1,"summary"),Fg(2,46),Ig(3,"sh-icon"),Zi(4,"div",74),Ig(5,"sh-icon",66),Wl(),jg(),Wl(),Zi(6,"div",75)(7,"p"),oC(8,47),sb(9,"date"),Wl(),Zi(10,"p"),oC(11,48),sb(12,"date"),Wl(),Zi(13,"p"),oC(14,49),sb(15,"durationFormat"),Wl(),Ig(16,"sh-divider"),Zi(17,"p"),oC(18,50),Wl(),Zi(19,"p"),oC(20,51),Wl(),Zi(21,"p"),oC(22,52),Wl()()()),n&2){let e=aC(2).$implicit;bE(9),Vg(lb(9,6,e.data?.LockResults?.BeginTime,"medium")),iC(8),bE(3),Vg(lb(12,9,e.data?.LockResults?.EndTime,"medium")),iC(11),bE(3),Vg(cb(15,12,e.data?.LockResults?.Duration)),iC(14),bE(3),Vg(e.data?.LockResults?.VolumesRead),iC(18),bE(2),Vg(e.data?.LockResults?.VolumesUpdated),iC(20),bE(2),Vg(e.data?.LockResults?.ParsedResult),iC(22);}}function Hn(n,t){if(n&1&&(Zi(0,"code"),HC(1),sb(2,"json"),Wl()),n&2){let e=t.$implicit;bE(),im(cb(2,1,e));}}function Wn(n,t){if(n&1&&(Zi(0,"details",72)(1,"summary"),Fg(2,53),Ig(3,"sh-icon"),Zi(4,"div",74),Ig(5,"sh-icon",66),Wl(),jg(),Wl(),Zi(6,"div",75),pT(7,Hn,3,3,"code",null,dT),Wl()()),n&2){let e=aC(2).$implicit;bE(5),Vg(e.data.VerificationsActualLength),iC(2),bE(2),hT(e.data.Verifications);}}function jn(n,t){n&1&&(Zi(0,"sh-icon"),HC(1,"check"),Wl());}function qn(n,t){n&1&&(Zi(0,"sh-icon"),HC(1,"copy"),Wl());}function Qn(n,t){n&1&&(zl(0),Fg(1,54),Ig(2,"sh-icon"),jg(),Ql());}function Yn(n,t){n&1&&(zl(0),Fg(1,55),Ig(2,"sh-icon"),jg(),Ql());}function Zn(n,t){n&1&&(zl(0),Fg(1,56),Ig(2,"sh-icon"),jg(),Ql());}function et(n,t){if(n&1){let e=ET();Zi(0,"button",82),Hg("click",function(){Pd(e),aC();let F=zC(0),c=aC(3);return Ld(c.toggleWarningSuppression(F.MessageId))}),lT(1,Qn,3,0,"ng-container")(2,Yn,3,0,"ng-container")(3,Zn,3,0,"ng-container"),Wl();}if(n&2){aC();let e=zC(0),o=aC(3),F=o.isWarningSuppressed(e.MessageId);vg("disabled",o.isSuppressingWarning()),bE(),uT(o.isSuppressingWarning()?1:F?2:3);}}function nt(n,t){if(n&1){let e=ET();dm(0),Zi(1,"div",76)(2,"code"),HC(3),Wl(),Zi(4,"button",77),Hg("click",function(F){let c=Pd(e).$implicit,L=aC(3);return Ld(L.copyToClipboard(F,c,c))}),HC(5," Copy "),lT(6,jn,2,0,"sh-icon")(7,qn,2,0,"sh-icon"),Wl(),lT(8,et,4,2,"button",81),Wl();}if(n&2){let e=t.$implicit,o=aC(3),F=GC(o.parseWarning(e));bE(3),im(e),bE(3),uT(o.copied()==e?6:7),bE(2),uT(F?.MessageId?8:-1);}}function tt(n,t){n&1&&(Zi(0,"p"),HC(1,"No errors"),Wl());}function it(n,t){n&1&&(Fg(0,57,1),Ig(1,"sh-icon"),jg());}function ot(n,t){n&1&&(Fg(0,57,2),Ig(1,"sh-icon"),jg());}function _t(n,t){if(n&1){let e=ET();Zi(0,"div",76)(1,"code"),HC(2),Wl(),Zi(3,"button",77),Hg("click",function(F){let c=Pd(e).$implicit,L=aC(3);return Ld(L.copyToClipboard(F,c,c))}),Fg(4,57),lT(5,it,2,0,"sh-icon")(6,ot,2,0,"sh-icon"),jg(),Wl()();}if(n&2){let e=t.$implicit,o=aC(3);bE(2),im(e),bE(3),uT(o.copied()==e?5:6);}}function at(n,t){n&1&&(Zi(0,"sh-icon"),HC(1,"check"),Wl());}function Ft(n,t){n&1&&(Zi(0,"sh-icon"),HC(1,"copy"),Wl());}function rt(n,t){if(n&1){let e=ET();Zi(0,"section",67)(1,"sh-toggle-card",68),zl(2,69),Zi(3,"h3"),oC(4,0),Wl(),Ql(),zl(5,70),Zi(6,"p"),oC(7,1),sb(8,"date"),Wl(),Zi(9,"p"),oC(10,2),sb(11,"date"),Wl(),Zi(12,"p"),oC(13,3),sb(14,"durationFormat"),Wl(),Ql(),Wl(),Zi(15,"sh-toggle-card",68),zl(16,69),Zi(17,"h3"),oC(18,4),Wl(),Ql(),zl(19,70),Zi(20,"p"),oC(21,5),sb(22,"bytes"),Wl(),Zi(23,"p"),oC(24,6),sb(25,"bytes"),Wl(),Zi(26,"p"),oC(27,7),sb(28,"bytes"),Wl(),Zi(29,"p"),oC(30,8),sb(31,"bytes"),Wl(),Zi(32,"p"),oC(33,9),Wl(),Zi(34,"p"),oC(35,10),Wl(),Zi(36,"p"),oC(37,11),Wl(),Ql(),Wl(),Zi(38,"div",71),Ig(39,"sh-divider"),lT(40,Mn,54,45),lT(41,zn,2,0),lT(42,Vn,23,14,"details",72),lT(43,Wn,9,1,"details",72),Zi(44,"details",73)(45,"summary"),Fg(46,12),Ig(47,"sh-icon"),Zi(48,"div",74),Ig(49,"sh-icon",66),Wl(),jg(),Wl(),Zi(50,"div",75),pT(51,nt,9,4,"div",76,dT),Wl()(),Zi(53,"details",73)(54,"summary"),Fg(55,13),Ig(56,"sh-icon"),Zi(57,"div",74),Ig(58,"sh-icon",66),Wl(),jg(),Wl(),Zi(59,"div",75),lT(60,tt,2,0,"p"),pT(61,_t,7,2,"div",76,dT),Wl()(),Ig(63,"sh-divider"),Zi(64,"details")(65,"summary"),Fg(66,14),Ig(67,"sh-icon"),Zi(68,"div",74),Ig(69,"sh-icon",66),Wl(),jg(),Wl(),Zi(70,"code")(71,"button",77),Hg("click",function(F){Pd(e);let c=aC().$implicit,L=aC();return Ld(L.copyToClipboard(F,L.stringify(c.data),"all"))}),HC(72," Copy "),lT(73,at,2,0,"sh-icon")(74,Ft,2,0,"sh-icon"),Wl(),HC(75),sb(76,"json"),Wl()()()();}if(n&2){let e=aC().$implicit,o=aC();bE(),vg("disableToggle",true),bE(7),Vg(lb(8,27,e.data?.BeginTime,"medium")),iC(7),bE(3),Vg(lb(11,30,e.data?.EndTime,"medium")),iC(10),bE(3),Vg(cb(14,33,e.data?.Duration)),iC(13),bE(),vg("disableToggle",true),bE(7),Vg(e.data?.ExaminedFiles)(ub(22,35,e.data?.SizeOfExaminedFiles,true,true)),iC(21),bE(3),Vg(e.data?.OpenedFiles)(ub(25,39,e.data?.SizeOfOpenedFiles,true,true)),iC(24),bE(3),Vg(e.data?.AddedFiles)(ub(28,43,e.data?.SizeOfAddedFiles,true,true)),iC(27),bE(3),Vg(e.data?.ModifiedFiles)(ub(31,47,e.data?.SizeOfModifiedFiles,true,true)),iC(30),bE(2),Vg(e.data?.DeletedFiles),iC(33),bE(2),Vg(e.data?.TooLargeFiles),iC(35),bE(2),Vg(e.data?.FilesWithError),iC(37),bE(3),uT(e.data?.TestResults?40:-1),bE(),uT(e.data?.RemoteSynchronizationResults?41:-1),bE(),uT(e.data?.LockResults?42:-1),bE(),uT(e.data?.MainOperation==="Test"?43:-1),bE(),vg("open",e.id===o.openEntry()&&o.openSection()==="warnings"),bE(5),Vg(e.data?.WarningsActualLength),iC(46),bE(2),hT(e.data?.Warnings),bE(2),vg("open",e.id===o.openEntry()&&o.openSection()==="errors"),bE(5),Vg(e.data?.ErrorsActualLength),iC(55),bE(2),uT(e.data?.Errors?.length===0?60:-1),bE(),hT(e.data?.Errors),bE(12),uT(o.copied()=="all"?73:74),bE(2),Yl(" ",cb(76,51,e.data)," ");}}function lt(n,t){if(n&1){let e=ET();Zi(0,"article",59)(1,"header",60),Hg("click",function(){let F=Pd(e).$implicit,c=aC();return Ld(c.toggleOpenEntry(F))}),lT(2,Pn,1,0,"div",61)(3,Rn,1,0,"div",61)(4,In,1,0,"div",62)(5,$n,1,0,"div",63),Zi(6,"h3"),HC(7),sb(8,"date"),Wl(),Zi(9,"p"),HC(10),Wl(),Ig(11,"div",64),Zi(12,"div",65)(13,"sh-icon",66),HC(14,"caret-down"),Wl()()(),lT(15,rt,77,53,"section",67),Wl();}if(n&2){let e=t.$implicit,o=aC(),F=e.data?.ParsedResult||"Unknown";bE(2),uT(F=="Fatal"?2:F=="Error"?3:F=="Warning"?4:5),bE(5),im(lb(8,7,e.timestamp,"medium")),bE(3),sm(" ",e.data?.MainOperation," ",o.getLocalizedSummary(e)," "),bE(3),Kg("open",e.id===o.openEntry()),bE(2),uT(e.id===o.openEntry()?15:-1);}}var Pe=class n{#e=T(J);#n=T(m);#t=new m$1;#i=new c;backupId=E1.required();isSuppressingWarning=Ge(false);copied=Ge(null);backupResource=vb({params:()=>({id:this.backupId()}),loader:({params:t})=>this.#e.getApiV1BackupById({path:{id:t.id}})});suppressedWarningIds=Nt$1(()=>{let t=this.backupResource.value();if(!t?.Backup?.Settings)return new Set;let e=t.Backup.Settings.find(o=>o.Name==="--suppress-warnings");return e?.Value?new Set(e.Value.split(",").map(o=>o.trim()).filter(Boolean)):new Set});openEntry=Ge(null);openSection=Ge(null);pagination=Ge({offset:0,pagesize:100});resource=$({params:()=>l({id:this.backupId()},this.pagination()),stream:({params:t})=>sy(()=>this.#e.getApiV1BackupByIdLog({path:{id:t.id},query:{pagesize:100}})).pipe(pt$1(e=>e.map(o=>({id:o.ID,operationId:o.OperationID,timestamp:o.Timestamp*1e3,type:o.Type,data:JSON.parse(o.Message),exception:JSON.stringify(o.Exception)==="{}"?null:o.Exception}))))});getLocalizedSummary(t){let e=t.data?.ErrorsActualLength??0,o=t.data?.WarningsActualLength??0,F=[];if(t.data?.MainOperation=="Backup"){if(t.data?.Duration){let c=this.#i.transform(t.data?.Duration,true);c.startsWith("0h ")&&(c=c.slice(3)),c.startsWith("0m ")&&(c=c.slice(3)),F.push($localize`took ${c}`);}t.data?.BackendStatistics?.BytesUploaded&&F.push($localize`uploaded ${this.#t.transform(t.data?.BackendStatistics?.BytesUploaded)}`),t.data?.BackendStatistics?.KnownFileSize&&F.push($localize`backup size ${this.#t.transform(t.data?.BackendStatistics?.KnownFileSize)}`);}return e!==0&&F.push($localize`:@@errorCount:${e} error${e===1?"":"s"}`),o!==0&&F.push($localize`:@@warningCount:${o} warning${o===1?"":"s"}`),F.length===0?"":`(${F.join(", ")})`}toggleOpenEntry(t){let e=t.id;if(this.openEntry()===e){this.openEntry.set(null),this.openSection.set(null);return}let o=t.data?.ErrorsActualLength??0,F=t.data?.WarningsActualLength??0;o>0?this.openSection.set("errors"):F>0?this.openSection.set("warnings"):this.openSection.set(null),this.openEntry.set(e);}parseWarning(t){let e=t.match(/^(.*?) - \[(.*?)-(.*?)-(.*?)\]: (.*)$/);if(!e)return null;let[,o,F,c,L,G]=e;return {Timestamp:o,LogLevel:F,Source:c,MessageId:L,Message:G}}isWarningSuppressed(t){return this.suppressedWarningIds().has(t)}toggleWarningSuppression(t){let e=this.backupId();!e||!t||(this.isSuppressingWarning.set(true),sy(()=>this.#e.getApiV1BackupById({path:{id:e}})).pipe(Yu(o=>{let F=o.Backup?.Settings??[],c=F.findIndex(N=>N.Name==="--suppress-warnings"),L=this.isWarningSuppressed(t),G="";if(c>=0){let v=(F[c].Value??"").split(",").map(U=>U.trim()).filter(Boolean);L?v=v.filter(U=>U!==t):v.includes(t)||v.push(t),G=v.join(",");}else L||(G=t);let k=F.map(N=>({Name:N.Name,Value:N.Value,Filter:N.Filter}));return c>=0?G===""?k.splice(c,1):k[c]={Name:"--suppress-warnings",Value:G,Filter:null}:G!==""&&k.push({Name:"--suppress-warnings",Value:G,Filter:null}),this.#e.putApiV1BackupById({path:{id:e},body:{Backup:{Name:o.Backup?.Name,Description:o.Backup?.Description,DBPath:o.Backup?.DBPath,Tags:o.Backup?.Tags??[],TargetURL:o.Backup?.TargetURL,ConnectionStringID:o.Backup?.ConnectionStringID,Sources:o.Backup?.Sources??[],Settings:k,Filters:o.Backup?.Filters?.map(N=>({Expression:N.Expression,Include:N.Include,Order:N.Order})),Metadata:o.Backup?.Metadata??{},AdditionalTargetURLs:o.Backup?.AdditionalTargetURLs?.map(N=>({TargetUrl:N.TargetUrl,UrlKey:N.UrlKey,Mode:N.Mode,Interval:N.Interval,ConnectionStringID:N.ConnectionStringID,Options:N.Options}))},Schedule:o.Schedule?{Repeat:o.Schedule.Repeat,Time:o.Schedule.Time,AllowedDays:o.Schedule.AllowedDays}:void 0}})}),Zu(()=>this.isSuppressingWarning.set(false))).subscribe({next:()=>{this.#n.getBackups(true),this.backupResource.reload();},error:o=>{console.error("Failed to toggle warning suppression:",o);}}));}copyToClipboard(t,e,o){t.stopPropagation(),navigator.clipboard.writeText(e),this.copied.set(o),setTimeout(()=>{this.copied.set(null);},2e3);}stringify(t){return JSON.stringify(t,null,2)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=gw({type:n,selectors:[["app-general-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:()=>{let t;t=$localize`Time`;let e;e=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let o;o=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let F;F=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let c;c=$localize`Source files`;let L;L=$localize` Evaluated: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let G;G=$localize` Opened: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let k;k=$localize` Added: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let N;N=$localize` Modified: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let v;v=$localize`Deleted: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let U;U=$localize`Too large: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Q;Q=$localize`Files with error: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let A;A=$localize`${"\uFFFD#47\uFFFD"}:START_TAG_SH_ICON:warning-circle${"[\uFFFD/#47\uFFFD|\uFFFD/#49\uFFFD]"}:CLOSE_TAG_SH_ICON: Warnings ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#48\uFFFD"}:START_TAG_DIV:${"\uFFFD#49\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#47\uFFFD|\uFFFD/#49\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#48\uFFFD"}:CLOSE_TAG_DIV:`,A=sC(A);let te;te=$localize`${"\uFFFD#56\uFFFD"}:START_TAG_SH_ICON:warning${"[\uFFFD/#56\uFFFD|\uFFFD/#58\uFFFD]"}:CLOSE_TAG_SH_ICON: Errors ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#57\uFFFD"}:START_TAG_DIV:${"\uFFFD#58\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#56\uFFFD|\uFFFD/#58\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#57\uFFFD"}:CLOSE_TAG_DIV:`,te=sC(te);let ie;ie=$localize`${"\uFFFD#67\uFFFD"}:START_TAG_SH_ICON:notepad${"[\uFFFD/#67\uFFFD|\uFFFD/#69\uFFFD]"}:CLOSE_TAG_SH_ICON: Complete log ${"\uFFFD#68\uFFFD"}:START_TAG_DIV:${"\uFFFD#69\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#67\uFFFD|\uFFFD/#69\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#68\uFFFD"}:CLOSE_TAG_DIV:`,ie=sC(ie);let oe;oe=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:circle-half-tilt${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON: Test phase ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,oe=sC(oe);let $e;$e=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Me;Me=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let fe;fe=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let he;he=$localize`Verifications: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ye;ye=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ve;ve=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let _e;_e=$localize`${"\uFFFD#26\uFFFD"}:START_TAG_SH_ICON:file-archive${"[\uFFFD/#26\uFFFD|\uFFFD/#28\uFFFD]"}:CLOSE_TAG_SH_ICON: Compact phase ${"\uFFFD#27\uFFFD"}:START_TAG_DIV:${"\uFFFD#28\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#26\uFFFD|\uFFFD/#28\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#27\uFFFD"}:CLOSE_TAG_DIV:`,_e=sC(_e);let Be;Be=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let xe;xe=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let be;be=$localize` Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION: `;let ke;ke=$localize` Deleted files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Ke;Ke=$localize` Downloaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let Ue;Ue=$localize` Uploaded files: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let we;we=$localize`Warnings: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Je;Je=$localize`Errors: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ae;ae=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:arrows-clockwise${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON: Secondary destination: ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,ae=sC(ae);let Xe;Xe=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let ze;ze=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ve;Ve=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let He;He=$localize` Files copied: ${"\uFFFD0\uFFFD"}:INTERPOLATION: (${"\uFFFD1\uFFFD"}:INTERPOLATION_1:) `;let We;We=$localize`Files deleted: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let je;je=$localize`Files renamed: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let qe;qe=$localize`Files verified: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Qe;Qe=$localize`Failed verifications: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Fe;Fe=$localize`${"\uFFFD#32\uFFFD"}:START_TAG_SH_ICON:info${"[\uFFFD/#32\uFFFD|\uFFFD/#34\uFFFD]"}:CLOSE_TAG_SH_ICON: Messages ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#33\uFFFD"}:START_TAG_DIV:${"\uFFFD#34\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#32\uFFFD|\uFFFD/#34\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#33\uFFFD"}:CLOSE_TAG_DIV:`,Fe=sC(Fe);let re;re=$localize`${"\uFFFD#42\uFFFD"}:START_TAG_SH_ICON:warning-circle${"[\uFFFD/#42\uFFFD|\uFFFD/#44\uFFFD]"}:CLOSE_TAG_SH_ICON: Warnings ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#43\uFFFD"}:START_TAG_DIV:${"\uFFFD#44\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#42\uFFFD|\uFFFD/#44\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#43\uFFFD"}:CLOSE_TAG_DIV:`,re=sC(re);let le;le=$localize`${"\uFFFD#52\uFFFD"}:START_TAG_SH_ICON:warning${"[\uFFFD/#52\uFFFD|\uFFFD/#54\uFFFD]"}:CLOSE_TAG_SH_ICON: Errors ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#53\uFFFD"}:START_TAG_DIV:${"\uFFFD#54\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#52\uFFFD|\uFFFD/#54\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#53\uFFFD"}:CLOSE_TAG_DIV:`,le=sC(le);let se;se=$localize` Copy ${"\uFFFD*5:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*5:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*6:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*6:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,se=sC(se);let ce;ce=$localize` Copy ${"\uFFFD*5:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*5:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*6:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*6:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,ce=sC(ce);let ue;ue=$localize` Copy ${"\uFFFD*5:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*5:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*6:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*6:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,ue=sC(ue);let de;de=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:lock${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON: Lock results ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,de=sC(de);let Ye;Ye=$localize`Start: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ze;Ze=$localize`End: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let en;en=$localize`Duration: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let nn;nn=$localize`Volumes read: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let tn;tn=$localize`Volumes updated: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let on;on=$localize`Parsed result: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let Ee;Ee=$localize`${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:warning-circle${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON: Verifications ${"\uFFFD0\uFFFD"}:INTERPOLATION: ${"\uFFFD#4\uFFFD"}:START_TAG_DIV:${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON_1:caret-down${"[\uFFFD/#3\uFFFD|\uFFFD/#5\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/#4\uFFFD"}:CLOSE_TAG_DIV:`,Ee=sC(Ee);let _n;_n=$localize` Updating ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:spinner${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let an;an=$localize` Un-suppress ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:bell${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Fn;Fn=$localize` Suppress ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:bell-slash${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let Ce;return Ce=$localize` Copy ${"\uFFFD*5:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*5:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*6:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON:${"\uFFFD/*6:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,Ce=sC(Ce),[t,e,o,F,c,L,G,k,N,v,U,Q,A,te,ie,oe,$e,Me,fe,he,ye,ve,_e,Be,xe,be,ke,Ke,Ue,we,Je,ae,Xe,ze,Ve,He,We,je,qe,Qe,Fe,re,le,se,ce,ue,de,Ye,Ze,en,nn,tn,on,Ee,_n,an,Fn,Ce,[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"status","error"],[1,"status","warn"],[1,"status"],[1,"spacer"],[1,"action"],[1,"toggle-indicator"],[1,"log-content"],[3,"disableToggle"],["title",""],["content",""],[1,"extra-info"],["name","details"],["name","details",3,"open"],[1,"actions"],[1,"content"],[1,"warning-item"],["shButton","",1,"small",3,"click"],["name","details-messages"],["name","details-warnings"],["name","details-errors"],["shButton","",1,"small",3,"disabled"],["shButton","",1,"small",3,"click","disabled"]]},template:function(e,o){e&1&&(lT(0,Dn,1,0,"sh-progress-bar",58),pT(1,lt,16,10,"article",59,dT)),e&2&&(uT(o.resource.isLoading()?0:-1),bE(),hT(o.resource.value()));},dependencies:[I,c$1,d,v,N,m$1,ci,c,hi],styles:["[_nghost-%COMP%]{display:block}.log-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column;cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:1rem;border-bottom:1px solid var(--base-4);background-color:var(--base-1);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-2)}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-30);margin:0}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.toggle-indicator[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;transition:transform 125ms linear}.toggle-indicator.open[_ngcontent-%COMP%]{transform:rotate(180deg)}details[_ngcontent-%COMP%]{display:flex;flex-direction:column}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;gap:.5rem;padding:.75rem;border-radius:var(--shape-2);background-color:var(--base-2)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:focus{outline:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]:hover{background-color:var(--base-3)}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%]::marker{font-size:0}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;flex:1 0;gap:.5rem;-webkit-user-select:none;user-select:none}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:2rem;transition:transform 125ms linear}details[_ngcontent-%COMP%] summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] sh-icon.toggle-indicator[_ngcontent-%COMP%]{transform:rotate(0)}details[open][_ngcontent-%COMP%] > summary[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%] sh-icon.toggle-indicator[_ngcontent-%COMP%]{transform:rotate(180deg)}details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding:.75rem 1rem 0;display:flex;flex-direction:column;gap:.75rem}details[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0}details[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{margin-top:.75rem;position:relative}details[_ngcontent-%COMP%] code[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{position:absolute;top:.75rem;right:.75rem}.extra-info[_ngcontent-%COMP%]{grid-column:1/-1;display:flex;flex-direction:column;gap:1rem}.extra-info[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;margin-bottom:.75rem}.extra-info[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-2)}.log-content[_ngcontent-%COMP%]{padding:1rem;display:grid;grid-template-columns:1fr 1fr;gap:1rem}.status[_ngcontent-%COMP%]{display:block;width:1rem;height:1rem;background-color:var(--success-8);border-radius:50%}.status.error[_ngcontent-%COMP%]{background-color:var(--error-8)}.status.warn[_ngcontent-%COMP%]{background-color:var(--warn-8)}.warning-item[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:.5rem;padding:.75rem;border-radius:var(--shape-2);background-color:var(--base-2)}.warning-item[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{margin:0;white-space:pre-wrap;word-break:break-word}.warning-item[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{align-self:flex-start;white-space:nowrap}"]})};function st(n,t){n&1&&Ig(0,"sh-progress-bar",1);}function ct(n,t){n&1&&(Fg(0,0,1),Ig(1,"sh-icon"),jg());}function ut(n,t){n&1&&(Fg(0,0,2),Ig(1,"sh-icon"),jg());}function dt(n,t){if(n&1){let e=ET();Zi(0,"section",6)(1,"button",7),Hg("click",function(){Pd(e);let F=aC(),c=F.$implicit,L=F.$index,G=aC();return Ld(G.copyToClipboard(c.data,L))}),Fg(2,0),lT(3,ct,2,0)(4,ut,2,0),jg(),Wl(),Zi(5,"code"),HC(6),sb(7,"json"),Wl()();}if(n&2){let e=aC(),o=e.$implicit,F=e.$index,c=aC();bE(),Kg("success",c.copiedFromIndex()===F),bE(2),uT(c.copiedFromIndex()===F?3:4),bE(3),im(cb(7,4,o.data));}}function Et(n,t){if(n&1){let e=ET();Zi(0,"article",2)(1,"header",3),Hg("click",function(){let F=Pd(e).$implicit,c=aC();return Ld(c.toggleOpenEntry(F.id))}),Zi(2,"h3"),HC(3),sb(4,"date"),Wl(),Zi(5,"div",4)(6,"sh-icon",5),HC(7,"caret-down"),Wl()()(),lT(8,dt,8,6,"section",6),Wl();}if(n&2){let e=t.$implicit,o=aC();bE(3),am("",lb(4,6,e.timestamp,"medium"),": ",e.operation," ",e.path),bE(3),Kg("open",e.id===o.openEntry()),bE(2),uT(e.id===o.openEntry()?8:-1);}}var Re=class n{#e=T(J);backupId=E1.required();openEntry=Ge(null);pagination=Ge({offset:0,pagesize:100});copiedFromIndex=Ge(null);resource=$({params:()=>l({id:this.backupId()},this.pagination()),stream:({params:t})=>sy(()=>this.#e.getApiV1BackupByIdRemotelog({path:{id:t.id},query:{pagesize:100}})).pipe(pt$1(e=>e.map((o,F)=>({id:o.ID,operationId:o.OperationID,timestamp:o.Timestamp*1e3,operation:o.Operation,path:o.Path,data:typeof o.Data=="string"?JSON.parse(o.Data):null}))))});toggleOpenEntry(t){if(this.openEntry()===t){this.openEntry.set(null);return}this.openEntry.set(t);}copyToClipboard(t,e){let o=JSON.stringify(t,null,2);navigator.clipboard.writeText(o),this.copiedFromIndex.set(e),setTimeout(()=>{this.copiedFromIndex.set(null);},3e3);}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=gw({type:n,selectors:[["app-remote-log"]],inputs:{backupId:[1,"backupId"]},decls:3,vars:1,consts:()=>{let t;return t=$localize`${"\uFFFD*3:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copied ${"\uFFFD/*3:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*4:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SH_ICON:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SH_ICON: Copy to clipboard ${"\uFFFD/*4:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,t=sC(t),[t,[1,"indeterminate","primary"],[1,"log-entry"],[3,"click"],[1,"actions"],[1,"toggle-indicator"],[1,"log-content"],["shButton","",1,"small",3,"click"]]},template:function(e,o){e&1&&(lT(0,st,1,0,"sh-progress-bar",1),pT(1,Et,9,9,"article",2,dT)),e&2&&(uT(o.resource.isLoading()?0:-1),bE(),hT(o.resource.value()));},dependencies:[d,N,hi,ci],styles:["[_nghost-%COMP%]{display:block}.log-entry[_ngcontent-%COMP%]{display:flex;flex-direction:column}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:1rem;border-bottom:1px solid var(--base-4);background-color:var(--base-1);cursor:pointer}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%]:hover{background-color:var(--base-2)}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font:var(--paragraph-30);margin:0;-webkit-user-select:none;user-select:none}.log-entry[_ngcontent-%COMP%] header[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.toggle-indicator[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;height:1.25rem;transition:transform 125ms linear}.toggle-indicator.open[_ngcontent-%COMP%]{transform:rotate(180deg)}.log-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem;position:relative}.log-content[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{position:absolute;top:2rem;right:2rem;background:transparent}code[_ngcontent-%COMP%]{white-space:pre-wrap;padding:1rem;display:block;border-radius:var(--shape-2);background-color:var(--base-2)}"]})};function Ct(n,t){if(n&1&&(HC(0," - "),zl(1),oC(2,6),Ql(),HC(3),sb(4,"durationFormat")),n&2){aC(2);let e=zC(6);bE(3),Yl(" ",cb(4,1,e.Backup.Metadata?.LastBackupDuration)," ");}}function pt(n,t){n&1&&(zl(0),oC(1,7),Ql());}function Tt(n,t){if(n&1&&(HC(0),sb(1,"bytes")),n&2){aC(2);let e=zC(6);Yl(" ",cb(1,1,e.Backup.Metadata?.SourceFilesSize)," ");}}function gt(n,t){n&1&&(zl(0),oC(1,8),Ql());}function St(n,t){if(n&1&&(HC(0),sb(1,"bytes")),n&2){aC(2);let e=zC(6);Yl(" ",cb(1,1,e.Backup.Metadata?.TargetFilesSize)," ");}}function Ot(n,t){n&1&&(zl(0),oC(1,9),Ql());}function Lt(n,t){if(n&1&&(Zi(0,"sh-chip",20),oC(1,10),Wl()),n&2){aC(2);let e=zC(6);bE(),Vg(e.Backup.Metadata?.BackupListCount),iC(1);}}function Nt(n,t){n&1&&(Zi(0,"sh-chip",21),oC(1,11),Wl());}function mt(n,t){if(n&1&&(Zi(0,"div",14)(1,"div",19)(2,"h3"),HC(3),Zi(4,"sh-icon"),HC(5,"database"),Wl()(),Zi(6,"p")(7,"span"),oC(8,3),Wl(),HC(9),sb(10,"date"),lT(11,Ct,5,3)(12,pt,2,0,"ng-container"),Wl(),Zi(13,"p")(14,"span"),oC(15,4),Wl(),lT(16,Tt,2,3)(17,gt,2,0,"ng-container"),Wl(),Zi(18,"p")(19,"span"),oC(20,5),Wl(),lT(21,St,2,3)(22,Ot,2,0,"ng-container"),Wl()(),lT(23,Lt,2,1,"sh-chip",20)(24,Nt,2,0,"sh-chip",21),Wl()),n&2){let e=aC(),o=zC(6);bE(3),Yl(" ",o.Backup.Name??e.MISSING_BACKUP_NAME," "),bE(6),Yl(" ",lb(10,6,o.Backup.Metadata?.LastBackupFinished,"short")," "),bE(2),uT(o.Backup.Metadata?.LastBackupDuration?11:12),bE(5),uT(o.Backup.Metadata?.SourceFilesSize?16:17),bE(5),uT(o.Backup.Metadata?.TargetFilesSize?21:22),bE(2),uT(o.Backup.Metadata?.BackupListCount?23:24);}}function Gt(n,t){if(n&1&&Ig(0,"app-general-log",18),n&2){let e=aC();vg("backupId",e.backupId());}}function At(n,t){if(n&1&&Ig(0,"app-remote-log",18),n&2){let e=aC();vg("backupId",e.backupId());}}var Ie=class n{#e=T(W);#n=T(m);MISSING_BACKUP_NAME=$localize`Backup name missing`;activeTab=Ge("general");backupId=L(this.#e.params.pipe(pt$1(t=>t.id)));backup=Nt$1(()=>{let t=this.backupId();return t?this.#n.getBackupById(t):null});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=gw({type:n,selectors:[["app-log"]],decls:15,vars:5,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SH_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SH_ICON: Back `;let e;e=$localize`General`;let o;o=$localize`Destination`;let F;F=$localize`Last successful backup:`;let c;c=$localize`Source:`;let L;L=$localize`Destination:`;let G;G=$localize`took`;let k;k=$localize`N/A`;let N;N=$localize`N/A`;let v;v=$localize`N/A`;let U;U=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION: Version`;let Q;return Q=$localize`No version yet`,[t,e,o,F,c,L,G,k,N,v,U,Q,[1,"back"],["type","button","shButton","","routerLink","/",1,"small"],[1,"backup"],[1,"primary",3,"valueChange","value"],["value","general"],["value","destination"],[3,"backupId"],[1,"text"],[1,"simple","success"],[1,"simple"]]},template:function(e,o){if(e&1){let F=ET();Ig(0,"app-status-bar"),Zi(1,"section")(2,"div",12)(3,"button",13),Fg(4,0),Ig(5,"sh-icon"),jg(),Wl()(),dm(6),lT(7,mt,25,9,"div",14),Zi(8,"sh-tabs",15),lm("valueChange",function(L){return Pd(F),qC(o.activeTab,L)||(o.activeTab=L),Ld(L)}),Zi(9,"button",16),oC(10,1),Wl(),Zi(11,"button",17),oC(12,2),Wl()(),lT(13,Gt,1,1,"app-general-log",18),lT(14,At,1,1,"app-remote-log",18),Wl();}if(e&2){bE(6);let F=GC(o.backup());bE(),uT(F?7:-1),bE(),cm("value",o.activeTab),bE(5),uT(o.activeTab()==="general"?13:-1),bE(),uT(o.activeTab()==="destination"?14:-1);}},dependencies:[w,Pe,Re,_t$1,te,N,v,D,m$1,c,ci],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:1rem 1.5rem;gap:1rem}sh-tabs[_ngcontent-%COMP%]{margin-bottom:1rem}.backup[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:2rem;gap:1rem;border:1px solid var(--base-4);border-radius:var(--shape-3);box-shadow:var(--box-shadow-10)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;max-width:40%}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] h3[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{font:var(--paragraph-30);color:var(--base-8)}.backup[_ngcontent-%COMP%] .text[_ngcontent-%COMP%] p[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--base-12)}"]})};export{Ie as default};
@@ -0,0 +1,2 @@
1
+ import {q,Z}from'./chunk-hTxREuXu.js';import {I as I$1}from'./chunk-OpdQrdKp.js';import {l as le}from'./chunk-Bz49u_nH.js';import {J}from'./chunk-BmOgPfpY.js';import {T as Te}from'./chunk-5q0UK__c.js';import {v as ve$1}from'./chunk-CaQaYVo7.js';import {N as Nt$1}from'./chunk-B5S2d_Pm.js';import {F as Fe}from'./chunk-Be4WXTyA.js';import {B as Bn,Z as Ze$1,e as en,y as yt$1,R as Rn,J as Jt}from'./chunk-Bfg1Kjif.js';import {a as at$1}from'./chunk-BxBZMjtQ.js';import {T,f,ag as D1,E as E1,G as Ge$1,N as Nt,ak as l,aj as m,g as gw,bS as ei,v,a as N,Z as Zi,aR as zl,o as oC,aS as Ql,l as lT,W as Wl,b4 as cg,z as vg,b as bE,c as uT,i as ET,w as Hg,P as Pd,h as aC,L as Ld,F as Fg,d as Ig,j as jg,a1 as pT,aq as dT,a2 as hT,t as bD,a3 as XC,M as MD,H as HC,J as im,al as dm,am as GC,K as Kg,aa as Yl,ap as zC,b_ as gC,b0 as eb,bT as wg,c0 as db}from'./main-X6MUEPX4.js';import'./chunk-1DRz_1dv.js';import'./chunk-Mj9aFt3b.js';import'./chunk-CRhQXQUC.js';import'./chunk-CZu3210D.js';import'./chunk-DF2Ac802.js';import'./chunk-C8Zr0vl3.js';import'./chunk-CUo9Jt8-.js';import'./chunk-DM-zhIVI.js';var Se=[{name:"send-mail-to",type:"Email"},{name:"send-mail-from",type:"Email"},{name:"log-file",type:"FileTree"},{name:"compression-extension-file",type:"FileTree"},{name:"dbpath",type:"FileTree"},{name:"restore-path",type:"FileTree"},{name:"gpg-program-path",type:"FileTree"}];var he=()=>({updateOn:"blur"}),I=t=>({formView:t}),V=t=>({$implicit:t});function we(t,i){if(t&1){let e=ET();Zi(0,"button",15),Hg("click",function(){Pd(e);let n=aC();return Ld(n.showTextArea.set(false))}),Fg(1,6),Ig(2,"sh-icon"),jg(),Wl();}}function Le(t,i){if(t&1){let e=ET();Zi(0,"button",19,1),Hg("click",function(){let n=Pd(e).$implicit,a=aC(3);return Ld(a.addSetting(n))}),Zi(2,"div",20),HC(3),Zi(4,"p"),HC(5),Wl()()();}if(t&2){let e=i.$implicit;Kg("deprecated",e.deprecatedDescription),bE(3),Yl(" ",e.shortDescription," "),bE(2),im(e.name);}}function Ie(t,i){if(t&1&&(Zi(0,"h3",11),HC(1),Wl(),pT(2,Le,6,4,"button",18,dT)),t&2){let e=i.$implicit;bE(),im(e.displayName),bE(),hT(e.options);}}function Ve(t,i){if(t&1){let e=ET();Zi(0,"sh-menu")(1,"button",21)(2,"sh-icon"),HC(3,"dots-three-vertical"),Wl()(),zl(4,17),Zi(5,"button",15),Hg("click",function(){Pd(e);let n=aC(2);return Ld(n.addFreeTextSetting())}),Fg(6,8),Ig(7,"sh-icon"),jg(),Wl(),Zi(8,"button",22),Hg("click",function(){Pd(e);let n=aC(2);return Ld(n.showTextArea.set(true))}),Zi(9,"sh-icon"),HC(10,"link"),Wl(),HC(11," Edit contents as text "),Wl(),Zi(12,"button",15),Hg("click",function(){Pd(e);let n=aC(2);return Ld(n.showOptionNames.set(!n.showOptionNames()))}),Fg(13,9),Ig(14,"sh-icon"),jg(),Wl(),Ql(),Wl();}}function Ne(t,i){if(t&1&&(Zi(0,"sh-menu",16)(1,"button",13),Fg(2,7),Ig(3,"sh-icon"),jg(),Wl(),zl(4,17),pT(5,Ie,4,1,null,null,dT),Ql(),Wl(),lT(7,Ve,15,0,"sh-menu")),t&2){let e=aC();vg("searchable",true),bE(5),hT(e.nonSelectedOptionsGrouped()),bE(2),uT(e.hasFreeTextSettings()?7:-1);}}function be(t,i){if(t&1){let e=ET();Zi(0,"textarea",23),Hg("ngModelChange",function(n){Pd(e);let a=aC();return Ld(a.updateSettingsFromText(n))}),Wl(),bD();}if(t&2){let e=aC();vg("ngModel",e.settingsAsText())("ngModelOptions",XC(2,he)),MD();}}function Ee(t,i){t&1&&(Zi(0,"div",24),HC(1,"Add a setting above to get started."),Wl());}function Me(t,i){t&1&&(Zi(0,"sh-icon",32),HC(1," warning-octagon "),Wl());}function Pe(t,i){if(t&1&&(Zi(0,"span",33),HC(1),Wl()),t&2){let e=aC(2).$implicit;bE(),Yl("--",e.FormView.name);}}function ve(t,i){if(t&1&&HC(0),t&2){let e=aC(2).$implicit;Yl(" ",e.FormView.shortDescription," ");}}function $e(t,i){if(t&1&&(Zi(0,"sh-icon",34),HC(1,"archive"),Wl()),t&2){let e=aC(2).$implicit;vg("shTooltip",e.FormView.deprecatedDescription);}}function Ae(t,i){if(t&1&&(Zi(0,"sh-icon",35),HC(1,"question"),Wl()),t&2){let e=aC(2).$implicit;vg("shTooltip",e.FormView.longDescription);}}function De(t,i){if(t&1&&(lT(0,Me,2,0,"sh-icon",32),Zi(1,"span"),lT(2,Pe,2,1,"span",33)(3,ve,1,1),Wl(),lT(4,$e,2,1,"sh-icon",34)(5,Ae,2,1,"sh-icon",35)),t&2){let e=aC().$implicit,o=zC(1),n=aC(2);uT(o?0:-1),bE(),Kg("deprecated",e.FormView.deprecatedDescription),bE(),uT(n.showOptionNames()?2:3),bE(2),uT(e.FormView.deprecatedDescription?4:e.FormView.longDescription?5:-1);}}function Re(t,i){t&1&&wg(0);}function Ge(t,i){if(t&1){let e=ET();Zi(0,"div",26)(1,"label"),cg(2,Re,1,0,"ng-container",36),Wl(),Zi(3,"div")(4,"sh-form-field")(5,"input",37),Hg("ngModelChange",function(n){Pd(e);let a=aC().$implicit,c=aC(2);return Ld(c.updateFreeTextSettingName(a,n))}),Wl(),bD(),Zi(6,"sh-icon",38),HC(7,"rectangle-dashed"),Wl()()(),Zi(8,"div")(9,"sh-form-field")(10,"input",37),Hg("ngModelChange",function(n){Pd(e);let a=aC().$implicit,c=aC(2);return Ld(c.updateSettingValue(a,n))}),Wl(),bD(),Zi(11,"sh-icon",38),HC(12,"textbox"),Wl()()()();}if(t&2){let e=aC().$implicit,o=gC(3);bE(2),vg("ngTemplateOutlet",o),bE(3),vg("ngModel",e.Name),MD(),bE(5),vg("ngModel",e.Value()),MD();}}function ke(t,i){t&1&&wg(0);}function Be(t,i){if(t&1){let e=ET();Zi(0,"app-file-tree",27)(1,"label",39),cg(2,ke,1,0,"ng-container",36),Wl(),Zi(3,"input",40),Hg("ngModelChange",function(n){Pd(e);let a=aC().$implicit,c=aC(2);return Ld(c.updateSettingValue(a,n))}),Wl(),bD(),Wl();}if(t&2){let e=aC().$implicit,o=gC(3),n=zC(0);vg("startingPath",e.Value())("accepts",e.FormView.accepts)("showFiles",true)("showHiddenNodes",true)("selectFiles",true)("hideShortcuts",false)("resolvePaths",true),bE(),vg("for",n),bE(),vg("ngTemplateOutlet",o),bE(),vg("id",n)("ngModel",e.Value()),MD();}}function ze(t,i){if(t&1){let e=ET();Zi(0,"app-file-tree",28),Ig(1,"label",39),Zi(2,"input",40),Hg("ngModelChange",function(n){Pd(e);let a=aC().$implicit,c=aC(2);return Ld(c.updateSettingValue(a,n))}),Wl(),bD(),Wl();}if(t&2){let e=aC().$implicit,o=zC(0);vg("startingPath",e.Value())("hideShortcuts",false)("resolvePaths",true),bE(),vg("for",o),bE(),vg("id",o)("ngModel",e.Value()),MD();}}function Ue(t,i){t&1&&wg(0);}function Ke(t,i){t&1&&wg(0);}function He(t,i){t&1&&(Zi(0,"sh-icon",38),HC(1,"link"),Wl());}function Je(t,i){t&1&&(Zi(0,"sh-icon",38),HC(1,"hard-drives"),Wl());}function Xe(t,i){t&1&&(Zi(0,"sh-icon",38),HC(1,"jar"),Wl());}function je(t,i){t&1&&(Zi(0,"sh-icon",38),HC(1,"envelope"),Wl());}function qe(t,i){t&1&&(Zi(0,"sh-icon",38),HC(1,"textbox"),Wl());}function Qe(t,i){if(t&1){let e=ET();Zi(0,"sh-form-field")(1,"label",39),cg(2,Ue,1,0,"ng-container",36)(3,Ke,1,0,"ng-container",41),Wl(),Zi(4,"input",42),Hg("ngModelChange",function(n){Pd(e);let a=aC().$implicit,c=aC(2);return Ld(c.updateSettingValue(a,n))}),Wl(),bD(),lT(5,He,2,0,"sh-icon",38)(6,Je,2,0,"sh-icon",38)(7,Xe,2,0,"sh-icon",38)(8,je,2,0,"sh-icon",38)(9,qe,2,0,"sh-icon",38),Wl();}if(t&2){let e=aC().$implicit,o=gC(3),n=zC(0);aC(2);let a=gC(10);bE(),vg("for",n),bE(),vg("ngTemplateOutlet",o),bE(),vg("ngTemplateOutlet",a)("ngTemplateOutletContext",eb(10,V,eb(8,I,e.FormView))),bE(),vg("type",e.FormView.type==="Email"?"email":"text")("id",n)("ngModel",e.Value()),MD(),bE(),uT(e.FormView.type==="Path"?5:e.FormView.type==="Hostname"?6:e.FormView.type==="Bucketname"?7:e.FormView.type==="Email"?8:9);}}function We(t,i){t&1&&wg(0);}function Ye(t,i){t&1&&wg(0);}function Ze(t,i){if(t&1){let e=ET();Zi(0,"sh-icon",45),Hg("click",function(){Pd(e);let n=aC(2).$implicit;return Ld(n.showPassword=!n.showPassword)}),HC(1," eye "),Wl();}}function et(t,i){if(t&1){let e=ET();Zi(0,"sh-icon",45),Hg("click",function(){Pd(e);let n=aC(2).$implicit;return Ld(n.showPassword=!n.showPassword)}),HC(1," eye-slash "),Wl();}}function tt(t,i){if(t&1){let e=ET();Zi(0,"sh-form-field")(1,"label",39),cg(2,We,1,0,"ng-container",36)(3,Ye,1,0,"ng-container",41),Wl(),Zi(4,"input",43),Hg("ngModelChange",function(n){Pd(e);let a=aC().$implicit,c=aC(2);return Ld(c.updateSettingValue(a,n))}),Wl(),bD(),Zi(5,"sh-icon",38),HC(6,"password"),Wl(),lT(7,Ze,2,0,"sh-icon",44)(8,et,2,0,"sh-icon",44),Wl();}if(t&2){let e=aC().$implicit,o=gC(3),n=zC(0);aC(2);let a=gC(10);bE(),vg("for",n),bE(),vg("ngTemplateOutlet",o),bE(),vg("ngTemplateOutlet",a)("ngTemplateOutletContext",eb(10,V,eb(8,I,e.FormView))),bE(),vg("type",e.showPassword?"text":"password")("id",n)("ngModel",e.Value()),MD(),bE(3),uT(e.showPassword?7:8);}}function nt(t,i){t&1&&wg(0);}function it(t,i){t&1&&wg(0);}function ot(t,i){if(t&1&&HC(0),t&2){let e=i.$implicit;Yl(" ",e," ");}}function at(t,i){if(t&1){let e=ET();Zi(0,"sh-select",46)(1,"label",39),cg(2,nt,1,0,"ng-container",36)(3,it,1,0,"ng-container",41),Wl(),Zi(4,"input",40),Hg("ngModelChange",function(n){Pd(e);let a=aC().$implicit,c=aC(2);return Ld(c.updateSettingValue(a,n))}),Wl(),bD(),Wl(),cg(5,ot,1,1,"ng-template",null,3,db);}if(t&2){let e=gC(6),o=aC().$implicit,n=gC(3),a=zC(0);aC(2);let c=gC(10);vg("options",o.FormView.options)("isClearable",false)("optionTemplate",e),bE(),vg("for",a),bE(),vg("ngTemplateOutlet",n),bE(),vg("ngTemplateOutlet",c)("ngTemplateOutletContext",eb(11,V,eb(9,I,o.FormView))),bE(),vg("id",a)("ngModel",o.Value()),MD();}}function rt(t,i){t&1&&wg(0);}function lt(t,i){t&1&&wg(0);}function _t(t,i){if(t&1){let e=ET();Zi(0,"app-size",47),Hg("ngModelChange",function(n){Pd(e);let a=aC().$implicit,c=aC(2);return Ld(c.updateSettingValue(a,n))}),Zi(1,"label",39),cg(2,rt,1,0,"ng-container",36)(3,lt,1,0,"ng-container",41),Wl()(),bD();}if(t&2){let e=aC().$implicit,o=gC(3),n=zC(0);aC(2);let a=gC(10);vg("inputType",e.Name)("ngModel",e.Value())("customId",n),MD(),bE(),vg("for",n),bE(),vg("ngTemplateOutlet",o),bE(),vg("ngTemplateOutlet",a)("ngTemplateOutletContext",eb(9,V,eb(7,I,e.FormView)));}}function st(t,i){t&1&&wg(0);}function pt(t,i){t&1&&wg(0);}function ct(t,i){if(t&1){let e=ET();Zi(0,"sh-form-field")(1,"label",39),cg(2,st,1,0,"ng-container",36)(3,pt,1,0,"ng-container",41),Wl(),Zi(4,"input",48),Hg("ngModelChange",function(n){Pd(e);let a=aC().$implicit,c=aC(2);return Ld(c.updateSettingValue(a,n))}),Wl(),bD(),Zi(5,"sh-icon",38),HC(6,"numpad"),Wl()();}if(t&2){let e=aC().$implicit,o=gC(3),n=zC(0);aC(2);let a=gC(10);bE(),vg("for",n),bE(),vg("ngTemplateOutlet",o),bE(),vg("ngTemplateOutlet",a)("ngTemplateOutletContext",eb(8,V,eb(6,I,e.FormView))),bE(),vg("id",n)("ngModel",e.Value()),MD();}}function mt(t,i){t&1&&wg(0);}function dt(t,i){t&1&&wg(0);}function ut(t,i){if(t&1){let e=ET();Zi(0,"sh-toggle",30)(1,"label",39),cg(2,mt,1,0,"ng-container",36)(3,dt,1,0,"ng-container",41),Wl(),Zi(4,"input",49),Hg("ngModelChange",function(n){Pd(e);let a=aC().$implicit,c=aC(2);return Ld(c.updateSettingValue(a,n))}),Wl(),bD(),Wl();}if(t&2){let e=aC().$implicit,o=gC(3),n=zC(0);aC(2);let a=gC(10);bE(),vg("for",n),bE(),vg("ngTemplateOutlet",o),bE(),vg("ngTemplateOutlet",a)("ngTemplateOutletContext",eb(8,V,eb(6,I,e.FormView))),bE(),vg("id",n)("ngModel",e.Value()),MD();}}function Ct(t,i){t&1&&wg(0);}function gt(t,i){t&1&&wg(0);}function ft(t,i){if(t&1&&HC(0),t&2){let e=i.$implicit;Yl(" ",e," ");}}function yt(t,i){if(t&1){let e=ET();Zi(0,"sh-select",50)(1,"label",39),cg(2,Ct,1,0,"ng-container",36)(3,gt,1,0,"ng-container",41),Wl(),Zi(4,"input",51),Hg("ngModelChange",function(n){Pd(e);let a=aC().$implicit,c=aC(2);return Ld(c.updateSettingValue(a,n))}),Wl(),bD(),Wl(),cg(5,ft,1,1,"ng-template",null,4,db);}if(t&2){let e=gC(6),o=aC().$implicit,n=gC(3),a=zC(0);aC(2);let c=gC(10);vg("options",o.FormView.options)("selectMultiple",true)("optionTemplate",e),bE(),vg("for",a),bE(),vg("ngTemplateOutlet",n),bE(),vg("ngTemplateOutlet",c)("ngTemplateOutletContext",eb(10,V,eb(8,I,o.FormView))),bE(),vg("ngModel",o.Value()),MD();}}function Tt(t,i){t&1&&wg(0);}function xt(t,i){t&1&&wg(0);}function St(t,i){if(t&1){let e=ET();Zi(0,"app-timespan",47),Hg("ngModelChange",function(n){Pd(e);let a=aC().$implicit,c=aC(2);return Ld(c.updateSettingValue(a,n))}),Zi(1,"label",39),cg(2,Tt,1,0,"ng-container",36)(3,xt,1,0,"ng-container",41),Wl()(),bD();}if(t&2){let e=aC().$implicit,o=gC(3),n=zC(0);aC(2);let a=gC(10);vg("inputType",e.Name)("ngModel",e.Value())("customId",n),MD(),bE(),vg("for",n),bE(),vg("ngTemplateOutlet",o),bE(),vg("ngTemplateOutlet",a)("ngTemplateOutletContext",eb(9,V,eb(7,I,e.FormView)));}}function Ot(t,i){if(t&1){let e=ET();dm(0)(1),cg(2,De,6,5,"ng-template",null,2,db),Zi(4,"div",25),lT(5,Ge,13,3,"div",26)(6,Be,4,11,"app-file-tree",27)(7,ze,3,6,"app-file-tree",28)(8,Qe,10,12,"sh-form-field")(9,tt,9,12,"sh-form-field")(10,at,7,13)(11,_t,4,11,"app-size",29)(12,ct,7,10,"sh-form-field")(13,ut,5,10,"sh-toggle",30)(14,yt,7,12)(15,St,4,11,"app-timespan",29),Zi(16,"button",31),Hg("click",function(){let n=Pd(e).$implicit,a=aC(2);return Ld(a.removeSetting(n))}),Zi(17,"sh-icon"),HC(18,"x-bold"),Wl()()();}if(t&2){let e=i.$implicit,o=i.$index,n=aC(2);GC("destination-"+e.Name+o),bE(),GC(n.inAppOptions(e.Name)),bE(3),Kg("align-remove-start",e.FormView.type==="FolderTree"||e.FormView.type==="FileTree"||e.FormView.type==="Boolean"),bE(),uT(e.FormView.type==="FreeText"?5:e.FormView.type==="FileTree"?6:e.FormView.type==="FolderTree"?7:e.FormView.type==="String"||e.FormView.type==="Path"||e.FormView.type==="Decimal"||e.FormView.type==="Email"||e.FormView.type==="Hostname"||e.FormView.type==="Bucketname"?8:e.FormView.type==="Password"?9:e.FormView.type==="Enumeration"?10:e.FormView.type==="Size"?11:e.FormView.type==="Integer"?12:e.FormView.type==="Boolean"?13:e.FormView.type==="Flags"?14:e.FormView.type==="Timespan"||e.FormView.type==="DateTime"?15:-1);}}function Ft(t,i){if(t&1&&(lT(0,Ee,2,0,"div",24),pT(1,Ot,19,5,null,null,dT)),t&2){let e=aC();uT(e.selectedSettings().length===0?0:-1),bE(),hT(e.selectedSettings());}}function ht(t,i){if(t&1&&(Zi(0,"sh-icon",52),HC(1,"x-circle"),Wl()),t&2){aC();let e=zC(0);vg("shTooltip",e?.message??"Invalid value");}}function wt(t,i){if(t&1&&(Zi(0,"sh-icon",34),HC(1,"warning"),Wl()),t&2){aC();let e=zC(0);vg("shTooltip",e?.message??"Invalid value");}}function Lt(t,i){if(t&1&&(dm(0),lT(1,ht,2,1,"sh-icon",52)(2,wt,2,1,"sh-icon",34)),t&2){aC();let e=zC(0),o=aC().$implicit,n=GC(o.formView.validate(e));bE(),uT(n?.type==="error"?1:n?.type==="warning"?2:-1);}}function It(t,i){if(t&1&&(dm(0),lT(1,Lt,3,2)),t&2){let e=aC().$implicit,n=(GC(e.Value())??"").toString().trim()==="";bE(),uT(!n&&e.formView.validate?1:-1);}}function Vt(t,i){if(t&1&&lT(0,It,2,2),t&2){let e=i.$implicit;uT(e.Value?0:-1);}}var Oe=class t{#e=T(f);options=D1.required();hiddenOptions=E1([]);hasFreeTextSettings=E1(false);applicationOptions=E1();showTextArea=Ge$1(false);showOptionNames=Ge$1(false);allOptionsGrouped=this.#e.allOptionsGrouped;allOptions=this.#e.allOptions;selectedSettings=Nt(()=>{let i=this.hiddenOptions();return this.options().map(n=>{let a=this.allOptions().find(L=>L.name===n.Name?.replace("--","")),c=n.Value??"";if(a&&i.includes(a.name))return null;if(a){if(a.type==="Boolean"&&(c=this.isTrue(c)),a.type==="Integer"&&(c=parseInt(c)||0),a.type==="Enumeration"&&a.options){let M=c?.trim().toLowerCase(),q=a.options.find(Fe=>(Fe??"").trim().toLocaleLowerCase()===M);q&&(c=q);}let L=Se.find(M=>M.name===a?.name);return L&&(a=l(l({},a),L)),m(l({},n),{Value:Ge$1(c),FormView:a})}else if(this.hasFreeTextSettings())return m(l({},n),{Value:Ge$1(c),FormView:{name:n.Name,type:"FreeText",shortDescription:"Custom settings argument",longDescription:"Custom settings argument"}});return null}).filter(n=>n!==null)});nonSelectedOptionsGrouped=Nt(()=>{let i=this.options().map(o=>o.Name?.replace("--","")),e=this.hiddenOptions();return this.allOptionsGrouped().map(o=>m(l({},o),{options:o.options.filter(n=>!i.includes(n.name)&&!e.includes(n.name))})).filter(o=>o.options.length>0)});settingsAsText=Nt(()=>this.selectedSettings().map(i=>{let e=i.Value(),o="";return typeof e=="boolean"?o=this.isTrue(e)?"True":"False":(typeof e=="number"||e!=null)&&(o=e.toString()),`${i.Name??""}=${o}`}).join(`
2
+ `));updateSettingsFromText(i){if(typeof i!="string")return;let e=Te(i);this.options.update(()=>e);}isTrue(i){if(typeof i=="boolean")return i;if(typeof i=="string"){let e=i.toLowerCase();return e==="true"||e==="1"||e==="yes"||e==="on"}return false}inAppOptions(i){let e=this.applicationOptions()?.findIndex(o=>o.Name?.replace("--","")===i);return e===void 0?false:e>-1}addFreeTextSetting(){this.hasFreeTextSettings()&&this.options.update(i=>[...i,{Filter:null,Name:"",Value:""}]);}addSetting(i){this.options.update(e=>{let o=i.defaultValue??"";return i.type==="Boolean"&&(o=this.isTrue(o)),i.type==="Integer"&&(o=parseInt(o)||0),[...e,{Name:i.name,Value:o}]});}updateSettingValue(i,e){this.options.update(o=>{let n=[...o],a=n.findIndex(c=>c.Name===i.Name);if(i.FormView.type==="Boolean")return n[a].Value=this.isTrue(e)?"True":"False",n;if(i.FormView.type==="Integer")return n[a].Value=e.toString(),n;if(i.FormView.type==="Enumeration"&&i.FormView.options){let c=e?.trim().toLowerCase()??"",L=i.FormView.options.find(M=>(M??"").trim().toLocaleLowerCase()===c);if(L)return n[a].Value=L,n}return n[a].Value=e,n});}updateFreeTextSettingName(i,e){this.options.update(o=>{let n=[...o],a=n.findIndex(c=>c.Name===i.Name);return n[a].Name=e,n});}removeSetting(i){this.options.update(e=>e.filter(o=>o.Name!==i.Name));}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=gw({type:t,selectors:[["app-options-list"]],inputs:{options:[1,"options"],hiddenOptions:[1,"hiddenOptions"],hasFreeTextSettings:[1,"hasFreeTextSettings"],applicationOptions:[1,"applicationOptions"]},outputs:{options:"optionsChange"},decls:11,vars:4,consts:()=>{let i;i=$localize`Advanced options`;let e;e=$localize` Show editor ${"\uFFFD#2\uFFFD"}:START_TAG_SH_ICON:link${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SH_ICON:`;let o;o=$localize` Add advanced option ${"\uFFFD#3\uFFFD"}:START_TAG_SH_ICON:plus${"\uFFFD/#3\uFFFD"}:CLOSE_TAG_SH_ICON:`;let n;n=$localize`${"\uFFFD#7\uFFFD"}:START_TAG_SH_ICON:pen${"\uFFFD/#7\uFFFD"}:CLOSE_TAG_SH_ICON: New custom option `;let a;a=$localize`${"\uFFFD#14\uFFFD"}:START_TAG_SH_ICON:wrench${"\uFFFD/#14\uFFFD"}:CLOSE_TAG_SH_ICON: Toggle option names `;let c;return c=$localize`By adding this option it will override the matching global option`,[["validateTemplate",""],["option",""],["defaultLabel",""],["enumOptionTemplate",""],["optionTemplate",""],i,e,o,n,a,[3,"disableToggle","isActive"],["title",""],[1,"actions"],["shButton","","type","button",1,"outlined","small"],["wrap","off","placeholder","Paste advanced options here, one per line.",1,"raw-text-area",3,"ngModel","ngModelOptions"],["shButton","","type","button",1,"outlined","small",3,"click"],[3,"searchable"],["menu",""],["type","button",3,"deprecated"],["type","button",3,"click"],[1,"option-col"],["shButton","","type","button",1,"small"],["shButton","","type","button",1,"small",3,"click"],["wrap","off","placeholder","Paste advanced options here, one per line.",1,"raw-text-area",3,"ngModelChange","ngModel","ngModelOptions"],[1,"placeholder"],[1,"field-row"],[1,"form-column"],[3,"startingPath","accepts","showFiles","showHiddenNodes","selectFiles","hideShortcuts","resolvePaths"],[3,"startingPath","hideShortcuts","resolvePaths"],[3,"inputType","ngModel","customId"],[1,"primary","raised"],["shButton","","type","button",1,"outlined","small","remove-btn",3,"click"],["shTooltip",c,1,"error"],[1,"optionname"],[1,"warn",3,"shTooltip"],[1,"primary",3,"shTooltip"],[4,"ngTemplateOutlet"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],[3,"for"],["type","text",3,"ngModelChange","id","ngModel"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngModelChange","type","id","ngModel"],["autocomplete","new-password",3,"ngModelChange","type","id","ngModel"],["suffix","",1,"clickable"],["suffix","",1,"clickable",3,"click"],[3,"options","isClearable","optionTemplate"],[3,"ngModelChange","inputType","ngModel","customId"],["type","number",3,"ngModelChange","id","ngModel"],["type","checkbox",3,"ngModelChange","id","ngModel"],[1,"primary","raised",3,"options","selectMultiple","optionTemplate"],["type","text","id","text",3,"ngModelChange","ngModel"],[1,"error",3,"shTooltip"]]},template:function(e,o){e&1&&(Zi(0,"sh-toggle-card",10),zl(1,11)(2),oC(3,5),Ql(),Zi(4,"div",12),lT(5,we,3,0,"button",13)(6,Ne,8,2),Wl(),Ql(),lT(7,be,1,3,"textarea",14)(8,Ft,3,1),Wl(),cg(9,Vt,1,1,"ng-template",null,0,db)),e&2&&(vg("disableToggle",true)("isActive",true),bE(5),uT(o.showTextArea()?5:6),bE(2),uT(o.showTextArea()?7:8));},dependencies:[Bn,Ze$1,en,yt$1,Rn,Jt,le,q,Z,ei,I$1,Fe,v,ve$1,at$1,N,Nt$1,J],styles:["[_nghost-%COMP%]{display:block}sh-select[_ngcontent-%COMP%]{--miw: p2r(120)}sh-toggle[_ngcontent-%COMP%] sh-icon[_ngcontent-%COMP%]{font-size:1rem}.placeholder[_ngcontent-%COMP%]{color:var(--base-9);text-align:center;padding:2rem 1rem}.field-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;position:relative;z-index:1;max-width:32.5rem;width:100%}.field-row[_ngcontent-%COMP%] .remove-btn[_ngcontent-%COMP%]{align-self:flex-end}.field-row[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]:first-child{max-width:28rem;width:100%}.field-row.align-remove-start[_ngcontent-%COMP%] .remove-btn[_ngcontent-%COMP%]{align-self:flex-start}.option-col[_ngcontent-%COMP%]{display:flex;flex-direction:column}.option-col[_ngcontent-%COMP%] .fill[_ngcontent-%COMP%]{color:var(--base-12)}.form-column[_ngcontent-%COMP%]{display:flex;gap:.25rem;flex-direction:column}label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem}sh-icon[_ngcontent-%COMP%]{font-size:1rem}.form-row[_ngcontent-%COMP%]{display:grid;grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;justify-content:flex-end}.deprecated[_ngcontent-%COMP%]{text-decoration:line-through}.optionname[_ngcontent-%COMP%]{font-family:monospace}.raw-text-area[_ngcontent-%COMP%]{min-height:12rem;white-space:pre}"]})};export{Oe as OptionsListComponent};
@@ -0,0 +1,2 @@
1
+ import {T,a7 as D,E as E1,N as Nt,g as gw,a1 as pT,a2 as hT,e as ee,ax as W,a6 as be,ai as fe$1,ab as J,D as D$1,G as Ge,ad as sy,au as h,aA as N,v,u as ue$1,al as dm,Z as Zi,H as HC,W as Wl,l as lT,w as Hg,o as oC,am as GC,b as bE,x as xC,J as im,c as uT,d as Ig,z as vg,h as aC,ap as zC,aa as Yl,F as Fg,j as jg,as as Yp,i as ET,P as Pd,L as Ld,aR as zl,aS as Ql}from'./main-X6MUEPX4.js';import {d}from'./chunk-C8Zr0vl3.js';function re(i,t){if(i&1&&(Zi(0,"div",11),HC(1),Wl()),i&2){aC();let e=zC(0);bE(),Yl(" ",e.Message," ");}}function ce(i,t){if(i&1&&(Zi(0,"div"),Fg(1,1),Ig(2,"a",15),jg(),Wl()),i&2){let e=aC();bE(2),vg("href",e.downloadLink(),Yp);}}function le(i,t){if(i&1){let e=ET();Zi(0,"button",14),Hg("click",function(){Pd(e);let o=aC(),l=zC(0);return Ld(o.doRepair(l.BackupID))}),oC(1,2),Wl();}}function _e(i,t){if(i&1){let e=ET();Zi(0,"button",14),Hg("click",function(){Pd(e);let o=aC(),l=zC(0);return Ld(o.doDownloadBugreport(l))}),oC(1,3),Wl();}}function se(i,t){if(i&1&&Ig(0,"sh-progress-bar",17),i&2){let e=aC(2);vg("value",e.serverState()?.UpdateDownloadProgress);}}function de(i,t){if(i&1){let e=ET();Zi(0,"div",11),zl(1),oC(2,4),Ql(),Zi(3,"a",16),HC(4),Wl(),lT(5,se,1,1,"sh-progress-bar",17),Zi(6,"button",14),Hg("click",function(){Pd(e);let o=aC();return Ld(o.doShowUpdate())}),oC(7,5),Wl()();}if(i&2){let e=aC(),n=zC(0);bE(3),vg("href",e.serverState()?.UpdateDownloadLink,Yp),bE(),im(n.Message),bE(),uT(e.serverState()?.UpdaterState==="Downloading"?5:-1);}}function Ne(i,t){if(i&1){let e=ET();Zi(0,"button",14),Hg("click",function(){Pd(e);let o=aC(),l=zC(0);return Ld(o.doShowLog(l.BackupID))}),oC(1,6),Wl();}}function Te(i,t){if(i&1){let e=ET();Zi(0,"button",14),Hg("click",function(){Pd(e);let o=aC();return Ld(o.doShowLink("https://docs.duplicati.com/detailed-descriptions/the-server-database"))}),oC(1,7),Wl();}}function Ce(i,t){if(i&1){let e=ET();Zi(0,"button",14),Hg("click",function(){Pd(e);let o=aC();return Ld(o.doShowLink("https://docs.duplicati.com/detailed-descriptions/the-server-database"))}),oC(1,8),Wl();}}var pe={Error:"error",Warning:"warn",Information:"primary"},x=class i{#e=T(ee);#a=T(W);#r=T(be);#t=T(fe$1);#i=T(D);#n=T(J);#c=T(D$1);#o=Ge(null);serverState=this.#i.serverState;index=E1.required();notification=E1.required();downloadLink=Nt(()=>this.#o()||this.notification().DownloadLink||"");deleteNotificationByIndex(){this.#i.deleteNotification(this.index());}deleteAllNotifications(){this.#i.deleteAllNotifications();}getAlertType(t){return t&&pe[t]||"primary"}doShowLog(t){sy(()=>this.#n.getApiV1BackupByIdIsactive({path:{id:t}})).subscribe({next:e=>{this.#e.navigate(["/backup/"+t+"/log"]);},error:e=>{if(e.status===404){let n={title:$localize`Error`,message:$localize`The backup is missing, has it been deleted?`,confirmText:$localize`OK`,cancelText:null};parseInt(t)+""!=t&&(n={title:$localize`Error`,message:$localize`The backup was temporary and does not exist anymore, so the log data is lost`,confirmText:$localize`OK`,cancelText:null}),this.#r.open(h,{maxWidth:"550px",width:"100%",data:n});}else this.#t.error($localize`Failed to find backup: `+e.message);}});}doRepair(t){sy(()=>this.#n.postApiV1BackupByIdRepair({path:{id:t}})).subscribe({next:()=>{this.#t.success($localize`Backup repaired`),this.#e.navigate(["./"],{onSameUrlNavigation:"reload",relativeTo:this.#a});},error:e=>{this.#t.error($localize`Failed to repair backup: `+e.message);}});}doShowUpdate(){this.#e.navigate(["/about/changelog"]);}doShowLink(t){window.open(t,"_blank");}doDownloadBugreport(t){let e=t.Action.slice(19);sy(()=>this.#n.postApiV1AuthIssuetokenByOperation({path:{operation:"bugreport"}})).subscribe({next:n=>{if(!n.Token){this.#t.error("Failed to get bug report URL: No token generated");return}let o=N(),l=this.#c.xsrfQueryParam(),m=`${location.origin}${o}/api/v1/bugreport/${e}?token=${n.Token}${l?`&${l}`:""}`;t.DownloadLink=m,this.#o.set(m),this.triggerDownload(m);},error:n=>{this.#t.error(`Failed to get bug report URL: ${n.message}`);}});}triggerDownload(t){let e=document.createElement("a");e.href=t,e.download="",e.style.display="none",document.body.appendChild(e);try{e.click();}catch{}document.body.removeChild(e);}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=gw({type:i,selectors:[["app-notification"]],inputs:{index:[1,"index"],notification:[1,"notification"]},decls:16,vars:12,consts:()=>{let t;t=$localize`Dismiss`;let e;e=$localize` If the backup file was not downloaded automatically, ${"\uFFFD#2\uFFFD"}:START_LINK:right click and choose "Save as …"${"\uFFFD/#2\uFFFD"}:CLOSE_LINK:`;let n;n=$localize`Repair`;let o;o=$localize`Download`;let l;l=$localize`New update found:`;let m;m=$localize`Show Update`;let L;L=$localize`Show Log`;let $;$=$localize` Show Help `;let w;return w=$localize` Show Help `,[t,e,n,o,l,m,L,$,w,["ship-alert-title",""],["ship-alert-content","",1,"content"],[1,"message"],[1,"sub-actions"],["shButton","",1,"small","outlined"],["shButton","",1,"small","outlined",3,"click"],["target","_blank",3,"href"],[3,"href"],[3,"value"]]},template:function(e,n){if(e&1&&(dm(0),Zi(1,"sh-alert")(2,"div",9),HC(3),Wl(),Zi(4,"div",10),lT(5,re,2,1,"div",11),lT(6,ce,3,1,"div"),Zi(7,"div",12),lT(8,le,2,0,"button",13),lT(9,_e,2,0,"button",13),lT(10,de,8,3,"div",11),lT(11,Ne,2,0,"button",13),lT(12,Te,2,0,"button",13),lT(13,Ce,2,0,"button",13),Zi(14,"button",14),Hg("click",function(){return n.deleteNotificationByIndex()}),oC(15,0),Wl()()()()),e&2){let o=GC(n.notification());bE(),xC(n.getAlertType(o.Type)),bE(2),im(o.Title),bE(2),uT(o.Action!=="update:new"&&o.Action!=="update:manual"?5:-1),bE(),uT(n.downloadLink()?6:-1),bE(2),uT(o.Message?.includes("please run repair")?8:-1),bE(),uT(o.Action?.startsWith("bug-report:created:")&&!n.downloadLink()?9:-1),bE(),uT(o.Action==="update:new"?10:-1),bE(),uT(o.Action==="backup:show-log"?11:-1),bE(),uT(o.Action==="config:issue:unencrypted-database"?12:-1),bE(),uT(o.Action==="config:issue:windows-folder-used"?13:-1);}},dependencies:[d,v,ue$1],styles:["[_nghost-%COMP%]{display:block}.content[_ngcontent-%COMP%]{margin-top:.5rem;display:flex;flex-direction:column;gap:.5rem}.message[_ngcontent-%COMP%]{max-height:12.5rem;overflow:auto}.sub-actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:.5rem;margin-top:.5rem}"]})};var Ie=(i,t)=>t.ID;function fe(i,t){if(i&1&&Ig(0,"app-notification",1),i&2){let e=t.$implicit,n=t.$index;vg("index",n)("notification",e);}}function ue(i,t){i&1&&(Zi(0,"div",2)(1,"p"),oC(2,0),Wl()());}var ne=class i{#e=T(D);notificationFilterPredicate=E1();notifications=Nt(()=>{let t=this.notificationFilterPredicate()?.predicate,e=this.#e.notifications();return typeof t!="function"?e:e.filter(t)});static \u0275fac=function(e){return new(e||i)};static \u0275cmp=gw({type:i,selectors:[["app-notifications"]],inputs:{notificationFilterPredicate:[1,"notificationFilterPredicate"]},decls:3,vars:1,consts:()=>{let t;return t=$localize`No more notifications`,[t,[3,"index","notification"],[1,"notification-list"]]},template:function(e,n){e&1&&pT(0,fe,1,2,"app-notification",1,Ie,false,ue,3,0,"div",2),e&2&&hT(n.notifications());},dependencies:[x],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.actions[_ngcontent-%COMP%]{display:flex;gap:.25rem;justify-content:flex-end}.notification-list[_ngcontent-%COMP%]{padding:1rem;display:flex;flex-direction:column;gap:1rem;text-align:center}"]})};
2
+ export{ne as n,x};
@@ -0,0 +1 @@
1
+ import {T,ab as J,G as Ge,N as Nt,ad as sy,a_ as ee}from'./main-X6MUEPX4.js';var m=class n{#e=T(J);backupId=Ge(null);versions=Ge([]);isLoadingVersions=Ge(true);selectedVersion=Ge(null);selectedPaths=Ge("");versionScope=Ge("all");specificVersions=Ge([]);selectedPathsArray=Nt(()=>this.selectedPaths().split("\0").filter(e=>e.trim()!==""));selectedVersionItem=Nt(()=>{let e=this.selectedVersion();return e===null?null:this.versions().find(i=>i.Version===parseInt(e))??null});init(e){this.backupId()!==e&&(this.backupId.set(e),this.isLoadingVersions.set(true),sy(()=>this.#e.postApiV2BackupListFilesets({body:{BackupId:e}})).subscribe({next:i=>{let r=(i.Data??[]).slice().sort((t,d)=>t.Time<d.Time?1:t.Time>d.Time?-1:0);this.versions.set(r),this.isLoadingVersions.set(false);let a=r.find(t=>t.Version===0)??r[0];a&&this.selectedVersion()===null&&this.selectedVersion.set(a.Version.toString());},error:()=>this.isLoadingVersions.set(false)}));}static \u0275fac=function(i){return new(i||n)};static \u0275prov=ee({token:n,factory:n.\u0275fac})};export{m};
@@ -0,0 +1 @@
1
+ import {F as Fe}from'./chunk-Be4WXTyA.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-Bfg1Kjif.js';import {T,ai as fe,ab as J,e as ee,G as Ge,ad as sy,az as Yu,C as Zu,g as gw,_ as _t,a as N,v,Z as Zi,F as Fg,d as Ig,W as Wl,w as Hg,j as jg,o as oC,H as HC,l as lT,b as bE,z as vg,a3 as XC,K as Kg,c as uT,s as sC,ac as I1,ba as Ew,t as bD,M as MD}from'./main-X6MUEPX4.js';var K=(()=>{class r{constructor(){this.filesOver=Ge(false),this.filesDropped=I1();}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=Ew({type:r,selectors:[["","shDragDrop",""]],hostVars:2,hostBindings:function(e,i){e&1&&Hg("dragover",function(c){return i.onDragOver(c)})("dragleave",function(c){return i.onDragLeave(c)})("drop",function(c){return i.ondrop(c)}),e&2&&Kg("filesover",i.filesOver());},outputs:{filesDropped:"filesDropped"}});}}return r})();var W=()=>["/"];function Y(r,o){r&1&&(Zi(0,"sh-form-field")(1,"label",11),oC(2,2),Wl(),Ig(3,"input",12),bD(),Wl()),r&2&&(bE(3),MD());}var p=new jn,D=class r{#t=T(fe);#e=T(J);#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),sy(()=>this.#e.postApiV1BackupsImport({body:this.importForm.value})).pipe(Yu(o=>{let e={Backup:o.data.Backup};return this.#e.postApiV1Backups({body:e,query:{temporary:true}})}),Zu(()=>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=gw({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=sC(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&&(Zi(0,"header")(1,"h3"),Fg(2,0),Zi(3,"div",3)(4,"button",4),Ig(5,"sh-icon"),Wl(),Zi(6,"button",5),Hg("click",function(){return e.submit()}),Ig(7,"sh-icon"),Wl()(),jg(),Wl()(),Zi(8,"form",6)(9,"sh-form-field",7),Hg("fileDropped",function(n){return e.onFileDropped(n)}),Zi(10,"label",8),oC(11,1),Wl(),Zi(12,"input",9),Hg("change",function(n){return e.onFileDropped(n)}),Wl(),Zi(13,"sh-icon",10),HC(14,"upload"),Wl()(),lT(15,Y,4,0,"sh-form-field"),Wl()),t&2&&(bE(4),vg("routerLink",XC(6,W)),bE(2),Kg("loading",e.isRestoring()),vg("disabled",e.isRestoring()),bE(2),vg("formGroup",e.importForm),bE(7),uT(e.isSecureFile()?15:-1));},dependencies:[Gn,Tn,Ze,Rn,Pn,gn,hn,_t,K,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};