@duplicati/ngclient 0.0.130 → 0.0.132

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 (190) hide show
  1. package/chunk-2ASDVUFT.js +1 -0
  2. package/chunk-2W4JV5JL.js +1 -0
  3. package/{chunk-LWIINXS7.js → chunk-2YHX57UE.js} +1 -1
  4. package/chunk-33FTKAPW.js +1 -0
  5. package/chunk-3NGXNVFE.js +1 -0
  6. package/{chunk-DLJSVAM2.js → chunk-3Q5JEF3K.js} +1 -1
  7. package/chunk-3TKRL3US.js +1 -0
  8. package/chunk-3UMUFU7J.js +1 -0
  9. package/chunk-4IODEYNF.js +1 -0
  10. package/{chunk-A6RETV76.js → chunk-4JHY2ZIQ.js} +1 -1
  11. package/chunk-52WBX72O.js +2 -0
  12. package/chunk-53F47EOA.js +1 -0
  13. package/chunk-5CUMYXCI.js +1 -0
  14. package/{chunk-HZQEM2P7.js → chunk-5CYNJ3KI.js} +1 -1
  15. package/chunk-5ER6KMMG.js +1 -0
  16. package/{chunk-4V45XF67.js → chunk-5RPDEEQ3.js} +1 -1
  17. package/chunk-67XQIEG5.js +1 -0
  18. package/chunk-67YRCRMI.js +7 -0
  19. package/chunk-6FOROLCM.js +3 -0
  20. package/chunk-6HRKFGKD.js +1 -0
  21. package/chunk-6XD3ZTV3.js +1 -0
  22. package/chunk-AKQVOUES.js +1 -0
  23. package/chunk-AUWIW323.js +1 -0
  24. package/chunk-BSRYIN2F.js +1 -0
  25. package/{chunk-M7A6IY7W.js → chunk-BTTHW7KA.js} +1 -1
  26. package/chunk-D4QBTQXT.js +1 -0
  27. package/{chunk-QUOBR5MG.js → chunk-DLVU5GHR.js} +1 -1
  28. package/chunk-DQM3ATT4.js +1 -0
  29. package/chunk-DSRTEY6R.js +1 -0
  30. package/chunk-DXX4SHGM.js +1 -0
  31. package/chunk-DXY7PV4P.js +1 -0
  32. package/chunk-EKL346XU.js +1 -0
  33. package/chunk-ENGSZPK6.js +1 -0
  34. package/chunk-EUDKD2JW.js +1 -0
  35. package/chunk-EW3XN62R.js +1 -0
  36. package/chunk-F47NJAFQ.js +1 -0
  37. package/{chunk-WBCTOQOO.js → chunk-FBULENUD.js} +1 -1
  38. package/chunk-FC45TEB6.js +1 -0
  39. package/{chunk-T3WJQ544.js → chunk-FJ2TDPI3.js} +1 -1
  40. package/chunk-FQAHXSGY.js +1 -0
  41. package/chunk-FX2XKS5C.js +1 -0
  42. package/chunk-GP2W7XZF.js +1 -0
  43. package/chunk-GXCMYX2K.js +1 -0
  44. package/chunk-HJQBTK5I.js +1 -0
  45. package/{chunk-GQGMGFDX.js → chunk-HPZ6HLJE.js} +1 -1
  46. package/{chunk-S75WBVE3.js → chunk-IVP5ZHDB.js} +1 -1
  47. package/{chunk-TCEYGZ6D.js → chunk-J64ETWKB.js} +2 -2
  48. package/chunk-JADCKIQ4.js +1 -0
  49. package/{chunk-KPH4ZAFT.js → chunk-L6BZ6TEU.js} +1 -1
  50. package/chunk-LGC2UEAO.js +1 -0
  51. package/chunk-LLV2UR7Z.js +1 -0
  52. package/chunk-M65WTTXI.js +1 -0
  53. package/chunk-MAHKEFZE.js +1 -0
  54. package/chunk-NKYXZEX2.js +1 -0
  55. package/chunk-NPPD4I4N.js +1 -0
  56. package/chunk-NQVDTTCD.js +6 -0
  57. package/chunk-NVMLEB3O.js +1 -0
  58. package/chunk-O4HSW7GI.js +56 -0
  59. package/chunk-OQHMS5HM.js +1 -0
  60. package/{chunk-HAATVFD4.js → chunk-PL2MNRTA.js} +1 -1
  61. package/chunk-PTDOM6EA.js +1 -0
  62. package/chunk-Q6YWYUN4.js +2 -0
  63. package/chunk-QB3BX6FC.js +1 -0
  64. package/chunk-RIMBSV7X.js +1 -0
  65. package/chunk-RNYYB7Z7.js +1 -0
  66. package/{chunk-SF5ML7OT.js → chunk-T3KWCIYP.js} +1 -1
  67. package/chunk-TKOD3RB3.js +2 -0
  68. package/chunk-TQPOMS6Q.js +1 -0
  69. package/{chunk-XUPWJEL7.js → chunk-U44OBOIE.js} +1 -1
  70. package/chunk-UEX6XU6A.js +1 -0
  71. package/chunk-ULGBY3HN.js +2 -0
  72. package/chunk-UXQ6EH3H.js +1 -0
  73. package/chunk-WIDMAJIO.js +1 -0
  74. package/chunk-WYY5FAMC.js +1 -0
  75. package/{chunk-OQPUBCLB.js → chunk-WZIEF5KL.js} +1 -1
  76. package/chunk-X7GQQCVS.js +1 -0
  77. package/chunk-XD6MBGQY.js +2 -0
  78. package/chunk-XH2AUUSU.js +1 -0
  79. package/chunk-XLVTJGQW.js +1 -0
  80. package/chunk-ZCT7SRIM.js +1 -0
  81. package/{chunk-PFZ7N6QO.js → chunk-ZF3UEKWP.js} +1 -1
  82. package/chunk-ZJQCMD5B.js +1 -0
  83. package/chunk-ZXT5JBAK.js +1 -0
  84. package/index.html +2 -2
  85. package/main-MG43J5KN.js +1 -0
  86. package/package.json +1 -1
  87. package/polyfills-COBLRUJG.js +1 -0
  88. package/styles-YRN2WTKF.css +1 -0
  89. package/chunk-4KE2I7OA.js +0 -7
  90. package/chunk-4PFSFVY6.js +0 -1
  91. package/chunk-5FTLFTEB.js +0 -1
  92. package/chunk-5LL2GNEZ.js +0 -1
  93. package/chunk-5S46PDX2.js +0 -2
  94. package/chunk-6LCXRM3A.js +0 -1
  95. package/chunk-74DADXEI.js +0 -1
  96. package/chunk-77O3NTSI.js +0 -1
  97. package/chunk-7CGTOI24.js +0 -1
  98. package/chunk-7XUQAQXF.js +0 -1
  99. package/chunk-A2ITER5E.js +0 -1
  100. package/chunk-AACOYUOE.js +0 -1
  101. package/chunk-ABANCAM5.js +0 -1
  102. package/chunk-AIKD43P2.js +0 -1
  103. package/chunk-AOXPIWSW.js +0 -1
  104. package/chunk-APVPH7MJ.js +0 -1
  105. package/chunk-B37C3RGG.js +0 -1
  106. package/chunk-BI4O7WRG.js +0 -1
  107. package/chunk-BLKMQJR5.js +0 -1
  108. package/chunk-BMMOMXWX.js +0 -6
  109. package/chunk-BRR5YAJ3.js +0 -1
  110. package/chunk-BUZTB5NB.js +0 -1
  111. package/chunk-BZCM226U.js +0 -1
  112. package/chunk-C44Q3YIF.js +0 -1
  113. package/chunk-CTTB3CC2.js +0 -1
  114. package/chunk-CZATLVNN.js +0 -1
  115. package/chunk-DSS4UZWD.js +0 -1
  116. package/chunk-DUQHFE6L.js +0 -1
  117. package/chunk-DWAT342U.js +0 -1
  118. package/chunk-DYTQQHMA.js +0 -1
  119. package/chunk-EBXJGPRA.js +0 -1
  120. package/chunk-FEYAUW6J.js +0 -1
  121. package/chunk-GQCUCL25.js +0 -1
  122. package/chunk-GUKBMCIX.js +0 -1
  123. package/chunk-H5MGVT7B.js +0 -1
  124. package/chunk-HBYWSSYK.js +0 -1
  125. package/chunk-HIW2CN45.js +0 -1
  126. package/chunk-HTTPTGMU.js +0 -1
  127. package/chunk-IQTQJ64J.js +0 -2
  128. package/chunk-IVGY6D4N.js +0 -56
  129. package/chunk-JMQGVDAK.js +0 -1
  130. package/chunk-LUKUBN2Z.js +0 -1
  131. package/chunk-LZXYGCPQ.js +0 -1
  132. package/chunk-MES3HY3J.js +0 -1
  133. package/chunk-MNE4XQ7S.js +0 -1
  134. package/chunk-MZZJNTYI.js +0 -1
  135. package/chunk-N5FH4YAX.js +0 -2
  136. package/chunk-NZXQIYE5.js +0 -4
  137. package/chunk-PG4O7JZ2.js +0 -1
  138. package/chunk-QLHQ5NDE.js +0 -1
  139. package/chunk-QMFHJSCY.js +0 -1
  140. package/chunk-QNXSBZTY.js +0 -1
  141. package/chunk-QQAATZNB.js +0 -1
  142. package/chunk-T7QZL5YJ.js +0 -2
  143. package/chunk-U7YVVKGQ.js +0 -1
  144. package/chunk-UEYPJIJG.js +0 -1
  145. package/chunk-VAR5LIG7.js +0 -2
  146. package/chunk-VN4TP2ED.js +0 -1
  147. package/chunk-WRKRV6RQ.js +0 -1
  148. package/chunk-X4XF46C3.js +0 -1
  149. package/chunk-ZQ4ACNVT.js +0 -3
  150. package/chunk-ZWC5VRTB.js +0 -1
  151. package/chunk-ZY4E4VC3.js +0 -1
  152. package/locale/angular/cs.mjs +0 -21
  153. package/locale/angular/da.mjs +0 -17
  154. package/locale/angular/de.mjs +0 -17
  155. package/locale/angular/en-GB.mjs +0 -17
  156. package/locale/angular/es.mjs +0 -19
  157. package/locale/angular/extra/cs.mjs +0 -11
  158. package/locale/angular/extra/da.mjs +0 -11
  159. package/locale/angular/extra/de.mjs +0 -11
  160. package/locale/angular/extra/en-GB.mjs +0 -11
  161. package/locale/angular/extra/es.mjs +0 -11
  162. package/locale/angular/extra/fi.mjs +0 -11
  163. package/locale/angular/extra/fr.mjs +0 -11
  164. package/locale/angular/extra/hu.mjs +0 -11
  165. package/locale/angular/extra/it.mjs +0 -11
  166. package/locale/angular/extra/ja.mjs +0 -11
  167. package/locale/angular/extra/nl.mjs +0 -11
  168. package/locale/angular/extra/pl.mjs +0 -11
  169. package/locale/angular/extra/pt.mjs +0 -11
  170. package/locale/angular/extra/ru.mjs +0 -11
  171. package/locale/angular/extra/sr.mjs +0 -11
  172. package/locale/angular/extra/sv.mjs +0 -11
  173. package/locale/angular/extra/zh-Hans.mjs +0 -11
  174. package/locale/angular/extra/zh-Hant.mjs +0 -11
  175. package/locale/angular/fi.mjs +0 -17
  176. package/locale/angular/fr.mjs +0 -19
  177. package/locale/angular/hu.mjs +0 -17
  178. package/locale/angular/it.mjs +0 -19
  179. package/locale/angular/ja.mjs +0 -15
  180. package/locale/angular/nl.mjs +0 -17
  181. package/locale/angular/pl.mjs +0 -21
  182. package/locale/angular/pt.mjs +0 -19
  183. package/locale/angular/ru.mjs +0 -21
  184. package/locale/angular/sr.mjs +0 -19
  185. package/locale/angular/sv.mjs +0 -17
  186. package/locale/angular/zh-Hans.mjs +0 -15
  187. package/locale/angular/zh-Hant.mjs +0 -15
  188. package/main-WENCV2S5.js +0 -1
  189. package/polyfills-6QHLTIIN.js +0 -1
  190. package/styles-6RBLRF5E.css +0 -1
