@whoz-oss/coday-client 3.24.0 → 3.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/browser/{chunk-CaH-AtD3.js → chunk--j9cf9d6.js} +1 -1
  2. package/browser/{chunk-B3xYeZtG.js → chunk-2dXF6kxO.js} +1 -1
  3. package/browser/{chunk-BK_05kmN.js → chunk-6ZQ87jQV.js} +1 -1
  4. package/browser/{chunk-Cf7f_94t.js → chunk-AfeufHde.js} +1 -1
  5. package/browser/{chunk-DK1hp0WW.js → chunk-B2UoGfZ3.js} +1 -1
  6. package/browser/{chunk-D4DTIvDf.js → chunk-B6pr9Now.js} +1 -1
  7. package/browser/{chunk-BLSD82nL.js → chunk-BAyZlfDb.js} +1 -1
  8. package/browser/{chunk-CPI0Zzv3.js → chunk-BH0AuKDN.js} +1 -1
  9. package/browser/{chunk-BqxwtKFs.js → chunk-BP7WYYNR.js} +1 -1
  10. package/browser/{chunk-4XIlyOr9.js → chunk-BRAKs_V4.js} +1 -1
  11. package/browser/{chunk-CqM-2yCQ.js → chunk-BSmtz5y3.js} +1 -1
  12. package/browser/{chunk-DNVNXvsJ.js → chunk-BUi4VbRk.js} +1 -1
  13. package/browser/{chunk-CjPIJIB-.js → chunk-BWE4takb.js} +1 -1
  14. package/browser/{chunk-B4l5qLZ6.js → chunk-BZIfffSY.js} +1 -1
  15. package/browser/chunk-BaAG5SRs.js +9 -0
  16. package/browser/{chunk-BYg1TwUC.js → chunk-BkZ4nMy0.js} +1 -1
  17. package/browser/{chunk-BBRGEWfs.js → chunk-Bkl_Vpe1.js} +1 -1
  18. package/browser/{chunk-DwQ0v-xH.js → chunk-BorcVzNx.js} +1 -1
  19. package/browser/{chunk-7-d3g3_Q.js → chunk-Bsd6cfhc.js} +1 -1
  20. package/browser/{chunk-B7GIYsvs.js → chunk-Btjdv26a.js} +1 -1
  21. package/browser/{chunk-KXiD_ZK3.js → chunk-Bv19t8Yr.js} +1 -1
  22. package/browser/{chunk-C11du_uP.js → chunk-ByqToPFV.js} +1 -1
  23. package/browser/{chunk-B-t2KLMQ.js → chunk-C0cIJD6B.js} +1 -1
  24. package/browser/{chunk-D-5Imhde.js → chunk-C3uyXZ11.js} +1 -1
  25. package/browser/{chunk-sLJinEtR.js → chunk-C4kiVp0I.js} +1 -1
  26. package/browser/{chunk-DIuETvVC.js → chunk-CBsoAXBW.js} +1 -1
  27. package/browser/chunk-CCSxTkZ-.js +1 -0
  28. package/browser/{chunk-CzDFGxwY.js → chunk-CDteNbQE.js} +1 -1
  29. package/browser/{chunk-Co5BFbll.js → chunk-CIFgO2HT.js} +1 -1
  30. package/browser/{chunk-BQmHxval.js → chunk-CKdscASQ.js} +1 -1
  31. package/browser/{chunk-DuXr-yGB.js → chunk-CPuMGlfm.js} +1 -1
  32. package/browser/{chunk-DFjiy89D.js → chunk-CU9SkJlG.js} +1 -1
  33. package/browser/{chunk-DCx8SlS-.js → chunk-CWfLK-02.js} +1 -1
  34. package/browser/{chunk-DgYr3Diz.js → chunk-CXFeBkf0.js} +1 -1
  35. package/browser/{chunk-15rAOoZz.js → chunk-Cc6av_kK.js} +1 -1
  36. package/browser/{chunk-BPAPWlpQ.js → chunk-Ccwn8U1w.js} +1 -1
  37. package/browser/{chunk-CbCwwL-W.js → chunk-Ce6h2FeE.js} +1 -1
  38. package/browser/chunk-CfZ8rkw0.js +1 -0
  39. package/browser/{chunk-CIfgFQUQ.js → chunk-CgtOp5dr.js} +1 -1
  40. package/browser/{chunk-DeXXr4BL.js → chunk-CmWqV8dc.js} +1 -1
  41. package/browser/{chunk-C2Rueaad.js → chunk-ComIIQUU.js} +1 -1
  42. package/browser/{chunk-C93ZXc5y.js → chunk-Cyh4DuAi.js} +1 -1
  43. package/browser/{chunk-IXLj2Qpp.js → chunk-D26Rjl-2.js} +1 -1
  44. package/browser/{chunk-CKBQdAGJ.js → chunk-D62ekcvB.js} +1 -1
  45. package/browser/{chunk-C2agnPiQ.js → chunk-DEUnwPWC.js} +1 -1
  46. package/browser/{chunk-BqhCkR9t.js → chunk-DIKc_N9D.js} +1 -1
  47. package/browser/{chunk-C9dkqMA4.js → chunk-DIY-0Lon.js} +1 -1
  48. package/browser/{chunk-CPt7Uw3a.js → chunk-DT0j_Tak.js} +1 -1
  49. package/browser/{chunk-16yQFy5_.js → chunk-DaphJW96.js} +1 -1
  50. package/browser/{chunk-BzZbVcon.js → chunk-Dgr7xggj.js} +1 -1
  51. package/browser/{chunk-kNbhE9tu.js → chunk-DpWl8Hmh.js} +1 -1
  52. package/browser/{chunk-B52iVZ-n.js → chunk-DrcS-IIH.js} +1 -1
  53. package/browser/{chunk-I8YepFsn.js → chunk-DuGczpUf.js} +1 -1
  54. package/browser/{chunk-g2nkIubB.js → chunk-DwD-3Qe0.js} +1 -1
  55. package/browser/{chunk-Byin_63d.js → chunk-Dx97073t.js} +1 -1
  56. package/browser/{chunk-CIcEtCxk.js → chunk-DyyifT6r.js} +1 -1
  57. package/browser/chunk-GWd9G-Nj.js +1 -0
  58. package/browser/{chunk-j5aTABHx.js → chunk-L0O9mlbO.js} +1 -1
  59. package/browser/{chunk-mUd43Vo8.js → chunk-OZvSiKvx.js} +1 -1
  60. package/browser/{chunk-D4_R7aqN.js → chunk-OpIcFxMt.js} +1 -1
  61. package/browser/{chunk-BHb31ndI.js → chunk-OqElmTmR.js} +1 -1
  62. package/browser/{chunk-DpkO3_bQ.js → chunk-RFOuzDB-.js} +1 -1
  63. package/browser/{chunk-BOArVQMu.js → chunk-bEyVnMri.js} +1 -1
  64. package/browser/{chunk-CBYDDKYs.js → chunk-ehgi4mB8.js} +1 -1
  65. package/browser/{chunk-BYJTaU4n.js → chunk-iT-BBh_o.js} +1 -1
  66. package/browser/{chunk-DCjMvdvV.js → chunk-iiREShnX.js} +1 -1
  67. package/browser/{chunk-DDertr1B.js → chunk-pyvVjc-9.js} +1 -1
  68. package/browser/{chunk-CKEgNNXU.js → chunk-rWPj3GdK.js} +1 -1
  69. package/browser/{chunk-XBakzM_b.js → chunk-sI2K91LE.js} +1 -1
  70. package/browser/index.html +1 -1
  71. package/browser/{main-JTU33H5D.js → main-4LGWVPVH.js} +3 -3
  72. package/package.json +1 -1
  73. package/browser/chunk-C1RU8zia.js +0 -9
  74. package/browser/chunk-TkSR4UzV.js +0 -1
  75. package/browser/chunk-buoxjd5i.js +0 -1
  76. package/browser/chunk-nSYjfmpf.js +0 -1
