@whoz-oss/coday-client 0.231.1 → 0.232.0

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 (108) hide show
  1. package/browser/{chunk-KVRSWZ37.js → chunk-2TXUDUDV.js} +1 -1
  2. package/browser/{chunk-7BBT4E5E.js → chunk-36O4BB7T.js} +1 -1
  3. package/browser/chunk-37XKIC5U.js +1 -0
  4. package/browser/{chunk-OK4EJOSI.js → chunk-3EE5YWX5.js} +1 -1
  5. package/browser/{chunk-3QNGI2KL.js → chunk-3KPZCMYP.js} +1 -1
  6. package/browser/{chunk-R7YB3V2E.js → chunk-3MTDP4VX.js} +1 -1
  7. package/browser/{chunk-N4H6RBJP.js → chunk-3ONL4DJI.js} +1 -1
  8. package/browser/{chunk-UHZ4KKE5.js → chunk-3PYYPGWK.js} +1 -1
  9. package/browser/{chunk-Q2M4W42M.js → chunk-3SLREHKR.js} +1 -1
  10. package/browser/{chunk-Z43UATKA.js → chunk-4IIMBSGN.js} +1 -1
  11. package/browser/{chunk-HXQFXYPL.js → chunk-4UTJRMNS.js} +1 -1
  12. package/browser/{chunk-XPBP7UEM.js → chunk-4YSSYO6C.js} +1 -1
  13. package/browser/{chunk-MGVK4WNW.js → chunk-4Z7YULMF.js} +1 -1
  14. package/browser/{chunk-ZAMAK546.js → chunk-4ZRHOAVD.js} +1 -1
  15. package/browser/{chunk-MDC6KYTF.js → chunk-56PQRYGG.js} +1 -1
  16. package/browser/{chunk-DVUB4DDV.js → chunk-5FEVTJAS.js} +1 -1
  17. package/browser/{chunk-7EDSHFWH.js → chunk-5OX5N476.js} +1 -1
  18. package/browser/{chunk-MZT6I3S3.js → chunk-6XQBW7HA.js} +1 -1
  19. package/browser/{chunk-FW4JCZNG.js → chunk-74YMXW2X.js} +1 -1
  20. package/browser/{chunk-BHI42QOO.js → chunk-7BB2QBYF.js} +1 -1
  21. package/browser/{chunk-JFRIGSWA.js → chunk-7C22S5RR.js} +1 -1
  22. package/browser/{chunk-5RGU7B74.js → chunk-7DPA42PN.js} +1 -1
  23. package/browser/{chunk-O77FDCNG.js → chunk-7HHH4JYI.js} +1 -1
  24. package/browser/{chunk-JC3UT7FL.js → chunk-7J5PDKSA.js} +1 -1
  25. package/browser/{chunk-XPCRFTEI.js → chunk-AA5QCH73.js} +1 -1
  26. package/browser/{chunk-KJ5SIUGY.js → chunk-AFIHJVHG.js} +4 -4
  27. package/browser/{chunk-6LNXGAHM.js → chunk-ARNZJRTH.js} +1 -1
  28. package/browser/{chunk-AKTPF6RS.js → chunk-BB5JFKXH.js} +1 -1
  29. package/browser/{chunk-2OC3IQX4.js → chunk-BPC2QPLU.js} +1 -1
  30. package/browser/{chunk-W3ORO7W5.js → chunk-BTVIFMPB.js} +1 -1
  31. package/browser/{chunk-SW3MVXR5.js → chunk-CBNBGASZ.js} +1 -1
  32. package/browser/chunk-CO2BUEJR.js +1 -0
  33. package/browser/{chunk-H2FHPYWP.js → chunk-DA4EUPMU.js} +1 -1
  34. package/browser/{chunk-44OQZAMB.js → chunk-DDDWWOBZ.js} +1 -1
  35. package/browser/{chunk-CPIJPSK3.js → chunk-DL2CN54C.js} +1 -1
  36. package/browser/{chunk-6L7NNQJK.js → chunk-DWTZEEAD.js} +1 -1
  37. package/browser/{chunk-B46LXCLF.js → chunk-G45KM4GY.js} +1 -1
  38. package/browser/{chunk-UK3RUU4S.js → chunk-G65WOLVG.js} +1 -1
  39. package/browser/{chunk-LTFSHOKE.js → chunk-G7BN6ECD.js} +1 -1
  40. package/browser/{chunk-NA5F32JD.js → chunk-GDU2Z5DW.js} +1 -1
  41. package/browser/{chunk-7DZ6K6CC.js → chunk-GDV5ITOI.js} +1 -1
  42. package/browser/{chunk-PFBYB2QD.js → chunk-GEWWMLQN.js} +1 -1
  43. package/browser/{chunk-MWPKXBXJ.js → chunk-GPV4WMJB.js} +1 -1
  44. package/browser/{chunk-BPTQDERH.js → chunk-GY6HKZNN.js} +1 -1
  45. package/browser/{chunk-E2PTKMR3.js → chunk-H76CYJNV.js} +1 -1
  46. package/browser/{chunk-32WVX5ZP.js → chunk-HEUQXXCL.js} +1 -1
  47. package/browser/{chunk-ZHT32KNQ.js → chunk-I37HXTFG.js} +1 -1
  48. package/browser/{chunk-VO5LQION.js → chunk-IIF6K52V.js} +1 -1
  49. package/browser/{chunk-HJCJ2A5U.js → chunk-J37DPZ6E.js} +1 -1
  50. package/browser/{chunk-3B27XA6H.js → chunk-J4RKXKG2.js} +1 -1
  51. package/browser/chunk-J7VVELU3.js +6 -0
  52. package/browser/{chunk-TML7WQTK.js → chunk-JYJTYOKL.js} +1 -1
  53. package/browser/chunk-K5RMGAFS.js +1 -0
  54. package/browser/{chunk-VR3I4RKJ.js → chunk-KG53RXF4.js} +1 -1
  55. package/browser/{chunk-4224C2BE.js → chunk-KHUREVIJ.js} +1 -1
  56. package/browser/{chunk-F4DLZWDY.js → chunk-L43PAPKS.js} +1 -1
  57. package/browser/{chunk-WFLBQLIR.js → chunk-LCJUMP4N.js} +1 -1
  58. package/browser/{chunk-KRRTNACV.js → chunk-MCDRF32R.js} +1 -1
  59. package/browser/chunk-MD6JHLP3.js +1 -0
  60. package/browser/{chunk-WUU4G5YQ.js → chunk-MQRXQYSE.js} +1 -1
  61. package/browser/{chunk-3I6ZJMCS.js → chunk-NC4DZ44Z.js} +1 -1
  62. package/browser/{chunk-4NGK3AH3.js → chunk-ND6LRPIP.js} +1 -1
  63. package/browser/{chunk-3ZLLFAXF.js → chunk-NPJSGATI.js} +1 -1
  64. package/browser/chunk-NSFWHBLR.js +1 -0
  65. package/browser/{chunk-C2J4TQ7V.js → chunk-NVHDXKPX.js} +1 -1
  66. package/browser/{chunk-MTXOV52Z.js → chunk-O4KHZCHW.js} +1 -1
  67. package/browser/{chunk-AVN3J4SW.js → chunk-OGB6WYHT.js} +1 -1
  68. package/browser/{chunk-7RARQB22.js → chunk-OI5ZXKZN.js} +1 -1
  69. package/browser/{chunk-MZIRWGY7.js → chunk-OIQVBN7H.js} +1 -1
  70. package/browser/{chunk-DDWYQORF.js → chunk-OTQBW2W7.js} +1 -1
  71. package/browser/{chunk-NOMEOUXJ.js → chunk-P5NRG4I2.js} +1 -1
  72. package/browser/chunk-PESUZCLX.js +1 -0
  73. package/browser/{chunk-UBMWSFAZ.js → chunk-PLCVMTKZ.js} +1 -1
  74. package/browser/{chunk-OX7PDXEA.js → chunk-PVCT2NFQ.js} +1 -1
  75. package/browser/{chunk-JF3TWRKD.js → chunk-PXW2NKOT.js} +1 -1
  76. package/browser/{chunk-QUHNQ4OB.js → chunk-QYMTZUZD.js} +1 -1
  77. package/browser/{chunk-JW4JKLFN.js → chunk-R4RUNF6U.js} +1 -1
  78. package/browser/{chunk-7N4XUYW4.js → chunk-SI4H2FAD.js} +1 -1
  79. package/browser/{chunk-SWOMF3ZR.js → chunk-SIJ5T6MQ.js} +1 -1
  80. package/browser/chunk-SPKYGK35.js +1 -0
  81. package/browser/{chunk-S5XVTDPO.js → chunk-SPN2NP4Q.js} +1 -1
  82. package/browser/{chunk-L7EWDR3X.js → chunk-T24DFZQU.js} +1 -1
  83. package/browser/{chunk-A7WS3RLV.js → chunk-TQUZS2SI.js} +1 -1
  84. package/browser/{chunk-RX6XVTR7.js → chunk-TY25SONC.js} +1 -1
  85. package/browser/{chunk-5NIQZOIU.js → chunk-UEKMQY3M.js} +1 -1
  86. package/browser/{chunk-DXS7ET5V.js → chunk-UW36C33Q.js} +1 -1
  87. package/browser/{chunk-TGJ3LPLG.js → chunk-WGWHICOU.js} +1 -1
  88. package/browser/{chunk-QDN2FP73.js → chunk-WNCCMO6S.js} +1 -1
  89. package/browser/{chunk-MQ6C2B4Z.js → chunk-WS3X4SNH.js} +1 -1
  90. package/browser/chunk-WS6KGZB6.js +1 -0
  91. package/browser/{chunk-TBYJS5N4.js → chunk-XMNSCHH7.js} +1 -1
  92. package/browser/{chunk-5KM666YK.js → chunk-XQFQYRN4.js} +1 -1
  93. package/browser/{chunk-DEI4EULW.js → chunk-ZGXLG3K2.js} +1 -1
  94. package/browser/{chunk-DXSUJXKW.js → chunk-ZHNZU36N.js} +1 -1
  95. package/browser/chunk-ZUWK72PR.js +1 -0
  96. package/browser/index.html +1 -1
  97. package/browser/{main-NVO3OVNW.js → main-RJ5ZCZKL.js} +1 -1
  98. package/package.json +1 -1
  99. package/browser/chunk-2EC3VX77.js +0 -1
  100. package/browser/chunk-3FIVKNVQ.js +0 -1
  101. package/browser/chunk-EBGVWTDP.js +0 -1
  102. package/browser/chunk-ETVJIECM.js +0 -1
  103. package/browser/chunk-GH2VWCFB.js +0 -1
  104. package/browser/chunk-GNOCAZPC.js +0 -1
  105. package/browser/chunk-LMHMDUH3.js +0 -6
  106. package/browser/chunk-MJ3CGA7L.js +0 -1
  107. package/browser/chunk-PW6KVUDR.js +0 -1
  108. package/browser/chunk-RFBE4F6Q.js +0 -1