@@ -0,0 +1 @@
1
+ import{a as ae}from"./chunk-FJ2TDPI3.js";import{a as te}from"./chunk-67XQIEG5.js";import"./chunk-FBULENUD.js";import{a as Q}from"./chunk-T3KWCIYP.js";import"./chunk-5CYNJ3KI.js";import"./chunk-FC45TEB6.js";import"./chunk-RHW5QVAY.js";import"./chunk-2YHX57UE.js";import"./chunk-3Q5JEF3K.js";import{c as Y,e as Z,i as x,s as ee}from"./chunk-ZCT7SRIM.js";import"./chunk-OQHMS5HM.js";import{b as z,e as q}from"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{a as H,g as W,l as j}from"./chunk-5ER6KMMG.js";import{h as J}from"./chunk-XD6MBGQY.js";import"./chunk-HPZ6HLJE.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import"./chunk-DLVU5GHR.js";import{E as g,F as d,Fc as k,Gc as h,Hb as r,Ib as p,Jb as F,Kb as K,Lb as L,N as E,Nb as u,Oa as s,X as D,_a as y,_b as P,ac as U,bc as C,gc as w,hc as X,ic as V,la as c,pb as v,qb as G,r as O,ub as A,vb as i,wb as a,xb as l}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";function ie(S,t){S&1&&(i(0,"spk-icon",18),C(1,"check"),a())}function ne(S,t){S&1&&(i(0,"spk-icon",18),C(1,"warning"),a())}var m=class S{#a=D(z);#i=D(Q);#e=D(J);#t="";backupId=te(this.#a.params.pipe(O(t=>t.id)));activeBackup=k(()=>{let t=this.#i.backups().find(_=>_.Backup?.ID===this.backupId());return this.#t=t?.Backup?.DBPath??"",t});backupFilePath=c("");lastValidatedPath=c("");isValidatedPath=k(()=>this.lastValidatedPath()===this.backupFilePath());pathHasChanged=k(()=>this.backupFilePath()!==this.#t);backupFilePathEffect=h(()=>{let t=this.backupFilePath();t!==""&&this.#e.postApiV1FilesystemValidate({requestBody:{path:t}}).subscribe({next:()=>this.lastValidatedPath.set(t)})});isRestoring=c(!1);isRepairing=c(!1);isDeleting=c(!1);isSavingDbPath=c(!1);isSavingAndRepairing=c(!1);isMovingDb=c(!1);activeBackupEffect=h(()=>{let t=this.activeBackup();if(!t)return;let _=t.Backup?.DBPath??"";this.backupFilePath.set(_)});repairDatabase(){this.isRepairing.set(!0),this.#e.postApiV1BackupByIdRepair({id:this.backupId()}).pipe(g(1),d(()=>this.isRepairing.set(!1))).subscribe()}deleteDatabase(){this.isDeleting.set(!0),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(g(1),d(()=>this.isDeleting.set(!1))).subscribe(()=>this.lastValidatedPath.set(""))}restoreDatabase(){this.isRestoring.set(!0),this.#e.postApiV1BackupByIdDeletedb({id:this.backupId()}).pipe(g(1),E(()=>this.#e.postApiV1BackupByIdRepair({id:this.backupId()})),d(()=>this.isRestoring.set(!1))).subscribe()}resetDatabasePath(){this.backupFilePath.set(this.#t)}saveDatabasePath(){this.isSavingDbPath.set(!0),this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:this.backupFilePath()}}).pipe(d(()=>this.isSavingDbPath.set(!1))).subscribe()}saveAndRepairDatabasePath(){this.isSavingAndRepairing.set(!0),this.#e.postApiV1BackupByIdUpdatedb({id:this.backupId(),requestBody:{path:this.backupFilePath()}}).pipe(E(()=>this.#e.postApiV1BackupByIdRepair({id:this.backupId()})),d(()=>this.isSavingAndRepairing.set(!1)))}moveDatabasePath(){this.isMovingDb.set(!0),this.#e.postApiV1BackupByIdMovedb({id:this.backupId(),requestBody:{path:this.backupFilePath()}}).pipe(d(()=>this.isMovingDb.set(!1))).subscribe()}static \u0275fac=function(_){return new(_||S)};static \u0275cmp=y({type:S,selectors:[["app-database"]],decls:46,vars:18,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let _;_=$localize`Local database for ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let e;e=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. This makes it faster to perform many operations, and reduces the amount of data that needs to be downloaded for each operation. `;let n;n=$localize`Maintenance`;let T;T=$localize` If the backup and the remote storage is out of sync, Duplicati will require that you perform a repair operation to synchronize the database. If the repair is unsuccessful, you can delete the local database and re-generate. `;let b;b=$localize`${"\uFFFD#19\uFFFD"}:START_TAG_SPK_ICON:wrench${"\uFFFD/#19\uFFFD"}:CLOSE_TAG_SPK_ICON: Repair `;let f;f=$localize`${"\uFFFD#22\uFFFD"}:START_TAG_SPK_ICON:trash${"\uFFFD/#22\uFFFD"}:CLOSE_TAG_SPK_ICON: Delete `;let B;B=$localize`${"\uFFFD#25\uFFFD"}:START_TAG_SPK_ICON:clock-counter-clockwise${"\uFFFD/#25\uFFFD"}:CLOSE_TAG_SPK_ICON: Restore (delete and repair) `;let I;I=$localize`Placement`;let M;M=$localize`${"\uFFFD#36\uFFFD"}:START_TAG_SPK_ICON:backspace${"\uFFFD/#36\uFFFD"}:CLOSE_TAG_SPK_ICON: Reset `;let N;N=$localize`${"\uFFFD#39\uFFFD"}:START_TAG_SPK_ICON:floppy-disk${"\uFFFD/#39\uFFFD"}:CLOSE_TAG_SPK_ICON: Save `;let $;$=$localize`${"\uFFFD#42\uFFFD"}:START_TAG_SPK_ICON:wrench${"\uFFFD/#42\uFFFD"}:CLOSE_TAG_SPK_ICON: Save & Repair `;let R;return R=$localize`${"\uFFFD#45\uFFFD"}:START_TAG_SPK_ICON:flow-arrow${"\uFFFD/#45\uFFFD"}:CLOSE_TAG_SPK_ICON: Move existing database `,[t,_,e,n,T,b,f,B,I,M,N,$,R,[1,"back"],["type","button","spk-button","","routerLink","/",1,"small"],[1,"actions","maintenance"],["spk-button","",3,"click","disabled"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],[1,"actions","placement"]]},template:function(_,e){if(_&1&&(l(0,"app-status-bar"),i(1,"section")(2,"div",13)(3,"button",14),r(4,0),l(5,"spk-icon"),p(),a()(),i(6,"article")(7,"h1"),F(8,1),a(),i(9,"p"),F(10,2),a()(),i(11,"article")(12,"h2"),F(13,3),a(),i(14,"p"),F(15,4),a(),i(16,"div",15)(17,"button",16),u("click",function(){return e.repairDatabase()}),r(18,5),l(19,"spk-icon"),p(),a(),i(20,"button",16),u("click",function(){return e.deleteDatabase()}),r(21,6),l(22,"spk-icon"),p(),a(),i(23,"button",16),u("click",function(){return e.restoreDatabase()}),r(24,7),l(25,"spk-icon"),p(),a()()(),i(26,"article")(27,"h2"),F(28,8),a(),i(29,"spk-form-field")(30,"input",17),V("ngModelChange",function(T){return X(e.backupFilePath,T)||(e.backupFilePath=T),T}),a(),v(31,ie,2,0,"spk-icon",18)(32,ne,2,0,"spk-icon",18),a(),i(33,"div",19)(34,"button",16),u("click",function(){return e.resetDatabasePath()}),r(35,9),l(36,"spk-icon"),p(),a(),i(37,"button",16),u("click",function(){return e.saveDatabasePath()}),r(38,10),l(39,"spk-icon"),p(),a(),i(40,"button",16),u("click",function(){return e.saveAndRepairDatabasePath()}),r(41,11),l(42,"spk-icon"),p(),a(),i(43,"button",16),u("click",function(){return e.moveDatabasePath()}),r(44,12),l(45,"spk-icon"),p(),a()()()()),_&2){let n;s(8),K((n=e.activeBackup())==null||n.Backup==null?null:n.Backup.Name),L(8),s(9),P("loader",e.isRepairing()),A("disabled",!e.isValidatedPath()),s(3),P("loader",e.isDeleting()),A("disabled",!e.isValidatedPath()),s(3),P("loader",e.isRestoring()),A("disabled",e.pathHasChanged()),s(6),U(e.isValidatedPath()?"success":"error"),s(),w("ngModel",e.backupFilePath),s(),G(e.isValidatedPath()?31:32),s(3),A("disabled",!e.pathHasChanged()),s(3),A("disabled",!e.pathHasChanged()),s(3),A("disabled",!e.pathHasChanged()),s(3),A("disabled",!e.pathHasChanged())}},dependencies:[ee,Y,Z,x,ae,W,j,H,q],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;padding:2rem}article[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}h1[_ngcontent-%COMP%]{font:var(--title-20)}h2[_ngcontent-%COMP%]{font:var(--title-30)}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{m as default};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-ULGBY3HN.js";import"./chunk-U44OBOIE.js";import"./chunk-5ER6KMMG.js";import"./chunk-XD6MBGQY.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";export{a as default};
@@ -1 +1 @@
1
- import{h as c}from"./chunk-N5FH4YAX.js";import{F as a,P as p,Qc as i,T as u,Z as l,va as o}from"./chunk-4KE2I7OA.js";var m=class r{#e=l(c);isLoaded=o(!1);systemInfo=o(null);filterGroups=o(null);backendModules=i(()=>this.systemInfo()?.BackendModules??[]);allOptionsGrouped=i(()=>{let s={displayName:"Default",options:this.systemInfo()?.Options?.map(this.#s)??[]},e=this.systemInfo()?.GenericModules?.map(t=>({displayName:t.DisplayName??t.Key,options:t.Options?.map(this.#s)??[]}))??[],n=this.systemInfo()?.CompressionModules?.map(t=>({displayName:t.DisplayName??t.Key,options:t.Options?.map(this.#s)??[]}))??[],d=this.systemInfo()?.EncryptionModules?.map(t=>({displayName:t.DisplayName??t.Key,options:t.Options?.map(this.#s)??[]}))??[];return[s,...e,...n,...d]});allOptions=i(()=>this.allOptionsGrouped().reduce((s,e)=>[...s,...e.options],[]));hasWebSocket=i(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:websocket"));hasV2ListOperations=i(()=>{let s=this.systemInfo()?.APIExtensions??[];return s.includes("v2:backup:list-filesets")&&s.includes("v2:backup:list-folder")});hasV2TestOperations=i(()=>(this.systemInfo()?.APIExtensions??[]).includes("v2:destination:test"));hasProgressSubscribeOption=i(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:progress"));hasTaskSubscribeOption=i(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:taskqueue"));hasBackupListSubscribeOption=i(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:backuplist"));hasWebSocketAuth=i(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:websocket:authenticate"));preload(s=!1){let e=this.#e.getApiV1Systeminfo().pipe(p(n=>{this.systemInfo.set(n)}),a(()=>this.isLoaded.set(!0)));if(s)return e;e.subscribe()}preloadFilterGroups(s=!1){let e=this.#e.getApiV1SysteminfoFiltergroups().pipe(p(n=>{this.filterGroups.set(n)}),a(()=>this.isLoaded.set(!0)));if(s)return e;e.subscribe()}#s(s){return{name:s.Name,type:s.Type,shortDescription:s.ShortDescription??void 0,longDescription:s.LongDescription??void 0,deprecatedDescription:s.Deprecated??!1?s.DeprecationMessage??void 0:void 0,options:s.ValidValues,defaultValue:s.DefaultValue}}static \u0275fac=function(e){return new(e||r)};static \u0275prov=u({token:r,factory:r.\u0275fac,providedIn:"root"})};export{m as a};
1
+ import{h as c}from"./chunk-XD6MBGQY.js";import{F as a,Fc as i,P as p,S as u,X as l,la as o}from"./chunk-67YRCRMI.js";var m=class r{#e=l(c);isLoaded=o(!1);systemInfo=o(null);filterGroups=o(null);backendModules=i(()=>this.systemInfo()?.BackendModules??[]);allOptionsGrouped=i(()=>{let s={displayName:"Default",options:this.systemInfo()?.Options?.map(this.#s)??[]},e=this.systemInfo()?.GenericModules?.map(t=>({displayName:t.DisplayName??t.Key,options:t.Options?.map(this.#s)??[]}))??[],n=this.systemInfo()?.CompressionModules?.map(t=>({displayName:t.DisplayName??t.Key,options:t.Options?.map(this.#s)??[]}))??[],d=this.systemInfo()?.EncryptionModules?.map(t=>({displayName:t.DisplayName??t.Key,options:t.Options?.map(this.#s)??[]}))??[];return[s,...e,...n,...d]});allOptions=i(()=>this.allOptionsGrouped().reduce((s,e)=>[...s,...e.options],[]));hasWebSocket=i(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:websocket"));hasV2ListOperations=i(()=>{let s=this.systemInfo()?.APIExtensions??[];return s.includes("v2:backup:list-filesets")&&s.includes("v2:backup:list-folder")});hasV2TestOperations=i(()=>(this.systemInfo()?.APIExtensions??[]).includes("v2:destination:test"));hasProgressSubscribeOption=i(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:progress"));hasTaskSubscribeOption=i(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:taskqueue"));hasBackupListSubscribeOption=i(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:subscribe:backuplist"));hasWebSocketAuth=i(()=>(this.systemInfo()?.APIExtensions??[]).includes("v1:websocket:authenticate"));preload(s=!1){let e=this.#e.getApiV1Systeminfo().pipe(p(n=>{this.systemInfo.set(n)}),a(()=>this.isLoaded.set(!0)));if(s)return e;e.subscribe()}preloadFilterGroups(s=!1){let e=this.#e.getApiV1SysteminfoFiltergroups().pipe(p(n=>{this.filterGroups.set(n)}),a(()=>this.isLoaded.set(!0)));if(s)return e;e.subscribe()}#s(s){return{name:s.Name,type:s.Type,shortDescription:s.ShortDescription??void 0,longDescription:s.LongDescription??void 0,deprecatedDescription:s.Deprecated??!1?s.DeprecationMessage??void 0:void 0,options:s.ValidValues,defaultValue:s.DefaultValue}}static \u0275fac=function(e){return new(e||r)};static \u0275prov=u({token:r,factory:r.\u0275fac,providedIn:"root"})};export{m as a};
@@ -0,0 +1 @@
1
+ import{a as $}from"./chunk-FJ2TDPI3.js";import{a as R}from"./chunk-67XQIEG5.js";import"./chunk-FBULENUD.js";import"./chunk-T3KWCIYP.js";import"./chunk-5CYNJ3KI.js";import"./chunk-FC45TEB6.js";import"./chunk-RHW5QVAY.js";import"./chunk-2YHX57UE.js";import"./chunk-3Q5JEF3K.js";import"./chunk-ZCT7SRIM.js";import"./chunk-OQHMS5HM.js";import{b as A,e as N}from"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{a as k,g as B}from"./chunk-5ER6KMMG.js";import{h as O}from"./chunk-XD6MBGQY.js";import"./chunk-HPZ6HLJE.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import"./chunk-DLVU5GHR.js";import{Fc as M,Hb as c,Ib as d,Jb as l,Mb as g,Nb as I,Oa as i,X as C,_a as p,bc as E,dc as L,la as r,pb as s,qb as u,rb as f,sb as S,tb as T,vb as F,wb as a,xb as _}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";function b(e,t){e&1&&l(0,2,1)}function P(e,t){e&1&&l(0,2,2)}function h(e,t){e&1&&l(0,2,3)}function v(e,t){e&1&&l(0,2,4)}function U(e,t){if(e&1&&(E(0),_(1,"br")),e&2){let n=t.$implicit;L(" ",n," ")}}var D=class e{#t=C(O);#e=C(A);#n=R(this.#e.params);runId=M(()=>this.#n()?.runId);offset=r(0);status=r("starting");messageLog=r([]);interval=setInterval(()=>{this.#t.getApiV1CommandlineByRunid({runid:this.runId(),offset:this.offset(),pagesize:100}).subscribe(t=>{this.offset.set(t.Count),this.evalStatus(t),this.messageLog.update(n=>[...n,...t.Items])})},1e3);evalStatus(t){t.Started===!0&&t.Finished===!0&&(this.status.set("finished"),clearInterval(this.interval)),t.Started===!0&&t.Finished===!1&&this.status.set("started")}abort(){this.#t.postApiV1CommandlineByRunidAbort({runid:this.runId()}).subscribe({next:t=>{this.status.set("aborted"),clearInterval(this.interval)}})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=p({type:e,selectors:[["app-commandline-result"]],decls:18,vars:4,consts:()=>{let t;t=$localize`${"\uFFFD#5\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#5\uFFFD"}:CLOSE_TAG_SPK_ICON: Back `;let n;n=$localize` Running commandline task... ${"\uFFFD#8\uFFFD"}:START_TAG_BUTTON:Abort${"\uFFFD/#8\uFFFD"}:CLOSE_TAG_BUTTON:`;let o;return o=$localize`${"\uFFFD*11:1\uFFFD"}:START_BLOCK_IF: Starting... ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*12:2\uFFFD"}:START_BLOCK_IF_1: Started! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*13:3\uFFFD"}:START_BLOCK_IF_2: Finished! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:${"\uFFFD*14:4\uFFFD"}:START_BLOCK_IF_3: Aborted! ${"[\uFFFD/*11:1\uFFFD|\uFFFD/*12:2\uFFFD|\uFFFD/*13:3\uFFFD|\uFFFD/*14:4\uFFFD]"}:CLOSE_BLOCK_IF:`,o=g(o),[t,n,o,[1,"back"],["type","button","spk-button","","routerLink","../",1,"small"],["type","button","spk-button","",1,"small",3,"click"],[1,"status"]]},template:function(n,o){n&1&&(_(0,"app-status-bar"),F(1,"section")(2,"div",3)(3,"button",4),c(4,0),_(5,"spk-icon"),d(),a()(),F(6,"h3"),c(7,1),F(8,"button",5),I("click",function(){return o.abort()}),a(),d(),a(),F(9,"div",6),c(10,2),s(11,b,1,0),s(12,P,1,0),s(13,h,1,0),s(14,v,1,0),d(),a(),F(15,"code"),S(16,U,2,1,null,null,f),a()()),n&2&&(i(11),u(o.status()==="starting"?11:-1),i(),u(o.status()==="started"?12:-1),i(),u(o.status()==="finished"?13:-1),i(),u(o.status()==="aborted"?14:-1),i(2),T(o.messageLog()))},dependencies:[$,k,B,N],styles:["[_nghost-%COMP%]{display:block}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;padding:2.5rem;gap:1.25rem}code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{D as default};
@@ -0,0 +1 @@
1
+ import{b as re}from"./chunk-67XQIEG5.js";import{a as ne}from"./chunk-T3KWCIYP.js";import"./chunk-5CYNJ3KI.js";import{a as ie}from"./chunk-FC45TEB6.js";import"./chunk-RHW5QVAY.js";import"./chunk-2YHX57UE.js";import{a as te}from"./chunk-3Q5JEF3K.js";import{b as oe,e as ae,i as le,s as _e}from"./chunk-ZCT7SRIM.js";import"./chunk-OQHMS5HM.js";import{d as q,e as H}from"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{a as J,e as Q,g as Y,i as Z}from"./chunk-5ER6KMMG.js";import{h as ee}from"./chunk-XD6MBGQY.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import{B as y,Bb as g,F as O,Fc as B,Jb as c,Kb as D,Lb as S,Lc as j,Mb as F,Nb as x,Oa as r,Ob as p,X as E,_a as $,_b as I,ba as C,bc as u,ca as m,gc as h,hc as L,ic as M,jc as w,kc as G,la as P,lc as X,n as U,pb as f,qb as T,qc as v,r as K,rc as z,ub as A,uc as V,vb as i,wb as o,xc as W}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";var ce=l=>["/backup",l,"export"],se=()=>["/"];function ue(l,_){if(l&1){let t=g();i(0,"section")(1,"h4"),c(2,4),o(),i(3,"p"),c(4,5),o(),i(5,"spk-checkbox",11),u(6," Delete local database "),i(7,"input",12),M("ngModelChange",function(e){C(t);let a=p();return L(a.deleteLocalDb,e)||(a.deleteLocalDb=e),m(e)}),o()()()}if(l&2){let t=p();r(7),h("ngModel",t.deleteLocalDb)}}function Ee(l,_){if(l&1){let t=g();i(0,"section")(1,"h4"),c(2,6),o(),i(3,"p"),c(4,7),V(5,"bytes"),o(),i(6,"spk-checkbox",11),u(7," Delete remote files "),i(8,"input",12),M("ngModelChange",function(e){C(t);let a=p();return L(a.deleteRemoteFiles,e)||(a.deleteRemoteFiles=e),m(e)}),o()()()}if(l&2){let t=p(),n=X(0),e=(n==null||n.Backup==null||n.Backup.Metadata==null?null:n.Backup.Metadata.TargetFileSize)??0;r(5),D(t.fileCount())(t.fileCount())(W(5,4,e,!0,!0)),S(4),r(3),h("ngModel",t.deleteRemoteFiles)}}var b=class l{#t=E(ee);#n=E(Q);#e=E(ne);#i=E(q);id=j.required();backup=B(()=>this.#e.getBackupById(this.id()));noLocalDbResource=re({params:()=>({dbPath:this.backup()?.Backup?.DBPath}),stream:({params:_})=>this.#t.postApiV1FilesystemValidate({requestBody:{path:_.dbPath}}).pipe(K(()=>!0),y(()=>U(!1)))});fileCount=B(()=>parseInt(this.backup()?.Backup?.Metadata?.TargetFileCount??"0",10));deleteLocalDb=P(!1);deleteRemoteFiles=P(!1);isDeleting=P(!1);deleteBackup(){let _=this.id(),t=this.deleteLocalDb(),n=this.deleteRemoteFiles();this.isDeleting.set(!0),this.#n.open(ie,{data:{title:$localize`Confirm delete`,message:$localize`Are you sure you want to delete this backup?`,confirmText:$localize`Delete backup`,cancelText:$localize`Cancel`},closed:e=>{e&&this.#e.deleteBackup({id:_,deleteLocalDb:t,deleteRemoteFiles:n}).pipe(O(()=>this.isDeleting.set(!1))).subscribe({next:()=>{this.#i.navigate(["/"])}})}})}static \u0275fac=function(t){return new(t||l)};static \u0275cmp=$({type:l,selectors:[["app-delete-backup"]],inputs:{id:[1,"id"]},decls:19,vars:11,consts:()=>{let _;_=$localize`Delete backup: ${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let t;t=$localize`Export configuration`;let n;n=$localize`If you want to use the backup later, you can export the configuration before deleting it.`;let e;e=$localize`Cancel`;let a;a=$localize`Delete local database`;let k;k=$localize` Each backup has a local database associated with it, which stores information about the remote backup on the local machine. When deleting a backup, you can also delete the local database without affecting the ability to restore the remote files. If you are using the local database for backups from the commandline, you should keep the database. `;let N;N=$localize`Delete remote files`;let d;d=$localize`{VAR_PLURAL, plural, =1 {1 file} other {{INTERPOLATION} files}}`,d=F(d,{INTERPOLATION:"\uFFFD1\uFFFD",VAR_PLURAL:"\uFFFD0\uFFFD"});let R;return R=$localize` Delete ${d}:ICU@@2159106180826349718: (${"\uFFFD2\uFFFD"}:INTERPOLATION_1:) from the remote storage? `,[_,t,n,e,a,k,N,R,["spk-button","",3,"routerLink"],[1,"actions"],["spk-button","",1,"raised","error",3,"click"],[1,"primary","raised"],["type","checkbox",3,"ngModelChange","ngModel"]]},template:function(t,n){if(t&1){let e=g();w(0),i(1,"h3"),c(2,0),o(),f(3,ue,8,1,"section"),i(4,"section")(5,"h4"),c(6,1),o(),i(7,"p"),c(8,2),o(),i(9,"button",8),u(10," Export configuration "),i(11,"spk-icon"),u(12,"caret-right"),o()()(),f(13,Ee,9,8,"section"),i(14,"div",9)(15,"button",8),c(16,3),o(),i(17,"button",10),x("click",function(){return C(e),m(n.deleteBackup())}),u(18,"Delete backup"),o()()}if(t&2){let e=G(n.backup()),a=n.noLocalDbResource.value();r(2),D(e==null||e.Backup==null?null:e.Backup.Name),S(2),r(),T(a?3:-1),r(6),A("routerLink",z(8,ce,n.id())),r(4),T(a?13:-1),r(2),A("routerLink",v(10,se)),r(2),I("loader",n.isDeleting())}},dependencies:[Z,Y,J,te,_e,oe,ae,le,H],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;padding:2.5rem;max-width:43.75rem}section[_ngcontent-%COMP%]{padding:2rem 0;display:flex;align-items:flex-start;flex-direction:column}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0}h4[_ngcontent-%COMP%]{font:var(--paragraph-20);margin-bottom:.5rem}p[_ngcontent-%COMP%]{margin-bottom:1rem}.actions[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:.5rem;padding:2rem 0}"],changeDetection:0})};export{b as default};
@@ -1 +1 @@
1
- import{ua as l}from"./chunk-EBXJGPRA.js";import{Z as p,jb as f}from"./chunk-4KE2I7OA.js";var m=class o{decimalPipe=p(l);transform(t,e=!1,i=!1){if(i&&t===0)return e?"0 Bytes":"0B";if(!t||t===0||(typeof t=="string"&&(t=parseInt(t)),isNaN(t)))return"";let a=this.#t(),n=a?["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"]:["Bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],r=Math.floor(Math.log(t)/Math.log(a?1e3:1024));r=Math.min(r,n.length-1);let c=t/Math.pow(a?1e3:1024,r),s=this.decimalPipe.transform(c,"1.0-2");return s?`${s} ${e?n[r]:n[r].replace("Bytes","B")}`:""}#t(){if(navigator.userAgentData?.platform.toLowerCase().includes("mac"))return!0;let t=["mac","macintosh","os x","apple"],e=((navigator.userAgent||navigator.platform||navigator.vendor)??"").toLowerCase();return e?t.some(i=>e.includes(i)):!1}static \u0275fac=function(e){return new(e||o)};static \u0275pipe=f({name:"bytes",type:o,pure:!0})};export{m as a};
1
+ import{qa as l}from"./chunk-GP2W7XZF.js";import{X as p,bb as f}from"./chunk-67YRCRMI.js";var m=class o{decimalPipe=p(l);transform(t,e=!1,i=!1){if(i&&t===0)return e?"0 Bytes":"0B";if(!t||t===0||(typeof t=="string"&&(t=parseInt(t)),isNaN(t)))return"";let a=this.#t(),n=a?["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"]:["Bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],r=Math.floor(Math.log(t)/Math.log(a?1e3:1024));r=Math.min(r,n.length-1);let c=t/Math.pow(a?1e3:1024,r),s=this.decimalPipe.transform(c,"1.0-2");return s?`${s} ${e?n[r]:n[r].replace("Bytes","B")}`:""}#t(){if(navigator.userAgentData?.platform.toLowerCase().includes("mac"))return!0;let t=["mac","macintosh","os x","apple"],e=((navigator.userAgent||navigator.platform||navigator.vendor)??"").toLowerCase();return e?t.some(i=>e.includes(i)):!1}static \u0275fac=function(e){return new(e||o)};static \u0275pipe=f({name:"bytes",type:o,pure:!0})};export{m as a};
@@ -0,0 +1 @@
1
+ import{a as O,c as P,e as E,i as v,k as N,s as I}from"./chunk-ZCT7SRIM.js";import{l as y,o as X,t as Y}from"./chunk-5ER6KMMG.js";import{Bb as x,Fc as m,Gc as h,Jb as F,Kb as A,Lb as D,Lc as c,Nb as W,Oa as s,Ob as M,Pb as T,Qb as d,Zb as j,_a as f,ba as $,bc as G,ca as k,db as w,ec as U,gc as g,hc as _,ic as C,la as l,ob as b,pc as S,rb as z,sb as R,tb as V,ub as p,vb as u,wb as a,yb as B,zb as L}from"./chunk-67YRCRMI.js";var Q=[[["label"]],[["","prefix",""]],[["","suffix",""]]],ee=["label","[prefix]","[suffix]"];function te(i,e){if(i&1&&G(0),i&2){let t=e.$implicit,n=M();U("",t.label,"",n.hasPerSecond()?"/s":"")}}var ne=[{value:"bytes",label:"Bytes"},{value:"KB",label:"KB"},{value:"MB",label:"MB"},{value:"GB",label:"GB"},{value:"TB",label:"TB"},{value:"PB",label:"PB"}],ie=["throttle-upload","throttle-download"],H=class i{customId=c();inputType=c();timespan=l(0);unit=l("MB");sizeOptions=l(ne);readonly=l(!1);hasPerSecond=m(()=>{let e=this.inputType();return e&&ie.includes(e)});onChange=()=>{};onTouched=()=>{};onChangeEffect=h(()=>{this.onChange(this.getValue())});writeValue(e){if(e){let t=e.match(/^(\d+)(bytes|kb|mb|gb|tb|pb|b)$/i);t?(this.timespan.set(parseInt(t[1],10)),this.unit.set(t[2].toUpperCase())):(this.timespan.set(0),this.unit.set("MB"))}else this.timespan.set(0),this.unit.set("MB")}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.readonly.set(e)}getValue(){return`${this.timespan()}${this.unit()}`}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=f({type:i,selectors:[["app-size"]],inputs:{customId:[1,"customId"],inputType:[1,"inputType"]},features:[S([{provide:O,useExisting:i,multi:!0}])],ngContentSelectors:ee,decls:9,vars:10,consts:[[1,"label"],["type","number",3,"ngModelChange","id","ngModel","disabled"],["value","value","label","label",3,"options","readonly","isClearable"],["type","text",3,"ngModelChange","ngModel"]],template:function(t,n){t&1&&(T(Q),u(0,"div",0),d(1,0,["ngProjectAs","label",5,["label"]]),a(),u(2,"spk-form-field")(3,"input",1),C("ngModelChange",function(o){return _(n.timespan,o)||(n.timespan=o),o}),a(),d(4,1),d(5,2),a(),u(6,"spk-select",2)(7,"input",3),C("ngModelChange",function(o){return _(n.unit,o)||(n.unit=o),o}),a(),w(8,te,1,2,"ng-template"),a()),t&2&&(s(2),b("readonly",n.readonly()||void 0),s(),p("id",n.customId()),g("ngModel",n.timespan),p("disabled",n.readonly()),s(3),j("--miw",0),p("options",n.sizeOptions())("readonly",n.readonly())("isClearable",!1),s(),g("ngModel",n.unit))},dependencies:[Y,y,I,P,N,E,v],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label label" "input unit";grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] spk-form-field[_ngcontent-%COMP%]{grid-area:input}[_nghost-%COMP%] spk-select[_ngcontent-%COMP%]{grid-area:unit}'],changeDetection:0})};var oe=[[["label"]],[["","prefix",""]],[["","suffix",""]]],se=["label","[prefix]","[suffix]"];function ae(i,e){if(i&1){let t=x();u(0,"button",7),W("click",function(){let r=$(t).$implicit,o=M();return k(o.updateUnit(r.value))}),F(1,1),a()}if(i&2){let t=e.$implicit;s(),A(t.label),D(1)}}var le=[{value:"s",label:$localize`Seconds`},{value:"m",label:$localize`Minutes`},{value:"h",label:$localize`Hours`}],re=[{value:"Y",label:$localize`Years`},{value:"M",label:$localize`Months`},{value:"W",label:$localize`Weeks`},{value:"D",label:$localize`Days`}],pe=["retry-delay","web-timeout","read-write-timeout","run-script-timeout","list-timeout","short-timeout"],K=class i{customId=c();inputType=c();timespan=l(0);#e="D";unit=l(this.#e);unitLabel=m(()=>{let e=this.timeOptions(),t=e.findIndex(n=>n.value===this.unit());return e[t]?.label??this.unit()});isShortTime=m(()=>{let e=this.inputType();return e&&pe.includes(e.replace("--",""))});timeOptions=m(()=>this.isShortTime()?le:re);readonly=l(!1);onChange=()=>{};onTouched=()=>{};onChangeEffect=h(()=>{this.onChange(this.getValue())});inputTypeEffect=h(()=>{let e=this.timeOptions(),t=this.isShortTime()?"s":"D";this.#e=t,this.unit.set(t)});updateUnit(e){this.unit.set(e)}writeValue(e){let t=this.isShortTime();if(e){let n=t?/(\d+)([smh])/i:/^(\d+)([YMWD])$/i,r=e.match(n);r?(this.timespan.set(parseInt(r[1],10)),this.unit.set(r[2])):(this.timespan.set(0),this.unit.set(this.#e))}else this.timespan.set(0),this.unit.set(this.#e)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.readonly.set(e)}getValue(){return`${this.timespan()}${this.unit()}`}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=f({type:i,selectors:[["app-timespan"]],inputs:{customId:[1,"customId"],inputType:[1,"inputType"]},features:[S([{provide:O,useExisting:i,multi:!0}])],ngContentSelectors:se,decls:11,vars:6,consts:()=>{let e;e=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`;let t;return t=$localize`${"\uFFFD0\uFFFD"}:INTERPOLATION:`,[e,t,["type","number",3,"ngModelChange","id","ngModel","disabled"],[3,"openIndicator"],["spk-button","","type","button",1,"trigger"],["menu",""],["spk-button","","type","button",1,"small"],["spk-button","","type","button",1,"small",3,"click"]]},template:function(t,n){t&1&&(T(oe),d(0,0,["ngProjectAs","label",5,["label"]]),u(1,"spk-form-field")(2,"input",2),C("ngModelChange",function(o){return _(n.timespan,o)||(n.timespan=o),o}),a(),d(3,1),d(4,2),a(),u(5,"spk-menu",3)(6,"button",4),F(7,0),a(),B(8,5),R(9,ae,2,1,"button",6,z),L(),a()),t&2&&(s(),b("readonly",n.readonly()||void 0),s(),p("id",n.customId()),g("ngModel",n.timespan),p("disabled",n.readonly()),s(3),p("openIndicator",!0),s(2),A(n.unitLabel()),D(7),s(2),V(n.timeOptions()))},dependencies:[X,y,I,P,N,E,v],styles:['[_nghost-%COMP%]{display:grid;grid-template-areas:"label label" "input unit";grid-template-columns:3fr 1fr;gap:.5rem;align-items:flex-end}[_nghost-%COMP%] .label[_ngcontent-%COMP%]{grid-area:label;grid-column:1/-1}[_nghost-%COMP%] spk-form-field[_ngcontent-%COMP%]{grid-area:input}[_nghost-%COMP%] spk-menu[_ngcontent-%COMP%]{grid-area:unit}[_nghost-%COMP%] spk-menu[_ngcontent-%COMP%] button.trigger[_ngcontent-%COMP%]{width:100%}'],changeDetection:0})};export{H as a,K as b};
@@ -0,0 +1 @@
1
+ import{a as D}from"./chunk-67XQIEG5.js";import{a as R}from"./chunk-5CYNJ3KI.js";import"./chunk-2YHX57UE.js";import"./chunk-OQHMS5HM.js";import"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import{a as F,g as U,p as w}from"./chunk-5ER6KMMG.js";import{h as L}from"./chunk-XD6MBGQY.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import{Bb as S,F as d,Fc as O,Jb as E,Kb as x,La as T,Lb as M,Nb as k,Oa as l,Ob as _,X as m,_a as G,_b as P,ba as u,bc as s,ca as g,cc as b,la as C,pb as p,qb as c,r as A,ub as N,vb as a,wb as o,xb as f}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";function y(n,i){n&1&&f(0,"spk-progress-bar",2)}function V(n,i){if(n&1&&(a(0,"a",6)(1,"spk-icon"),s(2,"download"),o(),s(3," Download update "),o()),n&2){let e,t=_(2);N("href",(e=t.serverState())==null?null:e.UpdateDownloadLink,T)}}function $(n,i){if(n&1){let e=S();a(0,"button",5),k("click",function(){u(e);let r=_();return g(r.checkForUpdates())}),s(1,"Check for updates"),o(),p(2,V,4,1,"a",6)}if(n&2){let e,t=_();P("loader",t.checkingForUpdates()),l(2),c((e=t.serverState())!=null&&e.UpdateDownloadLink?2:-1)}}function I(n,i){if(n&1){let e=S();a(0,"button",5),k("click",function(){u(e);let r=_();return g(r.checkForUpdates())}),s(1,"Checking for updates \u2026"),o()}}function B(n,i){n&1&&f(0,"spk-progress-bar",2)}var h=class n{#e=m(L);#t=m(R);isLoading=C(!0);checkingForUpdates=C(!1);serverState=this.#t.serverState;duplicatiVersion=O(()=>this.#t.serverState()?.UpdatedVersion);generalInfo=D(this.#e.getApiV1Acknowledgements().pipe(A(i=>i.Acknowledgements),d(()=>this.isLoading.set(!1))));checkForUpdates(){this.checkingForUpdates.set(!0),this.#e.postApiV1UpdatesCheck().pipe(d(()=>this.checkingForUpdates.set(!1))).subscribe()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=G({type:n,selectors:[["app-general"]],decls:12,vars:5,consts:()=>{let i;i=$localize`General`;let e;return e=$localize`You're running Duplicati with - ${"\uFFFD0\uFFFD"}:INTERPOLATION:`,[i,e,[1,"indeterminate","primary"],[1,"actions"],["spk-button",""],["spk-button","",3,"click"],["spk-button","","target","_blank",1,"primary","raised",3,"href"]]},template:function(e,t){if(e&1&&(p(0,y,1,0,"spk-progress-bar",2),a(1,"section")(2,"h3"),E(3,0),o(),a(4,"p"),E(5,1),o(),a(6,"div",3),p(7,$,3,3)(8,I,2,0,"button",4),p(9,B,1,0,"spk-progress-bar",2),o(),a(10,"div"),s(11),o()()),e&2){let r,v;c(t.isLoading()?0:-1),l(5),x(t.duplicatiVersion()),M(5),l(2),c(((r=t.serverState())==null?null:r.UpdaterState)==="Waiting"?7:((r=t.serverState())==null?null:r.UpdaterState)==="Checking"?8:-1),l(2),c(((v=t.serverState())==null?null:v.UpdaterState)==="Downloading"?9:-1),l(2),b(t.generalInfo())}},dependencies:[w,U,F],styles:["[_nghost-%COMP%]{display:block;position:relative}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}section[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{white-space:pre-wrap}spk-progress-bar[_ngcontent-%COMP%]{position:absolute;top:0;left:0;right:0}.actions[_ngcontent-%COMP%]{display:flex;gap:.5rem}"],changeDetection:0})};export{h as default};
@@ -0,0 +1 @@
1
+ import{f as a,g as b}from"./chunk-53F47EOA.js";import"./chunk-XLVTJGQW.js";import"./chunk-4JHY2ZIQ.js";import"./chunk-5RPDEEQ3.js";import"./chunk-67XQIEG5.js";import"./chunk-FC45TEB6.js";import"./chunk-RHW5QVAY.js";import"./chunk-2YHX57UE.js";import"./chunk-ZCT7SRIM.js";import"./chunk-DQM3ATT4.js";import"./chunk-BSRYIN2F.js";import"./chunk-5ER6KMMG.js";import"./chunk-XD6MBGQY.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";export{a as createSourceDataForm,b as default};
@@ -1 +1 @@
1
- import{a as u}from"./chunk-H5MGVT7B.js";import{Db as o,Eb as n,Ua as g,Vb as h,Xb as _,Yb as a,bb as d,gb as p,jc as c,lb as m,sa as r,wb as f,zb as C}from"./chunk-4KE2I7OA.js";var v=[[["","title",""]],[["","description",""]],[["","action",""]],"*"],P=["[title]","[description]","[action]","*"];function M(e,s){e&1&&c(0,"Title")}function T(e,s){e&1&&(o(0,"spk-icon"),c(1,"caret-down"),n())}var l=class e{isActive=d(!1);disallowToggle=r(!1);ngOnInit(){this.disallowToggle()&&this.isActive.set(!0)}toggle(){this.isActive.set(!this.isActive())}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=p({type:e,selectors:[["app-toggle-card"]],hostVars:2,hostBindings:function(t,i){t&2&&f("active",i.isActive())},inputs:{isActive:[1,"isActive"],disallowToggle:[1,"disallowToggle"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:P,decls:11,vars:1,consts:[[1,"title"],[3,"click"],[1,"actions"],[1,"content"]],template:function(t,i){t&1&&(_(v),o(0,"header")(1,"div",0)(2,"h3",1),h("click",function(){return i.disallowToggle()||i.toggle()}),a(3,0,null,M,1,0),m(5,T,2,0,"spk-icon"),n(),a(6,1),n(),o(7,"div",2),a(8,2),n()(),o(9,"div",3),a(10,3),n()),t&2&&(g(5),C(i.disallowToggle()?-1:5))},dependencies:[u],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;border-radius:var(--shape-3);background-color:var(--base-2)}.active[_nghost-%COMP%] .content[_ngcontent-%COMP%]{max-height:1000px;transition:max-height 1s linear;padding:0 1rem 1rem}.active[_nghost-%COMP%] spk-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}[_nghost-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;font:var(--paragraph-10);cursor:pointer;-webkit-user-select:none;user-select:none}[_nghost-%COMP%] spk-icon[_ngcontent-%COMP%]{transform:rotate(0);transform-origin:center;transition:transform .2s ease}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem}header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;flex:1 0}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]:empty{display:none}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:0 1rem;overflow:hidden;max-height:0;transition:max-height .25s linear,padding .25s linear}.content[_ngcontent-%COMP%]:empty{display:none}"],changeDetection:0})};export{l as a};
1
+ import{a as u}from"./chunk-5ER6KMMG.js";import{Lc as h,Nb as m,Oa as r,Oc as _,Pb as f,Qb as a,_a as g,_b as C,bc as s,pb as d,qb as p,vb as o,wb as n}from"./chunk-67YRCRMI.js";var v=[[["","title",""]],[["","description",""]],[["","action",""]],"*"],P=["[title]","[description]","[action]","*"];function M(e,c){e&1&&s(0,"Title")}function T(e,c){e&1&&(o(0,"spk-icon"),s(1,"caret-down"),n())}var l=class e{isActive=_(!1);disallowToggle=h(!1);ngOnInit(){this.disallowToggle()&&this.isActive.set(!0)}toggle(){this.isActive.set(!this.isActive())}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=g({type:e,selectors:[["app-toggle-card"]],hostVars:2,hostBindings:function(t,i){t&2&&C("active",i.isActive())},inputs:{isActive:[1,"isActive"],disallowToggle:[1,"disallowToggle"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:P,decls:11,vars:1,consts:[[1,"title"],[3,"click"],[1,"actions"],[1,"content"]],template:function(t,i){t&1&&(f(v),o(0,"header")(1,"div",0)(2,"h3",1),m("click",function(){return i.disallowToggle()||i.toggle()}),a(3,0,null,M,1,0),d(5,T,2,0,"spk-icon"),n(),a(6,1),n(),o(7,"div",2),a(8,2),n()(),o(9,"div",3),a(10,3),n()),t&2&&(r(5),p(i.disallowToggle()?-1:5))},dependencies:[u],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;border-radius:var(--shape-3);background-color:var(--base-2)}.active[_nghost-%COMP%] .content[_ngcontent-%COMP%]{max-height:1000px;transition:max-height 1s linear;padding:0 1rem 1rem}.active[_nghost-%COMP%] spk-icon[_ngcontent-%COMP%]{transform:rotate(180deg)}[_nghost-%COMP%] h3[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;font:var(--paragraph-10);cursor:pointer;-webkit-user-select:none;user-select:none}[_nghost-%COMP%] spk-icon[_ngcontent-%COMP%]{transform:rotate(0);transform-origin:center;transition:transform .2s ease}header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem}header[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;flex:1 0}header[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]:empty{display:none}.content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:0 1rem;overflow:hidden;max-height:0;transition:max-height .25s linear,padding .25s linear}.content[_ngcontent-%COMP%]:empty{display:none}"],changeDetection:0})};export{l as a};
@@ -0,0 +1,2 @@
1
+ import{a as q}from"./chunk-67XQIEG5.js";import{a as W,d as X,g as z}from"./chunk-5ER6KMMG.js";import{h as J}from"./chunk-XD6MBGQY.js";import"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import{Bb as f,Gc as G,Hb as A,Ib as D,Jb as y,La as k,Nb as C,Oa as r,Ob as S,X as h,_a as F,ba as d,bc as s,ca as _,cc as I,dc as L,ec as w,gc as N,hc as $,ic as B,la as m,mc as V,pb as v,qb as M,qc as U,r as E,rb as P,sb as R,tb as x,ub as g,vb as o,wb as a,xb as u}from"./chunk-67YRCRMI.js";import{a as O,b as T}from"./chunk-EUDKD2JW.js";var K=()=>({maxWidth:"700px",width:"100%"});function j(l,t){if(l&1&&(o(0,"a",9)(1,"spk-icon"),s(2,"link"),a()()),l&2){let e=S().$implicit;g("href",V(e.Url),k)}}function H(l,t){if(l&1){let e=f();o(0,"div",2)(1,"h4"),s(2),v(3,j,3,2,"a",9),a(),o(4,"p"),s(5),u(6,"br"),o(7,"i"),s(8),a()(),o(9,"div",10)(10,"button",11),C("click",function(){let i=d(e).$implicit,c=S();return _(c.openLicense(i))}),A(11,1),u(12,"spk-icon"),D(),a()()()}if(l&2){let e=t.$implicit;r(2),w(" ",e.Title," - ",e.data==null?null:e.data.license," "),r(),M(e.Url?3:-1),r(2),L(" ",e.data==null?null:e.data.description," "),r(3),I(e.data==null?null:e.data.notes)}}var b=class l{#e=h(J);licenses=q(this.#e.getApiV1Licenses().pipe(E(t=>t.map(e=>T(O({},e),{data:e.Jsondata?JSON.parse(e.Jsondata):null})))));dialogIsOpen=m(!1);dialogLicense=m(null);#t=G(()=>{this.dialogLicense()&&this.dialogIsOpen.set(!0)});openLicense(t){this.dialogLicense.set(t)}closeLicense(){this.dialogIsOpen.set(!1),this.dialogLicense.set(null)}breakIntoLines(t){let e=t.split(`
2
+ `),n="";for(let i=0;i<e.length;i++)n+=`<li>${e[i]}</li>`;return n}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=F({type:l,selectors:[["app-libraries"]],decls:14,vars:5,consts:()=>{let t;t=$localize`Libraries`;let e;return e=$localize` Details ${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-square-in${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[t,e,[1,"license"],[3,"isOpenChange","isOpen","options"],["header",""],["content",""],[1,"license-dialog"],["footer",""],["spk-button","","type","button",3,"click"],[3,"href"],[1,"actions"],["spk-button","",3,"click"]]},template:function(e,n){if(e&1){let i=f();o(0,"h3"),y(1,0),a(),R(2,H,13,5,"div",2,P),o(4,"spk-dialog",3),B("isOpenChange",function(p){return d(i),$(n.dialogIsOpen,p)||(n.dialogIsOpen=p),_(p)}),o(5,"header",4)(6,"h3"),s(7),a()(),o(8,"div",5)(9,"div",6),s(10),a()(),o(11,"footer",7)(12,"button",8),C("click",function(){return d(i),n.dialogLicense.set(null),_(n.dialogIsOpen.set(!1))}),s(13,"Close"),a()()()}if(e&2){let i,c;r(2),x(n.licenses()),r(2),N("isOpen",n.dialogIsOpen),g("options",U(4,K)),r(3),I((i=n.dialogLicense())==null?null:i.Title);let p=((c=n.dialogLicense())==null?null:c.License)??"";r(3),L(" ",p," ")}},dependencies:[W,z,X],styles:["[_nghost-%COMP%]{display:block}h3[_ngcontent-%COMP%]{font:var(--title-30);margin:0 0 1.25rem}h4[_ngcontent-%COMP%]{font:var(--paragraph-10)}a[_ngcontent-%COMP%]{text-decoration:none}.license[_ngcontent-%COMP%]{padding:1rem;border-bottom:1px solid var(--base-4);display:flex;flex-direction:column;align-items:flex-start;gap:.5rem}.license[_ngcontent-%COMP%]:first-of-type{border-top:1px solid var(--base-4)}.license[_ngcontent-%COMP%] .actions[_ngcontent-%COMP%]{display:flex;gap:.25rem;align-items:center}.license-dialog[_ngcontent-%COMP%]{background-color:var(--base-1);color:var(--base-12);padding:2.5rem 2.5rem 2.5rem 1.5rem;border-radius:var(--shape-3);overflow:auto;max-height:31.25rem;white-space:pre;border:1px solid var(--base-4)}"],changeDetection:0})};export{b as default};
@@ -0,0 +1 @@
1
+ import{a as ut}from"./chunk-XLVTJGQW.js";import{a as Re}from"./chunk-4JHY2ZIQ.js";import{a as rt,b as Ve,c as _t}from"./chunk-5RPDEEQ3.js";import{a as ae}from"./chunk-67XQIEG5.js";import{a as ot}from"./chunk-FC45TEB6.js";import{a as Ee}from"./chunk-2YHX57UE.js";import{b as Te,c as Q,d as fe,e as Z,f as Ae,h as lt,i as oe,j as he,k as Pe,n as at,o as Ne,p as st,q as De,r as Me,s as le,t as ye}from"./chunk-ZCT7SRIM.js";import{b as ne,d as H}from"./chunk-DQM3ATT4.js";import{A as Se,C as nt,a as j,b as Je,e as et,g as ie,l as q,p as tt,t as Y}from"./chunk-5ER6KMMG.js";import{h as it}from"./chunk-XD6MBGQY.js";import{Bb as x,F as we,Fc as R,Gc as me,Hb as g,Ib as C,Jb as T,Kc as ve,Lc as Be,Mb as Ue,Mc as Fe,Nb as F,Oa as r,Ob as u,S as pe,Wb as de,X as D,Xb as ge,Yb as Ge,_a as z,_b as Ce,ba as c,bc as I,ca as p,cc as xe,db as Ye,dc as Ze,gc as O,hc as $,ic as w,la as m,ob as Qe,pb as M,qb as y,qc as be,rb as ke,sb as Le,tb as Ie,ub as E,vb as a,wb as s,xb as d,yb as v,zb as B}from"./chunk-67YRCRMI.js";import{a as G,b as W}from"./chunk-EUDKD2JW.js";var Oe=class l{fromString(t){if(!t)return null;let e=t.match(/(\d+)([smhDWMY])/);return e&&{value:parseInt(e[1]),unit:e[2]}}toString(t,e){return`${t}${e}`}static \u0275fac=function(e){return new(e||l)};static \u0275prov=pe({token:l,factory:l.\u0275fac,providedIn:"root"})};function Ct(l,t){if(l&1){let e=x();a(0,"div",24)(1,"spk-form-field")(2,"label",25),T(3,7),s(),a(4,"input",26,0),w("ngModelChange",function(i){c(e);let o=u();return $(o.scheduleFields.nextTime().time,i)||(o.scheduleFields.nextTime().time=i),p(i)}),F("focus",function(){c(e);let i=Ge(5);return p(i.showPicker())}),s(),a(6,"spk-icon",27),I(7,"clock"),s()(),a(8,"spk-form-field"),d(9,"label",28),a(10,"input",29,1),w("ngModelChange",function(i){c(e);let o=u();return $(o.scheduleFields.nextTime().date,i)||(o.scheduleFields.nextTime().date=i),p(i)}),F("focus",function(){c(e);let i=Ge(11);return p(i.showPicker())}),s(),a(12,"spk-icon",27),I(13,"calendar"),s()()(),a(14,"div",24)(15,"spk-form-field")(16,"label",30),T(17,8),s(),a(18,"input",31),w("ngModelChange",function(i){c(e);let o=u();return $(o.scheduleFields.runAgain().repeatValue,i)||(o.scheduleFields.runAgain().repeatValue=i),p(i)}),s()(),a(19,"spk-select",32)(20,"input",33),w("ngModelChange",function(i){c(e);let o=u();return $(o.scheduleFields.runAgain().repeatUnit,i)||(o.scheduleFields.runAgain().repeatUnit=i),p(i)}),s()()(),a(21,"app-toggle-card",34),v(22,35),T(23,9),B(),a(24,"div",36)(25,"spk-toggle",19),g(26,10),a(27,"input",20),w("ngModelChange",function(i){c(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.mon,i)||(o.scheduleFields.runAgain().allowedDays.mon=i),p(i)}),s(),C(),s(),a(28,"spk-toggle",19),g(29,11),a(30,"input",20),w("ngModelChange",function(i){c(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.tue,i)||(o.scheduleFields.runAgain().allowedDays.tue=i),p(i)}),s(),C(),s(),a(31,"spk-toggle",19),g(32,12),a(33,"input",20),w("ngModelChange",function(i){c(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.wed,i)||(o.scheduleFields.runAgain().allowedDays.wed=i),p(i)}),s(),C(),s(),a(34,"spk-toggle",19),g(35,13),a(36,"input",20),w("ngModelChange",function(i){c(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.thu,i)||(o.scheduleFields.runAgain().allowedDays.thu=i),p(i)}),s(),C(),s(),a(37,"spk-toggle",19),g(38,14),a(39,"input",20),w("ngModelChange",function(i){c(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.fri,i)||(o.scheduleFields.runAgain().allowedDays.fri=i),p(i)}),s(),C(),s(),a(40,"spk-toggle",19),g(41,15),a(42,"input",20),w("ngModelChange",function(i){c(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.sat,i)||(o.scheduleFields.runAgain().allowedDays.sat=i),p(i)}),s(),C(),s(),a(43,"spk-toggle",19),g(44,16),a(45,"input",20),w("ngModelChange",function(i){c(e);let o=u();return $(o.scheduleFields.runAgain().allowedDays.sun,i)||(o.scheduleFields.runAgain().allowedDays.sun=i),p(i)}),s(),C(),s()()()}if(l&2){let e=u();r(4),O("ngModel",e.scheduleFields.nextTime().time),r(6),O("ngModel",e.scheduleFields.nextTime().date),r(8),O("ngModel",e.scheduleFields.runAgain().repeatValue),r(),E("options",e.unitOptions)("isClearable",!1),r(),O("ngModel",e.scheduleFields.runAgain().repeatUnit),r(),E("disallowToggle",!0),r(6),O("ngModel",e.scheduleFields.runAgain().allowedDays.mon),r(3),O("ngModel",e.scheduleFields.runAgain().allowedDays.tue),r(3),O("ngModel",e.scheduleFields.runAgain().allowedDays.wed),r(3),O("ngModel",e.scheduleFields.runAgain().allowedDays.thu),r(3),O("ngModel",e.scheduleFields.runAgain().allowedDays.fri),r(3),O("ngModel",e.scheduleFields.runAgain().allowedDays.sat),r(3),O("ngModel",e.scheduleFields.runAgain().allowedDays.sun)}}var mt=[{key:"s",label:$localize`Seconds`},{key:"m",label:$localize`Minutes`},{key:"h",label:$localize`Hours`},{key:"D",label:$localize`Days`},{key:"W",label:$localize`Weeks`},{key:"M",label:$localize`Months`},{key:"Y",label:$localize`Years`}],te={autoRun:!0,nextTime:{time:"13:00",date:new Date().toISOString().split("T")[0]},runAgain:{repeatValue:1,repeatUnit:"D",allowedDays:{mon:!1,tue:!1,wed:!1,thu:!1,fri:!1,sat:!1,sun:!1}}},Ke=class l{#e=D(J);#t=D(H);#i=D(ne);unitOptions=mt;scheduleFields=this.#e.scheduleFields;goBack(){this.#t.navigate(["source-data"],{relativeTo:this.#i.parent})}next(){this.#e.isNew()||this.#e.submit(!0),this.#t.navigate(["options"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=z({type:l,selectors:[["app-schedule"]],decls:16,vars:2,consts:()=>{let t;t=$localize`Schedule`;let e;e=$localize` Automatically run backups ${"\uFFFD#5\uFFFD\uFFFD/#5\uFFFD"}:TAG_INPUT:`;let n;n=$localize`If a date was missed, the job will run as soon as possible.`;let i;i=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let o;o=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let _;_=$localize`Next time`;let S;S=$localize`Run again every`;let A;A=$localize`Allowed days`;let k;k=$localize` Monday ${"\uFFFD#27\uFFFD\uFFFD/#27\uFFFD"}:TAG_INPUT:`;let U;U=$localize` Tuesday ${"\uFFFD#30\uFFFD\uFFFD/#30\uFFFD"}:TAG_INPUT:`;let h;h=$localize` Wednesday ${"\uFFFD#33\uFFFD\uFFFD/#33\uFFFD"}:TAG_INPUT:`;let L;L=$localize` Thursday ${"\uFFFD#36\uFFFD\uFFFD/#36\uFFFD"}:TAG_INPUT:`;let K;K=$localize` Friday ${"\uFFFD#39\uFFFD\uFFFD/#39\uFFFD"}:TAG_INPUT:`;let b;b=$localize` Saturday ${"\uFFFD#42\uFFFD\uFFFD/#42\uFFFD"}:TAG_INPUT:`;let X;return X=$localize` Sunday ${"\uFFFD#45\uFFFD\uFFFD/#45\uFFFD"}:TAG_INPUT:`,[["timeRef",""],["dateRef",""],t,e,n,i,o,_,S,A,k,U,h,L,K,b,X,[1,"title-30"],[1,"toggle-wrap"],[1,"raised","primary"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","",1,"raised","primary",3,"click"],[1,"row-inputs"],["for","time"],["type","time","id","time",3,"ngModelChange","focus","ngModel"],["suffix",""],["for","date"],["type","date","id","date",3,"ngModelChange","focus","ngModel"],["for","repeatValue"],["type","number","id","repeatValue",3,"ngModelChange","ngModel"],["value","key","label","label",3,"options","isClearable"],["type","text","id","repeatUnit",3,"ngModelChange","ngModel"],[3,"disallowToggle"],["title",""],[1,"days-wrap"]]},template:function(e,n){e&1&&(a(0,"h3",17),T(1,2),s(),a(2,"div",18)(3,"spk-toggle",19),g(4,3),a(5,"input",20),w("ngModelChange",function(o){return $(n.scheduleFields.autoRun,o)||(n.scheduleFields.autoRun=o),o}),s(),C(),s(),a(6,"p"),T(7,4),s()(),M(8,Ct,46,14),a(9,"div",21)(10,"button",22),F("click",function(){return n.goBack()}),g(11,5),d(12,"spk-icon"),C(),s(),a(13,"button",23),F("click",function(){return n.next()}),g(14,6),d(15,"spk-icon"),C(),s()()),e&2&&(r(5),O("ngModel",n.scheduleFields.autoRun),r(3),y(n.scheduleFields.autoRun()?8:-1))},dependencies:[le,Q,Pe,Te,Z,oe,q,Se,j,ie,Y,Re],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem 2.5rem 1.5rem;display:flex;flex-direction:column;gap:1.5rem}.toggle-wrap[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem}.row-inputs[_ngcontent-%COMP%]{display:flex;align-items:flex-end;gap:.5rem}.row-inputs[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{flex:1 0}.days-wrap[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}"],changeDetection:0})};function Ft(l,t){if(l&1&&(v(0,4),I(1),B()),l&2){let e,n=u();r(),xe((e=n.currentExpressionOption())==null?null:e.startsWith)}}function St(l,t){if(l&1&&(v(0,5),I(1),B()),l&2){let e,n=u();r(),xe((e=n.currentExpressionOption())==null?null:e.endsWith)}}var Et=[{key:"Excludes folders where name contains",value:"-FolderName"},{key:"Excludes folder",value:"-Folder"},{key:"Excludes files where name contains",value:"-FileName"},{key:"Excludes file extension",value:"-Extension"},{key:"Excludes files where name matches regex",value:"-Regex"},{key:"Includes files where name matches regex",value:"+Regex"},{key:"Excludes file group",value:"-FileGroup"},{key:"Includes expression",value:"+Expression"},{key:"Excludes expression",value:"-Expression"},{key:"None",value:"-Unknown"}],$e=class l{path=Be.required();osType=Be();pathChange=ve();remove=ve();internalPath=m("");pathType=m("-Expression");currentExpressionOption=R(()=>{let t=this.pathType();return this.expressionOptions().find(e=>e.value===t)});expressionOptions=R(()=>{let e=this.osType()==="Windows"?"\\":"/";return Et.map(n=>n.value==="-Folder"||n.value==="+Folder"?W(G({},n),{startsWith:"",endsWith:""}):n.value==="-FolderName"||n.value==="+FolderName"?W(G({},n),{startsWith:"*",endsWith:`*${e}`}):n.value==="-FileName"||n.value==="+FileName"?W(G({},n),{startsWith:"[.*",endsWith:`[^\\${e}]*]`}):n.value==="-FileGroup"||n.value==="+FileGroup"?W(G({},n),{startsWith:"{",endsWith:"}"}):n.value==="-Regex"||n.value==="+Regex"?W(G({},n),{startsWith:"[",endsWith:"]"}):n.value==="-Extension"||n.value==="+Extension"?W(G({},n),{startsWith:"*.",endsWith:""}):W(G({},n),{startsWith:"",endsWith:""}))});pathEffect=me(()=>{let t=this.path(),e=t.slice(1),n=t.startsWith("-")?"-":"+",i=this.osType()==="Windows",o=i?"\\":"/";e.startsWith("%")&&e.endsWith(o)||i&&e.slice(2).startsWith(o)&&e.endsWith(o)||e.startsWith(o)&&e.endsWith(o)?(this.pathType.set(`${n}Folder`),this.internalPath.set(e)):e.startsWith("*")&&e.endsWith(`*${o}`)?(this.pathType.set(`${n}FolderName`),this.internalPath.set(e.slice(1,-2))):e.startsWith("[.*")&&e.endsWith(`[^\\${o}]*]`)?(this.pathType.set(`${n}FileName`),this.internalPath.set(e.slice(3,-7))):e.startsWith("{")&&e.endsWith("}")?(this.pathType.set(`${n}FileGroup`),this.internalPath.set(e.slice(1,-1))):e.startsWith("[")&&e.endsWith("]")?(this.pathType.set(`${n}Regex`),this.internalPath.set(e.slice(1,-1))):e.startsWith("*.")?(this.pathType.set(`${n}Extension`),this.internalPath.set(e.slice(2))):(this.pathType.set(`${n}Expression`),this.internalPath.set(e))});updateFilter(){let t=this.internalPath(),e=this.currentExpressionOption();t!==""&&this.pathChange.emit(`${e?.value.slice(0,1)}${e?.startsWith??""}${t}${e?.endsWith??""}`)}removeFilter(){this.remove.emit()}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=z({type:l,selectors:[["app-new-filter"]],inputs:{path:[1,"path"],osType:[1,"osType"]},outputs:{pathChange:"pathChange",remove:"remove"},decls:9,vars:6,consts:()=>{let t;return t=$localize`Select an option...`,[["value","value","label","key",3,"options","isClearable"],["type","text","placeholder",t,3,"ngModelChange","ngModel"],[1,"expression-input"],["type","text",3,"ngModelChange","ngModel"],["prefix",""],["suffix",""],[1,"filter-removal",3,"click"],[1,"spk-primary"]]},template:function(e,n){if(e&1&&(a(0,"spk-select",0)(1,"input",1),w("ngModelChange",function(o){return $(n.pathType,o)||(n.pathType=o),o}),F("ngModelChange",function(){return n.updateFilter()}),s()(),a(2,"spk-form-field",2)(3,"input",3),w("ngModelChange",function(o){return $(n.internalPath,o)||(n.internalPath=o),o}),F("ngModelChange",function(){return n.updateFilter()}),s(),M(4,Ft,2,1,"ng-container",4),M(5,St,2,1,"ng-container",5),s(),a(6,"div",6),F("click",function(){return n.removeFilter()}),a(7,"spk-icon",7),I(8,"x-circle"),s()()),e&2){let i,o;E("options",n.expressionOptions())("isClearable",!1),r(),O("ngModel",n.pathType),r(2),O("ngModel",n.internalPath),r(),y(!((i=n.currentExpressionOption())==null||i.startsWith==null)&&i.startsWith.length?4:-1),r(),y(!((o=n.currentExpressionOption())==null||o.endsWith==null)&&o.endsWith.length?5:-1)}},dependencies:[le,Q,Z,oe,Y,q,j],styles:["[_nghost-%COMP%]{display:grid;grid-template-columns:13.125rem 1fr 1.875rem;gap:.5rem;align-items:flex-end}.expression-input[_ngcontent-%COMP%]{--ff-suffix-bg: var(--base-2)}.filter-removal[_ngcontent-%COMP%]{cursor:pointer;display:flex;align-items:center;justify-content:center;height:2.5rem;flex:0 0}"],changeDetection:0})};var Tt=["formRef"],ct=()=>({standalone:!0});function ft(l,t){if(l&1){let e=x();a(0,"spk-form-field",42)(1,"input",43),w("ngModelChange",function(i){c(e);let o=u(2);return $(o.editingPath,i)||(o.editingPath=i),p(i)}),s()(),a(2,"button",44),F("click",function(){c(e);let i=u(2);return p(i.updatePath())}),a(3,"spk-icon"),I(4,"floppy-disk"),s()(),a(5,"button",44),F("click",function(){c(e);let i=u(2);return p(i.cancelEditPath())}),a(6,"spk-icon"),I(7,"x-bold"),s()()}if(l&2){let e=u(2);r(),O("ngModel",e.editingPath),E("ngModelOptions",be(2,ct))}}function At(l,t){if(l&1){let e=x();a(0,"spk-form-field",42),d(1,"input",45),s(),a(2,"button",44),F("click",function(){c(e);let i=u().$implicit,o=u();return p(o.editPath(i))}),a(3,"spk-icon"),I(4,"pen"),s()(),a(5,"button",44),F("click",function(){c(e);let i=u().$implicit,o=u();return p(o.removePath(i))}),a(6,"spk-icon"),I(7,"trash-simple"),s()()}if(l&2){let e=u().$implicit;Qe("readonly",!0),r(),E("ngModel",e)("ngModelOptions",be(3,ct))}}function ht(l,t){if(l&1&&(a(0,"div",30),M(1,ft,8,3)(2,At,8,4),s()),l&2){let e=t.$implicit,n=u();r(),y(n.oldPath()===e?1:2)}}function Pt(l,t){if(l&1){let e=x();a(0,"app-new-filter",47),F("pathChange",function(i){let o=c(e).$index,_=u(2);return p(_.patchPathAt(i,o))})("remove",function(){let i=c(e).$index,o=u(2);return p(o.removePathAt(i))}),s()}if(l&2){let e=t.$implicit,n=u(2);E("path",e)("osType",n.osType()??"")}}function Nt(l,t){if(l&1&&Le(0,Pt,1,2,"app-new-filter",46,ke),l&2){let e=u();Ie(e.pathArray())}}function Dt(l,t){if(l&1&&(a(0,"div",41)(1,"spk-form-field"),d(2,"input",48),s(),a(3,"spk-select",49),d(4,"input",50),s()()),l&2){let e=u();r(3),E("options",e.sizeOptions())("isClearable",!1)}}var V=new Me,Mt=["Bytes","KB","MB","GB","TB","PB"],pt=(l={path:"",filters:[],excludes:{hidden:!1,system:!1,temporary:!1,filesLargerThan:null}})=>V.group({path:V.control(l.path),excludes:V.group({hidden:V.control(l.excludes.hidden),system:V.control(l.excludes.system),temporary:V.control(l.excludes.temporary),filesLargerThan:V.group({size:V.control(null),unit:V.control(null)})})}),ze=class l{#e=D(J);#t=D(H);#i=D(ne);formRef=Fe.required("formRef");sourceDataForm=this.#e.sourceDataForm;sourceDataFormSignal=this.#e.sourceDataFormSignal;newPathCtrl=new lt("");filesLargerThan=R(()=>this.sourceDataFormSignal()?.excludes?.filesLargerThan?.size!==null);sizeOptions=m(Mt);osType=this.#e.osType;pathSignal=ae(this.sourceDataForm.controls.path.valueChanges);pathArray=R(()=>this.pathSignal()?.split("\0").filter(t=>t.startsWith("-")||t.startsWith("+")||t==="___none___")??[]);nonFilterPaths=R(()=>this.pathSignal()?.split("\0").filter(t=>!t.startsWith("-")&&!t.startsWith("+")&&t!==""));oldPath=m(null);editingPath=m(null);addingNewPath=m(!1);editPath(t){this.oldPath.set(t),this.editingPath.set(t)}updatePath(){let t=this.oldPath(),e=this.editingPath();if(!t||!e||e===t){this.oldPath.set(null),this.editingPath.set(null);return}let n=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(n?.replace(t,e)??""),this.oldPath.set(null),this.editingPath.set(null)}cancelEditPath(){this.oldPath.set(null),this.editingPath.set(null)}removePath(t){let e=this.sourceDataForm.controls.path.value??"",n=e.indexOf(t);if(n===-1)return;let i=n===0?t:"\0"+t,o=e.replace(i,"");this.sourceDataForm.controls.path.setValue(o)}addFilter(t="-*"){let e=this.sourceDataForm.controls.path.value;this.sourceDataForm.controls.path.setValue(`${e}\0${t}`)}patchPathAt(t,e){let i=this.sourceDataForm.controls.path.value.split("\0").filter(_=>!_.startsWith("-")&&!_.startsWith("+")).join("\0"),o=this.pathArray().map((_,S)=>S===e?`${t}`:`${_}`).join("\0");this.sourceDataForm.controls.path.setValue(`${i}\0${o}`)}removePathAt(t){let n=this.sourceDataForm.controls.path.value.split("\0").filter(o=>!o.startsWith("-")&&!o.startsWith("+")).join("\0"),i=this.pathArray().filter((o,_)=>_!==t).join("\0");this.sourceDataForm.controls.path.setValue(`${n}\0${i}`)}getPath(){return this.sourceDataForm.value.path??null}toggleFilesLargerThan(){this.sourceDataForm.controls.excludes.value.filesLargerThan?.size===null?this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:50,unit:"MB"}):this.sourceDataForm.controls.excludes.controls.filesLargerThan.setValue({size:null,unit:null})}addNewPath(){let t=this.sourceDataForm.controls.path.value,e=this.newPathCtrl.value;this.sourceDataForm.controls.path.setValue(`${t}\0${e}`),this.newPathCtrl.setValue("")}goBack(){this.#t.navigate(["destination"],{relativeTo:this.#i.parent})}next(){this.#e.isNew()||this.#e.submit(!0),this.#t.navigate(["schedule"],{relativeTo:this.#i.parent})}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=z({type:l,selectors:[["app-source-data"]],viewQuery:function(e,n){e&1&&de(n.formRef,Tt,5),e&2&&ge()},decls:56,vars:12,consts:()=>{let t;t=$localize`Path`;let e;e=$localize`Add a direct path`;let n;n=$localize`Hidden files`;let i;i=$localize`System files`;let o;o=$localize`Temporary files`;let _;_=$localize`Source Data`;let S;S=$localize`Folder path`;let A;A=$localize`${"\uFFFD#12\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#12\uFFFD"}:CLOSE_TAG_SPK_ICON: Go back `;let k;k=$localize`${"\uFFFD#15\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#15\uFFFD"}:CLOSE_TAG_SPK_ICON: Continue `;let U;U=$localize`Paths`;let h;h=$localize`Add a path directly from your machine.`;let L;L=$localize`Filters`;let K;K=$localize`Customize your filters.`;let b;b=$localize`Add filter`;let X;X=$localize`Exclude`;let N;N=$localize`Choose if there’s any files you want to exclude.`;let ee;ee=$localize` Hidden files ${"\uFFFD#46\uFFFD\uFFFD/#46\uFFFD"}:TAG_INPUT:`;let re;re=$localize` System files ${"\uFFFD#49\uFFFD\uFFFD/#49\uFFFD"}:TAG_INPUT:`;let _e;_e=$localize` Temporary files ${"\uFFFD#52\uFFFD\uFFFD/#52\uFFFD"}:TAG_INPUT:`;let ue;ue=$localize` Files larger than `;let f;f=$localize`Edit path`;let qe;return qe=$localize`Select an option...`,[["formRef",""],_,S,A,k,U,h,L,K,b,X,N,ee,re,_e,ue,[3,"submit","formGroup"],[1,"left"],[1,"title-30"],[1,"fill",3,"multiSelect","startingPath","showFiles"],["for","path"],["type","text","id","path","tabindex","4","placeholder",t,"formControlName","path"],[1,"form-actions"],["spk-button","","type","button",3,"click"],["spk-button","","type","submit",1,"raised","primary"],[1,"right"],[3,"disallowToggle"],["title",""],["description",""],[1,"paths"],[1,"path"],[1,"row-inputs"],["type","text","placeholder",e,3,"formControl"],["spk-button","","type","button",1,"raised","primary",3,"click"],["type","button","spk-button","","action","",3,"click"],["formGroupName","excludes",3,"disallowToggle"],[1,"raised","primary"],["type","checkbox","placeholder",n,"formControlName","hidden"],["type","checkbox","placeholder",i,"formControlName","system"],["type","checkbox","placeholder",o,"formControlName","temporary"],[1,"raised","primary",3,"click"],["formGroupName","filesLargerThan",1,"row-inputs"],[1,"small"],["type","text","placeholder",f,3,"ngModelChange","ngModel","ngModelOptions"],["spk-button","","type","button",1,"small",3,"click"],["type","text",3,"ngModel","ngModelOptions"],[3,"path","osType"],[3,"pathChange","remove","path","osType"],["type","number","formControlName","size"],[3,"options","isClearable"],["type","text","formControlName","unit","placeholder",qe]]},template:function(e,n){if(e&1){let i=x();a(0,"form",16,0),F("submit",function(){return c(i),p(n.next())}),a(2,"div",17)(3,"h3",18),T(4,1),s(),a(5,"app-file-tree",19)(6,"label",20),T(7,2),s(),d(8,"input",21),s(),a(9,"div",22)(10,"button",23),F("click",function(){return c(i),p(n.goBack())}),g(11,3),d(12,"spk-icon"),C(),s(),a(13,"button",24),g(14,4),d(15,"spk-icon"),C(),s()()(),a(16,"div",25)(17,"app-toggle-card",26),v(18,27),T(19,5),B(),a(20,"p",28),T(21,6),s(),a(22,"div",29),Le(23,ht,3,1,"div",30,ke),a(25,"div",31)(26,"spk-form-field"),d(27,"input",32),s(),a(28,"button",33),F("click",function(){return c(i),p(n.addNewPath())}),a(29,"spk-icon"),I(30,"plus"),s()()()()(),a(31,"app-toggle-card",26),v(32,27),T(33,7),B(),a(34,"p",28),T(35,8),s(),a(36,"button",34),F("click",function(){return c(i),p(n.addFilter())}),T(37,9),s(),M(38,Nt,2,0),s(),a(39,"app-toggle-card",35),v(40,27),T(41,10),B(),a(42,"p",28),T(43,11),s(),a(44,"spk-toggle",36),g(45,12),d(46,"input",37),C(),s(),a(47,"spk-toggle",36),g(48,13),d(49,"input",38),C(),s(),a(50,"spk-toggle",36),g(51,14),d(52,"input",39),C(),s(),a(53,"spk-toggle",40),F("click",function(){return c(i),p(n.toggleFilesLargerThan())}),T(54,15),s(),M(55,Dt,5,2,"div",41),s()()()}if(e&2){let i;E("formGroup",n.sourceDataForm),r(5),E("multiSelect",!0)("startingPath",n.getPath())("showFiles",!0),r(12),E("disallowToggle",!0),r(6),Ie(n.nonFilterPaths()),r(4),E("formControl",n.newPathCtrl),r(4),E("disallowToggle",!0),r(7),y((i=n.pathSignal())!=null&&i.length?38:-1),r(),E("disallowToggle",!0),r(14),Ce("active",n.filesLargerThan()),r(2),y(n.filesLargerThan()?55:-1)}},dependencies:[le,he,Q,Pe,Te,Z,Ae,oe,ye,at,Ne,De,st,q,j,ie,Se,Y,$e,ut,Re],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;width:100%;flex:1 0;overflow:hidden}form[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;flex:1 0;overflow:hidden}.right[_ngcontent-%COMP%], .left[_ngcontent-%COMP%]{flex:1 0;display:flex;flex-direction:column;gap:1.5rem}.left[_ngcontent-%COMP%]{padding:2.5rem;overflow:hidden;border-right:1px solid var(--base-4)}.right[_ngcontent-%COMP%]{padding:2.5rem 1.5rem;overflow:auto}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}spk-divider[_ngcontent-%COMP%]{margin:.75rem 0}.row-inputs[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr min-content;gap:.25rem}.paths[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.path[_ngcontent-%COMP%]{display:grid;align-items:center;grid-template-columns:1fr min-content min-content;gap:.25rem}"],changeDetection:0})};var dt="1W:1D,4W:1W,12M:1M",J=class l{#e=D(H);#t=D(Ee);#i=D(et);#n=D(it);#o=D(Oe);generalForm=gt();sourceDataForm=pt();scheduleFields={autoRun:m(te.autoRun),nextTime:m(te.nextTime),runAgain:m(te.runAgain)};settings=m([]);optionsFields={remoteVolumeSize:m("50MB"),backupRetention:m("all"),backupRetentionTime:m(""),backupRetentionVersions:m(0),backupRetentionCustom:m("")};targetUrlModel=m(null);oauthServiceLink=R(()=>this.#t.systemInfo()?.DefaultOAuthURL??"https://duplicati-oauth-handler.appspot.com/");oauthServiceLinkNew=R(()=>this.#t.systemInfo()?.DefaultOAuthURLv2??"https://oauth-service.duplicati.com/");isDraft=m(!1);backupId=m(null);backupName=R(()=>this.generalFormSignal()?.name??"");isSubmitting=m(!1);finishedLoading=m(!1);backupDefaults=m(null);applicationOptions=m(null);isNew=R(()=>this.backupId()==="new");osType=R(()=>this.#t.systemInfo()?.OSType);selectedOptions=m([]);sourceDataFormSignal=ae(this.sourceDataForm.valueChanges);generalFormSignal=ae(this.generalForm.valueChanges);encryptionFieldSignal=ae(this.generalForm.controls.encryption.valueChanges);destinationOptions=R(()=>this.#t.backendModules()??[]);advancedOptions=R(()=>this.#t.systemInfo()?.Options?.map(this.#l)??[]);#l(t){return{name:t.Name,type:t.Type,shortDescription:t.ShortDescription??void 0,longDescription:t.LongDescription??void 0,options:t.ValidValues}}encryptionOptions=R(()=>{let t=this.#t.systemInfo()?.EncryptionModules??[];return[He,...t]});nonSelectedOptions=R(()=>this.advancedOptions().sort((t,e)=>t?.name&&e?.name?t?.name.localeCompare(e?.name):0).filter(t=>this.selectedOptions()?.findIndex(e=>e.name===t.name)===-1));submit(t=!1){this.isSubmitting.set(!0);let e=this.#s(),n=this.backupId();n==="new"||!n||this.isDraft()?this.#n.postApiV1Backups({requestBody:e}).pipe(we(()=>this.isSubmitting.set(!1))).subscribe({next:i=>{t||this.exit(!1)},error:i=>{}}):this.#n.putApiV1BackupById({id:n,requestBody:e}).pipe(we(()=>this.isSubmitting.set(!1))).subscribe({next:i=>{t||this.exit(!1)},error:i=>{}})}exit(t){if(!t){this.#a(),this.#e.navigate(["/"]);return}this.#i.open(ot,{data:{title:$localize`Confirm exit?`,message:$localize`Are you sure you want to exit?`,confirmText:$localize`Yes`,cancelText:$localize`Cancel`},closed:e=>{e&&(this.#a(),this.#e.navigate(["/"]))}})}mapSourceDataToForm(t){let e=t.Sources??"",n=t.Filters?.map(S=>`${S.Include?"":"-"}${S.Expression}`)??[],i=t.Settings?.find(S=>S.Name==="--exclude-files-attributes")?.Value??"",o=t.Settings?.find(S=>S.Name==="--skip-files-larger-than")??null,_={path:[...e,...n].join("\0"),excludes:{hiddenFiles:i.includes("hidden"),systemFiles:i.includes("system"),tempFiles:i.includes("temporary"),filesLargerThan:o?.Value?.toUpperCase()??null}};this.sourceDataForm.patchValue(_)}mapDestinationToForm(t){this.targetUrlModel.set(t.TargetURL??"")}mapGeneralToForm(t){let e=t.Settings?.find(_=>_.Name==="encryption-module"),n=t.Settings?.find(_=>_.Name==="passphrase")?.Value??"",i=e?.Value&&e.Value.length?e.Value:"",o={name:t.Name??"",description:t.Description??""};i&&i!==""&&(o.encryption=i),n&&n!==""&&(o.password=n,o.repeatPassword=n),this.generalForm.patchValue(o)}mapScheduleToForm(t){if(!t){this.scheduleFields.autoRun.set(!1);return}let e=this.#o.fromString(t.Repeat)??null,n=this.#r(t.Time);this.scheduleFields.autoRun.set(!0),this.scheduleFields.nextTime.update(i=>G(G({},i),n)),this.scheduleFields.runAgain.set({repeatValue:e?.value??1,repeatUnit:e?.unit??"D",allowedDays:{mon:t.AllowedDays?.includes("mon")??!1,tue:t.AllowedDays?.includes("tue")??!1,wed:t.AllowedDays?.includes("wed")??!1,thu:t.AllowedDays?.includes("thu")??!1,fri:t.AllowedDays?.includes("fri")??!1,sat:t.AllowedDays?.includes("sat")??!1,sun:t.AllowedDays?.includes("sun")??!1}})}mapOptionsToForms(t){let e=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","dblock-size","passphrase","keep-time","keep-versions","retention-policy"],n=t.Settings?.filter(_=>!e.includes(_.Name)),i=t.Settings?.filter(_=>e.includes(_.Name));this.settings.set(n??[]),n?.forEach(_=>{if(_.Name==="encryption-module"&&this.isNew())return this.generalForm.controls.encryption.setValue(_.Value??"")});var o="all";i?.forEach(_=>{if(_.Name==="dblock-size"&&this.optionsFields.remoteVolumeSize.set(_.Value??"50MB"),_.Name==="keep-time"&&(_.Value??"")!=="")return o="time",this.optionsFields.backupRetentionTime.set(_.Value??"");if(_.Name==="keep-versions"&&(_.Value??"")!=="")return o="versions",this.optionsFields.backupRetentionVersions.set(_.Value?parseInt(_.Value):null);if(_.Name==="retention-policy"&&(_.Value??"")!=="")if(_.Value===dt)o="smart";else return o="custom",this.optionsFields.backupRetentionCustom.set(_.Value??"")}),this.optionsFields.backupRetention.set(o)}getScheduleFormValue(){return{autoRun:this.scheduleFields.autoRun(),nextTime:this.scheduleFields.nextTime(),runAgain:this.scheduleFields.runAgain()}}#s(){let t=this.generalForm.value,e=this.getScheduleFormValue(),n=this.sourceDataForm.value,i=this.targetUrlModel(),o=null;e.runAgain?.repeatUnit&&e.runAgain?.repeatValue&&(o=this.#o.toString(e.runAgain.repeatValue,e.runAgain.repeatUnit));let _=e.runAgain?.allowedDays?Object.entries(e.runAgain?.allowedDays).filter(([h,L])=>L).map(([h,L])=>h):[],S=n.path?.split("\0")??[],A=this.mapFormsToSettings(),k=Object.entries(n.excludes??{}).filter(([h,L])=>L&&h!=="filesLargerThan").map(([h])=>h),U=n.excludes?.filesLargerThan;return k.length&&A.push({Name:"--exclude-files-attributes",Value:k.join(",")}),U&&U.size!==null&&U.unit!==null&&A.push({Name:"--skip-files-larger-than",Value:`${U.size}${U.unit}`}),{Backup:{Name:t.name,Description:t.description,TargetURL:i??null,Sources:S.filter(h=>!h.startsWith("-")),Settings:A,Filters:S.filter(h=>h.startsWith("-")).map((h,L)=>({Order:L,Include:!1,Expression:h.slice(1)}))},Schedule:e.autoRun?{Repeat:o,Time:e.nextTime?.date?new Date(`${e.nextTime.date}T${e.nextTime?.time||"00:00:00"}`).toISOString():null,AllowedDays:_}:null}}mapFormsToSettings(t=[]){let e=this.generalForm.value,n=["--no-encryption","--exclude-files-attributes","--skip-files-larger-than","encryption-module","passphrase","keep-time","keep-versions","retention-policy","dblock-size"],i=[{Name:"--no-encryption",Value:"True"}];e.encryption!==""&&(i=[{Name:"encryption-module",Value:e.encryption??null},{Name:"passphrase",Value:e.password??null}]);let o=[{Name:"dblock-size",Value:this.optionsFields.remoteVolumeSize()}];switch(this.optionsFields.backupRetention()){case"time":o.push({Name:"keep-time",Value:this.optionsFields.backupRetentionTime()});break;case"versions":o.push({Name:"keep-versions",Value:this.optionsFields.backupRetentionVersions()?.toString()??""});break;case"custom":o.push({Name:"retention-policy",Value:this.optionsFields.backupRetentionCustom()});break;case"smart":o.push({Name:"retention-policy",Value:dt});break}let _=[...t,...n],S=this.settings().filter(A=>!_.includes(A.Name)).map(A=>{let k=A.Value;return typeof A.Value=="number"&&(k=A.Value.toString()),typeof A.Value=="boolean"&&(k=A.Value?"True":"False"),{Name:A.Name,Value:k}});return[...i,...o,...S]}#r(t){if(!t||t?.indexOf("T")===-1)return{time:t??"13:00"};let e=new Date(t);return{time:`${(""+e.getHours()).padStart(2,"0")}:${(""+e.getMinutes()).padStart(2,"0")}`,date:e.toISOString().split("T")[0]}}setTargetUrl(t){this.targetUrlModel.set(t)}#a(){this.generalForm.reset(),this.sourceDataForm.reset(),this.scheduleFields.autoRun.set(te.autoRun),this.scheduleFields.nextTime.set(te.nextTime),this.scheduleFields.runAgain.set(te.runAgain),this.optionsFields.remoteVolumeSize.set("50MB"),this.optionsFields.backupRetention.set("all"),this.settings.set([]),this.targetUrlModel.set(null)}static \u0275fac=function(e){return new(e||l)};static \u0275prov=pe({token:l,factory:l.\u0275fac,providedIn:"root"})};var yt=["formRef"];function Rt(l,t){l&1&&(a(0,"spk-alert",17),g(1,5),d(2,"spk-icon",26),C(),s())}function Ot(l,t){if(l&1&&I(0),l&2){let e=t.$implicit;Ze(" ",e.DisplayName," ")}}function $t(l,t){if(l&1&&d(0,"spk-progress-bar",40),l&2){let e=u(3);Ce("error",e.calculatePasswordStrength()===1)("warn",e.calculatePasswordStrength()===2)("primary",e.calculatePasswordStrength()===4)("success",e.calculatePasswordStrength()===5),E("value",e.calculatePasswordStrength()*(100/5))}}function wt(l,t){l&1&&(a(0,"span",35),T(1,10),s())}function kt(l,t){l&1&&(g(0,8,1),d(1,"spk-icon"),C())}function Lt(l,t){l&1&&(g(0,8,2),d(1,"spk-icon"),C())}function It(l,t){l&1&&(g(0,11,1),d(1,"spk-icon",42),C())}function Ut(l,t){l&1&&(g(0,11,2),d(1,"spk-icon"),C())}function Gt(l,t){if(l&1){let e=x();a(0,"button",41),F("click",function(){c(e);let i=u(3);return p(i.copyPassword())}),g(1,11),M(2,It,2,0)(3,Ut,2,0),C(),s()}if(l&2){let e=u(3);r(2),y(e.copiedPassword()?2:3)}}function xt(l,t){l&1&&(a(0,"spk-alert",39),T(1,12),s())}function bt(l,t){if(l&1){let e=x();a(0,"div",30)(1,"spk-form-field")(2,"label",31),g(3,7),d(4,"sup"),C(),s(),d(5,"input",32),s(),M(6,$t,1,9,"spk-progress-bar",33),a(7,"spk-form-field"),d(8,"input",34),M(9,wt,2,0,"span",35),s(),a(10,"div",36)(11,"button",37),F("click",function(){c(e);let i=u(2);return p(i.showPassword.set(!i.showPassword()))}),g(12,8),M(13,kt,2,0)(14,Lt,2,0),C(),s(),a(15,"button",37),F("click",function(){c(e);let i=u(2);return p(i.generatePassword())}),g(16,9),d(17,"spk-icon"),C(),s(),M(18,Gt,4,1,"button",38),s(),M(19,xt,2,0,"spk-alert",39),s()}if(l&2){let e=u(2);r(5),E("type",e.showPassword()?"text":"password"),r(),y(e.generalForm.value.password?6:-1),r(2),E("type",e.showPassword()?"text":"password"),r(),y(e.generalForm.value.repeatPassword&&e.generalForm.value.repeatPassword!==e.generalForm.value.password?9:-1),r(4),y(e.showPassword()?13:14),r(5),y(e.showCopyPassword()?18:-1),r(),y(e.generalForm.value.password&&e.generalForm.value.password===e.generalForm.value.repeatPassword?19:-1)}}function vt(l,t){if(l&1&&(a(0,"spk-select",27)(1,"label",28),T(2,6),s(),d(3,"input",29),Ye(4,Ot,1,1,"ng-template"),s(),M(5,bt,20,7,"div",30)),l&2){let e=u();E("options",e.encryptionOptions())("isClearable",!1),r(5),y(e.encryptionFieldSignal()!==""?5:-1)}}function Bt(l,t){if(l&1&&(a(0,"button",24),g(1,13),d(2,"spk-icon"),C(),s()),l&2){let e=u();E("disabled",e.nameAndDescriptionValid()===!1)}}function Vt(l,t){if(l&1&&(a(0,"button",25),g(1,14),d(2,"spk-icon"),C(),s()),l&2){let e=u();E("disabled",e.generalForm.invalid||e.showCopyPassword()&&!e.copiedPassword())}}var se=new Me,gt=(l={name:"",description:"",encryption:"",password:"",repeatPassword:""})=>se.group({name:se.control(l.name,[fe.required]),description:se.control(l.description),encryption:se.control(l.encryption,[_t()]),password:se.control(l.password,[Ve(t=>t?.value.encryption!=="",[fe.required])]),repeatPassword:se.control(l.repeatPassword,[Ve(t=>t?.value.encryption!=="",[fe.required])])}),He={Key:"",DisplayName:"None"},je=class l{#e=D(H);#t=D(ne);#i=D(rt);#n=D(J);#o=D(Ee);formRef=Fe.required("formRef");generalForm=this.#n.generalForm;generalFormSignal=this.#n.generalFormSignal;encryptionFieldSignal=this.#n.encryptionFieldSignal;encryptionOptions=this.#n.encryptionOptions;isNew=this.#n.isNew;showPassword=m(!1);copiedPassword=m(!1);showCopyPassword=m(!1);encryptionEffect=me(()=>{this.encryptionFieldSignal()===""&&(this.copiedPassword.set(!1),this.showCopyPassword.set(!1))});nameAndDescriptionValid=R(()=>{let t=this.generalFormSignal(),e=this.generalForm.controls;return e?.name&&e.name.valid&&e?.description&&e.description.valid});calculatePasswordStrength=R(()=>{let e=this.generalFormSignal()?.password??"";return this.#i.calculatePasswordStrength(e)});ngOnInit(){this.formRef().nativeElement.focus()}exit(){this.#n.exit(!0)}async copyPassword(){let t=this.generalForm.controls.password.value;await this.#l(t??""),this.copiedPassword.set(!0)}async#l(t){try{await navigator.clipboard.writeText(t)}catch{try{let n=document.createElement("textarea");n.value=t,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}catch(n){console.error("Failed to copy text: ",n)}}}displayFn(){let t=this.#o.systemInfo()?.EncryptionModules??[];return e=>{let n=[He,...t].find(i=>i.Key===e);return n?`${n.DisplayName}`:""}}generatePassword(){this.copiedPassword.set(!1);let t=this.#i.generate(16);this.generalForm.controls.password.setValue(t),this.generalForm.controls.repeatPassword.setValue(t),this.showCopyPassword.set(!0)}next(){this.#n.isNew()||this.#n.submit(!0),this.#e.navigate(["destination"],{relativeTo:this.#t.parent})}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=z({type:l,selectors:[["app-general"]],viewQuery:function(e,n){e&1&&de(n.formRef,yt,5),e&2&&ge()},decls:21,vars:4,consts:()=>{let t;t=$localize`Your backup name`;let e;e=$localize`Your backup description`;let n;n=$localize`Remember to copy the password`;let i;i=$localize`General backup settings`;let o;o=$localize` Backup name ${"\uFFFD#8\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#8\uFFFD"}:CLOSE_SUPERSCRIPT:`;let _;_=$localize`Backup description`;let S;S=$localize`${"\uFFFD#18\uFFFD"}:START_TAG_SPK_ICON:arrow-left${"\uFFFD/#18\uFFFD"}:CLOSE_TAG_SPK_ICON: Exit `;let A;A=$localize`${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:lock${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON: Encrypted backup `;let k;k=$localize`Encryption`;let U;U=$localize`Encryption`;let h;h=$localize`Password`;let L;L=$localize`Repeat password`;let K;K=$localize` Create a password ${"\uFFFD#4\uFFFD"}:START_SUPERSCRIPT:*${"\uFFFD/#4\uFFFD"}:CLOSE_SUPERSCRIPT:`;let b;b=$localize`${"\uFFFD*13:1\uFFFD"}:START_BLOCK_IF:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye-slash${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: hide ${"\uFFFD/*13:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*14:2\uFFFD"}:START_BLOCK_ELSE:${"[\uFFFD#1:1\uFFFD|\uFFFD#1:2\uFFFD]"}:START_TAG_SPK_ICON:eye${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: show ${"\uFFFD/*14:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,b=Ue(b);let X;X=$localize`${"\uFFFD#17\uFFFD"}:START_TAG_SPK_ICON:password${"\uFFFD/#17\uFFFD"}:CLOSE_TAG_SPK_ICON: Generate password `;let N;N=$localize`Passwords do not match`;let ee;ee=$localize`${"\uFFFD*2:1\uFFFD"}:START_BLOCK_IF:${"\uFFFD#1:1\uFFFD"}:START_TAG_SPK_ICON:check${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copied password ${"\uFFFD/*2:1\uFFFD"}:CLOSE_BLOCK_IF:${"\uFFFD*3:2\uFFFD"}:START_BLOCK_ELSE:${"\uFFFD#1:2\uFFFD"}:START_TAG_SPK_ICON_1:copy${"[\uFFFD/#1:1\uFFFD|\uFFFD/#1:2\uFFFD]"}:CLOSE_TAG_SPK_ICON: Copy password ${"\uFFFD/*3:2\uFFFD"}:CLOSE_BLOCK_ELSE:`,ee=Ue(ee);let re;re=$localize` Tip: Be sure to save your password. If you loose it you will lose access to your backups. `;let _e;_e=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`;let ue;return ue=$localize` Continue ${"\uFFFD#2\uFFFD"}:START_TAG_SPK_ICON:arrow-right${"\uFFFD/#2\uFFFD"}:CLOSE_TAG_SPK_ICON:`,[["formRef",""],i,o,_,S,A,U,K,b,X,N,ee,re,_e,ue,["autocomplete","off",3,"submit","formGroup"],[1,"title-30"],[1,"primary"],["for","backupName"],["type","text","tabindex","1","placeholder",t,"formControlName","name"],["for","backupDescription"],["id","backupDescription","tabindex","2","placeholder",e,"formControlName","description"],[1,"form-actions"],["type","button","spk-button","",3,"click"],["spk-button","","type","submit",1,"raised","primary",3,"disabled"],["spk-button","","type","submit","spkTooltip",n,1,"raised","primary",3,"disabled"],["icon",""],["value","Key","label","DisplayName",3,"options","isClearable"],["for","encryption"],["type","text","id","encryption","tabindex","3","placeholder",k,"formControlName","encryption"],[1,"passwords"],["for","password"],["id","password","tabindex","4","autocomplete","off","placeholder",h,"formControlName","password",3,"type"],[1,"raised",3,"error","warn","primary","success","value"],["id","repeatPassword","tabindex","5","autocomplete","off","placeholder",L,"formControlName","repeatPassword",3,"type"],["error",""],[1,"password-actions"],["spk-button","","type","button",1,"small",3,"click"],["spk-button","","type","button",1,"small","copy"],["type","primary"],[1,"raised",3,"value"],["spk-button","","type","button",1,"small","copy",3,"click"],[1,"spk-success"]]},template:function(e,n){if(e&1){let i=x();a(0,"form",15,0),F("submit",function(){return c(i),p(n.next())}),a(2,"h3",16),T(3,1),s(),M(4,Rt,3,0,"spk-alert",17),a(5,"spk-form-field")(6,"label",18),g(7,2),d(8,"sup"),C(),s(),d(9,"input",19),s(),a(10,"spk-form-field")(11,"label",20),T(12,3),s(),d(13,"textarea",21),s(),M(14,vt,6,3),a(15,"div",22)(16,"button",23),F("click",function(){return c(i),p(n.exit())}),g(17,4),d(18,"spk-icon"),C(),s(),M(19,Bt,3,1,"button",24)(20,Vt,3,1,"button",25),s()()}if(e&2){let i;E("formGroup",n.generalForm),r(4),y(!n.isNew()&&((i=n.generalFormSignal())==null?null:i.encryption)!==""?4:-1),r(10),y(n.isNew()?14:-1),r(5),y(n.encryptionFieldSignal()===""||!n.isNew()?19:20)}},dependencies:[ye,he,Q,Z,Ae,Ne,De,q,Y,ie,j,tt,Je,nt],styles:["[_nghost-%COMP%]{display:block;width:100%;max-width:32.5rem;padding:2.5rem}form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;padding-bottom:1.5rem}sup[_ngcontent-%COMP%]{padding:0 .125rem;color:var(--error-8)}.passwords[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.password-actions[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center}.form-actions[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.copy[_ngcontent-%COMP%] spk-icon.spk-success[_ngcontent-%COMP%]{color:var(--success-8)}"],changeDetection:0})};export{gt as a,He as b,je as c,te as d,Ke as e,pt as f,ze as g,J as h};
@@ -0,0 +1 @@
1
+ import{a as d}from"./chunk-L6BZ6TEU.js";import"./chunk-67XQIEG5.js";import"./chunk-XD6MBGQY.js";import{oa as _}from"./chunk-GP2W7XZF.js";import"./chunk-WIDMAJIO.js";import{Jb as p,Oa as a,X as o,_a as S,bc as c,cc as g,uc as l,vb as n,vc as m,wb as i}from"./chunk-67YRCRMI.js";import"./chunk-EUDKD2JW.js";var r=class s{#e=o(d);serverSettings=this.#e.serverSettings;static \u0275fac=function(e){return new(e||s)};static \u0275cmp=S({type:s,selectors:[["app-server-settings"]],decls:6,vars:3,consts:()=>{let t;return t=$localize`System settings`,[t]},template:function(e,f){e&1&&(n(0,"h3"),p(1,0),i(),n(2,"code")(3,"pre"),c(4),l(5,"json"),i()()),e&2&&(a(4),g(m(5,1,f.serverSettings())))},dependencies:[_],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}h3[_ngcontent-%COMP%]{font:var(--title-30)}code[_ngcontent-%COMP%]{background:color-mix(in srgb,var(--base-8),#000 70%);color:#fff;padding:1rem 1.5rem;border-radius:var(--shape-3);overflow:auto;white-space:pre}"],changeDetection:0})};export{r as default};
@@ -1 +1 @@
1
- import{a as G}from"./chunk-LWIINXS7.js";import{b as P,d as $}from"./chunk-B37C3RGG.js";import{e as g}from"./chunk-H5MGVT7B.js";import{h as W}from"./chunk-N5FH4YAX.js";import{ua as M}from"./chunk-EBXJGPRA.js";import{Bc as F,Db as D,Eb as v,Fb as E,O as k,Pb as O,Qb as R,Qc as h,Rb as N,Rc as w,Sb as _,T as d,Tb as I,Ua as T,Z as r,gb as C,i as m,va as n,zc as A}from"./chunk-4KE2I7OA.js";var S=class s{reconnectTimer=n(15e3);countdown=n(0);connectTimerEffect=w(()=>{let e=this.reconnectTimer();this.countdown.set(e/1e3)});interval=setInterval(()=>{if(this.countdown()<=1){this.countdown.set(this.reconnectTimer()/1e3);return}this.countdown.set(this.countdown()-1)},1e3);ngOnDestroy(){clearInterval(this.interval)}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=C({type:s,selectors:[["app-disconnected-dialog"]],decls:8,vars:4,consts:()=>{let e;e=$localize`Reconnecting...`;let t;return t=$localize` The connection to the server is lost, attempting again in ${"\uFFFD#6\uFFFD"}:START_TAG_STRONG:0:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_STRONG:`,[e,t,["header",""],["content",""]]},template:function(t,o){t&1&&(D(0,"header",2)(1,"h3"),N(2,0),v()(),D(3,"div",3)(4,"p"),O(5,1),E(6,"strong"),A(7,"number"),R(),v()()),t&2&&(T(7),_(F(7,1,o.countdown(),"2.0-0")),I(5))},dependencies:[M],styles:["[_nghost-%COMP%]{display:block;padding:1rem}"],changeDetection:0})};var f=class s{dialog=r(g);#n=r(W);#o=n("disconnected");#e=n(null);#t=n(-1);#a=n(0);#c=n(!1);#r=new m;connectionStatus=this.#o.asReadonly();serverState=this.#e.asReadonly();#l=void 0;duration=r(P).relayIsEnabled()?"94s":"299s";start(){this.#c.set(!0),this.#r=new m,this.#s()}stop(){this.#r.next(),this.#r.complete(),this.#c.set(!1)}reconnect(){this.stop(),this.start()}reconnectIfNeeded(){this.#c()||this.reconnect()}#s(){this.#o.set("connecting"),this.#n.getApiV1Serverstate({lastEventId:this.#t(),longpoll:this.#t()>=0,duration:this.duration}).pipe(k(this.#r)).subscribe({next:e=>{e&&this.#i(e),this.#u()},error:e=>{let o=this.#a()+1,a=Math.min(5e3*o,3e4);this.#a.set(o),o>3&&this.#o.set("disconnected"),this.#l||(this.#l=this.dialog.open(S,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1})),this.#l.component.reconnectTimer.set(a),setTimeout(()=>{this.#s()},a)}})}#i(e){this.#o.set("connected"),this.#e.set(e),this.#t.set(e.LastEventID??-1),this.#a.set(0)}#u(){this.#c()&&this.#s()}static \u0275fac=function(t){return new(t||s)};static \u0275prov=d({token:s,factory:s.\u0275fac,providedIn:"root"})};var u=!1,b=class s{#n=r($);#o=r(G);dialog=r(g);#e=null;#t=n("disconnected");#a=n(null);#c=n(null);#r=n(null);#l=n(null);#s=void 0;#i=n({legacystatus:!0});shouldConnect=n(!0);connectionStatus=this.#t.asReadonly();serverState=this.#a.asReadonly();serverProgress=this.#c.asReadonly();subscriptions=this.#i.asReadonly();serverTaskQueue=this.#r.asReadonly();backupListState=this.#l.asReadonly();#u=0;start(){this.#p(),this.shouldConnect.set(!0)}#p(){let e=this.#n.token();if(!e){console.error("No access token available");return}let t=window.location.protocol==="https:"?"wss:":"ws:",o=window.location.port?`:${window.location.port}`:"";window.location.port==="4200"&&(o=":8200");let a=window.location.hostname,j=this.#o.hasWebSocketAuth()?`${t}//${a}${o}/notifications`:`${t}//${a}${o}/notifications?token=${e}`;this.#t.set("connecting"),this.#e=new WebSocket(j),this.#e.onopen=()=>{u&&console.log("WebSocket connection established"),this.#o.hasWebSocketAuth()?(this.#t.set("authenticating"),this.#e?.send(JSON.stringify({Version:1,Token:e}))):this.#d()},this.#e.onmessage=p=>{if(this.#t()==="authenticating")try{let i=JSON.parse(p.data);i.Success?(u&&console.log("WebSocket authentication successful"),this.#d()):(console.error("WebSocket authentication failed:",i.Message),this.#t.set("disconnected"));return}catch(i){console.error("Error parsing WebSocket authentication reply",i),this.#t.set("disconnected");return}try{let i=JSON.parse(p.data),l=i?.Type;if(l==="legacystatus"||l==null)u&&console.log("Received legacy status update:",i),this.#a.set(i);else if(l==="reply"){let c=i;c.Success||console.error("WebSocket reply error:",c.Message)}else if(l==="progress"){let c=i;u&&console.log("Received progress update:",c.Data),this.#c.set(c.Data)}else if(l==="taskqueue"){let c=i;u&&console.log("Received task update:",c.Data),this.#r.set(c.Data)}else if(l==="backuplist"){let c=i;u&&console.log("Received backup list update:",c.Data),this.#l.set(c.Data)}else console.warn("Unknown WebSocket message type:",l)}catch(i){console.error("Error parsing WebSocket message",i)}},this.#e.onclose=p=>{u&&console.log("WebSocket connection closed",p),this.#t.set("disconnected"),this.shouldConnect()&&(this.#s||(this.#s=this.dialog.open(S,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1}),this.#s.component.reconnectTimer.set(15e3)),setTimeout(()=>this.#p(),5e3))},this.#e.onerror=p=>{console.error("WebSocket error",p),this.#t.set("disconnected")}}#d(){this.#t.set("connected");let e=this.#i();Object.keys(e).length>0&&Object.entries(e).forEach(([t,o])=>{o!=null&&this.sendSubscribeRequest(t,o)}),this.#s&&this.#s.close()}stop(){this.shouldConnect.set(!1),this.#e?.close()}reconnect(){this.#e?.close(),this.start()}reconnectIfNeeded(){this.#e?.readyState!==WebSocket.OPEN&&this.reconnect()}sendSubscribeRequest(e,t){this.#e?.send(JSON.stringify({Version:1,Id:`req-${++this.#u}`,Action:"sub",Service:e,Data:t||null}))}subscribe(e,t=void 0){let o=this.#i(),a=o[e];(!a||JSON.stringify(a)!==JSON.stringify(t))&&(o[e]=t||!0,this.#i.set(o),this.#t()=="connected"&&this.sendSubscribeRequest(e,t))}unsubscribe(e){let t=this.#i();t[e]&&(delete t[e],this.#i.set(t),this.#t()=="connected"&&this.#e?.send(JSON.stringify({Version:1,Id:`req-${++this.#u}`,Action:"unsub",Service:e})))}static \u0275fac=function(t){return new(t||s)};static \u0275prov=d({token:s,factory:s.\u0275fac,providedIn:"root"})};var L=class s{#n=r(b);#o=r(f);#e=n("longpoll");#t=n(!1);connectionStatus=h(()=>this.#e()==="websocket"?this.#n.connectionStatus():this.#o.connectionStatus());isConnectionMethodSet=this.#t.asReadonly();serverState=h(()=>this.#e()==="websocket"?this.#n.serverState():this.#o.serverState());progressState=h(()=>this.#n.serverProgress());taskQueueState=h(()=>this.#n.serverTaskQueue());backupListState=h(()=>this.#n.backupListState());setConnectionMethod(e){e==="websocket"?(this.#n.reconnectIfNeeded(),this.#o.stop()):(this.#o.reconnectIfNeeded(),this.#n.stop()),this.#e.set(e),this.#t.set(!0)}getConnectionMethod(){return this.#e()}subscribe(e,t=null){this.#n.subscribe(e,t)}unsubscribe(e){this.#n.unsubscribe(e)}static \u0275fac=function(t){return new(t||s)};static \u0275prov=d({token:s,factory:s.\u0275fac,providedIn:"root"})};export{L as a};
1
+ import{a as G}from"./chunk-2YHX57UE.js";import{b as P,d as $}from"./chunk-OQHMS5HM.js";import{e as g}from"./chunk-5ER6KMMG.js";import{h as W}from"./chunk-XD6MBGQY.js";import{qa as M}from"./chunk-GP2W7XZF.js";import{Fc as h,Gc as w,Hb as O,Ib as R,Jb as N,Kb as _,Lb as I,O as k,Oa as T,S as d,X as r,_a as C,i as m,la as n,uc as A,vb as D,wb as v,wc as F,xb as E}from"./chunk-67YRCRMI.js";var S=class s{reconnectTimer=n(15e3);countdown=n(0);connectTimerEffect=w(()=>{let e=this.reconnectTimer();this.countdown.set(e/1e3)});interval=setInterval(()=>{if(this.countdown()<=1){this.countdown.set(this.reconnectTimer()/1e3);return}this.countdown.set(this.countdown()-1)},1e3);ngOnDestroy(){clearInterval(this.interval)}static \u0275fac=function(t){return new(t||s)};static \u0275cmp=C({type:s,selectors:[["app-disconnected-dialog"]],decls:8,vars:4,consts:()=>{let e;e=$localize`Reconnecting...`;let t;return t=$localize` The connection to the server is lost, attempting again in ${"\uFFFD#6\uFFFD"}:START_TAG_STRONG:0:${"\uFFFD0\uFFFD"}:INTERPOLATION:${"\uFFFD/#6\uFFFD"}:CLOSE_TAG_STRONG:`,[e,t,["header",""],["content",""]]},template:function(t,o){t&1&&(D(0,"header",2)(1,"h3"),N(2,0),v()(),D(3,"div",3)(4,"p"),O(5,1),E(6,"strong"),A(7,"number"),R(),v()()),t&2&&(T(7),_(F(7,1,o.countdown(),"2.0-0")),I(5))},dependencies:[M],styles:["[_nghost-%COMP%]{display:block;padding:1rem}"],changeDetection:0})};var f=class s{dialog=r(g);#n=r(W);#o=n("disconnected");#e=n(null);#t=n(-1);#a=n(0);#c=n(!1);#r=new m;connectionStatus=this.#o.asReadonly();serverState=this.#e.asReadonly();#l=void 0;duration=r(P).relayIsEnabled()?"94s":"299s";start(){this.#c.set(!0),this.#r=new m,this.#s()}stop(){this.#r.next(),this.#r.complete(),this.#c.set(!1)}reconnect(){this.stop(),this.start()}reconnectIfNeeded(){this.#c()||this.reconnect()}#s(){this.#o.set("connecting"),this.#n.getApiV1Serverstate({lastEventId:this.#t(),longpoll:this.#t()>=0,duration:this.duration}).pipe(k(this.#r)).subscribe({next:e=>{e&&this.#i(e),this.#u()},error:e=>{let o=this.#a()+1,a=Math.min(5e3*o,3e4);this.#a.set(o),o>3&&this.#o.set("disconnected"),this.#l||(this.#l=this.dialog.open(S,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1})),this.#l.component.reconnectTimer.set(a),setTimeout(()=>{this.#s()},a)}})}#i(e){this.#o.set("connected"),this.#e.set(e),this.#t.set(e.LastEventID??-1),this.#a.set(0)}#u(){this.#c()&&this.#s()}static \u0275fac=function(t){return new(t||s)};static \u0275prov=d({token:s,factory:s.\u0275fac,providedIn:"root"})};var u=!1,b=class s{#n=r($);#o=r(G);dialog=r(g);#e=null;#t=n("disconnected");#a=n(null);#c=n(null);#r=n(null);#l=n(null);#s=void 0;#i=n({legacystatus:!0});shouldConnect=n(!0);connectionStatus=this.#t.asReadonly();serverState=this.#a.asReadonly();serverProgress=this.#c.asReadonly();subscriptions=this.#i.asReadonly();serverTaskQueue=this.#r.asReadonly();backupListState=this.#l.asReadonly();#u=0;start(){this.#p(),this.shouldConnect.set(!0)}#p(){let e=this.#n.token();if(!e){console.error("No access token available");return}let t=window.location.protocol==="https:"?"wss:":"ws:",o=window.location.port?`:${window.location.port}`:"";window.location.port==="4200"&&(o=":8200");let a=window.location.hostname,j=this.#o.hasWebSocketAuth()?`${t}//${a}${o}/notifications`:`${t}//${a}${o}/notifications?token=${e}`;this.#t.set("connecting"),this.#e=new WebSocket(j),this.#e.onopen=()=>{u&&console.log("WebSocket connection established"),this.#o.hasWebSocketAuth()?(this.#t.set("authenticating"),this.#e?.send(JSON.stringify({Version:1,Token:e}))):this.#d()},this.#e.onmessage=p=>{if(this.#t()==="authenticating")try{let i=JSON.parse(p.data);i.Success?(u&&console.log("WebSocket authentication successful"),this.#d()):(console.error("WebSocket authentication failed:",i.Message),this.#t.set("disconnected"));return}catch(i){console.error("Error parsing WebSocket authentication reply",i),this.#t.set("disconnected");return}try{let i=JSON.parse(p.data),l=i?.Type;if(l==="legacystatus"||l==null)u&&console.log("Received legacy status update:",i),this.#a.set(i);else if(l==="reply"){let c=i;c.Success||console.error("WebSocket reply error:",c.Message)}else if(l==="progress"){let c=i;u&&console.log("Received progress update:",c.Data),this.#c.set(c.Data)}else if(l==="taskqueue"){let c=i;u&&console.log("Received task update:",c.Data),this.#r.set(c.Data)}else if(l==="backuplist"){let c=i;u&&console.log("Received backup list update:",c.Data),this.#l.set(c.Data)}else console.warn("Unknown WebSocket message type:",l)}catch(i){console.error("Error parsing WebSocket message",i)}},this.#e.onclose=p=>{u&&console.log("WebSocket connection closed",p),this.#t.set("disconnected"),this.shouldConnect()&&(this.#s||(this.#s=this.dialog.open(S,{closeOnButton:!1,closeOnEsc:!1,closeOnOutsideClick:!1}),this.#s.component.reconnectTimer.set(15e3)),setTimeout(()=>this.#p(),5e3))},this.#e.onerror=p=>{console.error("WebSocket error",p),this.#t.set("disconnected")}}#d(){this.#t.set("connected");let e=this.#i();Object.keys(e).length>0&&Object.entries(e).forEach(([t,o])=>{o!=null&&this.sendSubscribeRequest(t,o)}),this.#s&&this.#s.close()}stop(){this.shouldConnect.set(!1),this.#e?.close()}reconnect(){this.#e?.close(),this.start()}reconnectIfNeeded(){this.#e?.readyState!==WebSocket.OPEN&&this.reconnect()}sendSubscribeRequest(e,t){this.#e?.send(JSON.stringify({Version:1,Id:`req-${++this.#u}`,Action:"sub",Service:e,Data:t||null}))}subscribe(e,t=void 0){let o=this.#i(),a=o[e];(!a||JSON.stringify(a)!==JSON.stringify(t))&&(o[e]=t||!0,this.#i.set(o),this.#t()=="connected"&&this.sendSubscribeRequest(e,t))}unsubscribe(e){let t=this.#i();t[e]&&(delete t[e],this.#i.set(t),this.#t()=="connected"&&this.#e?.send(JSON.stringify({Version:1,Id:`req-${++this.#u}`,Action:"unsub",Service:e})))}static \u0275fac=function(t){return new(t||s)};static \u0275prov=d({token:s,factory:s.\u0275fac,providedIn:"root"})};var L=class s{#n=r(b);#o=r(f);#e=n("longpoll");#t=n(!1);connectionStatus=h(()=>this.#e()==="websocket"?this.#n.connectionStatus():this.#o.connectionStatus());isConnectionMethodSet=this.#t.asReadonly();serverState=h(()=>this.#e()==="websocket"?this.#n.serverState():this.#o.serverState());progressState=h(()=>this.#n.serverProgress());taskQueueState=h(()=>this.#n.serverTaskQueue());backupListState=h(()=>this.#n.backupListState());setConnectionMethod(e){e==="websocket"?(this.#n.reconnectIfNeeded(),this.#o.stop()):(this.#o.reconnectIfNeeded(),this.#n.stop()),this.#e.set(e),this.#t.set(!0)}getConnectionMethod(){return this.#e()}subscribe(e,t=null){this.#n.subscribe(e,t)}unsubscribe(e){this.#n.unsubscribe(e)}static \u0275fac=function(t){return new(t||s)};static \u0275prov=d({token:s,factory:s.\u0275fac,providedIn:"root"})};export{L as a};
@@ -0,0 +1 @@
1
+ import{ea as dt}from"./chunk-GP2W7XZF.js";import{$b as at,Ab as ge,Bb as ee,Dc as Be,Fc as H,Gc as N,Kc as ce,Lc as b,Mc as ie,Na as tt,Nb as B,Nc as ct,Oa as O,Ob as w,Oc as U,Pb as L,Qa as Ce,Qb as D,Qc as pt,S as be,Sa as Ie,Ua as it,V as Je,Vb as ot,Wb as te,Wc as We,X as j,Xb as se,Yb as rt,Zb as G,_ as Ze,_a as P,_b as z,a as Ke,aa as et,ab as _e,ac as oe,ba as A,bc as V,ca as F,cc as Ae,db as me,dc as ae,ec as Se,fa as Ee,gc as Fe,ha as Te,hc as He,ic as Le,jc as lt,ka as Me,kc as le,la as I,lb as nt,lc as K,ob as st,pb as W,qb as q,qc as je,ra as Q,rb as Ve,rc as ye,sb as Re,tb as Pe,ub as re,vb as _,wb as S,xb as Z}from"./chunk-67YRCRMI.js";import{a as ne,b as pe,c as Ge,d as u,e as E,f as M,g as x}from"./chunk-EUDKD2JW.js";var Y=["*"],wt=[[["","icon",""]],[["","title",""]],"*",[["","content",""]]],Ot=["[icon]","[title]","*","[content]"];function bt(t,e){t&1&&(_(0,"spk-icon",3),V(1,"info"),S())}function Et(t,e){t&1&&(_(0,"spk-icon",3),V(1,"info"),S())}function Tt(t,e){t&1&&(_(0,"spk-icon",3),V(1,"warning"),S())}function Mt(t,e){t&1&&(_(0,"spk-icon",3),V(1,"warning-octagon"),S())}function It(t,e){t&1&&(_(0,"spk-icon",3),V(1,"check-circle"),S())}function Vt(t,e){t&1&&(_(0,"spk-icon",3),V(1,"question"),S())}function Rt(t,e){if(t&1){let o=ee();_(0,"spk-icon",7),B("click",function(){A(o);let n=w();return F(n.removeAlert())}),V(1,"plus"),S()}}var Pt=["dialogRef"];function At(t,e){if(t&1){let o=ee();_(0,"div",4),B("click",function(){A(o);let n=w();return F(n.isOpen.set(!1))}),S()}}var Ft=["spk-button",""];var Ht=["triggerRef"],Lt=["popoverRef"],jt=[[["","trigger",""]],"*"],Bt=["[trigger]","*"];var Wt=()=>({closeOnButton:!1,closeOnEsc:!0});var qt=[[["label"]],[["","prefix",""]],[["","textPrefix",""]],[["input"]],[["textarea"]],[["","textSuffix",""]],[["","suffix",""]],[["","error",""]],[["","hint",""]]],zt=["label","[prefix]","[textPrefix]","input","textarea","[textSuffix]","[suffix]","[error]","[hint]"],ut=["input"],Nt=[[["label"]]],Ut=["label"];function $t(t,e){if(t&1&&(_(0,"div",3),V(1),S()),t&2){let o=w();O(),Ae(o.files()[0].name)}}function Qt(t,e){if(t&1&&(_(0,"div",3),V(1),S()),t&2){let o=w();O(),ae("",o.files().length," files selected")}}function Yt(t,e){if(t&1&&(_(0,"div",4),V(1),S()),t&2){let o=w();O(),Ae(o.filesOver()?o.overlayText():o.placeholder())}}var Xt=["optionsRef"],Gt=["*",[["","menu",""]]],Kt=["*","[menu]"];function Jt(t,e){t&1&&(_(0,"spk-icon",5),V(1,"caret-down"),S())}var Zt=[[["label"]],[["input","type","range"]]],ei=["label","input[type=range]"],ti=["optionsWrap"],ii=[[["label"]],[["input"]],[["textarea"]]],ni=["label","input","textarea"],si=()=>({closeOnButton:!1,closeOnEsc:!1}),Qe=t=>({$implicit:t});function oi(t,e){if(t&1&&V(0),t&2){let o=w();ae(" ",o.inputValue()," ")}}function ri(t,e){t&1&&ge(0)}function ai(t,e){if(t&1&&me(0,ri,1,0,"ng-container",13),t&2){let o=w(3).$implicit;w(2);let i=K(2);re("ngTemplateOutlet",i)("ngTemplateOutletContext",ye(2,Qe,o))}}function li(t,e){if(t&1&&V(0),t&2){let o=w(3).$implicit,i=w(2);ae(" ",i.getLabel(o)," ")}}function ci(t,e){if(t&1){let o=ee();_(0,"spk-chip",11),W(1,ai,1,4,"ng-container")(2,li,1,1),_(3,"spk-icon",12),B("click",function(n){A(o);let s=w(2).$index,h=w(2);return F(h.removeSelectedOptionByIndex(n,s))}),V(4,"x-bold"),S()()}if(t&2){let o=w(4),i=K(2);oe(o.selectClasses()),O(),q(i?1:2)}}function pi(t,e){t&1&&ge(0)}function di(t,e){if(t&1&&me(0,pi,1,0,"ng-container",13),t&2){let o=w(4).$implicit;w(2);let i=K(2);re("ngTemplateOutlet",i)("ngTemplateOutletContext",ye(2,Qe,o))}}function ui(t,e){if(t&1&&V(0),t&2){let o=w(4).$implicit,i=w(2);ae(" ",i.getLabel(o)," ")}}function hi(t,e){if(t&1&&W(0,di,1,4,"ng-container")(1,ui,1,1),t&2){w(5);let o=K(2);q(o?0:1)}}function fi(t,e){if(t&1&&W(0,hi,2,1),t&2){w(4);let o=K(5);q(o?-1:0)}}function mi(t,e){if(t&1&&W(0,ci,5,3,"spk-chip",10)(1,fi,1,1),t&2){w(3);let o=K(4);q(o?0:1)}}function gi(t,e){if(t&1&&W(0,mi,2,1),t&2){let o=e.$implicit;q(o?0:-1)}}function vi(t,e){if(t&1&&Re(0,gi,1,1,null,null,Ve),t&2){w();let o=K(1);Pe(o)}}function Ci(t,e){t&1&&ge(0)}function _i(t,e){if(t&1&&me(0,Ci,1,0,"ng-container",14),t&2){w(2);let o=K(0);re("ngTemplateOutlet",o)}}function Si(t,e){if(t&1&&V(0),t&2){let o=w(2);ae(" ",o.placeholderText()??""," ")}}function yi(t,e){if(t&1&&W(0,_i,1,1,"ng-container")(1,Si,1,1),t&2){w();let o=K(0);q(o?0:1)}}function ki(t,e){t&1&&(_(0,"spk-icon",6),V(1,"caret-down"),S())}function xi(t,e){t&1&&Z(0,"spk-spinner",7)}function Di(t,e){t&1&&(_(0,"spk-icon",6),V(1,"list-magnifying-glass"),S())}function wi(t,e){t&1&&(_(0,"spk-icon",6),V(1,"magnifying-glass"),S())}function Oi(t,e){if(t&1){let o=ee();_(0,"spk-icon",15),B("click",function(n){A(o);let s=w();return F(s.clear(n))}),V(1,"x-bold"),S()}}function bi(t,e){t&1&&(_(0,"spk-icon",6),V(1,"caret-down"),S())}function Ei(t,e){t&1&&(_(0,"spk-icon",6),V(1,"caret-up"),S())}function Ti(t,e){if(t&1&&Z(0,"spk-checkbox"),t&2){let o=w().$index,i=w();oe(i.selectClasses()),z("active",i.isSelected(o))}}function Mi(t,e){t&1&&ge(0)}function Ii(t,e){if(t&1&&me(0,Mi,1,0,"ng-container",13),t&2){let o=w().$implicit;w();let i=K(3);re("ngTemplateOutlet",i)("ngTemplateOutletContext",ye(2,Qe,o))}}function Vi(t,e){if(t&1&&V(0),t&2){let o=w().$implicit,i=w();ae(" ",i.getLabel(o)," ")}}function Ri(t,e){if(t&1){let o=ee();_(0,"li",16),B("click",function(){let n=A(o).$index,s=w();return F(s.toggleOptionByIndex(n))}),W(1,Ti,1,4,"spk-checkbox",17),W(2,Ii,1,4,"ng-container")(3,Vi,1,1),S()}if(t&2){let o=e.$index,i=w(),n=K(3);z("selected",i.isSelected(o))("focused",o===i.focusedOptionIndex()),O(),q(i.selectMultiple()?1:-1),O(),q(n?2:3)}}var Pi=["dragImageElement"],Ai=[[["","sidenav",""]],[["","sidenav-closed-topbar",""]],"*"],Fi=["[sidenav]","[sidenav-closed-topbar]","*"];function Hi(t,e){t&1&&Z(0,"div",1,0)}function Li(t,e){if(t&1){let o=ee();_(0,"div",7),B("drop",function(n){A(o);let s=w();return F(s.drop(n))})("dragover",function(n){A(o);let s=w();return F(s.dragOver(n))})("dragenter",function(){A(o);let n=w();return F(n.dragEnter())})("dragleave",function(){A(o);let n=w();return F(n.dragLeave())}),S()}}function ji(t,e){if(t&1){let o=ee();_(0,"div",8),B("dragstart",function(n){A(o);let s=w();return F(s.dragStart(n))})("dragend",function(n){A(o);let s=w();return F(s.dragEnd(n))})("drag",function(n){A(o);let s=w();return F(s.drag(n))})("touchstart",function(n){A(o);let s=w();return F(s.touchStart(n))})("touchmove",function(n){A(o);let s=w();return F(s.touchMove(n))})("touchend",function(n){A(o);let s=w();return F(s.touchEnd(n))})("touchcancel",function(n){A(o);let s=w();return F(s.touchCancel(n))}),S()}}var Bi=["thead"],Wi=[[["","table-header",""]],"*",[["","table-no-rows",""]]],qi=["[table-header]","*","[table-no-rows]"];function zi(t,e){t&1&&Z(0,"spk-progress-bar",1)}function Ni(t,e){t&1&&(_(0,"div",2),D(1,2),S())}var Ui=[[["","title",""]],"*"],$i=["[title]","*"];function Qi(t,e){t&1&&V(0,"Title")}function Yi(t,e){t&1&&(_(0,"spk-icon",1),V(1,"caret-down"),S())}var qe=["bold","thin","light","fill"],ue=(()=>{var e;let o=class o{constructor(){E(this,e,j(Q))}get currentClass(){let n=u(this,e).nativeElement.innerText;for(let s=0;s<qe.length;s++)if(n.endsWith(qe[s]))return qe[s];return""}};e=new WeakMap,o.\u0275fac=function(s){return new(s||o)},o.\u0275cmp=P({type:o,selectors:[["spk-icon"]],hostVars:2,hostBindings:function(s,h){s&2&&oe(h.currentClass)},ngContentSelectors:Y,decls:1,vars:0,template:function(s,h){s&1&&(L(),D(0))},encapsulation:2,changeDetection:0});let t=o;return t})(),bn=(()=>{let e=class e{constructor(){this._el=j(Q),this.alertService=b(null),this.id=b(null),this.alertClasses=H(()=>this._el.nativeElement.classList.toString())}removeAlert(){this.id()&&this.alertService()&&this.alertService()?.removeAlert(this.id())}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=P({type:e,selectors:[["spk-alert"]],inputs:{alertService:[1,"alertService"],id:[1,"id"]},ngContentSelectors:Ot,decls:17,vars:4,consts:[["ref",""],[1,"alert"],[1,"icon"],[1,"state-icon"],[1,"title"],[1,"close-icon"],[1,"content"],[1,"close-icon",3,"click"]],template:function(n,s){if(n&1&&(L(wt),_(0,"div",1)(1,"div",2,0),D(3),S(),_(4,"div",2),W(5,bt,2,0,"spk-icon",3)(6,Et,2,0,"spk-icon",3)(7,Tt,2,0,"spk-icon",3)(8,Mt,2,0,"spk-icon",3)(9,It,2,0,"spk-icon",3)(10,Vt,2,0,"spk-icon",3),S(),_(11,"div",4),D(12,1),D(13,2),S(),W(14,Rt,2,0,"spk-icon",5),_(15,"div",6),D(16,3),S()()),n&2){let h=rt(2);O(),G("display",h.children.length?"block":"none");let m=s.alertClasses();O(4),q(m.includes("primary")?5:m.includes("accent")?6:m.includes("warn")?7:m.includes("error")?8:m.includes("success")?9:10),O(9),q(s.id()?14:-1)}},dependencies:[ue],encapsulation:2,changeDetection:0});let t=e;return t})();function Ye(){return Date.now().toString(36)+Math.random().toString(36).substring(2)}var En=(()=>{let e=class e{constructor(){this.alertHistory=I([]),this.alertHistoryIsOpen=I(!1),this.alertHistoryIsHidden=I(!0)}error(i){this.addAlert({type:"error",title:i??"An error occured"})}success(i){this.addAlert({type:"success",title:i})}question(i){this.addAlert({type:"question",title:i})}warning(i){this.addAlert({type:"warn",title:i})}info(i){this.addAlert({type:"primary",title:i})}addAlert(i){let n=Ye();this.alertHistory.update(s=>[pe(ne({},i),{isOpen:!0,animateIn:!0,animateOut:!1,id:n}),...s]),setTimeout(()=>{this.alertHistory.update(s=>s.map(h=>pe(ne({},h),{animateIn:h.id===n?!1:h.animateIn})))},40),setTimeout(()=>{this.hideAlert(n)},2500)}removeAlert(i){this.alertHistory.update(n=>n.map(s=>pe(ne({},s),{animateOut:s.id===i?!1:s.animateOut}))),setTimeout(()=>{this.alertHistory.update(n=>n.filter(s=>s.id!==i))},300)}hideAlert(i){this.alertHistory.update(n=>n.map(s=>pe(ne({},s),{isOpen:s.id===i?!1:s.isOpen})))}setHidden(i){this.alertHistoryIsHidden.set(i)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275prov=be({token:e,factory:e.\u0275fac,providedIn:"root"});let t=e;return t})(),Oe=new Je("Sparkle UI Config"),Xi={class:"default",width:void 0,maxWidth:void 0,height:void 0,maxHeight:void 0,closeOnButton:!0,closeOnEsc:!0,closeOnOutsideClick:!0},Gi=(()=>{var e;let o=class o{constructor(){E(this,e);M(this,e,j(Oe,{optional:!0})),this.dialogRef=ie("dialogRef"),this.isOpen=U(!1),this.options=b(),this.closed=ce(),this.defaultOptionMerge=H(()=>ne(pe(ne({},Xi),{class:u(this,e)?.dialogType??"default"}),this.options())),this.abortController=null,this.isOpenEffect=N(()=>{let n=this.dialogRef()?.nativeElement;this.abortController&&this.abortController.abort(),this.abortController=new AbortController,this.isOpen()?(n?.showModal(),n?.addEventListener("close",()=>{this.isOpen.set(!1),this.closed.emit()},{signal:this.abortController?.signal}),document.addEventListener("keydown",s=>{s.key==="Escape"&&!this.defaultOptionMerge().closeOnEsc&&s.preventDefault(),s.key==="Escape"&&this.defaultOptionMerge().closeOnEsc&&this.isOpen.set(!1)},{signal:this.abortController?.signal})):(this.closed.emit(),n?.close())})}ngOnDestroy(){this.abortController?.abort()}};e=new WeakMap,o.\u0275fac=function(s){return new(s||o)},o.\u0275cmp=P({type:o,selectors:[["spk-dialog"]],viewQuery:function(s,h){s&1&&te(h.dialogRef,Pt,5),s&2&&se()},inputs:{isOpen:[1,"isOpen"],options:[1,"options"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:Y,decls:5,vars:11,consts:[["dialogRef",""],["spkDialog",""],[1,"content"],[1,"closeable-overlay"],[1,"closeable-overlay",3,"click"]],template:function(s,h){if(s&1&&(L(),_(0,"dialog",1,0)(2,"div",2),D(3),S(),W(4,At,1,0,"div",3),S()),s&2){let m=h.defaultOptionMerge();oe(m.class),G("width",m.width??"")("max-width",m.maxWidth??"")("max-height",m.maxHeight??"")("height",m.height??""),O(4),q(h.defaultOptionMerge().closeOnOutsideClick?4:-1)}},encapsulation:2,changeDetection:0});let t=o;return t})(),Tn=(()=>{var e,o,i,ht,ve;let h=class h{constructor(){E(this,i);E(this,e);E(this,o);M(this,e,document.querySelector("body")),M(this,o,j(nt)),this.compRef=null,this.insertedCompRef=null,this.closedFieldSub=null,this.compClosedSub=null}open(p,r){let d=u(this,o).injector,g=x(this,i,ht).call(this),k=r||{},{data:v,closed:a}=k,l=Ge(k,["data","closed"]);this.compRef&&x(this,i,ve).call(this),this.insertedCompRef=We(p,{environmentInjector:d}),this.compRef=We(Gi,{hostElement:g,environmentInjector:d,projectableNodes:[[this.insertedCompRef.location.nativeElement]]});let c=this.insertedCompRef.instance?.data,f=this.insertedCompRef.instance?.closed;if(v){if(Me(c))this.insertedCompRef.setInput("data",v);else if(!Me(c))throw new Error("data is not an input signal on the passed component")}f instanceof Be&&(this.closedFieldSub=f.subscribe((...T)=>{a?.(...T),x(this,i,ve).call(this)})),u(this,o).attachView(this.insertedCompRef.hostView),u(this,o).attachView(this.compRef.hostView),this.insertedCompRef.changeDetectorRef.detectChanges(),this.compRef.changeDetectorRef.detectChanges(),this.compRef.instance.isOpen.set(!0),this.compRef.setInput("options",l),this.compRef.instance.closed.subscribe(()=>C());let y=this;function C(){var T;f&&f instanceof Be?f.emit(!1):a?.(void 0),x(T=y,i,ve).call(T)}return{component:this.insertedCompRef.instance,close:C}}ngOnDestroy(){x(this,i,ve).call(this)}};e=new WeakMap,o=new WeakMap,i=new WeakSet,ht=function(){let p=document.createElement("spk-dialog-ref");return p.id="spk-dialog-ref",document.getElementById("spk-dialog-ref")||u(this,e).append(p),document.getElementById("spk-dialog-ref")},ve=function(){this.insertedCompRef&&(u(this,o).detachView(this.insertedCompRef.hostView),this.closedFieldSub?.unsubscribe(),this.insertedCompRef.destroy()),this.compRef&&(u(this,o).detachView(this.compRef.hostView),this.compClosedSub?.unsubscribe(),this.compRef.destroy())},h.\u0275fac=function(r){return new(r||h)},h.\u0275prov=be({token:h,factory:h.\u0275fac,providedIn:"root"});let t=h;return t})(),Mn=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=P({type:e,selectors:[["spk-button-group"]],ngContentSelectors:Y,decls:1,vars:0,template:function(n,s){n&1&&(L(),D(0))},encapsulation:2,changeDetection:0});let t=e;return t})(),Ki=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=P({type:e,selectors:[["","spk-button",""]],attrs:Ft,ngContentSelectors:Y,decls:1,vars:0,template:function(n,s){n&1&&(L(),D(0))},encapsulation:2,changeDetection:0});let t=e;return t})(),In=(()=>{var e;let o=class o{constructor(){E(this,e);M(this,e,j(Oe,{optional:!0})),this.class=I(u(this,e)?.cardType??"default")}};e=new WeakMap,o.\u0275fac=function(s){return new(s||o)},o.\u0275cmp=P({type:o,selectors:[["spk-card"]],hostVars:2,hostBindings:function(s,h){s&2&&oe(h.class())},ngContentSelectors:Y,decls:1,vars:0,template:function(s,h){s&1&&(L(),D(0))},encapsulation:2,changeDetection:0});let t=o;return t})(),Ji=(()=>{var e;let o=class o{constructor(){E(this,e,j(Q))}onClick(){u(this,e).nativeElement.querySelector("input")&&u(this,e).nativeElement.querySelector("input").focus()}};e=new WeakMap,o.\u0275fac=function(s){return new(s||o)},o.\u0275cmp=P({type:o,selectors:[["spk-checkbox"]],hostBindings:function(s,h){s&1&&B("click",function(){return h.onClick()})},ngContentSelectors:Y,decls:6,vars:0,consts:[[1,"box"],[1,"inherit","default-indicator"],[1,"inherit","indeterminate-indicator"]],template:function(s,h){s&1&&(L(),_(0,"div",0)(1,"spk-icon",1),V(2,"check"),S(),_(3,"spk-icon",2),V(4,"minus"),S()(),D(5))},dependencies:[ue],encapsulation:2,changeDetection:0});let t=o;return t})(),Zi=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=P({type:e,selectors:[["spk-chip"]],ngContentSelectors:Y,decls:1,vars:0,template:function(n,s){n&1&&(L(),D(0))},encapsulation:2,changeDetection:0});let t=e;return t})();var en=["scroll","auto"],tn={width:void 0,height:void 0,closeOnButton:!0,closeOnEsc:!0},ft=(()=>{var e,o,i,mt,ke;let h=class h{constructor(){E(this,i);E(this,e);E(this,o);M(this,e,j(pt)),M(this,o,4),this.SUPPORTS_ANCHOR=typeof CSS<"u"&&CSS.supports("position-anchor","--abc")&&CSS.supports("anchor-name","--abc"),this.above=b(!1),this.right=b(!1),this.markForCheck=b(null),this._above=I(this.above()),this._right=I(this.right()),this.disableOpenByClick=b(!1),this.isOpen=U(!1),this.options=b(),this.closed=ce(),this.defaultOptionMerge=H(()=>ne(ne({},tn),this.options())),this.triggerRef=ie.required("triggerRef"),this.popoverRef=ie.required("popoverRef"),this.id=I("--"+Ye()),this.menuStyle=I(null),this.openAbort=null,this.openEffect=N(()=>{let p=this.popoverRef()?.nativeElement;if(this.isOpen()){this.openAbort&&this.openAbort.abort(),this.openAbort=new AbortController;let d={signal:this.openAbort?.signal};p?.showPopover(),document.addEventListener("keydown",g=>{g.key==="Escape"&&!this.defaultOptionMerge().closeOnEsc&&g.preventDefault(),g.key==="Escape"&&this.defaultOptionMerge().closeOnEsc&&this.isOpen.set(!1)},d),setTimeout(()=>{x(this,i,mt).call(this,this.popoverRef()?.nativeElement).addEventListener("scroll",()=>x(this,i,ke).call(this),d),window.addEventListener("resize",()=>x(this,i,ke).call(this),d),x(this,i,ke).call(this)})}else p.hidePopover(),this.openAbort?.abort(),this.closed.emit()}),this.markForCheckEffect=N(()=>{this.markForCheck()&&u(this,e).markForCheck()})}toggleIsOpen(p){p.preventDefault(),p.stopPropagation(),this.disableOpenByClick()||this.isOpen.set(!this.isOpen())}eventClose(p){p.stopPropagation(),p.preventDefault(),this.isOpen.set(!1)}};e=new WeakMap,o=new WeakMap,i=new WeakSet,mt=function(p){let r=p.parentElement;for(;r;){if(en.indexOf(window.getComputedStyle(r).overflowY)>-1&&r.scrollHeight>r.clientHeight)return r;r=r.parentElement}return document.documentElement},ke=function(){let p=this.triggerRef()?.nativeElement.getBoundingClientRect(),r=this.popoverRef()?.nativeElement.getBoundingClientRect(),d=p.left,g=p.bottom,v=d,a=g+u(this,o),l=v+r.width>window.innerWidth,c=a+r.height>window.innerHeight;if(this.SUPPORTS_ANCHOR)this._above.set(c),this._right.set(l);else{if(v=d,a=g+u(this,o),c){let y=p.top-r.height-u(this,o);y<0||(a=y)}l&&(v=p.right-r.width,v<0&&(v=0));let f={left:v+"px",top:a+"px"};this.menuStyle.set(f)}},h.\u0275fac=function(r){return new(r||h)},h.\u0275cmp=P({type:h,selectors:[["spk-popover"]],viewQuery:function(r,d){r&1&&(te(d.triggerRef,Ht,5),te(d.popoverRef,Lt,5)),r&2&&se(2)},hostVars:4,hostBindings:function(r,d){r&2&&z("above",d._above())("right",d._right())},inputs:{above:[1,"above"],right:[1,"right"],markForCheck:[1,"markForCheck"],disableOpenByClick:[1,"disableOpenByClick"],isOpen:[1,"isOpen"],options:[1,"options"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:Bt,decls:10,vars:6,consts:[["triggerRef",""],["popoverRef",""],[1,"trigger",3,"click"],[1,"trigger-wrapper"],["spk-button","",1,"outlined"],["popover","",1,"popover"],[1,"overlay",3,"click"]],template:function(r,d){if(r&1){let g=ee();L(jt),_(0,"div",2,0),B("click",function(a){return A(g),F(d.toggleIsOpen(a))}),_(2,"div",3),D(3),S(),_(4,"button",4),V(5,"Open popover"),S()(),_(6,"div",5,1)(8,"div",6),B("click",function(a){return A(g),F(d.isOpen()&&d.eventClose(a))}),S(),D(9,1),S()}r&2&&(G("anchor-name",d.id()),O(6),at(d.menuStyle()),G("position-anchor",d.id()))},dependencies:[Ki],encapsulation:2,changeDetection:0});let t=h;return t})();var Vn=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=P({type:e,selectors:[["spk-divider"]],ngContentSelectors:Y,decls:1,vars:0,template:function(n,s){n&1&&(L(),D(0))},encapsulation:2,changeDetection:0});let t=e;return t})(),Xe=(()=>{var e;let o=class o{constructor(){E(this,e,j(Q))}onClick(){u(this,e).nativeElement.querySelector("input")&&u(this,e).nativeElement.querySelector("input").focus(),u(this,e).nativeElement.querySelector("textarea")&&u(this,e).nativeElement.querySelector("textarea").focus()}ngOnInit(){let n=typeof CSS<"u"&&CSS.supports("field-sizing","content"),s=u(this,e).nativeElement.querySelector("textarea");if(!n&&s!==null){let p=function(){s.style.height="auto",s.style.height=s.scrollHeight+"px"},r=function(){window.setTimeout(p,0)};var h=p,m=r;s.addEventListener("change",p),s.addEventListener("cut",r),s.addEventListener("paste",r),s.addEventListener("drop",r),s.addEventListener("keydown",r),s.focus(),s.select(),p()}}};e=new WeakMap,o.\u0275fac=function(s){return new(s||o)},o.\u0275cmp=P({type:o,selectors:[["spk-form-field"]],hostBindings:function(s,h){s&1&&B("click",function(){return h.onClick()})},ngContentSelectors:zt,decls:15,vars:0,consts:[[1,"input-wrap"],[1,"prefix"],[1,"suffix"],[1,"helpers"],[1,"error"],[1,"hint"]],template:function(s,h){s&1&&(L(qt),D(0),_(1,"div",0)(2,"div",1),D(3,1),D(4,2),S(),D(5,3),D(6,4),_(7,"div",2),D(8,5),D(9,6),S()(),_(10,"div",3)(11,"div",4),D(12,7),S(),_(13,"div",5),D(14,8),S()())},encapsulation:2,changeDetection:0});let t=o;return t})(),Rn=(()=>{let e=class e{constructor(){this._el=j(Q),this.inputRef=ie.required("input"),this.filesOver=I(!1),this.multiple=b(),this.accept=b(null),this.placeholder=U("Click or drag files here"),this.overlayText=b("Drop files here"),this.files=U([]),this.fileUploadClasses=H(()=>this._el.nativeElement.classList.toString()),this.inputEffect=N(()=>{let i=this.inputRef().nativeElement;i&&(i.placeholder&&this.placeholder.set(i.placeholder),i.addEventListener("dragover",n=>{n.preventDefault(),this.filesOver.set(!0)}),i.addEventListener("dragleave",n=>{n.preventDefault(),this.filesOver.set(!1)}),i.addEventListener("drop",n=>{n.preventDefault(),this.filesOver.set(!1);let s=n.dataTransfer?.files;s&&s.length>0&&(this.handleFileUpload(Array.from(s)),i.files=s)}),i.addEventListener("change",n=>{n.preventDefault(),this.handleFileUpload(Array.from(n.target.files))}))})}handleFileUpload(i){this.multiple()?this.files.update(n=>[...n,...i]):this.files.set(i)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=P({type:e,selectors:[["spk-file-upload"]],viewQuery:function(n,s){n&1&&te(s.inputRef,ut,5),n&2&&se()},inputs:{multiple:[1,"multiple"],accept:[1,"accept"],placeholder:[1,"placeholder"],overlayText:[1,"overlayText"],files:[1,"files"]},outputs:{placeholder:"placeholderChange",files:"filesChange"},ngContentSelectors:Ut,decls:12,vars:7,consts:[["inputWrap",""],["input",""],["ngProjectAs","input",5,["input"],1,"input"],[1,"files-text"],[1,"placeholder"],["type","file"],[1,"bg-overlay"],["suffix",""]],template:function(n,s){n&1&&(L(Nt),_(0,"spk-form-field"),D(1,0,["ngProjectAs","label",5,["label"]]),_(2,"div",2,0),W(4,$t,2,1,"div",3)(5,Qt,2,1,"div",3)(6,Yt,2,1,"div",4),Z(7,"input",5,1)(9,"div",6),S(),_(10,"spk-icon",7),V(11,"upload-simple"),S()()),n&2&&(oe(s.fileUploadClasses()),O(4),q(s.files().length===1?4:s.files().length>1?5:6),O(3),st("multiple",s.multiple())("accept",s.accept()),O(2),z("files-over",s.filesOver()))},dependencies:[Xe,ue],encapsulation:2,changeDetection:0});let t=e;return t})(),Pn=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=P({type:e,selectors:[["spk-list"]],ngContentSelectors:Y,decls:1,vars:0,template:function(n,s){n&1&&(L(),D(0))},encapsulation:2,changeDetection:0});let t=e;return t})();function gt(t,e){let o=e?.injector||(et(gt),j(Ee)),{debounce:i=0,initialValue:n=void 0,transform:s=C=>C,compare:h=(C,k)=>C===k,forceType:m=void 0,returnPreviousValue:p=!0}=e||{},r=I(n),d=o.get(Te),g=H(()=>{let C=t()?.nativeElement;if(C instanceof HTMLInputElement||C instanceof HTMLTextAreaElement)return f(C)}),v=!1,a,l=null;return N(()=>{let C=g();if(!C)return r.set(p&&a?s(a):void 0);n!==void 0&&C.value===""?r.set(n):C.value!==""&&c();let k=T=>{l!==null&&clearTimeout(l),l=setTimeout(()=>{l=null,c()},i)};C.addEventListener("input",k),C.addEventListener("inputValueChanged",k),d.onDestroy(()=>{C.removeEventListener("input",k),C.removeEventListener("inputValueChanged",k),l!==null&&clearTimeout(l)})},{injector:o}),N(()=>{let C=g();if(!C)return;let k=r()??"",T=k==null?"":String(k);C.value!==T&&(a=T,C.value=T,C.dispatchEvent(new Event("input")))},{injector:o}),r;function c(){if(!v){v=!0;try{let C=g();if(!C)return;let k=C.value,T=m?y(k,m):s(k);a=k,h(r(),T)||r.set(T)}finally{v=!1}}}function f(C){return Object.defineProperty(C,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(C),"value").get.call(this)},set(k){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(C),"value").set.call(this,k);let R=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:k}});return this.dispatchEvent(R),k}}),C}function y(C,k){switch(k){case"string":return C.toString();case"number":let T=Number(C);return isNaN(T)?void 0:T;case"boolean":return C.toLowerCase()==="true"?!0:C.toLowerCase()==="false"?!1:void 0;default:return C}}}function vt(t,e){let o=j(Ee),i=o.get(Te),n=I([]),s=null,h=null,m=(r,d)=>{h&&h.disconnect();let g=Array.from(r.nativeElement.querySelectorAll(d.join(",")));n.set(g),h=new MutationObserver(v=>{requestAnimationFrame(()=>{let a=Array.from(r.nativeElement.querySelectorAll(d.join(",")));n.set(a)})}),h.observe(r.nativeElement,{childList:!0,subtree:!0}),i.onDestroy(()=>p())};s=N(()=>{let r=typeof t=="function"&&t[Ke]?t():t,d=typeof e=="function"?e():e;r&&d?.length>0?m(r,d):(n.set([]),h&&(h.disconnect(),h=null))},{injector:o});function p(){s&&s.destroy(),h&&h.disconnect()}return{signal:n.asReadonly(),destroy:p}}var An=(()=>{var e,o,Ct,ze;let s=class s{constructor(){E(this,o);E(this,e);M(this,e,j(Ie)),this.above=b(!1),this.right=b(!1),this.openIndicator=b(!1),this.disabled=b(!1),this.customOptionElementSelectors=b(["button"]),this.keepClickedOptionActive=b(!1),this.closeOnClick=b(!0),this.isOpen=U(!1),this.closed=ce(),this.searchable=b(!1),this.activeOptionIndex=I(-1),this.inputRef=ie("input"),this.optionsRef=ie("optionsRef"),this.options=vt(this.optionsRef,this.customOptionElementSelectors),this.optionsEl=H(()=>this.options.signal().filter(m=>!m.disabled)),this.inputValue=gt(this.inputRef),this.abortController=null,this.optionsEffect=N(()=>{if(!this.isOpen())return;this.abortController&&(this.abortController.abort(),this.abortController=null),this.abortController=new AbortController;let m=this.inputRef()?.nativeElement;m&&(queueMicrotask(()=>m.focus()),this.closeOnClick()||this.optionsRef()?.nativeElement?.addEventListener("click",r=>{let d=r.target,g=this.activeElements();if(!g.length){let a=this.optionsEl();this.activeElements.set(a),g=a}let v=g.findIndex(a=>a===d);v>-1&&(this.activeOptionIndex.set(v),m.focus())}),m.addEventListener("keydown",p=>{let r=this.activeOptionIndex();p.key==="ArrowDown"?(p.preventDefault(),this.activeOptionIndex.set(this.nextActiveIndex(r))):p.key==="ArrowUp"?(p.preventDefault(),this.activeOptionIndex.set(this.prevActiveIndex(r))):p.key==="Enter"?(p.preventDefault(),r>-1&&(this.activeElements()[r].click(),queueMicrotask(()=>this.close("active")))):p.key==="Tab"&&(p.preventDefault(),this.close("closed"))},{signal:this.abortController.signal}))}),this._lastElementList=[],this.activeElements=I([]),this.lastInputValue="",this.inputValueEffect=N(()=>{if(!this.searchable())return;let p=(this.inputValue()??"").toLowerCase();if(x(this,o,ze).call(this),!p||p==="")return;let r=this._lastElementList.length&&p.length>this.lastInputValue.length?this._lastElementList:this.optionsEl();this.lastInputValue=p;for(let d=0;d<r.length;d++){let g=r[d],v=g.textContent?.toLowerCase()||"",a=x(this,o,Ct).call(this,v,p);g.value=a}r=r.filter(d=>d.value>0).sort((d,g)=>g.value-d.value);for(let d=0;d<r.length;d++)u(this,e).setStyle(r[d],"order",d);this.activeElements.set(r),this._lastElementList=r}),this.activeOptionIndexEffect=N(()=>{let m=this.activeElements(),p=this.activeOptionIndex();for(let r=0;r<m.length;r++)m[r].classList.remove("active");p>-1&&(m[p].scrollIntoView({block:"center"}),m[p].classList.add("active"))})}nextActiveIndex(m){let p=this.activeElements();if(!p.length){let d=this.optionsEl();this.activeElements.set(d),p=d}if(m===-1||m===p.length-1)return 0;let r=m+1;return p[r].disabled?this.nextActiveIndex(r):r}prevActiveIndex(m){let p=this.activeElements();if(!p.length){let d=this.optionsEl();this.activeElements.set(d),p=d}if(m===0||m===-1)return p.length-1;let r=m-1;return p[r].disabled?this.prevActiveIndex(r):r}close(m="closed",p){this.inputValue.set(""),this.closeOnClick()&&((!this.keepClickedOptionActive()||m==="closed")&&x(this,o,ze).call(this),this.isOpen.set(!1),this.closed.emit(m==="active"))}ngOnDestroy(){this.abortController&&(this.abortController.abort(),this.abortController=null)}};e=new WeakMap,o=new WeakSet,Ct=function(m,p){if(!p)return 0;let r=0,d=-1,g=0,v=!0;for(let a=0;a<p.length;a++){let l=p[a];if(m.length>d+1&&m[d+1]===l)r+=a===0?100:150,d++,g++;else{let c=m.indexOf(l,d+1);if(a>0&&(v=!1),c===-1)return 0;r+=100,d=c,g++}}return v&&p.length===g&&(r+=1e3),r+=g*20,r},ze=function(){this.activeOptionIndex.set(-1);let m=this.optionsEl();for(let p=0;p<m.length;p++)m[p].classList.remove("active")},s.\u0275fac=function(p){return new(p||s)},s.\u0275cmp=P({type:s,selectors:[["spk-menu"]],viewQuery:function(p,r){p&1&&(te(r.inputRef,ut,5),te(r.optionsRef,Xt,5)),p&2&&se(2)},hostVars:4,hostBindings:function(p,r){p&2&&z("disabled",r.disabled())("has-search",r.searchable())},inputs:{above:[1,"above"],right:[1,"right"],openIndicator:[1,"openIndicator"],disabled:[1,"disabled"],customOptionElementSelectors:[1,"customOptionElementSelectors"],keepClickedOptionActive:[1,"keepClickedOptionActive"],closeOnClick:[1,"closeOnClick"],isOpen:[1,"isOpen"],searchable:[1,"searchable"]},outputs:{isOpen:"isOpenChange",closed:"closed"},ngContentSelectors:Kt,decls:12,vars:13,consts:[["formFieldWrapper",""],["input",""],["optionsRef",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","above","right","options"],["trigger","",3,"click"],[1,"open-indicator"],[1,"form-field-wrap"],[1,"small","stretch"],["type","text","placeholder","Search"],[1,"options",3,"click"]],template:function(p,r){if(p&1){let d=ee();L(Gt),_(0,"spk-popover",3,0),Le("isOpenChange",function(v){return A(d),He(r.isOpen,v)||(r.isOpen=v),F(v)}),B("closed",function(){return A(d),F(r.close("fromPopover"))}),_(2,"div",4),B("click",function(){return A(d),F(!r.disabled()&&r.isOpen.set(!0))}),D(3),W(4,Jt,2,0,"spk-icon",5),S(),_(5,"div",6)(6,"spk-form-field",7),Z(7,"input",8,1),S()(),_(9,"div",9,2),B("click",function(){return A(d),F(r.close("active"))}),D(11,1),S()()}p&2&&(Fe("isOpen",r.isOpen),re("disableOpenByClick",!0)("above",r.above())("right",r.right())("options",je(12,Wt)),O(2),z("is-open",r.isOpen()),O(2),q(r.openIndicator()?4:-1),O(2),z("hidden",r.searchable()===!1),O(3),z("searching",r.searchable()&&r.inputValue()!==""))},dependencies:[ft,Xe,ue],encapsulation:2,changeDetection:0});let t=s;return t})(),nn=(()=>{let e=class e{constructor(){this.value=b(void 0)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=P({type:e,selectors:[["spk-progress-bar"]],inputs:{value:[1,"value"]},decls:1,vars:2,consts:[[1,"progress-bar"]],template:function(n,s){n&1&&Z(0,"div",0),n&2&&G("width",s.value(),"%")},encapsulation:2,changeDetection:0});let t=e;return t})(),Fn=(()=>{var e;let o=class o{constructor(){E(this,e,j(Q))}onClick(){u(this,e).nativeElement.querySelector("input")&&u(this,e).nativeElement.querySelector("input").focus()}};e=new WeakMap,o.\u0275fac=function(s){return new(s||o)},o.\u0275cmp=P({type:o,selectors:[["spk-radio"]],hostBindings:function(s,h){s&1&&B("click",function(){return h.onClick()})},ngContentSelectors:Y,decls:2,vars:0,consts:[[1,"radio"]],template:function(s,h){s&1&&(L(),Z(0,"div",0),D(1))},encapsulation:2,changeDetection:0});let t=o;return t})(),Hn=(()=>{var e,o,i,n,s,Ne,_t,St,yt;let d=class d{constructor(){E(this,s);E(this,e);E(this,o);E(this,i);E(this,n);M(this,e,j(Q)),M(this,o,null),M(this,i,null),M(this,n,0),this.alwaysShowThumb=b(!1),this.unit=b(""),this.value=U(u(this,n)),this.inputState=I({min:0,max:100,step:1}),this.valuePercentage=H(()=>{let{min:v,max:a}=this.inputState(),l=this.value()??v;if(isNaN(l))return 0;let c=a-v;if(c===0)return 0;let f=(l-v)/c*100;return Math.max(0,Math.min(100,f))}),this.trackFilledPercentage=H(()=>this.valuePercentage()),this.thumbPositionPercentage=H(()=>this.valuePercentage()),this.syncModelToInputEffect=N(()=>{let v=this.value();if(u(this,i)){let a=parseFloat(u(this,i).value);(isNaN(a)||String(a)!==String(v))&&(u(this,i).value=String(v))}})}get hasInputElement(){return!!u(this,i)}ngAfterViewInit(){M(this,i,u(this,e).nativeElement.querySelector('input[type="range"]')),u(this,i)?(x(this,s,yt).call(this,u(this,i)),u(this,i).oninput=()=>{this.setNewInputValue(u(this,i).value)},u(this,i).addEventListener("inputValueChanged",v=>{this.setNewInputValue(v.detail.value)}),queueMicrotask(()=>x(this,s,Ne).call(this,!0)),x(this,s,_t).call(this)):console.error('SparkleRangeSliderComponent: No <input type="range"> element found projected inside.')}setNewInputValue(v){let a=parseFloat(v??"0");if(!isNaN(a)){let{min:l,max:c}=this.inputState();this.value.set(Math.max(l,Math.min(c,a)))}}trackEvent(v){if(!u(this,i)||u(this,i).readOnly||u(this,i).disabled){v.preventDefault(),v.stopPropagation();return}if(v.target===u(this,i)||v.target?.closest(".thumb, .min-indicator, .max-indicator"))return;let l=v.currentTarget.getBoundingClientRect(),c=v.clientX-l.left,f=l.width,{min:y,max:C,step:k}=this.inputState(),T=C-y;if(f>0&&T!==0&&k>0){let $=(c/f*T+y-y)/k,J=y+Math.round($)*k,he=x(this,s,St).call(this,k);J=parseFloat(J.toFixed(he));let fe=Math.max(y,Math.min(C,J));this.value.set(fe)}}ngOnDestroy(){u(this,o)&&u(this,o).disconnect(),u(this,i)&&(u(this,i).oninput=null)}};e=new WeakMap,o=new WeakMap,i=new WeakMap,n=new WeakMap,s=new WeakSet,Ne=function(v=!1){if(!u(this,i))return;let a=parseFloat(u(this,i).min??"0")??0,l=parseFloat(u(this,i).max??"100")??100,c=u(this,i).step,f=1;if(c&&c.toLowerCase()!=="any"){let C=parseFloat(c);!isNaN(C)&&C>0&&(f=C)}this.inputState.set({min:a,max:l,step:f});let y=parseFloat(u(this,i).value??String(a))??a;if(v&&this.value()!==u(this,n)){let C=this.value(),k=Math.max(a,Math.min(l,C));y!==k&&(u(this,i).value=String(k)),C!==k&&this.value.set(k)}else{let C=Math.max(a,Math.min(l,y));this.value()!==C&&this.value.set(C)}},_t=function(){if(!u(this,i)||typeof MutationObserver>"u")return;let v=["min","max","step","value","readonly","disabled"];M(this,o,new MutationObserver(a=>{let l=!1;for(let c of a)if(c.type==="attributes"&&v.includes(c.attributeName??"")){l=!0;break}l&&x(this,s,Ne).call(this,!1)})),u(this,o).observe(u(this,i),{attributes:!0})},St=function(v){if(isNaN(v)||Math.floor(v)===v)return 0;let l=v.toString().split(".")[1];return l?l.length:0},yt=function(v){Object.defineProperty(v,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(v),"value").get.call(this)},set(a){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(v),"value").set.call(this,a);let c=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:a}});return this.dispatchEvent(c),a}})},d.\u0275fac=function(a){return new(a||d)},d.\u0275cmp=P({type:d,selectors:[["spk-range-slider"]],hostVars:2,hostBindings:function(a,l){a&2&&z("has-input",l.hasInputElement)},inputs:{alwaysShowThumb:[1,"alwaysShowThumb"],unit:[1,"unit"],value:[1,"value"]},outputs:{value:"valueChange"},ngContentSelectors:ei,decls:15,vars:12,consts:[[1,"label"],[1,"input-wrap"],[1,"min-indicator"],[1,"track-wrap",3,"click"],[1,"track"],[1,"track-filled"],[1,"thumb-wrap"],[1,"thumb"],[1,"value-indicator"],[1,"max-indicator"]],template:function(a,l){a&1&&(L(Zt),_(0,"div",0),D(1),S(),_(2,"div",1)(3,"div",2),V(4),S(),_(5,"div",3),B("click",function(f){return l.trackEvent(f)}),D(6,1),_(7,"div",4),Z(8,"div",5),S(),_(9,"div",6)(10,"div",7)(11,"div",8),V(12),S()()()(),_(13,"div",9),V(14),S()()),a&2&&(O(4),Se("",l.inputState().min,"",l.unit()),O(4),G("width",l.trackFilledPercentage(),"%"),O(),G("left",l.thumbPositionPercentage(),"%"),O(),z("always-show",l.alwaysShowThumb()),O(2),Se("",l.value(),"",l.unit()),O(2),Se("",l.inputState().max,"",l.unit()))},encapsulation:2,changeDetection:0});let t=d;return t})(),sn=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=P({type:e,selectors:[["spk-spinner"]],decls:0,vars:0,template:function(n,s){},encapsulation:2,changeDetection:0});let t=e;return t})(),Ln=(()=>{var e,o,i,Ue,s,$e,X,kt,xt,Dt;let g=class g{constructor(){E(this,i);E(this,e);E(this,o);E(this,s);M(this,e,j(Q)),this.value=b(),this.label=b(),this.asFreeText=b(!1),this.placeholder=b(),this.readonly=U(!1),this.disabled=U(!1),this.lazySearch=b(!1),this.inlineSearch=b(!1),this.asText=b(!1),this.isClearable=b(!0),this.selectMultiple=b(!1),this.optionTemplate=b(null),this.selectedOptionTemplate=b(null),this.placeholderTemplate=b(null),this.isOpen=U(!1),this.isLoading=U(!1),this.options=U([]),this.selectedOptions=U([]),this.cleared=ce(),this.inlineTemplate=ct(Ce),this.optionsWrapRef=ie.required("optionsWrap"),this.inputRefInput=I(null),M(this,o,typeof MutationObserver<"u"&&new MutationObserver(a=>{for(var l of a)l&&(l.target.nodeName==="INPUT"||l.target.nodeName==="TEXTAREA")&&(this.inputRefInput.set(new Q(l.target)),u(this,o).disconnect())})),this.inputValue=I(""),this.prevInputValue=I(null),this.focusedOptionIndex=I(-1),this._isClearable=H(()=>this.selectMultiple()||this.isClearable()),this.selectClasses=H(()=>u(this,e).nativeElement.classList.toString()),this.stretch=H(()=>this.selectClasses().includes("stretch")),this.placeholderText=H(()=>{let a=this.placeholder(),l=this.inputRefEl();return a||l?.placeholder||null}),this.selectedOptionValues=H(()=>{let a=this.selectedOptions(),l=this.value();return l?a.map(c=>x(this,i,X).call(this,c,l)):a}),this.filteredOptions=H(()=>{let a=this.options()||[],l=this.label(),c=this.value(),f=this.inlineSearch(),y=this.inputValue().toLowerCase(),C=x(this,i,xt).call(this,y);if(a.length<=0)return[];if(!f||y==="")return a;let T=a.filter(R=>{let $=l?(x(this,i,X).call(this,R,l)??"").toString().toLowerCase():(R??"").toString().toLowerCase(),J=((c?x(this,i,X).call(this,R,c):R)??"").toString().toLowerCase(),he=C.test($),fe=C.test(J);return he||fe}).map(R=>{let $=l?(x(this,i,X).call(this,R,l)??"").toString().toLowerCase():(R??"").toString().toLowerCase(),J=((c?x(this,i,X).call(this,R,c):R)??"").toString().toLowerCase(),he=x(this,i,Ue).call(this,$,y),fe=x(this,i,Ue).call(this,J,y);return{item:R,score:Math.max(he,fe)}});return T.sort((R,$)=>$.score-R.score),T.map(R=>R.item)}),this.inputRefEl=H(()=>{let a=this.inputRefInput();if(a===null)return;let l=a?a.nativeElement:null;return l?(l.autocomplete="off",x(this,i,kt).call(this,l),l.addEventListener("focus",()=>{this.readonly()||this.open()}),this.hasSearch()&&l.addEventListener("input",c=>{let f=c.target.value,y=this.inputValue();f!==y&&(this.focusedOptionIndex.set(this.asFreeText()?-1:0),this.inputValue.set(f),this.updateInputElValue())}),l.addEventListener("inputValueChanged",c=>{let f=c.detail.value,y=this.inputValue();if(f!==y){if(f===""){this.clear();return}this.setSelectedOptionsFromValue(f),this.setInputValueFromSelectedOptions(),x(this,i,$e).call(this)}}),l):(console.warn("<spk-select> input element not found are you missing to pass an <input> or <textarea> element to select component?"),null)}),this.openAbortController=null,this.isOpenEffect=N(()=>{if(this.isOpen()){this.openAbortController||(this.openAbortController=new AbortController);let l=this.inputRefEl();if(!l)return;l.addEventListener("keydown",c=>{if((c.key==="Escape"||c.key==="Tab")&&(c.preventDefault(),this.close()),(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),this.toggleOptionByIndex(this.focusedOptionIndex())),c.key==="ArrowDown"){c.preventDefault();let f=this.focusedOptionIndex()+1;this.focusedOptionIndex.set(f>this.filteredOptions().length-1?0:f)}if(c.key==="ArrowUp"){c.preventDefault();let f=this.focusedOptionIndex()-1;this.focusedOptionIndex.set(f<0?this.filteredOptions().length-1:f)}},{signal:this.openAbortController?.signal})}else{if(!this.inputRefEl())return;this.openAbortController&&(this.openAbortController.abort(),this.openAbortController=null)}}),this._inputValue="",this.inputValueEffect=N(()=>{let a=this.inputValue();this._inputValue=a}),this.inputRefElEffect=N(()=>{let a=this.inputRefEl();a&&a.value!==this._inputValue&&(this.disabled.set(a.disabled),this.setSelectedOptionsFromValue(a.value),this.setInputValueFromSelectedOptions())}),this.selectedLabels=H(()=>{let a=this.selectedOptions();return this.label()?a.map(c=>this.getLabel(c)).join(", "):a.join(", ")}),this.inputState=H(()=>(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=H(()=>this.inlineSearch()||this.lazySearch()),M(this,s,N(()=>{if(this.selectMultiple()&&this.hasSearch())return;let a=this.selectedOptions(),l=this.value(),c=a.map(f=>l?x(this,i,X).call(this,f,l):f).join(",");this.inputValue.set(c)}))}ngOnInit(){this.setInitInput()}setInitInput(){let a=u(this,e).nativeElement.querySelector("input");if(a){this.inputRefInput.set(new Q(a));return}let l=u(this,e).nativeElement.querySelector("textarea");if(l){this.inputRefInput.set(new Q(l));return}typeof MutationObserver<"u"&&u(this,o).observe(u(this,e).nativeElement,{attributes:!0,childList:!0,subtree:!0,characterData:!0})}setSelectedOptionsFromValue(a){let l=this.options()||[],c=this.value(),f=this.selectMultiple(),y=a.toString().split(",");if(y.length===0){this.selectedOptions.set([]);return}let C=f?y:[y[0]],k=l.filter(T=>{let R=c?x(this,i,X).call(this,T,c)?.toString():T?.toString();return R&&C.includes(R)});this.selectedOptions.set(f?k:[k[0]])}setInputValueFromSelectedOptions(){let a=this.selectedOptions(),l=this.value();if(a.length===0){this.inputValue.set(""),this.updateInputElValue();return}let c=a.map(f=>l?x(this,i,X).call(this,f,l):f).join(",");this.inputValue.set(c),this.updateInputElValue()}getLabel(a){let l=this.label();return l?x(this,i,X).call(this,a,l):a}toggleOptionByIndex(a,l){let c=this.filteredOptions()[a];if(this.asFreeText()&&a===-1||!c){this.close();return}l&&l.stopPropagation();let f=this.selectMultiple(),y=this._isClearable(),C=this.value(),k=this.selectedOptionValues(),T=C?x(this,i,X).call(this,c,C):c;this.prevInputValue.set(null),this.selectedOptions.update(R=>{let $=k.indexOf(T);if($>-1){let J=[...R.slice(0,$),...R.slice($+1)];return y||J.length>0?J:R}else return this.focusedOptionIndex.set(a),f?[...R,c]:[c]}),f?this.inputRefEl()?.focus():this.isOpen.set(!1),this.setInputValueFromSelectedOptions(),f&&this.hasSearch()&&(this.inputValue.set(""),this.updateInputElValue())}removeSelectedOptionByIndex(a,l){a.stopPropagation(),this.selectedOptions.update(c=>[...c.slice(0,l),...c.slice(l+1)]),this.setInputValueFromSelectedOptions()}isSelected(a){let l=this.value(),c=this.filteredOptions()[a],f=l?x(this,i,X).call(this,c,l):c;return this.selectedOptionValues().indexOf(f)>-1}open(){this.isOpen()||(this.isOpen.set(!0),this.hasSearch()&&(this.prevInputValue.set(this.inputValue()??""),this.inputValue.set(""),this.updateInputElValue()),this.selectMultiple()||x(this,i,$e).call(this))}close(){this.isOpen.set(!1);let a=this.prevInputValue();if(this.asFreeText()){this.updateInputElValue();return}this.hasSearch()&&a&&(this.inputValue.set(a),this.setInputValueFromSelectedOptions()),this.selectMultiple()&&this.setInputValueFromSelectedOptions()}clear(a){a?.stopPropagation(),this.inputValue.set(""),this.selectedOptions.set([]),this.isOpen.set(!1),this.prevInputValue.set(null),this.cleared.emit(),this.updateInputElValue()}updateInputElValue(){let a=this.inputRefEl(),l=this.inputValue();a&&(a.value=l,a.dispatchEvent(new Event("input")))}ngOnDestroy(){this.openAbortController&&(this.openAbortController.abort(),this.openAbortController=null),typeof MutationObserver<"u"&&u(this,o).disconnect()}};e=new WeakMap,o=new WeakMap,i=new WeakSet,Ue=function(a,l){if(!l)return 0;let c=0,f=-1,y=0,C=!0;for(let k=0;k<l.length;k++){let T=l[k];if(a.length>f+1&&a[f+1]===T)c+=k===0?100:150,f++,y++;else{let R=a.indexOf(T,f+1);if(k>0&&(C=!1),R===-1)return 0;c+=100,f=R,y++}}return C&&l.length===y&&(c+=1e3),c+=y*20,c},s=new WeakMap,$e=function(){let a=this.selectedOptionValues()[0],l=this.value();if(a){let c=this.filteredOptions().findIndex(f=>l?x(this,i,X).call(this,f,l)===a:f===a);this.focusedOptionIndex.set(c)}else this.focusedOptionIndex.set(-1)},X=function(a,l){return l.split(".").reduce((c,f)=>c?.[f],a)},kt=function(a){Object.defineProperty(a,"value",{configurable:!0,get(){return Object.getOwnPropertyDescriptor(Object.getPrototypeOf(a),"value").get.call(this)},set(l){Object.getOwnPropertyDescriptor(Object.getPrototypeOf(a),"value").set.call(this,l);let f=new CustomEvent("inputValueChanged",{bubbles:!0,cancelable:!0,detail:{value:l}});return this.dispatchEvent(f),l}})},xt=function(a){let l=(a??"").toLowerCase(),c="^";for(let f of l)c+=".*"+x(this,i,Dt).call(this,f);return c+=".*$",new RegExp(c,"i")},Dt=function(a){return a.replace(/[-\/\\^$+?.()|[\]{}]/g,"\\$&")},g.\u0275fac=function(l){return new(l||g)},g.\u0275cmp=P({type:g,selectors:[["spk-select"]],contentQueries:function(l,c,f){l&1&&ot(f,c.inlineTemplate,Ce,5),l&2&&se()},viewQuery:function(l,c){l&1&&te(c.optionsWrapRef,ti,5),l&2&&se()},hostVars:2,hostBindings:function(l,c){l&2&&z("multiple",c.selectMultiple())},inputs:{value:[1,"value"],label:[1,"label"],asFreeText:[1,"asFreeText"],placeholder:[1,"placeholder"],readonly:[1,"readonly"],disabled:[1,"disabled"],lazySearch:[1,"lazySearch"],inlineSearch:[1,"inlineSearch"],asText:[1,"asText"],isClearable:[1,"isClearable"],selectMultiple:[1,"selectMultiple"],optionTemplate:[1,"optionTemplate"],selectedOptionTemplate:[1,"selectedOptionTemplate"],placeholderTemplate:[1,"placeholderTemplate"],isOpen:[1,"isOpen"],isLoading:[1,"isLoading"],options:[1,"options"],selectedOptions:[1,"selectedOptions"]},outputs:{readonly:"readonlyChange",disabled:"disabledChange",isOpen:"isOpenChange",isLoading:"isLoadingChange",options:"optionsChange",selectedOptions:"selectedOptionsChange",cleared:"cleared"},ngContentSelectors:ni,decls:28,vars:22,consts:[["formFieldWrapper",""],["optionsWrap",""],[3,"isOpenChange","closed","isOpen","disableOpenByClick","options"],["trigger","",3,"click"],["ngProjectAs","input",5,["input"],1,"input"],[1,"selected-value"],["suffix",""],["suffix","",1,"primary"],[1,"sparkle-options"],[1,"option",3,"selected","focused"],[1,"small",3,"class"],[1,"small"],[3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[4,"ngTemplateOutlet"],["suffix","",3,"click"],[1,"option",3,"click"],[3,"class","active"]],template:function(l,c){if(l&1){let f=ee();L(ii),lt(0)(1)(2)(3)(4)(5),_(6,"spk-popover",2,0),Le("isOpenChange",function(C){return A(f),He(c.isOpen,C)||(c.isOpen=C),F(C)}),B("closed",function(){return A(f),F(c.close())}),_(8,"spk-form-field",3),B("click",function(){return A(f),F(c.open())}),D(9,0,["ngProjectAs","label",5,["label"]]),_(10,"div",4)(11,"div",5),W(12,oi,1,1)(13,vi,2,0)(14,yi,2,1),D(15,1),D(16,2),S()(),W(17,ki,2,0,"spk-icon",6)(18,xi,1,0,"spk-spinner",7)(19,Di,2,0,"spk-icon",6)(20,wi,2,0,"spk-icon",6)(21,Oi,2,0,"spk-icon",6)(22,bi,2,0,"spk-icon",6)(23,Ei,2,0,"spk-icon",6),S(),_(24,"div",8,1),Re(26,Ri,4,6,"li",9,Ve),S()()}if(l&2){le(c.placeholderTemplate());let f=c.optionTemplate(),y=c.selectedOptionTemplate(),C=c.inlineTemplate();O();let k=le(c.selectedOptions()),T=c.inputState();O(),le(y||f||C),O(),le(f||C),O();let R=le(!c.asText()&&c.selectMultiple());O();let $=le(c.isOpen()&&c.hasSearch()&&(R||c.inputValue().length>0));O(),Fe("isOpen",c.isOpen),re("disableOpenByClick",!0)("options",je(21,si)),O(2),z("stretch",c.stretch())("autosize",c.selectMultiple())("readonly",c.readonly()||c.disabled()),O(2),z("show-search-text",$),O(),z("is-selected",T==="selected"),O(),q(c.asFreeText()&&c.inputValue().length>0&&!c.isOpen()?12:k.length>0?13:$?-1:14),O(5),q(T==="closed"?17:T==="loading"?18:T==="open-searching"?19:T==="searching"?20:T==="selected"&&c._isClearable()?21:T==="selected"&&!c._isClearable()?22:23),O(9),Pe(c.filteredOptions())}},dependencies:[dt,ft,Xe,ue,Ji,sn,Zi],encapsulation:2,changeDetection:0});let t=g;return t})(),jn=(()=>{var e,o,i,xe,De;let h=class h{constructor(){E(this,i);E(this,e);E(this,o);M(this,e,j(Oe,{optional:!0})),M(this,o,I(u(this,e)?.sidenavType)),this.openWidth=280,this.openWidthTreshold=this.openWidth*.9,this.disableDrag=b(!1),this.isOpen=U(!1),this.type=b(void 0),this._type=H(()=>this.type()?this.type():u(this,e)?.sidenavType),this.dragImageElement=ie.required("dragImageElement"),this.dragIsEnding=I(!1),this.dragIsOnScreen=I(!0),this.isDragging=I(!1),this.dragPositionX=I(0),this.dragActualPositionX=H(()=>{let p=this.dragPositionX(),r=.32;return p>this.openWidthTreshold?this.openWidthTreshold+(p-this.openWidthTreshold)*r:p}),this.draggingStyle=H(()=>this._type()!=="overlay"?null:this.isDragging()?`translateX(${this.dragActualPositionX()}px)`:this.isOpen()?`translateX(${this.openWidth}px)`:"translateX(0px)"),this.draggingEffect=N(()=>{this.isDragging()&&document.body.classList.add("dragging")})}drop(p){p.stopPropagation(),x(this,i,xe).call(this,p.clientX)}dragEnd(p){(p.clientX<0||!this.dragIsOnScreen())&&x(this,i,xe).call(this,0)}dragEnter(){this.dragIsOnScreen.set(!0)}dragLeave(){this.dragIsOnScreen.set(!1)}dragOver(p){p.preventDefault(),x(this,i,De).call(this,p)}dragStart(p){p.stopPropagation(),this.isDragging.set(!0),x(this,i,De).call(this,p)}drag(p){p.stopPropagation(),setTimeout(()=>{this.isDragging()&&this.dragIsOnScreen()&&this.dragPositionX.set(p.clientX)}),x(this,i,De).call(this,p)}touchStart(p){p.stopPropagation(),this.isDragging.set(!0)}touchMove(p){p.stopPropagation(),setTimeout(()=>{this.isDragging()&&this.dragIsOnScreen()&&this.dragPositionX.set(p.touches[0].clientX)})}touchEnd(p){p.stopPropagation(),x(this,i,xe).call(this,p.changedTouches[0].clientX)}touchCancel(p){p.stopPropagation(),this.isDragging.set(!1)}};e=new WeakMap,o=new WeakMap,i=new WeakSet,xe=function(p){this.isDragging.set(!1),p<=0?this.isOpen.set(!1):p>this.openWidthTreshold?this.isOpen.set(!0):p<this.openWidthTreshold&&(!this.isOpen()&&p<this.openWidthTreshold*.6?this.isOpen.set(!0):this.isOpen.set(!1))},De=function(p){p.dataTransfer?.setDragImage(this.dragImageElement().nativeElement,0,0)},h.\u0275fac=function(r){return new(r||h)},h.\u0275cmp=P({type:h,selectors:[["spk-sidenav"]],viewQuery:function(r,d){r&1&&te(d.dragImageElement,Pi,5),r&2&&se()},hostVars:8,hostBindings:function(r,d){r&2&&(oe(d._type()),z("open",d.isOpen())("closed",!d.isOpen())("is-dragging",d.isDragging()))},inputs:{disableDrag:[1,"disableDrag"],isOpen:[1,"isOpen"],type:[1,"type"]},outputs:{isOpen:"isOpenChange"},ngContentSelectors:Fi,decls:10,vars:5,consts:[["dragImageElement",""],[1,"drag-image"],[1,"dropping-surface"],[1,"sidenav"],[1,"main-wrap"],["draggable","true",1,"dragable"],[1,"closed-topbar"],[1,"dropping-surface",3,"drop","dragover","dragenter","dragleave"],["draggable","true",1,"dragable",3,"dragstart","dragend","drag","touchstart","touchmove","touchend","touchcancel"]],template:function(r,d){r&1&&(L(Ai),W(0,Hi,2,0,"div",1),W(1,Li,1,0,"div",2),_(2,"div",3),D(3),S(),_(4,"div",4),W(5,ji,1,0,"div",5),_(6,"div",6),D(7,1),S(),_(8,"main"),D(9,2),S()()),r&2&&(q(d.type()==="overlay"?0:-1),O(),q(d.type()==="overlay"&&d.isDragging()?1:-1),O(3),G("transform",d.draggingStyle()),O(),q(d.type()==="overlay"&&!d.disableDrag()?5:-1))},encapsulation:2,changeDetection:0});let t=h;return t})();var Bn=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=P({type:e,selectors:[["spk-stepper"]],ngContentSelectors:Y,decls:1,vars:0,template:function(n,s){n&1&&(L(),D(0))},encapsulation:2,changeDetection:0});let t=e;return t})();var Wn=(()=>{var e;let o=class o{constructor(){E(this,e);M(this,e,j(on)),this.spkSort=b(),this.sortAsc=H(()=>{let n=u(this,e).sortByColumn(),s=this.spkSort();return!n||!s?!1:n===s}),this.sortDesc=H(()=>{let n=u(this,e).sortByColumn(),s=this.spkSort();return!n||!s?!1:n===`-${s}`})}toggleSort(){let n=this.spkSort();n&&u(this,e).toggleSort(n)}};e=new WeakMap,o.\u0275fac=function(s){return new(s||o)},o.\u0275dir=_e({type:o,selectors:[["","spkSort",""]],hostAttrs:[1,"sortable"],hostVars:4,hostBindings:function(s,h){s&1&&B("mousedown",function(){return h.toggleSort()}),s&2&&z("sort-asc",h.sortAsc())("sort-desc",h.sortDesc())},inputs:{spkSort:[1,"spkSort"]}});let t=o;return t})();var de=1.5,on=(()=>{var e,o,i,n,s,we;let m=class m{constructor(){E(this,s);E(this,e);E(this,o);E(this,i);E(this,n);M(this,e,j(Q)),M(this,o,j(Oe,{optional:!0})),this.loading=b(!1),this.data=b([]),this.dataChange=ce(),this.sortByColumn=U(null),this.thead=ie("thead"),this.columns=vt(this.thead,["TH"]),this.class=I(u(this,o)?.tableType??"default"),this.resizing=I(!1),this.sizeTrigger=I(!0),M(this,i,null),M(this,n,I(!1)),this.scrollXState=I(-1),this.scrollYState=I(-1),this.canScrollX=I(!1),this.canScrollY=I(!1),this.columnSizes=H(()=>{this.sizeTrigger();let r=this.columns.signal();return r.reduce((d,g,v)=>{let a=g,l=v===r.length-1;return a.dataset.size?`${d} ${a.dataset.size}`:a.classList.contains("sticky")||a.classList.contains("sticky-end")?`${d} min-content`:l?`${d} 1fr`:`${d} 1fr`},"")}),this.e=N(()=>{let r=this.sortByColumn();if(r===null)return u(this,n).call(this)||(M(this,i,this.data()),u(this,n).set(!0)),this.dataChange.emit(structuredClone(u(this,i)));let d=r.startsWith("-")?r.slice(1):r,g=r.startsWith("-"),v=this.data().sort((a,l)=>{let c=a[d],f=l[d],y=0;return typeof c=="number"&&typeof f=="number"&&(y=c-f),c instanceof Date&&f instanceof Date&&(y=c.getTime()-f.getTime()),typeof c=="string"&&typeof f=="string"&&(y=c.localeCompare(f,void 0,{sensitivity:"base"})),g?-y:y});this.dataChange.emit(v)})}updateColumnSizes(){this.sizeTrigger.set(!this.sizeTrigger())}onScroll(){x(this,s,we).call(this)}onResize(r){x(this,s,we).call(this)}ngAfterViewInit(){queueMicrotask(()=>x(this,s,we).call(this))}toggleSort(r){let d=this.sortByColumn(),g=d===r?`-${r}`:d===`-${r}`?null:r;this.sortByColumn.set(g)}};e=new WeakMap,o=new WeakMap,i=new WeakMap,n=new WeakMap,s=new WeakSet,we=function(){let r=u(this,e).nativeElement,d=-1,g=-1,v=r.scrollWidth>r.clientWidth+de;if(v){let l=r.scrollLeft<=de;r.scrollWidth-(r.scrollLeft+r.clientWidth)<de?d=1:l||(d=0)}this.scrollXState.set(d),this.canScrollX.set(v);let a=r.scrollHeight>r.clientHeight+de;if(a){let l=r.scrollTop<=de;r.scrollHeight-(r.scrollTop+r.clientHeight)<de?g=1:l||(g=0)}this.scrollYState.set(g),this.canScrollY.set(a)},m.\u0275fac=function(d){return new(d||m)},m.\u0275cmp=P({type:m,selectors:[["spk-table"]],viewQuery:function(d,g){d&1&&te(g.thead,Bi,5),d&2&&se()},hostVars:18,hostBindings:function(d,g){d&1&&B("scroll",function(){return g.onScroll()})("resize",function(a){return g.onResize(a)},tt),d&2&&(oe(g.class()),G("grid-template-columns",g.columnSizes()),z("resizing",g.resizing())("can-scroll-x",g.canScrollX())("can-scroll-y",g.canScrollY())("scrolled-x",g.scrollXState()>=0)("scrolled-x-end",g.scrollXState()===1)("scrolled-y",g.scrollYState()>=0)("scrolled-y-end",g.scrollYState()===1))},inputs:{loading:[1,"loading"],data:[1,"data"],sortByColumn:[1,"sortByColumn"]},outputs:{dataChange:"dataChange",sortByColumn:"sortByColumnChange"},ngContentSelectors:qi,decls:7,vars:2,consts:[["thead",""],[1,"indeterminate","primary"],[1,"no-rows"]],template:function(d,g){d&1&&(L(Wi),_(0,"thead",null,0),D(2),W(3,zi,1,0,"spk-progress-bar",1),S(),_(4,"tbody"),D(5,1),S(),W(6,Ni,2,0,"div",2)),d&2&&(O(3),q(g.loading()?3:-1),O(3),q(g.loading()?-1:6))},dependencies:[nn],encapsulation:2,changeDetection:0});let t=m;return t})(),qn=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=P({type:e,selectors:[["spk-tabs"]],ngContentSelectors:Y,decls:1,vars:0,template:function(n,s){n&1&&(L(),D(0))},encapsulation:2,changeDetection:0});let t=e;return t})(),zn=(()=>{let e=class e{constructor(){this.isActive=U(!1),this.disallowToggle=b(!1)}ngOnInit(){this.disallowToggle()&&this.isActive.set(!0)}toggle(){this.isActive.set(!this.isActive())}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=P({type:e,selectors:[["spk-toggle-card"]],hostVars:2,hostBindings:function(n,s){n&2&&z("active",s.isActive())},inputs:{isActive:[1,"isActive"],disallowToggle:[1,"disallowToggle"]},outputs:{isActive:"isActiveChange"},ngContentSelectors:$i,decls:7,vars:1,consts:[[3,"click"],[1,"toggle-icon"],[1,"collapsable"],[1,"content"]],template:function(n,s){n&1&&(L(Ui),_(0,"h3",0),B("click",function(){return s.disallowToggle()||s.toggle()}),D(1,0,null,Qi,1,0),W(3,Yi,2,0,"spk-icon",1),S(),_(4,"div",2)(5,"div",3),D(6,1),S()()),n&2&&(O(3),q(s.disallowToggle()?-1:3))},dependencies:[ue],encapsulation:2,changeDetection:0});let t=e;return t})(),Nn=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=P({type:e,selectors:[["spk-toggle"]],ngContentSelectors:Y,decls:3,vars:0,consts:[[1,"box"],[1,"knob"]],template:function(n,s){n&1&&(L(),_(0,"div",0),Z(1,"div",1),S(),D(2))},encapsulation:2,changeDetection:0});let t=e;return t})();var Un=(()=>{let e=class e{constructor(){this.filesOver=I(!1),this.filesDropped=ce()}onDragOver(i){i.preventDefault(),i.stopPropagation(),this.filesOver.set(!0)}onDragLeave(i){i.preventDefault(),i.stopPropagation(),this.filesOver.set(!1)}ondrop(i){i.preventDefault(),i.stopPropagation(),this.filesOver.set(!1);let n=i.dataTransfer?.files;n&&n.length>0&&this.filesDropped.emit(n)}};e.\u0275fac=function(n){return new(n||e)},e.\u0275dir=_e({type:e,selectors:[["","spkDragDrop",""]],hostVars:2,hostBindings:function(n,s){n&1&&B("dragover",function(m){return s.onDragOver(m)})("dragleave",function(m){return s.onDragLeave(m)})("drop",function(m){return s.ondrop(m)}),n&2&&z("filesover",s.filesOver())},outputs:{filesDropped:"filesDropped"}});let t=e;return t})();var rn=(()=>{let e=class e{constructor(){this.positionAnchorName=b.required()}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=P({type:e,selectors:[["sparkle-tooltip-wrapper"]],hostVars:2,hostBindings:function(n,s){n&2&&G("position-anchor",s.positionAnchorName())},inputs:{positionAnchorName:[1,"positionAnchorName"]},ngContentSelectors:Y,decls:2,vars:0,consts:[[1,"tooltip-content"]],template:function(n,s){n&1&&(L(),_(0,"div",0),D(1),S())},encapsulation:2});let t=e;return t})(),$n=(()=>{var e,o,i,n,s,h;let m=class m{constructor(){E(this,e);E(this,o);E(this,i);E(this,n);E(this,s);E(this,h);this.spkTooltip=b.required(),M(this,e,j(Q)),M(this,o,j(it)),M(this,i,j(Ze)),M(this,n,j(Ie)),M(this,s,null),M(this,h,null),this.anchorName=I(`--${Ye()}`),this.manageWrapperEffect=N(()=>{let r=this.spkTooltip();if(this.cleanupTooltip(),r){let d;typeof r=="string"?d=[u(this,n).createText(r)]:r instanceof Ce?(M(this,h,r.createEmbeddedView(null)),u(this,h).detectChanges(),d=u(this,h).rootNodes):d=[],d.length>0&&(M(this,s,u(this,o).createComponent(rn,{environmentInjector:u(this,i),projectableNodes:[d]})),u(this,s).setInput("positionAnchorName",this.anchorName()),u(this,s).changeDetectorRef.detectChanges())}})}onClick(r){let d=u(this,e).nativeElement;(d.hasAttribute("disabled")||d.hasAttribute("readonly"))&&(r.preventDefault(),r.stopPropagation())}cleanupTooltip(){u(this,s)&&(u(this,s).destroy(),M(this,s,null)),u(this,h)&&(u(this,h).destroy(),M(this,h,null))}ngOnDestroy(){this.cleanupTooltip()}};e=new WeakMap,o=new WeakMap,i=new WeakMap,n=new WeakMap,s=new WeakMap,h=new WeakMap,m.\u0275fac=function(d){return new(d||m)},m.\u0275dir=_e({type:m,selectors:[["","spkTooltip",""]],hostAttrs:[1,"tooltip"],hostVars:2,hostBindings:function(d,g){d&1&&B("click",function(a){return g.onClick(a)}),d&2&&G("anchor-name",g.anchorName())},inputs:{spkTooltip:[1,"spkTooltip"]}});let t=m;return t})();export{ue as a,bn as b,En as c,Gi as d,Tn as e,Mn as f,Ki as g,In as h,Ji as i,Zi as j,Vn as k,Xe as l,Rn as m,Pn as n,An as o,nn as p,Fn as q,Hn as r,sn as s,Ln as t,jn as u,Bn as v,Wn as w,on as x,qn as y,zn as z,Nn as A,Un as B,$n as C};
@@ -1 +1 @@
1
- import{b as s}from"./chunk-RHW5QVAY.js";import{T as c}from"./chunk-4KE2I7OA.js";import{a as i}from"./chunk-7CGTOI24.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(s()),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=c({token:n,factory:n.\u0275fac,providedIn:"root"})};function F(n,r,t="conditional"){return a=>{if(!a.parent)return null;let e=null;if(n(a.parent)&&(e=(Array.isArray(r)?r:[r]).find(l=>l(a)!==null)??null),t&&e){let o={};o[t]=e,e=o}return e}}function y(){return n=>(n.parent&&Object.values(n.parent.controls).forEach(r=>{r!==n&&r.updateValueAndValidity()}),null)}function C(n,r,t,a="conditional"){return e=>{if(!e.parent)return null;let o={},l=e.parent.get(n);if(!l)return console.warn("Conditional field not found"),null;if(Array.isArray(r)?l.value?.includes(r):l.value===r){let f=Array.isArray(t)?t:[t];for(let A of f){let u=A(e),p=o||{};if(u!==null){o=i(i({},p),u);break}}}return o}}export{m as a,F as b,y as c,C as d};
1
+ import{b as s}from"./chunk-RHW5QVAY.js";import{S as c}from"./chunk-67YRCRMI.js";import{a as i}from"./chunk-EUDKD2JW.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(s()),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=c({token:n,factory:n.\u0275fac,providedIn:"root"})};function F(n,r,t="conditional"){return a=>{if(!a.parent)return null;let e=null;if(n(a.parent)&&(e=(Array.isArray(r)?r:[r]).find(l=>l(a)!==null)??null),t&&e){let o={};o[t]=e,e=o}return e}}function y(){return n=>(n.parent&&Object.values(n.parent.controls).forEach(r=>{r!==n&&r.updateValueAndValidity()}),null)}function C(n,r,t,a="conditional"){return e=>{if(!e.parent)return null;let o={},l=e.parent.get(n);if(!l)return console.warn("Conditional field not found"),null;if(Array.isArray(r)?l.value?.includes(r):l.value===r){let f=Array.isArray(t)?t:[t];for(let A of f){let u=A(e),p=o||{};if(u!==null){o=i(i({},p),u);break}}}return o}}export{m as a,F as b,y as c,C as d};
@@ -0,0 +1 @@
1
+ import{Fc as g,Hc as m,Ic as y,Q as a,X as p,ha as b,la as l}from"./chunk-67YRCRMI.js";import{a as v,b as f}from"./chunk-EUDKD2JW.js";function R(r,e){let u=!e?.manualCleanup?e?.injector?.get(b)??p(b):null,c=D(e?.equal),t;e?.requireSync?t=l({kind:0},{equal:c}):t=l({kind:1,value:e?.initialValue},{equal:c});let d,i=r.subscribe({next:n=>t.set({kind:1,value:n}),error:n=>{t.set({kind:2,error:n})},complete:()=>{d?.()}});if(e?.requireSync&&t().kind===0)throw new a(601,!1);return d=u?.onDestroy(i.unsubscribe.bind(i)),g(()=>{let n=t();switch(n.kind){case 1:return n.value;case 2:throw n.error;case 0:throw new a(601,!1)}},{equal:e?.equal})}function D(r=Object.is){return(e,s)=>e.kind===1&&s.kind===1&&r(e.value,s.value)}function q(r){return m(f(v({},r),{loader:void 0,stream:e=>{let s,u=()=>s.unsubscribe();e.abortSignal.addEventListener("abort",u);let c=l({value:void 0}),t,d=new Promise(o=>t=o);function i(o){c.set(o),t?.(c),t=void 0}let n=r.stream??r.loader;if(n===void 0)throw new a(990,!1);return s=n(e).subscribe({next:o=>i({value:o}),error:o=>{i({error:y(o)}),e.abortSignal.removeEventListener("abort",u)},complete:()=>{t&&i({error:new a(991,!1)}),e.abortSignal.removeEventListener("abort",u)}}),d}}))}export{R as a,q as b};