@whoz-oss/coday-client 3.18.0 → 3.20.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 (74) hide show
  1. package/browser/{chunk-CmyT-Z4A.js → chunk-32YJp-72.js} +1 -1
  2. package/browser/{chunk-D8nXP3jN.js → chunk-3KjG4Ivh.js} +1 -1
  3. package/browser/{chunk-D30bRRTP.js → chunk-A12eXtlW.js} +1 -1
  4. package/browser/{chunk-DoqL_RuM.js → chunk-B1VIKLB-.js} +1 -1
  5. package/browser/{chunk-W5DNK5PC.js → chunk-B69a5iLl.js} +1 -1
  6. package/browser/{chunk-B1vuv-dv.js → chunk-B8IQI7aT.js} +1 -1
  7. package/browser/chunk-BCGN7Bq-.js +1 -0
  8. package/browser/{chunk-D92adUD_.js → chunk-BD91wN51.js} +1 -1
  9. package/browser/{chunk-Fr6-w83-.js → chunk-BIeOmcVm.js} +1 -1
  10. package/browser/{chunk-CJEW8Ogd.js → chunk-BKBTovXz.js} +1 -1
  11. package/browser/{chunk-FMHkoXwM.js → chunk-BLF3w_iN.js} +1 -1
  12. package/browser/{chunk-D1ZnLng-.js → chunk-BNNLW7hd.js} +1 -1
  13. package/browser/{chunk-zvR-rokl.js → chunk-BRwhmCei.js} +1 -1
  14. package/browser/{chunk-CM1_Z4h5.js → chunk-BWJO7VDR.js} +1 -1
  15. package/browser/{chunk-B-UKlpjJ.js → chunk-Bf3fjpOn.js} +1 -1
  16. package/browser/{chunk-DDu5Ufv3.js → chunk-Bg-7wA2s.js} +1 -1
  17. package/browser/{chunk-Bb_J3EoX.js → chunk-BgdV8OdP.js} +1 -1
  18. package/browser/{chunk-DFjZf9oL.js → chunk-C1X5uZwT.js} +1 -1
  19. package/browser/{chunk-CR817PBg.js → chunk-C5Sn2M5w.js} +1 -1
  20. package/browser/{chunk-D6nkbOg1.js → chunk-C9ckXqnn.js} +1 -1
  21. package/browser/{chunk-Qpb04pBJ.js → chunk-C9nbDemu.js} +1 -1
  22. package/browser/{chunk-B_Sx6nwb.js → chunk-CFD2_xIF.js} +1 -1
  23. package/browser/{chunk-PQu4_Hy2.js → chunk-CHP4jN9Z.js} +1 -1
  24. package/browser/{chunk-CakkML6n.js → chunk-CJKwH7Qd.js} +1 -1
  25. package/browser/{chunk-CP3b1EMm.js → chunk-CNz7zaTq.js} +1 -1
  26. package/browser/chunk-CPOlQJvd.js +1 -0
  27. package/browser/{chunk-ClCDsg8D.js → chunk-CPlR5wjp.js} +1 -1
  28. package/browser/{chunk-CJAdjOmi.js → chunk-CThn4VXH.js} +1 -1
  29. package/browser/{chunk-o2LY9dfG.js → chunk-CU4qkq0J.js} +1 -1
  30. package/browser/{chunk-BJld3zB5.js → chunk-CUv3B-19.js} +4 -4
  31. package/browser/{chunk-B13_C_P9.js → chunk-CYOKxOkd.js} +1 -1
  32. package/browser/{chunk-4uEZjTft.js → chunk-C_OF_Yht.js} +1 -1
  33. package/browser/{chunk-BGTRsbsl.js → chunk-CoPepxeH.js} +1 -1
  34. package/browser/{chunk-Buu9Jf-V.js → chunk-CtVgyQBm.js} +1 -1
  35. package/browser/{chunk-IYMfBoNU.js → chunk-CxXOCgTg.js} +1 -1
  36. package/browser/{chunk-Cjk-zAXy.js → chunk-CxnQWVA-.js} +1 -1
  37. package/browser/{chunk-py_Q_oQH.js → chunk-D1v8TfDX.js} +1 -1
  38. package/browser/{chunk--yaU4Sri.js → chunk-D2fwi0Hc.js} +1 -1
  39. package/browser/{chunk-t87lD8bQ.js → chunk-D4w4_Vsw.js} +1 -1
  40. package/browser/{chunk-CgNkwpQ7.js → chunk-DAxRjiEx.js} +1 -1
  41. package/browser/{chunk-DOHvMo5p.js → chunk-DBUR_gpS.js} +1 -1
  42. package/browser/{chunk-CxpHnwnx.js → chunk-DCkYfo8J.js} +1 -1
  43. package/browser/{chunk-BHiaH1Jm.js → chunk-DH88xB_s.js} +1 -1
  44. package/browser/{chunk-CfPmQ0Fw.js → chunk-DJaf3eTF.js} +1 -1
  45. package/browser/{chunk-D2zGvbD2.js → chunk-DNRaKymp.js} +1 -1
  46. package/browser/{chunk-BVmICoo4.js → chunk-DUCSH1q7.js} +1 -1
  47. package/browser/{chunk-WSA7xa0h.js → chunk-DXd3i3QM.js} +1 -1
  48. package/browser/{chunk-Bnj9Hkqy.js → chunk-DeRNr5E2.js} +1 -1
  49. package/browser/{chunk-DMUiJ7oP.js → chunk-Dipwr8Xn.js} +1 -1
  50. package/browser/{chunk-BqWEyotW.js → chunk-DkqPRNv1.js} +1 -1
  51. package/browser/{chunk-BfE6wTUj.js → chunk-DmbNv5OX.js} +1 -1
  52. package/browser/chunk-Dpnh8sS8.js +1 -0
  53. package/browser/{chunk-HHPhxe9B.js → chunk-DqDzCK-6.js} +1 -1
  54. package/browser/{chunk-DJjbZAaS.js → chunk-DsnIWrL1.js} +1 -1
  55. package/browser/{chunk-DMyGIjcZ.js → chunk-Duk6Ikve.js} +1 -1
  56. package/browser/{chunk-B17Inq8D.js → chunk-Dwp6OoVJ.js} +1 -1
  57. package/browser/{chunk-DV_7IOl_.js → chunk-DzcV-nhe.js} +1 -1
  58. package/browser/{chunk-DmaEv05C.js → chunk-GG036UVD.js} +1 -1
  59. package/browser/{chunk-CqJ7rGVY.js → chunk-I_PMkbKO.js} +1 -1
  60. package/browser/{chunk-4v7WiOTx.js → chunk-KoKdufNA.js} +1 -1
  61. package/browser/{chunk-D4dmZgr6.js → chunk-MecHdK4O.js} +1 -1
  62. package/browser/{chunk-BXCHG0wB.js → chunk-NBeBKSWy.js} +1 -1
  63. package/browser/{chunk-CXgj_KJY.js → chunk-NNu6xUAE.js} +1 -1
  64. package/browser/{chunk-DKQvH1hP.js → chunk-OuaG8E_K.js} +1 -1
  65. package/browser/{chunk-D26Y186i.js → chunk-afcQqtlz.js} +1 -1
  66. package/browser/{chunk-vL7dLM7S.js → chunk-cyIUrL9y.js} +1 -1
  67. package/browser/{chunk-BEdQqXxw.js → chunk-dNACuqx8.js} +1 -1
  68. package/browser/{chunk-BbPMe8u2.js → chunk-gaa6JiT9.js} +1 -1
  69. package/browser/{chunk-DVTNoWCQ.js → chunk-kUdwsgzt.js} +1 -1
  70. package/browser/index.html +1 -1
  71. package/browser/{main-YYHD6X7H.js → main-P72KGKGP.js} +13 -13
  72. package/package.json +1 -1
  73. package/browser/chunk-DaoWXYMw.js +0 -1
  74. package/browser/chunk-lX2E6ugr.js +0 -1