@@ -1 +1 @@
1
- import{a as Ne}from"./chunk-JC3UT7FL.js";import{a as ze}from"./chunk-5RGU7B74.js";import{a as Se}from"./chunk-TGJ3LPLG.js";import{a as Te,b as He,c as Ue}from"./chunk-4NGK3AH3.js";import{a as we,b as Fe,c as Ee}from"./chunk-UBMWSFAZ.js";import{a as Ie}from"./chunk-TBYJS5N4.js";import{a as Oe}from"./chunk-NA5F32JD.js";import{a as Q}from"./chunk-O77FDCNG.js";import{a as ee,b as te,c as ne,d as oe,e as ae,f as re,g as ie,h as me,i as pe,j as de,k as ce,l as le,m as ge,n as fe,o as ue,p as he,q as Ce,r as be,s as _e,t as ve,u as xe}from"./chunk-LMHMDUH3.js";import{a as se}from"./chunk-32WVX5ZP.js";import{a as X,b as Z,c as $}from"./chunk-H2FHPYWP.js";import"./chunk-7N4XUYW4.js";import{a as Ae}from"./chunk-3B27XA6H.js";import"./chunk-MGVK4WNW.js";import{a as H}from"./chunk-DEI4EULW.js";import{a as Y,b as q,c as J,d as K}from"./chunk-DXSUJXKW.js";import{a as Me,b as ke}from"./chunk-4224C2BE.js";import{a as ye,b as Pe}from"./chunk-XPCRFTEI.js";import{k as F}from"./chunk-ZAMAK546.js";import"./chunk-VR3I4RKJ.js";import{c as w}from"./chunk-MZT6I3S3.js";import{s as T}from"./chunk-C2J4TQ7V.js";import"./chunk-MWPKXBXJ.js";import"./chunk-7EDSHFWH.js";import{a as E}from"./chunk-3ZLLFAXF.js";import"./chunk-Q2M4W42M.js";import"./chunk-DDWYQORF.js";import"./chunk-B46LXCLF.js";import{Bb as O,Db as c,Fb as C,Ka as p,Rb as S,Tb as r,Ub as x,Wa as f,ca as g,ga as A,ha as y,lb as s,ma as P,mb as l,mc as I,rb as _,sb as n,ta as b,tb as o,ub as h,vb as M,wb as k,xb as v}from"./chunk-KJ5SIUGY.js";var t=()=>!0;var Re=[{path:"",loadComponent:()=>import("./chunk-RFBE4F6Q.js").then(e=>e.AgentosShellComponent),children:[{path:"home",canActivate:[t],loadComponent:()=>import("./chunk-MJ3CGA7L.js").then(e=>e.CaseShellComponent)},{path:"",loadComponent:()=>import("./chunk-PW6KVUDR.js").then(e=>e.LayoutComponent),children:[{path:"namespaces/new",canActivate:[t],loadComponent:()=>import("./chunk-SWOMF3ZR.js").then(e=>e.NamespaceFormComponent)},{path:"namespaces/:namespaceId/edit",canActivate:[t],loadComponent:()=>import("./chunk-SWOMF3ZR.js").then(e=>e.NamespaceFormComponent)},{path:"namespaces",canActivate:[t],loadComponent:()=>import("./chunk-GH2VWCFB.js").then(e=>e.NamespaceListComponent)},{path:"admin",canActivate:[t],loadComponent:()=>import("./chunk-DXS7ET5V.js").then(e=>e.AdminHomeComponent)},{path:"admin/users/new",canActivate:[t],loadComponent:()=>import("./chunk-3FIVKNVQ.js").then(e=>e.UserFormComponent)},{path:"admin/users/:userId/edit",canActivate:[t],loadComponent:()=>import("./chunk-3FIVKNVQ.js").then(e=>e.UserFormComponent)},{path:"admin/users",canActivate:[t],loadComponent:()=>import("./chunk-ETVJIECM.js").then(e=>e.AdminUsersGroupsComponent)},{path:"admin/integration-configs/new",canActivate:[t],loadComponent:()=>import("./chunk-AVN3J4SW.js").then(e=>e.IntegrationFormComponent)},{path:"admin/integration-configs/:integrationId/edit",canActivate:[t],loadComponent:()=>import("./chunk-AVN3J4SW.js").then(e=>e.IntegrationFormComponent)},{path:"admin/integration-configs",canActivate:[t],loadComponent:()=>import("./chunk-MZIRWGY7.js").then(e=>e.PlatformIntegrationConfigsComponent)},{path:"admin/prompts/new",canActivate:[t],loadComponent:()=>import("./chunk-HJCJ2A5U.js").then(e=>e.PromptFormComponent)},{path:"admin/prompts/:promptId/edit",canActivate:[t],loadComponent:()=>import("./chunk-HJCJ2A5U.js").then(e=>e.PromptFormComponent)},{path:"admin/prompts",canActivate:[t],loadComponent:()=>import("./chunk-5KM666YK.js").then(e=>e.PlatformPromptsComponent)},{path:"admin/ai-providers/new",canActivate:[t],loadComponent:()=>import("./chunk-WFLBQLIR.js").then(e=>e.AiProviderFormComponent)},{path:"admin/ai-providers/:aiProviderId/edit",canActivate:[t],loadComponent:()=>import("./chunk-WFLBQLIR.js").then(e=>e.AiProviderFormComponent)},{path:"admin/ai-providers",canActivate:[t],loadComponent:()=>import("./chunk-7BBT4E5E.js").then(e=>e.PlatformAiProvidersComponent)},{path:"admin/ai-models/new",canActivate:[t],loadComponent:()=>import("./chunk-44OQZAMB.js").then(e=>e.AiModelFormComponent)},{path:"admin/ai-models/:modelId/edit",canActivate:[t],loadComponent:()=>import("./chunk-44OQZAMB.js").then(e=>e.AiModelFormComponent)},{path:"admin/ai-models",canActivate:[t],loadComponent:()=>import("./chunk-E2PTKMR3.js").then(e=>e.PlatformAiModelsComponent)},{path:"admin/agent-configs/new",canActivate:[t],loadComponent:()=>import("./chunk-HXQFXYPL.js").then(e=>e.AgentConfigFormComponent)},{path:"admin/agent-configs/:agentConfigId/edit",canActivate:[t],loadComponent:()=>import("./chunk-HXQFXYPL.js").then(e=>e.AgentConfigFormComponent)},{path:"admin/agent-configs/:agentConfigId/inspect",canActivate:[t],loadComponent:()=>import("./chunk-TML7WQTK.js").then(e=>e.AgentConfigInspectComponent)},{path:"admin/agent-configs",canActivate:[t],loadComponent:()=>import("./chunk-3QNGI2KL.js").then(e=>e.PlatformAgentConfigsComponent)},{path:"me",canActivate:[t],loadComponent:()=>import("./chunk-NOMEOUXJ.js").then(e=>e.UserProfileComponent)},{path:"user",canActivate:[t],loadComponent:()=>import("./chunk-NOMEOUXJ.js").then(e=>e.UserProfileComponent)},{path:":namespaceId/integrations/new",canActivate:[t],loadComponent:()=>import("./chunk-AVN3J4SW.js").then(e=>e.IntegrationFormComponent)},{path:":namespaceId/integrations/:integrationId/edit",canActivate:[t],loadComponent:()=>import("./chunk-AVN3J4SW.js").then(e=>e.IntegrationFormComponent)},{path:":namespaceId/integrations",canActivate:[t],loadComponent:()=>import("./chunk-AKTPF6RS.js").then(e=>e.IntegrationsAllScopesComponent)},{path:":namespaceId/ai-providers/new",canActivate:[t],loadComponent:()=>import("./chunk-WFLBQLIR.js").then(e=>e.AiProviderFormComponent)},{path:":namespaceId/ai-providers/:aiProviderId/edit",canActivate:[t],loadComponent:()=>import("./chunk-WFLBQLIR.js").then(e=>e.AiProviderFormComponent)},{path:":namespaceId/ai-providers",canActivate:[t],loadComponent:()=>import("./chunk-BPTQDERH.js").then(e=>e.AiProvidersAllScopesComponent)},{path:":namespaceId/ai-models/new",canActivate:[t],loadComponent:()=>import("./chunk-44OQZAMB.js").then(e=>e.AiModelFormComponent)},{path:":namespaceId/ai-models/:modelId/edit",canActivate:[t],loadComponent:()=>import("./chunk-44OQZAMB.js").then(e=>e.AiModelFormComponent)},{path:":namespaceId/ai-models",canActivate:[t],loadComponent:()=>import("./chunk-OK4EJOSI.js").then(e=>e.NamespaceAiModelsComponent)},{path:":namespaceId/prompts/new",canActivate:[t],loadComponent:()=>import("./chunk-HJCJ2A5U.js").then(e=>e.PromptFormComponent)},{path:":namespaceId/prompts/:promptId/edit",canActivate:[t],loadComponent:()=>import("./chunk-HJCJ2A5U.js").then(e=>e.PromptFormComponent)},{path:":namespaceId/prompts",canActivate:[t],loadComponent:()=>import("./chunk-KRRTNACV.js").then(e=>e.NamespacePromptsComponent)},{path:":namespaceId/agent-configs/new",canActivate:[t],loadComponent:()=>import("./chunk-HXQFXYPL.js").then(e=>e.AgentConfigFormComponent)},{path:":namespaceId/agent-configs/:agentConfigId/edit",canActivate:[t],loadComponent:()=>import("./chunk-HXQFXYPL.js").then(e=>e.AgentConfigFormComponent)},{path:":namespaceId/agent-configs/:agentConfigId/inspect",canActivate:[t],loadComponent:()=>import("./chunk-TML7WQTK.js").then(e=>e.AgentConfigInspectComponent)},{path:":namespaceId/agent-configs",canActivate:[t],loadComponent:()=>import("./chunk-UK3RUU4S.js").then(e=>e.NamespaceAgentConfigsComponent)},{path:":namespaceId/user-groups/new",canActivate:[t],loadComponent:()=>import("./chunk-EBGVWTDP.js").then(e=>e.UserGroupFormComponent)},{path:":namespaceId/user-groups/:userGroupId/edit",canActivate:[t],loadComponent:()=>import("./chunk-EBGVWTDP.js").then(e=>e.UserGroupFormComponent)},{path:":namespaceId/user-groups",canActivate:[t],loadComponent:()=>import("./chunk-2EC3VX77.js").then(e=>e.NamespaceUserGroupsComponent)},{path:"",redirectTo:"namespaces",pathMatch:"full"}]}]}];function B(e,i){e&1&&v(0,"span",1)}function R(e,i){e&1&&v(0,"span",2)}function j(e,i){e&1&&v(0,"span",3)}var u=class e{pluginService=g(F);online=b(null);ngOnInit(){this.pluginService.getAllPlugins().subscribe({next:()=>this.online.set(!0),error:()=>this.online.set(!1)})}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=f({type:e,selectors:[["agentos-backend-status"]],decls:4,vars:1,consts:[[1,"backend-status"],["title","AgentOS online",1,"dot","dot--online"],["title","AgentOS offline",1,"dot","dot--offline"],["title","Checking\u2026",1,"dot","dot--checking"]],template:function(a,m){if(a&1&&(M(0,"div",0),s(1,B,1,0,"span",1)(2,R,1,0,"span",2)(3,j,1,0,"span",3),k()),a&2){let d;p(),l((d=m.online())===!0?1:d===!1?2:3)}},styles:[".backend-status[_ngcontent-%COMP%]{display:flex;align-items:center}.dot[_ngcontent-%COMP%]{width:8px;height:8px;border-radius:50%;flex-shrink:0}.dot--online[_ngcontent-%COMP%]{background:var(--color-success, #34c759)}.dot--offline[_ngcontent-%COMP%]{background:var(--color-error, #ff3b30)}.dot--checking[_ngcontent-%COMP%]{background:var(--color-text-secondary, #6e6e73);opacity:.5;animation:_ngcontent-%COMP%_pulse 1.2s ease-in-out infinite}@keyframes _ngcontent-%COMP%_pulse{0%,to{opacity:.5}50%{opacity:1}}"]})};function G(e,i){if(e&1){let a=O();n(0,"button",9),c("click",function(){A(a);let d=C();return y(d.navigateToAdmin())}),n(1,"span",10),r(2,"\u2699\uFE0F"),o()()}}function L(e,i){if(e&1&&(n(0,"span",7),r(1),o()),e&2){let a=C();p(),x(a.userInitials)}}function V(e,i){e&1&&(n(0,"span",8),r(1,"\u25EF"),o())}var z=class e{router=g(w);userState=g(H);destroyRef=g(P);currentUser=this.userState.currentUser;navigateHome(){this.router.navigate(["/agentos/home"])}isAdmin=I(()=>this.userState.currentUser()?.isAdmin===!0);navigateToAdmin(){this.router.navigate(["/agentos/admin"])}ngOnInit(){this.currentUser()||this.userState.loadMe().pipe(E(this.destroyRef)).subscribe()}get userInitials(){let i=this.currentUser();if(!i)return"";let a=i.firstname?.[0]??"",m=i.lastname?.[0]??"";return(a+m).toUpperCase()||i.email?.[0]?.toUpperCase()||"?"}get isOnProfilePage(){return this.router.url.startsWith("/agentos/me")}toggleProfile(){this.isOnProfilePage?window.history.length>1?window.history.back():this.router.navigate(["/agentos"]):this.router.navigate(["/agentos/me"])}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=f({type:e,selectors:[["agentos-header"]],decls:11,vars:5,consts:[[1,"header"],["type","button","title","Home",1,"header__brand",3,"click"],["src","CODAY-Logo.png","alt","Coday",1,"header__logo-img"],[1,"header__logo-text"],[1,"header__nav"],["type","button","title","Admin",1,"header__admin-btn"],["type","button",1,"header__user-btn",3,"click","title"],[1,"header__user-initials"],[1,"header__user-icon"],["type","button","title","Admin",1,"header__admin-btn",3,"click"],[1,"header__admin-icon"]],template:function(a,m){a&1&&(n(0,"header",0)(1,"button",1),c("click",function(){return m.navigateHome()}),h(2,"img",2),n(3,"span",3),r(4,"Coday"),o()(),n(5,"nav",4),h(6,"agentos-backend-status"),s(7,G,3,0,"button",5),n(8,"button",6),c("click",function(){return m.toggleProfile()}),s(9,L,2,1,"span",7)(10,V,2,0,"span",8),o()()()),a&2&&(p(7),l(m.isAdmin()?7:-1),p(),S("header__user-btn--active",m.isOnProfilePage),_("title",m.isOnProfilePage?"Back":"My profile"),p(),l(m.userInitials?9:10))},dependencies:[u],styles:[".header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:0 1.5rem;height:56px;background:var(--glass-bg, rgba(255, 255, 255, .72));border-bottom:1px solid var(--glass-border, rgba(255, 255, 255, .18));backdrop-filter:var(--glass-backdrop-blur, blur(20px));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));position:sticky;top:0;z-index:100}.header__brand[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;background:none;border:none;padding:0;cursor:pointer;border-radius:6px;transition:opacity .15s ease}.header__brand[_ngcontent-%COMP%]:hover{opacity:.7}.header__logo-img[_ngcontent-%COMP%]{width:32px;height:32px;object-fit:contain}.header__logo-text[_ngcontent-%COMP%]{font-size:1rem;font-weight:700;letter-spacing:-.01em;color:var(--color-text, #1d1d1f)}.header__nav[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.header__admin-btn[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;border:1.5px solid var(--color-border, rgba(0, 0, 0, .1));background:var(--color-bg-secondary, rgba(0, 0, 0, .04));cursor:pointer;transition:background .15s ease,border-color .15s ease;padding:0;font-family:inherit;font-size:1rem;line-height:1}.header__admin-btn[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .08));border-color:var(--color-primary, #007aff)}.header__admin-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.header__user-btn[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;border:1.5px solid var(--color-border, rgba(0, 0, 0, .1));background:var(--color-bg-secondary, rgba(0, 0, 0, .04));cursor:pointer;transition:background .15s ease,border-color .15s ease;padding:0;font-family:inherit}.header__user-btn[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .08));border-color:var(--color-primary, #007aff)}.header__user-btn--active[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);border-color:var(--color-primary, #007aff)}.header__user-btn--active[_ngcontent-%COMP%] .header__user-initials[_ngcontent-%COMP%], .header__user-btn--active[_ngcontent-%COMP%] .header__user-icon[_ngcontent-%COMP%]{color:#fff}.header__user-initials[_ngcontent-%COMP%]{font-size:.75rem;font-weight:600;color:var(--color-text, #1d1d1f);line-height:1;letter-spacing:.02em}.header__user-icon[_ngcontent-%COMP%]{font-size:1rem;color:var(--color-text-secondary, #6e6e73);line-height:1}"]})};function W(e,i){if(e&1&&(n(0,"p",11),r(1," Last action: "),n(2,"strong"),r(3),o()()),e&2){let a=C();p(3),x(a.lastAction())}}var D=class e{lastAction=b(null);onSend(){this.lastAction.set("send")}onStop(){this.lastAction.set("stop")}onAttach(){this.lastAction.set("attach")}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=f({type:e,selectors:[["agentos-hello"]],decls:35,vars:2,consts:[[1,"hello-agentos"],[1,"card"],[1,"badge"],[1,"principles"],[1,"demo"],[1,"demo-label"],[1,"demo-buttons"],["icon","send","variant","primary","title","Send",3,"action"],["icon","stop","variant","danger","title","Stop",3,"action"],["icon","attach_file","variant","default","title","Attach",3,"action"],["icon","mic","variant","default","title","Record",3,"action","disabled"],[1,"demo-feedback"]],template:function(a,m){a&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),r(3,"AgentOS UI"),o(),n(4,"h1"),r(5,"Hello AgentOS"),o(),n(6,"p"),r(7," This component lives in "),n(8,"code"),r(9,"libs/agentos-ui"),o(),r(10," \u2014 isolated from Coday internals, ready to be published as "),n(11,"code"),r(12,"@whoz-oss/agentos-ui"),o(),r(13,". "),o(),h(14,"agentos-backend-status"),n(15,"ul",3)(16,"li"),r(17,"\u2726 No imports from Coday app"),o(),n(18,"li"),r(19,"\u2726 CSS custom properties as host contract"),o(),n(20,"li"),r(21,"\u2726 Standalone Angular components"),o(),n(22,"li"),r(23,"\u2726 Signals-first reactive state"),o()(),n(24,"div",4)(25,"p",5),r(26,"ds-icon-button from "),n(27,"code"),r(28,"@whoz-oss/design-system"),o()(),n(29,"div",6)(30,"ds-icon-button",7),c("action",function(){return m.onSend()}),o(),n(31,"ds-icon-button",8),c("action",function(){return m.onStop()}),o(),n(32,"ds-icon-button",9),c("action",function(){return m.onAttach()}),o(),n(33,"ds-icon-button",10),c("action",function(){return m.onAttach()}),o()(),s(34,W,4,1,"p",11),o()()()),a&2&&(p(33),_("disabled",!0),p(),l(m.lastAction()?34:-1))},dependencies:[T,u],styles:['@charset "UTF-8";.hello-agentos[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;min-height:100vh;padding:2rem}.card[_ngcontent-%COMP%]{background:var(--glass-bg, rgba(255, 255, 255, .72));border:1px solid var(--glass-border, rgba(255, 255, 255, .18));box-shadow:var(--glass-shadow, 0 8px 32px 0 rgba(31, 38, 135, .15));backdrop-filter:var(--glass-backdrop-blur, blur(20px));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));border-radius:20px;padding:3rem;max-width:480px;width:100%;text-align:center}.badge[_ngcontent-%COMP%]{display:inline-block;background:var(--color-primary, #007aff);color:var(--color-text-inverse, #ffffff);font-size:.75rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase;padding:.25rem .75rem;border-radius:100px;margin-bottom:1.5rem}h1[_ngcontent-%COMP%]{color:var(--color-text, #1d1d1f);font-size:2rem;font-weight:700;margin:0 0 1rem;letter-spacing:-.02em}p[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);line-height:1.6;margin:0 0 1.5rem}p[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:var(--color-code-bg, rgba(142, 142, 147, .12));color:var(--color-code-text, #ff375f);padding:.125rem .375rem;border-radius:6px;font-size:.875em;border:1px solid var(--color-border, rgba(0, 0, 0, .1))}.principles[_ngcontent-%COMP%]{list-style:none;margin:0 0 1.5rem;padding:0;text-align:left;display:flex;flex-direction:column;gap:.5rem}.principles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;padding:.5rem .75rem;background:var(--color-bg-hover, rgba(0, 0, 0, .04));border-radius:8px;border:1px solid var(--color-border-light, rgba(40, 40, 40, .08))}.demo[_ngcontent-%COMP%]{border-top:1px solid var(--color-border-light, rgba(40, 40, 40, .08));padding-top:1.25rem}.demo[_ngcontent-%COMP%] .demo-label[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.8rem;margin:0 0 .75rem}.demo[_ngcontent-%COMP%] .demo-label[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:var(--color-code-bg, rgba(142, 142, 147, .12));color:var(--color-code-text, #ff375f);padding:.125rem .375rem;border-radius:6px;font-size:.875em;border:1px solid var(--color-border, rgba(0, 0, 0, .1))}.demo[_ngcontent-%COMP%] .demo-buttons[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center;justify-content:center;padding:.75rem;background:var(--color-bg-hover, rgba(0, 0, 0, .04));border-radius:12px;border:1px solid var(--color-border-light, rgba(40, 40, 40, .08))}.demo[_ngcontent-%COMP%] .demo-feedback[_ngcontent-%COMP%]{margin:.75rem 0 0;font-size:.85rem;color:var(--color-text-secondary, #6e6e73)}.demo[_ngcontent-%COMP%] .demo-feedback[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--color-primary, #007aff)}']})};export{Re as AGENTOS_ROUTES,ye as ActionCardChipsDirective,Pe as ActionCardComponent,Ue as AdminUsersGroupsComponent,Q as AgentosShellComponent,J as AgentosThemeService,Z as AgentosUserPreferencesService,u as BackendStatusComponent,Ce as CaseChatComponent,ve as CaseDrawerComponent,be as CaseHomeComponent,_e as CaseItemComponent,xe as CaseShellComponent,X as ENTER_KEY_BEHAVIORS,le as ExchangeContentViewerComponent,ue as ExchangeDrawerComponent,fe as ExchangeFileListComponent,ge as ExchangeItemComponent,he as ExchangeShellComponent,ee as ExchangeStateService,z as HeaderComponent,D as HelloAgentosComponent,Ae as LayoutComponent,te as MAX_VIEWABLE_SIZE,se as MarkdownPipe,Me as NamespaceItemComponent,ke as NamespaceListComponent,we as NamespaceSelectComponent,ze as NamespaceUserGroupsComponent,q as THEME_MODES,K as THEME_PORT,Y as THEME_VARIANTS,$ as USER_PREFERENCES_PORT,Oe as UserAdminStateService,Se as UserFormComponent,Ne as UserGroupFormComponent,Fe as UserGroupItemComponent,Ee as UserGroupListComponent,Ie as UserGroupStateService,Te as UserItemComponent,He as UserListComponent,H as UserStateService,t as agentosReadyGuard,pe as canViewFile,re as detectFormat,ce as exchangeMutationScope,ae as formatDate,oe as formatSize,ne as getFileIcon,ie as isFormatViewable,me as isViewable,de as reindentJson};
1
+ import{a as Ne}from"./chunk-7J5PDKSA.js";import{a as ze}from"./chunk-7DPA42PN.js";import{a as Se}from"./chunk-WGWHICOU.js";import{a as Te,b as He,c as Ue}from"./chunk-ND6LRPIP.js";import{a as we,b as Fe,c as Ee}from"./chunk-PLCVMTKZ.js";import{a as Ie}from"./chunk-XMNSCHH7.js";import{a as Oe}from"./chunk-GDU2Z5DW.js";import{a as Q}from"./chunk-7HHH4JYI.js";import{a as ee,b as te,c as ne,d as oe,e as ae,f as re,g as ie,h as me,i as pe,j as de,k as ce,l as le,m as ge,n as fe,o as ue,p as he,q as Ce,r as be,s as _e,t as ve,u as xe}from"./chunk-J7VVELU3.js";import{a as se}from"./chunk-HEUQXXCL.js";import{a as X,b as Z,c as $}from"./chunk-DA4EUPMU.js";import"./chunk-SI4H2FAD.js";import{a as Ae}from"./chunk-J4RKXKG2.js";import"./chunk-4Z7YULMF.js";import{a as H}from"./chunk-ZGXLG3K2.js";import{a as Y,b as q,c as J,d as K}from"./chunk-ZHNZU36N.js";import{a as Me,b as ke}from"./chunk-KHUREVIJ.js";import{a as ye,b as Pe}from"./chunk-AA5QCH73.js";import{k as F}from"./chunk-4ZRHOAVD.js";import"./chunk-KG53RXF4.js";import{c as w}from"./chunk-6XQBW7HA.js";import{s as T}from"./chunk-NVHDXKPX.js";import"./chunk-GPV4WMJB.js";import"./chunk-5OX5N476.js";import{a as E}from"./chunk-NPJSGATI.js";import"./chunk-3SLREHKR.js";import"./chunk-OTQBW2W7.js";import"./chunk-G45KM4GY.js";import{Bb as O,Db as c,Fb as C,Ka as p,Rb as S,Tb as r,Ub as x,Wa as f,ca as g,ga as A,ha as y,lb as s,ma as P,mb as l,mc as I,rb as _,sb as n,ta as b,tb as o,ub as h,vb as M,wb as k,xb as v}from"./chunk-AFIHJVHG.js";var t=()=>!0;var Re=[{path:"",loadComponent:()=>import("./chunk-K5RMGAFS.js").then(e=>e.AgentosShellComponent),children:[{path:"home",canActivate:[t],loadComponent:()=>import("./chunk-37XKIC5U.js").then(e=>e.CaseShellComponent)},{path:"",loadComponent:()=>import("./chunk-SPKYGK35.js").then(e=>e.LayoutComponent),children:[{path:"namespaces/new",canActivate:[t],loadComponent:()=>import("./chunk-SIJ5T6MQ.js").then(e=>e.NamespaceFormComponent)},{path:"namespaces/:namespaceId/edit",canActivate:[t],loadComponent:()=>import("./chunk-SIJ5T6MQ.js").then(e=>e.NamespaceFormComponent)},{path:"namespaces",canActivate:[t],loadComponent:()=>import("./chunk-WS6KGZB6.js").then(e=>e.NamespaceListComponent)},{path:"admin",canActivate:[t],loadComponent:()=>import("./chunk-UW36C33Q.js").then(e=>e.AdminHomeComponent)},{path:"admin/users/new",canActivate:[t],loadComponent:()=>import("./chunk-ZUWK72PR.js").then(e=>e.UserFormComponent)},{path:"admin/users/:userId/edit",canActivate:[t],loadComponent:()=>import("./chunk-ZUWK72PR.js").then(e=>e.UserFormComponent)},{path:"admin/users",canActivate:[t],loadComponent:()=>import("./chunk-NSFWHBLR.js").then(e=>e.AdminUsersGroupsComponent)},{path:"admin/integration-configs/new",canActivate:[t],loadComponent:()=>import("./chunk-OGB6WYHT.js").then(e=>e.IntegrationFormComponent)},{path:"admin/integration-configs/:integrationId/edit",canActivate:[t],loadComponent:()=>import("./chunk-OGB6WYHT.js").then(e=>e.IntegrationFormComponent)},{path:"admin/integration-configs",canActivate:[t],loadComponent:()=>import("./chunk-OIQVBN7H.js").then(e=>e.PlatformIntegrationConfigsComponent)},{path:"admin/prompts/new",canActivate:[t],loadComponent:()=>import("./chunk-J37DPZ6E.js").then(e=>e.PromptFormComponent)},{path:"admin/prompts/:promptId/edit",canActivate:[t],loadComponent:()=>import("./chunk-J37DPZ6E.js").then(e=>e.PromptFormComponent)},{path:"admin/prompts",canActivate:[t],loadComponent:()=>import("./chunk-XQFQYRN4.js").then(e=>e.PlatformPromptsComponent)},{path:"admin/ai-providers/new",canActivate:[t],loadComponent:()=>import("./chunk-LCJUMP4N.js").then(e=>e.AiProviderFormComponent)},{path:"admin/ai-providers/:aiProviderId/edit",canActivate:[t],loadComponent:()=>import("./chunk-LCJUMP4N.js").then(e=>e.AiProviderFormComponent)},{path:"admin/ai-providers",canActivate:[t],loadComponent:()=>import("./chunk-36O4BB7T.js").then(e=>e.PlatformAiProvidersComponent)},{path:"admin/ai-models/new",canActivate:[t],loadComponent:()=>import("./chunk-DDDWWOBZ.js").then(e=>e.AiModelFormComponent)},{path:"admin/ai-models/:modelId/edit",canActivate:[t],loadComponent:()=>import("./chunk-DDDWWOBZ.js").then(e=>e.AiModelFormComponent)},{path:"admin/ai-models",canActivate:[t],loadComponent:()=>import("./chunk-H76CYJNV.js").then(e=>e.PlatformAiModelsComponent)},{path:"admin/agent-configs/new",canActivate:[t],loadComponent:()=>import("./chunk-4UTJRMNS.js").then(e=>e.AgentConfigFormComponent)},{path:"admin/agent-configs/:agentConfigId/edit",canActivate:[t],loadComponent:()=>import("./chunk-4UTJRMNS.js").then(e=>e.AgentConfigFormComponent)},{path:"admin/agent-configs/:agentConfigId/inspect",canActivate:[t],loadComponent:()=>import("./chunk-JYJTYOKL.js").then(e=>e.AgentConfigInspectComponent)},{path:"admin/agent-configs",canActivate:[t],loadComponent:()=>import("./chunk-3KPZCMYP.js").then(e=>e.PlatformAgentConfigsComponent)},{path:"me",canActivate:[t],loadComponent:()=>import("./chunk-P5NRG4I2.js").then(e=>e.UserProfileComponent)},{path:"user",canActivate:[t],loadComponent:()=>import("./chunk-P5NRG4I2.js").then(e=>e.UserProfileComponent)},{path:":namespaceId/integrations/new",canActivate:[t],loadComponent:()=>import("./chunk-OGB6WYHT.js").then(e=>e.IntegrationFormComponent)},{path:":namespaceId/integrations/:integrationId/edit",canActivate:[t],loadComponent:()=>import("./chunk-OGB6WYHT.js").then(e=>e.IntegrationFormComponent)},{path:":namespaceId/integrations",canActivate:[t],loadComponent:()=>import("./chunk-BB5JFKXH.js").then(e=>e.IntegrationsAllScopesComponent)},{path:":namespaceId/ai-providers/new",canActivate:[t],loadComponent:()=>import("./chunk-LCJUMP4N.js").then(e=>e.AiProviderFormComponent)},{path:":namespaceId/ai-providers/:aiProviderId/edit",canActivate:[t],loadComponent:()=>import("./chunk-LCJUMP4N.js").then(e=>e.AiProviderFormComponent)},{path:":namespaceId/ai-providers",canActivate:[t],loadComponent:()=>import("./chunk-GY6HKZNN.js").then(e=>e.AiProvidersAllScopesComponent)},{path:":namespaceId/ai-models/new",canActivate:[t],loadComponent:()=>import("./chunk-DDDWWOBZ.js").then(e=>e.AiModelFormComponent)},{path:":namespaceId/ai-models/:modelId/edit",canActivate:[t],loadComponent:()=>import("./chunk-DDDWWOBZ.js").then(e=>e.AiModelFormComponent)},{path:":namespaceId/ai-models",canActivate:[t],loadComponent:()=>import("./chunk-3EE5YWX5.js").then(e=>e.NamespaceAiModelsComponent)},{path:":namespaceId/prompts/new",canActivate:[t],loadComponent:()=>import("./chunk-J37DPZ6E.js").then(e=>e.PromptFormComponent)},{path:":namespaceId/prompts/:promptId/edit",canActivate:[t],loadComponent:()=>import("./chunk-J37DPZ6E.js").then(e=>e.PromptFormComponent)},{path:":namespaceId/prompts",canActivate:[t],loadComponent:()=>import("./chunk-MCDRF32R.js").then(e=>e.NamespacePromptsComponent)},{path:":namespaceId/agent-configs/new",canActivate:[t],loadComponent:()=>import("./chunk-4UTJRMNS.js").then(e=>e.AgentConfigFormComponent)},{path:":namespaceId/agent-configs/:agentConfigId/edit",canActivate:[t],loadComponent:()=>import("./chunk-4UTJRMNS.js").then(e=>e.AgentConfigFormComponent)},{path:":namespaceId/agent-configs/:agentConfigId/inspect",canActivate:[t],loadComponent:()=>import("./chunk-JYJTYOKL.js").then(e=>e.AgentConfigInspectComponent)},{path:":namespaceId/agent-configs",canActivate:[t],loadComponent:()=>import("./chunk-G65WOLVG.js").then(e=>e.NamespaceAgentConfigsComponent)},{path:":namespaceId/user-groups/new",canActivate:[t],loadComponent:()=>import("./chunk-PESUZCLX.js").then(e=>e.UserGroupFormComponent)},{path:":namespaceId/user-groups/:userGroupId/edit",canActivate:[t],loadComponent:()=>import("./chunk-PESUZCLX.js").then(e=>e.UserGroupFormComponent)},{path:":namespaceId/user-groups",canActivate:[t],loadComponent:()=>import("./chunk-MD6JHLP3.js").then(e=>e.NamespaceUserGroupsComponent)},{path:"",redirectTo:"namespaces",pathMatch:"full"}]}]}];function B(e,i){e&1&&v(0,"span",1)}function R(e,i){e&1&&v(0,"span",2)}function j(e,i){e&1&&v(0,"span",3)}var u=class e{pluginService=g(F);online=b(null);ngOnInit(){this.pluginService.getAllPlugins().subscribe({next:()=>this.online.set(!0),error:()=>this.online.set(!1)})}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=f({type:e,selectors:[["agentos-backend-status"]],decls:4,vars:1,consts:[[1,"backend-status"],["title","AgentOS online",1,"dot","dot--online"],["title","AgentOS offline",1,"dot","dot--offline"],["title","Checking\u2026",1,"dot","dot--checking"]],template:function(a,m){if(a&1&&(M(0,"div",0),s(1,B,1,0,"span",1)(2,R,1,0,"span",2)(3,j,1,0,"span",3),k()),a&2){let d;p(),l((d=m.online())===!0?1:d===!1?2:3)}},styles:[".backend-status[_ngcontent-%COMP%]{display:flex;align-items:center}.dot[_ngcontent-%COMP%]{width:8px;height:8px;border-radius:50%;flex-shrink:0}.dot--online[_ngcontent-%COMP%]{background:var(--color-success, #34c759)}.dot--offline[_ngcontent-%COMP%]{background:var(--color-error, #ff3b30)}.dot--checking[_ngcontent-%COMP%]{background:var(--color-text-secondary, #6e6e73);opacity:.5;animation:_ngcontent-%COMP%_pulse 1.2s ease-in-out infinite}@keyframes _ngcontent-%COMP%_pulse{0%,to{opacity:.5}50%{opacity:1}}"]})};function G(e,i){if(e&1){let a=O();n(0,"button",9),c("click",function(){A(a);let d=C();return y(d.navigateToAdmin())}),n(1,"span",10),r(2,"\u2699\uFE0F"),o()()}}function L(e,i){if(e&1&&(n(0,"span",7),r(1),o()),e&2){let a=C();p(),x(a.userInitials)}}function V(e,i){e&1&&(n(0,"span",8),r(1,"\u25EF"),o())}var z=class e{router=g(w);userState=g(H);destroyRef=g(P);currentUser=this.userState.currentUser;navigateHome(){this.router.navigate(["/agentos/home"])}isAdmin=I(()=>this.userState.currentUser()?.isAdmin===!0);navigateToAdmin(){this.router.navigate(["/agentos/admin"])}ngOnInit(){this.currentUser()||this.userState.loadMe().pipe(E(this.destroyRef)).subscribe()}get userInitials(){let i=this.currentUser();if(!i)return"";let a=i.firstname?.[0]??"",m=i.lastname?.[0]??"";return(a+m).toUpperCase()||i.email?.[0]?.toUpperCase()||"?"}get isOnProfilePage(){return this.router.url.startsWith("/agentos/me")}toggleProfile(){this.isOnProfilePage?window.history.length>1?window.history.back():this.router.navigate(["/agentos"]):this.router.navigate(["/agentos/me"])}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=f({type:e,selectors:[["agentos-header"]],decls:11,vars:5,consts:[[1,"header"],["type","button","title","Home",1,"header__brand",3,"click"],["src","CODAY-Logo.png","alt","Coday",1,"header__logo-img"],[1,"header__logo-text"],[1,"header__nav"],["type","button","title","Admin",1,"header__admin-btn"],["type","button",1,"header__user-btn",3,"click","title"],[1,"header__user-initials"],[1,"header__user-icon"],["type","button","title","Admin",1,"header__admin-btn",3,"click"],[1,"header__admin-icon"]],template:function(a,m){a&1&&(n(0,"header",0)(1,"button",1),c("click",function(){return m.navigateHome()}),h(2,"img",2),n(3,"span",3),r(4,"Coday"),o()(),n(5,"nav",4),h(6,"agentos-backend-status"),s(7,G,3,0,"button",5),n(8,"button",6),c("click",function(){return m.toggleProfile()}),s(9,L,2,1,"span",7)(10,V,2,0,"span",8),o()()()),a&2&&(p(7),l(m.isAdmin()?7:-1),p(),S("header__user-btn--active",m.isOnProfilePage),_("title",m.isOnProfilePage?"Back":"My profile"),p(),l(m.userInitials?9:10))},dependencies:[u],styles:[".header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:0 1.5rem;height:56px;background:var(--glass-bg, rgba(255, 255, 255, .72));border-bottom:1px solid var(--glass-border, rgba(255, 255, 255, .18));backdrop-filter:var(--glass-backdrop-blur, blur(20px));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));position:sticky;top:0;z-index:100}.header__brand[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;background:none;border:none;padding:0;cursor:pointer;border-radius:6px;transition:opacity .15s ease}.header__brand[_ngcontent-%COMP%]:hover{opacity:.7}.header__logo-img[_ngcontent-%COMP%]{width:32px;height:32px;object-fit:contain}.header__logo-text[_ngcontent-%COMP%]{font-size:1rem;font-weight:700;letter-spacing:-.01em;color:var(--color-text, #1d1d1f)}.header__nav[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.header__admin-btn[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;border:1.5px solid var(--color-border, rgba(0, 0, 0, .1));background:var(--color-bg-secondary, rgba(0, 0, 0, .04));cursor:pointer;transition:background .15s ease,border-color .15s ease;padding:0;font-family:inherit;font-size:1rem;line-height:1}.header__admin-btn[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .08));border-color:var(--color-primary, #007aff)}.header__admin-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.header__user-btn[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;border:1.5px solid var(--color-border, rgba(0, 0, 0, .1));background:var(--color-bg-secondary, rgba(0, 0, 0, .04));cursor:pointer;transition:background .15s ease,border-color .15s ease;padding:0;font-family:inherit}.header__user-btn[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .08));border-color:var(--color-primary, #007aff)}.header__user-btn--active[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);border-color:var(--color-primary, #007aff)}.header__user-btn--active[_ngcontent-%COMP%] .header__user-initials[_ngcontent-%COMP%], .header__user-btn--active[_ngcontent-%COMP%] .header__user-icon[_ngcontent-%COMP%]{color:#fff}.header__user-initials[_ngcontent-%COMP%]{font-size:.75rem;font-weight:600;color:var(--color-text, #1d1d1f);line-height:1;letter-spacing:.02em}.header__user-icon[_ngcontent-%COMP%]{font-size:1rem;color:var(--color-text-secondary, #6e6e73);line-height:1}"]})};function W(e,i){if(e&1&&(n(0,"p",11),r(1," Last action: "),n(2,"strong"),r(3),o()()),e&2){let a=C();p(3),x(a.lastAction())}}var D=class e{lastAction=b(null);onSend(){this.lastAction.set("send")}onStop(){this.lastAction.set("stop")}onAttach(){this.lastAction.set("attach")}static \u0275fac=function(a){return new(a||e)};static \u0275cmp=f({type:e,selectors:[["agentos-hello"]],decls:35,vars:2,consts:[[1,"hello-agentos"],[1,"card"],[1,"badge"],[1,"principles"],[1,"demo"],[1,"demo-label"],[1,"demo-buttons"],["icon","send","variant","primary","title","Send",3,"action"],["icon","stop","variant","danger","title","Stop",3,"action"],["icon","attach_file","variant","default","title","Attach",3,"action"],["icon","mic","variant","default","title","Record",3,"action","disabled"],[1,"demo-feedback"]],template:function(a,m){a&1&&(n(0,"div",0)(1,"div",1)(2,"div",2),r(3,"AgentOS UI"),o(),n(4,"h1"),r(5,"Hello AgentOS"),o(),n(6,"p"),r(7," This component lives in "),n(8,"code"),r(9,"libs/agentos-ui"),o(),r(10," \u2014 isolated from Coday internals, ready to be published as "),n(11,"code"),r(12,"@whoz-oss/agentos-ui"),o(),r(13,". "),o(),h(14,"agentos-backend-status"),n(15,"ul",3)(16,"li"),r(17,"\u2726 No imports from Coday app"),o(),n(18,"li"),r(19,"\u2726 CSS custom properties as host contract"),o(),n(20,"li"),r(21,"\u2726 Standalone Angular components"),o(),n(22,"li"),r(23,"\u2726 Signals-first reactive state"),o()(),n(24,"div",4)(25,"p",5),r(26,"ds-icon-button from "),n(27,"code"),r(28,"@whoz-oss/design-system"),o()(),n(29,"div",6)(30,"ds-icon-button",7),c("action",function(){return m.onSend()}),o(),n(31,"ds-icon-button",8),c("action",function(){return m.onStop()}),o(),n(32,"ds-icon-button",9),c("action",function(){return m.onAttach()}),o(),n(33,"ds-icon-button",10),c("action",function(){return m.onAttach()}),o()(),s(34,W,4,1,"p",11),o()()()),a&2&&(p(33),_("disabled",!0),p(),l(m.lastAction()?34:-1))},dependencies:[T,u],styles:['@charset "UTF-8";.hello-agentos[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;min-height:100vh;padding:2rem}.card[_ngcontent-%COMP%]{background:var(--glass-bg, rgba(255, 255, 255, .72));border:1px solid var(--glass-border, rgba(255, 255, 255, .18));box-shadow:var(--glass-shadow, 0 8px 32px 0 rgba(31, 38, 135, .15));backdrop-filter:var(--glass-backdrop-blur, blur(20px));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));border-radius:20px;padding:3rem;max-width:480px;width:100%;text-align:center}.badge[_ngcontent-%COMP%]{display:inline-block;background:var(--color-primary, #007aff);color:var(--color-text-inverse, #ffffff);font-size:.75rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase;padding:.25rem .75rem;border-radius:100px;margin-bottom:1.5rem}h1[_ngcontent-%COMP%]{color:var(--color-text, #1d1d1f);font-size:2rem;font-weight:700;margin:0 0 1rem;letter-spacing:-.02em}p[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);line-height:1.6;margin:0 0 1.5rem}p[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:var(--color-code-bg, rgba(142, 142, 147, .12));color:var(--color-code-text, #ff375f);padding:.125rem .375rem;border-radius:6px;font-size:.875em;border:1px solid var(--color-border, rgba(0, 0, 0, .1))}.principles[_ngcontent-%COMP%]{list-style:none;margin:0 0 1.5rem;padding:0;text-align:left;display:flex;flex-direction:column;gap:.5rem}.principles[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;padding:.5rem .75rem;background:var(--color-bg-hover, rgba(0, 0, 0, .04));border-radius:8px;border:1px solid var(--color-border-light, rgba(40, 40, 40, .08))}.demo[_ngcontent-%COMP%]{border-top:1px solid var(--color-border-light, rgba(40, 40, 40, .08));padding-top:1.25rem}.demo[_ngcontent-%COMP%] .demo-label[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.8rem;margin:0 0 .75rem}.demo[_ngcontent-%COMP%] .demo-label[_ngcontent-%COMP%] code[_ngcontent-%COMP%]{background:var(--color-code-bg, rgba(142, 142, 147, .12));color:var(--color-code-text, #ff375f);padding:.125rem .375rem;border-radius:6px;font-size:.875em;border:1px solid var(--color-border, rgba(0, 0, 0, .1))}.demo[_ngcontent-%COMP%] .demo-buttons[_ngcontent-%COMP%]{display:flex;gap:.5rem;align-items:center;justify-content:center;padding:.75rem;background:var(--color-bg-hover, rgba(0, 0, 0, .04));border-radius:12px;border:1px solid var(--color-border-light, rgba(40, 40, 40, .08))}.demo[_ngcontent-%COMP%] .demo-feedback[_ngcontent-%COMP%]{margin:.75rem 0 0;font-size:.85rem;color:var(--color-text-secondary, #6e6e73)}.demo[_ngcontent-%COMP%] .demo-feedback[_ngcontent-%COMP%] strong[_ngcontent-%COMP%]{color:var(--color-primary, #007aff)}']})};export{Re as AGENTOS_ROUTES,ye as ActionCardChipsDirective,Pe as ActionCardComponent,Ue as AdminUsersGroupsComponent,Q as AgentosShellComponent,J as AgentosThemeService,Z as AgentosUserPreferencesService,u as BackendStatusComponent,Ce as CaseChatComponent,ve as CaseDrawerComponent,be as CaseHomeComponent,_e as CaseItemComponent,xe as CaseShellComponent,X as ENTER_KEY_BEHAVIORS,le as ExchangeContentViewerComponent,ue as ExchangeDrawerComponent,fe as ExchangeFileListComponent,ge as ExchangeItemComponent,he as ExchangeShellComponent,ee as ExchangeStateService,z as HeaderComponent,D as HelloAgentosComponent,Ae as LayoutComponent,te as MAX_VIEWABLE_SIZE,se as MarkdownPipe,Me as NamespaceItemComponent,ke as NamespaceListComponent,we as NamespaceSelectComponent,ze as NamespaceUserGroupsComponent,q as THEME_MODES,K as THEME_PORT,Y as THEME_VARIANTS,$ as USER_PREFERENCES_PORT,Oe as UserAdminStateService,Se as UserFormComponent,Ne as UserGroupFormComponent,Fe as UserGroupItemComponent,Ee as UserGroupListComponent,Ie as UserGroupStateService,Te as UserItemComponent,He as UserListComponent,H as UserStateService,t as agentosReadyGuard,pe as canViewFile,re as detectFormat,ce as exchangeMutationScope,ae as formatDate,oe as formatSize,ne as getFileIcon,ie as isFormatViewable,me as isViewable,de as reindentJson};
@@ -1 +1 @@
1
- import{a as D}from"./chunk-L7EWDR3X.js";import{g as $}from"./chunk-ZAMAK546.js";import{c as M}from"./chunk-MZT6I3S3.js";import{s as k,z as E}from"./chunk-C2J4TQ7V.js";import"./chunk-MWPKXBXJ.js";import"./chunk-7EDSHFWH.js";import{a as d}from"./chunk-3ZLLFAXF.js";import"./chunk-Q2M4W42M.js";import"./chunk-DDWYQORF.js";import"./chunk-B46LXCLF.js";import{Bb as R,Db as s,Fb as g,Kc as B,Pb as w,S as u,Wa as I,ab as h,ca as r,cc as P,fc as x,ga as m,gc as T,ha as p,i as _,jc as q,lb as v,ma as y,mb as b,rb as l,sb as a,t as C,tb as c}from"./chunk-KJ5SIUGY.js";var V=()=>[];function F(i,e){if(i&1){let t=R();a(0,"agentos-integration-config-item",4),s("editRequested",function(n){m(t);let f=g(2);return p(f.onEdit(n))})("deleteRequested",function(n){m(t);let f=g(2);return p(f.deleteConfig(n))}),c()}i&2&&l("config",e)}function L(i,e){if(i&1&&v(0,F,1,1,"agentos-integration-config-item",3),i&2){let t,o=e.$implicit,n=g();b((t=n.resolveConfig(o.id))?0:-1,t)}}var S=class i{router=r(M);destroyRef=r(y);integrationConfigController=r($);refresh$=new _(void 0);configs$=this.refresh$.pipe(u(()=>this.integrationConfigController.listIntegrationConfig()));configItems$=this.configs$.pipe(C(e=>e.map(t=>({id:t.id??"",name:t.name,description:t.integrationType}))));configsById=new Map;constructor(){this.configs$.pipe(d(this.destroyRef)).subscribe(e=>{this.configsById=new Map(e.map(t=>[t.id??"",t]))})}goBack(){this.router.navigate(["/agentos","admin"])}openCreateForm(){this.router.navigate(["/agentos","admin","integration-configs","new"])}deleteConfig(e){this.integrationConfigController.deleteIntegrationConfig(e.id??"").pipe(d(this.destroyRef)).subscribe(()=>this.refresh$.next())}onEdit(e){this.router.navigate(["/agentos","admin","integration-configs",e.id??"","edit"])}resolveConfig(e){return this.configsById.get(e)??null}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=I({type:i,selectors:[["agentos-platform-integration-configs"]],decls:5,vars:6,consts:[["integrationConfigItemTpl",""],["title","Platform Integration Configs","emptyMessage","No platform integration configs defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],["scope","platform",3,"config"],["scope","platform",3,"editRequested","deleteRequested","config"]],template:function(t,o){if(t&1&&(a(0,"ds-entity-list",1),x(1,"async"),s("createRequested",function(){return o.openCreateForm()}),a(2,"ds-icon-button",2),s("action",function(){return o.goBack()}),c()(),h(3,L,1,1,"ng-template",null,0,q)),t&2){let n=w(4);l("items",T(1,3,o.configItems$)??P(5,V))("showCreate",!0)("itemTemplate",n)}},dependencies:[E,D,k,B],styles:[".platform-integration-configs__back[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.platform-integration-configs__back[_ngcontent-%COMP%]:hover{text-decoration:underline}"],changeDetection:0})};export{S as PlatformIntegrationConfigsComponent};
1
+ import{a as D}from"./chunk-T24DFZQU.js";import{g as $}from"./chunk-4ZRHOAVD.js";import{c as M}from"./chunk-6XQBW7HA.js";import{s as k,z as E}from"./chunk-NVHDXKPX.js";import"./chunk-GPV4WMJB.js";import"./chunk-5OX5N476.js";import{a as d}from"./chunk-NPJSGATI.js";import"./chunk-3SLREHKR.js";import"./chunk-OTQBW2W7.js";import"./chunk-G45KM4GY.js";import{Bb as R,Db as s,Fb as g,Lc as B,Pb as w,S as u,Wa as I,ab as h,ca as r,cc as P,fc as x,ga as m,gc as T,ha as p,i as _,jc as q,lb as v,ma as y,mb as b,rb as l,sb as a,t as C,tb as c}from"./chunk-AFIHJVHG.js";var V=()=>[];function F(i,e){if(i&1){let t=R();a(0,"agentos-integration-config-item",4),s("editRequested",function(n){m(t);let f=g(2);return p(f.onEdit(n))})("deleteRequested",function(n){m(t);let f=g(2);return p(f.deleteConfig(n))}),c()}i&2&&l("config",e)}function L(i,e){if(i&1&&v(0,F,1,1,"agentos-integration-config-item",3),i&2){let t,o=e.$implicit,n=g();b((t=n.resolveConfig(o.id))?0:-1,t)}}var S=class i{router=r(M);destroyRef=r(y);integrationConfigController=r($);refresh$=new _(void 0);configs$=this.refresh$.pipe(u(()=>this.integrationConfigController.listIntegrationConfig()));configItems$=this.configs$.pipe(C(e=>e.map(t=>({id:t.id??"",name:t.name,description:t.integrationType}))));configsById=new Map;constructor(){this.configs$.pipe(d(this.destroyRef)).subscribe(e=>{this.configsById=new Map(e.map(t=>[t.id??"",t]))})}goBack(){this.router.navigate(["/agentos","admin"])}openCreateForm(){this.router.navigate(["/agentos","admin","integration-configs","new"])}deleteConfig(e){this.integrationConfigController.deleteIntegrationConfig(e.id??"").pipe(d(this.destroyRef)).subscribe(()=>this.refresh$.next())}onEdit(e){this.router.navigate(["/agentos","admin","integration-configs",e.id??"","edit"])}resolveConfig(e){return this.configsById.get(e)??null}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=I({type:i,selectors:[["agentos-platform-integration-configs"]],decls:5,vars:6,consts:[["integrationConfigItemTpl",""],["title","Platform Integration Configs","emptyMessage","No platform integration configs defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],["scope","platform",3,"config"],["scope","platform",3,"editRequested","deleteRequested","config"]],template:function(t,o){if(t&1&&(a(0,"ds-entity-list",1),x(1,"async"),s("createRequested",function(){return o.openCreateForm()}),a(2,"ds-icon-button",2),s("action",function(){return o.goBack()}),c()(),h(3,L,1,1,"ng-template",null,0,q)),t&2){let n=w(4);l("items",T(1,3,o.configItems$)??P(5,V))("showCreate",!0)("itemTemplate",n)}},dependencies:[E,D,k,B],styles:[".platform-integration-configs__back[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.platform-integration-configs__back[_ngcontent-%COMP%]:hover{text-decoration:underline}"],changeDetection:0})};export{S as PlatformIntegrationConfigsComponent};
@@ -1 +1 @@
1
- import{$a as u,Cc as ge,Db as _,Ma as xe,Pa as N,Qa as s,Rb as ce,W as Z,Xa as Y,Y as d,Ya as l,Z as Se,_ as X,a as f,aa as A,b as p,bc as c,ca as R,eb as Pe,h as Fe,ib as Re,jb as k,ka as Ne,l as Ee,lc as V,ma as Oe,mc as O,oa as D,t as we,ta as w,va as I,wa as g,wc as he,xc as fe,ya as S,z as Ie}from"./chunk-KJ5SIUGY.js";var We=(()=>{class n{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,i){this._renderer=e,this._elementRef=i}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static \u0275fac=function(i){return new(i||n)(s(N),s(S))};static \u0275dir=l({type:n})}return n})(),M=(()=>{class n extends We{static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,features:[u]})}return n})(),y=new A(""),Vt={provide:y,useExisting:d(()=>Dt),multi:!0},Dt=(()=>{class n extends M{writeValue(e){this.setProperty("checked",e)}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(i,r){i&1&&_("change",function(a){return r.onChange(a.target.checked)})("blur",function(){return r.onTouched()})},standalone:!1,features:[c([Vt]),u]})}return n})(),bt={provide:y,useExisting:d(()=>qe),multi:!0};function At(){let n=ge()?ge().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}var Mt=new A(""),qe=(()=>{class n extends We{_compositionMode;_composing=!1;constructor(e,i,r){super(e,i),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!At())}writeValue(e){let i=e??"";this.setProperty("value",i)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static \u0275fac=function(i){return new(i||n)(s(N),s(S),s(Mt,8))};static \u0275dir=l({type:n,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(i,r){i&1&&_("input",function(a){return r._handleInput(a.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(a){return r._compositionEnd(a.target.value)})},standalone:!1,features:[c([bt]),u]})}return n})();function me(n){return n==null||_e(n)===0}function _e(n){return n==null?null:Array.isArray(n)||typeof n=="string"?n.length:n instanceof Set?n.size:null}var m=new A(""),F=new A(""),Ft=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,ke=class{static min(t){return ze(t)}static max(t){return Ze(t)}static required(t){return Xe(t)}static requiredTrue(t){return Et(t)}static email(t){return wt(t)}static minLength(t){return It(t)}static maxLength(t){return Ye(t)}static pattern(t){return St(t)}static nullValidator(t){return J()}static compose(t){return nt(t)}static composeAsync(t){return it(t)}};function ze(n){return t=>{if(t.value==null||n==null)return null;let e=parseFloat(t.value);return!isNaN(e)&&e<n?{min:{min:n,actual:t.value}}:null}}function Ze(n){return t=>{if(t.value==null||n==null)return null;let e=parseFloat(t.value);return!isNaN(e)&&e>n?{max:{max:n,actual:t.value}}:null}}function Xe(n){return me(n.value)?{required:!0}:null}function Et(n){return n.value===!0?null:{required:!0}}function wt(n){return me(n.value)||Ft.test(n.value)?null:{email:!0}}function It(n){return t=>{let e=t.value?.length??_e(t.value);return e===null||e===0?null:e<n?{minlength:{requiredLength:n,actualLength:e}}:null}}function Ye(n){return t=>{let e=t.value?.length??_e(t.value);return e!==null&&e>n?{maxlength:{requiredLength:n,actualLength:e}}:null}}function St(n){if(!n)return J;let t,e;return typeof n=="string"?(e="",n.charAt(0)!=="^"&&(e+="^"),e+=n,n.charAt(n.length-1)!=="$"&&(e+="$"),t=new RegExp(e)):(e=n.toString(),t=n),i=>{if(me(i.value))return null;let r=i.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}function J(n){return null}function Ke(n){return n!=null}function Je(n){return Pe(n)?Ee(n):n}function Qe(n){let t={};return n.forEach(e=>{t=e!=null?f(f({},t),e):t}),Object.keys(t).length===0?null:t}function et(n,t){return t.map(e=>e(n))}function Nt(n){return!n.validate}function tt(n){return n.map(t=>Nt(t)?t:e=>t.validate(e))}function nt(n){if(!n)return null;let t=n.filter(Ke);return t.length==0?null:function(e){return Qe(et(e,t))}}function ve(n){return n!=null?nt(tt(n)):null}function it(n){if(!n)return null;let t=n.filter(Ke);return t.length==0?null:function(e){let i=et(e,t).map(Je);return Ie(i).pipe(we(Qe))}}function ye(n){return n!=null?it(tt(n)):null}function je(n,t){return n===null?[t]:Array.isArray(n)?[...n,t]:[n,t]}function rt(n){return n._rawValidators}function ot(n){return n._rawAsyncValidators}function pe(n){return n?Array.isArray(n)?n:[n]:[]}function Q(n,t){return Array.isArray(n)?n.includes(t):n===t}function Ge(n,t){let e=pe(t);return pe(n).forEach(r=>{Q(e,r)||e.push(r)}),e}function Te(n,t){return pe(t).filter(e=>!Q(n,e))}var ee=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=ve(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=ye(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t=void 0){this.control?.reset(t)}hasError(t,e){return this.control?this.control.hasError(t,e):!1}getError(t,e){return this.control?this.control.getError(t,e):null}},h=class extends ee{name;get formDirective(){return null}get path(){return null}},v=class extends ee{_parent=null;name=null;valueAccessor=null},te=class{_cd;constructor(t){this._cd=t}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}};var Tn=(()=>{class n extends te{constructor(e){super(e)}static \u0275fac=function(i){return new(i||n)(s(v,2))};static \u0275dir=l({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,r){i&2&&ce("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},standalone:!1,features:[u]})}return n})(),Bn=(()=>{class n extends te{constructor(e){super(e)}static \u0275fac=function(i){return new(i||n)(s(h,10))};static \u0275dir=l({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["","formArray",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(i,r){i&2&&ce("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)("ng-submitted",r.isSubmitted)},standalone:!1,features:[u]})}return n})();var j="VALID",K="INVALID",x="PENDING",G="DISABLED",b=class{},ne=class extends b{value;source;constructor(t,e){super(),this.value=t,this.source=e}},B=class extends b{pristine;source;constructor(t,e){super(),this.pristine=t,this.source=e}},U=class extends b{touched;source;constructor(t,e){super(),this.touched=t,this.source=e}},P=class extends b{status;source;constructor(t,e){super(),this.status=t,this.source=e}},ie=class extends b{source;constructor(t){super(),this.source=t}},H=class extends b{source;constructor(t){super(),this.source=t}};function Ce(n){return(ae(n)?n.validators:n)||null}function Ot(n){return Array.isArray(n)?ve(n):n||null}function Ve(n,t){return(ae(t)?t.asyncValidators:n)||null}function xt(n){return Array.isArray(n)?ye(n):n||null}function ae(n){return n!=null&&!Array.isArray(n)&&typeof n=="object"}function st(n,t,e){let i=n.controls;if(!(t?Object.keys(i):i).length)throw new Z(1e3,"");if(!i[e])throw new Z(1001,"")}function at(n,t,e){n._forEachChild((i,r)=>{if(e[r]===void 0)throw new Z(1002,"")})}var L=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(t,e){this._assignValidators(t),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get status(){return V(this.statusReactive)}set status(t){V(()=>this.statusReactive.set(t))}_status=O(()=>this.statusReactive());statusReactive=w(void 0);get valid(){return this.status===j}get invalid(){return this.status===K}get pending(){return this.status==x}get disabled(){return this.status===G}get enabled(){return this.status!==G}errors;get pristine(){return V(this.pristineReactive)}set pristine(t){V(()=>this.pristineReactive.set(t))}_pristine=O(()=>this.pristineReactive());pristineReactive=w(!0);get dirty(){return!this.pristine}get touched(){return V(this.touchedReactive)}set touched(t){V(()=>this.touchedReactive.set(t))}_touched=O(()=>this.touchedReactive());touchedReactive=w(!1);get untouched(){return!this.touched}_events=new Fe;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t)}setAsyncValidators(t){this._assignAsyncValidators(t)}addValidators(t){this.setValidators(Ge(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(Ge(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(Te(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(Te(t,this._rawAsyncValidators))}hasValidator(t){return Q(this._rawValidators,t)}hasAsyncValidator(t){return Q(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){let e=this.touched===!1;this.touched=!0;let i=t.sourceControl??this;t.onlySelf||this._parent?.markAsTouched(p(f({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new U(!0,i))}markAllAsDirty(t={}){this.markAsDirty({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsDirty(t))}markAllAsTouched(t={}){this.markAsTouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(t))}markAsUntouched(t={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:i})}),t.onlySelf||this._parent?._updateTouched(t,i),e&&t.emitEvent!==!1&&this._events.next(new U(!1,i))}markAsDirty(t={}){let e=this.pristine===!0;this.pristine=!1;let i=t.sourceControl??this;t.onlySelf||this._parent?.markAsDirty(p(f({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new B(!1,i))}markAsPristine(t={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:t.emitEvent})}),t.onlySelf||this._parent?._updatePristine(t,i),e&&t.emitEvent!==!1&&this._events.next(new B(!0,i))}markAsPending(t={}){this.status=x;let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new P(this.status,e)),this.statusChanges.emit(this.status)),t.onlySelf||this._parent?.markAsPending(p(f({},t),{sourceControl:e}))}disable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=G,this.errors=null,this._forEachChild(r=>{r.disable(p(f({},t),{onlySelf:!0}))}),this._updateValue();let i=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new ne(this.value,i)),this._events.next(new P(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(p(f({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=j,this._forEachChild(i=>{i.enable(p(f({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(p(f({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(t,e){t.onlySelf||(this._parent?.updateValueAndValidity(t),t.skipPristineCheck||this._parent?._updatePristine({},e),this._parent?._updateTouched({},e))}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===j||this.status===x)&&this._runAsyncValidator(i,t.emitEvent)}let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new ne(this.value,e)),this._events.next(new P(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),t.onlySelf||this._parent?.updateValueAndValidity(p(f({},t),{sourceControl:e}))}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?G:j}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t,e){if(this.asyncValidator){this.status=x,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1,shouldHaveEmitted:t!==!1};let i=Je(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:e,shouldHaveEmitted:t})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let t=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,t}return!1}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(t){let e=t;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((i,r)=>i&&i._find(r),this)}getError(t,e){let i=e?this.get(e):this;return i?.errors?i.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t,e,i){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),(t||i)&&this._events.next(new P(this.status,e)),this._parent&&this._parent._updateControlsErrors(t,e,i)}_initObservables(){this.valueChanges=new D,this.statusChanges=new D}_calculateStatus(){return this._allControlsDisabled()?G:this.errors?K:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(x)?x:this._anyControlsHaveStatus(K)?K:j}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t,e){let i=!this._anyControlsDirty(),r=this.pristine!==i;this.pristine=i,t.onlySelf||this._parent?._updatePristine(t,e),r&&this._events.next(new B(this.pristine,e))}_updateTouched(t={},e){this.touched=this._anyControlsTouched(),this._events.next(new U(this.touched,e)),t.onlySelf||this._parent?._updateTouched(t,e)}_onDisabledChange=[];_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){ae(t)&&t.updateOn!=null&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){return!t&&!!this._parent?.dirty&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=Ot(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=xt(this._rawAsyncValidators)}},$=class extends L{constructor(t,e,i){super(Ce(e),Ve(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,i={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(t,e={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(t,e,i={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){at(this,!0,t),Object.keys(t).forEach(i=>{st(this,!0,i),this.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(Object.keys(t).forEach(i=>{let r=this.controls[i];r&&r.patchValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((i,r)=>{i.reset(t?t[r]:null,p(f({},e),{onlySelf:!0}))}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==!1&&this._events.next(new H(this))}getRawValue(){return this._reduceChildren({},(t,e,i)=>(t[i]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(e,i)=>i._syncPendingControls()?!0:e);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{let i=this.controls[e];i&&t(i,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(let[e,i]of Object.entries(this.controls))if(this.contains(e)&&t(i))return!0;return!1}_reduceValue(){let t={};return this._reduceChildren(t,(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(t,e){let i=t;return this._forEachChild((r,o)=>{i=e(i,r,o)}),i}_allControlsDisabled(){for(let t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(t){return this.controls.hasOwnProperty(t)?this.controls[t]:null}};var Un=$;var E=new A("",{factory:()=>q}),q="always";function le(n,t){return[...t.path,n]}function W(n,t,e=q){De(n,t),t.valueAccessor.writeValue(n.value),(n.disabled||e==="always")&&t.valueAccessor.setDisabledState?.(n.disabled),Rt(n,t),jt(n,t),kt(n,t),Pt(n,t)}function re(n,t,e=!0){let i=()=>{};t?.valueAccessor?.registerOnChange(i),t?.valueAccessor?.registerOnTouched(i),se(n,t),n&&(t._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}))}function oe(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function Pt(n,t){if(t.valueAccessor.setDisabledState){let e=i=>{t.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(e),t._registerOnDestroy(()=>{n._unregisterOnDisabledChange(e)})}}function De(n,t){let e=rt(n);t.validator!==null?n.setValidators(je(e,t.validator)):typeof e=="function"&&n.setValidators([e]);let i=ot(n);t.asyncValidator!==null?n.setAsyncValidators(je(i,t.asyncValidator)):typeof i=="function"&&n.setAsyncValidators([i]);let r=()=>n.updateValueAndValidity();oe(t._rawValidators,r),oe(t._rawAsyncValidators,r)}function se(n,t){let e=!1;if(n!==null){if(t.validator!==null){let r=rt(n);if(Array.isArray(r)&&r.length>0){let o=r.filter(a=>a!==t.validator);o.length!==r.length&&(e=!0,n.setValidators(o))}}if(t.asyncValidator!==null){let r=ot(n);if(Array.isArray(r)&&r.length>0){let o=r.filter(a=>a!==t.asyncValidator);o.length!==r.length&&(e=!0,n.setAsyncValidators(o))}}}let i=()=>{};return oe(t._rawValidators,i),oe(t._rawAsyncValidators,i),e}function Rt(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=!0,n._pendingDirty=!0,n.updateOn==="change"&&lt(n,t)})}function kt(n,t){t.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,n.updateOn==="blur"&&n._pendingChange&&lt(n,t),n.updateOn!=="submit"&&n.markAsTouched()})}function lt(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function jt(n,t){let e=(i,r)=>{t.valueAccessor.writeValue(i),r&&t.viewToModelUpdate(i)};n.registerOnChange(e),t._registerOnDestroy(()=>{n._unregisterOnChange(e)})}function ut(n,t){n==null,De(n,t)}function Gt(n,t){return se(n,t)}function be(n,t){if(!n.hasOwnProperty("model"))return!1;let e=n.model;return e.isFirstChange()?!0:!Object.is(t,e.currentValue)}function Tt(n){return Object.getPrototypeOf(n.constructor)===M}function dt(n,t){n._syncPendingControls(),t.forEach(e=>{let i=e.control;i.updateOn==="submit"&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}function Ae(n,t){if(!t)return null;Array.isArray(t);let e,i,r;return t.forEach(o=>{o.constructor===qe?e=o:Tt(o)?i=o:r=o}),r||i||e||null}function Bt(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}var Ut={provide:h,useExisting:d(()=>Ht)},T=Promise.resolve(),Ht=(()=>{class n extends h{callSetDisabledState;get submitted(){return V(this.submittedReactive)}_submitted=O(()=>this.submittedReactive());submittedReactive=w(!1);_directives=new Set;form;ngSubmit=new D;options;constructor(e,i,r){super(),this.callSetDisabledState=r,this.form=new $({},ve(e),ye(i))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){T.then(()=>{let i=this._findContainer(e.path);e.control=i.registerControl(e.name,e.control),W(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){T.then(()=>{this._findContainer(e.path)?.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){T.then(()=>{let i=this._findContainer(e.path),r=new $({});ut(r,e),i.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){T.then(()=>{this._findContainer(e.path)?.removeControl?.(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,i){T.then(()=>{this.form.get(e.path).setValue(i)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submittedReactive.set(!0),dt(this.form,this._directives),this.ngSubmit.emit(e),this.form._events.next(new ie(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this.submittedReactive.set(!1)}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}static \u0275fac=function(i){return new(i||n)(s(m,10),s(F,10),s(E,8))};static \u0275dir=l({type:n,selectors:[["form",3,"ngNoForm","",3,"formGroup","",3,"formArray",""],["ng-form"],["","ngForm",""]],hostBindings:function(i,r){i&1&&_("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[c([Ut]),u]})}return n})();function Be(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}function Ue(n){return typeof n=="object"&&n!==null&&Object.keys(n).length===2&&"value"in n&&"disabled"in n}var ct=class extends L{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(t=null,e,i){super(Ce(e),Ve(i,e)),this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),ae(e)&&(e.nonNullable||e.initialValueIsDefault)&&(Ue(t)?this.defaultValue=t.value:this.defaultValue=t)}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(i=>i(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=this.defaultValue,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),e.overwriteDefaultValue&&(this.defaultValue=this.value),this._pendingChange=!1,e?.emitEvent!==!1&&this._events.next(new H(this))}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){Be(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){Be(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(t){Ue(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}};var Lt=n=>n instanceof ct,$t=(()=>{class n extends h{_parent;ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective?.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return le(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,standalone:!1,features:[u]})}return n})();var Wt={provide:v,useExisting:d(()=>qt)},He=Promise.resolve(),qt=(()=>{class n extends v{_changeDetectorRef;callSetDisabledState;control=new ct;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new D;constructor(e,i,r,o,a,C){super(),this._changeDetectorRef=a,this.callSetDisabledState=C,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=Ae(this,o)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),be(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective?.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){W(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){He.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let i=e.isDisabled.currentValue,r=i!==0&&fe(i);He.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?le(e,this._parent):[e]}static \u0275fac=function(i){return new(i||n)(s(h,9),s(m,10),s(F,10),s(y,10),s(he,8),s(E,8))};static \u0275dir=l({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[c([Wt]),u,I]})}return n})();var Ln=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275dir=l({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return n})(),zt={provide:y,useExisting:d(()=>Zt),multi:!0},Zt=(()=>{class n extends M{writeValue(e){let i=e??"";this.setProperty("value",i)}registerOnChange(e){this.onChange=i=>{e(i==""?null:parseFloat(i))}}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(i,r){i&1&&_("input",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[c([zt]),u]})}return n})(),Xt={provide:y,useExisting:d(()=>Kt),multi:!0};var Yt=(()=>{class n{_accessors=[];add(e,i){this._accessors.push([e,i])}remove(e){for(let i=this._accessors.length-1;i>=0;--i)if(this._accessors[i][1]===e){this._accessors.splice(i,1);return}}select(e){this._accessors.forEach(i=>{this._isSameGroup(i,e)&&i[1]!==e&&i[1].fireUncheck(e.value)})}_isSameGroup(e,i){return e[0].control?e[0]._parent===i._control._parent&&e[1].name===i.name:!1}static \u0275fac=function(i){return new(i||n)};static \u0275prov=Se({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Kt=(()=>{class n extends M{_registry;_injector;_state;_control;_fn;setDisabledStateFired=!1;onChange=()=>{};name;formControlName;value;callSetDisabledState=R(E,{optional:!0})??q;constructor(e,i,r,o){super(e,i),this._registry=r,this._injector=o}ngOnInit(){this._control=this._injector.get(v),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(e){this._state=e===this.value,this.setProperty("checked",this._state)}registerOnChange(e){this._fn=e,this.onChange=()=>{e(this.value),this._registry.select(this)}}setDisabledState(e){(this.setDisabledStateFired||e||this.callSetDisabledState==="whenDisabledForLegacyCode")&&this.setProperty("disabled",e),this.setDisabledStateFired=!0}fireUncheck(e){this.writeValue(e)}_checkName(){this.name&&this.formControlName&&(this.name,this.formControlName),!this.name&&this.formControlName&&(this.name=this.formControlName)}static \u0275fac=function(i){return new(i||n)(s(N),s(S),s(Yt),s(Ne))};static \u0275dir=l({type:n,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(i,r){i&1&&_("change",function(){return r.onChange()})("blur",function(){return r.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},standalone:!1,features:[c([Xt]),u]})}return n})(),Jt={provide:y,useExisting:d(()=>Qt),multi:!0},Qt=(()=>{class n extends M{writeValue(e){this.setProperty("value",parseFloat(e))}registerOnChange(e){this.onChange=i=>{e(i==""?null:parseFloat(i))}}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(i,r){i&1&&_("change",function(a){return r.onChange(a.target.value)})("input",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[c([Jt]),u]})}return n})(),Le=class extends L{constructor(t,e,i){super(Ce(e),Ve(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;at(t){return this.controls[this._adjustIndex(t)]}push(t,e={}){Array.isArray(t)?t.forEach(i=>{this.controls.push(i),this._registerControl(i)}):(this.controls.push(t),this._registerControl(t)),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(t,e,i={}){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(t,e={}){let i=this._adjustIndex(t);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(t,e,i={}){let r=this._adjustIndex(t);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){at(this,!1,t),t.forEach((i,r)=>{st(this,!1,r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(t.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t=[],e={}){this._forEachChild((i,r)=>{i.reset(t[r],p(f({},e),{onlySelf:!0}))}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==!1&&this._events.next(new H(this))}getRawValue(){return this.controls.map(t=>t.getRawValue())}clear(t={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:t.emitEvent}))}_adjustIndex(t){return t<0?t+this.length:t}_syncPendingControls(){let t=this.controls.reduce((e,i)=>i._syncPendingControls()?!0:e,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){this.controls.forEach((e,i)=>{t(e,i)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_allControlsDisabled(){for(let t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}_find(t){return this.at(t)??null}};var ht=(()=>{class n extends h{callSetDisabledState;get submitted(){return V(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}_submitted=O(()=>this._submittedReactive());_submittedReactive=w(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];constructor(e,i,r){super(),this.callSetDisabledState=r,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){this.onChanges(e)}ngOnDestroy(){this.onDestroy()}onChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}onDestroy(){this.form&&(se(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get path(){return[]}addControl(e){let i=this.form.get(e.path);return W(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){re(e.control||null,e,!1),Bt(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}getFormArray(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}updateModel(e,i){this.form.get(e.path).setValue(i)}onReset(){this.resetForm()}resetForm(e=void 0,i={}){this.form.reset(e,i),this._submittedReactive.set(!1)}onSubmit(e){return this.submitted=!0,dt(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new ie(this.control)),e?.target?.method==="dialog"}_updateDomValue(){this.directives.forEach(e=>{let i=e.control,r=this.form.get(e.path);i!==r&&(re(i||null,e),Lt(r)&&(W(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let i=this.form.get(e.path);ut(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){let i=this.form?.get(e.path);i&&Gt(i,e)&&i.updateValueAndValidity({emitEvent:!1})}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm?._registerOnCollectionChange(()=>{})}_updateValidators(){De(this.form,this),this._oldForm&&se(this._oldForm,this)}_checkFormPresent(){this.form}static \u0275fac=function(i){return new(i||n)(s(m,10),s(F,10),s(E,8))};static \u0275dir=l({type:n,features:[u,I]})}return n})();var Me=new A(""),en={provide:v,useExisting:d(()=>tn)},tn=(()=>{class n extends v{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(e){}model;update=new D;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,r,o,a){super(),this._ngModelWarningConfig=o,this.callSetDisabledState=a,this._setValidators(e),this._setAsyncValidators(i),this.valueAccessor=Ae(this,r)}ngOnChanges(e){if(this._isControlChanged(e)){let i=e.form.previousValue;i&&re(i,this,!1),W(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}be(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&re(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_isControlChanged(e){return e.hasOwnProperty("form")}static \u0275fac=function(i){return new(i||n)(s(m,10),s(F,10),s(y,10),s(Me,8),s(E,8))};static \u0275dir=l({type:n,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],standalone:!1,features:[c([en]),u,I]})}return n})(),nn={provide:h,useExisting:d(()=>ft)},ft=(()=>{class n extends $t{name=null;constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r)}_checkParentType(){pt(this._parent)}static \u0275fac=function(i){return new(i||n)(s(h,13),s(m,10),s(F,10))};static \u0275dir=l({type:n,selectors:[["","formGroupName",""]],inputs:{name:[0,"formGroupName","name"]},standalone:!1,features:[c([nn]),u]})}return n})(),rn={provide:h,useExisting:d(()=>gt)},gt=(()=>{class n extends h{_parent;name=null;constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r)}ngOnInit(){pt(this._parent),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective?.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return le(this.name==null?this.name:this.name.toString(),this._parent)}static \u0275fac=function(i){return new(i||n)(s(h,13),s(m,10),s(F,10))};static \u0275dir=l({type:n,selectors:[["","formArrayName",""]],inputs:{name:[0,"formArrayName","name"]},standalone:!1,features:[c([rn]),u]})}return n})();function pt(n){return!(n instanceof ft)&&!(n instanceof ht)&&!(n instanceof gt)}var on={provide:v,useExisting:d(()=>sn)},sn=(()=>{class n extends v{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(e){}model;update=new D;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,r,o,a){super(),this._ngModelWarningConfig=a,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=Ae(this,o)}ngOnChanges(e){this._added||this._setUpControl(),be(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective?.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return le(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_setUpControl(){this.control=this.formDirective.addControl(this),this._added=!0}static \u0275fac=function(i){return new(i||n)(s(h,13),s(m,10),s(F,10),s(y,10),s(Me,8))};static \u0275dir=l({type:n,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[c([on]),u,I]})}return n})();var an={provide:h,useExisting:d(()=>ln)},ln=(()=>{class n extends ht{form=null;ngSubmit=new D;get control(){return this.form}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["","formGroup",""]],hostBindings:function(i,r){i&1&&_("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[c([an]),u]})}return n})(),un={provide:y,useExisting:d(()=>_t),multi:!0};function mt(n,t){return n==null?`${t}`:(t&&typeof t=="object"&&(t="Object"),`${n}: ${t}`.slice(0,50))}function dn(n){return n.split(":")[0]}var _t=(()=>{class n extends M{value;_optionMap=new Map;_idCounter=0;set compareWith(e){this._compareWith=e}_compareWith=Object.is;appRefInjector=R(Re).injector;destroyRef=R(Oe);cdr=R(he);_queuedWrite=!1;_writeValueAfterRender(){this._queuedWrite||this.appRefInjector.destroyed||(this._queuedWrite=!0,xe({write:()=>{this.destroyRef.destroyed||(this._queuedWrite=!1,this.writeValue(this.value))}},{injector:this.appRefInjector}))}writeValue(e){this.cdr.markForCheck(),this.value=e;let i=this._getOptionId(e),r=mt(i,e);this.setProperty("value",r)}registerOnChange(e){this.onChange=i=>{this.value=this._getOptionValue(i),e(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(e){for(let i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i),e))return i;return null}_getOptionValue(e){let i=dn(e);return this._optionMap.has(i)?this._optionMap.get(i):e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(i,r){i&1&&_("change",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[c([un]),u]})}return n})(),$n=(()=>{class n{_element;_renderer;_select;id;constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(e){this._select!=null&&(this._select._optionMap.set(this.id,e),this._setElementValue(mt(this.id,e)),this._select._writeValueAfterRender())}set value(e){this._setElementValue(e),this._select?._writeValueAfterRender()}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}ngOnDestroy(){this._select?._optionMap.delete(this.id),this._select?._writeValueAfterRender()}static \u0275fac=function(i){return new(i||n)(s(S),s(N),s(_t,9))};static \u0275dir=l({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})(),cn={provide:y,useExisting:d(()=>vt),multi:!0};function $e(n,t){return n==null?`${t}`:(typeof t=="string"&&(t=`'${t}'`),t&&typeof t=="object"&&(t="Object"),`${n}: ${t}`.slice(0,50))}function hn(n){return n.split(":")[0]}var vt=(()=>{class n extends M{value;_optionMap=new Map;_idCounter=0;set compareWith(e){this._compareWith=e}_compareWith=Object.is;writeValue(e){this.value=e;let i;if(Array.isArray(e)){let r=e.map(o=>this._getOptionId(o));i=(o,a)=>{o._setSelected(r.indexOf(a.toString())>-1)}}else i=(r,o)=>{r._setSelected(!1)};this._optionMap.forEach(i)}registerOnChange(e){this.onChange=i=>{let r=[],o=i.selectedOptions;if(o!==void 0){let a=o;for(let C=0;C<a.length;C++){let z=a[C],de=this._getOptionValue(z.value);r.push(de)}}else{let a=i.options;for(let C=0;C<a.length;C++){let z=a[C];if(z.selected){let de=this._getOptionValue(z.value);r.push(de)}}}this.value=r,e(r)}}_registerOption(e){let i=(this._idCounter++).toString();return this._optionMap.set(i,e),i}_getOptionId(e){for(let i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i)._value,e))return i;return null}_getOptionValue(e){let i=hn(e);return this._optionMap.has(i)?this._optionMap.get(i)._value:e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(i,r){i&1&&_("change",function(a){return r.onChange(a.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[c([cn]),u]})}return n})(),Wn=(()=>{class n{_element;_renderer;_select;id;_value;constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(e){this._select!=null&&(this._value=e,this._setElementValue($e(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._select?(this._value=e,this._setElementValue($e(this.id,e)),this._select.writeValue(this._select.value)):this._setElementValue(e)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}_setSelected(e){this._renderer.setProperty(this._element.nativeElement,"selected",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static \u0275fac=function(i){return new(i||n)(s(S),s(N),s(vt,9))};static \u0275dir=l({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})();function fn(n){return typeof n=="number"?n:parseInt(n,10)}function yt(n){return typeof n=="number"?n:parseFloat(n)}var ue=(()=>{class n{_validator=J;_onChange;_enabled;ngOnChanges(e){if(this.inputName in e){let i=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):J,this._onChange?.()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return e!=null}static \u0275fac=function(i){return new(i||n)};static \u0275dir=l({type:n,features:[I]})}return n})(),gn={provide:m,useExisting:d(()=>pn),multi:!0},pn=(()=>{class n extends ue{max;inputName="max";normalizeInput=e=>yt(e);createValidator=e=>Ze(e);static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&k("max",r._enabled?r.max:null)},inputs:{max:"max"},standalone:!1,features:[c([gn]),u]})}return n})(),mn={provide:m,useExisting:d(()=>_n),multi:!0},_n=(()=>{class n extends ue{min;inputName="min";normalizeInput=e=>yt(e);createValidator=e=>ze(e);static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&k("min",r._enabled?r.min:null)},inputs:{min:"min"},standalone:!1,features:[c([mn]),u]})}return n})(),vn={provide:m,useExisting:d(()=>yn),multi:!0};var yn=(()=>{class n extends ue{required;inputName="required";normalizeInput=fe;createValidator=e=>Xe;enabled(e){return e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(i,r){i&2&&k("required",r._enabled?"":null)},inputs:{required:"required"},standalone:!1,features:[c([vn]),u]})}return n})();var Cn={provide:m,useExisting:d(()=>Vn),multi:!0},Vn=(()=>{class n extends ue{maxlength;inputName="maxlength";normalizeInput=e=>fn(e);createValidator=e=>Ye(e);static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&k("maxlength",r._enabled?r.maxlength:null)},inputs:{maxlength:"maxlength"},standalone:!1,features:[c([Cn]),u]})}return n})();var Ct=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=Y({type:n});static \u0275inj=X({})}return n})();var qn=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:E,useValue:e.callSetDisabledState??q}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=Y({type:n});static \u0275inj=X({imports:[Ct]})}return n})(),zn=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:Me,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:E,useValue:e.callSetDisabledState??q}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=Y({type:n});static \u0275inj=X({imports:[Ct]})}return n})();export{y as a,Dt as b,qe as c,m as d,ke as e,v as f,Tn as g,Bn as h,$ as i,Un as j,Ht as k,ct as l,qt as m,Ln as n,Zt as o,Kt as p,Qt as q,Le as r,tn as s,ft as t,gt as u,sn as v,ln as w,_t as x,$n as y,Wn as z,pn as A,_n as B,yn as C,Vn as D,qn as E,zn as F};
1
+ import{$a as u,Db as _,Dc as ge,Ma as xe,Pa as N,Qa as s,Rb as ce,W as Z,Xa as Y,Y as d,Ya as l,Z as Se,_ as X,a as f,aa as A,b as p,bc as c,ca as R,eb as Pe,h as Fe,ib as Re,jb as k,ka as Ne,l as Ee,lc as V,ma as Oe,mc as O,oa as D,t as we,ta as w,va as I,wa as g,xc as he,ya as S,yc as fe,z as Ie}from"./chunk-AFIHJVHG.js";var We=(()=>{class n{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,i){this._renderer=e,this._elementRef=i}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static \u0275fac=function(i){return new(i||n)(s(N),s(S))};static \u0275dir=l({type:n})}return n})(),M=(()=>{class n extends We{static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,features:[u]})}return n})(),y=new A(""),Vt={provide:y,useExisting:d(()=>Dt),multi:!0},Dt=(()=>{class n extends M{writeValue(e){this.setProperty("checked",e)}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(i,r){i&1&&_("change",function(a){return r.onChange(a.target.checked)})("blur",function(){return r.onTouched()})},standalone:!1,features:[c([Vt]),u]})}return n})(),bt={provide:y,useExisting:d(()=>qe),multi:!0};function At(){let n=ge()?ge().getUserAgent():"";return/android (\d+)/.test(n.toLowerCase())}var Mt=new A(""),qe=(()=>{class n extends We{_compositionMode;_composing=!1;constructor(e,i,r){super(e,i),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!At())}writeValue(e){let i=e??"";this.setProperty("value",i)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static \u0275fac=function(i){return new(i||n)(s(N),s(S),s(Mt,8))};static \u0275dir=l({type:n,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(i,r){i&1&&_("input",function(a){return r._handleInput(a.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(a){return r._compositionEnd(a.target.value)})},standalone:!1,features:[c([bt]),u]})}return n})();function me(n){return n==null||_e(n)===0}function _e(n){return n==null?null:Array.isArray(n)||typeof n=="string"?n.length:n instanceof Set?n.size:null}var m=new A(""),F=new A(""),Ft=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,ke=class{static min(t){return ze(t)}static max(t){return Ze(t)}static required(t){return Xe(t)}static requiredTrue(t){return Et(t)}static email(t){return wt(t)}static minLength(t){return It(t)}static maxLength(t){return Ye(t)}static pattern(t){return St(t)}static nullValidator(t){return J()}static compose(t){return nt(t)}static composeAsync(t){return it(t)}};function ze(n){return t=>{if(t.value==null||n==null)return null;let e=parseFloat(t.value);return!isNaN(e)&&e<n?{min:{min:n,actual:t.value}}:null}}function Ze(n){return t=>{if(t.value==null||n==null)return null;let e=parseFloat(t.value);return!isNaN(e)&&e>n?{max:{max:n,actual:t.value}}:null}}function Xe(n){return me(n.value)?{required:!0}:null}function Et(n){return n.value===!0?null:{required:!0}}function wt(n){return me(n.value)||Ft.test(n.value)?null:{email:!0}}function It(n){return t=>{let e=t.value?.length??_e(t.value);return e===null||e===0?null:e<n?{minlength:{requiredLength:n,actualLength:e}}:null}}function Ye(n){return t=>{let e=t.value?.length??_e(t.value);return e!==null&&e>n?{maxlength:{requiredLength:n,actualLength:e}}:null}}function St(n){if(!n)return J;let t,e;return typeof n=="string"?(e="",n.charAt(0)!=="^"&&(e+="^"),e+=n,n.charAt(n.length-1)!=="$"&&(e+="$"),t=new RegExp(e)):(e=n.toString(),t=n),i=>{if(me(i.value))return null;let r=i.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}function J(n){return null}function Ke(n){return n!=null}function Je(n){return Pe(n)?Ee(n):n}function Qe(n){let t={};return n.forEach(e=>{t=e!=null?f(f({},t),e):t}),Object.keys(t).length===0?null:t}function et(n,t){return t.map(e=>e(n))}function Nt(n){return!n.validate}function tt(n){return n.map(t=>Nt(t)?t:e=>t.validate(e))}function nt(n){if(!n)return null;let t=n.filter(Ke);return t.length==0?null:function(e){return Qe(et(e,t))}}function ve(n){return n!=null?nt(tt(n)):null}function it(n){if(!n)return null;let t=n.filter(Ke);return t.length==0?null:function(e){let i=et(e,t).map(Je);return Ie(i).pipe(we(Qe))}}function ye(n){return n!=null?it(tt(n)):null}function je(n,t){return n===null?[t]:Array.isArray(n)?[...n,t]:[n,t]}function rt(n){return n._rawValidators}function ot(n){return n._rawAsyncValidators}function pe(n){return n?Array.isArray(n)?n:[n]:[]}function Q(n,t){return Array.isArray(n)?n.includes(t):n===t}function Ge(n,t){let e=pe(t);return pe(n).forEach(r=>{Q(e,r)||e.push(r)}),e}function Te(n,t){return pe(t).filter(e=>!Q(n,e))}var ee=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=ve(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=ye(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t=void 0){this.control?.reset(t)}hasError(t,e){return this.control?this.control.hasError(t,e):!1}getError(t,e){return this.control?this.control.getError(t,e):null}},h=class extends ee{name;get formDirective(){return null}get path(){return null}},v=class extends ee{_parent=null;name=null;valueAccessor=null},te=class{_cd;constructor(t){this._cd=t}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return!!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return!!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return!!this._cd?.control?.invalid}get isPending(){return!!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}};var Tn=(()=>{class n extends te{constructor(e){super(e)}static \u0275fac=function(i){return new(i||n)(s(v,2))};static \u0275dir=l({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,r){i&2&&ce("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},standalone:!1,features:[u]})}return n})(),Bn=(()=>{class n extends te{constructor(e){super(e)}static \u0275fac=function(i){return new(i||n)(s(h,10))};static \u0275dir=l({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["","formArray",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(i,r){i&2&&ce("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)("ng-submitted",r.isSubmitted)},standalone:!1,features:[u]})}return n})();var j="VALID",K="INVALID",x="PENDING",G="DISABLED",b=class{},ne=class extends b{value;source;constructor(t,e){super(),this.value=t,this.source=e}},B=class extends b{pristine;source;constructor(t,e){super(),this.pristine=t,this.source=e}},U=class extends b{touched;source;constructor(t,e){super(),this.touched=t,this.source=e}},P=class extends b{status;source;constructor(t,e){super(),this.status=t,this.source=e}},ie=class extends b{source;constructor(t){super(),this.source=t}},H=class extends b{source;constructor(t){super(),this.source=t}};function Ce(n){return(ae(n)?n.validators:n)||null}function Ot(n){return Array.isArray(n)?ve(n):n||null}function Ve(n,t){return(ae(t)?t.asyncValidators:n)||null}function xt(n){return Array.isArray(n)?ye(n):n||null}function ae(n){return n!=null&&!Array.isArray(n)&&typeof n=="object"}function st(n,t,e){let i=n.controls;if(!(t?Object.keys(i):i).length)throw new Z(1e3,"");if(!i[e])throw new Z(1001,"")}function at(n,t,e){n._forEachChild((i,r)=>{if(e[r]===void 0)throw new Z(1002,"")})}var L=class{_pendingDirty=!1;_hasOwnPendingAsyncValidator=null;_pendingTouched=!1;_onCollectionChange=()=>{};_updateOn;_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(t,e){this._assignValidators(t),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get status(){return V(this.statusReactive)}set status(t){V(()=>this.statusReactive.set(t))}_status=O(()=>this.statusReactive());statusReactive=w(void 0);get valid(){return this.status===j}get invalid(){return this.status===K}get pending(){return this.status==x}get disabled(){return this.status===G}get enabled(){return this.status!==G}errors;get pristine(){return V(this.pristineReactive)}set pristine(t){V(()=>this.pristineReactive.set(t))}_pristine=O(()=>this.pristineReactive());pristineReactive=w(!0);get dirty(){return!this.pristine}get touched(){return V(this.touchedReactive)}set touched(t){V(()=>this.touchedReactive.set(t))}_touched=O(()=>this.touchedReactive());touchedReactive=w(!1);get untouched(){return!this.touched}_events=new Fe;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t)}setAsyncValidators(t){this._assignAsyncValidators(t)}addValidators(t){this.setValidators(Ge(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(Ge(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(Te(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(Te(t,this._rawAsyncValidators))}hasValidator(t){return Q(this._rawValidators,t)}hasAsyncValidator(t){return Q(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){let e=this.touched===!1;this.touched=!0;let i=t.sourceControl??this;t.onlySelf||this._parent?.markAsTouched(p(f({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new U(!0,i))}markAllAsDirty(t={}){this.markAsDirty({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsDirty(t))}markAllAsTouched(t={}){this.markAsTouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(t))}markAsUntouched(t={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:i})}),t.onlySelf||this._parent?._updateTouched(t,i),e&&t.emitEvent!==!1&&this._events.next(new U(!1,i))}markAsDirty(t={}){let e=this.pristine===!0;this.pristine=!1;let i=t.sourceControl??this;t.onlySelf||this._parent?.markAsDirty(p(f({},t),{sourceControl:i})),e&&t.emitEvent!==!1&&this._events.next(new B(!1,i))}markAsPristine(t={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:t.emitEvent})}),t.onlySelf||this._parent?._updatePristine(t,i),e&&t.emitEvent!==!1&&this._events.next(new B(!0,i))}markAsPending(t={}){this.status=x;let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new P(this.status,e)),this.statusChanges.emit(this.status)),t.onlySelf||this._parent?.markAsPending(p(f({},t),{sourceControl:e}))}disable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=G,this.errors=null,this._forEachChild(r=>{r.disable(p(f({},t),{onlySelf:!0}))}),this._updateValue();let i=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new ne(this.value,i)),this._events.next(new P(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(p(f({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=j,this._forEachChild(i=>{i.enable(p(f({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(p(f({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(i=>i(!1))}_updateAncestors(t,e){t.onlySelf||(this._parent?.updateValueAndValidity(t),t.skipPristineCheck||this._parent?._updatePristine({},e),this._parent?._updateTouched({},e))}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===j||this.status===x)&&this._runAsyncValidator(i,t.emitEvent)}let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new ne(this.value,e)),this._events.next(new P(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),t.onlySelf||this._parent?.updateValueAndValidity(p(f({},t),{sourceControl:e}))}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?G:j}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t,e){if(this.asyncValidator){this.status=x,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1,shouldHaveEmitted:t!==!1};let i=Je(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:e,shouldHaveEmitted:t})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let t=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??!1;return this._hasOwnPendingAsyncValidator=null,t}return!1}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(t){let e=t;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((i,r)=>i&&i._find(r),this)}getError(t,e){let i=e?this.get(e):this;return i?.errors?i.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t,e,i){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),(t||i)&&this._events.next(new P(this.status,e)),this._parent&&this._parent._updateControlsErrors(t,e,i)}_initObservables(){this.valueChanges=new D,this.statusChanges=new D}_calculateStatus(){return this._allControlsDisabled()?G:this.errors?K:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(x)?x:this._anyControlsHaveStatus(K)?K:j}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t,e){let i=!this._anyControlsDirty(),r=this.pristine!==i;this.pristine=i,t.onlySelf||this._parent?._updatePristine(t,e),r&&this._events.next(new B(this.pristine,e))}_updateTouched(t={},e){this.touched=this._anyControlsTouched(),this._events.next(new U(this.touched,e)),t.onlySelf||this._parent?._updateTouched(t,e)}_onDisabledChange=[];_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){ae(t)&&t.updateOn!=null&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){return!t&&!!this._parent?.dirty&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=Ot(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=xt(this._rawAsyncValidators)}},$=class extends L{constructor(t,e,i){super(Ce(e),Ve(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,i={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}removeControl(t,e={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(t,e,i={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){at(this,!0,t),Object.keys(t).forEach(i=>{st(this,!0,i),this.controls[i].setValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(Object.keys(t).forEach(i=>{let r=this.controls[i];r&&r.patchValue(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((i,r)=>{i.reset(t?t[r]:null,p(f({},e),{onlySelf:!0}))}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==!1&&this._events.next(new H(this))}getRawValue(){return this._reduceChildren({},(t,e,i)=>(t[i]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(e,i)=>i._syncPendingControls()?!0:e);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{let i=this.controls[e];i&&t(i,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(let[e,i]of Object.entries(this.controls))if(this.contains(e)&&t(i))return!0;return!1}_reduceValue(){let t={};return this._reduceChildren(t,(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(t,e){let i=t;return this._forEachChild((r,o)=>{i=e(i,r,o)}),i}_allControlsDisabled(){for(let t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(t){return this.controls.hasOwnProperty(t)?this.controls[t]:null}};var Un=$;var E=new A("",{factory:()=>q}),q="always";function le(n,t){return[...t.path,n]}function W(n,t,e=q){De(n,t),t.valueAccessor.writeValue(n.value),(n.disabled||e==="always")&&t.valueAccessor.setDisabledState?.(n.disabled),Rt(n,t),jt(n,t),kt(n,t),Pt(n,t)}function re(n,t,e=!0){let i=()=>{};t?.valueAccessor?.registerOnChange(i),t?.valueAccessor?.registerOnTouched(i),se(n,t),n&&(t._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}))}function oe(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function Pt(n,t){if(t.valueAccessor.setDisabledState){let e=i=>{t.valueAccessor.setDisabledState(i)};n.registerOnDisabledChange(e),t._registerOnDestroy(()=>{n._unregisterOnDisabledChange(e)})}}function De(n,t){let e=rt(n);t.validator!==null?n.setValidators(je(e,t.validator)):typeof e=="function"&&n.setValidators([e]);let i=ot(n);t.asyncValidator!==null?n.setAsyncValidators(je(i,t.asyncValidator)):typeof i=="function"&&n.setAsyncValidators([i]);let r=()=>n.updateValueAndValidity();oe(t._rawValidators,r),oe(t._rawAsyncValidators,r)}function se(n,t){let e=!1;if(n!==null){if(t.validator!==null){let r=rt(n);if(Array.isArray(r)&&r.length>0){let o=r.filter(a=>a!==t.validator);o.length!==r.length&&(e=!0,n.setValidators(o))}}if(t.asyncValidator!==null){let r=ot(n);if(Array.isArray(r)&&r.length>0){let o=r.filter(a=>a!==t.asyncValidator);o.length!==r.length&&(e=!0,n.setAsyncValidators(o))}}}let i=()=>{};return oe(t._rawValidators,i),oe(t._rawAsyncValidators,i),e}function Rt(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=!0,n._pendingDirty=!0,n.updateOn==="change"&&lt(n,t)})}function kt(n,t){t.valueAccessor.registerOnTouched(()=>{n._pendingTouched=!0,n.updateOn==="blur"&&n._pendingChange&&lt(n,t),n.updateOn!=="submit"&&n.markAsTouched()})}function lt(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1}function jt(n,t){let e=(i,r)=>{t.valueAccessor.writeValue(i),r&&t.viewToModelUpdate(i)};n.registerOnChange(e),t._registerOnDestroy(()=>{n._unregisterOnChange(e)})}function ut(n,t){n==null,De(n,t)}function Gt(n,t){return se(n,t)}function be(n,t){if(!n.hasOwnProperty("model"))return!1;let e=n.model;return e.isFirstChange()?!0:!Object.is(t,e.currentValue)}function Tt(n){return Object.getPrototypeOf(n.constructor)===M}function dt(n,t){n._syncPendingControls(),t.forEach(e=>{let i=e.control;i.updateOn==="submit"&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1)})}function Ae(n,t){if(!t)return null;Array.isArray(t);let e,i,r;return t.forEach(o=>{o.constructor===qe?e=o:Tt(o)?i=o:r=o}),r||i||e||null}function Bt(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}var Ut={provide:h,useExisting:d(()=>Ht)},T=Promise.resolve(),Ht=(()=>{class n extends h{callSetDisabledState;get submitted(){return V(this.submittedReactive)}_submitted=O(()=>this.submittedReactive());submittedReactive=w(!1);_directives=new Set;form;ngSubmit=new D;options;constructor(e,i,r){super(),this.callSetDisabledState=r,this.form=new $({},ve(e),ye(i))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){T.then(()=>{let i=this._findContainer(e.path);e.control=i.registerControl(e.name,e.control),W(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){T.then(()=>{this._findContainer(e.path)?.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){T.then(()=>{let i=this._findContainer(e.path),r=new $({});ut(r,e),i.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){T.then(()=>{this._findContainer(e.path)?.removeControl?.(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,i){T.then(()=>{this.form.get(e.path).setValue(i)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submittedReactive.set(!0),dt(this.form,this._directives),this.ngSubmit.emit(e),this.form._events.next(new ie(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this.submittedReactive.set(!1)}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}static \u0275fac=function(i){return new(i||n)(s(m,10),s(F,10),s(E,8))};static \u0275dir=l({type:n,selectors:[["form",3,"ngNoForm","",3,"formGroup","",3,"formArray",""],["ng-form"],["","ngForm",""]],hostBindings:function(i,r){i&1&&_("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[c([Ut]),u]})}return n})();function Be(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1)}function Ue(n){return typeof n=="object"&&n!==null&&Object.keys(n).length===2&&"value"in n&&"disabled"in n}var ct=class extends L{defaultValue=null;_onChange=[];_pendingValue;_pendingChange=!1;constructor(t=null,e,i){super(Ce(e),Ve(i,e)),this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),ae(e)&&(e.nonNullable||e.initialValueIsDefault)&&(Ue(t)?this.defaultValue=t.value:this.defaultValue=t)}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(i=>i(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=this.defaultValue,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),e.overwriteDefaultValue&&(this.defaultValue=this.value),this._pendingChange=!1,e?.emitEvent!==!1&&this._events.next(new H(this))}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){Be(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){Be(this._onDisabledChange,t)}_forEachChild(t){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),!0):!1}_applyFormState(t){Ue(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}};var Lt=n=>n instanceof ct,$t=(()=>{class n extends h{_parent;ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this)}ngOnDestroy(){this.formDirective?.removeFormGroup(this)}get control(){return this.formDirective.getFormGroup(this)}get path(){return le(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,standalone:!1,features:[u]})}return n})();var Wt={provide:v,useExisting:d(()=>qt)},He=Promise.resolve(),qt=(()=>{class n extends v{_changeDetectorRef;callSetDisabledState;control=new ct;static ngAcceptInputType_isDisabled;_registered=!1;viewModel;name="";isDisabled;model;options;update=new D;constructor(e,i,r,o,a,C){super(),this._changeDetectorRef=a,this.callSetDisabledState=C,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=Ae(this,o)}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)})}this._setUpControl()}"isDisabled"in e&&this._updateDisabled(e),be(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.formDirective?.removeControl(this)}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=!0}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn)}_isStandalone(){return!this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){W(this.control,this,this.callSetDisabledState),this.control.updateValueAndValidity({emitEvent:!1})}_checkForErrors(){this._checkName()}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name}_updateValue(e){He.then(()=>{this.control.setValue(e,{emitViewToModelChange:!1}),this._changeDetectorRef?.markForCheck()})}_updateDisabled(e){let i=e.isDisabled.currentValue,r=i!==0&&fe(i);He.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck()})}_getPath(e){return this._parent?le(e,this._parent):[e]}static \u0275fac=function(i){return new(i||n)(s(h,9),s(m,10),s(F,10),s(y,10),s(he,8),s(E,8))};static \u0275dir=l({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:!1,features:[c([Wt]),u,I]})}return n})();var Ln=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275dir=l({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:!1})}return n})(),zt={provide:y,useExisting:d(()=>Zt),multi:!0},Zt=(()=>{class n extends M{writeValue(e){let i=e??"";this.setProperty("value",i)}registerOnChange(e){this.onChange=i=>{e(i==""?null:parseFloat(i))}}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(i,r){i&1&&_("input",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[c([zt]),u]})}return n})(),Xt={provide:y,useExisting:d(()=>Kt),multi:!0};var Yt=(()=>{class n{_accessors=[];add(e,i){this._accessors.push([e,i])}remove(e){for(let i=this._accessors.length-1;i>=0;--i)if(this._accessors[i][1]===e){this._accessors.splice(i,1);return}}select(e){this._accessors.forEach(i=>{this._isSameGroup(i,e)&&i[1]!==e&&i[1].fireUncheck(e.value)})}_isSameGroup(e,i){return e[0].control?e[0]._parent===i._control._parent&&e[1].name===i.name:!1}static \u0275fac=function(i){return new(i||n)};static \u0275prov=Se({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})(),Kt=(()=>{class n extends M{_registry;_injector;_state;_control;_fn;setDisabledStateFired=!1;onChange=()=>{};name;formControlName;value;callSetDisabledState=R(E,{optional:!0})??q;constructor(e,i,r,o){super(e,i),this._registry=r,this._injector=o}ngOnInit(){this._control=this._injector.get(v),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(e){this._state=e===this.value,this.setProperty("checked",this._state)}registerOnChange(e){this._fn=e,this.onChange=()=>{e(this.value),this._registry.select(this)}}setDisabledState(e){(this.setDisabledStateFired||e||this.callSetDisabledState==="whenDisabledForLegacyCode")&&this.setProperty("disabled",e),this.setDisabledStateFired=!0}fireUncheck(e){this.writeValue(e)}_checkName(){this.name&&this.formControlName&&(this.name,this.formControlName),!this.name&&this.formControlName&&(this.name=this.formControlName)}static \u0275fac=function(i){return new(i||n)(s(N),s(S),s(Yt),s(Ne))};static \u0275dir=l({type:n,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(i,r){i&1&&_("change",function(){return r.onChange()})("blur",function(){return r.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},standalone:!1,features:[c([Xt]),u]})}return n})(),Jt={provide:y,useExisting:d(()=>Qt),multi:!0},Qt=(()=>{class n extends M{writeValue(e){this.setProperty("value",parseFloat(e))}registerOnChange(e){this.onChange=i=>{e(i==""?null:parseFloat(i))}}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(i,r){i&1&&_("change",function(a){return r.onChange(a.target.value)})("input",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},standalone:!1,features:[c([Jt]),u]})}return n})(),Le=class extends L{constructor(t,e,i){super(Ce(e),Ve(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}controls;at(t){return this.controls[this._adjustIndex(t)]}push(t,e={}){Array.isArray(t)?t.forEach(i=>{this.controls.push(i),this._registerControl(i)}):(this.controls.push(t),this._registerControl(t)),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}insert(t,e,i={}){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent})}removeAt(t,e={}){let i=this._adjustIndex(t);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent})}setControl(t,e,i={}){let r=this._adjustIndex(t);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){at(this,!1,t),t.forEach((i,r)=>{st(this,!1,r),this.at(r).setValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(t.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t=[],e={}){this._forEachChild((i,r)=>{i.reset(t[r],p(f({},e),{onlySelf:!0}))}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==!1&&this._events.next(new H(this))}getRawValue(){return this.controls.map(t=>t.getRawValue())}clear(t={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:t.emitEvent}))}_adjustIndex(t){return t<0?t+this.length:t}_syncPendingControls(){let t=this.controls.reduce((e,i)=>i._syncPendingControls()?!0:e,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){this.controls.forEach((e,i)=>{t(e,i)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_allControlsDisabled(){for(let t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}_find(t){return this.at(t)??null}};var ht=(()=>{class n extends h{callSetDisabledState;get submitted(){return V(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}_submitted=O(()=>this._submittedReactive());_submittedReactive=w(!1);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];constructor(e,i,r){super(),this.callSetDisabledState=r,this._setValidators(e),this._setAsyncValidators(i)}ngOnChanges(e){this.onChanges(e)}ngOnDestroy(){this.onDestroy()}onChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}onDestroy(){this.form&&(se(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get path(){return[]}addControl(e){let i=this.form.get(e.path);return W(i,e,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){re(e.control||null,e,!1),Bt(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}getFormArray(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}updateModel(e,i){this.form.get(e.path).setValue(i)}onReset(){this.resetForm()}resetForm(e=void 0,i={}){this.form.reset(e,i),this._submittedReactive.set(!1)}onSubmit(e){return this.submitted=!0,dt(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new ie(this.control)),e?.target?.method==="dialog"}_updateDomValue(){this.directives.forEach(e=>{let i=e.control,r=this.form.get(e.path);i!==r&&(re(i||null,e),Lt(r)&&(W(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let i=this.form.get(e.path);ut(i,e),i.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){let i=this.form?.get(e.path);i&&Gt(i,e)&&i.updateValueAndValidity({emitEvent:!1})}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm?._registerOnCollectionChange(()=>{})}_updateValidators(){De(this.form,this),this._oldForm&&se(this._oldForm,this)}_checkFormPresent(){this.form}static \u0275fac=function(i){return new(i||n)(s(m,10),s(F,10),s(E,8))};static \u0275dir=l({type:n,features:[u,I]})}return n})();var Me=new A(""),en={provide:v,useExisting:d(()=>tn)},tn=(()=>{class n extends v{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(e){}model;update=new D;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,r,o,a){super(),this._ngModelWarningConfig=o,this.callSetDisabledState=a,this._setValidators(e),this._setAsyncValidators(i),this.valueAccessor=Ae(this,r)}ngOnChanges(e){if(this._isControlChanged(e)){let i=e.form.previousValue;i&&re(i,this,!1),W(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}be(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&re(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_isControlChanged(e){return e.hasOwnProperty("form")}static \u0275fac=function(i){return new(i||n)(s(m,10),s(F,10),s(y,10),s(Me,8),s(E,8))};static \u0275dir=l({type:n,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],standalone:!1,features:[c([en]),u,I]})}return n})(),nn={provide:h,useExisting:d(()=>ft)},ft=(()=>{class n extends $t{name=null;constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r)}_checkParentType(){pt(this._parent)}static \u0275fac=function(i){return new(i||n)(s(h,13),s(m,10),s(F,10))};static \u0275dir=l({type:n,selectors:[["","formGroupName",""]],inputs:{name:[0,"formGroupName","name"]},standalone:!1,features:[c([nn]),u]})}return n})(),rn={provide:h,useExisting:d(()=>gt)},gt=(()=>{class n extends h{_parent;name=null;constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r)}ngOnInit(){pt(this._parent),this.formDirective.addFormArray(this)}ngOnDestroy(){this.formDirective?.removeFormArray(this)}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return le(this.name==null?this.name:this.name.toString(),this._parent)}static \u0275fac=function(i){return new(i||n)(s(h,13),s(m,10),s(F,10))};static \u0275dir=l({type:n,selectors:[["","formArrayName",""]],inputs:{name:[0,"formArrayName","name"]},standalone:!1,features:[c([rn]),u]})}return n})();function pt(n){return!(n instanceof ft)&&!(n instanceof ht)&&!(n instanceof gt)}var on={provide:v,useExisting:d(()=>sn)},sn=(()=>{class n extends v{_ngModelWarningConfig;_added=!1;viewModel;control;name=null;set isDisabled(e){}model;update=new D;static _ngModelWarningSentOnce=!1;_ngModelWarningSent=!1;constructor(e,i,r,o,a){super(),this._ngModelWarningConfig=a,this._parent=e,this._setValidators(i),this._setAsyncValidators(r),this.valueAccessor=Ae(this,o)}ngOnChanges(e){this._added||this._setUpControl(),be(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective?.removeControl(this)}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}get path(){return le(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_setUpControl(){this.control=this.formDirective.addControl(this),this._added=!0}static \u0275fac=function(i){return new(i||n)(s(h,13),s(m,10),s(F,10),s(y,10),s(Me,8))};static \u0275dir=l({type:n,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:!1,features:[c([on]),u,I]})}return n})();var an={provide:h,useExisting:d(()=>ln)},ln=(()=>{class n extends ht{form=null;ngSubmit=new D;get control(){return this.form}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["","formGroup",""]],hostBindings:function(i,r){i&1&&_("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:!1,features:[c([an]),u]})}return n})(),un={provide:y,useExisting:d(()=>_t),multi:!0};function mt(n,t){return n==null?`${t}`:(t&&typeof t=="object"&&(t="Object"),`${n}: ${t}`.slice(0,50))}function dn(n){return n.split(":")[0]}var _t=(()=>{class n extends M{value;_optionMap=new Map;_idCounter=0;set compareWith(e){this._compareWith=e}_compareWith=Object.is;appRefInjector=R(Re).injector;destroyRef=R(Oe);cdr=R(he);_queuedWrite=!1;_writeValueAfterRender(){this._queuedWrite||this.appRefInjector.destroyed||(this._queuedWrite=!0,xe({write:()=>{this.destroyRef.destroyed||(this._queuedWrite=!1,this.writeValue(this.value))}},{injector:this.appRefInjector}))}writeValue(e){this.cdr.markForCheck(),this.value=e;let i=this._getOptionId(e),r=mt(i,e);this.setProperty("value",r)}registerOnChange(e){this.onChange=i=>{this.value=this._getOptionValue(i),e(this.value)}}_registerOption(){return(this._idCounter++).toString()}_getOptionId(e){for(let i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i),e))return i;return null}_getOptionValue(e){let i=dn(e);return this._optionMap.has(i)?this._optionMap.get(i):e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(i,r){i&1&&_("change",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[c([un]),u]})}return n})(),$n=(()=>{class n{_element;_renderer;_select;id;constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption())}set ngValue(e){this._select!=null&&(this._select._optionMap.set(this.id,e),this._setElementValue(mt(this.id,e)),this._select._writeValueAfterRender())}set value(e){this._setElementValue(e),this._select?._writeValueAfterRender()}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}ngOnDestroy(){this._select?._optionMap.delete(this.id),this._select?._writeValueAfterRender()}static \u0275fac=function(i){return new(i||n)(s(S),s(N),s(_t,9))};static \u0275dir=l({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})(),cn={provide:y,useExisting:d(()=>vt),multi:!0};function $e(n,t){return n==null?`${t}`:(typeof t=="string"&&(t=`'${t}'`),t&&typeof t=="object"&&(t="Object"),`${n}: ${t}`.slice(0,50))}function hn(n){return n.split(":")[0]}var vt=(()=>{class n extends M{value;_optionMap=new Map;_idCounter=0;set compareWith(e){this._compareWith=e}_compareWith=Object.is;writeValue(e){this.value=e;let i;if(Array.isArray(e)){let r=e.map(o=>this._getOptionId(o));i=(o,a)=>{o._setSelected(r.indexOf(a.toString())>-1)}}else i=(r,o)=>{r._setSelected(!1)};this._optionMap.forEach(i)}registerOnChange(e){this.onChange=i=>{let r=[],o=i.selectedOptions;if(o!==void 0){let a=o;for(let C=0;C<a.length;C++){let z=a[C],de=this._getOptionValue(z.value);r.push(de)}}else{let a=i.options;for(let C=0;C<a.length;C++){let z=a[C];if(z.selected){let de=this._getOptionValue(z.value);r.push(de)}}}this.value=r,e(r)}}_registerOption(e){let i=(this._idCounter++).toString();return this._optionMap.set(i,e),i}_getOptionId(e){for(let i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i)._value,e))return i;return null}_getOptionValue(e){let i=hn(e);return this._optionMap.has(i)?this._optionMap.get(i)._value:e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["select","multiple","","formControlName",""],["select","multiple","","formControl",""],["select","multiple","","ngModel",""]],hostBindings:function(i,r){i&1&&_("change",function(a){return r.onChange(a.target)})("blur",function(){return r.onTouched()})},inputs:{compareWith:"compareWith"},standalone:!1,features:[c([cn]),u]})}return n})(),Wn=(()=>{class n{_element;_renderer;_select;id;_value;constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption(this))}set ngValue(e){this._select!=null&&(this._value=e,this._setElementValue($e(this.id,e)),this._select.writeValue(this._select.value))}set value(e){this._select?(this._value=e,this._setElementValue($e(this.id,e)),this._select.writeValue(this._select.value)):this._setElementValue(e)}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e)}_setSelected(e){this._renderer.setProperty(this._element.nativeElement,"selected",e)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}static \u0275fac=function(i){return new(i||n)(s(S),s(N),s(vt,9))};static \u0275dir=l({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:!1})}return n})();function fn(n){return typeof n=="number"?n:parseInt(n,10)}function yt(n){return typeof n=="number"?n:parseFloat(n)}var ue=(()=>{class n{_validator=J;_onChange;_enabled;ngOnChanges(e){if(this.inputName in e){let i=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):J,this._onChange?.()}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e}enabled(e){return e!=null}static \u0275fac=function(i){return new(i||n)};static \u0275dir=l({type:n,features:[I]})}return n})(),gn={provide:m,useExisting:d(()=>pn),multi:!0},pn=(()=>{class n extends ue{max;inputName="max";normalizeInput=e=>yt(e);createValidator=e=>Ze(e);static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&k("max",r._enabled?r.max:null)},inputs:{max:"max"},standalone:!1,features:[c([gn]),u]})}return n})(),mn={provide:m,useExisting:d(()=>_n),multi:!0},_n=(()=>{class n extends ue{min;inputName="min";normalizeInput=e=>yt(e);createValidator=e=>ze(e);static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&k("min",r._enabled?r.min:null)},inputs:{min:"min"},standalone:!1,features:[c([mn]),u]})}return n})(),vn={provide:m,useExisting:d(()=>yn),multi:!0};var yn=(()=>{class n extends ue{required;inputName="required";normalizeInput=fe;createValidator=e=>Xe;enabled(e){return e}static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(i,r){i&2&&k("required",r._enabled?"":null)},inputs:{required:"required"},standalone:!1,features:[c([vn]),u]})}return n})();var Cn={provide:m,useExisting:d(()=>Vn),multi:!0},Vn=(()=>{class n extends ue{maxlength;inputName="maxlength";normalizeInput=e=>fn(e);createValidator=e=>Ye(e);static \u0275fac=(()=>{let e;return function(r){return(e||(e=g(n)))(r||n)}})();static \u0275dir=l({type:n,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&k("maxlength",r._enabled?r.maxlength:null)},inputs:{maxlength:"maxlength"},standalone:!1,features:[c([Cn]),u]})}return n})();var Ct=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=Y({type:n});static \u0275inj=X({})}return n})();var qn=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:E,useValue:e.callSetDisabledState??q}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=Y({type:n});static \u0275inj=X({imports:[Ct]})}return n})(),zn=(()=>{class n{static withConfig(e){return{ngModule:n,providers:[{provide:Me,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:E,useValue:e.callSetDisabledState??q}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=Y({type:n});static \u0275inj=X({imports:[Ct]})}return n})();export{y as a,Dt as b,qe as c,m as d,ke as e,v as f,Tn as g,Bn as h,$ as i,Un as j,Ht as k,ct as l,qt as m,Ln as n,Zt as o,Kt as p,Qt as q,Le as r,tn as s,ft as t,gt as u,sn as v,ln as w,_t as x,$n as y,Wn as z,pn as A,_n as B,yn as C,Vn as D,qn as E,zn as F};
@@ -1 +1 @@
1
- import{a as W}from"./chunk-SW3MVXR5.js";import{a as X}from"./chunk-FW4JCZNG.js";import"./chunk-F4DLZWDY.js";import{c as q}from"./chunk-H2FHPYWP.js";import{a as Q}from"./chunk-DEI4EULW.js";import{d as J}from"./chunk-DXSUJXKW.js";import"./chunk-ZAMAK546.js";import{c as N}from"./chunk-MZT6I3S3.js";import{s as H}from"./chunk-C2J4TQ7V.js";import"./chunk-MWPKXBXJ.js";import"./chunk-7EDSHFWH.js";import{a as w,c as G}from"./chunk-3ZLLFAXF.js";import"./chunk-Q2M4W42M.js";import{F as Y,c as K,g as $,h as B,i as R,l as M,n as L,v as A,w as j}from"./chunk-DDWYQORF.js";import"./chunk-B46LXCLF.js";import{Bb as f,Db as c,Fb as d,Gc as z,Ka as s,Rb as P,Tb as r,Ub as u,Vb as E,Wa as F,ca as v,ga as p,ha as m,jb as h,kb as O,lb as g,ma as I,mb as C,mc as U,pb as b,qb as y,rb as k,sb as n,t as V,ta as x,tb as t,u as D,ub as S}from"./chunk-KJ5SIUGY.js";var T=(o,i)=>i.value;function ee(o,i){o&1&&(n(0,"p",4),r(1,"Loading\u2026"),t())}function te(o,i){if(o&1){let e=f();n(0,"button",18),c("click",function(){let l=p(e).$implicit,_=d(2);return m(_.setThemeVariant(l.value))}),n(1,"span",19),r(2),t(),n(3,"span",20),r(4),t()()}if(o&2){let e=i.$implicit,a=d(2);P("user-profile__theme-variant--active",a.themeVariant()===e.value),h("aria-pressed",a.themeVariant()===e.value),s(2),u(e.label),s(2),u(e.description)}}function ne(o,i){if(o&1){let e=f();n(0,"button",21),c("click",function(){let l=p(e).$implicit,_=d(2);return m(_.setTheme(l.value))}),r(1),t()}if(o&2){let e=i.$implicit,a=d(2);P("user-profile__segmented-option--active",a.themeMode()===e.value),h("aria-pressed",a.themeMode()===e.value),s(),E(" ",e.label," ")}}function ie(o,i){if(o&1){let e=f();n(0,"button",21),c("click",function(){let l=p(e).$implicit,_=d(2);return m(_.setEnterKeyBehavior(l.value))}),r(1),t()}if(o&2){let e=i.$implicit,a=d(2);P("user-profile__segmented-option--active",a.enterKeyBehavior()===e.value),h("aria-pressed",a.enterKeyBehavior()===e.value),s(),E(" ",e.label," ")}}function re(o,i){if(o&1){let e=f();n(0,"form",22),c("ngSubmit",function(){p(e);let l=d(2);return m(l.save())}),n(1,"div",5)(2,"h2",6),r(3,"Identity"),t(),n(4,"div",7)(5,"span",8),r(6,"Email"),t(),n(7,"span",23),r(8),t()(),n(9,"div",7)(10,"span",8),r(11,"External ID"),t(),n(12,"span",23),r(13),t()()(),n(14,"div",5)(15,"h2",6),r(16,"Profile"),t(),n(17,"div",7)(18,"label",24),r(19,"First name"),t(),S(20,"input",25),t(),n(21,"div",7)(22,"label",26),r(23,"Last name"),t(),S(24,"input",27),t(),n(25,"div",7)(26,"label",28),r(27,"Bio"),t(),S(28,"textarea",29),t()(),n(29,"div",30)(30,"button",31),r(31),t(),n(32,"button",32),c("click",function(){p(e);let l=d(2);return m(l.cancelEditing())}),r(33,"Cancel"),t()()()}if(o&2){let e=d(),a=d();k("formGroup",a.form),s(8),u(e.email),s(5),u(e.externalId),s(17),k("disabled",a.isSaving()),s(),E(" ",a.isSaving()?"Saving\u2026":"Save changes"," ")}}function oe(o,i){o&1&&(n(0,"p",40),r(1," No global configuration yet. Create one from the Integrations / AI Providers / AI Models pages of your namespaces. "),t())}function ae(o,i){if(o&1){let e=f();n(0,"span",47),r(1,"Delete?"),t(),n(2,"button",48),c("click",function(){p(e);let l=d().$implicit,_=d(6);return m(_.confirmDelete(l))}),r(3," Confirm "),t(),n(4,"button",49),c("click",function(){p(e);let l=d(7);return m(l.cancelDelete())}),r(5," Cancel "),t()}}function le(o,i){if(o&1){let e=f();n(0,"button",49),c("click",function(){p(e);let l=d().$implicit,_=d(6);return m(_.armDelete(l))}),r(1," Delete "),t()}}function se(o,i){if(o&1&&(n(0,"li",43)(1,"span",44),r(2),t(),n(3,"span",45),r(4),t(),g(5,ae,6,0)(6,le,2,0,"button",46),t()),o&2){let e=i.$implicit,a=d(6);s(2),u(e.name),s(2),u(e.subtitle),s(),C(a.isPendingDelete(e)?5:6)}}function de(o,i){if(o&1&&(n(0,"h3",41),r(1,"Integrations"),t(),n(2,"ul",42),b(3,se,7,3,"li",43,O().trackEntry,!0),t()),o&2){let e=d(5);s(3),y(e.recap().integrations)}}function _e(o,i){if(o&1){let e=f();n(0,"span",47),r(1,"Delete?"),t(),n(2,"button",48),c("click",function(){p(e);let l=d().$implicit,_=d(6);return m(_.confirmDelete(l))}),r(3," Confirm "),t(),n(4,"button",49),c("click",function(){p(e);let l=d(7);return m(l.cancelDelete())}),r(5," Cancel "),t()}}function ce(o,i){if(o&1){let e=f();n(0,"button",49),c("click",function(){p(e);let l=d().$implicit,_=d(6);return m(_.armDelete(l))}),r(1," Delete "),t()}}function pe(o,i){if(o&1&&(n(0,"li",43)(1,"span",44),r(2),t(),n(3,"span",45),r(4),t(),g(5,_e,6,0)(6,ce,2,0,"button",46),t()),o&2){let e=i.$implicit,a=d(6);s(2),u(e.name),s(2),u(e.subtitle),s(),C(a.isPendingDelete(e)?5:6)}}function me(o,i){if(o&1&&(n(0,"h3",41),r(1,"AI Providers"),t(),n(2,"ul",42),b(3,pe,7,3,"li",43,O().trackEntry,!0),t()),o&2){let e=d(5);s(3),y(e.recap().aiProviders)}}function ue(o,i){if(o&1&&(g(0,de,5,0),g(1,me,5,0)),o&2){let e=d(4);C(e.recap().integrations.length>0?0:-1),s(),C(e.recap().aiProviders.length>0?1:-1)}}function fe(o,i){if(o&1&&g(0,oe,2,0,"p",40)(1,ue,2,2),o&2){let e=d(3);C(e.recap().total===0?0:1)}}function ve(o,i){if(o&1){let e=f();n(0,"div",17)(1,"div",5)(2,"h2",6),r(3,"Identity"),t(),n(4,"div",7)(5,"span",8),r(6,"Email"),t(),n(7,"span",33),r(8),t()(),n(9,"div",7)(10,"span",8),r(11,"External ID"),t(),n(12,"span",33),r(13),t()()(),n(14,"div",5)(15,"h2",6),r(16,"Profile"),t(),n(17,"div",7)(18,"span",8),r(19,"First name"),t(),n(20,"span",33),r(21),t()(),n(22,"div",7)(23,"span",8),r(24,"Last name"),t(),n(25,"span",33),r(26),t()(),n(27,"div",34)(28,"span",8),r(29,"Bio"),t(),n(30,"span",33),r(31),t()()(),n(32,"div",30)(33,"button",35),c("click",function(){p(e);let l=d(2);return m(l.startEditing())}),r(34," Edit profile "),t()(),n(35,"div",36)(36,"button",37),c("click",function(){p(e);let l=d(2);return m(l.toggleOverrides())}),n(37,"span",38),r(38,"\u25B6"),t(),r(39," My global user configurations "),n(40,"span",39),r(41),t()(),g(42,fe,2,1),t()()}if(o&2){let e=d(),a=d();s(8),u(e.email),s(5),u(e.externalId),s(8),u(e.firstname||"\u2014"),s(5),u(e.lastname||"\u2014"),s(5),u(e.bio||"\u2014"),s(5),h("aria-expanded",a.isOverridesExpanded()),s(),P("user-profile__overrides-arrow--open",a.isOverridesExpanded()),s(4),E("(",a.recap().total,")"),s(),C(a.isOverridesExpanded()?42:-1)}}function ge(o,i){if(o&1&&(n(0,"div",5)(1,"h2",6),r(2,"Appearance"),t(),n(3,"div",7)(4,"span",8),r(5,"Skin"),t(),n(6,"div",9),b(7,te,5,5,"button",10,T),t()(),n(9,"div",7)(10,"span",8),r(11,"Mode"),t(),n(12,"div",11),b(13,ne,2,4,"button",12,T),t()()(),n(15,"div",5)(16,"h2",6),r(17,"Composer"),t(),n(18,"div",7)(19,"span",8),r(20,"Enter key"),t(),n(21,"div",13)(22,"div",14),b(23,ie,2,4,"button",12,T),t(),n(25,"p",15),r(26,'In "New line" mode, press Ctrl or Cmd + Enter to send.'),t()()()(),g(27,re,34,5,"form",16)(28,ve,43,10,"div",17)),o&2){let e=d();s(7),y(e.themeVariantOptions),s(6),y(e.themeOptions),s(10),y(e.enterKeyOptions),s(4),C(e.isEditing()?27:28)}}function Ce(o,i){o&1&&(n(0,"p",4),r(1,"Unable to load profile."),t())}var Z=class o{userState=v(Q);router=v(N);location=v(z);destroyRef=v(I);integrationState=v(W);providerState=v(X);themePort=v(J);preferencesPort=v(q);isEditing=x(!1);isLoading=x(!1);isSaving=x(!1);isOverridesExpanded=x(!1);currentUser=this.userState.currentUser;theme=this.themePort.theme;themeMode=U(()=>this.themePort.theme().mode);themeOptions=[{value:"light",label:"Light"},{value:"dark",label:"Dark"},{value:"system",label:"System"}];themeVariant=U(()=>this.themePort.theme().variant);themeVariantOptions=[{value:"industry",label:"Industry",description:"Bleu acier, Barlow"},{value:"terminal",label:"Terminal",description:"Ambre CRT, JetBrains Mono"}];enterKeyBehavior=this.preferencesPort.enterKeyBehavior;enterKeyOptions=[{value:"send",label:"Send"},{value:"newline",label:"New line"}];form=new R({firstname:new M("",{nonNullable:!0}),lastname:new M("",{nonNullable:!0}),bio:new M("",{nonNullable:!0})});recap=G(D([this.integrationState.userGlobal$,this.providerState.userGlobal$]).pipe(V(([i,e])=>{let a=i.map(_=>({category:"integration",id:_.id??"",name:_.name,subtitle:_.integrationType})),l=e.map(_=>({category:"aiProvider",id:_.id??"",name:_.name,subtitle:_.apiType}));return{integrations:a,aiProviders:l,total:a.length+l.length}})),{initialValue:{integrations:[],aiProviders:[],total:0}});ngOnInit(){if(this.currentUser()){this.syncFormFromState();return}this.isLoading.set(!0),this.userState.loadMe().pipe(w(this.destroyRef)).subscribe({next:()=>{this.syncFormFromState(),this.isLoading.set(!1)},error:()=>this.isLoading.set(!1)})}startEditing(){this.syncFormFromState(),this.isEditing.set(!0)}cancelEditing(){this.isEditing.set(!1)}setTheme(i){this.themePort.setTheme({variant:this.themePort.theme().variant,mode:i})}setThemeVariant(i){this.themePort.setTheme({variant:i,mode:this.themePort.theme().mode})}setEnterKeyBehavior(i){this.preferencesPort.setEnterKeyBehavior(i)}save(){this.isSaving()||(this.isSaving.set(!0),this.userState.updateMe({firstname:this.form.controls.firstname.value.trim()||void 0,lastname:this.form.controls.lastname.value.trim()||void 0,bio:this.form.controls.bio.value.trim()||void 0}).pipe(w(this.destroyRef)).subscribe({next:()=>{this.isSaving.set(!1),this.isEditing.set(!1)},error:()=>this.isSaving.set(!1)}))}toggleOverrides(){this.isOverridesExpanded.update(i=>!i),this.pendingDeleteKey.set(null)}pendingDeleteKey=x(null);isPendingDelete(i){return this.pendingDeleteKey()===this.entryKey(i)}armDelete(i){i.id&&this.pendingDeleteKey.set(this.entryKey(i))}cancelDelete(){this.pendingDeleteKey.set(null)}confirmDelete(i){if(!i.id)return;this.pendingDeleteKey.set(null),(i.category==="integration"?this.integrationState.delete(i.id,"userGlobal"):this.providerState.delete(i.id,"userGlobal")).pipe(w(this.destroyRef)).subscribe({error:a=>{console.error(`[UserProfile] Delete failed for ${i.category}:${i.id}:`,a)}})}entryKey(i){return`${i.category}:${i.id}`}goBack(){window.history.length>1?this.location.back():this.router.navigate(["/agentos"])}trackEntry(i,e){return this.entryKey(e)}syncFormFromState(){let i=this.currentUser();i&&this.form.setValue({firstname:i.firstname??"",lastname:i.lastname??"",bio:i.bio??""})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=F({type:o,selectors:[["agentos-user-profile"]],decls:8,vars:1,consts:[[1,"user-profile"],[1,"user-profile__header"],["icon","arrow_back","title","Back",3,"action"],[1,"user-profile__title"],[1,"user-profile__loading"],[1,"user-profile__section"],[1,"user-profile__section-title"],[1,"user-profile__field"],[1,"user-profile__label"],[1,"user-profile__theme-variants"],["type","button",1,"user-profile__theme-variant",3,"user-profile__theme-variant--active"],["role","group","aria-label","Color mode",1,"user-profile__segmented"],["type","button",1,"user-profile__segmented-option",3,"user-profile__segmented-option--active"],[1,"user-profile__field-control"],["role","group","aria-label","Enter key behavior",1,"user-profile__segmented"],[1,"user-profile__hint"],[1,"user-profile__form",3,"formGroup"],[1,"user-profile__view"],["type","button",1,"user-profile__theme-variant",3,"click"],[1,"user-profile__theme-variant-name"],[1,"user-profile__theme-variant-desc"],["type","button",1,"user-profile__segmented-option",3,"click"],[1,"user-profile__form",3,"ngSubmit","formGroup"],[1,"user-profile__value","user-profile__value--readonly"],["for","up-firstname",1,"user-profile__label"],["id","up-firstname","type","text","placeholder","Your first name","formControlName","firstname","autocomplete","given-name",1,"user-profile__input"],["for","up-lastname",1,"user-profile__label"],["id","up-lastname","type","text","placeholder","Your last name","formControlName","lastname","autocomplete","family-name",1,"user-profile__input"],["for","up-bio",1,"user-profile__label"],["id","up-bio","placeholder","A short description about yourself","formControlName","bio","rows","4",1,"user-profile__input","user-profile__input--textarea"],[1,"user-profile__actions"],["type","submit",1,"user-profile__btn","user-profile__btn--primary",3,"disabled"],["type","button",1,"user-profile__btn",3,"click"],[1,"user-profile__value"],[1,"user-profile__field","user-profile__field--bio"],["type","button",1,"user-profile__btn","user-profile__btn--primary",3,"click"],[1,"user-profile__overrides"],["type","button",1,"user-profile__overrides-toggle",3,"click"],[1,"user-profile__overrides-arrow"],[1,"user-profile__overrides-count"],[1,"user-profile__overrides-empty"],[1,"user-profile__overrides-subtitle"],[1,"user-profile__overrides-list"],[1,"user-profile__overrides-row"],[1,"user-profile__overrides-name"],[1,"user-profile__overrides-subtitle-text"],["type","button",1,"user-profile__overrides-delete"],[1,"user-profile__overrides-confirm-label"],["type","button",1,"user-profile__overrides-delete","user-profile__overrides-delete--confirm",3,"click"],["type","button",1,"user-profile__overrides-delete",3,"click"]],template:function(e,a){if(e&1&&(n(0,"div",0)(1,"header",1)(2,"ds-icon-button",2),c("action",function(){return a.goBack()}),t(),n(3,"h1",3),r(4,"My profile"),t()(),g(5,ee,2,0,"p",4)(6,ge,29,1)(7,Ce,2,0,"p",4),t()),e&2){let l;s(5),C(a.isLoading()?5:(l=a.currentUser())?6:7,l)}},dependencies:[Y,L,K,$,B,j,A,H],styles:[".user-profile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.user-profile__header[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:.5rem}.user-profile__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-accent)}.user-profile__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.user-profile__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.user-profile__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:700;color:var(--color-text);letter-spacing:-.02em}.user-profile__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.9rem;margin:0}.user-profile__view[_ngcontent-%COMP%], .user-profile__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem}.user-profile__section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.user-profile__section-title[_ngcontent-%COMP%]{margin:0;font-family:var(--font-heading);font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.12em;color:var(--color-neutral-500);border-bottom:1px solid var(--color-divider);padding-bottom:.5rem}.user-profile__field[_ngcontent-%COMP%]{display:grid;grid-template-columns:140px 1fr;align-items:baseline;gap:.75rem}.user-profile__field--bio[_ngcontent-%COMP%]{align-items:start}.user-profile__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text-secondary);white-space:nowrap}.user-profile__value[_ngcontent-%COMP%]{font-size:.9375rem;color:var(--color-text);word-break:break-word;white-space:pre-wrap}.user-profile__value--readonly[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.875rem}.user-profile__segmented[_ngcontent-%COMP%]{display:inline-flex;justify-self:start;border:1px solid var(--color-divider);overflow:hidden}.user-profile__segmented-option[_ngcontent-%COMP%]{padding:.4rem .85rem;background:transparent;border:none;border-right:1px solid var(--color-divider);color:var(--color-text-secondary);font-size:.875rem;cursor:pointer;transition:background .15s ease,color .15s ease}.user-profile__segmented-option[_ngcontent-%COMP%]:last-child{border-right:none}.user-profile__segmented-option[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.user-profile__segmented-option--active[_ngcontent-%COMP%]{background:var(--color-accent);color:#fff}.user-profile__segmented-option--active[_ngcontent-%COMP%]:hover{background:var(--color-accent-700)}.user-profile__field-control[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:.4rem}.user-profile__hint[_ngcontent-%COMP%]{margin:0;font-size:.8rem;color:var(--color-text-secondary)}.user-profile__input[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border:1px solid var(--color-divider);background:var(--color-surface);color:var(--color-text);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;border-radius:0;transition:border-color .15s ease;resize:none}.user-profile__input[_ngcontent-%COMP%]:focus{border-color:var(--color-accent)}.user-profile__input[_ngcontent-%COMP%]::placeholder{color:var(--color-neutral-500)}.user-profile__input--textarea[_ngcontent-%COMP%]{line-height:1.5;resize:vertical}.user-profile__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.user-profile__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border:1px solid var(--color-divider);background:transparent;color:var(--color-text);font-size:13px;font-family:var(--font-heading);font-weight:600;cursor:pointer;border-radius:0;transition:background .15s ease,border-color .15s ease}.user-profile__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover);border-color:var(--color-neutral-500)}.user-profile__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.user-profile__btn--primary[_ngcontent-%COMP%]{background:var(--color-accent);border-color:var(--color-accent);color:#fff}.user-profile__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-700);border-color:var(--color-accent-700)}.user-profile__theme-variants[_ngcontent-%COMP%]{display:flex;gap:8px;justify-self:start}.user-profile__theme-variant[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:3px;padding:10px 16px;border:1px solid var(--color-divider);background:transparent;cursor:pointer;min-width:120px;transition:background .12s,border-color .12s}.user-profile__theme-variant[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover);border-color:var(--color-neutral-500)}.user-profile__theme-variant--active[_ngcontent-%COMP%]{border-color:var(--color-accent);background:color-mix(in srgb,var(--color-accent) 8%,transparent)}.user-profile__theme-variant-name[_ngcontent-%COMP%]{font-family:var(--font-heading);font-size:13px;font-weight:600;color:var(--color-text)}.user-profile__theme-variant-desc[_ngcontent-%COMP%]{font-size:11px;color:var(--color-text-secondary);font-family:var(--font-body)}.user-profile__overrides[_ngcontent-%COMP%]{margin-top:1rem;padding-top:1rem;border-top:1px solid var(--color-divider)}.user-profile__overrides-toggle[_ngcontent-%COMP%]{background:transparent;border:none;padding:.25rem 0;font-size:.85rem;color:var(--color-text-secondary);cursor:pointer;display:flex;align-items:center;gap:.4rem}.user-profile__overrides-toggle[_ngcontent-%COMP%]:hover{color:var(--color-text)}.user-profile__overrides-arrow[_ngcontent-%COMP%]{display:inline-block;font-size:.65rem;transition:transform .15s ease}.user-profile__overrides-arrow--open[_ngcontent-%COMP%]{transform:rotate(90deg)}.user-profile__overrides-count[_ngcontent-%COMP%]{color:var(--color-text-tertiary)}.user-profile__overrides-empty[_ngcontent-%COMP%]{font-size:.8rem;color:var(--color-text-secondary);font-style:italic;padding:.5rem 0 0;margin:0}.user-profile__overrides-subtitle[_ngcontent-%COMP%]{font-family:var(--font-heading);font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.12em;color:var(--color-neutral-500);margin:.75rem 0 .25rem}.user-profile__overrides-list[_ngcontent-%COMP%]{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:.25rem}.user-profile__overrides-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.4rem .5rem;font-size:.85rem;border-radius:0}.user-profile__overrides-row[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.user-profile__overrides-name[_ngcontent-%COMP%]{flex:1;color:var(--color-text);font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-profile__overrides-subtitle-text[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary);font-family:var(--font-heading)}.user-profile__overrides-confirm-label[_ngcontent-%COMP%]{font-size:11px;font-family:var(--font-heading);font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--red-deep);white-space:nowrap}.user-profile__overrides-delete[_ngcontent-%COMP%]{background:transparent;border:1px solid transparent;font-size:11px;font-family:var(--font-heading);font-weight:600;color:var(--color-neutral-500);cursor:pointer;padding:3px 8px;border-radius:0;transition:color .12s,background .12s,border-color .12s}.user-profile__overrides-delete[_ngcontent-%COMP%]:hover{color:var(--red);background:color-mix(in srgb,var(--red) 10%,transparent);border-color:var(--red)}.user-profile__overrides-delete--confirm[_ngcontent-%COMP%]{border-color:var(--red);background:var(--red);color:#fff}.user-profile__overrides-delete--confirm[_ngcontent-%COMP%]:hover{background:var(--red-deep);border-color:var(--red-deep)}"],changeDetection:0})};export{Z as UserProfileComponent};
1
+ import{a as W}from"./chunk-CBNBGASZ.js";import{a as X}from"./chunk-74YMXW2X.js";import"./chunk-L43PAPKS.js";import{c as Q}from"./chunk-DA4EUPMU.js";import{a as q}from"./chunk-ZGXLG3K2.js";import{d as J}from"./chunk-ZHNZU36N.js";import"./chunk-4ZRHOAVD.js";import{c as N}from"./chunk-6XQBW7HA.js";import{s as H}from"./chunk-NVHDXKPX.js";import"./chunk-GPV4WMJB.js";import"./chunk-5OX5N476.js";import{a as w,c as G}from"./chunk-NPJSGATI.js";import"./chunk-3SLREHKR.js";import{F as Y,c as K,g as $,h as B,i as R,l as M,n as L,v as A,w as j}from"./chunk-OTQBW2W7.js";import"./chunk-G45KM4GY.js";import{Bb as f,Db as c,Fb as d,Hc as z,Ka as s,Rb as P,Tb as r,Ub as u,Vb as E,Wa as F,ca as v,ga as p,ha as m,jb as h,kb as O,lb as g,ma as I,mb as C,mc as U,pb as b,qb as y,rb as k,sb as n,t as V,ta as x,tb as t,u as D,ub as S}from"./chunk-AFIHJVHG.js";var T=(o,i)=>i.value;function ee(o,i){o&1&&(n(0,"p",4),r(1,"Loading\u2026"),t())}function te(o,i){if(o&1){let e=f();n(0,"button",18),c("click",function(){let l=p(e).$implicit,_=d(2);return m(_.setThemeVariant(l.value))}),n(1,"span",19),r(2),t(),n(3,"span",20),r(4),t()()}if(o&2){let e=i.$implicit,a=d(2);P("user-profile__theme-variant--active",a.themeVariant()===e.value),h("aria-pressed",a.themeVariant()===e.value),s(2),u(e.label),s(2),u(e.description)}}function ne(o,i){if(o&1){let e=f();n(0,"button",21),c("click",function(){let l=p(e).$implicit,_=d(2);return m(_.setTheme(l.value))}),r(1),t()}if(o&2){let e=i.$implicit,a=d(2);P("user-profile__segmented-option--active",a.themeMode()===e.value),h("aria-pressed",a.themeMode()===e.value),s(),E(" ",e.label," ")}}function ie(o,i){if(o&1){let e=f();n(0,"button",21),c("click",function(){let l=p(e).$implicit,_=d(2);return m(_.setEnterKeyBehavior(l.value))}),r(1),t()}if(o&2){let e=i.$implicit,a=d(2);P("user-profile__segmented-option--active",a.enterKeyBehavior()===e.value),h("aria-pressed",a.enterKeyBehavior()===e.value),s(),E(" ",e.label," ")}}function re(o,i){if(o&1){let e=f();n(0,"form",22),c("ngSubmit",function(){p(e);let l=d(2);return m(l.save())}),n(1,"div",5)(2,"h2",6),r(3,"Identity"),t(),n(4,"div",7)(5,"span",8),r(6,"Email"),t(),n(7,"span",23),r(8),t()(),n(9,"div",7)(10,"span",8),r(11,"External ID"),t(),n(12,"span",23),r(13),t()()(),n(14,"div",5)(15,"h2",6),r(16,"Profile"),t(),n(17,"div",7)(18,"label",24),r(19,"First name"),t(),S(20,"input",25),t(),n(21,"div",7)(22,"label",26),r(23,"Last name"),t(),S(24,"input",27),t(),n(25,"div",7)(26,"label",28),r(27,"Bio"),t(),S(28,"textarea",29),t()(),n(29,"div",30)(30,"button",31),r(31),t(),n(32,"button",32),c("click",function(){p(e);let l=d(2);return m(l.cancelEditing())}),r(33,"Cancel"),t()()()}if(o&2){let e=d(),a=d();k("formGroup",a.form),s(8),u(e.email),s(5),u(e.externalId),s(17),k("disabled",a.isSaving()),s(),E(" ",a.isSaving()?"Saving\u2026":"Save changes"," ")}}function oe(o,i){o&1&&(n(0,"p",40),r(1," No global configuration yet. Create one from the Integrations / AI Providers / AI Models pages of your namespaces. "),t())}function ae(o,i){if(o&1){let e=f();n(0,"span",47),r(1,"Delete?"),t(),n(2,"button",48),c("click",function(){p(e);let l=d().$implicit,_=d(6);return m(_.confirmDelete(l))}),r(3," Confirm "),t(),n(4,"button",49),c("click",function(){p(e);let l=d(7);return m(l.cancelDelete())}),r(5," Cancel "),t()}}function le(o,i){if(o&1){let e=f();n(0,"button",49),c("click",function(){p(e);let l=d().$implicit,_=d(6);return m(_.armDelete(l))}),r(1," Delete "),t()}}function se(o,i){if(o&1&&(n(0,"li",43)(1,"span",44),r(2),t(),n(3,"span",45),r(4),t(),g(5,ae,6,0)(6,le,2,0,"button",46),t()),o&2){let e=i.$implicit,a=d(6);s(2),u(e.name),s(2),u(e.subtitle),s(),C(a.isPendingDelete(e)?5:6)}}function de(o,i){if(o&1&&(n(0,"h3",41),r(1,"Integrations"),t(),n(2,"ul",42),b(3,se,7,3,"li",43,O().trackEntry,!0),t()),o&2){let e=d(5);s(3),y(e.recap().integrations)}}function _e(o,i){if(o&1){let e=f();n(0,"span",47),r(1,"Delete?"),t(),n(2,"button",48),c("click",function(){p(e);let l=d().$implicit,_=d(6);return m(_.confirmDelete(l))}),r(3," Confirm "),t(),n(4,"button",49),c("click",function(){p(e);let l=d(7);return m(l.cancelDelete())}),r(5," Cancel "),t()}}function ce(o,i){if(o&1){let e=f();n(0,"button",49),c("click",function(){p(e);let l=d().$implicit,_=d(6);return m(_.armDelete(l))}),r(1," Delete "),t()}}function pe(o,i){if(o&1&&(n(0,"li",43)(1,"span",44),r(2),t(),n(3,"span",45),r(4),t(),g(5,_e,6,0)(6,ce,2,0,"button",46),t()),o&2){let e=i.$implicit,a=d(6);s(2),u(e.name),s(2),u(e.subtitle),s(),C(a.isPendingDelete(e)?5:6)}}function me(o,i){if(o&1&&(n(0,"h3",41),r(1,"AI Providers"),t(),n(2,"ul",42),b(3,pe,7,3,"li",43,O().trackEntry,!0),t()),o&2){let e=d(5);s(3),y(e.recap().aiProviders)}}function ue(o,i){if(o&1&&(g(0,de,5,0),g(1,me,5,0)),o&2){let e=d(4);C(e.recap().integrations.length>0?0:-1),s(),C(e.recap().aiProviders.length>0?1:-1)}}function fe(o,i){if(o&1&&g(0,oe,2,0,"p",40)(1,ue,2,2),o&2){let e=d(3);C(e.recap().total===0?0:1)}}function ve(o,i){if(o&1){let e=f();n(0,"div",17)(1,"div",5)(2,"h2",6),r(3,"Identity"),t(),n(4,"div",7)(5,"span",8),r(6,"Email"),t(),n(7,"span",33),r(8),t()(),n(9,"div",7)(10,"span",8),r(11,"External ID"),t(),n(12,"span",33),r(13),t()()(),n(14,"div",5)(15,"h2",6),r(16,"Profile"),t(),n(17,"div",7)(18,"span",8),r(19,"First name"),t(),n(20,"span",33),r(21),t()(),n(22,"div",7)(23,"span",8),r(24,"Last name"),t(),n(25,"span",33),r(26),t()(),n(27,"div",34)(28,"span",8),r(29,"Bio"),t(),n(30,"span",33),r(31),t()()(),n(32,"div",30)(33,"button",35),c("click",function(){p(e);let l=d(2);return m(l.startEditing())}),r(34," Edit profile "),t()(),n(35,"div",36)(36,"button",37),c("click",function(){p(e);let l=d(2);return m(l.toggleOverrides())}),n(37,"span",38),r(38,"\u25B6"),t(),r(39," My global user configurations "),n(40,"span",39),r(41),t()(),g(42,fe,2,1),t()()}if(o&2){let e=d(),a=d();s(8),u(e.email),s(5),u(e.externalId),s(8),u(e.firstname||"\u2014"),s(5),u(e.lastname||"\u2014"),s(5),u(e.bio||"\u2014"),s(5),h("aria-expanded",a.isOverridesExpanded()),s(),P("user-profile__overrides-arrow--open",a.isOverridesExpanded()),s(4),E("(",a.recap().total,")"),s(),C(a.isOverridesExpanded()?42:-1)}}function ge(o,i){if(o&1&&(n(0,"div",5)(1,"h2",6),r(2,"Appearance"),t(),n(3,"div",7)(4,"span",8),r(5,"Skin"),t(),n(6,"div",9),b(7,te,5,5,"button",10,T),t()(),n(9,"div",7)(10,"span",8),r(11,"Mode"),t(),n(12,"div",11),b(13,ne,2,4,"button",12,T),t()()(),n(15,"div",5)(16,"h2",6),r(17,"Composer"),t(),n(18,"div",7)(19,"span",8),r(20,"Enter key"),t(),n(21,"div",13)(22,"div",14),b(23,ie,2,4,"button",12,T),t(),n(25,"p",15),r(26,'In "New line" mode, press Ctrl or Cmd + Enter to send.'),t()()()(),g(27,re,34,5,"form",16)(28,ve,43,10,"div",17)),o&2){let e=d();s(7),y(e.themeVariantOptions),s(6),y(e.themeOptions),s(10),y(e.enterKeyOptions),s(4),C(e.isEditing()?27:28)}}function Ce(o,i){o&1&&(n(0,"p",4),r(1,"Unable to load profile."),t())}var Z=class o{userState=v(q);router=v(N);location=v(z);destroyRef=v(I);integrationState=v(W);providerState=v(X);themePort=v(J);preferencesPort=v(Q);isEditing=x(!1);isLoading=x(!1);isSaving=x(!1);isOverridesExpanded=x(!1);currentUser=this.userState.currentUser;theme=this.themePort.theme;themeMode=U(()=>this.themePort.theme().mode);themeOptions=[{value:"light",label:"Light"},{value:"dark",label:"Dark"},{value:"system",label:"System"}];themeVariant=U(()=>this.themePort.theme().variant);themeVariantOptions=[{value:"industry",label:"Industry",description:"Bleu acier, Barlow"},{value:"terminal",label:"Terminal",description:"Ambre CRT, JetBrains Mono"}];enterKeyBehavior=this.preferencesPort.enterKeyBehavior;enterKeyOptions=[{value:"send",label:"Send"},{value:"newline",label:"New line"}];form=new R({firstname:new M("",{nonNullable:!0}),lastname:new M("",{nonNullable:!0}),bio:new M("",{nonNullable:!0})});recap=G(D([this.integrationState.userGlobal$,this.providerState.userGlobal$]).pipe(V(([i,e])=>{let a=i.map(_=>({category:"integration",id:_.id??"",name:_.name,subtitle:_.integrationType})),l=e.map(_=>({category:"aiProvider",id:_.id??"",name:_.name,subtitle:_.apiType}));return{integrations:a,aiProviders:l,total:a.length+l.length}})),{initialValue:{integrations:[],aiProviders:[],total:0}});ngOnInit(){if(this.currentUser()){this.syncFormFromState();return}this.isLoading.set(!0),this.userState.loadMe().pipe(w(this.destroyRef)).subscribe({next:()=>{this.syncFormFromState(),this.isLoading.set(!1)},error:()=>this.isLoading.set(!1)})}startEditing(){this.syncFormFromState(),this.isEditing.set(!0)}cancelEditing(){this.isEditing.set(!1)}setTheme(i){this.themePort.setTheme({variant:this.themePort.theme().variant,mode:i})}setThemeVariant(i){this.themePort.setTheme({variant:i,mode:this.themePort.theme().mode})}setEnterKeyBehavior(i){this.preferencesPort.setEnterKeyBehavior(i)}save(){this.isSaving()||(this.isSaving.set(!0),this.userState.updateMe({firstname:this.form.controls.firstname.value.trim()||void 0,lastname:this.form.controls.lastname.value.trim()||void 0,bio:this.form.controls.bio.value.trim()||void 0}).pipe(w(this.destroyRef)).subscribe({next:()=>{this.isSaving.set(!1),this.isEditing.set(!1)},error:()=>this.isSaving.set(!1)}))}toggleOverrides(){this.isOverridesExpanded.update(i=>!i),this.pendingDeleteKey.set(null)}pendingDeleteKey=x(null);isPendingDelete(i){return this.pendingDeleteKey()===this.entryKey(i)}armDelete(i){i.id&&this.pendingDeleteKey.set(this.entryKey(i))}cancelDelete(){this.pendingDeleteKey.set(null)}confirmDelete(i){if(!i.id)return;this.pendingDeleteKey.set(null),(i.category==="integration"?this.integrationState.delete(i.id,"userGlobal"):this.providerState.delete(i.id,"userGlobal")).pipe(w(this.destroyRef)).subscribe({error:a=>{console.error(`[UserProfile] Delete failed for ${i.category}:${i.id}:`,a)}})}entryKey(i){return`${i.category}:${i.id}`}goBack(){window.history.length>1?this.location.back():this.router.navigate(["/agentos"])}trackEntry(i,e){return this.entryKey(e)}syncFormFromState(){let i=this.currentUser();i&&this.form.setValue({firstname:i.firstname??"",lastname:i.lastname??"",bio:i.bio??""})}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=F({type:o,selectors:[["agentos-user-profile"]],decls:8,vars:1,consts:[[1,"user-profile"],[1,"user-profile__header"],["icon","arrow_back","title","Back",3,"action"],[1,"user-profile__title"],[1,"user-profile__loading"],[1,"user-profile__section"],[1,"user-profile__section-title"],[1,"user-profile__field"],[1,"user-profile__label"],[1,"user-profile__theme-variants"],["type","button",1,"user-profile__theme-variant",3,"user-profile__theme-variant--active"],["role","group","aria-label","Color mode",1,"user-profile__segmented"],["type","button",1,"user-profile__segmented-option",3,"user-profile__segmented-option--active"],[1,"user-profile__field-control"],["role","group","aria-label","Enter key behavior",1,"user-profile__segmented"],[1,"user-profile__hint"],[1,"user-profile__form",3,"formGroup"],[1,"user-profile__view"],["type","button",1,"user-profile__theme-variant",3,"click"],[1,"user-profile__theme-variant-name"],[1,"user-profile__theme-variant-desc"],["type","button",1,"user-profile__segmented-option",3,"click"],[1,"user-profile__form",3,"ngSubmit","formGroup"],[1,"user-profile__value","user-profile__value--readonly"],["for","up-firstname",1,"user-profile__label"],["id","up-firstname","type","text","placeholder","Your first name","formControlName","firstname","autocomplete","given-name",1,"user-profile__input"],["for","up-lastname",1,"user-profile__label"],["id","up-lastname","type","text","placeholder","Your last name","formControlName","lastname","autocomplete","family-name",1,"user-profile__input"],["for","up-bio",1,"user-profile__label"],["id","up-bio","placeholder","A short description about yourself","formControlName","bio","rows","4",1,"user-profile__input","user-profile__input--textarea"],[1,"user-profile__actions"],["type","submit",1,"user-profile__btn","user-profile__btn--primary",3,"disabled"],["type","button",1,"user-profile__btn",3,"click"],[1,"user-profile__value"],[1,"user-profile__field","user-profile__field--bio"],["type","button",1,"user-profile__btn","user-profile__btn--primary",3,"click"],[1,"user-profile__overrides"],["type","button",1,"user-profile__overrides-toggle",3,"click"],[1,"user-profile__overrides-arrow"],[1,"user-profile__overrides-count"],[1,"user-profile__overrides-empty"],[1,"user-profile__overrides-subtitle"],[1,"user-profile__overrides-list"],[1,"user-profile__overrides-row"],[1,"user-profile__overrides-name"],[1,"user-profile__overrides-subtitle-text"],["type","button",1,"user-profile__overrides-delete"],[1,"user-profile__overrides-confirm-label"],["type","button",1,"user-profile__overrides-delete","user-profile__overrides-delete--confirm",3,"click"],["type","button",1,"user-profile__overrides-delete",3,"click"]],template:function(e,a){if(e&1&&(n(0,"div",0)(1,"header",1)(2,"ds-icon-button",2),c("action",function(){return a.goBack()}),t(),n(3,"h1",3),r(4,"My profile"),t()(),g(5,ee,2,0,"p",4)(6,ge,29,1)(7,Ce,2,0,"p",4),t()),e&2){let l;s(5),C(a.isLoading()?5:(l=a.currentUser())?6:7,l)}},dependencies:[Y,L,K,$,B,j,A,H],styles:[".user-profile[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.user-profile__header[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:.5rem}.user-profile__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-accent)}.user-profile__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.user-profile__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.user-profile__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:700;color:var(--color-text);letter-spacing:-.02em}.user-profile__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.9rem;margin:0}.user-profile__view[_ngcontent-%COMP%], .user-profile__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem}.user-profile__section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.user-profile__section-title[_ngcontent-%COMP%]{margin:0;font-family:var(--font-heading);font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.12em;color:var(--color-neutral-500);border-bottom:1px solid var(--color-divider);padding-bottom:.5rem}.user-profile__field[_ngcontent-%COMP%]{display:grid;grid-template-columns:140px 1fr;align-items:baseline;gap:.75rem}.user-profile__field--bio[_ngcontent-%COMP%]{align-items:start}.user-profile__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text-secondary);white-space:nowrap}.user-profile__value[_ngcontent-%COMP%]{font-size:.9375rem;color:var(--color-text);word-break:break-word;white-space:pre-wrap}.user-profile__value--readonly[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.875rem}.user-profile__segmented[_ngcontent-%COMP%]{display:inline-flex;justify-self:start;border:1px solid var(--color-divider);overflow:hidden}.user-profile__segmented-option[_ngcontent-%COMP%]{padding:.4rem .85rem;background:transparent;border:none;border-right:1px solid var(--color-divider);color:var(--color-text-secondary);font-size:.875rem;cursor:pointer;transition:background .15s ease,color .15s ease}.user-profile__segmented-option[_ngcontent-%COMP%]:last-child{border-right:none}.user-profile__segmented-option[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.user-profile__segmented-option--active[_ngcontent-%COMP%]{background:var(--color-accent);color:#fff}.user-profile__segmented-option--active[_ngcontent-%COMP%]:hover{background:var(--color-accent-700)}.user-profile__field-control[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:.4rem}.user-profile__hint[_ngcontent-%COMP%]{margin:0;font-size:.8rem;color:var(--color-text-secondary)}.user-profile__input[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border:1px solid var(--color-divider);background:var(--color-surface);color:var(--color-text);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;border-radius:0;transition:border-color .15s ease;resize:none}.user-profile__input[_ngcontent-%COMP%]:focus{border-color:var(--color-accent)}.user-profile__input[_ngcontent-%COMP%]::placeholder{color:var(--color-neutral-500)}.user-profile__input--textarea[_ngcontent-%COMP%]{line-height:1.5;resize:vertical}.user-profile__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.user-profile__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border:1px solid var(--color-divider);background:transparent;color:var(--color-text);font-size:13px;font-family:var(--font-heading);font-weight:600;cursor:pointer;border-radius:0;transition:background .15s ease,border-color .15s ease}.user-profile__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover);border-color:var(--color-neutral-500)}.user-profile__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.user-profile__btn--primary[_ngcontent-%COMP%]{background:var(--color-accent);border-color:var(--color-accent);color:#fff}.user-profile__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-700);border-color:var(--color-accent-700)}.user-profile__theme-variants[_ngcontent-%COMP%]{display:flex;gap:8px;justify-self:start}.user-profile__theme-variant[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;gap:3px;padding:10px 16px;border:1px solid var(--color-divider);background:transparent;cursor:pointer;min-width:120px;transition:background .12s,border-color .12s}.user-profile__theme-variant[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover);border-color:var(--color-neutral-500)}.user-profile__theme-variant--active[_ngcontent-%COMP%]{border-color:var(--color-accent);background:color-mix(in srgb,var(--color-accent) 8%,transparent)}.user-profile__theme-variant-name[_ngcontent-%COMP%]{font-family:var(--font-heading);font-size:13px;font-weight:600;color:var(--color-text)}.user-profile__theme-variant-desc[_ngcontent-%COMP%]{font-size:11px;color:var(--color-text-secondary);font-family:var(--font-body)}.user-profile__overrides[_ngcontent-%COMP%]{margin-top:1rem;padding-top:1rem;border-top:1px solid var(--color-divider)}.user-profile__overrides-toggle[_ngcontent-%COMP%]{background:transparent;border:none;padding:.25rem 0;font-size:.85rem;color:var(--color-text-secondary);cursor:pointer;display:flex;align-items:center;gap:.4rem}.user-profile__overrides-toggle[_ngcontent-%COMP%]:hover{color:var(--color-text)}.user-profile__overrides-arrow[_ngcontent-%COMP%]{display:inline-block;font-size:.65rem;transition:transform .15s ease}.user-profile__overrides-arrow--open[_ngcontent-%COMP%]{transform:rotate(90deg)}.user-profile__overrides-count[_ngcontent-%COMP%]{color:var(--color-text-tertiary)}.user-profile__overrides-empty[_ngcontent-%COMP%]{font-size:.8rem;color:var(--color-text-secondary);font-style:italic;padding:.5rem 0 0;margin:0}.user-profile__overrides-subtitle[_ngcontent-%COMP%]{font-family:var(--font-heading);font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.12em;color:var(--color-neutral-500);margin:.75rem 0 .25rem}.user-profile__overrides-list[_ngcontent-%COMP%]{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:.25rem}.user-profile__overrides-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.4rem .5rem;font-size:.85rem;border-radius:0}.user-profile__overrides-row[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.user-profile__overrides-name[_ngcontent-%COMP%]{flex:1;color:var(--color-text);font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-profile__overrides-subtitle-text[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary);font-family:var(--font-heading)}.user-profile__overrides-confirm-label[_ngcontent-%COMP%]{font-size:11px;font-family:var(--font-heading);font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--red-deep);white-space:nowrap}.user-profile__overrides-delete[_ngcontent-%COMP%]{background:transparent;border:1px solid transparent;font-size:11px;font-family:var(--font-heading);font-weight:600;color:var(--color-neutral-500);cursor:pointer;padding:3px 8px;border-radius:0;transition:color .12s,background .12s,border-color .12s}.user-profile__overrides-delete[_ngcontent-%COMP%]:hover{color:var(--red);background:color-mix(in srgb,var(--red) 10%,transparent);border-color:var(--red)}.user-profile__overrides-delete--confirm[_ngcontent-%COMP%]{border-color:var(--red);background:var(--red);color:#fff}.user-profile__overrides-delete--confirm[_ngcontent-%COMP%]:hover{background:var(--red-deep);border-color:var(--red-deep)}"],changeDetection:0})};export{Z as UserProfileComponent};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-7J5PDKSA.js";import"./chunk-XMNSCHH7.js";import"./chunk-4ZRHOAVD.js";import"./chunk-6XQBW7HA.js";import"./chunk-NVHDXKPX.js";import"./chunk-GPV4WMJB.js";import"./chunk-5OX5N476.js";import"./chunk-NPJSGATI.js";import"./chunk-3SLREHKR.js";import"./chunk-OTQBW2W7.js";import"./chunk-G45KM4GY.js";import"./chunk-AFIHJVHG.js";export{a as UserGroupFormComponent};
@@ -1 +1 @@
1
- import{a as X}from"./chunk-TBYJS5N4.js";import{c as T}from"./chunk-MZT6I3S3.js";import{A as Q,s as W,z as J}from"./chunk-C2J4TQ7V.js";import{a as j,b as N,c as H}from"./chunk-3ZLLFAXF.js";import{Bb as b,Cb as S,D as R,Db as c,Eb as A,Fb as u,Ka as l,Pb as B,Rb as F,S as P,Tb as p,Ub as M,Vb as z,Wa as y,Xb as K,ab as L,ca as v,ga as d,ha as g,jc as $,lb as _,m as U,ma as O,mb as f,mc as k,pb as q,pc as C,qb as V,qc as i,rb as h,sb as a,ta as I,tb as s,u as E,vb as x,wb as G}from"./chunk-KJ5SIUGY.js";var te=(n,t)=>t.id;function ne(n,t){n&1&&(x(0,"option",3),p(1,"All namespaces"),G())}function oe(n,t){if(n&1&&(x(0,"option",4),p(1),G()),n&2){let e=t.$implicit;S("value",e.id),l(),M(e.name)}}var w=class n{namespaces=i.required();value=i(null);includeAllOption=i(!1);valueChange=C();onChange(t){let e=t.target.value;this.valueChange.emit(e===""?null:e)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=y({type:n,selectors:[["agentos-namespace-select"]],inputs:{namespaces:[1,"namespaces"],value:[1,"value"],includeAllOption:[1,"includeAllOption"]},outputs:{valueChange:"valueChange"},decls:7,vars:2,consts:[[1,"namespace-select"],[1,"namespace-select__label"],[1,"namespace-select__control",3,"change","value"],["value",""],[3,"value"]],template:function(e,o){e&1&&(x(0,"label",0)(1,"span",1),p(2,"Namespace"),G(),x(3,"select",2),A("change",function(m){return o.onChange(m)}),_(4,ne,2,0,"option",3),q(5,oe,2,2,"option",4,te),G()()),e&2&&(l(3),S("value",o.value()??""),l(),f(o.includeAllOption()?4:-1),l(),V(o.namespaces()))},styles:[".namespace-select[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.4rem}.namespace-select__label[_ngcontent-%COMP%]{font-size:.8rem;font-weight:500;color:var(--color-text-secondary, #6e6e73);white-space:nowrap}.namespace-select__control[_ngcontent-%COMP%]{padding:.35rem .6rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.875rem;font-family:inherit;cursor:pointer}.namespace-select__control[_ngcontent-%COMP%]:focus{outline:none;border-color:var(--color-primary, #007aff)}"],changeDetection:0})};function re(n,t){if(n&1){let e=b();a(0,"span",6),p(1,"Delete?"),s(),a(2,"ds-icon-button",7),c("action",function(){d(e);let r=u();return g(r.onDeleteConfirmed())}),s(),a(3,"ds-icon-button",8),c("action",function(){d(e);let r=u();return g(r.onDeleteCancelled())}),s()}}function ie(n,t){if(n&1){let e=b();a(0,"ds-kebab-menu",9),c("itemSelected",function(r){d(e);let m=u();return g(m.onMenuAction(r))}),s()}if(n&2){let e=u();h("items",e.menuItems)}}var D=class n{router=v(T);userGroup=i.required();namespaceId=i.required();returnTo=i(void 0);deleteRequested=C();pendingDelete=I(!1);menuItems=[{key:"edit",label:"Edit group",icon:"edit"},{key:"delete",label:"Delete group",icon:"delete",variant:"danger"}];get agentCount(){return this.userGroup().agentIds.length}onMenuAction(t){switch(t){case"edit":this.router.navigate(["/agentos",this.namespaceId(),"user-groups",this.userGroup().userGroupId,"edit"],{queryParams:this.returnTo()?{returnTo:this.returnTo()}:{}});break;case"delete":this.pendingDelete.set(!0);break}}onDeleteConfirmed(){this.pendingDelete.set(!1),this.deleteRequested.emit(this.userGroup())}onDeleteCancelled(){this.pendingDelete.set(!1)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=y({type:n,selectors:[["agentos-user-group-item"]],inputs:{userGroup:[1,"userGroup"],namespaceId:[1,"namespaceId"],returnTo:[1,"returnTo"]},outputs:{deleteRequested:"deleteRequested"},decls:9,vars:8,consts:[["role","listitem",1,"user-group-item"],[1,"user-group-item__body"],[1,"user-group-item__name"],[1,"user-group-item__meta"],[1,"user-group-item__actions"],[3,"items"],[1,"user-group-item__confirm-label"],["icon","check","variant","danger","title","Confirm deletion",3,"action"],["icon","close","title","Cancel deletion",3,"action"],[3,"itemSelected","items"]],template:function(e,o){e&1&&(a(0,"div",0)(1,"div",1)(2,"span",2),p(3),s(),a(4,"span",3),p(5),s()(),a(6,"div",4),_(7,re,4,0)(8,ie,1,1,"ds-kebab-menu",5),s()()),e&2&&(F("user-group-item--pending-delete",o.pendingDelete()),l(3),M(o.userGroup().name),l(2),K(" ",o.agentCount," ",o.agentCount===1?"agent":"agents"," \xB7 ",o.userGroup().userCount," ",o.userGroup().userCount===1?"member":"members"," "),l(2),f(o.pendingDelete()?7:8))},dependencies:[Q,W],styles:[".user-group-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.75rem 1rem;border-radius:10px;border:1px solid var(--color-border, rgba(0, 0, 0, .08));background:var(--glass-bg, rgba(255, 255, 255, .72));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));backdrop-filter:var(--glass-backdrop-blur, blur(20px));transition:background .15s ease,border-color .15s ease}.user-group-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .04));border-color:var(--color-primary, #007aff)}.user-group-item__body[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:.2rem;min-width:0}.user-group-item__name[_ngcontent-%COMP%]{font-size:.95rem;font-weight:500;color:var(--color-text, #1d1d1f);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-group-item__meta[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary, #6e6e73);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-group-item__actions[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;gap:.125rem;opacity:0;transition:opacity .15s ease}.user-group-item[_ngcontent-%COMP%]:hover .user-group-item__actions[_ngcontent-%COMP%], .user-group-item[_ngcontent-%COMP%]:focus-within .user-group-item__actions[_ngcontent-%COMP%], .user-group-item--pending-delete[_ngcontent-%COMP%] .user-group-item__actions[_ngcontent-%COMP%]{opacity:1}.user-group-item__confirm-label[_ngcontent-%COMP%]{font-size:.8rem;font-weight:500;color:var(--color-error, #ff3b30);margin-right:.25rem;white-space:nowrap}"],changeDetection:0})};function ae(n,t){if(n&1){let e=b();a(0,"button",4),c("click",function(){d(e);let r=u();return g(r.onBack())}),p(1),s()}n&2&&(l(),z("\u2190 ",t))}function se(n,t){if(n&1){let e=b();a(0,"agentos-namespace-select",5),c("valueChange",function(r){d(e);let m=u();return g(m.onNamespaceChange(r))}),s()}if(n&2){let e=u();h("namespaces",t)("value",e.namespaceId())}}function le(n,t){if(n&1){let e=b();a(0,"agentos-user-group-item",7),c("deleteRequested",function(r){d(e);let m=u(2);return g(m.deleteGroup(r))}),s()}if(n&2){let e=u(2);h("userGroup",t)("namespaceId",e.namespaceId())("returnTo",e.returnTo())}}function ue(n,t){if(n&1&&_(0,le,1,3,"agentos-user-group-item",6),n&2){let e,o=t.$implicit,r=u();f((e=r.resolveGroup(o.id))?0:-1,e)}}var ee=class n{router=v(T);destroyRef=v(O);userGroupState=v(X);namespaceId=i.required();backLabel=i(void 0);namespaces=i(void 0);hideTitle=i(!1);returnTo=i(void 0);backRequested=C();namespaceChange=C();refresh=I(0);groups=H(E([N(this.namespaceId),N(this.refresh)]).pipe(P(([t])=>this.userGroupState.listByNamespace(t).pipe(R(e=>(console.error("[UserGroupList] Failed to load user groups",e),U([])))))),{initialValue:[]});groupItems=k(()=>this.groups().map(t=>({id:t.userGroupId,name:t.name})));groupsById=k(()=>new Map(this.groups().map(t=>[t.userGroupId,t])));resolveGroup(t){return this.groupsById().get(t)??null}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId(),"user-groups","new"],{queryParams:this.returnTo()?{returnTo:this.returnTo()}:{}})}deleteGroup(t){this.userGroupState.delete(t.userGroupId).pipe(j(this.destroyRef)).subscribe(()=>this.refresh.update(e=>e+1))}onBack(){this.backRequested.emit()}onNamespaceChange(t){t&&this.namespaceChange.emit(t)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=y({type:n,selectors:[["agentos-user-group-list"]],inputs:{namespaceId:[1,"namespaceId"],backLabel:[1,"backLabel"],namespaces:[1,"namespaces"],hideTitle:[1,"hideTitle"],returnTo:[1,"returnTo"]},outputs:{backRequested:"backRequested",namespaceChange:"namespaceChange"},decls:5,vars:5,consts:[["groupItemTpl",""],["title","User Groups","emptyMessage","No user groups yet. Create one above.","cardMinWidth","400px",3,"createRequested","hideTitle","items","showCreate","itemTemplate"],["toolbar-start","","type","button",1,"user-group-list__back"],["toolbar-start","",3,"namespaces","value"],["toolbar-start","","type","button",1,"user-group-list__back",3,"click"],["toolbar-start","",3,"valueChange","namespaces","value"],[3,"userGroup","namespaceId","returnTo"],[3,"deleteRequested","userGroup","namespaceId","returnTo"]],template:function(e,o){if(e&1&&(a(0,"ds-entity-list",1),c("createRequested",function(){return o.openCreateForm()}),_(1,ae,2,1,"button",2)(2,se,1,2,"agentos-namespace-select",3),s(),L(3,ue,1,1,"ng-template",null,0,$)),e&2){let r,m=B(4);h("hideTitle",o.hideTitle())("items",o.groupItems())("showCreate",!0)("itemTemplate",m),l(),f((r=o.backLabel())?1:(r=o.namespaces())?2:-1,r)}},dependencies:[J,D,w],styles:[".user-group-list__back[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.user-group-list__back[_ngcontent-%COMP%]:hover{text-decoration:underline}"],changeDetection:0})};export{w as a,D as b,ee as c};
1
+ import{a as X}from"./chunk-XMNSCHH7.js";import{c as T}from"./chunk-6XQBW7HA.js";import{A as Q,s as W,z as J}from"./chunk-NVHDXKPX.js";import{a as j,b as N,c as H}from"./chunk-NPJSGATI.js";import{Bb as b,Cb as S,D as R,Db as c,Eb as A,Fb as u,Ka as l,Pb as B,Rb as F,S as P,Tb as p,Ub as M,Vb as z,Wa as y,Xb as K,ab as L,ca as v,ga as d,ha as g,jc as $,lb as _,m as U,ma as O,mb as f,mc as k,pb as q,pc as C,qb as V,qc as i,rb as h,sb as a,ta as I,tb as s,u as E,vb as x,wb as G}from"./chunk-AFIHJVHG.js";var te=(n,t)=>t.id;function ne(n,t){n&1&&(x(0,"option",3),p(1,"All namespaces"),G())}function oe(n,t){if(n&1&&(x(0,"option",4),p(1),G()),n&2){let e=t.$implicit;S("value",e.id),l(),M(e.name)}}var w=class n{namespaces=i.required();value=i(null);includeAllOption=i(!1);valueChange=C();onChange(t){let e=t.target.value;this.valueChange.emit(e===""?null:e)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=y({type:n,selectors:[["agentos-namespace-select"]],inputs:{namespaces:[1,"namespaces"],value:[1,"value"],includeAllOption:[1,"includeAllOption"]},outputs:{valueChange:"valueChange"},decls:7,vars:2,consts:[[1,"namespace-select"],[1,"namespace-select__label"],[1,"namespace-select__control",3,"change","value"],["value",""],[3,"value"]],template:function(e,o){e&1&&(x(0,"label",0)(1,"span",1),p(2,"Namespace"),G(),x(3,"select",2),A("change",function(m){return o.onChange(m)}),_(4,ne,2,0,"option",3),q(5,oe,2,2,"option",4,te),G()()),e&2&&(l(3),S("value",o.value()??""),l(),f(o.includeAllOption()?4:-1),l(),V(o.namespaces()))},styles:[".namespace-select[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.4rem}.namespace-select__label[_ngcontent-%COMP%]{font-size:.8rem;font-weight:500;color:var(--color-text-secondary, #6e6e73);white-space:nowrap}.namespace-select__control[_ngcontent-%COMP%]{padding:.35rem .6rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.875rem;font-family:inherit;cursor:pointer}.namespace-select__control[_ngcontent-%COMP%]:focus{outline:none;border-color:var(--color-primary, #007aff)}"],changeDetection:0})};function re(n,t){if(n&1){let e=b();a(0,"span",6),p(1,"Delete?"),s(),a(2,"ds-icon-button",7),c("action",function(){d(e);let r=u();return g(r.onDeleteConfirmed())}),s(),a(3,"ds-icon-button",8),c("action",function(){d(e);let r=u();return g(r.onDeleteCancelled())}),s()}}function ie(n,t){if(n&1){let e=b();a(0,"ds-kebab-menu",9),c("itemSelected",function(r){d(e);let m=u();return g(m.onMenuAction(r))}),s()}if(n&2){let e=u();h("items",e.menuItems)}}var D=class n{router=v(T);userGroup=i.required();namespaceId=i.required();returnTo=i(void 0);deleteRequested=C();pendingDelete=I(!1);menuItems=[{key:"edit",label:"Edit group",icon:"edit"},{key:"delete",label:"Delete group",icon:"delete",variant:"danger"}];get agentCount(){return this.userGroup().agentIds.length}onMenuAction(t){switch(t){case"edit":this.router.navigate(["/agentos",this.namespaceId(),"user-groups",this.userGroup().userGroupId,"edit"],{queryParams:this.returnTo()?{returnTo:this.returnTo()}:{}});break;case"delete":this.pendingDelete.set(!0);break}}onDeleteConfirmed(){this.pendingDelete.set(!1),this.deleteRequested.emit(this.userGroup())}onDeleteCancelled(){this.pendingDelete.set(!1)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=y({type:n,selectors:[["agentos-user-group-item"]],inputs:{userGroup:[1,"userGroup"],namespaceId:[1,"namespaceId"],returnTo:[1,"returnTo"]},outputs:{deleteRequested:"deleteRequested"},decls:9,vars:8,consts:[["role","listitem",1,"user-group-item"],[1,"user-group-item__body"],[1,"user-group-item__name"],[1,"user-group-item__meta"],[1,"user-group-item__actions"],[3,"items"],[1,"user-group-item__confirm-label"],["icon","check","variant","danger","title","Confirm deletion",3,"action"],["icon","close","title","Cancel deletion",3,"action"],[3,"itemSelected","items"]],template:function(e,o){e&1&&(a(0,"div",0)(1,"div",1)(2,"span",2),p(3),s(),a(4,"span",3),p(5),s()(),a(6,"div",4),_(7,re,4,0)(8,ie,1,1,"ds-kebab-menu",5),s()()),e&2&&(F("user-group-item--pending-delete",o.pendingDelete()),l(3),M(o.userGroup().name),l(2),K(" ",o.agentCount," ",o.agentCount===1?"agent":"agents"," \xB7 ",o.userGroup().userCount," ",o.userGroup().userCount===1?"member":"members"," "),l(2),f(o.pendingDelete()?7:8))},dependencies:[Q,W],styles:[".user-group-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.75rem 1rem;border-radius:10px;border:1px solid var(--color-border, rgba(0, 0, 0, .08));background:var(--glass-bg, rgba(255, 255, 255, .72));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));backdrop-filter:var(--glass-backdrop-blur, blur(20px));transition:background .15s ease,border-color .15s ease}.user-group-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .04));border-color:var(--color-primary, #007aff)}.user-group-item__body[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:.2rem;min-width:0}.user-group-item__name[_ngcontent-%COMP%]{font-size:.95rem;font-weight:500;color:var(--color-text, #1d1d1f);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-group-item__meta[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary, #6e6e73);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.user-group-item__actions[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;gap:.125rem;opacity:0;transition:opacity .15s ease}.user-group-item[_ngcontent-%COMP%]:hover .user-group-item__actions[_ngcontent-%COMP%], .user-group-item[_ngcontent-%COMP%]:focus-within .user-group-item__actions[_ngcontent-%COMP%], .user-group-item--pending-delete[_ngcontent-%COMP%] .user-group-item__actions[_ngcontent-%COMP%]{opacity:1}.user-group-item__confirm-label[_ngcontent-%COMP%]{font-size:.8rem;font-weight:500;color:var(--color-error, #ff3b30);margin-right:.25rem;white-space:nowrap}"],changeDetection:0})};function ae(n,t){if(n&1){let e=b();a(0,"button",4),c("click",function(){d(e);let r=u();return g(r.onBack())}),p(1),s()}n&2&&(l(),z("\u2190 ",t))}function se(n,t){if(n&1){let e=b();a(0,"agentos-namespace-select",5),c("valueChange",function(r){d(e);let m=u();return g(m.onNamespaceChange(r))}),s()}if(n&2){let e=u();h("namespaces",t)("value",e.namespaceId())}}function le(n,t){if(n&1){let e=b();a(0,"agentos-user-group-item",7),c("deleteRequested",function(r){d(e);let m=u(2);return g(m.deleteGroup(r))}),s()}if(n&2){let e=u(2);h("userGroup",t)("namespaceId",e.namespaceId())("returnTo",e.returnTo())}}function ue(n,t){if(n&1&&_(0,le,1,3,"agentos-user-group-item",6),n&2){let e,o=t.$implicit,r=u();f((e=r.resolveGroup(o.id))?0:-1,e)}}var ee=class n{router=v(T);destroyRef=v(O);userGroupState=v(X);namespaceId=i.required();backLabel=i(void 0);namespaces=i(void 0);hideTitle=i(!1);returnTo=i(void 0);backRequested=C();namespaceChange=C();refresh=I(0);groups=H(E([N(this.namespaceId),N(this.refresh)]).pipe(P(([t])=>this.userGroupState.listByNamespace(t).pipe(R(e=>(console.error("[UserGroupList] Failed to load user groups",e),U([])))))),{initialValue:[]});groupItems=k(()=>this.groups().map(t=>({id:t.userGroupId,name:t.name})));groupsById=k(()=>new Map(this.groups().map(t=>[t.userGroupId,t])));resolveGroup(t){return this.groupsById().get(t)??null}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId(),"user-groups","new"],{queryParams:this.returnTo()?{returnTo:this.returnTo()}:{}})}deleteGroup(t){this.userGroupState.delete(t.userGroupId).pipe(j(this.destroyRef)).subscribe(()=>this.refresh.update(e=>e+1))}onBack(){this.backRequested.emit()}onNamespaceChange(t){t&&this.namespaceChange.emit(t)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=y({type:n,selectors:[["agentos-user-group-list"]],inputs:{namespaceId:[1,"namespaceId"],backLabel:[1,"backLabel"],namespaces:[1,"namespaces"],hideTitle:[1,"hideTitle"],returnTo:[1,"returnTo"]},outputs:{backRequested:"backRequested",namespaceChange:"namespaceChange"},decls:5,vars:5,consts:[["groupItemTpl",""],["title","User Groups","emptyMessage","No user groups yet. Create one above.","cardMinWidth","400px",3,"createRequested","hideTitle","items","showCreate","itemTemplate"],["toolbar-start","","type","button",1,"user-group-list__back"],["toolbar-start","",3,"namespaces","value"],["toolbar-start","","type","button",1,"user-group-list__back",3,"click"],["toolbar-start","",3,"valueChange","namespaces","value"],[3,"userGroup","namespaceId","returnTo"],[3,"deleteRequested","userGroup","namespaceId","returnTo"]],template:function(e,o){if(e&1&&(a(0,"ds-entity-list",1),c("createRequested",function(){return o.openCreateForm()}),_(1,ae,2,1,"button",2)(2,se,1,2,"agentos-namespace-select",3),s(),L(3,ue,1,1,"ng-template",null,0,$)),e&2){let r,m=B(4);h("hideTitle",o.hideTitle())("items",o.groupItems())("showCreate",!0)("itemTemplate",m),l(),f((r=o.backLabel())?1:(r=o.namespaces())?2:-1,r)}},dependencies:[J,D,w],styles:[".user-group-list__back[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.user-group-list__back[_ngcontent-%COMP%]:hover{text-decoration:underline}"],changeDetection:0})};export{w as a,D as b,ee as c};