@whoz-oss/coday-client 3.24.0 → 3.26.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 (101) hide show
  1. package/3rdpartylicenses.txt +234 -0
  2. package/browser/{chunk-D4DTIvDf.js → chunk-1xKCP6gl.js} +1 -1
  3. package/browser/{chunk-BHb31ndI.js → chunk-B1gTtKFG.js} +1 -1
  4. package/browser/{chunk-15rAOoZz.js → chunk-BIdH1XJF.js} +2 -2
  5. package/browser/chunk-BSAXfS2x.js +1 -0
  6. package/browser/{chunk-DK1hp0WW.js → chunk-Bbb2Oy9I.js} +6 -6
  7. package/browser/{chunk-DeXXr4BL.js → chunk-BjBW1d-u.js} +6 -6
  8. package/browser/{chunk-C2agnPiQ.js → chunk-BlUiCEeR.js} +1 -1
  9. package/browser/{chunk-CPI0Zzv3.js → chunk-BloWX02p.js} +1 -1
  10. package/browser/{chunk-XBakzM_b.js → chunk-BmHNWYuZ.js} +1 -1
  11. package/browser/{chunk-DgYr3Diz.js → chunk-Bo1DjeiW.js} +1 -1
  12. package/browser/{chunk-CPt7Uw3a.js → chunk-Boc0RvBR.js} +1 -1
  13. package/browser/{chunk-CjPIJIB-.js → chunk-Bol7PdRu.js} +1 -1
  14. package/browser/{chunk-DNVNXvsJ.js → chunk-BtBbv-Bf.js} +1 -1
  15. package/browser/{chunk-I8YepFsn.js → chunk-BvO---8Y.js} +2 -2
  16. package/browser/chunk-Bv_n_Pea.js +141 -0
  17. package/browser/chunk-C-VoWDOg.js +10 -0
  18. package/browser/chunk-C0DMx9CU.js +1 -0
  19. package/browser/chunk-C3cvHmBJ.js +1 -0
  20. package/browser/chunk-C5mPb_F4.js +1 -0
  21. package/browser/chunk-C6x9SBjG.js +1 -0
  22. package/browser/{chunk-C11du_uP.js → chunk-CBwpP2V0.js} +1 -1
  23. package/browser/{chunk-CIcEtCxk.js → chunk-CCEiNYBj.js} +1 -1
  24. package/browser/chunk-CCQAu0MS.js +1 -0
  25. package/browser/chunk-CE5rgBGE.js +182 -0
  26. package/browser/{chunk-BYJTaU4n.js → chunk-CERsD1uZ.js} +1 -1
  27. package/browser/chunk-CFY3CFkD.js +1 -0
  28. package/browser/{chunk-DCx8SlS-.js → chunk-CFfiJ53b.js} +1 -1
  29. package/browser/{chunk-7-d3g3_Q.js → chunk-CG4buEjj.js} +1 -1
  30. package/browser/{chunk-mUd43Vo8.js → chunk-CGL1Leue.js} +1 -1
  31. package/browser/{chunk-kNbhE9tu.js → chunk-CGlvdEI7.js} +1 -1
  32. package/browser/chunk-CHSLALZZ.js +111 -0
  33. package/browser/chunk-CRrjfkUg.js +5 -0
  34. package/browser/chunk-CdkqXKu3.js +1 -0
  35. package/browser/{chunk-DDertr1B.js → chunk-ChTqQ8HQ.js} +1 -1
  36. package/browser/chunk-CjKxvXTd.js +1 -0
  37. package/browser/{chunk-DCjMvdvV.js → chunk-Cmp8otOQ.js} +1 -1
  38. package/browser/{chunk-CbCwwL-W.js → chunk-CpGwP-5T.js} +1 -1
  39. package/browser/{chunk-CaH-AtD3.js → chunk-CrYRdxC9.js} +2 -2
  40. package/browser/chunk-CrZEE1qa.js +1 -0
  41. package/browser/chunk-Cw62GRPX.js +1 -0
  42. package/browser/{chunk-B-t2KLMQ.js → chunk-CxozF4Vf.js} +1 -1
  43. package/browser/{chunk-CzDFGxwY.js → chunk-D-vld_6F.js} +1 -1
  44. package/browser/{chunk-DFjiy89D.js → chunk-D2pgQ9ii.js} +1 -1
  45. package/browser/{chunk-BPAPWlpQ.js → chunk-D5UGtM5T.js} +1 -1
  46. package/browser/{chunk-CKBQdAGJ.js → chunk-DG8M0PqZ.js} +1 -1
  47. package/browser/chunk-DKg7p59a.js +1 -0
  48. package/browser/chunk-DOV6c8DN.js +4 -0
  49. package/browser/{chunk-BLSD82nL.js → chunk-DX05HUs9.js} +1 -1
  50. package/browser/{chunk-IXLj2Qpp.js → chunk-DZe-m4Sd.js} +1 -1
  51. package/browser/chunk-D_aTK145.js +37 -0
  52. package/browser/chunk-DczzZnS1.js +1 -0
  53. package/browser/{chunk-KXiD_ZK3.js → chunk-Ddpg0y75.js} +1 -1
  54. package/browser/chunk-DgmZwFcU.js +2 -0
  55. package/browser/chunk-DpKLsgM9.js +1 -0
  56. package/browser/chunk-DuNMllH-.js +2 -0
  57. package/browser/chunk-Dz1wgxrF.js +1 -0
  58. package/browser/{chunk-CKEgNNXU.js → chunk-Fh0Lvh-K.js} +1 -1
  59. package/browser/{chunk-BK_05kmN.js → chunk-G_l8BMaJ.js} +3 -3
  60. package/browser/{chunk-DpkO3_bQ.js → chunk-Ov4I3GYD.js} +1 -1
  61. package/browser/{chunk-4XIlyOr9.js → chunk-RUBMO7Yb.js} +3 -3
  62. package/browser/{chunk-DwQ0v-xH.js → chunk-WuZ8xi__.js} +1 -1
  63. package/browser/chunk-_2qKLbuS.js +1 -0
  64. package/browser/{chunk-B3xYeZtG.js → chunk-a4RWgm8g.js} +1 -1
  65. package/browser/{chunk-C2Rueaad.js → chunk-bIJnspzL.js} +1 -1
  66. package/browser/{chunk-Co5BFbll.js → chunk-cNEt2yX6.js} +1 -1
  67. package/browser/{chunk-Cf7f_94t.js → chunk-cg5smJeu.js} +1 -1
  68. package/browser/{chunk-CBYDDKYs.js → chunk-q9uyoVUw.js} +1 -1
  69. package/browser/chunk-sqjr_Ky0.js +1 -0
  70. package/browser/{chunk-D-5Imhde.js → chunk-u3jxNXQ8.js} +1 -1
  71. package/browser/chunk-vQXZQsZC.js +1 -0
  72. package/browser/index.html +1 -1
  73. package/browser/main-2GG5NZ4C.js +1811 -0
  74. package/package.json +1 -1
  75. package/browser/chunk-16yQFy5_.js +0 -1
  76. package/browser/chunk-B4l5qLZ6.js +0 -1
  77. package/browser/chunk-B52iVZ-n.js +0 -182
  78. package/browser/chunk-B7GIYsvs.js +0 -1
  79. package/browser/chunk-BBRGEWfs.js +0 -1
  80. package/browser/chunk-BOArVQMu.js +0 -1
  81. package/browser/chunk-BQmHxval.js +0 -1
  82. package/browser/chunk-BYg1TwUC.js +0 -1
  83. package/browser/chunk-BqhCkR9t.js +0 -1
  84. package/browser/chunk-BqxwtKFs.js +0 -1
  85. package/browser/chunk-Byin_63d.js +0 -141
  86. package/browser/chunk-BzZbVcon.js +0 -4
  87. package/browser/chunk-C1RU8zia.js +0 -9
  88. package/browser/chunk-C93ZXc5y.js +0 -1
  89. package/browser/chunk-C9dkqMA4.js +0 -1
  90. package/browser/chunk-CIfgFQUQ.js +0 -5
  91. package/browser/chunk-CqM-2yCQ.js +0 -2
  92. package/browser/chunk-D4_R7aqN.js +0 -1
  93. package/browser/chunk-DIuETvVC.js +0 -1
  94. package/browser/chunk-DuXr-yGB.js +0 -37
  95. package/browser/chunk-TkSR4UzV.js +0 -1
  96. package/browser/chunk-buoxjd5i.js +0 -1
  97. package/browser/chunk-g2nkIubB.js +0 -1
  98. package/browser/chunk-j5aTABHx.js +0 -2
  99. package/browser/chunk-nSYjfmpf.js +0 -1
  100. package/browser/chunk-sLJinEtR.js +0 -1
  101. package/browser/main-JTU33H5D.js +0 -1811
