@whoz-oss/coday-client 0.0.0-workstream-forge.75 → 0.0.0-workstream-forge.77

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 (118) hide show
  1. package/browser/chunk-2LWDz5SQ.js +1 -0
  2. package/browser/{chunk-D2VUzw11.js → chunk-4OgRX34W.js} +1 -1
  3. package/browser/chunk-5uQQglui.js +2 -0
  4. package/browser/{chunk-C-7EKaLv.js → chunk-B39FYjZO.js} +1 -1
  5. package/browser/{chunk-tzI8SDtI.js → chunk-B9P_ly11.js} +1 -1
  6. package/browser/{chunk-6Be7kW0o.js → chunk-BDMHF0ej.js} +2 -2
  7. package/browser/chunk-BP4QHgC0.js +1 -0
  8. package/browser/chunk-Bayiswzc.js +1 -0
  9. package/browser/chunk-BdfGZqeZ.js +1 -0
  10. package/browser/chunk-BiaN7Mim.js +1 -0
  11. package/browser/{chunk-C5CsTmNj.js → chunk-BkujqYcN.js} +1 -1
  12. package/browser/{chunk-MhUYxl3Z.js → chunk-BlZg_xnX.js} +1 -1
  13. package/browser/chunk-Bnw1eK7z.js +2 -0
  14. package/browser/chunk-BuGBr1bw.js +1 -0
  15. package/browser/{chunk-CFuJNk7Q.js → chunk-C2h5l5r_.js} +1 -1
  16. package/browser/chunk-CA32vUN3.js +1 -0
  17. package/browser/{chunk-DwLys37P.js → chunk-CB09vhCC.js} +2 -2
  18. package/browser/{chunk-C7774IZF.js → chunk-CMB6fOce.js} +1 -1
  19. package/browser/chunk-CM_kdC9n.js +1 -0
  20. package/browser/chunk-CNH1L_8C.js +1 -0
  21. package/browser/{chunk-CY9LGSZW.js → chunk-CZkJE1B4.js} +2 -2
  22. package/browser/chunk-Cbj677Cr.js +1 -0
  23. package/browser/{chunk-D9lhavsa.js → chunk-Cc38C5Xa.js} +1 -1
  24. package/browser/chunk-CdIaivi4.js +1 -0
  25. package/browser/chunk-CddDyy6H.js +1 -0
  26. package/browser/{chunk-B1nDWA3v.js → chunk-CewwdWFI.js} +1 -1
  27. package/browser/{chunk-CIMARU-Z.js → chunk-Cf_S1UWC.js} +2 -2
  28. package/browser/{chunk-DrGGZMUF.js → chunk-Ck2uBFpB.js} +1 -1
  29. package/browser/chunk-Ckd2voqR.js +1 -0
  30. package/browser/{chunk-D6Uyjin9.js → chunk-Co47-WQ-.js} +1 -1
  31. package/browser/chunk-Czn2_yKR.js +1 -0
  32. package/browser/chunk-D-KxA-Nt.js +1 -0
  33. package/browser/chunk-D0LqUuf0.js +1 -0
  34. package/browser/chunk-D1Lo_oIb.js +1 -0
  35. package/browser/chunk-D99j8lVP.js +1 -0
  36. package/browser/{chunk-BlYydhGT.js → chunk-D9Soil8i.js} +1 -1
  37. package/browser/chunk-DE7pIM0j.js +1 -0
  38. package/browser/{chunk-DYWO9D4-.js → chunk-DH5xYCxZ.js} +1 -1
  39. package/browser/chunk-DHdHSP9c.js +1 -0
  40. package/browser/chunk-DI9SjYhv.js +1 -0
  41. package/browser/chunk-DK1yfea8.js +1 -0
  42. package/browser/chunk-DLW548uM.js +1 -0
  43. package/browser/{chunk-Cr26pdWO.js → chunk-DTKrz1r0.js} +2 -2
  44. package/browser/{chunk-DOfFWQHE.js → chunk-DYxoQJeM.js} +1 -1
  45. package/browser/chunk-D_SK1dCD.js +1 -0
  46. package/browser/{chunk-80hCpwon.js → chunk-DbQl4qcz.js} +1 -1
  47. package/browser/chunk-Dd2hh7F1.js +1 -0
  48. package/browser/chunk-Ddx43WZk.js +1 -0
  49. package/browser/chunk-DivcfktJ.js +1 -0
  50. package/browser/chunk-DpSFD5A1.js +5 -0
  51. package/browser/chunk-DqUTkdKy.js +1 -0
  52. package/browser/{chunk-6VeNGs2-.js → chunk-Dqcb10oo.js} +2 -2
  53. package/browser/{chunk-CoVye3Su.js → chunk-DqybJ3CV.js} +1 -1
  54. package/browser/{chunk-DsE7jEkK.js → chunk-DyDBfSvN.js} +1 -1
  55. package/browser/chunk-IJRyzpuP.js +1 -0
  56. package/browser/chunk-J1EHEyU1.js +1 -0
  57. package/browser/{chunk-B0es9TQT.js → chunk-JKBba9WI.js} +6 -6
  58. package/browser/{chunk-C0RjV9YR.js → chunk-JL-a2GkC.js} +1 -1
  59. package/browser/chunk-NMFDB0YN.js +1 -0
  60. package/browser/{chunk-AJHLyP2Q.js → chunk-NypJiPKS.js} +1 -1
  61. package/browser/chunk-O6thNI5B.js +2 -0
  62. package/browser/{chunk-42jw_j0t.js → chunk-SNYHeawQ.js} +1 -1
  63. package/browser/chunk-WMGAW86u.js +10 -0
  64. package/browser/{chunk-13WTmKep.js → chunk-ZcJ6UNEM.js} +1 -1
  65. package/browser/{chunk-buMTi15H.js → chunk-aZLcrpJC.js} +2 -2
  66. package/browser/{chunk-Dw-TsQE6.js → chunk-cAni-AV8.js} +1 -1
  67. package/browser/{chunk-BwapsUV-.js → chunk-d0lmTRlE.js} +1 -1
  68. package/browser/{chunk-BCvr3olm.js → chunk-i35kiL-I.js} +1 -1
  69. package/browser/chunk-oPCGexYM.js +1 -0
  70. package/browser/{chunk-B9cQUPc7.js → chunk-pSTSYKqy.js} +1 -1
  71. package/browser/{chunk-DqyQME6K.js → chunk-rDVpfvvv.js} +1 -1
  72. package/browser/index.html +1 -1
  73. package/browser/main-IZL5CRF5.js +1811 -0
  74. package/package.json +1 -1
  75. package/browser/chunk-2hH5YbLe.js +0 -2
  76. package/browser/chunk-5lNA_LR4.js +0 -1
  77. package/browser/chunk-93qYG1j4.js +0 -1
  78. package/browser/chunk-AblS4pXb.js +0 -1
  79. package/browser/chunk-B1R1JDKX.js +0 -1
  80. package/browser/chunk-BJ3cmxps.js +0 -10
  81. package/browser/chunk-BRFVbU6N.js +0 -1
  82. package/browser/chunk-BYvnZ4jZ.js +0 -1
  83. package/browser/chunk-BcDCPUzh.js +0 -1
  84. package/browser/chunk-BmMRXr--.js +0 -1
  85. package/browser/chunk-BnVoIxkm.js +0 -1
  86. package/browser/chunk-Bs4cz8et.js +0 -1
  87. package/browser/chunk-Buv4bUwG.js +0 -1
  88. package/browser/chunk-C2h53xO8.js +0 -1
  89. package/browser/chunk-C519Azc-.js +0 -1
  90. package/browser/chunk-C5jla22M.js +0 -1
  91. package/browser/chunk-C8Lny5xG.js +0 -2
  92. package/browser/chunk-CBAzExoV.js +0 -1
  93. package/browser/chunk-CErujabN.js +0 -1
  94. package/browser/chunk-CIPMuL5o.js +0 -1
  95. package/browser/chunk-CJy6YujN.js +0 -1
  96. package/browser/chunk-CLQWshBg.js +0 -1
  97. package/browser/chunk-CNbCiJwC.js +0 -1
  98. package/browser/chunk-CQzD4hlX.js +0 -1
  99. package/browser/chunk-CTep3Zcv.js +0 -1
  100. package/browser/chunk-CUD8zCnQ.js +0 -1
  101. package/browser/chunk-CX09OqPp.js +0 -1
  102. package/browser/chunk-Ccxus4_o.js +0 -2
  103. package/browser/chunk-CrIQg7gg.js +0 -5
  104. package/browser/chunk-CtRqtZpo.js +0 -1
  105. package/browser/chunk-Cw_eJAWw.js +0 -1
  106. package/browser/chunk-D0rG88ee.js +0 -1
  107. package/browser/chunk-D4rIP_px.js +0 -1
  108. package/browser/chunk-DSohMG90.js +0 -1
  109. package/browser/chunk-DVa9gI4Z.js +0 -1
  110. package/browser/chunk-DdV87KC5.js +0 -1
  111. package/browser/chunk-DgQbMek3.js +0 -1
  112. package/browser/chunk-EzRHT4mT.js +0 -1
  113. package/browser/chunk-Iomqh4vI.js +0 -1
  114. package/browser/chunk-SyIy1dgS.js +0 -1
  115. package/browser/chunk-cwPycVUY.js +0 -1
  116. package/browser/chunk-o7tHGyvk.js +0 -1
  117. package/browser/chunk-zsOy-bBo.js +0 -1
  118. package/browser/main-A4H3MFZY.js +0 -1811
