@whoz-oss/coday-client 0.0.0-workstream-forge.273 → 0.0.0-workstream-messaging.10

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 (91) hide show
  1. package/browser/chunk-0mZ3Y_ZJ.js +1 -0
  2. package/browser/chunk-1XF6Qsuy.js +1 -0
  3. package/browser/chunk-2KFuV5E5.js +671 -0
  4. package/browser/chunk-ATg3fmRI.js +1 -0
  5. package/browser/{chunk-CDUMxrcp.js → chunk-BFAp9jo2.js} +1 -1
  6. package/browser/chunk-BL1cOmqY.js +1 -0
  7. package/browser/chunk-BMbtNfWQ.js +1 -0
  8. package/browser/chunk-BqHLVmOf.js +1 -0
  9. package/browser/{chunk-BB9Gq9LM.js → chunk-BuwHCrKf.js} +1 -1
  10. package/browser/{chunk-BgL5ewFe.js → chunk-BwyYPrKV.js} +1 -1
  11. package/browser/chunk-C0i49sQV.js +1 -0
  12. package/browser/chunk-C4EP50-g.js +1 -0
  13. package/browser/chunk-C4OG4ewl.js +1 -0
  14. package/browser/chunk-C57t194y.js +1 -0
  15. package/browser/chunk-C7nsTLJX.js +1 -0
  16. package/browser/chunk-CCDRNHex.js +1 -0
  17. package/browser/chunk-CIeSnHU_.js +1 -0
  18. package/browser/chunk-CL0y_n4N.js +1 -0
  19. package/browser/chunk-CMZIhnyc.js +1 -0
  20. package/browser/chunk-CVlOQ_eN.js +1 -0
  21. package/browser/chunk-C_6VN9jF.js +1 -0
  22. package/browser/chunk-C_ual2NQ.js +2 -0
  23. package/browser/{chunk-CBVMv4ai.js → chunk-Cdql7t44.js} +1 -1
  24. package/browser/chunk-CqT7zdSp.js +1 -0
  25. package/browser/chunk-D2x7xu27.js +1 -0
  26. package/browser/chunk-D51v34BD.js +1 -0
  27. package/browser/chunk-D7Yaudd7.js +1 -0
  28. package/browser/chunk-D9gwrCSe.js +1 -0
  29. package/browser/chunk-DAoXL__Q.js +2 -0
  30. package/browser/chunk-DKPVmUTX.js +1 -0
  31. package/browser/{chunk-CZFKR68R.js → chunk-DPNOnAOU.js} +1 -1
  32. package/browser/chunk-D_jkAHyb.js +1 -0
  33. package/browser/{chunk-CBWtz2mG.js → chunk-DoiOjutD.js} +1 -1
  34. package/browser/chunk-DpA9bfvt.js +1 -0
  35. package/browser/chunk-DqrAPruo.js +1 -0
  36. package/browser/chunk-Dt3vfYW7.js +1 -0
  37. package/browser/chunk-DvR4terh.js +1 -0
  38. package/browser/{chunk-BnhHFWL5.js → chunk-R1TauUsQ.js} +1 -1
  39. package/browser/chunk-SMenvxTt.js +1 -0
  40. package/browser/chunk-dszE6BqR.js +1 -0
  41. package/browser/chunk-hCtZ2RNp.js +1 -0
  42. package/browser/chunk-ijPuDimC.js +1 -0
  43. package/browser/chunk-nnH-h9C7.js +1 -0
  44. package/browser/chunk-peLkf2eQ.js +1 -0
  45. package/browser/{chunk-Dadlh5JC.js → chunk-rKr5ufU2.js} +1 -1
  46. package/browser/chunk-tNsYxLDx.js +1 -0
  47. package/browser/chunk-wXEAK6xj.js +1 -0
  48. package/browser/chunk-wmoMXtn0.js +1 -0
  49. package/browser/chunk-x7GGjcqr.js +1 -0
  50. package/browser/index.html +1 -1
  51. package/browser/main-EPHSXFSY.js +1254 -0
  52. package/package.json +1 -1
  53. package/browser/chunk-0ZtY80DW.js +0 -1
  54. package/browser/chunk-14mxT3bD.js +0 -1
  55. package/browser/chunk-9n3XkPN1.js +0 -1
  56. package/browser/chunk-B0xq8HoB.js +0 -1
  57. package/browser/chunk-BQof2LNq.js +0 -1
  58. package/browser/chunk-BSRpGLZu.js +0 -1
  59. package/browser/chunk-BTUoHs1a.js +0 -1
  60. package/browser/chunk-BZjbpPBa.js +0 -671
  61. package/browser/chunk-BbjUb8n0.js +0 -1
  62. package/browser/chunk-BkPDwEh1.js +0 -1
  63. package/browser/chunk-BmsFJQ_v.js +0 -2
  64. package/browser/chunk-Bt4hGQrm.js +0 -1
  65. package/browser/chunk-C1EaR3-9.js +0 -1
  66. package/browser/chunk-C9MRS4KJ.js +0 -1
  67. package/browser/chunk-CAqIYs7P.js +0 -1
  68. package/browser/chunk-C_vj5e-Y.js +0 -1
  69. package/browser/chunk-CaSk42fD.js +0 -1
  70. package/browser/chunk-CeqhBlc6.js +0 -1
  71. package/browser/chunk-CfhLsKNC.js +0 -1
  72. package/browser/chunk-Cix3-0K2.js +0 -1
  73. package/browser/chunk-CjVNMPMk.js +0 -2
  74. package/browser/chunk-Cl72Xnim.js +0 -1
  75. package/browser/chunk-CuwUFZ9P.js +0 -1
  76. package/browser/chunk-CyYuvnGm.js +0 -1
  77. package/browser/chunk-D68ToWiu.js +0 -1
  78. package/browser/chunk-DDZiCKt-.js +0 -1
  79. package/browser/chunk-DKbc-fih.js +0 -1
  80. package/browser/chunk-Daidn0iH.js +0 -1
  81. package/browser/chunk-DgEngWkY.js +0 -1
  82. package/browser/chunk-Dnc62mls.js +0 -1
  83. package/browser/chunk-NON463g4.js +0 -1
  84. package/browser/chunk-PGJjZGrF.js +0 -1
  85. package/browser/chunk-VCV19Z6L.js +0 -1
  86. package/browser/chunk-dCxf5p0L.js +0 -1
  87. package/browser/chunk-hha5EuTF.js +0 -1
  88. package/browser/chunk-hmzIFgbE.js +0 -1
  89. package/browser/chunk-q02QECba.js +0 -1
  90. package/browser/chunk-sKMEQoDc.js +0 -1
  91. package/browser/main-G2NDWI4S.js +0 -1253