@@ -1 +1 @@
1
- import {g,B as gy,P,I as br,r as re,K as x}from'./main-YYHD6X7H.js';var d=class i{http=g(gy);projectState=g(P);promptsCache=new Map;getBaseUrl(){return `/api/projects/${this.projectState.getSelectedProjectIdOrThrow()}/prompts`}listPrompts(){return this.http.get(this.getBaseUrl())}getPromptsAutocomplete(t,e){let r=this.promptsCache.get(t);return r?br(this.filterPromptsForAutocomplete(r,e)):this.http.get(`/api/projects/${t}/prompts`).pipe(re(p=>(this.promptsCache.set(t,p),this.filterPromptsForAutocomplete(p,e))))}filterPromptsForAutocomplete(t,e){let r=e.toLowerCase();return t.filter(o=>o.name.toLowerCase().includes(r)||o.description.toLowerCase().includes(r)).map(o=>({name:o.name,description:o.description,parameterFormat:o.parameterFormat}))}clearCache(t){t?this.promptsCache.delete(t):this.promptsCache.clear();}getPrompt(t){return this.http.get(`${this.getBaseUrl()}/${t}`)}createPrompt(t){return this.http.post(this.getBaseUrl(),t).pipe(re(e=>(this.clearCache(this.projectState.getSelectedProjectId()??void 0),e)))}updatePrompt(t,e){return this.http.put(`${this.getBaseUrl()}/${t}`,e).pipe(re(r=>(this.clearCache(this.projectState.getSelectedProjectId()??void 0),r)))}deletePrompt(t){return this.http.delete(`${this.getBaseUrl()}/${t}`).pipe(re(e=>(this.clearCache(this.projectState.getSelectedProjectId()??void 0),e)))}enableWebhook(t){return this.http.post(`${this.getBaseUrl()}/${t}/webhook`,{})}disableWebhook(t){return this.http.delete(`${this.getBaseUrl()}/${t}/webhook`)}static \u0275fac=function(e){return new(e||i)};static \u0275prov=x({token:i,factory:i.\u0275fac,providedIn:"root"})};export{d};
1
+ import {g,B as gy,P,I as br,r as re,K as x}from'./main-P72KGKGP.js';var d=class i{http=g(gy);projectState=g(P);promptsCache=new Map;getBaseUrl(){return `/api/projects/${this.projectState.getSelectedProjectIdOrThrow()}/prompts`}listPrompts(){return this.http.get(this.getBaseUrl())}getPromptsAutocomplete(t,e){let r=this.promptsCache.get(t);return r?br(this.filterPromptsForAutocomplete(r,e)):this.http.get(`/api/projects/${t}/prompts`).pipe(re(p=>(this.promptsCache.set(t,p),this.filterPromptsForAutocomplete(p,e))))}filterPromptsForAutocomplete(t,e){let r=e.toLowerCase();return t.filter(o=>o.name.toLowerCase().includes(r)||o.description.toLowerCase().includes(r)).map(o=>({name:o.name,description:o.description,parameterFormat:o.parameterFormat}))}clearCache(t){t?this.promptsCache.delete(t):this.promptsCache.clear();}getPrompt(t){return this.http.get(`${this.getBaseUrl()}/${t}`)}createPrompt(t){return this.http.post(this.getBaseUrl(),t).pipe(re(e=>(this.clearCache(this.projectState.getSelectedProjectId()??void 0),e)))}updatePrompt(t,e){return this.http.put(`${this.getBaseUrl()}/${t}`,e).pipe(re(r=>(this.clearCache(this.projectState.getSelectedProjectId()??void 0),r)))}deletePrompt(t){return this.http.delete(`${this.getBaseUrl()}/${t}`).pipe(re(e=>(this.clearCache(this.projectState.getSelectedProjectId()??void 0),e)))}enableWebhook(t){return this.http.post(`${this.getBaseUrl()}/${t}/webhook`,{})}disableWebhook(t){return this.http.delete(`${this.getBaseUrl()}/${t}/webhook`)}static \u0275fac=function(e){return new(e||i)};static \u0275prov=x({token:i,factory:i.\u0275fac,providedIn:"root"})};export{d};
@@ -1,2 +1,2 @@
1
- import {O}from'./chunk-D92adUD_.js';import {R}from'./chunk-CR817PBg.js';import {N}from'./chunk-vL7dLM7S.js';import {g,G,bm as xm,C as Ce$1,W as Wi,T as TT,F,aD as Hy,r as re,b as U,j as jw,k as Cs,n as kg,m as hl,J as JC,o as aC,t as sI,u as cC,q as dC,ac as CC,v as fC,a9 as vC,w as zg,S as Sg,a8 as Kg,a5 as Dl,M as Mg,a3 as ZI,_ as _g,a6 as QI,aa as Cf,ab as Tf,cH as iC}from'./main-YYHD6X7H.js';import {l,I,f}from'./chunk-BJld3zB5.js';import {S as Se$1}from'./chunk-B13_C_P9.js';import'./chunk-CgNkwpQ7.js';import {o as z,k as _t,n as ni,J as Jn,Q as Qn,e as ei,Y as Ye,A as At,Z as Zn,l as Xn,E as En,p as An}from'./chunk-FMHkoXwM.js';import'./chunk-DaoWXYMw.js';import'./chunk-4uEZjTft.js';var D=(r,i)=>i.value;function se(r,i){r&1&&(Cs(0,"p",4),JC(1,"Loading\u2026"),hl());}function de(r,i){if(r&1){let e=vC();Cs(0,"button",18),kg("click",function(){let d=Cf(e).$implicit,_=CC(2);return Tf(_.setThemeVariant(d.value))}),Cs(1,"span",19),JC(2),hl(),Cs(3,"span",20),JC(4),hl()();}if(r&2){let e=i.$implicit,a=CC(2);zg("user-profile__theme-variant--active",a.themeVariant()===e.value),Sg("aria-pressed",a.themeVariant()===e.value),sI(2),Kg(e.label),sI(2),Kg(e.description);}}function _e(r,i){if(r&1){let e=vC();Cs(0,"button",21),kg("click",function(){let d=Cf(e).$implicit,_=CC(2);return Tf(_.setTheme(d.value))}),JC(1),hl();}if(r&2){let e=i.$implicit,a=CC(2);zg("user-profile__segmented-option--active",a.themeMode()===e.value),Sg("aria-pressed",a.themeMode()===e.value),sI(),Dl(" ",e.label," ");}}function ce(r,i){if(r&1){let e=vC();Cs(0,"button",21),kg("click",function(){let d=Cf(e).$implicit,_=CC(2);return Tf(_.setEnterKeyBehavior(d.value))}),JC(1),hl();}if(r&2){let e=i.$implicit,a=CC(2);zg("user-profile__segmented-option--active",a.enterKeyBehavior()===e.value),Sg("aria-pressed",a.enterKeyBehavior()===e.value),sI(),Dl(" ",e.label," ");}}function pe(r,i){if(r&1&&(Cs(0,"option",32),JC(1),hl()),r&2){let e=i.$implicit;_g("value",e.value),sI(),Kg(e.label);}}function me(r,i){if(r&1){let e=vC();Cs(0,"form",22),kg("ngSubmit",function(){Cf(e);let d=CC(2);return Tf(d.save())}),Cs(1,"div",5)(2,"h2",6),JC(3,"Identity"),hl(),Cs(4,"div",7)(5,"span",8),JC(6,"Email"),hl(),Cs(7,"span",23),JC(8),hl()(),Cs(9,"div",7)(10,"span",8),JC(11,"External ID"),hl(),Cs(12,"span",23),JC(13),hl()()(),Cs(14,"div",5)(15,"h2",6),JC(16,"Profile"),hl(),Cs(17,"div",7)(18,"label",24),JC(19,"First name"),hl(),Mg(20,"input",25),ZI(),hl(),Cs(21,"div",7)(22,"label",26),JC(23,"Last name"),hl(),Mg(24,"input",27),ZI(),hl(),Cs(25,"div",7)(26,"label",28),JC(27,"Bio"),hl(),Mg(28,"textarea",29),ZI(),hl(),Cs(29,"div",7)(30,"label",30),JC(31,"Language"),hl(),Cs(32,"select",31),dC(33,pe,2,2,"option",32,D),hl(),ZI(),hl()(),Cs(35,"div",33)(36,"button",34),JC(37),hl(),Cs(38,"button",35),kg("click",function(){Cf(e);let d=CC(2);return Tf(d.cancelEditing())}),JC(39,"Cancel"),hl()()();}if(r&2){let e=CC(),a=CC();_g("formGroup",a.form),sI(8),Kg(e.email),sI(5),Kg(e.externalId),sI(7),QI(),sI(4),QI(),sI(4),QI(),sI(4),QI(),sI(),fC(a.languageOptions),sI(3),_g("disabled",a.isSaving()),sI(),Dl(" ",a.isSaving()?"Saving\u2026":"Save changes"," ");}}function ue(r,i){r&1&&(Cs(0,"p",43),JC(1," No global configuration yet. Create one from the Integrations / AI Providers / Auth Settings pages of your namespaces. "),hl());}function fe(r,i){if(r&1){let e=vC();Cs(0,"span",50),JC(1,"Delete?"),hl(),Cs(2,"button",51),kg("click",function(){Cf(e);let d=CC().$implicit,_=CC(6);return Tf(_.confirmDelete(d))}),JC(3," Confirm "),hl(),Cs(4,"button",52),kg("click",function(){Cf(e);let d=CC(7);return Tf(d.cancelDelete())}),JC(5," Cancel "),hl();}}function ge(r,i){if(r&1){let e=vC();Cs(0,"button",52),kg("click",function(){Cf(e);let d=CC().$implicit,_=CC(6);return Tf(_.armDelete(d))}),JC(1," Delete "),hl();}}function Ce(r,i){if(r&1&&(Cs(0,"li",46)(1,"span",47),JC(2),hl(),Cs(3,"span",48),JC(4),hl(),aC(5,fe,6,0)(6,ge,2,0,"button",49),hl()),r&2){let e=i.$implicit,a=CC(6);sI(2),Kg(e.name),sI(2),Kg(e.subtitle),sI(),cC(a.isPendingDelete(e)?5:6);}}function ve(r,i){if(r&1&&(Cs(0,"h3",44),JC(1,"Integrations"),hl(),Cs(2,"ul",45),dC(3,Ce,7,3,"li",46,iC().trackEntry,true),hl()),r&2){let e=CC(5);sI(3),fC(e.recap().integrations);}}function xe(r,i){if(r&1){let e=vC();Cs(0,"span",50),JC(1,"Delete?"),hl(),Cs(2,"button",51),kg("click",function(){Cf(e);let d=CC().$implicit,_=CC(6);return Tf(_.confirmDelete(d))}),JC(3," Confirm "),hl(),Cs(4,"button",52),kg("click",function(){Cf(e);let d=CC(7);return Tf(d.cancelDelete())}),JC(5," Cancel "),hl();}}function be(r,i){if(r&1){let e=vC();Cs(0,"button",52),kg("click",function(){Cf(e);let d=CC().$implicit,_=CC(6);return Tf(_.armDelete(d))}),JC(1," Delete "),hl();}}function ye(r,i){if(r&1&&(Cs(0,"li",46)(1,"span",47),JC(2),hl(),Cs(3,"span",48),JC(4),hl(),aC(5,xe,6,0)(6,be,2,0,"button",49),hl()),r&2){let e=i.$implicit,a=CC(6);sI(2),Kg(e.name),sI(2),Kg(e.subtitle),sI(),cC(a.isPendingDelete(e)?5:6);}}function he(r,i){if(r&1&&(Cs(0,"h3",44),JC(1,"AI Providers"),hl(),Cs(2,"ul",45),dC(3,ye,7,3,"li",46,iC().trackEntry,true),hl()),r&2){let e=CC(5);sI(3),fC(e.recap().aiProviders);}}function Ee(r,i){if(r&1){let e=vC();Cs(0,"span",50),JC(1,"Delete?"),hl(),Cs(2,"button",51),kg("click",function(){Cf(e);let d=CC().$implicit,_=CC(6);return Tf(_.confirmDelete(d))}),JC(3," Confirm "),hl(),Cs(4,"button",52),kg("click",function(){Cf(e);let d=CC(7);return Tf(d.cancelDelete())}),JC(5," Cancel "),hl();}}function Pe(r,i){if(r&1){let e=vC();Cs(0,"button",52),kg("click",function(){Cf(e);let d=CC().$implicit,_=CC(6);return Tf(_.armDelete(d))}),JC(1," Delete "),hl();}}function Se(r,i){if(r&1&&(Cs(0,"li",46)(1,"span",47),JC(2),hl(),Cs(3,"span",48),JC(4),hl(),aC(5,Ee,6,0)(6,Pe,2,0,"button",49),hl()),r&2){let e=i.$implicit,a=CC(6);sI(2),Kg(e.name),sI(2),Kg(e.subtitle),sI(),cC(a.isPendingDelete(e)?5:6);}}function we(r,i){if(r&1&&(Cs(0,"h3",44),JC(1,"My global auth settings"),hl(),Cs(2,"ul",45),dC(3,Se,7,3,"li",46,iC().trackEntry,true),hl()),r&2){let e=CC(5);sI(3),fC(e.recap().authSettings);}}function ke(r,i){if(r&1&&(aC(0,ve,5,0),aC(1,he,5,0),aC(2,we,5,0)),r&2){let e=CC(4);cC(e.recap().integrations.length>0?0:-1),sI(),cC(e.recap().aiProviders.length>0?1:-1),sI(),cC(e.recap().authSettings.length>0?2:-1);}}function Me(r,i){if(r&1&&aC(0,ue,2,0,"p",43)(1,ke,3,3),r&2){let e=CC(3);cC(e.recap().total===0?0:1);}}function Oe(r,i){if(r&1){let e=vC();Cs(0,"div",17)(1,"div",5)(2,"h2",6),JC(3,"Identity"),hl(),Cs(4,"div",7)(5,"span",8),JC(6,"Email"),hl(),Cs(7,"span",36),JC(8),hl()(),Cs(9,"div",7)(10,"span",8),JC(11,"External ID"),hl(),Cs(12,"span",36),JC(13),hl()()(),Cs(14,"div",5)(15,"h2",6),JC(16,"Profile"),hl(),Cs(17,"div",7)(18,"span",8),JC(19,"First name"),hl(),Cs(20,"span",36),JC(21),hl()(),Cs(22,"div",7)(23,"span",8),JC(24,"Last name"),hl(),Cs(25,"span",36),JC(26),hl()(),Cs(27,"div",37)(28,"span",8),JC(29,"Bio"),hl(),Cs(30,"span",36),JC(31),hl()(),Cs(32,"div",7)(33,"span",8),JC(34,"Language"),hl(),Cs(35,"span",36),JC(36),hl()()(),Cs(37,"div",33)(38,"button",38),kg("click",function(){Cf(e);let d=CC(2);return Tf(d.startEditing())}),JC(39," Edit profile "),hl()(),Cs(40,"div",39)(41,"button",40),kg("click",function(){Cf(e);let d=CC(2);return Tf(d.toggleOverrides())}),Cs(42,"span",41),JC(43,"\u25B6"),hl(),JC(44," My global user configurations "),Cs(45,"span",42),JC(46),hl()(),aC(47,Me,2,1),hl()();}if(r&2){let e=CC(),a=CC();sI(8),Kg(e.email),sI(5),Kg(e.externalId),sI(8),Kg(e.firstname||"\u2014"),sI(5),Kg(e.lastname||"\u2014"),sI(5),Kg(e.bio||"\u2014"),sI(5),Kg(e.preferredLanguage||"\u2014"),sI(5),Sg("aria-expanded",a.isOverridesExpanded()),sI(),zg("user-profile__overrides-arrow--open",a.isOverridesExpanded()),sI(4),Dl("(",a.recap().total,")"),sI(),cC(a.isOverridesExpanded()?47:-1);}}function Ue(r,i){if(r&1&&(Cs(0,"div",5)(1,"h2",6),JC(2,"Appearance"),hl(),Cs(3,"div",7)(4,"span",8),JC(5,"Skin"),hl(),Cs(6,"div",9),dC(7,de,5,5,"button",10,D),hl()(),Cs(9,"div",7)(10,"span",8),JC(11,"Mode"),hl(),Cs(12,"div",11),dC(13,_e,2,4,"button",12,D),hl()()(),Cs(15,"div",5)(16,"h2",6),JC(17,"Composer"),hl(),Cs(18,"div",7)(19,"span",8),JC(20,"Enter key"),hl(),Cs(21,"div",13)(22,"div",14),dC(23,ce,2,4,"button",12,D),hl(),Cs(25,"p",15),JC(26,'In "New line" mode, press Ctrl or Cmd + Enter to send.'),hl()()()(),aC(27,me,40,5,"form",16)(28,Oe,48,11,"div",17)),r&2){let e=CC();sI(7),fC(e.themeVariantOptions),sI(6),fC(e.themeOptions),sI(10),fC(e.enterKeyOptions),sI(4),cC(e.isEditing()?27:28);}}function Te(r,i){r&1&&(Cs(0,"p",4),JC(1,"Unable to load profile."),hl());}var le=class r{userState=g(l);router=g(G);location=g(xm);destroyRef=g(Ce$1);integrationState=g(N);providerState=g(O);authSettingState=g(R);themePort=g(I);preferencesPort=g(f);isEditing=Wi(false);isLoading=Wi(false);isSaving=Wi(false);isOverridesExpanded=Wi(false);currentUser=this.userState.currentUser;theme=this.themePort.theme;themeMode=TT(()=>this.themePort.theme().mode);themeOptions=[{value:"light",label:"Light"},{value:"dark",label:"Dark"},{value:"system",label:"System"}];themeVariant=TT(()=>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"}];languageOptions=[{value:"",label:"No preference (English fallback)"},{value:"fr",label:"French"},{value:"de",label:"German"},{value:"es",label:"Spanish"},{value:"pt",label:"Portuguese"},{value:"it",label:"Italian"},{value:"nl",label:"Dutch"},{value:"pl",label:"Polish"},{value:"ja",label:"Japanese"},{value:"zh",label:"Chinese"}];form=new z({firstname:new _t("",{nonNullable:true}),lastname:new _t("",{nonNullable:true}),bio:new _t("",{nonNullable:true}),preferredLanguage:new _t("",{nonNullable:true})});recap=F(Hy([this.integrationState.userGlobal$,this.providerState.userGlobal$,this.authSettingState.userGlobal$]).pipe(re(([i,e,a])=>{let d=i.map(g=>({category:"integration",id:g.id??"",name:g.name,subtitle:g.integrationType})),_=e.map(g=>({category:"aiProvider",id:g.id??"",name:g.name,subtitle:g.apiType})),I=a.map(g=>({category:"authSetting",id:g.id??"",name:g.name,subtitle:g.authType}));return {integrations:d,aiProviders:_,authSettings:I,total:d.length+_.length+I.length}})),{initialValue:{integrations:[],aiProviders:[],authSettings:[],total:0}});ngOnInit(){if(this.currentUser()){this.syncFormFromState();return}this.isLoading.set(true),this.userState.loadMe().pipe(U(this.destroyRef)).subscribe({next:()=>{this.syncFormFromState(),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}startEditing(){this.syncFormFromState(),this.isEditing.set(true);}cancelEditing(){this.isEditing.set(false);}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(){if(this.isSaving())return;this.isSaving.set(true);let i=this.form.controls.preferredLanguage.value.trim();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,preferredLanguage:i||void 0}).pipe(U(this.destroyRef)).subscribe({next:()=>{this.isSaving.set(false),this.isEditing.set(false);},error:()=>this.isSaving.set(false)});}toggleOverrides(){this.isOverridesExpanded.update(i=>!i),this.pendingDeleteKey.set(null);}pendingDeleteKey=Wi(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"):i.category==="authSetting"?this.authSettingState.delete(i.id,"userGlobal"):this.providerState.delete(i.id,"userGlobal")).pipe(U(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??"",preferredLanguage:i.preferredLanguage??""});}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=jw({type:r,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"],["for","up-preferredLanguage",1,"user-profile__label"],["id","up-preferredLanguage","formControlName","preferredLanguage",1,"user-profile__input","user-profile__select"],[3,"value"],[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&&(Cs(0,"div",0)(1,"header",1)(2,"ds-icon-button",2),kg("action",function(){return a.goBack()}),hl(),Cs(3,"h1",3),JC(4,"My profile"),hl()(),aC(5,se,2,0,"p",4)(6,Ue,29,1)(7,Te,2,0,"p",4),hl()),e&2){let d;sI(5),cC(a.isLoading()?5:(d=a.currentUser())?6:7,d);}},dependencies:[ni,Jn,Qn,ei,Ye,At,Zn,Xn,En,An,Se$1],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__select[_ngcontent-%COMP%]{appearance:none;cursor:pointer;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right .75rem center;padding-right:2.25rem}.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)}`]})};
1
+ import {O}from'./chunk-BD91wN51.js';import {R}from'./chunk-C5Sn2M5w.js';import {N}from'./chunk-cyIUrL9y.js';import {g,G,bm as xm,C as Ce$1,W as Wi,T as TT,F,aD as Hy,r as re,b as U,j as jw,k as Cs,n as kg,m as hl,J as JC,o as aC,t as sI,u as cC,q as dC,ac as CC,v as fC,a9 as vC,w as zg,S as Sg,a8 as Kg,a5 as Dl,M as Mg,a3 as ZI,_ as _g,a6 as QI,aa as Cf,ab as Tf,cH as iC}from'./main-P72KGKGP.js';import {l,I,f}from'./chunk-CUv3B-19.js';import {S as Se$1}from'./chunk-CYOKxOkd.js';import'./chunk-DAxRjiEx.js';import {o as z,k as _t,n as ni,J as Jn,Q as Qn,e as ei,Y as Ye,A as At,Z as Zn,l as Xn,E as En,p as An}from'./chunk-BLF3w_iN.js';import'./chunk-Dpnh8sS8.js';import'./chunk-C_OF_Yht.js';var D=(r,i)=>i.value;function se(r,i){r&1&&(Cs(0,"p",4),JC(1,"Loading\u2026"),hl());}function de(r,i){if(r&1){let e=vC();Cs(0,"button",18),kg("click",function(){let d=Cf(e).$implicit,_=CC(2);return Tf(_.setThemeVariant(d.value))}),Cs(1,"span",19),JC(2),hl(),Cs(3,"span",20),JC(4),hl()();}if(r&2){let e=i.$implicit,a=CC(2);zg("user-profile__theme-variant--active",a.themeVariant()===e.value),Sg("aria-pressed",a.themeVariant()===e.value),sI(2),Kg(e.label),sI(2),Kg(e.description);}}function _e(r,i){if(r&1){let e=vC();Cs(0,"button",21),kg("click",function(){let d=Cf(e).$implicit,_=CC(2);return Tf(_.setTheme(d.value))}),JC(1),hl();}if(r&2){let e=i.$implicit,a=CC(2);zg("user-profile__segmented-option--active",a.themeMode()===e.value),Sg("aria-pressed",a.themeMode()===e.value),sI(),Dl(" ",e.label," ");}}function ce(r,i){if(r&1){let e=vC();Cs(0,"button",21),kg("click",function(){let d=Cf(e).$implicit,_=CC(2);return Tf(_.setEnterKeyBehavior(d.value))}),JC(1),hl();}if(r&2){let e=i.$implicit,a=CC(2);zg("user-profile__segmented-option--active",a.enterKeyBehavior()===e.value),Sg("aria-pressed",a.enterKeyBehavior()===e.value),sI(),Dl(" ",e.label," ");}}function pe(r,i){if(r&1&&(Cs(0,"option",32),JC(1),hl()),r&2){let e=i.$implicit;_g("value",e.value),sI(),Kg(e.label);}}function me(r,i){if(r&1){let e=vC();Cs(0,"form",22),kg("ngSubmit",function(){Cf(e);let d=CC(2);return Tf(d.save())}),Cs(1,"div",5)(2,"h2",6),JC(3,"Identity"),hl(),Cs(4,"div",7)(5,"span",8),JC(6,"Email"),hl(),Cs(7,"span",23),JC(8),hl()(),Cs(9,"div",7)(10,"span",8),JC(11,"External ID"),hl(),Cs(12,"span",23),JC(13),hl()()(),Cs(14,"div",5)(15,"h2",6),JC(16,"Profile"),hl(),Cs(17,"div",7)(18,"label",24),JC(19,"First name"),hl(),Mg(20,"input",25),ZI(),hl(),Cs(21,"div",7)(22,"label",26),JC(23,"Last name"),hl(),Mg(24,"input",27),ZI(),hl(),Cs(25,"div",7)(26,"label",28),JC(27,"Bio"),hl(),Mg(28,"textarea",29),ZI(),hl(),Cs(29,"div",7)(30,"label",30),JC(31,"Language"),hl(),Cs(32,"select",31),dC(33,pe,2,2,"option",32,D),hl(),ZI(),hl()(),Cs(35,"div",33)(36,"button",34),JC(37),hl(),Cs(38,"button",35),kg("click",function(){Cf(e);let d=CC(2);return Tf(d.cancelEditing())}),JC(39,"Cancel"),hl()()();}if(r&2){let e=CC(),a=CC();_g("formGroup",a.form),sI(8),Kg(e.email),sI(5),Kg(e.externalId),sI(7),QI(),sI(4),QI(),sI(4),QI(),sI(4),QI(),sI(),fC(a.languageOptions),sI(3),_g("disabled",a.isSaving()),sI(),Dl(" ",a.isSaving()?"Saving\u2026":"Save changes"," ");}}function ue(r,i){r&1&&(Cs(0,"p",43),JC(1," No global configuration yet. Create one from the Integrations / AI Providers / Auth Settings pages of your namespaces. "),hl());}function fe(r,i){if(r&1){let e=vC();Cs(0,"span",50),JC(1,"Delete?"),hl(),Cs(2,"button",51),kg("click",function(){Cf(e);let d=CC().$implicit,_=CC(6);return Tf(_.confirmDelete(d))}),JC(3," Confirm "),hl(),Cs(4,"button",52),kg("click",function(){Cf(e);let d=CC(7);return Tf(d.cancelDelete())}),JC(5," Cancel "),hl();}}function ge(r,i){if(r&1){let e=vC();Cs(0,"button",52),kg("click",function(){Cf(e);let d=CC().$implicit,_=CC(6);return Tf(_.armDelete(d))}),JC(1," Delete "),hl();}}function Ce(r,i){if(r&1&&(Cs(0,"li",46)(1,"span",47),JC(2),hl(),Cs(3,"span",48),JC(4),hl(),aC(5,fe,6,0)(6,ge,2,0,"button",49),hl()),r&2){let e=i.$implicit,a=CC(6);sI(2),Kg(e.name),sI(2),Kg(e.subtitle),sI(),cC(a.isPendingDelete(e)?5:6);}}function ve(r,i){if(r&1&&(Cs(0,"h3",44),JC(1,"Integrations"),hl(),Cs(2,"ul",45),dC(3,Ce,7,3,"li",46,iC().trackEntry,true),hl()),r&2){let e=CC(5);sI(3),fC(e.recap().integrations);}}function xe(r,i){if(r&1){let e=vC();Cs(0,"span",50),JC(1,"Delete?"),hl(),Cs(2,"button",51),kg("click",function(){Cf(e);let d=CC().$implicit,_=CC(6);return Tf(_.confirmDelete(d))}),JC(3," Confirm "),hl(),Cs(4,"button",52),kg("click",function(){Cf(e);let d=CC(7);return Tf(d.cancelDelete())}),JC(5," Cancel "),hl();}}function be(r,i){if(r&1){let e=vC();Cs(0,"button",52),kg("click",function(){Cf(e);let d=CC().$implicit,_=CC(6);return Tf(_.armDelete(d))}),JC(1," Delete "),hl();}}function ye(r,i){if(r&1&&(Cs(0,"li",46)(1,"span",47),JC(2),hl(),Cs(3,"span",48),JC(4),hl(),aC(5,xe,6,0)(6,be,2,0,"button",49),hl()),r&2){let e=i.$implicit,a=CC(6);sI(2),Kg(e.name),sI(2),Kg(e.subtitle),sI(),cC(a.isPendingDelete(e)?5:6);}}function he(r,i){if(r&1&&(Cs(0,"h3",44),JC(1,"AI Providers"),hl(),Cs(2,"ul",45),dC(3,ye,7,3,"li",46,iC().trackEntry,true),hl()),r&2){let e=CC(5);sI(3),fC(e.recap().aiProviders);}}function Ee(r,i){if(r&1){let e=vC();Cs(0,"span",50),JC(1,"Delete?"),hl(),Cs(2,"button",51),kg("click",function(){Cf(e);let d=CC().$implicit,_=CC(6);return Tf(_.confirmDelete(d))}),JC(3," Confirm "),hl(),Cs(4,"button",52),kg("click",function(){Cf(e);let d=CC(7);return Tf(d.cancelDelete())}),JC(5," Cancel "),hl();}}function Pe(r,i){if(r&1){let e=vC();Cs(0,"button",52),kg("click",function(){Cf(e);let d=CC().$implicit,_=CC(6);return Tf(_.armDelete(d))}),JC(1," Delete "),hl();}}function Se(r,i){if(r&1&&(Cs(0,"li",46)(1,"span",47),JC(2),hl(),Cs(3,"span",48),JC(4),hl(),aC(5,Ee,6,0)(6,Pe,2,0,"button",49),hl()),r&2){let e=i.$implicit,a=CC(6);sI(2),Kg(e.name),sI(2),Kg(e.subtitle),sI(),cC(a.isPendingDelete(e)?5:6);}}function we(r,i){if(r&1&&(Cs(0,"h3",44),JC(1,"My global auth settings"),hl(),Cs(2,"ul",45),dC(3,Se,7,3,"li",46,iC().trackEntry,true),hl()),r&2){let e=CC(5);sI(3),fC(e.recap().authSettings);}}function ke(r,i){if(r&1&&(aC(0,ve,5,0),aC(1,he,5,0),aC(2,we,5,0)),r&2){let e=CC(4);cC(e.recap().integrations.length>0?0:-1),sI(),cC(e.recap().aiProviders.length>0?1:-1),sI(),cC(e.recap().authSettings.length>0?2:-1);}}function Me(r,i){if(r&1&&aC(0,ue,2,0,"p",43)(1,ke,3,3),r&2){let e=CC(3);cC(e.recap().total===0?0:1);}}function Oe(r,i){if(r&1){let e=vC();Cs(0,"div",17)(1,"div",5)(2,"h2",6),JC(3,"Identity"),hl(),Cs(4,"div",7)(5,"span",8),JC(6,"Email"),hl(),Cs(7,"span",36),JC(8),hl()(),Cs(9,"div",7)(10,"span",8),JC(11,"External ID"),hl(),Cs(12,"span",36),JC(13),hl()()(),Cs(14,"div",5)(15,"h2",6),JC(16,"Profile"),hl(),Cs(17,"div",7)(18,"span",8),JC(19,"First name"),hl(),Cs(20,"span",36),JC(21),hl()(),Cs(22,"div",7)(23,"span",8),JC(24,"Last name"),hl(),Cs(25,"span",36),JC(26),hl()(),Cs(27,"div",37)(28,"span",8),JC(29,"Bio"),hl(),Cs(30,"span",36),JC(31),hl()(),Cs(32,"div",7)(33,"span",8),JC(34,"Language"),hl(),Cs(35,"span",36),JC(36),hl()()(),Cs(37,"div",33)(38,"button",38),kg("click",function(){Cf(e);let d=CC(2);return Tf(d.startEditing())}),JC(39," Edit profile "),hl()(),Cs(40,"div",39)(41,"button",40),kg("click",function(){Cf(e);let d=CC(2);return Tf(d.toggleOverrides())}),Cs(42,"span",41),JC(43,"\u25B6"),hl(),JC(44," My global user configurations "),Cs(45,"span",42),JC(46),hl()(),aC(47,Me,2,1),hl()();}if(r&2){let e=CC(),a=CC();sI(8),Kg(e.email),sI(5),Kg(e.externalId),sI(8),Kg(e.firstname||"\u2014"),sI(5),Kg(e.lastname||"\u2014"),sI(5),Kg(e.bio||"\u2014"),sI(5),Kg(e.preferredLanguage||"\u2014"),sI(5),Sg("aria-expanded",a.isOverridesExpanded()),sI(),zg("user-profile__overrides-arrow--open",a.isOverridesExpanded()),sI(4),Dl("(",a.recap().total,")"),sI(),cC(a.isOverridesExpanded()?47:-1);}}function Ue(r,i){if(r&1&&(Cs(0,"div",5)(1,"h2",6),JC(2,"Appearance"),hl(),Cs(3,"div",7)(4,"span",8),JC(5,"Skin"),hl(),Cs(6,"div",9),dC(7,de,5,5,"button",10,D),hl()(),Cs(9,"div",7)(10,"span",8),JC(11,"Mode"),hl(),Cs(12,"div",11),dC(13,_e,2,4,"button",12,D),hl()()(),Cs(15,"div",5)(16,"h2",6),JC(17,"Composer"),hl(),Cs(18,"div",7)(19,"span",8),JC(20,"Enter key"),hl(),Cs(21,"div",13)(22,"div",14),dC(23,ce,2,4,"button",12,D),hl(),Cs(25,"p",15),JC(26,'In "New line" mode, press Ctrl or Cmd + Enter to send.'),hl()()()(),aC(27,me,40,5,"form",16)(28,Oe,48,11,"div",17)),r&2){let e=CC();sI(7),fC(e.themeVariantOptions),sI(6),fC(e.themeOptions),sI(10),fC(e.enterKeyOptions),sI(4),cC(e.isEditing()?27:28);}}function Te(r,i){r&1&&(Cs(0,"p",4),JC(1,"Unable to load profile."),hl());}var le=class r{userState=g(l);router=g(G);location=g(xm);destroyRef=g(Ce$1);integrationState=g(N);providerState=g(O);authSettingState=g(R);themePort=g(I);preferencesPort=g(f);isEditing=Wi(false);isLoading=Wi(false);isSaving=Wi(false);isOverridesExpanded=Wi(false);currentUser=this.userState.currentUser;theme=this.themePort.theme;themeMode=TT(()=>this.themePort.theme().mode);themeOptions=[{value:"light",label:"Light"},{value:"dark",label:"Dark"},{value:"system",label:"System"}];themeVariant=TT(()=>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"}];languageOptions=[{value:"",label:"No preference (English fallback)"},{value:"fr",label:"French"},{value:"de",label:"German"},{value:"es",label:"Spanish"},{value:"pt",label:"Portuguese"},{value:"it",label:"Italian"},{value:"nl",label:"Dutch"},{value:"pl",label:"Polish"},{value:"ja",label:"Japanese"},{value:"zh",label:"Chinese"}];form=new z({firstname:new _t("",{nonNullable:true}),lastname:new _t("",{nonNullable:true}),bio:new _t("",{nonNullable:true}),preferredLanguage:new _t("",{nonNullable:true})});recap=F(Hy([this.integrationState.userGlobal$,this.providerState.userGlobal$,this.authSettingState.userGlobal$]).pipe(re(([i,e,a])=>{let d=i.map(g=>({category:"integration",id:g.id??"",name:g.name,subtitle:g.integrationType})),_=e.map(g=>({category:"aiProvider",id:g.id??"",name:g.name,subtitle:g.apiType})),I=a.map(g=>({category:"authSetting",id:g.id??"",name:g.name,subtitle:g.authType}));return {integrations:d,aiProviders:_,authSettings:I,total:d.length+_.length+I.length}})),{initialValue:{integrations:[],aiProviders:[],authSettings:[],total:0}});ngOnInit(){if(this.currentUser()){this.syncFormFromState();return}this.isLoading.set(true),this.userState.loadMe().pipe(U(this.destroyRef)).subscribe({next:()=>{this.syncFormFromState(),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}startEditing(){this.syncFormFromState(),this.isEditing.set(true);}cancelEditing(){this.isEditing.set(false);}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(){if(this.isSaving())return;this.isSaving.set(true);let i=this.form.controls.preferredLanguage.value.trim();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,preferredLanguage:i||void 0}).pipe(U(this.destroyRef)).subscribe({next:()=>{this.isSaving.set(false),this.isEditing.set(false);},error:()=>this.isSaving.set(false)});}toggleOverrides(){this.isOverridesExpanded.update(i=>!i),this.pendingDeleteKey.set(null);}pendingDeleteKey=Wi(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"):i.category==="authSetting"?this.authSettingState.delete(i.id,"userGlobal"):this.providerState.delete(i.id,"userGlobal")).pipe(U(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??"",preferredLanguage:i.preferredLanguage??""});}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=jw({type:r,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"],["for","up-preferredLanguage",1,"user-profile__label"],["id","up-preferredLanguage","formControlName","preferredLanguage",1,"user-profile__input","user-profile__select"],[3,"value"],[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&&(Cs(0,"div",0)(1,"header",1)(2,"ds-icon-button",2),kg("action",function(){return a.goBack()}),hl(),Cs(3,"h1",3),JC(4,"My profile"),hl()(),aC(5,se,2,0,"p",4)(6,Ue,29,1)(7,Te,2,0,"p",4),hl()),e&2){let d;sI(5),cC(a.isLoading()?5:(d=a.currentUser())?6:7,d);}},dependencies:[ni,Jn,Qn,ei,Ye,At,Zn,Xn,En,An,Se$1],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__select[_ngcontent-%COMP%]{appearance:none;cursor:pointer;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236e6e73' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right .75rem center;padding-right:2.25rem}.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)}`]})};
2
2
  export{le as UserProfileComponent};
@@ -1 +1 @@
1
- import {Z as Zn,S as Se}from'./chunk-B13_C_P9.js';import {cb as JB,cc as XB,W as Wi,T as TT,j as jw,k as Cs,J as JC,m as hl,o as aC,t as sI,a8 as Kg,u as cC,ac as CC,S as Sg,a5 as Dl,a9 as vC,n as kg,_ as _g,aa as Cf,ab as Tf}from'./main-YYHD6X7H.js';function k(t,r){if(t&1&&(Cs(0,"span",4),JC(1),hl()),t&2){let e=CC();Sg("data-variant",e.badge().variant)("aria-label",e.badge().ariaLabel),sI(),Dl(" ",e.badge().label," ");}}function I(t,r){if(t&1){let e=vC();Cs(0,"span",7),JC(1,"Delete?"),hl(),Cs(2,"ds-icon-button",8),kg("action",function(){Cf(e);let l=CC();return Tf(l.onDeleteConfirmed())}),hl(),Cs(3,"ds-icon-button",9),kg("action",function(){Cf(e);let l=CC();return Tf(l.onDeleteCancelled())}),hl();}}function P(t,r){if(t&1){let e=vC();Cs(0,"ds-kebab-menu",12),kg("itemSelected",function(l){Cf(e);let A=CC(2);return Tf(A.onMenuAction(l))}),hl();}if(t&2){let e=CC(2);_g("items",e.menuItems());}}function R(t,r){if(t&1){let e=vC();Cs(0,"ds-icon-button",10),kg("action",function(){Cf(e);let l=CC();return Tf(l.onDuplicate())}),hl(),aC(1,P,1,1,"ds-kebab-menu",11);}if(t&2){let e=CC();sI(),cC(e.readOnly()?-1:1);}}var E=Object.freeze({platform:{label:"PLATFORM",ariaLabel:"Configuration plateforme (lecture seule)",variant:"neutral"},namespace:{label:"NS",ariaLabel:"Configuration partag\xE9e du namespace",variant:"neutral"},userOnNs:{label:"USER \xD7 NS",ariaLabel:"Configuration utilisateur sur ce namespace",variant:"info"},userGlobal:{label:"USER GLOBAL",ariaLabel:"Configuration utilisateur globale",variant:"warning"}}),O=class t{config=JB.required();scope=JB.required();readOnly=JB(false);showBadge=JB(true);editRequested=XB();deleteRequested=XB();duplicateRequested=XB();pendingDelete=Wi(false);badge=TT(()=>E[this.scope()]);menuItems=TT(()=>[{key:"edit",label:"Edit auth setting",icon:"edit"},{key:"delete",label:"Delete auth setting",icon:"delete",variant:"danger"}]);onMenuAction(r){switch(r){case "edit":this.editRequested.emit(this.config());break;case "delete":this.pendingDelete.set(true);break}}onDuplicate(){this.duplicateRequested.emit(this.config());}onDeleteConfirmed(){this.pendingDelete.set(false),this.deleteRequested.emit(this.config());}onDeleteCancelled(){this.pendingDelete.set(false);}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=jw({type:t,selectors:[["agentos-auth-setting-item"]],inputs:{config:[1,"config"],scope:[1,"scope"],readOnly:[1,"readOnly"],showBadge:[1,"showBadge"]},outputs:{editRequested:"editRequested",deleteRequested:"deleteRequested",duplicateRequested:"duplicateRequested"},decls:11,vars:4,consts:[["role","listitem",1,"auth-setting-item"],[1,"auth-setting-item__body"],[1,"auth-setting-item__heading"],[1,"auth-setting-item__name"],[1,"auth-setting-item__badge"],[1,"auth-setting-item__type"],[1,"auth-setting-item__actions"],[1,"auth-setting-item__confirm-label"],["icon","check","variant","danger","title","Confirm deletion",3,"action"],["icon","close","title","Cancel deletion",3,"action"],["icon","content_copy","title","Duplicate this auth setting",3,"action"],[3,"items"],[3,"itemSelected","items"]],template:function(e,o){e&1&&(Cs(0,"div",0)(1,"div",1)(2,"div",2)(3,"span",3),JC(4),hl(),aC(5,k,2,3,"span",4),hl(),Cs(6,"span",5),JC(7),hl()(),Cs(8,"div",6),aC(9,I,4,0)(10,R,2,1),hl()()),e&2&&(sI(4),Kg(o.config().name),sI(),cC(o.showBadge()?5:-1),sI(2),Kg(o.config().authType),sI(2),cC(o.pendingDelete()?9:10));},dependencies:[Zn,Se],styles:[".auth-setting-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.75rem 1rem;border-radius:10px;border:1px solid var(--color-border);background:var(--glass-bg);-webkit-backdrop-filter:var(--glass-backdrop-blur);backdrop-filter:var(--glass-backdrop-blur);transition:background .15s ease,border-color .15s ease}.auth-setting-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover);border-color:var(--color-primary)}.auth-setting-item__body[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:.2rem;min-width:0}.auth-setting-item__heading[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;min-width:0}.auth-setting-item__name[_ngcontent-%COMP%]{font-size:.95rem;font-weight:500;color:var(--color-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.auth-setting-item__badge[_ngcontent-%COMP%]{flex-shrink:0;font-size:.65rem;font-weight:600;letter-spacing:.04em;text-transform:uppercase;padding:.1rem .4rem;border-radius:4px;line-height:1.2}.auth-setting-item__badge[data-variant=neutral][_ngcontent-%COMP%]{background:var(--color-bg-secondary);color:var(--color-text-secondary)}.auth-setting-item__badge[data-variant=info][_ngcontent-%COMP%]{background:color-mix(in srgb,var(--color-info) 15%,transparent);color:var(--color-info)}.auth-setting-item__badge[data-variant=warning][_ngcontent-%COMP%]{background:color-mix(in srgb,var(--color-warning) 15%,transparent);color:var(--color-warning)}.auth-setting-item__type[_ngcontent-%COMP%]{font-size:.78rem;color:var(--color-text-secondary);font-family:monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.auth-setting-item__actions[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;gap:.125rem;opacity:0;transition:opacity .15s ease}.auth-setting-item[_ngcontent-%COMP%]:hover .auth-setting-item__actions[_ngcontent-%COMP%], .auth-setting-item[_ngcontent-%COMP%]:focus-within .auth-setting-item__actions[_ngcontent-%COMP%]{opacity:1}.auth-setting-item__confirm-label[_ngcontent-%COMP%]{font-size:.8rem;font-weight:500;color:var(--color-error);margin-right:.25rem;white-space:nowrap}"]})};export{O};
1
+ import {Z as Zn,S as Se}from'./chunk-CYOKxOkd.js';import {cb as JB,cc as XB,W as Wi,T as TT,j as jw,k as Cs,J as JC,m as hl,o as aC,t as sI,a8 as Kg,u as cC,ac as CC,S as Sg,a5 as Dl,a9 as vC,n as kg,_ as _g,aa as Cf,ab as Tf}from'./main-P72KGKGP.js';function k(t,r){if(t&1&&(Cs(0,"span",4),JC(1),hl()),t&2){let e=CC();Sg("data-variant",e.badge().variant)("aria-label",e.badge().ariaLabel),sI(),Dl(" ",e.badge().label," ");}}function I(t,r){if(t&1){let e=vC();Cs(0,"span",7),JC(1,"Delete?"),hl(),Cs(2,"ds-icon-button",8),kg("action",function(){Cf(e);let l=CC();return Tf(l.onDeleteConfirmed())}),hl(),Cs(3,"ds-icon-button",9),kg("action",function(){Cf(e);let l=CC();return Tf(l.onDeleteCancelled())}),hl();}}function P(t,r){if(t&1){let e=vC();Cs(0,"ds-kebab-menu",12),kg("itemSelected",function(l){Cf(e);let A=CC(2);return Tf(A.onMenuAction(l))}),hl();}if(t&2){let e=CC(2);_g("items",e.menuItems());}}function R(t,r){if(t&1){let e=vC();Cs(0,"ds-icon-button",10),kg("action",function(){Cf(e);let l=CC();return Tf(l.onDuplicate())}),hl(),aC(1,P,1,1,"ds-kebab-menu",11);}if(t&2){let e=CC();sI(),cC(e.readOnly()?-1:1);}}var E=Object.freeze({platform:{label:"PLATFORM",ariaLabel:"Configuration plateforme (lecture seule)",variant:"neutral"},namespace:{label:"NS",ariaLabel:"Configuration partag\xE9e du namespace",variant:"neutral"},userOnNs:{label:"USER \xD7 NS",ariaLabel:"Configuration utilisateur sur ce namespace",variant:"info"},userGlobal:{label:"USER GLOBAL",ariaLabel:"Configuration utilisateur globale",variant:"warning"}}),O=class t{config=JB.required();scope=JB.required();readOnly=JB(false);showBadge=JB(true);editRequested=XB();deleteRequested=XB();duplicateRequested=XB();pendingDelete=Wi(false);badge=TT(()=>E[this.scope()]);menuItems=TT(()=>[{key:"edit",label:"Edit auth setting",icon:"edit"},{key:"delete",label:"Delete auth setting",icon:"delete",variant:"danger"}]);onMenuAction(r){switch(r){case "edit":this.editRequested.emit(this.config());break;case "delete":this.pendingDelete.set(true);break}}onDuplicate(){this.duplicateRequested.emit(this.config());}onDeleteConfirmed(){this.pendingDelete.set(false),this.deleteRequested.emit(this.config());}onDeleteCancelled(){this.pendingDelete.set(false);}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=jw({type:t,selectors:[["agentos-auth-setting-item"]],inputs:{config:[1,"config"],scope:[1,"scope"],readOnly:[1,"readOnly"],showBadge:[1,"showBadge"]},outputs:{editRequested:"editRequested",deleteRequested:"deleteRequested",duplicateRequested:"duplicateRequested"},decls:11,vars:4,consts:[["role","listitem",1,"auth-setting-item"],[1,"auth-setting-item__body"],[1,"auth-setting-item__heading"],[1,"auth-setting-item__name"],[1,"auth-setting-item__badge"],[1,"auth-setting-item__type"],[1,"auth-setting-item__actions"],[1,"auth-setting-item__confirm-label"],["icon","check","variant","danger","title","Confirm deletion",3,"action"],["icon","close","title","Cancel deletion",3,"action"],["icon","content_copy","title","Duplicate this auth setting",3,"action"],[3,"items"],[3,"itemSelected","items"]],template:function(e,o){e&1&&(Cs(0,"div",0)(1,"div",1)(2,"div",2)(3,"span",3),JC(4),hl(),aC(5,k,2,3,"span",4),hl(),Cs(6,"span",5),JC(7),hl()(),Cs(8,"div",6),aC(9,I,4,0)(10,R,2,1),hl()()),e&2&&(sI(4),Kg(o.config().name),sI(),cC(o.showBadge()?5:-1),sI(2),Kg(o.config().authType),sI(2),cC(o.pendingDelete()?9:10));},dependencies:[Zn,Se],styles:[".auth-setting-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.75rem 1rem;border-radius:10px;border:1px solid var(--color-border);background:var(--glass-bg);-webkit-backdrop-filter:var(--glass-backdrop-blur);backdrop-filter:var(--glass-backdrop-blur);transition:background .15s ease,border-color .15s ease}.auth-setting-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover);border-color:var(--color-primary)}.auth-setting-item__body[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:.2rem;min-width:0}.auth-setting-item__heading[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;min-width:0}.auth-setting-item__name[_ngcontent-%COMP%]{font-size:.95rem;font-weight:500;color:var(--color-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.auth-setting-item__badge[_ngcontent-%COMP%]{flex-shrink:0;font-size:.65rem;font-weight:600;letter-spacing:.04em;text-transform:uppercase;padding:.1rem .4rem;border-radius:4px;line-height:1.2}.auth-setting-item__badge[data-variant=neutral][_ngcontent-%COMP%]{background:var(--color-bg-secondary);color:var(--color-text-secondary)}.auth-setting-item__badge[data-variant=info][_ngcontent-%COMP%]{background:color-mix(in srgb,var(--color-info) 15%,transparent);color:var(--color-info)}.auth-setting-item__badge[data-variant=warning][_ngcontent-%COMP%]{background:color-mix(in srgb,var(--color-warning) 15%,transparent);color:var(--color-warning)}.auth-setting-item__type[_ngcontent-%COMP%]{font-size:.78rem;color:var(--color-text-secondary);font-family:monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.auth-setting-item__actions[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;gap:.125rem;opacity:0;transition:opacity .15s ease}.auth-setting-item[_ngcontent-%COMP%]:hover .auth-setting-item__actions[_ngcontent-%COMP%], .auth-setting-item[_ngcontent-%COMP%]:focus-within .auth-setting-item__actions[_ngcontent-%COMP%]{opacity:1}.auth-setting-item__confirm-label[_ngcontent-%COMP%]{font-size:.8rem;font-weight:500;color:var(--color-error);margin-right:.25rem;white-space:nowrap}"]})};export{O};
@@ -1,4 +1,4 @@
1
- import {b as Qe}from'./chunk-CgNkwpQ7.js';import {D as D$1,i as y}from'./chunk-FMHkoXwM.js';import {g,B as gy,bU as Fd,K as x,aL as wo,aM as Zn,aO as wt,az as Xt,bw as St,bs as bl,aW as C,aS as K,al as vt,aX as D,bx as on,by as dm,aT as Ut,j as jw,bz as Oi,aC as bu,a_ as rb,bA as bC,k as Cs,n as kg,M as Mg,m as hl,o as aC,bB as SC,A as AC,_ as _g,t as sI,w as zg,S as Sg,u as cC,b5 as lT,bC as _i,c8 as ob,c0 as Rg,b$ as UC,x as jg,y as MC,N as NC,c9 as Pf}from'./main-YYHD6X7H.js';var ae=["switch"],ie=["*"];function ne(a,s){a&1&&(Cs(0,"span",11),Pf(),Cs(1,"svg",13),Mg(2,"path",14),hl(),Cs(3,"svg",15),Mg(4,"path",16),hl()());}var ce=new C("mat-slide-toggle-default-options",{providedIn:"root",factory:()=>({disableToggleValue:false,hideIcon:false,disabledInteractive:false})}),b=class{source;checked;constructor(s,e){this.source=s,this.checked=e;}},se=(()=>{class a{_elementRef=g(Xt);_focusMonitor=g(St);_changeDetectorRef=g(bl);defaults=g(ce);_onChange=e=>{};_onTouched=()=>{};_validatorOnChange=()=>{};_uniqueId;_checked=false;_createChangeEvent(e){return new b(this,e)}_labelId;get buttonId(){return `${this.id||this._uniqueId}-button`}_switchElement;focus(){this._switchElement.nativeElement.focus();}_noopAnimations=K();_focused=false;name=null;id;labelPosition="after";ariaLabel=null;ariaLabelledby=null;ariaDescribedby;required=false;color;disabled=false;disableRipple=false;tabIndex=0;get checked(){return this._checked}set checked(e){this._checked=e,this._changeDetectorRef.markForCheck();}hideIcon;disabledInteractive;change=new vt;toggleChange=new vt;get inputId(){return `${this.id||this._uniqueId}-input`}constructor(){g(D).load(on);let e=g(new dm("tabindex"),{optional:true}),i=this.defaults;this.tabIndex=e==null?0:parseInt(e)||0,this.color=i.color||"accent",this.id=this._uniqueId=g(Ut).getId("mat-mdc-slide-toggle-"),this.hideIcon=i.hideIcon??false,this.disabledInteractive=i.disabledInteractive??false,this._labelId=this._uniqueId+"-label";}ngAfterContentInit(){this._focusMonitor.monitor(this._elementRef,true).subscribe(e=>{e==="keyboard"||e==="program"?(this._focused=true,this._changeDetectorRef.markForCheck()):e||Promise.resolve().then(()=>{this._focused=false,this._onTouched(),this._changeDetectorRef.markForCheck();});});}ngOnChanges(e){e.required&&this._validatorOnChange();}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef);}writeValue(e){this.checked=!!e;}registerOnChange(e){this._onChange=e;}registerOnTouched(e){this._onTouched=e;}validate(e){return this.required&&e.value!==true?{required:true}:null}registerOnValidatorChange(e){this._validatorOnChange=e;}setDisabledState(e){this.disabled=e,this._changeDetectorRef.markForCheck();}toggle(){this.checked=!this.checked,this._onChange(this.checked);}_emitChangeEvent(){this._onChange(this.checked),this.change.emit(this._createChangeEvent(this.checked));}_handleClick(){this.disabled||(this.toggleChange.emit(),this.defaults.disableToggleValue||(this.checked=!this.checked,this._onChange(this.checked),this.change.emit(new b(this,this.checked))));}_getAriaLabelledBy(){return this.ariaLabelledby?this.ariaLabelledby:this.ariaLabel?null:this._labelId}static \u0275fac=function(i){return new(i||a)};static \u0275cmp=jw({type:a,selectors:[["mat-slide-toggle"]],viewQuery:function(i,t){if(i&1&&jg(ae,5),i&2){let r;MC(r=NC())&&(t._switchElement=r.first);}},hostAttrs:[1,"mat-mdc-slide-toggle"],hostVars:13,hostBindings:function(i,t){i&2&&(Rg("id",t.id),Sg("tabindex",null)("aria-label",null)("name",null)("aria-labelledby",null),UC(t.color?"mat-"+t.color:""),zg("mat-mdc-slide-toggle-focused",t._focused)("mat-mdc-slide-toggle-checked",t.checked)("_mat-animation-noopable",t._noopAnimations));},inputs:{name:"name",id:"id",labelPosition:"labelPosition",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],required:[2,"required","required",rb],color:"color",disabled:[2,"disabled","disabled",rb],disableRipple:[2,"disableRipple","disableRipple",rb],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:ob(e)],checked:[2,"checked","checked",rb],hideIcon:[2,"hideIcon","hideIcon",rb],disabledInteractive:[2,"disabledInteractive","disabledInteractive",rb]},outputs:{change:"change",toggleChange:"toggleChange"},exportAs:["matSlideToggle"],features:[lT([{provide:D$1,useExisting:_i(()=>a),multi:true},{provide:y,useExisting:a,multi:true}]),bu],ngContentSelectors:ie,decls:14,vars:27,consts:[["switch",""],["mat-internal-form-field","",3,"labelPosition"],["role","switch","type","button",1,"mdc-switch",3,"click","tabIndex","disabled"],[1,"mat-mdc-slide-toggle-touch-target"],[1,"mdc-switch__track"],[1,"mdc-switch__handle-track"],[1,"mdc-switch__handle"],[1,"mdc-switch__shadow"],[1,"mdc-elevation-overlay"],[1,"mdc-switch__ripple"],["mat-ripple","",1,"mat-mdc-slide-toggle-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-switch__icons"],[1,"mdc-label",3,"click","for"],["viewBox","0 0 24 24","aria-hidden","true",1,"mdc-switch__icon","mdc-switch__icon--on"],["d","M19.69,5.23L8.96,15.96l-4.23-4.23L2.96,13.5l6,6L21.46,7L19.69,5.23z"],["viewBox","0 0 24 24","aria-hidden","true",1,"mdc-switch__icon","mdc-switch__icon--off"],["d","M20 13H4v-2h16v2z"]],template:function(i,t){if(i&1&&(bC(),Cs(0,"div",1)(1,"button",2,0),kg("click",function(){return t._handleClick()}),Mg(3,"div",3)(4,"span",4),Cs(5,"span",5)(6,"span",6)(7,"span",7),Mg(8,"span",8),hl(),Cs(9,"span",9),Mg(10,"span",10),hl(),aC(11,ne,5,0,"span",11),hl()()(),Cs(12,"label",12),kg("click",function(ee){return ee.stopPropagation()}),SC(13),hl()()),i&2){let r=AC(2);_g("labelPosition",t.labelPosition),sI(),zg("mdc-switch--selected",t.checked)("mdc-switch--unselected",!t.checked)("mdc-switch--checked",t.checked)("mdc-switch--disabled",t.disabled)("mat-mdc-slide-toggle-disabled-interactive",t.disabledInteractive),_g("tabIndex",t.disabled&&!t.disabledInteractive?-1:t.tabIndex)("disabled",t.disabled&&!t.disabledInteractive),Sg("id",t.buttonId)("name",t.name)("aria-label",t.ariaLabel)("aria-labelledby",t._getAriaLabelledBy())("aria-describedby",t.ariaDescribedby)("aria-required",t.required||null)("aria-checked",t.checked)("aria-disabled",t.disabled&&t.disabledInteractive?"true":null),sI(9),_g("matRippleTrigger",r)("matRippleDisabled",t.disableRipple||t.disabled)("matRippleCentered",true),sI(),cC(t.hideIcon?-1:11),sI(),_g("for",t.buttonId),Sg("id",t._labelId);}},dependencies:[Oi,Qe],styles:[`.mdc-switch {
1
+ import {b as Qe}from'./chunk-DAxRjiEx.js';import {D as D$1,i as y}from'./chunk-BLF3w_iN.js';import {g,B as gy,bU as Fd,K as x,aL as wo,aM as Zn,aO as wt,az as Xt,bw as St,bs as bl,aW as C,aS as K,al as vt,aX as D,bx as on,by as dm,aT as Ut,j as jw,bz as Oi,aC as bu,a_ as rb,bA as bC,k as Cs,n as kg,M as Mg,m as hl,o as aC,bB as SC,A as AC,_ as _g,t as sI,w as zg,S as Sg,u as cC,b5 as lT,bC as _i,c8 as ob,c0 as Rg,b$ as UC,x as jg,y as MC,N as NC,c9 as Pf}from'./main-P72KGKGP.js';var ae=["switch"],ie=["*"];function ne(a,s){a&1&&(Cs(0,"span",11),Pf(),Cs(1,"svg",13),Mg(2,"path",14),hl(),Cs(3,"svg",15),Mg(4,"path",16),hl()());}var ce=new C("mat-slide-toggle-default-options",{providedIn:"root",factory:()=>({disableToggleValue:false,hideIcon:false,disabledInteractive:false})}),b=class{source;checked;constructor(s,e){this.source=s,this.checked=e;}},se=(()=>{class a{_elementRef=g(Xt);_focusMonitor=g(St);_changeDetectorRef=g(bl);defaults=g(ce);_onChange=e=>{};_onTouched=()=>{};_validatorOnChange=()=>{};_uniqueId;_checked=false;_createChangeEvent(e){return new b(this,e)}_labelId;get buttonId(){return `${this.id||this._uniqueId}-button`}_switchElement;focus(){this._switchElement.nativeElement.focus();}_noopAnimations=K();_focused=false;name=null;id;labelPosition="after";ariaLabel=null;ariaLabelledby=null;ariaDescribedby;required=false;color;disabled=false;disableRipple=false;tabIndex=0;get checked(){return this._checked}set checked(e){this._checked=e,this._changeDetectorRef.markForCheck();}hideIcon;disabledInteractive;change=new vt;toggleChange=new vt;get inputId(){return `${this.id||this._uniqueId}-input`}constructor(){g(D).load(on);let e=g(new dm("tabindex"),{optional:true}),i=this.defaults;this.tabIndex=e==null?0:parseInt(e)||0,this.color=i.color||"accent",this.id=this._uniqueId=g(Ut).getId("mat-mdc-slide-toggle-"),this.hideIcon=i.hideIcon??false,this.disabledInteractive=i.disabledInteractive??false,this._labelId=this._uniqueId+"-label";}ngAfterContentInit(){this._focusMonitor.monitor(this._elementRef,true).subscribe(e=>{e==="keyboard"||e==="program"?(this._focused=true,this._changeDetectorRef.markForCheck()):e||Promise.resolve().then(()=>{this._focused=false,this._onTouched(),this._changeDetectorRef.markForCheck();});});}ngOnChanges(e){e.required&&this._validatorOnChange();}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef);}writeValue(e){this.checked=!!e;}registerOnChange(e){this._onChange=e;}registerOnTouched(e){this._onTouched=e;}validate(e){return this.required&&e.value!==true?{required:true}:null}registerOnValidatorChange(e){this._validatorOnChange=e;}setDisabledState(e){this.disabled=e,this._changeDetectorRef.markForCheck();}toggle(){this.checked=!this.checked,this._onChange(this.checked);}_emitChangeEvent(){this._onChange(this.checked),this.change.emit(this._createChangeEvent(this.checked));}_handleClick(){this.disabled||(this.toggleChange.emit(),this.defaults.disableToggleValue||(this.checked=!this.checked,this._onChange(this.checked),this.change.emit(new b(this,this.checked))));}_getAriaLabelledBy(){return this.ariaLabelledby?this.ariaLabelledby:this.ariaLabel?null:this._labelId}static \u0275fac=function(i){return new(i||a)};static \u0275cmp=jw({type:a,selectors:[["mat-slide-toggle"]],viewQuery:function(i,t){if(i&1&&jg(ae,5),i&2){let r;MC(r=NC())&&(t._switchElement=r.first);}},hostAttrs:[1,"mat-mdc-slide-toggle"],hostVars:13,hostBindings:function(i,t){i&2&&(Rg("id",t.id),Sg("tabindex",null)("aria-label",null)("name",null)("aria-labelledby",null),UC(t.color?"mat-"+t.color:""),zg("mat-mdc-slide-toggle-focused",t._focused)("mat-mdc-slide-toggle-checked",t.checked)("_mat-animation-noopable",t._noopAnimations));},inputs:{name:"name",id:"id",labelPosition:"labelPosition",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],required:[2,"required","required",rb],color:"color",disabled:[2,"disabled","disabled",rb],disableRipple:[2,"disableRipple","disableRipple",rb],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:ob(e)],checked:[2,"checked","checked",rb],hideIcon:[2,"hideIcon","hideIcon",rb],disabledInteractive:[2,"disabledInteractive","disabledInteractive",rb]},outputs:{change:"change",toggleChange:"toggleChange"},exportAs:["matSlideToggle"],features:[lT([{provide:D$1,useExisting:_i(()=>a),multi:true},{provide:y,useExisting:a,multi:true}]),bu],ngContentSelectors:ie,decls:14,vars:27,consts:[["switch",""],["mat-internal-form-field","",3,"labelPosition"],["role","switch","type","button",1,"mdc-switch",3,"click","tabIndex","disabled"],[1,"mat-mdc-slide-toggle-touch-target"],[1,"mdc-switch__track"],[1,"mdc-switch__handle-track"],[1,"mdc-switch__handle"],[1,"mdc-switch__shadow"],[1,"mdc-elevation-overlay"],[1,"mdc-switch__ripple"],["mat-ripple","",1,"mat-mdc-slide-toggle-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-switch__icons"],[1,"mdc-label",3,"click","for"],["viewBox","0 0 24 24","aria-hidden","true",1,"mdc-switch__icon","mdc-switch__icon--on"],["d","M19.69,5.23L8.96,15.96l-4.23-4.23L2.96,13.5l6,6L21.46,7L19.69,5.23z"],["viewBox","0 0 24 24","aria-hidden","true",1,"mdc-switch__icon","mdc-switch__icon--off"],["d","M20 13H4v-2h16v2z"]],template:function(i,t){if(i&1&&(bC(),Cs(0,"div",1)(1,"button",2,0),kg("click",function(){return t._handleClick()}),Mg(3,"div",3)(4,"span",4),Cs(5,"span",5)(6,"span",6)(7,"span",7),Mg(8,"span",8),hl(),Cs(9,"span",9),Mg(10,"span",10),hl(),aC(11,ne,5,0,"span",11),hl()()(),Cs(12,"label",12),kg("click",function(ee){return ee.stopPropagation()}),SC(13),hl()()),i&2){let r=AC(2);_g("labelPosition",t.labelPosition),sI(),zg("mdc-switch--selected",t.checked)("mdc-switch--unselected",!t.checked)("mdc-switch--checked",t.checked)("mdc-switch--disabled",t.disabled)("mat-mdc-slide-toggle-disabled-interactive",t.disabledInteractive),_g("tabIndex",t.disabled&&!t.disabledInteractive?-1:t.tabIndex)("disabled",t.disabled&&!t.disabledInteractive),Sg("id",t.buttonId)("name",t.name)("aria-label",t.ariaLabel)("aria-labelledby",t._getAriaLabelledBy())("aria-describedby",t.ariaDescribedby)("aria-required",t.required||null)("aria-checked",t.checked)("aria-disabled",t.disabled&&t.disabledInteractive?"true":null),sI(9),_g("matRippleTrigger",r)("matRippleDisabled",t.disableRipple||t.disabled)("matRippleCentered",true),sI(),cC(t.hideIcon?-1:11),sI(),_g("for",t.buttonId),Sg("id",t._labelId);}},dependencies:[Oi,Qe],styles:[`.mdc-switch {
2
2
  align-items: center;
3
3
  background: none;
4
4
  border: none;
@@ -1 +1 @@
1
- import {g,ao as V,G,d5 as N,C as Ce,W as Wi,b as U$1,z as z$1,a as P,j as jw,k as Cs,n as kg,J as JC,m as hl,o as aC,t as sI,a8 as Kg,u as cC,a9 as vC,M as Mg,a3 as ZI,ac as CC,_ as _g,a6 as QI,a5 as Dl,aa as Cf,ab as Tf}from'./main-YYHD6X7H.js';import {o as z,k as _t,b as _e,n as ni,J as Jn,Y as Ye,f as fn,Z as Zn,l as Xn,$ as $t,C as Cn,E as En}from'./chunk-FMHkoXwM.js';function U(l,r){l&1&&(Cs(0,"p",5),JC(1,"Loading\u2026"),hl());}function H(l,r){if(l&1){let e=vC();Cs(0,"form",7),kg("ngSubmit",function(){Cf(e);let u=CC();return Tf(u.submit())}),Cs(1,"div",8)(2,"label",9),JC(3,"Name "),Cs(4,"span",10),JC(5,"*"),hl()(),Mg(6,"input",11),ZI(),hl(),Cs(7,"div",8)(8,"label",12),JC(9,"Description"),hl(),Mg(10,"textarea",13),ZI(),hl(),Cs(11,"div",8)(12,"label",14),JC(13,"External ID"),hl(),Mg(14,"input",15),ZI(),hl(),Cs(15,"div",8)(16,"label",16),JC(17,"Default agent"),hl(),Mg(18,"input",17),ZI(),hl(),Cs(19,"div",8)(20,"label",18),JC(21,"Config path"),hl(),Mg(22,"input",19),ZI(),hl(),Cs(23,"div",8)(24,"label",20),JC(25,"Run cost threshold"),hl(),Mg(26,"input",21),ZI(),Cs(27,"span",22),JC(28,"Leave empty to inherit the platform default."),hl()(),Cs(29,"div",23)(30,"button",24),JC(31),hl(),Cs(32,"button",25),kg("click",function(){Cf(e);let u=CC();return Tf(u.cancel())}),JC(33,"Cancel"),hl()()();}if(l&2){let e=CC();_g("formGroup",e.form),sI(6),_g("formControl",e.nameControl),QI(),sI(4),_g("formControl",e.descriptionControl),QI(),sI(4),_g("formControl",e.externalIdControl),QI(),sI(4),_g("formControl",e.defaultAgentNameControl),QI(),sI(4),_g("formControl",e.configPathControl),QI(),sI(4),_g("formControl",e.runCostThresholdControl),QI(),sI(4),_g("disabled",e.nameControl.invalid||e.isSubmitting()),sI(),Dl(" ",e.isEditMode()?"Save changes":"Create"," ");}}var q=class l{route=g(V);router=g(G);namespaceController=g(N);destroyRef=g(Ce);form=new z({name:new _t("",{nonNullable:true,validators:[_e.required,_e.minLength(1)]}),description:new _t("",{nonNullable:true}),configPath:new _t("",{nonNullable:true}),externalId:new _t("",{nonNullable:true}),defaultAgentName:new _t("",{nonNullable:true}),runCostThreshold:new _t(null)});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get configPathControl(){return this.form.controls.configPath}get externalIdControl(){return this.form.controls.externalId}get defaultAgentNameControl(){return this.form.controls.defaultAgentName}get runCostThresholdControl(){return this.form.controls.runCostThreshold}isEditMode=Wi(false);isSubmitting=Wi(false);isLoading=Wi(false);existingNamespace=null;ngOnInit(){let r=this.route.snapshot.paramMap.get("namespaceId");r&&(this.isEditMode.set(true),this.loadNamespace(r));}loadNamespace(r){this.isLoading.set(true),this.namespaceController.getByIdNamespace(r).pipe(U$1(this.destroyRef)).subscribe({next:e=>{this.existingNamespace=e,this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??""),this.configPathControl.setValue(e.configPath??""),this.externalIdControl.setValue(e.externalId??""),this.defaultAgentNameControl.setValue(e.defaultAgentName??""),this.runCostThresholdControl.setValue(e.runCostThreshold??null),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),this.navigateBack();}});}submit(){if(this.nameControl.invalid||this.isSubmitting())return;this.isSubmitting.set(true);let r=z$1(P({},this.existingNamespace),{name:this.nameControl.value.trim(),description:this.descriptionControl.value.trim()||void 0,configPath:this.configPathControl.value.trim()||void 0,externalId:this.externalIdControl.value.trim()||void 0,defaultAgentName:this.defaultAgentNameControl.value.trim()||void 0,runCostThreshold:this.runCostThresholdControl.value??void 0});(this.isEditMode()?this.namespaceController.updateNamespace(this.existingNamespace.id??"",r):this.namespaceController.createNamespace(r)).pipe(U$1(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(false)});}cancel(){this.navigateBack();}navigateBack(){this.router.navigate(["/agentos/namespaces"]);}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=jw({type:l,selectors:[["agentos-namespace-form"]],decls:10,vars:2,consts:[[1,"namespace-form"],[1,"namespace-form__header"],["type","button","title","Back to namespaces",1,"namespace-form__back",3,"click"],[1,"namespace-form__back-icon"],[1,"namespace-form__title"],[1,"namespace-form__loading"],[1,"namespace-form__form",3,"formGroup"],[1,"namespace-form__form",3,"ngSubmit","formGroup"],[1,"namespace-form__field"],["for","ns-name",1,"namespace-form__label"],["aria-hidden","true"],["id","ns-name","type","text","placeholder","Namespace name","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-description",1,"namespace-form__label"],["id","ns-description","rows","4","placeholder","Optional description",1,"namespace-form__textarea",3,"formControl"],["for","ns-external-id",1,"namespace-form__label"],["id","ns-external-id","type","text","placeholder","Optional federation ID from an external system","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-default-agent",1,"namespace-form__label"],["id","ns-default-agent","type","text","placeholder","Logical name of the default agent (e.g. coday)","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-config-path",1,"namespace-form__label"],["id","ns-config-path","type","text","placeholder","Optional path to base configuration directory","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-run-cost-threshold",1,"namespace-form__label"],["id","ns-run-cost-threshold","type","number","min","0","step","0.01","placeholder","Optional maximum cost per run (e.g. 0.50)",1,"namespace-form__input",3,"formControl"],[1,"namespace-form__hint"],[1,"namespace-form__actions"],["type","submit",1,"namespace-form__btn","namespace-form__btn--primary",3,"disabled"],["type","button",1,"namespace-form__btn",3,"click"]],template:function(e,p){e&1&&(Cs(0,"div",0)(1,"header",1)(2,"button",2),kg("click",function(){return p.cancel()}),Cs(3,"span",3),JC(4,"\u2190"),hl(),JC(5," Namespaces "),hl(),Cs(6,"h1",4),JC(7),hl()(),aC(8,U,2,0,"p",5)(9,H,34,9,"form",6),hl()),e&2&&(sI(7),Kg(p.isEditMode()?"Edit namespace":"New namespace"),sI(),cC(p.isLoading()?8:9));},dependencies:[ni,Jn,Ye,fn,Zn,Xn,$t,Cn,En],styles:[".namespace-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:480px;margin:0 auto;padding:2rem 1rem}.namespace-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.namespace-form__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)}.namespace-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.namespace-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.namespace-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:700;color:var(--color-text);letter-spacing:-.02em}.namespace-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.9rem;margin:0}.namespace-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.namespace-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.namespace-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text)}.namespace-form__input[_ngcontent-%COMP%], .namespace-form__textarea[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:0;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;transition:border-color .15s ease}.namespace-form__input[_ngcontent-%COMP%]:focus, .namespace-form__textarea[_ngcontent-%COMP%]:focus{border-color:var(--color-accent)}.namespace-form__input[_ngcontent-%COMP%]::placeholder, .namespace-form__textarea[_ngcontent-%COMP%]::placeholder{color:var(--color-neutral-500)}.namespace-form__textarea[_ngcontent-%COMP%]{resize:vertical;min-height:96px;line-height:1.5}.namespace-form__hint[_ngcontent-%COMP%]{font-size:.8rem;color:var(--color-text-secondary)}.namespace-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.namespace-form__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border-radius:0;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;transition:background .15s ease,border-color .15s ease}.namespace-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover);border-color:var(--color-neutral-500)}.namespace-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.namespace-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-accent);border-color:var(--color-accent);color:#fff}.namespace-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-700);border-color:var(--color-accent-700)}"]})};export{q as NamespaceFormComponent};
1
+ import {g,ao as V,G,d5 as N,C as Ce,W as Wi,b as U$1,z as z$1,a as P,j as jw,k as Cs,n as kg,J as JC,m as hl,o as aC,t as sI,a8 as Kg,u as cC,a9 as vC,M as Mg,a3 as ZI,ac as CC,_ as _g,a6 as QI,a5 as Dl,aa as Cf,ab as Tf}from'./main-P72KGKGP.js';import {o as z,k as _t,b as _e,n as ni,J as Jn,Y as Ye,f as fn,Z as Zn,l as Xn,$ as $t,C as Cn,E as En}from'./chunk-BLF3w_iN.js';function U(l,r){l&1&&(Cs(0,"p",5),JC(1,"Loading\u2026"),hl());}function H(l,r){if(l&1){let e=vC();Cs(0,"form",7),kg("ngSubmit",function(){Cf(e);let u=CC();return Tf(u.submit())}),Cs(1,"div",8)(2,"label",9),JC(3,"Name "),Cs(4,"span",10),JC(5,"*"),hl()(),Mg(6,"input",11),ZI(),hl(),Cs(7,"div",8)(8,"label",12),JC(9,"Description"),hl(),Mg(10,"textarea",13),ZI(),hl(),Cs(11,"div",8)(12,"label",14),JC(13,"External ID"),hl(),Mg(14,"input",15),ZI(),hl(),Cs(15,"div",8)(16,"label",16),JC(17,"Default agent"),hl(),Mg(18,"input",17),ZI(),hl(),Cs(19,"div",8)(20,"label",18),JC(21,"Config path"),hl(),Mg(22,"input",19),ZI(),hl(),Cs(23,"div",8)(24,"label",20),JC(25,"Run cost threshold"),hl(),Mg(26,"input",21),ZI(),Cs(27,"span",22),JC(28,"Leave empty to inherit the platform default."),hl()(),Cs(29,"div",23)(30,"button",24),JC(31),hl(),Cs(32,"button",25),kg("click",function(){Cf(e);let u=CC();return Tf(u.cancel())}),JC(33,"Cancel"),hl()()();}if(l&2){let e=CC();_g("formGroup",e.form),sI(6),_g("formControl",e.nameControl),QI(),sI(4),_g("formControl",e.descriptionControl),QI(),sI(4),_g("formControl",e.externalIdControl),QI(),sI(4),_g("formControl",e.defaultAgentNameControl),QI(),sI(4),_g("formControl",e.configPathControl),QI(),sI(4),_g("formControl",e.runCostThresholdControl),QI(),sI(4),_g("disabled",e.nameControl.invalid||e.isSubmitting()),sI(),Dl(" ",e.isEditMode()?"Save changes":"Create"," ");}}var q=class l{route=g(V);router=g(G);namespaceController=g(N);destroyRef=g(Ce);form=new z({name:new _t("",{nonNullable:true,validators:[_e.required,_e.minLength(1)]}),description:new _t("",{nonNullable:true}),configPath:new _t("",{nonNullable:true}),externalId:new _t("",{nonNullable:true}),defaultAgentName:new _t("",{nonNullable:true}),runCostThreshold:new _t(null)});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get configPathControl(){return this.form.controls.configPath}get externalIdControl(){return this.form.controls.externalId}get defaultAgentNameControl(){return this.form.controls.defaultAgentName}get runCostThresholdControl(){return this.form.controls.runCostThreshold}isEditMode=Wi(false);isSubmitting=Wi(false);isLoading=Wi(false);existingNamespace=null;ngOnInit(){let r=this.route.snapshot.paramMap.get("namespaceId");r&&(this.isEditMode.set(true),this.loadNamespace(r));}loadNamespace(r){this.isLoading.set(true),this.namespaceController.getByIdNamespace(r).pipe(U$1(this.destroyRef)).subscribe({next:e=>{this.existingNamespace=e,this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??""),this.configPathControl.setValue(e.configPath??""),this.externalIdControl.setValue(e.externalId??""),this.defaultAgentNameControl.setValue(e.defaultAgentName??""),this.runCostThresholdControl.setValue(e.runCostThreshold??null),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),this.navigateBack();}});}submit(){if(this.nameControl.invalid||this.isSubmitting())return;this.isSubmitting.set(true);let r=z$1(P({},this.existingNamespace),{name:this.nameControl.value.trim(),description:this.descriptionControl.value.trim()||void 0,configPath:this.configPathControl.value.trim()||void 0,externalId:this.externalIdControl.value.trim()||void 0,defaultAgentName:this.defaultAgentNameControl.value.trim()||void 0,runCostThreshold:this.runCostThresholdControl.value??void 0});(this.isEditMode()?this.namespaceController.updateNamespace(this.existingNamespace.id??"",r):this.namespaceController.createNamespace(r)).pipe(U$1(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(false)});}cancel(){this.navigateBack();}navigateBack(){this.router.navigate(["/agentos/namespaces"]);}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=jw({type:l,selectors:[["agentos-namespace-form"]],decls:10,vars:2,consts:[[1,"namespace-form"],[1,"namespace-form__header"],["type","button","title","Back to namespaces",1,"namespace-form__back",3,"click"],[1,"namespace-form__back-icon"],[1,"namespace-form__title"],[1,"namespace-form__loading"],[1,"namespace-form__form",3,"formGroup"],[1,"namespace-form__form",3,"ngSubmit","formGroup"],[1,"namespace-form__field"],["for","ns-name",1,"namespace-form__label"],["aria-hidden","true"],["id","ns-name","type","text","placeholder","Namespace name","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-description",1,"namespace-form__label"],["id","ns-description","rows","4","placeholder","Optional description",1,"namespace-form__textarea",3,"formControl"],["for","ns-external-id",1,"namespace-form__label"],["id","ns-external-id","type","text","placeholder","Optional federation ID from an external system","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-default-agent",1,"namespace-form__label"],["id","ns-default-agent","type","text","placeholder","Logical name of the default agent (e.g. coday)","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-config-path",1,"namespace-form__label"],["id","ns-config-path","type","text","placeholder","Optional path to base configuration directory","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-run-cost-threshold",1,"namespace-form__label"],["id","ns-run-cost-threshold","type","number","min","0","step","0.01","placeholder","Optional maximum cost per run (e.g. 0.50)",1,"namespace-form__input",3,"formControl"],[1,"namespace-form__hint"],[1,"namespace-form__actions"],["type","submit",1,"namespace-form__btn","namespace-form__btn--primary",3,"disabled"],["type","button",1,"namespace-form__btn",3,"click"]],template:function(e,p){e&1&&(Cs(0,"div",0)(1,"header",1)(2,"button",2),kg("click",function(){return p.cancel()}),Cs(3,"span",3),JC(4,"\u2190"),hl(),JC(5," Namespaces "),hl(),Cs(6,"h1",4),JC(7),hl()(),aC(8,U,2,0,"p",5)(9,H,34,9,"form",6),hl()),e&2&&(sI(7),Kg(p.isEditMode()?"Edit namespace":"New namespace"),sI(),cC(p.isLoading()?8:9));},dependencies:[ni,Jn,Ye,fn,Zn,Xn,$t,Cn,En],styles:[".namespace-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:480px;margin:0 auto;padding:2rem 1rem}.namespace-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.namespace-form__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)}.namespace-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.namespace-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.namespace-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:700;color:var(--color-text);letter-spacing:-.02em}.namespace-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.9rem;margin:0}.namespace-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.namespace-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.namespace-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text)}.namespace-form__input[_ngcontent-%COMP%], .namespace-form__textarea[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:0;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;transition:border-color .15s ease}.namespace-form__input[_ngcontent-%COMP%]:focus, .namespace-form__textarea[_ngcontent-%COMP%]:focus{border-color:var(--color-accent)}.namespace-form__input[_ngcontent-%COMP%]::placeholder, .namespace-form__textarea[_ngcontent-%COMP%]::placeholder{color:var(--color-neutral-500)}.namespace-form__textarea[_ngcontent-%COMP%]{resize:vertical;min-height:96px;line-height:1.5}.namespace-form__hint[_ngcontent-%COMP%]{font-size:.8rem;color:var(--color-text-secondary)}.namespace-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.namespace-form__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border-radius:0;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;transition:background .15s ease,border-color .15s ease}.namespace-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover);border-color:var(--color-neutral-500)}.namespace-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.namespace-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-accent);border-color:var(--color-accent);color:#fff}.namespace-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-700);border-color:var(--color-accent-700)}"]})};export{q as NamespaceFormComponent};
@@ -1 +1 @@
1
- import {I}from'./chunk-BEdQqXxw.js';import {m}from'./chunk-BJld3zB5.js';import {g,G,C as Ce,aJ as Tr,W as Wi,bS as Da,r as re,b as U,j as jw,aK as Lb,k as Cs,bf as gT,n as kg,m as hl,af as wg,A as AC,_ as _g,bg as yT,ah as dT,o as aC,ac as CC,u as cC,a9 as vC,aa as Cf,ab as Tf,ag as ET}from'./main-YYHD6X7H.js';import {W as Wn,S as Se}from'./chunk-B13_C_P9.js';import'./chunk-CgNkwpQ7.js';import'./chunk-FMHkoXwM.js';import'./chunk-4uEZjTft.js';var F=()=>[];function N(o,e){if(o&1){let t=vC();Cs(0,"agentos-prompt-item",4),kg("deleteRequested",function(n){Cf(t);let E=CC(2);return Tf(E.deletePrompt(n))}),hl();}o&2&&_g("prompt",e)("platformMode",true);}function V(o,e){if(o&1&&aC(0,N,1,2,"agentos-prompt-item",3),o&2){let t,r=e.$implicit,n=CC();cC((t=n.resolvePrompt(r.id))?0:-1,t);}}var q=class o{router=g(G);destroyRef=g(Ce);promptState=g(m);refresh$=new Tr(void 0);isLoading=Wi(true);prompts$=this.refresh$.pipe(Da(()=>(this.isLoading.set(true),this.promptState.listPlatform())));promptItems$=this.prompts$.pipe(re(e=>e.map(t=>({id:t.id??"",name:t.name,description:t.description}))));promptsById=new Map;constructor(){this.prompts$.pipe(U(this.destroyRef)).subscribe({next:e=>{this.promptsById=new Map(e.map(t=>[t.id??"",t])),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}goBack(){this.router.navigate(["/agentos","admin"]);}openCreateForm(){this.router.navigate(["/agentos","admin","prompts","new"]);}deletePrompt(e){this.promptState.delete(e.id??"").pipe(U(this.destroyRef)).subscribe(()=>this.refresh$.next());}resolvePrompt(e){return this.promptsById.get(e)??null}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=jw({type:o,selectors:[["agentos-platform-prompts"]],decls:5,vars:7,consts:[["promptItemTpl",""],["title","Platform Prompts","emptyMessage","No platform prompts defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","loading","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[3,"prompt","platformMode"],[3,"deleteRequested","prompt","platformMode"]],template:function(t,r){if(t&1&&(Cs(0,"ds-entity-list",1),gT(1,"async"),kg("createRequested",function(){return r.openCreateForm()}),Cs(2,"ds-icon-button",2),kg("action",function(){return r.goBack()}),hl()(),wg(3,V,1,1,"ng-template",null,0,ET)),t&2){let n=AC(4);_g("items",yT(1,4,r.promptItems$)??dT(6,F))("loading",r.isLoading())("showCreate",true)("itemTemplate",n);}},dependencies:[Wn,I,Se,Lb],styles:[".platform-prompts__back[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.platform-prompts__back[_ngcontent-%COMP%]:hover{text-decoration:underline}"]})};export{q as PlatformPromptsComponent};
1
+ import {I}from'./chunk-dNACuqx8.js';import {m}from'./chunk-CUv3B-19.js';import {g,G,C as Ce,aJ as Tr,W as Wi,bS as Da,r as re,b as U,j as jw,aK as Lb,k as Cs,bf as gT,n as kg,m as hl,af as wg,A as AC,_ as _g,bg as yT,ah as dT,o as aC,ac as CC,u as cC,a9 as vC,aa as Cf,ab as Tf,ag as ET}from'./main-P72KGKGP.js';import {W as Wn,S as Se}from'./chunk-CYOKxOkd.js';import'./chunk-DAxRjiEx.js';import'./chunk-BLF3w_iN.js';import'./chunk-C_OF_Yht.js';var F=()=>[];function N(o,e){if(o&1){let t=vC();Cs(0,"agentos-prompt-item",4),kg("deleteRequested",function(n){Cf(t);let E=CC(2);return Tf(E.deletePrompt(n))}),hl();}o&2&&_g("prompt",e)("platformMode",true);}function V(o,e){if(o&1&&aC(0,N,1,2,"agentos-prompt-item",3),o&2){let t,r=e.$implicit,n=CC();cC((t=n.resolvePrompt(r.id))?0:-1,t);}}var q=class o{router=g(G);destroyRef=g(Ce);promptState=g(m);refresh$=new Tr(void 0);isLoading=Wi(true);prompts$=this.refresh$.pipe(Da(()=>(this.isLoading.set(true),this.promptState.listPlatform())));promptItems$=this.prompts$.pipe(re(e=>e.map(t=>({id:t.id??"",name:t.name,description:t.description}))));promptsById=new Map;constructor(){this.prompts$.pipe(U(this.destroyRef)).subscribe({next:e=>{this.promptsById=new Map(e.map(t=>[t.id??"",t])),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}goBack(){this.router.navigate(["/agentos","admin"]);}openCreateForm(){this.router.navigate(["/agentos","admin","prompts","new"]);}deletePrompt(e){this.promptState.delete(e.id??"").pipe(U(this.destroyRef)).subscribe(()=>this.refresh$.next());}resolvePrompt(e){return this.promptsById.get(e)??null}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=jw({type:o,selectors:[["agentos-platform-prompts"]],decls:5,vars:7,consts:[["promptItemTpl",""],["title","Platform Prompts","emptyMessage","No platform prompts defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","loading","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[3,"prompt","platformMode"],[3,"deleteRequested","prompt","platformMode"]],template:function(t,r){if(t&1&&(Cs(0,"ds-entity-list",1),gT(1,"async"),kg("createRequested",function(){return r.openCreateForm()}),Cs(2,"ds-icon-button",2),kg("action",function(){return r.goBack()}),hl()(),wg(3,V,1,1,"ng-template",null,0,ET)),t&2){let n=AC(4);_g("items",yT(1,4,r.promptItems$)??dT(6,F))("loading",r.isLoading())("showCreate",true)("itemTemplate",n);}},dependencies:[Wn,I,Se,Lb],styles:[".platform-prompts__back[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.platform-prompts__back[_ngcontent-%COMP%]:hover{text-decoration:underline}"]})};export{q as PlatformPromptsComponent};
@@ -0,0 +1 @@
1
+ import {B}from'./chunk-CUv3B-19.js';import {g,G,j as jw,k as Cs,J as JC,m as hl,q as dC,t as sI,v as fC,a9 as vC,n as kg,_ as _g,aa as Cf,ac as CC,ab as Tf}from'./main-P72KGKGP.js';import'./chunk-CYOKxOkd.js';import'./chunk-DAxRjiEx.js';import'./chunk-BLF3w_iN.js';import'./chunk-C_OF_Yht.js';var M=(a,n)=>n.key;function b(a,n){if(a&1){let e=vC();Cs(0,"agentos-action-card",6),kg("nameClicked",function(){let C=Cf(e).$implicit,x=CC();return Tf(x.navigateTo(C.path))}),hl();}if(a&2){let e=n.$implicit;_g("name",e.name)("mark",e.mark)("markIsEmoji",true)("description",e.description)("clickable",true);}}var v=class a{router=g(G);sections=[{key:"users",mark:"\u{1F464}",name:"Users & Groups",description:"Manage platform users, their admin rights, and namespace user groups.",path:"/agentos/admin/users"},{key:"agents",mark:"\u{1F916}",name:"Platform agents",description:"Manage agent configs shared across all namespaces.",path:"/agentos/admin/agent-configs"},{key:"integrations",mark:"\u{1F517}",name:"Platform integrations",description:"Manage integration configs shared across all namespaces.",path:"/agentos/admin/integration-configs"},{key:"authSetting",mark:"\u{1F512}",name:"Auth settings",description:"Manage auth settings shared across all namespaces.",path:"/agentos/admin/auth-settings"},{key:"ai-providers",mark:"\u{1F9E0}",name:"Platform AI providers",description:"Manage AI provider configs shared across all namespaces.",path:"/agentos/admin/ai-providers"},{key:"ai-models",mark:"\u2728",name:"Platform AI models",description:"Manage AI model configs shared across all namespaces.",path:"/agentos/admin/ai-models"},{key:"prompts",mark:"\u{1F4C4}",name:"Platform prompts",description:"Manage prompts shared across all namespaces.",path:"/agentos/admin/prompts"},{key:"case-definitions",mark:"\u23F0",name:"Platform case definitions",description:"Manage scheduled case definitions shared across all namespaces.",path:"/agentos/admin/case-definitions"},{key:"tool-invoke",mark:"\u{1F9EA}",name:"Tool invoke",description:"Debug: execute any registered tool directly with a custom payload.",path:"/agentos/admin/tool-invoke"}];navigateTo(n){this.router.navigate([n]);}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=jw({type:a,selectors:[["agentos-admin-home"]],decls:9,vars:0,consts:[[1,"admin-home"],[1,"admin-home__header"],[1,"admin-home__title"],[1,"admin-home__subtitle"],[1,"admin-home__sections"],[3,"name","mark","markIsEmoji","description","clickable"],[3,"nameClicked","name","mark","markIsEmoji","description","clickable"]],template:function(e,s){e&1&&(Cs(0,"div",0)(1,"header",1)(2,"h1",2),JC(3,"Administration"),hl(),Cs(4,"p",3),JC(5,"Platform-level settings, visible to super-admins only."),hl()(),Cs(6,"nav",4),dC(7,b,1,5,"agentos-action-card",5,M),hl()()),e&2&&(sI(7),fC(s.sections));},dependencies:[B],styles:[".admin-home[_ngcontent-%COMP%]{max-width:860px;margin:0 auto;padding:2rem 1rem;display:flex;flex-direction:column;gap:2rem}.admin-home__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.admin-home__title[_ngcontent-%COMP%]{margin:0;font-size:28px;font-weight:700;color:var(--color-text);font-family:var(--font-heading)}.admin-home__subtitle[_ngcontent-%COMP%]{margin:0;font-size:13px;color:var(--color-neutral-600)}.admin-home__sections[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}"]})};export{v as AdminHomeComponent};
@@ -1 +1 @@
1
- import {i}from'./chunk-DaoWXYMw.js';import {l}from'./chunk-BJld3zB5.js';import {g as g$1,dd as $,aJ as Tr,aD as Hy,bS as Da,a7 as va,I as br,r as re,cE as kd,bU as Fd,a as P,K as x}from'./main-YYHD6X7H.js';var g="none",N="me",O=class p{nsController=g$1($);userState=g$1(l);refresh$=new Tr(void 0);namespaceId$=new Tr(null);vm$=Hy([this.namespaceId$,this.refresh$]).pipe(Da(([e])=>{let r=this.loadPlatformProviders().pipe(va(()=>br([])));return e?Hy([r,this.loadNamespaceProviders(e).pipe(va(()=>br([]))),this.loadUserProviders(e).pipe(va(()=>br([]))),this.loadUserProviders("global").pipe(va(()=>br([])))]).pipe(re(([i,n,s,t])=>({platform:i,namespace:n,userOnNs:s,userGlobal:t}))):Hy([r,this.loadNamespaceProviders("").pipe(va(()=>br([]))),this.loadUserProviders("global").pipe(va(()=>br([])))]).pipe(re(([i,n,s])=>({platform:i,namespace:n,userOnNs:[],userGlobal:s})))}),kd({bufferSize:1,refCount:true}));setNamespace(e){this.namespaceId$.value!==e&&this.namespaceId$.next(e);}refresh(){this.refresh$.next();}loadUserProviders(e){let r=e==="global"?g:e;return this.nsController.listAiProvider(r,N)}userGlobal$=i(this.refresh$,()=>this.loadUserProviders("global"),[]);loadPlatformProviders(){return this.nsController.listAiProvider(g)}loadNamespaceProviders(e){return e?this.nsController.listAiProvider(e):br([])}getById(e,r){return this.nsController.getByIdAiProvider(e)}create(e,r,i){let s=this.userState.currentUser()?.id;if((r==="userOnNs"||r==="userGlobal")&&!s)throw new Error(`Cannot create ${r} provider before UserStateService.loadMe() resolves \u2014 call loadMe() at app init`);if(r==="namespace"){if(i===void 0||i==="")throw new Error("Cannot create namespace-scoped provider without a namespaceId");let S={name:e.name,apiType:e.apiType,description:e.description,baseUrl:e.baseUrl,apiKey:e.apiKey,headers:e.headers??void 0,namespaceId:i??void 0};return this.nsController.createAiProvider(S).pipe(Fd(()=>this.refresh()))}if(r==="userOnNs"&&!i)throw new Error("Cannot create userOnNs provider without a namespaceId");let t={name:e.name,apiType:e.apiType,description:e.description,baseUrl:e.baseUrl,apiKey:e.apiKey,headers:e.headers??void 0,userId:s,namespaceId:r==="userOnNs"?i:void 0};return this.nsController.createAiProvider(t).pipe(Fd(()=>this.refresh()))}update(e,r,i,n){let s=r.apiKey===null?{}:{apiKey:r.apiKey},t=P({name:r.name,apiType:r.apiType,description:r.description,baseUrl:r.baseUrl,headers:r.headers??void 0,namespaceId:n.namespaceId,userId:n.userId},s);return this.nsController.updateAiProvider(e,t).pipe(Fd(()=>this.refresh()))}delete(e,r){return this.nsController.deleteAiProvider(e).pipe(Fd(()=>this.refresh()))}static \u0275fac=function(r){return new(r||p)};static \u0275prov=x({token:p,factory:p.\u0275fac,providedIn:"root"})};export{O};
1
+ import {i}from'./chunk-Dpnh8sS8.js';import {l}from'./chunk-CUv3B-19.js';import {g as g$1,df as $,aJ as Tr,aD as Hy,bS as Da,a7 as va,I as br,r as re,cE as kd,bU as Fd,a as P,K as x}from'./main-P72KGKGP.js';var g="none",N="me",O=class p{nsController=g$1($);userState=g$1(l);refresh$=new Tr(void 0);namespaceId$=new Tr(null);vm$=Hy([this.namespaceId$,this.refresh$]).pipe(Da(([e])=>{let r=this.loadPlatformProviders().pipe(va(()=>br([])));return e?Hy([r,this.loadNamespaceProviders(e).pipe(va(()=>br([]))),this.loadUserProviders(e).pipe(va(()=>br([]))),this.loadUserProviders("global").pipe(va(()=>br([])))]).pipe(re(([i,n,s,t])=>({platform:i,namespace:n,userOnNs:s,userGlobal:t}))):Hy([r,this.loadNamespaceProviders("").pipe(va(()=>br([]))),this.loadUserProviders("global").pipe(va(()=>br([])))]).pipe(re(([i,n,s])=>({platform:i,namespace:n,userOnNs:[],userGlobal:s})))}),kd({bufferSize:1,refCount:true}));setNamespace(e){this.namespaceId$.value!==e&&this.namespaceId$.next(e);}refresh(){this.refresh$.next();}loadUserProviders(e){let r=e==="global"?g:e;return this.nsController.listAiProvider(r,N)}userGlobal$=i(this.refresh$,()=>this.loadUserProviders("global"),[]);loadPlatformProviders(){return this.nsController.listAiProvider(g)}loadNamespaceProviders(e){return e?this.nsController.listAiProvider(e):br([])}getById(e,r){return this.nsController.getByIdAiProvider(e)}create(e,r,i){let s=this.userState.currentUser()?.id;if((r==="userOnNs"||r==="userGlobal")&&!s)throw new Error(`Cannot create ${r} provider before UserStateService.loadMe() resolves \u2014 call loadMe() at app init`);if(r==="namespace"){if(i===void 0||i==="")throw new Error("Cannot create namespace-scoped provider without a namespaceId");let S={name:e.name,apiType:e.apiType,description:e.description,baseUrl:e.baseUrl,apiKey:e.apiKey,headers:e.headers??void 0,namespaceId:i??void 0};return this.nsController.createAiProvider(S).pipe(Fd(()=>this.refresh()))}if(r==="userOnNs"&&!i)throw new Error("Cannot create userOnNs provider without a namespaceId");let t={name:e.name,apiType:e.apiType,description:e.description,baseUrl:e.baseUrl,apiKey:e.apiKey,headers:e.headers??void 0,userId:s,namespaceId:r==="userOnNs"?i:void 0};return this.nsController.createAiProvider(t).pipe(Fd(()=>this.refresh()))}update(e,r,i,n){let s=r.apiKey===null?{}:{apiKey:r.apiKey},t=P({name:r.name,apiType:r.apiType,description:r.description,baseUrl:r.baseUrl,headers:r.headers??void 0,namespaceId:n.namespaceId,userId:n.userId},s);return this.nsController.updateAiProvider(e,t).pipe(Fd(()=>this.refresh()))}delete(e,r){return this.nsController.deleteAiProvider(e).pipe(Fd(()=>this.refresh()))}static \u0275fac=function(r){return new(r||p)};static \u0275prov=x({token:p,factory:p.\u0275fac,providedIn:"root"})};export{O};
@@ -1,2 +1,2 @@
1
- import {R}from'./chunk-CR817PBg.js';import {g,ao as V,G,dn as k,C as Ce,W as Wi,T as TT,$ as $y,a7 as va,I as br,b as U,j as jw,k as Cs,n as kg,J as JC,m as hl,o as aC,t as sI,u as cC,a9 as vC,a3 as ZI,q as dC,ac as CC,_ as _g,a6 as QI,v as fC,a5 as Dl,a8 as Kg,w as zg,b0 as Xg,aa as Cf,ab as Tf}from'./main-YYHD6X7H.js';import'./chunk-BJld3zB5.js';import {t as ti,Q as Qn,e as ei,Y as Ye,A as At,Z as Zn,c as cn}from'./chunk-FMHkoXwM.js';import'./chunk-DaoWXYMw.js';import'./chunk-4uEZjTft.js';import'./chunk-B13_C_P9.js';import'./chunk-CgNkwpQ7.js';var $=(i,e)=>e.id;function J(i,e){i&1&&(Cs(0,"p",5),JC(1,"Loading\u2026"),hl());}function q(i,e){if(i&1&&(Cs(0,"p",8),JC(1),hl()),i&2){let t=CC(2);sI(),Kg(t.errorMessage());}}function Q(i,e){if(i&1&&(Cs(0,"span",26),JC(1),hl()),i&2){let t=CC(3);sI(),Kg(t.association()?.checkoutFailureReason);}}function W(i,e){if(i&1&&(Cs(0,"p",25),JC(1),aC(2,Q,2,1,"span",26),hl()),i&2){let t=CC(2);zg("namespace-git__status--failed",t.checkoutStatus()==="FAILED")("namespace-git__status--ready",t.checkoutStatus()==="READY"),sI(),Dl(" Repository: ",t.checkoutStatus()," "),sI(),cC(t.association()?.checkoutFailureReason?2:-1);}}function X(i,e){if(i&1&&(Cs(0,"option",19),JC(1),hl()),i&2){let t=e.$implicit,l=CC(2);_g("value",t.id),sI(),Xg("",t.name," (",l.authTypeLabel(t.authType),")");}}function Z(i,e){i&1&&(Cs(0,"span",20),JC(1," No usable auth setting in this namespace. Create a BEARER_TOKEN one first. "),hl());}function ee(i,e){if(i&1){let t=vC();Cs(0,"button",27),kg("click",function(){Cf(t);let c=CC(2);return Tf(c.remove())}),JC(1," Remove association "),hl();}if(i&2){let t=CC(2);_g("disabled",t.isSaving());}}function te(i,e){if(i&1){let t=vC();Cs(0,"div",6)(1,"p",7),JC(2," Associate a repository with this namespace and prepare an internal clone. Namespace files remain shared documents outside Git. "),hl(),aC(3,q,2,1,"p",8),aC(4,W,3,6,"p",9),Cs(5,"fieldset",10)(6,"legend",11),JC(7,"Repository"),hl(),Cs(8,"label",12)(9,"span",13),JC(10,"Repository URL"),hl(),Cs(11,"input",14),kg("ngModelChange",function(c){Cf(t);let v=CC();return Tf(v.repositoryUrl.set(c))}),hl(),ZI(),Cs(12,"span",15),JC(13,"HTTPS only, without credentials in the URL."),hl()(),Cs(14,"label",12)(15,"span",13),JC(16,"Main branch"),hl(),Cs(17,"input",16),kg("ngModelChange",function(c){Cf(t);let v=CC();return Tf(v.mainBranch.set(c))}),hl(),ZI(),Cs(18,"span",15),JC(19,"The internal clone starts from this remote branch."),hl()(),Cs(20,"label",12)(21,"span",13),JC(22,"Service account"),hl(),Cs(23,"select",17),kg("ngModelChange",function(c){Cf(t);let v=CC();return Tf(v.serviceAuthSettingId.set(c))}),Cs(24,"option",18),JC(25,"Select an auth setting\u2026"),hl(),dC(26,X,2,3,"option",19,$),hl(),ZI(),Cs(28,"span",15),JC(29," Shared by the namespace. Every Git operation uses this identity, never the identity of whoever opened the case. "),hl(),aC(30,Z,2,0,"span",20),hl()(),Cs(31,"div",21)(32,"button",22),kg("click",function(){Cf(t);let c=CC();return Tf(c.save())}),JC(33),hl(),aC(34,ee,2,1,"button",23),Cs(35,"button",24),kg("click",function(){Cf(t);let c=CC();return Tf(c.cancel())}),JC(36,"Cancel"),hl()()();}if(i&2){let t=CC();sI(3),cC(t.errorMessage()?3:-1),sI(),cC(t.isAssociated()&&t.checkoutStatus()?4:-1),sI(7),_g("ngModel",t.repositoryUrl()),QI(),sI(6),_g("ngModel",t.mainBranch()),QI(),sI(6),_g("ngModel",t.serviceAuthSettingId()),QI(),sI(3),fC(t.eligibleAuthSettings()),sI(4),cC(t.eligibleAuthSettings().length===0?30:-1),sI(2),_g("disabled",!t.canSave()),sI(),Dl(" ",t.isSaving()?"Saving\u2026":t.isAssociated()?"Update":"Associate"," "),sI(),cC(t.isAssociated()?34:-1);}}var ne=["BearerTokenAuthSetting","BasicAuthAuthSetting","ApiKeyAuthSetting"],ie={BearerTokenAuthSetting:"token",BasicAuthAuthSetting:"basic auth",ApiKeyAuthSetting:"API key"},j=class i{route=g(V);router=g(G);gitApi=g(k);authSettingState=g(R);destroyRef=g(Ce);isLoading=Wi(true);isSaving=Wi(false);errorMessage=Wi(null);association=Wi(null);authSettings=Wi([]);repositoryUrl=Wi("");mainBranch=Wi("main");serviceAuthSettingId=Wi("");namespaceId="";isAssociated=TT(()=>this.association()?.associated===true);eligibleAuthSettings=TT(()=>this.authSettings().filter(e=>ne.includes(e.authType)));authTypeLabel(e){return ie[e??""]??e??"unknown"}canSave=TT(()=>this.repositoryUrl().trim().length>0&&this.serviceAuthSettingId().length>0&&!this.isSaving());checkoutStatus=TT(()=>this.association()?.checkoutStatus??null);ngOnInit(){this.namespaceId=this.route.snapshot.paramMap.get("namespaceId")??"",this.load();}load(){this.isLoading.set(true),$y({association:this.gitApi.getAssociationNamespaceGit(this.namespaceId).pipe(va(e=>(console.error("Failed to load the Git association",e),this.errorMessage.set(this.messageOf(e)),br(null)))),authSettings:this.authSettingState.loadNamespaceSettings(this.namespaceId).pipe(va(e=>(console.error("Failed to load namespace auth settings",e),br([]))))}).pipe(U(this.destroyRef)).subscribe(({association:e,authSettings:t})=>{this.authSettings.set(t??[]),e&&(this.association.set(e),this.applyToForm(e)),this.isLoading.set(false);});}applyToForm(e){this.repositoryUrl.set(e.repositoryUrl??""),this.mainBranch.set(e.mainBranch??"main"),this.serviceAuthSettingId.set(e.serviceAuthSettingId??"");}save(){this.canSave()&&(this.isSaving.set(true),this.errorMessage.set(null),this.gitApi.setAssociationNamespaceGit(this.namespaceId,{repositoryUrl:this.repositoryUrl().trim(),mainBranch:this.mainBranch().trim()||void 0,serviceAuthSettingId:this.serviceAuthSettingId()}).pipe(U(this.destroyRef),va(e=>(console.error("Failed to save the Git association",e),this.errorMessage.set(this.messageOf(e)),this.isSaving.set(false),br(null)))).subscribe(e=>{e&&(this.association.set(e),this.applyToForm(e)),this.isSaving.set(false);}));}remove(){confirm("Remove the repository association? The internal clone is preserved.")&&(this.isSaving.set(true),this.gitApi.removeAssociationNamespaceGit(this.namespaceId).pipe(U(this.destroyRef),va(e=>(console.error("Failed to remove the Git association",e),this.errorMessage.set(this.messageOf(e)),this.isSaving.set(false),br(null)))).subscribe(e=>{e&&(this.association.set(e),this.applyToForm(e)),this.isSaving.set(false);}));}cancel(){this.router.navigate(["/agentos/namespaces"]);}messageOf(e){return e.error?.message??e.message??"Unexpected error"}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=jw({type:i,selectors:[["agentos-namespace-git"]],decls:10,vars:1,consts:[[1,"namespace-git"],[1,"namespace-git__header"],["type","button","title","Back to namespaces",1,"namespace-git__back",3,"click"],[1,"namespace-git__back-icon"],[1,"namespace-git__title"],[1,"namespace-git__loading"],[1,"namespace-git__body"],[1,"namespace-git__hint"],["role","alert",1,"namespace-git__error"],[1,"namespace-git__status",3,"namespace-git__status--failed","namespace-git__status--ready"],[1,"namespace-git__section"],[1,"namespace-git__label"],[1,"namespace-git__field"],[1,"namespace-git__field-label"],["type","url","placeholder","https://forge.example/org/project.git","name","repositoryUrl",1,"namespace-git__input",3,"ngModelChange","ngModel"],[1,"namespace-git__field-hint"],["type","text","placeholder","main","name","mainBranch",1,"namespace-git__input",3,"ngModelChange","ngModel"],["name","serviceAuthSettingId",1,"namespace-git__input",3,"ngModelChange","ngModel"],["value",""],[3,"value"],[1,"namespace-git__field-hint","namespace-git__field-hint--warn"],[1,"namespace-git__actions"],["type","button",1,"namespace-git__save",3,"click","disabled"],["type","button",1,"namespace-git__remove",3,"disabled"],["type","button",1,"namespace-git__cancel",3,"click"],[1,"namespace-git__status"],[1,"namespace-git__status-reason"],["type","button",1,"namespace-git__remove",3,"click","disabled"]],template:function(t,l){t&1&&(Cs(0,"div",0)(1,"header",1)(2,"button",2),kg("click",function(){return l.cancel()}),Cs(3,"span",3),JC(4,"\u2190"),hl(),JC(5," Namespaces "),hl(),Cs(6,"h1",4),JC(7,"Git repository"),hl()(),aC(8,J,2,0,"p",5)(9,te,37,9,"div",6),hl()),t&2&&(sI(8),cC(l.isLoading()?8:9));},dependencies:[ti,Qn,ei,Ye,At,Zn,cn],styles:[".namespace-git[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.namespace-git__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.namespace-git__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-primary, #007aff);font-family:inherit}.namespace-git__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.namespace-git__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem}.namespace-git__body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.namespace-git__hint[_ngcontent-%COMP%]{margin:0;font-size:.875rem;color:var(--color-text-secondary, #6b7280)}.namespace-git__error[_ngcontent-%COMP%]{margin:0;padding:.75rem;border-radius:.375rem;background:var(--red-bg, #fef2f2);color:var(--color-error, #b91c1c);font-size:.875rem}.namespace-git__status[_ngcontent-%COMP%]{margin:0;padding:.5rem .75rem;border-radius:.375rem;background:var(--color-surface-secondary, #f3f4f6);font-size:.875rem;display:flex;flex-direction:column;gap:.25rem}.namespace-git__status--ready[_ngcontent-%COMP%]{background:var(--color-success-bg, #ecfdf5);color:var(--color-success, #047857)}.namespace-git__status--failed[_ngcontent-%COMP%]{background:var(--red-bg, #fef2f2);color:var(--color-error, #b91c1c)}.namespace-git__status-reason[_ngcontent-%COMP%]{font-size:.8125rem;opacity:.9}.namespace-git__section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;border:1px solid var(--color-border, #e5e7eb);border-radius:.5rem;padding:1rem;margin:0}.namespace-git__label[_ngcontent-%COMP%]{font-weight:600;font-size:.9375rem;padding:0 .25rem}.namespace-git__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.namespace-git__field-label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500}.namespace-git__field-hint[_ngcontent-%COMP%]{font-size:.8125rem;color:var(--color-text-secondary, #6b7280)}.namespace-git__field-hint--warn[_ngcontent-%COMP%]{color:var(--color-warning, #b45309)}.namespace-git__input[_ngcontent-%COMP%]{font-family:inherit;font-size:.875rem;padding:.5rem .625rem;border:1px solid var(--color-border, #e5e7eb);border-radius:.375rem;background:var(--color-surface, #fff);color:inherit}.namespace-git__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;align-items:center}.namespace-git__save[_ngcontent-%COMP%], .namespace-git__remove[_ngcontent-%COMP%], .namespace-git__cancel[_ngcontent-%COMP%]{font-family:inherit;font-size:.875rem;padding:.5rem 1rem;border-radius:.375rem;cursor:pointer;border:1px solid transparent}.namespace-git__save[_ngcontent-%COMP%]:disabled, .namespace-git__remove[_ngcontent-%COMP%]:disabled, .namespace-git__cancel[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.namespace-git__save[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);color:var(--color-text-on-accent, #fff)}.namespace-git__remove[_ngcontent-%COMP%]{background:none;border-color:var(--color-error, #b91c1c);color:var(--color-error, #b91c1c)}.namespace-git__cancel[_ngcontent-%COMP%]{background:none;border-color:var(--color-border, #e5e7eb);color:inherit}"]})};
1
+ import {R}from'./chunk-C5Sn2M5w.js';import {g,ao as V,G,dq as k,C as Ce,W as Wi,T as TT,$ as $y,a7 as va,I as br,b as U,j as jw,k as Cs,n as kg,J as JC,m as hl,o as aC,t as sI,u as cC,a9 as vC,a3 as ZI,q as dC,ac as CC,_ as _g,a6 as QI,v as fC,a5 as Dl,a8 as Kg,w as zg,b0 as Xg,aa as Cf,ab as Tf}from'./main-P72KGKGP.js';import'./chunk-CUv3B-19.js';import {t as ti,Q as Qn,e as ei,Y as Ye,A as At,Z as Zn,c as cn}from'./chunk-BLF3w_iN.js';import'./chunk-Dpnh8sS8.js';import'./chunk-C_OF_Yht.js';import'./chunk-CYOKxOkd.js';import'./chunk-DAxRjiEx.js';var $=(i,e)=>e.id;function J(i,e){i&1&&(Cs(0,"p",5),JC(1,"Loading\u2026"),hl());}function q(i,e){if(i&1&&(Cs(0,"p",8),JC(1),hl()),i&2){let t=CC(2);sI(),Kg(t.errorMessage());}}function Q(i,e){if(i&1&&(Cs(0,"span",26),JC(1),hl()),i&2){let t=CC(3);sI(),Kg(t.association()?.checkoutFailureReason);}}function W(i,e){if(i&1&&(Cs(0,"p",25),JC(1),aC(2,Q,2,1,"span",26),hl()),i&2){let t=CC(2);zg("namespace-git__status--failed",t.checkoutStatus()==="FAILED")("namespace-git__status--ready",t.checkoutStatus()==="READY"),sI(),Dl(" Repository: ",t.checkoutStatus()," "),sI(),cC(t.association()?.checkoutFailureReason?2:-1);}}function X(i,e){if(i&1&&(Cs(0,"option",19),JC(1),hl()),i&2){let t=e.$implicit,l=CC(2);_g("value",t.id),sI(),Xg("",t.name," (",l.authTypeLabel(t.authType),")");}}function Z(i,e){i&1&&(Cs(0,"span",20),JC(1," No usable auth setting in this namespace. Create a BEARER_TOKEN one first. "),hl());}function ee(i,e){if(i&1){let t=vC();Cs(0,"button",27),kg("click",function(){Cf(t);let c=CC(2);return Tf(c.remove())}),JC(1," Remove association "),hl();}if(i&2){let t=CC(2);_g("disabled",t.isSaving());}}function te(i,e){if(i&1){let t=vC();Cs(0,"div",6)(1,"p",7),JC(2," Associate a repository with this namespace and prepare an internal clone. Namespace files remain shared documents outside Git. "),hl(),aC(3,q,2,1,"p",8),aC(4,W,3,6,"p",9),Cs(5,"fieldset",10)(6,"legend",11),JC(7,"Repository"),hl(),Cs(8,"label",12)(9,"span",13),JC(10,"Repository URL"),hl(),Cs(11,"input",14),kg("ngModelChange",function(c){Cf(t);let v=CC();return Tf(v.repositoryUrl.set(c))}),hl(),ZI(),Cs(12,"span",15),JC(13,"HTTPS only, without credentials in the URL."),hl()(),Cs(14,"label",12)(15,"span",13),JC(16,"Main branch"),hl(),Cs(17,"input",16),kg("ngModelChange",function(c){Cf(t);let v=CC();return Tf(v.mainBranch.set(c))}),hl(),ZI(),Cs(18,"span",15),JC(19,"The internal clone starts from this remote branch."),hl()(),Cs(20,"label",12)(21,"span",13),JC(22,"Service account"),hl(),Cs(23,"select",17),kg("ngModelChange",function(c){Cf(t);let v=CC();return Tf(v.serviceAuthSettingId.set(c))}),Cs(24,"option",18),JC(25,"Select an auth setting\u2026"),hl(),dC(26,X,2,3,"option",19,$),hl(),ZI(),Cs(28,"span",15),JC(29," Shared by the namespace. Every Git operation uses this identity, never the identity of whoever opened the case. "),hl(),aC(30,Z,2,0,"span",20),hl()(),Cs(31,"div",21)(32,"button",22),kg("click",function(){Cf(t);let c=CC();return Tf(c.save())}),JC(33),hl(),aC(34,ee,2,1,"button",23),Cs(35,"button",24),kg("click",function(){Cf(t);let c=CC();return Tf(c.cancel())}),JC(36,"Cancel"),hl()()();}if(i&2){let t=CC();sI(3),cC(t.errorMessage()?3:-1),sI(),cC(t.isAssociated()&&t.checkoutStatus()?4:-1),sI(7),_g("ngModel",t.repositoryUrl()),QI(),sI(6),_g("ngModel",t.mainBranch()),QI(),sI(6),_g("ngModel",t.serviceAuthSettingId()),QI(),sI(3),fC(t.eligibleAuthSettings()),sI(4),cC(t.eligibleAuthSettings().length===0?30:-1),sI(2),_g("disabled",!t.canSave()),sI(),Dl(" ",t.isSaving()?"Saving\u2026":t.isAssociated()?"Update":"Associate"," "),sI(),cC(t.isAssociated()?34:-1);}}var ne=["BearerTokenAuthSetting","BasicAuthAuthSetting","ApiKeyAuthSetting"],ie={BearerTokenAuthSetting:"token",BasicAuthAuthSetting:"basic auth",ApiKeyAuthSetting:"API key"},j=class i{route=g(V);router=g(G);gitApi=g(k);authSettingState=g(R);destroyRef=g(Ce);isLoading=Wi(true);isSaving=Wi(false);errorMessage=Wi(null);association=Wi(null);authSettings=Wi([]);repositoryUrl=Wi("");mainBranch=Wi("main");serviceAuthSettingId=Wi("");namespaceId="";isAssociated=TT(()=>this.association()?.associated===true);eligibleAuthSettings=TT(()=>this.authSettings().filter(e=>ne.includes(e.authType)));authTypeLabel(e){return ie[e??""]??e??"unknown"}canSave=TT(()=>this.repositoryUrl().trim().length>0&&this.serviceAuthSettingId().length>0&&!this.isSaving());checkoutStatus=TT(()=>this.association()?.checkoutStatus??null);ngOnInit(){this.namespaceId=this.route.snapshot.paramMap.get("namespaceId")??"",this.load();}load(){this.isLoading.set(true),$y({association:this.gitApi.getAssociationNamespaceGit(this.namespaceId).pipe(va(e=>(console.error("Failed to load the Git association",e),this.errorMessage.set(this.messageOf(e)),br(null)))),authSettings:this.authSettingState.loadNamespaceSettings(this.namespaceId).pipe(va(e=>(console.error("Failed to load namespace auth settings",e),br([]))))}).pipe(U(this.destroyRef)).subscribe(({association:e,authSettings:t})=>{this.authSettings.set(t??[]),e&&(this.association.set(e),this.applyToForm(e)),this.isLoading.set(false);});}applyToForm(e){this.repositoryUrl.set(e.repositoryUrl??""),this.mainBranch.set(e.mainBranch??"main"),this.serviceAuthSettingId.set(e.serviceAuthSettingId??"");}save(){this.canSave()&&(this.isSaving.set(true),this.errorMessage.set(null),this.gitApi.setAssociationNamespaceGit(this.namespaceId,{repositoryUrl:this.repositoryUrl().trim(),mainBranch:this.mainBranch().trim()||void 0,serviceAuthSettingId:this.serviceAuthSettingId()}).pipe(U(this.destroyRef),va(e=>(console.error("Failed to save the Git association",e),this.errorMessage.set(this.messageOf(e)),this.isSaving.set(false),br(null)))).subscribe(e=>{e&&(this.association.set(e),this.applyToForm(e)),this.isSaving.set(false);}));}remove(){confirm("Remove the repository association? The internal clone is preserved.")&&(this.isSaving.set(true),this.gitApi.removeAssociationNamespaceGit(this.namespaceId).pipe(U(this.destroyRef),va(e=>(console.error("Failed to remove the Git association",e),this.errorMessage.set(this.messageOf(e)),this.isSaving.set(false),br(null)))).subscribe(e=>{e&&(this.association.set(e),this.applyToForm(e)),this.isSaving.set(false);}));}cancel(){this.router.navigate(["/agentos/namespaces"]);}messageOf(e){return e.error?.message??e.message??"Unexpected error"}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=jw({type:i,selectors:[["agentos-namespace-git"]],decls:10,vars:1,consts:[[1,"namespace-git"],[1,"namespace-git__header"],["type","button","title","Back to namespaces",1,"namespace-git__back",3,"click"],[1,"namespace-git__back-icon"],[1,"namespace-git__title"],[1,"namespace-git__loading"],[1,"namespace-git__body"],[1,"namespace-git__hint"],["role","alert",1,"namespace-git__error"],[1,"namespace-git__status",3,"namespace-git__status--failed","namespace-git__status--ready"],[1,"namespace-git__section"],[1,"namespace-git__label"],[1,"namespace-git__field"],[1,"namespace-git__field-label"],["type","url","placeholder","https://forge.example/org/project.git","name","repositoryUrl",1,"namespace-git__input",3,"ngModelChange","ngModel"],[1,"namespace-git__field-hint"],["type","text","placeholder","main","name","mainBranch",1,"namespace-git__input",3,"ngModelChange","ngModel"],["name","serviceAuthSettingId",1,"namespace-git__input",3,"ngModelChange","ngModel"],["value",""],[3,"value"],[1,"namespace-git__field-hint","namespace-git__field-hint--warn"],[1,"namespace-git__actions"],["type","button",1,"namespace-git__save",3,"click","disabled"],["type","button",1,"namespace-git__remove",3,"disabled"],["type","button",1,"namespace-git__cancel",3,"click"],[1,"namespace-git__status"],[1,"namespace-git__status-reason"],["type","button",1,"namespace-git__remove",3,"click","disabled"]],template:function(t,l){t&1&&(Cs(0,"div",0)(1,"header",1)(2,"button",2),kg("click",function(){return l.cancel()}),Cs(3,"span",3),JC(4,"\u2190"),hl(),JC(5," Namespaces "),hl(),Cs(6,"h1",4),JC(7,"Git repository"),hl()(),aC(8,J,2,0,"p",5)(9,te,37,9,"div",6),hl()),t&2&&(sI(8),cC(l.isLoading()?8:9));},dependencies:[ti,Qn,ei,Ye,At,Zn,cn],styles:[".namespace-git[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.namespace-git__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.namespace-git__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-primary, #007aff);font-family:inherit}.namespace-git__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.namespace-git__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem}.namespace-git__body[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem}.namespace-git__hint[_ngcontent-%COMP%]{margin:0;font-size:.875rem;color:var(--color-text-secondary, #6b7280)}.namespace-git__error[_ngcontent-%COMP%]{margin:0;padding:.75rem;border-radius:.375rem;background:var(--red-bg, #fef2f2);color:var(--color-error, #b91c1c);font-size:.875rem}.namespace-git__status[_ngcontent-%COMP%]{margin:0;padding:.5rem .75rem;border-radius:.375rem;background:var(--color-surface-secondary, #f3f4f6);font-size:.875rem;display:flex;flex-direction:column;gap:.25rem}.namespace-git__status--ready[_ngcontent-%COMP%]{background:var(--color-success-bg, #ecfdf5);color:var(--color-success, #047857)}.namespace-git__status--failed[_ngcontent-%COMP%]{background:var(--red-bg, #fef2f2);color:var(--color-error, #b91c1c)}.namespace-git__status-reason[_ngcontent-%COMP%]{font-size:.8125rem;opacity:.9}.namespace-git__section[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;border:1px solid var(--color-border, #e5e7eb);border-radius:.5rem;padding:1rem;margin:0}.namespace-git__label[_ngcontent-%COMP%]{font-weight:600;font-size:.9375rem;padding:0 .25rem}.namespace-git__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.namespace-git__field-label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500}.namespace-git__field-hint[_ngcontent-%COMP%]{font-size:.8125rem;color:var(--color-text-secondary, #6b7280)}.namespace-git__field-hint--warn[_ngcontent-%COMP%]{color:var(--color-warning, #b45309)}.namespace-git__input[_ngcontent-%COMP%]{font-family:inherit;font-size:.875rem;padding:.5rem .625rem;border:1px solid var(--color-border, #e5e7eb);border-radius:.375rem;background:var(--color-surface, #fff);color:inherit}.namespace-git__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;align-items:center}.namespace-git__save[_ngcontent-%COMP%], .namespace-git__remove[_ngcontent-%COMP%], .namespace-git__cancel[_ngcontent-%COMP%]{font-family:inherit;font-size:.875rem;padding:.5rem 1rem;border-radius:.375rem;cursor:pointer;border:1px solid transparent}.namespace-git__save[_ngcontent-%COMP%]:disabled, .namespace-git__remove[_ngcontent-%COMP%]:disabled, .namespace-git__cancel[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.namespace-git__save[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);color:var(--color-text-on-accent, #fff)}.namespace-git__remove[_ngcontent-%COMP%]{background:none;border-color:var(--color-error, #b91c1c);color:var(--color-error, #b91c1c)}.namespace-git__cancel[_ngcontent-%COMP%]{background:none;border-color:var(--color-border, #e5e7eb);color:inherit}"]})};
2
2
  export{j as NamespaceGitComponent};
@@ -1,4 +1,4 @@
1
- import {an as ue,g,L,ci as me,ap as zy,av as dt$1,j as jw,k as Cs,J as JC,m as hl,ai as rm,aj as iT,n as kg,a3 as ZI,M as Mg,o as aC,q as dC,t as sI,ak as nm,a6 as QI,_ as _g,u as cC,v as fC,a5 as Dl,aL as wo,aM as Zn$1,aO as wt$1,az as Xt,aW as C,cj as Pn,ce as kb,c8 as ob,af as wg,ag as ET,c9 as Pf,ck as Lf,ch as Ag,A as AC,S as Sg,ad as $g,b$ as UC,w as zg,x as jg,y as MC,N as NC,aJ as Tr,aG as fe,cl as be,p as pe,l as le,bU as Fd,b9 as T,b8 as B,be as A,b7 as u,bd as h,cm as M,d as O,ba as v,bb as m,c as b,cn as F,f,V,bc as R,co as H,cp as K,ca as _e,K as x,X as z$1,Y as Ue,am as Ym,i as Gn,e as pr,a0 as jt,a2 as Nt,a1 as Vt,b0 as Xg,ac as CC}from'./main-YYHD6X7H.js';import {s as se}from'./chunk-DoqL_RuM.js';import {t as ti,Q as Qn,e as ei,Y as Ye$1,h as _n,A as At,m as mn,Z as Zn,c as cn,w as wt}from'./chunk-FMHkoXwM.js';var Xe=["determinateSpinner"];function et(c,e){if(c&1&&(Pf(),Cs(0,"svg",11),Mg(1,"circle",12),hl()),c&2){let t=CC();Sg("viewBox",t._viewBox()),sI(),$g("stroke-dasharray",t._strokeCircumference(),"px")("stroke-dashoffset",t._strokeCircumference()/2,"px")("stroke-width",t._circleStrokeWidth(),"%"),Sg("r",t._circleRadius());}}var tt=new C("mat-progress-spinner-default-options",{providedIn:"root",factory:()=>({diameter:qe})}),qe=100,nt=10,yt=(()=>{class c{_elementRef=g(Xt);_noopAnimations;get color(){return this._color||this._defaultColor}set color(t){this._color=t;}_color;_defaultColor="primary";_determinateCircle;constructor(){let t=g(tt),n=Pn(),i=this._elementRef.nativeElement;this._noopAnimations=n==="di-disabled"&&!!t&&!t._forceAnimations,this.mode=i.nodeName.toLowerCase()==="mat-spinner"?"indeterminate":"determinate",!this._noopAnimations&&n==="reduced-motion"&&i.classList.add("mat-progress-spinner-reduced-motion"),t&&(t.color&&(this.color=this._defaultColor=t.color),t.diameter&&(this.diameter=t.diameter),t.strokeWidth&&(this.strokeWidth=t.strokeWidth));}mode;get value(){return this.mode==="determinate"?this._value:0}set value(t){this._value=Math.max(0,Math.min(100,t||0));}_value=0;get diameter(){return this._diameter}set diameter(t){this._diameter=t||0;}_diameter=qe;get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(t){this._strokeWidth=t||0;}_strokeWidth;_circleRadius(){return (this.diameter-nt)/2}_viewBox(){let t=this._circleRadius()*2+this.strokeWidth;return `0 0 ${t} ${t}`}_strokeCircumference(){return 2*Math.PI*this._circleRadius()}_strokeDashOffset(){return this.mode==="determinate"?this._strokeCircumference()*(100-this._value)/100:null}_circleStrokeWidth(){return this.strokeWidth/this.diameter*100}static \u0275fac=function(n){return new(n||c)};static \u0275cmp=jw({type:c,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(n,i){if(n&1&&jg(Xe,5),n&2){let o;MC(o=NC())&&(i._determinateCircle=o.first);}},hostAttrs:["role","progressbar","tabindex","-1",1,"mat-mdc-progress-spinner","mdc-circular-progress"],hostVars:18,hostBindings:function(n,i){n&2&&(Sg("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow",i.mode==="determinate"?i.value:null)("mode",i.mode),UC("mat-"+i.color),$g("width",i.diameter,"px")("height",i.diameter,"px")("--mat-progress-spinner-size",i.diameter+"px")("--mat-progress-spinner-active-indicator-width",i.diameter+"px"),zg("_mat-animation-noopable",i._noopAnimations)("mdc-circular-progress--indeterminate",i.mode==="indeterminate"));},inputs:{color:"color",mode:"mode",value:[2,"value","value",ob],diameter:[2,"diameter","diameter",ob],strokeWidth:[2,"strokeWidth","strokeWidth",ob]},exportAs:["matProgressSpinner"],decls:14,vars:11,consts:[["circle",""],["determinateSpinner",""],["aria-hidden","true",1,"mdc-circular-progress__determinate-container"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__determinate-circle-graphic"],["cx","50%","cy","50%",1,"mdc-circular-progress__determinate-circle"],["aria-hidden","true",1,"mdc-circular-progress__indeterminate-container"],[1,"mdc-circular-progress__spinner-layer"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-left"],[3,"ngTemplateOutlet"],[1,"mdc-circular-progress__gap-patch"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-right"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__indeterminate-circle-graphic"],["cx","50%","cy","50%"]],template:function(n,i){if(n&1&&(wg(0,et,2,8,"ng-template",null,0,ET),Cs(2,"div",2,1),Pf(),Cs(4,"svg",3),Mg(5,"circle",4),hl()(),Lf(),Cs(6,"div",5)(7,"div",6)(8,"div",7),Ag(9,8),hl(),Cs(10,"div",9),Ag(11,8),hl(),Cs(12,"div",10),Ag(13,8),hl()()()),n&2){let o=AC(1);sI(4),Sg("viewBox",i._viewBox()),sI(),$g("stroke-dasharray",i._strokeCircumference(),"px")("stroke-dashoffset",i._strokeDashOffset(),"px")("stroke-width",i._circleStrokeWidth(),"%"),Sg("r",i._circleRadius()),sI(4),_g("ngTemplateOutlet",o),sI(2),_g("ngTemplateOutlet",o),sI(2),_g("ngTemplateOutlet",o);}},dependencies:[kb],styles:[`.mat-mdc-progress-spinner {
1
+ import {an as ue,g,L,ci as me,ap as zy,av as dt$1,j as jw,k as Cs,J as JC,m as hl,ai as rm,aj as iT,n as kg,a3 as ZI,M as Mg,o as aC,q as dC,t as sI,ak as nm,a6 as QI,_ as _g,u as cC,v as fC,a5 as Dl,aL as wo,aM as Zn$1,aO as wt$1,az as Xt,aW as C,cj as Pn,ce as kb,c8 as ob,af as wg,ag as ET,c9 as Pf,ck as Lf,ch as Ag,A as AC,S as Sg,ad as $g,b$ as UC,w as zg,x as jg,y as MC,N as NC,aJ as Tr,aG as fe,cl as be,p as pe,l as le,bU as Fd,b9 as T,b8 as B,be as A,b7 as u,bd as h,cm as M,d as O,ba as v,bb as m,c as b,cn as F,f,V,bc as R,co as H,cp as K,ca as _e,K as x,X as z$1,Y as Ue,am as Ym,i as Gn,e as pr,a0 as jt,a2 as Nt,a1 as Vt,b0 as Xg,ac as CC}from'./main-P72KGKGP.js';import {s as se}from'./chunk-B1VIKLB-.js';import {t as ti,Q as Qn,e as ei,Y as Ye$1,h as _n,A as At,m as mn,Z as Zn,c as cn,w as wt}from'./chunk-BLF3w_iN.js';var Xe=["determinateSpinner"];function et(c,e){if(c&1&&(Pf(),Cs(0,"svg",11),Mg(1,"circle",12),hl()),c&2){let t=CC();Sg("viewBox",t._viewBox()),sI(),$g("stroke-dasharray",t._strokeCircumference(),"px")("stroke-dashoffset",t._strokeCircumference()/2,"px")("stroke-width",t._circleStrokeWidth(),"%"),Sg("r",t._circleRadius());}}var tt=new C("mat-progress-spinner-default-options",{providedIn:"root",factory:()=>({diameter:qe})}),qe=100,nt=10,yt=(()=>{class c{_elementRef=g(Xt);_noopAnimations;get color(){return this._color||this._defaultColor}set color(t){this._color=t;}_color;_defaultColor="primary";_determinateCircle;constructor(){let t=g(tt),n=Pn(),i=this._elementRef.nativeElement;this._noopAnimations=n==="di-disabled"&&!!t&&!t._forceAnimations,this.mode=i.nodeName.toLowerCase()==="mat-spinner"?"indeterminate":"determinate",!this._noopAnimations&&n==="reduced-motion"&&i.classList.add("mat-progress-spinner-reduced-motion"),t&&(t.color&&(this.color=this._defaultColor=t.color),t.diameter&&(this.diameter=t.diameter),t.strokeWidth&&(this.strokeWidth=t.strokeWidth));}mode;get value(){return this.mode==="determinate"?this._value:0}set value(t){this._value=Math.max(0,Math.min(100,t||0));}_value=0;get diameter(){return this._diameter}set diameter(t){this._diameter=t||0;}_diameter=qe;get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(t){this._strokeWidth=t||0;}_strokeWidth;_circleRadius(){return (this.diameter-nt)/2}_viewBox(){let t=this._circleRadius()*2+this.strokeWidth;return `0 0 ${t} ${t}`}_strokeCircumference(){return 2*Math.PI*this._circleRadius()}_strokeDashOffset(){return this.mode==="determinate"?this._strokeCircumference()*(100-this._value)/100:null}_circleStrokeWidth(){return this.strokeWidth/this.diameter*100}static \u0275fac=function(n){return new(n||c)};static \u0275cmp=jw({type:c,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(n,i){if(n&1&&jg(Xe,5),n&2){let o;MC(o=NC())&&(i._determinateCircle=o.first);}},hostAttrs:["role","progressbar","tabindex","-1",1,"mat-mdc-progress-spinner","mdc-circular-progress"],hostVars:18,hostBindings:function(n,i){n&2&&(Sg("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow",i.mode==="determinate"?i.value:null)("mode",i.mode),UC("mat-"+i.color),$g("width",i.diameter,"px")("height",i.diameter,"px")("--mat-progress-spinner-size",i.diameter+"px")("--mat-progress-spinner-active-indicator-width",i.diameter+"px"),zg("_mat-animation-noopable",i._noopAnimations)("mdc-circular-progress--indeterminate",i.mode==="indeterminate"));},inputs:{color:"color",mode:"mode",value:[2,"value","value",ob],diameter:[2,"diameter","diameter",ob],strokeWidth:[2,"strokeWidth","strokeWidth",ob]},exportAs:["matProgressSpinner"],decls:14,vars:11,consts:[["circle",""],["determinateSpinner",""],["aria-hidden","true",1,"mdc-circular-progress__determinate-container"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__determinate-circle-graphic"],["cx","50%","cy","50%",1,"mdc-circular-progress__determinate-circle"],["aria-hidden","true",1,"mdc-circular-progress__indeterminate-container"],[1,"mdc-circular-progress__spinner-layer"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-left"],[3,"ngTemplateOutlet"],[1,"mdc-circular-progress__gap-patch"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-right"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__indeterminate-circle-graphic"],["cx","50%","cy","50%"]],template:function(n,i){if(n&1&&(wg(0,et,2,8,"ng-template",null,0,ET),Cs(2,"div",2,1),Pf(),Cs(4,"svg",3),Mg(5,"circle",4),hl()(),Lf(),Cs(6,"div",5)(7,"div",6)(8,"div",7),Ag(9,8),hl(),Cs(10,"div",9),Ag(11,8),hl(),Cs(12,"div",10),Ag(13,8),hl()()()),n&2){let o=AC(1);sI(4),Sg("viewBox",i._viewBox()),sI(),$g("stroke-dasharray",i._strokeCircumference(),"px")("stroke-dashoffset",i._strokeDashOffset(),"px")("stroke-width",i._circleStrokeWidth(),"%"),Sg("r",i._circleRadius()),sI(4),_g("ngTemplateOutlet",o),sI(2),_g("ngTemplateOutlet",o),sI(2),_g("ngTemplateOutlet",o);}},dependencies:[kb],styles:[`.mat-mdc-progress-spinner {
2
2
  --mat-progress-spinner-animation-multiplier: 1;
3
3
  display: block;
4
4
  overflow: hidden;