@@ -1,4 +1,4 @@
1
- import {s as se}from'./chunk-4XIlyOr9.js';import {a as Dr,z as zi,F as Fn,H as Hi,h as ht,b as gr,_ as _r}from'./chunk-DeXXr4BL.js';import {g,E as vy,P,Y as x,aL as wo,aM as Zn,bD as ge,bE as vt,aO as wt,bs as bl,az as Xt,aW as C,aS as K,bF as J,al as vt$1,aT as Ut,bG as p,bH as Pt,j as jw,a_ as rb,bA as bC,bI as Sg,b5 as lT,H as Hg,bJ as dr,M as MC,B as NC,bv as Vg,bK as fe,bL as pe,bM as mr,aP as G,bt as Qn,bN as F,aR as Ps,an as ue,O as Ot,bO as mt,bP as ev,ae as kt$1,X as br,r as re,bQ as Jy,bR as Sd,bS as Da,aF as R$1,bu as Ve$1,bT as pn,bU as jd,bV as nv,aA as an,bW as Y,bX as Pt$1,bY as po,bZ as X,b_ as xt,aZ as Bs,aC as bu,n as Lg,N as Ng,aw as gl,bB as SC,ax as ml,ac as CC,b$ as UC,y as qg,c0 as Fg,c1 as E,c2 as PE,c3 as kt$2,bC as _i}from'./main-JTU33H5D.js';import {D}from'./chunk-DuXr-yGB.js';var xe=class a{http=g(vy);projectState=g(P);getBaseUrl(){return `/api/projects/${this.projectState.getSelectedProjectIdOrThrow()}/schedulers`}listSchedulers(){return this.http.get(this.getBaseUrl())}getScheduler(o){return this.http.get(`${this.getBaseUrl()}/${o}`)}createScheduler(o){return this.http.post(this.getBaseUrl(),o)}listSchedulersForProject(o){return this.http.get(`/api/projects/${o}/schedulers`)}enableSchedulerForProject(o,e){return this.http.post(`/api/projects/${o}/schedulers/${e}/enable`,{})}disableSchedulerForProject(o,e){return this.http.post(`/api/projects/${o}/schedulers/${e}/disable`,{})}runSchedulerNowForProject(o,e){return this.http.post(`/api/projects/${o}/schedulers/${e}/run-now`,{})}deleteSchedulerForProject(o,e){return this.http.delete(`/api/projects/${o}/schedulers/${e}`)}updateSchedulerForProject(o,e,t){return this.http.put(`/api/projects/${o}/schedulers/${e}`,t)}createSchedulerForProject(o,e){return this.http.post(`/api/projects/${o}/schedulers`,e)}updateScheduler(o,e){return this.http.put(`${this.getBaseUrl()}/${o}`,e)}deleteScheduler(o){return this.http.delete(`${this.getBaseUrl()}/${o}`)}enableScheduler(o){return this.http.post(`${this.getBaseUrl()}/${o}/enable`,{})}disableScheduler(o){return this.http.post(`${this.getBaseUrl()}/${o}/disable`,{})}runSchedulerNow(o){return this.http.post(`${this.getBaseUrl()}/${o}/run-now`,{})}static \u0275fac=function(e){return new(e||a)};static \u0275prov=x({token:a,factory:a.\u0275fac,providedIn:"root"})};var Ke=["panel"],Ue=["*"];function qe(a,o){if(a&1&&(gl(0,"div",1,0),SC(2),ml()),a&2){let e=o.id,t=CC();UC(t._classList),qg("mat-mdc-autocomplete-visible",t.showPanel)("mat-mdc-autocomplete-hidden",!t.showPanel)("mat-autocomplete-panel-animations-enabled",!t._animationsDisabled)("mat-primary",t._color==="primary")("mat-accent",t._color==="accent")("mat-warn",t._color==="warn"),Fg("id",t.id),Ng("aria-label",t.ariaLabel||null)("aria-labelledby",t._getPanelAriaLabelledby(e));}}var R=class{source;option;constructor(o,e){this.source=o,this.option=e;}},Ve=new C("mat-autocomplete-default-options",{providedIn:"root",factory:()=>({autoActiveFirstOption:false,autoSelectActiveOption:false,hideSingleSelectionIndicator:false,requireSelection:false,hasBackdrop:false})}),Ct=(()=>{class a{_changeDetectorRef=g(bl);_elementRef=g(Xt);_defaults=g(Ve);_animationsDisabled=K();_activeOptionChanges=J.EMPTY;_keyManager;showPanel=false;get isOpen(){return this._isOpen&&this.showPanel}_isOpen=false;_latestOpeningTrigger;_setColor(e){this._color=e,this._changeDetectorRef.markForCheck();}_color;template;panel;options;optionGroups;ariaLabel;ariaLabelledby;displayWith=null;autoActiveFirstOption;autoSelectActiveOption;requireSelection;panelWidth;disableRipple=false;optionSelected=new vt$1;opened=new vt$1;closed=new vt$1;optionActivated=new vt$1;set classList(e){this._classList=e,this._elementRef.nativeElement.className="";}_classList;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._syncParentProperties();}_hideSingleSelectionIndicator;_syncParentProperties(){if(this.options)for(let e of this.options)e._changeDetectorRef.markForCheck();}id=g(Ut).getId("mat-autocomplete-");inertGroups;constructor(){let e=g(p);this.inertGroups=e?.SAFARI||false,this.autoActiveFirstOption=!!this._defaults.autoActiveFirstOption,this.autoSelectActiveOption=!!this._defaults.autoSelectActiveOption,this.requireSelection=!!this._defaults.requireSelection,this._hideSingleSelectionIndicator=this._defaults.hideSingleSelectionIndicator??false;}ngAfterContentInit(){this._keyManager=new Pt(this.options).withWrap().skipPredicate(this._skipPredicate),this._activeOptionChanges=this._keyManager.change.subscribe(e=>{this.isOpen&&this.optionActivated.emit({source:this,option:this.options.toArray()[e]||null});}),this._setVisibility();}ngOnDestroy(){this._keyManager?.destroy(),this._activeOptionChanges.unsubscribe();}_setScrollTop(e){this.panel&&(this.panel.nativeElement.scrollTop=e);}_getScrollTop(){return this.panel?this.panel.nativeElement.scrollTop:0}_setVisibility(){this.showPanel=!!this.options?.length,this._changeDetectorRef.markForCheck();}_emitSelectEvent(e){let t=new R(this,e);this.optionSelected.emit(t);}_getPanelAriaLabelledby(e){if(this.ariaLabel)return null;let t=e?e+" ":"";return this.ariaLabelledby?t+this.ariaLabelledby:e}_skipPredicate(){return false}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=jw({type:a,selectors:[["mat-autocomplete"]],contentQueries:function(t,i,n){if(t&1&&Vg(n,Fn,5)(n,Hi,5),t&2){let s;MC(s=NC())&&(i.options=s),MC(s=NC())&&(i.optionGroups=s);}},viewQuery:function(t,i){if(t&1&&Hg(dr,7)(Ke,5),t&2){let n;MC(n=NC())&&(i.template=n.first),MC(n=NC())&&(i.panel=n.first);}},hostAttrs:[1,"mat-mdc-autocomplete"],inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],displayWith:"displayWith",autoActiveFirstOption:[2,"autoActiveFirstOption","autoActiveFirstOption",rb],autoSelectActiveOption:[2,"autoSelectActiveOption","autoSelectActiveOption",rb],requireSelection:[2,"requireSelection","requireSelection",rb],panelWidth:"panelWidth",disableRipple:[2,"disableRipple","disableRipple",rb],classList:[0,"class","classList"],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",rb]},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},exportAs:["matAutocomplete"],features:[lT([{provide:zi,useExisting:a}])],ngContentSelectors:Ue,decls:1,vars:0,consts:[["panel",""],["role","listbox",1,"mat-mdc-autocomplete-panel","mdc-menu-surface","mdc-menu-surface--open",3,"id"]],template:function(t,i){t&1&&(bC(),Sg(0,qe,3,17,"ng-template"));},styles:[`div.mat-mdc-autocomplete-panel {
1
+ import {s as se}from'./chunk-BRAKs_V4.js';import {a as Dr,z as zi,F as Fn,H as Hi,h as ht,b as gr,_ as _r}from'./chunk-CmWqV8dc.js';import {g,E as vy,P,Y as x,aL as wo,aM as Zn,bD as ge,bE as vt,aO as wt,bs as bl,az as Xt,aW as C,aS as K,bF as J,al as vt$1,aT as Ut,bG as p,bH as Pt,j as jw,a_ as rb,bA as bC,bI as Sg,b5 as lT,H as Hg,bJ as dr,M as MC,B as NC,bv as Vg,bK as fe,bL as pe,bM as mr,aP as G,bt as Qn,bN as F,aR as Ps,an as ue,O as Ot,bO as mt,bP as ev,ae as kt$1,X as br,r as re,bQ as Jy,bR as Sd,bS as Da,aF as R$1,bu as Ve$1,bT as pn,bU as jd,bV as nv,aA as an,bW as Y,bX as Pt$1,bY as po,bZ as X,b_ as xt,aZ as Bs,aC as bu,n as Lg,N as Ng,aw as gl,bB as SC,ax as ml,ac as CC,b$ as UC,y as qg,c0 as Fg,c1 as E,c2 as PE,c3 as kt$2,bC as _i}from'./main-4LGWVPVH.js';import {D}from'./chunk-CPuMGlfm.js';var xe=class a{http=g(vy);projectState=g(P);getBaseUrl(){return `/api/projects/${this.projectState.getSelectedProjectIdOrThrow()}/schedulers`}listSchedulers(){return this.http.get(this.getBaseUrl())}getScheduler(o){return this.http.get(`${this.getBaseUrl()}/${o}`)}createScheduler(o){return this.http.post(this.getBaseUrl(),o)}listSchedulersForProject(o){return this.http.get(`/api/projects/${o}/schedulers`)}enableSchedulerForProject(o,e){return this.http.post(`/api/projects/${o}/schedulers/${e}/enable`,{})}disableSchedulerForProject(o,e){return this.http.post(`/api/projects/${o}/schedulers/${e}/disable`,{})}runSchedulerNowForProject(o,e){return this.http.post(`/api/projects/${o}/schedulers/${e}/run-now`,{})}deleteSchedulerForProject(o,e){return this.http.delete(`/api/projects/${o}/schedulers/${e}`)}updateSchedulerForProject(o,e,t){return this.http.put(`/api/projects/${o}/schedulers/${e}`,t)}createSchedulerForProject(o,e){return this.http.post(`/api/projects/${o}/schedulers`,e)}updateScheduler(o,e){return this.http.put(`${this.getBaseUrl()}/${o}`,e)}deleteScheduler(o){return this.http.delete(`${this.getBaseUrl()}/${o}`)}enableScheduler(o){return this.http.post(`${this.getBaseUrl()}/${o}/enable`,{})}disableScheduler(o){return this.http.post(`${this.getBaseUrl()}/${o}/disable`,{})}runSchedulerNow(o){return this.http.post(`${this.getBaseUrl()}/${o}/run-now`,{})}static \u0275fac=function(e){return new(e||a)};static \u0275prov=x({token:a,factory:a.\u0275fac,providedIn:"root"})};var Ke=["panel"],Ue=["*"];function qe(a,o){if(a&1&&(gl(0,"div",1,0),SC(2),ml()),a&2){let e=o.id,t=CC();UC(t._classList),qg("mat-mdc-autocomplete-visible",t.showPanel)("mat-mdc-autocomplete-hidden",!t.showPanel)("mat-autocomplete-panel-animations-enabled",!t._animationsDisabled)("mat-primary",t._color==="primary")("mat-accent",t._color==="accent")("mat-warn",t._color==="warn"),Fg("id",t.id),Ng("aria-label",t.ariaLabel||null)("aria-labelledby",t._getPanelAriaLabelledby(e));}}var R=class{source;option;constructor(o,e){this.source=o,this.option=e;}},Ve=new C("mat-autocomplete-default-options",{providedIn:"root",factory:()=>({autoActiveFirstOption:false,autoSelectActiveOption:false,hideSingleSelectionIndicator:false,requireSelection:false,hasBackdrop:false})}),Ct=(()=>{class a{_changeDetectorRef=g(bl);_elementRef=g(Xt);_defaults=g(Ve);_animationsDisabled=K();_activeOptionChanges=J.EMPTY;_keyManager;showPanel=false;get isOpen(){return this._isOpen&&this.showPanel}_isOpen=false;_latestOpeningTrigger;_setColor(e){this._color=e,this._changeDetectorRef.markForCheck();}_color;template;panel;options;optionGroups;ariaLabel;ariaLabelledby;displayWith=null;autoActiveFirstOption;autoSelectActiveOption;requireSelection;panelWidth;disableRipple=false;optionSelected=new vt$1;opened=new vt$1;closed=new vt$1;optionActivated=new vt$1;set classList(e){this._classList=e,this._elementRef.nativeElement.className="";}_classList;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._syncParentProperties();}_hideSingleSelectionIndicator;_syncParentProperties(){if(this.options)for(let e of this.options)e._changeDetectorRef.markForCheck();}id=g(Ut).getId("mat-autocomplete-");inertGroups;constructor(){let e=g(p);this.inertGroups=e?.SAFARI||false,this.autoActiveFirstOption=!!this._defaults.autoActiveFirstOption,this.autoSelectActiveOption=!!this._defaults.autoSelectActiveOption,this.requireSelection=!!this._defaults.requireSelection,this._hideSingleSelectionIndicator=this._defaults.hideSingleSelectionIndicator??false;}ngAfterContentInit(){this._keyManager=new Pt(this.options).withWrap().skipPredicate(this._skipPredicate),this._activeOptionChanges=this._keyManager.change.subscribe(e=>{this.isOpen&&this.optionActivated.emit({source:this,option:this.options.toArray()[e]||null});}),this._setVisibility();}ngOnDestroy(){this._keyManager?.destroy(),this._activeOptionChanges.unsubscribe();}_setScrollTop(e){this.panel&&(this.panel.nativeElement.scrollTop=e);}_getScrollTop(){return this.panel?this.panel.nativeElement.scrollTop:0}_setVisibility(){this.showPanel=!!this.options?.length,this._changeDetectorRef.markForCheck();}_emitSelectEvent(e){let t=new R(this,e);this.optionSelected.emit(t);}_getPanelAriaLabelledby(e){if(this.ariaLabel)return null;let t=e?e+" ":"";return this.ariaLabelledby?t+this.ariaLabelledby:e}_skipPredicate(){return false}static \u0275fac=function(t){return new(t||a)};static \u0275cmp=jw({type:a,selectors:[["mat-autocomplete"]],contentQueries:function(t,i,n){if(t&1&&Vg(n,Fn,5)(n,Hi,5),t&2){let s;MC(s=NC())&&(i.options=s),MC(s=NC())&&(i.optionGroups=s);}},viewQuery:function(t,i){if(t&1&&Hg(dr,7)(Ke,5),t&2){let n;MC(n=NC())&&(i.template=n.first),MC(n=NC())&&(i.panel=n.first);}},hostAttrs:[1,"mat-mdc-autocomplete"],inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],displayWith:"displayWith",autoActiveFirstOption:[2,"autoActiveFirstOption","autoActiveFirstOption",rb],autoSelectActiveOption:[2,"autoSelectActiveOption","autoSelectActiveOption",rb],requireSelection:[2,"requireSelection","requireSelection",rb],panelWidth:"panelWidth",disableRipple:[2,"disableRipple","disableRipple",rb],classList:[0,"class","classList"],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",rb]},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},exportAs:["matAutocomplete"],features:[lT([{provide:zi,useExisting:a}])],ngContentSelectors:Ue,decls:1,vars:0,consts:[["panel",""],["role","listbox",1,"mat-mdc-autocomplete-panel","mdc-menu-surface","mdc-menu-surface--open",3,"id"]],template:function(t,i){t&1&&(bC(),Sg(0,qe,3,17,"ng-template"));},styles:[`div.mat-mdc-autocomplete-panel {
2
2
  width: 100%;
3
3
  max-height: 256px;
4
4
  visibility: hidden;
@@ -1 +1 @@
1
- import {l}from'./chunk-C1RU8zia.js';import {g,C as Ce,ao as V,G,d5 as k,W as Wi,b as U,j as jw,k as Cs,n as Lg,c9 as Bf,A as Ag,m as hl,J as JC,ck as Vf,o as aC,a3 as ZI,u as sI,v as cC,x as xg,a6 as QI,d6 as he,bU as jd,Y as x,ac as CC,a5 as Dl,a9 as vC,a8 as em,y as qg,d7 as Pn,aa as Sf,ab as _f,q as dC,w as fC}from'./main-JTU33H5D.js';import {o as z,k as _t,b as _e$1,n as ni,J as Jn,Q as Qn,e as ei,Y as Ye,A as At,Z as Zn,l as Xn,E as En,p as An}from'./chunk-DuXr-yGB.js';import'./chunk-BK_05kmN.js';import'./chunk-DeXXr4BL.js';import'./chunk-DK1hp0WW.js';var M=class e{api=g(he);isLoading=Wi(false);result=Wi(null);errorMessage=Wi(null);invoke(t,o,a,s){return this.isLoading.set(true),this.result.set(null),this.errorMessage.set(null),this.api.invoke({namespaceId:t,userId:o||void 0,toolName:a,payload:s||void 0}).pipe(jd({next:f=>{this.result.set(f),this.isLoading.set(false);},error:f=>{this.errorMessage.set(ne(f)),this.isLoading.set(false);}}))}reset(){this.result.set(null),this.errorMessage.set(null);}static \u0275fac=function(o){return new(o||e)};static \u0275prov=x({token:e,factory:e.\u0275fac,providedIn:"root"})};function ne(e){if(e instanceof Pn){let t=e.error;return t&&typeof t=="object"&&"message"in t&&typeof t.message=="string"?t.message:typeof t=="string"&&t.trim().length>0?t:e.statusText||`HTTP ${e.status}`}return e instanceof Error?e.message:"Unknown error"}var ie=(e,t)=>t.id;function re(e,t){e&1&&JC(0," Execute any registered tool directly \u2014 bypasses the normal agent-run pipeline. Restricted to super-admins. ");}function ae(e,t){e&1&&JC(0," Execute a registered tool directly in this namespace \u2014 bypasses the normal agent-run pipeline. ");}function le(e,t){e&1&&(Cs(0,"p",17),JC(1,"Loading namespaces\u2026"),hl());}function se(e,t){if(e&1&&(Cs(0,"option",27),JC(1),hl()),e&2){let o=t.$implicit;xg("value",o.id),sI(),em(o.name);}}function de(e,t){if(e&1&&(Cs(0,"select",25)(1,"option",26),JC(2,"Select a namespace"),hl(),dC(3,se,2,2,"option",27,ie),hl(),ZI()),e&2){let o=CC(2);QI(),sI(3),fC(o.namespaces());}}function ce(e,t){if(e&1&&aC(0,le,2,0,"p",17)(1,de,5,0,"select",25),e&2){let o=CC();cC(o.namespacesLoading()?0:1);}}function me(e,t){if(e&1&&(Cs(0,"p",11),JC(1),hl()),e&2){let o=CC();sI(),Dl(" ",o.namespaceName()??o.namespaceId," ");}}function pe(e,t){e&1&&JC(0," Running\u2026 ");}function _e(e,t){e&1&&JC(0," Run tool ");}function ue(e,t){if(e&1){let o=vC();Cs(0,"button",28),Lg("click",function(){Sf(o);let s=CC();return _f(s.reset())}),JC(1,"Clear result"),hl();}}function fe(e,t){e&1&&(Cs(0,"section",23)(1,"h2",29),JC(2,"Error"),hl(),Cs(3,"pre",30),JC(4),hl()()),e&2&&(sI(4),em(t));}function ve(e,t){e&1&&(Cs(0,"h3",34),JC(1,"Metadata"),hl(),Cs(2,"pre",30),JC(3),hl()),e&2&&(sI(3),em(t));}function ge(e,t){if(e&1&&(Cs(0,"dt",36),JC(1,"Type"),hl(),Cs(2,"dd",37),JC(3),hl()),e&2){let o=CC(2);sI(3),em(o.errorType);}}function ke(e,t){if(e&1&&(Cs(0,"dt",36),JC(1,"Message"),hl(),Cs(2,"dd",38),JC(3),hl()),e&2){let o=CC(2);sI(3),em(o.errorMessage);}}function be(e,t){if(e&1&&(Cs(0,"h3",34),JC(1,"Tool error details"),hl(),Cs(2,"dl",35),aC(3,ge,4,1),aC(4,ke,4,1),hl()),e&2){let o=CC();sI(3),cC(o.errorType?3:-1),sI(),cC(o.errorMessage?4:-1);}}function xe(e,t){if(e&1&&(Cs(0,"section",31)(1,"header",32)(2,"h2",29),JC(3),hl(),Cs(4,"span",33),JC(5),hl()(),Cs(6,"h3",34),JC(7,"Output"),hl(),Cs(8,"pre",30),JC(9),hl(),aC(10,ve,4,1),Cs(11,"h3",34),JC(12,"Structured output"),hl(),Cs(13,"pre",30),JC(14),hl(),aC(15,be,5,2),hl()),e&2){let o,a=t,s=CC();qg("tool-invoke__result--failure",!a.success),sI(3),Dl("Result \u2014 ",a.toolName),sI(),qg("tool-invoke__badge--success",a.success)("tool-invoke__badge--failure",!a.success),sI(),Dl(" ",a.success?"Success":"Tool error"," "),sI(4),em(a.output),sI(),cC((o=s.formatMetadata(a.metadata))?10:-1,o),sI(4),em(s.formatStructuredOutput(a.structuredOutput)??"null"),sI(),cC(a.errorType||a.errorMessage?15:-1);}}var te=class e{destroyRef=g(Ce);route=g(V);router=g(G);namespaceController=g(k);userState=g(l);state=g(M);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=!this.namespaceId;namespaces=Wi([]);namespacesLoading=Wi(true);namespaceName=Wi(null);form=new z({namespaceId:new _t("",{nonNullable:true,validators:[_e$1.required]}),userId:new _t("",{nonNullable:true}),toolName:new _t("",{nonNullable:true,validators:[_e$1.required]}),payload:new _t("",{nonNullable:true})});ngOnInit(){let t=this.userState.currentUser()?.id;t?this.form.controls.userId.patchValue(t):this.userState.loadMe().pipe(U(this.destroyRef)).subscribe({next:o=>{o.id&&this.form.controls.userId.patchValue(o.id);}}),this.isPlatformMode?this.namespaceController.listAllNamespace().pipe(U(this.destroyRef)).subscribe({next:o=>{this.namespaces.set(o.map(a=>({id:a.id,name:a.name}))),this.namespacesLoading.set(false);},error:()=>this.namespacesLoading.set(false)}):(this.form.controls.namespaceId.patchValue(this.namespaceId),this.namespacesLoading.set(false),this.namespaceController.getByIdNamespace(this.namespaceId).pipe(U(this.destroyRef)).subscribe({next:o=>this.namespaceName.set(o.name),error:()=>this.namespaceName.set(this.namespaceId)}));}submit(){if(this.form.invalid||this.state.isLoading())return;let{namespaceId:t,userId:o,toolName:a,payload:s}=this.form.getRawValue();this.state.invoke(t,o.trim()||void 0,a.trim(),s.trim()||void 0).pipe(U(this.destroyRef)).subscribe();}reset(){this.state.reset();}formatMetadata(t){return !t||Object.keys(t).length===0?null:JSON.stringify(t,null,2)}formatStructuredOutput(t){return t===void 0?null:JSON.stringify(t,null,2)}back(){this.isPlatformMode?this.router.navigate(["/agentos","admin"]):this.router.navigate(["/agentos",this.namespaceId,"agent-configs"]);}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=jw({type:e,selectors:[["agentos-tool-invoke"]],decls:46,vars:8,consts:[[1,"tool-invoke"],[1,"tool-invoke__header"],["type","button",1,"tool-invoke__back",3,"click"],["width","16","height","16","viewBox","0 0 24 24","fill","none","aria-hidden","true"],["d","M15 18l-6-6 6-6","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],[1,"tool-invoke__title"],[1,"tool-invoke__subtitle"],[1,"tool-invoke__form",3,"ngSubmit","formGroup"],[1,"tool-invoke__field"],["for","ti-namespace",1,"tool-invoke__label"],[1,"tool-invoke__required"],["id","ti-namespace",1,"tool-invoke__namespace-static"],["for","ti-user",1,"tool-invoke__label"],[1,"tool-invoke__optional"],["id","ti-user","type","text","formControlName","userId","placeholder","UUID of the user \u2014 adds user-scoped overlay layers","autocomplete","off",1,"tool-invoke__input"],["for","ti-tool",1,"tool-invoke__label"],["id","ti-tool","type","text","formControlName","toolName","placeholder","e.g. MY_FILES__listFiles","autocomplete","off","spellcheck","false",1,"tool-invoke__input","tool-invoke__input--mono"],[1,"tool-invoke__hint"],["for","ti-payload",1,"tool-invoke__label"],["id","ti-payload","formControlName","payload","rows","6","placeholder",'JSON arguments for the tool, e.g. {"path": "/some/dir"}\\nLeave empty for tools with no input.',"spellcheck","false",1,"tool-invoke__textarea","tool-invoke__input--mono"],[1,"tool-invoke__actions"],["type","submit",1,"tool-invoke__submit",3,"disabled"],["type","button",1,"tool-invoke__reset"],[1,"tool-invoke__result","tool-invoke__result--error"],[1,"tool-invoke__result",3,"tool-invoke__result--failure"],["id","ti-namespace","formControlName","namespaceId",1,"tool-invoke__select"],["value","","disabled",""],[3,"value"],["type","button",1,"tool-invoke__reset",3,"click"],[1,"tool-invoke__result-title"],[1,"tool-invoke__output"],[1,"tool-invoke__result"],[1,"tool-invoke__result-header"],[1,"tool-invoke__badge"],[1,"tool-invoke__section-label"],[1,"tool-invoke__dl"],[1,"tool-invoke__dt"],[1,"tool-invoke__dd","tool-invoke__dd--mono"],[1,"tool-invoke__dd"]],template:function(o,a){if(o&1&&(Cs(0,"div",0)(1,"header",1)(2,"button",2),Lg("click",function(){return a.back()}),Bf(),Cs(3,"svg",3),Ag(4,"path",4),hl(),JC(5," Back "),hl(),Vf(),Cs(6,"h1",5),JC(7,"Tool invoke"),hl(),Cs(8,"p",6),aC(9,re,1,0)(10,ae,1,0),hl()(),Cs(11,"form",7),Lg("ngSubmit",function(){return a.submit()}),Cs(12,"div",8)(13,"label",9),JC(14,"Namespace "),Cs(15,"span",10),JC(16,"*"),hl()(),aC(17,ce,2,1)(18,me,2,1,"p",11),hl(),Cs(19,"div",8)(20,"label",12),JC(21,"User ID "),Cs(22,"span",13),JC(23,"(optional)"),hl()(),Ag(24,"input",14),ZI(),hl(),Cs(25,"div",8)(26,"label",15),JC(27,"Tool name "),Cs(28,"span",10),JC(29,"*"),hl()(),Ag(30,"input",16),ZI(),Cs(31,"p",17),JC(32," Exact tool name as returned by the agent definition inspect page. When not found, the error response lists all available tools for the selected namespace. "),hl()(),Cs(33,"div",8)(34,"label",18),JC(35,"Payload "),Cs(36,"span",13),JC(37,"(optional)"),hl()(),Ag(38,"textarea",19),ZI(),hl(),Cs(39,"div",20)(40,"button",21),aC(41,pe,1,0)(42,_e,1,0),hl(),aC(43,ue,2,0,"button",22),hl()(),aC(44,fe,5,1,"section",23),aC(45,xe,16,12,"section",24),hl()),o&2){let s,f;sI(9),cC(a.isPlatformMode?9:10),sI(2),xg("formGroup",a.form),sI(6),cC(a.isPlatformMode?17:18),sI(7),QI(),sI(6),QI(),sI(8),QI(),sI(2),xg("disabled",a.form.invalid||a.state.isLoading()),sI(),cC(a.state.isLoading()?41:42),sI(2),cC(a.state.result()||a.state.errorMessage()?43:-1),sI(),cC((s=a.state.errorMessage())?44:-1,s),sI(),cC((f=a.state.result())?45:-1,f);}},dependencies:[ni,Jn,Qn,ei,Ye,At,Zn,Xn,En,An],styles:[".tool-invoke[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:720px;margin:0 auto;padding:2rem 1rem}.tool-invoke__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.tool-invoke__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.3rem;padding:0;border:none;background:transparent;color:var(--color-text-secondary, #6e6e73);font-size:.875rem;font-family:inherit;cursor:pointer;align-self:flex-start}.tool-invoke__back[_ngcontent-%COMP%]:hover{color:var(--color-text, #1d1d1f)}.tool-invoke__namespace-static[_ngcontent-%COMP%]{margin:0;padding:.5rem .75rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .12));background:var(--color-surface-muted, rgba(0, 0, 0, .04));color:var(--color-text, #1d1d1f);font-size:.9375rem}.tool-invoke__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.tool-invoke__subtitle[_ngcontent-%COMP%]{margin:0;font-size:.875rem;color:var(--color-text-secondary, #6e6e73);line-height:1.5}.tool-invoke__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem;padding:1.5rem;border:1px solid var(--color-border, rgba(0, 0, 0, .1));border-radius:12px}.tool-invoke__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.4rem}.tool-invoke__label[_ngcontent-%COMP%]{font-size:.8125rem;font-weight:500;color:var(--color-text-secondary, #6e6e73)}.tool-invoke__required[_ngcontent-%COMP%]{color:var(--color-error, #ff3b30);margin-left:.1em}.tool-invoke__optional[_ngcontent-%COMP%]{font-weight:400;color:var(--color-text-secondary, #6e6e73);font-size:.75rem}.tool-invoke__hint[_ngcontent-%COMP%]{margin:0;font-size:.75rem;color:var(--color-text-secondary, #6e6e73);line-height:1.4}.tool-invoke__input[_ngcontent-%COMP%], .tool-invoke__select[_ngcontent-%COMP%], .tool-invoke__textarea[_ngcontent-%COMP%]{padding:.5rem .75rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .12));background:var(--color-surface, #fff);color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;transition:border-color .15s ease}.tool-invoke__input[_ngcontent-%COMP%]:focus, .tool-invoke__select[_ngcontent-%COMP%]:focus, .tool-invoke__textarea[_ngcontent-%COMP%]:focus{outline:none;border-color:var(--color-primary, #007aff)}.tool-invoke__input--mono[_ngcontent-%COMP%], .tool-invoke__select--mono[_ngcontent-%COMP%], .tool-invoke__textarea--mono[_ngcontent-%COMP%]{font-family:monospace;font-size:.875rem}.tool-invoke__textarea[_ngcontent-%COMP%]{resize:vertical;min-height:120px}.tool-invoke__select[_ngcontent-%COMP%]{cursor:pointer}.tool-invoke__actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap;padding-top:.25rem}.tool-invoke__submit[_ngcontent-%COMP%]{padding:.55rem 1.25rem;border-radius:8px;border:none;background:var(--color-primary, #007aff);color:#fff;font-size:.9375rem;font-weight:500;font-family:inherit;cursor:pointer;transition:opacity .15s ease}.tool-invoke__submit[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.tool-invoke__submit[_ngcontent-%COMP%]:not(:disabled):hover{opacity:.88}.tool-invoke__reset[_ngcontent-%COMP%]{padding:.55rem 1rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .12));background:transparent;color:var(--color-text-secondary, #6e6e73);font-size:.875rem;font-family:inherit;cursor:pointer}.tool-invoke__reset[_ngcontent-%COMP%]:hover{background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.tool-invoke__result[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem;padding:1.25rem;border:1px solid var(--color-border, rgba(0, 0, 0, .1));border-radius:12px}.tool-invoke__result--error[_ngcontent-%COMP%]{border-color:var(--color-error, #ff3b30);background:var(--color-error-bg, #fff5f5)}.tool-invoke__result--failure[_ngcontent-%COMP%]{border-color:var(--color-warning, #ff9500);background:var(--color-warning-bg, #fffaf0)}.tool-invoke__result-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap}.tool-invoke__result-title[_ngcontent-%COMP%]{margin:0;font-size:.9375rem;font-weight:600;color:var(--color-text, #1d1d1f)}.tool-invoke__badge[_ngcontent-%COMP%]{display:inline-block;padding:.2em .6em;border-radius:4px;font-size:.75rem;font-weight:500}.tool-invoke__badge--success[_ngcontent-%COMP%]{background:var(--color-success-bg, #e3f5e1);color:var(--color-success, #34c759)}.tool-invoke__badge--failure[_ngcontent-%COMP%]{background:var(--color-warning-bg, #fff3cd);color:var(--color-warning, #ff9500)}.tool-invoke__section-label[_ngcontent-%COMP%]{margin:.5rem 0 0;font-size:.8125rem;font-weight:500;color:var(--color-text-secondary, #6e6e73);text-transform:uppercase;letter-spacing:.04em}.tool-invoke__output[_ngcontent-%COMP%]{margin:0;padding:.875rem 1rem;border-radius:6px;background:var(--color-surface-muted, rgba(0, 0, 0, .04));font-size:.875rem;font-family:monospace;color:var(--color-text, #1d1d1f);white-space:pre-wrap;word-break:break-word;line-height:1.6;max-height:500px;overflow-y:auto}.tool-invoke__dl[_ngcontent-%COMP%]{display:grid;grid-template-columns:max-content 1fr;gap:.4rem 1rem;margin:0}.tool-invoke__dt[_ngcontent-%COMP%]{font-size:.8125rem;font-weight:500;color:var(--color-text-secondary, #6e6e73);align-self:start}.tool-invoke__dd[_ngcontent-%COMP%]{margin:0;font-size:.875rem;color:var(--color-text, #1d1d1f);word-break:break-word}.tool-invoke__dd--mono[_ngcontent-%COMP%]{font-family:monospace}"]})};export{te as ToolInvokeComponent};
1
+ import {l}from'./chunk-BaAG5SRs.js';import {g,C as Ce,ao as V,G,d5 as k,W as Wi,b as U,j as jw,k as Cs,n as Lg,c9 as Bf,A as Ag,m as hl,J as JC,ck as Vf,o as aC,a3 as ZI,u as sI,v as cC,x as xg,a6 as QI,d6 as he,bU as jd,Y as x,ac as CC,a5 as Dl,a9 as vC,a8 as em,y as qg,d7 as Pn,aa as Sf,ab as _f,q as dC,w as fC}from'./main-4LGWVPVH.js';import {o as z,k as _t,b as _e$1,n as ni,J as Jn,Q as Qn,e as ei,Y as Ye,A as At,Z as Zn,l as Xn,E as En,p as An}from'./chunk-CPuMGlfm.js';import'./chunk-6ZQ87jQV.js';import'./chunk-CmWqV8dc.js';import'./chunk-B2UoGfZ3.js';var M=class e{api=g(he);isLoading=Wi(false);result=Wi(null);errorMessage=Wi(null);invoke(t,o,a,s){return this.isLoading.set(true),this.result.set(null),this.errorMessage.set(null),this.api.invoke({namespaceId:t,userId:o||void 0,toolName:a,payload:s||void 0}).pipe(jd({next:f=>{this.result.set(f),this.isLoading.set(false);},error:f=>{this.errorMessage.set(ne(f)),this.isLoading.set(false);}}))}reset(){this.result.set(null),this.errorMessage.set(null);}static \u0275fac=function(o){return new(o||e)};static \u0275prov=x({token:e,factory:e.\u0275fac,providedIn:"root"})};function ne(e){if(e instanceof Pn){let t=e.error;return t&&typeof t=="object"&&"message"in t&&typeof t.message=="string"?t.message:typeof t=="string"&&t.trim().length>0?t:e.statusText||`HTTP ${e.status}`}return e instanceof Error?e.message:"Unknown error"}var ie=(e,t)=>t.id;function re(e,t){e&1&&JC(0," Execute any registered tool directly \u2014 bypasses the normal agent-run pipeline. Restricted to super-admins. ");}function ae(e,t){e&1&&JC(0," Execute a registered tool directly in this namespace \u2014 bypasses the normal agent-run pipeline. ");}function le(e,t){e&1&&(Cs(0,"p",17),JC(1,"Loading namespaces\u2026"),hl());}function se(e,t){if(e&1&&(Cs(0,"option",27),JC(1),hl()),e&2){let o=t.$implicit;xg("value",o.id),sI(),em(o.name);}}function de(e,t){if(e&1&&(Cs(0,"select",25)(1,"option",26),JC(2,"Select a namespace"),hl(),dC(3,se,2,2,"option",27,ie),hl(),ZI()),e&2){let o=CC(2);QI(),sI(3),fC(o.namespaces());}}function ce(e,t){if(e&1&&aC(0,le,2,0,"p",17)(1,de,5,0,"select",25),e&2){let o=CC();cC(o.namespacesLoading()?0:1);}}function me(e,t){if(e&1&&(Cs(0,"p",11),JC(1),hl()),e&2){let o=CC();sI(),Dl(" ",o.namespaceName()??o.namespaceId," ");}}function pe(e,t){e&1&&JC(0," Running\u2026 ");}function _e(e,t){e&1&&JC(0," Run tool ");}function ue(e,t){if(e&1){let o=vC();Cs(0,"button",28),Lg("click",function(){Sf(o);let s=CC();return _f(s.reset())}),JC(1,"Clear result"),hl();}}function fe(e,t){e&1&&(Cs(0,"section",23)(1,"h2",29),JC(2,"Error"),hl(),Cs(3,"pre",30),JC(4),hl()()),e&2&&(sI(4),em(t));}function ve(e,t){e&1&&(Cs(0,"h3",34),JC(1,"Metadata"),hl(),Cs(2,"pre",30),JC(3),hl()),e&2&&(sI(3),em(t));}function ge(e,t){if(e&1&&(Cs(0,"dt",36),JC(1,"Type"),hl(),Cs(2,"dd",37),JC(3),hl()),e&2){let o=CC(2);sI(3),em(o.errorType);}}function ke(e,t){if(e&1&&(Cs(0,"dt",36),JC(1,"Message"),hl(),Cs(2,"dd",38),JC(3),hl()),e&2){let o=CC(2);sI(3),em(o.errorMessage);}}function be(e,t){if(e&1&&(Cs(0,"h3",34),JC(1,"Tool error details"),hl(),Cs(2,"dl",35),aC(3,ge,4,1),aC(4,ke,4,1),hl()),e&2){let o=CC();sI(3),cC(o.errorType?3:-1),sI(),cC(o.errorMessage?4:-1);}}function xe(e,t){if(e&1&&(Cs(0,"section",31)(1,"header",32)(2,"h2",29),JC(3),hl(),Cs(4,"span",33),JC(5),hl()(),Cs(6,"h3",34),JC(7,"Output"),hl(),Cs(8,"pre",30),JC(9),hl(),aC(10,ve,4,1),Cs(11,"h3",34),JC(12,"Structured output"),hl(),Cs(13,"pre",30),JC(14),hl(),aC(15,be,5,2),hl()),e&2){let o,a=t,s=CC();qg("tool-invoke__result--failure",!a.success),sI(3),Dl("Result \u2014 ",a.toolName),sI(),qg("tool-invoke__badge--success",a.success)("tool-invoke__badge--failure",!a.success),sI(),Dl(" ",a.success?"Success":"Tool error"," "),sI(4),em(a.output),sI(),cC((o=s.formatMetadata(a.metadata))?10:-1,o),sI(4),em(s.formatStructuredOutput(a.structuredOutput)??"null"),sI(),cC(a.errorType||a.errorMessage?15:-1);}}var te=class e{destroyRef=g(Ce);route=g(V);router=g(G);namespaceController=g(k);userState=g(l);state=g(M);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=!this.namespaceId;namespaces=Wi([]);namespacesLoading=Wi(true);namespaceName=Wi(null);form=new z({namespaceId:new _t("",{nonNullable:true,validators:[_e$1.required]}),userId:new _t("",{nonNullable:true}),toolName:new _t("",{nonNullable:true,validators:[_e$1.required]}),payload:new _t("",{nonNullable:true})});ngOnInit(){let t=this.userState.currentUser()?.id;t?this.form.controls.userId.patchValue(t):this.userState.loadMe().pipe(U(this.destroyRef)).subscribe({next:o=>{o.id&&this.form.controls.userId.patchValue(o.id);}}),this.isPlatformMode?this.namespaceController.listAllNamespace().pipe(U(this.destroyRef)).subscribe({next:o=>{this.namespaces.set(o.map(a=>({id:a.id,name:a.name}))),this.namespacesLoading.set(false);},error:()=>this.namespacesLoading.set(false)}):(this.form.controls.namespaceId.patchValue(this.namespaceId),this.namespacesLoading.set(false),this.namespaceController.getByIdNamespace(this.namespaceId).pipe(U(this.destroyRef)).subscribe({next:o=>this.namespaceName.set(o.name),error:()=>this.namespaceName.set(this.namespaceId)}));}submit(){if(this.form.invalid||this.state.isLoading())return;let{namespaceId:t,userId:o,toolName:a,payload:s}=this.form.getRawValue();this.state.invoke(t,o.trim()||void 0,a.trim(),s.trim()||void 0).pipe(U(this.destroyRef)).subscribe();}reset(){this.state.reset();}formatMetadata(t){return !t||Object.keys(t).length===0?null:JSON.stringify(t,null,2)}formatStructuredOutput(t){return t===void 0?null:JSON.stringify(t,null,2)}back(){this.isPlatformMode?this.router.navigate(["/agentos","admin"]):this.router.navigate(["/agentos",this.namespaceId,"agent-configs"]);}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=jw({type:e,selectors:[["agentos-tool-invoke"]],decls:46,vars:8,consts:[[1,"tool-invoke"],[1,"tool-invoke__header"],["type","button",1,"tool-invoke__back",3,"click"],["width","16","height","16","viewBox","0 0 24 24","fill","none","aria-hidden","true"],["d","M15 18l-6-6 6-6","stroke","currentColor","stroke-width","2","stroke-linecap","round","stroke-linejoin","round"],[1,"tool-invoke__title"],[1,"tool-invoke__subtitle"],[1,"tool-invoke__form",3,"ngSubmit","formGroup"],[1,"tool-invoke__field"],["for","ti-namespace",1,"tool-invoke__label"],[1,"tool-invoke__required"],["id","ti-namespace",1,"tool-invoke__namespace-static"],["for","ti-user",1,"tool-invoke__label"],[1,"tool-invoke__optional"],["id","ti-user","type","text","formControlName","userId","placeholder","UUID of the user \u2014 adds user-scoped overlay layers","autocomplete","off",1,"tool-invoke__input"],["for","ti-tool",1,"tool-invoke__label"],["id","ti-tool","type","text","formControlName","toolName","placeholder","e.g. MY_FILES__listFiles","autocomplete","off","spellcheck","false",1,"tool-invoke__input","tool-invoke__input--mono"],[1,"tool-invoke__hint"],["for","ti-payload",1,"tool-invoke__label"],["id","ti-payload","formControlName","payload","rows","6","placeholder",'JSON arguments for the tool, e.g. {"path": "/some/dir"}\\nLeave empty for tools with no input.',"spellcheck","false",1,"tool-invoke__textarea","tool-invoke__input--mono"],[1,"tool-invoke__actions"],["type","submit",1,"tool-invoke__submit",3,"disabled"],["type","button",1,"tool-invoke__reset"],[1,"tool-invoke__result","tool-invoke__result--error"],[1,"tool-invoke__result",3,"tool-invoke__result--failure"],["id","ti-namespace","formControlName","namespaceId",1,"tool-invoke__select"],["value","","disabled",""],[3,"value"],["type","button",1,"tool-invoke__reset",3,"click"],[1,"tool-invoke__result-title"],[1,"tool-invoke__output"],[1,"tool-invoke__result"],[1,"tool-invoke__result-header"],[1,"tool-invoke__badge"],[1,"tool-invoke__section-label"],[1,"tool-invoke__dl"],[1,"tool-invoke__dt"],[1,"tool-invoke__dd","tool-invoke__dd--mono"],[1,"tool-invoke__dd"]],template:function(o,a){if(o&1&&(Cs(0,"div",0)(1,"header",1)(2,"button",2),Lg("click",function(){return a.back()}),Bf(),Cs(3,"svg",3),Ag(4,"path",4),hl(),JC(5," Back "),hl(),Vf(),Cs(6,"h1",5),JC(7,"Tool invoke"),hl(),Cs(8,"p",6),aC(9,re,1,0)(10,ae,1,0),hl()(),Cs(11,"form",7),Lg("ngSubmit",function(){return a.submit()}),Cs(12,"div",8)(13,"label",9),JC(14,"Namespace "),Cs(15,"span",10),JC(16,"*"),hl()(),aC(17,ce,2,1)(18,me,2,1,"p",11),hl(),Cs(19,"div",8)(20,"label",12),JC(21,"User ID "),Cs(22,"span",13),JC(23,"(optional)"),hl()(),Ag(24,"input",14),ZI(),hl(),Cs(25,"div",8)(26,"label",15),JC(27,"Tool name "),Cs(28,"span",10),JC(29,"*"),hl()(),Ag(30,"input",16),ZI(),Cs(31,"p",17),JC(32," Exact tool name as returned by the agent definition inspect page. When not found, the error response lists all available tools for the selected namespace. "),hl()(),Cs(33,"div",8)(34,"label",18),JC(35,"Payload "),Cs(36,"span",13),JC(37,"(optional)"),hl()(),Ag(38,"textarea",19),ZI(),hl(),Cs(39,"div",20)(40,"button",21),aC(41,pe,1,0)(42,_e,1,0),hl(),aC(43,ue,2,0,"button",22),hl()(),aC(44,fe,5,1,"section",23),aC(45,xe,16,12,"section",24),hl()),o&2){let s,f;sI(9),cC(a.isPlatformMode?9:10),sI(2),xg("formGroup",a.form),sI(6),cC(a.isPlatformMode?17:18),sI(7),QI(),sI(6),QI(),sI(8),QI(),sI(2),xg("disabled",a.form.invalid||a.state.isLoading()),sI(),cC(a.state.isLoading()?41:42),sI(2),cC(a.state.result()||a.state.errorMessage()?43:-1),sI(),cC((s=a.state.errorMessage())?44:-1,s),sI(),cC((f=a.state.result())?45:-1,f);}},dependencies:[ni,Jn,Qn,ei,Ye,At,Zn,Xn,En,An],styles:[".tool-invoke[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:720px;margin:0 auto;padding:2rem 1rem}.tool-invoke__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.tool-invoke__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.3rem;padding:0;border:none;background:transparent;color:var(--color-text-secondary, #6e6e73);font-size:.875rem;font-family:inherit;cursor:pointer;align-self:flex-start}.tool-invoke__back[_ngcontent-%COMP%]:hover{color:var(--color-text, #1d1d1f)}.tool-invoke__namespace-static[_ngcontent-%COMP%]{margin:0;padding:.5rem .75rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .12));background:var(--color-surface-muted, rgba(0, 0, 0, .04));color:var(--color-text, #1d1d1f);font-size:.9375rem}.tool-invoke__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.tool-invoke__subtitle[_ngcontent-%COMP%]{margin:0;font-size:.875rem;color:var(--color-text-secondary, #6e6e73);line-height:1.5}.tool-invoke__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem;padding:1.5rem;border:1px solid var(--color-border, rgba(0, 0, 0, .1));border-radius:12px}.tool-invoke__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.4rem}.tool-invoke__label[_ngcontent-%COMP%]{font-size:.8125rem;font-weight:500;color:var(--color-text-secondary, #6e6e73)}.tool-invoke__required[_ngcontent-%COMP%]{color:var(--color-error, #ff3b30);margin-left:.1em}.tool-invoke__optional[_ngcontent-%COMP%]{font-weight:400;color:var(--color-text-secondary, #6e6e73);font-size:.75rem}.tool-invoke__hint[_ngcontent-%COMP%]{margin:0;font-size:.75rem;color:var(--color-text-secondary, #6e6e73);line-height:1.4}.tool-invoke__input[_ngcontent-%COMP%], .tool-invoke__select[_ngcontent-%COMP%], .tool-invoke__textarea[_ngcontent-%COMP%]{padding:.5rem .75rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .12));background:var(--color-surface, #fff);color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;transition:border-color .15s ease}.tool-invoke__input[_ngcontent-%COMP%]:focus, .tool-invoke__select[_ngcontent-%COMP%]:focus, .tool-invoke__textarea[_ngcontent-%COMP%]:focus{outline:none;border-color:var(--color-primary, #007aff)}.tool-invoke__input--mono[_ngcontent-%COMP%], .tool-invoke__select--mono[_ngcontent-%COMP%], .tool-invoke__textarea--mono[_ngcontent-%COMP%]{font-family:monospace;font-size:.875rem}.tool-invoke__textarea[_ngcontent-%COMP%]{resize:vertical;min-height:120px}.tool-invoke__select[_ngcontent-%COMP%]{cursor:pointer}.tool-invoke__actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap;padding-top:.25rem}.tool-invoke__submit[_ngcontent-%COMP%]{padding:.55rem 1.25rem;border-radius:8px;border:none;background:var(--color-primary, #007aff);color:#fff;font-size:.9375rem;font-weight:500;font-family:inherit;cursor:pointer;transition:opacity .15s ease}.tool-invoke__submit[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed}.tool-invoke__submit[_ngcontent-%COMP%]:not(:disabled):hover{opacity:.88}.tool-invoke__reset[_ngcontent-%COMP%]{padding:.55rem 1rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .12));background:transparent;color:var(--color-text-secondary, #6e6e73);font-size:.875rem;font-family:inherit;cursor:pointer}.tool-invoke__reset[_ngcontent-%COMP%]:hover{background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.tool-invoke__result[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem;padding:1.25rem;border:1px solid var(--color-border, rgba(0, 0, 0, .1));border-radius:12px}.tool-invoke__result--error[_ngcontent-%COMP%]{border-color:var(--color-error, #ff3b30);background:var(--color-error-bg, #fff5f5)}.tool-invoke__result--failure[_ngcontent-%COMP%]{border-color:var(--color-warning, #ff9500);background:var(--color-warning-bg, #fffaf0)}.tool-invoke__result-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap}.tool-invoke__result-title[_ngcontent-%COMP%]{margin:0;font-size:.9375rem;font-weight:600;color:var(--color-text, #1d1d1f)}.tool-invoke__badge[_ngcontent-%COMP%]{display:inline-block;padding:.2em .6em;border-radius:4px;font-size:.75rem;font-weight:500}.tool-invoke__badge--success[_ngcontent-%COMP%]{background:var(--color-success-bg, #e3f5e1);color:var(--color-success, #34c759)}.tool-invoke__badge--failure[_ngcontent-%COMP%]{background:var(--color-warning-bg, #fff3cd);color:var(--color-warning, #ff9500)}.tool-invoke__section-label[_ngcontent-%COMP%]{margin:.5rem 0 0;font-size:.8125rem;font-weight:500;color:var(--color-text-secondary, #6e6e73);text-transform:uppercase;letter-spacing:.04em}.tool-invoke__output[_ngcontent-%COMP%]{margin:0;padding:.875rem 1rem;border-radius:6px;background:var(--color-surface-muted, rgba(0, 0, 0, .04));font-size:.875rem;font-family:monospace;color:var(--color-text, #1d1d1f);white-space:pre-wrap;word-break:break-word;line-height:1.6;max-height:500px;overflow-y:auto}.tool-invoke__dl[_ngcontent-%COMP%]{display:grid;grid-template-columns:max-content 1fr;gap:.4rem 1rem;margin:0}.tool-invoke__dt[_ngcontent-%COMP%]{font-size:.8125rem;font-weight:500;color:var(--color-text-secondary, #6e6e73);align-self:start}.tool-invoke__dd[_ngcontent-%COMP%]{margin:0;font-size:.875rem;color:var(--color-text, #1d1d1f);word-break:break-word}.tool-invoke__dd--mono[_ngcontent-%COMP%]{font-family:monospace}"]})};export{te as ToolInvokeComponent};
@@ -1,4 +1,4 @@
1
- import {a as P$1,av as dt$1,z as z$1}from'./main-JTU33H5D.js';function ct(){return {async:false,breaks:false,extensions:null,gfm:true,hooks:null,pedantic:false,renderer:null,silent:false,tokenizer:null,walkTokens:null}}var re=ct();function rn(n){re=n;}var xe={exec:()=>null};function k(n,e=""){let r=typeof n=="string"?n:n.source,s={replace:(t,a)=>{let l=typeof a=="string"?a:a.source;return l=l.replace(D.caret,"$1"),r=r.replace(t,l),s},getRegex:()=>new RegExp(r,e)};return s}var D={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:n=>new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}#`),htmlBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}<(?:[a-z].*>|!--)`,"i")},Hn=/^(?:[ \t]*(?:\n|$))+/,Gn=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Wn=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Te=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,qn=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,pt=/(?:[*+-]|\d{1,9}[.)])/,sn=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ln=k(sn).replace(/bull/g,pt).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Zn=k(sn).replace(/bull/g,pt).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ut=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Yn=/^[^\n]+/,ht=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,jn=k(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ht).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Xn=k(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,pt).getRegex(),Fe="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ft=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Qn=k("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ft).replace("tag",Fe).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),an=k(ut).replace("hr",Te).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Fe).getRegex(),Vn=k(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",an).getRegex(),gt={blockquote:Vn,code:Gn,def:jn,fences:Wn,heading:qn,hr:Te,html:Qn,lheading:ln,list:Xn,newline:Hn,paragraph:an,table:xe,text:Yn},Vt=k("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Te).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Fe).getRegex(),Kn=z$1(P$1({},gt),{lheading:Zn,table:Vt,paragraph:k(ut).replace("hr",Te).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Vt).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Fe).getRegex()}),Jn=z$1(P$1({},gt),{html:k(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ft).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:xe,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:k(ut).replace("hr",Te).replace("heading",` *#{1,6} *[^
1
+ import {a as P$1,av as dt$1,z as z$1}from'./main-4LGWVPVH.js';function ct(){return {async:false,breaks:false,extensions:null,gfm:true,hooks:null,pedantic:false,renderer:null,silent:false,tokenizer:null,walkTokens:null}}var re=ct();function rn(n){re=n;}var xe={exec:()=>null};function k(n,e=""){let r=typeof n=="string"?n:n.source,s={replace:(t,a)=>{let l=typeof a=="string"?a:a.source;return l=l.replace(D.caret,"$1"),r=r.replace(t,l),s},getRegex:()=>new RegExp(r,e)};return s}var D={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:n=>new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}#`),htmlBeginRegex:n=>new RegExp(`^ {0,${Math.min(3,n-1)}}<(?:[a-z].*>|!--)`,"i")},Hn=/^(?:[ \t]*(?:\n|$))+/,Gn=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Wn=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Te=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,qn=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,pt=/(?:[*+-]|\d{1,9}[.)])/,sn=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ln=k(sn).replace(/bull/g,pt).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Zn=k(sn).replace(/bull/g,pt).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ut=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Yn=/^[^\n]+/,ht=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,jn=k(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ht).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Xn=k(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,pt).getRegex(),Fe="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ft=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Qn=k("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ft).replace("tag",Fe).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),an=k(ut).replace("hr",Te).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Fe).getRegex(),Vn=k(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",an).getRegex(),gt={blockquote:Vn,code:Gn,def:jn,fences:Wn,heading:qn,hr:Te,html:Qn,lheading:ln,list:Xn,newline:Hn,paragraph:an,table:xe,text:Yn},Vt=k("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Te).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Fe).getRegex(),Kn=z$1(P$1({},gt),{lheading:Zn,table:Vt,paragraph:k(ut).replace("hr",Te).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Vt).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Fe).getRegex()}),Jn=z$1(P$1({},gt),{html:k(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ft).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:xe,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:k(ut).replace("hr",Te).replace("heading",` *#{1,6} *[^
2
2
  ]`).replace("lheading",ln).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),er=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,tr=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,on=/^( {2,}|\\)\n(?!\s*$)/,nr=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,Be=/[\p{P}\p{S}]/u,dt=/[\s\p{P}\p{S}]/u,cn=/[^\s\p{P}\p{S}]/u,rr=k(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,dt).getRegex(),pn=/(?!~)[\p{P}\p{S}]/u,sr=/(?!~)[\s\p{P}\p{S}]/u,ir=/(?:[^\s\p{P}\p{S}]|~)/u,lr=/\[(?:[^\[\]`]|`[^`]*?`)*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)|`[^`]*?`|<(?! )[^<>]*?>/g,un=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,ar=k(un,"u").replace(/punct/g,Be).getRegex(),or=k(un,"u").replace(/punct/g,pn).getRegex(),hn="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",cr=k(hn,"gu").replace(/notPunctSpace/g,cn).replace(/punctSpace/g,dt).replace(/punct/g,Be).getRegex(),pr=k(hn,"gu").replace(/notPunctSpace/g,ir).replace(/punctSpace/g,sr).replace(/punct/g,pn).getRegex(),ur=k("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,cn).replace(/punctSpace/g,dt).replace(/punct/g,Be).getRegex(),hr=k(/\\(punct)/,"gu").replace(/punct/g,Be).getRegex(),fr=k(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),gr=k(ft).replace("(?:-->|$)","-->").getRegex(),dr=k("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",gr).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ze=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,mr=k(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ze).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),fn=k(/^!?\[(label)\]\[(ref)\]/).replace("label",ze).replace("ref",ht).getRegex(),gn=k(/^!?\[(ref)\](?:\[\])?/).replace("ref",ht).getRegex(),kr=k("reflink|nolink(?!\\()","g").replace("reflink",fn).replace("nolink",gn).getRegex(),Kt=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,mt={_backpedal:xe,anyPunctuation:hr,autolink:fr,blockSkip:lr,br:on,code:tr,del:xe,emStrongLDelim:ar,emStrongRDelimAst:cr,emStrongRDelimUnd:ur,escape:er,link:mr,nolink:gn,punctuation:rr,reflink:fn,reflinkSearch:kr,tag:dr,text:nr,url:xe},br=z$1(P$1({},mt),{link:k(/^!?\[(label)\]\((.*?)\)/).replace("label",ze).getRegex(),reflink:k(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ze).getRegex()}),lt=z$1(P$1({},mt),{emStrongRDelimAst:pr,emStrongLDelim:or,url:k(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Kt).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:k(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Kt).getRegex()}),xr=z$1(P$1({},lt),{br:k(on).replace("{2,}","*").getRegex(),text:k(lt.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),ve={normal:gt,gfm:Kn,pedantic:Jn},me={normal:mt,gfm:lt,breaks:xr,pedantic:br},Tr={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Jt=n=>Tr[n];function q(n,e){if(e){if(D.escapeTest.test(n))return n.replace(D.escapeReplace,Jt)}else if(D.escapeTestNoEncode.test(n))return n.replace(D.escapeReplaceNoEncode,Jt);return n}function en(n){try{n=encodeURI(n).replace(D.percentDecode,"%");}catch(e){return null}return n}function tn(n,e){let r=n.replace(D.findPipe,(a,l,o)=>{let p=false,u=l;for(;--u>=0&&o[u]==="\\";)p=!p;return p?"|":" |"}),s=r.split(D.splitPipe),t=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;t<s.length;t++)s[t]=s[t].trim().replace(D.slashPipe,"|");return s}function ke(n,e,r){let s=n.length;if(s===0)return "";let t=0;for(;t<s;){let a=n.charAt(s-t-1);if(a===e&&true)t++;else break}return n.slice(0,s-t)}function wr(n,e){if(n.indexOf(e[1])===-1)return -1;let r=0;for(let s=0;s<n.length;s++)if(n[s]==="\\")s++;else if(n[s]===e[0])r++;else if(n[s]===e[1]&&(r--,r<0))return s;return r>0?-2:-1}function nn(n,e,r,s,t){let a=e.href,l=e.title||null,o=n[1].replace(t.other.outputLinkReplace,"$1");s.state.inLink=true;let p={type:n[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:l,text:o,tokens:s.inlineTokens(o)};return s.state.inLink=false,p}function Ar(n,e,r){let s=n.match(r.other.indentCodeCompensation);if(s===null)return e;let t=s[1];return e.split(`
3
3
  `).map(a=>{let l=a.match(r.other.beginningSpace);if(l===null)return a;let[o]=l;return o.length>=t.length?a.slice(t.length):a}).join(`
4
4
  `)}var $e=class{options;rules;lexer;constructor(n){this.options=n||re;}space(n){let e=this.rules.block.newline.exec(n);if(e&&e[0].length>0)return {type:"space",raw:e[0]}}code(n){let e=this.rules.block.code.exec(n);if(e){let r=e[0].replace(this.rules.other.codeRemoveIndent,"");return {type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?r:ke(r,`
@@ -1 +1 @@
1
- import {O}from'./chunk-DwQ0v-xH.js';import {g,G,C as Ce,da as M,aJ as Tr,W as Wi,bS as Da,r as re,b as U,j as jw,aK as Lb,k as Cs,bf as gT,n as Lg,m as hl,af as bg,t as AC,x as xg,bg as yT,ah as dT,o as aC,ac as CC,v as cC,a9 as vC,aa as Sf,ab as _f,ag as ET}from'./main-JTU33H5D.js';import {W as Wn,S as Se}from'./chunk-DeXXr4BL.js';import'./chunk-DK1hp0WW.js';import'./chunk-DuXr-yGB.js';var S=()=>[];function F(n,t){if(n&1){let e=vC();Cs(0,"agentos-agent-config-item",4),Lg("deleteRequested",function(i){Sf(e);let E=CC(2);return _f(E.deleteConfig(i))}),hl();}n&2&&xg("config",t)("platformMode",true);}function N(n,t){if(n&1&&aC(0,F,1,2,"agentos-agent-config-item",3),n&2){let e,o=t.$implicit,i=CC();cC((e=i.resolveConfig(o.id))?0:-1,e);}}var q=class n{router=g(G);destroyRef=g(Ce);agentConfigController=g(M);refresh$=new Tr(void 0);isLoading=Wi(true);configs$=this.refresh$.pipe(Da(()=>(this.isLoading.set(true),this.agentConfigController.listPlatformAgentsAgentConfig(true))));configItems$=this.configs$.pipe(re(t=>t.map(e=>({id:e.id??"",name:e.name,description:e.description}))));configsById=new Map;constructor(){this.configs$.pipe(U(this.destroyRef)).subscribe({next:t=>{this.configsById=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","agent-configs","new"]);}deleteConfig(t){this.agentConfigController.deleteAgentConfig(t.id??"").pipe(U(this.destroyRef)).subscribe(()=>this.refresh$.next());}resolveConfig(t){return this.configsById.get(t)??null}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=jw({type:n,selectors:[["agentos-platform-agent-configs"]],decls:5,vars:7,consts:[["agentConfigItemTpl",""],["title","Platform Agent Configs","emptyMessage","No platform agent configs defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","loading","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[3,"config","platformMode"],[3,"deleteRequested","config","platformMode"]],template:function(e,o){if(e&1&&(Cs(0,"ds-entity-list",1),gT(1,"async"),Lg("createRequested",function(){return o.openCreateForm()}),Cs(2,"ds-icon-button",2),Lg("action",function(){return o.goBack()}),hl()(),bg(3,N,1,1,"ng-template",null,0,ET)),e&2){let i=AC(4);xg("items",yT(1,4,o.configItems$)??dT(6,S))("loading",o.isLoading())("showCreate",true)("itemTemplate",i);}},dependencies:[Wn,O,Se,Lb],styles:[".platform-agent-configs__back[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.platform-agent-configs__back[_ngcontent-%COMP%]:hover{text-decoration:underline}"]})};export{q as PlatformAgentConfigsComponent};
1
+ import {O}from'./chunk-BorcVzNx.js';import {g,G,C as Ce,da as M,aJ as Tr,W as Wi,bS as Da,r as re,b as U,j as jw,aK as Lb,k as Cs,bf as gT,n as Lg,m as hl,af as bg,t as AC,x as xg,bg as yT,ah as dT,o as aC,ac as CC,v as cC,a9 as vC,aa as Sf,ab as _f,ag as ET}from'./main-4LGWVPVH.js';import {W as Wn,S as Se}from'./chunk-CmWqV8dc.js';import'./chunk-B2UoGfZ3.js';import'./chunk-CPuMGlfm.js';var S=()=>[];function F(n,t){if(n&1){let e=vC();Cs(0,"agentos-agent-config-item",4),Lg("deleteRequested",function(i){Sf(e);let E=CC(2);return _f(E.deleteConfig(i))}),hl();}n&2&&xg("config",t)("platformMode",true);}function N(n,t){if(n&1&&aC(0,F,1,2,"agentos-agent-config-item",3),n&2){let e,o=t.$implicit,i=CC();cC((e=i.resolveConfig(o.id))?0:-1,e);}}var q=class n{router=g(G);destroyRef=g(Ce);agentConfigController=g(M);refresh$=new Tr(void 0);isLoading=Wi(true);configs$=this.refresh$.pipe(Da(()=>(this.isLoading.set(true),this.agentConfigController.listPlatformAgentsAgentConfig(true))));configItems$=this.configs$.pipe(re(t=>t.map(e=>({id:e.id??"",name:e.name,description:e.description}))));configsById=new Map;constructor(){this.configs$.pipe(U(this.destroyRef)).subscribe({next:t=>{this.configsById=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","agent-configs","new"]);}deleteConfig(t){this.agentConfigController.deleteAgentConfig(t.id??"").pipe(U(this.destroyRef)).subscribe(()=>this.refresh$.next());}resolveConfig(t){return this.configsById.get(t)??null}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=jw({type:n,selectors:[["agentos-platform-agent-configs"]],decls:5,vars:7,consts:[["agentConfigItemTpl",""],["title","Platform Agent Configs","emptyMessage","No platform agent configs defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","loading","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[3,"config","platformMode"],[3,"deleteRequested","config","platformMode"]],template:function(e,o){if(e&1&&(Cs(0,"ds-entity-list",1),gT(1,"async"),Lg("createRequested",function(){return o.openCreateForm()}),Cs(2,"ds-icon-button",2),Lg("action",function(){return o.goBack()}),hl()(),bg(3,N,1,1,"ng-template",null,0,ET)),e&2){let i=AC(4);xg("items",yT(1,4,o.configItems$)??dT(6,S))("loading",o.isLoading())("showCreate",true)("itemTemplate",i);}},dependencies:[Wn,O,Se,Lb],styles:[".platform-agent-configs__back[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.platform-agent-configs__back[_ngcontent-%COMP%]:hover{text-decoration:underline}"]})};export{q as PlatformAgentConfigsComponent};
@@ -1,4 +1,4 @@
1
- import {ct as vi,j as jw,N as Ng,y as qg,aL as wo,aM as Zn,bE as vt,aO as wt,cZ as fn,cT as Qp,c_ as he$1,cV as Cg,bA as bC,k as Cs,bB as SC,m as hl,b5 as lT,ad as Wg,o as aC,v as cC,u as sI,aW as C,bv as Vg,M as MC,B as NC,g,az as Xt$1,c$ as kn,bw as St,bG as p,aP as G,aR as Ps,aU as Ue,aV as U,W as Wi,an as ue,al as vt$1,ae as kt,r as re$1,d0 as Ia,bL as pe,bs as bl,ap as _d,bu as Ve$1,c2 as PE,aA as an,H as Hg,bt as Qn,aS as K,cO as ls,bN as F,bR as Sd,cL as Cd,bP as ev,a9 as vC,n as Lg,ac as CC,bV as nv,aN as Nn,bD as ge,aQ as $a,bM as mr,d1 as lt,d2 as wt$1,d3 as I,b_ as xt,bX as Pt,a as P,aZ as Bs,aw as gl,cJ as jg,J as JC,ax as ml,b$ as UC,a8 as em,c3 as kt$1,cD as Te,cz as to,aa as Sf,ab as _f}from'./main-JTU33H5D.js';var Xt=["tooltip"],Ut=20;var qt=new C("mat-tooltip-scroll-strategy",{providedIn:"root",factory:()=>{let n=g(pe);return ()=>kt$1(n,{scrollThrottle:Ut})}}),$t=new C("mat-tooltip-default-options",{providedIn:"root",factory:()=>({showDelay:0,hideDelay:0,touchendHideDelay:1500})});var Ht="tooltip-panel",Kt={passive:true},Jt=8,te=8,ee=24,ie=200,ne=(()=>{class n{_elementRef=g(Xt$1);_ngZone=g(G);_platform=g(p);_ariaDescriber=g($a);_focusMonitor=g(St);_dir=g(Qn);_injector=g(pe);_viewContainerRef=g(mr);_mediaMatcher=g(lt);_document=g(U);_renderer=g(Ps);_animationsDisabled=K();_defaultOptions=g($t,{optional:true});_overlayRef=null;_tooltipInstance=null;_overlayPanelClass;_portal;_position="below";_positionAtOrigin=false;_disabled=false;_tooltipClass;_viewInitialized=false;_pointerExitEventsInitialized=false;_tooltipComponent=Gt;_viewportMargin=8;_currentPosition;_cssClassPrefix="mat-mdc";_ariaDescriptionPending=false;_dirSubscribed=false;get position(){return this._position}set position(t){t!==this._position&&(this._position=t,this._overlayRef&&(this._updatePosition(this._overlayRef),this._tooltipInstance?.show(0),this._overlayRef.updatePosition()));}get positionAtOrigin(){return this._positionAtOrigin}set positionAtOrigin(t){this._positionAtOrigin=vi(t),this._detach(),this._overlayRef=null;}get disabled(){return this._disabled}set disabled(t){let e=vi(t);this._disabled!==e&&(this._disabled=e,e?this.hide(0):this._setupPointerEnterEventsIfNeeded(),this._syncAriaDescription(this.message));}get showDelay(){return this._showDelay}set showDelay(t){this._showDelay=fn(t);}_showDelay;get hideDelay(){return this._hideDelay}set hideDelay(t){this._hideDelay=fn(t),this._tooltipInstance&&(this._tooltipInstance._mouseLeaveHideDelay=this._hideDelay);}_hideDelay;touchGestures="auto";get message(){return this._message}set message(t){let e=this._message;this._message=t!=null?String(t).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage()),this._syncAriaDescription(e);}_message="";get tooltipClass(){return this._tooltipClass}set tooltipClass(t){this._tooltipClass=t,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass);}_eventCleanups=[];_touchstartTimeout=null;_destroyed=new ue;_isDestroyed=false;constructor(){let t=this._defaultOptions;t&&(this._showDelay=t.showDelay,this._hideDelay=t.hideDelay,t.position&&(this.position=t.position),t.positionAtOrigin&&(this.positionAtOrigin=t.positionAtOrigin),t.touchGestures&&(this.touchGestures=t.touchGestures),t.tooltipClass&&(this.tooltipClass=t.tooltipClass)),this._viewportMargin=Jt;}ngAfterViewInit(){this._viewInitialized=true,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(_d(this._destroyed)).subscribe(t=>{t?t==="keyboard"&&this._ngZone.run(()=>this.show()):this._ngZone.run(()=>this.hide(0));});}ngOnDestroy(){let t=this._elementRef.nativeElement;this._touchstartTimeout&&clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),this._eventCleanups.forEach(e=>e()),this._eventCleanups.length=0,this._destroyed.next(),this._destroyed.complete(),this._isDestroyed=true,this._ariaDescriber.removeDescription(t,this.message,"tooltip"),this._focusMonitor.stopMonitoring(t);}show(t=this.showDelay,e){if(this.disabled||!this.message||this._isTooltipVisible()){this._tooltipInstance?._cancelPendingAnimations();return}let i=this._createOverlay(e);this._detach(),this._portal=this._portal||new wt$1(this._tooltipComponent,this._viewContainerRef);let r=this._tooltipInstance=i.attach(this._portal).instance;r._triggerElement=this._elementRef.nativeElement,r._mouseLeaveHideDelay=this._hideDelay,r.afterHidden().pipe(_d(this._destroyed)).subscribe(()=>this._detach()),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),r.show(t);}hide(t=this.hideDelay){let e=this._tooltipInstance;e&&(e.isVisible()?e.hide(t):(e._cancelPendingAnimations(),this._detach()));}toggle(t){this._isTooltipVisible()?this.hide():this.show(void 0,t);}_isTooltipVisible(){return !!this._tooltipInstance&&this._tooltipInstance.isVisible()}_createOverlay(t){if(this._overlayRef){let a=this._overlayRef.getConfig().positionStrategy;if((!this.positionAtOrigin||!t)&&a._origin instanceof Xt$1)return this._overlayRef;this._detach();}let e=this._injector.get(I).getAncestorScrollContainers(this._elementRef),i=`${this._cssClassPrefix}-${Ht}`,r=xt(this._injector,this.positionAtOrigin?t||this._elementRef:this._elementRef).withTransformOriginOn(`.${this._cssClassPrefix}-tooltip`).withFlexibleDimensions(false).withViewportMargin(this._viewportMargin).withScrollableContainers(e).withPopoverLocation("global");return r.positionChanges.pipe(_d(this._destroyed)).subscribe(a=>{this._updateCurrentPositionClass(a.connectionPair),this._tooltipInstance&&a.scrollableViewProperties.isOverlayClipped&&this._tooltipInstance.isVisible()&&this._ngZone.run(()=>this.hide(0));}),this._overlayRef=Pt(this._injector,{direction:this._dir,positionStrategy:r,panelClass:this._overlayPanelClass?[...this._overlayPanelClass,i]:i,scrollStrategy:this._injector.get(qt)(),disableAnimations:this._animationsDisabled,eventPredicate:this._overlayEventPredicate}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(_d(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(_d(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(_d(this._destroyed)).subscribe(a=>{a.preventDefault(),a.stopPropagation(),this._ngZone.run(()=>this.hide(0));}),this._defaultOptions?.disableTooltipInteractivity&&this._overlayRef.addPanelClass(`${this._cssClassPrefix}-tooltip-panel-non-interactive`),this._dirSubscribed||(this._dirSubscribed=true,this._dir.change.pipe(_d(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef);})),this._overlayRef}_detach(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null;}_updatePosition(t){let e=t.getConfig().positionStrategy,i=this._getOrigin(),r=this._getOverlayPosition();e.withPositions([this._addOffset(P(P({},i.main),r.main)),this._addOffset(P(P({},i.fallback),r.fallback))]);}_addOffset(t){let e=te,i=!this._dir||this._dir.value=="ltr";return t.originY==="top"?t.offsetY=-e:t.originY==="bottom"?t.offsetY=e:t.originX==="start"?t.offsetX=i?-e:e:t.originX==="end"&&(t.offsetX=i?e:-e),t}_getOrigin(){let t=!this._dir||this._dir.value=="ltr",e=this.position,i;e=="above"||e=="below"?i={originX:"center",originY:e=="above"?"top":"bottom"}:e=="before"||e=="left"&&t||e=="right"&&!t?i={originX:"start",originY:"center"}:(e=="after"||e=="right"&&t||e=="left"&&!t)&&(i={originX:"end",originY:"center"});let{x:r,y:a}=this._invertPosition(i.originX,i.originY);return {main:i,fallback:{originX:r,originY:a}}}_getOverlayPosition(){let t=!this._dir||this._dir.value=="ltr",e=this.position,i;e=="above"?i={overlayX:"center",overlayY:"bottom"}:e=="below"?i={overlayX:"center",overlayY:"top"}:e=="before"||e=="left"&&t||e=="right"&&!t?i={overlayX:"end",overlayY:"center"}:(e=="after"||e=="right"&&t||e=="left"&&!t)&&(i={overlayX:"start",overlayY:"center"});let{x:r,y:a}=this._invertPosition(i.overlayX,i.overlayY);return {main:i,fallback:{overlayX:r,overlayY:a}}}_updateTooltipMessage(){this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),PE(()=>{this._tooltipInstance&&this._overlayRef.updatePosition();},{injector:this._injector}));}_setTooltipClass(t){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=t instanceof Set?Array.from(t):t,this._tooltipInstance._markForCheck());}_invertPosition(t,e){return this.position==="above"||this.position==="below"?e==="top"?e="bottom":e==="bottom"&&(e="top"):t==="end"?t="start":t==="start"&&(t="end"),{x:t,y:e}}_updateCurrentPositionClass(t){let{overlayY:e,originX:i,originY:r}=t,a;if(e==="center"?this._dir&&this._dir.value==="rtl"?a=i==="end"?"left":"right":a=i==="start"?"left":"right":a=e==="bottom"&&r==="top"?"above":"below",a!==this._currentPosition){let A=this._overlayRef;if(A){let ut=`${this._cssClassPrefix}-${Ht}-`;A.removePanelClass(ut+this._currentPosition),A.addPanelClass(ut+a);}this._currentPosition=a;}}_setupPointerEnterEventsIfNeeded(){this._disabled||!this.message||!this._viewInitialized||this._eventCleanups.length||(this._isTouchPlatform()?this.touchGestures!=="off"&&(this._disableNativeGesturesIfNecessary(),this._addListener("touchstart",t=>{let e=t.targetTouches?.[0],i=e?{x:e.clientX,y:e.clientY}:void 0;this._setupPointerExitEventsIfNeeded(),this._touchstartTimeout&&clearTimeout(this._touchstartTimeout);let r=500;this._touchstartTimeout=setTimeout(()=>{this._touchstartTimeout=null,this.show(void 0,i);},this._defaultOptions?.touchLongPressShowDelay??r);})):this._addListener("mouseenter",t=>{this._setupPointerExitEventsIfNeeded();let e;t.x!==void 0&&t.y!==void 0&&(e=t),this.show(void 0,e);}));}_setupPointerExitEventsIfNeeded(){if(!this._pointerExitEventsInitialized){if(this._pointerExitEventsInitialized=true,!this._isTouchPlatform())this._addListener("mouseleave",t=>{let e=t.relatedTarget;(!e||!this._overlayRef?.overlayElement.contains(e))&&this.hide();}),this._addListener("wheel",t=>{if(this._isTooltipVisible()){let e=this._document.elementFromPoint(t.clientX,t.clientY),i=this._elementRef.nativeElement;e!==i&&!i.contains(e)&&this.hide();}});else if(this.touchGestures!=="off"){this._disableNativeGesturesIfNecessary();let t=()=>{this._touchstartTimeout&&clearTimeout(this._touchstartTimeout),this.hide(this._defaultOptions?.touchendHideDelay);};this._addListener("touchend",t),this._addListener("touchcancel",t);}}}_addListener(t,e){this._eventCleanups.push(this._renderer.listen(this._elementRef.nativeElement,t,e,Kt));}_isTouchPlatform(){let t=this._defaultOptions?.detectHoverCapability;return typeof t=="function"?!t():this._platform.IOS||this._platform.ANDROID?true:this._platform.isBrowser?!!t&&this._mediaMatcher.matchMedia("(any-hover: none)").matches:false}_disableNativeGesturesIfNecessary(){let t=this.touchGestures;if(t!=="off"){let e=this._elementRef.nativeElement,i=e.style;(t==="on"||e.nodeName!=="INPUT"&&e.nodeName!=="TEXTAREA")&&(i.userSelect=i.msUserSelect=i.webkitUserSelect=i.MozUserSelect="none"),(t==="on"||!e.draggable)&&(i.webkitUserDrag="none"),i.touchAction="none",i.webkitTapHighlightColor="transparent";}}_syncAriaDescription(t){this._ariaDescriptionPending||(this._ariaDescriptionPending=true,this._ariaDescriber.removeDescription(this._elementRef.nativeElement,t,"tooltip"),this._isDestroyed||PE({write:()=>{this._ariaDescriptionPending=false,this.message&&!this.disabled&&this._ariaDescriber.describe(this._elementRef.nativeElement,this.message,"tooltip");}},{injector:this._injector}));}_overlayEventPredicate=t=>t.type==="keydown"?this._isTooltipVisible()&&t.keyCode===27&&!Ve$1(t):true;static \u0275fac=function(e){return new(e||n)};static \u0275dir=Bs({type:n,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],hostVars:2,hostBindings:function(e,i){e&2&&qg("mat-mdc-tooltip-disabled",i.disabled);},inputs:{position:[0,"matTooltipPosition","position"],positionAtOrigin:[0,"matTooltipPositionAtOrigin","positionAtOrigin"],disabled:[0,"matTooltipDisabled","disabled"],showDelay:[0,"matTooltipShowDelay","showDelay"],hideDelay:[0,"matTooltipHideDelay","hideDelay"],touchGestures:[0,"matTooltipTouchGestures","touchGestures"],message:[0,"matTooltip","message"],tooltipClass:[0,"matTooltipClass","tooltipClass"]},exportAs:["matTooltip"]})}return n})(),Gt=(()=>{class n{_changeDetectorRef=g(bl);_elementRef=g(Xt$1);_isMultiline=false;message;tooltipClass;_showTimeoutId;_hideTimeoutId;_triggerElement;_mouseLeaveHideDelay;_animationsDisabled=K();_tooltip;_closeOnInteraction=false;_isVisible=false;_onHide=new ue;_showAnimation="mat-mdc-tooltip-show";_hideAnimation="mat-mdc-tooltip-hide";show(t){this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=setTimeout(()=>{this._toggleVisibility(true),this._showTimeoutId=void 0;},t);}hide(t){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId=setTimeout(()=>{this._toggleVisibility(false),this._hideTimeoutId=void 0;},t);}afterHidden(){return this._onHide}isVisible(){return this._isVisible}ngOnDestroy(){this._cancelPendingAnimations(),this._onHide.complete(),this._triggerElement=null;}_handleBodyInteraction(){this._closeOnInteraction&&this.hide(0);}_markForCheck(){this._changeDetectorRef.markForCheck();}_handleMouseLeave({relatedTarget:t}){(!t||!this._triggerElement.contains(t))&&(this.isVisible()?this.hide(this._mouseLeaveHideDelay):this._finalizeAnimation(false));}_onShow(){this._isMultiline=this._isTooltipMultiline(),this._markForCheck();}_isTooltipMultiline(){let t=this._elementRef.nativeElement.getBoundingClientRect();return t.height>ee&&t.width>=ie}_handleAnimationEnd({animationName:t}){(t===this._showAnimation||t===this._hideAnimation)&&this._finalizeAnimation(t===this._showAnimation);}_cancelPendingAnimations(){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=this._hideTimeoutId=void 0;}_finalizeAnimation(t){t?this._closeOnInteraction=true:this.isVisible()||this._onHide.next();}_toggleVisibility(t){let e=this._tooltip.nativeElement,i=this._showAnimation,r=this._hideAnimation;if(e.classList.remove(t?r:i),e.classList.add(t?i:r),this._isVisible!==t&&(this._isVisible=t,this._changeDetectorRef.markForCheck()),t&&!this._animationsDisabled&&typeof getComputedStyle=="function"){let a=getComputedStyle(e);(a.getPropertyValue("animation-duration")==="0s"||a.getPropertyValue("animation-name")==="none")&&(this._animationsDisabled=true);}t&&this._onShow(),this._animationsDisabled&&(e.classList.add("_mat-animation-noopable"),this._finalizeAnimation(t));}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=jw({type:n,selectors:[["mat-tooltip-component"]],viewQuery:function(e,i){if(e&1&&Hg(Xt,7),e&2){let r;MC(r=NC())&&(i._tooltip=r.first);}},hostAttrs:["aria-hidden","true"],hostBindings:function(e,i){e&1&&Lg("mouseleave",function(a){return i._handleMouseLeave(a)});},decls:4,vars:5,consts:[["tooltip",""],[1,"mdc-tooltip","mat-mdc-tooltip",3,"animationend"],[1,"mat-mdc-tooltip-surface","mdc-tooltip__surface"]],template:function(e,i){e&1&&(gl(0,"div",1,0),jg("animationend",function(a){return i._handleAnimationEnd(a)}),gl(2,"div",2),JC(3),ml()()),e&2&&(UC(i.tooltipClass),qg("mdc-tooltip--multiline",i._isMultiline),sI(3),em(i.message));},styles:[`.mat-mdc-tooltip {
1
+ import {ct as vi,j as jw,N as Ng,y as qg,aL as wo,aM as Zn,bE as vt,aO as wt,cZ as fn,cT as Qp,c_ as he$1,cV as Cg,bA as bC,k as Cs,bB as SC,m as hl,b5 as lT,ad as Wg,o as aC,v as cC,u as sI,aW as C,bv as Vg,M as MC,B as NC,g,az as Xt$1,c$ as kn,bw as St,bG as p,aP as G,aR as Ps,aU as Ue,aV as U,W as Wi,an as ue,al as vt$1,ae as kt,r as re$1,d0 as Ia,bL as pe,bs as bl,ap as _d,bu as Ve$1,c2 as PE,aA as an,H as Hg,bt as Qn,aS as K,cO as ls,bN as F,bR as Sd,cL as Cd,bP as ev,a9 as vC,n as Lg,ac as CC,bV as nv,aN as Nn,bD as ge,aQ as $a,bM as mr,d1 as lt,d2 as wt$1,d3 as I,b_ as xt,bX as Pt,a as P,aZ as Bs,aw as gl,cJ as jg,J as JC,ax as ml,b$ as UC,a8 as em,c3 as kt$1,cD as Te,cz as to,aa as Sf,ab as _f}from'./main-4LGWVPVH.js';var Xt=["tooltip"],Ut=20;var qt=new C("mat-tooltip-scroll-strategy",{providedIn:"root",factory:()=>{let n=g(pe);return ()=>kt$1(n,{scrollThrottle:Ut})}}),$t=new C("mat-tooltip-default-options",{providedIn:"root",factory:()=>({showDelay:0,hideDelay:0,touchendHideDelay:1500})});var Ht="tooltip-panel",Kt={passive:true},Jt=8,te=8,ee=24,ie=200,ne=(()=>{class n{_elementRef=g(Xt$1);_ngZone=g(G);_platform=g(p);_ariaDescriber=g($a);_focusMonitor=g(St);_dir=g(Qn);_injector=g(pe);_viewContainerRef=g(mr);_mediaMatcher=g(lt);_document=g(U);_renderer=g(Ps);_animationsDisabled=K();_defaultOptions=g($t,{optional:true});_overlayRef=null;_tooltipInstance=null;_overlayPanelClass;_portal;_position="below";_positionAtOrigin=false;_disabled=false;_tooltipClass;_viewInitialized=false;_pointerExitEventsInitialized=false;_tooltipComponent=Gt;_viewportMargin=8;_currentPosition;_cssClassPrefix="mat-mdc";_ariaDescriptionPending=false;_dirSubscribed=false;get position(){return this._position}set position(t){t!==this._position&&(this._position=t,this._overlayRef&&(this._updatePosition(this._overlayRef),this._tooltipInstance?.show(0),this._overlayRef.updatePosition()));}get positionAtOrigin(){return this._positionAtOrigin}set positionAtOrigin(t){this._positionAtOrigin=vi(t),this._detach(),this._overlayRef=null;}get disabled(){return this._disabled}set disabled(t){let e=vi(t);this._disabled!==e&&(this._disabled=e,e?this.hide(0):this._setupPointerEnterEventsIfNeeded(),this._syncAriaDescription(this.message));}get showDelay(){return this._showDelay}set showDelay(t){this._showDelay=fn(t);}_showDelay;get hideDelay(){return this._hideDelay}set hideDelay(t){this._hideDelay=fn(t),this._tooltipInstance&&(this._tooltipInstance._mouseLeaveHideDelay=this._hideDelay);}_hideDelay;touchGestures="auto";get message(){return this._message}set message(t){let e=this._message;this._message=t!=null?String(t).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage()),this._syncAriaDescription(e);}_message="";get tooltipClass(){return this._tooltipClass}set tooltipClass(t){this._tooltipClass=t,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass);}_eventCleanups=[];_touchstartTimeout=null;_destroyed=new ue;_isDestroyed=false;constructor(){let t=this._defaultOptions;t&&(this._showDelay=t.showDelay,this._hideDelay=t.hideDelay,t.position&&(this.position=t.position),t.positionAtOrigin&&(this.positionAtOrigin=t.positionAtOrigin),t.touchGestures&&(this.touchGestures=t.touchGestures),t.tooltipClass&&(this.tooltipClass=t.tooltipClass)),this._viewportMargin=Jt;}ngAfterViewInit(){this._viewInitialized=true,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(_d(this._destroyed)).subscribe(t=>{t?t==="keyboard"&&this._ngZone.run(()=>this.show()):this._ngZone.run(()=>this.hide(0));});}ngOnDestroy(){let t=this._elementRef.nativeElement;this._touchstartTimeout&&clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),this._eventCleanups.forEach(e=>e()),this._eventCleanups.length=0,this._destroyed.next(),this._destroyed.complete(),this._isDestroyed=true,this._ariaDescriber.removeDescription(t,this.message,"tooltip"),this._focusMonitor.stopMonitoring(t);}show(t=this.showDelay,e){if(this.disabled||!this.message||this._isTooltipVisible()){this._tooltipInstance?._cancelPendingAnimations();return}let i=this._createOverlay(e);this._detach(),this._portal=this._portal||new wt$1(this._tooltipComponent,this._viewContainerRef);let r=this._tooltipInstance=i.attach(this._portal).instance;r._triggerElement=this._elementRef.nativeElement,r._mouseLeaveHideDelay=this._hideDelay,r.afterHidden().pipe(_d(this._destroyed)).subscribe(()=>this._detach()),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),r.show(t);}hide(t=this.hideDelay){let e=this._tooltipInstance;e&&(e.isVisible()?e.hide(t):(e._cancelPendingAnimations(),this._detach()));}toggle(t){this._isTooltipVisible()?this.hide():this.show(void 0,t);}_isTooltipVisible(){return !!this._tooltipInstance&&this._tooltipInstance.isVisible()}_createOverlay(t){if(this._overlayRef){let a=this._overlayRef.getConfig().positionStrategy;if((!this.positionAtOrigin||!t)&&a._origin instanceof Xt$1)return this._overlayRef;this._detach();}let e=this._injector.get(I).getAncestorScrollContainers(this._elementRef),i=`${this._cssClassPrefix}-${Ht}`,r=xt(this._injector,this.positionAtOrigin?t||this._elementRef:this._elementRef).withTransformOriginOn(`.${this._cssClassPrefix}-tooltip`).withFlexibleDimensions(false).withViewportMargin(this._viewportMargin).withScrollableContainers(e).withPopoverLocation("global");return r.positionChanges.pipe(_d(this._destroyed)).subscribe(a=>{this._updateCurrentPositionClass(a.connectionPair),this._tooltipInstance&&a.scrollableViewProperties.isOverlayClipped&&this._tooltipInstance.isVisible()&&this._ngZone.run(()=>this.hide(0));}),this._overlayRef=Pt(this._injector,{direction:this._dir,positionStrategy:r,panelClass:this._overlayPanelClass?[...this._overlayPanelClass,i]:i,scrollStrategy:this._injector.get(qt)(),disableAnimations:this._animationsDisabled,eventPredicate:this._overlayEventPredicate}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(_d(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(_d(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(_d(this._destroyed)).subscribe(a=>{a.preventDefault(),a.stopPropagation(),this._ngZone.run(()=>this.hide(0));}),this._defaultOptions?.disableTooltipInteractivity&&this._overlayRef.addPanelClass(`${this._cssClassPrefix}-tooltip-panel-non-interactive`),this._dirSubscribed||(this._dirSubscribed=true,this._dir.change.pipe(_d(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef);})),this._overlayRef}_detach(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null;}_updatePosition(t){let e=t.getConfig().positionStrategy,i=this._getOrigin(),r=this._getOverlayPosition();e.withPositions([this._addOffset(P(P({},i.main),r.main)),this._addOffset(P(P({},i.fallback),r.fallback))]);}_addOffset(t){let e=te,i=!this._dir||this._dir.value=="ltr";return t.originY==="top"?t.offsetY=-e:t.originY==="bottom"?t.offsetY=e:t.originX==="start"?t.offsetX=i?-e:e:t.originX==="end"&&(t.offsetX=i?e:-e),t}_getOrigin(){let t=!this._dir||this._dir.value=="ltr",e=this.position,i;e=="above"||e=="below"?i={originX:"center",originY:e=="above"?"top":"bottom"}:e=="before"||e=="left"&&t||e=="right"&&!t?i={originX:"start",originY:"center"}:(e=="after"||e=="right"&&t||e=="left"&&!t)&&(i={originX:"end",originY:"center"});let{x:r,y:a}=this._invertPosition(i.originX,i.originY);return {main:i,fallback:{originX:r,originY:a}}}_getOverlayPosition(){let t=!this._dir||this._dir.value=="ltr",e=this.position,i;e=="above"?i={overlayX:"center",overlayY:"bottom"}:e=="below"?i={overlayX:"center",overlayY:"top"}:e=="before"||e=="left"&&t||e=="right"&&!t?i={overlayX:"end",overlayY:"center"}:(e=="after"||e=="right"&&t||e=="left"&&!t)&&(i={overlayX:"start",overlayY:"center"});let{x:r,y:a}=this._invertPosition(i.overlayX,i.overlayY);return {main:i,fallback:{overlayX:r,overlayY:a}}}_updateTooltipMessage(){this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),PE(()=>{this._tooltipInstance&&this._overlayRef.updatePosition();},{injector:this._injector}));}_setTooltipClass(t){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=t instanceof Set?Array.from(t):t,this._tooltipInstance._markForCheck());}_invertPosition(t,e){return this.position==="above"||this.position==="below"?e==="top"?e="bottom":e==="bottom"&&(e="top"):t==="end"?t="start":t==="start"&&(t="end"),{x:t,y:e}}_updateCurrentPositionClass(t){let{overlayY:e,originX:i,originY:r}=t,a;if(e==="center"?this._dir&&this._dir.value==="rtl"?a=i==="end"?"left":"right":a=i==="start"?"left":"right":a=e==="bottom"&&r==="top"?"above":"below",a!==this._currentPosition){let A=this._overlayRef;if(A){let ut=`${this._cssClassPrefix}-${Ht}-`;A.removePanelClass(ut+this._currentPosition),A.addPanelClass(ut+a);}this._currentPosition=a;}}_setupPointerEnterEventsIfNeeded(){this._disabled||!this.message||!this._viewInitialized||this._eventCleanups.length||(this._isTouchPlatform()?this.touchGestures!=="off"&&(this._disableNativeGesturesIfNecessary(),this._addListener("touchstart",t=>{let e=t.targetTouches?.[0],i=e?{x:e.clientX,y:e.clientY}:void 0;this._setupPointerExitEventsIfNeeded(),this._touchstartTimeout&&clearTimeout(this._touchstartTimeout);let r=500;this._touchstartTimeout=setTimeout(()=>{this._touchstartTimeout=null,this.show(void 0,i);},this._defaultOptions?.touchLongPressShowDelay??r);})):this._addListener("mouseenter",t=>{this._setupPointerExitEventsIfNeeded();let e;t.x!==void 0&&t.y!==void 0&&(e=t),this.show(void 0,e);}));}_setupPointerExitEventsIfNeeded(){if(!this._pointerExitEventsInitialized){if(this._pointerExitEventsInitialized=true,!this._isTouchPlatform())this._addListener("mouseleave",t=>{let e=t.relatedTarget;(!e||!this._overlayRef?.overlayElement.contains(e))&&this.hide();}),this._addListener("wheel",t=>{if(this._isTooltipVisible()){let e=this._document.elementFromPoint(t.clientX,t.clientY),i=this._elementRef.nativeElement;e!==i&&!i.contains(e)&&this.hide();}});else if(this.touchGestures!=="off"){this._disableNativeGesturesIfNecessary();let t=()=>{this._touchstartTimeout&&clearTimeout(this._touchstartTimeout),this.hide(this._defaultOptions?.touchendHideDelay);};this._addListener("touchend",t),this._addListener("touchcancel",t);}}}_addListener(t,e){this._eventCleanups.push(this._renderer.listen(this._elementRef.nativeElement,t,e,Kt));}_isTouchPlatform(){let t=this._defaultOptions?.detectHoverCapability;return typeof t=="function"?!t():this._platform.IOS||this._platform.ANDROID?true:this._platform.isBrowser?!!t&&this._mediaMatcher.matchMedia("(any-hover: none)").matches:false}_disableNativeGesturesIfNecessary(){let t=this.touchGestures;if(t!=="off"){let e=this._elementRef.nativeElement,i=e.style;(t==="on"||e.nodeName!=="INPUT"&&e.nodeName!=="TEXTAREA")&&(i.userSelect=i.msUserSelect=i.webkitUserSelect=i.MozUserSelect="none"),(t==="on"||!e.draggable)&&(i.webkitUserDrag="none"),i.touchAction="none",i.webkitTapHighlightColor="transparent";}}_syncAriaDescription(t){this._ariaDescriptionPending||(this._ariaDescriptionPending=true,this._ariaDescriber.removeDescription(this._elementRef.nativeElement,t,"tooltip"),this._isDestroyed||PE({write:()=>{this._ariaDescriptionPending=false,this.message&&!this.disabled&&this._ariaDescriber.describe(this._elementRef.nativeElement,this.message,"tooltip");}},{injector:this._injector}));}_overlayEventPredicate=t=>t.type==="keydown"?this._isTooltipVisible()&&t.keyCode===27&&!Ve$1(t):true;static \u0275fac=function(e){return new(e||n)};static \u0275dir=Bs({type:n,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],hostVars:2,hostBindings:function(e,i){e&2&&qg("mat-mdc-tooltip-disabled",i.disabled);},inputs:{position:[0,"matTooltipPosition","position"],positionAtOrigin:[0,"matTooltipPositionAtOrigin","positionAtOrigin"],disabled:[0,"matTooltipDisabled","disabled"],showDelay:[0,"matTooltipShowDelay","showDelay"],hideDelay:[0,"matTooltipHideDelay","hideDelay"],touchGestures:[0,"matTooltipTouchGestures","touchGestures"],message:[0,"matTooltip","message"],tooltipClass:[0,"matTooltipClass","tooltipClass"]},exportAs:["matTooltip"]})}return n})(),Gt=(()=>{class n{_changeDetectorRef=g(bl);_elementRef=g(Xt$1);_isMultiline=false;message;tooltipClass;_showTimeoutId;_hideTimeoutId;_triggerElement;_mouseLeaveHideDelay;_animationsDisabled=K();_tooltip;_closeOnInteraction=false;_isVisible=false;_onHide=new ue;_showAnimation="mat-mdc-tooltip-show";_hideAnimation="mat-mdc-tooltip-hide";show(t){this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=setTimeout(()=>{this._toggleVisibility(true),this._showTimeoutId=void 0;},t);}hide(t){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId=setTimeout(()=>{this._toggleVisibility(false),this._hideTimeoutId=void 0;},t);}afterHidden(){return this._onHide}isVisible(){return this._isVisible}ngOnDestroy(){this._cancelPendingAnimations(),this._onHide.complete(),this._triggerElement=null;}_handleBodyInteraction(){this._closeOnInteraction&&this.hide(0);}_markForCheck(){this._changeDetectorRef.markForCheck();}_handleMouseLeave({relatedTarget:t}){(!t||!this._triggerElement.contains(t))&&(this.isVisible()?this.hide(this._mouseLeaveHideDelay):this._finalizeAnimation(false));}_onShow(){this._isMultiline=this._isTooltipMultiline(),this._markForCheck();}_isTooltipMultiline(){let t=this._elementRef.nativeElement.getBoundingClientRect();return t.height>ee&&t.width>=ie}_handleAnimationEnd({animationName:t}){(t===this._showAnimation||t===this._hideAnimation)&&this._finalizeAnimation(t===this._showAnimation);}_cancelPendingAnimations(){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=this._hideTimeoutId=void 0;}_finalizeAnimation(t){t?this._closeOnInteraction=true:this.isVisible()||this._onHide.next();}_toggleVisibility(t){let e=this._tooltip.nativeElement,i=this._showAnimation,r=this._hideAnimation;if(e.classList.remove(t?r:i),e.classList.add(t?i:r),this._isVisible!==t&&(this._isVisible=t,this._changeDetectorRef.markForCheck()),t&&!this._animationsDisabled&&typeof getComputedStyle=="function"){let a=getComputedStyle(e);(a.getPropertyValue("animation-duration")==="0s"||a.getPropertyValue("animation-name")==="none")&&(this._animationsDisabled=true);}t&&this._onShow(),this._animationsDisabled&&(e.classList.add("_mat-animation-noopable"),this._finalizeAnimation(t));}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=jw({type:n,selectors:[["mat-tooltip-component"]],viewQuery:function(e,i){if(e&1&&Hg(Xt,7),e&2){let r;MC(r=NC())&&(i._tooltip=r.first);}},hostAttrs:["aria-hidden","true"],hostBindings:function(e,i){e&1&&Lg("mouseleave",function(a){return i._handleMouseLeave(a)});},decls:4,vars:5,consts:[["tooltip",""],[1,"mdc-tooltip","mat-mdc-tooltip",3,"animationend"],[1,"mat-mdc-tooltip-surface","mdc-tooltip__surface"]],template:function(e,i){e&1&&(gl(0,"div",1,0),jg("animationend",function(a){return i._handleAnimationEnd(a)}),gl(2,"div",2),JC(3),ml()()),e&2&&(UC(i.tooltipClass),qg("mdc-tooltip--multiline",i._isMultiline),sI(3),em(i.message));},styles:[`.mat-mdc-tooltip {
2
2
  position: relative;
3
3
  transform: scale(0);
4
4
  display: inline-flex;
@@ -1 +1 @@
1
- import {O}from'./chunk-DwQ0v-xH.js';import {g,ao as V$1,G as G$1,C as Ce,da as M,aJ as Tr,W as Wi,bS as Da,S as Wy,a7 as va,X as br,r as re,b as U$1,j as jw,aK as Lb,k as Cs,bf as gT,n as Lg,J as JC,m as hl,af as bg,t as AC,x as xg,bg as yT,ah as dT,o as aC,ac as CC,v as cC,a9 as vC,aa as Sf,ab as _f,ag as ET}from'./main-JTU33H5D.js';import {W as Wn}from'./chunk-DeXXr4BL.js';import'./chunk-DK1hp0WW.js';import'./chunk-DuXr-yGB.js';var U=()=>[];function V(i,t){if(i&1){let n=vC();Cs(0,"agentos-agent-config-item",4),Lg("deleteRequested",function(o){Sf(n);let F=CC(2);return _f(F.deleteConfig(o))}),hl();}if(i&2){let n=CC().$implicit,e=CC();xg("config",t)("namespaceId",e.namespaceId)("readOnly",e.isPlatformConfig(n.id));}}function j(i,t){if(i&1&&aC(0,V,1,3,"agentos-agent-config-item",3),i&2){let n,e=t.$implicit,o=CC();cC((n=o.resolveConfig(e.id))?0:-1,n);}}var G="namespace",K="platform",q=class i{route=g(V$1);router=g(G$1);destroyRef=g(Ce);agentConfigController=g(M);namespaceId=this.route.snapshot.params.namespaceId;refresh$=new Tr(void 0);isLoading=Wi(true);allConfigs$=this.refresh$.pipe(Da(()=>(this.isLoading.set(true),Wy({namespace:this.agentConfigController.listByParentAgentConfig(this.namespaceId),platform:this.agentConfigController.listPlatformAgentsAgentConfig().pipe(va(()=>br([])))}))));configItems$=this.allConfigs$.pipe(re(({namespace:t,platform:n})=>[...n.map(e=>({id:e.id??"",name:e.name,description:e.description,groupKey:K,groupLabel:"Platform (read-only)"})),...t.map(e=>({id:e.id??"",name:e.name,description:e.description,groupKey:G,groupLabel:"Namespace"}))]));namespaceConfigsById=new Map;platformConfigsById=new Map;constructor(){this.allConfigs$.pipe(U$1(this.destroyRef)).subscribe({next:({namespace:t,platform:n})=>{this.namespaceConfigsById=new Map(t.map(e=>[e.id??"",e])),this.platformConfigsById=new Map(n.map(e=>[e.id??"",e])),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}goBack(){this.router.navigate(["/agentos","namespaces"]);}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"agent-configs","new"]);}deleteConfig(t){this.agentConfigController.deleteAgentConfig(t.id??"").pipe(U$1(this.destroyRef)).subscribe(()=>this.refresh$.next());}resolveConfig(t){return this.namespaceConfigsById.get(t)??this.platformConfigsById.get(t)??null}isPlatformConfig(t){return this.platformConfigsById.has(t)}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=jw({type:i,selectors:[["agentos-namespace-agent-configs"]],decls:6,vars:7,consts:[["agentConfigItemTpl",""],["title","Agent Configs","emptyMessage","No agent configs defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","loading","showCreate","itemTemplate"],["toolbar-start","","type","button",1,"namespace-agent-configs__back",3,"click"],[3,"config","namespaceId","readOnly"],[3,"deleteRequested","config","namespaceId","readOnly"]],template:function(n,e){if(n&1&&(Cs(0,"ds-entity-list",1),gT(1,"async"),Lg("createRequested",function(){return e.openCreateForm()}),Cs(2,"button",2),Lg("click",function(){return e.goBack()}),JC(3," \u2190 Namespaces "),hl()(),bg(4,j,1,1,"ng-template",null,0,ET)),n&2){let o=AC(5);xg("items",yT(1,4,e.configItems$)??dT(6,U))("loading",e.isLoading())("showCreate",true)("itemTemplate",o);}},dependencies:[Wn,O,Lb],styles:[".namespace-agent-configs__back[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.namespace-agent-configs__back[_ngcontent-%COMP%]:hover{text-decoration:underline}"]})};export{q as NamespaceAgentConfigsComponent};
1
+ import {O}from'./chunk-BorcVzNx.js';import {g,ao as V$1,G as G$1,C as Ce,da as M,aJ as Tr,W as Wi,bS as Da,S as Wy,a7 as va,X as br,r as re,b as U$1,j as jw,aK as Lb,k as Cs,bf as gT,n as Lg,J as JC,m as hl,af as bg,t as AC,x as xg,bg as yT,ah as dT,o as aC,ac as CC,v as cC,a9 as vC,aa as Sf,ab as _f,ag as ET}from'./main-4LGWVPVH.js';import {W as Wn}from'./chunk-CmWqV8dc.js';import'./chunk-B2UoGfZ3.js';import'./chunk-CPuMGlfm.js';var U=()=>[];function V(i,t){if(i&1){let n=vC();Cs(0,"agentos-agent-config-item",4),Lg("deleteRequested",function(o){Sf(n);let F=CC(2);return _f(F.deleteConfig(o))}),hl();}if(i&2){let n=CC().$implicit,e=CC();xg("config",t)("namespaceId",e.namespaceId)("readOnly",e.isPlatformConfig(n.id));}}function j(i,t){if(i&1&&aC(0,V,1,3,"agentos-agent-config-item",3),i&2){let n,e=t.$implicit,o=CC();cC((n=o.resolveConfig(e.id))?0:-1,n);}}var G="namespace",K="platform",q=class i{route=g(V$1);router=g(G$1);destroyRef=g(Ce);agentConfigController=g(M);namespaceId=this.route.snapshot.params.namespaceId;refresh$=new Tr(void 0);isLoading=Wi(true);allConfigs$=this.refresh$.pipe(Da(()=>(this.isLoading.set(true),Wy({namespace:this.agentConfigController.listByParentAgentConfig(this.namespaceId),platform:this.agentConfigController.listPlatformAgentsAgentConfig().pipe(va(()=>br([])))}))));configItems$=this.allConfigs$.pipe(re(({namespace:t,platform:n})=>[...n.map(e=>({id:e.id??"",name:e.name,description:e.description,groupKey:K,groupLabel:"Platform (read-only)"})),...t.map(e=>({id:e.id??"",name:e.name,description:e.description,groupKey:G,groupLabel:"Namespace"}))]));namespaceConfigsById=new Map;platformConfigsById=new Map;constructor(){this.allConfigs$.pipe(U$1(this.destroyRef)).subscribe({next:({namespace:t,platform:n})=>{this.namespaceConfigsById=new Map(t.map(e=>[e.id??"",e])),this.platformConfigsById=new Map(n.map(e=>[e.id??"",e])),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}goBack(){this.router.navigate(["/agentos","namespaces"]);}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"agent-configs","new"]);}deleteConfig(t){this.agentConfigController.deleteAgentConfig(t.id??"").pipe(U$1(this.destroyRef)).subscribe(()=>this.refresh$.next());}resolveConfig(t){return this.namespaceConfigsById.get(t)??this.platformConfigsById.get(t)??null}isPlatformConfig(t){return this.platformConfigsById.has(t)}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=jw({type:i,selectors:[["agentos-namespace-agent-configs"]],decls:6,vars:7,consts:[["agentConfigItemTpl",""],["title","Agent Configs","emptyMessage","No agent configs defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","loading","showCreate","itemTemplate"],["toolbar-start","","type","button",1,"namespace-agent-configs__back",3,"click"],[3,"config","namespaceId","readOnly"],[3,"deleteRequested","config","namespaceId","readOnly"]],template:function(n,e){if(n&1&&(Cs(0,"ds-entity-list",1),gT(1,"async"),Lg("createRequested",function(){return e.openCreateForm()}),Cs(2,"button",2),Lg("click",function(){return e.goBack()}),JC(3," \u2190 Namespaces "),hl()(),bg(4,j,1,1,"ng-template",null,0,ET)),n&2){let o=AC(5);xg("items",yT(1,4,e.configItems$)??dT(6,U))("loading",e.isLoading())("showCreate",true)("itemTemplate",o);}},dependencies:[Wn,O,Lb],styles:[".namespace-agent-configs__back[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.namespace-agent-configs__back[_ngcontent-%COMP%]:hover{text-decoration:underline}"]})};export{q as NamespaceAgentConfigsComponent};
@@ -1 +1 @@
1
- import {I}from'./chunk-C2agnPiQ.js';import {g,ao as V$1,G as G$1,C as Ce,dm as $,df as U$1,aJ as Tr,W as Wi,bS as Da,S as Wy,a7 as va,X as br,r as re,b as U$2,j as jw,aK as Lb,k as Cs,bf as gT,n as Lg,m as hl,af as bg,t as AC,x as xg,bg as yT,ah as dT,o as aC,ac as CC,v as cC,a9 as vC,aa as Sf,ab as _f,ag as ET}from'./main-JTU33H5D.js';import {W as Wn,S as Se}from'./chunk-DeXXr4BL.js';import'./chunk-DK1hp0WW.js';import'./chunk-DuXr-yGB.js';var K=()=>[];function U(n,o){if(n&1){let i=vC();Cs(0,"agentos-ai-model-item",4),Lg("deleteRequested",function(a){Sf(i);let t=CC(2);return _f(t.deleteModel(a))})("editRequested",function(a){Sf(i);let t=CC(2);return _f(t.editModel(a))}),hl();}if(n&2){let i=CC().$implicit,e=CC();xg("model",o)("namespaceId",e.namespaceId)("readOnly",e.isPlatformModel(i.id));}}function j(n,o){if(n&1&&aC(0,U,1,3,"agentos-ai-model-item",3),n&2){let i,e=o.$implicit,a=CC();cC((i=a.resolveModel(e.id))?0:-1,i);}}var G="__platform__",J="Platform (read-only)",V=class n{route=g(V$1);router=g(G$1);destroyRef=g(Ce);aiModelController=g($);aiProviderController=g(U$1);namespaceId=this.route.snapshot.params.namespaceId;refresh$=new Tr(void 0);isLoading=Wi(true);data$=this.refresh$.pipe(Da(()=>(this.isLoading.set(true),Wy({namespace:this.aiModelController.listByNamespaceIdAiModel(this.namespaceId),platform:this.aiModelController.listPlatformLevelAiModel().pipe(va(()=>br([]))),providers:this.aiProviderController.listAiProvider(this.namespaceId)}))));modelItems$=this.data$.pipe(re(({namespace:o,platform:i,providers:e})=>{let a=new Map(e.map(t=>[t.id??"",t.name]));return [...i.map(t=>({id:t.id??"",name:t.alias??t.apiModelName,description:t.apiModelName,groupKey:G,groupLabel:J})),...o.map(t=>({id:t.id??"",name:t.alias??t.apiModelName,description:t.apiModelName,groupKey:t.aiProviderId,groupLabel:a.get(t.aiProviderId)??t.aiProviderId}))]}));namespaceModelsById=new Map;platformModelsById=new Map;constructor(){this.data$.pipe(U$2(this.destroyRef)).subscribe({next:({namespace:o,platform:i})=>{this.namespaceModelsById=new Map(o.map(e=>[e.id??"",e])),this.platformModelsById=new Map(i.map(e=>[e.id??"",e])),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}goBack(){this.router.navigate(["/agentos","namespaces"]);}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"ai-models","new"]);}editModel(o){this.router.navigate(["/agentos",this.namespaceId,"ai-models",o.id,"edit"]);}deleteModel(o){this.aiModelController.deleteAiModel(o.id??"").pipe(U$2(this.destroyRef)).subscribe(()=>this.refresh$.next());}resolveModel(o){return this.namespaceModelsById.get(o)??this.platformModelsById.get(o)??null}isPlatformModel(o){return this.platformModelsById.has(o)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=jw({type:n,selectors:[["agentos-namespace-ai-models"]],decls:5,vars:7,consts:[["aiModelItemTpl",""],["title","AI models","emptyMessage","No AI models configured yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","loading","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[3,"model","namespaceId","readOnly"],[3,"deleteRequested","editRequested","model","namespaceId","readOnly"]],template:function(i,e){if(i&1&&(Cs(0,"ds-entity-list",1),gT(1,"async"),Lg("createRequested",function(){return e.openCreateForm()}),Cs(2,"ds-icon-button",2),Lg("action",function(){return e.goBack()}),hl()(),bg(3,j,1,1,"ng-template",null,0,ET)),i&2){let a=AC(4);xg("items",yT(1,4,e.modelItems$)??dT(6,K))("loading",e.isLoading())("showCreate",true)("itemTemplate",a);}},dependencies:[Wn,I,Se,Lb],encapsulation:2})};export{V as NamespaceAiModelsComponent};
1
+ import {I}from'./chunk-DEUnwPWC.js';import {g,ao as V$1,G as G$1,C as Ce,dm as $,df as U$1,aJ as Tr,W as Wi,bS as Da,S as Wy,a7 as va,X as br,r as re,b as U$2,j as jw,aK as Lb,k as Cs,bf as gT,n as Lg,m as hl,af as bg,t as AC,x as xg,bg as yT,ah as dT,o as aC,ac as CC,v as cC,a9 as vC,aa as Sf,ab as _f,ag as ET}from'./main-4LGWVPVH.js';import {W as Wn,S as Se}from'./chunk-CmWqV8dc.js';import'./chunk-B2UoGfZ3.js';import'./chunk-CPuMGlfm.js';var K=()=>[];function U(n,o){if(n&1){let i=vC();Cs(0,"agentos-ai-model-item",4),Lg("deleteRequested",function(a){Sf(i);let t=CC(2);return _f(t.deleteModel(a))})("editRequested",function(a){Sf(i);let t=CC(2);return _f(t.editModel(a))}),hl();}if(n&2){let i=CC().$implicit,e=CC();xg("model",o)("namespaceId",e.namespaceId)("readOnly",e.isPlatformModel(i.id));}}function j(n,o){if(n&1&&aC(0,U,1,3,"agentos-ai-model-item",3),n&2){let i,e=o.$implicit,a=CC();cC((i=a.resolveModel(e.id))?0:-1,i);}}var G="__platform__",J="Platform (read-only)",V=class n{route=g(V$1);router=g(G$1);destroyRef=g(Ce);aiModelController=g($);aiProviderController=g(U$1);namespaceId=this.route.snapshot.params.namespaceId;refresh$=new Tr(void 0);isLoading=Wi(true);data$=this.refresh$.pipe(Da(()=>(this.isLoading.set(true),Wy({namespace:this.aiModelController.listByNamespaceIdAiModel(this.namespaceId),platform:this.aiModelController.listPlatformLevelAiModel().pipe(va(()=>br([]))),providers:this.aiProviderController.listAiProvider(this.namespaceId)}))));modelItems$=this.data$.pipe(re(({namespace:o,platform:i,providers:e})=>{let a=new Map(e.map(t=>[t.id??"",t.name]));return [...i.map(t=>({id:t.id??"",name:t.alias??t.apiModelName,description:t.apiModelName,groupKey:G,groupLabel:J})),...o.map(t=>({id:t.id??"",name:t.alias??t.apiModelName,description:t.apiModelName,groupKey:t.aiProviderId,groupLabel:a.get(t.aiProviderId)??t.aiProviderId}))]}));namespaceModelsById=new Map;platformModelsById=new Map;constructor(){this.data$.pipe(U$2(this.destroyRef)).subscribe({next:({namespace:o,platform:i})=>{this.namespaceModelsById=new Map(o.map(e=>[e.id??"",e])),this.platformModelsById=new Map(i.map(e=>[e.id??"",e])),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}goBack(){this.router.navigate(["/agentos","namespaces"]);}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"ai-models","new"]);}editModel(o){this.router.navigate(["/agentos",this.namespaceId,"ai-models",o.id,"edit"]);}deleteModel(o){this.aiModelController.deleteAiModel(o.id??"").pipe(U$2(this.destroyRef)).subscribe(()=>this.refresh$.next());}resolveModel(o){return this.namespaceModelsById.get(o)??this.platformModelsById.get(o)??null}isPlatformModel(o){return this.platformModelsById.has(o)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=jw({type:n,selectors:[["agentos-namespace-ai-models"]],decls:5,vars:7,consts:[["aiModelItemTpl",""],["title","AI models","emptyMessage","No AI models configured yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","loading","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[3,"model","namespaceId","readOnly"],[3,"deleteRequested","editRequested","model","namespaceId","readOnly"]],template:function(i,e){if(i&1&&(Cs(0,"ds-entity-list",1),gT(1,"async"),Lg("createRequested",function(){return e.openCreateForm()}),Cs(2,"ds-icon-button",2),Lg("action",function(){return e.goBack()}),hl()(),bg(3,j,1,1,"ng-template",null,0,ET)),i&2){let a=AC(4);xg("items",yT(1,4,e.modelItems$)??dT(6,K))("loading",e.isLoading())("showCreate",true)("itemTemplate",a);}},dependencies:[Wn,I,Se,Lb],encapsulation:2})};export{V as NamespaceAiModelsComponent};
@@ -1 +1 @@
1
- import {n}from'./chunk-CfgXrte_.js';import {O}from'./chunk-DIuETvVC.js';import {S}from'./chunk-Co5BFbll.js';import {v}from'./chunk-D4_R7aqN.js';import {g,ao as V,G,C as Ce,W as Wi,r as re,b as U$1,bS as Da,X as br,j as jw,aK as Lb,k as Cs,bf as gT,n as Lg,m as hl,af as bg,t as AC,x as xg,bg as yT,ah as dT,o as aC,ac as CC,v as cC,J as JC,u as sI,a8 as em,a9 as vC,aa as Sf,ab as _f,ag as ET}from'./main-JTU33H5D.js';import'./chunk-C1RU8zia.js';import {W as Wn,S as Se}from'./chunk-DeXXr4BL.js';import'./chunk-DK1hp0WW.js';import'./chunk-DuXr-yGB.js';import'./chunk-TkSR4UzV.js';import'./chunk-BK_05kmN.js';var z=()=>[];function W(r,e){if(r&1&&(Cs(0,"p",3),JC(1),hl()),r&2){let t=CC().$implicit;sI(),em(t.name);}}function U(r,e){if(r&1){let t=vC();Cs(0,"agentos-ai-provider-item",5),Lg("editRequested",function(){let o=Sf(t),a=CC(2);return _f(a.onEdit(o))})("deleteRequested",function(){let o=Sf(t),a=CC(2);return _f(a.onDelete(o))})("duplicateRequested",function(){let o=Sf(t),a=CC(2);return _f(a.onDuplicate(o))}),hl();}if(r&2){let t=e,i=CC(2);xg("config",t.config)("scope",t.scope)("readOnly",t.scope==="platform"||t.scope==="namespace"&&!i.isAdmin());}}function X(r,e){if(r&1&&aC(0,W,2,1,"p",3)(1,U,1,3,"agentos-ai-provider-item",4),r&2){let t,i=e.$implicit,o=CC();cC(o.isEmptyPlaceholder(i.id)?0:(t=o.resolve(i.id))?1:-1,t);}}var k=Object.freeze({platform:"Platform (read-only)",namespace:"AI Providers du namespace",userOnNs:"Mes overrides sur ce namespace",userGlobal:"Mes overrides globaux"}),F="__empty__",j=class r{route=g(V);router=g(G);destroyRef=g(Ce);state=g(O);namespaceRole=g(v);namespaceId=this.route.snapshot.params.namespaceId;isAdmin=Wi(false);listItems$=this.state.vm$.pipe(re(e=>this.toListItems(e)));isLoading=Wi(true);resolved=new Map;ngOnInit(){this.route.paramMap.pipe(U$1(this.destroyRef)).subscribe(e=>{let t=e.get("namespaceId")??"";t&&t!==this.namespaceId&&(this.namespaceId=t),this.state.setNamespace(t);}),this.route.paramMap.pipe(re(e=>e.get("namespaceId")??""),Da(e=>e?this.namespaceRole.isAdminOfNamespace$(e):br(false)),U$1(this.destroyRef)).subscribe(e=>this.isAdmin.set(e)),this.state.vm$.pipe(U$1(this.destroyRef)).subscribe(e=>{this.isLoading.set(false);let t=new Map;e.platform.forEach(i=>{i.id&&t.set(this.itemKey("platform",i.id),{config:i,scope:"platform"});}),e.namespace.forEach(i=>{i.id&&t.set(this.itemKey("namespace",i.id),{config:i,scope:"namespace"});}),e.userOnNs.forEach(i=>{i.id&&t.set(this.itemKey("userOnNs",i.id),{config:i,scope:"userOnNs"});}),e.userGlobal.forEach(i=>{i.id&&t.set(this.itemKey("userGlobal",i.id),{config:i,scope:"userGlobal"});}),this.resolved=t;});}isEmptyPlaceholder(e){return e.startsWith(F)}resolve(e){return this.resolved.get(e)??null}itemKey(e,t){return `${e}:${t}`}goBack(){this.router.navigate(["/agentos","namespaces"]);}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"ai-providers","new"],{queryParams:{scope:n(this.isAdmin())}});}onEdit(e){let t=e.config.id;t&&this.router.navigate(["/agentos",this.namespaceId,"ai-providers",t,"edit"],{queryParams:{scope:e.scope}});}onDelete(e){let t=e.config.id;t&&this.state.delete(t,e.scope).pipe(U$1(this.destroyRef)).subscribe({error:i=>{console.error(`[AiProvidersAllScopes] Delete failed for ${e.scope}:${t}:`,i);}});}onDuplicate(e){if(!e.config.id)return;let t=e.scope==="namespace"&&!this.isAdmin()?"userOnNs":e.scope;this.router.navigate(["/agentos",this.namespaceId,"ai-providers","new"],{queryParams:{scope:t,template:e.config.id,templateScope:e.scope}});}toListItems(e){let t=[];return t.push(...this.sectionItems("platform",e.platform)),t.push(...this.sectionItems("namespace",e.namespace)),t.push(...this.sectionItems("userOnNs",e.userOnNs)),t.push(...this.sectionItems("userGlobal",e.userGlobal)),t}sectionItems(e,t){return t.length===0?[{id:`${F}${e}`,name:"Aucun AI Provider",groupKey:e,groupLabel:k[e]}]:t.filter(i=>!!i.id).map(i=>({id:this.itemKey(e,i.id),name:i.name,description:i.apiType,groupKey:e,groupLabel:k[e]}))}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=jw({type:r,selectors:[["agentos-ai-providers-all-scopes"]],decls:5,vars:7,consts:[["aiProviderItemTpl",""],["title","AI Providers","emptyMessage","No AI providers available.","cardMinWidth","400px",3,"createRequested","items","loading","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[1,"ai-providers-all-scopes__empty"],[3,"config","scope","readOnly"],[3,"editRequested","deleteRequested","duplicateRequested","config","scope","readOnly"]],template:function(t,i){if(t&1&&(Cs(0,"ds-entity-list",1),gT(1,"async"),Lg("createRequested",function(){return i.openCreateForm()}),Cs(2,"ds-icon-button",2),Lg("action",function(){return i.goBack()}),hl()(),bg(3,X,2,1,"ng-template",null,0,ET)),t&2){let o=AC(4);xg("items",yT(1,4,i.listItems$)??dT(6,z))("loading",i.isLoading())("showCreate",true)("itemTemplate",o);}},dependencies:[Wn,S,Se,Lb],styles:[".ai-providers-all-scopes__empty[_ngcontent-%COMP%]{font-size:.85rem;color:var(--color-text-secondary);padding:.5rem .25rem;margin:0;font-style:italic}"]})};export{j as AiProvidersAllScopesComponent};
1
+ import {n}from'./chunk-CfgXrte_.js';import {O}from'./chunk-CBsoAXBW.js';import {S}from'./chunk-CIFgO2HT.js';import {v}from'./chunk-OpIcFxMt.js';import {g,ao as V,G,C as Ce,W as Wi,r as re,b as U$1,bS as Da,X as br,j as jw,aK as Lb,k as Cs,bf as gT,n as Lg,m as hl,af as bg,t as AC,x as xg,bg as yT,ah as dT,o as aC,ac as CC,v as cC,J as JC,u as sI,a8 as em,a9 as vC,aa as Sf,ab as _f,ag as ET}from'./main-4LGWVPVH.js';import'./chunk-BaAG5SRs.js';import {W as Wn,S as Se}from'./chunk-CmWqV8dc.js';import'./chunk-B2UoGfZ3.js';import'./chunk-CPuMGlfm.js';import'./chunk-CCSxTkZ-.js';import'./chunk-6ZQ87jQV.js';var z=()=>[];function W(r,e){if(r&1&&(Cs(0,"p",3),JC(1),hl()),r&2){let t=CC().$implicit;sI(),em(t.name);}}function U(r,e){if(r&1){let t=vC();Cs(0,"agentos-ai-provider-item",5),Lg("editRequested",function(){let o=Sf(t),a=CC(2);return _f(a.onEdit(o))})("deleteRequested",function(){let o=Sf(t),a=CC(2);return _f(a.onDelete(o))})("duplicateRequested",function(){let o=Sf(t),a=CC(2);return _f(a.onDuplicate(o))}),hl();}if(r&2){let t=e,i=CC(2);xg("config",t.config)("scope",t.scope)("readOnly",t.scope==="platform"||t.scope==="namespace"&&!i.isAdmin());}}function X(r,e){if(r&1&&aC(0,W,2,1,"p",3)(1,U,1,3,"agentos-ai-provider-item",4),r&2){let t,i=e.$implicit,o=CC();cC(o.isEmptyPlaceholder(i.id)?0:(t=o.resolve(i.id))?1:-1,t);}}var k=Object.freeze({platform:"Platform (read-only)",namespace:"AI Providers du namespace",userOnNs:"Mes overrides sur ce namespace",userGlobal:"Mes overrides globaux"}),F="__empty__",j=class r{route=g(V);router=g(G);destroyRef=g(Ce);state=g(O);namespaceRole=g(v);namespaceId=this.route.snapshot.params.namespaceId;isAdmin=Wi(false);listItems$=this.state.vm$.pipe(re(e=>this.toListItems(e)));isLoading=Wi(true);resolved=new Map;ngOnInit(){this.route.paramMap.pipe(U$1(this.destroyRef)).subscribe(e=>{let t=e.get("namespaceId")??"";t&&t!==this.namespaceId&&(this.namespaceId=t),this.state.setNamespace(t);}),this.route.paramMap.pipe(re(e=>e.get("namespaceId")??""),Da(e=>e?this.namespaceRole.isAdminOfNamespace$(e):br(false)),U$1(this.destroyRef)).subscribe(e=>this.isAdmin.set(e)),this.state.vm$.pipe(U$1(this.destroyRef)).subscribe(e=>{this.isLoading.set(false);let t=new Map;e.platform.forEach(i=>{i.id&&t.set(this.itemKey("platform",i.id),{config:i,scope:"platform"});}),e.namespace.forEach(i=>{i.id&&t.set(this.itemKey("namespace",i.id),{config:i,scope:"namespace"});}),e.userOnNs.forEach(i=>{i.id&&t.set(this.itemKey("userOnNs",i.id),{config:i,scope:"userOnNs"});}),e.userGlobal.forEach(i=>{i.id&&t.set(this.itemKey("userGlobal",i.id),{config:i,scope:"userGlobal"});}),this.resolved=t;});}isEmptyPlaceholder(e){return e.startsWith(F)}resolve(e){return this.resolved.get(e)??null}itemKey(e,t){return `${e}:${t}`}goBack(){this.router.navigate(["/agentos","namespaces"]);}openCreateForm(){this.router.navigate(["/agentos",this.namespaceId,"ai-providers","new"],{queryParams:{scope:n(this.isAdmin())}});}onEdit(e){let t=e.config.id;t&&this.router.navigate(["/agentos",this.namespaceId,"ai-providers",t,"edit"],{queryParams:{scope:e.scope}});}onDelete(e){let t=e.config.id;t&&this.state.delete(t,e.scope).pipe(U$1(this.destroyRef)).subscribe({error:i=>{console.error(`[AiProvidersAllScopes] Delete failed for ${e.scope}:${t}:`,i);}});}onDuplicate(e){if(!e.config.id)return;let t=e.scope==="namespace"&&!this.isAdmin()?"userOnNs":e.scope;this.router.navigate(["/agentos",this.namespaceId,"ai-providers","new"],{queryParams:{scope:t,template:e.config.id,templateScope:e.scope}});}toListItems(e){let t=[];return t.push(...this.sectionItems("platform",e.platform)),t.push(...this.sectionItems("namespace",e.namespace)),t.push(...this.sectionItems("userOnNs",e.userOnNs)),t.push(...this.sectionItems("userGlobal",e.userGlobal)),t}sectionItems(e,t){return t.length===0?[{id:`${F}${e}`,name:"Aucun AI Provider",groupKey:e,groupLabel:k[e]}]:t.filter(i=>!!i.id).map(i=>({id:this.itemKey(e,i.id),name:i.name,description:i.apiType,groupKey:e,groupLabel:k[e]}))}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=jw({type:r,selectors:[["agentos-ai-providers-all-scopes"]],decls:5,vars:7,consts:[["aiProviderItemTpl",""],["title","AI Providers","emptyMessage","No AI providers available.","cardMinWidth","400px",3,"createRequested","items","loading","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[1,"ai-providers-all-scopes__empty"],[3,"config","scope","readOnly"],[3,"editRequested","deleteRequested","duplicateRequested","config","scope","readOnly"]],template:function(t,i){if(t&1&&(Cs(0,"ds-entity-list",1),gT(1,"async"),Lg("createRequested",function(){return i.openCreateForm()}),Cs(2,"ds-icon-button",2),Lg("action",function(){return i.goBack()}),hl()(),bg(3,X,2,1,"ng-template",null,0,ET)),t&2){let o=AC(4);xg("items",yT(1,4,i.listItems$)??dT(6,z))("loading",i.isLoading())("showCreate",true)("itemTemplate",o);}},dependencies:[Wn,S,Se,Lb],styles:[".ai-providers-all-scopes__empty[_ngcontent-%COMP%]{font-size:.85rem;color:var(--color-text-secondary);padding:.5rem .25rem;margin:0;font-style:italic}"]})};export{j as AiProvidersAllScopesComponent};
@@ -1 +1 @@
1
- import {c}from'./chunk-C1RU8zia.js';import {g,ao as V,dq as G,W as Wi,an as ue$1,cd as Wf,j as jw,s as si,cF as $b,k as Cs,J as JC,m as hl,o as aC,u as sI,v as cC,bR as Sd,bS as Da,cB as on,S as Wy,a7 as va,a9 as vC,n as Lg,ai as sm,a3 as ZI,ac as CC,ak as im,a6 as QI,a8 as em,q as dC,w as fC,cg as pT,b4 as fT,bf as gT,bg as yT,b0 as tm,bi as vT,aa as Sf,ab as _f,aj as iT,a5 as Dl}from'./main-JTU33H5D.js';import {t as ti,J as Jn,Y as Ye,Z as Zn,l as Xn,g as gt,c as cn,d as an}from'./chunk-DuXr-yGB.js';import'./chunk-BK_05kmN.js';import'./chunk-DeXXr4BL.js';import'./chunk-DK1hp0WW.js';var ne=e=>({title:"By agent",rows:e}),ie=e=>({title:"By model",rows:e}),ae=(e,o)=>[e,o],oe=(e,o)=>o.title,re=(e,o)=>o.key;function se(e,o){e&1&&(Cs(0,"p",2),JC(1,"Loading usage settings\u2026"),hl());}function le(e,o){if(e&1){let t=vC();Cs(0,"p",3),JC(1,"Could not load usage settings. Please try again."),hl(),Cs(2,"button",4),Lg("click",function(){Sf(t);let s=CC();return _f(s.configuration.retry())}),JC(3,"Retry usage settings"),hl();}}function me(e,o){e&1&&(Cs(0,"p",2),JC(1,"Usage tracking is disabled."),hl());}function de(e,o){e&1&&(Cs(0,"p",3),JC(1),hl()),e&2&&(sI(),em(o));}function ce(e,o){e&1&&(Cs(0,"p",2),JC(1,"Loading usage\u2026"),hl());}function pe(e,o){e&1&&(Cs(0,"p"),JC(1,"No recorded usage for this period."),hl());}function ge(e,o){if(e&1&&(Cs(0,"small"),JC(1),hl()),e&2){let t=CC().$implicit;sI(),Dl("",t.aggregate.unknownCostCount," record(s) with unknown cost");}}function ue(e,o){if(e&1&&(Cs(0,"tr")(1,"th",11),JC(2),hl(),Cs(3,"td"),JC(4),gT(5,"number"),hl(),Cs(6,"td"),JC(7),gT(8,"number"),gT(9,"number"),hl(),Cs(10,"td"),JC(11),gT(12,"number"),gT(13,"number"),hl(),Cs(14,"td"),JC(15),gT(16,"number"),aC(17,ge,2,1,"small"),hl()()),e&2){let t=o.$implicit;sI(2),em(t.key),sI(2),em(yT(5,9,t.aggregate.totalTokens)),sI(3),tm("",yT(8,11,t.aggregate.inputTokens)," / ",yT(9,13,t.aggregate.outputTokens)),sI(4),tm(" ",yT(12,15,t.aggregate.cacheReadTokens)," / ",yT(13,17,t.aggregate.cacheWriteTokens)," "),sI(4),tm(" ",t.aggregate.unknownCostCount>0?"At least ":"","",vT(16,19,t.aggregate.cost,"1.2-6")," "),sI(2),cC(t.aggregate.unknownCostCount>0?17:-1);}}function _e(e,o){if(e&1&&(Cs(0,"div",9)(1,"table")(2,"thead")(3,"tr")(4,"th",10),JC(5,"Name"),hl(),Cs(6,"th",10),JC(7,"Tokens"),hl(),Cs(8,"th",10),JC(9,"Input / output"),hl(),Cs(10,"th",10),JC(11,"Cache read / write"),hl(),Cs(12,"th",10),JC(13,"Estimated cost"),hl()()(),Cs(14,"tbody"),dC(15,ue,18,22,"tr",null,re),hl()()()),e&2){let t=CC().$implicit;sI(15),fC(t.rows);}}function Ce(e,o){if(e&1&&(Cs(0,"h2"),JC(1),hl(),aC(2,pe,2,0,"p")(3,_e,17,0,"div",9)),e&2){let t=o.$implicit;sI(),em(t.title),sI(),cC(t.rows.length===0?2:3);}}function fe(e,o){if(e&1&&(dC(0,Ce,4,2,null,null,oe),Cs(2,"p"),JC(3,"Unpriced usage is kept separate from known costs. Active agent runs appear here after they finish."),hl()),e&2){let t=CC(2);fC(pT(4,ae,fT(0,ne,t.agents()),fT(2,ie,t.models())));}}function ye(e,o){if(e&1){let t=vC();Cs(0,"p"),JC(1,"Recorded LLM usage across this namespace. Costs are estimates in the platform currency."),hl(),Cs(2,"form",5),Lg("ngSubmit",function(){Sf(t);let s=CC();return _f(s.load())}),Cs(3,"label"),JC(4,"From (UTC)"),Cs(5,"input",6),sm("ngModelChange",function(s){Sf(t);let d=CC();return iT(d.from,s)||(d.from=s),_f(s)}),hl(),ZI(),hl(),Cs(6,"label"),JC(7,"To (UTC)"),Cs(8,"input",7),sm("ngModelChange",function(s){Sf(t);let d=CC();return iT(d.to,s)||(d.to=s),_f(s)}),hl(),ZI(),hl(),Cs(9,"button",8),JC(10,"Refresh"),hl()(),aC(11,de,2,1,"p",3),aC(12,ce,2,0,"p",2)(13,fe,4,7);}if(e&2){let t,r=CC();sI(5),im("ngModel",r.from),QI(),sI(3),im("ngModel",r.to),QI(),sI(3),cC((t=r.error())?11:-1,t),sI(),cC(r.loading()?12:r.error()?-1:13);}}var te=class e{route=g(V);api=g(G);configuration=g(c);namespaceId=this.route.snapshot.params.namespaceId;agents=Wi([]);models=Wi([]);error=Wi(null);loading=Wi(false);from=new Date(Date.now()-30*864e5).toISOString().slice(0,10);to=new Date().toISOString().slice(0,10);refresh=new ue$1;constructor(){Wf(o=>{if(!this.configuration.enabled())return;let t=this.refresh.pipe(Sd(void 0),Da(()=>{this.error.set(null),this.agents.set([]),this.models.set([]);let r=new Date(`${this.from}T00:00:00.000Z`),s=new Date(`${this.to}T23:59:59.999Z`);return !Number.isFinite(r.getTime())||!Number.isFinite(s.getTime())||r>s?(this.error.set("Select a valid date range."),this.loading.set(false),on):(this.loading.set(true),Wy({agents:this.api.aggregateByAgentUsageRecord(this.namespaceId,r.toISOString(),s.toISOString()),models:this.api.aggregateByModelUsageRecord(this.namespaceId,r.toISOString(),s.toISOString())}).pipe(va(d=>(this.loading.set(false),this.error.set(d.status===403?"Namespace admin permission is required to view this report.":"Could not load usage. Please try again."),on))))})).subscribe(({agents:r,models:s})=>{this.agents.set(r),this.models.set(s),this.loading.set(false);});o(()=>t.unsubscribe());});}load(){this.configuration.enabled()&&this.refresh.next();}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=jw({type:e,selectors:[["agentos-namespace-usage"]],decls:9,vars:1,consts:[[1,"report"],["routerLink","/agentos/namespaces"],["role","status"],["role","alert"],["type","button",3,"click"],[1,"filters",3,"ngSubmit"],["type","date","name","from","required","",3,"ngModelChange","ngModel"],["type","date","name","to","required","",3,"ngModelChange","ngModel"],["type","submit"],[1,"table-wrap"],["scope","col"],["scope","row"]],template:function(t,r){t&1&&(Cs(0,"section",0)(1,"a",1),JC(2,"\u2190 Namespaces"),hl(),Cs(3,"h1"),JC(4,"Usage and costs"),hl(),aC(5,se,2,0,"p",2)(6,le,4,0)(7,me,2,0,"p",2)(8,ye,14,4),hl()),t&2&&(sI(5),cC(r.configuration.state()==="loading"?5:r.configuration.state()==="error"?6:r.configuration.state()==="disabled"?7:8));},dependencies:[ti,Jn,Ye,Zn,Xn,gt,cn,an,si,$b],styles:["[_nghost-%COMP%]{display:block}.report[_ngcontent-%COMP%]{max-width:1100px;margin:auto;padding:1.5rem;color:var(--color-text, inherit)}a[_ngcontent-%COMP%]{color:inherit}.filters[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:1rem;align-items:end;margin:1.5rem 0}label[_ngcontent-%COMP%]{display:grid;gap:.4rem}input[_ngcontent-%COMP%], button[_ngcontent-%COMP%]{font:inherit;color:inherit;background:transparent;border:1px solid var(--color-border, rgba(136, 136, 136, .5333333333));border-radius:.4rem;padding:.5rem .75rem}button[_ngcontent-%COMP%]{cursor:pointer}.table-wrap[_ngcontent-%COMP%]{overflow-x:auto}table[_ngcontent-%COMP%]{border-collapse:collapse;width:100%}th[_ngcontent-%COMP%], td[_ngcontent-%COMP%]{text-align:left;padding:.75rem;border-bottom:1px solid var(--color-border, rgba(136, 136, 136, .3333333333))}small[_ngcontent-%COMP%]{display:block;margin-top:.3rem}h2[_ngcontent-%COMP%]{margin-top:2rem}"]})};export{te as NamespaceUsageComponent};
1
+ import {c}from'./chunk-BaAG5SRs.js';import {g,ao as V,dq as W,W as Wi,an as ue$1,cd as Wf,j as jw,s as si,cF as $b,k as Cs,J as JC,m as hl,o as aC,u as sI,v as cC,bR as Sd,bS as Da,cB as on,S as Wy,a7 as va,a9 as vC,n as Lg,ai as sm,a3 as ZI,ac as CC,ak as im,a6 as QI,a8 as em,q as dC,w as fC,cg as pT,b4 as fT,bf as gT,bg as yT,b0 as tm,bi as vT,aa as Sf,ab as _f,aj as iT,a5 as Dl}from'./main-4LGWVPVH.js';import {t as ti,J as Jn,Y as Ye,Z as Zn,l as Xn,g as gt,c as cn,d as an}from'./chunk-CPuMGlfm.js';import'./chunk-6ZQ87jQV.js';import'./chunk-CmWqV8dc.js';import'./chunk-B2UoGfZ3.js';var ne=e=>({title:"By agent",rows:e}),ie=e=>({title:"By model",rows:e}),ae=(e,o)=>[e,o],oe=(e,o)=>o.title,re=(e,o)=>o.key;function se(e,o){e&1&&(Cs(0,"p",2),JC(1,"Loading usage settings\u2026"),hl());}function le(e,o){if(e&1){let t=vC();Cs(0,"p",3),JC(1,"Could not load usage settings. Please try again."),hl(),Cs(2,"button",4),Lg("click",function(){Sf(t);let s=CC();return _f(s.configuration.retry())}),JC(3,"Retry usage settings"),hl();}}function me(e,o){e&1&&(Cs(0,"p",2),JC(1,"Usage tracking is disabled."),hl());}function de(e,o){e&1&&(Cs(0,"p",3),JC(1),hl()),e&2&&(sI(),em(o));}function ce(e,o){e&1&&(Cs(0,"p",2),JC(1,"Loading usage\u2026"),hl());}function pe(e,o){e&1&&(Cs(0,"p"),JC(1,"No recorded usage for this period."),hl());}function ge(e,o){if(e&1&&(Cs(0,"small"),JC(1),hl()),e&2){let t=CC().$implicit;sI(),Dl("",t.aggregate.unknownCostCount," record(s) with unknown cost");}}function ue(e,o){if(e&1&&(Cs(0,"tr")(1,"th",11),JC(2),hl(),Cs(3,"td"),JC(4),gT(5,"number"),hl(),Cs(6,"td"),JC(7),gT(8,"number"),gT(9,"number"),hl(),Cs(10,"td"),JC(11),gT(12,"number"),gT(13,"number"),hl(),Cs(14,"td"),JC(15),gT(16,"number"),aC(17,ge,2,1,"small"),hl()()),e&2){let t=o.$implicit;sI(2),em(t.key),sI(2),em(yT(5,9,t.aggregate.totalTokens)),sI(3),tm("",yT(8,11,t.aggregate.inputTokens)," / ",yT(9,13,t.aggregate.outputTokens)),sI(4),tm(" ",yT(12,15,t.aggregate.cacheReadTokens)," / ",yT(13,17,t.aggregate.cacheWriteTokens)," "),sI(4),tm(" ",t.aggregate.unknownCostCount>0?"At least ":"","",vT(16,19,t.aggregate.cost,"1.2-6")," "),sI(2),cC(t.aggregate.unknownCostCount>0?17:-1);}}function _e(e,o){if(e&1&&(Cs(0,"div",9)(1,"table")(2,"thead")(3,"tr")(4,"th",10),JC(5,"Name"),hl(),Cs(6,"th",10),JC(7,"Tokens"),hl(),Cs(8,"th",10),JC(9,"Input / output"),hl(),Cs(10,"th",10),JC(11,"Cache read / write"),hl(),Cs(12,"th",10),JC(13,"Estimated cost"),hl()()(),Cs(14,"tbody"),dC(15,ue,18,22,"tr",null,re),hl()()()),e&2){let t=CC().$implicit;sI(15),fC(t.rows);}}function Ce(e,o){if(e&1&&(Cs(0,"h2"),JC(1),hl(),aC(2,pe,2,0,"p")(3,_e,17,0,"div",9)),e&2){let t=o.$implicit;sI(),em(t.title),sI(),cC(t.rows.length===0?2:3);}}function fe(e,o){if(e&1&&(dC(0,Ce,4,2,null,null,oe),Cs(2,"p"),JC(3,"Unpriced usage is kept separate from known costs. Active agent runs appear here after they finish."),hl()),e&2){let t=CC(2);fC(pT(4,ae,fT(0,ne,t.agents()),fT(2,ie,t.models())));}}function ye(e,o){if(e&1){let t=vC();Cs(0,"p"),JC(1,"Recorded LLM usage across this namespace. Costs are estimates in the platform currency."),hl(),Cs(2,"form",5),Lg("ngSubmit",function(){Sf(t);let s=CC();return _f(s.load())}),Cs(3,"label"),JC(4,"From (UTC)"),Cs(5,"input",6),sm("ngModelChange",function(s){Sf(t);let d=CC();return iT(d.from,s)||(d.from=s),_f(s)}),hl(),ZI(),hl(),Cs(6,"label"),JC(7,"To (UTC)"),Cs(8,"input",7),sm("ngModelChange",function(s){Sf(t);let d=CC();return iT(d.to,s)||(d.to=s),_f(s)}),hl(),ZI(),hl(),Cs(9,"button",8),JC(10,"Refresh"),hl()(),aC(11,de,2,1,"p",3),aC(12,ce,2,0,"p",2)(13,fe,4,7);}if(e&2){let t,r=CC();sI(5),im("ngModel",r.from),QI(),sI(3),im("ngModel",r.to),QI(),sI(3),cC((t=r.error())?11:-1,t),sI(),cC(r.loading()?12:r.error()?-1:13);}}var te=class e{route=g(V);api=g(W);configuration=g(c);namespaceId=this.route.snapshot.params.namespaceId;agents=Wi([]);models=Wi([]);error=Wi(null);loading=Wi(false);from=new Date(Date.now()-30*864e5).toISOString().slice(0,10);to=new Date().toISOString().slice(0,10);refresh=new ue$1;constructor(){Wf(o=>{if(!this.configuration.enabled())return;let t=this.refresh.pipe(Sd(void 0),Da(()=>{this.error.set(null),this.agents.set([]),this.models.set([]);let r=new Date(`${this.from}T00:00:00.000Z`),s=new Date(`${this.to}T23:59:59.999Z`);return !Number.isFinite(r.getTime())||!Number.isFinite(s.getTime())||r>s?(this.error.set("Select a valid date range."),this.loading.set(false),on):(this.loading.set(true),Wy({agents:this.api.aggregateByAgentUsageRecord(this.namespaceId,r.toISOString(),s.toISOString()),models:this.api.aggregateByModelUsageRecord(this.namespaceId,r.toISOString(),s.toISOString())}).pipe(va(d=>(this.loading.set(false),this.error.set(d.status===403?"Namespace admin permission is required to view this report.":"Could not load usage. Please try again."),on))))})).subscribe(({agents:r,models:s})=>{this.agents.set(r),this.models.set(s),this.loading.set(false);});o(()=>t.unsubscribe());});}load(){this.configuration.enabled()&&this.refresh.next();}static \u0275fac=function(t){return new(t||e)};static \u0275cmp=jw({type:e,selectors:[["agentos-namespace-usage"]],decls:9,vars:1,consts:[[1,"report"],["routerLink","/agentos/namespaces"],["role","status"],["role","alert"],["type","button",3,"click"],[1,"filters",3,"ngSubmit"],["type","date","name","from","required","",3,"ngModelChange","ngModel"],["type","date","name","to","required","",3,"ngModelChange","ngModel"],["type","submit"],[1,"table-wrap"],["scope","col"],["scope","row"]],template:function(t,r){t&1&&(Cs(0,"section",0)(1,"a",1),JC(2,"\u2190 Namespaces"),hl(),Cs(3,"h1"),JC(4,"Usage and costs"),hl(),aC(5,se,2,0,"p",2)(6,le,4,0)(7,me,2,0,"p",2)(8,ye,14,4),hl()),t&2&&(sI(5),cC(r.configuration.state()==="loading"?5:r.configuration.state()==="error"?6:r.configuration.state()==="disabled"?7:8));},dependencies:[ti,Jn,Ye,Zn,Xn,gt,cn,an,si,$b],styles:["[_nghost-%COMP%]{display:block}.report[_ngcontent-%COMP%]{max-width:1100px;margin:auto;padding:1.5rem;color:var(--color-text, inherit)}a[_ngcontent-%COMP%]{color:inherit}.filters[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:1rem;align-items:end;margin:1.5rem 0}label[_ngcontent-%COMP%]{display:grid;gap:.4rem}input[_ngcontent-%COMP%], button[_ngcontent-%COMP%]{font:inherit;color:inherit;background:transparent;border:1px solid var(--color-border, rgba(136, 136, 136, .5333333333));border-radius:.4rem;padding:.5rem .75rem}button[_ngcontent-%COMP%]{cursor:pointer}.table-wrap[_ngcontent-%COMP%]{overflow-x:auto}table[_ngcontent-%COMP%]{border-collapse:collapse;width:100%}th[_ngcontent-%COMP%], td[_ngcontent-%COMP%]{text-align:left;padding:.75rem;border-bottom:1px solid var(--color-border, rgba(136, 136, 136, .3333333333))}small[_ngcontent-%COMP%]{display:block;margin-top:.3rem}h2[_ngcontent-%COMP%]{margin-top:2rem}"]})};export{te as NamespaceUsageComponent};
@@ -1,4 +1,4 @@
1
- import {W as We$1,Q as Qt}from'./chunk-DK1hp0WW.js';import {_,b as _e,d as an,E as En}from'./chunk-DuXr-yGB.js';import {aL as wo,aM as Zn,cq as Se,aO as wt$1,g,az as Xt,bs as bl,bG as p,aT as Ut$1,aP as G,aW as C,cr as oV,T as TT,cs as sV,ct as vi,W as Wi,an as ue,aS as K,bt as Qn,cd as Wf,bR as Sd,r as re,au as uv,ae as kt$1,ap as _d,bP as ev,cu as uV,j as jw,ce as kb,bA as bC,af as bg,ag as ET,k as Cs,n as Lg,o as aC,bB as SC,m as hl,u as sI,y as qg,v as cC,b5 as lT,cv as $g,H as Hg,cw as xC,M as MC,B as NC,cx as Ug,bv as Vg,aZ as Bs,aR as Ps,cy as si,cz as to,aC as bu,a_ as rb,c0 as Fg,N as Ng,bF as J,b6 as Rg,aw as gl,ax as ml,ac as CC,A as Ag,x as xg,t as AC,cA as Mn,aX as D,cB as on,cC as R,cD as Te,J as JC,a8 as em,aF as R$1,cE as Pd}from'./main-JTU33H5D.js';var oe=class{_box;_destroyed=new ue;_resizeSubject=new ue;_resizeObserver;_elementObservables=new Map;constructor(l){this._box=l,typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(e=>this._resizeSubject.next(e)));}observe(l){return this._elementObservables.has(l)||this._elementObservables.set(l,new R$1(e=>{let t=this._resizeSubject.subscribe(e);return this._resizeObserver?.observe(l,{box:this._box}),()=>{this._resizeObserver?.unobserve(l),t.unsubscribe(),this._elementObservables.delete(l);}}).pipe(kt$1(e=>e.some(t=>t.target===l)),Pd({bufferSize:1,refCount:true}),_d(this._destroyed))),this._elementObservables.get(l)}destroy(){this._destroyed.next(),this._destroyed.complete(),this._resizeSubject.complete(),this._elementObservables.clear();}},qe=(()=>{class i{_cleanupErrorListener;_observers=new Map;_ngZone=g(G);constructor(){}ngOnDestroy(){for(let[,e]of this._observers)e.destroy();this._observers.clear(),this._cleanupErrorListener?.();}observe(e,t){let n=t?.box||"content-box";return this._observers.has(n)||this._observers.set(n,new oe(n)),this._observers.get(n).observe(e)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Te({token:i,factory:i.\u0275fac})}return i})();var ut=["notch"],ht=["*"],Ue=["iconPrefixContainer"],We=["textPrefixContainer"],Ge=["iconSuffixContainer"],$e=["textSuffixContainer"],pt=["textField"],_t=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],bt=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];function gt(i,l){i&1&&Ag(0,"span",21);}function vt(i,l){if(i&1&&(Cs(0,"label",20),SC(1,1),aC(2,gt,1,0,"span",21),hl()),i&2){let e=CC(2);xg("floating",e._shouldLabelFloat())("monitorResize",e._hasOutline())("id",e._labelId),Ng("for",e._control.disableAutomaticLabeling?null:e._control.id),sI(2),cC(!e.hideRequiredMarker&&e._control.required?2:-1);}}function xt(i,l){if(i&1&&aC(0,vt,3,5,"label",20),i&2){let e=CC();cC(e._hasFloatingLabel()?0:-1);}}function yt(i,l){i&1&&Ag(0,"div",7);}function Ft(i,l){}function Ct(i,l){if(i&1&&bg(0,Ft,0,0,"ng-template",13),i&2){CC(2);let e=AC(1);xg("ngTemplateOutlet",e);}}function wt(i,l){if(i&1&&(Cs(0,"div",9),aC(1,Ct,1,1,null,13),hl()),i&2){let e=CC();xg("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat()),sI(),cC(e._forceDisplayInfixLabel()?-1:1);}}function Mt(i,l){i&1&&(Cs(0,"div",10,2),SC(2,2),hl());}function Et(i,l){i&1&&(Cs(0,"div",11,3),SC(2,3),hl());}function St(i,l){}function Tt(i,l){if(i&1&&bg(0,St,0,0,"ng-template",13),i&2){CC();let e=AC(1);xg("ngTemplateOutlet",e);}}function Rt(i,l){i&1&&(Cs(0,"div",14,4),SC(2,4),hl());}function Dt(i,l){i&1&&(Cs(0,"div",15,5),SC(2,5),hl());}function Nt(i,l){i&1&&Ag(0,"div",16);}function At(i,l){i&1&&(Cs(0,"div",18),SC(1,6),hl());}function It(i,l){if(i&1&&(Cs(0,"mat-hint",22),JC(1),hl()),i&2){let e=CC(2);xg("id",e._hintLabelId),sI(),em(e.hintLabel);}}function Lt(i,l){if(i&1&&(Cs(0,"div",19),aC(1,It,2,2,"mat-hint",22),SC(2,7),Ag(3,"div",23),SC(4,8),hl()),i&2){let e=CC();sI(),cC(e.hintLabel?1:-1);}}var ae=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=Bs({type:i,selectors:[["mat-label"]]})}return i})(),kt=new C("MatError");var le=(()=>{class i{align="start";id=g(Ut$1).getId("mat-mdc-hint-");static \u0275fac=function(t){return new(t||i)};static \u0275dir=Bs({type:i,selectors:[["mat-hint"]],hostAttrs:[1,"mat-mdc-form-field-hint","mat-mdc-form-field-bottom-align"],hostVars:4,hostBindings:function(t,n){t&2&&(Fg("id",n.id),Ng("align",null),qg("mat-mdc-form-field-hint-end",n.align==="end"));},inputs:{align:"align",id:"id"}})}return i})(),et=new C("MatPrefix"),Ot=(()=>{class i{set _isTextSelector(e){this._isText=true;}_isText=false;static \u0275fac=function(t){return new(t||i)};static \u0275dir=Bs({type:i,selectors:[["","matPrefix",""],["","matIconPrefix",""],["","matTextPrefix",""]],inputs:{_isTextSelector:[0,"matTextPrefix","_isTextSelector"]},features:[lT([{provide:et,useExisting:i}])]})}return i})(),tt=new C("MatSuffix"),zt=(()=>{class i{set _isTextSelector(e){this._isText=true;}_isText=false;static \u0275fac=function(t){return new(t||i)};static \u0275dir=Bs({type:i,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:[0,"matTextSuffix","_isTextSelector"]},features:[lT([{provide:tt,useExisting:i}])]})}return i})(),it=new C("FloatingLabelParent"),Ze=(()=>{class i{_elementRef=g(Xt);get floating(){return this._floating}set floating(e){this._floating=e,this.monitorResize&&this._handleResize();}_floating=false;get monitorResize(){return this._monitorResize}set monitorResize(e){this._monitorResize=e,this._monitorResize?this._subscribeToResize():this._resizeSubscription.unsubscribe();}_monitorResize=false;_resizeObserver=g(qe);_ngZone=g(G);_parent=g(it);_resizeSubscription=new J;ngOnDestroy(){this._resizeSubscription.unsubscribe();}getWidth(){return Pt(this._elementRef.nativeElement)}get element(){return this._elementRef.nativeElement}_handleResize(){setTimeout(()=>this._parent._handleLabelResized());}_subscribeToResize(){this._resizeSubscription.unsubscribe(),this._ngZone.runOutsideAngular(()=>{this._resizeSubscription=this._resizeObserver.observe(this._elementRef.nativeElement,{box:"border-box"}).subscribe(()=>this._handleResize());});}static \u0275fac=function(t){return new(t||i)};static \u0275dir=Bs({type:i,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(t,n){t&2&&qg("mdc-floating-label--float-above",n.floating);},inputs:{floating:"floating",monitorResize:"monitorResize"}})}return i})();function Pt(i){let l=i;if(l.offsetParent!==null)return l.scrollWidth;let e=l.cloneNode(true);e.style.setProperty("position","absolute"),e.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(e);let t=e.scrollWidth;return e.remove(),t}var Qe="mdc-line-ripple--active",Z="mdc-line-ripple--deactivating",Xe=(()=>{class i{_elementRef=g(Xt);_cleanupTransitionEnd;constructor(){let e=g(G),t=g(Ps);e.runOutsideAngular(()=>{this._cleanupTransitionEnd=t.listen(this._elementRef.nativeElement,"transitionend",this._handleTransitionEnd);});}activate(){let e=this._elementRef.nativeElement.classList;e.remove(Z),e.add(Qe);}deactivate(){this._elementRef.nativeElement.classList.add(Z);}_handleTransitionEnd=e=>{let t=this._elementRef.nativeElement.classList,n=t.contains(Z);e.propertyName==="opacity"&&n&&t.remove(Qe,Z);};ngOnDestroy(){this._cleanupTransitionEnd();}static \u0275fac=function(t){return new(t||i)};static \u0275dir=Bs({type:i,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]})}return i})(),Ye=(()=>{class i{_elementRef=g(Xt);_ngZone=g(G);open=false;_notch;ngAfterViewInit(){let e=this._elementRef.nativeElement,t=e.querySelector(".mdc-floating-label");t?(e.classList.add("mdc-notched-outline--upgraded"),typeof requestAnimationFrame=="function"&&(t.style.transitionDuration="0s",this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>t.style.transitionDuration="");}))):e.classList.add("mdc-notched-outline--no-label");}_setNotchWidth(e){let t=this._notch.nativeElement;!this.open||!e?t.style.width="":t.style.width=`calc(${e}px * var(--mat-mdc-form-field-floating-label-scale, 0.75) + 9px)`;}_setMaxWidth(e){this._notch.nativeElement.style.setProperty("--mat-form-field-notch-max-width",`calc(100% - ${e}px)`);}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=jw({type:i,selectors:[["div","matFormFieldNotchedOutline",""]],viewQuery:function(t,n){if(t&1&&Hg(ut,5),t&2){let r;MC(r=NC())&&(n._notch=r.first);}},hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(t,n){t&2&&qg("mdc-notched-outline--notched",n.open);},inputs:{open:[0,"matFormFieldNotchedOutlineOpen","open"]},ngContentSelectors:ht,decls:5,vars:0,consts:[["notch",""],[1,"mat-mdc-notch-piece","mdc-notched-outline__leading"],[1,"mat-mdc-notch-piece","mdc-notched-outline__notch"],[1,"mat-mdc-notch-piece","mdc-notched-outline__trailing"]],template:function(t,n){t&1&&(bC(),Rg(0,"div",1),gl(1,"div",2,0),SC(3),ml(),Rg(4,"div",3));},encapsulation:2})}return i})(),de=(()=>{class i{value=null;stateChanges;id;placeholder;ngControl=null;focused=false;empty=false;shouldLabelFloat=false;required=false;disabled=false;errorState=false;controlType;autofilled;userAriaDescribedBy;disableAutomaticLabeling;describedByIds;static \u0275fac=function(t){return new(t||i)};static \u0275dir=Bs({type:i})}return i})();var se=new C("MatFormField"),Bt=new C("MAT_FORM_FIELD_DEFAULT_OPTIONS"),Ke="fill",Vt="auto",Je="fixed",Ht="translateY(-50%)",nt=(()=>{class i{_elementRef=g(Xt);_changeDetectorRef=g(bl);_platform=g(p);_idGenerator=g(Ut$1);_ngZone=g(G);_defaults=g(Bt,{optional:true});_currentDirection;_textField;_iconPrefixContainer;_textPrefixContainer;_iconSuffixContainer;_textSuffixContainer;_floatingLabel;_notchedOutline;_lineRipple;_iconPrefixContainerSignal=oV("iconPrefixContainer");_textPrefixContainerSignal=oV("textPrefixContainer");_iconSuffixContainerSignal=oV("iconSuffixContainer");_textSuffixContainerSignal=oV("textSuffixContainer");_prefixSuffixContainers=TT(()=>[this._iconPrefixContainerSignal(),this._textPrefixContainerSignal(),this._iconSuffixContainerSignal(),this._textSuffixContainerSignal()].map(e=>e?.nativeElement).filter(e=>e!==void 0));_formFieldControl;_prefixChildren;_suffixChildren;_errorChildren;_hintChildren;_labelChild=sV(ae);get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(e){this._hideRequiredMarker=vi(e);}_hideRequiredMarker=false;color="primary";get floatLabel(){return this._floatLabel||this._defaults?.floatLabel||Vt}set floatLabel(e){e!==this._floatLabel&&(this._floatLabel=e,this._changeDetectorRef.markForCheck());}_floatLabel;get appearance(){return this._appearanceSignal()}set appearance(e){let t=e||this._defaults?.appearance||Ke;this._appearanceSignal.set(t);}_appearanceSignal=Wi(Ke);get subscriptSizing(){return this._subscriptSizing||this._defaults?.subscriptSizing||Je}set subscriptSizing(e){this._subscriptSizing=e||this._defaults?.subscriptSizing||Je;}_subscriptSizing=null;get hintLabel(){return this._hintLabel}set hintLabel(e){this._hintLabel=e,this._processHints();}_hintLabel="";_hasIconPrefix=false;_hasTextPrefix=false;_hasIconSuffix=false;_hasTextSuffix=false;_labelId=this._idGenerator.getId("mat-mdc-form-field-label-");_hintLabelId=this._idGenerator.getId("mat-mdc-hint-");_describedByIds;get _control(){return this._explicitFormFieldControl||this._formFieldControl}set _control(e){this._explicitFormFieldControl=e;}_destroyed=new ue;_isFocused=null;_explicitFormFieldControl;_previousControl=null;_previousControlValidatorFn=null;_stateChanges;_valueChanges;_describedByChanges;_outlineLabelOffsetResizeObserver=null;_animationsDisabled=K();constructor(){let e=this._defaults,t=g(Qn);e&&(e.appearance&&(this.appearance=e.appearance),this._hideRequiredMarker=!!e?.hideRequiredMarker,e.color&&(this.color=e.color)),Wf(()=>this._currentDirection=t.valueSignal()),this._syncOutlineLabelOffset();}ngAfterViewInit(){this._updateFocusState(),this._animationsDisabled||this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{this._elementRef.nativeElement.classList.add("mat-form-field-animations-enabled");},300);}),this._changeDetectorRef.detectChanges();}ngAfterContentInit(){this._assertFormFieldControl(),this._initializeSubscript(),this._initializePrefixAndSuffix();}ngAfterContentChecked(){this._assertFormFieldControl(),this._control!==this._previousControl&&(this._initializeControl(this._previousControl),this._control.ngControl&&this._control.ngControl.control&&(this._previousControlValidatorFn=this._control.ngControl.control.validator),this._previousControl=this._control),this._control.ngControl&&this._control.ngControl.control&&this._control.ngControl.control.validator!==this._previousControlValidatorFn&&this._changeDetectorRef.markForCheck();}ngOnDestroy(){this._outlineLabelOffsetResizeObserver?.disconnect(),this._stateChanges?.unsubscribe(),this._valueChanges?.unsubscribe(),this._describedByChanges?.unsubscribe(),this._destroyed.next(),this._destroyed.complete();}getLabelId=TT(()=>this._hasFloatingLabel()?this._labelId:null);getConnectedOverlayOrigin(){return this._textField||this._elementRef}_animateAndLockLabel(){this._hasFloatingLabel()&&(this.floatLabel="always");}_initializeControl(e){let t=this._control,n="mat-mdc-form-field-type-";e&&this._elementRef.nativeElement.classList.remove(n+e.controlType),t.controlType&&this._elementRef.nativeElement.classList.add(n+t.controlType),this._stateChanges?.unsubscribe(),this._stateChanges=t.stateChanges.subscribe(()=>{this._updateFocusState(),this._changeDetectorRef.markForCheck();}),this._describedByChanges?.unsubscribe(),this._describedByChanges=t.stateChanges.pipe(Sd([void 0,void 0]),re(()=>[t.errorState,t.userAriaDescribedBy]),uv(),kt$1(([[r,a],[s,C]])=>r!==s||a!==C)).subscribe(()=>this._syncDescribedByIds()),this._valueChanges?.unsubscribe(),t.ngControl&&t.ngControl.valueChanges&&(this._valueChanges=t.ngControl.valueChanges.pipe(_d(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck()));}_checkPrefixAndSuffixTypes(){this._hasIconPrefix=!!this._prefixChildren.find(e=>!e._isText),this._hasTextPrefix=!!this._prefixChildren.find(e=>e._isText),this._hasIconSuffix=!!this._suffixChildren.find(e=>!e._isText),this._hasTextSuffix=!!this._suffixChildren.find(e=>e._isText);}_initializePrefixAndSuffix(){this._checkPrefixAndSuffixTypes(),ev(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._checkPrefixAndSuffixTypes(),this._changeDetectorRef.markForCheck();});}_initializeSubscript(){this._hintChildren.changes.subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck();}),this._errorChildren.changes.subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck();}),this._validateHints(),this._syncDescribedByIds();}_assertFormFieldControl(){this._control;}_updateFocusState(){let e=this._control.focused;e&&!this._isFocused?(this._isFocused=true,this._lineRipple?.activate()):!e&&(this._isFocused||this._isFocused===null)&&(this._isFocused=false,this._lineRipple?.deactivate()),this._elementRef.nativeElement.classList.toggle("mat-focused",e),this._textField?.nativeElement.classList.toggle("mdc-text-field--focused",e);}_syncOutlineLabelOffset(){uV({earlyRead:()=>{if(this._appearanceSignal()!=="outline")return this._outlineLabelOffsetResizeObserver?.disconnect(),null;if(globalThis.ResizeObserver){this._outlineLabelOffsetResizeObserver||=new globalThis.ResizeObserver(()=>{this._writeOutlinedLabelStyles(this._getOutlinedLabelOffset());});for(let e of this._prefixSuffixContainers())this._outlineLabelOffsetResizeObserver.observe(e,{box:"border-box"});}return this._getOutlinedLabelOffset()},write:e=>this._writeOutlinedLabelStyles(e())});}_shouldAlwaysFloat(){return this.floatLabel==="always"}_hasOutline(){return this.appearance==="outline"}_forceDisplayInfixLabel(){return !this._platform.isBrowser&&this._prefixChildren.length&&!this._shouldLabelFloat()}_hasFloatingLabel=TT(()=>!!this._labelChild());_shouldLabelFloat(){return this._hasFloatingLabel()?this._control.shouldLabelFloat||this._shouldAlwaysFloat():false}_shouldForward(e){let t=this._control?this._control.ngControl:null;return t&&t[e]}_getSubscriptMessageType(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_handleLabelResized(){this._refreshOutlineNotchWidth();}_refreshOutlineNotchWidth(){!this._hasOutline()||!this._floatingLabel||!this._shouldLabelFloat()?this._notchedOutline?._setNotchWidth(0):this._notchedOutline?._setNotchWidth(this._floatingLabel.getWidth());}_processHints(){this._validateHints(),this._syncDescribedByIds();}_validateHints(){this._hintChildren;}_syncDescribedByIds(){if(this._control){let e=[];if(this._control.userAriaDescribedBy&&typeof this._control.userAriaDescribedBy=="string"&&e.push(...this._control.userAriaDescribedBy.split(" ")),this._getSubscriptMessageType()==="hint"){let r=this._hintChildren?this._hintChildren.find(s=>s.align==="start"):null,a=this._hintChildren?this._hintChildren.find(s=>s.align==="end"):null;r?e.push(r.id):this._hintLabel&&e.push(this._hintLabelId),a&&e.push(a.id);}else this._errorChildren&&e.push(...this._errorChildren.map(r=>r.id));let t=this._control.describedByIds,n;if(t){let r=this._describedByIds||e;n=e.concat(t.filter(a=>a&&!r.includes(a)));}else n=e;this._control.setDescribedByIds(n),this._describedByIds=e;}}_getOutlinedLabelOffset(){if(!this._hasOutline()||!this._floatingLabel)return null;if(!this._iconPrefixContainer&&!this._textPrefixContainer)return ["",null];if(!this._isAttachedToDom())return null;let e=this._iconPrefixContainer?.nativeElement,t=this._textPrefixContainer?.nativeElement,n=this._iconSuffixContainer?.nativeElement,r=this._textSuffixContainer?.nativeElement,a=e?.getBoundingClientRect().width??0,s=t?.getBoundingClientRect().width??0,C=n?.getBoundingClientRect().width??0,M=r?.getBoundingClientRect().width??0,dt=this._currentDirection==="rtl"?"-1":"1",st=`${a+s}px`,ct=`calc(${dt} * (${st} + var(--mat-mdc-form-field-label-offset-x, 0px)))`,ft=`var(--mat-mdc-form-field-label-transform, ${Ht} translateX(${ct}))`,mt=a+s+C+M;return [ft,mt]}_writeOutlinedLabelStyles(e){if(e!==null){let[t,n]=e;this._floatingLabel&&(this._floatingLabel.element.style.transform=t),n!==null&&this._notchedOutline?._setMaxWidth(n);}}_isAttachedToDom(){let e=this._elementRef.nativeElement;if(e.getRootNode){let t=e.getRootNode();return t&&t!==e}return document.documentElement.contains(e)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=jw({type:i,selectors:[["mat-form-field"]],contentQueries:function(t,n,r){if(t&1&&(Ug(r,n._labelChild,ae,5),Vg(r,de,5)(r,et,5)(r,tt,5)(r,kt,5)(r,le,5)),t&2){xC();let a;MC(a=NC())&&(n._formFieldControl=a.first),MC(a=NC())&&(n._prefixChildren=a),MC(a=NC())&&(n._suffixChildren=a),MC(a=NC())&&(n._errorChildren=a),MC(a=NC())&&(n._hintChildren=a);}},viewQuery:function(t,n){if(t&1&&($g(n._iconPrefixContainerSignal,Ue,5)(n._textPrefixContainerSignal,We,5)(n._iconSuffixContainerSignal,Ge,5)(n._textSuffixContainerSignal,$e,5),Hg(pt,5)(Ue,5)(We,5)(Ge,5)($e,5)(Ze,5)(Ye,5)(Xe,5)),t&2){xC(4);let r;MC(r=NC())&&(n._textField=r.first),MC(r=NC())&&(n._iconPrefixContainer=r.first),MC(r=NC())&&(n._textPrefixContainer=r.first),MC(r=NC())&&(n._iconSuffixContainer=r.first),MC(r=NC())&&(n._textSuffixContainer=r.first),MC(r=NC())&&(n._floatingLabel=r.first),MC(r=NC())&&(n._notchedOutline=r.first),MC(r=NC())&&(n._lineRipple=r.first);}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:38,hostBindings:function(t,n){t&2&&qg("mat-mdc-form-field-label-always-float",n._shouldAlwaysFloat())("mat-mdc-form-field-has-icon-prefix",n._hasIconPrefix)("mat-mdc-form-field-has-icon-suffix",n._hasIconSuffix)("mat-form-field-invalid",n._control.errorState)("mat-form-field-disabled",n._control.disabled)("mat-form-field-autofilled",n._control.autofilled)("mat-form-field-appearance-fill",n.appearance=="fill")("mat-form-field-appearance-outline",n.appearance=="outline")("mat-form-field-hide-placeholder",n._hasFloatingLabel()&&!n._shouldLabelFloat())("mat-primary",n.color!=="accent"&&n.color!=="warn")("mat-accent",n.color==="accent")("mat-warn",n.color==="warn")("ng-untouched",n._shouldForward("untouched"))("ng-touched",n._shouldForward("touched"))("ng-pristine",n._shouldForward("pristine"))("ng-dirty",n._shouldForward("dirty"))("ng-valid",n._shouldForward("valid"))("ng-invalid",n._shouldForward("invalid"))("ng-pending",n._shouldForward("pending"));},inputs:{hideRequiredMarker:"hideRequiredMarker",color:"color",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",hintLabel:"hintLabel"},exportAs:["matFormField"],features:[lT([{provide:se,useExisting:i},{provide:it,useExisting:i}])],ngContentSelectors:bt,decls:18,vars:21,consts:[["labelTemplate",""],["textField",""],["iconPrefixContainer",""],["textPrefixContainer",""],["textSuffixContainer",""],["iconSuffixContainer",""],[1,"mat-mdc-text-field-wrapper","mdc-text-field",3,"click"],[1,"mat-mdc-form-field-focus-overlay"],[1,"mat-mdc-form-field-flex"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen"],[1,"mat-mdc-form-field-icon-prefix"],[1,"mat-mdc-form-field-text-prefix"],[1,"mat-mdc-form-field-infix"],[3,"ngTemplateOutlet"],[1,"mat-mdc-form-field-text-suffix"],[1,"mat-mdc-form-field-icon-suffix"],["matFormFieldLineRipple",""],["aria-atomic","true","aria-live","polite",1,"mat-mdc-form-field-subscript-wrapper","mat-mdc-form-field-bottom-align"],[1,"mat-mdc-form-field-error-wrapper"],[1,"mat-mdc-form-field-hint-wrapper"],["matFormFieldFloatingLabel","",3,"floating","monitorResize","id"],["aria-hidden","true",1,"mat-mdc-form-field-required-marker","mdc-floating-label--required"],[3,"id"],[1,"mat-mdc-form-field-hint-spacer"]],template:function(t,n){if(t&1&&(bC(_t),bg(0,xt,1,1,"ng-template",null,0,ET),Cs(2,"div",6,1),Lg("click",function(a){return n._control.onContainerClick(a)}),aC(4,yt,1,0,"div",7),Cs(5,"div",8),aC(6,wt,2,2,"div",9),aC(7,Mt,3,0,"div",10),aC(8,Et,3,0,"div",11),Cs(9,"div",12),aC(10,Tt,1,1,null,13),SC(11),hl(),aC(12,Rt,3,0,"div",14),aC(13,Dt,3,0,"div",15),hl(),aC(14,Nt,1,0,"div",16),hl(),Cs(15,"div",17),aC(16,At,2,0,"div",18)(17,Lt,5,1,"div",19),hl()),t&2){let r;sI(2),qg("mdc-text-field--filled",!n._hasOutline())("mdc-text-field--outlined",n._hasOutline())("mdc-text-field--no-label",!n._hasFloatingLabel())("mdc-text-field--disabled",n._control.disabled)("mdc-text-field--invalid",n._control.errorState),sI(2),cC(!n._hasOutline()&&!n._control.disabled?4:-1),sI(2),cC(n._hasOutline()?6:-1),sI(),cC(n._hasIconPrefix?7:-1),sI(),cC(n._hasTextPrefix?8:-1),sI(2),cC(!n._hasOutline()||n._forceDisplayInfixLabel()?10:-1),sI(2),cC(n._hasTextSuffix?12:-1),sI(),cC(n._hasIconSuffix?13:-1),sI(),cC(n._hasOutline()?-1:14),sI(),qg("mat-mdc-form-field-subscript-dynamic-size",n.subscriptSizing==="dynamic");let a=n._getSubscriptMessageType();sI(),cC((r=a)==="error"?16:r==="hint"?17:-1);}},dependencies:[Ze,Ye,kb,Xe,le],styles:[`.mdc-text-field {
1
+ import {W as We$1,Q as Qt}from'./chunk-B2UoGfZ3.js';import {_,b as _e,d as an,E as En}from'./chunk-CPuMGlfm.js';import {aL as wo,aM as Zn,cq as Se,aO as wt$1,g,az as Xt,bs as bl,bG as p,aT as Ut$1,aP as G,aW as C,cr as oV,T as TT,cs as sV,ct as vi,W as Wi,an as ue,aS as K,bt as Qn,cd as Wf,bR as Sd,r as re,au as uv,ae as kt$1,ap as _d,bP as ev,cu as uV,j as jw,ce as kb,bA as bC,af as bg,ag as ET,k as Cs,n as Lg,o as aC,bB as SC,m as hl,u as sI,y as qg,v as cC,b5 as lT,cv as $g,H as Hg,cw as xC,M as MC,B as NC,cx as Ug,bv as Vg,aZ as Bs,aR as Ps,cy as si,cz as to,aC as bu,a_ as rb,c0 as Fg,N as Ng,bF as J,b6 as Rg,aw as gl,ax as ml,ac as CC,A as Ag,x as xg,t as AC,cA as Mn,aX as D,cB as on,cC as R,cD as Te,J as JC,a8 as em,aF as R$1,cE as Pd}from'./main-4LGWVPVH.js';var oe=class{_box;_destroyed=new ue;_resizeSubject=new ue;_resizeObserver;_elementObservables=new Map;constructor(l){this._box=l,typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(e=>this._resizeSubject.next(e)));}observe(l){return this._elementObservables.has(l)||this._elementObservables.set(l,new R$1(e=>{let t=this._resizeSubject.subscribe(e);return this._resizeObserver?.observe(l,{box:this._box}),()=>{this._resizeObserver?.unobserve(l),t.unsubscribe(),this._elementObservables.delete(l);}}).pipe(kt$1(e=>e.some(t=>t.target===l)),Pd({bufferSize:1,refCount:true}),_d(this._destroyed))),this._elementObservables.get(l)}destroy(){this._destroyed.next(),this._destroyed.complete(),this._resizeSubject.complete(),this._elementObservables.clear();}},qe=(()=>{class i{_cleanupErrorListener;_observers=new Map;_ngZone=g(G);constructor(){}ngOnDestroy(){for(let[,e]of this._observers)e.destroy();this._observers.clear(),this._cleanupErrorListener?.();}observe(e,t){let n=t?.box||"content-box";return this._observers.has(n)||this._observers.set(n,new oe(n)),this._observers.get(n).observe(e)}static \u0275fac=function(t){return new(t||i)};static \u0275prov=Te({token:i,factory:i.\u0275fac})}return i})();var ut=["notch"],ht=["*"],Ue=["iconPrefixContainer"],We=["textPrefixContainer"],Ge=["iconSuffixContainer"],$e=["textSuffixContainer"],pt=["textField"],_t=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],bt=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];function gt(i,l){i&1&&Ag(0,"span",21);}function vt(i,l){if(i&1&&(Cs(0,"label",20),SC(1,1),aC(2,gt,1,0,"span",21),hl()),i&2){let e=CC(2);xg("floating",e._shouldLabelFloat())("monitorResize",e._hasOutline())("id",e._labelId),Ng("for",e._control.disableAutomaticLabeling?null:e._control.id),sI(2),cC(!e.hideRequiredMarker&&e._control.required?2:-1);}}function xt(i,l){if(i&1&&aC(0,vt,3,5,"label",20),i&2){let e=CC();cC(e._hasFloatingLabel()?0:-1);}}function yt(i,l){i&1&&Ag(0,"div",7);}function Ft(i,l){}function Ct(i,l){if(i&1&&bg(0,Ft,0,0,"ng-template",13),i&2){CC(2);let e=AC(1);xg("ngTemplateOutlet",e);}}function wt(i,l){if(i&1&&(Cs(0,"div",9),aC(1,Ct,1,1,null,13),hl()),i&2){let e=CC();xg("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat()),sI(),cC(e._forceDisplayInfixLabel()?-1:1);}}function Mt(i,l){i&1&&(Cs(0,"div",10,2),SC(2,2),hl());}function Et(i,l){i&1&&(Cs(0,"div",11,3),SC(2,3),hl());}function St(i,l){}function Tt(i,l){if(i&1&&bg(0,St,0,0,"ng-template",13),i&2){CC();let e=AC(1);xg("ngTemplateOutlet",e);}}function Rt(i,l){i&1&&(Cs(0,"div",14,4),SC(2,4),hl());}function Dt(i,l){i&1&&(Cs(0,"div",15,5),SC(2,5),hl());}function Nt(i,l){i&1&&Ag(0,"div",16);}function At(i,l){i&1&&(Cs(0,"div",18),SC(1,6),hl());}function It(i,l){if(i&1&&(Cs(0,"mat-hint",22),JC(1),hl()),i&2){let e=CC(2);xg("id",e._hintLabelId),sI(),em(e.hintLabel);}}function Lt(i,l){if(i&1&&(Cs(0,"div",19),aC(1,It,2,2,"mat-hint",22),SC(2,7),Ag(3,"div",23),SC(4,8),hl()),i&2){let e=CC();sI(),cC(e.hintLabel?1:-1);}}var ae=(()=>{class i{static \u0275fac=function(t){return new(t||i)};static \u0275dir=Bs({type:i,selectors:[["mat-label"]]})}return i})(),kt=new C("MatError");var le=(()=>{class i{align="start";id=g(Ut$1).getId("mat-mdc-hint-");static \u0275fac=function(t){return new(t||i)};static \u0275dir=Bs({type:i,selectors:[["mat-hint"]],hostAttrs:[1,"mat-mdc-form-field-hint","mat-mdc-form-field-bottom-align"],hostVars:4,hostBindings:function(t,n){t&2&&(Fg("id",n.id),Ng("align",null),qg("mat-mdc-form-field-hint-end",n.align==="end"));},inputs:{align:"align",id:"id"}})}return i})(),et=new C("MatPrefix"),Ot=(()=>{class i{set _isTextSelector(e){this._isText=true;}_isText=false;static \u0275fac=function(t){return new(t||i)};static \u0275dir=Bs({type:i,selectors:[["","matPrefix",""],["","matIconPrefix",""],["","matTextPrefix",""]],inputs:{_isTextSelector:[0,"matTextPrefix","_isTextSelector"]},features:[lT([{provide:et,useExisting:i}])]})}return i})(),tt=new C("MatSuffix"),zt=(()=>{class i{set _isTextSelector(e){this._isText=true;}_isText=false;static \u0275fac=function(t){return new(t||i)};static \u0275dir=Bs({type:i,selectors:[["","matSuffix",""],["","matIconSuffix",""],["","matTextSuffix",""]],inputs:{_isTextSelector:[0,"matTextSuffix","_isTextSelector"]},features:[lT([{provide:tt,useExisting:i}])]})}return i})(),it=new C("FloatingLabelParent"),Ze=(()=>{class i{_elementRef=g(Xt);get floating(){return this._floating}set floating(e){this._floating=e,this.monitorResize&&this._handleResize();}_floating=false;get monitorResize(){return this._monitorResize}set monitorResize(e){this._monitorResize=e,this._monitorResize?this._subscribeToResize():this._resizeSubscription.unsubscribe();}_monitorResize=false;_resizeObserver=g(qe);_ngZone=g(G);_parent=g(it);_resizeSubscription=new J;ngOnDestroy(){this._resizeSubscription.unsubscribe();}getWidth(){return Pt(this._elementRef.nativeElement)}get element(){return this._elementRef.nativeElement}_handleResize(){setTimeout(()=>this._parent._handleLabelResized());}_subscribeToResize(){this._resizeSubscription.unsubscribe(),this._ngZone.runOutsideAngular(()=>{this._resizeSubscription=this._resizeObserver.observe(this._elementRef.nativeElement,{box:"border-box"}).subscribe(()=>this._handleResize());});}static \u0275fac=function(t){return new(t||i)};static \u0275dir=Bs({type:i,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(t,n){t&2&&qg("mdc-floating-label--float-above",n.floating);},inputs:{floating:"floating",monitorResize:"monitorResize"}})}return i})();function Pt(i){let l=i;if(l.offsetParent!==null)return l.scrollWidth;let e=l.cloneNode(true);e.style.setProperty("position","absolute"),e.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(e);let t=e.scrollWidth;return e.remove(),t}var Qe="mdc-line-ripple--active",Z="mdc-line-ripple--deactivating",Xe=(()=>{class i{_elementRef=g(Xt);_cleanupTransitionEnd;constructor(){let e=g(G),t=g(Ps);e.runOutsideAngular(()=>{this._cleanupTransitionEnd=t.listen(this._elementRef.nativeElement,"transitionend",this._handleTransitionEnd);});}activate(){let e=this._elementRef.nativeElement.classList;e.remove(Z),e.add(Qe);}deactivate(){this._elementRef.nativeElement.classList.add(Z);}_handleTransitionEnd=e=>{let t=this._elementRef.nativeElement.classList,n=t.contains(Z);e.propertyName==="opacity"&&n&&t.remove(Qe,Z);};ngOnDestroy(){this._cleanupTransitionEnd();}static \u0275fac=function(t){return new(t||i)};static \u0275dir=Bs({type:i,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"]})}return i})(),Ye=(()=>{class i{_elementRef=g(Xt);_ngZone=g(G);open=false;_notch;ngAfterViewInit(){let e=this._elementRef.nativeElement,t=e.querySelector(".mdc-floating-label");t?(e.classList.add("mdc-notched-outline--upgraded"),typeof requestAnimationFrame=="function"&&(t.style.transitionDuration="0s",this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>t.style.transitionDuration="");}))):e.classList.add("mdc-notched-outline--no-label");}_setNotchWidth(e){let t=this._notch.nativeElement;!this.open||!e?t.style.width="":t.style.width=`calc(${e}px * var(--mat-mdc-form-field-floating-label-scale, 0.75) + 9px)`;}_setMaxWidth(e){this._notch.nativeElement.style.setProperty("--mat-form-field-notch-max-width",`calc(100% - ${e}px)`);}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=jw({type:i,selectors:[["div","matFormFieldNotchedOutline",""]],viewQuery:function(t,n){if(t&1&&Hg(ut,5),t&2){let r;MC(r=NC())&&(n._notch=r.first);}},hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(t,n){t&2&&qg("mdc-notched-outline--notched",n.open);},inputs:{open:[0,"matFormFieldNotchedOutlineOpen","open"]},ngContentSelectors:ht,decls:5,vars:0,consts:[["notch",""],[1,"mat-mdc-notch-piece","mdc-notched-outline__leading"],[1,"mat-mdc-notch-piece","mdc-notched-outline__notch"],[1,"mat-mdc-notch-piece","mdc-notched-outline__trailing"]],template:function(t,n){t&1&&(bC(),Rg(0,"div",1),gl(1,"div",2,0),SC(3),ml(),Rg(4,"div",3));},encapsulation:2})}return i})(),de=(()=>{class i{value=null;stateChanges;id;placeholder;ngControl=null;focused=false;empty=false;shouldLabelFloat=false;required=false;disabled=false;errorState=false;controlType;autofilled;userAriaDescribedBy;disableAutomaticLabeling;describedByIds;static \u0275fac=function(t){return new(t||i)};static \u0275dir=Bs({type:i})}return i})();var se=new C("MatFormField"),Bt=new C("MAT_FORM_FIELD_DEFAULT_OPTIONS"),Ke="fill",Vt="auto",Je="fixed",Ht="translateY(-50%)",nt=(()=>{class i{_elementRef=g(Xt);_changeDetectorRef=g(bl);_platform=g(p);_idGenerator=g(Ut$1);_ngZone=g(G);_defaults=g(Bt,{optional:true});_currentDirection;_textField;_iconPrefixContainer;_textPrefixContainer;_iconSuffixContainer;_textSuffixContainer;_floatingLabel;_notchedOutline;_lineRipple;_iconPrefixContainerSignal=oV("iconPrefixContainer");_textPrefixContainerSignal=oV("textPrefixContainer");_iconSuffixContainerSignal=oV("iconSuffixContainer");_textSuffixContainerSignal=oV("textSuffixContainer");_prefixSuffixContainers=TT(()=>[this._iconPrefixContainerSignal(),this._textPrefixContainerSignal(),this._iconSuffixContainerSignal(),this._textSuffixContainerSignal()].map(e=>e?.nativeElement).filter(e=>e!==void 0));_formFieldControl;_prefixChildren;_suffixChildren;_errorChildren;_hintChildren;_labelChild=sV(ae);get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(e){this._hideRequiredMarker=vi(e);}_hideRequiredMarker=false;color="primary";get floatLabel(){return this._floatLabel||this._defaults?.floatLabel||Vt}set floatLabel(e){e!==this._floatLabel&&(this._floatLabel=e,this._changeDetectorRef.markForCheck());}_floatLabel;get appearance(){return this._appearanceSignal()}set appearance(e){let t=e||this._defaults?.appearance||Ke;this._appearanceSignal.set(t);}_appearanceSignal=Wi(Ke);get subscriptSizing(){return this._subscriptSizing||this._defaults?.subscriptSizing||Je}set subscriptSizing(e){this._subscriptSizing=e||this._defaults?.subscriptSizing||Je;}_subscriptSizing=null;get hintLabel(){return this._hintLabel}set hintLabel(e){this._hintLabel=e,this._processHints();}_hintLabel="";_hasIconPrefix=false;_hasTextPrefix=false;_hasIconSuffix=false;_hasTextSuffix=false;_labelId=this._idGenerator.getId("mat-mdc-form-field-label-");_hintLabelId=this._idGenerator.getId("mat-mdc-hint-");_describedByIds;get _control(){return this._explicitFormFieldControl||this._formFieldControl}set _control(e){this._explicitFormFieldControl=e;}_destroyed=new ue;_isFocused=null;_explicitFormFieldControl;_previousControl=null;_previousControlValidatorFn=null;_stateChanges;_valueChanges;_describedByChanges;_outlineLabelOffsetResizeObserver=null;_animationsDisabled=K();constructor(){let e=this._defaults,t=g(Qn);e&&(e.appearance&&(this.appearance=e.appearance),this._hideRequiredMarker=!!e?.hideRequiredMarker,e.color&&(this.color=e.color)),Wf(()=>this._currentDirection=t.valueSignal()),this._syncOutlineLabelOffset();}ngAfterViewInit(){this._updateFocusState(),this._animationsDisabled||this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{this._elementRef.nativeElement.classList.add("mat-form-field-animations-enabled");},300);}),this._changeDetectorRef.detectChanges();}ngAfterContentInit(){this._assertFormFieldControl(),this._initializeSubscript(),this._initializePrefixAndSuffix();}ngAfterContentChecked(){this._assertFormFieldControl(),this._control!==this._previousControl&&(this._initializeControl(this._previousControl),this._control.ngControl&&this._control.ngControl.control&&(this._previousControlValidatorFn=this._control.ngControl.control.validator),this._previousControl=this._control),this._control.ngControl&&this._control.ngControl.control&&this._control.ngControl.control.validator!==this._previousControlValidatorFn&&this._changeDetectorRef.markForCheck();}ngOnDestroy(){this._outlineLabelOffsetResizeObserver?.disconnect(),this._stateChanges?.unsubscribe(),this._valueChanges?.unsubscribe(),this._describedByChanges?.unsubscribe(),this._destroyed.next(),this._destroyed.complete();}getLabelId=TT(()=>this._hasFloatingLabel()?this._labelId:null);getConnectedOverlayOrigin(){return this._textField||this._elementRef}_animateAndLockLabel(){this._hasFloatingLabel()&&(this.floatLabel="always");}_initializeControl(e){let t=this._control,n="mat-mdc-form-field-type-";e&&this._elementRef.nativeElement.classList.remove(n+e.controlType),t.controlType&&this._elementRef.nativeElement.classList.add(n+t.controlType),this._stateChanges?.unsubscribe(),this._stateChanges=t.stateChanges.subscribe(()=>{this._updateFocusState(),this._changeDetectorRef.markForCheck();}),this._describedByChanges?.unsubscribe(),this._describedByChanges=t.stateChanges.pipe(Sd([void 0,void 0]),re(()=>[t.errorState,t.userAriaDescribedBy]),uv(),kt$1(([[r,a],[s,C]])=>r!==s||a!==C)).subscribe(()=>this._syncDescribedByIds()),this._valueChanges?.unsubscribe(),t.ngControl&&t.ngControl.valueChanges&&(this._valueChanges=t.ngControl.valueChanges.pipe(_d(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck()));}_checkPrefixAndSuffixTypes(){this._hasIconPrefix=!!this._prefixChildren.find(e=>!e._isText),this._hasTextPrefix=!!this._prefixChildren.find(e=>e._isText),this._hasIconSuffix=!!this._suffixChildren.find(e=>!e._isText),this._hasTextSuffix=!!this._suffixChildren.find(e=>e._isText);}_initializePrefixAndSuffix(){this._checkPrefixAndSuffixTypes(),ev(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._checkPrefixAndSuffixTypes(),this._changeDetectorRef.markForCheck();});}_initializeSubscript(){this._hintChildren.changes.subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck();}),this._errorChildren.changes.subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck();}),this._validateHints(),this._syncDescribedByIds();}_assertFormFieldControl(){this._control;}_updateFocusState(){let e=this._control.focused;e&&!this._isFocused?(this._isFocused=true,this._lineRipple?.activate()):!e&&(this._isFocused||this._isFocused===null)&&(this._isFocused=false,this._lineRipple?.deactivate()),this._elementRef.nativeElement.classList.toggle("mat-focused",e),this._textField?.nativeElement.classList.toggle("mdc-text-field--focused",e);}_syncOutlineLabelOffset(){uV({earlyRead:()=>{if(this._appearanceSignal()!=="outline")return this._outlineLabelOffsetResizeObserver?.disconnect(),null;if(globalThis.ResizeObserver){this._outlineLabelOffsetResizeObserver||=new globalThis.ResizeObserver(()=>{this._writeOutlinedLabelStyles(this._getOutlinedLabelOffset());});for(let e of this._prefixSuffixContainers())this._outlineLabelOffsetResizeObserver.observe(e,{box:"border-box"});}return this._getOutlinedLabelOffset()},write:e=>this._writeOutlinedLabelStyles(e())});}_shouldAlwaysFloat(){return this.floatLabel==="always"}_hasOutline(){return this.appearance==="outline"}_forceDisplayInfixLabel(){return !this._platform.isBrowser&&this._prefixChildren.length&&!this._shouldLabelFloat()}_hasFloatingLabel=TT(()=>!!this._labelChild());_shouldLabelFloat(){return this._hasFloatingLabel()?this._control.shouldLabelFloat||this._shouldAlwaysFloat():false}_shouldForward(e){let t=this._control?this._control.ngControl:null;return t&&t[e]}_getSubscriptMessageType(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_handleLabelResized(){this._refreshOutlineNotchWidth();}_refreshOutlineNotchWidth(){!this._hasOutline()||!this._floatingLabel||!this._shouldLabelFloat()?this._notchedOutline?._setNotchWidth(0):this._notchedOutline?._setNotchWidth(this._floatingLabel.getWidth());}_processHints(){this._validateHints(),this._syncDescribedByIds();}_validateHints(){this._hintChildren;}_syncDescribedByIds(){if(this._control){let e=[];if(this._control.userAriaDescribedBy&&typeof this._control.userAriaDescribedBy=="string"&&e.push(...this._control.userAriaDescribedBy.split(" ")),this._getSubscriptMessageType()==="hint"){let r=this._hintChildren?this._hintChildren.find(s=>s.align==="start"):null,a=this._hintChildren?this._hintChildren.find(s=>s.align==="end"):null;r?e.push(r.id):this._hintLabel&&e.push(this._hintLabelId),a&&e.push(a.id);}else this._errorChildren&&e.push(...this._errorChildren.map(r=>r.id));let t=this._control.describedByIds,n;if(t){let r=this._describedByIds||e;n=e.concat(t.filter(a=>a&&!r.includes(a)));}else n=e;this._control.setDescribedByIds(n),this._describedByIds=e;}}_getOutlinedLabelOffset(){if(!this._hasOutline()||!this._floatingLabel)return null;if(!this._iconPrefixContainer&&!this._textPrefixContainer)return ["",null];if(!this._isAttachedToDom())return null;let e=this._iconPrefixContainer?.nativeElement,t=this._textPrefixContainer?.nativeElement,n=this._iconSuffixContainer?.nativeElement,r=this._textSuffixContainer?.nativeElement,a=e?.getBoundingClientRect().width??0,s=t?.getBoundingClientRect().width??0,C=n?.getBoundingClientRect().width??0,M=r?.getBoundingClientRect().width??0,dt=this._currentDirection==="rtl"?"-1":"1",st=`${a+s}px`,ct=`calc(${dt} * (${st} + var(--mat-mdc-form-field-label-offset-x, 0px)))`,ft=`var(--mat-mdc-form-field-label-transform, ${Ht} translateX(${ct}))`,mt=a+s+C+M;return [ft,mt]}_writeOutlinedLabelStyles(e){if(e!==null){let[t,n]=e;this._floatingLabel&&(this._floatingLabel.element.style.transform=t),n!==null&&this._notchedOutline?._setMaxWidth(n);}}_isAttachedToDom(){let e=this._elementRef.nativeElement;if(e.getRootNode){let t=e.getRootNode();return t&&t!==e}return document.documentElement.contains(e)}static \u0275fac=function(t){return new(t||i)};static \u0275cmp=jw({type:i,selectors:[["mat-form-field"]],contentQueries:function(t,n,r){if(t&1&&(Ug(r,n._labelChild,ae,5),Vg(r,de,5)(r,et,5)(r,tt,5)(r,kt,5)(r,le,5)),t&2){xC();let a;MC(a=NC())&&(n._formFieldControl=a.first),MC(a=NC())&&(n._prefixChildren=a),MC(a=NC())&&(n._suffixChildren=a),MC(a=NC())&&(n._errorChildren=a),MC(a=NC())&&(n._hintChildren=a);}},viewQuery:function(t,n){if(t&1&&($g(n._iconPrefixContainerSignal,Ue,5)(n._textPrefixContainerSignal,We,5)(n._iconSuffixContainerSignal,Ge,5)(n._textSuffixContainerSignal,$e,5),Hg(pt,5)(Ue,5)(We,5)(Ge,5)($e,5)(Ze,5)(Ye,5)(Xe,5)),t&2){xC(4);let r;MC(r=NC())&&(n._textField=r.first),MC(r=NC())&&(n._iconPrefixContainer=r.first),MC(r=NC())&&(n._textPrefixContainer=r.first),MC(r=NC())&&(n._iconSuffixContainer=r.first),MC(r=NC())&&(n._textSuffixContainer=r.first),MC(r=NC())&&(n._floatingLabel=r.first),MC(r=NC())&&(n._notchedOutline=r.first),MC(r=NC())&&(n._lineRipple=r.first);}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:38,hostBindings:function(t,n){t&2&&qg("mat-mdc-form-field-label-always-float",n._shouldAlwaysFloat())("mat-mdc-form-field-has-icon-prefix",n._hasIconPrefix)("mat-mdc-form-field-has-icon-suffix",n._hasIconSuffix)("mat-form-field-invalid",n._control.errorState)("mat-form-field-disabled",n._control.disabled)("mat-form-field-autofilled",n._control.autofilled)("mat-form-field-appearance-fill",n.appearance=="fill")("mat-form-field-appearance-outline",n.appearance=="outline")("mat-form-field-hide-placeholder",n._hasFloatingLabel()&&!n._shouldLabelFloat())("mat-primary",n.color!=="accent"&&n.color!=="warn")("mat-accent",n.color==="accent")("mat-warn",n.color==="warn")("ng-untouched",n._shouldForward("untouched"))("ng-touched",n._shouldForward("touched"))("ng-pristine",n._shouldForward("pristine"))("ng-dirty",n._shouldForward("dirty"))("ng-valid",n._shouldForward("valid"))("ng-invalid",n._shouldForward("invalid"))("ng-pending",n._shouldForward("pending"));},inputs:{hideRequiredMarker:"hideRequiredMarker",color:"color",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",hintLabel:"hintLabel"},exportAs:["matFormField"],features:[lT([{provide:se,useExisting:i},{provide:it,useExisting:i}])],ngContentSelectors:bt,decls:18,vars:21,consts:[["labelTemplate",""],["textField",""],["iconPrefixContainer",""],["textPrefixContainer",""],["textSuffixContainer",""],["iconSuffixContainer",""],[1,"mat-mdc-text-field-wrapper","mdc-text-field",3,"click"],[1,"mat-mdc-form-field-focus-overlay"],[1,"mat-mdc-form-field-flex"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen"],[1,"mat-mdc-form-field-icon-prefix"],[1,"mat-mdc-form-field-text-prefix"],[1,"mat-mdc-form-field-infix"],[3,"ngTemplateOutlet"],[1,"mat-mdc-form-field-text-suffix"],[1,"mat-mdc-form-field-icon-suffix"],["matFormFieldLineRipple",""],["aria-atomic","true","aria-live","polite",1,"mat-mdc-form-field-subscript-wrapper","mat-mdc-form-field-bottom-align"],[1,"mat-mdc-form-field-error-wrapper"],[1,"mat-mdc-form-field-hint-wrapper"],["matFormFieldFloatingLabel","",3,"floating","monitorResize","id"],["aria-hidden","true",1,"mat-mdc-form-field-required-marker","mdc-floating-label--required"],[3,"id"],[1,"mat-mdc-form-field-hint-spacer"]],template:function(t,n){if(t&1&&(bC(_t),bg(0,xt,1,1,"ng-template",null,0,ET),Cs(2,"div",6,1),Lg("click",function(a){return n._control.onContainerClick(a)}),aC(4,yt,1,0,"div",7),Cs(5,"div",8),aC(6,wt,2,2,"div",9),aC(7,Mt,3,0,"div",10),aC(8,Et,3,0,"div",11),Cs(9,"div",12),aC(10,Tt,1,1,null,13),SC(11),hl(),aC(12,Rt,3,0,"div",14),aC(13,Dt,3,0,"div",15),hl(),aC(14,Nt,1,0,"div",16),hl(),Cs(15,"div",17),aC(16,At,2,0,"div",18)(17,Lt,5,1,"div",19),hl()),t&2){let r;sI(2),qg("mdc-text-field--filled",!n._hasOutline())("mdc-text-field--outlined",n._hasOutline())("mdc-text-field--no-label",!n._hasFloatingLabel())("mdc-text-field--disabled",n._control.disabled)("mdc-text-field--invalid",n._control.errorState),sI(2),cC(!n._hasOutline()&&!n._control.disabled?4:-1),sI(2),cC(n._hasOutline()?6:-1),sI(),cC(n._hasIconPrefix?7:-1),sI(),cC(n._hasTextPrefix?8:-1),sI(2),cC(!n._hasOutline()||n._forceDisplayInfixLabel()?10:-1),sI(2),cC(n._hasTextSuffix?12:-1),sI(),cC(n._hasIconSuffix?13:-1),sI(),cC(n._hasOutline()?-1:14),sI(),qg("mat-mdc-form-field-subscript-dynamic-size",n.subscriptSizing==="dynamic");let a=n._getSubscriptMessageType();sI(),cC((r=a)==="error"?16:r==="hint"?17:-1);}},dependencies:[Ze,Ye,kb,Xe,le],styles:[`.mdc-text-field {
2
2
  display: inline-flex;
3
3
  align-items: baseline;
4
4
  padding: 0 16px;
@@ -1,2 +1,2 @@
1
- import {n as ne}from'./chunk-DCx8SlS-.js';import {g,Z as z$1,_ as Ue,j as jw,$ as zt,a0 as jt,a1 as Vt,a2 as Nt,h as hr,e as pr,k as Cs,J as JC,m as hl,o as aC,n as Lg,u as sI,y as qg,a5 as Dl,a8 as em,v as cC,x as xg,a9 as vC,ai as sm,aa as Sf,ac as CC,aj as iT,ab as _f,a3 as ZI,ak as im,a6 as QI}from'./main-JTU33H5D.js';import {y as yt,w as wt,t as ti,Z as Zn,c as cn}from'./chunk-DuXr-yGB.js';function G(c,p){if(c&1){let t=vC();Cs(0,"mat-checkbox",5),sm("ngModelChange",function(l){Sf(t);let f=CC();return iT(f.checkboxChecked,l)||(f.checkboxChecked=l),_f(l)}),JC(1),hl(),ZI();}if(c&2){let t=CC();im("ngModel",t.checkboxChecked),QI(),sI(),em(t.data.checkboxLabel);}}var z=class c{dialogRef=g(z$1);data=g(Ue);checkboxChecked=false;confirm(){this.dialogRef.close({confirmed:true,checkboxChecked:this.checkboxChecked});}cancel(){this.dialogRef.close({confirmed:false});}static \u0275fac=function(t){return new(t||c)};static \u0275cmp=jw({type:c,selectors:[["app-confirm-dialog"]],decls:13,vars:8,consts:[["mat-dialog-title",""],[3,"ngModel"],["align","end"],["mat-button","",3,"click"],["mat-flat-button","",3,"click","color"],[3,"ngModelChange","ngModel"]],template:function(t,e){t&1&&(Cs(0,"h2",0)(1,"mat-icon"),JC(2,"warning"),hl(),JC(3),hl(),Cs(4,"mat-dialog-content")(5,"p"),JC(6),hl(),aC(7,G,2,2,"mat-checkbox",1),hl(),Cs(8,"mat-dialog-actions",2)(9,"button",3),Lg("click",function(){return e.cancel()}),JC(10),hl(),Cs(11,"button",4),Lg("click",function(){return e.confirm()}),JC(12),hl()()),t&2&&(sI(),qg("destructive",!!e.data.isDestructive),sI(2),Dl(" ",e.data.title,`
1
+ import {n as ne}from'./chunk-CWfLK-02.js';import {g,Z as z$1,_ as Ue,j as jw,$ as zt,a0 as jt,a1 as Vt,a2 as Nt,h as hr,e as pr,k as Cs,J as JC,m as hl,o as aC,n as Lg,u as sI,y as qg,a5 as Dl,a8 as em,v as cC,x as xg,a9 as vC,ai as sm,aa as Sf,ac as CC,aj as iT,ab as _f,a3 as ZI,ak as im,a6 as QI}from'./main-4LGWVPVH.js';import {y as yt,w as wt,t as ti,Z as Zn,c as cn}from'./chunk-CPuMGlfm.js';function G(c,p){if(c&1){let t=vC();Cs(0,"mat-checkbox",5),sm("ngModelChange",function(l){Sf(t);let f=CC();return iT(f.checkboxChecked,l)||(f.checkboxChecked=l),_f(l)}),JC(1),hl(),ZI();}if(c&2){let t=CC();im("ngModel",t.checkboxChecked),QI(),sI(),em(t.data.checkboxLabel);}}var z=class c{dialogRef=g(z$1);data=g(Ue);checkboxChecked=false;confirm(){this.dialogRef.close({confirmed:true,checkboxChecked:this.checkboxChecked});}cancel(){this.dialogRef.close({confirmed:false});}static \u0275fac=function(t){return new(t||c)};static \u0275cmp=jw({type:c,selectors:[["app-confirm-dialog"]],decls:13,vars:8,consts:[["mat-dialog-title",""],[3,"ngModel"],["align","end"],["mat-button","",3,"click"],["mat-flat-button","",3,"click","color"],[3,"ngModelChange","ngModel"]],template:function(t,e){t&1&&(Cs(0,"h2",0)(1,"mat-icon"),JC(2,"warning"),hl(),JC(3),hl(),Cs(4,"mat-dialog-content")(5,"p"),JC(6),hl(),aC(7,G,2,2,"mat-checkbox",1),hl(),Cs(8,"mat-dialog-actions",2)(9,"button",3),Lg("click",function(){return e.cancel()}),JC(10),hl(),Cs(11,"button",4),Lg("click",function(){return e.confirm()}),JC(12),hl()()),t&2&&(sI(),qg("destructive",!!e.data.isDestructive),sI(2),Dl(" ",e.data.title,`
2
2
  `),sI(3),em(e.data.message),sI(),cC(e.data.checkboxLabel?7:-1),sI(3),em(e.data.cancelLabel??"Cancel"),sI(),xg("color",e.data.isDestructive?"warn":"primary"),sI(),Dl(" ",e.data.confirmLabel??"Confirm"," "));},dependencies:[zt,jt,Vt,Nt,hr,pr,yt,wt,ne,ti,Zn,cn],styles:["h2[mat-dialog-title][_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}h2[mat-dialog-title][_ngcontent-%COMP%] mat-icon.destructive[_ngcontent-%COMP%]{color:var(--color-error, #f44336)}mat-dialog-content[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--color-text-secondary);line-height:1.5}mat-dialog-content[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%]{display:block;margin-top:8px;font-size:.875rem}"]})};export{z};
@@ -1 +1 @@
1
- import {S as S$1}from'./chunk-Co5BFbll.js';import {g,G,C as Ce,df as U,aJ as Tr,W as Wi,bS as Da,r as re,b as U$1,j as jw,aK as Lb,k as Cs,bf as gT,n as Lg,m as hl,af as bg,t as AC,x as xg,bg as yT,ah as dT,o as aC,ac as CC,v as cC,a9 as vC,aa as Sf,ab as _f,ag as ET}from'./main-JTU33H5D.js';import {W as Wn,S as Se}from'./chunk-DeXXr4BL.js';import'./chunk-DK1hp0WW.js';import'./chunk-DuXr-yGB.js';var S=()=>[];function V(r,e){if(r&1){let t=vC();Cs(0,"agentos-ai-provider-item",4),Lg("editRequested",function(i){Sf(t);let p=CC(2);return _f(p.onEdit(i))})("deleteRequested",function(i){Sf(t);let p=CC(2);return _f(p.onDelete(i))}),hl();}r&2&&xg("config",e)("showBadge",false);}function F(r,e){if(r&1&&aC(0,V,1,2,"agentos-ai-provider-item",3),r&2){let t,o=e.$implicit,i=CC();cC((t=i.resolveProvider(o.id))?0:-1,t);}}var E=class r{router=g(G);destroyRef=g(Ce);aiProviderController=g(U);refresh$=new Tr(void 0);isLoading=Wi(true);providers$=this.refresh$.pipe(Da(()=>(this.isLoading.set(true),this.aiProviderController.listAiProvider("none"))));providerItems$=this.providers$.pipe(re(e=>e.map(t=>({id:t.id??"",name:t.name,description:t.apiType}))));providersById=new Map;constructor(){this.providers$.pipe(U$1(this.destroyRef)).subscribe({next:e=>{this.providersById=new Map(e.map(t=>[t.id??"",t])),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}goBack(){this.router.navigate(["/agentos","admin"]);}openCreateForm(){this.router.navigate(["/agentos","admin","ai-providers","new"]);}onEdit(e){e.id&&this.router.navigate(["/agentos","admin","ai-providers",e.id,"edit"]);}onDelete(e){e.id&&this.aiProviderController.deleteAiProvider(e.id).pipe(U$1(this.destroyRef)).subscribe(()=>this.refresh$.next());}resolveProvider(e){return this.providersById.get(e)??null}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=jw({type:r,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(t,o){if(t&1&&(Cs(0,"ds-entity-list",1),gT(1,"async"),Lg("createRequested",function(){return o.openCreateForm()}),Cs(2,"ds-icon-button",2),Lg("action",function(){return o.goBack()}),hl()(),bg(3,F,1,1,"ng-template",null,0,ET)),t&2){let i=AC(4);xg("items",yT(1,4,o.providerItems$)??dT(6,S))("loading",o.isLoading())("showCreate",true)("itemTemplate",i);}},dependencies:[Wn,S$1,Se,Lb],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{E as PlatformAiProvidersComponent};
1
+ import {S as S$1}from'./chunk-CIFgO2HT.js';import {g,G,C as Ce,df as U,aJ as Tr,W as Wi,bS as Da,r as re,b as U$1,j as jw,aK as Lb,k as Cs,bf as gT,n as Lg,m as hl,af as bg,t as AC,x as xg,bg as yT,ah as dT,o as aC,ac as CC,v as cC,a9 as vC,aa as Sf,ab as _f,ag as ET}from'./main-4LGWVPVH.js';import {W as Wn,S as Se}from'./chunk-CmWqV8dc.js';import'./chunk-B2UoGfZ3.js';import'./chunk-CPuMGlfm.js';var S=()=>[];function V(r,e){if(r&1){let t=vC();Cs(0,"agentos-ai-provider-item",4),Lg("editRequested",function(i){Sf(t);let p=CC(2);return _f(p.onEdit(i))})("deleteRequested",function(i){Sf(t);let p=CC(2);return _f(p.onDelete(i))}),hl();}r&2&&xg("config",e)("showBadge",false);}function F(r,e){if(r&1&&aC(0,V,1,2,"agentos-ai-provider-item",3),r&2){let t,o=e.$implicit,i=CC();cC((t=i.resolveProvider(o.id))?0:-1,t);}}var E=class r{router=g(G);destroyRef=g(Ce);aiProviderController=g(U);refresh$=new Tr(void 0);isLoading=Wi(true);providers$=this.refresh$.pipe(Da(()=>(this.isLoading.set(true),this.aiProviderController.listAiProvider("none"))));providerItems$=this.providers$.pipe(re(e=>e.map(t=>({id:t.id??"",name:t.name,description:t.apiType}))));providersById=new Map;constructor(){this.providers$.pipe(U$1(this.destroyRef)).subscribe({next:e=>{this.providersById=new Map(e.map(t=>[t.id??"",t])),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}goBack(){this.router.navigate(["/agentos","admin"]);}openCreateForm(){this.router.navigate(["/agentos","admin","ai-providers","new"]);}onEdit(e){e.id&&this.router.navigate(["/agentos","admin","ai-providers",e.id,"edit"]);}onDelete(e){e.id&&this.aiProviderController.deleteAiProvider(e.id).pipe(U$1(this.destroyRef)).subscribe(()=>this.refresh$.next());}resolveProvider(e){return this.providersById.get(e)??null}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=jw({type:r,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(t,o){if(t&1&&(Cs(0,"ds-entity-list",1),gT(1,"async"),Lg("createRequested",function(){return o.openCreateForm()}),Cs(2,"ds-icon-button",2),Lg("action",function(){return o.goBack()}),hl()(),bg(3,F,1,1,"ng-template",null,0,ET)),t&2){let i=AC(4);xg("items",yT(1,4,o.providerItems$)??dT(6,S))("loading",o.isLoading())("showCreate",true)("itemTemplate",i);}},dependencies:[Wn,S$1,Se,Lb],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{E as PlatformAiProvidersComponent};