@@ -0,0 +1 @@
1
+ import {p as pt,T as Te,b as bn,v as vn,d as yn,e as fn,n as pn,h as hn,i as at,u as un,K as Kt,a as fd,M as Mo,D as Do,U as Ut,P as Pn,q as Mn,Q as Qt,c as fo,g as go,t as ta,Z as Zr,N as Nn,R as Rn,E as Ea}from'./chunk-2KFuV5E5.js';import {g,W,F,v as we,au as k,at as F$1,ad as F$2,a6 as Zs,ae as Dr,av as Fe,i as VC,M as Mi,s as sf,x as U,E as x,C as w,a as ew,o as os,K as qh,b as pC,z as zu,I as Iw,c as IE,J as Vh,w as ww,R as Rw,H as Hh,N as lI,T as Tw,as as bw,L as Lw,Q as fI,_ as _w,Y as Yu,ai as Dw,l as lg,$ as dg,P as Pd,n as Ld}from'./main-EPHSXFSY.js';function he(r,t){r&1&&(os(0,"p",2),pC(1,"Loading\u2026"),zu());}function ve(r,t){if(r&1&&Hh(0,"input",6),r&2){let e=Lw(2);Vh("value",e.selectedProviderLabel());}}function ye(r,t){if(r&1&&(os(0,"option",44),pC(1),zu()),r&2){let e=t.$implicit;Vh("value",e.id),IE(),dg("",e.name," (",e.apiType,")");}}function be(r,t){if(r&1&&(os(0,"select",7)(1,"option",43),pC(2,"Select provider"),zu(),Tw(3,ye,2,3,"option",44,Dw().trackByProvider,true),zu(),lI()),r&2){let e=Lw(2);Vh("formControl",e.aiProviderIdControl),fI(),IE(3),_w(e.providers());}}function xe(r,t){if(r&1&&(os(0,"option",25),pC(1),zu()),r&2){let e=t.$implicit;Vh("ngValue",e),IE(),lg(e.toLowerCase());}}function _e(r,t){r&1&&(os(0,"p",2),pC(1,"Not supported yet for Anthropic and Gemini providers."),zu());}function Me(r,t){r&1&&(os(0,"p",2),pC(1," Sent as is to OpenAI-compatible providers, which reject levels the model does not support. Through Requesty, Claude models do not apply it faithfully. "),zu());}function Ee(r,t){r&1&&(os(0,"p",26),pC(1," OpenAI reasoning models (GPT-5.1 and later) reject a temperature other than 1 with an effort: leave Temperature empty or set it to 1. "),zu());}function Ae(r,t){if(r&1){let e=Rw();os(0,"form",4),qh("ngSubmit",function(){Pd(e);let u=Lw();return Ld(u.submit())}),os(1,"ds-form-field",5),Iw(2,ve,1,1,"input",6)(3,be,5,1,"select",7),zu(),os(4,"ds-form-field",8),Hh(5,"input",9),lI(),zu(),os(6,"ds-form-field",10),Hh(7,"input",11),lI(),zu(),os(8,"ds-form-field",12),Hh(9,"input",13),lI(),zu(),os(10,"ds-form-field",14),Hh(11,"input",15),lI(),zu(),os(12,"div",16)(13,"ds-form-field",17),Hh(14,"input",18),lI(),zu(),os(15,"ds-form-field",19),Hh(16,"input",20),lI(),zu()(),os(17,"ds-form-field",21),Hh(18,"input",22),lI(),zu(),os(19,"ds-form-field",23)(20,"select",24)(21,"option",25),pC(22,"Provider default"),zu(),Tw(23,xe,2,2,"option",25,bw),zu(),lI(),Iw(25,_e,2,0,"p",2)(26,Me,2,0,"p",2),Iw(27,Ee,2,0,"p",26),zu(),os(28,"div",27)(29,"label",28),Hh(30,"input",29),lI(),os(31,"span",30),pC(32,"Supports advanced execution"),zu()(),os(33,"p",31),pC(34," Agents configured in ADVANCED execution mode fail to run on a model that does not support it. SIMPLE agents are not concerned. "),zu()(),os(35,"ds-fieldset",32)(36,"div",16)(37,"ds-form-field",33),Hh(38,"input",34),lI(),zu(),os(39,"ds-form-field",35),Hh(40,"input",36),lI(),zu()(),os(41,"div",16)(42,"ds-form-field",37),Hh(43,"input",38),lI(),zu(),os(44,"ds-form-field",39),Hh(45,"input",40),lI(),zu()()(),os(46,"ds-form-actions")(47,"button",41),pC(48),zu(),os(49,"button",42),qh("click",function(){Pd(e);let u=Lw();return Ld(u.cancel())}),pC(50,"Cancel"),zu()()();}if(r&2){let e=Lw();Vh("formGroup",e.form),IE(2),ww(e.isEditMode()?2:3),IE(3),Vh("formControl",e.apiModelNameControl),fI(),IE(2),Vh("formControl",e.descriptionControl),fI(),IE(2),Vh("formControl",e.aliasControl),fI(),IE(2),Vh("formControl",e.priorityControl),fI(),IE(3),Vh("formControl",e.temperatureControl),fI(),IE(2),Vh("formControl",e.contextWindowControl),fI(),IE(2),Vh("formControl",e.maxCompletionTokensControl),fI(),IE(2),Vh("formControl",e.reasoningEffortControl),fI(),IE(),Vh("ngValue",null),IE(2),_w(e.reasoningEffortOptions),IE(2),ww(e.reasoningEffortUnsupported()?25:26),IE(2),ww(e.temperatureMayConflictWithEffort()?27:-1),IE(3),Vh("formControl",e.supportsAdvancedExecutionControl),fI(),IE(5),Vh("formGroup",e.pricingGroup),IE(3),fI(),IE(2),fI(),IE(3),fI(),IE(2),fI(),IE(2),Vh("disabled",e.form.invalid||e.isSubmitting()),IE(),Yu(" ",e.isEditMode()?"Save changes":"Create"," ");}}var Ie=["Anthropic","Gemini"],ge=class r{route=g(W);router=g(F);destroyRef=g(we);aiModelController=g(k);aiProviderController=g(F$1);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=this.namespaceId===void 0;providers=F$2(this.aiProviderController.listAiProvider(this.isPlatformMode?"none":this.namespaceId).pipe(Zs(()=>Dr([]))),{initialValue:[]});form=new pt({aiProviderId:new Te("",{nonNullable:true,validators:[bn.required]}),apiModelName:new Te("",{nonNullable:true,validators:[bn.required,bn.minLength(1)]}),description:new Te(null),alias:new Te("",{nonNullable:true}),priority:new Te(0,{nonNullable:true}),temperature:new Te(null),contextWindow:new Te(null),maxCompletionTokens:new Te(null),reasoningEffort:new Te(null),supportsAdvancedExecution:new Te(false,{nonNullable:true}),pricing:new pt({inputMTokens:new Te(null),outputMTokens:new Te(null),cacheWrite:new Te(null),cacheRead:new Te(null)})});get aiProviderIdControl(){return this.form.controls.aiProviderId}get apiModelNameControl(){return this.form.controls.apiModelName}get descriptionControl(){return this.form.controls.description}get aliasControl(){return this.form.controls.alias}get priorityControl(){return this.form.controls.priority}get temperatureControl(){return this.form.controls.temperature}get contextWindowControl(){return this.form.controls.contextWindow}get maxCompletionTokensControl(){return this.form.controls.maxCompletionTokens}get reasoningEffortControl(){return this.form.controls.reasoningEffort}get supportsAdvancedExecutionControl(){return this.form.controls.supportsAdvancedExecution}get pricingGroup(){return this.form.controls.pricing}reasoningEffortOptions=Object.values(Fe);selectedProviderId=F$2(this.form.controls.aiProviderId.valueChanges,{initialValue:this.form.controls.aiProviderId.value});reasoningEffortUnsupported=VC(()=>{let t=this.providers().find(e=>e.id===this.selectedProviderId())?.apiType;return t!==void 0&&Ie.includes(t)});temperatureValue=F$2(this.form.controls.temperature.valueChanges,{initialValue:this.form.controls.temperature.value});reasoningEffortValue=F$2(this.form.controls.reasoningEffort.valueChanges,{initialValue:this.form.controls.reasoningEffort.value});temperatureMayConflictWithEffort=VC(()=>{let t=this.temperatureValue();return this.reasoningEffortValue()!=null&&t!=null&&t!==1});isEditMode=Mi(false);isSubmitting=Mi(false);isLoading=Mi(false);selectedProviderLabel=VC(()=>{let t=this.aiProviderIdControl.value,e=this.providers().find(c=>c.id===t);return e?`${e.name} (${e.apiType})`:t});existingModel=null;constructor(){sf(()=>{this.reasoningEffortUnsupported()?(this.reasoningEffortControl.setValue(null),this.reasoningEffortControl.disable()):this.reasoningEffortControl.enable();});}ngOnInit(){let t=this.route.snapshot.paramMap.get("modelId");t&&(this.isEditMode.set(true),this.loadModel(t));}loadModel(t){this.isLoading.set(true),this.aiModelController.getByIdAiModel(t).pipe(U(this.destroyRef)).subscribe({next:e=>{this.existingModel=e,this.aiProviderIdControl.setValue(e.aiProviderId),this.aiProviderIdControl.disable(),this.apiModelNameControl.setValue(e.apiModelName),this.descriptionControl.setValue(e.description??null),this.aliasControl.setValue(e.alias??""),this.priorityControl.setValue(e.priority??0),this.temperatureControl.setValue(e.temperature??null),this.contextWindowControl.setValue(e.contextWindow??null),this.maxCompletionTokensControl.setValue(e.maxCompletionTokens??null),this.reasoningEffortControl.setValue(e.reasoningEffort??null),this.supportsAdvancedExecutionControl.setValue(e.supportsAdvancedExecution??false),this.pricingGroup.setValue({inputMTokens:e.pricing?.inputMTokens??null,outputMTokens:e.pricing?.outputMTokens??null,cacheWrite:e.pricing?.cacheWrite??null,cacheRead:e.pricing?.cacheRead??null}),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),this.navigateBack();}});}submit(){if(this.form.invalid||this.isSubmitting())return;this.isSubmitting.set(true);let t=this.form.getRawValue(),e=t.pricing,u=e.inputMTokens!=null||e.outputMTokens!=null||e.cacheWrite!=null||e.cacheRead!=null?{isEmpty:false,inputMTokens:e.inputMTokens??void 0,outputMTokens:e.outputMTokens??void 0,cacheWrite:e.cacheWrite??void 0,cacheRead:e.cacheRead??void 0}:void 0,w$1=x(w({},this.existingModel??{}),{aiProviderId:t.aiProviderId,namespaceId:this.isPlatformMode?void 0:this.existingModel?.namespaceId??this.namespaceId,apiModelName:t.apiModelName.trim(),description:t.description?.trim()||void 0,alias:t.alias.trim()||void 0,priority:t.priority,temperature:t.temperature??void 0,contextWindow:t.contextWindow??void 0,maxCompletionTokens:t.maxCompletionTokens??void 0,reasoningEffort:t.reasoningEffort??void 0,supportsAdvancedExecution:t.supportsAdvancedExecution,pricing:u});(this.isEditMode()?this.aiModelController.updateAiModel(this.existingModel.id??"",w$1):this.aiModelController.createAiModel(w$1)).pipe(U(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(false)});}cancel(){this.navigateBack();}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","ai-models"]):this.router.navigate(["/agentos",this.namespaceId,"ai-models"]);}trackByProvider(t,e){return e.id??""}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=ew({type:r,selectors:[["agentos-ai-model-form"]],decls:6,vars:2,consts:[[3,"title"],["dsButton","","variant","ghost","type","button","title","Back to AI models",3,"click"],[1,"ds-hint"],[1,"ds-form",3,"formGroup"],[1,"ds-form",3,"ngSubmit","formGroup"],["label","Provider","controlId","model-provider","required",""],["dsControl","","id","model-provider","type","text","readonly","","tabindex","-1",3,"value"],["dsControl","","id","model-provider",3,"formControl"],["label","API name","controlId","model-api-name","required",""],["dsControl","","mono","","id","model-api-name","type","text","placeholder","e.g. gpt-4o, claude-3-5-sonnet-20241022","autocomplete","off",3,"formControl"],["label","Description","controlId","model-description"],["dsControl","","id","model-description","type","text","placeholder","Optional \u2014 short description of this model config","autocomplete","off",3,"formControl"],["label","Alias","controlId","model-alias"],["dsControl","","id","model-alias","type","text","placeholder","e.g. fast, smart \u2014 short identifier used internally","autocomplete","off",3,"formControl"],["label","Priority","controlId","model-priority"],["dsControl","","id","model-priority","type","number","placeholder","0 \u2014 higher wins when multiple configs share the same alias","min","0","step","1",3,"formControl"],[1,"ds-grid-2"],["label","Temperature","controlId","model-temperature"],["dsControl","","id","model-temperature","type","number","placeholder","0 \u2013 2","min","0","max","2","step","0.1",3,"formControl"],["label","Context window","controlId","model-context-window"],["dsControl","","id","model-context-window","type","number","placeholder","e.g. 128000","min","1","step","1",3,"formControl"],["label","Max completion tokens","controlId","model-max-completion-tokens"],["dsControl","","id","model-max-completion-tokens","type","number","placeholder","e.g. 4096","min","1","step","1",3,"formControl"],["label","Reasoning effort","controlId","model-reasoning-effort"],["dsControl","","id","model-reasoning-effort",3,"formControl"],[3,"ngValue"],[1,"ds-hint","ds-hint--warning"],[1,"ai-model-form__field"],[1,"ai-model-form__toggle-label"],["type","checkbox",1,"ai-model-form__toggle-checkbox",3,"formControl"],[1,"ai-model-form__toggle-text"],[1,"ai-model-form__toggle-hint"],["legend","Pricing","legendHint","per million tokens \u2014 leave blank to skip cost monitoring",3,"formGroup"],["label","Input","controlId","pricing-input"],["dsControl","","id","pricing-input","type","number","placeholder","e.g. 2.50","min","0","step","0.01","formControlName","inputMTokens"],["label","Output","controlId","pricing-output"],["dsControl","","id","pricing-output","type","number","placeholder","e.g. 10.00","min","0","step","0.01","formControlName","outputMTokens"],["label","Cache write","controlId","pricing-cache-write"],["dsControl","","id","pricing-cache-write","type","number","placeholder","e.g. 3.75","min","0","step","0.01","formControlName","cacheWrite"],["label","Cache read","controlId","pricing-cache-read"],["dsControl","","id","pricing-cache-read","type","number","placeholder","e.g. 0.30","min","0","step","0.01","formControlName","cacheRead"],["dsButton","","variant","primary","type","submit",3,"disabled"],["dsButton","","type","button",3,"click"],["value","","disabled",""],[3,"value"]],template:function(e,c){e&1&&(os(0,"ds-page")(1,"ds-section-header",0)(2,"button",1),qh("click",function(){return c.cancel()}),pC(3," \u2190 AI models "),zu()(),Iw(4,he,2,0,"p",2)(5,Ae,51,17,"form",3),zu()),e&2&&(IE(),Vh("title",c.isEditMode()?"Edit AI model":"New AI model"),IE(3),ww(c.isLoading()?4:5));},dependencies:[vn,yn,fn,pn,hn,at,un,Kt,fd,Mo,Do,Ut,Pn,Mn,Qt,fo,go,ta,Zr,Nn,Rn,Ea],encapsulation:2})};export{ge as AiModelFormComponent};
@@ -0,0 +1 @@
1
+ import {O as O$1}from'./chunk-C0i49sQV.js';import {I}from'./chunk-x7GGjcqr.js';import {O}from'./chunk-CL0y_n4N.js';import {g,v as we,M as Mi,i as VC,ad as F,aw as $m,ah as te,x as U,a as ew,o as os,H as Hh,I as Iw,z as zu,c as IE,w as ww,aF as Qs,E as x,C as w,X as Kb,b as pC,R as Rw,K as qh,L as Lw,J as Vh,G as Gu,d as Wu,T as Tw,_ as _w,N as lI,l as lg,Q as fI,Y as Yu,f as Gh,$ as dg,Z as Zh,P as Pd,n as Ld,ai as Dw,a0 as RC,a1 as FC,O as Op}from'./main-EPHSXFSY.js';import {y,$ as k,a0 as B,a1 as a,p as pt,T as Te,a2 as v,a3 as V,K as Kt,a as fd,M as Mo,D as Do,U as Ut,Q as Qt,c as fo,g as go,R as Rn,E as Ea,v as vn,d as yn,e as fn,a4 as gn,h as hn,i as at$1,u as un,m as mn,a5 as ji,G as Ni,L as M,j as e,a6 as m,a7 as S}from'./chunk-2KFuV5E5.js';import'./chunk-BMbtNfWQ.js';var Ve=(n,t)=>t.id;function Ne(n,t){if(n&1){let e=Rw();Gu(0,"span",10),pC(1,"Unlink?"),Wu(),Gu(2,"button",11),Zh("click",function(){Pd(e);let r=Lw(),c=Lw(3);return Ld(c.unlink(r))}),pC(3," Confirm "),Wu(),Gu(4,"button",12),Zh("click",function(){Pd(e);let r=Lw(4);return Ld(r.pendingUnlinkId.set(null))}),pC(5,"Cancel"),Wu();}}function Fe(n,t){if(n&1){let e=Rw();Gu(0,"button",12),Zh("click",function(){Pd(e);let r=Lw(),c=Lw(3);return Ld(c.pendingUnlinkId.set(r.id))}),pC(1," Unlink "),Wu();}}function Ae(n,t){if(n&1&&(Gu(0,"span",7),pC(1),Gu(2,"span",8),pC(3),RC(4,"date"),Wu()(),Iw(5,Ne,6,0)(6,Fe,2,0,"button",9)),n&2){let e=t,i=Lw(3);IE(),Yu(" ",e.displayName," "),IE(2),Yu("linked ",FC(4,3,e.linkedAt,"mediumDate")),IE(2),ww(i.pendingUnlinkId()===e.id?5:6);}}function Le(n,t){if(n&1){let e=Rw();Gu(0,"span",8),pC(1," Then send it this message: "),Gu(2,"code",14),pC(3),Wu(),Gu(4,"button",12),Zh("click",function(){let r=Pd(e),c=Lw(4);return Ld(c.copy(r))}),pC(5,"Copy"),Wu(),pC(6),RC(7,"date"),Wu();}if(n&2){let e=Lw();IE(3),lg(t),IE(3),Yu(" Valid until ",FC(7,2,e.expiresAt,"shortTime"),". ");}}function Ge(n,t){if(n&1&&(Gu(0,"span",8),pC(1),RC(2,"date"),Wu()),n&2){let e=Lw(),i=Lw().$implicit,r=Lw(2);IE(),dg(" Press Start in ",r.platformName(i.platform),", then come back here. Valid until ",FC(2,2,e.expiresAt,"shortTime"),". ");}}function Re(n,t){if(n&1&&(Gu(0,"a",13),pC(1),Wu(),Iw(2,Le,8,5,"span",8)(3,Ge,3,5,"span",8)),n&2){let e,i=t,r=Lw().$implicit;Gh("href",i.url,Op),IE(),Yu(" Open @",r.username," "),IE(),ww((e=i.code)?2:3,e);}}function $e(n,t){if(n&1){let e=Rw();Gu(0,"span",15),pC(1,"Not connected"),Wu(),Gu(2,"button",16),Zh("click",function(){Pd(e);let r=Lw().$implicit,c=Lw(2);return Ld(c.connect(r))}),pC(3," Connect "),Wu();}}function Be(n,t){if(n&1&&(Gu(0,"div",3)(1,"span",5),pC(2),Gu(3,"a",6),pC(4),Wu()(),Iw(5,Ae,7,6)(6,Re,4,3)(7,$e,4,0),Wu()),n&2){let e,i=t.$implicit,r=Lw(2);IE(2),Yu(" ",i.agentName," "),IE(),Gh("href",i.url,Op),IE(),dg(" @",i.username," on ",r.platformName(i.platform)," "),IE(),ww((e=r.identityOf(i))?5:(e=r.linkOf(i))?6:7,e);}}function Ke(n,t){if(n&1){let e=Rw();Gu(0,"div",3)(1,"span",5),pC(2),Gu(3,"span",8),pC(4),Wu()(),Gu(5,"span",7),pC(6),Wu(),Gu(7,"button",12),Zh("click",function(){let r=Pd(e).$implicit,c=Lw(2);return Ld(c.unlink(r))}),pC(8,"Unlink"),Wu()();}if(n&2){let e=t.$implicit,i=Lw(2);IE(2),Yu(" ",e.agentName??"A removed bot"," "),IE(2),lg(i.platformName(e.platform)),IE(2),lg(e.displayName);}}function ze(n,t){n&1&&(Gu(0,"p",4),pC(1),Wu()),n&2&&(IE(),lg(t));}function je(n,t){if(n&1&&(Gu(0,"div",0)(1,"h2",1),pC(2,"Messaging"),Wu(),Gu(3,"p",2),pC(4," Talk to your agents from a messaging application: each agent with a bot answers there, in your cases. "),Wu(),Tw(5,Be,8,5,"div",3,Ve),Tw(7,Ke,9,3,"div",3,Ve),Iw(9,ze,2,1,"p",4),Wu()),n&2){let e,i=Lw();IE(5),_w(i.bots()),IE(2),_w(i.orphanIdentities()),IE(2),ww((e=i.error())?9:-1,e);}}var R=class n{messagingState=g(M);destroyRef=g(we);bots=this.messagingState.bots;platformName=e;orphanIdentities=VC(()=>this.messagingState.identities().filter(t=>!this.bots().some(e=>e.id===t.botId)));visible=VC(()=>this.bots().length>0||this.messagingState.identities().length>0);links=Mi({});pendingUnlinkId=Mi(null);error=Mi(null);constructor(){this.refresh(),Qs(window,"focus").pipe(U()).subscribe(()=>{Object.keys(this.links()).length>0&&this.refresh();});}identityOf(t){return this.messagingState.identities().find(e=>e.botId===t.id)}linkOf(t){return this.links()[t.id]}connect(t){this.error.set(null),this.messagingState.createLink(t.id).pipe(U(this.destroyRef)).subscribe({next:e=>this.links.update(i=>x(w({},i),{[t.id]:e})),error:e=>{console.error(`[MessagingAccounts] Could not get a link to @${t.username}:`,e),this.error.set(`Could not get a link to @${t.username}. Please try again.`);}});}copy(t){navigator.clipboard?.writeText(t).catch(()=>{});}unlink(t){this.pendingUnlinkId.set(null),this.messagingState.unlink(t.id).pipe(U(this.destroyRef)).subscribe({error:e=>{console.error(`[MessagingAccounts] Unlink failed for ${t.id}:`,e),this.error.set("Could not unlink the account. Please try again.");}});}refresh(){this.messagingState.load().pipe(U(this.destroyRef)).subscribe({next:([,t])=>this.links.update(e=>Object.fromEntries(Object.entries(e).filter(([i])=>!t.some(r=>r.botId===i)))),error:t=>console.error("[MessagingAccounts] Could not load the messaging accounts:",t)});}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ew({type:n,selectors:[["agentos-messaging-accounts"]],decls:1,vars:1,consts:[[1,"messaging-accounts"],[1,"messaging-accounts__title"],[1,"messaging-accounts__hint"],[1,"messaging-accounts__row"],["role","alert",1,"messaging-accounts__error"],[1,"messaging-accounts__platform"],["target","_blank","rel","noopener",1,"messaging-accounts__since",3,"href"],[1,"messaging-accounts__account"],[1,"messaging-accounts__since"],["type","button",1,"messaging-accounts__btn"],[1,"messaging-accounts__confirm"],["type","button",1,"messaging-accounts__btn","messaging-accounts__btn--danger",3,"click"],["type","button",1,"messaging-accounts__btn",3,"click"],["target","_blank","rel","noopener",1,"messaging-accounts__btn","messaging-accounts__btn--primary",3,"href"],[1,"messaging-accounts__code"],[1,"messaging-accounts__account","messaging-accounts__account--none"],["type","button",1,"messaging-accounts__btn","messaging-accounts__btn--primary",3,"click"]],template:function(e,i){e&1&&Iw(0,je,10,1,"div",0),e&2&&ww(i.visible()?0:-1);},dependencies:[Kb],styles:[".messaging-accounts[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem}.messaging-accounts__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}.messaging-accounts__hint[_ngcontent-%COMP%], .messaging-accounts__since[_ngcontent-%COMP%]{margin:0;font-size:.8125rem;color:var(--color-text-secondary)}.messaging-accounts__row[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;align-items:baseline;gap:.75rem}.messaging-accounts__platform[_ngcontent-%COMP%]{display:inline-flex;flex-direction:column;gap:.125rem;min-width:180px;font-size:.875rem;font-weight:500;color:var(--color-text-secondary)}.messaging-accounts__platform[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{text-decoration:none}.messaging-accounts__platform[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}.messaging-accounts__account[_ngcontent-%COMP%]{display:inline-flex;flex-direction:column;gap:.125rem;flex:1;font-size:.9375rem;color:var(--color-text)}.messaging-accounts__account--none[_ngcontent-%COMP%]{color:var(--color-text-secondary)}.messaging-accounts__confirm[_ngcontent-%COMP%]{font-size:.875rem;color:var(--color-text-secondary)}.messaging-accounts__btn[_ngcontent-%COMP%]{padding:.4rem .9rem;border:1px solid var(--color-divider);background:transparent;color:var(--color-text);font-size:13px;font-family:var(--font-heading);font-weight:600;text-decoration:none;cursor:pointer}.messaging-accounts__btn[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover);border-color:var(--color-neutral-500)}.messaging-accounts__btn--primary[_ngcontent-%COMP%]{border-color:var(--color-accent);color:var(--color-accent)}.messaging-accounts__btn--danger[_ngcontent-%COMP%]{border-color:var(--color-error, #c62828);color:var(--color-error, #c62828)}.messaging-accounts__error[_ngcontent-%COMP%]{margin:0;font-size:.875rem;color:var(--color-error, #c62828)}.messaging-accounts__code[_ngcontent-%COMP%]{padding:.1rem .4rem;border:1px solid var(--color-divider);border-radius:var(--radius-sm, 0);font-family:var(--font-mono, monospace);word-break:break-all}"]})};var He=(n,t)=>t.value,Ye=(n,t)=>t.title;function Je(n,t){n&1&&(os(0,"p",2),pC(1,"Loading\u2026"),zu());}function qe(n,t){if(n&1&&(os(0,"option",27),pC(1),zu()),n&2){let e=t.$implicit;Vh("value",e.value),IE(),lg(e.label);}}function Qe(n,t){if(n&1){let e=Rw();os(0,"form",15),qh("ngSubmit",function(){Pd(e);let r=Lw(2);return Ld(r.save())}),os(1,"ds-group",16)(2,"dl",17)(3,"dt"),pC(4,"Email"),zu(),os(5,"dd"),pC(6),zu(),os(7,"dt"),pC(8,"External ID"),zu(),os(9,"dd"),pC(10),zu()()(),os(11,"ds-group",18)(12,"ds-form-field",19),Hh(13,"input",20),lI(),zu(),os(14,"ds-form-field",21),Hh(15,"input",22),lI(),zu(),os(16,"ds-form-field",23),Hh(17,"textarea",24),lI(),zu(),os(18,"ds-form-field",25)(19,"select",26),Tw(20,qe,2,2,"option",27,He),zu(),lI(),zu()(),os(22,"ds-form-actions")(23,"button",28),pC(24),zu(),os(25,"button",29),qh("click",function(){Pd(e);let r=Lw(2);return Ld(r.cancelEditing())}),pC(26,"Cancel"),zu()()();}if(n&2){let e=Lw(),i=Lw();Vh("formGroup",i.form),IE(6),lg(e.email),IE(4),lg(e.externalId),IE(3),fI(),IE(2),fI(),IE(2),fI(),IE(2),fI(),IE(),_w(i.languageOptions),IE(3),Vh("disabled",i.isSaving()),IE(),Yu(" ",i.isSaving()?"Saving\u2026":"Save changes"," ");}}function We(n,t){n&1&&(os(0,"p",2),pC(1," No global configuration yet. Create one from the Integrations / AI Providers / Auth Settings pages of your namespaces. "),zu());}function Xe(n,t){if(n&1){let e=Rw();os(0,"span",38),pC(1,"Delete?"),zu(),os(2,"button",39),qh("click",function(){Pd(e);let r=Lw().$implicit,c=Lw(5);return Ld(c.confirmDelete(r))}),pC(3,"Confirm"),zu(),os(4,"button",40),qh("click",function(){Pd(e);let r=Lw(6);return Ld(r.cancelDelete())}),pC(5,"Cancel"),zu();}}function Ze(n,t){if(n&1){let e=Rw();os(0,"button",40),qh("click",function(){Pd(e);let r=Lw().$implicit,c=Lw(5);return Ld(c.armDelete(r))}),pC(1,"Delete"),zu();}}function et(n,t){if(n&1&&(os(0,"li",34)(1,"span",35),pC(2),zu(),os(3,"span",36),pC(4),zu(),Iw(5,Xe,6,0)(6,Ze,2,0,"button",37),zu()),n&2){let e=t.$implicit,i=Lw(5);IE(2),lg(e.name),IE(2),lg(e.subtitle),IE(),ww(i.isPendingDelete(e)?5:6);}}function tt(n,t){if(n&1&&(os(0,"span",32),pC(1),zu(),os(2,"ul",33),Tw(3,et,7,3,"li",34,Dw().trackEntry,true),zu()),n&2){let e=t.$implicit;IE(),lg(e.title),IE(2),_w(e.entries);}}function nt(n,t){if(n&1&&Tw(0,tt,5,1,null,null,Ye),n&2){let e=Lw(3);_w(e.recapSections());}}function it(n,t){if(n&1){let e=Rw();os(0,"ds-group",16)(1,"dl",17)(2,"dt"),pC(3,"Email"),zu(),os(4,"dd"),pC(5),zu(),os(6,"dt"),pC(7,"External ID"),zu(),os(8,"dd"),pC(9),zu()()(),os(10,"ds-group",18)(11,"dl",17)(12,"dt"),pC(13,"First name"),zu(),os(14,"dd"),pC(15),zu(),os(16,"dt"),pC(17,"Last name"),zu(),os(18,"dd"),pC(19),zu(),os(20,"dt"),pC(21,"Bio"),zu(),os(22,"dd"),pC(23),zu(),os(24,"dt"),pC(25,"Language"),zu(),os(26,"dd"),pC(27),zu()()(),os(28,"ds-form-actions")(29,"button",30),qh("click",function(){Pd(e);let r=Lw(2);return Ld(r.startEditing())}),pC(30,"Edit profile"),zu()(),os(31,"ds-disclosure",31),qh("toggled",function(){Pd(e);let r=Lw(2);return Ld(r.toggleOverrides())}),Iw(32,We,2,0,"p",2)(33,nt,2,0),zu();}if(n&2){let e=Lw(),i=Lw();IE(5),lg(e.email),IE(4),lg(e.externalId),IE(6),lg(e.firstname||"\u2014"),IE(4),lg(e.lastname||"\u2014"),IE(4),lg(e.bio||"\u2014"),IE(4),lg(e.preferredLanguage||"\u2014"),IE(4),Vh("heading","My global user configurations ("+i.recap().total+")")("open",i.isOverridesExpanded()),IE(),ww(i.recap().total===0?32:33);}}function ot(n,t){if(n&1){let e=Rw();os(0,"ds-group",3)(1,"ds-form-field",4)(2,"ds-segmented",5),qh("valueChange",function(r){Pd(e);let c=Lw();return Ld(c.setThemeVariant(r))}),zu()(),os(3,"ds-form-field",6)(4,"ds-segmented",7),qh("valueChange",function(r){Pd(e);let c=Lw();return Ld(c.setTheme(r))}),zu()()(),os(5,"ds-group",8)(6,"ds-form-field",9)(7,"ds-segmented",10),qh("valueChange",function(r){Pd(e);let c=Lw();return Ld(c.setEnterKeyBehavior(r))}),zu()()(),os(8,"ds-group",11)(9,"ds-form-field",12)(10,"ds-segmented",13),qh("valueChange",function(r){Pd(e);let c=Lw();return Ld(c.setShowTechnical(r))}),zu()()(),Hh(11,"agentos-messaging-accounts"),Iw(12,Qe,27,5,"form",14)(13,it,34,9);}if(n&2){let e=Lw();IE(),Vh("hint",e.activeVariantDescription()),IE(),Vh("options",e.themeVariantOptions)("value",e.themeVariant()),IE(),Vh("hint",e.modeOverridden()?e.activeVariantLabel()+" does not support this mode; your choice is kept for other skins.":null),IE(),Vh("options",e.modeOptions())("value",e.shownMode()),IE(3),Vh("options",e.enterKeyOptions)("value",e.enterKeyBehavior()),IE(3),Vh("options",e.showTechnicalOptions)("value",e.showTechnical()),IE(2),ww(e.isEditing()?12:13);}}function at(n,t){n&1&&(os(0,"p",2),pC(1,"Unable to load profile."),zu());}var Ie=class n{userState=g(y);destroyRef=g(we);integrationState=g(O);providerState=g(O$1);authSettingState=g(I);themePort=g(k);preferencesPort=g(B);isEditing=Mi(false);isLoading=Mi(false);isSaving=Mi(false);isOverridesExpanded=Mi(false);currentUser=this.userState.currentUser;theme=this.themePort.theme;themeMode=VC(()=>this.themePort.theme().mode);themeOptions=[{value:"light",label:"Light"},{value:"dark",label:"Dark"},{value:"system",label:"System"}];themeVariant=VC(()=>this.themePort.theme().variant);themeVariantOptions=a.map(({id:t,label:e,description:i})=>({value:t,label:e,description:i}));modeOverridden=VC(()=>!V(this.themeVariant(),this.themeMode()));activeVariantLabel=VC(()=>m(this.themeVariant()).label);activeVariantDescription=VC(()=>m(this.themeVariant()).description);modeOptions=VC(()=>this.themeOptions.map(t=>x(w({},t),{disabled:this.isModeDisabled(t.value)})));shownMode=VC(()=>this.modeOverridden()?S(this.themeVariant(),this.themeMode(),false):this.themeMode());enterKeyBehavior=this.preferencesPort.enterKeyBehavior;enterKeyOptions=[{value:"send",label:"Send"},{value:"newline",label:"New line"}];showTechnical=this.preferencesPort.showTechnical;showTechnicalOptions=[{value:true,label:"Shown"},{value:false,label:"Hidden"}];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 pt({firstname:new Te("",{nonNullable:true}),lastname:new Te("",{nonNullable:true}),bio:new Te("",{nonNullable:true}),preferredLanguage:new Te("",{nonNullable:true})});recap=F($m([this.integrationState.userGlobal$,this.providerState.userGlobal$,this.authSettingState.userGlobal$]).pipe(te(([t,e,i])=>{let r=t.map(h=>({category:"integration",id:h.id??"",name:h.name,subtitle:h.integrationType})),c=e.map(h=>({category:"aiProvider",id:h.id??"",name:h.name,subtitle:h.apiType})),H=i.map(h=>({category:"authSetting",id:h.id??"",name:h.name,subtitle:h.authType}));return {integrations:r,aiProviders:c,authSettings:H,total:r.length+c.length+H.length}})),{initialValue:{integrations:[],aiProviders:[],authSettings:[],total:0}});recapSections=VC(()=>{let t=this.recap();return [{title:"Integrations",entries:t.integrations},{title:"AI Providers",entries:t.aiProviders},{title:"My global auth settings",entries:t.authSettings}].filter(e=>e.entries.length>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(t){this.themePort.setTheme({variant:this.themePort.theme().variant,mode:t});}setThemeVariant(t){v(t)&&this.themePort.setTheme({variant:t,mode:this.themePort.theme().mode});}isModeDisabled(t){return !V(this.themeVariant(),t)}setEnterKeyBehavior(t){this.preferencesPort.setEnterKeyBehavior(t);}setShowTechnical(t){this.preferencesPort.setShowTechnical(t);}save(){if(this.isSaving())return;this.isSaving.set(true);let t=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:t||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(t=>!t),this.pendingDeleteKey.set(null);}pendingDeleteKey=Mi(null);isPendingDelete(t){return this.pendingDeleteKey()===this.entryKey(t)}armDelete(t){t.id&&this.pendingDeleteKey.set(this.entryKey(t));}cancelDelete(){this.pendingDeleteKey.set(null);}confirmDelete(t){if(!t.id)return;this.pendingDeleteKey.set(null),(t.category==="integration"?this.integrationState.delete(t.id,"userGlobal"):t.category==="authSetting"?this.authSettingState.delete(t.id,"userGlobal"):this.providerState.delete(t.id,"userGlobal")).pipe(U(this.destroyRef)).subscribe({error:i=>{console.error(`[UserProfile] Delete failed for ${t.category}:${t.id}:`,i);}});}entryKey(t){return `${t.category}:${t.id}`}trackEntry(t,e){return this.entryKey(e)}syncFormFromState(){let t=this.currentUser();t&&this.form.setValue({firstname:t.firstname??"",lastname:t.lastname??"",bio:t.bio??"",preferredLanguage:t.preferredLanguage??""});}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ew({type:n,selectors:[["agentos-user-profile"]],decls:5,vars:1,consts:[["framed",""],["title","My profile"],[1,"ds-hint"],["heading","Appearance"],["label","Skin",3,"hint"],["label","Skin",3,"valueChange","options","value"],["label","Mode",3,"hint"],["label","Color mode",3,"valueChange","options","value"],["heading","Composer"],["label","Enter key","hint",'In "New line" mode, press Ctrl or Cmd + Enter to send.'],["label","Enter key behavior",3,"valueChange","options","value"],["heading","Case chat"],["label","Technical logs","hint","Show system log lines (agent status, tool selection...) in the case chat."],["label","Technical logs",3,"valueChange","options","value"],[1,"ds-form",3,"formGroup"],[1,"ds-form",3,"ngSubmit","formGroup"],["heading","Identity"],["dsDefinitionList",""],["heading","Profile"],["label","First name","controlId","up-firstname"],["dsControl","","id","up-firstname","type","text","placeholder","Your first name","formControlName","firstname","autocomplete","given-name"],["label","Last name","controlId","up-lastname"],["dsControl","","id","up-lastname","type","text","placeholder","Your last name","formControlName","lastname","autocomplete","family-name"],["label","Bio","controlId","up-bio"],["dsControl","","id","up-bio","placeholder","A short description about yourself","formControlName","bio","rows","4"],["label","Language","controlId","up-preferredLanguage"],["dsControl","","id","up-preferredLanguage","formControlName","preferredLanguage"],[3,"value"],["dsButton","","variant","primary","type","submit",3,"disabled"],["dsButton","","type","button",3,"click"],["dsButton","","variant","primary","type","button",3,"click"],[3,"toggled","heading","open"],[1,"ds-micro"],[1,"ds-list"],[1,"ds-row"],[1,"ds-strong","ds-row__grow"],[1,"ds-meta"],["dsButton","","variant","ghost","type","button"],[1,"ds-error"],["dsButton","","variant","danger","type","button",3,"click"],["dsButton","","variant","ghost","type","button",3,"click"]],template:function(e,i){if(e&1&&(os(0,"ds-page",0),Hh(1,"ds-section-header",1),Iw(2,Je,2,0,"p",2)(3,ot,14,11)(4,at,2,0,"p",2),zu()),e&2){let r;IE(2),ww(i.isLoading()?2:(r=i.currentUser())?3:4,r);}},dependencies:[Kt,fd,Mo,Do,Ut,Qt,fo,go,Rn,Ea,vn,yn,fn,gn,hn,at$1,un,mn,ji,Ni,R],encapsulation:2})};export{Ie as UserProfileComponent};
@@ -0,0 +1 @@
1
+ import {c}from'./chunk-DPNOnAOU.js';import {r as k,O as O$1,i as at,d as yn,V as Vo,A as Ao,k as P,w as P$1}from'./chunk-2KFuV5E5.js';import {g,F,v as we,M as Mi,x as U$1,am as De,ap as _e,a as ew,o as os,K as qh,z as zu,b as pC,I as Iw,c as IE,J as Vh,w as ww,L as Lw,l as lg,T as Tw,_ as _w,R as Rw,P as Pd,n as Ld,h as Bh}from'./main-EPHSXFSY.js';var M=(n,t)=>t.id??t.name;function U(n,t){if(n&1&&(os(0,"p",3),pC(1),zu()),n&2){let e=Lw();IE(),lg(e.deletion.error());}}function B(n,t){n&1&&(os(0,"p",4),pC(1,"Loading scheduled prompts\u2026"),zu());}function j(n,t){n&1&&(os(0,"p",5),pC(1,"No platform scheduled prompts defined yet."),zu());}function W(n,t){n&1&&(os(0,"p",4),pC(1,"No scheduled prompts match the current filter."),zu());}function H(n,t){if(n&1&&(os(0,"span",14),pC(1),zu()),n&2){let e=Lw().$implicit;IE(),lg(e.description);}}function O(n,t){if(n&1){let e=Rw();os(0,"button",21),qh("click",function(){Pd(e);let s=Lw().$implicit,c=Lw(2);return Ld(c.toggle(s))}),pC(1),zu(),os(2,"button",21),qh("click",function(){Pd(e);let s=Lw().$implicit,c=Lw(2);return Ld(c.edit(s))}),pC(3,"Edit"),zu();}if(n&2){let e=Lw().$implicit;IE(),lg(e.enabled?"Disable":"Enable"),IE(),Bh("aria-label","Edit "+e.name);}}function Y(n,t){if(n&1){let e=Rw();os(0,"agentos-row-delete-action",22),qh("deleteRequested",function(){Pd(e);let s=Lw().$implicit,c=Lw(2);return Ld(c.deletion.request(s.id))})("deleteConfirmed",function(){Pd(e);let s=Lw().$implicit,c=Lw(2);return Ld(c.confirmDelete(s))})("deleteCancelled",function(){Pd(e);let s=Lw(3);return Ld(s.deletion.cancel())}),zu();}if(n&2){let e=Lw().$implicit,i=Lw(2);Vh("rowKey",e.id)("rowLabel",e.name)("state",i.deletion);}}function z(n,t){if(n&1&&(os(0,"tr",9)(1,"td",12)(2,"span",13),pC(3),zu(),Iw(4,H,2,1,"span",14),zu(),os(5,"td",15),pC(6),zu(),os(7,"td",16)(8,"ds-tag",17),pC(9),zu()(),os(10,"td",18)(11,"div",19),Iw(12,O,4,2),Iw(13,Y,1,3,"agentos-row-delete-action",20),zu()()()),n&2){let e=t.$implicit,i=Lw(2);IE(3),lg(e.name),IE(),ww(e.description?4:-1),IE(2),lg(i.scheduleLabel(e)),IE(2),Vh("variant",e.enabled?"accent":"outline"),IE(),lg(e.enabled?"Enabled":"Disabled"),IE(3),ww(i.deletion.confirmingId()!==e.id?12:-1),IE(),ww(e.id?13:-1);}}function G(n,t){if(n&1&&(os(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),pC(5,"Name"),zu(),os(6,"th",10),pC(7,"Schedule"),zu(),os(8,"th",10),pC(9,"Status"),zu(),os(10,"th",10)(11,"span",11),pC(12,"Actions"),zu()()()(),os(13,"tbody",8),Tw(14,z,14,7,"tr",9,M),zu()()()),n&2){let e=Lw();IE(14),_w(e.rowFilter.filteredRows());}}var A=class n{router=g(F);destroyRef=g(we);state=g(c);prompts=Mi([]);isLoading=Mi(true);deletion=k();rowFilter=O$1(this.prompts,t=>[t.name,t.description,this.scheduleLabel(t),t.enabled?"Enabled":"Disabled"].filter(Boolean).join(" "));constructor(){this.state.listPlatform().pipe(U$1(this.destroyRef)).subscribe({next:t=>{this.prompts.set(t),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}scheduleLabel(t){let{recurrence:e}=t,i=e.unit===De.WEEK?"week":"month",s=e.unit===De.WEEK&&e.days?.length?` (${e.days.map(c=>_e[c]??c).join(", ")})`:"";return `Every ${i}${s} at ${e.timeUtc} UTC`}openCreateForm(){this.router.navigate(["/agentos","admin","scheduled-prompts","new"]);}edit(t){t.id&&this.router.navigate(["/agentos","admin","scheduled-prompts",t.id,"edit"]);}toggle(t){(t.enabled?this.state.disable(t.id??""):this.state.enable(t.id??"")).pipe(U$1(this.destroyRef)).subscribe(i=>this.patchPrompt(i));}confirmDelete(t){if(!t.id)return;let e=t.id;this.deletion.execute(e,{request$:this.state.delete(e).pipe(U$1(this.destroyRef)),onSuccess:()=>this.prompts.update(i=>i.filter(s=>s.id!==e)),errorMessage:`Deleting "${t.name}" failed. Try again.`});}patchPrompt(t){this.prompts.update(e=>e.map(i=>i.id===t.id?t:i));}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=ew({type:n,selectors:[["agentos-platform-scheduled-prompts"]],decls:9,vars:3,consts:[["title","Platform scheduled prompts","description","Scheduled prompts shared across every namespace."],["label","Filter scheduled prompts","placeholder","Filter scheduled prompts\u2026",3,"queryChange","query"],["dsButton","","variant","primary","type","button",3,"click"],["role","alert",1,"settings-table__error"],["role","status",1,"settings-table__status"],[1,"settings-table__status"],[1,"settings-table__wrap"],["dsTable","","role","table","aria-label","Platform scheduled prompts"],["role","rowgroup"],["role","row"],["role","columnheader"],[1,"sr-only"],["role","cell","data-label","Name","data-title",""],[1,"settings-table__name","settings-table__stacked"],[1,"settings-table__secondary","settings-table__stacked"],["role","cell","data-label","Schedule"],["role","cell","data-label","Status"],[3,"variant"],["role","cell","data-label","Actions","data-actions",""],[1,"settings-table__actions"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"rowKey","rowLabel","state"],["type","button",3,"click"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"deleteRequested","deleteConfirmed","deleteCancelled","rowKey","rowLabel","state"]],template:function(e,i){e&1&&(os(0,"ds-section-header",0)(1,"agentos-table-filter",1),qh("queryChange",function(c){return i.rowFilter.query.set(c)}),zu(),os(2,"button",2),qh("click",function(){return i.openCreateForm()}),pC(3,"New scheduled prompt"),zu()(),Iw(4,U,2,1,"p",3),Iw(5,B,2,0,"p",4)(6,j,2,0,"p",5)(7,W,2,0,"p",4)(8,G,16,0,"div",6)),e&2&&(IE(),Vh("query",i.rowFilter.query()),IE(3),ww(i.deletion.error()?4:-1),IE(),ww(i.isLoading()?5:i.prompts().length===0?6:i.rowFilter.filteredRows().length===0?7:8));},dependencies:[at,yn,Vo,Ao,P,P$1],encapsulation:2})};export{A as PlatformScheduledPromptsComponent};
@@ -0,0 +1 @@
1
+ import {O as O$1}from'./chunk-CL0y_n4N.js';import {g,F,v as we,aj as G$1,a3 as vr,M as Mi,a5 as Ys,x as U$1,a as ew,o as os,K as qh,z as zu,b as pC,I as Iw,c as IE,J as Vh,w as ww,L as Lw,l as lg,T as Tw,_ as _w,R as Rw,h as Bh,P as Pd,n as Ld}from'./main-EPHSXFSY.js';import {r as k,O as O$2,i as at,d as yn,V as Vo,k as P,w as P$1}from'./chunk-2KFuV5E5.js';import'./chunk-BMbtNfWQ.js';var j=(t,e)=>e.id??e.name;function A(t,e){if(t&1&&(os(0,"p",3),pC(1),zu()),t&2){let n=Lw();IE(),lg(n.deletion.error());}}function K(t,e){t&1&&(os(0,"p",4),pC(1,"Loading integrations\u2026"),zu());}function H(t,e){t&1&&(os(0,"p",5),pC(1,"No platform integrations defined yet."),zu());}function U(t,e){t&1&&(os(0,"p",4),pC(1,"No integrations match the current filter."),zu());}function z(t,e){if(t&1){let n=Rw();os(0,"button",18),qh("click",function(){Pd(n);let d=Lw().$implicit,m=Lw(2);return Ld(m.edit(d))}),pC(1,"Edit"),zu();}if(t&2){let n=Lw().$implicit;Bh("aria-label","Edit "+n.name);}}function G(t,e){if(t&1){let n=Rw();os(0,"agentos-row-delete-action",19),qh("deleteRequested",function(){Pd(n);let d=Lw().$implicit,m=Lw(2);return Ld(m.deletion.request(d.id))})("deleteConfirmed",function(){Pd(n);let d=Lw().$implicit,m=Lw(2);return Ld(m.confirmDelete(d))})("deleteCancelled",function(){Pd(n);let d=Lw(3);return Ld(d.deletion.cancel())}),zu();}if(t&2){let n=Lw().$implicit,r=Lw(2);Vh("rowKey",n.id)("rowLabel",n.name)("state",r.deletion);}}function J(t,e){if(t&1&&(os(0,"tr",9)(1,"td",12),pC(2),zu(),os(3,"td",13),pC(4),zu(),os(5,"td",14)(6,"div",15),Iw(7,z,2,1,"button",16),Iw(8,G,1,3,"agentos-row-delete-action",17),zu()()()),t&2){let n=e.$implicit,r=Lw(2);IE(2),lg(n.name),IE(2),lg(n.integrationType),IE(3),ww(r.deletion.confirmingId()!==n.id?7:-1),IE(),ww(n.id?8:-1);}}function O(t,e){if(t&1&&(os(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),pC(5,"Name"),zu(),os(6,"th",10),pC(7,"Type"),zu(),os(8,"th",10)(9,"span",11),pC(10,"Actions"),zu()()()(),os(11,"tbody",8),Tw(12,J,9,4,"tr",9,j),zu()()()),t&2){let n=Lw();IE(12),_w(n.rowFilter.filteredRows());}}var B=class t{router=g(F);destroyRef=g(we);state=g(O$1);integrationConfigController=g(G$1);refresh$=new vr(void 0);isLoading=Mi(true);deletion=k();configs=Mi([]);rowFilter=O$2(this.configs,e=>[e.name,e.integrationType].filter(Boolean).join(" "));constructor(){this.refresh$.pipe(Ys(()=>(this.isLoading.set(true),this.state.loadPlatformConfigs())),U$1(this.destroyRef)).subscribe({next:e=>{this.configs.set(e),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}openCreateForm(){this.router.navigate(["/agentos","admin","integration-configs","new"]);}edit(e){this.router.navigate(["/agentos","admin","integration-configs",e.id??"","edit"]);}confirmDelete(e){e.id&&this.deletion.execute(e.id,{request$:this.integrationConfigController.deleteIntegrationConfig(e.id).pipe(U$1(this.destroyRef)),onSuccess:()=>this.refresh$.next(),errorMessage:`Deleting "${e.name}" failed. Try again.`});}static \u0275fac=function(n){return new(n||t)};static \u0275cmp=ew({type:t,selectors:[["agentos-platform-integration-configs"]],decls:9,vars:3,consts:[["title","Platform integrations","description","Integration configurations shared across every namespace."],["label","Filter integrations","placeholder","Filter integrations\u2026",3,"queryChange","query"],["dsButton","","variant","primary","type","button",3,"click"],["role","alert",1,"settings-table__error"],["role","status",1,"settings-table__status"],[1,"settings-table__status"],[1,"settings-table__wrap"],["dsTable","","role","table","aria-label","Platform integrations"],["role","rowgroup"],["role","row"],["role","columnheader"],[1,"sr-only"],["role","cell","data-label","Name","data-title","",1,"settings-table__name"],["role","cell","data-label","Type",1,"settings-table__secondary"],["role","cell","data-label","Actions","data-actions",""],[1,"settings-table__actions"],["type","button"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"rowKey","rowLabel","state"],["type","button",3,"click"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"deleteRequested","deleteConfirmed","deleteCancelled","rowKey","rowLabel","state"]],template:function(n,r){n&1&&(os(0,"ds-section-header",0)(1,"agentos-table-filter",1),qh("queryChange",function(m){return r.rowFilter.query.set(m)}),zu(),os(2,"button",2),qh("click",function(){return r.openCreateForm()}),pC(3,"New integration"),zu()(),Iw(4,A,2,1,"p",3),Iw(5,K,2,0,"p",4)(6,H,2,0,"p",5)(7,U,2,0,"p",4)(8,O,14,0,"div",6)),n&2&&(IE(),Vh("query",r.rowFilter.query()),IE(3),ww(r.deletion.error()?4:-1),IE(),ww(r.isLoading()?5:r.configs().length===0?6:r.rowFilter.filteredRows().length===0?7:8));},dependencies:[at,yn,Vo,P,P$1],encapsulation:2})};export{B as PlatformIntegrationConfigsComponent};
@@ -0,0 +1 @@
1
+ import {r as k$1,O as O$1,i as at,d as yn,V as Vo,k as P,w as P$1}from'./chunk-2KFuV5E5.js';import {g,F,v as we,au as k,at as F$1,a3 as vr,M as Mi,a5 as Ys,aw as $m,x as U$1,a as ew,o as os,K as qh,z as zu,b as pC,I as Iw,c as IE,J as Vh,w as ww,L as Lw,l as lg,T as Tw,_ as _w,R as Rw,P as Pd,n as Ld,Y as Yu,h as Bh}from'./main-EPHSXFSY.js';var K=(o,t)=>t.key;function H(o,t){if(o&1&&(os(0,"p",3),pC(1),zu()),o&2){let e=Lw();IE(),lg(e.deletion.error());}}function U(o,t){o&1&&(os(0,"p",4),pC(1,"Loading AI models\u2026"),zu());}function z(o,t){o&1&&(os(0,"p",5),pC(1,"No platform AI models defined yet."),zu());}function G(o,t){o&1&&(os(0,"p",4),pC(1,"No AI models match the current filter."),zu());}function J(o,t){if(o&1){let e=Rw();os(0,"button",21),qh("click",function(){Pd(e);let r=Lw().$implicit,m=Lw(2);return Ld(m.edit(r))}),pC(1,"Edit"),zu();}if(o&2){let e=Lw().$implicit;Bh("aria-label","Edit "+e.title);}}function O(o,t){if(o&1){let e=Rw();os(0,"tr",9)(1,"td",12),pC(2),zu(),os(3,"td",13),pC(4),zu(),os(5,"td",14),pC(6),zu(),os(7,"td",15),pC(8),zu(),os(9,"td",16),pC(10),zu(),os(11,"td",17)(12,"div",18),Iw(13,J,2,1,"button",19),os(14,"agentos-row-delete-action",20),qh("deleteRequested",function(){let r=Pd(e).$implicit,m=Lw(2);return Ld(m.deletion.request(r.key))})("deleteConfirmed",function(){let r=Pd(e).$implicit,m=Lw(2);return Ld(m.confirmDelete(r))})("deleteCancelled",function(){Pd(e);let r=Lw(2);return Ld(r.deletion.cancel())}),zu()()()();}if(o&2){let e=t.$implicit,a=Lw(2);IE(2),lg(e.title),IE(2),lg(e.providerName),IE(2),Yu(" ",e.model.apiModelName," "),IE(2),lg(e.model.priority),IE(2),Yu(" ",e.model.reasoningEffort?e.model.reasoningEffort.toLowerCase():"\u2014"," "),IE(3),ww(a.deletion.confirmingId()!==e.key?13:-1),IE(),Vh("rowKey",e.key)("rowLabel",e.title)("state",a.deletion);}}function Q(o,t){if(o&1&&(os(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),pC(5,"Name"),zu(),os(6,"th",10),pC(7,"Provider"),zu(),os(8,"th",10),pC(9,"API model name"),zu(),os(10,"th",10),pC(11,"Priority"),zu(),os(12,"th",10),pC(13,"Reasoning effort"),zu(),os(14,"th",10)(15,"span",11),pC(16,"Actions"),zu()()()(),os(17,"tbody",8),Tw(18,O,15,9,"tr",9,K),zu()()()),o&2){let e=Lw();IE(18),_w(e.rowFilter.filteredRows());}}var j=class o{router=g(F);destroyRef=g(we);aiModelController=g(k);aiProviderController=g(F$1);refresh$=new vr(void 0);isLoading=Mi(true);deletion=k$1();rows=Mi([]);rowFilter=O$1(this.rows,t=>[t.title,t.model.apiModelName,t.providerName].filter(Boolean).join(" "));constructor(){this.refresh$.pipe(Ys(()=>(this.isLoading.set(true),$m([this.aiModelController.listPlatformLevelAiModel(),this.aiProviderController.listAiProvider("none")]))),U$1(this.destroyRef)).subscribe({next:([t,e])=>{let a=new Map(e.map(r=>[r.id??"",r.name]));this.rows.set(t.map((r,m)=>({key:r.id??`model:${m}`,model:r,title:r.alias??r.apiModelName,providerName:a.get(r.aiProviderId)??r.aiProviderId}))),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}openCreateForm(){this.router.navigate(["/agentos","admin","ai-models","new"]);}edit(t){t.model.id&&this.router.navigate(["/agentos","admin","ai-models",t.model.id,"edit"]);}confirmDelete(t){t.model.id&&this.deletion.execute(t.key,{request$:this.aiModelController.deleteAiModel(t.model.id).pipe(U$1(this.destroyRef)),onSuccess:()=>this.refresh$.next(),errorMessage:`Deleting "${t.title}" failed. Try again.`});}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=ew({type:o,selectors:[["agentos-platform-ai-models"]],decls:9,vars:3,consts:[["title","Platform AI models","description","AI models shared across every namespace."],["label","Filter AI models","placeholder","Filter AI models\u2026",3,"queryChange","query"],["dsButton","","variant","primary","type","button",3,"click"],["role","alert",1,"settings-table__error"],["role","status",1,"settings-table__status"],[1,"settings-table__status"],[1,"settings-table__wrap"],["dsTable","","role","table","aria-label","Platform AI models"],["role","rowgroup"],["role","row"],["role","columnheader"],[1,"sr-only"],["role","cell","data-label","Name","data-title","",1,"settings-table__name"],["role","cell","data-label","Provider"],["role","cell","data-label","API model name",1,"settings-table__secondary"],["role","cell","data-label","Priority"],["role","cell","data-label","Reasoning effort"],["role","cell","data-label","Actions","data-actions",""],[1,"settings-table__actions"],["type","button"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"deleteRequested","deleteConfirmed","deleteCancelled","rowKey","rowLabel","state"],["type","button",3,"click"]],template:function(e,a){e&1&&(os(0,"ds-section-header",0)(1,"agentos-table-filter",1),qh("queryChange",function(m){return a.rowFilter.query.set(m)}),zu(),os(2,"button",2),qh("click",function(){return a.openCreateForm()}),pC(3,"New AI model"),zu()(),Iw(4,H,2,1,"p",3),Iw(5,U,2,0,"p",4)(6,z,2,0,"p",5)(7,G,2,0,"p",4)(8,Q,20,0,"div",6)),e&2&&(IE(),Vh("query",a.rowFilter.query()),IE(3),ww(a.deletion.error()?4:-1),IE(),ww(a.isLoading()?5:a.rows().length===0?6:a.rowFilter.filteredRows().length===0?7:8));},dependencies:[at,yn,Vo,P,P$1],encapsulation:2})};export{j as PlatformAiModelsComponent};
@@ -0,0 +1 @@
1
+ import {ae as N,v as vn,d as yn,e as fn,h as hn,_ as _n,i as at,u as un}from'./chunk-2KFuV5E5.js';import {g,W,F,a_ as D,ak as U,v as we,M as Mi,x as U$1,B,a$ as Fm,a as ew,o as os,K as qh,b as pC,z as zu,H as Hh,I as Iw,c as IE,J as Vh,w as ww,Y as Yu,L as Lw,l as lg}from'./main-EPHSXFSY.js';function P(l,t){if(l&1&&(os(0,"ds-notice"),pC(1),zu()),l&2){let n=Lw();IE(),lg(n.launchError());}}var T=class l{route=g(W);router=g(F);caseController=g(D);caseState=g(N);agentConfigController=g(U);destroyRef=g(we);namespaceId=this.route.snapshot.params.namespaceId;agentConfigId=this.route.snapshot.params.agentConfigId;resolvedAgentConfig=null;payloadJson=Mi("");launchError=Mi(null);isLaunching=Mi(false);isLoading=Mi(false);ngOnInit(){this.isLoading.set(true),this.agentConfigController.getByIdAgentConfig(this.agentConfigId).pipe(U$1(this.destroyRef)).subscribe({next:t=>{this.resolvedAgentConfig=t,t.loopConfig!=null&&this.payloadJson.set(JSON.stringify(t.loopConfig,null,2)),this.isLoading.set(false);},error:()=>{this.isLoading.set(false);}});}launch(){return B(this,null,function*(){this.launchError.set(null),this.isLaunching.set(true);try{let t=this.resolvedAgentConfig??(yield Fm(this.agentConfigController.getByIdAgentConfig(this.agentConfigId))),n=yield Fm(this.caseController.createCase({namespaceId:this.namespaceId}));this.caseState.addCase(n);let e=n.id??"",d={content:`@${t.name} start`};yield Fm(this.caseController.addMessageCase(e,d)),this.router.navigate(["/agentos/home"],{queryParams:{ns:this.namespaceId,case:e}});}catch(t){console.error("[AgentConfigLaunch] Failed to launch loop agent",t),this.launchError.set("Failed to launch the agent loop. Please check the console for details."),this.isLaunching.set(false);}})}back(){this.router.navigate(["/agentos",this.namespaceId,"agent-configs",this.agentConfigId,"edit"]);}static \u0275fac=function(n){return new(n||l)};static \u0275cmp=ew({type:l,selectors:[["agentos-agent-config-launch"]],decls:17,vars:6,consts:[["title","Launch loop agent"],["dsButton","","variant","ghost","type","button","title","Back to agent config",3,"click"],[1,"ds-hint"],["label","Loop configuration (read-only)","controlId","agent-loop-payload"],["dsControl","","mono","","id","agent-loop-payload","rows","15","readonly","","spellcheck","false","autocomplete","off",3,"value","disabled"],["dsButton","","variant","primary","type","button",3,"click","disabled"],["dsButton","","type","button",3,"click","disabled"]],template:function(n,e){n&1&&(os(0,"ds-page")(1,"ds-section-header",0)(2,"button",1),qh("click",function(){return e.back()}),pC(3," \u2190 Edit agent config "),zu()(),os(4,"p",2),pC(5," The loop configuration below is read from "),os(6,"code"),pC(7,"AgentConfig.loopConfig"),zu(),pC(8," and will be used by the backend when the agent loop starts. A new Case will be created and one child case will be launched per entity found. "),zu(),os(9,"ds-form-field",3),Hh(10,"textarea",4),zu(),Iw(11,P,2,1,"ds-notice"),os(12,"ds-form-actions")(13,"button",5),qh("click",function(){return e.launch()}),pC(14),zu(),os(15,"button",6),qh("click",function(){return e.back()}),pC(16,"Cancel"),zu()()()),n&2&&(IE(10),Vh("value",e.payloadJson())("disabled",e.isLaunching()||e.isLoading()),IE(),ww(e.launchError()?11:-1),IE(2),Vh("disabled",e.isLaunching()),IE(),Yu(" ",e.isLaunching()?"Launching\u2026":"Launch"," "),IE(),Vh("disabled",e.isLaunching()));},dependencies:[vn,yn,fn,hn,_n,at,un],encapsulation:2})};export{T as AgentConfigLaunchComponent};
@@ -1,2 +1,2 @@
1
- import {v}from'./chunk-DDZiCKt-.js';import {I,n as nt,i as it}from'./chunk-hmzIFgbE.js';import {g,W,t as F,K as we,$ as $i,a9 as F$1,o as oT,O as Of,U,N as x,L as w,D as Dw,E as Es,R as vg,b as AC,c as hl,a as Bw,d as VE,P as dg,i as Vw,Q as Qw,q as $w,ao as Uw,S as NI,f as fg,v as tC,T as AI,z as zw,u as Dl,ae as Lw,F as Fg,n as lg,w as pf,x as hf}from'./main-G2NDWI4S.js';import {T as Te,b as bn,p as pt,v as vn,d as yn,e as fn,l as pn,h as hn,i as at,u as un,n as cn,K as Kt,a as fd,M as Mo,D as Do,U as Ut,Q as Qt,C as Ca,c as fo,g as go,N as Nn,R as Rn}from'./chunk-BZjbpPBa.js';import'./chunk-Cl72Xnim.js';function Ce(i,t){i&1&&(Es(0,"p",2),AC(1,"Loading\u2026"),hl());}function ye(i,t){if(i&1&&(Es(0,"label",16),fg(1,"input",17),NI(),AC(2),hl()),i&2){let e=t.$implicit,n=tC(3);VE(),dg("formControl",n.scopeControl)("value",e.value)("disabled",e.value==="namespace"&&!n.isAdmin()),AI(),VE(),Dl(" ",e.label," ");}}function ge(i,t){if(i&1&&(Es(0,"ds-fieldset",5),$w(1,ye,3,4,"label",16,Lw().trackByScope,true),hl()),i&2){let e=tC(2);dg("disabled",e.isEditMode()),VE(),zw(e.scopeOptions);}}function fe(i,t){if(i&1&&(Es(0,"option",8),AC(1),hl()),i&2){let e=t.$implicit,n=tC(2);dg("value",e),VE(),Fg(n.authTypeLabel[e]);}}function Se(i,t){if(i&1&&(Es(0,"ds-form-field",18),fg(1,"input",19),NI(),hl()),i&2){let e=tC().$implicit;dg("label",e.label)("controlId","as-cred-"+e.key)("required",e.required)("hint",e.hint??null)("hintId","as-hint-"+e.key),VE(),dg("id","as-cred-"+e.key)("type",e.secret?"password":"text")("placeholder",e.placeholder)("formControl",t)("autocomplete",e.secret?"new-password":"off"),lg("aria-describedby",e.hint?"as-hint-"+e.key:null),AI();}}function Ae(i,t){if(i&1&&Bw(0,Se,2,11,"ds-form-field",18),i&2){let e,n=t.$implicit,o=tC(3);Vw((e=o.controlForField(n.key))?0:-1,e);}}function ve(i,t){if(i&1&&(Es(0,"ds-fieldset",13),$w(1,Ae,1,1,null,null,Lw().trackByField,true),hl()),i&2){let e=tC(2);dg("hint","Values are stored encrypted and masked on read."+(e.isEditMode()?" Leave a field unchanged to keep the stored credential.":"")),VE(),zw(e.credentialFields());}}function be(i,t){if(i&1){let e=Qw();Es(0,"form",4),vg("ngSubmit",function(){pf(e);let o=tC();return hf(o.submit())}),Bw(1,ge,3,1,"ds-fieldset",5),Es(2,"ds-form-field",6)(3,"select",7),$w(4,fe,2,2,"option",8,Uw),hl(),NI(),hl(),Es(6,"ds-form-field",9),fg(7,"input",10),NI(),hl(),Es(8,"ds-form-field",11),fg(9,"input",12),NI(),hl(),Bw(10,ve,3,1,"ds-fieldset",13),Es(11,"ds-form-actions")(12,"button",14),AC(13),hl(),Es(14,"button",15),vg("click",function(){pf(e);let o=tC();return hf(o.cancel())}),AC(15,"Cancel"),hl()()();}if(i&2){let e=tC();dg("formGroup",e.form),VE(),Vw(e.isPlatformMode?-1:1),VE(2),dg("formControl",e.authTypeControl),AI(),VE(),zw(e.authTypeOptions),VE(3),dg("formControl",e.nameControl),AI(),VE(2),dg("formControl",e.descriptionControl),AI(),VE(),Vw(e.credentialFields().length>0?10:-1),VE(2),dg("disabled",e.form.invalid||e.isSubmitting()),VE(),Dl(" ",e.isEditMode()?"Save changes":"Create"," ");}}var ke=new Set(["namespace","userOnNs","userGlobal"]),D=Object.freeze({platform:"Platform (read-only)",namespace:"Namespace configuration",userOnNs:"Personal \u2014 this namespace only",userGlobal:"Personal \u2014 all namespaces"}),_e={ApiKeyAuthSetting:[{key:"apiKey",label:"API Key",placeholder:"sk-\u2026",secret:true,required:false}],BasicAuthAuthSetting:[{key:"username",label:"Username",placeholder:"user@example.com",secret:false,required:false},{key:"password",label:"Password",placeholder:"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",secret:true,required:false}],BearerTokenAuthSetting:[{key:"token",label:"Bearer token",placeholder:"eyJ\u2026",secret:true,required:false}],OAuthDiscoverableAuthSetting:[{key:"discoveryUrl",label:"Discovery URL",placeholder:"https://\u2026/.well-known/openid-configuration",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Space-separated OAuth scopes to request (e.g. openid profile email). Check your provider's documentation for the exact values.",secret:false,required:false}],OAuthCustomAuthSetting:[{key:"authorizationUrl",label:"Authorization URL",placeholder:"https://\u2026/authorize",secret:false,required:false},{key:"tokenUrl",label:"Token URL",placeholder:"https://\u2026/token",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Space-separated OAuth scopes to request (e.g. openid profile email). Check your provider's documentation for the exact values.",secret:false,required:false}],OAuthRegisteredAuthSetting:[{key:"authorizationUrl",label:"Authorization URL",placeholder:"https://\u2026/authorize",secret:false,required:false},{key:"tokenUrl",label:"Token URL",placeholder:"https://\u2026/token",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Space-separated OAuth scopes to request (e.g. openid profile email). Check your provider's documentation for the exact values.",secret:false,required:false}],OAuthMcpDiscoverableAuthSetting:[{key:"resourceUrl",label:"Resource URL",placeholder:"https://mcp.example.com",hint:"Use the base URL exactly as documented by your provider \u2014 do not append a path suffix. Examples: https://mcp.hubspot.com (HubSpot), https://mcp.atlassian.com/v1/mcp (Atlassian).",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",hint:"Leave empty to let the server register an OAuth client automatically (RFC 7591 dynamic registration). Fill in only if you have a pre-registered client ID from your provider.",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Leave empty in most cases \u2014 the MCP server declares the required scopes itself. Fill in only if your provider explicitly requires client-declared scopes.",secret:false,required:false}]},me=class i{route=g(W);router=g(F);destroyRef=g(we);state=g(I);namespaceRole=g(v);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=this.namespaceId===void 0;isAdmin=this.isPlatformMode?$i(true):F$1(this.namespaceRole.isAdminOfNamespace$(this.namespaceId),{initialValue:false});authTypeOptions=nt;authTypeLabel=it;scopeOptions=[{value:"namespace",label:D.namespace},{value:"userOnNs",label:D.userOnNs},{value:"userGlobal",label:D.userGlobal}];nameControl=new Te("",{nonNullable:true,validators:[bn.required,bn.minLength(1)]});descriptionControl=new Te(null);authTypeControl=new Te("ApiKeyAuthSetting",{nonNullable:true,validators:[bn.required]});scopeControl=new Te("namespace",{nonNullable:true});form=new pt({name:this.nameControl,description:this.descriptionControl,authType:this.authTypeControl,scope:this.scopeControl});apiKeyControl=new Te("",{nonNullable:true});usernameControl=new Te("",{nonNullable:true});passwordControl=new Te("",{nonNullable:true});tokenControl=new Te("",{nonNullable:true});discoveryUrlControl=new Te("",{nonNullable:true});authorizationUrlControl=new Te("",{nonNullable:true});tokenUrlControl=new Te("",{nonNullable:true});clientIdControl=new Te("",{nonNullable:true});clientSecretControl=new Te("",{nonNullable:true});scopesControl=new Te("",{nonNullable:true});resourceUrlControl=new Te("",{nonNullable:true});selectedAuthType=F$1(this.authTypeControl.valueChanges,{initialValue:this.authTypeControl.value});credentialFields=oT(()=>_e[this.selectedAuthType()]);isEditMode=$i(false);isSubmitting=$i(false);isLoading=$i(false);existingConfig=null;initialCredentials={};constructor(){this.isPlatformMode||Of(()=>{this.isAdmin()||this.isEditMode()||this.scopeControl.value==="namespace"&&this.scopeControl.setValue("userOnNs");});}ngOnInit(){this.namespaceId&&this.state.setNamespace(this.namespaceId);let t=this.route.snapshot.paramMap,e=this.route.snapshot.queryParamMap,n=t.get("authSettingId");if(n){this.isEditMode.set(true),this.scopeControl.disable(),this.authTypeControl.disable(),this.loadConfig(n);return}if(this.isPlatformMode){this.scopeControl.setValue("platform"),this.scopeControl.disable();return}let o=this.parseScope(e.get("scope"));this.scopeControl.setValue(o);let v=e.get("template");v&&this.hydrateFromTemplate(v);}parseScope(t){return t&&ke.has(t)?t:"namespace"}deriveScopeFromConfig(t){return !t.userId&&!t.namespaceId?"platform":t.userId?t.namespaceId?"userOnNs":"userGlobal":"namespace"}loadConfig(t){this.isLoading.set(true),this.state.getById(t).pipe(U(this.destroyRef)).subscribe({next:e=>{this.existingConfig=e,this.scopeControl.setValue(this.deriveScopeFromConfig(e)),this.applyConfigToForm(e),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),console.warn(`[AuthSettingForm] Could not load auth setting '${t}' \u2014 navigating back`),this.navigateBack();}});}hydrateFromTemplate(t){this.isLoading.set(true),this.state.getById(t).pipe(U(this.destroyRef)).subscribe({next:e=>{this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??null),this.authTypeControl.setValue(e.authType),this.clearCredentialControls(),this.initialCredentials={},this.isLoading.set(false),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:true});},error:e=>{console.warn(`[AuthSettingForm] Could not hydrate from template ${t}:`,e),this.isLoading.set(false),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:true});}});}applyConfigToForm(t){switch(this.nameControl.setValue(t.name),this.descriptionControl.setValue(t.description??null),this.authTypeControl.setValue(t.authType),this.clearCredentialControls(),this.initialCredentials={},t.authType){case "ApiKeyAuthSetting":{let e=t.apiKey??"";this.apiKeyControl.setValue(e),this.initialCredentials.apiKey=e;break}case "BasicAuthAuthSetting":{let e=t,n=e.username??"",o=e.password??"";this.usernameControl.setValue(n),this.passwordControl.setValue(o),this.initialCredentials.username=n,this.initialCredentials.password=o;break}case "BearerTokenAuthSetting":{let e=t.token??"";this.tokenControl.setValue(e),this.initialCredentials.token=e;break}case "OAuthDiscoverableAuthSetting":{let e=t;this.discoveryUrlControl.setValue(e.discoveryUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.discoveryUrl=e.discoveryUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}case "OAuthCustomAuthSetting":{let e=t;this.authorizationUrlControl.setValue(e.authorizationUrl??""),this.tokenUrlControl.setValue(e.tokenUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.authorizationUrl=e.authorizationUrl??"",this.initialCredentials.tokenUrl=e.tokenUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}case "OAuthRegisteredAuthSetting":{let e=t;this.authorizationUrlControl.setValue(e.authorizationUrl??""),this.tokenUrlControl.setValue(e.tokenUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.authorizationUrl=e.authorizationUrl??"",this.initialCredentials.tokenUrl=e.tokenUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}case "OAuthMcpDiscoverableAuthSetting":{let e=t;this.resourceUrlControl.setValue(e.resourceUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.resourceUrl=e.resourceUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}}}clearCredentialControls(){this.apiKeyControl.setValue(""),this.usernameControl.setValue(""),this.passwordControl.setValue(""),this.tokenControl.setValue(""),this.discoveryUrlControl.setValue(""),this.authorizationUrlControl.setValue(""),this.tokenUrlControl.setValue(""),this.clientIdControl.setValue(""),this.clientSecretControl.setValue(""),this.scopesControl.setValue(""),this.resourceUrlControl.setValue("");}credentialValue(t,e){if(!(this.isEditMode()&&e===this.initialCredentials[t]))return e||void 0}submit(){if(this.form.invalid||this.isSubmitting())return;if(this.isEditMode()&&!this.existingConfig?.id){this.navigateBack();return}this.isSubmitting.set(true);let t=this.nameControl.value.trim(),e=this.descriptionControl.value?.trim()||void 0,n=this.authTypeControl.value,o=this.form.getRawValue().scope,v=this.isPlatformMode?null:this.namespaceId??null,w=this.buildTypedPayload(n,t,e);(this.isEditMode()&&this.existingConfig?.id?this.state.update(this.existingConfig.id,w,this.existingConfig):this.state.create(w,o,v)).pipe(U(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(false)});}buildTypedPayload(t,e,n){let o={name:e,description:n};switch(t){case "ApiKeyAuthSetting":return x(w({},o),{authType:"ApiKeyAuthSetting",apiKey:this.credentialValue("apiKey",this.apiKeyControl.value)});case "BasicAuthAuthSetting":return x(w({},o),{authType:"BasicAuthAuthSetting",username:this.credentialValue("username",this.usernameControl.value),password:this.credentialValue("password",this.passwordControl.value)});case "BearerTokenAuthSetting":return x(w({},o),{authType:"BearerTokenAuthSetting",token:this.credentialValue("token",this.tokenControl.value)});case "OAuthDiscoverableAuthSetting":return x(w({},o),{authType:"OAuthDiscoverableAuthSetting",discoveryUrl:this.credentialValue("discoveryUrl",this.discoveryUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)});case "OAuthCustomAuthSetting":return x(w({},o),{authType:"OAuthCustomAuthSetting",authorizationUrl:this.credentialValue("authorizationUrl",this.authorizationUrlControl.value),tokenUrl:this.credentialValue("tokenUrl",this.tokenUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)});case "OAuthRegisteredAuthSetting":return x(w({},o),{authType:"OAuthRegisteredAuthSetting",authorizationUrl:this.credentialValue("authorizationUrl",this.authorizationUrlControl.value),tokenUrl:this.credentialValue("tokenUrl",this.tokenUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)});case "OAuthMcpDiscoverableAuthSetting":return x(w({},o),{authType:"OAuthMcpDiscoverableAuthSetting",resourceUrl:this.credentialValue("resourceUrl",this.resourceUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)})}}controlForField(t){return {apiKey:this.apiKeyControl,username:this.usernameControl,password:this.passwordControl,token:this.tokenControl,discoveryUrl:this.discoveryUrlControl,authorizationUrl:this.authorizationUrlControl,tokenUrl:this.tokenUrlControl,clientId:this.clientIdControl,clientSecret:this.clientSecretControl,scopes:this.scopesControl,resourceUrl:this.resourceUrlControl}[t]}cancel(){this.navigateBack();}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","auth-settings"]):this.router.navigate(["/agentos",this.namespaceId,"auth-settings"]);}trackByScope(t,e){return e.value}trackByField(t,e){return e.key}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=Dw({type:i,selectors:[["agentos-auth-setting-form"]],decls:6,vars:2,consts:[[3,"title"],["dsButton","","variant","ghost","type","button","title","Back to auth settings",3,"click"],[1,"ds-hint"],[1,"ds-form",3,"formGroup"],[1,"ds-form",3,"ngSubmit","formGroup"],["legend","Configuration scope",3,"disabled"],["label","Auth type","controlId","as-auth-type","required",""],["dsControl","","id","as-auth-type",3,"formControl"],[3,"value"],["label","Name","controlId","as-name","required",""],["dsControl","","id","as-name","type","text","placeholder","e.g. GitHub OAuth App","autocomplete","off",3,"formControl"],["label","Description","controlId","as-description"],["dsControl","","id","as-description","type","text","placeholder","Optional \u2014 short description of this auth setting","autocomplete","off",3,"formControl"],["legend","Credentials",3,"hint"],["dsButton","","variant","primary","type","submit",3,"disabled"],["dsButton","","type","button",3,"click"],["dsCheck",""],["type","radio",3,"formControl","value","disabled"],[3,"label","controlId","required","hint","hintId"],["dsControl","",3,"id","type","placeholder","formControl","autocomplete"]],template:function(e,n){e&1&&(Es(0,"ds-page")(1,"ds-section-header",0)(2,"button",1),vg("click",function(){return n.cancel()}),AC(3," \u2190 Auth settings "),hl()(),Bw(4,Ce,2,0,"p",2)(5,be,16,8,"form",3),hl()),e&2&&(VE(),dg("title",n.isEditMode()?"Edit auth setting":"New auth setting"),VE(3),Vw(n.isLoading()?4:5));},dependencies:[vn,yn,fn,pn,hn,at,un,cn,Kt,fd,Mo,Do,Ut,Qt,Ca,fo,go,Nn,Rn],encapsulation:2})};
1
+ import {v}from'./chunk-C7nsTLJX.js';import {I,n as nt,i as it}from'./chunk-x7GGjcqr.js';import {g,W,F,v as we,M as Mi,ad as F$1,i as VC,s as sf,x as U,E as x,C as w,a as ew,o as os,K as qh,b as pC,z as zu,I as Iw,c as IE,J as Vh,w as ww,R as Rw,T as Tw,as as bw,N as lI,H as Hh,L as Lw,Q as fI,_ as _w,Y as Yu,ai as Dw,l as lg,h as Bh,P as Pd,n as Ld}from'./main-EPHSXFSY.js';import {T as Te,b as bn,p as pt,v as vn,d as yn,e as fn,n as pn,h as hn,i as at,u as un,o as cn,K as Kt,a as fd,M as Mo,D as Do,U as Ut,Q as Qt,C as Ca,c as fo,g as go,N as Nn,R as Rn}from'./chunk-2KFuV5E5.js';import'./chunk-BMbtNfWQ.js';function Ce(i,t){i&1&&(os(0,"p",2),pC(1,"Loading\u2026"),zu());}function ye(i,t){if(i&1&&(os(0,"label",16),Hh(1,"input",17),lI(),pC(2),zu()),i&2){let e=t.$implicit,n=Lw(3);IE(),Vh("formControl",n.scopeControl)("value",e.value)("disabled",e.value==="namespace"&&!n.isAdmin()),fI(),IE(),Yu(" ",e.label," ");}}function ge(i,t){if(i&1&&(os(0,"ds-fieldset",5),Tw(1,ye,3,4,"label",16,Dw().trackByScope,true),zu()),i&2){let e=Lw(2);Vh("disabled",e.isEditMode()),IE(),_w(e.scopeOptions);}}function fe(i,t){if(i&1&&(os(0,"option",8),pC(1),zu()),i&2){let e=t.$implicit,n=Lw(2);Vh("value",e),IE(),lg(n.authTypeLabel[e]);}}function Se(i,t){if(i&1&&(os(0,"ds-form-field",18),Hh(1,"input",19),lI(),zu()),i&2){let e=Lw().$implicit;Vh("label",e.label)("controlId","as-cred-"+e.key)("required",e.required)("hint",e.hint??null)("hintId","as-hint-"+e.key),IE(),Vh("id","as-cred-"+e.key)("type",e.secret?"password":"text")("placeholder",e.placeholder)("formControl",t)("autocomplete",e.secret?"new-password":"off"),Bh("aria-describedby",e.hint?"as-hint-"+e.key:null),fI();}}function Ae(i,t){if(i&1&&Iw(0,Se,2,11,"ds-form-field",18),i&2){let e,n=t.$implicit,o=Lw(3);ww((e=o.controlForField(n.key))?0:-1,e);}}function ve(i,t){if(i&1&&(os(0,"ds-fieldset",13),Tw(1,Ae,1,1,null,null,Dw().trackByField,true),zu()),i&2){let e=Lw(2);Vh("hint","Values are stored encrypted and masked on read."+(e.isEditMode()?" Leave a field unchanged to keep the stored credential.":"")),IE(),_w(e.credentialFields());}}function be(i,t){if(i&1){let e=Rw();os(0,"form",4),qh("ngSubmit",function(){Pd(e);let o=Lw();return Ld(o.submit())}),Iw(1,ge,3,1,"ds-fieldset",5),os(2,"ds-form-field",6)(3,"select",7),Tw(4,fe,2,2,"option",8,bw),zu(),lI(),zu(),os(6,"ds-form-field",9),Hh(7,"input",10),lI(),zu(),os(8,"ds-form-field",11),Hh(9,"input",12),lI(),zu(),Iw(10,ve,3,1,"ds-fieldset",13),os(11,"ds-form-actions")(12,"button",14),pC(13),zu(),os(14,"button",15),qh("click",function(){Pd(e);let o=Lw();return Ld(o.cancel())}),pC(15,"Cancel"),zu()()();}if(i&2){let e=Lw();Vh("formGroup",e.form),IE(),ww(e.isPlatformMode?-1:1),IE(2),Vh("formControl",e.authTypeControl),fI(),IE(),_w(e.authTypeOptions),IE(3),Vh("formControl",e.nameControl),fI(),IE(2),Vh("formControl",e.descriptionControl),fI(),IE(),ww(e.credentialFields().length>0?10:-1),IE(2),Vh("disabled",e.form.invalid||e.isSubmitting()),IE(),Yu(" ",e.isEditMode()?"Save changes":"Create"," ");}}var ke=new Set(["namespace","userOnNs","userGlobal"]),D=Object.freeze({platform:"Platform (read-only)",namespace:"Namespace configuration",userOnNs:"Personal \u2014 this namespace only",userGlobal:"Personal \u2014 all namespaces"}),_e={ApiKeyAuthSetting:[{key:"apiKey",label:"API Key",placeholder:"sk-\u2026",secret:true,required:false}],BasicAuthAuthSetting:[{key:"username",label:"Username",placeholder:"user@example.com",secret:false,required:false},{key:"password",label:"Password",placeholder:"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",secret:true,required:false}],BearerTokenAuthSetting:[{key:"token",label:"Bearer token",placeholder:"eyJ\u2026",secret:true,required:false}],OAuthDiscoverableAuthSetting:[{key:"discoveryUrl",label:"Discovery URL",placeholder:"https://\u2026/.well-known/openid-configuration",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Space-separated OAuth scopes to request (e.g. openid profile email). Check your provider's documentation for the exact values.",secret:false,required:false}],OAuthCustomAuthSetting:[{key:"authorizationUrl",label:"Authorization URL",placeholder:"https://\u2026/authorize",secret:false,required:false},{key:"tokenUrl",label:"Token URL",placeholder:"https://\u2026/token",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Space-separated OAuth scopes to request (e.g. openid profile email). Check your provider's documentation for the exact values.",secret:false,required:false}],OAuthRegisteredAuthSetting:[{key:"authorizationUrl",label:"Authorization URL",placeholder:"https://\u2026/authorize",secret:false,required:false},{key:"tokenUrl",label:"Token URL",placeholder:"https://\u2026/token",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Space-separated OAuth scopes to request (e.g. openid profile email). Check your provider's documentation for the exact values.",secret:false,required:false}],OAuthMcpDiscoverableAuthSetting:[{key:"resourceUrl",label:"Resource URL",placeholder:"https://mcp.example.com",hint:"Use the base URL exactly as documented by your provider \u2014 do not append a path suffix. Examples: https://mcp.hubspot.com (HubSpot), https://mcp.atlassian.com/v1/mcp (Atlassian).",secret:false,required:false},{key:"clientId",label:"Client ID",placeholder:"",hint:"Leave empty to let the server register an OAuth client automatically (RFC 7591 dynamic registration). Fill in only if you have a pre-registered client ID from your provider.",secret:false,required:false},{key:"clientSecret",label:"Client secret",placeholder:"",secret:true,required:false},{key:"scopes",label:"Scopes",placeholder:"",hint:"Leave empty in most cases \u2014 the MCP server declares the required scopes itself. Fill in only if your provider explicitly requires client-declared scopes.",secret:false,required:false}]},me=class i{route=g(W);router=g(F);destroyRef=g(we);state=g(I);namespaceRole=g(v);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=this.namespaceId===void 0;isAdmin=this.isPlatformMode?Mi(true):F$1(this.namespaceRole.isAdminOfNamespace$(this.namespaceId),{initialValue:false});authTypeOptions=nt;authTypeLabel=it;scopeOptions=[{value:"namespace",label:D.namespace},{value:"userOnNs",label:D.userOnNs},{value:"userGlobal",label:D.userGlobal}];nameControl=new Te("",{nonNullable:true,validators:[bn.required,bn.minLength(1)]});descriptionControl=new Te(null);authTypeControl=new Te("ApiKeyAuthSetting",{nonNullable:true,validators:[bn.required]});scopeControl=new Te("namespace",{nonNullable:true});form=new pt({name:this.nameControl,description:this.descriptionControl,authType:this.authTypeControl,scope:this.scopeControl});apiKeyControl=new Te("",{nonNullable:true});usernameControl=new Te("",{nonNullable:true});passwordControl=new Te("",{nonNullable:true});tokenControl=new Te("",{nonNullable:true});discoveryUrlControl=new Te("",{nonNullable:true});authorizationUrlControl=new Te("",{nonNullable:true});tokenUrlControl=new Te("",{nonNullable:true});clientIdControl=new Te("",{nonNullable:true});clientSecretControl=new Te("",{nonNullable:true});scopesControl=new Te("",{nonNullable:true});resourceUrlControl=new Te("",{nonNullable:true});selectedAuthType=F$1(this.authTypeControl.valueChanges,{initialValue:this.authTypeControl.value});credentialFields=VC(()=>_e[this.selectedAuthType()]);isEditMode=Mi(false);isSubmitting=Mi(false);isLoading=Mi(false);existingConfig=null;initialCredentials={};constructor(){this.isPlatformMode||sf(()=>{this.isAdmin()||this.isEditMode()||this.scopeControl.value==="namespace"&&this.scopeControl.setValue("userOnNs");});}ngOnInit(){this.namespaceId&&this.state.setNamespace(this.namespaceId);let t=this.route.snapshot.paramMap,e=this.route.snapshot.queryParamMap,n=t.get("authSettingId");if(n){this.isEditMode.set(true),this.scopeControl.disable(),this.authTypeControl.disable(),this.loadConfig(n);return}if(this.isPlatformMode){this.scopeControl.setValue("platform"),this.scopeControl.disable();return}let o=this.parseScope(e.get("scope"));this.scopeControl.setValue(o);let v=e.get("template");v&&this.hydrateFromTemplate(v);}parseScope(t){return t&&ke.has(t)?t:"namespace"}deriveScopeFromConfig(t){return !t.userId&&!t.namespaceId?"platform":t.userId?t.namespaceId?"userOnNs":"userGlobal":"namespace"}loadConfig(t){this.isLoading.set(true),this.state.getById(t).pipe(U(this.destroyRef)).subscribe({next:e=>{this.existingConfig=e,this.scopeControl.setValue(this.deriveScopeFromConfig(e)),this.applyConfigToForm(e),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),console.warn(`[AuthSettingForm] Could not load auth setting '${t}' \u2014 navigating back`),this.navigateBack();}});}hydrateFromTemplate(t){this.isLoading.set(true),this.state.getById(t).pipe(U(this.destroyRef)).subscribe({next:e=>{this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??null),this.authTypeControl.setValue(e.authType),this.clearCredentialControls(),this.initialCredentials={},this.isLoading.set(false),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:true});},error:e=>{console.warn(`[AuthSettingForm] Could not hydrate from template ${t}:`,e),this.isLoading.set(false),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:true});}});}applyConfigToForm(t){switch(this.nameControl.setValue(t.name),this.descriptionControl.setValue(t.description??null),this.authTypeControl.setValue(t.authType),this.clearCredentialControls(),this.initialCredentials={},t.authType){case "ApiKeyAuthSetting":{let e=t.apiKey??"";this.apiKeyControl.setValue(e),this.initialCredentials.apiKey=e;break}case "BasicAuthAuthSetting":{let e=t,n=e.username??"",o=e.password??"";this.usernameControl.setValue(n),this.passwordControl.setValue(o),this.initialCredentials.username=n,this.initialCredentials.password=o;break}case "BearerTokenAuthSetting":{let e=t.token??"";this.tokenControl.setValue(e),this.initialCredentials.token=e;break}case "OAuthDiscoverableAuthSetting":{let e=t;this.discoveryUrlControl.setValue(e.discoveryUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.discoveryUrl=e.discoveryUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}case "OAuthCustomAuthSetting":{let e=t;this.authorizationUrlControl.setValue(e.authorizationUrl??""),this.tokenUrlControl.setValue(e.tokenUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.authorizationUrl=e.authorizationUrl??"",this.initialCredentials.tokenUrl=e.tokenUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}case "OAuthRegisteredAuthSetting":{let e=t;this.authorizationUrlControl.setValue(e.authorizationUrl??""),this.tokenUrlControl.setValue(e.tokenUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.authorizationUrl=e.authorizationUrl??"",this.initialCredentials.tokenUrl=e.tokenUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}case "OAuthMcpDiscoverableAuthSetting":{let e=t;this.resourceUrlControl.setValue(e.resourceUrl??""),this.clientIdControl.setValue(e.clientId??""),this.clientSecretControl.setValue(e.clientSecret??""),this.scopesControl.setValue(e.scopes??""),this.initialCredentials.resourceUrl=e.resourceUrl??"",this.initialCredentials.clientId=e.clientId??"",this.initialCredentials.clientSecret=e.clientSecret??"",this.initialCredentials.scopes=e.scopes??"";break}}}clearCredentialControls(){this.apiKeyControl.setValue(""),this.usernameControl.setValue(""),this.passwordControl.setValue(""),this.tokenControl.setValue(""),this.discoveryUrlControl.setValue(""),this.authorizationUrlControl.setValue(""),this.tokenUrlControl.setValue(""),this.clientIdControl.setValue(""),this.clientSecretControl.setValue(""),this.scopesControl.setValue(""),this.resourceUrlControl.setValue("");}credentialValue(t,e){if(!(this.isEditMode()&&e===this.initialCredentials[t]))return e||void 0}submit(){if(this.form.invalid||this.isSubmitting())return;if(this.isEditMode()&&!this.existingConfig?.id){this.navigateBack();return}this.isSubmitting.set(true);let t=this.nameControl.value.trim(),e=this.descriptionControl.value?.trim()||void 0,n=this.authTypeControl.value,o=this.form.getRawValue().scope,v=this.isPlatformMode?null:this.namespaceId??null,w=this.buildTypedPayload(n,t,e);(this.isEditMode()&&this.existingConfig?.id?this.state.update(this.existingConfig.id,w,this.existingConfig):this.state.create(w,o,v)).pipe(U(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(false)});}buildTypedPayload(t,e,n){let o={name:e,description:n};switch(t){case "ApiKeyAuthSetting":return x(w({},o),{authType:"ApiKeyAuthSetting",apiKey:this.credentialValue("apiKey",this.apiKeyControl.value)});case "BasicAuthAuthSetting":return x(w({},o),{authType:"BasicAuthAuthSetting",username:this.credentialValue("username",this.usernameControl.value),password:this.credentialValue("password",this.passwordControl.value)});case "BearerTokenAuthSetting":return x(w({},o),{authType:"BearerTokenAuthSetting",token:this.credentialValue("token",this.tokenControl.value)});case "OAuthDiscoverableAuthSetting":return x(w({},o),{authType:"OAuthDiscoverableAuthSetting",discoveryUrl:this.credentialValue("discoveryUrl",this.discoveryUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)});case "OAuthCustomAuthSetting":return x(w({},o),{authType:"OAuthCustomAuthSetting",authorizationUrl:this.credentialValue("authorizationUrl",this.authorizationUrlControl.value),tokenUrl:this.credentialValue("tokenUrl",this.tokenUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)});case "OAuthRegisteredAuthSetting":return x(w({},o),{authType:"OAuthRegisteredAuthSetting",authorizationUrl:this.credentialValue("authorizationUrl",this.authorizationUrlControl.value),tokenUrl:this.credentialValue("tokenUrl",this.tokenUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)});case "OAuthMcpDiscoverableAuthSetting":return x(w({},o),{authType:"OAuthMcpDiscoverableAuthSetting",resourceUrl:this.credentialValue("resourceUrl",this.resourceUrlControl.value),clientId:this.credentialValue("clientId",this.clientIdControl.value),clientSecret:this.credentialValue("clientSecret",this.clientSecretControl.value),scopes:this.credentialValue("scopes",this.scopesControl.value)})}}controlForField(t){return {apiKey:this.apiKeyControl,username:this.usernameControl,password:this.passwordControl,token:this.tokenControl,discoveryUrl:this.discoveryUrlControl,authorizationUrl:this.authorizationUrlControl,tokenUrl:this.tokenUrlControl,clientId:this.clientIdControl,clientSecret:this.clientSecretControl,scopes:this.scopesControl,resourceUrl:this.resourceUrlControl}[t]}cancel(){this.navigateBack();}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","auth-settings"]):this.router.navigate(["/agentos",this.namespaceId,"auth-settings"]);}trackByScope(t,e){return e.value}trackByField(t,e){return e.key}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=ew({type:i,selectors:[["agentos-auth-setting-form"]],decls:6,vars:2,consts:[[3,"title"],["dsButton","","variant","ghost","type","button","title","Back to auth settings",3,"click"],[1,"ds-hint"],[1,"ds-form",3,"formGroup"],[1,"ds-form",3,"ngSubmit","formGroup"],["legend","Configuration scope",3,"disabled"],["label","Auth type","controlId","as-auth-type","required",""],["dsControl","","id","as-auth-type",3,"formControl"],[3,"value"],["label","Name","controlId","as-name","required",""],["dsControl","","id","as-name","type","text","placeholder","e.g. GitHub OAuth App","autocomplete","off",3,"formControl"],["label","Description","controlId","as-description"],["dsControl","","id","as-description","type","text","placeholder","Optional \u2014 short description of this auth setting","autocomplete","off",3,"formControl"],["legend","Credentials",3,"hint"],["dsButton","","variant","primary","type","submit",3,"disabled"],["dsButton","","type","button",3,"click"],["dsCheck",""],["type","radio",3,"formControl","value","disabled"],[3,"label","controlId","required","hint","hintId"],["dsControl","",3,"id","type","placeholder","formControl","autocomplete"]],template:function(e,n){e&1&&(os(0,"ds-page")(1,"ds-section-header",0)(2,"button",1),qh("click",function(){return n.cancel()}),pC(3," \u2190 Auth settings "),zu()(),Iw(4,Ce,2,0,"p",2)(5,be,16,8,"form",3),zu()),e&2&&(IE(),Vh("title",n.isEditMode()?"Edit auth setting":"New auth setting"),IE(3),ww(n.isLoading()?4:5));},dependencies:[vn,yn,fn,pn,hn,at,un,cn,Kt,fd,Mo,Do,Ut,Qt,Ca,fo,go,Nn,Rn],encapsulation:2})};
2
2
  export{me as AuthSettingFormComponent};
@@ -0,0 +1 @@
1
+ import {n}from'./chunk-CfgXrte_.js';import {O}from'./chunk-C0i49sQV.js';import {v}from'./chunk-C7nsTLJX.js';import {g,W as W$1,F,v as we,M as Mi,x as U$1,ah as te$1,a5 as Ys,ae as Dr,a as ew,o as os,K as qh,z as zu,b as pC,I as Iw,c as IE,J as Vh,w as ww,L as Lw,l as lg,T as Tw,_ as _w,R as Rw,h as Bh,P as Pd,n as Ld}from'./main-EPHSXFSY.js';import {r as k,O as O$1,i as at,d as yn,V as Vo,A as Ao,k as P,w as P$1}from'./chunk-2KFuV5E5.js';import'./chunk-BMbtNfWQ.js';var H=(i,e)=>e.key;function U(i,e){if(i&1&&(os(0,"p",3),pC(1),zu()),i&2){let t=Lw();IE(),lg(t.deletion.error());}}function z(i,e){i&1&&(os(0,"p",4),pC(1,"Loading AI providers\u2026"),zu());}function J(i,e){i&1&&(os(0,"p",5),pC(1,"No AI providers available."),zu());}function Q(i,e){i&1&&(os(0,"p",4),pC(1,"No AI providers match the current filter."),zu());}function W(i,e){i&1&&(os(0,"ds-tag",17),pC(1,"Read-only"),zu());}function X(i,e){if(i&1){let t=Rw();os(0,"button",22),qh("click",function(){Pd(t);let d=Lw().$implicit,c=Lw(2);return Ld(c.duplicate(d))}),pC(1," Duplicate "),zu();}if(i&2){let t=Lw().$implicit;Bh("aria-label","Duplicate "+t.config.name);}}function Y(i,e){if(i&1){let t=Rw();os(0,"button",22),qh("click",function(){Pd(t);let d=Lw(2).$implicit,c=Lw(2);return Ld(c.edit(d))}),pC(1," Edit "),zu();}if(i&2){let t=Lw(2).$implicit;Bh("aria-label","Edit "+t.config.name);}}function Z(i,e){if(i&1){let t=Rw();Iw(0,Y,2,1,"button",20),os(1,"agentos-row-delete-action",23),qh("deleteRequested",function(){Pd(t);let d=Lw().$implicit,c=Lw(2);return Ld(c.deletion.request(d.key))})("deleteConfirmed",function(){Pd(t);let d=Lw().$implicit,c=Lw(2);return Ld(c.confirmDelete(d))})("deleteCancelled",function(){Pd(t);let d=Lw(3);return Ld(d.deletion.cancel())}),zu();}if(i&2){let t=Lw().$implicit,r=Lw(2);ww(r.deletion.confirmingId()!==t.key?0:-1),IE(),Vh("rowKey",t.key)("rowLabel",t.config.name)("state",r.deletion);}}function ee(i,e){i&1&&(os(0,"button",21),pC(1,"Inherited"),zu());}function te(i,e){if(i&1&&(os(0,"tr",9)(1,"td",12),pC(2),zu(),os(3,"td",13),pC(4),zu(),os(5,"td",14)(6,"div",15)(7,"ds-tag",16),pC(8),zu(),Iw(9,W,2,0,"ds-tag",17),zu()(),os(10,"td",18)(11,"div",19),Iw(12,X,2,1,"button",20),Iw(13,Z,2,4)(14,ee,2,0,"button",21),zu()()()),i&2){let t=e.$implicit,r=Lw(2);IE(2),lg(t.config.name),IE(2),lg(t.config.apiType),IE(3),Vh("variant",t.scopeLabel==="Platform"?"neutral":t.scopeLabel==="Personal"?"outline":"accent"),IE(),lg(t.scopeLabel),IE(),ww(t.canMutate?-1:9),IE(3),ww(r.deletion.confirmingId()!==t.key?12:-1),IE(),ww(t.canMutate?13:14);}}function ie(i,e){if(i&1&&(os(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),pC(5,"Name"),zu(),os(6,"th",10),pC(7,"API type"),zu(),os(8,"th",10),pC(9,"Scope"),zu(),os(10,"th",10)(11,"span",11),pC(12,"Actions"),zu()()()(),os(13,"tbody",8),Tw(14,te,15,7,"tr",9,H),zu()()()),i&2){let t=Lw();IE(14),_w(t.rowFilter.filteredRows());}}var G=class i{route=g(W$1);router=g(F);destroyRef=g(we);state=g(O);namespaceRole=g(v);namespaceId=this.route.snapshot.params.namespaceId;isAdmin=Mi(false);isLoading=Mi(true);rows=Mi([]);deletion=k();rowFilter=O$1(this.rows,e=>[e.config.name,e.config.apiType,e.scopeLabel].join(" "));ngOnInit(){this.route.paramMap.pipe(U$1(this.destroyRef)).subscribe(e=>{let t=e.get("namespaceId")??"";t&&t!==this.namespaceId&&(this.namespaceId=t),this.state.setNamespace(t);}),this.route.paramMap.pipe(te$1(e=>e.get("namespaceId")??""),Ys(e=>e?this.namespaceRole.isAdminOfNamespace$(e):Dr(false)),U$1(this.destroyRef)).subscribe(e=>this.isAdmin.set(e)),this.state.vm$.pipe(U$1(this.destroyRef)).subscribe({next:e=>{this.rows.set(this.toRows(e)),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"ai-providers","new"],{queryParams:{scope:n(this.isAdmin())}});}edit(e){!e.canMutate||!e.config.id||this.router.navigate(["/agentos",this.namespaceId,"ai-providers",e.config.id,"edit"],{queryParams:{scope:e.scope}});}confirmDelete(e){!e.canMutate||!e.config.id||this.deletion.execute(e.key,{request$:this.state.delete(e.config.id,e.scope).pipe(U$1(this.destroyRef)),errorMessage:`Deleting "${e.config.name}" failed. Try again.`});}duplicate(e){if(!e.config.id)return;let t=e.scope==="platform"||e.scope==="namespace"&&!this.isAdmin()?"userOnNs":e.scope;this.router.navigate(["/agentos",this.namespaceId,"ai-providers","new"],{queryParams:{scope:t,template:e.config.id,templateScope:e.scope}});}toRows(e){return [...this.mapScope(e.platform,"platform","Platform",false),...this.mapScope(e.namespace,"namespace","Namespace",this.isAdmin()),...this.mapScope(e.userOnNs,"userOnNs","Personal",true),...this.mapScope(e.userGlobal,"userGlobal","Personal",true)]}mapScope(e,t,r,d){return e.map((c,K)=>({key:`${t}:${c.id??K}`,config:c,scope:t,scopeLabel:r,canMutate:d}))}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=ew({type:i,selectors:[["agentos-ai-providers-all-scopes"]],decls:9,vars:3,consts:[["title","AI providers","description","AI providers available in this namespace, including inherited platform and personal entries."],["label","Filter AI providers","placeholder","Filter AI providers\u2026",3,"queryChange","query"],["dsButton","","variant","primary","type","button",3,"click"],["role","alert",1,"settings-table__error"],["role","status",1,"settings-table__status"],[1,"settings-table__status"],[1,"settings-table__wrap"],["dsTable","","role","table","aria-label","AI providers"],["role","rowgroup"],["role","row"],["role","columnheader"],[1,"sr-only"],["role","cell","data-label","Name","data-title","",1,"settings-table__name"],["role","cell","data-label","API type",1,"settings-table__secondary"],["role","cell","data-label","Scope"],[1,"settings-table__tags"],[3,"variant"],["variant","outline"],["role","cell","data-label","Actions","data-actions",""],[1,"settings-table__actions"],["type","button"],["type","button","disabled",""],["type","button",3,"click"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"deleteRequested","deleteConfirmed","deleteCancelled","rowKey","rowLabel","state"]],template:function(t,r){t&1&&(os(0,"ds-section-header",0)(1,"agentos-table-filter",1),qh("queryChange",function(c){return r.rowFilter.query.set(c)}),zu(),os(2,"button",2),qh("click",function(){return r.openCreateForm()}),pC(3,"New AI provider"),zu()(),Iw(4,U,2,1,"p",3),Iw(5,z,2,0,"p",4)(6,J,2,0,"p",5)(7,Q,2,0,"p",4)(8,ie,16,0,"div",6)),t&2&&(IE(),Vh("query",r.rowFilter.query()),IE(3),ww(r.deletion.error()?4:-1),IE(),ww(r.isLoading()?5:r.rows().length===0?6:r.rowFilter.filteredRows().length===0?7:8));},dependencies:[at,yn,Vo,Ao,P,P$1],encapsulation:2})};export{G as AiProvidersAllScopesComponent};
@@ -0,0 +1 @@
1
+ import {x as m,r as k,O as O$1,i as at,d as yn,V as Vo,A as Ao,k as P,w as P$1}from'./chunk-2KFuV5E5.js';import {g,W as W$1,F,v as we,a3 as vr,M as Mi,a5 as Ys,ag as Gm,a6 as Zs,ae as Dr,x as U$1,a as ew,o as os,K as qh,z as zu,b as pC,I as Iw,c as IE,J as Vh,w as ww,L as Lw,l as lg,T as Tw,_ as _w,Y as Yu,R as Rw,P as Pd,n as Ld,h as Bh}from'./main-EPHSXFSY.js';var U=(n,e)=>e.key;function z(n,e){if(n&1&&(os(0,"p",3),pC(1),zu()),n&2){let t=Lw();IE(),lg(t.deletion.error());}}function G(n,e){n&1&&(os(0,"p",4),pC(1,"Loading prompts\u2026"),zu());}function O(n,e){n&1&&(os(0,"p",5),pC(1,"No prompts available."),zu());}function Q(n,e){n&1&&(os(0,"p",4),pC(1,"No prompts match the current filter."),zu());}function W(n,e){n&1&&(os(0,"ds-tag",17),pC(1,"Read-only"),zu());}function X(n,e){if(n&1){let t=Rw();os(0,"button",23),qh("click",function(){Pd(t);let l=Lw(2).$implicit,m=Lw(2);return Ld(m.edit(l))}),pC(1," Edit "),zu();}if(n&2){let t=Lw(2).$implicit;Bh("aria-label","Edit "+t.prompt.name);}}function Y(n,e){if(n&1){let t=Rw();Iw(0,X,2,1,"button",21),os(1,"agentos-row-delete-action",22),qh("deleteRequested",function(){Pd(t);let l=Lw().$implicit,m=Lw(2);return Ld(m.deletion.request(l.key))})("deleteConfirmed",function(){Pd(t);let l=Lw().$implicit,m=Lw(2);return Ld(m.confirmDelete(l))})("deleteCancelled",function(){Pd(t);let l=Lw(3);return Ld(l.deletion.cancel())}),zu();}if(n&2){let t=Lw().$implicit,i=Lw(2);ww(i.deletion.confirmingId()!==t.key?0:-1),IE(),Vh("rowKey",t.key)("rowLabel",t.prompt.name)("state",i.deletion);}}function Z(n,e){n&1&&(os(0,"button",20),pC(1,"Inherited"),zu());}function ee(n,e){if(n&1&&(os(0,"tr",9)(1,"td",12),pC(2),zu(),os(3,"td",13),pC(4),zu(),os(5,"td",14)(6,"div",15)(7,"ds-tag",16),pC(8),zu(),Iw(9,W,2,0,"ds-tag",17),zu()(),os(10,"td",18)(11,"div",19),Iw(12,Y,2,4)(13,Z,2,0,"button",20),zu()()()),n&2){let t=e.$implicit;IE(2),lg(t.prompt.name),IE(2),Yu(" ",t.prompt.description||"\u2014"," "),IE(3),Vh("variant",t.scope==="platform"?"neutral":"accent"),IE(),lg(t.scope==="platform"?"Platform":"Namespace"),IE(),ww(t.scope==="platform"?9:-1),IE(3),ww(t.scope==="namespace"?12:13);}}function te(n,e){if(n&1&&(os(0,"div",6)(1,"table",7)(2,"thead",8)(3,"tr",9)(4,"th",10),pC(5,"Name"),zu(),os(6,"th",10),pC(7,"Description"),zu(),os(8,"th",10),pC(9,"Scope"),zu(),os(10,"th",10)(11,"span",11),pC(12,"Actions"),zu()()()(),os(13,"tbody",8),Tw(14,ee,14,6,"tr",9,U),zu()()()),n&2){let t=Lw();IE(14),_w(t.rowFilter.filteredRows());}}var J=class n{route=g(W$1);router=g(F);destroyRef=g(we);promptState=g(m);namespaceId=this.route.snapshot.params.namespaceId;refresh$=new vr(void 0);isLoading=Mi(true);deletion=k();rows=Mi([]);rowFilter=O$1(this.rows,e=>[e.prompt.name,e.prompt.description,e.scope].filter(Boolean).join(" "));allPrompts$=this.refresh$.pipe(Ys(()=>(this.isLoading.set(true),Gm({platform:this.promptState.listPlatform().pipe(Zs(()=>Dr([]))),namespace:this.promptState.listByNamespace(this.namespaceId)}))));constructor(){this.allPrompts$.pipe(U$1(this.destroyRef)).subscribe({next:({platform:e,namespace:t})=>{this.rows.set([...e.map((i,l)=>({key:`platform:${i.id??l}`,prompt:i,scope:"platform"})),...t.map((i,l)=>({key:`namespace:${i.id??l}`,prompt:i,scope:"namespace"}))]),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"prompts","new"]);}edit(e){e.scope==="platform"||!e.prompt.id||this.router.navigate(["/agentos",this.namespaceId,"prompts",e.prompt.id,"edit"]);}confirmDelete(e){e.scope==="platform"||!e.prompt.id||this.deletion.execute(e.key,{request$:this.promptState.delete(e.prompt.id).pipe(U$1(this.destroyRef)),onSuccess:()=>this.refresh$.next(),errorMessage:`Deleting "${e.prompt.name}" failed. Try again.`});}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=ew({type:n,selectors:[["agentos-namespace-prompts"]],decls:9,vars:3,consts:[["title","Prompts","description","Prompts available in this namespace, including prompts inherited from the platform."],["label","Filter prompts","placeholder","Filter prompts\u2026",3,"queryChange","query"],["dsButton","","variant","primary","type","button",3,"click"],["role","alert",1,"settings-table__error"],["role","status",1,"settings-table__status"],[1,"settings-table__status"],[1,"settings-table__wrap"],["dsTable","","role","table","aria-label","Prompts"],["role","rowgroup"],["role","row"],["role","columnheader"],[1,"sr-only"],["role","cell","data-label","Name","data-title","",1,"settings-table__name"],["role","cell","data-label","Description",1,"settings-table__secondary"],["role","cell","data-label","Scope"],[1,"settings-table__tags"],[3,"variant"],["variant","outline"],["role","cell","data-label","Actions","data-actions",""],[1,"settings-table__actions"],["type","button","disabled",""],["type","button"],["deleteClass","settings-table__delete","confirmLabelClass","settings-table__confirm-label",3,"deleteRequested","deleteConfirmed","deleteCancelled","rowKey","rowLabel","state"],["type","button",3,"click"]],template:function(t,i){t&1&&(os(0,"ds-section-header",0)(1,"agentos-table-filter",1),qh("queryChange",function(m){return i.rowFilter.query.set(m)}),zu(),os(2,"button",2),qh("click",function(){return i.openCreateForm()}),pC(3,"New prompt"),zu()(),Iw(4,z,2,1,"p",3),Iw(5,G,2,0,"p",4)(6,O,2,0,"p",5)(7,Q,2,0,"p",4)(8,te,16,0,"div",6)),t&2&&(IE(),Vh("query",i.rowFilter.query()),IE(3),ww(i.deletion.error()?4:-1),IE(),ww(i.isLoading()?5:i.rows().length===0?6:i.rowFilter.filteredRows().length===0?7:8));},dependencies:[at,yn,Vo,Ao,P,P$1],encapsulation:2})};export{J as NamespacePromptsComponent};
@@ -0,0 +1 @@
1
+ import {O as O$1,i as at,d as yn,V as Vo,A as Ao,k as P}from'./chunk-2KFuV5E5.js';import {g,v as we,a2 as W,a3 as vr,M as Mi,i as VC,a4 as Ne,a5 as Ys,a6 as Zs,a7 as Kt,x as U$1,a as ew,o as os,K as qh,z as zu,b as pC,I as Iw,c as IE,J as Vh,w as ww,T as Tw,L as Lw,_ as _w,Y as Yu,l as lg}from'./main-EPHSXFSY.js';function q(e){if(e.sensitive)return e.configured?{status:"hidden",text:"set (hidden)"}:{status:"unset",text:"not set"};if(!e.configured)return {status:"unset",text:"unset"};let t=e.value??"",i=t.trim().toLowerCase();return i==="true"?{status:"on",text:"on"}:i==="false"?{status:"off",text:"off"}:{status:"value",text:t===""?"(empty)":t}}var U=(e,t)=>t.key;function B(e,t){e&1&&(os(0,"p",10),pC(1,"Loading the configuration failed. Try refreshing."),zu());}function V(e,t){e&1&&(os(0,"p",11),pC(1,"Loading configuration\u2026"),zu());}function j(e,t){e&1&&(os(0,"p",12),pC(1,"The service reported no settings."),zu());}function O(e,t){e&1&&(os(0,"p",11),pC(1,"No settings match the current filters."),zu());}function Y(e,t){e&1&&(os(0,"ds-tag",22),pC(1,"on"),zu());}function z(e,t){e&1&&(os(0,"ds-tag",20),pC(1,"off"),zu());}function H(e,t){if(e&1&&(os(0,"ds-tag",20),pC(1),zu()),e&2){let i=Lw().$implicit;IE(),lg(i.display.text);}}function G(e,t){if(e&1&&(os(0,"ds-tag",23),pC(1),zu()),e&2){let i=Lw().$implicit;IE(),lg(i.display.text);}}function J(e,t){if(e&1&&(os(0,"span",24),pC(1),zu()),e&2){let i=Lw().$implicit;IE(),lg(i.display.text);}}function K(e,t){if(e&1&&(os(0,"tr",16)(1,"td",18),pC(2),zu(),os(3,"td",19)(4,"ds-tag",20),pC(5),zu()(),os(6,"td",21),Iw(7,Y,2,0,"ds-tag",22)(8,z,2,0,"ds-tag",20)(9,H,2,1,"ds-tag",20)(10,G,2,1,"ds-tag",23)(11,J,2,1,"span",24),zu(),os(12,"td",25),pC(13),zu()()),e&2){let i,a=t.$implicit,m=Lw(2);IE(2),Yu(" ",a.entry.key," "),IE(3),Yu(" ",a.entry.source===m.Source.ENVIRONMENT?"Environment":"Property"," "),IE(2),ww((i=a.display.status)==="on"?7:i==="off"?8:i==="hidden"?9:i==="unset"?10:11),IE(6),Yu(" ",a.entry.description||"\u2014"," ");}}function Q(e,t){if(e&1&&(os(0,"div",13)(1,"table",14)(2,"thead",15)(3,"tr",16)(4,"th",17),pC(5,"Setting"),zu(),os(6,"th",17),pC(7,"Source"),zu(),os(8,"th",17),pC(9,"Value"),zu(),os(10,"th",17),pC(11,"Description"),zu()()(),os(12,"tbody",15),Tw(13,K,14,4,"tr",16,U),zu()()()),e&2){let i=Lw();IE(13),_w(i.visibleRows());}}var A=class e{destroyRef=g(we);configurationController=g(W);refresh$=new vr(void 0);isLoading=Mi(true);loadError=Mi(false);rows=Mi([]);source=Mi("ALL");status=Mi("ALL");rowFilter=O$1(this.rows,t=>[t.entry.key,t.entry.description,t.entry.value].filter(Boolean).join(" "));visibleRows=VC(()=>this.rowFilter.filteredRows().filter(t=>{let i=this.source(),a=this.status();return i!=="ALL"&&t.entry.source!==i?false:a==="SET"?t.entry.configured:a==="UNSET"?!t.entry.configured:true}));Source=Ne;constructor(){this.refresh$.pipe(Ys(()=>(this.isLoading.set(true),this.loadError.set(false),this.configurationController.listEffectiveConfiguration().pipe(Zs(()=>(this.loadError.set(true),this.isLoading.set(false),Kt))))),U$1(this.destroyRef)).subscribe(t=>{this.rows.set(t.map(i=>({key:`${i.source}:${i.key}`,entry:i,display:q(i)}))),this.isLoading.set(false);});}reload(){this.refresh$.next();}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=ew({type:e,selectors:[["agentos-platform-configuration"]],decls:24,vars:6,consts:[["title","Configuration","description","Effective environment variables and Spring properties of the running service. Secrets are never shown, only whether they are set."],["label","Filter settings","placeholder","Filter settings\u2026",3,"queryChange","query"],["dsButton","","type","button",3,"click"],[1,"settings-table__toolbar"],["aria-label","Filter by source",1,"ds-control",2,"width","auto",3,"change","value"],["value","ALL"],[3,"value"],["aria-label","Filter by state",1,"ds-control",2,"width","auto",3,"change","value"],["value","SET"],["value","UNSET"],["role","alert",1,"settings-table__error"],["role","status",1,"settings-table__status"],[1,"settings-table__status"],[1,"settings-table__wrap"],["dsTable","","role","table","aria-label","Effective configuration"],["role","rowgroup"],["role","row"],["role","columnheader"],["role","cell","data-label","Setting","data-title","",1,"settings-table__name","ds-mono"],["role","cell","data-label","Source"],["variant","neutral"],["role","cell","data-label","Value"],["variant","accent"],["variant","outline"],[1,"ds-mono"],["role","cell","data-label","Description",1,"settings-table__secondary"]],template:function(i,a){i&1&&(os(0,"ds-section-header",0)(1,"agentos-table-filter",1),qh("queryChange",function(c){return a.rowFilter.query.set(c)}),zu(),os(2,"button",2),qh("click",function(){return a.reload()}),pC(3,"Refresh"),zu()(),os(4,"div",3)(5,"select",4),qh("change",function(c){return a.source.set(c.target.value)}),os(6,"option",5),pC(7,"All sources"),zu(),os(8,"option",6),pC(9,"Environment variables"),zu(),os(10,"option",6),pC(11,"Spring properties"),zu()(),os(12,"select",7),qh("change",function(c){return a.status.set(c.target.value)}),os(13,"option",5),pC(14,"Set and unset"),zu(),os(15,"option",8),pC(16,"Set only"),zu(),os(17,"option",9),pC(18,"Unset only"),zu()()(),Iw(19,B,2,0,"p",10)(20,V,2,0,"p",11)(21,j,2,0,"p",12)(22,O,2,0,"p",11)(23,Q,15,0,"div",13)),i&2&&(IE(),Vh("query",a.rowFilter.query()),IE(4),Vh("value",a.source()),IE(3),Vh("value",a.Source.ENVIRONMENT),IE(2),Vh("value",a.Source.PROPERTY),IE(2),Vh("value",a.status()),IE(7),ww(a.loadError()?19:a.isLoading()?20:a.rows().length===0?21:a.visibleRows().length===0?22:23));},dependencies:[at,yn,Vo,Ao,P],encapsulation:2})};export{A as PlatformConfigurationComponent};
@@ -0,0 +1 @@
1
+ import {i}from'./chunk-BMbtNfWQ.js';import {y}from'./chunk-2KFuV5E5.js';import {g,aL as X,a3 as vr,aw as $m,a5 as Ys,a6 as Zs,ae as Dr,ah as te,aK as my,E as x,C as w$1,a9 as Hl,aM as st,aN as bt,aO as en,aa as k$1}from'./main-EPHSXFSY.js';var nt=["ApiKeyAuthSetting","BasicAuthAuthSetting","BearerTokenAuthSetting","OAuthDiscoverableAuthSetting","OAuthMcpDiscoverableAuthSetting","OAuthCustomAuthSetting","OAuthRegisteredAuthSetting"],it={ApiKeyAuthSetting:"API Key",BasicAuthAuthSetting:"Basic Auth (username / password)",BearerTokenAuthSetting:"Bearer Token",OAuthDiscoverableAuthSetting:"OAuth \u2014 Discovery URL",OAuthMcpDiscoverableAuthSetting:"OAuth \u2014 MCP Discoverable",OAuthCustomAuthSetting:"OAuth \u2014 Custom endpoints",OAuthRegisteredAuthSetting:"OAuth \u2014 Registered app"},R="none",w="me",b=2e3,M=15e4,P=3,L={ApiKeyAuthSetting:"API_KEY",BasicAuthAuthSetting:"BASIC_AUTH",BearerTokenAuthSetting:"BEARER_TOKEN",OAuthDiscoverableAuthSetting:"OAUTH_DISCOVERABLE",OAuthMcpDiscoverableAuthSetting:"OAUTH_MCP_DISCOVERABLE",OAuthCustomAuthSetting:"OAUTH_CUSTOM",OAuthRegisteredAuthSetting:"OAUTH_REGISTERED"},k={API_KEY:"ApiKeyAuthSetting",BASIC_AUTH:"BasicAuthAuthSetting",BEARER_TOKEN:"BearerTokenAuthSetting",OAUTH_DISCOVERABLE:"OAuthDiscoverableAuthSetting",OAUTH_MCP_DISCOVERABLE:"OAuthMcpDiscoverableAuthSetting",OAUTH_CUSTOM:"OAuthCustomAuthSetting",OAUTH_REGISTERED:"OAuthRegisteredAuthSetting"};function B(i){let t=L[i.authType];return t?x(w$1({},i),{authType:t}):i}function m(i){return U(i)}function f(i){return i.map(U)}function U(i){let t=i;if(typeof t.authType=="string"){let e=k[t.authType];if(e)return x(w$1({},t),{authType:e})}return i}function H(i,t){return t===null?true:i!==void 0&&Date.parse(i)>Date.parse(t)}var I=class i$1{controller=g(X);userState=g(y);refresh$=new vr(void 0);namespaceId$=new vr(null);vm$=$m([this.namespaceId$,this.refresh$]).pipe(Ys(([t])=>{let e=this.loadPlatformSettings().pipe(Zs(()=>Dr([])));return t?$m([e,this.loadNamespaceSettings(t).pipe(Zs(()=>Dr([]))),this.loadUserSettings(t).pipe(Zs(()=>Dr([]))),this.loadUserSettings("global").pipe(Zs(()=>Dr([])))]).pipe(te(([n,o,r,h])=>({platform:n,namespace:o,userOnNs:r,userGlobal:h}))):$m([e,this.loadNamespaceSettings("").pipe(Zs(()=>Dr([]))),this.loadUserSettings("global").pipe(Zs(()=>Dr([])))]).pipe(te(([n,o,r])=>({platform:n,namespace:o,userOnNs:[],userGlobal:r})))}),my({bufferSize:1,refCount:true}));setNamespace(t){this.namespaceId$.value!==t&&this.namespaceId$.next(t);}refresh(){this.refresh$.next();}loadUserSettings(t){let e=t==="global"?R:t;return this.controller.listAuthSetting(e,w).pipe(te(n=>f(n)))}userGlobal$=i(this.refresh$,()=>this.loadUserSettings("global"),[]);loadPlatformSettings(){return this.controller.listAuthSetting(R).pipe(te(t=>f(t)))}loadNamespaceSettings(t){return t?this.controller.listAuthSetting(t).pipe(te(e=>f(e))):Dr([])}getById(t,e){return this.controller.getByIdAuthSetting(t).pipe(te(n=>m(n)))}create(t,e,n){let r=this.userState.currentUser()?.id;if((e==="userOnNs"||e==="userGlobal")&&!r)throw new Error(`Cannot create ${e} auth setting before UserStateService.loadMe() resolves \u2014 call loadMe() at app init`);if(e==="namespace"&&(n===void 0||n===""))throw new Error("Cannot create namespace-scoped auth setting without a namespaceId");if(e==="userOnNs"&&!n)throw new Error("Cannot create userOnNs auth setting without a namespaceId");let h=B(x(w$1({},t),{namespaceId:e==="namespace"||e==="userOnNs"?n??void 0:void 0,userId:e==="userOnNs"||e==="userGlobal"?r:void 0}));return this.controller.createAuthSetting(h).pipe(te(A=>m(A)),Hl(()=>this.refresh()))}update(t,e,n){let o=B(x(w$1({},e),{namespaceId:n.namespaceId,userId:n.userId,authType:n.authType}));return this.controller.updateAuthSetting(t,o).pipe(te(r=>m(r)),Hl(()=>this.refresh()))}delete(t,e){return this.controller.deleteAuthSetting(t).pipe(Hl(()=>this.refresh()))}getConnection(t,e){return this.controller.getConnectionAuthSetting(t,e)}resetCredential(t,e){return this.controller.resetMyCredentialAuthSetting(t,e)}connect(t,e,n,o){return this.getConnection(t,e).pipe(Ys(r=>this.controller.connectAuthSetting(t,e).pipe(Hl(h=>n(h.authorizationUrl)),Ys(()=>this.awaitNewConnection(t,e,r.connected?r.connectedAt??null:null,o)))))}awaitNewConnection(t,e,n,o){let r=0,h=0;return st(b,b).pipe(Ys(()=>this.getConnection(t,e).pipe(Zs(()=>Dr(null)))),te(A=>(r++,A?.connected&&H(A.connectedAt,n)?"connected":r*b>=M?"timeout":o()&&++h>=P?"abandoned":null)),bt(A=>A!==null),en(1))}static \u0275fac=function(e){return new(e||i$1)};static \u0275prov=k$1({token:i$1,factory:i$1.\u0275fac,providedIn:"root"})};export{I,it as i,nt as n};
@@ -33,5 +33,5 @@
33
33
  <style>:root{--color-bg:#f5f6f8;--color-bg-solid:#f5f6f8;--color-bg-secondary:rgba(255, 255, 255, .7);--color-bg-secondary-rgb:255 255 255;--color-text:#1d1d1f;--color-text-secondary:#6e6e73;--color-text-inverse:#ffffff;--color-text-tertiary:#a1a1a6;--color-primary:#007aff;--color-primary-hover:#0051d5;--color-accent:#8b5cf6;--color-link:#007aff;--color-border:rgba(0, 0, 0, .1);--color-border-light:rgba(40, 40, 40, .08);--color-input-bg:rgba(255, 255, 255, .8);--color-bg-hover:rgba(0, 0, 0, .04);--color-success:#34c759;--color-success-bg:#e3f5e1;--color-error:#ff3b30;--color-warning:#ff9500;--color-info:#5ac8fa;--color-message-user:rgba(0, 122, 255, .1);--color-message-ai:rgba(255, 255, 255, .8);--color-code-bg:rgba(142, 142, 147, .12);--color-code-text:#ff375f;--glass-bg:rgba(255, 255, 255, .72);--glass-border:rgba(255, 255, 255, .18);--glass-shadow:0 8px 32px 0 rgba(31, 38, 135, .15);--glass-backdrop-blur:blur(20px);--color-modal-bg:#ffffff;--color-surface:#ffffff;--color-modal-border:rgba(0, 0, 0, .12);--color-modal-shadow:0 8px 40px rgba(0, 0, 0, .18), 0 2px 8px rgba(0, 0, 0, .1);--color-shadow:rgba(0, 0, 0, .08);--color-overlay:rgba(0, 0, 0, .4);--color-surface-hover:var(--color-bg-hover);--color-surface-secondary:rgba(0, 0, 0, .03);--color-surface-muted:rgba(0, 0, 0, .05);--color-divider:rgba(0, 0, 0, .1)}*{box-sizing:border-box}html{color-scheme:light}html{--mat-sys-background:light-dark(#faf9fd, #121316);--mat-sys-error:light-dark(#ba1a1a, #ffb4ab);--mat-sys-error-container:light-dark(#ffdad6, #93000a);--mat-sys-inverse-on-surface:light-dark(#f2f0f4, #2f3033);--mat-sys-inverse-primary:light-dark(#abc7ff, #005cbb);--mat-sys-inverse-surface:light-dark(#2f3033, #e3e2e6);--mat-sys-on-background:light-dark(#1a1b1f, #e3e2e6);--mat-sys-on-error:light-dark(#ffffff, #690005);--mat-sys-on-error-container:light-dark(#93000a, #ffdad6);--mat-sys-on-primary:light-dark(#ffffff, #002f65);--mat-sys-on-primary-container:light-dark(#00458f, #d7e3ff);--mat-sys-on-primary-fixed:light-dark(#001b3f, #001b3f);--mat-sys-on-primary-fixed-variant:light-dark(#00458f, #00458f);--mat-sys-on-secondary:light-dark(#ffffff, #283041);--mat-sys-on-secondary-container:light-dark(#3e4759, #dae2f9);--mat-sys-on-secondary-fixed:light-dark(#131c2b, #131c2b);--mat-sys-on-secondary-fixed-variant:light-dark(#3e4759, #3e4759);--mat-sys-on-surface:light-dark(#1a1b1f, #e3e2e6);--mat-sys-on-surface-variant:light-dark(#44474e, #e0e2ec);--mat-sys-on-tertiary:light-dark(#ffffff, #002f65);--mat-sys-on-tertiary-container:light-dark(#00458f, #d7e3ff);--mat-sys-on-tertiary-fixed:light-dark(#001b3f, #001b3f);--mat-sys-on-tertiary-fixed-variant:light-dark(#00458f, #00458f);--mat-sys-outline:light-dark(#74777f, #8e9099);--mat-sys-outline-variant:light-dark(#c4c6d0, #44474e);--mat-sys-primary:light-dark(#005cbb, #abc7ff);--mat-sys-primary-container:light-dark(#d7e3ff, #00458f);--mat-sys-primary-fixed:light-dark(#d7e3ff, #d7e3ff);--mat-sys-primary-fixed-dim:light-dark(#abc7ff, #abc7ff);--mat-sys-scrim:light-dark(#000000, #000000);--mat-sys-secondary:light-dark(#565e71, #bec6dc);--mat-sys-secondary-container:light-dark(#dae2f9, #3e4759);--mat-sys-secondary-fixed:light-dark(#dae2f9, #dae2f9);--mat-sys-secondary-fixed-dim:light-dark(#bec6dc, #bec6dc);--mat-sys-shadow:light-dark(#000000, #000000);--mat-sys-surface:light-dark(#faf9fd, #121316);--mat-sys-surface-bright:light-dark(#faf9fd, #38393c);--mat-sys-surface-container:light-dark(#efedf0, #1f2022);--mat-sys-surface-container-high:light-dark(#e9e7eb, #292a2c);--mat-sys-surface-container-highest:light-dark(#e3e2e6, #343537);--mat-sys-surface-container-low:light-dark(#f4f3f6, #1a1b1f);--mat-sys-surface-container-lowest:light-dark(#ffffff, #0d0e11);--mat-sys-surface-dim:light-dark(#dbd9dd, #121316);--mat-sys-surface-tint:light-dark(#005cbb, #abc7ff);--mat-sys-surface-variant:light-dark(#e0e2ec, #44474e);--mat-sys-tertiary:light-dark(#005cbb, #abc7ff);--mat-sys-tertiary-container:light-dark(#d7e3ff, #00458f);--mat-sys-tertiary-fixed:light-dark(#d7e3ff, #d7e3ff);--mat-sys-tertiary-fixed-dim:light-dark(#abc7ff, #abc7ff);--mat-sys-neutral-variant20:#2d3038;--mat-sys-neutral10:#1a1b1f;--mat-sys-level0:0px 0px 0px 0px rgba(0, 0, 0, .2), 0px 0px 0px 0px rgba(0, 0, 0, .14), 0px 0px 0px 0px rgba(0, 0, 0, .12);--mat-sys-level1:0px 2px 1px -1px rgba(0, 0, 0, .2), 0px 1px 1px 0px rgba(0, 0, 0, .14), 0px 1px 3px 0px rgba(0, 0, 0, .12);--mat-sys-level2:0px 3px 3px -2px rgba(0, 0, 0, .2), 0px 3px 4px 0px rgba(0, 0, 0, .14), 0px 1px 8px 0px rgba(0, 0, 0, .12);--mat-sys-level3:0px 3px 5px -1px rgba(0, 0, 0, .2), 0px 6px 10px 0px rgba(0, 0, 0, .14), 0px 1px 18px 0px rgba(0, 0, 0, .12);--mat-sys-level4:0px 5px 5px -3px rgba(0, 0, 0, .2), 0px 8px 10px 1px rgba(0, 0, 0, .14), 0px 3px 14px 2px rgba(0, 0, 0, .12);--mat-sys-level5:0px 7px 8px -4px rgba(0, 0, 0, .2), 0px 12px 17px 2px rgba(0, 0, 0, .14), 0px 5px 22px 4px rgba(0, 0, 0, .12);--mat-sys-body-large:400 1rem / 1.5rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-body-large-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-body-large-line-height:1.5rem;--mat-sys-body-large-size:1rem;--mat-sys-body-large-tracking:.031rem;--mat-sys-body-large-weight:400;--mat-sys-body-medium:400 .875rem / 1.25rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-body-medium-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-body-medium-line-height:1.25rem;--mat-sys-body-medium-size:.875rem;--mat-sys-body-medium-tracking:.016rem;--mat-sys-body-medium-weight:400;--mat-sys-body-small:400 .75rem / 1rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-body-small-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-body-small-line-height:1rem;--mat-sys-body-small-size:.75rem;--mat-sys-body-small-tracking:.025rem;--mat-sys-body-small-weight:400;--mat-sys-display-large:400 3.562rem / 4rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-display-large-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-display-large-line-height:4rem;--mat-sys-display-large-size:3.562rem;--mat-sys-display-large-tracking:-.016rem;--mat-sys-display-large-weight:400;--mat-sys-display-medium:400 2.812rem / 3.25rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-display-medium-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-display-medium-line-height:3.25rem;--mat-sys-display-medium-size:2.812rem;--mat-sys-display-medium-tracking:0;--mat-sys-display-medium-weight:400;--mat-sys-display-small:400 2.25rem / 2.75rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-display-small-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-display-small-line-height:2.75rem;--mat-sys-display-small-size:2.25rem;--mat-sys-display-small-tracking:0;--mat-sys-display-small-weight:400;--mat-sys-headline-large:400 2rem / 2.5rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-headline-large-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-headline-large-line-height:2.5rem;--mat-sys-headline-large-size:2rem;--mat-sys-headline-large-tracking:0;--mat-sys-headline-large-weight:400;--mat-sys-headline-medium:400 1.75rem / 2.25rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-headline-medium-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-headline-medium-line-height:2.25rem;--mat-sys-headline-medium-size:1.75rem;--mat-sys-headline-medium-tracking:0;--mat-sys-headline-medium-weight:400;--mat-sys-headline-small:400 1.5rem / 2rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-headline-small-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-headline-small-line-height:2rem;--mat-sys-headline-small-size:1.5rem;--mat-sys-headline-small-tracking:0;--mat-sys-headline-small-weight:400;--mat-sys-label-large:500 .875rem / 1.25rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-label-large-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-label-large-line-height:1.25rem;--mat-sys-label-large-size:.875rem;--mat-sys-label-large-tracking:.006rem;--mat-sys-label-large-weight:500;--mat-sys-label-large-weight-prominent:700;--mat-sys-label-medium:500 .75rem / 1rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-label-medium-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-label-medium-line-height:1rem;--mat-sys-label-medium-size:.75rem;--mat-sys-label-medium-tracking:.031rem;--mat-sys-label-medium-weight:500;--mat-sys-label-medium-weight-prominent:700;--mat-sys-label-small:500 .688rem / 1rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-label-small-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-label-small-line-height:1rem;--mat-sys-label-small-size:.688rem;--mat-sys-label-small-tracking:.031rem;--mat-sys-label-small-weight:500;--mat-sys-title-large:400 1.375rem / 1.75rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-title-large-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-title-large-line-height:1.75rem;--mat-sys-title-large-size:1.375rem;--mat-sys-title-large-tracking:0;--mat-sys-title-large-weight:400;--mat-sys-title-medium:500 1rem / 1.5rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-title-medium-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-title-medium-line-height:1.5rem;--mat-sys-title-medium-size:1rem;--mat-sys-title-medium-tracking:.009rem;--mat-sys-title-medium-weight:500;--mat-sys-title-small:500 .875rem / 1.25rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-title-small-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-title-small-line-height:1.25rem;--mat-sys-title-small-size:.875rem;--mat-sys-title-small-tracking:.006rem;--mat-sys-title-small-weight:500;--mat-sys-corner-extra-large:28px;--mat-sys-corner-extra-large-top:28px 28px 0 0;--mat-sys-corner-extra-small:4px;--mat-sys-corner-extra-small-top:4px 4px 0 0;--mat-sys-corner-full:9999px;--mat-sys-corner-large:16px;--mat-sys-corner-large-end:0 16px 16px 0;--mat-sys-corner-large-start:16px 0 0 16px;--mat-sys-corner-large-top:16px 16px 0 0;--mat-sys-corner-medium:12px;--mat-sys-corner-none:0;--mat-sys-corner-small:8px;--mat-sys-dragged-state-layer-opacity:.16;--mat-sys-focus-state-layer-opacity:.12;--mat-sys-hover-state-layer-opacity:.08;--mat-sys-pressed-state-layer-opacity:.12;--mat-snack-bar-container-shape:transparent;--mat-snack-bar-container-color:transparent;--mat-snack-bar-supporting-text-color:var(--color-text)}html,body{margin:0;padding:0;width:100%;height:100%}body{background:var(--color-bg);color:var(--color-text);font-family:-apple-system,BlinkMacSystemFont,SF Pro Display,Segoe UI,Helvetica Neue,Arial,sans-serif;transition:background .3s ease,color .3s ease;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;padding:0!important}</style><link rel="stylesheet" href="styles-6KD2P5NP.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles-6KD2P5NP.css"></noscript></head>
34
34
  <body>
35
35
  <app-root></app-root>
36
- <script src="polyfills-2FSRUXKO.js" type="module"></script><script src="main-G2NDWI4S.js" type="module"></script></body>
36
+ <script src="polyfills-2FSRUXKO.js" type="module"></script><script src="main-EPHSXFSY.js" type="module"></script></body>
37
37
  </html>