@@ -1 +0,0 @@
1
- import {I}from'./chunk-D-5Imhde.js';import {m}from'./chunk-C1RU8zia.js';import {g,G,C as Ce,aJ as Tr,W as Wi,bS as Da,r as re,b as U,j as jw,aK as Lb,k as Cs,bf as gT,n as 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';import'./chunk-BK_05kmN.js';var F=()=>[];function N(o,e){if(o&1){let t=vC();Cs(0,"agentos-prompt-item",4),Lg("deleteRequested",function(n){Sf(t);let E=CC(2);return _f(E.deletePrompt(n))}),hl();}o&2&&xg("prompt",e)("platformMode",true);}function V(o,e){if(o&1&&aC(0,N,1,2,"agentos-prompt-item",3),o&2){let t,r=e.$implicit,n=CC();cC((t=n.resolvePrompt(r.id))?0:-1,t);}}var q=class o{router=g(G);destroyRef=g(Ce);promptState=g(m);refresh$=new Tr(void 0);isLoading=Wi(true);prompts$=this.refresh$.pipe(Da(()=>(this.isLoading.set(true),this.promptState.listPlatform())));promptItems$=this.prompts$.pipe(re(e=>e.map(t=>({id:t.id??"",name:t.name,description:t.description}))));promptsById=new Map;constructor(){this.prompts$.pipe(U(this.destroyRef)).subscribe({next:e=>{this.promptsById=new Map(e.map(t=>[t.id??"",t])),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}goBack(){this.router.navigate(["/agentos","admin"]);}openCreateForm(){this.router.navigate(["/agentos","admin","prompts","new"]);}deletePrompt(e){this.promptState.delete(e.id??"").pipe(U(this.destroyRef)).subscribe(()=>this.refresh$.next());}resolvePrompt(e){return this.promptsById.get(e)??null}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=jw({type:o,selectors:[["agentos-platform-prompts"]],decls:5,vars:7,consts:[["promptItemTpl",""],["title","Platform Prompts","emptyMessage","No platform prompts defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","loading","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[3,"prompt","platformMode"],[3,"deleteRequested","prompt","platformMode"]],template:function(t,r){if(t&1&&(Cs(0,"ds-entity-list",1),gT(1,"async"),Lg("createRequested",function(){return r.openCreateForm()}),Cs(2,"ds-icon-button",2),Lg("action",function(){return r.goBack()}),hl()(),bg(3,V,1,1,"ng-template",null,0,ET)),t&2){let n=AC(4);xg("items",yT(1,4,r.promptItems$)??dT(6,F))("loading",r.isLoading())("showCreate",true)("itemTemplate",n);}},dependencies:[Wn,I,Se,Lb],styles:[".platform-prompts__back[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.platform-prompts__back[_ngcontent-%COMP%]:hover{text-decoration:underline}"]})};export{q as PlatformPromptsComponent};
@@ -1 +0,0 @@
1
- import {g,ao as V,G,d5 as k,C as Ce,W as Wi,b as U$1,z as z$1,a as P,j as jw,k as Cs,n as Lg,J as JC,m as hl,o as aC,u as sI,a8 as em,v as cC,a9 as vC,A as Ag,a3 as ZI,ac as CC,x as xg,a6 as QI,a5 as Dl,aa as Sf,ab as _f}from'./main-JTU33H5D.js';import {o as z,k as _t,b as _e,n as ni,J as Jn,Y as Ye,f as fn,Z as Zn,l as Xn,$ as $t,C as Cn,E as En}from'./chunk-DuXr-yGB.js';function U(l,r){l&1&&(Cs(0,"p",5),JC(1,"Loading\u2026"),hl());}function H(l,r){if(l&1){let e=vC();Cs(0,"form",7),Lg("ngSubmit",function(){Sf(e);let u=CC();return _f(u.submit())}),Cs(1,"div",8)(2,"label",9),JC(3,"Name "),Cs(4,"span",10),JC(5,"*"),hl()(),Ag(6,"input",11),ZI(),hl(),Cs(7,"div",8)(8,"label",12),JC(9,"Description"),hl(),Ag(10,"textarea",13),ZI(),hl(),Cs(11,"div",8)(12,"label",14),JC(13,"External ID"),hl(),Ag(14,"input",15),ZI(),hl(),Cs(15,"div",8)(16,"label",16),JC(17,"Default agent"),hl(),Ag(18,"input",17),ZI(),hl(),Cs(19,"div",8)(20,"label",18),JC(21,"Config path"),hl(),Ag(22,"input",19),ZI(),hl(),Cs(23,"div",8)(24,"label",20),JC(25,"Run cost threshold"),hl(),Ag(26,"input",21),ZI(),Cs(27,"span",22),JC(28,"Leave empty to inherit the platform default."),hl()(),Cs(29,"div",23)(30,"button",24),JC(31),hl(),Cs(32,"button",25),Lg("click",function(){Sf(e);let u=CC();return _f(u.cancel())}),JC(33,"Cancel"),hl()()();}if(l&2){let e=CC();xg("formGroup",e.form),sI(6),xg("formControl",e.nameControl),QI(),sI(4),xg("formControl",e.descriptionControl),QI(),sI(4),xg("formControl",e.externalIdControl),QI(),sI(4),xg("formControl",e.defaultAgentNameControl),QI(),sI(4),xg("formControl",e.configPathControl),QI(),sI(4),xg("formControl",e.runCostThresholdControl),QI(),sI(4),xg("disabled",e.nameControl.invalid||e.isSubmitting()),sI(),Dl(" ",e.isEditMode()?"Save changes":"Create"," ");}}var q=class l{route=g(V);router=g(G);namespaceController=g(k);destroyRef=g(Ce);form=new z({name:new _t("",{nonNullable:true,validators:[_e.required,_e.minLength(1)]}),description:new _t("",{nonNullable:true}),configPath:new _t("",{nonNullable:true}),externalId:new _t("",{nonNullable:true}),defaultAgentName:new _t("",{nonNullable:true}),runCostThreshold:new _t(null)});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get configPathControl(){return this.form.controls.configPath}get externalIdControl(){return this.form.controls.externalId}get defaultAgentNameControl(){return this.form.controls.defaultAgentName}get runCostThresholdControl(){return this.form.controls.runCostThreshold}isEditMode=Wi(false);isSubmitting=Wi(false);isLoading=Wi(false);existingNamespace=null;ngOnInit(){let r=this.route.snapshot.paramMap.get("namespaceId");r&&(this.isEditMode.set(true),this.loadNamespace(r));}loadNamespace(r){this.isLoading.set(true),this.namespaceController.getByIdNamespace(r).pipe(U$1(this.destroyRef)).subscribe({next:e=>{this.existingNamespace=e,this.nameControl.setValue(e.name),this.descriptionControl.setValue(e.description??""),this.configPathControl.setValue(e.configPath??""),this.externalIdControl.setValue(e.externalId??""),this.defaultAgentNameControl.setValue(e.defaultAgentName??""),this.runCostThresholdControl.setValue(e.runCostThreshold??null),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),this.navigateBack();}});}submit(){if(this.nameControl.invalid||this.isSubmitting())return;this.isSubmitting.set(true);let r=z$1(P({},this.existingNamespace),{name:this.nameControl.value.trim(),description:this.descriptionControl.value.trim()||void 0,configPath:this.configPathControl.value.trim()||void 0,externalId:this.externalIdControl.value.trim()||void 0,defaultAgentName:this.defaultAgentNameControl.value.trim()||void 0,runCostThreshold:this.runCostThresholdControl.value??void 0});(this.isEditMode()?this.namespaceController.updateNamespace(this.existingNamespace.id??"",r):this.namespaceController.createNamespace(r)).pipe(U$1(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(false)});}cancel(){this.navigateBack();}navigateBack(){this.router.navigate(["/agentos/namespaces"]);}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=jw({type:l,selectors:[["agentos-namespace-form"]],decls:10,vars:2,consts:[[1,"namespace-form"],[1,"namespace-form__header"],["type","button","title","Back to namespaces",1,"namespace-form__back",3,"click"],[1,"namespace-form__back-icon"],[1,"namespace-form__title"],[1,"namespace-form__loading"],[1,"namespace-form__form",3,"formGroup"],[1,"namespace-form__form",3,"ngSubmit","formGroup"],[1,"namespace-form__field"],["for","ns-name",1,"namespace-form__label"],["aria-hidden","true"],["id","ns-name","type","text","placeholder","Namespace name","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-description",1,"namespace-form__label"],["id","ns-description","rows","4","placeholder","Optional description",1,"namespace-form__textarea",3,"formControl"],["for","ns-external-id",1,"namespace-form__label"],["id","ns-external-id","type","text","placeholder","Optional federation ID from an external system","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-default-agent",1,"namespace-form__label"],["id","ns-default-agent","type","text","placeholder","Logical name of the default agent (e.g. coday)","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-config-path",1,"namespace-form__label"],["id","ns-config-path","type","text","placeholder","Optional path to base configuration directory","autocomplete","off",1,"namespace-form__input",3,"formControl"],["for","ns-run-cost-threshold",1,"namespace-form__label"],["id","ns-run-cost-threshold","type","number","min","0","step","0.01","placeholder","Optional maximum cost per run (e.g. 0.50)",1,"namespace-form__input",3,"formControl"],[1,"namespace-form__hint"],[1,"namespace-form__actions"],["type","submit",1,"namespace-form__btn","namespace-form__btn--primary",3,"disabled"],["type","button",1,"namespace-form__btn",3,"click"]],template:function(e,p){e&1&&(Cs(0,"div",0)(1,"header",1)(2,"button",2),Lg("click",function(){return p.cancel()}),Cs(3,"span",3),JC(4,"\u2190"),hl(),JC(5," Namespaces "),hl(),Cs(6,"h1",4),JC(7),hl()(),aC(8,U,2,0,"p",5)(9,H,34,9,"form",6),hl()),e&2&&(sI(7),em(p.isEditMode()?"Edit namespace":"New namespace"),sI(),cC(p.isLoading()?8:9));},dependencies:[ni,Jn,Ye,fn,Zn,Xn,$t,Cn,En],styles:[".namespace-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:480px;margin:0 auto;padding:2rem 1rem}.namespace-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.namespace-form__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-accent)}.namespace-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.namespace-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.namespace-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:700;color:var(--color-text);letter-spacing:-.02em}.namespace-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.9rem;margin:0}.namespace-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.namespace-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.namespace-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text)}.namespace-form__input[_ngcontent-%COMP%], .namespace-form__textarea[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:0;border:1px solid var(--color-divider);background:var(--color-surface);color:var(--color-text);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;transition:border-color .15s ease}.namespace-form__input[_ngcontent-%COMP%]:focus, .namespace-form__textarea[_ngcontent-%COMP%]:focus{border-color:var(--color-accent)}.namespace-form__input[_ngcontent-%COMP%]::placeholder, .namespace-form__textarea[_ngcontent-%COMP%]::placeholder{color:var(--color-neutral-500)}.namespace-form__textarea[_ngcontent-%COMP%]{resize:vertical;min-height:96px;line-height:1.5}.namespace-form__hint[_ngcontent-%COMP%]{font-size:.8rem;color:var(--color-text-secondary)}.namespace-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.namespace-form__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border-radius:0;border:1px solid var(--color-divider);background:transparent;color:var(--color-text);font-size:13px;font-family:var(--font-heading);font-weight:600;cursor:pointer;transition:background .15s ease,border-color .15s ease}.namespace-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover);border-color:var(--color-neutral-500)}.namespace-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.namespace-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-accent);border-color:var(--color-accent);color:#fff}.namespace-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-700);border-color:var(--color-accent-700)}"]})};export{q as NamespaceFormComponent};
@@ -1,5 +0,0 @@
1
- import {Z as Ze,Y as Ye$1,E as Et$1,y as yt$2}from'./chunk-B52iVZ-n.js';import {an as ue,al as vt,g,O as Ot$1,F,r as re,W as Wi,T as TT,R as Re,P,K as c,G,L,U,ap as _d,j as jw,h as hr,i as Gn,bA as bC,o as aC,k as Cs,n as Lg,J as JC,m as hl,bB as SC,A as Ag,v as cC,u as sI,y as qg,x as xg,N as Ng,bk as wh,a8 as em,H as Hg,M as MC,B as NC,aL as wo,aM as Zn$1,aO as wt$1,cb as nV,I as N,p as pe,C as Ce,cd as Wf,z as z$1,a as P$1,b as U$1,ce as kb,S as Wy,q as dC,w as fC,aw as gl,bo as uC,ax as ml,b6 as Rg,c0 as Fg,ad as Wg,a9 as vC,aa as Sf,ac as CC,ab as _f,ai as sm,aj as iT,a3 as ZI,ak as im,a6 as QI,af as bg,ag as ET,a5 as Dl,aG as fe,ae as kt$1,cf as _,Y as x,t as AC,cg as pT,ch as kg,b4 as fT}from'./main-JTU33H5D.js';import {W}from'./chunk-I8YepFsn.js';import {T as Tn$1,c as ce}from'./chunk-4XIlyOr9.js';import {u as ui,a as me,f as fi,Y as Yt$1,H as He,V as Ve,n as ne}from'./chunk-DK1hp0WW.js';import {t as ti,Y as Ye,Z as Zn,c as cn$1,y as yt$1,w as wt,X as Xt$1}from'./chunk-DuXr-yGB.js';var bt=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=wo({type:n});static \u0275inj=Zn$1({imports:[wt$1]})}return n})();var Tt=(n,t)=>({subThreads:n,depth:t}),Ot=n=>({subThreads:n,depth:1}),xt=(n,t)=>t.id,kt=(n,t)=>t.label;function Et(n,t){if(n&1){let e=vC();Cs(0,"mat-icon",10),Lg("click",function(o){Sf(e);let s=CC().$implicit,f=CC(3);return _f(f.toggleSubThreads(o,s.id))}),JC(1),hl();}if(n&2){let e=CC().$implicit,i=CC(3);sI(),em(i.isParentExpanded(e.id)?"expand_more":"chevron_right");}}function Dt(n,t){n&1&&kg(0);}function Nt(n,t){if(n&1&&bg(0,Dt,1,0,"ng-container",11),n&2){let e=CC().$implicit,i=CC().depth;CC();let o=AC(1);xg("ngTemplateOutlet",o)("ngTemplateOutletContext",pT(2,Tt,e.subThreads,i+1));}}function jt(n,t){if(n&1){let e=vC();Cs(0,"div",5)(1,"a",6),Lg("click",function(o){let s=Sf(e).$implicit;return CC(3).selectThread(s.id),_f(o.preventDefault())})("keydown.enter",function(o){let s=Sf(e).$implicit;return CC(3).selectThread(s.id),_f(o.preventDefault())})("keydown.space",function(o){let s=Sf(e).$implicit;return CC(3).selectThread(s.id),_f(o.preventDefault())}),aC(2,Et,2,1,"mat-icon",7),Cs(3,"span",8),JC(4),hl(),Cs(5,"span",9),JC(6),hl()()(),aC(7,Nt,1,5,"ng-container");}if(n&2){let e=t.$implicit,i=CC().depth,o=CC(2);Wg("--sub-depth",i),qg("current",e.id===o.currentThread()?.id),sI(2),cC(e.subThreads?.length?2:-1),sI(2),em(e.delegatedAgentName||"Agent"),sI(2),em(e.delegatedTask||e.name),sI(),cC(o.isParentExpanded(e.id)&&e.subThreads?.length?7:-1);}}function Vt(n,t){if(n&1&&dC(0,jt,8,8,null,null,xt),n&2){let e=t.subThreads;fC(e);}}function Ft(n,t){n&1&&(Cs(0,"div",4),Ag(1,"span",12),Cs(2,"span",13),JC(3,"Loading threads..."),hl()());}function It(n,t){if(n&1&&(Cs(0,"div",27),JC(1),hl()),n&2){let e=CC(6);sI(),em(e.renameErrorMessage);}}function zt(n,t){if(n&1){let e=vC();Cs(0,"div",18)(1,"input",26),sm("ngModelChange",function(o){Sf(e);let s=CC(5);return iT(s.editingThreadName,o)||(s.editingThreadName=o),_f(o)}),Lg("keydown",function(o){Sf(e);let s=CC(5);return _f(s.onEditKeydown(o))})("blur",function(){Sf(e);let o=CC(5);return _f(o.onEditBlur())})("click",function(o){return o.stopPropagation()}),hl(),ZI(),aC(2,It,2,1,"div",27),hl();}if(n&2){let e=CC(5);sI(),im("ngModel",e.editingThreadName),xg("disabled",e.isRenamingThread),QI(),sI(),cC(e.renameErrorMessage?2:-1);}}function At(n,t){if(n&1){let e=vC();Cs(0,"mat-icon",10),Lg("click",function(o){Sf(e);let s=CC(2).$implicit,f=CC(4);return _f(f.toggleSubThreads(o,s.id))}),JC(1),hl();}if(n&2){let e=CC(2).$implicit,i=CC(4);sI(),em(i.isParentExpanded(e.id)?"expand_more":"chevron_right");}}function Lt(n,t){if(n&1&&(Cs(0,"span",29),JC(1),hl()),n&2){let e=CC(2).$implicit;sI(),em(e.name);}}function Rt(n,t){n&1&&(Ag(0,"mat-spinner",31),Cs(1,"span",32),JC(2,"Generating name..."),hl()),n&2&&xg("diameter",16);}function $t(n,t){n&1&&(Cs(0,"mat-icon",30),JC(1,"group"),hl());}function Bt(n,t){if(n&1){let e=vC();Cs(0,"a",28),Lg("click",function(o){Sf(e);let s=CC().$implicit;return CC(4).selectThread(s.id),_f(o.preventDefault())})("keydown.enter",function(o){Sf(e);let s=CC().$implicit;return CC(4).selectThread(s.id),_f(o.preventDefault())})("keydown.space",function(o){Sf(e);let s=CC().$implicit;return CC(4).selectThread(s.id),_f(o.preventDefault())}),aC(1,At,2,1,"mat-icon",7),aC(2,Lt,2,1,"span",29)(3,Rt,3,1),aC(4,$t,2,0,"mat-icon",30),hl();}if(n&2){let e=CC().$implicit,i=CC(4);xg("matTooltip",e.name?e.name+`
2
-
3
- `+(e.summary||""):e.summary||"")("matTooltipDisabled",!e.summary),sI(),cC(e.subThreads?.length?1:-1),sI(),cC(e.name?2:3),sI(2),cC(i.isSharedThread(e)?4:-1);}}function Ut(n,t){if(n&1){let e=vC();Cs(0,"button",33),Lg("click",function(o){Sf(e);let s=CC().$implicit,f=CC(4);return _f(f.startEditingThreadName(o,s))}),Cs(1,"mat-icon"),JC(2,"edit"),hl()();}}function Xt(n,t){if(n&1){let e=vC();Cs(0,"button",34),Lg("click",function(o){Sf(e);let s=CC().$implicit,f=CC(4);return _f(f.markActive(o,s))}),Cs(1,"mat-icon"),JC(2,"replay"),hl()();}}function Qt(n,t){if(n&1){let e=vC();Cs(0,"button",35),Lg("click",function(o){Sf(e);let s=CC().$implicit,f=CC(4);return _f(f.markDone(o,s))}),Cs(1,"mat-icon"),JC(2,"check_circle_outline"),hl()();}}function Gt(n,t){n&1&&kg(0);}function Ht(n,t){if(n&1&&bg(0,Gt,1,0,"ng-container",11),n&2){let e=CC().$implicit;CC(3);let i=AC(1);xg("ngTemplateOutlet",i)("ngTemplateOutletContext",fT(2,Ot,e.subThreads));}}function qt(n,t){if(n&1){let e=vC();Cs(0,"div",17),aC(1,zt,3,3,"div",18)(2,Bt,5,5,"a",19),Cs(3,"div",20),aC(4,Ut,3,0,"button",21),aC(5,Xt,3,0,"button",22)(6,Qt,3,0,"button",23),Cs(7,"button",24),Lg("click",function(o){let s=Sf(e).$implicit,f=CC(4);return _f(f.toggleStar(o,s))}),Cs(8,"mat-icon"),JC(9),hl()(),Cs(10,"button",25),Lg("click",function(o){let s=Sf(e).$implicit,f=CC(4);return _f(f.deleteThread(o,s))}),Cs(11,"mat-icon"),JC(12,"delete"),hl()()()(),aC(13,Ht,1,4,"ng-container");}if(n&2){let e=t.$implicit,i=CC(4);qg("current",e.id===i.currentThread()?.id),sI(),cC(i.editingThreadId===e.id?1:2),sI(3),cC(i.editingThreadId!==e.id&&e.name?4:-1),sI(),cC(e.closedByUser?5:6),sI(2),qg("starred",i.isStarred(e)),xg("title",i.isStarred(e)?"Unstar thread":"Star thread"),sI(2),em(i.isStarred(e)?"star":"star_outline"),sI(4),cC(i.isParentExpanded(e.id)&&e.subThreads?.length?13:-1);}}function Wt(n,t){if(n&1&&(Cs(0,"div",14)(1,"div",16),JC(2),hl(),dC(3,qt,14,10,null,null,xt),hl()),n&2){let e=t.$implicit;sI(2),em(e.label),sI(),fC(e.threads);}}function Jt(n,t){n&1&&(Cs(0,"div",15),JC(1,"No existing threads"),hl());}function Yt(n,t){if(n&1&&(Cs(0,"div",15),JC(1),hl()),n&2){let e=CC(3);sI(),Dl('No threads matching "',e.searchQuery(),'"');}}function Zt(n,t){if(n&1&&(dC(0,Wt,5,1,"div",14,kt),aC(2,Jt,2,0,"div",15)(3,Yt,2,1,"div",15)),n&2){let e=CC(2);fC(e.getGroupedThreads()),sI(2),cC(!e.threads()?.length&&!e.searchQuery()?2:e.searchQuery()&&e.getGroupedThreads().length===0?3:-1);}}function Kt(n,t){if(n&1&&(bg(0,Vt,2,0,"ng-template",null,0,ET),Cs(2,"div",3),aC(3,Ft,4,0,"div",4)(4,Zt,4,1),hl()),n&2){let e=CC();sI(3),cC(e.isLoadingThreadList()?3:4);}}function en(n,t){n&1&&(Cs(0,"span",36),JC(1,"No project selected"),hl());}function tn(n,t){n&1&&(Cs(0,"span",36),JC(1,"Loading..."),hl());}function nn(n,t){if(n&1&&(Cs(0,"div",2),aC(1,en,2,0,"span",36)(2,tn,2,0,"span",36),hl()),n&2){let e=CC();sI(),cC(e.currentProject()?.name?2:1);}}var we=class n{projects=null;searchMode=false;searchQuery=nV("");searchModeChange=new vt;threadSelected=new vt;projectStateService=g(P);threadStateService=g(U);threadApiService=g(N);userService=g(pe);router=g(G);destroyRef=g(Ce);currentThread=F(this.threadStateService.selectedThread$);currentProject=F(this.projectStateService.selectedProject$);threads=F(this.threadStateService.threadList$);isLoadingThreadList=F(this.threadStateService.isLoadingThreadList$);username=F(this.userService.username$);isTouchDevice="ontouchstart"in window||navigator.maxTouchPoints>0;editingThreadId=null;editingThreadName="";isRenamingThread=false;renameErrorMessage="";expandedParents=new Set;constructor(){Wf(()=>{let t=this.currentThread()?.id,e=this.threads();if(!t||!e?.length)return;let i=new Map;for(let s of e)s.parentThreadId&&i.set(s.id,s.parentThreadId);let o=t;for(;o;){let s=i.get(o);s&&this.expandedParents.add(s),o=s;}});}ngOnInit(){this.userService.fetchCurrentUser().subscribe({error:t=>{console.error("[THREAD-SELECTOR] Failed to load current user:",t);}});}selectThread(t){this.threadStateService.selectThread(t),this.threadSelected.emit(),this.router.navigate(["project",this.currentProject()?.name,"thread",t]);}getGroupedThreads(){let t=this.threads();if(!t?.length)return [];let e=new Set(t.map(h=>h.id)),i=t.filter(h=>!h.parentThreadId),o=t.filter(h=>!!h.parentThreadId),s=o.filter(h=>!e.has(h.parentThreadId)),f=o.filter(h=>e.has(h.parentThreadId)),A=new Map;for(let h of f){let O=h.parentThreadId;A.has(O)||A.set(O,[]),A.get(O).push(h);}let J=h=>(A.get(h)||[]).sort((j,I)=>j.modifiedDate>I.modifiedDate?-1:1).map(j=>z$1(P$1({},j),{subThreads:J(j.id)})),L=[...i,...s];if(this.searchQuery()&&this.searchQuery().trim()){let h=this.searchQuery().toLowerCase().trim();L=L.filter(O=>O.name.toLowerCase().includes(h)||O.summary&&O.summary.toLowerCase().includes(h));}if(!L.length)return [];let R=this.username();if(!R)return [];let Ie=L.map(h=>z$1(P$1({},h),{subThreads:J(h.id)})),ze=Ie.filter(h=>h.starring&&h.starring.includes(R)),Mt=Ie.filter(h=>!h.starring||!h.starring.includes(R)),Y=new Map,Ae=new Date;Ae.setHours(0,0,0,0);for(let h of Mt){let O=new Date(h.modifiedDate);O.setHours(0,0,0,0);let j=Ae.getTime()-O.getTime(),I=Math.floor(j/(1e3*60*60*24)),D;I===0?D="Today":I===1?D="Yesterday":I<7?D="This Week":I<30?D="This Month":I<90?D="Last 3 Months":D="Older",Y.has(D)||Y.set(D,[]),Y.get(D).push(h);}let Ee=[];if(ze.length>0){let h=[...ze].sort((O,j)=>O.modifiedDate>j.modifiedDate?-1:1);Ee.push({label:"Starred",threads:h});}return ["Today","Yesterday","This Week","This Month","Last 3 Months","Older"].filter(h=>Y.has(h)).forEach(h=>{Ee.push({label:h,threads:Y.get(h)});}),Ee}isParentExpanded(t){return this.expandedParents.has(t)}toggleSubThreads(t,e){t.stopPropagation(),this.expandedParents.has(e)?this.expandedParents.delete(e):this.expandedParents.add(e);}isSubThread(t){return !!t.parentThreadId}isSharedThread(t){return t.users&&t.users.length>1}isStarred(t){let e=this.username();return !!e&&t.starring&&t.starring.includes(e)}toggleStar(t,e){t.stopPropagation();let i=this.username();if(!i)return;let o=e.starring&&e.starring.includes(i),s=o?this.threadApiService.unstarThread(e.id):this.threadApiService.starThread(e.id);this.threadStateService.updateStarLocal(e.id,!o,i),s.pipe(U$1(this.destroyRef)).subscribe({next:()=>{},error:f=>{console.error("Error toggling star:",f),this.threadStateService.refreshThreadList();}});}markDone(t,e){t.stopPropagation(),this.threadStateService.markDone(e.id);}markActive(t,e){t.stopPropagation(),this.threadStateService.markActive(e.id);}deleteThread(t,e){t.stopPropagation();let i=this.currentProject()?.name;!i||!confirm(`Are you sure you want to delete the thread "${e.name}"?`)||this.threadApiService.deleteThread(e.id).subscribe({next:()=>{this.currentThread()?.id===e.id&&(this.threadStateService.clearSelection(),this.router.navigate(["project",i])),this.threadStateService.refreshThreadList();},error:s=>{console.error("Error deleting thread:",s),alert("Failed to delete thread. Please try again.");}});}formatDate(t){try{let e=new Date(t),o=new Date().getTime()-e.getTime(),s=Math.floor(o/(1e3*60*60*24));return s===0?"Today":s===1?"Yesterday":s<7?`${s} days ago`:e.toLocaleDateString("en-EN",{day:"numeric",month:"short"})}catch(e){return "No date"}}startEditingThreadName(t,e){t.stopPropagation(),this.editingThreadId=e.id,this.editingThreadName=e.name||"",this.renameErrorMessage="",setTimeout(()=>{let i=document.querySelector(".thread-name-input");i&&(i.focus(),i.select());},0);}cancelEditingThreadName(){this.editingThreadId=null,this.editingThreadName="",this.renameErrorMessage="";}saveThreadName(t){if(t&&t.stopPropagation(),!this.editingThreadId)return;let e=this.editingThreadName.trim();if(!e){this.renameErrorMessage="Thread name cannot be empty";return}if(e.length>200){this.renameErrorMessage="Thread name is too long (max 200 characters)";return}let i=this.editingThreadId;this.isRenamingThread=true,this.renameErrorMessage="",this.threadStateService.renameThread(i,e).subscribe({next:()=>{console.log("[THREAD-SELECTOR] Thread renamed successfully"),this.cancelEditingThreadName(),this.isRenamingThread=false;},error:o=>{console.error("[THREAD-SELECTOR] Error renaming thread:",o),this.renameErrorMessage=o.message||"Failed to rename thread",this.isRenamingThread=false;}});}onEditKeydown(t){t.key==="Enter"?(t.preventDefault(),t.stopPropagation(),this.saveThreadName()):t.key==="Escape"&&(t.preventDefault(),t.stopPropagation(),this.cancelEditingThreadName());}onEditBlur(){setTimeout(()=>{this.editingThreadId&&!this.isRenamingThread&&this.saveThreadName();},200);}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=jw({type:n,selectors:[["app-thread-selector"]],inputs:{searchMode:"searchMode",searchQuery:[1,"searchQuery"]},outputs:{searchModeChange:"searchModeChange",threadSelected:"threadSelected"},decls:3,vars:1,consts:[["subThreadTemplate",""],["tabindex","0","role","application","aria-label","Thread selector",1,"thread-selector",3,"click","keydown"],[1,"thread-disabled"],["role","menu","aria-label","Thread selection",1,"thread-list"],[1,"thread-loading"],[1,"thread-item-wrapper","sub-thread"],["role","menuitem","tabindex","0",1,"thread-item","sub-thread-item",3,"click","keydown.enter","keydown.space"],[1,"sub-thread-toggle"],[1,"sub-thread-agent"],[1,"sub-thread-task"],[1,"sub-thread-toggle",3,"click"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"loading-spinner"],[1,"loading-text"],[1,"thread-group"],[1,"thread-empty"],[1,"thread-group-header"],[1,"thread-item-wrapper"],[1,"thread-name-edit-wrapper"],["matTooltipShowDelay","1000","role","menuitem","tabindex","0",1,"thread-item",3,"matTooltip","matTooltipDisabled"],[1,"action-buttons"],["mat-icon-button","","title","Rename thread","type","button",1,"action-button","edit-button"],["mat-icon-button","","title","Mark as active","type","button",1,"action-button","mark-active-button"],["mat-icon-button","","title","Mark as done","type","button",1,"action-button","mark-done-button"],["mat-icon-button","","type","button",1,"action-button","star-button",3,"click","title"],["mat-icon-button","","title","Delete thread","type","button",1,"action-button","delete-button",3,"click"],["type","text","maxlength","200",1,"thread-name-input",3,"ngModelChange","keydown","blur","click","ngModel","disabled"],[1,"rename-error"],["matTooltipShowDelay","1000","role","menuitem","tabindex","0",1,"thread-item",3,"click","keydown.enter","keydown.space","matTooltip","matTooltipDisabled"],[1,"thread-name"],["matTooltip","Shared thread",1,"shared-indicator"],[1,"thread-name-spinner",3,"diameter"],[1,"thread-name","thread-name-generating"],["mat-icon-button","","title","Rename thread","type","button",1,"action-button","edit-button",3,"click"],["mat-icon-button","","title","Mark as active","type","button",1,"action-button","mark-active-button",3,"click"],["mat-icon-button","","title","Mark as done","type","button",1,"action-button","mark-done-button",3,"click"],[1,"disabled-text"]],template:function(e,i){e&1&&(Cs(0,"div",1),Lg("click",function(s){return s.stopPropagation()})("keydown",function(s){return s.stopPropagation()}),aC(1,Kt,5,1)(2,nn,3,1,"div",2),hl()),e&2&&(sI(),cC(i.currentProject()?.name?1:2));},dependencies:[kb,ti,Ye,Zn,Xt$1,cn$1,yt$1,wt,hr,Gn,Tn$1,ce,Et$1,yt$2,Ve,ne],styles:[".thread-selector[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%;flex:1;min-height:0;overflow-x:hidden;overflow-y:auto}.thread-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:0;max-height:none;overflow:visible}.thread-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-bottom:.5rem}.thread-group[_ngcontent-%COMP%]:last-child{margin-bottom:0}.thread-group-header[_ngcontent-%COMP%]{padding:.5rem 1rem .25rem;font-size:.75rem;font-weight:600;color:var(--color-text-secondary);text-transform:uppercase;letter-spacing:.5px;position:sticky;top:0;background:var(--glass-bg);backdrop-filter:var(--glass-backdrop-blur);-webkit-backdrop-filter:var(--glass-backdrop-blur);z-index:1}.thread-item-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;position:relative;width:100%;border-radius:0;min-width:0;gap:.25rem}.thread-item-wrapper[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)}.thread-item-wrapper[_ngcontent-%COMP%]:hover .action-buttons[_ngcontent-%COMP%]{display:flex}.thread-item-wrapper.current[_ngcontent-%COMP%]{background:var(--color-primary-light)}.thread-item-wrapper.current[_ngcontent-%COMP%] .thread-item[_ngcontent-%COMP%]{color:var(--color-primary-text);font-weight:600}.thread-item[_ngcontent-%COMP%]{display:flex;align-items:center;flex:1;min-width:0;padding:.75rem 1rem;text-decoration:none;cursor:pointer;transition:all .2s ease;background:transparent;border:none;border-radius:0;color:var(--color-text);text-align:left;justify-content:flex-start}.thread-item.new-thread-item[_ngcontent-%COMP%]{margin-bottom:.25rem}.thread-item[_ngcontent-%COMP%]:hover{color:var(--color-primary)}.thread-item[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-primary);outline-offset:-2px}.action-buttons[_ngcontent-%COMP%]{display:none;align-items:center;gap:.25rem;flex-shrink:0;margin-right:.5rem}.thread-item-wrapper[_ngcontent-%COMP%]:hover .action-buttons[_ngcontent-%COMP%], .thread-item-wrapper.current[_ngcontent-%COMP%] .action-buttons[_ngcontent-%COMP%]{display:flex}.action-button[_ngcontent-%COMP%]{flex-shrink:0;border-radius:4px!important;width:28px!important;height:28px!important;padding:0!important}.action-button[_ngcontent-%COMP%] .mat-mdc-button-persistent-ripple{border-radius:4px!important}.action-button[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover)!important}.action-button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px}.action-button.edit-button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px}.action-button.edit-button[_ngcontent-%COMP%]:hover{background-color:var(--color-primary-hover)!important}.action-button.edit-button[_ngcontent-%COMP%]:hover mat-icon[_ngcontent-%COMP%]{color:var(--color-primary)}.action-button.star-button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{transition:color .2s ease}.action-button.star-button.starred[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#fbbf24}.action-button.star-button[_ngcontent-%COMP%]:not(.starred):hover mat-icon[_ngcontent-%COMP%]{color:#fbbf24}.action-button.delete-button[_ngcontent-%COMP%]:hover mat-icon[_ngcontent-%COMP%]{color:#ef4444}.action-button.mark-done-button[_ngcontent-%COMP%]:hover mat-icon[_ngcontent-%COMP%]{color:#22c55e}.action-button.mark-active-button[_ngcontent-%COMP%]:hover mat-icon[_ngcontent-%COMP%]{color:var(--color-primary)}.thread-link[_ngcontent-%COMP%]{display:inline-flex;align-items:center;background:transparent;border:none;text-decoration:none;cursor:pointer;transition:all .2s ease;gap:.5rem;font-size:.875rem;font-weight:400;padding:0 1rem;min-width:0}.thread-link[_ngcontent-%COMP%]:hover:not(.new-thread-link){color:var(--color-primary-hover, var(--color-primary));text-decoration:underline;text-decoration-thickness:1.5px;text-underline-offset:3px}.thread-link[_ngcontent-%COMP%]:focus{outline:2px solid var(--color-primary);outline-offset:2px}.thread-link.new-thread-link[_ngcontent-%COMP%]{margin-bottom:.5rem;font-weight:600;font-size:.95rem}.thread-link.new-thread-link[_ngcontent-%COMP%] .thread-name[_ngcontent-%COMP%]{background:linear-gradient(90deg,var(--color-primary, #3b82f6) 0%,var(--color-accent, #8b5cf6) 50%,var(--color-primary, #3b82f6) 100%);background-size:200% auto;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;animation:_ngcontent-%COMP%_gradientShift 3s ease-in-out infinite}.thread-link.new-thread-link[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:var(--color-primary);animation:_ngcontent-%COMP%_iconPulse 3s ease-in-out infinite}.thread-link.new-thread-link[_ngcontent-%COMP%]:hover{transform:translate(4px)}.thread-link.new-thread-link[_ngcontent-%COMP%]:hover mat-icon[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_iconPulse 1.5s ease-in-out infinite}.thread-link[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px}@keyframes _ngcontent-%COMP%_gradientShift{0%{background-position:0 center}50%{background-position:100% center}to{background-position:0 center}}@keyframes _ngcontent-%COMP%_iconPulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.8;transform:scale(1.05)}}.thread-name[_ngcontent-%COMP%]{flex:1;font-size:.875rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:left}.thread-name.thread-name-generating[_ngcontent-%COMP%]{color:var(--color-text-muted);font-style:italic}.thread-name-edit-wrapper[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;padding:0 .5rem}.thread-name-input[_ngcontent-%COMP%]{width:100%;padding:.5rem;border:1px solid var(--color-border);border-radius:4px;background:var(--color-bg-secondary);color:var(--color-text-primary);font-size:.9rem;font-family:inherit}.thread-name-input[_ngcontent-%COMP%]:focus{outline:none;border-color:var(--color-primary);box-shadow:0 0 0 2px #3b82f61a}.thread-name-input[_ngcontent-%COMP%]:disabled{opacity:.6;cursor:not-allowed}.rename-error[_ngcontent-%COMP%]{color:var(--color-error);font-size:.75rem;margin-top:.25rem;padding-left:.5rem}.thread-name-spinner[_ngcontent-%COMP%]{flex-shrink:0;margin-right:.5rem}.thread-name-spinner[_ngcontent-%COMP%] .mat-mdc-progress-spinner circle{stroke:var(--color-primary)!important}.current-indicator[_ngcontent-%COMP%]{color:var(--color-success);font-weight:700;flex-shrink:0;font-size:1rem}.thread-separator[_ngcontent-%COMP%]{height:1px;background:var(--color-border);margin:.25rem 0}.thread-empty[_ngcontent-%COMP%]{padding:1.5rem 1rem;text-align:center;color:var(--color-text-muted);font-size:.8rem;font-style:italic}.thread-loading[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:2rem 1rem;gap:.75rem}.thread-loading[_ngcontent-%COMP%] .loading-spinner[_ngcontent-%COMP%]{width:24px;height:24px;border:3px solid var(--color-border);border-top-color:var(--color-primary);border-radius:50%;animation:_ngcontent-%COMP%_spin .8s linear infinite}.thread-loading[_ngcontent-%COMP%] .loading-text[_ngcontent-%COMP%]{color:var(--color-text-muted);font-size:.8rem}@keyframes _ngcontent-%COMP%_spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.thread-disabled[_ngcontent-%COMP%]{padding:1.5rem 1rem}.thread-disabled[_ngcontent-%COMP%] .disabled-text[_ngcontent-%COMP%]{display:block;color:var(--color-text-muted);font-size:.85rem;font-style:italic;text-align:center}.thread-item-wrapper.sub-thread[_ngcontent-%COMP%]{padding-left:calc(.2rem + var(--sub-depth, 1) * 1.5rem);border-left:2px solid var(--color-primary, #3b82f6);margin-left:.75rem}.thread-item-wrapper.sub-thread[_ngcontent-%COMP%] .sub-thread-item[_ngcontent-%COMP%]{padding:.35rem .5rem .35rem 0;gap:.2rem;font-size:.8rem;color:var(--color-text-secondary)}.thread-item-wrapper.sub-thread[_ngcontent-%COMP%] .sub-thread-item[_ngcontent-%COMP%]:hover{color:var(--color-primary)}.thread-item-wrapper.sub-thread[_ngcontent-%COMP%] .sub-thread-agent[_ngcontent-%COMP%]{font-weight:600;color:var(--color-primary);white-space:nowrap;flex-shrink:0;font-size:.8rem}.thread-item-wrapper.sub-thread[_ngcontent-%COMP%] .sub-thread-task[_ngcontent-%COMP%]{color:var(--color-text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.75rem}.sub-thread-toggle[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;flex-shrink:0;cursor:pointer;color:var(--color-text-secondary);margin-right:.25rem}.sub-thread-toggle[_ngcontent-%COMP%]:hover{color:var(--color-primary)}.shared-indicator[_ngcontent-%COMP%]{font-size:14px;width:14px;height:14px;color:var(--color-text-secondary);flex-shrink:0;margin-left:.25rem}@media(max-width:768px){.thread-item[_ngcontent-%COMP%]{padding:.6rem .8rem}.thread-name[_ngcontent-%COMP%]{font-size:.8rem}}"],changeDetection:1})};var on=["logsContent"],rn=(n,t)=>t.name;function an(n,t){if(n&1){let e=vC();Cs(0,"button",12),Lg("click",function(){Sf(e);let o=CC().$implicit,s=CC();return _f(s.start(o.name))}),Cs(1,"mat-icon"),JC(2,"play_arrow"),hl()();}if(n&2){let e=CC().$implicit;xg("disabled",e.isLoading);}}function sn(n,t){if(n&1){let e=vC();Cs(0,"button",13),Lg("click",function(){Sf(e);let o=CC().$implicit,s=CC();return _f(s.stop(o.name))}),Cs(1,"mat-icon"),JC(2,"stop"),hl()();}if(n&2){let e=CC().$implicit;xg("disabled",e.isLoading);}}function cn(n,t){if(n&1&&(Cs(0,"a",8)(1,"mat-icon",14),JC(2,"open_in_new"),hl()()),n&2){let e=CC().$implicit;xg("href",e.url,wh)("title",e.url);}}function ln(n,t){if(n&1&&(Cs(0,"div",15),JC(1),hl()),n&2){let e=CC(),i=e.$implicit,o=e.$index;Wg("order",o*2),sI(),em(i.errorMessage);}}function dn(n,t){if(n&1){let e=vC();Cs(0,"button",21),Lg("click",function(){Sf(e);let o=CC(3);return _f(o.onManualRefresh())}),Cs(1,"mat-icon"),JC(2,"refresh"),hl()();}}function mn(n,t){if(n&1&&(Cs(0,"div",16)(1,"div",17)(2,"span",18),JC(3),hl(),aC(4,dn,3,0,"button",19),hl(),Cs(5,"pre",20,0),JC(7),hl()()),n&2){let e=CC(),i=e.$implicit,o=e.$index,s=CC();Wg("order",o*2+1),sI(3),Dl("",i.name," logs"),sI(),cC(i.status==="running"?4:-1),sI(3),em(s.logs()||"(empty)");}}function pn(n,t){if(n&1){let e=vC();Cs(0,"div",2)(1,"span",3),JC(2),hl(),Cs(3,"div",4),aC(4,an,3,1,"button",5)(5,sn,3,1,"button",6),Cs(6,"span",7),JC(7),hl(),aC(8,cn,3,2,"a",8),Cs(9,"button",9),Lg("click",function(){let o=Sf(e).$implicit,s=CC();return _f(s.toggleLogs(o.name))}),Cs(10,"mat-icon"),JC(11),hl()()()(),aC(12,ln,2,3,"div",10),aC(13,mn,8,5,"div",11);}if(n&2){let e=t.$implicit,i=t.$index,o=CC();Wg("order",i*2),sI(2),em(e.name),sI(2),cC(e.status==="stopped"?4:5),sI(2),qg("running",e.status==="running"),sI(),Dl(" ",e.status==="running"?"Running":"Stopped"," "),sI(),cC(e.url?8:-1),sI(),xg("title",o.logsOpenFor()===e.name?"Hide logs":"Show logs"),sI(2),em(o.logsOpenFor()===e.name?"expand_less":"terminal"),sI(),cC(e.errorMessage?12:-1),sI(),cC(o.logsOpenFor()===e.name?13:-1);}}var Te=class n{destroyRef=g(Ce);projectApi=g(c);projectName=nV.required();entryStates=Wi([]);hasPreview=TT(()=>this.entryStates().length>0);logsOpenFor=Wi(null);logs=Wi("");logsContent;logsPollTimer=null;logsTimeoutTimer=null;static LOGS_POLL_MS=5e3;static LOGS_TIMEOUT_MS=1200*1e3;constructor(){Wf(()=>{let t=this.projectName();t&&this.onProjectChanged(t);},{}),Wf(()=>{console.log("entry states",this.entryStates());});}ngOnDestroy(){this.stopLogPolling();}onProjectChanged(t){this.stopLogPolling(),this.entryStates.set([]),this.logsOpenFor.set(null),this.logs.set(""),this.projectApi.getPreviewEntries(t).pipe(U$1(this.destroyRef)).subscribe({next:e=>{let i=e.entries;if(i.length===0)return;let o=i.map(f=>({name:f.name,command:f.command,url:f.url,status:"stopped",isLoading:false,errorMessage:""}));this.entryStates.set(o);let s=i.map(f=>this.projectApi.getPreviewStatus(t,f.name));Wy(s).pipe(U$1(this.destroyRef)).subscribe({next:f=>{this.entryStates.update(A=>A.map((J,L)=>{let R=f[L];return R?z$1(P$1({},J),{status:R.status}):J}));},error:()=>{}});},error:()=>{}});}start(t){this.updateEntry(t,{isLoading:true,errorMessage:""}),this.projectApi.startPreview(this.projectName(),t).pipe(U$1(this.destroyRef)).subscribe({next:e=>{this.updateEntry(t,{status:e.status,isLoading:false});},error:e=>{this.updateEntry(t,{errorMessage:e?.error?.error??"Failed to start preview",isLoading:false});}});}stop(t){this.updateEntry(t,{isLoading:true,errorMessage:""}),this.projectApi.stopPreview(this.projectName(),t).pipe(U$1(this.destroyRef)).subscribe({next:()=>{this.updateEntry(t,{status:"stopped",isLoading:false}),this.logsOpenFor()===t&&this.stopLogPolling();},error:e=>{this.updateEntry(t,{errorMessage:e?.error?.error??"Failed to stop preview",isLoading:false});}});}toggleLogs(t){this.logsOpenFor()===t?(this.logsOpenFor.set(null),this.logs.set(""),this.stopLogPolling()):(this.logsOpenFor.set(t),this.refreshLogs(),this.startLogPolling());}onManualRefresh(){this.refreshLogs(),this.logsPollTimer&&this.resetLogsTimeout();}refreshLogs(){let t=this.logsOpenFor();t&&this.projectApi.getPreviewLogs(this.projectName(),t).pipe(U$1(this.destroyRef)).subscribe({next:e=>{this.logs.set(e.logs),this.scrollLogsToBottom();},error:()=>this.logs.set("(failed to load logs)")});}updateEntry(t,e){this.entryStates.update(i=>i.map(o=>o.name===t?P$1(P$1({},o),e):o));}startLogPolling(){this.stopLogPolling(),this.logsPollTimer=setInterval(()=>{this.logsOpenFor()?this.refreshLogs():this.stopLogPolling();},n.LOGS_POLL_MS),this.resetLogsTimeout();}stopLogPolling(){this.logsPollTimer&&(clearInterval(this.logsPollTimer),this.logsPollTimer=null),this.logsTimeoutTimer&&(clearTimeout(this.logsTimeoutTimer),this.logsTimeoutTimer=null);}resetLogsTimeout(){this.logsTimeoutTimer&&clearTimeout(this.logsTimeoutTimer),this.logsTimeoutTimer=setTimeout(()=>{this.stopLogPolling();},n.LOGS_TIMEOUT_MS);}scrollLogsToBottom(){setTimeout(()=>{let t=this.logsContent?.nativeElement;t&&(t.scrollTop=t.scrollHeight);});}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=jw({type:n,selectors:[["app-preview-panel"]],viewQuery:function(e,i){if(e&1&&Hg(on,5),e&2){let o;MC(o=NC())&&(i.logsContent=o.first);}},inputs:{projectName:[1,"projectName"]},decls:3,vars:0,consts:[["logsContent",""],[1,"preview-panel"],[1,"entry-row"],[1,"entry-name"],[1,"entry-actions"],["mat-icon-button","","title","Start","type","button",1,"entry-btn","start",3,"disabled"],["mat-icon-button","","title","Stop","type","button",1,"entry-btn","stop",3,"disabled"],[1,"status-pill"],["target","_blank","rel","noopener noreferrer",1,"preview-url",3,"href","title"],["mat-icon-button","","type","button",1,"entry-btn","logs",3,"click","title"],[1,"preview-error",3,"order"],[1,"logs-container",3,"order"],["mat-icon-button","","title","Start","type","button",1,"entry-btn","start",3,"click","disabled"],["mat-icon-button","","title","Stop","type","button",1,"entry-btn","stop",3,"click","disabled"],[1,"link-icon"],[1,"preview-error"],[1,"logs-container"],[1,"logs-header"],[1,"logs-title"],["mat-icon-button","","title","Refresh logs","type","button",1,"entry-btn"],[1,"logs-content"],["mat-icon-button","","title","Refresh logs","type","button",1,"entry-btn",3,"click"]],template:function(e,i){e&1&&(Cs(0,"div",1),dC(1,pn,14,12,null,null,rn),hl()),e&2&&(sI(),fC(i.entryStates()));},dependencies:[hr,Gn,yt$1,wt],styles:["[_nghost-%COMP%]{display:block}.preview-panel[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:.25rem 0}.entry-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.375rem;padding:.125rem .5rem;min-height:36px}.entry-name[_ngcontent-%COMP%]{font-size:.82rem;font-weight:500;color:var(--on-surface, #e0e0e0);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1 1 auto;min-width:0}.entry-actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem;flex-shrink:0}.entry-btn[_ngcontent-%COMP%]{width:28px!important;height:28px!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center;flex-shrink:0}.entry-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px;line-height:18px}.entry-btn.start[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:var(--color-primary)}.entry-btn.stop[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#e53935}.entry-btn.logs[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;line-height:16px;color:var(--color-text-secondary)}.entry-btn[disabled][_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:var(--color-text-secondary)}.status-pill[_ngcontent-%COMP%]{display:inline-flex;align-items:center;justify-content:center;padding:1px 6px;border-radius:12px;font-size:.68rem;font-weight:600;letter-spacing:.02em;flex-shrink:0;min-width:52px;text-align:center;background:var(--color-bg-hover);color:var(--color-text-secondary);border:1px solid var(--color-border)}.status-pill.running[_ngcontent-%COMP%]{background:#22c55e26;color:#16a34a;border-color:#22c55e66}.preview-url[_ngcontent-%COMP%]{display:inline-flex;align-items:center;text-decoration:none;color:var(--color-primary);flex-shrink:0}.preview-url[_ngcontent-%COMP%]:hover{text-decoration:underline}.preview-url[_ngcontent-%COMP%] .link-icon[_ngcontent-%COMP%]{font-size:14px;width:14px;height:14px}.preview-error[_ngcontent-%COMP%]{font-size:.75rem;color:#c00;padding:0 .75rem}.logs-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:.125rem .5rem .25rem;background:var(--color-bg-hover);border-radius:8px;overflow:hidden;border:1px solid var(--color-border)}.logs-header[_ngcontent-%COMP%]{display:flex;align-items:center;padding:.25rem .75rem;border-bottom:1px solid var(--color-border)}.logs-header[_ngcontent-%COMP%] .logs-title[_ngcontent-%COMP%]{flex:1;font-size:.72rem;font-weight:600;color:var(--color-text-secondary);text-transform:uppercase;letter-spacing:.05em}.logs-content[_ngcontent-%COMP%]{margin:0;padding:.5rem .75rem;font-family:Courier New,Courier,monospace;font-size:.72rem;line-height:1.5;color:var(--color-text);white-space:pre-wrap;word-break:break-all;max-height:200px;overflow-y:auto}.logs-content[_ngcontent-%COMP%]::-webkit-scrollbar{width:6px}.logs-content[_ngcontent-%COMP%]::-webkit-scrollbar-track{background:transparent}.logs-content[_ngcontent-%COMP%]::-webkit-scrollbar-thumb{background:var(--color-text-secondary);border-radius:3px}"],changeDetection:1})};var Oe=class n{eventStream=g(fe);threadState=g(U);ratio=Wi(0);inputTokens=Wi(0);contextWindow=Wi(0);price=Wi(0);iterations=Wi(0);cacheReadTokens=Wi(0);visible=Wi(false);level=TT(()=>{let t=this.ratio();return t<.6?"ok":t<.85?"warning":"danger"});constructor(){this.eventStream.events$.pipe(kt$1(t=>t instanceof _),kt$1(t=>!t.threadId||t.threadId===this.threadState.getSelectedThreadId())).subscribe(t=>{this.inputTokens.set(t.inputTokens),this.contextWindow.set(t.contextWindow),this.price.set(t.price),this.iterations.set(t.iterations),this.cacheReadTokens.set(t.cacheReadTokens),this.ratio.set(t.contextWindow>0?t.inputTokens/t.contextWindow:0),this.visible.set(true);}),this.eventStream.connectionStatus$.pipe(kt$1(t=>!t.connected)).subscribe(()=>{this.visible.set(false),this.ratio.set(0),this.inputTokens.set(0),this.contextWindow.set(0),this.price.set(0),this.iterations.set(0),this.cacheReadTokens.set(0);});}static \u0275fac=function(e){return new(e||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})};function gn(n,t){if(n&1&&Rg(0,"div",12),n&2){let e=t.$implicit,i=t.$index,o=CC();Wg("--delay",e.delay+"s")("--left",e.left+"%")("--dur",e.dur+"s")("--size",e.size+"px")("--rise",e.rise+"px"),qg("invisible",i>=o.aboveBubbleCount());}}function _n(n,t){if(n&1&&Rg(0,"div",13),n&2){let e=t.$implicit;Wg("--delay",e.delay+"s")("--size",e.size+"px")("--left",e.left+"%")("--dur",e.dur+"s")("--top",e.top+"px");}}function un(n,t){if(n&1&&Rg(0,"div",14),n&2){let e=t.$implicit,i=t.$index,o=CC();Wg("--delay",e.delay+"s")("--left",e.left+"%")("--dur",e.dur+"s")("--size",e.size+"px"),qg("invisible",i>=o.insideBubbleCount());}}var yt=30,Pt=27,hn=40;function T(n,t,e,i=0){return i+(n*137+t*31)%e}var ke=class n{gaugeState=g(Oe);sidenavOpen=nV(false);aboveBubbles=Array.from({length:yt},(t,e)=>({delay:T(e,1,30)/10,left:T(e,2,82,5),dur:2.5+T(e,3,20)/10,size:1.5+T(e,4,40)/10,rise:150+T(e,5,150)}));insideBubbles=Array.from({length:Pt},(t,e)=>({delay:T(e,6,20)/10,left:T(e,7,80,5),dur:1.2+T(e,8,15)/10,size:2+T(e,9,35)/10}));foamBubbles=Array.from({length:hn},(t,e)=>({delay:T(e,10,25)/10,left:T(e,11,85,3),dur:1.5+T(e,12,10)/10,size:(3+T(e,13,80)/10)*.75,top:T(e,14,4)+8}));displayRatio=TT(()=>Math.min(100,this.gaugeState.ratio()*100));liquidColor=TT(()=>{let t=this.gaugeState.ratio();return t<=.5?`rgb(${Math.round(t*2*255)}, 255, 0)`:`rgb(255, ${Math.round((1-(t-.5)*2)*255)}, 0)`});aboveBubbleCount=TT(()=>Math.round(this.gaugeState.ratio()*yt));insideBubbleCount=TT(()=>{let t=this.gaugeState.ratio();return t<.5?0:t<.65?5:t<.8?13:t<.9?20:Pt});foamActive=TT(()=>this.gaugeState.ratio()>=.5);overflowing=TT(()=>this.gaugeState.ratio()>=.9);tooltipText=TT(()=>{let t=Math.round(this.gaugeState.ratio()*100),e=this.gaugeState.price().toFixed(4);return [`${this.gaugeState.inputTokens().toLocaleString()} / ${this.gaugeState.contextWindow().toLocaleString()} tokens (${t}%)`,`Cost: $${e}`,`Iterations: ${this.gaugeState.iterations()}`,`Cache read: ${this.gaugeState.cacheReadTokens().toLocaleString()}`].join(`
4
- `)});static \u0275fac=function(e){return new(e||n)};static \u0275cmp=jw({type:n,selectors:[["app-context-gauge"]],inputs:{sidenavOpen:[1,"sidenavOpen"]},decls:15,vars:11,consts:[[1,"tube-host",3,"title"],[1,"tube"],[1,"bubbles-above"],[1,"bubble-color",3,"invisible","--delay","--left","--dur","--size","--rise"],[1,"foam"],[1,"foam-bubble",3,"--delay","--size","--left","--dur","--top"],[1,"body"],[1,"shine"],[1,"liquid"],[1,"percentage"],[1,"bubbles-inside"],[1,"bubble-dark",3,"invisible","--delay","--left","--dur","--size"],[1,"bubble-color"],[1,"foam-bubble"],[1,"bubble-dark"]],template:function(e,i){e&1&&(gl(0,"div",0)(1,"div",1)(2,"div",2),dC(3,gn,1,12,"div",3,uC),ml(),gl(5,"div",4),dC(6,_n,1,10,"div",5,uC),ml(),gl(8,"div",6),Rg(9,"div",7),gl(10,"div",8)(11,"div",9)(12,"div",10),dC(13,un,1,10,"div",11,uC),ml()()()()()()),e&2&&(qg("hidden",i.sidenavOpen()),Fg("title",i.tooltipText()),sI(),Wg("--tube-color",i.liquidColor()),sI(2),fC(i.aboveBubbles),sI(2),Wg("bottom",i.displayRatio()+"%"),qg("active",i.foamActive()),sI(),fC(i.foamBubbles),sI(5),Wg("height",i.displayRatio(),"%"),sI(2),fC(i.insideBubbles));},styles:['[_nghost-%COMP%]{position:fixed;left:calc(1rem + 10px);z-index:1500;display:block;top:calc(3.5rem + 80px);--gauge-glass: #dddddd}[data-theme$=dark][_nghost-%COMP%], [data-theme$=dark] [_nghost-%COMP%]{--gauge-glass: #333333}.tube-host[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column;align-items:center}.tube-host.hidden[_ngcontent-%COMP%]{visibility:hidden}.tube[_ngcontent-%COMP%]{position:relative;height:100px;width:24px;border:none;border-radius:0 0 50rem 50rem;background-color:var(--gauge-glass, #333333);cursor:default;overflow:visible}.tube[_ngcontent-%COMP%]:after{content:"";position:absolute;left:-3px;top:0;width:calc(100% + 6px);height:4px;border-radius:50rem;background:var(--gauge-glass, #333333)}.body[_ngcontent-%COMP%]{position:absolute;border-radius:inherit;height:100%;width:100%;bottom:0;overflow:hidden;z-index:5}.shine[_ngcontent-%COMP%]{position:absolute;left:20%;top:0;width:10%;height:100%;z-index:90;opacity:.2;pointer-events:none}.shine[_ngcontent-%COMP%]:before, .shine[_ngcontent-%COMP%]:after{content:"";position:absolute;background-color:#fff;border-radius:50rem;top:10%;height:40%;width:100%}.shine[_ngcontent-%COMP%]:after{height:15%;top:60%}@keyframes _ngcontent-%COMP%_liquid-spin{0%{transform:translate(-50%) rotate(0)}to{transform:translate(-50%) rotate(360deg)}}.liquid[_ngcontent-%COMP%]{position:absolute;height:100%;width:100%;bottom:0}.percentage[_ngcontent-%COMP%]{position:absolute;height:0%;width:100%;bottom:0;left:0;z-index:80;transition:height .9s cubic-bezier(.4,0,.2,1);overflow:visible}.percentage[_ngcontent-%COMP%]:before, .percentage[_ngcontent-%COMP%]:after{position:absolute;content:"";width:100px;height:100px;border-radius:40px;animation:_ngcontent-%COMP%_liquid-spin 4s infinite linear;transform:translate(-50%);left:50%;top:0;background:var(--tube-color, #34c759);transition:background .5s ease}.percentage[_ngcontent-%COMP%]:after{opacity:.4;animation-direction:reverse;border-radius:30px}@keyframes _ngcontent-%COMP%_bubble-rise-inside{0%{bottom:2%;opacity:0;transform:scale(.5)}15%{opacity:.7}85%{opacity:.4}to{bottom:96%;opacity:0;transform:scale(1.1)}}.bubbles-inside[_ngcontent-%COMP%]{position:absolute;left:0;bottom:0;width:100%;height:100%;z-index:10;pointer-events:none}.bubbles-inside[_ngcontent-%COMP%] .bubble-dark[_ngcontent-%COMP%]{position:absolute;border-radius:50%;background:var(--color-bg, rgba(20, 20, 20, .55));width:var(--size, 3px);height:var(--size, 3px);opacity:0;bottom:2%;left:var(--left, 30%);animation:_ngcontent-%COMP%_bubble-rise-inside var(--dur, 1.5s) infinite ease-in;animation-delay:var(--delay, 0s)}.bubbles-inside[_ngcontent-%COMP%] .bubble-dark.invisible[_ngcontent-%COMP%]{animation:none;opacity:0}@keyframes _ngcontent-%COMP%_bubble-rise-above{0%{bottom:0;opacity:0;transform:scale(.4)}10%{opacity:.9}70%{opacity:.8}90%{opacity:.3}to{bottom:var(--rise, 80px);opacity:0;transform:scale(1.2)}}.bubbles-above[_ngcontent-%COMP%]{position:absolute;left:0;bottom:0;width:100%;height:100%;z-index:20;pointer-events:none;overflow:visible}.bubbles-above[_ngcontent-%COMP%] .bubble-color[_ngcontent-%COMP%]{position:absolute;border-radius:50%;background:var(--tube-color, #34c759);opacity:0;bottom:0;left:var(--left, 30%);width:var(--size, 3px);height:var(--size, 3px);animation:_ngcontent-%COMP%_bubble-rise-above var(--dur, 1.5s) infinite ease-in;animation-delay:var(--delay, 0s)}.bubbles-above[_ngcontent-%COMP%] .bubble-color.invisible[_ngcontent-%COMP%]{animation:none;opacity:0}.foam[_ngcontent-%COMP%]{position:absolute;bottom:0;left:-1px;width:100%;height:14px;z-index:100;pointer-events:none;overflow:visible;transition:bottom .9s cubic-bezier(.4,0,.2,1)}.foam[_ngcontent-%COMP%] .foam-bubble[_ngcontent-%COMP%]{position:absolute;top:var(--top, 0px);left:var(--left, 50%);width:var(--size, 4px);height:var(--size, 4px);border-radius:50%;background:#fff0;animation:none}.foam.active[_ngcontent-%COMP%] .foam-bubble[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_foam-pulse var(--dur, 1.5s) ease-in-out infinite;animation-delay:var(--delay, 0s)}@keyframes _ngcontent-%COMP%_foam-pulse{0%{background:#fff0;transform:scale(.5)}30%{background:#ffffff73;transform:scale(1)}60%{background:#ffffff40;transform:scale(1.1)}to{background:#fff0;transform:scale(.6)}}@media(max-width:768px){[_nghost-%COMP%]{top:calc(3.25rem + 80px);left:calc(.75rem + 10px)}.tube[_ngcontent-%COMP%]{height:75px;width:20px}}']})};var fn=["threadSearchInput"],bn=["*"];function vn(n,t){if(n&1){let e=vC();Cs(0,"button",28),Lg("click",function(){Sf(e);let o=CC();return _f(o.toggle())}),Cs(1,"mat-icon"),JC(2,"menu"),hl()(),Cs(3,"button",29),Lg("click",function(){Sf(e);let o=CC();return _f(o.createNewThread())}),Cs(4,"mat-icon",10),JC(5,"play_circle"),hl()();}if(n&2){let e=CC();sI(3),xg("disabled",!e.selectedProjectName());}}function Cn(n,t){if(n&1){let e=vC();Cs(0,"div",12)(1,"a",30),Lg("click",function(o){return Sf(e),CC().openMissionControl(),_f(o.preventDefault())}),Cs(2,"mat-icon"),JC(3,"rocket_launch"),hl(),Cs(4,"span",31),JC(5,"Task Control"),hl()()();}}function xn(n,t){if(n&1){let e=vC();Cs(0,"div",15)(1,"mat-icon",32),JC(2,"search"),hl(),Cs(3,"input",33,0),sm("ngModelChange",function(o){Sf(e);let s=CC();return iT(s.threadSearchQuery,o)||(s.threadSearchQuery=o),_f(o)}),Lg("input",function(){Sf(e);let o=CC();return _f(o.onThreadSearchInput())}),hl(),ZI(),Cs(5,"button",34),Lg("click",function(){Sf(e);let o=CC();return _f(o.closeThreadSearch())}),Cs(6,"mat-icon"),JC(7,"close"),hl()()();}if(n&2){let e=CC();sI(3),im("ngModel",e.threadSearchQuery),QI();}}function yn(n,t){if(n&1){let e=vC();Cs(0,"div",16)(1,"mat-icon",23),JC(2,"forum"),hl(),Cs(3,"span",24),JC(4,"Threads"),hl(),Cs(5,"button",35),Lg("click",function(o){Sf(e);let s=CC();return _f(s.toggleThreadSearch(o))}),Cs(6,"mat-icon"),JC(7,"search"),hl()()();}}function Pn(n,t){n&1&&(Cs(0,"mat-icon",22),JC(1,"keyboard_arrow_up"),hl());}function Sn(n,t){n&1&&(Cs(0,"mat-icon",23),JC(1,"hub"),hl());}function Mn(n,t){n&1&&(Cs(0,"mat-icon",22),JC(1,"keyboard_arrow_up"),hl());}function wn(n,t){n&1&&(Cs(0,"mat-icon",23),JC(1,"tune"),hl());}function Tn(n,t){n&1&&(Cs(0,"div",37)(1,"div",41),Ag(2,"app-options-panel",42),hl()());}function On(n,t){if(n&1){let e=vC();Cs(0,"div",36)(1,"a",21),Lg("click",function(o){return Sf(e),CC(3).openProjectConfig(),o.preventDefault(),_f(o.stopPropagation())}),Cs(2,"mat-icon",23),JC(3,"settings_applications"),hl(),Cs(4,"span",24),JC(5,"Project Configuration"),hl()()();}}function kn(n,t){n&1&&(Cs(0,"div",36)(1,"a",43)(2,"mat-icon",23),JC(3,"settings_applications"),hl(),Cs(4,"span",24),JC(5,"Project config (No project)"),hl()()());}function En(n,t){if(n&1&&aC(0,On,6,0,"div",36)(1,kn,6,0,"div",36),n&2){let e=CC(2);cC(e.selectedProjectName()?0:1);}}function Dn(n,t){if(n&1){let e=vC();Cs(0,"div",36)(1,"a",21),Lg("click",function(o){return Sf(e),CC(2).openAgents(),o.preventDefault(),_f(o.stopPropagation())}),Cs(2,"mat-icon",23),JC(3,"smart_toy"),hl(),Cs(4,"span",24),JC(5,"Agents"),hl()()();}}function Nn(n,t){n&1&&(Cs(0,"div",36)(1,"a",43)(2,"mat-icon",23),JC(3,"smart_toy"),hl(),Cs(4,"span",24),JC(5,"Agents (No project)"),hl()()());}function jn(n,t){if(n&1){let e=vC();Cs(0,"div",36)(1,"a",21),Lg("click",function(o){return Sf(e),CC(2).openPrompts(),o.preventDefault(),_f(o.stopPropagation())}),Cs(2,"mat-icon",23),JC(3,"description"),hl(),Cs(4,"span",24),JC(5,"Prompts"),hl()()();}}function Vn(n,t){n&1&&(Cs(0,"div",36)(1,"a",43)(2,"mat-icon",23),JC(3,"description"),hl(),Cs(4,"span",24),JC(5,"Prompts (No project)"),hl()()());}function Fn(n,t){if(n&1){let e=vC();Cs(0,"div",36)(1,"a",21),Lg("click",function(o){return Sf(e),CC(2).openSchedulers(),o.preventDefault(),_f(o.stopPropagation())}),Cs(2,"mat-icon",23),JC(3,"schedule"),hl(),Cs(4,"span",24),JC(5,"Schedulers"),hl()()();}}function In(n,t){n&1&&(Cs(0,"div",36)(1,"a",43)(2,"mat-icon",23),JC(3,"schedule"),hl(),Cs(4,"span",24),JC(5,"Schedulers (No project)"),hl()()());}function zn(n,t){n&1&&(Cs(0,"mat-icon",22),JC(1,"keyboard_arrow_up"),hl());}function An(n,t){n&1&&(Cs(0,"mat-icon",23),JC(1,"rocket_launch"),hl());}function Ln(n,t){if(n&1&&(Cs(0,"div",37),Ag(1,"app-preview-panel",44),hl()),n&2){let e=CC(3);sI(),xg("projectName",e.selectedProjectName());}}function Rn(n,t){if(n&1){let e=vC();Cs(0,"div",36)(1,"a",21),Lg("click",function(o){return Sf(e),CC(2).toggleSection("preview"),o.preventDefault(),_f(o.stopPropagation())}),aC(2,zn,2,0,"mat-icon",22)(3,An,2,0,"mat-icon",23),Cs(4,"span",24),JC(5,"Preview Server"),hl()(),aC(6,Ln,2,1,"div",37),hl();}if(n&2){let e=CC(2);qg("expanded",e.expandedSections.preview),sI(),qg("active",e.expandedSections.preview),sI(),cC(e.expandedSections.preview?2:3),sI(4),cC(e.expandedSections.preview?6:-1);}}function $n(n,t){if(n&1){let e=vC();Cs(0,"div",25)(1,"div",36)(2,"a",21),Lg("click",function(o){return Sf(e),CC().toggleSection("config"),_f(o.preventDefault())}),aC(3,Mn,2,0,"mat-icon",22)(4,wn,2,0,"mat-icon",23),Cs(5,"span",24),JC(6,"Preferences"),hl()(),aC(7,Tn,3,0,"div",37),hl(),Cs(8,"div",36)(9,"a",21),Lg("click",function(o){return Sf(e),CC().openTokenUsage(),o.preventDefault(),_f(o.stopPropagation())}),Cs(10,"mat-icon",23),JC(11,"data_usage"),hl(),Cs(12,"span",24),JC(13,"Token Usage"),hl()()(),Cs(14,"div",36)(15,"a",21),Lg("click",function(o){return Sf(e),CC().openUserConfig(),o.preventDefault(),_f(o.stopPropagation())}),Cs(16,"mat-icon",23),JC(17,"manage_accounts"),hl(),Cs(18,"span",24),JC(19,"User Configuration"),hl()()(),aC(20,En,2,1),aC(21,Dn,6,0,"div",36)(22,Nn,6,0,"div",36),aC(23,jn,6,0,"div",36)(24,Vn,6,0,"div",36),aC(25,Fn,6,0,"div",36)(26,In,6,0,"div",36),aC(27,Rn,7,6,"div",38),Cs(28,"div",36)(29,"a",39),Ag(30,"img",40),Cs(31,"span",24),JC(32,"Contribute on GitHub"),hl()()()();}if(n&2){let e=CC();sI(),qg("expanded",e.expandedSections.config),sI(),qg("active",e.expandedSections.config),sI(),cC(e.expandedSections.config?3:4),sI(4),cC(e.expandedSections.config?7:-1),sI(13),cC(e.isAdmin?20:-1),sI(),cC(e.selectedProjectName()?21:22),sI(2),cC(e.selectedProjectName()?23:24),sI(2),cC(e.selectedProjectName()?25:26),sI(2),cC(e.hasPreviewConfig()?27:-1),sI(3),Ng("src","CODAY-Logo.png",wh);}}function Bn(n,t){if(n&1){let e=vC();Cs(0,"div",27)(1,"mat-icon",45),JC(2,"warning"),hl(),Cs(3,"span",46),JC(4),hl(),Cs(5,"button",47),Lg("click",function(){Sf(e);let o=CC();return _f(o.configErrorMessage="")}),Cs(6,"mat-icon"),JC(7,"close"),hl()()();}if(n&2){let e=CC();sI(4),em(e.configErrorMessage);}}var St=class n{destroy$=new ue;sidenavStateChange=new vt;drawerOpen=false;breakpointObserver=g(Ot$1);isDesktop=F(this.breakpointObserver.observe("(min-width: 1400px)").pipe(re(t=>t.matches)),{initialValue:false});userOpenPreference=Wi(true);isOpen=TT(()=>this.userOpenPreference());isAdmin=false;configErrorMessage="";expandedSections={config:false,preview:false,settings:false};isThreadSearchActive=false;threadSearchQuery="";threadSearchInput;dialog=g(Re);configApi=g(W);projectStateService=g(P);projectApi=g(c);router=g(G);preferences=g(L);threadStateService=g(U);projects=F(this.projectStateService.projectList$);selectedProject=F(this.projectStateService.selectedProject$);selectedProjectName=F(this.projectStateService.selectedProject$.pipe(re(t=>t?.name)));isProjectVolatile=F(this.projectStateService.selectedProject$.pipe(re(t=>t?.config?.volatile||false)));forcedProject=F(this.projectStateService.forcedProject$);hasPreviewConfig=F(this.projectStateService.selectedProject$.pipe(re(t=>{let e=t?.config?.preview;return Array.isArray(e)&&!!e.length})),{initialValue:false});ngOnInit(){let t=window.innerWidth>=1024,e=this.preferences.getPreference("sidenavOpen",t);this.userOpenPreference.set(e??t),this.configApi.getUserConfig().pipe(_d(this.destroy$)).subscribe({next:i=>{this.isAdmin=i.groups?.includes("CODAY_ADMIN")??false,console.log("[SIDENAV] User admin status:",this.isAdmin);},error:i=>{console.error("[SIDENAV] Error loading user config for roles:",i),this.isAdmin=false;}});}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete();}toggle(){let t=!this.userOpenPreference();this.userOpenPreference.set(t),this.saveSidenavState(t),this.sidenavStateChange.emit(t);}close(){this.userOpenPreference()&&(this.userOpenPreference.set(false),this.saveSidenavState(false),this.sidenavStateChange.emit(false));}saveSidenavState(t){this.preferences.setPreference("sidenavOpen",t);}openTokenUsage(){this.configErrorMessage="",this.router.navigate(["/token-usage"]);}openUserConfig(){console.log("[SIDENAV] openUserConfig called"),this.configErrorMessage="",this.configApi.getUserConfig().pipe(_d(this.destroy$)).subscribe({next:t=>{console.log("[SIDENAV] User config loaded, opening dialog"),this.dialog.open(Ze,{data:{configType:"user",initialContent:JSON.stringify(t,null,2)}}).afterClosed().subscribe(i=>{i&&this.saveUserConfig(i);});},error:t=>{console.error("[SIDENAV] Error loading user config:",t),this.configErrorMessage=t?.error?.error||"Failed to load user configuration";}});}saveUserConfig(t){this.configApi.updateUserConfig(t).pipe(_d(this.destroy$)).subscribe({next:e=>{console.log("[SIDENAV] User config saved successfully");},error:e=>{console.error("[SIDENAV] Error saving user config:",e),this.configErrorMessage=e?.error?.error||"Failed to save user configuration";}});}openProjectConfig(){let t=this.selectedProjectName();if(!t){console.error("[SIDENAV] No project selected"),this.configErrorMessage="No project selected. Please select a project first.";return}this.configErrorMessage="",this.projectApi.getProjectConfig(t).pipe(_d(this.destroy$)).subscribe({next:e=>{console.log("[SIDENAV] Project config loaded, opening dialog"),this.dialog.open(Ze,{data:{configType:"project",projectName:t,initialContent:JSON.stringify(e,null,2)}}).afterClosed().subscribe(o=>{o&&this.saveProjectConfig(t,o);});},error:e=>{console.error("[SIDENAV] Error loading project config:",e),this.configErrorMessage=e?.error?.error||"Failed to load project configuration";}});}saveProjectConfig(t,e){this.projectApi.updateProjectConfig(t,e).pipe(_d(this.destroy$)).subscribe({next:i=>{console.log("[SIDENAV] Project config saved successfully");},error:i=>{console.error("[SIDENAV] Error saving project config:",i),this.configErrorMessage=i?.error?.error||"Failed to save project configuration";}});}requireProjectSelection(t){return this.selectedProjectName()?true:(console.error(`[SIDENAV] No project selected, cannot ${t}`),this.configErrorMessage="Please select a project first",false)}openAgents(){if(!this.requireProjectSelection("open agents"))return;let t=this.selectedProjectName();this.router.navigate(["project",t,"agents"]);}openPrompts(){if(!this.requireProjectSelection("open prompts"))return;let t=this.selectedProjectName();this.router.navigate(["project",t,"prompts"]);}openSchedulers(){if(!this.requireProjectSelection("open schedulers"))return;let t=this.selectedProjectName();this.router.navigate(["project",t,"schedulers"]);}toggleSection(t){let e=this.expandedSections[t];t==="settings"?this.expandedSections[t]=!e:(["config","preview"].forEach(o=>{this.expandedSections[o]=false;}),this.expandedSections[t]=!e);}navigateToHome(){console.log("[SIDENAV] Navigating to home (project selection)"),this.projectStateService.clearSelection(),this.router.navigate(["/"]);}openMissionControl(){let t=this.selectedProjectName();t&&(this.router.navigate(["project",t,"tasks"]),this.close());}createNewThread(){let t=this.selectedProjectName();if(!t){console.error("[SIDENAV] No project selected, cannot create new thread"),this.configErrorMessage="Please select a project first";return}console.log("[SIDENAV] Navigating to welcome view for new thread"),this.threadStateService.clearSelection(),this.router.navigate(["project",t]);}onThreadSelectedOnMobile(){this.isDesktop()||this.close();}toggleThreadSearch(t){t.stopPropagation(),this.isThreadSearchActive=true,this.threadSearchQuery="",setTimeout(()=>{this.threadSearchInput?.nativeElement.focus();},0);}closeThreadSearch(){this.isThreadSearchActive=false,this.threadSearchQuery="";}onThreadSearchInput(){}onThreadSearchModeChange(t){t||this.closeThreadSearch();}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=jw({type:n,selectors:[["app-sidenav"]],viewQuery:function(e,i){if(e&1&&Hg(fn,5),e&2){let o;MC(o=NC())&&(i.threadSearchInput=o.first);}},inputs:{drawerOpen:"drawerOpen"},outputs:{sidenavStateChange:"sidenavStateChange"},ngContentSelectors:bn,decls:36,vars:24,consts:[["threadSearchInput",""],[1,"sidenav-container",3,"hasBackdrop"],["mode","push","position","start",1,"app-sidenav",3,"closed","opened","disableClose"],[1,"sidenav-header"],["mat-icon-button","","title","Close menu",3,"click"],["alt","coday","title","Go to project selection","role","button","tabindex","0",1,"sidenav-logo","clickable",3,"click","keydown.enter","keydown.space"],[1,"header-title-section"],[1,"sidenav-title"],[1,"new-thread-section"],["role","button","tabindex","0",1,"new-thread-link",3,"click"],["fontSet","material-icons-outlined"],[1,"new-thread-text"],[1,"mission-control-section"],[1,"sidenav-sections"],[1,"section-container","expanded"],[1,"search-header"],[1,"section-toggle","active","threads-header"],[1,"section-content","threads"],[1,"sidenav-thread-selector",3,"searchModeChange","threadSelected","searchMode","searchQuery"],[1,"sidenav-nav"],[1,"section-container","settings-group"],["role","button","tabindex","0",1,"section-toggle",3,"click"],[1,"arrow-icon","expanded"],[1,"section-icon"],[1,"section-label"],[1,"section-content","settings-content"],[3,"sidenavOpen"],["role","alert",1,"error-notification"],["mat-icon-button","","title","Menu","type","button",1,"sidenav-toggle-btn",3,"click"],["mat-icon-button","","title","Start a new thread","type","button",1,"sidenav-new-thread-btn",3,"click","disabled"],["role","button","tabindex","0",1,"mission-control-link",3,"click"],[1,"mission-control-text"],[1,"search-icon"],["type","text","placeholder","Search threads...",1,"search-input",3,"ngModelChange","input","ngModel"],["mat-icon-button","","title","Close search","type","button",1,"close-search-btn",3,"click"],["mat-icon-button","","title","Search threads","type","button",1,"search-button",3,"click"],[1,"section-container"],[1,"section-content"],[1,"section-container",3,"expanded"],["href","https://github.com/whoz-oss/coday","target","_blank","rel","noopener noreferrer","title","Contribute on GitHub",1,"section-toggle","contribute-btn"],["alt","Coday",1,"contribute-logo"],[1,"preference-item"],[1,"inline-panel"],["role","button","tabindex","-1","aria-disabled","true",1,"section-toggle","disabled"],[3,"projectName"],[1,"error-icon"],[1,"error-text"],["mat-icon-button","","aria-label","Close error message",1,"error-close",3,"click"]],template:function(e,i){e&1&&(bC(),aC(0,vn,6,1),Cs(1,"mat-sidenav-container",1)(2,"mat-sidenav",2),Lg("closed",function(){return i.close()}),Cs(3,"div",3)(4,"button",4),Lg("click",function(){return i.close()}),Cs(5,"mat-icon"),JC(6,"chevron_left"),hl()(),Cs(7,"img",5),Lg("click",function(s){return i.navigateToHome(),s.stopPropagation()})("keydown.enter",function(s){return i.navigateToHome(),s.preventDefault(),s.stopPropagation()})("keydown.space",function(s){return i.navigateToHome(),s.preventDefault(),s.stopPropagation()}),hl(),Cs(8,"div",6)(9,"h2",7),JC(10),hl()()(),Cs(11,"div",8)(12,"a",9),Lg("click",function(s){return i.createNewThread(),s.preventDefault()}),Cs(13,"mat-icon",10),JC(14,"play_circle"),hl(),Cs(15,"span",11),JC(16,"Start a new thread"),hl()()(),aC(17,Cn,6,0,"div",12),Cs(18,"div",13)(19,"div",14),aC(20,xn,8,1,"div",15)(21,yn,8,0,"div",16),Cs(22,"div",17)(23,"app-thread-selector",18),Lg("searchModeChange",function(s){return i.onThreadSearchModeChange(s)})("threadSelected",function(){return i.onThreadSelectedOnMobile()}),hl()()()(),Cs(24,"div",19)(25,"div",20)(26,"a",21),Lg("click",function(s){return i.toggleSection("settings"),s.preventDefault()}),aC(27,Pn,2,0,"mat-icon",22)(28,Sn,2,0,"mat-icon",23),Cs(29,"span",24),JC(30,"Control Center"),hl()(),aC(31,$n,33,12,"div",25),hl()()(),Cs(32,"mat-sidenav-content"),SC(33),hl()(),Ag(34,"app-context-gauge",26),aC(35,Bn,8,1,"div",27)),e&2&&(cC(!i.isOpen()&&!i.drawerOpen?0:-1),sI(),qg("sidenav-open",i.isOpen()),xg("hasBackdrop",false),sI(),xg("opened",i.isOpen())("disableClose",true),sI(5),Ng("src","CODAY-Logo.png",wh),sI(3),em(i.selectedProjectName()),sI(7),cC(i.selectedProjectName()?17:-1),sI(3),cC(i.isThreadSearchActive?20:21),sI(3),xg("searchMode",i.isThreadSearchActive)("searchQuery",i.threadSearchQuery),sI(),qg("is-admin",i.isAdmin),sI(),qg("expanded",i.expandedSections.settings),sI(),qg("active",i.expandedSections.settings),sI(),cC(i.expandedSections.settings?27:28),sI(4),cC(i.expandedSections.settings?31:-1),sI(),qg("sidenav-closed-offset",!i.isOpen()),sI(2),xg("sidenavOpen",i.isOpen()),sI(),cC(i.configErrorMessage?35:-1));},dependencies:[ti,Ye,Zn,cn$1,ui,me,fi,Yt$1,yt$1,wt,hr,Gn,He,bt,Ye$1,we,Te,ke],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%;position:relative}.sidenav-container[_ngcontent-%COMP%]{position:fixed;top:0;left:0;right:0;height:100dvh;z-index:1400;transition:width;display:flex}.sidenav-container[_ngcontent-%COMP%] mat-sidenav[_ngcontent-%COMP%]{position:relative!important;transition:width;width:25%;min-width:320px;height:100dvh!important;flex-shrink:0}.sidenav-container[_ngcontent-%COMP%] mat-sidenav[_ngcontent-%COMP%]:not(.mat-drawer-opened){width:0!important;min-width:0;overflow:hidden!important;visibility:hidden!important}.sidenav-container[_ngcontent-%COMP%] mat-sidenav-content[_ngcontent-%COMP%]{width:100%;margin:0!important}@media(min-width:1024px){.sidenav-container[_ngcontent-%COMP%] mat-sidenav-content[_ngcontent-%COMP%]{min-width:0}}[_nghost-%COMP%] .mat-drawer-backdrop{pointer-events:auto}[_nghost-%COMP%] .mat-drawer-content{pointer-events:auto!important;background:transparent!important;overflow:visible!important}[_nghost-%COMP%] .mat-drawer-inner-container{overflow:hidden!important;height:100dvh!important;display:flex!important;flex-direction:column!important}.sidenav-new-thread-btn[_ngcontent-%COMP%], .sidenav-toggle-btn[_ngcontent-%COMP%]{position:fixed!important;z-index:1500!important;width:40px!important;height:40px!important;border-radius:50%!important;background:var(--glass-bg)!important;backdrop-filter:var(--glass-backdrop-blur)!important;-webkit-backdrop-filter:var(--glass-backdrop-blur)!important;border:1px solid var(--glass-border)!important;box-shadow:var(--glass-shadow)!important}.sidenav-toggle-btn[_ngcontent-%COMP%]{top:1rem!important;left:1rem!important}.sidenav-new-thread-btn[_ngcontent-%COMP%]{top:calc(1.5rem + 40px)!important;left:1rem!important}.sidenav-new-thread-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:var(--color-primary)!important}.sidenav-new-thread-btn[_ngcontent-%COMP%]:disabled{opacity:.5!important}.sidenav-logo-btn[_ngcontent-%COMP%]{position:fixed!important;bottom:1rem!important;left:1rem!important;z-index:1500!important;width:56px!important;height:56px!important;border-radius:50%!important;border:1px solid var(--glass-border)!important;padding:4px!important;background:var(--glass-bg)!important;backdrop-filter:var(--glass-backdrop-blur)!important;-webkit-backdrop-filter:var(--glass-backdrop-blur)!important;box-shadow:var(--glass-shadow)!important;transition:all .3s cubic-bezier(.4,0,.2,1)!important;cursor:pointer!important;pointer-events:auto!important;display:flex!important;align-items:center!important;justify-content:center!important;overflow:hidden!important;text-decoration:none!important}.sidenav-logo-btn[_ngcontent-%COMP%]:hover{transform:scale(1.08) translateY(-2px)!important;box-shadow:0 16px 48px #0003!important;border-color:var(--color-primary)!important}.sidenav-logo-btn[_ngcontent-%COMP%]:active{transform:scale(.96)!important}.sidenav-logo-btn[_ngcontent-%COMP%] .logo[_ngcontent-%COMP%]{width:48px;height:48px;border-radius:2px}.app-sidenav[_ngcontent-%COMP%]{width:480px;height:100dvh!important;min-height:0!important;position:relative;background:var(--glass-bg);backdrop-filter:var(--glass-backdrop-blur);-webkit-backdrop-filter:var(--glass-backdrop-blur);overflow:hidden!important;display:flex;flex-direction:column}.sidenav-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:1rem;padding:1.5rem 1rem .5rem;flex-shrink:0}.sidenav-header[_ngcontent-%COMP%] .sidenav-logo[_ngcontent-%COMP%]{width:40px;height:40px;border-radius:4px;flex-shrink:0;transition:all .2s ease}.sidenav-header[_ngcontent-%COMP%] .sidenav-logo.clickable[_ngcontent-%COMP%]{cursor:pointer}.sidenav-header[_ngcontent-%COMP%] .sidenav-logo.clickable[_ngcontent-%COMP%]:hover{transform:scale(1.1);filter:drop-shadow(0 4px 12px rgba(0,0,0,.15))}.sidenav-header[_ngcontent-%COMP%] .sidenav-logo.clickable[_ngcontent-%COMP%]:active{transform:scale(.95)}.sidenav-header[_ngcontent-%COMP%] .sidenav-logo.clickable[_ngcontent-%COMP%]:focus{outline:2px solid var(--color-primary);outline-offset:2px}.sidenav-header[_ngcontent-%COMP%] .header-title-section[_ngcontent-%COMP%]{flex:1;display:flex;align-items:center;min-width:0}.sidenav-header[_ngcontent-%COMP%] .header-title-section[_ngcontent-%COMP%] .sidenav-title[_ngcontent-%COMP%]{margin:0;font-size:1.25rem;font-weight:600;color:var(--color-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mission-control-section[_ngcontent-%COMP%]{padding:.25rem 1rem .5rem;flex-shrink:0}.mission-control-link[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem;background:transparent;border:none;text-decoration:none;cursor:pointer;transition:all .2s ease;font-size:.875rem;font-weight:500;color:var(--color-text-secondary);padding:0}.mission-control-link[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px;color:var(--color-text-secondary);transition:color .2s ease}.mission-control-link[_ngcontent-%COMP%]:hover{color:var(--color-primary);transform:translate(3px)}.mission-control-link[_ngcontent-%COMP%]:hover mat-icon[_ngcontent-%COMP%]{color:var(--color-primary)}.mission-control-link[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-primary);outline-offset:2px;border-radius:4px}.new-thread-section[_ngcontent-%COMP%]{padding:1rem 1rem .5rem;flex-shrink:0}.new-thread-link[_ngcontent-%COMP%]{display:inline-flex;align-items:center;background:transparent;border:none;text-decoration:none;cursor:pointer;transition:all .2s ease;gap:.5rem;font-size:.95rem;font-weight:600;padding:0}.new-thread-link[_ngcontent-%COMP%] .new-thread-text[_ngcontent-%COMP%]{background:linear-gradient(90deg,var(--color-primary, #3b82f6) 0%,var(--color-accent, #8b5cf6) 50%,var(--color-primary, #3b82f6) 100%);background-size:200% auto;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;animation:_ngcontent-%COMP%_gradientShift 3s ease-in-out infinite}.new-thread-link[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;color:var(--color-primary);animation:_ngcontent-%COMP%_iconPulse 3s ease-in-out infinite}.new-thread-link[_ngcontent-%COMP%]:hover{transform:translate(4px)}.new-thread-link[_ngcontent-%COMP%]:hover mat-icon[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_iconPulse 1.5s ease-in-out infinite}.new-thread-link[_ngcontent-%COMP%]:focus{transform:scale(1.1)}@keyframes _ngcontent-%COMP%_gradientShift{0%{background-position:0% center}50%{background-position:100% center}to{background-position:0% center}}@keyframes _ngcontent-%COMP%_iconPulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.8;transform:scale(1.05)}}.sidenav-sections[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;min-height:100px;overflow:hidden}.sidenav-sections[_ngcontent-%COMP%] > .section-container[_ngcontent-%COMP%], .sidenav-sections[_ngcontent-%COMP%] > .section-container.expanded[_ngcontent-%COMP%], .sidenav-sections[_ngcontent-%COMP%] > .section-container[_ngcontent-%COMP%] > .section-content.threads[_ngcontent-%COMP%], .sidenav-sections[_ngcontent-%COMP%] > .section-container[_ngcontent-%COMP%] > .section-content.threads[_ngcontent-%COMP%] > app-thread-selector[_ngcontent-%COMP%]{display:flex!important;flex-direction:column!important;flex:1!important;min-height:0!important;overflow:hidden!important}.sidenav-nav[_ngcontent-%COMP%]{flex-shrink:0;display:flex;flex-direction:column;overflow:hidden;max-height:70%;border-top:1px solid var(--color-border)}.sidenav-nav[_ngcontent-%COMP%] > .settings-group[_ngcontent-%COMP%] > .section-toggle.active[_ngcontent-%COMP%]{border-top:none}.sidenav-nav[_ngcontent-%COMP%] .settings-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}.sidenav-nav[_ngcontent-%COMP%] .settings-group[_ngcontent-%COMP%] > .section-toggle[_ngcontent-%COMP%]{flex-shrink:0}.sidenav-nav[_ngcontent-%COMP%] .settings-group[_ngcontent-%COMP%] > .section-content.settings-content[_ngcontent-%COMP%]{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden}.settings-group[_ngcontent-%COMP%] > .section-content.settings-content[_ngcontent-%COMP%]{padding:0;border-bottom:1px solid var(--color-border);overflow:visible}.settings-group[_ngcontent-%COMP%] > .section-content.settings-content[_ngcontent-%COMP%] .section-container.expanded[_ngcontent-%COMP%] .section-content[_ngcontent-%COMP%]{max-height:40vh;overflow-y:auto;overflow-x:hidden}.contribute-btn[_ngcontent-%COMP%] .contribute-logo[_ngcontent-%COMP%]{width:20px;height:20px;border-radius:2px;flex-shrink:0}.section-container[_ngcontent-%COMP%]{flex-shrink:0;display:flex;flex-direction:column}.section-container.expanded[_ngcontent-%COMP%] .section-content[_ngcontent-%COMP%]{border-bottom:none}.section-toggle[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;width:100%;padding:.5rem 1rem;height:50px;text-decoration:none;cursor:pointer;transition:all .2s ease;background:transparent;border:none;border-radius:0;color:var(--color-text);flex-shrink:0}.section-toggle.active[_ngcontent-%COMP%]{border-top:1px solid var(--color-border)}.section-toggle.disabled[_ngcontent-%COMP%]{opacity:.5;cursor:not-allowed;pointer-events:none}.section-toggle[_ngcontent-%COMP%] .arrow-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;color:var(--color-text-secondary);transition:transform .2s ease;flex-shrink:0}.section-toggle[_ngcontent-%COMP%] .section-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;color:var(--color-text-secondary);flex-shrink:0}.section-toggle[_ngcontent-%COMP%] .section-label[_ngcontent-%COMP%]{flex:1;font-size:.9rem;color:var(--color-text);text-align:left}.section-toggle[_ngcontent-%COMP%] .search-button[_ngcontent-%COMP%]{margin-left:auto;flex-shrink:0}.section-toggle[_ngcontent-%COMP%] .search-button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px}.section-toggle[_ngcontent-%COMP%]:hover:not(.disabled){background:var(--color-bg-hover)}.section-toggle[_ngcontent-%COMP%]:active:not(.disabled){transform:scale(.98)}.section-toggle[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-primary);outline-offset:-2px}.search-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.5rem 1rem;height:50px;background:var(--color-bg-hover);border-top:1px solid var(--color-border);transition:all .2s ease}.search-header[_ngcontent-%COMP%] .search-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;color:var(--color-text-secondary);flex-shrink:0}.search-header[_ngcontent-%COMP%] .search-input[_ngcontent-%COMP%]{flex:1;border:none;outline:none;background:transparent;color:var(--color-text);font-size:.9rem;padding:0;min-width:0}.search-header[_ngcontent-%COMP%] .search-input[_ngcontent-%COMP%]::placeholder{color:var(--color-text-muted)}.search-header[_ngcontent-%COMP%] .close-search-btn[_ngcontent-%COMP%]{flex-shrink:0}.search-header[_ngcontent-%COMP%] .close-search-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px}.section-content[_ngcontent-%COMP%]{padding:.5rem 0 0;animation:_ngcontent-%COMP%_slideDown .2s ease;border-bottom:1px solid var(--color-border);display:flex;flex-direction:column}.section-content.threads[_ngcontent-%COMP%]{padding:0;border-bottom:none;flex:1!important;min-height:0!important;overflow:hidden!important}.section-content.threads[_ngcontent-%COMP%] app-thread-selector[_ngcontent-%COMP%]{flex:1!important;min-height:0!important;overflow:hidden!important;display:flex!important;flex-direction:column!important}@keyframes _ngcontent-%COMP%_slideDown{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}.preference-item[_ngcontent-%COMP%]{padding-bottom:1rem;margin-bottom:1rem;border-bottom:1px solid var(--color-border)}.preference-item[_ngcontent-%COMP%]:last-child{margin-bottom:0;padding-bottom:0;border-bottom:none}.preference-item[_ngcontent-%COMP%] .preference-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.75rem;margin-bottom:.75rem;padding:0 1rem}.preference-item[_ngcontent-%COMP%] .preference-header[_ngcontent-%COMP%] .item-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px}.preference-item[_ngcontent-%COMP%] .preference-header[_ngcontent-%COMP%] .item-text[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text)}.preference-item[_ngcontent-%COMP%] .preference-content[_ngcontent-%COMP%]{padding:0 1rem}.error-notification[_ngcontent-%COMP%]{position:fixed;top:5rem;left:50%;transform:translate(-50%);z-index:2000;display:flex;align-items:center;gap:.75rem;background:#ff3b3026;backdrop-filter:var(--glass-backdrop-blur);-webkit-backdrop-filter:var(--glass-backdrop-blur);border:1px solid rgba(255,59,48,.3);border-radius:16px;padding:1rem 1.5rem;box-shadow:var(--glass-shadow);animation:_ngcontent-%COMP%_errorSlideDown .3s cubic-bezier(.4,0,.2,1)}.error-notification[_ngcontent-%COMP%] .error-icon[_ngcontent-%COMP%]{font-size:1.2rem;flex-shrink:0;color:#c00}.error-notification[_ngcontent-%COMP%] .error-text[_ngcontent-%COMP%]{flex:1;color:#c00;font-size:.9rem;font-weight:500}@keyframes _ngcontent-%COMP%_errorSlideDown{0%{opacity:0;transform:translate(-50%,-10px)}to{opacity:1;transform:translate(-50%)}}@media(max-width:480px){.app-sidenav[_ngcontent-%COMP%]{width:320px}.sidenav-toggle-btn[_ngcontent-%COMP%]{top:.75rem!important;left:.75rem!important}.sidenav-new-thread-btn[_ngcontent-%COMP%]{top:calc(1.25rem + 40px)!important;left:.75rem!important}.error-notification[_ngcontent-%COMP%]{left:1rem;right:1rem;transform:none;max-width:calc(100vw - 2rem)}}body.dark[_nghost-%COMP%] .app-sidenav[_ngcontent-%COMP%], body.dark [_nghost-%COMP%] .app-sidenav[_ngcontent-%COMP%], [_ngcontent-%COMP%]:root[data-theme=dark] .app-sidenav[_ngcontent-%COMP%]{background:#242830f2;border-right-color:#b4c8ff17}body.dark[_nghost-%COMP%] .sidenav-header[_ngcontent-%COMP%], body.dark [_nghost-%COMP%] .sidenav-header[_ngcontent-%COMP%], [_ngcontent-%COMP%]:root[data-theme=dark] .sidenav-header[_ngcontent-%COMP%]{background:#242830b3}"],changeDetection:1})};
5
- export{St as S};
@@ -1,2 +0,0 @@
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,`
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 +0,0 @@
1
- import {l}from'./chunk-C1RU8zia.js';import {g,dg as ee,dh as T,X as br,bS as Da,r as re,a7 as va,cE as Pd,Y as x}from'./main-JTU33H5D.js';var v=class i{userState=g(l);membership=g(ee);currentUser$=T(this.userState.currentUser);cache=new Map;isAdminOfNamespace$(e){if(!e)return br(false);let t=this.cache.get(e);if(t)return t;let s=this.currentUser$.pipe(Da(a=>a?a.isAdmin?br(true):this.membership.getMembersNamespaceMembership(e).pipe(re(d=>d.some(n=>n.id===a.id&&n.role==="ADMIN")),va(()=>br(false))):br(false)),Pd({bufferSize:1,refCount:false}));return this.cache.set(e,s),s}static \u0275fac=function(t){return new(t||i)};static \u0275prov=x({token:i,factory:i.\u0275fac,providedIn:"root"})};export{v};
@@ -1 +0,0 @@
1
- import {i}from'./chunk-TkSR4UzV.js';import {l}from'./chunk-C1RU8zia.js';import {g as g$1,df as U,aJ as Tr,aD as zy,bS as Da,a7 as va,X as br,r as re,cE as Pd,bU as jd,a as P,Y as x}from'./main-JTU33H5D.js';var g="none",N="me",O=class p{nsController=g$1(U);userState=g$1(l);refresh$=new Tr(void 0);namespaceId$=new Tr(null);vm$=zy([this.namespaceId$,this.refresh$]).pipe(Da(([e])=>{let r=this.loadPlatformProviders().pipe(va(()=>br([])));return e?zy([r,this.loadNamespaceProviders(e).pipe(va(()=>br([]))),this.loadUserProviders(e).pipe(va(()=>br([]))),this.loadUserProviders("global").pipe(va(()=>br([])))]).pipe(re(([i,n,s,t])=>({platform:i,namespace:n,userOnNs:s,userGlobal:t}))):zy([r,this.loadNamespaceProviders("").pipe(va(()=>br([]))),this.loadUserProviders("global").pipe(va(()=>br([])))]).pipe(re(([i,n,s])=>({platform:i,namespace:n,userOnNs:[],userGlobal:s})))}),Pd({bufferSize:1,refCount:true}));setNamespace(e){this.namespaceId$.value!==e&&this.namespaceId$.next(e);}refresh(){this.refresh$.next();}loadUserProviders(e){let r=e==="global"?g:e;return this.nsController.listAiProvider(r,N)}userGlobal$=i(this.refresh$,()=>this.loadUserProviders("global"),[]);loadPlatformProviders(){return this.nsController.listAiProvider(g)}loadNamespaceProviders(e){return e?this.nsController.listAiProvider(e):br([])}getById(e,r){return this.nsController.getByIdAiProvider(e)}create(e,r,i){let s=this.userState.currentUser()?.id;if((r==="userOnNs"||r==="userGlobal")&&!s)throw new Error(`Cannot create ${r} provider before UserStateService.loadMe() resolves \u2014 call loadMe() at app init`);if(r==="namespace"){if(i===void 0||i==="")throw new Error("Cannot create namespace-scoped provider without a namespaceId");let S={name:e.name,apiType:e.apiType,description:e.description,baseUrl:e.baseUrl,apiKey:e.apiKey,headers:e.headers??void 0,namespaceId:i??void 0};return this.nsController.createAiProvider(S).pipe(jd(()=>this.refresh()))}if(r==="userOnNs"&&!i)throw new Error("Cannot create userOnNs provider without a namespaceId");let t={name:e.name,apiType:e.apiType,description:e.description,baseUrl:e.baseUrl,apiKey:e.apiKey,headers:e.headers??void 0,userId:s,namespaceId:r==="userOnNs"?i:void 0};return this.nsController.createAiProvider(t).pipe(jd(()=>this.refresh()))}update(e,r,i,n){let s=r.apiKey===null?{}:{apiKey:r.apiKey},t=P({name:r.name,apiType:r.apiType,description:r.description,baseUrl:r.baseUrl,headers:r.headers??void 0,namespaceId:n.namespaceId,userId:n.userId},s);return this.nsController.updateAiProvider(e,t).pipe(jd(()=>this.refresh()))}delete(e,r){return this.nsController.deleteAiProvider(e).pipe(jd(()=>this.refresh()))}static \u0275fac=function(r){return new(r||p)};static \u0275prov=x({token:p,factory:p.\u0275fac,providedIn:"root"})};export{O};
@@ -1,37 +0,0 @@
1
- import {cN as kn,z as z$1,a as P,aW as C$1,aL as wo,aM as Zn$1,aZ as Bs,dt as ge,aR as Ps,az as Xt$1,cT as Qp,al as vt$1,bL as pe,g,cX as yr,C as Ce$1,bs as bl,c2 as PE,a_ as rb,T as TT,W as Wi,an as ue$1,S as Wy,r as re$1,du as Mt$1,bF as J$1,cd as Wf,cD as Te,dv as Io,dw as Ke$1,bC as _i,cV as Cg,b5 as lT,n as Lg,aC as bu,N as Ng,y as qg,dx as zw,dy as m,dz as _e$1,by as hm,aA as an$1,j as jw,bA as bC,bB as SC,b$ as UC,dA as ke,dB as vn$1,X as br,bU as jd,bh as qy,a7 as va,dC as hi,dD as Ta,dE as b,E as vy,aV as U$1,Y as x,aO as wt$2,aI as RS}from'./main-JTU33H5D.js';var Xe=(()=>{class n{_renderer;_elementRef;onChange=e=>{};onTouched=()=>{};constructor(e,i){this._renderer=e,this._elementRef=i;}setProperty(e,i){this._renderer.setProperty(this._elementRef.nativeElement,e,i);}registerOnTouched(e){this.onTouched=e;}registerOnChange(e){this.onChange=e;}setDisabledState(e){this.setProperty("disabled",e);}static \u0275fac=function(i){return new(i||n)(ge(Ps),ge(Xt$1))};static \u0275dir=Bs({type:n})}return n})(),S=(()=>{class n extends Xe{static \u0275fac=(()=>{let e;return function(r){return (e||(e=Qp(n)))(r||n)}})();static \u0275dir=Bs({type:n,features:[Cg]})}return n})(),D=new C$1(""),Ft={provide:D,useExisting:_i(()=>wt$1),multi:true},wt$1=(()=>{class n extends S{writeValue(e){this.setProperty("checked",e);}static \u0275fac=(()=>{let e;return function(r){return (e||(e=Qp(n)))(r||n)}})();static \u0275dir=Bs({type:n,selectors:[["input","type","checkbox","formControlName","",3,"ngNoCva",""],["input","type","checkbox","formControl","",3,"ngNoCva",""],["input","type","checkbox","ngModel","",3,"ngNoCva",""]],hostBindings:function(i,r){i&1&&Lg("change",function(a){return r.onChange(a.target.checked)})("blur",function(){return r.onTouched()});},standalone:false,features:[lT([Ft]),Cg]})}return n})(),Nt={provide:D,useExisting:_i(()=>Ye),multi:true};function St(){let n=Mt$1()?Mt$1().getUserAgent():"";return /android (\d+)/.test(n.toLowerCase())}var It=new C$1(""),Ye=(()=>{class n extends Xe{_compositionMode;_composing=false;constructor(e,i,r){super(e,i),this._compositionMode=r,this._compositionMode==null&&(this._compositionMode=!St());}writeValue(e){let i=e??"";this.setProperty("value",i);}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e);}_compositionStart(){this._composing=true;}_compositionEnd(e){this._composing=false,this._compositionMode&&this.onChange(e);}static \u0275fac=function(i){return new(i||n)(ge(Ps),ge(Xt$1),ge(It,8))};static \u0275dir=Bs({type:n,selectors:[["input","formControlName","",3,"type","checkbox",3,"ngNoCva",""],["textarea","formControlName","",3,"ngNoCva",""],["input","formControl","",3,"type","checkbox",3,"ngNoCva",""],["textarea","formControl","",3,"ngNoCva",""],["input","ngModel","",3,"type","checkbox",3,"ngNoCva",""],["textarea","ngModel","",3,"ngNoCva",""],["","ngDefaultControl",""]],hostBindings:function(i,r){i&1&&Lg("input",function(a){return r._handleInput(a.target.value)})("blur",function(){return r.onTouched()})("compositionstart",function(){return r._compositionStart()})("compositionend",function(a){return r._compositionEnd(a.target.value)});},standalone:false,features:[lT([Nt]),Cg]})}return n})();function Ve(n){return n==null||De(n)===0}function De(n){return n==null?null:Array.isArray(n)||typeof n=="string"?n.length:n instanceof Set?n.size:null}var y=new C$1(""),I=new C$1(""),Ot=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,_e=class{static min(t){return Ke(t)}static max(t){return Je(t)}static required(t){return Qe(t)}static requiredTrue(t){return xt(t)}static email(t){return Rt(t)}static minLength(t){return Pt(t)}static maxLength(t){return et$1(t)}static pattern(t){return kt(t)}static nullValidator(t){return te()}static compose(t){return ot$1(t)}static composeAsync(t){return at(t)}};function Ke(n){return t=>{if(t.value==null||n==null)return null;let e=parseFloat(t.value);return !isNaN(e)&&e<n?{min:{min:n,actual:t.value}}:null}}function Je(n){return t=>{if(t.value==null||n==null)return null;let e=parseFloat(t.value);return !isNaN(e)&&e>n?{max:{max:n,actual:t.value}}:null}}function Qe(n){return Ve(n.value)?{required:true}:null}function xt(n){return n.value===true?null:{required:true}}function Rt(n){return Ve(n.value)||Ot.test(n.value)?null:{email:true}}function Pt(n){return t=>{let e=t.value?.length??De(t.value);return e===null||e===0?null:e<n?{minlength:{requiredLength:n,actualLength:e}}:null}}function et$1(n){return t=>{let e=t.value?.length??De(t.value);return e!==null&&e>n?{maxlength:{requiredLength:n,actualLength:e}}:null}}function kt(n){if(!n)return te;let t,e;return typeof n=="string"?(e="",n.charAt(0)!=="^"&&(e+="^"),e+=n,n.charAt(n.length-1)!=="$"&&(e+="$"),t=new RegExp(e)):(e=n.toString(),t=n),i=>{if(Ve(i.value))return null;let r=i.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}function te(n){return null}function tt$1(n){return n!=null}function nt$1(n){return Io(n)?Ke$1(n):n}function it(n){let t={};return n.forEach(e=>{t=e!=null?P(P({},t),e):t;}),Object.keys(t).length===0?null:t}function rt$1(n,t){return t.map(e=>e(n))}function Tt(n){return !n.validate}function st(n){return n.map(t=>Tt(t)?t:e=>t.validate(e))}function ot$1(n){if(!n)return null;let t=n.filter(tt$1);return t.length==0?null:function(e){return it(rt$1(e,t))}}function be(n){return n!=null?ot$1(st(n)):null}function at(n){if(!n)return null;let t=n.filter(tt$1);return t.length==0?null:function(e){let i=rt$1(e,t).map(nt$1);return Wy(i).pipe(re$1(it))}}function Ae(n){return n!=null?at(st(n)):null}function Ue(n,t){return n===null?[t]:Array.isArray(n)?[...n,t]:[n,t]}function lt(n){return n._rawValidators}function ut(n){return n._rawAsyncValidators}function ye(n){return n?Array.isArray(n)?n:[n]:[]}function ne(n,t){return Array.isArray(n)?n.includes(t):n===t}function He(n,t){let e=ye(t);return ye(n).forEach(r=>{ne(e,r)||e.push(r);}),e}function Le(n,t){return ye(t).filter(e=>!ne(n,e))}var ie=class{get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators=[];_rawAsyncValidators=[];_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=be(this._rawValidators);}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=Ae(this._rawAsyncValidators);}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_onDestroyCallbacks=[];_registerOnDestroy(t){this._onDestroyCallbacks.push(t);}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[];}reset(t=void 0){this.control?.reset(t);}hasError(t,e){return this.control?this.control.hasError(t,e):false}getError(t,e){return this.control?this.control.getError(t,e):null}},h=class extends ie{name;get formDirective(){return null}get path(){return null}};var U="VALID",ee="INVALID",k="PENDING",H="DISABLED",E=class{},re=class extends E{value;source;constructor(t,e){super(),this.value=t,this.source=e;}},W=class extends E{pristine;source;constructor(t,e){super(),this.pristine=t,this.source=e;}},q$1=class q extends E{touched;source;constructor(t,e){super(),this.touched=t,this.source=e;}},T=class extends E{status;source;constructor(t,e){super(),this.status=t,this.source=e;}},se=class extends E{source;constructor(t){super(),this.source=t;}},N=class extends E{source;constructor(t){super(),this.source=t;}};function Me(n){return (ce(n)?n.validators:n)||null}function jt(n){return Array.isArray(n)?be(n):n||null}function Ee(n,t){return (ce(t)?t.asyncValidators:n)||null}function Bt(n){return Array.isArray(n)?Ae(n):n||null}function ce(n){return n!=null&&!Array.isArray(n)&&typeof n=="object"}function dt(n,t,e){let i=n.controls;if(!(t?Object.keys(i):i).length)throw new m(1e3,"");if(!ht(i,e))throw new m(1001,"")}function ct(n,t,e){n._forEachChild((i,r)=>{if(e[r]===void 0)throw new m(-1002,"")});}var $=class{_pendingDirty=false;_hasOwnPendingAsyncValidator=null;_pendingTouched=false;_onCollectionChange=()=>{};_updateOn;_hasRequired=Wi(false);_parent=null;_asyncValidationSubscription;_composedValidatorFn;_composedAsyncValidatorFn;_rawValidators;_rawAsyncValidators;value;constructor(t,e){this._assignValidators(t),this._assignAsyncValidators(e);}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t,this._updateHasRequiredValidator();}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t;}get parent(){return this._parent}get status(){return kn(this.statusReactive)}set status(t){kn(()=>this.statusReactive.set(t));}_status=TT(()=>this.statusReactive());statusReactive=Wi(void 0);get valid(){return this.status===U}get invalid(){return this.status===ee}get pending(){return this.status===k}get disabled(){return this.status===H}get enabled(){return this.status!==H}errors;get pristine(){return kn(this.pristineReactive)}set pristine(t){kn(()=>this.pristineReactive.set(t));}_pristine=TT(()=>this.pristineReactive());pristineReactive=Wi(true);get dirty(){return !this.pristine}get touched(){return kn(this.touchedReactive)}set touched(t){kn(()=>this.touchedReactive.set(t));}_touched=TT(()=>this.touchedReactive());touchedReactive=Wi(false);get untouched(){return !this.touched}_events=new ue$1;events=this._events.asObservable();valueChanges;statusChanges;get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t);}setAsyncValidators(t){this._assignAsyncValidators(t);}addValidators(t){this.setValidators(He(t,this._rawValidators));}addAsyncValidators(t){this.setAsyncValidators(He(t,this._rawAsyncValidators));}removeValidators(t){this.setValidators(Le(t,this._rawValidators));}removeAsyncValidators(t){this.setAsyncValidators(Le(t,this._rawAsyncValidators));}hasValidator(t){return ne(this._rawValidators,t)}hasAsyncValidator(t){return ne(this._rawAsyncValidators,t)}clearValidators(){this.validator=null;}clearAsyncValidators(){this.asyncValidator=null;}markAsTouched(t={}){let e=this.touched===false;this.touched=true;let i=t.sourceControl??this;t.onlySelf||this._parent?.markAsTouched(z$1(P({},t),{sourceControl:i})),e&&t.emitEvent!==false&&this._events.next(new q$1(true,i));}markAllAsDirty(t={}){this.markAsDirty({onlySelf:true,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsDirty(t));}markAllAsTouched(t={}){this.markAsTouched({onlySelf:true,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(t));}markAsUntouched(t={}){let e=this.touched===true;this.touched=false,this._pendingTouched=false;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:true,emitEvent:t.emitEvent,sourceControl:i});}),t.onlySelf||this._parent?._updateTouched(t,i),e&&t.emitEvent!==false&&this._events.next(new q$1(false,i));}markAsDirty(t={}){let e=this.pristine===true;this.pristine=false;let i=t.sourceControl??this;t.onlySelf||this._parent?.markAsDirty(z$1(P({},t),{sourceControl:i})),e&&t.emitEvent!==false&&this._events.next(new W(false,i));}markAsPristine(t={}){let e=this.pristine===false;this.pristine=true,this._pendingDirty=false;let i=t.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:true,emitEvent:t.emitEvent});}),t.onlySelf||this._parent?._updatePristine(t,i),e&&t.emitEvent!==false&&this._events.next(new W(true,i));}markAsPending(t={}){this.status=k;let e=t.sourceControl??this;t.emitEvent!==false&&(this._events.next(new T(this.status,e)),this.statusChanges.emit(this.status)),t.onlySelf||this._parent?.markAsPending(z$1(P({},t),{sourceControl:e}));}disable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=H,this.errors=null,this._forEachChild(r=>{r.disable(z$1(P({},t),{onlySelf:true}));}),this._updateValue();let i=t.sourceControl??this;t.emitEvent!==false&&(this._events.next(new re(this.value,i)),this._events.next(new T(this.status,i)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(z$1(P({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(r=>r(true));}enable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=U,this._forEachChild(i=>{i.enable(z$1(P({},t),{onlySelf:true}));}),this.updateValueAndValidity({onlySelf:true,emitEvent:t.emitEvent}),this._updateAncestors(z$1(P({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(i=>i(false));}_updateAncestors(t,e){t.onlySelf||(this._parent?.updateValueAndValidity(t),t.skipPristineCheck||this._parent?._updatePristine({},e),this._parent?._updateTouched({},e));}setParent(t){this._parent=t;}getRawValue(){return this.value}updateValueAndValidity(t={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let i=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===U||this.status===k)&&this._runAsyncValidator(i,t.emitEvent);}let e=t.sourceControl??this;t.emitEvent!==false&&(this._events.next(new re(this.value,e)),this._events.next(new T(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),t.onlySelf||this._parent?.updateValueAndValidity(z$1(P({},t),{sourceControl:e}));}_updateTreeValidity(t={emitEvent:true}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:true,emitEvent:t.emitEvent});}_setInitialStatus(){this.status=this._allControlsDisabled()?H:U;}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t,e){if(this.asyncValidator){this.status=k,this._hasOwnPendingAsyncValidator={emitEvent:e!==false,shouldHaveEmitted:t!==false};let i=nt$1(this.asyncValidator(this));this._asyncValidationSubscription=i.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:e,shouldHaveEmitted:t});});}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let t=(this._hasOwnPendingAsyncValidator?.emitEvent||this._hasOwnPendingAsyncValidator?.shouldHaveEmitted)??false;return this._hasOwnPendingAsyncValidator=null,t}return false}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(e.emitEvent!==false,this,e.shouldHaveEmitted);}get(t){let e=t;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((i,r)=>i&&i._find(r),this)}getError(t,e){let i=e?this.get(e):this;return i?.errors?i.errors[t]:null}hasError(t,e){return !!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t,e,i){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),(t||i)&&this._events.next(new T(this.status,e)),this._parent&&this._parent._updateControlsErrors(t,e,i);}_initObservables(){this.valueChanges=new vt$1,this.statusChanges=new vt$1;}_calculateStatus(){return this._allControlsDisabled()?H:this.errors?ee:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(k)?k:this._anyControlsHaveStatus(ee)?ee:U}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t,e){let i=!this._anyControlsDirty(),r=this.pristine!==i;this.pristine=i,t.onlySelf||this._parent?._updatePristine(t,e),r&&this._events.next(new W(this.pristine,e));}_updateTouched(t={},e){this.touched=this._anyControlsTouched(),this._events.next(new q$1(this.touched,e)),t.onlySelf||this._parent?._updateTouched(t,e);}_onDisabledChange=[];_registerOnCollectionChange(t){this._onCollectionChange=t;}_setUpdateStrategy(t){ce(t)&&t.updateOn!=null&&(this._updateOn=t.updateOn);}_parentMarkedDirty(t){return !t&&!!this._parent?.dirty&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=jt(this._rawValidators),this._updateHasRequiredValidator();}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=Bt(this._rawAsyncValidators);}_updateHasRequiredValidator(){kn(()=>this._hasRequired.set(this.hasValidator(_e.required)));}};function ht(n,t){return Object.hasOwn(n,t)}function Gt(n){return n.tagName==="INPUT"||n.tagName==="SELECT"||n.tagName==="TEXTAREA"}function Ut(n,t,e,i){switch(e){case "name":n.setAttribute(t,e,i);break;case "disabled":case "readonly":case "required":i?n.setAttribute(t,e,""):n.removeAttribute(t,e);break;case "max":case "min":case "minLength":case "maxLength":i!==void 0?n.setAttribute(t,e,i.toString()):n.removeAttribute(t,e);break}}var Ce=class{kind;context;control;message;constructor({kind:t,context:e,control:i}){this.kind=t,this.context=e,this.control=i;}};function Ht(n){return typeof n=="number"?n:parseInt(n,10)}function ft(n){return typeof n=="number"?n:parseFloat(n)}var he=(()=>{class n{_validator=te;_onChange;_enabled;ngOnChanges(e){if(this.inputName in e){let i=this.normalizeInput(e[this.inputName].currentValue);this._enabled=this.enabled(i),this._validator=this._enabled?this.createValidator(i):te,this._onChange?.();}}validate(e){return this._validator(e)}registerOnValidatorChange(e){this._onChange=e;}enabled(e){return e!=null}static \u0275fac=function(i){return new(i||n)};static \u0275dir=Bs({type:n,features:[bu]})}return n})(),Lt={provide:y,useExisting:_i(()=>Wt),multi:true},Wt=(()=>{class n extends he{max;inputName="max";normalizeInput=e=>ft(e);createValidator=e=>Je(e);static \u0275fac=(()=>{let e;return function(r){return (e||(e=Qp(n)))(r||n)}})();static \u0275dir=Bs({type:n,selectors:[["input","type","number","max","","formControlName",""],["input","type","number","max","","formControl",""],["input","type","number","max","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&Ng("max",r._enabled?r.max:null);},inputs:{max:"max"},standalone:false,features:[lT([Lt]),Cg]})}return n})(),qt={provide:y,useExisting:_i(()=>$t),multi:true},$t=(()=>{class n extends he{min;inputName="min";normalizeInput=e=>ft(e);createValidator=e=>Ke(e);static \u0275fac=(()=>{let e;return function(r){return (e||(e=Qp(n)))(r||n)}})();static \u0275dir=Bs({type:n,selectors:[["input","type","number","min","","formControlName",""],["input","type","number","min","","formControl",""],["input","type","number","min","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&Ng("min",r._enabled?r.min:null);},inputs:{min:"min"},standalone:false,features:[lT([qt]),Cg]})}return n})(),zt={provide:y,useExisting:_i(()=>gt),multi:true};var gt=(()=>{class n extends he{required;inputName="required";normalizeInput=rb;createValidator=e=>Qe;enabled(e){return e}static \u0275fac=(()=>{let e;return function(r){return (e||(e=Qp(n)))(r||n)}})();static \u0275dir=Bs({type:n,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(i,r){i&2&&Ng("required",r._enabled?"":null);},inputs:{required:"required"},standalone:false,features:[lT([zt]),Cg]})}return n})();var Zt={provide:y,useExisting:_i(()=>Xt),multi:true},Xt=(()=>{class n extends he{maxlength;inputName="maxlength";normalizeInput=e=>Ht(e);createValidator=e=>et$1(e);static \u0275fac=(()=>{let e;return function(r){return (e||(e=Qp(n)))(r||n)}})();static \u0275dir=Bs({type:n,selectors:[["","maxlength","","formControlName",""],["","maxlength","","formControl",""],["","maxlength","","ngModel",""]],hostVars:1,hostBindings:function(i,r){i&2&&Ng("maxlength",r._enabled?r.maxlength:null);},inputs:{maxlength:"maxlength"},standalone:false,features:[lT([Zt]),Cg]})}return n})();var Yt=new C$1(""),O=new C$1("",{factory:()=>Z$1}),Z$1="always";function fe(n,t){return [...t.path,n]}function oe(n,t,e=Z$1){Fe(n,t),t.valueAccessor.writeValue(n.value),(n.disabled||e==="always")&&t.valueAccessor.setDisabledState?.(n.disabled),Jt(n,t),en(n,t),Qt(n,t),Kt(n,t);}function ae(n,t,e=true){let i=()=>{};t?.valueAccessor?.registerOnChange(i),t?.valueAccessor?.registerOnTouched(i),ue(n,t),n&&(t._invokeOnDestroyCallbacks(),n._registerOnCollectionChange(()=>{}));}function le(n,t){n.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t);});}function Kt(n,t){if(t.valueAccessor.setDisabledState){let e=i=>{t.valueAccessor.setDisabledState(i);};n.registerOnDisabledChange(e),t._registerOnDestroy(()=>{n._unregisterOnDisabledChange(e);});}}function Fe(n,t){let e=lt(n);t.validator!==null?n.setValidators(Ue(e,t.validator)):typeof e=="function"&&n.setValidators([e]);let i=ut(n);t.asyncValidator!==null?n.setAsyncValidators(Ue(i,t.asyncValidator)):typeof i=="function"&&n.setAsyncValidators([i]);let r=()=>n.updateValueAndValidity();le(t._rawValidators,r),le(t._rawAsyncValidators,r);}function ue(n,t){let e=false;if(n!==null){if(t.validator!==null){let r=lt(n);if(Array.isArray(r)&&r.length>0){let s=r.filter(a=>a!==t.validator);s.length!==r.length&&(e=true,n.setValidators(s));}}if(t.asyncValidator!==null){let r=ut(n);if(Array.isArray(r)&&r.length>0){let s=r.filter(a=>a!==t.asyncValidator);s.length!==r.length&&(e=true,n.setAsyncValidators(s));}}}let i=()=>{};return le(t._rawValidators,i),le(t._rawAsyncValidators,i),e}function Jt(n,t){t.valueAccessor.registerOnChange(e=>{n._pendingValue=e,n._pendingChange=true,n._pendingDirty=true,n.updateOn==="change"&&pt(n,t);});}function Qt(n,t){t.valueAccessor.registerOnTouched(()=>{n._pendingTouched=true,n.updateOn==="blur"&&n._pendingChange&&pt(n,t),n.updateOn!=="submit"&&n.markAsTouched();});}function pt(n,t){n._pendingDirty&&n.markAsDirty(),n.setValue(n._pendingValue,{emitModelToViewChange:false}),t.viewToModelUpdate(n._pendingValue),n._pendingChange=false;}function en(n,t){let e=(i,r)=>{t.valueAccessor.writeValue(i),r&&t.viewToModelUpdate(i);};n.registerOnChange(e),t._registerOnDestroy(()=>{n._unregisterOnChange(e);});}function mt(n,t){Fe(n,t);}function tn(n,t){return ue(n,t)}function we(n,t){if(!n.hasOwnProperty("model"))return false;let e=n.model;return e.isFirstChange()?true:!Object.is(t,e.currentValue)}function nn(n){return Object.getPrototypeOf(n.constructor)===S}function vt(n,t){n._syncPendingControls(),t.forEach(e=>{let i=e.control;i.updateOn==="submit"&&i._pendingChange&&(e.viewToModelUpdate(i._pendingValue),i._pendingChange=false);});}function rn(n,t){if(!t)return null;let e,i,r;return t.forEach(s=>{s.constructor===Ye?e=s:nn(s)?i=s:r=s;}),r||i||e||null}function sn(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1);}var Ne={provide:Yt,useFactory:()=>{let n=g(_,{self:true});return {setParseErrors:t=>{n.setParseErrorSource(t);},set onReset(t){n.onReset=t;}}}},_=class extends ie{_parent=null;name=null;valueAccessor=null;isCustomControlBased=false;userOnReset;resetSubscription;set onReset(t){this.userOnReset=t,this.resetSubscription?.unsubscribe(),this.resetSubscription=void 0,this.control&&(this.resetSubscription=this.control.events.subscribe(e=>{e instanceof N&&this.control&&this.userOnReset?.(this.control.value);}),this.subscription?.add(this.resetSubscription));}isNativeFormElement=false;rawValueAccessors;_selectedValueAccessor=null;get selectedValueAccessor(){return this._selectedValueAccessor??=rn(this,this.rawValueAccessors)}parseErrorsValidator=null;renderer;injector;requiredValidatorViaDi;subscription;customControlBindings=null;constructor(t,e,i){super(),this.injector=t,this.renderer=e,this.rawValueAccessors=i,this.injector?.get(Ce$1)?.onDestroy(()=>{this.removeParseErrorsValidator(this.control),this.subscription?.unsubscribe();});}setupCustomControl(){this.subscription?.unsubscribe();let t=this.injector?.get(bl);if(!this.control||!t)return;let e=t.markForCheck.bind(t);this.subscription=new J$1,this.subscription.add(this.control.valueChanges.subscribe(e)),this.subscription.add(this.control.statusChanges.subscribe(e)),this.resetSubscription?.unsubscribe(),this.resetSubscription=void 0,this.userOnReset&&(this.resetSubscription=this.control.events.subscribe(i=>{i instanceof N&&this.control&&this.userOnReset?.(this.control.value);}),this.subscription.add(this.resetSubscription)),this.parseErrorsValidator&&this.control.addValidators(this.parseErrorsValidator);}ngControlCreate(t){!t.nativeElement.hasAttribute?.("ngNoCva")&&(this.rawValueAccessors&&this.rawValueAccessors.length>0||this.valueAccessor!==null)||!t.customControl||(this.isCustomControlBased=true,t.listenToCustomControlModel(r=>{this.control?.setValue(r,{emitModelToViewChange:false}),this.control?.markAsDirty(),this.viewToModelUpdate(r);}),t.listenToCustomControlOutput("touch",()=>{this.control?.markAsTouched();}),this.customControlBindings={},this.isNativeFormElement=Gt(t.nativeElement),this.requiredValidatorViaDi=this._rawValidators.find(r=>r instanceof gt));}ngControlUpdate(t,e){if(!this.isCustomControlBased)return;let i=this.control,r=this.customControlBindings;Object.is(r.value,i.value)||(r.value=i.value,t.setCustomControlModelInput(i.value)),this.bindControlProperty(t,r,"touched",i.touched),this.bindControlProperty(t,r,"dirty",i.dirty),this.bindControlProperty(t,r,"valid",i.valid),this.bindControlProperty(t,r,"invalid",i.invalid),this.bindControlProperty(t,r,"pending",i.pending),this.bindControlProperty(t,r,"disabled",i.disabled),this.shouldBindRequired&&this.bindControlProperty(t,r,"required",this.isRequired);let s=i.errors;if(r.errors!==s){r.errors=s;let a=this._convertErrors(s);t.setInputOnDirectives("errors",a);}}get isRequired(){return (this.requiredValidatorViaDi?._enabled||this.control?._hasRequired())??false}get shouldBindRequired(){return true}bindControlProperty(t,e,i,r){if(e[i]===r)return;e[i]=r;let s=t.setInputOnDirectives(i,r);this.isNativeFormElement&&!s&&(i==="disabled"||i==="required")&&this.renderer&&Ut(this.renderer,t.nativeElement,i,r);}_convertErrors(t){if(t===null)return [];let e=this.control;return Object.entries(t).map(([i,r])=>new Ce({context:r,kind:i,control:e}))}setParseErrorSource(t){if(t===void 0)return;let e=null,i=TT(()=>{let r=t();return r.length===0?null:r.reduce((s,a)=>(s[a.kind]=a,s),{})});this.parseErrorsValidator=(()=>e).bind(this),Wf(()=>{e=i(),this.control?.updateValueAndValidity({emitEvent:false});},{injector:this.injector});}removeParseErrorsValidator(t){this.parseErrorsValidator&&(t?.removeValidators(this.parseErrorsValidator),t?.updateValueAndValidity({emitEvent:false}));}},de=class{_cd;constructor(t){this._cd=t;}get isTouched(){return this._cd?.control?._touched?.(),!!this._cd?.control?.touched}get isUntouched(){return !!this._cd?.control?.untouched}get isPristine(){return this._cd?.control?._pristine?.(),!!this._cd?.control?.pristine}get isDirty(){return !!this._cd?.control?.dirty}get isValid(){return this._cd?.control?._status?.(),!!this._cd?.control?.valid}get isInvalid(){return !!this._cd?.control?.invalid}get isPending(){return !!this._cd?.control?.pending}get isSubmitted(){return this._cd?._submitted?.(),!!this._cd?.submitted}};var Zn=(()=>{class n extends de{constructor(e){super(e);}static \u0275fac=function(i){return new(i||n)(ge(_,2))};static \u0275dir=Bs({type:n,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(i,r){i&2&&qg("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending);},standalone:false,features:[Cg]})}return n})(),Xn=(()=>{class n extends de{constructor(e){super(e);}static \u0275fac=function(i){return new(i||n)(ge(h,10))};static \u0275dir=Bs({type:n,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["","formArray",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:16,hostBindings:function(i,r){i&2&&qg("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)("ng-submitted",r.isSubmitted);},standalone:false,features:[Cg]})}return n})(),z=class extends ${constructor(t,e,i){super(Me(e),Ee(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:true,emitEvent:!!this.asyncValidator});}controls;registerControl(t,e){let i=this._find(t);return i||(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,i={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange();}removeControl(t,e={}){let i=this._find(t);i&&i._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange();}setControl(t,e,i={}){let r=this._find(t);r&&r._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange();}contains(t){return this._find(t)?.enabled===true}setValue(t,e={}){kn(()=>{ct(this,true,t),Object.keys(t).forEach(i=>{dt(this,true,i),this.controls[i].setValue(t[i],{onlySelf:true,emitEvent:e.emitEvent});}),this.updateValueAndValidity(e);});}patchValue(t,e={}){t!=null&&(Object.keys(t).forEach(i=>{let r=this._find(i);r&&r.patchValue(t[i],{onlySelf:true,emitEvent:e.emitEvent});}),this.updateValueAndValidity(e));}reset(t={},e={}){this._forEachChild((i,r)=>{i.reset(t?t[r]:null,z$1(P({},e),{onlySelf:true}));}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==false&&this._events.next(new N(this));}getRawValue(){return this._reduceChildren({},(t,e,i)=>(t[i]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(false,(e,i)=>i._syncPendingControls()?true:e);return t&&this.updateValueAndValidity({onlySelf:true}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{let i=this.controls[e];i&&t(i,e);});}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange);});}_updateValue(){this.value=this._reduceValue();}_anyControls(t){for(let[e,i]of Object.entries(this.controls))if(this.contains(e)&&t(i))return true;return false}_reduceValue(){let t={};return this._reduceChildren(t,(e,i,r)=>((i.enabled||this.disabled)&&(e[r]=i.value),e))}_reduceChildren(t,e){let i=t;return this._forEachChild((r,s)=>{i=e(i,r,s);}),i}_allControlsDisabled(){for(let t of Object.keys(this.controls))if(this.controls[t].enabled)return false;return Object.keys(this.controls).length>0||this.disabled}_find(t){return ht(this.controls,t)?this.controls[t]:null}};var Yn=z;var on={provide:h,useExisting:_i(()=>an)},L=Promise.resolve(),an=(()=>{class n extends h{callSetDisabledState;get submitted(){return kn(this.submittedReactive)}_submitted=TT(()=>this.submittedReactive());submittedReactive=Wi(false);_directives=new Set;form;ngSubmit=new vt$1;options;constructor(e,i,r){super(),this.callSetDisabledState=r,this.form=new z({},be(e),Ae(i));}ngAfterViewInit(){this._setUpdateStrategy();}get formDirective(){return this}get control(){return this.form}get path(){return []}get controls(){return this.form.controls}addControl(e){L.then(()=>{let i=this._findContainer(e.path);e.control=i.registerControl(e.name,e.control),e._setupWithForm(this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:false}),this._directives.add(e);});}getControl(e){return this.form.get(e.path)}removeControl(e){L.then(()=>{this._findContainer(e.path)?.removeControl(e.name),this._directives.delete(e);});}addFormGroup(e){L.then(()=>{let i=this._findContainer(e.path),r=new z({});mt(r,e),i.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:false});});}removeFormGroup(e){L.then(()=>{this._findContainer(e.path)?.removeControl?.(e.name);});}getFormGroup(e){return this.form.get(e.path)}updateModel(e,i){L.then(()=>{this.form.get(e.path).setValue(i);});}setValue(e){this.control.setValue(e);}onSubmit(e){return this.submittedReactive.set(true),vt(this.form,this._directives),this.ngSubmit.emit(e),this.form._events.next(new se(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm();}resetForm(e=void 0){this.form.reset(e),this.submittedReactive.set(false);}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn);}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}static \u0275fac=function(i){return new(i||n)(ge(y,10),ge(I,10),ge(O,8))};static \u0275dir=Bs({type:n,selectors:[["form",3,"ngNoForm","",3,"formGroup","",3,"formArray",""],["ng-form"],["","ngForm",""]],hostBindings:function(i,r){i&1&&Lg("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()});},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:false,features:[lT([on]),Cg]})}return n})();function We(n,t){let e=n.indexOf(t);e>-1&&n.splice(e,1);}function qe(n){return typeof n=="object"&&n!==null&&Object.keys(n).length===2&&"value"in n&&"disabled"in n}var _t=class extends ${defaultValue=null;_onChange=[];_pendingValue;_pendingChange=false;constructor(t=null,e,i){super(Me(e),Ee(i,e)),this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:true,emitEvent:!!this.asyncValidator}),ce(e)&&(e.nonNullable||e.initialValueIsDefault)&&(qe(t)?this.defaultValue=t.value:this.defaultValue=t);}setValue(t,e={}){kn(()=>{this.value=this._pendingValue=t,this._onChange.length&&e.emitModelToViewChange!==false&&this._onChange.forEach(i=>i(this.value,e.emitViewToModelChange!==false)),this.updateValueAndValidity(e);});}patchValue(t,e={}){this.setValue(t,e);}reset(t=this.defaultValue,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),e.overwriteDefaultValue&&(this.defaultValue=this.value),this._pendingChange=false,e?.emitEvent!==false&&this._events.next(new N(this));}_updateValue(){}_anyControls(t){return false}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t);}_unregisterOnChange(t){We(this._onChange,t);}registerOnDisabledChange(t){this._onDisabledChange.push(t);}_unregisterOnDisabledChange(t){We(this._onDisabledChange,t);}_forEachChild(t){}_syncPendingControls(){return this.updateOn==="submit"&&(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),this._pendingChange)?(this.setValue(this._pendingValue,{onlySelf:true,emitModelToViewChange:false}),true):false}_applyFormState(t){qe(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:true,emitEvent:false}):this.enable({onlySelf:true,emitEvent:false})):this.value=this._pendingValue=t;}};var ln=n=>n instanceof _t,un=(()=>{class n extends h{_parent;ngOnInit(){this._checkParentType(),this.formDirective.addFormGroup(this);}ngOnDestroy(){this.formDirective?.removeFormGroup(this);}get control(){return this.formDirective.getFormGroup(this)}get path(){return fe(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}static \u0275fac=(()=>{let e;return function(r){return (e||(e=Qp(n)))(r||n)}})();static \u0275dir=Bs({type:n,standalone:false,features:[Cg]})}return n})();var dn={provide:_,useExisting:_i(()=>cn)},$e=Promise.resolve(),cn=(()=>{class n extends _{_changeDetectorRef;callSetDisabledState;control=new _t;static ngAcceptInputType_isDisabled;_registered=false;viewModel;name="";isDisabled;model;options;update=new vt$1;constructor(e,i,r,s,a,f,C,j){super(C,j,s),this._changeDetectorRef=a,this.callSetDisabledState=f,this._parent=e,this._setValidators(i),this._setAsyncValidators(r);}ngOnChanges(e){if(this._checkForErrors(),!this._registered||"name"in e){if(this._registered&&(this._checkName(),this.formDirective)){let i=e.name.previousValue;this.formDirective.removeControl({name:i,path:this._getPath(i)});}this._setUpControl();}"isDisabled"in e&&this._updateDisabled(e),we(e,this.viewModel)&&(this._updateValue(this.model),this.viewModel=this.model);}ngOnDestroy(){this.formDirective?.removeControl(this);}\u0275ngControlCreate(e){super.ngControlCreate(e);}\u0275ngControlUpdate(e){super.ngControlUpdate(e,false);}get shouldBindRequired(){return false}get path(){return this._getPath(this.name)}get formDirective(){return this._parent?this._parent.formDirective:null}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e);}_setUpControl(){this._setUpdateStrategy(),this._isStandalone()?this._setUpStandalone():this.formDirective.addControl(this),this._registered=true;}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.control._updateOn=this.options.updateOn);}_isStandalone(){return !this._parent||!!(this.options&&this.options.standalone)}_setUpStandalone(){this.isCustomControlBased?this.setupCustomControl():(this.valueAccessor??=this.selectedValueAccessor,oe(this.control,this,this.callSetDisabledState)),this.control.updateValueAndValidity({emitEvent:false});}_setupWithForm(e){this.isCustomControlBased?this.setupCustomControl():(this.valueAccessor??=this.selectedValueAccessor,oe(this.control,this,e));}_checkForErrors(){this._checkName();}_checkName(){this.options&&this.options.name&&(this.name=this.options.name),!this._isStandalone()&&this.name;}_updateValue(e){$e.then(()=>{this.control.setValue(e,{emitViewToModelChange:false}),this._changeDetectorRef?.markForCheck();});}_updateDisabled(e){let i=e.isDisabled.currentValue,r=i!==0&&rb(i);$e.then(()=>{r&&!this.control.disabled?this.control.disable():!r&&this.control.disabled&&this.control.enable(),this._changeDetectorRef?.markForCheck();});}_getPath(e){return this._parent?fe(e,this._parent):[e]}static \u0275fac=function(i){return new(i||n)(ge(h,9),ge(y,10),ge(I,10),ge(D,10),ge(bl,8),ge(O,8),ge(pe,8),ge(Ps,8))};static \u0275dir=Bs({type:n,selectors:[["","ngModel","",3,"formControlName","",3,"formControl",""]],inputs:{name:"name",isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"],options:[0,"ngModelOptions","options"]},outputs:{update:"ngModelChange"},exportAs:["ngModel"],standalone:false,features:[lT([dn,Ne]),Cg,bu,zw(null)]})}return n})();var Jn=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275dir=Bs({type:n,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""],standalone:false})}return n})(),hn={provide:D,useExisting:_i(()=>fn),multi:true},fn=(()=>{class n extends S{writeValue(e){let i=e??"";this.setProperty("value",i);}registerOnChange(e){this.onChange=i=>{e(i==""?null:parseFloat(i));};}static \u0275fac=(()=>{let e;return function(r){return (e||(e=Qp(n)))(r||n)}})();static \u0275dir=Bs({type:n,selectors:[["input","type","number","formControlName","",3,"ngNoCva",""],["input","type","number","formControl","",3,"ngNoCva",""],["input","type","number","ngModel","",3,"ngNoCva",""]],hostBindings:function(i,r){i&1&&Lg("input",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()});},standalone:false,features:[lT([hn]),Cg]})}return n})(),gn={provide:D,useExisting:_i(()=>mn),multi:true};var pn=(()=>{class n{_accessors=[];add(e,i){this._accessors.push([e,i]);}remove(e){for(let i=this._accessors.length-1;i>=0;--i)if(this._accessors[i][1]===e){this._accessors.splice(i,1);return}}select(e){this._accessors.forEach(i=>{this._isSameGroup(i,e)&&i[1]!==e&&i[1].fireUncheck(e.value);});}_isSameGroup(e,i){return e[0].control?e[0]._parent===i._control._parent&&e[1].name===i.name:false}static \u0275fac=function(i){return new(i||n)};static \u0275prov=Te({token:n,factory:n.\u0275fac})}return n})(),mn=(()=>{class n extends S{_registry;_injector;_state;_control;_fn;setDisabledStateFired=false;onChange=()=>{};name;formControlName;value;callSetDisabledState=g(O,{optional:true})??Z$1;constructor(e,i,r,s){super(e,i),this._registry=r,this._injector=s;}ngOnInit(){this._control=this._injector.get(_),this._checkName(),this._registry.add(this._control,this);}ngOnDestroy(){this._registry.remove(this);}writeValue(e){this._state=e===this.value,this.setProperty("checked",this._state);}registerOnChange(e){this._fn=e,this.onChange=()=>{e(this.value),this._registry.select(this);};}setDisabledState(e){(this.setDisabledStateFired||e||this.callSetDisabledState==="whenDisabledForLegacyCode")&&this.setProperty("disabled",e),this.setDisabledStateFired=true;}fireUncheck(e){this.writeValue(e);}_checkName(){this.name&&this.formControlName&&(this.name,this.formControlName),!this.name&&this.formControlName&&(this.name=this.formControlName);}static \u0275fac=function(i){return new(i||n)(ge(Ps),ge(Xt$1),ge(pn),ge(pe))};static \u0275dir=Bs({type:n,selectors:[["input","type","radio","formControlName","",3,"ngNoCva",""],["input","type","radio","formControl","",3,"ngNoCva",""],["input","type","radio","ngModel","",3,"ngNoCva",""]],hostBindings:function(i,r){i&1&&Lg("change",function(){return r.onChange()})("blur",function(){return r.onTouched()});},inputs:{name:"name",formControlName:"formControlName",value:"value"},standalone:false,features:[lT([gn]),Cg]})}return n})(),vn={provide:D,useExisting:_i(()=>_n),multi:true},_n=(()=>{class n extends S{writeValue(e){this.setProperty("value",parseFloat(e));}registerOnChange(e){this.onChange=i=>{e(i==""?null:parseFloat(i));};}static \u0275fac=(()=>{let e;return function(r){return (e||(e=Qp(n)))(r||n)}})();static \u0275dir=Bs({type:n,selectors:[["input","type","range","formControlName","",3,"ngNoCva",""],["input","type","range","formControl","",3,"ngNoCva",""],["input","type","range","ngModel","",3,"ngNoCva",""]],hostBindings:function(i,r){i&1&&Lg("change",function(a){return r.onChange(a.target.value)})("input",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()});},standalone:false,features:[lT([vn]),Cg]})}return n})(),ze=class extends ${constructor(t,e,i){super(Me(e),Ee(i,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:true,emitEvent:!!this.asyncValidator});}controls;at(t){return this.controls[this._adjustIndex(t)]}push(t,e={}){Array.isArray(t)?t.forEach(i=>{this.controls.push(i),this._registerControl(i);}):(this.controls.push(t),this._registerControl(t)),this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange();}insert(t,e,i={}){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity({emitEvent:i.emitEvent});}removeAt(t,e={}){let i=this._adjustIndex(t);i<0&&(i=0),this.controls[i]&&this.controls[i]._registerOnCollectionChange(()=>{}),this.controls.splice(i,1),this.updateValueAndValidity({emitEvent:e.emitEvent});}setControl(t,e,i={}){let r=this._adjustIndex(t);r<0&&(r=0),this.controls[r]&&this.controls[r]._registerOnCollectionChange(()=>{}),this.controls.splice(r,1),e&&(this.controls.splice(r,0,e),this._registerControl(e)),this.updateValueAndValidity({emitEvent:i.emitEvent}),this._onCollectionChange();}get length(){return this.controls.length}setValue(t,e={}){kn(()=>{ct(this,false,t),t.forEach((i,r)=>{dt(this,false,r),this.at(r).setValue(i,{onlySelf:true,emitEvent:e.emitEvent});}),this.updateValueAndValidity(e);});}patchValue(t,e={}){t!=null&&(t.forEach((i,r)=>{this.at(r)&&this.at(r).patchValue(i,{onlySelf:true,emitEvent:e.emitEvent});}),this.updateValueAndValidity(e));}reset(t=[],e={}){this._forEachChild((i,r)=>{i.reset(t[r],z$1(P({},e),{onlySelf:true}));}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e),e?.emitEvent!==false&&this._events.next(new N(this));}getRawValue(){return this.controls.map(t=>t.getRawValue())}clear(t={}){this.controls.length<1||(this._forEachChild(e=>e._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity({emitEvent:t.emitEvent}));}_adjustIndex(t){return t<0?t+this.length:t}_syncPendingControls(){let t=this.controls.reduce((e,i)=>i._syncPendingControls()?true:e,false);return t&&this.updateValueAndValidity({onlySelf:true}),t}_forEachChild(t){this.controls.forEach((e,i)=>{t(e,i);});}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value);}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t));}_allControlsDisabled(){for(let t of this.controls)if(t.enabled)return false;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange);}_find(t){return this.at(t)??null}};var yt$1=(()=>{class n extends h{callSetDisabledState;get submitted(){return kn(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e);}_submitted=TT(()=>this._submittedReactive());_submittedReactive=Wi(false);_oldForm;_onCollectionChange=()=>this._updateDomValue();directives=[];constructor(e,i,r){super(),this.callSetDisabledState=r,this._setValidators(e),this._setAsyncValidators(i);}ngOnChanges(e){this.onChanges(e);}ngOnDestroy(){this.onDestroy();}onChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form);}onDestroy(){this.form&&(ue(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}));}get formDirective(){return this}get path(){return []}addControl(e){let i=this.form.get(e.path);return e._setupWithForm(i,this.callSetDisabledState),i.updateValueAndValidity({emitEvent:false}),this.directives.push(e),i}getControl(e){return this.form.get(e.path)}removeControl(e){ae(e.control||null,e,false),sn(this.directives,e);}addFormGroup(e){this._setUpFormContainer(e);}removeFormGroup(e){this._cleanUpFormContainer(e);}getFormGroup(e){return this.form.get(e.path)}getFormArray(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e);}removeFormArray(e){this._cleanUpFormContainer(e);}updateModel(e,i){this.form.get(e.path).setValue(i);}onReset(){this.resetForm();}resetForm(e=void 0,i={}){this.form.reset(e,i),this._submittedReactive.set(false);}onSubmit(e){return this.submitted=true,vt(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new se(this.control)),e?.target?.method==="dialog"}_updateDomValue(){this.directives.forEach(e=>{let i=e.control,r=this.form.get(e.path);i!==r&&(ae(i||null,e),ln(r)&&e._setupWithForm(r,this.callSetDisabledState));}),this.form._updateTreeValidity({emitEvent:false});}_setUpFormContainer(e){let i=this.form.get(e.path);mt(i,e),i.updateValueAndValidity({emitEvent:false});}_cleanUpFormContainer(e){let i=this.form?.get(e.path);i&&tn(i,e)&&i.updateValueAndValidity({emitEvent:false});}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm?._registerOnCollectionChange(()=>{});}_updateValidators(){Fe(this.form,this),this._oldForm&&ue(this._oldForm,this);}_checkFormPresent(){this.form;}static \u0275fac=function(i){return new(i||n)(ge(y,10),ge(I,10),ge(O,8))};static \u0275dir=Bs({type:n,features:[Cg,bu]})}return n})();var Se=new C$1(""),yn={provide:_,useExisting:_i(()=>Cn)},Cn=(()=>{class n extends _{_ngModelWarningConfig;callSetDisabledState;viewModel;form;set isDisabled(e){}model;update=new vt$1;static _ngModelWarningSentOnce=false;_ngModelWarningSent=false;constructor(e,i,r,s,a,f,C){super(C,f,r),this._ngModelWarningConfig=s,this.callSetDisabledState=a,this._setValidators(e),this._setAsyncValidators(i);}ngOnChanges(e){if(this._isControlChanged(e)){let i=e.form.previousValue;i&&(ae(i,this,false),this.removeParseErrorsValidator(i)),this.isCustomControlBased?this.setupCustomControl():(this.valueAccessor??=this.selectedValueAccessor,oe(this.form,this,this.callSetDisabledState)),this.form.updateValueAndValidity({emitEvent:false});}we(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model);}ngOnDestroy(){this.form&&ae(this.form,this,false);}get path(){return []}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e);}_isControlChanged(e){return e.hasOwnProperty("form")}\u0275ngControlCreate(e){super.ngControlCreate(e);}\u0275ngControlUpdate(e){super.ngControlUpdate(e,true);}static \u0275fac=function(i){return new(i||n)(ge(y,10),ge(I,10),ge(D,10),ge(Se,8),ge(O,8),ge(Ps,8),ge(pe,8))};static \u0275dir=Bs({type:n,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],standalone:false,features:[lT([yn,Ne]),Cg,bu,zw(null)]})}return n})(),Vn={provide:h,useExisting:_i(()=>Ct)},Ct=(()=>{class n extends un{name=null;constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r);}_checkParentType(){Dt(this._parent);}static \u0275fac=function(i){return new(i||n)(ge(h,13),ge(y,10),ge(I,10))};static \u0275dir=Bs({type:n,selectors:[["","formGroupName",""]],inputs:{name:[0,"formGroupName","name"]},standalone:false,features:[lT([Vn]),Cg]})}return n})(),Dn={provide:h,useExisting:_i(()=>Vt)},Vt=(()=>{class n extends h{_parent;name=null;constructor(e,i,r){super(),this._parent=e,this._setValidators(i),this._setAsyncValidators(r);}ngOnInit(){Dt(this._parent),this.formDirective.addFormArray(this);}ngOnDestroy(){this.formDirective?.removeFormArray(this);}get control(){return this.formDirective.getFormArray(this)}get formDirective(){return this._parent?this._parent.formDirective:null}get path(){return fe(this.name==null?this.name:this.name.toString(),this._parent)}static \u0275fac=function(i){return new(i||n)(ge(h,13),ge(y,10),ge(I,10))};static \u0275dir=Bs({type:n,selectors:[["","formArrayName",""]],inputs:{name:[0,"formArrayName","name"]},standalone:false,features:[lT([Dn]),Cg]})}return n})();function Dt(n){return !(n instanceof Ct)&&!(n instanceof yt$1)&&!(n instanceof Vt)}var bn={provide:_,useExisting:_i(()=>An)},An=(()=>{class n extends _{_ngModelWarningConfig;_added=false;viewModel;control;name=null;set isDisabled(e){}model;update=new vt$1;static _ngModelWarningSentOnce=false;_ngModelWarningSent=false;constructor(e,i,r,s,a,f,C){super(C,f,s),this._ngModelWarningConfig=a,this._parent=e,this._setValidators(i),this._setAsyncValidators(r);}_setupWithForm(e,i){this.control=e,this.isCustomControlBased?this.setupCustomControl():(this.valueAccessor??=this.selectedValueAccessor,oe(e,this,i));}ngOnChanges(e){this._added||this._setUpControl(),we(e,this.viewModel)&&(this.viewModel=this.model,this.formDirective.updateModel(this,this.model));}ngOnDestroy(){this.formDirective?.removeControl(this);}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e);}get path(){return fe(this.name==null?this.name:this.name.toString(),this._parent)}get formDirective(){return this._parent?this._parent.formDirective:null}_setUpControl(){this.control=this.formDirective.addControl(this),this._added=true;}\u0275ngControlCreate(e){super.ngControlCreate(e);}\u0275ngControlUpdate(e){this.isCustomControlBased&&(this._added||this._setUpControl(),super.ngControlUpdate(e,true));}static \u0275fac=function(i){return new(i||n)(ge(h,13),ge(y,10),ge(I,10),ge(D,10),ge(Se,8),ge(Ps,8),ge(pe,8))};static \u0275dir=Bs({type:n,selectors:[["","formControlName",""]],inputs:{name:[0,"formControlName","name"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},standalone:false,features:[lT([bn,Ne]),Cg,bu,zw(null)]})}return n})();var Mn={provide:h,useExisting:_i(()=>En)},En=(()=>{class n extends yt$1{form=null;ngSubmit=new vt$1;get control(){return this.form}static \u0275fac=(()=>{let e;return function(r){return (e||(e=Qp(n)))(r||n)}})();static \u0275dir=Bs({type:n,selectors:[["","formGroup",""]],hostBindings:function(i,r){i&1&&Lg("submit",function(a){return r.onSubmit(a)})("reset",function(){return r.onReset()});},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],standalone:false,features:[lT([Mn]),Cg]})}return n})(),Fn={provide:D,useExisting:_i(()=>At),multi:true};function bt(n,t){return n==null?`${t}`:(t&&typeof t=="object"&&(t="Object"),`${n}: ${t}`.slice(0,50))}function wn(n){return n.split(":")[0]}var At=(()=>{class n extends S{value;_optionMap=new Map;_idCounter=0;set compareWith(e){this._compareWith=e;}_compareWith=Object.is;appRefInjector=g(yr).injector;destroyRef=g(Ce$1);cdr=g(bl);_queuedWrite=false;_writeValueAfterRender(){this._queuedWrite||this.appRefInjector.destroyed||(this._queuedWrite=true,PE({write:()=>{this.destroyRef.destroyed||(this._queuedWrite=false,this.writeValue(this.value));}},{injector:this.appRefInjector}));}writeValue(e){this.cdr.markForCheck(),this.value=e;let i=this._getOptionId(e),r=bt(i,e);this.setProperty("value",r);}registerOnChange(e){this.onChange=i=>{this.value=this._getOptionValue(i),e(this.value);};}_registerOption(){return (this._idCounter++).toString()}_getOptionId(e){for(let i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i),e))return i;return null}_getOptionValue(e){let i=wn(e);return this._optionMap.has(i)?this._optionMap.get(i):e}static \u0275fac=(()=>{let e;return function(r){return (e||(e=Qp(n)))(r||n)}})();static \u0275dir=Bs({type:n,selectors:[["select","formControlName","",3,"multiple","",3,"ngNoCva",""],["select","formControl","",3,"multiple","",3,"ngNoCva",""],["select","ngModel","",3,"multiple","",3,"ngNoCva",""]],hostBindings:function(i,r){i&1&&Lg("change",function(a){return r.onChange(a.target.value)})("blur",function(){return r.onTouched()});},inputs:{compareWith:"compareWith"},standalone:false,features:[lT([Fn]),Cg]})}return n})(),Qn=(()=>{class n{_element;_renderer;_select;id;constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption());}set ngValue(e){this._select!=null&&(this._select._optionMap.set(this.id,e),this._setElementValue(bt(this.id,e)),this._select._writeValueAfterRender());}set value(e){this._setElementValue(e),this._select?._writeValueAfterRender();}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e);}ngOnDestroy(){this._select?._optionMap.delete(this.id),this._select?._writeValueAfterRender();}static \u0275fac=function(i){return new(i||n)(ge(Xt$1),ge(Ps),ge(At,9))};static \u0275dir=Bs({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:false})}return n})(),Nn={provide:D,useExisting:_i(()=>Mt),multi:true};function Ze(n,t){return n==null?`${t}`:(typeof t=="string"&&(t=`'${t}'`),t&&typeof t=="object"&&(t="Object"),`${n}: ${t}`.slice(0,50))}function Sn(n){return n.split(":")[0]}var Mt=(()=>{class n extends S{value;_optionMap=new Map;_idCounter=0;set compareWith(e){this._compareWith=e;}_compareWith=Object.is;writeValue(e){this.value=e;let i;if(Array.isArray(e)){let r=e.map(s=>this._getOptionId(s));i=(s,a)=>{s._setSelected(r.indexOf(a)>-1);};}else i=r=>{r._setSelected(false);};this._optionMap.forEach(i);}registerOnChange(e){this.onChange=i=>{let r=[],s=i.selectedOptions;if(s!==void 0){let a=s;for(let f=0;f<a.length;f++){let C=a[f],j=this._getOptionValue(C.value);r.push(j);}}else {let a=i.options;for(let f=0;f<a.length;f++){let C=a[f];if(C.selected){let j=this._getOptionValue(C.value);r.push(j);}}}this.value=r,e(r);};}_registerOption(e){let i=(this._idCounter++).toString();return this._optionMap.set(i,e),i}_getOptionId(e){for(let i of this._optionMap.keys())if(this._compareWith(this._optionMap.get(i)._value,e))return i;return null}_getOptionValue(e){let i=Sn(e);return this._optionMap.has(i)?this._optionMap.get(i)._value:e}static \u0275fac=(()=>{let e;return function(r){return (e||(e=Qp(n)))(r||n)}})();static \u0275dir=Bs({type:n,selectors:[["select","multiple","","formControlName","",3,"ngNoCva",""],["select","multiple","","formControl","",3,"ngNoCva",""],["select","multiple","","ngModel","",3,"ngNoCva",""]],hostBindings:function(i,r){i&1&&Lg("change",function(a){return r.onChange(a.target)})("blur",function(){return r.onTouched()});},inputs:{compareWith:"compareWith"},standalone:false,features:[lT([Nn]),Cg]})}return n})(),ei=(()=>{class n{_element;_renderer;_select;id;_value;constructor(e,i,r){this._element=e,this._renderer=i,this._select=r,this._select&&(this.id=this._select._registerOption(this));}set ngValue(e){this._select!=null&&(this._value=e,this._setElementValue(Ze(this.id,e)),this._select.writeValue(this._select.value));}set value(e){this._select?(this._value=e,this._setElementValue(Ze(this.id,e)),this._select.writeValue(this._select.value)):this._setElementValue(e);}_setElementValue(e){this._renderer.setProperty(this._element.nativeElement,"value",e);}_setSelected(e){this._renderer.setProperty(this._element.nativeElement,"selected",e);}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value));}static \u0275fac=function(i){return new(i||n)(ge(Xt$1),ge(Ps),ge(Mt,9))};static \u0275dir=Bs({type:n,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"},standalone:false})}return n})();var Et=(()=>{class n{static \u0275fac=function(i){return new(i||n)};static \u0275mod=wo({type:n});static \u0275inj=Zn$1({})}return n})();var ti=(()=>{class n{static withConfig(e){return {ngModule:n,providers:[{provide:O,useValue:e.callSetDisabledState??Z$1}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=wo({type:n});static \u0275inj=Zn$1({imports:[Et]})}return n})(),ni=(()=>{class n{static withConfig(e){return {ngModule:n,providers:[{provide:Se,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:O,useValue:e.callSetDisabledState??Z$1}]}}static \u0275fac=function(i){return new(i||n)};static \u0275mod=wo({type:n});static \u0275inj=Zn$1({imports:[Et]})}return n})();function V(i){return Error(`Unable to find icon with the name "${i}"`)}function X(){return Error("Could not find HttpClient for use with Angular Material icons. Please add provideHttpClient() to your providers.")}function q(i){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${i}".`)}function Y(i){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${i}".`)}var a=class{url;svgText;options;svgElement=null;constructor(l,t,e){this.url=l,this.svgText=t,this.options=e;}},K=(()=>{class i{_httpClient;_sanitizer;_errorHandler;_document;_svgIconConfigs=new Map;_iconSetConfigs=new Map;_cachedIconsByUrl=new Map;_inProgressUrlFetches=new Map;_fontCssClassesByAlias=new Map;_resolvers=[];_defaultFontSetClass=["material-icons","mat-ligature-font"];constructor(t,e,n,o){this._httpClient=t,this._sanitizer=e,this._errorHandler=o,this._document=n;}addSvgIcon(t,e,n){return this.addSvgIconInNamespace("",t,e,n)}addSvgIconLiteral(t,e,n){return this.addSvgIconLiteralInNamespace("",t,e,n)}addSvgIconInNamespace(t,e,n,o){return this._addSvgIconConfig(t,e,new a(n,null,o))}addSvgIconResolver(t){return this._resolvers.push(t),this}addSvgIconLiteralInNamespace(t,e,n,o){let r=this._sanitizer.sanitize(ke.HTML,n);if(!r)throw Y(n);let s=vn$1(r);return this._addSvgIconConfig(t,e,new a("",s,o))}addSvgIconSet(t,e){return this.addSvgIconSetInNamespace("",t,e)}addSvgIconSetLiteral(t,e){return this.addSvgIconSetLiteralInNamespace("",t,e)}addSvgIconSetInNamespace(t,e,n){return this._addSvgIconSetConfig(t,new a(e,null,n))}addSvgIconSetLiteralInNamespace(t,e,n){let o=this._sanitizer.sanitize(ke.HTML,e);if(!o)throw Y(e);let r=vn$1(o);return this._addSvgIconSetConfig(t,new a("",r,n))}registerFontClassAlias(t,e=t){return this._fontCssClassesByAlias.set(t,e),this}classNameForFontAlias(t){return this._fontCssClassesByAlias.get(t)||t}setDefaultFontSetClass(...t){return this._defaultFontSetClass=t,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(t){let e=this._sanitizer.sanitize(ke.RESOURCE_URL,t);if(!e)throw q(t);let n=this._cachedIconsByUrl.get(e);return n?br(C(n)):this._loadSvgIconFromConfig(new a(t,null)).pipe(jd(o=>this._cachedIconsByUrl.set(e,o)),re$1(o=>C(o)))}getNamedSvgIcon(t,e=""){let n=J(e,t),o=this._svgIconConfigs.get(n);if(o)return this._getSvgFromConfig(o);if(o=this._getIconConfigFromResolvers(e,t),o)return this._svgIconConfigs.set(n,o),this._getSvgFromConfig(o);let r=this._iconSetConfigs.get(e);return r?this._getSvgFromIconSetConfigs(t,r):qy(V(n))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear();}_getSvgFromConfig(t){return t.svgText?br(C(this._svgElementFromConfig(t))):this._loadSvgIconFromConfig(t).pipe(re$1(e=>C(e)))}_getSvgFromIconSetConfigs(t,e){let n=this._extractIconWithNameFromAnySet(t,e);if(n)return br(n);let o=e.filter(r=>!r.svgText).map(r=>this._loadSvgIconSetFromConfig(r).pipe(va(s=>{let f=`Loading icon set URL: ${this._sanitizer.sanitize(ke.RESOURCE_URL,r.url)} failed: ${s.message}`;return this._errorHandler.handleError(new Error(f)),br(null)})));return Wy(o).pipe(re$1(()=>{let r=this._extractIconWithNameFromAnySet(t,e);if(!r)throw V(t);return r}))}_extractIconWithNameFromAnySet(t,e){for(let n=e.length-1;n>=0;n--){let o=e[n];if(o.svgText&&o.svgText.toString().indexOf(t)>-1){let r=this._svgElementFromConfig(o),s=this._extractSvgIconFromSet(r,t,o.options);if(s)return s}}return null}_loadSvgIconFromConfig(t){return this._fetchIcon(t).pipe(jd(e=>t.svgText=e),re$1(()=>this._svgElementFromConfig(t)))}_loadSvgIconSetFromConfig(t){return t.svgText?br(null):this._fetchIcon(t).pipe(jd(e=>t.svgText=e))}_extractSvgIconFromSet(t,e,n){let o=t.querySelector(`[id="${e}"]`);if(!o)return null;let r=o.cloneNode(true);if(r.removeAttribute("id"),r.nodeName.toLowerCase()==="svg")return this._setSvgAttributes(r,n);if(r.nodeName.toLowerCase()==="symbol")return this._setSvgAttributes(this._toSvgElement(r),n);let s=this._svgElementFromString(vn$1("<svg></svg>"));return s.appendChild(r),this._setSvgAttributes(s,n)}_svgElementFromString(t){let e=this._document.createElement("DIV");e.innerHTML=t;let n=e.querySelector("svg");if(!n)throw Error("<svg> tag not found");return n}_toSvgElement(t){let e=this._svgElementFromString(vn$1("<svg></svg>")),n=t.attributes;for(let o=0;o<n.length;o++){let{name:r,value:s}=n[o];r!=="id"&&e.setAttribute(r,s);}for(let o=0;o<t.childNodes.length;o++)t.childNodes[o].nodeType===this._document.ELEMENT_NODE&&e.appendChild(t.childNodes[o].cloneNode(true));return e}_setSvgAttributes(t,e){return t.setAttribute("fit",""),t.setAttribute("height","100%"),t.setAttribute("width","100%"),t.setAttribute("preserveAspectRatio","xMidYMid meet"),t.setAttribute("focusable","false"),e&&e.viewBox&&t.setAttribute("viewBox",e.viewBox),t}_fetchIcon(t){let{url:e,options:n}=t,o=n?.withCredentials??false;if(!this._httpClient)throw X();if(e==null)throw Error(`Cannot fetch icon from URL "${e}".`);let r=this._sanitizer.sanitize(ke.RESOURCE_URL,e);if(!r)throw q(e);let s=this._inProgressUrlFetches.get(r);if(s)return s;let h=this._httpClient.get(r,{responseType:"text",withCredentials:o}).pipe(re$1(f=>vn$1(f)),hi(()=>this._inProgressUrlFetches.delete(r)),Ta());return this._inProgressUrlFetches.set(r,h),h}_addSvgIconConfig(t,e,n){return this._svgIconConfigs.set(J(t,e),n),this}_addSvgIconSetConfig(t,e){let n=this._iconSetConfigs.get(t);return n?n.push(e):this._iconSetConfigs.set(t,[e]),this}_svgElementFromConfig(t){if(!t.svgElement){let e=this._svgElementFromString(t.svgText);this._setSvgAttributes(e,t.options),t.svgElement=e;}return t.svgElement}_getIconConfigFromResolvers(t,e){for(let n=0;n<this._resolvers.length;n++){let o=this._resolvers[n](e,t);if(o)return Z(o)?new a(o.url,null,o.options):new a(o,null)}}static \u0275fac=function(e){return new(e||i)(b(vy,8),b(RS),b(U$1,8),b(_e$1))};static \u0275prov=x({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function C(i){return i.cloneNode(true)}function J(i,l){return i+":"+l}function Z(i){return !!(i.url&&i.options)}var tt=["*"],et=new C$1("MAT_ICON_DEFAULT_OPTIONS"),nt=new C$1("mat-icon-location",{providedIn:"root",factory:()=>{let i=g(U$1),l=i?i.location:null;return {getPathname:()=>l?l.pathname+l.search:""}}}),G=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],ot=G.map(i=>`[${i}]`).join(", "),rt=/^url\(['"]?#(.*?)['"]?\)$/,wt=(()=>{class i{_elementRef=g(Xt$1);_iconRegistry=g(K);_location=g(nt);_errorHandler=g(_e$1);_defaultColor;get color(){return this._color||this._defaultColor}set color(t){this._color=t;}_color;inline=false;get svgIcon(){return this._svgIcon}set svgIcon(t){t!==this._svgIcon&&(t?this._updateSvgIcon(t):this._svgIcon&&this._clearSvgElement(),this._svgIcon=t);}_svgIcon;get fontSet(){return this._fontSet}set fontSet(t){let e=this._cleanupFontValue(t);e!==this._fontSet&&(this._fontSet=e,this._updateFontIconClasses());}_fontSet;get fontIcon(){return this._fontIcon}set fontIcon(t){let e=this._cleanupFontValue(t);e!==this._fontIcon&&(this._fontIcon=e,this._updateFontIconClasses());}_fontIcon;_previousFontSetClass=[];_previousFontIconClass;_svgName=null;_svgNamespace=null;_previousPath;_elementsWithExternalReferences;_currentIconFetch=J$1.EMPTY;constructor(){let t=g(new hm("aria-hidden"),{optional:true}),e=g(et,{optional:true});e&&(e.color&&(this.color=this._defaultColor=e.color),e.fontSet&&(this.fontSet=e.fontSet)),t||this._elementRef.nativeElement.setAttribute("aria-hidden","true");}_splitIconName(t){if(!t)return ["",""];let e=t.split(":");switch(e.length){case 1:return ["",e[0]];case 2:return e;default:throw Error(`Invalid icon name: "${t}"`)}}ngOnInit(){this._updateFontIconClasses();}ngAfterViewChecked(){let t=this._elementsWithExternalReferences;if(t&&t.size){let e=this._location.getPathname();e!==this._previousPath&&(this._previousPath=e,this._prependPathToReferences(e));}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();}_usingFontIcon(){return !this.svgIcon}_setSvgElement(t){this._clearSvgElement();let e=this._location.getPathname();this._previousPath=e,this._cacheChildrenWithExternalReferences(t),this._prependPathToReferences(e),this._elementRef.nativeElement.appendChild(t);}_clearSvgElement(){let t=this._elementRef.nativeElement,e=t.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();e--;){let n=t.childNodes[e];(n.nodeType!==1||n.nodeName.toLowerCase()==="svg")&&n.remove();}}_updateFontIconClasses(){if(!this._usingFontIcon())return;let t=this._elementRef.nativeElement,e=(this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/):this._iconRegistry.getDefaultFontSetClass()).filter(n=>n.length>0);this._previousFontSetClass.forEach(n=>t.classList.remove(n)),e.forEach(n=>t.classList.add(n)),this._previousFontSetClass=e,this.fontIcon!==this._previousFontIconClass&&!e.includes("mat-ligature-font")&&(this._previousFontIconClass&&t.classList.remove(this._previousFontIconClass),this.fontIcon&&t.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon);}_cleanupFontValue(t){return typeof t=="string"?t.trim().split(" ")[0]:t}_prependPathToReferences(t){let e=this._elementsWithExternalReferences;e&&e.forEach((n,o)=>{n.forEach(r=>{o.setAttribute(r.name,`url('${t}#${r.value}')`);});});}_cacheChildrenWithExternalReferences(t){let e=t.querySelectorAll(ot),n=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let o=0;o<e.length;o++)G.forEach(r=>{let s=e[o],h=s.getAttribute(r),f=h?h.match(rt):null;if(f){let p=n.get(s);p||(p=[],n.set(s,p)),p.push({name:r,value:f[1]});}});}_updateSvgIcon(t){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),t){let[e,n]=this._splitIconName(t);e&&(this._svgNamespace=e),n&&(this._svgName=n),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(n,e).pipe(an$1(1)).subscribe(o=>this._setSvgElement(o),o=>{let r=`Error retrieving icon ${e}:${n}! ${o.message}`;this._errorHandler.handleError(new Error(r));});}}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=jw({type:i,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:10,hostBindings:function(e,n){e&2&&(Ng("data-mat-icon-type",n._usingFontIcon()?"font":"svg")("data-mat-icon-name",n._svgName||n.fontIcon)("data-mat-icon-namespace",n._svgNamespace||n.fontSet)("fontIcon",n._usingFontIcon()?n.fontIcon:null),UC(n.color?"mat-"+n.color:""),qg("mat-icon-inline",n.inline)("mat-icon-no-color",n.color!=="primary"&&n.color!=="accent"&&n.color!=="warn"));},inputs:{color:"color",inline:[2,"inline","inline",rb],svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],ngContentSelectors:tt,decls:1,vars:0,template:function(e,n){e&1&&(bC(),SC(0));},styles:[`mat-icon, mat-icon.mat-primary, mat-icon.mat-accent, mat-icon.mat-warn {
2
- color: var(--mat-icon-color, inherit);
3
- }
4
-
5
- .mat-icon {
6
- -webkit-user-select: none;
7
- user-select: none;
8
- background-repeat: no-repeat;
9
- display: inline-block;
10
- fill: currentColor;
11
- height: 24px;
12
- width: 24px;
13
- overflow: hidden;
14
- }
15
- .mat-icon.mat-icon-inline {
16
- font-size: inherit;
17
- height: inherit;
18
- line-height: inherit;
19
- width: inherit;
20
- }
21
- .mat-icon.mat-ligature-font[fontIcon]::before {
22
- content: attr(fontIcon);
23
- }
24
-
25
- [dir=rtl] .mat-icon-rtl-mirror {
26
- transform: scale(-1, 1);
27
- }
28
-
29
- .mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,
30
- .mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon {
31
- display: block;
32
- }
33
- .mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,
34
- .mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon {
35
- margin: auto;
36
- }
37
- `],encapsulation:2})}return i})(),yt=(()=>{class i{static \u0275fac=function(e){return new(e||i)};static \u0275mod=wo({type:i});static \u0275inj=Zn$1({imports:[wt$2]})}return i})();export{$t as $,At as A,Cn as C,D,En as E,Jn as J,Qn as Q,Vt as V,Wt as W,Xt as X,Ye as Y,Zn as Z,_,wt$1 as a,_e as b,cn as c,an as d,ei as e,fn as f,gt as g,_n as h,y as i,Yn as j,_t as k,Xn as l,mn as m,ni as n,z as o,An as p,Ct as q,ti as t,wt as w,yt as y,ze as z};
@@ -1 +0,0 @@
1
- import {bS as Da,a7 as va,X as br,cE as Pd}from'./main-JTU33H5D.js';function i(t,o,p){return t.pipe(Da(()=>o().pipe(va(()=>br(p)))),Pd({bufferSize:1,refCount:true}))}export{i};
@@ -1 +0,0 @@
1
- import {v}from'./chunk-D4_R7aqN.js';import {R}from'./chunk-BYg1TwUC.js';import {N as N$1}from'./chunk-nSYjfmpf.js';import {g,ao as V,G,C as Ce,d8 as N$2,F,X as br,W as Wi,T as TT,cd as Wf,b as U,j as jw,k as Cs,n as Lg,J as JC,m as hl,o as aC,u as sI,a8 as em,v as cC,a9 as vC,q as dC,cH as iC,a3 as ZI,A as Ag,a4 as lC,ac as CC,x as xg,w as fC,a6 as QI,a5 as Dl,aa as Sf,ab as _f}from'./main-JTU33H5D.js';import'./chunk-C1RU8zia.js';import {n as nt}from'./chunk-DeXXr4BL.js';import'./chunk-DK1hp0WW.js';import {o as z,k as _t,b as _e,n as ni,J as Jn,Q as Qn,e as ei,Y as Ye,A as At,m as mn,Z as Zn,l as Xn,C as Cn,E as En}from'./chunk-DuXr-yGB.js';import'./chunk-TkSR4UzV.js';import'./chunk-BK_05kmN.js';function ae(r,t){r&1&&(Cs(0,"p",5),JC(1,"Loading\u2026"),hl());}function le(r,t){if(r&1&&(Cs(0,"label",10),Ag(1,"input",29),ZI(),Cs(2,"span"),JC(3),hl()()),r&2){let e=t.$implicit,n=CC(2);sI(),xg("value",e.value)("formControl",n.scopeControl)("disabled",e.value==="namespace"&&!n.isAdmin()),QI(),sI(2),em(e.label);}}function se(r,t){if(r&1&&(Cs(0,"option",16),JC(1),hl()),r&2){let e=t.$implicit;xg("value",e.type),sI(),em(e.displayName);}}function ce(r,t){if(r&1&&(Cs(0,"option",16),JC(1),hl()),r&2){let e=t.$implicit;xg("value",e),sI(),em(e);}}function me(r,t){if(r&1){let e=vC();Cs(0,"div",24)(1,"ds-json-schema-form",30),Lg("valueChange",function(s){Sf(e);let m=CC(2);return _f(m.onParamsChange(s))}),hl()();}if(r&2){let e=CC(2);sI(),xg("schema",t)("value",e.initialParams());}}function de(r,t){if(r&1){let e=vC();Cs(0,"button",31),Lg("click",function(){Sf(e);let s=CC(2);return _f(s.exportYaml())}),JC(1),hl();}if(r&2){let e=CC(2);xg("disabled",e.isExporting()),sI(),Dl(" ",e.isExporting()?"Exporting\u2026":"Export as YAML"," ");}}function pe(r,t){if(r&1){let e=vC();Cs(0,"form",7),Lg("ngSubmit",function(){Sf(e);let s=CC();return _f(s.submit())}),Cs(1,"fieldset",8)(2,"legend",9),JC(3,"Scope"),hl(),dC(4,le,4,4,"label",10,iC().trackByScope,true),hl(),Cs(6,"div",11)(7,"label",12),JC(8,"Type "),Cs(9,"span",13),JC(10,"*"),hl()(),Cs(11,"select",14)(12,"option",15),JC(13,"Select type"),hl(),dC(14,se,2,2,"option",16,iC().trackByType,true),hl(),ZI(),hl(),Cs(16,"div",11)(17,"label",17),JC(18,"Name "),Cs(19,"span",13),JC(20,"*"),hl()(),Ag(21,"input",18),ZI(),hl(),Cs(22,"div",11)(23,"label",19),JC(24,"Description"),hl(),Ag(25,"textarea",20),ZI(),hl(),Cs(26,"div",11)(27,"label",21),JC(28,"Auth Setting"),hl(),Cs(29,"select",22)(30,"option",23),JC(31,"None"),hl(),dC(32,ce,2,2,"option",16,lC),hl(),ZI(),hl(),aC(34,me,2,2,"div",24),Cs(35,"div",25)(36,"button",26),JC(37),hl(),aC(38,de,2,2,"button",27),Cs(39,"button",28),Lg("click",function(){Sf(e);let s=CC();return _f(s.cancel())}),JC(40,"Cancel"),hl()()();}if(r&2){let e,n=CC();xg("formGroup",n.form),sI(),xg("disabled",n.isEditMode()),sI(3),fC(n.scopeOptions),sI(7),xg("formControl",n.typeControl),QI(),sI(3),fC(n.integrationTypes()),sI(7),xg("formControl",n.nameControl),QI(),sI(4),xg("formControl",n.descriptionControl),QI(),sI(4),xg("formControl",n.authSettingNameControl),QI(),sI(),xg("ngValue",null),sI(2),fC(n.availableAuthSettings()),sI(2),cC((e=n.schema())?34:-1,e),sI(2),xg("disabled",n.nameControl.invalid||n.typeControl.invalid||n.isSubmitting()),sI(),Dl(" ",n.isEditMode()?"Save changes":"Create"," "),sI(),cC(n.isEditMode()?38:-1);}}var ge=new Set(["platform","namespace","userOnNs","userGlobal"]),N=Object.freeze({platform:"Configuration plateforme",namespace:"Configuration du namespace",userOnNs:"Pour moi sur ce namespace",userGlobal:"Pour moi globalement"}),ie=class r{route=g(V);router=g(G);destroyRef=g(Ce);state=g(N$1);integrationTypeController=g(N$2);authSettingState=g(R);namespaceRole=g(v);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=!this.namespaceId;isAdmin=F(this.isPlatformMode?br(true):this.namespaceRole.isAdminOfNamespace$(this.namespaceId),{initialValue:this.isPlatformMode});form=new z({name:new _t("",{nonNullable:true,validators:[_e.required,_e.minLength(1)]}),description:new _t(null),type:new _t("",{nonNullable:true,validators:[_e.required]}),scope:new _t("namespace",{nonNullable:true})});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get typeControl(){return this.form.controls.type}get scopeControl(){return this.form.controls.scope}isEditMode=Wi(false);isSubmitting=Wi(false);isLoading=Wi(false);isExporting=Wi(false);scopeOptions=[{value:"platform",label:N.platform},{value:"namespace",label:N.namespace},{value:"userOnNs",label:N.userOnNs},{value:"userGlobal",label:N.userGlobal}];authSettingNameControl=new _t(null);availableAuthSettings=Wi([]);paramsValue=Wi(null);initialParams=Wi(null);integrationTypes=F(this.integrationTypeController.listTypesIntegrationType(),{initialValue:[]});selectedType=F(this.form.controls.type.valueChanges,{initialValue:this.form.controls.type.value});schema=TT(()=>{let t=this.selectedType();return t?this.integrationTypes().find(n=>n.type===t)?.configSchema??null:null});existingConfig=null;constructor(){Wf(()=>{if(this.isAdmin()||this.isEditMode())return;["platform","namespace"].includes(this.scopeControl.value)&&this.scopeControl.setValue("userOnNs");});}ngOnInit(){this.namespaceId&&this.state.setNamespace(this.namespaceId);let t=this.route.snapshot.paramMap,e=this.route.snapshot.queryParamMap,n=t.get("integrationId");if(n){this.isEditMode.set(true),this.scopeControl.disable(),this.loadConfig(n);return}if(this.isPlatformMode){this.scopeControl.setValue("platform"),this.scopeControl.disable(),this.loadAuthSettingsForScope("platform");return}let s=this.parseScope(e.get("scope"));this.scopeControl.setValue(s),this.loadAuthSettingsForScope(s),this.scopeControl.valueChanges.pipe(U(this.destroyRef)).subscribe(re=>{this.loadAuthSettingsForScope(re);});let m=e.get("template");m&&this.hydrateFromTemplate(m);}parseScope(t){return t&&ge.has(t)?t:"namespace"}deriveScopeFromConfig(t){return !t.userId&&!t.namespaceId?"platform":t.userId?t.namespaceId?"userOnNs":"userGlobal":"namespace"}loadConfig(t){this.isLoading.set(true),this.state.getById(t).pipe(U(this.destroyRef)).subscribe({next:e=>{this.existingConfig=e;let n=this.deriveScopeFromConfig(e);this.scopeControl.setValue(n),this.applyConfigToForm(e),this.loadAuthSettingsForScope(n),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),console.warn(`[IntegrationForm] Could not load config '${t}' \u2014 navigating back`),this.navigateBack();}});}hydrateFromTemplate(t){this.isLoading.set(true),this.state.getById(t).pipe(U(this.destroyRef)).subscribe({next:e=>{this.applyConfigToForm(e),this.isLoading.set(false),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:true});},error:e=>{console.warn(`[IntegrationForm] Could not hydrate from template ${t}:`,e),this.isLoading.set(false),this.router.navigate([],{relativeTo:this.route,queryParams:{template:null,templateScope:null},queryParamsHandling:"merge",replaceUrl:true});}});}applyConfigToForm(t){this.nameControl.setValue(t.name),this.descriptionControl.setValue(t.description??null),this.typeControl.setValue(t.integrationType),this.initialParams.set(t.parameters),this.paramsValue.set(t.parameters),this.authSettingNameControl.setValue(t.authSettingName??null);}loadAuthSettingsForScope(t){let e;switch(t){case "platform":e=this.authSettingState.loadPlatformSettings();break;case "namespace":e=this.authSettingState.loadNamespaceSettings(this.namespaceId);break;case "userOnNs":e=this.authSettingState.loadUserSettings(this.namespaceId);break;case "userGlobal":e=this.authSettingState.loadUserSettings("global");break}e.pipe(U(this.destroyRef)).subscribe({next:n=>{let s=n.map(m=>m.name).filter(Boolean);this.availableAuthSettings.set([...new Set(s)]);},error:()=>this.availableAuthSettings.set([])});}onParamsChange(t){this.paramsValue.set(t);}submit(){if(this.nameControl.invalid||this.typeControl.invalid||this.isSubmitting())return;if(this.isEditMode()&&!this.existingConfig?.id){this.navigateBack();return}this.isSubmitting.set(true);let t=this.descriptionControl.value?.trim(),e={name:this.nameControl.value.trim(),description:t||null,integrationType:this.typeControl.value,parameters:this.paramsValue(),authSettingName:this.authSettingNameControl.value||null},n=this.form.getRawValue().scope;(this.isEditMode()&&this.existingConfig?.id?this.state.update(this.existingConfig.id,e,n,this.existingConfig):this.state.create(e,n,this.namespaceId??null)).pipe(U(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:()=>this.isSubmitting.set(false)});}exportYaml(){let t=this.existingConfig?.id;!t||this.isExporting()||(this.isExporting.set(true),this.state.exportAsYaml(t).pipe(U(this.destroyRef)).subscribe({next:e=>{let n=new Blob([e],{type:"application/yaml"}),s=URL.createObjectURL(n),m=document.createElement("a");m.href=s,m.download=`${this.existingConfig?.name??"integration"}.yaml`,m.click(),URL.revokeObjectURL(s),this.isExporting.set(false);},error:()=>this.isExporting.set(false)}));}cancel(){this.navigateBack();}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","integration-configs"]):this.router.navigate(["/agentos",this.namespaceId,"integrations"]);}trackByType(t,e){return e.type}trackByScope(t,e){return e.value}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=jw({type:r,selectors:[["agentos-integration-form"]],decls:10,vars:2,consts:[[1,"integration-form"],[1,"integration-form__header"],["type","button","title","Back to integrations",1,"integration-form__back",3,"click"],[1,"integration-form__back-icon"],[1,"integration-form__title"],[1,"integration-form__loading"],[1,"integration-form__form",3,"formGroup"],[1,"integration-form__form",3,"ngSubmit","formGroup"],[1,"integration-form__field","integration-form__scope",3,"disabled"],[1,"integration-form__label"],[1,"integration-form__scope-option"],[1,"integration-form__field"],["for","integration-type",1,"integration-form__label"],["aria-hidden","true"],["id","integration-type",1,"integration-form__select",3,"formControl"],["value","","disabled",""],[3,"value"],["for","integration-name",1,"integration-form__label"],["id","integration-name","type","text","placeholder","Integration name","autocomplete","off",1,"integration-form__input",3,"formControl"],["for","integration-description",1,"integration-form__label"],["id","integration-description","placeholder","Optional description","rows","3",1,"integration-form__textarea",3,"formControl"],["for","integration-auth-setting",1,"integration-form__label"],["id","integration-auth-setting",1,"integration-form__select",3,"formControl"],[3,"ngValue"],[1,"integration-form__schema-form"],[1,"integration-form__actions"],["type","submit",1,"integration-form__btn","integration-form__btn--primary",3,"disabled"],["type","button",1,"integration-form__btn","integration-form__btn--export",3,"disabled"],["type","button",1,"integration-form__btn",3,"click"],["type","radio",3,"value","formControl","disabled"],[3,"valueChange","schema","value"],["type","button",1,"integration-form__btn","integration-form__btn--export",3,"click","disabled"]],template:function(e,n){e&1&&(Cs(0,"div",0)(1,"header",1)(2,"button",2),Lg("click",function(){return n.cancel()}),Cs(3,"span",3),JC(4,"\u2190"),hl(),JC(5," Integrations "),hl(),Cs(6,"h1",4),JC(7),hl()(),aC(8,ae,2,0,"p",5)(9,pe,41,11,"form",6),hl()),e&2&&(sI(7),em(n.isEditMode()?"Edit integration":"New integration"),sI(),cC(n.isLoading()?8:9));},dependencies:[ni,Jn,Qn,ei,Ye,At,mn,Zn,Xn,Cn,En,nt],styles:[".integration-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.integration-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.integration-form__back[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.375rem;background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-accent)}.integration-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.integration-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.integration-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:700;color:var(--color-text);letter-spacing:-.02em}.integration-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary);font-size:.9rem;margin:0}.integration-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.integration-form__scope[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.4rem;border:1px solid var(--color-divider);border-radius:0;padding:.75rem 1rem;background:transparent;margin:0}.integration-form__scope[disabled][_ngcontent-%COMP%]{opacity:.6}.integration-form__scope-option[_ngcontent-%COMP%]{display:inline-flex;align-items:center;gap:.5rem;font-size:.875rem;color:var(--color-text);cursor:pointer}.integration-form__scope-option[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{margin:0}.integration-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.integration-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text)}.integration-form__input[_ngcontent-%COMP%], .integration-form__textarea[_ngcontent-%COMP%], .integration-form__select[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:0;border:1px solid var(--color-divider);background:var(--color-surface);color:var(--color-text);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;transition:border-color .15s ease}.integration-form__input[_ngcontent-%COMP%]:focus, .integration-form__textarea[_ngcontent-%COMP%]:focus, .integration-form__select[_ngcontent-%COMP%]:focus{border-color:var(--color-accent)}.integration-form__input[_ngcontent-%COMP%]::placeholder, .integration-form__textarea[_ngcontent-%COMP%]::placeholder, .integration-form__select[_ngcontent-%COMP%]::placeholder{color:var(--color-neutral-500)}.integration-form__textarea[_ngcontent-%COMP%]{resize:vertical;min-height:4.5rem;line-height:1.5}.integration-form__select[_ngcontent-%COMP%]{cursor:pointer}.integration-form__select[_ngcontent-%COMP%] option[disabled][_ngcontent-%COMP%]{color:var(--color-text-secondary)}.integration-form__schema-form[_ngcontent-%COMP%]{padding:1rem;border-radius:0;border:1px solid var(--color-divider);background:var(--color-surface)}.integration-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.integration-form__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border-radius:0;border:1px solid var(--color-divider);background:transparent;color:var(--color-text);font-size:13px;font-family:var(--font-heading);font-weight:600;cursor:pointer;transition:background .15s ease,border-color .15s ease}.integration-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-bg-hover);border-color:var(--color-neutral-500)}.integration-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.integration-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-accent);border-color:var(--color-accent);color:#fff}.integration-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-accent-700);border-color:var(--color-accent-700)}.integration-form__btn--export[_ngcontent-%COMP%]{border-color:var(--color-divider);color:var(--color-text-secondary)}.integration-form__btn--export[_ngcontent-%COMP%]:hover:not(:disabled){border-color:var(--color-accent);color:var(--color-accent)}"]})};export{ie as IntegrationFormComponent};