@@ -1 +1 @@
1
- import {g,H as py,P,W as br,r as re,Y as x}from'./main-A4H3MFZY.js';var d=class i{http=g(py);projectState=g(P);promptsCache=new Map;getBaseUrl(){return `/api/projects/${this.projectState.getSelectedProjectIdOrThrow()}/prompts`}listPrompts(){return this.http.get(this.getBaseUrl())}getPromptsAutocomplete(t,e){let r=this.promptsCache.get(t);return r?br(this.filterPromptsForAutocomplete(r,e)):this.http.get(`/api/projects/${t}/prompts`).pipe(re(p=>(this.promptsCache.set(t,p),this.filterPromptsForAutocomplete(p,e))))}filterPromptsForAutocomplete(t,e){let r=e.toLowerCase();return t.filter(o=>o.name.toLowerCase().includes(r)||o.description.toLowerCase().includes(r)).map(o=>({name:o.name,description:o.description,parameterFormat:o.parameterFormat}))}clearCache(t){t?this.promptsCache.delete(t):this.promptsCache.clear();}getPrompt(t){return this.http.get(`${this.getBaseUrl()}/${t}`)}createPrompt(t){return this.http.post(this.getBaseUrl(),t).pipe(re(e=>(this.clearCache(this.projectState.getSelectedProjectId()??void 0),e)))}updatePrompt(t,e){return this.http.put(`${this.getBaseUrl()}/${t}`,e).pipe(re(r=>(this.clearCache(this.projectState.getSelectedProjectId()??void 0),r)))}deletePrompt(t){return this.http.delete(`${this.getBaseUrl()}/${t}`).pipe(re(e=>(this.clearCache(this.projectState.getSelectedProjectId()??void 0),e)))}enableWebhook(t){return this.http.post(`${this.getBaseUrl()}/${t}/webhook`,{})}disableWebhook(t){return this.http.delete(`${this.getBaseUrl()}/${t}/webhook`)}static \u0275fac=function(e){return new(e||i)};static \u0275prov=x({token:i,factory:i.\u0275fac,providedIn:"root"})};export{d};
1
+ import {g,D as py,P,Q as br,r as re,W as x}from'./main-IZL5CRF5.js';var d=class i{http=g(py);projectState=g(P);promptsCache=new Map;getBaseUrl(){return `/api/projects/${this.projectState.getSelectedProjectIdOrThrow()}/prompts`}listPrompts(){return this.http.get(this.getBaseUrl())}getPromptsAutocomplete(t,e){let r=this.promptsCache.get(t);return r?br(this.filterPromptsForAutocomplete(r,e)):this.http.get(`/api/projects/${t}/prompts`).pipe(re(p=>(this.promptsCache.set(t,p),this.filterPromptsForAutocomplete(p,e))))}filterPromptsForAutocomplete(t,e){let r=e.toLowerCase();return t.filter(o=>o.name.toLowerCase().includes(r)||o.description.toLowerCase().includes(r)).map(o=>({name:o.name,description:o.description,parameterFormat:o.parameterFormat}))}clearCache(t){t?this.promptsCache.delete(t):this.promptsCache.clear();}getPrompt(t){return this.http.get(`${this.getBaseUrl()}/${t}`)}createPrompt(t){return this.http.post(this.getBaseUrl(),t).pipe(re(e=>(this.clearCache(this.projectState.getSelectedProjectId()??void 0),e)))}updatePrompt(t,e){return this.http.put(`${this.getBaseUrl()}/${t}`,e).pipe(re(r=>(this.clearCache(this.projectState.getSelectedProjectId()??void 0),r)))}deletePrompt(t){return this.http.delete(`${this.getBaseUrl()}/${t}`).pipe(re(e=>(this.clearCache(this.projectState.getSelectedProjectId()??void 0),e)))}enableWebhook(t){return this.http.post(`${this.getBaseUrl()}/${t}/webhook`,{})}disableWebhook(t){return this.http.delete(`${this.getBaseUrl()}/${t}/webhook`)}static \u0275fac=function(e){return new(e||i)};static \u0275prov=x({token:i,factory:i.\u0275fac,providedIn:"root"})};export{d};
@@ -1,4 +1,4 @@
1
- import {an as ue,g,L,ci as me,ap as Cd,av as B,e as xw,k as ws,n as GC,o as pl,ai as tm,aj as KC,q as Rg,a3 as VI,S as Sg,J as Jw,t as rC,X as XE,ak as em,a6 as UI,v as bg,y as eC,z as oC,a5 as vl,aL as wo,aM as Zn$1,aO as wt$1,az as Xt,aW as C,cj as Pn,ce as _b,c8 as KT,af as Eg,ag as fT,c9 as kf,ck as Ff,ch as Ng,u as CC,T as Tg,ad as Hg,b$ as kC,A as Ug,D as Pg,E as EC,I as IC,aJ as Tr,aG as fe,cl as be,p as pe,l as le,bU as Od,b9 as T,b8 as B$1,be as A,b7 as u,bd as h,cm as M,d as O,ba as v,bb as m,c as b,cn as F,f,V,bc as R,co as H,cp as K,ca as _e,Y as x,Z as z$1,_ as Ue,am as qm,j as Gn,i as pr,a0 as jt,a2 as Nt,a1 as Vt,b0 as Qg,ac as gC}from'./main-A4H3MFZY.js';import {s as se}from'./chunk-DwLys37P.js';import {t as ti,Q as Qn,e as ei,Y as Ye$1,h as _n,A as At,m as mn,Z as Zn,c as cn,w as wt}from'./chunk-CFuJNk7Q.js';var Xe=["determinateSpinner"];function et(c,e){if(c&1&&(kf(),ws(0,"svg",11),Sg(1,"circle",12),pl()),c&2){let t=gC();Tg("viewBox",t._viewBox()),XE(),Hg("stroke-dasharray",t._strokeCircumference(),"px")("stroke-dashoffset",t._strokeCircumference()/2,"px")("stroke-width",t._circleStrokeWidth(),"%"),Tg("r",t._circleRadius());}}var tt=new C("mat-progress-spinner-default-options",{providedIn:"root",factory:()=>({diameter:qe})}),qe=100,nt=10,yt=(()=>{class c{_elementRef=g(Xt);_noopAnimations;get color(){return this._color||this._defaultColor}set color(t){this._color=t;}_color;_defaultColor="primary";_determinateCircle;constructor(){let t=g(tt),n=Pn(),i=this._elementRef.nativeElement;this._noopAnimations=n==="di-disabled"&&!!t&&!t._forceAnimations,this.mode=i.nodeName.toLowerCase()==="mat-spinner"?"indeterminate":"determinate",!this._noopAnimations&&n==="reduced-motion"&&i.classList.add("mat-progress-spinner-reduced-motion"),t&&(t.color&&(this.color=this._defaultColor=t.color),t.diameter&&(this.diameter=t.diameter),t.strokeWidth&&(this.strokeWidth=t.strokeWidth));}mode;get value(){return this.mode==="determinate"?this._value:0}set value(t){this._value=Math.max(0,Math.min(100,t||0));}_value=0;get diameter(){return this._diameter}set diameter(t){this._diameter=t||0;}_diameter=qe;get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(t){this._strokeWidth=t||0;}_strokeWidth;_circleRadius(){return (this.diameter-nt)/2}_viewBox(){let t=this._circleRadius()*2+this.strokeWidth;return `0 0 ${t} ${t}`}_strokeCircumference(){return 2*Math.PI*this._circleRadius()}_strokeDashOffset(){return this.mode==="determinate"?this._strokeCircumference()*(100-this._value)/100:null}_circleStrokeWidth(){return this.strokeWidth/this.diameter*100}static \u0275fac=function(n){return new(n||c)};static \u0275cmp=xw({type:c,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(n,i){if(n&1&&Pg(Xe,5),n&2){let o;EC(o=IC())&&(i._determinateCircle=o.first);}},hostAttrs:["role","progressbar","tabindex","-1",1,"mat-mdc-progress-spinner","mdc-circular-progress"],hostVars:18,hostBindings:function(n,i){n&2&&(Tg("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow",i.mode==="determinate"?i.value:null)("mode",i.mode),kC("mat-"+i.color),Hg("width",i.diameter,"px")("height",i.diameter,"px")("--mat-progress-spinner-size",i.diameter+"px")("--mat-progress-spinner-active-indicator-width",i.diameter+"px"),Ug("_mat-animation-noopable",i._noopAnimations)("mdc-circular-progress--indeterminate",i.mode==="indeterminate"));},inputs:{color:"color",mode:"mode",value:[2,"value","value",KT],diameter:[2,"diameter","diameter",KT],strokeWidth:[2,"strokeWidth","strokeWidth",KT]},exportAs:["matProgressSpinner"],decls:14,vars:11,consts:[["circle",""],["determinateSpinner",""],["aria-hidden","true",1,"mdc-circular-progress__determinate-container"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__determinate-circle-graphic"],["cx","50%","cy","50%",1,"mdc-circular-progress__determinate-circle"],["aria-hidden","true",1,"mdc-circular-progress__indeterminate-container"],[1,"mdc-circular-progress__spinner-layer"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-left"],[3,"ngTemplateOutlet"],[1,"mdc-circular-progress__gap-patch"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-right"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__indeterminate-circle-graphic"],["cx","50%","cy","50%"]],template:function(n,i){if(n&1&&(Eg(0,et,2,8,"ng-template",null,0,fT),ws(2,"div",2,1),kf(),ws(4,"svg",3),Sg(5,"circle",4),pl()(),Ff(),ws(6,"div",5)(7,"div",6)(8,"div",7),Ng(9,8),pl(),ws(10,"div",9),Ng(11,8),pl(),ws(12,"div",10),Ng(13,8),pl()()()),n&2){let o=CC(1);XE(4),Tg("viewBox",i._viewBox()),XE(),Hg("stroke-dasharray",i._strokeCircumference(),"px")("stroke-dashoffset",i._strokeDashOffset(),"px")("stroke-width",i._circleStrokeWidth(),"%"),Tg("r",i._circleRadius()),XE(4),bg("ngTemplateOutlet",o),XE(2),bg("ngTemplateOutlet",o),XE(2),bg("ngTemplateOutlet",o);}},dependencies:[_b],styles:[`.mat-mdc-progress-spinner {
1
+ import {an as ue,g,L,ci as me,ap as Cd,av as B,e as xw,k as ws,n as GC,o as pl,ai as tm,aj as KC,q as Rg,a3 as VI,S as Sg,J as Jw,s as rC,X as XE,ak as em,a6 as UI,u as bg,v as eC,y as oC,a5 as vl,aL as wo,aM as Zn$1,aO as wt$1,az as Xt,aW as C,cj as Pn,ce as _b,c8 as KT,af as Eg,ag as fT,c9 as kf,ck as Ff,ch as Ng,t as CC,T as Tg,ad as Hg,b$ as kC,z as Ug,B as Pg,E as EC,I as IC,aJ as Tr,aG as fe,cl as be,p as pe,l as le,bU as Td,b9 as T,b8 as B$1,be as A,b7 as u,bd as h,cm as M,d as O,ba as v,bb as m,c as b,cn as F,f,V,bc as R,co as H,cp as K,ca as _e,W as x,Y as z$1,Z as Ue,am as qm,j as Gn,i as pr,a0 as jt,a2 as Nt,a1 as Vt,b0 as Qg,ac as gC}from'./main-IZL5CRF5.js';import {s as se}from'./chunk-CB09vhCC.js';import {t as ti,Q as Qn,e as ei,Y as Ye$1,h as _n,A as At,m as mn,Z as Zn,c as cn,w as wt}from'./chunk-C2h5l5r_.js';var Xe=["determinateSpinner"];function et(c,e){if(c&1&&(kf(),ws(0,"svg",11),Sg(1,"circle",12),pl()),c&2){let t=gC();Tg("viewBox",t._viewBox()),XE(),Hg("stroke-dasharray",t._strokeCircumference(),"px")("stroke-dashoffset",t._strokeCircumference()/2,"px")("stroke-width",t._circleStrokeWidth(),"%"),Tg("r",t._circleRadius());}}var tt=new C("mat-progress-spinner-default-options",{providedIn:"root",factory:()=>({diameter:qe})}),qe=100,nt=10,yt=(()=>{class c{_elementRef=g(Xt);_noopAnimations;get color(){return this._color||this._defaultColor}set color(t){this._color=t;}_color;_defaultColor="primary";_determinateCircle;constructor(){let t=g(tt),n=Pn(),i=this._elementRef.nativeElement;this._noopAnimations=n==="di-disabled"&&!!t&&!t._forceAnimations,this.mode=i.nodeName.toLowerCase()==="mat-spinner"?"indeterminate":"determinate",!this._noopAnimations&&n==="reduced-motion"&&i.classList.add("mat-progress-spinner-reduced-motion"),t&&(t.color&&(this.color=this._defaultColor=t.color),t.diameter&&(this.diameter=t.diameter),t.strokeWidth&&(this.strokeWidth=t.strokeWidth));}mode;get value(){return this.mode==="determinate"?this._value:0}set value(t){this._value=Math.max(0,Math.min(100,t||0));}_value=0;get diameter(){return this._diameter}set diameter(t){this._diameter=t||0;}_diameter=qe;get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(t){this._strokeWidth=t||0;}_strokeWidth;_circleRadius(){return (this.diameter-nt)/2}_viewBox(){let t=this._circleRadius()*2+this.strokeWidth;return `0 0 ${t} ${t}`}_strokeCircumference(){return 2*Math.PI*this._circleRadius()}_strokeDashOffset(){return this.mode==="determinate"?this._strokeCircumference()*(100-this._value)/100:null}_circleStrokeWidth(){return this.strokeWidth/this.diameter*100}static \u0275fac=function(n){return new(n||c)};static \u0275cmp=xw({type:c,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(n,i){if(n&1&&Pg(Xe,5),n&2){let o;EC(o=IC())&&(i._determinateCircle=o.first);}},hostAttrs:["role","progressbar","tabindex","-1",1,"mat-mdc-progress-spinner","mdc-circular-progress"],hostVars:18,hostBindings:function(n,i){n&2&&(Tg("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow",i.mode==="determinate"?i.value:null)("mode",i.mode),kC("mat-"+i.color),Hg("width",i.diameter,"px")("height",i.diameter,"px")("--mat-progress-spinner-size",i.diameter+"px")("--mat-progress-spinner-active-indicator-width",i.diameter+"px"),Ug("_mat-animation-noopable",i._noopAnimations)("mdc-circular-progress--indeterminate",i.mode==="indeterminate"));},inputs:{color:"color",mode:"mode",value:[2,"value","value",KT],diameter:[2,"diameter","diameter",KT],strokeWidth:[2,"strokeWidth","strokeWidth",KT]},exportAs:["matProgressSpinner"],decls:14,vars:11,consts:[["circle",""],["determinateSpinner",""],["aria-hidden","true",1,"mdc-circular-progress__determinate-container"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__determinate-circle-graphic"],["cx","50%","cy","50%",1,"mdc-circular-progress__determinate-circle"],["aria-hidden","true",1,"mdc-circular-progress__indeterminate-container"],[1,"mdc-circular-progress__spinner-layer"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-left"],[3,"ngTemplateOutlet"],[1,"mdc-circular-progress__gap-patch"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-right"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__indeterminate-circle-graphic"],["cx","50%","cy","50%"]],template:function(n,i){if(n&1&&(Eg(0,et,2,8,"ng-template",null,0,fT),ws(2,"div",2,1),kf(),ws(4,"svg",3),Sg(5,"circle",4),pl()(),Ff(),ws(6,"div",5)(7,"div",6)(8,"div",7),Ng(9,8),pl(),ws(10,"div",9),Ng(11,8),pl(),ws(12,"div",10),Ng(13,8),pl()()()),n&2){let o=CC(1);XE(4),Tg("viewBox",i._viewBox()),XE(),Hg("stroke-dasharray",i._strokeCircumference(),"px")("stroke-dashoffset",i._strokeDashOffset(),"px")("stroke-width",i._circleStrokeWidth(),"%"),Tg("r",i._circleRadius()),XE(4),bg("ngTemplateOutlet",o),XE(2),bg("ngTemplateOutlet",o),XE(2),bg("ngTemplateOutlet",o);}},dependencies:[_b],styles:[`.mat-mdc-progress-spinner {
2
2
  --mat-progress-spinner-animation-multiplier: 1;
3
3
  display: block;
4
4
  overflow: hidden;
@@ -177,6 +177,6 @@ import {an as ue,g,L,ci as me,ap as Cd,av as B,e as xw,k as ws,n as GC,o as pl,a
177
177
  `).split(`
178
178
  `).map(t=>this.addPeriodIfNeeded(t.trim())).filter(t=>t.length>0).join(" ")}addPeriodIfNeeded(e){return e?/[.!?;:]$/.test(e)?e:e+".":""}static \u0275fac=function(t){return new(t||c)};static \u0275prov=x({token:c,factory:c.\u0275fac,providedIn:"root"})};var rt=(c,e)=>e.code,at=(c,e)=>e.name+e.lang;function st(c,e){c&1&&(ws(0,"div",17)(1,"mat-icon",39),GC(2,"warning"),pl(),ws(3,"span",40),GC(4," Browser notifications have been blocked. To enable them, please reset the site permissions in your browser settings. "),pl()());}function ct(c,e){if(c&1&&(ws(0,"option",25),GC(1),pl()),c&2){let t=e.$implicit;bg("value",t.code),XE(),Qg("",t.flag," ",t.label);}}function lt(c,e){c&1&&(ws(0,"option",32),GC(1,"Loading voices..."),pl());}function dt(c,e){c&1&&(ws(0,"option",32),GC(1,"No voice available"),pl());}function pt(c,e){if(c&1&&(ws(0,"option",25),GC(1),pl()),c&2){let t=e.$implicit;bg("value",t.name+"|"+t.lang),XE(),vl(" ",t.displayName," ");}}var Ye=class c{destroy$=new ue;selectedTheme="light";selectedThemeVariant="industry";selectedVoiceLanguage="en-US";useEnterToSend=false;printTechnicalMessages=false;showTechnicalMessages=true;showWarningMessages=true;voiceInputMode="browser";voiceAnnounceEnabled=false;voiceMode="speech";voiceReadFullText=false;voiceVolume=80;voiceRate=120;agentNotificationEnabled=false;notificationSoundEnabled=true;browserNotificationEnabled=false;browserNotificationDenied=false;missionPreviewEnabled=false;availableVoices=[];selectedVoiceId=null;loadingVoices=false;voiceLanguageOptions=[{code:"fr-FR",label:"Fran\xE7ais",flag:"\u{1F1EB}\u{1F1F7}"},{code:"en-US",label:"English (US)",flag:"\u{1F1FA}\u{1F1F8}"},{code:"en-GB",label:"English (UK)",flag:"\u{1F1EC}\u{1F1E7}"},{code:"es-ES",label:"Espa\xF1ol",flag:"\u{1F1EA}\u{1F1F8}"},{code:"de-DE",label:"Deutsch",flag:"\u{1F1E9}\u{1F1EA}"},{code:"it-IT",label:"Italiano",flag:"\u{1F1EE}\u{1F1F9}"},{code:"pt-BR",label:"Portugu\xEAs",flag:"\u{1F1E7}\u{1F1F7}"},{code:"ja-JP",label:"\u65E5\u672C\u8A9E",flag:"\u{1F1EF}\u{1F1F5}"},{code:"ko-KR",label:"\uD55C\uAD6D\uC5B4",flag:"\u{1F1F0}\u{1F1F7}"},{code:"zh-CN",label:"\u4E2D\u6587 (\u7B80\u4F53)",flag:"\u{1F1E8}\u{1F1F3}"},{code:"ru-RU",label:"\u0420\u0443\u0441\u0441\u043A\u0438\u0439",flag:"\u{1F1F7}\u{1F1FA}"},{code:"ar-SA",label:"\u0627\u0644\u0639\u0631\u0628\u064A\u0629",flag:"\u{1F1F8}\u{1F1E6}"}];preferencesService=g(L);voiceSynthesisService=g(z);themeService=g(me);ngOnInit(){let e=this.themeService.getCurrentTheme();this.selectedTheme=e.mode,this.selectedThemeVariant=e.variant,this.selectedVoiceLanguage=this.preferencesService.getVoiceLanguage(),this.useEnterToSend=this.preferencesService.getEnterToSend(),this.printTechnicalMessages=this.preferencesService.getPrintTechnicalMessages(),this.showTechnicalMessages=!this.preferencesService.getHideTechnicalMessages(),this.showWarningMessages=!this.preferencesService.getHideWarningMessages(),this.voiceInputMode=this.preferencesService.getVoiceInputMode(),this.voiceAnnounceEnabled=this.preferencesService.getVoiceAnnounceEnabled(),this.voiceMode=this.preferencesService.getVoiceMode(),this.voiceReadFullText=this.preferencesService.getVoiceReadFullText(),this.voiceVolume=Math.round(this.preferencesService.getVoiceVolume()*100),this.voiceRate=Math.round(this.preferencesService.getVoiceRate()*100),this.selectedVoiceId=this.preferencesService.getSelectedVoice(),this.agentNotificationEnabled=this.preferencesService.getAgentNotificationEnabled(),this.notificationSoundEnabled=this.preferencesService.getNotificationSoundEnabled(),this.browserNotificationEnabled=this.preferencesService.getBrowserNotificationEnabled(),this.missionPreviewEnabled=this.preferencesService.getMissionPreviewEnabled(),this.loadAvailableVoices(),this.themeService.currentTheme$.pipe(Cd(this.destroy$)).subscribe(t=>{this.selectedTheme=t.mode,this.selectedThemeVariant=t.variant;}),this.preferencesService.voiceLanguage$.pipe(Cd(this.destroy$)).subscribe(t=>{this.selectedVoiceLanguage=t;}),this.preferencesService.enterToSend$.pipe(Cd(this.destroy$)).subscribe(t=>{this.useEnterToSend=t;}),this.preferencesService.printTechnicalMessages$.pipe(Cd(this.destroy$)).subscribe(t=>{this.printTechnicalMessages=t;}),this.preferencesService.hideTechnicalMessages$.pipe(Cd(this.destroy$)).subscribe(t=>{this.showTechnicalMessages=!t;}),this.preferencesService.hideWarningMessages$.pipe(Cd(this.destroy$)).subscribe(t=>{this.showWarningMessages=!t;}),this.preferencesService.voiceInputMode$.pipe(Cd(this.destroy$)).subscribe(t=>{this.voiceInputMode=t;}),this.preferencesService.voiceAnnounceEnabled$.pipe(Cd(this.destroy$)).subscribe(t=>{this.voiceAnnounceEnabled=t;}),this.preferencesService.voiceMode$.pipe(Cd(this.destroy$)).subscribe(t=>{this.voiceMode=t;}),this.preferencesService.voiceReadFullText$.pipe(Cd(this.destroy$)).subscribe(t=>{this.voiceReadFullText=t;}),this.preferencesService.voiceVolume$.pipe(Cd(this.destroy$)).subscribe(t=>{this.voiceVolume=Math.round(t*100);}),this.preferencesService.voiceRate$.pipe(Cd(this.destroy$)).subscribe(t=>{this.voiceRate=Math.round(t*100);}),this.preferencesService.selectedVoice$.pipe(Cd(this.destroy$)).subscribe(t=>{this.selectedVoiceId=t;}),this.preferencesService.voiceLanguage$.pipe(Cd(this.destroy$)).subscribe(()=>{this.loadAvailableVoices();}),this.preferencesService.agentNotificationEnabled$.pipe(Cd(this.destroy$)).subscribe(t=>{this.agentNotificationEnabled=t;}),this.preferencesService.notificationSoundEnabled$.pipe(Cd(this.destroy$)).subscribe(t=>{this.notificationSoundEnabled=t;}),this.preferencesService.browserNotificationEnabled$.pipe(Cd(this.destroy$)).subscribe(t=>{this.browserNotificationEnabled=t,this.checkNotificationPermission();}),this.preferencesService.missionPreviewEnabled$.pipe(Cd(this.destroy$)).subscribe(t=>{this.missionPreviewEnabled=t;});}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete();}onThemeChange(){console.log("[OPTIONS] Theme changed to:",this.selectedTheme),this.themeService.setTheme({variant:this.selectedThemeVariant,mode:this.selectedTheme});}onVoiceLanguageChange(){console.log("[OPTIONS] Voice language changed to:",this.selectedVoiceLanguage),this.preferencesService.setVoiceLanguage(this.selectedVoiceLanguage);}onEnterToSendChange(){console.log("[OPTIONS] Enter to send changed to:",this.useEnterToSend),this.preferencesService.setEnterToSend(this.useEnterToSend);}onPrintTechnicalMessagesChange(){console.log("[OPTIONS] Print technical messages changed to:",this.printTechnicalMessages),this.preferencesService.setPrintTechnicalMessages(this.printTechnicalMessages);}onShowTechnicalMessagesChange(){let e=!this.showTechnicalMessages;console.log("[OPTIONS] Show technical messages changed to:",this.showTechnicalMessages,"(hide:",e,")"),this.preferencesService.setHideTechnicalMessages(e);}onShowWarningMessagesChange(){let e=!this.showWarningMessages;console.log("[OPTIONS] Show warning messages changed to:",this.showWarningMessages,"(hide:",e,")"),this.preferencesService.setHideWarningMessages(e);}onVoiceInputModeChange(e){let t=e.target.value;console.log("[OPTIONS] Voice input mode changed to:",t),this.preferencesService.setVoiceInputMode(t);}onVoiceAnnounceEnabledChange(){console.log("[OPTIONS] Voice announce enabled changed to:",this.voiceAnnounceEnabled),this.preferencesService.setVoiceAnnounceEnabled(this.voiceAnnounceEnabled);}onVoiceModeChange(){console.log("[OPTIONS] Voice mode changed to:",this.voiceMode),this.preferencesService.setVoiceMode(this.voiceMode);}onVoiceReadFullTextChange(){console.log("[OPTIONS] Voice read full text changed to:",this.voiceReadFullText),this.preferencesService.setVoiceReadFullText(this.voiceReadFullText);}onVoiceVolumeChange(){let e=this.voiceVolume/100;console.log("[OPTIONS] Voice volume changed to:",e),this.preferencesService.setVoiceVolume(e);}onVoiceRateChange(){let e=this.voiceRate/100;console.log("[OPTIONS] Voice rate changed to:",e),this.preferencesService.setVoiceRate(e);}loadAvailableVoices(){return B(this,null,function*(){this.loadingVoices=true;try{this.availableVoices=yield this.voiceSynthesisService.getVoicesForLanguage(),console.log("[OPTIONS] Loaded",this.availableVoices.length,"voices for current language");}catch(e){console.error("[OPTIONS] Error loading voices:",e),this.availableVoices=[];}finally{this.loadingVoices=false;}})}onSelectedVoiceChange(){console.log("[OPTIONS] Selected voice changed to:",this.selectedVoiceId),this.preferencesService.setSelectedVoice(this.selectedVoiceId);}testVoice(){console.log("[OPTIONS] Testing voice with current settings"),this.voiceSynthesisService.testSelectedVoice();}onAgentNotificationEnabledChange(){console.log("[OPTIONS] Agent notification enabled changed to:",this.agentNotificationEnabled),this.preferencesService.setAgentNotificationEnabled(this.agentNotificationEnabled);}onNotificationSoundEnabledChange(){console.log("[OPTIONS] Notification sound enabled changed to:",this.notificationSoundEnabled),this.preferencesService.setNotificationSoundEnabled(this.notificationSoundEnabled);}onBrowserNotificationEnabledChange(){console.log("[OPTIONS] Browser notification enabled changed to:",this.browserNotificationEnabled),this.preferencesService.setBrowserNotificationEnabled(this.browserNotificationEnabled);}onMissionPreviewEnabledChange(){console.log("[OPTIONS] Mission preview panel enabled changed to:",this.missionPreviewEnabled),this.preferencesService.setMissionPreviewEnabled(this.missionPreviewEnabled);}checkNotificationPermission(){"Notification"in window&&(this.browserNotificationDenied=Notification.permission==="denied",console.log("[OPTIONS] Notification permission status:",Notification.permission));}static \u0275fac=function(t){return new(t||c)};static \u0275cmp=xw({type:c,selectors:[["app-options-panel"]],decls:168,vars:37,consts:[[1,"options-content"],[1,"option-section"],[1,"section-title"],[1,"option-group"],[1,"radio-group"],[1,"option-radio"],["type","radio","name","theme","value","light",3,"ngModelChange","change","ngModel"],[1,"radio-mark"],["type","radio","name","theme","value","dark",3,"ngModelChange","change","ngModel"],["type","radio","name","theme","value","system",3,"ngModelChange","change","ngModel"],[1,"option-label"],["type","radio","name","enterBehavior",3,"ngModelChange","change","value","ngModel"],[1,"toggle-option"],["color","primary",3,"ngModelChange","change","ngModel"],[1,"option-label-with-hint"],[1,"option-hint"],["color","primary",3,"ngModelChange","change","ngModel","disabled"],[1,"notification-error"],["for","voice-input-mode-select",1,"option-label"],["id","voice-input-mode-select",1,"option-select",3,"change","value"],["value","browser"],["value","whisper"],["value","voice-message"],["for","voice-language-select",1,"option-label"],["id","voice-language-select",1,"option-select",3,"ngModelChange","change","ngModel"],[3,"value"],["type","radio","name","voiceAnnounce",3,"ngModelChange","change","value","ngModel"],["type","radio","name","voiceMode","value","speech",3,"ngModelChange","change","ngModel"],["type","radio","name","voiceMode","value","notification",3,"ngModelChange","change","ngModel"],["type","radio","name","voiceReadFull",3,"ngModelChange","change","value","ngModel"],["for","voice-select",1,"option-label"],["id","voice-select",1,"option-select",3,"ngModelChange","change","ngModel","disabled"],["value",""],["role","button","tabindex","0","title","Test voice with current settings",1,"test-voice-link",3,"click"],[1,"thread-name"],["for","voice-volume-slider",1,"option-label"],["id","voice-volume-slider","type","range","min","0","max","100","step","5",1,"option-slider",3,"ngModelChange","input","ngModel"],["for","voice-rate-slider",1,"option-label"],["id","voice-rate-slider","type","range","min","50","max","200","step","10",1,"option-slider",3,"ngModelChange","input","ngModel"],[1,"error-icon"],[1,"error-message"]],template:function(t,n){t&1&&(ws(0,"div",0)(1,"div",1)(2,"div",2)(3,"mat-icon"),GC(4,"palette"),pl(),ws(5,"span"),GC(6,"Appearance"),pl()(),ws(7,"div",3)(8,"div",4)(9,"label",5)(10,"input",6),tm("ngModelChange",function(o){return KC(n.selectedTheme,o)||(n.selectedTheme=o),o}),Rg("change",function(){return n.onThemeChange()}),pl(),VI(),Sg(11,"span",7),GC(12," Light "),pl(),ws(13,"label",5)(14,"input",8),tm("ngModelChange",function(o){return KC(n.selectedTheme,o)||(n.selectedTheme=o),o}),Rg("change",function(){return n.onThemeChange()}),pl(),VI(),Sg(15,"span",7),GC(16," Dark "),pl(),ws(17,"label",5)(18,"input",9),tm("ngModelChange",function(o){return KC(n.selectedTheme,o)||(n.selectedTheme=o),o}),Rg("change",function(){return n.onThemeChange()}),pl(),VI(),Sg(19,"span",7),GC(20," System "),pl()()()(),ws(21,"div",1)(22,"div",2)(23,"mat-icon"),GC(24,"chat_bubble_outline"),pl(),ws(25,"span"),GC(26,"Messaging"),pl()(),ws(27,"div",3)(28,"span",10),GC(29,"Send message behavior:"),pl(),ws(30,"div",4)(31,"label",5)(32,"input",11),tm("ngModelChange",function(o){return KC(n.useEnterToSend,o)||(n.useEnterToSend=o),o}),Rg("change",function(){return n.onEnterToSendChange()}),pl(),VI(),Sg(33,"span",7),GC(34," Enter to send "),pl(),ws(35,"label",5)(36,"input",11),tm("ngModelChange",function(o){return KC(n.useEnterToSend,o)||(n.useEnterToSend=o),o}),Rg("change",function(){return n.onEnterToSendChange()}),pl(),VI(),Sg(37,"span",7),GC(38," Enter for new line "),pl()()(),ws(39,"div",3)(40,"div",12)(41,"span",10),GC(42,"Show technical messages"),pl(),ws(43,"mat-slide-toggle",13),tm("ngModelChange",function(o){return KC(n.showTechnicalMessages,o)||(n.showTechnicalMessages=o),o}),Rg("change",function(){return n.onShowTechnicalMessagesChange()}),pl(),VI(),pl()(),ws(44,"div",3)(45,"div",12)(46,"span",10),GC(47,"Show warning messages"),pl(),ws(48,"mat-slide-toggle",13),tm("ngModelChange",function(o){return KC(n.showWarningMessages,o)||(n.showWarningMessages=o),o}),Rg("change",function(){return n.onShowWarningMessagesChange()}),pl(),VI(),pl()(),ws(49,"div",3)(50,"div",12)(51,"span",10),GC(52,"Include technical messages in print"),pl(),ws(53,"mat-slide-toggle",13),tm("ngModelChange",function(o){return KC(n.printTechnicalMessages,o)||(n.printTechnicalMessages=o),o}),Rg("change",function(){return n.onPrintTechnicalMessagesChange()}),pl(),VI(),pl()()(),ws(54,"div",1)(55,"div",2)(56,"mat-icon"),GC(57,"rocket_launch"),pl(),ws(58,"span"),GC(59,"Mission Control"),pl()(),ws(60,"div",3)(61,"div",12)(62,"div",14)(63,"span",10),GC(64,"Side-by-side thread preview"),pl(),ws(65,"span",15),GC(66,"Click a mission card to open a preview panel. Recommended for large screens."),pl()(),ws(67,"mat-slide-toggle",13),tm("ngModelChange",function(o){return KC(n.missionPreviewEnabled,o)||(n.missionPreviewEnabled=o),o}),Rg("change",function(){return n.onMissionPreviewEnabledChange()}),pl(),VI(),pl()()(),ws(68,"div",1)(69,"div",2)(70,"mat-icon"),GC(71,"notifications"),pl(),ws(72,"span"),GC(73,"Notifications"),pl()(),ws(74,"div",3)(75,"div",12)(76,"span",10),GC(77,"Notify when the agent answers or requests input"),pl(),ws(78,"mat-slide-toggle",13),tm("ngModelChange",function(o){return KC(n.agentNotificationEnabled,o)||(n.agentNotificationEnabled=o),o}),Rg("change",function(){return n.onAgentNotificationEnabledChange()}),pl(),VI(),pl()(),ws(79,"div",3)(80,"div",12)(81,"span",10),GC(82,"Notification sound"),pl(),ws(83,"mat-slide-toggle",16),tm("ngModelChange",function(o){return KC(n.notificationSoundEnabled,o)||(n.notificationSoundEnabled=o),o}),Rg("change",function(){return n.onNotificationSoundEnabledChange()}),pl(),VI(),pl()(),ws(84,"div",3)(85,"div",12)(86,"span",10),GC(87,"Browser notification"),pl(),ws(88,"mat-slide-toggle",16),tm("ngModelChange",function(o){return KC(n.browserNotificationEnabled,o)||(n.browserNotificationEnabled=o),o}),Rg("change",function(){return n.onBrowserNotificationEnabledChange()}),pl(),VI(),pl(),Jw(89,st,5,0,"div",17),pl()(),ws(90,"div",1)(91,"div",2)(92,"mat-icon"),GC(93,"record_voice_over"),pl(),ws(94,"span"),GC(95,"Voice & Speech"),pl()(),ws(96,"div",3)(97,"label",18),GC(98,"Voice input method:"),pl(),ws(99,"select",19),Rg("change",function(o){return n.onVoiceInputModeChange(o)}),ws(100,"option",20),GC(101,"Browser (real-time)"),pl(),ws(102,"option",21),GC(103,"Whisper (higher accuracy)"),pl(),ws(104,"option",22),GC(105,"Voice message (send audio)"),pl()()(),ws(106,"div",3)(107,"label",23),GC(108,"Voice recognition language:"),pl(),ws(109,"select",24),tm("ngModelChange",function(o){return KC(n.selectedVoiceLanguage,o)||(n.selectedVoiceLanguage=o),o}),Rg("change",function(){return n.onVoiceLanguageChange()}),rC(110,ct,2,3,"option",25,rt),pl(),VI(),pl(),ws(112,"div",3)(113,"span",10),GC(114,"Automatic announcement:"),pl(),ws(115,"div",4)(116,"label",5)(117,"input",26),tm("ngModelChange",function(o){return KC(n.voiceAnnounceEnabled,o)||(n.voiceAnnounceEnabled=o),o}),Rg("change",function(){return n.onVoiceAnnounceEnabledChange()}),pl(),VI(),Sg(118,"span",7),GC(119," Enabled "),pl(),ws(120,"label",5)(121,"input",26),tm("ngModelChange",function(o){return KC(n.voiceAnnounceEnabled,o)||(n.voiceAnnounceEnabled=o),o}),Rg("change",function(){return n.onVoiceAnnounceEnabledChange()}),pl(),VI(),Sg(122,"span",7),GC(123," Disabled "),pl()()(),ws(124,"div",3)(125,"span",10),GC(126,"Voice mode:"),pl(),ws(127,"div",4)(128,"label",5)(129,"input",27),tm("ngModelChange",function(o){return KC(n.voiceMode,o)||(n.voiceMode=o),o}),Rg("change",function(){return n.onVoiceModeChange()}),pl(),VI(),Sg(130,"span",7),GC(131," Voice synthesis "),pl(),ws(132,"label",5)(133,"input",28),tm("ngModelChange",function(o){return KC(n.voiceMode,o)||(n.voiceMode=o),o}),Rg("change",function(){return n.onVoiceModeChange()}),pl(),VI(),Sg(134,"span",7),GC(135," Sound notification "),pl()()(),ws(136,"div",3)(137,"span",10),GC(138,"Message reading:"),pl(),ws(139,"div",4)(140,"label",5)(141,"input",29),tm("ngModelChange",function(o){return KC(n.voiceReadFullText,o)||(n.voiceReadFullText=o),o}),Rg("change",function(){return n.onVoiceReadFullTextChange()}),pl(),VI(),Sg(142,"span",7),GC(143," Full message "),pl(),ws(144,"label",5)(145,"input",29),tm("ngModelChange",function(o){return KC(n.voiceReadFullText,o)||(n.voiceReadFullText=o),o}),Rg("change",function(){return n.onVoiceReadFullTextChange()}),pl(),VI(),Sg(146,"span",7),GC(147," First paragraphs only "),pl()()(),ws(148,"div",3)(149,"label",30),GC(150,"Selected voice:"),pl(),ws(151,"select",31),tm("ngModelChange",function(o){return KC(n.selectedVoiceId,o)||(n.selectedVoiceId=o),o}),Rg("change",function(){return n.onSelectedVoiceChange()}),Jw(152,lt,2,0,"option",32),Jw(153,dt,2,0,"option",32),rC(154,pt,2,2,"option",25,at),pl(),VI(),Sg(156,"div",10),ws(157,"a",33),Rg("click",function(){return n.testVoice()}),ws(158,"span",34),GC(159,"Test voice"),pl()()(),ws(160,"div",3)(161,"label",35),GC(162),pl(),ws(163,"input",36),tm("ngModelChange",function(o){return KC(n.voiceVolume,o)||(n.voiceVolume=o),o}),Rg("input",function(){return n.onVoiceVolumeChange()}),pl(),VI(),pl(),ws(164,"div",3)(165,"label",37),GC(166),pl(),ws(167,"input",38),tm("ngModelChange",function(o){return KC(n.voiceRate,o)||(n.voiceRate=o),o}),Rg("input",function(){return n.onVoiceRateChange()}),pl(),VI(),pl()()()),t&2&&(XE(10),em("ngModel",n.selectedTheme),UI(),XE(4),em("ngModel",n.selectedTheme),UI(),XE(4),em("ngModel",n.selectedTheme),UI(),XE(14),bg("value",true),em("ngModel",n.useEnterToSend),UI(),XE(4),bg("value",false),em("ngModel",n.useEnterToSend),UI(),XE(7),em("ngModel",n.showTechnicalMessages),UI(),XE(5),em("ngModel",n.showWarningMessages),UI(),XE(5),em("ngModel",n.printTechnicalMessages),UI(),XE(14),em("ngModel",n.missionPreviewEnabled),UI(),XE(11),em("ngModel",n.agentNotificationEnabled),UI(),XE(5),em("ngModel",n.notificationSoundEnabled),bg("disabled",!n.agentNotificationEnabled),UI(),XE(5),em("ngModel",n.browserNotificationEnabled),bg("disabled",!n.agentNotificationEnabled||n.browserNotificationDenied),UI(),XE(),eC(n.browserNotificationDenied?89:-1),XE(10),bg("value",n.voiceInputMode),XE(10),em("ngModel",n.selectedVoiceLanguage),UI(),XE(),oC(n.voiceLanguageOptions),XE(7),bg("value",true),em("ngModel",n.voiceAnnounceEnabled),UI(),XE(4),bg("value",false),em("ngModel",n.voiceAnnounceEnabled),UI(),XE(8),em("ngModel",n.voiceMode),UI(),XE(4),em("ngModel",n.voiceMode),UI(),XE(8),bg("value",true),em("ngModel",n.voiceReadFullText),UI(),XE(4),bg("value",false),em("ngModel",n.voiceReadFullText),UI(),XE(6),em("ngModel",n.selectedVoiceId),bg("disabled",n.loadingVoices||n.availableVoices.length===0),UI(),XE(),eC(n.loadingVoices?152:-1),XE(),eC(!n.loadingVoices&&n.availableVoices.length===0?153:-1),XE(),oC(n.availableVoices),XE(8),vl("Volume: ",n.voiceVolume,"%"),XE(),em("ngModel",n.voiceVolume),UI(),XE(3),vl("Speed: ",n.voiceRate,"%"),XE(),em("ngModel",n.voiceRate),UI());},dependencies:[ti,Qn,ei,Ye$1,_n,At,mn,Zn,cn,wt,se],styles:['.options-content[_ngcontent-%COMP%]{padding:0;width:100%}.option-group[_ngcontent-%COMP%]{padding:0 1rem 1rem;margin-bottom:1rem;border-bottom:1px solid var(--color-border-light)}.option-group[_ngcontent-%COMP%]:last-child{margin-bottom:0;padding-bottom:0;border-bottom:none}.option-label[_ngcontent-%COMP%]{display:block;margin-bottom:.5rem;font-weight:500;color:var(--color-text);font-size:.875rem}.toggle-option[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;gap:1rem}.toggle-option[_ngcontent-%COMP%] .option-label[_ngcontent-%COMP%]{margin-bottom:0;flex:1}.toggle-option[_ngcontent-%COMP%] mat-slide-toggle[_ngcontent-%COMP%]{flex-shrink:0}.option-label-with-hint[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.25rem;flex:1}.option-label-with-hint[_ngcontent-%COMP%] .option-label[_ngcontent-%COMP%]{margin-bottom:0}.option-label-with-hint[_ngcontent-%COMP%] .option-hint[_ngcontent-%COMP%]{font-size:.775rem;color:var(--color-text-secondary);line-height:1.4}.option-select[_ngcontent-%COMP%]{width:100%;padding:.5rem;border:1px solid var(--color-border);border-radius:4px;background:var(--color-input-bg);color:var(--color-text);font-size:.875rem;cursor:pointer}.option-select[_ngcontent-%COMP%]:focus{outline:none;border-color:var(--color-primary);box-shadow:0 0 0 3px #7064fb1a}.option-select[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.option-select[_ngcontent-%COMP%] option[_ngcontent-%COMP%]{padding:.5rem}.option-checkbox[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer;font-size:.875rem;color:var(--color-text);-webkit-user-select:none;user-select:none}.option-checkbox[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]{display:none}.option-checkbox[_ngcontent-%COMP%] .checkmark[_ngcontent-%COMP%]{width:18px;height:18px;border:2px solid var(--color-border);border-radius:3px;margin-right:.75rem;display:flex;align-items:center;justify-content:center;transition:all .2s ease;flex-shrink:0}.option-checkbox[_ngcontent-%COMP%] .checkmark[_ngcontent-%COMP%]:after{content:"";width:10px;height:6px;border-left:2px solid transparent;border-bottom:2px solid transparent;transform:rotate(-45deg);transition:all .2s ease;opacity:0}.option-checkbox[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked + .checkmark[_ngcontent-%COMP%]{background-color:var(--color-primary);border-color:var(--color-primary)}.option-checkbox[_ngcontent-%COMP%] input[type=checkbox][_ngcontent-%COMP%]:checked + .checkmark[_ngcontent-%COMP%]:after{border-left-color:#fff;border-bottom-color:#fff;opacity:1}.option-checkbox[_ngcontent-%COMP%]:hover .checkmark[_ngcontent-%COMP%]{border-color:var(--color-primary)}.option-checkbox[_ngcontent-%COMP%]:focus-within .checkmark[_ngcontent-%COMP%]{box-shadow:0 0 0 3px #7064fb1a}.option-section[_ngcontent-%COMP%]{padding-top:1rem;margin-top:1rem;border-top:2px solid var(--color-border)}.option-section[_ngcontent-%COMP%]:first-child{border-top:none;padding-top:0;margin-top:0}.section-title[_ngcontent-%COMP%]{margin:0 0 1rem;padding:0 1rem;font-size:.9rem;font-weight:600;color:var(--color-text);display:flex;align-items:center;gap:.5rem}.section-title[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px}.radio-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.option-radio[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer;font-size:.875rem;color:var(--color-text);-webkit-user-select:none;user-select:none}.option-radio[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{display:none}.option-radio[_ngcontent-%COMP%] .radio-mark[_ngcontent-%COMP%]{width:16px;height:16px;border:2px solid var(--color-border);border-radius:50%;margin-right:.5rem;display:flex;align-items:center;justify-content:center;transition:all .2s ease;flex-shrink:0;position:relative}.option-radio[_ngcontent-%COMP%] .radio-mark[_ngcontent-%COMP%]:after{content:"";width:8px;height:8px;border-radius:50%;background-color:var(--color-primary);transition:all .2s ease;opacity:0;transform:scale(0)}.option-radio[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + .radio-mark[_ngcontent-%COMP%]{border-color:var(--color-primary)}.option-radio[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + .radio-mark[_ngcontent-%COMP%]:after{opacity:1;transform:scale(1)}.option-radio[_ngcontent-%COMP%]:hover .radio-mark[_ngcontent-%COMP%]{border-color:var(--color-primary)}.option-radio[_ngcontent-%COMP%]:focus-within .radio-mark[_ngcontent-%COMP%]{box-shadow:0 0 0 3px #7064fb1a}.option-slider[_ngcontent-%COMP%]{width:100%;height:6px;border-radius:3px;background:var(--color-bg-solid);outline:none;cursor:pointer;-webkit-appearance:none;appearance:none}.option-slider[_ngcontent-%COMP%]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:20px;height:20px;border-radius:50%;background:var(--color-primary);cursor:pointer;border:2px solid white;box-shadow:0 2px 6px #0003;transition:all .2s ease}.option-slider[_ngcontent-%COMP%]::-webkit-slider-thumb:hover{transform:scale(1.1);box-shadow:0 2px 8px #0000004d}.option-slider[_ngcontent-%COMP%]::-moz-range-thumb{width:20px;height:20px;border-radius:50%;background:var(--color-primary);cursor:pointer;border:2px solid white;box-shadow:0 2px 6px #0003;transition:all .2s ease}.option-slider[_ngcontent-%COMP%]::-moz-range-thumb:hover{transform:scale(1.1);box-shadow:0 2px 8px #0000004d}.option-slider[_ngcontent-%COMP%]::-webkit-slider-track{height:6px;border-radius:3px;background:var(--color-bg-secondary)}.option-slider[_ngcontent-%COMP%]::-moz-range-track{height:6px;border-radius:3px;background:var(--color-bg-secondary);border:none}.option-slider[_ngcontent-%COMP%]:focus{outline:none}.option-slider[_ngcontent-%COMP%]:focus::-webkit-slider-thumb{box-shadow:0 0 0 3px #7064fb4d,0 2px 6px #0003}.option-slider[_ngcontent-%COMP%]:focus::-moz-range-thumb{box-shadow:0 0 0 3px #7064fb4d,0 2px 6px #0003}.test-voice-btn[_ngcontent-%COMP%]{width:100%;padding:.75rem 1rem;background:var(--color-primary);color:#fff;border:none;border-radius:6px;font-size:.875rem;font-weight:500;cursor:pointer;transition:all .2s ease;display:flex;align-items:center;justify-content:center;gap:.5rem}.test-voice-btn[_ngcontent-%COMP%]:hover{background:var(--color-primary-hover);transform:translateY(-1px);box-shadow:0 2px 8px #7064fb4d}.test-voice-btn[_ngcontent-%COMP%]:active{transform:translateY(0);box-shadow:0 1px 4px #7064fb4d}.test-voice-btn[_ngcontent-%COMP%]:focus{outline:none;box-shadow:0 0 0 3px #7064fb4d}.test-voice-btn[_ngcontent-%COMP%]:disabled{background:var(--color-bg-secondary);color:var(--color-text-secondary);cursor:not-allowed;transform:none;box-shadow:none}.test-voice-link[_ngcontent-%COMP%]{text-decoration-thickness:1.5px;text-underline-offset:3px;background:transparent;border:none;padding:0;font-size:.775rem;font-weight:400;cursor:pointer;transition:all .2s ease;display:inline-flex;align-items:center;justify-content:center;gap:.5rem;text-decoration:underline}.test-voice-link[_ngcontent-%COMP%]:hover{color:var(--color-primary-hover, var(--color-primary));text-decoration-thickness:2px}.test-voice-link[_ngcontent-%COMP%]:active{opacity:.8}.test-voice-link[_ngcontent-%COMP%]:focus{outline:2px solid var(--color-primary);outline-offset:2px}.test-voice-link[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px}.notification-error[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.5rem;padding:.75rem;margin-top:.75rem;background-color:#d32f2f1a;border:1px solid rgba(211,47,47,.3);border-radius:6px;font-size:.8125rem;line-height:1.5}.notification-error[_ngcontent-%COMP%] .error-icon[_ngcontent-%COMP%]{color:#d32f2f;font-size:20px;width:20px;height:20px;flex-shrink:0;margin-top:2px}.notification-error[_ngcontent-%COMP%] .error-message[_ngcontent-%COMP%]{color:var(--color-text);flex:1}.notification-error[_ngcontent-%COMP%]{margin-top:.75rem;padding:.75rem;background-color:#f443361a;border:1px solid rgba(244,67,54,.3);border-radius:6px;display:flex;align-items:flex-start;gap:.5rem}.notification-error[_ngcontent-%COMP%] .error-icon[_ngcontent-%COMP%]{color:#f44336;font-size:20px;width:20px;height:20px;flex-shrink:0;margin-top:2px}.notification-error[_ngcontent-%COMP%] .error-message[_ngcontent-%COMP%]{font-size:.8125rem;color:var(--color-text);line-height:1.5;flex:1}'],changeDetection:1})};function Qe(c){let e=c.args??"",t;try{let n=JSON.parse(e);t=JSON.stringify(n,null,2);}catch(n){t=e;}return `\u{1F527} ${c.name}
179
179
 
180
- ${t}`}var Ge=class c{destroy$=new ue;currentProject=null;currentThread=null;messagesSubject=new Tr([]);isThinkingSubject=new Tr(false);currentChoiceSubject=new Tr(null);projectTitleSubject=new Tr("Coday");currentInviteEventSubject=new Tr(null);messageToRestoreSubject=new Tr("");threadUpdateEventSubject=new Tr(null);currentChoiceEvent=null;thinkingTimeout=null;accumulatedChunks="";streamingTextSubject=new Tr("");subThreadEventsSubject=new ue;subThreadEvents$=this.subThreadEventsSubject.asObservable();subThreadEventBuffers=new Map;getBufferedSubThreadEvents(e){return this.subThreadEventBuffers.get(e)??[]}messages$=this.messagesSubject.asObservable();streamingText$=this.streamingTextSubject.asObservable();isThinking$=this.isThinkingSubject.asObservable();currentChoice$=this.currentChoiceSubject.asObservable();currentInviteEvent$=this.currentInviteEventSubject.asObservable();messageToRestore$=this.messageToRestoreSubject.asObservable();threadUpdateEvent$=this.threadUpdateEventSubject.asObservable();connectionStatus$;tabTitleService=null;eventStream=g(fe);messageApi=g(be);userService=g(pe);constructor(){this.connectionStatus$=this.eventStream.connectionStatus$,this.initializeEventHandling();}setTabTitleService(e){this.tabTitleService=e;}connectToThread(e,t){this.currentProject=e,this.currentThread=t,this.eventStream.connectToThread(e,t);}loadHistoryFromRest(e){for(let t of e){let n=le(t);n&&this.handleEvent(n,true);}}resetMessages(){this.messagesSubject.next([]),this.currentChoiceSubject.next(null),this.currentInviteEventSubject.next(null),this.currentChoiceEvent=null,this.accumulatedChunks="",this.streamingTextSubject.next(""),this.subThreadEventBuffers.clear(),this.stopThinking();}sendMessage(e){if(!this.currentProject||!this.currentThread){console.error("[CODAY] Cannot send message: no project or thread selected");return}let t=this.currentInviteEventSubject.value;if(t){this.clearThinkingTimeout(),this.isThinkingSubject.next(true),this.thinkingTimeout=setTimeout(()=>{this.thinkingTimeout=null,this.stopThinking(),console.warn("[CODAY] Safety timeout: no server response after 30 s, releasing thinking state");},3e4),this.tabTitleService?.setSystemActive(),this.currentInviteEventSubject.next(null);let n=t.buildAnswer(e);this.messageApi.sendMessage(n).subscribe({error:i=>{console.error("[CODAY] Send invite answer error:",i),this.currentInviteEventSubject.next(t),this.stopThinking();}});}else this.messageApi.sendFreeMessage(e).subscribe({error:n=>{console.error("[CODAY] Send error:",n);}});}sendChoice(e){if(!this.currentProject||!this.currentThread){console.error("[CODAY] Cannot send choice: no project or thread selected");return}if(this.currentChoiceEvent){this.clearThinkingTimeout(),this.isThinkingSubject.next(true),this.thinkingTimeout=setTimeout(()=>{this.thinkingTimeout=null,this.stopThinking(),console.warn("[CODAY] Safety timeout: no server response after 30 s, releasing thinking state");},3e4),this.tabTitleService?.setSystemActive();let t=this.currentChoiceEvent.buildAnswer(e);this.currentChoiceSubject.next(null),this.currentChoiceEvent=null,this.messageApi.sendMessage(t).subscribe({next:()=>{},error:n=>{console.error("[CODAY-CHOICE] Choice error:",n),this.stopThinking();}});}else console.error("[CODAY-CHOICE] No choice event available for choice:",e);}deleteMessage(e){let t=this.messagesSubject.value.find(i=>i.id===e),n=this.extractTextContentFromMessage(t);return this.messageApi.deleteMessage(e).pipe(Od(i=>{i.success&&(this.removeMessagesFromIndex(e),n.trim()&&this.messageToRestoreSubject.next(n));}))}getCurrentProjectTitle(){return this.projectTitleSubject.value}getCurrentInviteEvent(){return this.currentInviteEventSubject.value}setThinkingForPendingMessage(){this.isThinkingSubject.next(true),this.tabTitleService?.setSystemActive();}initializeEventHandling(){this.eventStream.events$.pipe(Cd(this.destroy$)).subscribe({next:e=>this.handleEvent(e),error:e=>console.error("[CODAY] Event stream error:",e),complete:()=>console.log("[CODAY] Event stream completed")});}handleEvent(e,t=false){if(e.threadId&&e.threadId!==this.currentThread){let n=this.subThreadEventBuffers.get(e.threadId);n?n.push(e):this.subThreadEventBuffers.set(e.threadId,[e]),this.subThreadEventsSubject.next(e);return}e instanceof T?this.handleMessageEvent(e):e instanceof B$1?this.handleTextChunkEvent(e):e instanceof A?this.handleTextEvent(e):e instanceof u?this.handleAnswerEvent(e):e instanceof h?this.handleErrorEvent(e):e instanceof M?this.handleWarnEvent(e):e instanceof O?this.handleThinkingEvent(e):e instanceof v?this.handleToolRequestEvent(e):e instanceof m?this.handleToolResponseEvent(e):e instanceof b?this.handleChoiceEvent(e,t):e instanceof F?this.handleHeartBeatEvent(e):e instanceof f?this.handleInviteEvent(e,t):e instanceof V?this.handleThreadUpdateEvent(e):e instanceof R?this.handleDelegationEvent(e):e instanceof H||e instanceof K||console.warn("[CODAY] Unhandled event type:",e.type);}handleDelegationEvent(e){if(console.log("[CODAY] DelegationEvent received:",e.subThreadId,e.agentName),this.messagesSubject.value.findIndex(i=>i.subThreadId===e.subThreadId)===-1){let i={id:e.timestamp,role:"system",speaker:e.agentName,content:[{type:"text",content:""}],timestamp:new Date,type:"delegation",subThreadId:e.subThreadId,delegationAgentName:e.agentName};this.addMessage(i);}}handleThreadUpdateEvent(e){this.threadUpdateEventSubject.next(e);}handleMessageEvent(e){e.role==="assistant"&&this.accumulatedChunks&&(this.accumulatedChunks="",this.streamingTextSubject.next(""));let t={id:e.timestamp,role:e.role,speaker:e.name,content:e.content,timestamp:e.date,type:"text"};this.addMessage(t);}handleTextChunkEvent(e){this.accumulatedChunks+=e.chunk,this.streamingTextSubject.next(this.accumulatedChunks);}handleTextEvent(e){let t={id:e.timestamp,role:e.speaker?"assistant":"system",speaker:e.speaker??"System",content:[{type:"text",content:e.text}],timestamp:e.date,type:e.speaker?"text":"technical"};this.addMessage(t);}handleAnswerEvent(e){let t=this.currentInviteEventSubject.value;if(t){let i=!!e.parentKey&&e.parentKey===t.timestamp,o=!e.parentKey&&e.date>=t.date;(i||o)&&this.currentInviteEventSubject.next(null);}if(this.currentChoiceEvent){let i=!!e.parentKey&&e.parentKey===this.currentChoiceEvent.timestamp,o=!e.parentKey&&e.date>=this.currentChoiceEvent.date;(i||o)&&(this.currentChoiceEvent=null,this.currentChoiceSubject.next(null));}if(e.silent)return;let n={id:e.timestamp,role:"user",speaker:e.name??this.userService.getUsername()??"User",content:[{type:"text",content:e.answer}],timestamp:e.date,type:"text",parentKey:e.parentKey,invite:e.invite};this.addMessage(n);}handleErrorEvent(e){let t={id:e.timestamp,role:"system",speaker:"System",content:[{type:"text",content:`Error: ${JSON.stringify(e.error)}`}],timestamp:e.date,type:"error"};this.addMessage(t);}handleWarnEvent(e){let t={id:e.timestamp,role:"system",speaker:"System",content:[{type:"text",content:`Warning: ${JSON.stringify(e.warning)}`}],timestamp:e.date,type:"warning"};this.addMessage(t);}handleThinkingEvent(e){this.currentInviteEventSubject.value||this.currentChoiceEvent||(this.clearThinkingTimeout(),this.isThinkingSubject.next(true),this.tabTitleService?.setSystemActive(),this.thinkingTimeout=setTimeout(()=>{this.isThinkingSubject.next(false),this.thinkingTimeout=null,this.tabTitleService?.setSystemInactive();},O.debounce+1e3));}handleToolRequestEvent(e){let t={id:e.timestamp,role:"system",speaker:"System",content:[{type:"text",content:e.toSingleLineString()}],timestamp:e.date,type:"technical",eventId:e.timestamp,fullContent:Qe(e)};this.addMessage(t);}handleToolResponseEvent(e){let t={id:e.timestamp,role:"system",speaker:"System",content:[{type:"text",content:e.toSingleLineString()}],timestamp:e.date,type:"technical",eventId:e.timestamp};this.addMessage(t);}handleChoiceEvent(e,t=false){this.stopThinking();let n={id:e.timestamp,role:"assistant",speaker:"Assistant",content:[{type:"text",content:e.optionalQuestion?`${e.optionalQuestion} ${e.invite}`:e.invite}],timestamp:e.date,type:"text"};if(this.addMessage(n),t||this.messagesSubject.value.some(y=>y.parentKey===e.timestamp||y.role==="user"&&y.timestamp>e.date||y.role==="assistant"&&y.timestamp>e.date))return;this.currentChoiceEvent=e,this.tabTitleService?.setSystemInactive();let E=e.options.map(y=>({value:y,label:y})),C=e.optionalQuestion?`${e.optionalQuestion} ${e.invite}`:e.invite;this.currentChoiceSubject.next({options:E,label:C,allowFreeText:e.allowFreeText});}handleHeartBeatEvent(e){}handleInviteEvent(e,t=false){if(this.stopThinking(),e.invite===_e)t||(this.currentInviteEventSubject.next(e),this.tabTitleService?.setSystemInactive());else {let i={id:e.timestamp,role:"assistant",speaker:"Assistant",content:[{type:"text",content:e.invite}],timestamp:e.date,type:"text"};this.addMessage(i),this.messagesSubject.value.some(C=>C.parentKey===e.timestamp||C.role==="user"&&C.timestamp>e.date||C.role==="assistant"&&C.timestamp>e.date)||t||(this.currentInviteEventSubject.next(e),this.tabTitleService?.setSystemInactive());}}addMessage(e){let t=this.messagesSubject.value;t.some(n=>n.id===e.id)||this.messagesSubject.next([...t,e]);}removeMessagesFromIndex(e){let t=this.messagesSubject.value,n=t.findIndex(o=>o.id===e);if(n===-1||n===0)return;let i=t.slice(0,n);this.messagesSubject.next(i),this.stopThinking();}extractTextContentFromMessage(e){return e?e.content.filter(t=>t.type==="text").map(t=>t.content).join(`
180
+ ${t}`}var Ge=class c{destroy$=new ue;currentProject=null;currentThread=null;messagesSubject=new Tr([]);isThinkingSubject=new Tr(false);currentChoiceSubject=new Tr(null);projectTitleSubject=new Tr("Coday");currentInviteEventSubject=new Tr(null);messageToRestoreSubject=new Tr("");threadUpdateEventSubject=new Tr(null);currentChoiceEvent=null;thinkingTimeout=null;accumulatedChunks="";streamingTextSubject=new Tr("");subThreadEventsSubject=new ue;subThreadEvents$=this.subThreadEventsSubject.asObservable();subThreadEventBuffers=new Map;getBufferedSubThreadEvents(e){return this.subThreadEventBuffers.get(e)??[]}messages$=this.messagesSubject.asObservable();streamingText$=this.streamingTextSubject.asObservable();isThinking$=this.isThinkingSubject.asObservable();currentChoice$=this.currentChoiceSubject.asObservable();currentInviteEvent$=this.currentInviteEventSubject.asObservable();messageToRestore$=this.messageToRestoreSubject.asObservable();threadUpdateEvent$=this.threadUpdateEventSubject.asObservable();connectionStatus$;tabTitleService=null;eventStream=g(fe);messageApi=g(be);userService=g(pe);constructor(){this.connectionStatus$=this.eventStream.connectionStatus$,this.initializeEventHandling();}setTabTitleService(e){this.tabTitleService=e;}connectToThread(e,t){this.currentProject=e,this.currentThread=t,this.eventStream.connectToThread(e,t);}loadHistoryFromRest(e){for(let t of e){let n=le(t);n&&this.handleEvent(n,true);}}resetMessages(){this.messagesSubject.next([]),this.currentChoiceSubject.next(null),this.currentInviteEventSubject.next(null),this.currentChoiceEvent=null,this.accumulatedChunks="",this.streamingTextSubject.next(""),this.subThreadEventBuffers.clear(),this.stopThinking();}sendMessage(e){if(!this.currentProject||!this.currentThread){console.error("[CODAY] Cannot send message: no project or thread selected");return}let t=this.currentInviteEventSubject.value;if(t){this.clearThinkingTimeout(),this.isThinkingSubject.next(true),this.thinkingTimeout=setTimeout(()=>{this.thinkingTimeout=null,this.stopThinking(),console.warn("[CODAY] Safety timeout: no server response after 30 s, releasing thinking state");},3e4),this.tabTitleService?.setSystemActive(),this.currentInviteEventSubject.next(null);let n=t.buildAnswer(e);this.messageApi.sendMessage(n).subscribe({error:i=>{console.error("[CODAY] Send invite answer error:",i),this.currentInviteEventSubject.next(t),this.stopThinking();}});}else this.messageApi.sendFreeMessage(e).subscribe({error:n=>{console.error("[CODAY] Send error:",n);}});}sendChoice(e){if(!this.currentProject||!this.currentThread){console.error("[CODAY] Cannot send choice: no project or thread selected");return}if(this.currentChoiceEvent){this.clearThinkingTimeout(),this.isThinkingSubject.next(true),this.thinkingTimeout=setTimeout(()=>{this.thinkingTimeout=null,this.stopThinking(),console.warn("[CODAY] Safety timeout: no server response after 30 s, releasing thinking state");},3e4),this.tabTitleService?.setSystemActive();let t=this.currentChoiceEvent.buildAnswer(e);this.currentChoiceSubject.next(null),this.currentChoiceEvent=null,this.messageApi.sendMessage(t).subscribe({next:()=>{},error:n=>{console.error("[CODAY-CHOICE] Choice error:",n),this.stopThinking();}});}else console.error("[CODAY-CHOICE] No choice event available for choice:",e);}deleteMessage(e){let t=this.messagesSubject.value.find(i=>i.id===e),n=this.extractTextContentFromMessage(t);return this.messageApi.deleteMessage(e).pipe(Td(i=>{i.success&&(this.removeMessagesFromIndex(e),n.trim()&&this.messageToRestoreSubject.next(n));}))}getCurrentProjectTitle(){return this.projectTitleSubject.value}getCurrentInviteEvent(){return this.currentInviteEventSubject.value}setThinkingForPendingMessage(){this.isThinkingSubject.next(true),this.tabTitleService?.setSystemActive();}initializeEventHandling(){this.eventStream.events$.pipe(Cd(this.destroy$)).subscribe({next:e=>this.handleEvent(e),error:e=>console.error("[CODAY] Event stream error:",e),complete:()=>console.log("[CODAY] Event stream completed")});}handleEvent(e,t=false){if(e.threadId&&e.threadId!==this.currentThread){let n=this.subThreadEventBuffers.get(e.threadId);n?n.push(e):this.subThreadEventBuffers.set(e.threadId,[e]),this.subThreadEventsSubject.next(e);return}e instanceof T?this.handleMessageEvent(e):e instanceof B$1?this.handleTextChunkEvent(e):e instanceof A?this.handleTextEvent(e):e instanceof u?this.handleAnswerEvent(e):e instanceof h?this.handleErrorEvent(e):e instanceof M?this.handleWarnEvent(e):e instanceof O?this.handleThinkingEvent(e):e instanceof v?this.handleToolRequestEvent(e):e instanceof m?this.handleToolResponseEvent(e):e instanceof b?this.handleChoiceEvent(e,t):e instanceof F?this.handleHeartBeatEvent(e):e instanceof f?this.handleInviteEvent(e,t):e instanceof V?this.handleThreadUpdateEvent(e):e instanceof R?this.handleDelegationEvent(e):e instanceof H||e instanceof K||console.warn("[CODAY] Unhandled event type:",e.type);}handleDelegationEvent(e){if(console.log("[CODAY] DelegationEvent received:",e.subThreadId,e.agentName),this.messagesSubject.value.findIndex(i=>i.subThreadId===e.subThreadId)===-1){let i={id:e.timestamp,role:"system",speaker:e.agentName,content:[{type:"text",content:""}],timestamp:new Date,type:"delegation",subThreadId:e.subThreadId,delegationAgentName:e.agentName};this.addMessage(i);}}handleThreadUpdateEvent(e){this.threadUpdateEventSubject.next(e);}handleMessageEvent(e){e.role==="assistant"&&this.accumulatedChunks&&(this.accumulatedChunks="",this.streamingTextSubject.next(""));let t={id:e.timestamp,role:e.role,speaker:e.name,content:e.content,timestamp:e.date,type:"text"};this.addMessage(t);}handleTextChunkEvent(e){this.accumulatedChunks+=e.chunk,this.streamingTextSubject.next(this.accumulatedChunks);}handleTextEvent(e){let t={id:e.timestamp,role:e.speaker?"assistant":"system",speaker:e.speaker??"System",content:[{type:"text",content:e.text}],timestamp:e.date,type:e.speaker?"text":"technical"};this.addMessage(t);}handleAnswerEvent(e){let t=this.currentInviteEventSubject.value;if(t){let i=!!e.parentKey&&e.parentKey===t.timestamp,o=!e.parentKey&&e.date>=t.date;(i||o)&&this.currentInviteEventSubject.next(null);}if(this.currentChoiceEvent){let i=!!e.parentKey&&e.parentKey===this.currentChoiceEvent.timestamp,o=!e.parentKey&&e.date>=this.currentChoiceEvent.date;(i||o)&&(this.currentChoiceEvent=null,this.currentChoiceSubject.next(null));}if(e.silent)return;let n={id:e.timestamp,role:"user",speaker:e.name??this.userService.getUsername()??"User",content:[{type:"text",content:e.answer}],timestamp:e.date,type:"text",parentKey:e.parentKey,invite:e.invite};this.addMessage(n);}handleErrorEvent(e){let t={id:e.timestamp,role:"system",speaker:"System",content:[{type:"text",content:`Error: ${JSON.stringify(e.error)}`}],timestamp:e.date,type:"error"};this.addMessage(t);}handleWarnEvent(e){let t={id:e.timestamp,role:"system",speaker:"System",content:[{type:"text",content:`Warning: ${JSON.stringify(e.warning)}`}],timestamp:e.date,type:"warning"};this.addMessage(t);}handleThinkingEvent(e){this.currentInviteEventSubject.value||this.currentChoiceEvent||(this.clearThinkingTimeout(),this.isThinkingSubject.next(true),this.tabTitleService?.setSystemActive(),this.thinkingTimeout=setTimeout(()=>{this.isThinkingSubject.next(false),this.thinkingTimeout=null,this.tabTitleService?.setSystemInactive();},O.debounce+1e3));}handleToolRequestEvent(e){let t={id:e.timestamp,role:"system",speaker:"System",content:[{type:"text",content:e.toSingleLineString()}],timestamp:e.date,type:"technical",eventId:e.timestamp,fullContent:Qe(e)};this.addMessage(t);}handleToolResponseEvent(e){let t={id:e.timestamp,role:"system",speaker:"System",content:[{type:"text",content:e.toSingleLineString()}],timestamp:e.date,type:"technical",eventId:e.timestamp};this.addMessage(t);}handleChoiceEvent(e,t=false){this.stopThinking();let n={id:e.timestamp,role:"assistant",speaker:"Assistant",content:[{type:"text",content:e.optionalQuestion?`${e.optionalQuestion} ${e.invite}`:e.invite}],timestamp:e.date,type:"text"};if(this.addMessage(n),t||this.messagesSubject.value.some(y=>y.parentKey===e.timestamp||y.role==="user"&&y.timestamp>e.date||y.role==="assistant"&&y.timestamp>e.date))return;this.currentChoiceEvent=e,this.tabTitleService?.setSystemInactive();let E=e.options.map(y=>({value:y,label:y})),C=e.optionalQuestion?`${e.optionalQuestion} ${e.invite}`:e.invite;this.currentChoiceSubject.next({options:E,label:C,allowFreeText:e.allowFreeText});}handleHeartBeatEvent(e){}handleInviteEvent(e,t=false){if(this.stopThinking(),e.invite===_e)t||(this.currentInviteEventSubject.next(e),this.tabTitleService?.setSystemInactive());else {let i={id:e.timestamp,role:"assistant",speaker:"Assistant",content:[{type:"text",content:e.invite}],timestamp:e.date,type:"text"};this.addMessage(i),this.messagesSubject.value.some(C=>C.parentKey===e.timestamp||C.role==="user"&&C.timestamp>e.date||C.role==="assistant"&&C.timestamp>e.date)||t||(this.currentInviteEventSubject.next(e),this.tabTitleService?.setSystemInactive());}}addMessage(e){let t=this.messagesSubject.value;t.some(n=>n.id===e.id)||this.messagesSubject.next([...t,e]);}removeMessagesFromIndex(e){let t=this.messagesSubject.value,n=t.findIndex(o=>o.id===e);if(n===-1||n===0)return;let i=t.slice(0,n);this.messagesSubject.next(i),this.stopThinking();}extractTextContentFromMessage(e){return e?e.content.filter(t=>t.type==="text").map(t=>t.content).join(`
181
181
 
182
182
  `):""}clearThinkingTimeout(){this.thinkingTimeout&&(clearTimeout(this.thinkingTimeout),this.thinkingTimeout=null);}stopThinking(){this.clearThinkingTimeout(),this.isThinkingSubject.next(false),this.tabTitleService&&this.tabTitleService.setSystemInactive();}ngOnDestroy(){this.clearThinkingTimeout(),this.destroy$.next(),this.destroy$.complete(),this.currentInviteEventSubject.complete(),this.messageToRestoreSubject.complete(),this.threadUpdateEventSubject.complete(),this.streamingTextSubject.complete(),this.eventStream.disconnect();}static \u0275fac=function(t){return new(t||c)};static \u0275prov=x({token:c,factory:c.\u0275fac,providedIn:"root"})};function gt(c,e){if(c&1&&(ws(0,"div",3),GC(1),pl()),c&2){let t=gC();XE(),vl("\u274C ",t.errorMessage);}}var Ze=class c{dialogRef=g(z$1);data=g(Ue);jsonContent;errorMessage="";title;constructor(){this.jsonContent=this.data.initialContent,this.title=this.data.title||this.getDefaultTitle(this.data.configType,this.data.projectName);}getDefaultTitle(e,t){return e==="user"?"User Configuration":`Project Configuration: ${t||"Unknown"}`}onSave(){this.errorMessage="";let e;try{e=JSON.parse(this.jsonContent);}catch(t){this.errorMessage=`Invalid JSON syntax: ${t instanceof Error?t.message:"Unknown error"}`;return}this.dialogRef.close(e);}onCancel(){this.dialogRef.close();}static \u0275fac=function(t){return new(t||c)};static \u0275cmp=xw({type:c,selectors:[["app-json-editor"]],decls:13,vars:3,consts:[["mat-dialog-title",""],["mat-icon-button","","title","Close",1,"close-button",3,"click"],["spellcheck","false","placeholder","Enter JSON configuration...",1,"json-textarea",3,"ngModelChange","ngModel"],[1,"error-message"],["align","end"],["matButton","",3,"click"],["matButton","filled","color","primary",3,"click"]],template:function(t,n){t&1&&(ws(0,"div",0),GC(1),ws(2,"button",1),Rg("click",function(){return n.onCancel()}),ws(3,"mat-icon"),GC(4,"close"),pl()()(),ws(5,"mat-dialog-content")(6,"textarea",2),tm("ngModelChange",function(o){return KC(n.jsonContent,o)||(n.jsonContent=o),o}),pl(),VI(),Jw(7,gt,2,1,"div",3),pl(),ws(8,"mat-dialog-actions",4)(9,"button",5),Rg("click",function(){return n.onCancel()}),GC(10,"Cancel"),pl(),ws(11,"button",6),Rg("click",function(){return n.onSave()}),GC(12,"Save"),pl()()),t&2&&(XE(),vl(" ",n.title," "),XE(5),em("ngModel",n.jsonContent),UI(),XE(),eC(n.errorMessage?7:-1));},dependencies:[qm,ti,Ye$1,Zn,cn,wt,Gn,pr,jt,Nt,Vt],styles:["[mat-dialog-title][_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center}[mat-dialog-title][_ngcontent-%COMP%] .close-button[_ngcontent-%COMP%]{margin-left:auto}mat-dialog-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;min-height:400px}.json-textarea[_ngcontent-%COMP%]{flex:1;min-height:300px;max-height:80vh;padding:1rem;font-family:Monaco,Menlo,Ubuntu Mono,Consolas,monospace;font-size:.875rem;line-height:1.5;background:var(--color-code-bg);color:var(--color-text);border:1px solid var(--color-border);border-radius:4px;resize:vertical;outline:none;transition:border-color .2s}.json-textarea[_ngcontent-%COMP%]:focus{border-color:var(--color-primary)}.json-textarea[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary);opacity:.6}.error-message[_ngcontent-%COMP%]{padding:.75rem 1rem;border-radius:4px;font-size:.875rem;line-height:1.4;background:#dc26261a;color:#dc2626;border:1px solid rgba(220,38,38,.3)}"],changeDetection:1})};export{Et as E,Ge as G,Qe as Q,Ye as Y,Ze as Z,yt as y,z};
@@ -1 +1 @@
1
- import {g,dk as le,Y as x}from'./main-A4H3MFZY.js';var c=class r{api=g(le);getById(e){return this.api.getByIdScheduledPrompt(e)}listPlatform(){return this.api.searchScheduledPrompt({namespaceId:null,userId:null})}listByNamespace(e){return this.api.searchScheduledPrompt({namespaceId:e,userId:null})}search(e){return this.api.searchScheduledPrompt(e)}listEffective(e){return this.api.resolveEffectiveScheduledPrompt(e)}create(e){return this.api.createScheduledPrompt(e)}update(e,t){return this.api.updateScheduledPrompt(e,t)}enable(e){return this.api.enableScheduledPrompt(e)}disable(e){return this.api.disableScheduledPrompt(e)}delete(e){return this.api.deleteScheduledPrompt(e)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=x({token:r,factory:r.\u0275fac,providedIn:"root"})};export{c};
1
+ import {g,dl as de,W as x}from'./main-IZL5CRF5.js';var c=class r{api=g(de);getById(e){return this.api.getByIdScheduledPrompt(e)}listPlatform(){return this.api.searchScheduledPrompt({namespaceId:null,userId:null})}listByNamespace(e){return this.api.searchScheduledPrompt({namespaceId:e,userId:null})}search(e){return this.api.searchScheduledPrompt(e)}listEffective(e){return this.api.resolveEffectiveScheduledPrompt(e)}create(e){return this.api.createScheduledPrompt(e)}update(e,t){return this.api.updateScheduledPrompt(e,t)}enable(e){return this.api.enableScheduledPrompt(e)}disable(e){return this.api.disableScheduledPrompt(e)}delete(e){return this.api.deleteScheduledPrompt(e)}static \u0275fac=function(t){return new(t||r)};static \u0275prov=x({token:r,factory:r.\u0275fac,providedIn:"root"})};export{c};
@@ -1 +1 @@
1
- import {g,dn as de,Y as x}from'./main-A4H3MFZY.js';var o=class r{skillController=g(de);getById(l){return this.skillController.getByIdSkill(l)}listPlatform(){return this.skillController.listPlatformSkill()}listByNamespace(l){return this.skillController.listByParentSkill(l)}listEffective(l){return this.skillController.listEffectiveSkill(l)}create(l){return this.skillController.createSkill(l)}update(l,e){return this.skillController.updateSkill(l,e)}delete(l){return this.skillController.deleteSkill(l)}static \u0275fac=function(e){return new(e||r)};static \u0275prov=x({token:r,factory:r.\u0275fac,providedIn:"root"})};export{o};
1
+ import {g,dn as be,W as x}from'./main-IZL5CRF5.js';var o=class r{skillController=g(be);getById(l){return this.skillController.getByIdSkill(l)}listPlatform(){return this.skillController.listPlatformSkill()}listByNamespace(l){return this.skillController.listByParentSkill(l)}listEffective(l){return this.skillController.listEffectiveSkill(l)}create(l){return this.skillController.createSkill(l)}update(l,e){return this.skillController.updateSkill(l,e)}delete(l){return this.skillController.deleteSkill(l)}static \u0275fac=function(e){return new(e||r)};static \u0275prov=x({token:r,factory:r.\u0275fac,providedIn:"root"})};export{o};
@@ -1,4 +1,4 @@
1
- import {dx as A,dy as z$1}from'./main-A4H3MFZY.js';var ut=z$1(Xe=>{"use strict";(function(i){var n=/\S/,t=/\"/g,e=/\n/g,r=/\r/g,a=/\\/g,s=/\u2028/,u=/\u2029/;i.tags={"#":1,"^":2,"<":3,$:4,"/":5,"!":6,">":7,"=":8,_v:9,"{":10,"&":11,_t:12},i.scan=function(h,g){var S=h.length,U=0,R=1,q=2,E=U,$=null,ee=null,B="",I=[],J=!1,O=0,C=0,L="{{",b="}}";function te(){B.length>0&&(I.push({tag:"_t",text:new String(B)}),B="");}function ge(){for(var A=!0,k=C;k<I.length;k++)if(A=i.tags[I[k].tag]<i.tags._v||I[k].tag=="_t"&&I[k].text.match(n)===null,!A)return !1;return A}function be(A,k){if(te(),A&&ge())for(var _=C,ie;_<I.length;_++)I[_].text&&((ie=I[_+1])&&ie.tag==">"&&(ie.indent=I[_].text.toString()),I.splice(_,1));else k||I.push({tag:`
1
+ import {dx as A,dy as z$1}from'./main-IZL5CRF5.js';var ut=z$1(Xe=>{"use strict";(function(i){var n=/\S/,t=/\"/g,e=/\n/g,r=/\r/g,a=/\\/g,s=/\u2028/,u=/\u2029/;i.tags={"#":1,"^":2,"<":3,$:4,"/":5,"!":6,">":7,"=":8,_v:9,"{":10,"&":11,_t:12},i.scan=function(h,g){var S=h.length,U=0,R=1,q=2,E=U,$=null,ee=null,B="",I=[],J=!1,O=0,C=0,L="{{",b="}}";function te(){B.length>0&&(I.push({tag:"_t",text:new String(B)}),B="");}function ge(){for(var A=!0,k=C;k<I.length;k++)if(A=i.tags[I[k].tag]<i.tags._v||I[k].tag=="_t"&&I[k].text.match(n)===null,!A)return !1;return A}function be(A,k){if(te(),A&&ge())for(var _=C,ie;_<I.length;_++)I[_].text&&((ie=I[_+1])&&ie.tag==">"&&(ie.indent=I[_].text.toString()),I.splice(_,1));else k||I.push({tag:`
2
2
  `});J=!1,C=I.length;}function ne(A,k){var _="="+b,ie=A.indexOf(_,k),De=f(A.substring(A.indexOf("=",k)+1,ie)).split(" ");return L=De[0],b=De[De.length-1],ie+_.length-1}for(g&&(g=g.split(" "),L=g[0],b=g[1]),O=0;O<S;O++)E==U?v(L,h,O)?(--O,te(),E=R):h.charAt(O)==`
3
3
  `?be(J):B+=h.charAt(O):E==R?(O+=L.length-1,ee=i.tags[h.charAt(O+1)],$=ee?h.charAt(O+1):"_v",$=="="?(O=ne(h,O),E=U):(ee&&O++,E=q),J=O):v(b,h,O)?(I.push({tag:$,n:f(B),otag:L,ctag:b,i:$=="/"?J-L.length:O+b.length}),B="",O+=b.length-1,E=U,$=="{"&&(b=="}}"?O++:d(I[I.length-1]))):B+=h.charAt(O);return be(J,!0),I};function d(l){l.n.substr(l.n.length-1)==="}"&&(l.n=l.n.substring(0,l.n.length-1));}function f(l){return l.trim?l.trim():l.replace(/^\s*|\s*$/g,"")}function v(l,h,g){if(h.charAt(g)!=l.charAt(0))return !1;for(var S=1,U=l.length;S<U;S++)if(h.charAt(g+S)!=l.charAt(S))return !1;return !0}var y={_t:!0,"\n":!0,$:!0,"/":!0};function o(l,h,g,S){var U=[],R=null,q=null,E=null;for(q=g[g.length-1];l.length>0;){if(E=l.shift(),q&&q.tag=="<"&&!(E.tag in y))throw new Error("Illegal content in < super tag.");if(i.tags[E.tag]<=i.tags.$||c(E,S))g.push(E),E.nodes=o(l,E.tag,g,S);else if(E.tag=="/"){if(g.length===0)throw new Error("Closing tag without opener: /"+E.n);if(R=g.pop(),E.n!=R.n&&!m(E.n,R.n,S))throw new Error("Nesting error: "+R.n+" vs. "+E.n);return R.end=E.i,U}else E.tag==`
4
4
  `&&(E.last=l.length==0||l[0].tag==`
@@ -0,0 +1 @@
1
+ import {g,F,C as Ce,dg as k,aJ as Tr,G as Gi,bS as Ea,r as re,b as U,e as xw,aK as xb,k as ws,bf as aT,q as Rg,o as pl,af as Eg,t as CC,u as bg,bg as uT,ah as rT,cb as ZB,cc as qB,m as mT,n as GC,J as Jw,X as XE,a8 as Yg,v as eC,ac as gC,T as Tg,a5 as vl,a9 as lC,aa as If,ab as wf,ag as fT}from'./main-IZL5CRF5.js';import {$ as $n,S as Se,G as Gn,c as ni}from'./chunk-JKBba9WI.js';import'./chunk-Co47-WQ-.js';import'./chunk-C2h5l5r_.js';function J(i,t){if(i&1&&(ws(0,"span",4),GC(1),pl()),i&2){let e=gC();Tg("data-variant",e.badge().variant)("aria-label",e.badge().ariaLabel),XE(),vl(" ",e.badge().label," ");}}function Q(i,t){if(i&1&&(ws(0,"span",6),GC(1),pl()),i&2){let e=gC();XE(),Yg(e.config().baseUrl);}}function X(i,t){if(i&1){let e=lC();ws(0,"span",8),GC(1,"Delete?"),pl(),ws(2,"ds-icon-button",9),Rg("action",function(){If(e);let o=gC();return wf(o.onDeleteConfirmed())}),pl(),ws(3,"ds-icon-button",10),Rg("action",function(){If(e);let o=gC();return wf(o.onDeleteCancelled())}),pl();}}function Y(i,t){if(i&1){let e=lC();ws(0,"ds-kebab-menu",13),Rg("itemSelected",function(o){If(e);let g=gC(2);return wf(g.onMenuAction(o))}),pl();}if(i&2){let e=gC(2);bg("items",e.menuItems());}}function Z(i,t){if(i&1){let e=lC();ws(0,"ds-icon-button",11),Rg("action",function(){If(e);let o=gC();return wf(o.onDuplicate())}),pl(),Jw(1,Y,1,1,"ds-kebab-menu",12);}if(i&2){let e=gC();XE(),eC(e.readOnly()?-1:1);}}var ee=Object.freeze({platform:{label:"PLATFORM",ariaLabel:"Configuration de niveau plateforme (lecture seule)",variant:"neutral"},namespace:{label:"NS",ariaLabel:"Configuration partag\xE9e du namespace",variant:"neutral"},userOnNs:{label:"USER \xD7 NS",ariaLabel:"Configuration utilisateur sur ce namespace",variant:"info"},userGlobal:{label:"USER GLOBAL",ariaLabel:"Configuration utilisateur globale",variant:"warning"}}),A=class i{config=ZB.required();scope=ZB.required();readOnly=ZB(false);showBadge=ZB(true);editRequested=qB();deleteRequested=qB();duplicateRequested=qB();pendingDelete=Gi(false);badge=mT(()=>ee[this.scope()]);menuItems=mT(()=>[{key:"edit",label:"Edit provider",icon:"edit"},{key:"delete",label:"Delete provider",icon:"delete",variant:"danger"}]);onMenuAction(t){switch(t){case "edit":this.editRequested.emit(this.config());break;case "delete":this.pendingDelete.set(true);break}}onDuplicate(){this.duplicateRequested.emit(this.config());}onDeleteConfirmed(){this.pendingDelete.set(false),this.deleteRequested.emit(this.config());}onDeleteCancelled(){this.pendingDelete.set(false);}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=xw({type:i,selectors:[["agentos-ai-provider-item"]],inputs:{config:[1,"config"],scope:[1,"scope"],readOnly:[1,"readOnly"],showBadge:[1,"showBadge"]},outputs:{editRequested:"editRequested",deleteRequested:"deleteRequested",duplicateRequested:"duplicateRequested"},decls:12,vars:5,consts:[["role","listitem","dsBlueprint","",1,"ai-provider-item"],[1,"ai-provider-item__body"],[1,"ai-provider-item__heading"],[1,"ai-provider-item__name"],[1,"ai-provider-item__badge"],[1,"ai-provider-item__type"],[1,"ai-provider-item__url"],[1,"ai-provider-item__actions"],[1,"ai-provider-item__confirm-label"],["icon","check","variant","danger","title","Confirm deletion",3,"action"],["icon","close","title","Cancel deletion",3,"action"],["icon","content_copy","title","Duplicate this provider",3,"action"],[3,"items"],[3,"itemSelected","items"]],template:function(e,n){e&1&&(ws(0,"div",0)(1,"div",1)(2,"div",2)(3,"span",3),GC(4),pl(),Jw(5,J,2,3,"span",4),pl(),ws(6,"span",5),GC(7),pl(),Jw(8,Q,2,1,"span",6),pl(),ws(9,"div",7),Jw(10,X,4,0)(11,Z,2,1),pl()()),e&2&&(XE(4),Yg(n.config().name),XE(),eC(n.showBadge()?5:-1),XE(2),Yg(n.config().apiType),XE(),eC(n.config().baseUrl?8:-1),XE(2),eC(n.pendingDelete()?10:11));},dependencies:[Gn,ni,Se],styles:[".ai-provider-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:14px 16px;position:relative;border-radius:0;border:1px solid var(--color-divider);background:var(--color-bg);box-shadow:var(--shadow-sm);overflow:visible;transition:border-color .15s ease}.ai-provider-item[_ngcontent-%COMP%]:hover{border-color:var(--color-accent)}.ai-provider-item__body[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:.2rem;min-width:0}.ai-provider-item__heading[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;min-width:0}.ai-provider-item__name[_ngcontent-%COMP%]{font-size:15px;font-weight:600;color:var(--color-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.ai-provider-item__badge[_ngcontent-%COMP%]{flex-shrink:0;font-family:var(--font-heading);font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;border-radius:0;padding:.1rem .4rem;line-height:1.2;white-space:nowrap}.ai-provider-item__badge[data-variant=neutral][_ngcontent-%COMP%]{border:1px solid var(--color-divider);color:var(--color-neutral-600);background:transparent}.ai-provider-item__badge[data-variant=info][_ngcontent-%COMP%]{border:1px solid color-mix(in srgb,var(--color-info) 40%,transparent);color:var(--color-info);background:color-mix(in srgb,var(--color-info) 10%,transparent)}.ai-provider-item__badge[data-variant=warning][_ngcontent-%COMP%]{border:1px solid color-mix(in srgb,var(--color-warning) 40%,transparent);color:var(--color-warning);background:color-mix(in srgb,var(--color-warning) 10%,transparent)}.ai-provider-item__type[_ngcontent-%COMP%], .ai-provider-item__url[_ngcontent-%COMP%]{font-size:13px;color:var(--color-text-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ai-provider-item__actions[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;gap:.125rem;opacity:0;transition:opacity .15s ease}.ai-provider-item[_ngcontent-%COMP%]:hover .ai-provider-item__actions[_ngcontent-%COMP%], .ai-provider-item[_ngcontent-%COMP%]:focus-within .ai-provider-item__actions[_ngcontent-%COMP%]{opacity:1}.ai-provider-item__confirm-label[_ngcontent-%COMP%]{font-family:var(--font-heading);font-size:11px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--red-deep);margin-right:.25rem;white-space:nowrap}"]})};var te=()=>[];function ie(i,t){if(i&1){let e=lC();ws(0,"agentos-ai-provider-item",4),Rg("editRequested",function(o){If(e);let g=gC(2);return wf(g.onEdit(o))})("deleteRequested",function(o){If(e);let g=gC(2);return wf(g.onDelete(o))}),pl();}i&2&&bg("config",t)("showBadge",false);}function ne(i,t){if(i&1&&Jw(0,ie,1,2,"agentos-ai-provider-item",3),i&2){let e,n=t.$implicit,o=gC();eC((e=o.resolveProvider(n.id))?0:-1,e);}}var K=class i{router=g(F);destroyRef=g(Ce);aiProviderController=g(k);refresh$=new Tr(void 0);isLoading=Gi(true);providers$=this.refresh$.pipe(Ea(()=>(this.isLoading.set(true),this.aiProviderController.listAiProvider("none"))));providerItems$=this.providers$.pipe(re(t=>t.map(e=>({id:e.id??"",name:e.name,description:e.apiType}))));providersById=new Map;constructor(){this.providers$.pipe(U(this.destroyRef)).subscribe({next:t=>{this.providersById=new Map(t.map(e=>[e.id??"",e])),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}goBack(){this.router.navigate(["/agentos","admin"]);}openCreateForm(){this.router.navigate(["/agentos","admin","ai-providers","new"]);}onEdit(t){t.id&&this.router.navigate(["/agentos","admin","ai-providers",t.id,"edit"]);}onDelete(t){t.id&&this.aiProviderController.deleteAiProvider(t.id).pipe(U(this.destroyRef)).subscribe(()=>this.refresh$.next());}resolveProvider(t){return this.providersById.get(t)??null}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=xw({type:i,selectors:[["agentos-platform-ai-providers"]],decls:5,vars:7,consts:[["aiProviderItemTpl",""],["title","Platform AI Providers","emptyMessage","No platform AI providers defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","loading","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],["scope","namespace",3,"config","showBadge"],["scope","namespace",3,"editRequested","deleteRequested","config","showBadge"]],template:function(e,n){if(e&1&&(ws(0,"ds-entity-list",1),aT(1,"async"),Rg("createRequested",function(){return n.openCreateForm()}),ws(2,"ds-icon-button",2),Rg("action",function(){return n.goBack()}),pl()(),Eg(3,ne,1,1,"ng-template",null,0,fT)),e&2){let o=CC(4);bg("items",uT(1,4,n.providerItems$)??rT(6,te))("loading",n.isLoading())("showCreate",true)("itemTemplate",o);}},dependencies:[$n,A,Se,xb],styles:[".platform-ai-providers__back[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;font-family:inherit;font-size:.875rem;color:var(--color-text-secondary, #6e6e73);padding:.25rem .5rem;border-radius:4px;transition:color .15s ease}.platform-ai-providers__back[_ngcontent-%COMP%]:hover{color:var(--color-primary, #007aff)}"]})};export{K as PlatformAiProvidersComponent};
@@ -1 +1 @@
1
- import {f}from'./chunk-DqyQME6K.js';import {g,bm as Mm,R as Re,a as Gi,m as mT,e as xw,h as hr,j as Gn,k as ws,q as Rg,n as GC,o as pl,J as Jw,af as Eg,ag as fT,u as CC,X as XE,v as bg,y as eC,H as py,P,aF as R,Y as x,Z as z,_ as Ue,$ as zt,a0 as jt,a1 as Vt,a2 as Nt,i as pr,bn as Xt,ai as tm,aj as KC,a3 as VI,t as rC,bo as tC,a8 as Yg,ak as em,a6 as UI,z as oC,a5 as vl,ac as gC,a9 as lC,aa as If,ab as wf,bp as ml,bq as yl,ah as rT,b4 as oT,A as Ug,b0 as Qg,a4 as nC,T as Tg,S as Sg}from'./main-A4H3MFZY.js';import {P as Pt}from'./chunk-6Be7kW0o.js';import {T as Tn,S as Sn,n as nt$1,a as ae,l as le,c as ce}from'./chunk-C0RjV9YR.js';import {$ as $n,o as ot$1,i as it$1,I as In,E as Ee,z as ze$1,v as va,D as Dn}from'./chunk-B0es9TQT.js';import'./chunk-D6Uyjin9.js';import {y as yt,w as wt,t as ti,Q as Qn,e as ei,Y as Ye$1,f as fn,m as mn,Z as Zn,g as gt,$ as $t,W as Wt,c as cn}from'./chunk-CFuJNk7Q.js';var w=class s{http=g(py);projectState=g(P);getBaseUrl(){return `/api/projects/${this.projectState.getSelectedProjectIdOrThrow()}/agents`}listEditableAgents(){return this.http.get(`${this.getBaseUrl()}/editable`)}getAgent(t){return this.http.get(`${this.getBaseUrl()}/${encodeURIComponent(t)}`)}createAgent(t,e){return this.http.post(this.getBaseUrl(),{location:e,definition:t})}updateAgent(t,e){return this.http.put(`${this.getBaseUrl()}/${encodeURIComponent(t)}`,{definition:e})}listDocuments(t){return this.http.get(`${this.getBaseUrl()}/documents`,{params:{location:t}})}uploadDocument(t,e){return new R(n=>{let a=new FileReader;a.onload=()=>{let r=a.result.split(",")[1];this.http.post(`${this.getBaseUrl()}/documents`,{filename:e.name,content:r,mimeType:e.type},{params:{location:t}}).subscribe(n);},a.onerror=()=>n.error(a.error),a.readAsDataURL(e);})}deleteAgent(t){return this.http.delete(`${this.getBaseUrl()}/${encodeURIComponent(t)}`)}static \u0275fac=function(e){return new(e||s)};static \u0275prov=x({token:s,factory:s.\u0275fac,providedIn:"root"})};function ze(s,t){s&1&&(ws(0,"p",15),GC(1,"No integrations defined \u2014 agent will have access to all tools."),pl());}function qe(s,t){if(s&1){let e=lC();ws(0,"div",16)(1,"mat-form-field",22)(2,"mat-label"),GC(3,"Integration"),pl(),ws(4,"input",23),tm("ngModelChange",function(a){let r=If(e).$implicit;return KC(r.integration,a)||(r.integration=a),wf(a)}),pl(),VI(),pl(),ws(5,"mat-form-field",24)(6,"mat-label"),GC(7,"Tools (comma-separated)"),pl(),ws(8,"input",25),tm("ngModelChange",function(a){let r=If(e).$implicit;return KC(r.tools,a)||(r.tools=a),wf(a)}),pl(),VI(),pl(),ws(9,"button",26),Rg("click",function(){let a=If(e).$index,r=gC();return wf(r.removeIntegrationRow(a))}),ws(10,"mat-icon"),GC(11,"delete"),pl()()();}if(s&2){let e=t.$implicit;XE(4),em("ngModel",e.integration),UI(),XE(4),em("ngModel",e.tools),UI();}}function He(s,t){if(s&1&&(ws(0,"p",30),GC(1),pl()),s&2){let e=gC(2);XE(),Yg(e.docUploadError);}}function Ge(s,t){s&1&&(ws(0,"p",15),GC(1,"No mandatory documents defined."),pl());}function Ze(s,t){if(s&1&&Sg(0,"option",35),s&2){let e=t.$implicit;bg("value","documents/"+e);}}function Ke(s,t){if(s&1){let e=lC();ws(0,"div",31)(1,"mat-form-field",32)(2,"mat-label"),GC(3,"Document path"),pl(),ws(4,"input",33),tm("ngModelChange",function(a){let r=If(e).$index,j=gC(2);return KC(j.mandatoryDocs[r],a)||(j.mandatoryDocs[r]=a),wf(a)}),pl(),VI(),ws(5,"datalist",34),rC(6,Ze,1,1,"option",35,nC),pl()(),ws(8,"button",26),Rg("click",function(){let a=If(e).$index,r=gC(2);return wf(r.removeDocRow(a))}),ws(9,"mat-icon"),GC(10,"delete"),pl()()();}if(s&2){let e=t.$index,n=gC(2);XE(4),em("ngModel",n.mandatoryDocs[e]),Tg("list","docs-list-"+e),UI(),XE(),bg("id","docs-list-"+e),XE(),oC(n.availableDocuments);}}function Je(s,t){if(s&1){let e=lC();ws(0,"div",6)(1,"span"),GC(2,"Mandatory Documents"),pl(),ws(3,"button",27),Rg("click",function(){If(e);let a=gC();return wf(a.addDocRow())}),ws(4,"mat-icon"),GC(5,"add"),pl()(),ws(6,"label",28)(7,"mat-icon"),GC(8,"upload_file"),pl(),ws(9,"input",29),Rg("change",function(a){If(e);let r=gC();return wf(r.onDocFileSelected(a))}),pl()()(),Jw(10,He,2,1,"p",30),Jw(11,Ge,2,0,"p",15),rC(12,Ke,11,3,"div",31,tC);}if(s&2){let e=gC();XE(6),Ug("uploading",e.isUploadingDoc),XE(3),bg("disabled",e.isUploadingDoc),XE(),eC(e.docUploadError?10:-1),XE(),eC(e.mandatoryDocs.length===0?11:-1),XE(),oC(e.mandatoryDocs);}}function Qe(s,t){s&1&&(ws(0,"p",15),GC(1,"\u{1F4A1} Documents can be added after the agent is created."),pl());}function Xe(s,t){if(s&1){let e=lC();ws(0,"div",6),GC(1,"Save to"),pl(),ws(2,"div",36)(3,"label",37)(4,"input",38),tm("ngModelChange",function(a){If(e);let r=gC();return KC(r.location,a)||(r.location=a),wf(a)}),pl(),VI(),ws(5,"div",39)(6,"div",40)(7,"span",41),GC(8,"\u{1F464}"),pl(),ws(9,"span",42),GC(10,"Project config"),pl()(),ws(11,"p",43),GC(12),pl()()(),ws(13,"label",37)(14,"input",44),tm("ngModelChange",function(a){If(e);let r=gC();return KC(r.location,a)||(r.location=a),wf(a)}),pl(),VI(),ws(15,"div",39)(16,"div",40)(17,"span",41),GC(18,"\u{1F4E6}"),pl(),ws(19,"span",42),GC(20,"Colocated"),pl()(),ws(21,"p",43),GC(22,"Next to coday.yaml in ./agents/ (committable)"),pl()()()(),ws(23,"p",15),GC(24,"Storage location is permanent and cannot be changed after creation."),pl();}if(s&2){let e=gC();XE(3),Ug("selected",e.location==="project"),XE(),em("ngModel",e.location),UI(),XE(8),Qg("~/.coday/projects/","{","name","}","/agents/ (not committed)"),XE(),Ug("selected",e.location==="colocated"),XE(),em("ngModel",e.location),UI();}}function Ye(s,t){if(s&1&&(ws(0,"div",17)(1,"span",6),GC(2,"Storage Location"),pl(),ws(3,"span",45),GC(4),pl(),ws(5,"p",15),GC(6,"Cannot be changed after creation."),pl()()),s&2){let e=gC();XE(3),Ug("badge-project",e.location==="project")("badge-colocated",e.location==="colocated"),XE(),vl(" ",e.location==="project"?"\u{1F464} Project config":"\u{1F4E6} Colocated"," ");}}function $e(s,t){if(s&1&&(ws(0,"div",18)(1,"mat-icon"),GC(2,"error"),pl(),ws(3,"span"),GC(4),pl()()),s&2){let e=gC();XE(4),Yg(e.errorMessage);}}var E=class s{agentCrudApi=g(w);agentApi=g(f);dialogRef=g(z);data=g(Ue);name="";description="";instructions="";aiProvider="";modelName="";temperature=null;maxOutputTokens=null;openaiAssistantId="";integrationRows=[];mandatoryDocs=[];availableDocuments=[];isUploadingDoc=false;docUploadError="";location="project";isSaving=false;errorMessage="";isEditMode=false;ngOnInit(){if(this.isEditMode=this.data.mode==="edit",this.isEditMode&&this.data.agent){let t=this.data.agent.definition;this.name=t.name,this.description=t.description,this.instructions=t.instructions??"",this.aiProvider=t.aiProvider??"",this.modelName=t.modelName??"",this.temperature=t.temperature??null,this.maxOutputTokens=t.maxOutputTokens??null,this.openaiAssistantId=t.openaiAssistantId??"",this.location=this.data.agent.source,t.integrations&&(this.integrationRows=Object.entries(t.integrations).map(([e,n])=>({integration:e,tools:n?.join(", ")??""}))),this.mandatoryDocs=[...t.mandatoryDocs??[]],this.loadAvailableDocuments();}}loadAvailableDocuments(){this.agentCrudApi.listDocuments(this.location).subscribe({next:t=>this.availableDocuments=t,error:()=>this.availableDocuments=[]});}addDocRow(){this.mandatoryDocs.push("");}removeDocRow(t){this.mandatoryDocs.splice(t,1);}onDocFileSelected(t){let e=t.target,n=e.files?.[0];n&&(this.isUploadingDoc=true,this.docUploadError="",this.agentCrudApi.uploadDocument(this.location,n).subscribe({next:a=>{this.isUploadingDoc=false,this.mandatoryDocs.push(a.relativePath),this.loadAvailableDocuments(),e.value="";},error:a=>{this.isUploadingDoc=false,this.docUploadError=a?.error?.error??a?.message??"Upload failed",e.value="";}}));}addIntegrationRow(){this.integrationRows.push({integration:"",tools:""});}removeIntegrationRow(t){this.integrationRows.splice(t,1);}trackByIndex(t){return t}validateForm(){if(!this.name.trim())return this.errorMessage="Name is required",false;if(!/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/.test(this.name.trim()))return this.errorMessage="Name must start with alphanumeric and contain only letters, digits, hyphens or underscores",false;if(!this.description.trim())return this.errorMessage="Description is required",false;for(let t of this.integrationRows)if(!t.integration.trim())return this.errorMessage="Integration name cannot be empty",false;return true}buildDefinition(){let t=this.mandatoryDocs.map(n=>n.trim()).filter(Boolean),e=this.integrationRows.length>0?Object.fromEntries(this.integrationRows.filter(n=>n.integration.trim()).map(n=>[n.integration.trim(),n.tools.split(",").map(a=>a.trim()).filter(Boolean)])):void 0;return {name:this.name.trim(),description:this.description.trim(),instructions:this.instructions.trim()||void 0,aiProvider:this.aiProvider.trim()||void 0,modelName:this.modelName.trim()||void 0,temperature:this.temperature??void 0,maxOutputTokens:this.maxOutputTokens??void 0,openaiAssistantId:this.openaiAssistantId.trim()||void 0,integrations:e,mandatoryDocs:t.length>0?t:void 0}}save(){if(this.errorMessage="",!this.validateForm())return;let t=this.buildDefinition();this.isSaving=true,(this.isEditMode?this.agentCrudApi.updateAgent(this.name.trim(),t):this.agentCrudApi.createAgent(t,this.location)).subscribe({next:()=>{this.isSaving=false,this.agentApi.clearAllCache(),this.dialogRef.close(true);},error:n=>{this.isSaving=false,this.errorMessage=n?.error?.error||n?.message||"Failed to save agent";}});}cancel(){this.dialogRef.close(false);}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=xw({type:s,selectors:[["app-agent-form"]],decls:69,vars:18,consts:[["mat-dialog-title",""],[1,"form-container"],["appearance","outline",1,"full-width"],["matInput","","placeholder","my-agent","required","",3,"ngModelChange","ngModel","readonly"],["matInput","","placeholder","What does this agent do?","rows","2","required","",3,"ngModelChange","ngModel"],["matInput","","placeholder","System instructions for the agent...","rows","6",3,"ngModelChange","ngModel"],[1,"section-title"],[1,"row-2col"],["appearance","outline"],["matInput","","placeholder","e.g. anthropic, openai",3,"ngModelChange","ngModel"],["matInput","","placeholder","e.g. claude-sonnet-4-5",3,"ngModelChange","ngModel"],["matInput","","type","number","min","0","max","2","step","0.1","placeholder","0.0 \u2013 2.0",3,"ngModelChange","ngModel"],["matInput","","type","number","min","1","placeholder","e.g. 4096",3,"ngModelChange","ngModel"],["matInput","","placeholder","asst_...",3,"ngModelChange","ngModel"],["mat-icon-button","","type","button","title","Add integration",3,"click"],[1,"hint"],[1,"integration-row"],[1,"source-display"],[1,"error-message"],["align","end"],["mat-button","",3,"click","disabled"],["mat-raised-button","","color","primary",3,"click","disabled"],["appearance","outline",1,"integration-name"],["matInput","","placeholder","e.g. GITHUB",3,"ngModelChange","ngModel"],["appearance","outline",1,"integration-tools"],["matInput","","placeholder","Leave empty for all tools",3,"ngModelChange","ngModel"],["mat-icon-button","","type","button","title","Remove",3,"click"],["mat-icon-button","","type","button","title","Add document path",3,"click"],["title","Upload a document to the pool",1,"upload-btn"],["type","file","hidden","",3,"change","disabled"],[1,"doc-upload-error"],[1,"doc-row"],["appearance","outline",1,"doc-field"],["matInput","","placeholder","documents/guide.md",3,"ngModelChange","ngModel"],[3,"id"],[3,"value"],[1,"source-options"],[1,"source-option"],["type","radio","name","location","value","project",3,"ngModelChange","ngModel"],[1,"source-content"],[1,"source-header"],[1,"source-icon"],[1,"source-label"],[1,"source-description"],["type","radio","name","location","value","colocated",3,"ngModelChange","ngModel"],[1,"source-badge"]],template:function(e,n){e&1&&(ws(0,"h2",0),GC(1),pl(),ws(2,"mat-dialog-content")(3,"div",1)(4,"mat-form-field",2)(5,"mat-label"),GC(6,"Name"),pl(),ws(7,"input",3),tm("ngModelChange",function(r){return KC(n.name,r)||(n.name=r),r}),pl(),VI(),ws(8,"mat-hint"),GC(9,"Alphanumeric, hyphens and underscores only. Cannot be changed after creation."),pl()(),ws(10,"mat-form-field",2)(11,"mat-label"),GC(12,"Description"),pl(),ws(13,"textarea",4),tm("ngModelChange",function(r){return KC(n.description,r)||(n.description=r),r}),pl(),VI(),pl(),ws(14,"mat-form-field",2)(15,"mat-label"),GC(16,"Instructions"),pl(),ws(17,"textarea",5),tm("ngModelChange",function(r){return KC(n.instructions,r)||(n.instructions=r),r}),pl(),VI(),ws(18,"mat-hint"),GC(19,"System prompt / instructions sent to the AI model"),pl()(),ws(20,"div",6),GC(21,"AI Configuration"),pl(),ws(22,"div",7)(23,"mat-form-field",8)(24,"mat-label"),GC(25,"AI Provider"),pl(),ws(26,"input",9),tm("ngModelChange",function(r){return KC(n.aiProvider,r)||(n.aiProvider=r),r}),pl(),VI(),pl(),ws(27,"mat-form-field",8)(28,"mat-label"),GC(29,"Model Name"),pl(),ws(30,"input",10),tm("ngModelChange",function(r){return KC(n.modelName,r)||(n.modelName=r),r}),pl(),VI(),pl()(),ws(31,"div",7)(32,"mat-form-field",8)(33,"mat-label"),GC(34,"Temperature"),pl(),ws(35,"input",11),tm("ngModelChange",function(r){return KC(n.temperature,r)||(n.temperature=r),r}),pl(),VI(),ws(36,"mat-hint"),GC(37,"Leave empty for model default"),pl()(),ws(38,"mat-form-field",8)(39,"mat-label"),GC(40,"Max Output Tokens"),pl(),ws(41,"input",12),tm("ngModelChange",function(r){return KC(n.maxOutputTokens,r)||(n.maxOutputTokens=r),r}),pl(),VI(),ws(42,"mat-hint"),GC(43,"Leave empty for model default"),pl()()(),ws(44,"mat-form-field",2)(45,"mat-label"),GC(46,"OpenAI Assistant ID"),pl(),ws(47,"input",13),tm("ngModelChange",function(r){return KC(n.openaiAssistantId,r)||(n.openaiAssistantId=r),r}),pl(),VI(),ws(48,"mat-hint"),GC(49,"If set, forces aiProvider to openai"),pl()(),ws(50,"div",6)(51,"span"),GC(52,"Integrations"),pl(),ws(53,"button",14),Rg("click",function(){return n.addIntegrationRow()}),ws(54,"mat-icon"),GC(55,"add"),pl()()(),Jw(56,ze,2,0,"p",15),rC(57,qe,12,2,"div",16,tC),Jw(59,Je,14,5)(60,Qe,2,0,"p",15),Jw(61,Xe,25,8),Jw(62,Ye,7,5,"div",17),Jw(63,$e,5,1,"div",18),pl()(),ws(64,"mat-dialog-actions",19)(65,"button",20),Rg("click",function(){return n.cancel()}),GC(66,"Cancel"),pl(),ws(67,"button",21),Rg("click",function(){return n.save()}),GC(68),pl()()),e&2&&(XE(),Yg(n.isEditMode?"Edit Agent":"Create Agent"),XE(6),em("ngModel",n.name),bg("readonly",n.isEditMode),UI(),XE(6),em("ngModel",n.description),UI(),XE(4),em("ngModel",n.instructions),UI(),XE(9),em("ngModel",n.aiProvider),UI(),XE(4),em("ngModel",n.modelName),UI(),XE(5),em("ngModel",n.temperature),UI(),XE(6),em("ngModel",n.maxOutputTokens),UI(),XE(6),em("ngModel",n.openaiAssistantId),UI(),XE(9),eC(n.integrationRows.length===0?56:-1),XE(),oC(n.integrationRows),XE(2),eC(n.isEditMode?59:60),XE(2),eC(n.isEditMode?-1:61),XE(),eC(n.isEditMode?62:-1),XE(),eC(n.errorMessage?63:-1),XE(2),bg("disabled",n.isSaving),XE(2),bg("disabled",n.isSaving),XE(),vl(" ",n.isSaving?"Saving...":"Save"," "));},dependencies:[ti,Qn,ei,Ye$1,fn,mn,Zn,gt,$t,Wt,cn,zt,jt,Vt,Nt,hr,pr,Gn,Tn,Sn,nt$1,ae,le,ce,yt,wt,Pt,Xt],styles:[".form-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:0;min-width:560px}@media(max-width:768px){.form-container[_ngcontent-%COMP%]{min-width:auto}}.full-width[_ngcontent-%COMP%]{width:100%}.section-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;font-size:1rem;font-weight:600;margin-top:.5rem;margin-bottom:-.25rem}.row-2col[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}@media(max-width:768px){.row-2col[_ngcontent-%COMP%]{grid-template-columns:1fr}}.integration-row[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.5rem}.integration-row[_ngcontent-%COMP%] .integration-name[_ngcontent-%COMP%]{flex:0 0 180px}.integration-row[_ngcontent-%COMP%] .integration-tools[_ngcontent-%COMP%]{flex:1}.hint[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-text-secondary);font-style:italic}.source-options[_ngcontent-%COMP%]{display:flex;gap:1rem;margin-bottom:.5rem}@media(max-width:768px){.source-options[_ngcontent-%COMP%]{flex-direction:column}}.source-option[_ngcontent-%COMP%]{flex:1;display:flex;align-items:flex-start;gap:.75rem;padding:1rem;background:var(--color-bg);border:2px solid var(--color-border);border-radius:8px;cursor:pointer;transition:all .2s ease}.source-option[_ngcontent-%COMP%]:hover{border-color:var(--color-primary);background:var(--color-bg-hover)}.source-option.selected[_ngcontent-%COMP%]{border-color:var(--color-primary);background:var(--color-bg-hover);box-shadow:0 0 0 1px var(--color-primary)}.source-option[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{margin-top:2px;cursor:pointer}.source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%]{flex:1}.source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin-bottom:.5rem}.source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-header[_ngcontent-%COMP%] .source-icon[_ngcontent-%COMP%]{font-size:1.25rem}.source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-header[_ngcontent-%COMP%] .source-label[_ngcontent-%COMP%]{font-weight:600;font-size:.95rem}.source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-description[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-text-secondary);font-family:monospace;line-height:1.4}.source-display[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.source-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem;padding:.5rem 1rem;border-radius:6px;font-size:.9rem;font-weight:500}.source-badge.badge-project[_ngcontent-%COMP%]{background:#2196f31a;color:#2196f3;border:1px solid rgba(33,150,243,.3)}.source-badge.badge-colocated[_ngcontent-%COMP%]{background:#4caf501a;color:#4caf50;border:1px solid rgba(76,175,80,.3)}.doc-row[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.5rem}.doc-row[_ngcontent-%COMP%] .doc-field[_ngcontent-%COMP%]{flex:1}.upload-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:50%;cursor:pointer;color:var(--color-text-secondary);transition:background .2s}.upload-btn[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover);color:var(--color-primary)}.upload-btn.uploading[_ngcontent-%COMP%]{opacity:.5;cursor:wait}.upload-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:1.25rem;width:1.25rem;height:1.25rem}.doc-upload-error[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-error)}.error-message[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.75rem;background:#f443361a;border:1px solid var(--color-error);border-radius:4px;color:var(--color-error)}.error-message[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:1.25rem;width:1.25rem;height:1.25rem}.error-message[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{flex:1}"],changeDetection:1})};var et=()=>[],tt=s=>({id:s});function nt(s,t){if(s&1&&(ws(0,"div",5),GC(1),pl()),s&2){let e=gC();XE(),Yg(e.errorMessage());}}function it(s,t){if(s&1){let e=lC();ws(0,"ds-entity-card",7),Rg("selected",function(a){If(e);let r=gC();return wf(r.onEdit(a))}),ml(1,8),ws(2,"button",9),Rg("click",function(a){return a.stopPropagation()}),ws(3,"mat-icon"),GC(4,"more_vert"),pl()(),yl(),pl();}if(s&2){let e=t.$implicit;gC();let n=CC(9);bg("id",e.id)("name",e.name)("description",e.description)("badges",e.badges??rT(6,et)),XE(2),bg("matMenuTriggerFor",n)("matMenuTriggerData",oT(7,tt,e.id));}}function ot(s,t){if(s&1){let e=lC();ws(0,"button",10),Rg("click",function(){let a=If(e).id,r=gC();return wf(r.onEdit(a))}),ws(1,"mat-icon"),GC(2,"edit"),pl(),GC(3," Edit "),pl(),ws(4,"button",11),Rg("click",function(){let a=If(e).id,r=gC();return wf(r.onDelete(a))}),ws(5,"mat-icon"),GC(6,"delete"),pl(),GC(7," Delete "),pl();}}var Ve=class s{agentCrudApi=g(w);location=g(Mm);dialog=g(Re);agents=Gi([]);isLoading=Gi(false);errorMessage=Gi(null);agentItems=mT(()=>this.agents().map(t=>({id:t.name,name:t.name,description:t.description,badges:this.buildBadges(t),groupKey:t.source,groupLabel:t.source==="project"?"Project (~/.coday/)":"Colocated (next to coday.yaml)"})));ngOnInit(){this.loadAgents();}loadAgents(){this.isLoading.set(true),this.errorMessage.set(null),this.agentCrudApi.listEditableAgents().subscribe({next:t=>{this.agents.set(t),this.isLoading.set(false);},error:t=>{this.errorMessage.set(t?.error?.error??"Failed to load agents"),this.isLoading.set(false);}});}onBack(){this.location.back();}onCreate(){this.dialog.open(E,{width:"700px",maxHeight:"90vh",data:{mode:"create"}}).afterClosed().subscribe(e=>{e&&this.loadAgents();});}onEdit(t){this.agentCrudApi.getAgent(t).subscribe({next:e=>{this.dialog.open(E,{width:"700px",maxHeight:"90vh",data:{mode:"edit",agent:e}}).afterClosed().subscribe(a=>{a&&this.loadAgents();});},error:e=>this.errorMessage.set(e?.error?.error??"Failed to load agent")});}onDelete(t){confirm(`Are you sure you want to delete agent "${t}"?`)&&this.agentCrudApi.deleteAgent(t).subscribe({next:()=>this.loadAgents(),error:e=>this.errorMessage.set(e?.error?.error??"Failed to delete agent")});}buildBadges(t){return [t.source==="project"?{label:"project",variant:"info"}:{label:"colocated",variant:"success"}]}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=xw({type:s,selectors:[["app-agent-list"]],decls:11,vars:5,consts:[["agentCard",""],["cardMenu","matMenu"],[1,"agent-list-page"],["title","Agents","cardMinWidth","260px","contentMaxWidth","1400px","searchPlaceholder","Filter agents\u2026","emptyMessage","No file-based agents found.",3,"createRequested","items","loading","showCreate","itemTemplate"],["toolbar-start","","mat-icon-button","","title","Back",3,"click"],[1,"agent-list__error"],["matMenuContent",""],[3,"selected","id","name","description","badges"],["dsCardActions",""],["mat-icon-button","",3,"click","matMenuTriggerFor","matMenuTriggerData"],["mat-menu-item","",3,"click"],["mat-menu-item","",1,"agent-list__delete-item",3,"click"]],template:function(e,n){if(e&1&&(ws(0,"div",2)(1,"ds-entity-list",3),Rg("createRequested",function(){return n.onCreate()}),ws(2,"button",4),Rg("click",function(){return n.onBack()}),ws(3,"mat-icon"),GC(4,"chevron_left"),pl()()(),Jw(5,nt,2,1,"div",5),pl(),Eg(6,it,5,9,"ng-template",null,0,fT),ws(8,"mat-menu",null,1),Eg(10,ot,8,0,"ng-template",6),pl()),e&2){let a=CC(7);XE(),bg("items",n.agentItems())("loading",n.isLoading())("showCreate",true)("itemTemplate",a),XE(4),eC(n.errorMessage()?5:-1);}},dependencies:[$n,ot$1,it$1,hr,Gn,yt,wt,In,Ee,ze$1,va,Dn],styles:["[_nghost-%COMP%]{display:block;width:100%;min-height:100vh;background:var(--color-bg);overflow-y:auto}.agent-list__delete-item[_ngcontent-%COMP%]{color:var(--color-error, #ff3b30)}.agent-list__delete-item[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:inherit}.agent-list__error[_ngcontent-%COMP%]{margin:1rem auto;max-width:900px;padding:.75rem 1rem;background:#dc262614;border:1px solid rgba(220,38,38,.25);border-radius:8px;color:var(--color-error, #ff3b30);font-size:.875rem}"],changeDetection:1})};export{Ve as AgentListComponent};
1
+ import {f}from'./chunk-rDVpfvvv.js';import {g,bm as Mm,R as Re,G as Gi,m as mT,e as xw,h as hr,j as Gn,k as ws,q as Rg,n as GC,o as pl,J as Jw,af as Eg,ag as fT,t as CC,X as XE,u as bg,v as eC,D as py,P,aF as R,W as x,Y as z,Z as Ue,_ as zt,a0 as jt,a1 as Vt,a2 as Nt,i as pr,bn as Xt,ai as tm,aj as KC,a3 as VI,s as rC,bo as tC,a8 as Yg,ak as em,a6 as UI,y as oC,a5 as vl,ac as gC,a9 as lC,aa as If,ab as wf,bp as ml,bq as yl,ah as rT,b4 as oT,z as Ug,b0 as Qg,a4 as nC,T as Tg,S as Sg}from'./main-IZL5CRF5.js';import {P as Pt}from'./chunk-BDMHF0ej.js';import {T as Tn,S as Sn,n as nt$1,a as ae,l as le,c as ce}from'./chunk-JL-a2GkC.js';import {$ as $n,o as ot$1,i as it$1,I as In,E as Ee,z as ze$1,a as Sa,D as Dn}from'./chunk-JKBba9WI.js';import'./chunk-Co47-WQ-.js';import {y as yt,w as wt,t as ti,Q as Qn,e as ei,Y as Ye$1,f as fn,m as mn,Z as Zn,g as gt,$ as $t,W as Wt,c as cn}from'./chunk-C2h5l5r_.js';var w=class s{http=g(py);projectState=g(P);getBaseUrl(){return `/api/projects/${this.projectState.getSelectedProjectIdOrThrow()}/agents`}listEditableAgents(){return this.http.get(`${this.getBaseUrl()}/editable`)}getAgent(t){return this.http.get(`${this.getBaseUrl()}/${encodeURIComponent(t)}`)}createAgent(t,e){return this.http.post(this.getBaseUrl(),{location:e,definition:t})}updateAgent(t,e){return this.http.put(`${this.getBaseUrl()}/${encodeURIComponent(t)}`,{definition:e})}listDocuments(t){return this.http.get(`${this.getBaseUrl()}/documents`,{params:{location:t}})}uploadDocument(t,e){return new R(n=>{let a=new FileReader;a.onload=()=>{let r=a.result.split(",")[1];this.http.post(`${this.getBaseUrl()}/documents`,{filename:e.name,content:r,mimeType:e.type},{params:{location:t}}).subscribe(n);},a.onerror=()=>n.error(a.error),a.readAsDataURL(e);})}deleteAgent(t){return this.http.delete(`${this.getBaseUrl()}/${encodeURIComponent(t)}`)}static \u0275fac=function(e){return new(e||s)};static \u0275prov=x({token:s,factory:s.\u0275fac,providedIn:"root"})};function ze(s,t){s&1&&(ws(0,"p",15),GC(1,"No integrations defined \u2014 agent will have access to all tools."),pl());}function qe(s,t){if(s&1){let e=lC();ws(0,"div",16)(1,"mat-form-field",22)(2,"mat-label"),GC(3,"Integration"),pl(),ws(4,"input",23),tm("ngModelChange",function(a){let r=If(e).$implicit;return KC(r.integration,a)||(r.integration=a),wf(a)}),pl(),VI(),pl(),ws(5,"mat-form-field",24)(6,"mat-label"),GC(7,"Tools (comma-separated)"),pl(),ws(8,"input",25),tm("ngModelChange",function(a){let r=If(e).$implicit;return KC(r.tools,a)||(r.tools=a),wf(a)}),pl(),VI(),pl(),ws(9,"button",26),Rg("click",function(){let a=If(e).$index,r=gC();return wf(r.removeIntegrationRow(a))}),ws(10,"mat-icon"),GC(11,"delete"),pl()()();}if(s&2){let e=t.$implicit;XE(4),em("ngModel",e.integration),UI(),XE(4),em("ngModel",e.tools),UI();}}function He(s,t){if(s&1&&(ws(0,"p",30),GC(1),pl()),s&2){let e=gC(2);XE(),Yg(e.docUploadError);}}function Ge(s,t){s&1&&(ws(0,"p",15),GC(1,"No mandatory documents defined."),pl());}function Ze(s,t){if(s&1&&Sg(0,"option",35),s&2){let e=t.$implicit;bg("value","documents/"+e);}}function Ke(s,t){if(s&1){let e=lC();ws(0,"div",31)(1,"mat-form-field",32)(2,"mat-label"),GC(3,"Document path"),pl(),ws(4,"input",33),tm("ngModelChange",function(a){let r=If(e).$index,j=gC(2);return KC(j.mandatoryDocs[r],a)||(j.mandatoryDocs[r]=a),wf(a)}),pl(),VI(),ws(5,"datalist",34),rC(6,Ze,1,1,"option",35,nC),pl()(),ws(8,"button",26),Rg("click",function(){let a=If(e).$index,r=gC(2);return wf(r.removeDocRow(a))}),ws(9,"mat-icon"),GC(10,"delete"),pl()()();}if(s&2){let e=t.$index,n=gC(2);XE(4),em("ngModel",n.mandatoryDocs[e]),Tg("list","docs-list-"+e),UI(),XE(),bg("id","docs-list-"+e),XE(),oC(n.availableDocuments);}}function Je(s,t){if(s&1){let e=lC();ws(0,"div",6)(1,"span"),GC(2,"Mandatory Documents"),pl(),ws(3,"button",27),Rg("click",function(){If(e);let a=gC();return wf(a.addDocRow())}),ws(4,"mat-icon"),GC(5,"add"),pl()(),ws(6,"label",28)(7,"mat-icon"),GC(8,"upload_file"),pl(),ws(9,"input",29),Rg("change",function(a){If(e);let r=gC();return wf(r.onDocFileSelected(a))}),pl()()(),Jw(10,He,2,1,"p",30),Jw(11,Ge,2,0,"p",15),rC(12,Ke,11,3,"div",31,tC);}if(s&2){let e=gC();XE(6),Ug("uploading",e.isUploadingDoc),XE(3),bg("disabled",e.isUploadingDoc),XE(),eC(e.docUploadError?10:-1),XE(),eC(e.mandatoryDocs.length===0?11:-1),XE(),oC(e.mandatoryDocs);}}function Qe(s,t){s&1&&(ws(0,"p",15),GC(1,"\u{1F4A1} Documents can be added after the agent is created."),pl());}function Xe(s,t){if(s&1){let e=lC();ws(0,"div",6),GC(1,"Save to"),pl(),ws(2,"div",36)(3,"label",37)(4,"input",38),tm("ngModelChange",function(a){If(e);let r=gC();return KC(r.location,a)||(r.location=a),wf(a)}),pl(),VI(),ws(5,"div",39)(6,"div",40)(7,"span",41),GC(8,"\u{1F464}"),pl(),ws(9,"span",42),GC(10,"Project config"),pl()(),ws(11,"p",43),GC(12),pl()()(),ws(13,"label",37)(14,"input",44),tm("ngModelChange",function(a){If(e);let r=gC();return KC(r.location,a)||(r.location=a),wf(a)}),pl(),VI(),ws(15,"div",39)(16,"div",40)(17,"span",41),GC(18,"\u{1F4E6}"),pl(),ws(19,"span",42),GC(20,"Colocated"),pl()(),ws(21,"p",43),GC(22,"Next to coday.yaml in ./agents/ (committable)"),pl()()()(),ws(23,"p",15),GC(24,"Storage location is permanent and cannot be changed after creation."),pl();}if(s&2){let e=gC();XE(3),Ug("selected",e.location==="project"),XE(),em("ngModel",e.location),UI(),XE(8),Qg("~/.coday/projects/","{","name","}","/agents/ (not committed)"),XE(),Ug("selected",e.location==="colocated"),XE(),em("ngModel",e.location),UI();}}function Ye(s,t){if(s&1&&(ws(0,"div",17)(1,"span",6),GC(2,"Storage Location"),pl(),ws(3,"span",45),GC(4),pl(),ws(5,"p",15),GC(6,"Cannot be changed after creation."),pl()()),s&2){let e=gC();XE(3),Ug("badge-project",e.location==="project")("badge-colocated",e.location==="colocated"),XE(),vl(" ",e.location==="project"?"\u{1F464} Project config":"\u{1F4E6} Colocated"," ");}}function $e(s,t){if(s&1&&(ws(0,"div",18)(1,"mat-icon"),GC(2,"error"),pl(),ws(3,"span"),GC(4),pl()()),s&2){let e=gC();XE(4),Yg(e.errorMessage);}}var E=class s{agentCrudApi=g(w);agentApi=g(f);dialogRef=g(z);data=g(Ue);name="";description="";instructions="";aiProvider="";modelName="";temperature=null;maxOutputTokens=null;openaiAssistantId="";integrationRows=[];mandatoryDocs=[];availableDocuments=[];isUploadingDoc=false;docUploadError="";location="project";isSaving=false;errorMessage="";isEditMode=false;ngOnInit(){if(this.isEditMode=this.data.mode==="edit",this.isEditMode&&this.data.agent){let t=this.data.agent.definition;this.name=t.name,this.description=t.description,this.instructions=t.instructions??"",this.aiProvider=t.aiProvider??"",this.modelName=t.modelName??"",this.temperature=t.temperature??null,this.maxOutputTokens=t.maxOutputTokens??null,this.openaiAssistantId=t.openaiAssistantId??"",this.location=this.data.agent.source,t.integrations&&(this.integrationRows=Object.entries(t.integrations).map(([e,n])=>({integration:e,tools:n?.join(", ")??""}))),this.mandatoryDocs=[...t.mandatoryDocs??[]],this.loadAvailableDocuments();}}loadAvailableDocuments(){this.agentCrudApi.listDocuments(this.location).subscribe({next:t=>this.availableDocuments=t,error:()=>this.availableDocuments=[]});}addDocRow(){this.mandatoryDocs.push("");}removeDocRow(t){this.mandatoryDocs.splice(t,1);}onDocFileSelected(t){let e=t.target,n=e.files?.[0];n&&(this.isUploadingDoc=true,this.docUploadError="",this.agentCrudApi.uploadDocument(this.location,n).subscribe({next:a=>{this.isUploadingDoc=false,this.mandatoryDocs.push(a.relativePath),this.loadAvailableDocuments(),e.value="";},error:a=>{this.isUploadingDoc=false,this.docUploadError=a?.error?.error??a?.message??"Upload failed",e.value="";}}));}addIntegrationRow(){this.integrationRows.push({integration:"",tools:""});}removeIntegrationRow(t){this.integrationRows.splice(t,1);}trackByIndex(t){return t}validateForm(){if(!this.name.trim())return this.errorMessage="Name is required",false;if(!/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/.test(this.name.trim()))return this.errorMessage="Name must start with alphanumeric and contain only letters, digits, hyphens or underscores",false;if(!this.description.trim())return this.errorMessage="Description is required",false;for(let t of this.integrationRows)if(!t.integration.trim())return this.errorMessage="Integration name cannot be empty",false;return true}buildDefinition(){let t=this.mandatoryDocs.map(n=>n.trim()).filter(Boolean),e=this.integrationRows.length>0?Object.fromEntries(this.integrationRows.filter(n=>n.integration.trim()).map(n=>[n.integration.trim(),n.tools.split(",").map(a=>a.trim()).filter(Boolean)])):void 0;return {name:this.name.trim(),description:this.description.trim(),instructions:this.instructions.trim()||void 0,aiProvider:this.aiProvider.trim()||void 0,modelName:this.modelName.trim()||void 0,temperature:this.temperature??void 0,maxOutputTokens:this.maxOutputTokens??void 0,openaiAssistantId:this.openaiAssistantId.trim()||void 0,integrations:e,mandatoryDocs:t.length>0?t:void 0}}save(){if(this.errorMessage="",!this.validateForm())return;let t=this.buildDefinition();this.isSaving=true,(this.isEditMode?this.agentCrudApi.updateAgent(this.name.trim(),t):this.agentCrudApi.createAgent(t,this.location)).subscribe({next:()=>{this.isSaving=false,this.agentApi.clearAllCache(),this.dialogRef.close(true);},error:n=>{this.isSaving=false,this.errorMessage=n?.error?.error||n?.message||"Failed to save agent";}});}cancel(){this.dialogRef.close(false);}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=xw({type:s,selectors:[["app-agent-form"]],decls:69,vars:18,consts:[["mat-dialog-title",""],[1,"form-container"],["appearance","outline",1,"full-width"],["matInput","","placeholder","my-agent","required","",3,"ngModelChange","ngModel","readonly"],["matInput","","placeholder","What does this agent do?","rows","2","required","",3,"ngModelChange","ngModel"],["matInput","","placeholder","System instructions for the agent...","rows","6",3,"ngModelChange","ngModel"],[1,"section-title"],[1,"row-2col"],["appearance","outline"],["matInput","","placeholder","e.g. anthropic, openai",3,"ngModelChange","ngModel"],["matInput","","placeholder","e.g. claude-sonnet-4-5",3,"ngModelChange","ngModel"],["matInput","","type","number","min","0","max","2","step","0.1","placeholder","0.0 \u2013 2.0",3,"ngModelChange","ngModel"],["matInput","","type","number","min","1","placeholder","e.g. 4096",3,"ngModelChange","ngModel"],["matInput","","placeholder","asst_...",3,"ngModelChange","ngModel"],["mat-icon-button","","type","button","title","Add integration",3,"click"],[1,"hint"],[1,"integration-row"],[1,"source-display"],[1,"error-message"],["align","end"],["mat-button","",3,"click","disabled"],["mat-raised-button","","color","primary",3,"click","disabled"],["appearance","outline",1,"integration-name"],["matInput","","placeholder","e.g. GITHUB",3,"ngModelChange","ngModel"],["appearance","outline",1,"integration-tools"],["matInput","","placeholder","Leave empty for all tools",3,"ngModelChange","ngModel"],["mat-icon-button","","type","button","title","Remove",3,"click"],["mat-icon-button","","type","button","title","Add document path",3,"click"],["title","Upload a document to the pool",1,"upload-btn"],["type","file","hidden","",3,"change","disabled"],[1,"doc-upload-error"],[1,"doc-row"],["appearance","outline",1,"doc-field"],["matInput","","placeholder","documents/guide.md",3,"ngModelChange","ngModel"],[3,"id"],[3,"value"],[1,"source-options"],[1,"source-option"],["type","radio","name","location","value","project",3,"ngModelChange","ngModel"],[1,"source-content"],[1,"source-header"],[1,"source-icon"],[1,"source-label"],[1,"source-description"],["type","radio","name","location","value","colocated",3,"ngModelChange","ngModel"],[1,"source-badge"]],template:function(e,n){e&1&&(ws(0,"h2",0),GC(1),pl(),ws(2,"mat-dialog-content")(3,"div",1)(4,"mat-form-field",2)(5,"mat-label"),GC(6,"Name"),pl(),ws(7,"input",3),tm("ngModelChange",function(r){return KC(n.name,r)||(n.name=r),r}),pl(),VI(),ws(8,"mat-hint"),GC(9,"Alphanumeric, hyphens and underscores only. Cannot be changed after creation."),pl()(),ws(10,"mat-form-field",2)(11,"mat-label"),GC(12,"Description"),pl(),ws(13,"textarea",4),tm("ngModelChange",function(r){return KC(n.description,r)||(n.description=r),r}),pl(),VI(),pl(),ws(14,"mat-form-field",2)(15,"mat-label"),GC(16,"Instructions"),pl(),ws(17,"textarea",5),tm("ngModelChange",function(r){return KC(n.instructions,r)||(n.instructions=r),r}),pl(),VI(),ws(18,"mat-hint"),GC(19,"System prompt / instructions sent to the AI model"),pl()(),ws(20,"div",6),GC(21,"AI Configuration"),pl(),ws(22,"div",7)(23,"mat-form-field",8)(24,"mat-label"),GC(25,"AI Provider"),pl(),ws(26,"input",9),tm("ngModelChange",function(r){return KC(n.aiProvider,r)||(n.aiProvider=r),r}),pl(),VI(),pl(),ws(27,"mat-form-field",8)(28,"mat-label"),GC(29,"Model Name"),pl(),ws(30,"input",10),tm("ngModelChange",function(r){return KC(n.modelName,r)||(n.modelName=r),r}),pl(),VI(),pl()(),ws(31,"div",7)(32,"mat-form-field",8)(33,"mat-label"),GC(34,"Temperature"),pl(),ws(35,"input",11),tm("ngModelChange",function(r){return KC(n.temperature,r)||(n.temperature=r),r}),pl(),VI(),ws(36,"mat-hint"),GC(37,"Leave empty for model default"),pl()(),ws(38,"mat-form-field",8)(39,"mat-label"),GC(40,"Max Output Tokens"),pl(),ws(41,"input",12),tm("ngModelChange",function(r){return KC(n.maxOutputTokens,r)||(n.maxOutputTokens=r),r}),pl(),VI(),ws(42,"mat-hint"),GC(43,"Leave empty for model default"),pl()()(),ws(44,"mat-form-field",2)(45,"mat-label"),GC(46,"OpenAI Assistant ID"),pl(),ws(47,"input",13),tm("ngModelChange",function(r){return KC(n.openaiAssistantId,r)||(n.openaiAssistantId=r),r}),pl(),VI(),ws(48,"mat-hint"),GC(49,"If set, forces aiProvider to openai"),pl()(),ws(50,"div",6)(51,"span"),GC(52,"Integrations"),pl(),ws(53,"button",14),Rg("click",function(){return n.addIntegrationRow()}),ws(54,"mat-icon"),GC(55,"add"),pl()()(),Jw(56,ze,2,0,"p",15),rC(57,qe,12,2,"div",16,tC),Jw(59,Je,14,5)(60,Qe,2,0,"p",15),Jw(61,Xe,25,8),Jw(62,Ye,7,5,"div",17),Jw(63,$e,5,1,"div",18),pl()(),ws(64,"mat-dialog-actions",19)(65,"button",20),Rg("click",function(){return n.cancel()}),GC(66,"Cancel"),pl(),ws(67,"button",21),Rg("click",function(){return n.save()}),GC(68),pl()()),e&2&&(XE(),Yg(n.isEditMode?"Edit Agent":"Create Agent"),XE(6),em("ngModel",n.name),bg("readonly",n.isEditMode),UI(),XE(6),em("ngModel",n.description),UI(),XE(4),em("ngModel",n.instructions),UI(),XE(9),em("ngModel",n.aiProvider),UI(),XE(4),em("ngModel",n.modelName),UI(),XE(5),em("ngModel",n.temperature),UI(),XE(6),em("ngModel",n.maxOutputTokens),UI(),XE(6),em("ngModel",n.openaiAssistantId),UI(),XE(9),eC(n.integrationRows.length===0?56:-1),XE(),oC(n.integrationRows),XE(2),eC(n.isEditMode?59:60),XE(2),eC(n.isEditMode?-1:61),XE(),eC(n.isEditMode?62:-1),XE(),eC(n.errorMessage?63:-1),XE(2),bg("disabled",n.isSaving),XE(2),bg("disabled",n.isSaving),XE(),vl(" ",n.isSaving?"Saving...":"Save"," "));},dependencies:[ti,Qn,ei,Ye$1,fn,mn,Zn,gt,$t,Wt,cn,zt,jt,Vt,Nt,hr,pr,Gn,Tn,Sn,nt$1,ae,le,ce,yt,wt,Pt,Xt],styles:[".form-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;padding:0;min-width:560px}@media(max-width:768px){.form-container[_ngcontent-%COMP%]{min-width:auto}}.full-width[_ngcontent-%COMP%]{width:100%}.section-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;font-size:1rem;font-weight:600;margin-top:.5rem;margin-bottom:-.25rem}.row-2col[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}@media(max-width:768px){.row-2col[_ngcontent-%COMP%]{grid-template-columns:1fr}}.integration-row[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.5rem}.integration-row[_ngcontent-%COMP%] .integration-name[_ngcontent-%COMP%]{flex:0 0 180px}.integration-row[_ngcontent-%COMP%] .integration-tools[_ngcontent-%COMP%]{flex:1}.hint[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-text-secondary);font-style:italic}.source-options[_ngcontent-%COMP%]{display:flex;gap:1rem;margin-bottom:.5rem}@media(max-width:768px){.source-options[_ngcontent-%COMP%]{flex-direction:column}}.source-option[_ngcontent-%COMP%]{flex:1;display:flex;align-items:flex-start;gap:.75rem;padding:1rem;background:var(--color-bg);border:2px solid var(--color-border);border-radius:8px;cursor:pointer;transition:all .2s ease}.source-option[_ngcontent-%COMP%]:hover{border-color:var(--color-primary);background:var(--color-bg-hover)}.source-option.selected[_ngcontent-%COMP%]{border-color:var(--color-primary);background:var(--color-bg-hover);box-shadow:0 0 0 1px var(--color-primary)}.source-option[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{margin-top:2px;cursor:pointer}.source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%]{flex:1}.source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin-bottom:.5rem}.source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-header[_ngcontent-%COMP%] .source-icon[_ngcontent-%COMP%]{font-size:1.25rem}.source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-header[_ngcontent-%COMP%] .source-label[_ngcontent-%COMP%]{font-weight:600;font-size:.95rem}.source-option[_ngcontent-%COMP%] .source-content[_ngcontent-%COMP%] .source-description[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-text-secondary);font-family:monospace;line-height:1.4}.source-display[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.source-badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem;padding:.5rem 1rem;border-radius:6px;font-size:.9rem;font-weight:500}.source-badge.badge-project[_ngcontent-%COMP%]{background:#2196f31a;color:#2196f3;border:1px solid rgba(33,150,243,.3)}.source-badge.badge-colocated[_ngcontent-%COMP%]{background:#4caf501a;color:#4caf50;border:1px solid rgba(76,175,80,.3)}.doc-row[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:.5rem}.doc-row[_ngcontent-%COMP%] .doc-field[_ngcontent-%COMP%]{flex:1}.upload-btn[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:50%;cursor:pointer;color:var(--color-text-secondary);transition:background .2s}.upload-btn[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover);color:var(--color-primary)}.upload-btn.uploading[_ngcontent-%COMP%]{opacity:.5;cursor:wait}.upload-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:1.25rem;width:1.25rem;height:1.25rem}.doc-upload-error[_ngcontent-%COMP%]{margin:0;font-size:.85rem;color:var(--color-error)}.error-message[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.75rem;background:#f443361a;border:1px solid var(--color-error);border-radius:4px;color:var(--color-error)}.error-message[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:1.25rem;width:1.25rem;height:1.25rem}.error-message[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{flex:1}"],changeDetection:1})};var et=()=>[],tt=s=>({id:s});function nt(s,t){if(s&1&&(ws(0,"div",5),GC(1),pl()),s&2){let e=gC();XE(),Yg(e.errorMessage());}}function it(s,t){if(s&1){let e=lC();ws(0,"ds-entity-card",7),Rg("selected",function(a){If(e);let r=gC();return wf(r.onEdit(a))}),ml(1,8),ws(2,"button",9),Rg("click",function(a){return a.stopPropagation()}),ws(3,"mat-icon"),GC(4,"more_vert"),pl()(),yl(),pl();}if(s&2){let e=t.$implicit;gC();let n=CC(9);bg("id",e.id)("name",e.name)("description",e.description)("badges",e.badges??rT(6,et)),XE(2),bg("matMenuTriggerFor",n)("matMenuTriggerData",oT(7,tt,e.id));}}function ot(s,t){if(s&1){let e=lC();ws(0,"button",10),Rg("click",function(){let a=If(e).id,r=gC();return wf(r.onEdit(a))}),ws(1,"mat-icon"),GC(2,"edit"),pl(),GC(3," Edit "),pl(),ws(4,"button",11),Rg("click",function(){let a=If(e).id,r=gC();return wf(r.onDelete(a))}),ws(5,"mat-icon"),GC(6,"delete"),pl(),GC(7," Delete "),pl();}}var Ve=class s{agentCrudApi=g(w);location=g(Mm);dialog=g(Re);agents=Gi([]);isLoading=Gi(false);errorMessage=Gi(null);agentItems=mT(()=>this.agents().map(t=>({id:t.name,name:t.name,description:t.description,badges:this.buildBadges(t),groupKey:t.source,groupLabel:t.source==="project"?"Project (~/.coday/)":"Colocated (next to coday.yaml)"})));ngOnInit(){this.loadAgents();}loadAgents(){this.isLoading.set(true),this.errorMessage.set(null),this.agentCrudApi.listEditableAgents().subscribe({next:t=>{this.agents.set(t),this.isLoading.set(false);},error:t=>{this.errorMessage.set(t?.error?.error??"Failed to load agents"),this.isLoading.set(false);}});}onBack(){this.location.back();}onCreate(){this.dialog.open(E,{width:"700px",maxHeight:"90vh",data:{mode:"create"}}).afterClosed().subscribe(e=>{e&&this.loadAgents();});}onEdit(t){this.agentCrudApi.getAgent(t).subscribe({next:e=>{this.dialog.open(E,{width:"700px",maxHeight:"90vh",data:{mode:"edit",agent:e}}).afterClosed().subscribe(a=>{a&&this.loadAgents();});},error:e=>this.errorMessage.set(e?.error?.error??"Failed to load agent")});}onDelete(t){confirm(`Are you sure you want to delete agent "${t}"?`)&&this.agentCrudApi.deleteAgent(t).subscribe({next:()=>this.loadAgents(),error:e=>this.errorMessage.set(e?.error?.error??"Failed to delete agent")});}buildBadges(t){return [t.source==="project"?{label:"project",variant:"info"}:{label:"colocated",variant:"success"}]}static \u0275fac=function(e){return new(e||s)};static \u0275cmp=xw({type:s,selectors:[["app-agent-list"]],decls:11,vars:5,consts:[["agentCard",""],["cardMenu","matMenu"],[1,"agent-list-page"],["title","Agents","cardMinWidth","260px","contentMaxWidth","1400px","searchPlaceholder","Filter agents\u2026","emptyMessage","No file-based agents found.",3,"createRequested","items","loading","showCreate","itemTemplate"],["toolbar-start","","mat-icon-button","","title","Back",3,"click"],[1,"agent-list__error"],["matMenuContent",""],[3,"selected","id","name","description","badges"],["dsCardActions",""],["mat-icon-button","",3,"click","matMenuTriggerFor","matMenuTriggerData"],["mat-menu-item","",3,"click"],["mat-menu-item","",1,"agent-list__delete-item",3,"click"]],template:function(e,n){if(e&1&&(ws(0,"div",2)(1,"ds-entity-list",3),Rg("createRequested",function(){return n.onCreate()}),ws(2,"button",4),Rg("click",function(){return n.onBack()}),ws(3,"mat-icon"),GC(4,"chevron_left"),pl()()(),Jw(5,nt,2,1,"div",5),pl(),Eg(6,it,5,9,"ng-template",null,0,fT),ws(8,"mat-menu",null,1),Eg(10,ot,8,0,"ng-template",6),pl()),e&2){let a=CC(7);XE(),bg("items",n.agentItems())("loading",n.isLoading())("showCreate",true)("itemTemplate",a),XE(4),eC(n.errorMessage()?5:-1);}},dependencies:[$n,ot$1,it$1,hr,Gn,yt,wt,In,Ee,ze$1,Sa,Dn],styles:["[_nghost-%COMP%]{display:block;width:100%;min-height:100vh;background:var(--color-bg);overflow-y:auto}.agent-list__delete-item[_ngcontent-%COMP%]{color:var(--color-error, #ff3b30)}.agent-list__delete-item[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:inherit}.agent-list__error[_ngcontent-%COMP%]{margin:1rem auto;max-width:900px;padding:.75rem 1rem;background:#dc262614;border:1px solid rgba(220,38,38,.25);border-radius:8px;color:var(--color-error, #ff3b30);font-size:.875rem}"],changeDetection:1})};export{Ve as AgentListComponent};
@@ -1 +1 @@
1
- import {g,H as py,W as br,bU as Od,r as re,Y as x}from'./main-A4H3MFZY.js';var f=class s{http=g(py);agentsCache=new Map;getAgents(e){let t=this.agentsCache.get(e);return t?br(t):this.http.get(`/api/projects/${e}/agents`).pipe(Od(o=>{this.agentsCache.set(e,o);}))}getAgentsAutocomplete(e,t){return this.getAgents(e).pipe(re(o=>{if(!t)return o;let i=t.toLowerCase(),a=r=>{let n=r.name.toLowerCase();return n.startsWith(i)?0:n.includes(i)?1:2};return o.filter(r=>{let n=r.name.toLowerCase(),h=r.description?.toLowerCase()||"";return n.includes(i)||h.includes(i)}).sort((r,n)=>a(r)-a(n))}))}clearCache(e){this.agentsCache.delete(e);}clearAllCache(){this.agentsCache.clear();}static \u0275fac=function(t){return new(t||s)};static \u0275prov=x({token:s,factory:s.\u0275fac,providedIn:"root"})};export{f};
1
+ import {g,D as py,Q as br,bU as Td,r as re,W as x}from'./main-IZL5CRF5.js';var f=class s{http=g(py);agentsCache=new Map;getAgents(e){let t=this.agentsCache.get(e);return t?br(t):this.http.get(`/api/projects/${e}/agents`).pipe(Td(o=>{this.agentsCache.set(e,o);}))}getAgentsAutocomplete(e,t){return this.getAgents(e).pipe(re(o=>{if(!t)return o;let i=t.toLowerCase(),a=r=>{let n=r.name.toLowerCase();return n.startsWith(i)?0:n.includes(i)?1:2};return o.filter(r=>{let n=r.name.toLowerCase(),h=r.description?.toLowerCase()||"";return n.includes(i)||h.includes(i)}).sort((r,n)=>a(r)-a(n))}))}clearCache(e){this.agentsCache.delete(e);}clearAllCache(){this.agentsCache.clear();}static \u0275fac=function(t){return new(t||s)};static \u0275prov=x({token:s,factory:s.\u0275fac,providedIn:"root"})};export{f};
@@ -31,5 +31,5 @@
31
31
  <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)}@media print{html,body,app-root{height:auto!important;max-height:none!important;min-height:auto!important;overflow:visible!important;position:static!important}body{background:#fff!important;color:#000!important;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif!important;font-size:11pt;line-height:1.6;padding:1rem!important}*{animation:none!important;transition:none!important;box-shadow:none!important;text-shadow:none!important}}*{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-HDA2O7OH.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles-HDA2O7OH.css"></noscript></head>
32
32
  <body>
33
33
  <app-root></app-root>
34
- <script src="polyfills-2FSRUXKO.js" type="module"></script><script src="main-A4H3MFZY.js" type="module"></script></body>
34
+ <script src="polyfills-2FSRUXKO.js" type="module"></script><script src="main-IZL5CRF5.js" type="module"></script></body>
35
35
  </html>