@whoz-oss/coday-client 1.3.2 → 1.3.4
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.
- package/browser/{chunk-BXQCdGUa.js → chunk-3QjpTDpt.js} +1 -1
- package/browser/{chunk-ZTE9Vro-.js → chunk-7IEj5tud.js} +1 -1
- package/browser/{chunk-nSxfGVc8.js → chunk-8RFsf09R.js} +1 -1
- package/browser/{chunk-CRuFXEnP.js → chunk-9rFJllaP.js} +1 -1
- package/browser/{chunk-CeRWUb5g.js → chunk-B3mPWOwM.js} +1 -1
- package/browser/{chunk-SiAnBXor.js → chunk-BDqV-dXo.js} +1 -1
- package/browser/chunk-BGM4NjUk.js +1 -0
- package/browser/{chunk-TBsNfd0k.js → chunk-BMBD8g8i.js} +1 -1
- package/browser/chunk-BYAMVo7F.js +1 -0
- package/browser/{chunk-DeVzkEKK.js → chunk-BbOdBhQy.js} +1 -1
- package/browser/{chunk-E8b2_4uB.js → chunk-Bc_JiT75.js} +1 -1
- package/browser/{chunk-DlFFzFSe.js → chunk-BfoCTjUr.js} +1 -1
- package/browser/{chunk-BdWvjltK.js → chunk-BhKcjruH.js} +1 -1
- package/browser/{chunk-CNMTF87H.js → chunk-Bj9y8qST.js} +1 -1
- package/browser/{chunk-DGa4-UJW.js → chunk-Brj8HlXc.js} +1 -1
- package/browser/{chunk-Ckk6G7IP.js → chunk-BxT6IsjS.js} +1 -1
- package/browser/{chunk-eTAQJYle.js → chunk-By4bK8Lp.js} +1 -1
- package/browser/chunk-C8qVsVH8.js +1 -0
- package/browser/{chunk-CaxOrx5M.js → chunk-CFw8eyQX.js} +1 -1
- package/browser/{chunk-x7Suyrio.js → chunk-CH0b9ss9.js} +1 -1
- package/browser/{chunk-BovznIFZ.js → chunk-CInfUnUL.js} +1 -1
- package/browser/{chunk-DEhf9VBD.js → chunk-CJpYYZh2.js} +1 -1
- package/browser/{chunk-CcTN_TUb.js → chunk-CTjZECqR.js} +1 -1
- package/browser/{chunk-C7-Gy0Uz.js → chunk-CTx3Z0hA.js} +1 -1
- package/browser/{chunk-CZ6ILxDX.js → chunk-CVuNrNOH.js} +1 -1
- package/browser/{chunk-BpA60NxS.js → chunk-CXVQ4M5H.js} +1 -1
- package/browser/{chunk-CW742eC7.js → chunk-Cb82rqle.js} +4 -4
- package/browser/chunk-CbSC-SSJ.js +1 -0
- package/browser/chunk-CeTVH-vp.js +2 -0
- package/browser/{chunk-BmjhXCgH.js → chunk-Cek4dv2K.js} +1 -1
- package/browser/{chunk-BGeY6TJl.js → chunk-CekA5yLC.js} +1 -1
- package/browser/{chunk-D0tFEYpV.js → chunk-CisLHTrk.js} +1 -1
- package/browser/chunk-Cm35aeo6.js +1 -0
- package/browser/{chunk-Bi1D1MPS.js → chunk-Cm42_zF7.js} +1 -1
- package/browser/{chunk-G4MCwSm-.js → chunk-CpMYZ9dG.js} +1 -1
- package/browser/{chunk-DwB1vH9w.js → chunk-CrExrE4n.js} +1 -1
- package/browser/{chunk-Bh_9bCDZ.js → chunk-CsvLyu6R.js} +1 -1
- package/browser/{chunk-BjDDtMsE.js → chunk-Cy-MbcIf.js} +1 -1
- package/browser/{chunk-BWc0GaFw.js → chunk-CywonzJi.js} +1 -1
- package/browser/{chunk-BemBoNs5.js → chunk-D1ggthOI.js} +1 -1
- package/browser/{chunk-BBJc_ez4.js → chunk-DFaRJnOg.js} +1 -1
- package/browser/{chunk-n_Kgbuh3.js → chunk-DJz2cMcV.js} +1 -1
- package/browser/{chunk-BPJe1_uM.js → chunk-DLhvPTZP.js} +1 -1
- package/browser/{chunk-20v-HoGw.js → chunk-DVSN51SP.js} +1 -1
- package/browser/{chunk-B4CKPT8-.js → chunk-DWrJdp3G.js} +1 -1
- package/browser/{chunk-RbE7PtJh.js → chunk-DXVBbChn.js} +1 -1
- package/browser/{chunk-Cdu5JsaS.js → chunk-DgFkTqkZ.js} +1 -1
- package/browser/chunk-DoS8-ZTX.js +1 -0
- package/browser/{chunk-C_7QzTv7.js → chunk-DpRS0jIN.js} +1 -1
- package/browser/{chunk-CyEZHdnA.js → chunk-DvV6rFWO.js} +1 -1
- package/browser/{chunk-_PndMs0h.js → chunk-Lluy_pM_.js} +1 -1
- package/browser/{chunk-DUczAw5C.js → chunk-NPBU5yIa.js} +1 -1
- package/browser/{chunk-CteHmI07.js → chunk-OpV-oEpT.js} +1 -1
- package/browser/{chunk-DJOhzAbC.js → chunk-S_TYzsa6.js} +1 -1
- package/browser/{chunk-BptxX0h6.js → chunk-X4zIHpcE.js} +1 -1
- package/browser/{chunk-BQ2Vio1f.js → chunk-_Wj2M8II.js} +1 -1
- package/browser/{chunk-BtYN6RGw.js → chunk-_kolzKbl.js} +1 -1
- package/browser/chunk-_si25xRH.js +1 -0
- package/browser/{chunk-DzuMSf1O.js → chunk-eCkjwC-y.js} +1 -1
- package/browser/{chunk-Bh7gCjj4.js → chunk-eqpKdy80.js} +1 -1
- package/browser/{chunk-B4iDNUj6.js → chunk-hL6iczXD.js} +1 -1
- package/browser/{chunk-BXiOP6ZW.js → chunk-hcl2JPuw.js} +1 -1
- package/browser/{chunk-CiWRvj1N.js → chunk-i62b6Gtt.js} +1 -1
- package/browser/{chunk-C2TRQfu4.js → chunk-vkYtcaIT.js} +1 -1
- package/browser/{chunk-B9gLRfDm.js → chunk-xk_bqNV0.js} +1 -1
- package/browser/{chunk-D5NtIZG6.js → chunk-zyGtaVKQ.js} +1 -1
- package/browser/index.html +1 -1
- package/browser/{main-DXWHG4XK.js → main-FEA3BAHM.js} +2 -2
- package/package.json +1 -1
- package/browser/chunk-BIEjPnD4.js +0 -2
- package/browser/chunk-BUhtdVBd.js +0 -1
- package/browser/chunk-Balbg-lh.js +0 -1
- package/browser/chunk-CFvRU8Pw.js +0 -1
- package/browser/chunk-CmmK8635.js +0 -1
- package/browser/chunk-DvC7mEoN.js +0 -1
- package/browser/chunk-SlWicxh3.js +0 -1
- package/browser/chunk-spTKcuel.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import {S as S$1}from'./chunk-
|
|
1
|
+
import {S as S$1}from'./chunk-eCkjwC-y.js';import {g,G,w as we,dc as $,aI as Tr,H as Hi,bR as ma,u as ue,b as U,A as Aw,aJ as Nb,v as vs,be as aT,l as Ag,k as fl,af as Dg,T as TC,r as Tg,bf as uT,ah as rT,n as eC,ac as mC,t as tC,a9 as dC,aa as If,ab as wf,ag as fT}from'./main-FEA3BAHM.js';import {W as Wn,S as Se}from'./chunk-DXVBbChn.js';import'./chunk-BxT6IsjS.js';import'./chunk-DFaRJnOg.js';var S=()=>[];function V(r,e){if(r&1){let t=dC();vs(0,"agentos-ai-provider-item",4),Ag("editRequested",function(i){If(t);let p=mC(2);return wf(p.onEdit(i))})("deleteRequested",function(i){If(t);let p=mC(2);return wf(p.onDelete(i))}),fl();}r&2&&Tg("config",e)("showBadge",false);}function F(r,e){if(r&1&&eC(0,V,1,2,"agentos-ai-provider-item",3),r&2){let t,o=e.$implicit,i=mC();tC((t=i.resolveProvider(o.id))?0:-1,t);}}var E=class r{router=g(G);destroyRef=g(we);aiProviderController=g($);refresh$=new Tr(void 0);isLoading=Hi(true);providers$=this.refresh$.pipe(ma(()=>(this.isLoading.set(true),this.aiProviderController.listAiProvider("none"))));providerItems$=this.providers$.pipe(ue(e=>e.map(t=>({id:t.id??"",name:t.name,description:t.apiType}))));providersById=new Map;constructor(){this.providers$.pipe(U(this.destroyRef)).subscribe({next:e=>{this.providersById=new Map(e.map(t=>[t.id??"",t])),this.isLoading.set(false);},error:()=>this.isLoading.set(false)});}goBack(){this.router.navigate(["/agentos","admin"]);}openCreateForm(){this.router.navigate(["/agentos","admin","ai-providers","new"]);}onEdit(e){e.id&&this.router.navigate(["/agentos","admin","ai-providers",e.id,"edit"]);}onDelete(e){e.id&&this.aiProviderController.deleteAiProvider(e.id).pipe(U(this.destroyRef)).subscribe(()=>this.refresh$.next());}resolveProvider(e){return this.providersById.get(e)??null}static \u0275fac=function(t){return new(t||r)};static \u0275cmp=Aw({type:r,selectors:[["agentos-platform-ai-providers"]],decls:5,vars:7,consts:[["aiProviderItemTpl",""],["title","Platform AI Providers","emptyMessage","No platform AI providers defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","loading","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],["scope","namespace",3,"config","showBadge"],["scope","namespace",3,"editRequested","deleteRequested","config","showBadge"]],template:function(t,o){if(t&1&&(vs(0,"ds-entity-list",1),aT(1,"async"),Ag("createRequested",function(){return o.openCreateForm()}),vs(2,"ds-icon-button",2),Ag("action",function(){return o.goBack()}),fl()(),Dg(3,F,1,1,"ng-template",null,0,fT)),t&2){let i=TC(4);Tg("items",uT(1,4,o.providerItems$)??rT(6,S))("loading",o.isLoading())("showCreate",true)("itemTemplate",i);}},dependencies:[Wn,S$1,Se,Nb],styles:[".platform-ai-providers__back[_ngcontent-%COMP%]{background:none;border:none;cursor:pointer;font-family:inherit;font-size:.875rem;color:var(--color-text-secondary, #6e6e73);padding:.25rem .5rem;border-radius:4px;transition:color .15s ease}.platform-ai-providers__back[_ngcontent-%COMP%]:hover{color:var(--color-primary, #007aff)}"]})};export{E as PlatformAiProvidersComponent};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {an as ce,g,L,ch as ge,ap as Vy,av as dt$1,A as Aw,v as vs,W as WC,k as fl,ai as Jg,aj as KC,l as Ag,a3 as HI,o as bg,n as eC,q as oC,X as XE,ak as Xg,a6 as $I,r as Tg,t as tC,x as iC,a5 as yl,aK as Do,aL as qn,aN as wt$1,az as Qt,aV as w,ci as Pn,cd as Sb,c7 as QT,af as Dg,ag as fT,c8 as kf,cj as Ff,cg as Mg,T as TC,C as Cg,ad as Vg,b_ as FC,y as Hg,D as Fg,I as IC,E as wC,aI as Tr,aF as me,ck as fe,h as he,c as ce$1,bT as Od,b8 as T,b7 as B,bd as A,b6 as u,bc as h,cl as M,e as O,b9 as v,ba as m,d as b,cm as F,f,V,bb as R,cn as H,co as _,c9 as We,Y as x,Z as z,_ as Ue,am as Gm,j as Gn,p as pr,a0 as jt,a2 as Nt,a1 as Vt,a$ as Yg,ac as mC}from'./main-
|
|
1
|
+
import {an as ce,g,L,ch as ge,ap as Vy,av as dt$1,A as Aw,v as vs,W as WC,k as fl,ai as Jg,aj as KC,l as Ag,a3 as HI,o as bg,n as eC,q as oC,X as XE,ak as Xg,a6 as $I,r as Tg,t as tC,x as iC,a5 as yl,aK as Do,aL as qn,aN as wt$1,az as Qt,aV as w,ci as Pn,cd as Sb,c7 as QT,af as Dg,ag as fT,c8 as kf,cj as Ff,cg as Mg,T as TC,C as Cg,ad as Vg,b_ as FC,y as Hg,D as Fg,I as IC,E as wC,aI as Tr,aF as me,ck as fe,h as he,c as ce$1,bT as Od,b8 as T,b7 as B,bd as A,b6 as u,bc as h,cl as M,e as O,b9 as v,ba as m,d as b,cm as F,f,V,bb as R,cn as H,co as _,c9 as We,Y as x,Z as z,_ as Ue,am as Gm,j as Gn,p as pr,a0 as jt,a2 as Nt,a1 as Vt,a$ as Yg,ac as mC}from'./main-FEA3BAHM.js';import {s as se}from'./chunk-DvV6rFWO.js';import {t as ti,Q as Qn,e as ei,Y as Ye$1,h as _n,A as At,m as mn,Z as Zn,c as cn,w as wt}from'./chunk-DFaRJnOg.js';var Ze=["determinateSpinner"];function Xe(c,e){if(c&1&&(kf(),vs(0,"svg",11),bg(1,"circle",12),fl()),c&2){let t=mC();Cg("viewBox",t._viewBox()),XE(),Vg("stroke-dasharray",t._strokeCircumference(),"px")("stroke-dashoffset",t._strokeCircumference()/2,"px")("stroke-width",t._circleStrokeWidth(),"%"),Cg("r",t._circleRadius());}}var et=new w("mat-progress-spinner-default-options",{providedIn:"root",factory:()=>({diameter:qe})}),qe=100,tt=10,yt=(()=>{class c{_elementRef=g(Qt);_noopAnimations;get color(){return this._color||this._defaultColor}set color(t){this._color=t;}_color;_defaultColor="primary";_determinateCircle;constructor(){let t=g(et),n=Pn(),i=this._elementRef.nativeElement;this._noopAnimations=n==="di-disabled"&&!!t&&!t._forceAnimations,this.mode=i.nodeName.toLowerCase()==="mat-spinner"?"indeterminate":"determinate",!this._noopAnimations&&n==="reduced-motion"&&i.classList.add("mat-progress-spinner-reduced-motion"),t&&(t.color&&(this.color=this._defaultColor=t.color),t.diameter&&(this.diameter=t.diameter),t.strokeWidth&&(this.strokeWidth=t.strokeWidth));}mode;get value(){return this.mode==="determinate"?this._value:0}set value(t){this._value=Math.max(0,Math.min(100,t||0));}_value=0;get diameter(){return this._diameter}set diameter(t){this._diameter=t||0;}_diameter=qe;get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(t){this._strokeWidth=t||0;}_strokeWidth;_circleRadius(){return (this.diameter-tt)/2}_viewBox(){let t=this._circleRadius()*2+this.strokeWidth;return `0 0 ${t} ${t}`}_strokeCircumference(){return 2*Math.PI*this._circleRadius()}_strokeDashOffset(){return this.mode==="determinate"?this._strokeCircumference()*(100-this._value)/100:null}_circleStrokeWidth(){return this.strokeWidth/this.diameter*100}static \u0275fac=function(n){return new(n||c)};static \u0275cmp=Aw({type:c,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(n,i){if(n&1&&Fg(Ze,5),n&2){let o;IC(o=wC())&&(i._determinateCircle=o.first);}},hostAttrs:["role","progressbar","tabindex","-1",1,"mat-mdc-progress-spinner","mdc-circular-progress"],hostVars:18,hostBindings:function(n,i){n&2&&(Cg("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow",i.mode==="determinate"?i.value:null)("mode",i.mode),FC("mat-"+i.color),Vg("width",i.diameter,"px")("height",i.diameter,"px")("--mat-progress-spinner-size",i.diameter+"px")("--mat-progress-spinner-active-indicator-width",i.diameter+"px"),Hg("_mat-animation-noopable",i._noopAnimations)("mdc-circular-progress--indeterminate",i.mode==="indeterminate"));},inputs:{color:"color",mode:"mode",value:[2,"value","value",QT],diameter:[2,"diameter","diameter",QT],strokeWidth:[2,"strokeWidth","strokeWidth",QT]},exportAs:["matProgressSpinner"],decls:14,vars:11,consts:[["circle",""],["determinateSpinner",""],["aria-hidden","true",1,"mdc-circular-progress__determinate-container"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__determinate-circle-graphic"],["cx","50%","cy","50%",1,"mdc-circular-progress__determinate-circle"],["aria-hidden","true",1,"mdc-circular-progress__indeterminate-container"],[1,"mdc-circular-progress__spinner-layer"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-left"],[3,"ngTemplateOutlet"],[1,"mdc-circular-progress__gap-patch"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-right"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__indeterminate-circle-graphic"],["cx","50%","cy","50%"]],template:function(n,i){if(n&1&&(Dg(0,Xe,2,8,"ng-template",null,0,fT),vs(2,"div",2,1),kf(),vs(4,"svg",3),bg(5,"circle",4),fl()(),Ff(),vs(6,"div",5)(7,"div",6)(8,"div",7),Mg(9,8),fl(),vs(10,"div",9),Mg(11,8),fl(),vs(12,"div",10),Mg(13,8),fl()()()),n&2){let o=TC(1);XE(4),Cg("viewBox",i._viewBox()),XE(),Vg("stroke-dasharray",i._strokeCircumference(),"px")("stroke-dashoffset",i._strokeDashOffset(),"px")("stroke-width",i._circleStrokeWidth(),"%"),Cg("r",i._circleRadius()),XE(4),Tg("ngTemplateOutlet",o),XE(2),Tg("ngTemplateOutlet",o),XE(2),Tg("ngTemplateOutlet",o);}},dependencies:[Sb],styles:[`.mat-mdc-progress-spinner {
|
|
2
2
|
--mat-progress-spinner-animation-multiplier: 1;
|
|
3
3
|
display: block;
|
|
4
4
|
overflow: hidden;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {A,k as kt,b as bt}from'./chunk-nSxfGVc8.js';import {S as St}from'./chunk-DwB1vH9w.js';import {E as Et,y as yt$1,G as Ge}from'./chunk-BXiOP6ZW.js';import {g,G,P,U,N,h as he$1,K as c,w as we,H as Hi,F as F$1,m as mT,b as U$1,A as Aw,i as hr,p as pr,v as vs,W as WC,k as fl,l as Ag,n as eC,q as oC,X as XE,r as Tg,t as tC,x as iC,y as Hg,C as Cg,u as ue$1,c9 as We,Y as x,an as ce$1,ap as Vy,c as ce$2,V,o as bg,a9 as dC,aa as If,ac as mC,ab as wf,a8 as Zg,a5 as yl}from'./main-DXWHG4XK.js';import'./chunk-BtYN6RGw.js';import'./chunk-CyEZHdnA.js';import'./chunk-DlFFzFSe.js';import'./chunk-Ckk6G7IP.js';import {y as yt,w as wt}from'./chunk-BBJc_ez4.js';var R=class n{threadState=g(U);codayService=g(Ge);threadList=F$1(this.threadState.threadList$,{initialValue:[]});selectedThread=F$1(this.threadState.selectedThread$,{initialValue:null});isThinking=F$1(this.codayService.isThinking$,{initialValue:false});inviteEvent=F$1(this.codayService.currentInviteEvent$.pipe(ue$1(t=>t?.invite===We?null:t)),{initialValue:null});tasks=mT(()=>{let t=this.threadList(),e=this.selectedThread(),r=this.isThinking(),o=this.inviteEvent();return t.filter(i=>!i.parentThreadId).map(i=>{let m=!!e&&i.id===e.id;return {id:i.id,name:i.name,summary:i.summary,modifiedDate:i.modifiedDate,starring:i.starring??[],users:i.users??[],status:this.deriveStatus(i,m,r,!!o),isActive:m,worktreeProject:i.worktreeProject}}).sort((i,m)=>{let q=kt[i.status]-kt[m.status];return q!==0?q:i.modifiedDate>m.modifiedDate?-1:1})});deriveStatus(t,e,r,o){let i=Date.now()-new Date(t.modifiedDate).getTime();return t.closedByUser?"done":t.pendingInvite?"waiting-you":e?r?"in-progress":"paused":i<bt?"in-progress":"paused"}static \u0275fac=function(e){return new(e||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})};var F=class n{projectState=g(P);threadState=g(U);destroy$=new ce$1;eventSource=null;currentProject=null;constructor(){this.projectState.selectedProject$.pipe(Vy(this.destroy$)).subscribe(t=>{let e=t?.name??null;e!==this.currentProject&&(this.disconnect(),e&&this.connect(e));});}connect(t,e=5e3){this.currentProject=t;let r=`/api/projects/${encodeURIComponent(t)}/event-stream`;console.log(`[PROJECT_SSE] Connecting to ${r}`),this.eventSource=new EventSource(r),this.eventSource.onmessage=o=>{try{let i=JSON.parse(o.data),m=ce$2(i);if(!m)return;m instanceof V&&(console.log("[PROJECT_SSE] ThreadUpdateEvent \u2014 refreshing thread list"),this.threadState.refreshThreadList());}catch(i){console.warn("[PROJECT_SSE] Failed to parse event:",i);}},this.eventSource.onerror=()=>{this.eventSource?.readyState===EventSource.CLOSED&&(console.warn(`[PROJECT_SSE] Connection closed for ${t}, reconnecting in ${e}ms`),this.eventSource=null,setTimeout(()=>{this.currentProject===t&&this.connect(t,Math.min(e*2,6e4));},e));};}disconnect(){this.eventSource&&(this.eventSource.close(),this.eventSource=null,console.log(`[PROJECT_SSE] Disconnected from project ${this.currentProject}`)),this.currentProject=null;}ngOnDestroy(){this.disconnect(),this.destroy$.next(),this.destroy$.complete();}static \u0275fac=function(e){return new(e||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})};var ce=(n,t)=>t.key,de=(n,t)=>t.status,le=(n,t)=>t.id;function pe(n,t){n&1&&bg(0,"mat-spinner",6);}function me(n,t){n&1&&(vs(0,"mat-icon"),WC(1,"add"),fl());}function ue(n,t){if(n&1&&(vs(0,"span",16),WC(1),fl()),n&2){let e=mC().$implicit,r=mC();XE(),Zg(r.filterCounts()[e.key]);}}function ge(n,t){if(n&1){let e=dC();vs(0,"button",15),Ag("click",function(){let o=If(e).$implicit,i=mC();return wf(i.setFilter(o.key))}),vs(1,"mat-icon",10),WC(2),fl(),vs(3,"span"),WC(4),fl(),eC(5,ue,2,1,"span",16),fl();}if(n&2){let e=t.$implicit,r=mC();Hg("active",r.activeFilter()===e.key),Cg("aria-selected",r.activeFilter()===e.key),XE(2),Zg(e.icon),XE(2),Zg(e.label),XE(),tC(r.filterCounts()[e.key]>0?5:-1);}}function _e(n,t){n&1&&(vs(0,"div",12),bg(1,"mat-spinner",17),vs(2,"p"),WC(3,"Loading tasks\u2026"),fl()());}function fe(n,t){if(n&1){let e=dC();vs(0,"p"),WC(1,"No tasks yet. Start your first one!"),fl(),vs(2,"button",19),Ag("click",function(){If(e);let o=mC(2);return wf(o.createTask())}),vs(3,"mat-icon"),WC(4,"add"),fl(),WC(5," New Task "),fl();}}function he(n,t){n&1&&(vs(0,"p"),WC(1,"No tasks in this category."),fl());}function ke(n,t){if(n&1&&(vs(0,"div",13)(1,"mat-icon",18),WC(2,"rocket_launch"),fl(),eC(3,fe,6,0)(4,he,2,0,"p"),fl()),n&2){let e=mC();XE(3),tC(e.activeFilter()==="all"?3:4);}}function ve(n,t){if(n&1){let e=dC();vs(0,"app-task-card",25),Ag("stopRequested",function(o){If(e);let i=mC(3);return wf(i.onStopRequested(o))})("deleteRequested",function(o){If(e);let i=mC(3);return wf(i.onDeleteRequested(o))})("starToggled",function(o){If(e);let i=mC(3);return wf(i.onStarToggled(o))})("markDoneRequested",function(o){If(e);let i=mC(3);return wf(i.onMarkDoneRequested(o))})("markActiveRequested",function(o){If(e);let i=mC(3);return wf(i.onMarkActiveRequested(o))}),fl();}if(n&2){let e=t.$implicit;Tg("task",e);}}function Ce(n,t){if(n&1&&(vs(0,"section",20)(1,"h2",21)(2,"mat-icon",22),WC(3),fl(),WC(4),vs(5,"span",23),WC(6),fl()(),vs(7,"div",14),oC(8,ve,1,1,"app-task-card",24,le),fl()()),n&2){let e=t.$implicit;XE(3),Zg(e.icon),XE(),yl(" ",e.label," "),XE(2),Zg(e.tasks.length),XE(2),iC(e.tasks);}}function be(n,t){if(n&1&&oC(0,Ce,10,3,"section",20,de),n&2){let e=mC();iC(e.taskGroups());}}function ye(n,t){if(n&1){let e=dC();vs(0,"app-task-card",25),Ag("stopRequested",function(o){If(e);let i=mC(2);return wf(i.onStopRequested(o))})("deleteRequested",function(o){If(e);let i=mC(2);return wf(i.onDeleteRequested(o))})("starToggled",function(o){If(e);let i=mC(2);return wf(i.onStarToggled(o))})("markDoneRequested",function(o){If(e);let i=mC(2);return wf(i.onMarkDoneRequested(o))})("markActiveRequested",function(o){If(e);let i=mC(2);return wf(i.onMarkActiveRequested(o))}),fl();}if(n&2){let e=t.$implicit;Tg("task",e);}}function xe(n,t){if(n&1&&(vs(0,"div",14),oC(1,ye,1,1,"app-task-card",24,le),fl()),n&2){let e=mC();XE(),iC(e.filteredTasks());}}var Te=[{key:"all",label:"All",icon:"grid_view"},{key:"waiting-you",label:"Waiting for you",icon:"mark_unread_chat_alt"},{key:"in-progress",label:"In progress",icon:"pending"},{key:"paused",label:"Paused",icon:"pause_circle"},{key:"done",label:"Done",icon:"check_circle"}],se=class n{router=g(G);projectState=g(P);threadState=g(U);threadApi=g(N);taskStatus=g(R);userService=g(he$1);projectApi=g(c);destroyRef=g(we);_projectEventStream=g(F);filters=Te;activeFilter=Hi("all");starredOnly=Hi(false);isCreating=Hi(false);isLoadingList=F$1(this.threadState.isLoadingThreadList$,{initialValue:false});username=F$1(this.userService.username$,{initialValue:null});allTasks=this.taskStatus.tasks;filteredTasks=mT(()=>{let t=this.activeFilter(),e=this.username(),r=this.allTasks();return this.starredOnly()&&e&&(r=r.filter(o=>o.starring.includes(e))),t==="all"?r:r.filter(o=>o.status===t)});filterCounts=mT(()=>{let t=this.username(),e=this.allTasks();return this.starredOnly()&&t&&(e=e.filter(r=>r.starring.includes(t))),{all:e.length,"waiting-you":e.filter(r=>r.status==="waiting-you").length,"in-progress":e.filter(r=>r.status==="in-progress").length,paused:e.filter(r=>r.status==="paused").length,done:e.filter(r=>r.status==="done").length}});taskGroups=mT(()=>{let t=this.username(),e=this.allTasks();this.starredOnly()&&t&&(e=e.filter(o=>o.starring.includes(t)));let r=[{status:"waiting-you",label:"Waiting for you",icon:"mark_unread_chat_alt",tasks:[]},{status:"in-progress",label:"In progress",icon:"pending",tasks:[]},{status:"done",label:"Done",icon:"check_circle",tasks:[]},{status:"paused",label:"Paused",icon:"pause_circle",tasks:[]},{status:"error",label:"Error",icon:"error",tasks:[]}];for(let o of e){let i=r.find(m=>m.status===o.status);i&&i.tasks.push(o);}return r.filter(o=>o.tasks.length>0)});ngOnInit(){this.userService.fetchCurrentUser().pipe(U$1(this.destroyRef)).subscribe({error:t=>console.warn("[TASK-CONTROL] Could not fetch user:",t)});}setFilter(t){this.activeFilter.set(t);}toggleStarredFilter(){this.starredOnly.update(t=>!t);}createTask(){let t=this.projectState.getSelectedProjectId();!t||this.isCreating()||(this.isCreating.set(true),this.threadApi.createThread().pipe(U$1(this.destroyRef)).subscribe({next:e=>{this.isCreating.set(false),this.router.navigate(["project",t,"thread",e.thread.id]);},error:e=>{console.error("[TASK-CONTROL] Failed to create thread:",e),this.isCreating.set(false);}}));}onStopRequested(t){this.threadApi.stopThread(t).pipe(U$1(this.destroyRef)).subscribe({error:e=>console.error("[TASK-CONTROL] Failed to stop thread:",e)});}onDeleteRequested(t){this.threadApi.deleteThread(t).pipe(U$1(this.destroyRef)).subscribe({next:()=>this.threadState.refreshThreadList(),error:e=>console.error("[TASK-CONTROL] Failed to delete thread:",e)});}onStarToggled(t){let e=this.username();if(!e)return;let r=this.allTasks().find(m=>m.id===t);if(!r)return;let o=r.starring.includes(e),i=o?this.threadApi.unstarThread(t):this.threadApi.starThread(t);this.threadState.updateStarLocal(t,!o,e),i.pipe(U$1(this.destroyRef)).subscribe({error:m=>{console.error("[TASK-CONTROL] Failed to toggle star:",m),this.threadState.refreshThreadList();}});}onMarkDoneRequested(t){let e=this.projectState.getSelectedProjectId();e&&this.projectApi.markThreadDone(e,t).pipe(U$1(this.destroyRef)).subscribe({next:()=>this.threadState.refreshThreadList(),error:r=>console.error("[TASK-CONTROL] Failed to mark task as done:",r)});}onMarkActiveRequested(t){let e=this.projectState.getSelectedProjectId();e&&this.projectApi.markThreadActive(e,t).pipe(U$1(this.destroyRef)).subscribe({next:()=>this.threadState.refreshThreadList(),error:r=>console.error("[TASK-CONTROL] Failed to mark task as active:",r)});}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Aw({type:n,selectors:[["app-task-control"]],decls:25,vars:6,consts:[[1,"task-control"],[1,"tc-header"],[1,"tc-title-row"],[1,"tc-title"],[1,"title-icon"],["mat-flat-button","","aria-label","Start a new task",1,"new-task-btn",3,"click","disabled"],["diameter","16"],["role","tablist","aria-label","Filter tasks",1,"tc-filters"],["role","tab",1,"filter-chip",3,"active"],["role","switch","aria-label","Show starred tasks only",1,"filter-chip","starred-filter",3,"click"],[1,"filter-icon"],[1,"tc-grid-wrapper"],[1,"tc-loading"],[1,"tc-empty"],[1,"tc-grid"],["role","tab",1,"filter-chip",3,"click"],[1,"filter-badge"],["diameter","40"],[1,"empty-icon"],["mat-flat-button","",1,"new-task-btn",3,"click"],[1,"tc-group"],[1,"tc-group-title"],[1,"group-icon"],[1,"group-count"],[3,"task"],[3,"stopRequested","deleteRequested","starToggled","markDoneRequested","markActiveRequested","task"]],template:function(e,r){e&1&&(vs(0,"app-sidenav")(1,"div",0)(2,"header",1)(3,"div",2)(4,"h1",3)(5,"mat-icon",4),WC(6,"rocket_launch"),fl(),WC(7," Task Control "),fl(),vs(8,"button",5),Ag("click",function(){return r.createTask()}),eC(9,pe,1,0,"mat-spinner",6)(10,me,2,0,"mat-icon"),WC(11," New Task "),fl()(),vs(12,"nav",7),oC(13,ge,6,6,"button",8,ce),vs(15,"button",9),Ag("click",function(){return r.toggleStarredFilter()}),vs(16,"mat-icon",10),WC(17,"star"),fl(),vs(18,"span"),WC(19,"Starred"),fl()()()(),vs(20,"main",11),eC(21,_e,4,0,"div",12)(22,ke,5,1,"div",13)(23,be,2,0)(24,xe,3,0,"div",14),fl()()()),e&2&&(XE(8),Tg("disabled",r.isCreating()),XE(),tC(r.isCreating()?9:10),XE(4),iC(r.filters),XE(2),Hg("active",r.starredOnly()),Cg("aria-checked",r.starredOnly()),XE(6),tC(r.isLoadingList()?21:r.filteredTasks().length===0?22:r.activeFilter()==="all"?23:24));},dependencies:[A,St,yt,wt,hr,pr,Et,yt$1],styles:[".glass-panel[_ngcontent-%COMP%]{background:var(--glass-bg);backdrop-filter:var(--glass-backdrop-blur);-webkit-backdrop-filter:var(--glass-backdrop-blur);border:1px solid var(--glass-border);box-shadow:var(--glass-shadow)}.glass-interactive[_ngcontent-%COMP%]{background:var(--glass-bg);backdrop-filter:var(--glass-backdrop-blur);-webkit-backdrop-filter:var(--glass-backdrop-blur);border:1px solid var(--glass-border);box-shadow:var(--glass-shadow);transition:all .3s cubic-bezier(.4,0,.2,1)}.glass-interactive[_ngcontent-%COMP%]:hover{transform:translateY(-2px);box-shadow:0 12px 40px #00000026}.glass-interactive[_ngcontent-%COMP%]:active{transform:translateY(0)}.glass-card[_ngcontent-%COMP%]{background:var(--glass-bg);backdrop-filter:var(--glass-backdrop-blur);-webkit-backdrop-filter:var(--glass-backdrop-blur);border:1px solid var(--glass-border);box-shadow:var(--glass-shadow);border-radius:20px;padding:1.5rem}.glass-button[_ngcontent-%COMP%]{background:var(--glass-bg);backdrop-filter:var(--glass-backdrop-blur);-webkit-backdrop-filter:var(--glass-backdrop-blur);border:1px solid var(--glass-border);box-shadow:var(--glass-shadow);transition:all .3s cubic-bezier(.4,0,.2,1)}.glass-button[_ngcontent-%COMP%]:hover{transform:translateY(-2px);box-shadow:0 12px 40px #00000026}.glass-button[_ngcontent-%COMP%]:active{transform:translateY(0)}.glass-button[_ngcontent-%COMP%]{border-radius:12px;padding:.75rem 1.5rem;font-weight:600;cursor:pointer}.glass-button[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed;transform:none}.glass-button[_ngcontent-%COMP%]:disabled:hover{transform:none}.smooth-theme-transition[_ngcontent-%COMP%]{transition:background .3s ease,color .3s ease,border-color .3s ease,box-shadow .3s ease}[_nghost-%COMP%]{display:flex;height:100vh;width:100%;overflow:hidden}.task-control[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:hidden;padding:1.5rem;gap:1.25rem;box-sizing:border-box}.tc-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;flex-shrink:0}.tc-title-row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:1rem}.tc-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin:0;font-size:1.5rem;font-weight:700;color:var(--color-text)}.tc-title[_ngcontent-%COMP%] .title-icon[_ngcontent-%COMP%]{font-size:1.5rem;width:1.5rem;height:1.5rem;color:var(--color-primary)}.new-task-btn[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.375rem;background:var(--color-primary);color:var(--color-text-inverse);border-radius:12px;font-weight:600;padding:0 1rem;height:36px;flex-shrink:0}.new-task-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:1.1rem;width:1.1rem;height:1.1rem}.new-task-btn[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%]{display:inline-block}.tc-filters[_ngcontent-%COMP%]{display:flex;gap:.5rem;flex-wrap:wrap}.filter-chip[_ngcontent-%COMP%]{background:var(--glass-bg);backdrop-filter:var(--glass-backdrop-blur);-webkit-backdrop-filter:var(--glass-backdrop-blur);border:1px solid var(--glass-border);box-shadow:var(--glass-shadow);display:flex;align-items:center;gap:.375rem;padding:.375rem .875rem;border-radius:100px;font-size:.8rem;font-weight:500;color:var(--color-text-secondary);cursor:pointer;border:1px solid var(--color-border);transition:background .15s ease,color .15s ease,border-color .15s ease;white-space:nowrap}.filter-chip[_ngcontent-%COMP%] .filter-icon[_ngcontent-%COMP%]{font-size:.9rem;width:.9rem;height:.9rem}.filter-chip[_ngcontent-%COMP%] .filter-badge[_ngcontent-%COMP%]{background:var(--color-primary);color:var(--color-text-inverse);border-radius:100px;padding:0 .375rem;font-size:.7rem;font-weight:700;min-width:18px;text-align:center;line-height:18px}.filter-chip.active[_ngcontent-%COMP%]{background:var(--color-primary);color:var(--color-text-inverse);border-color:var(--color-primary)}.filter-chip.active[_ngcontent-%COMP%] .filter-icon[_ngcontent-%COMP%]{color:var(--color-text-inverse)}.filter-chip.active[_ngcontent-%COMP%] .filter-badge[_ngcontent-%COMP%]{background:#ffffff4d;color:var(--color-text-inverse)}.filter-chip[_ngcontent-%COMP%]:hover:not(.active){background:var(--color-bg-hover);color:var(--color-text)}.starred-filter.active[_ngcontent-%COMP%]{background:#f5a62326;border-color:#f5a623;color:#f5a623}.starred-filter.active[_ngcontent-%COMP%] .filter-icon[_ngcontent-%COMP%]{color:#f5a623}.tc-group[_ngcontent-%COMP%]{margin-bottom:1.5rem}.tc-group[_ngcontent-%COMP%]:last-child{margin-bottom:0}.tc-group-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin:0 0 .75rem;font-size:.85rem;font-weight:600;color:var(--color-text-secondary);text-transform:uppercase;letter-spacing:.05em}.tc-group-title[_ngcontent-%COMP%] .group-icon[_ngcontent-%COMP%]{font-size:1rem;width:1rem;height:1rem}.tc-group-title[_ngcontent-%COMP%] .group-count[_ngcontent-%COMP%]{background:var(--color-bg-hover);border-radius:100px;padding:0 .375rem;font-size:.75rem;font-weight:700;min-width:18px;text-align:center;line-height:18px}.tc-grid-wrapper[_ngcontent-%COMP%]{flex:1;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--color-border) transparent}.tc-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:1rem;padding-bottom:1rem}@media(max-width:600px){.tc-grid[_ngcontent-%COMP%]{grid-template-columns:1fr}}.tc-loading[_ngcontent-%COMP%], .tc-empty[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem;height:100%;min-height:240px;color:var(--color-text-secondary);text-align:center}.tc-loading[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .tc-empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:.95rem}.empty-icon[_ngcontent-%COMP%]{font-size:3rem;width:3rem;height:3rem;opacity:.3}"]})};export{se as TaskControlComponent};
|
|
1
|
+
import {A,k as kt,b as bt}from'./chunk-8RFsf09R.js';import {S as St}from'./chunk-CrExrE4n.js';import {E as Et,y as yt$1,G as Ge}from'./chunk-hcl2JPuw.js';import {g,G,P,U,N,h as he$1,K as c,w as we,H as Hi,F as F$1,m as mT,b as U$1,A as Aw,i as hr,p as pr,v as vs,W as WC,k as fl,l as Ag,n as eC,q as oC,X as XE,r as Tg,t as tC,x as iC,y as Hg,C as Cg,u as ue$1,c9 as We,Y as x,an as ce$1,ap as Vy,c as ce$2,V,o as bg,a9 as dC,aa as If,ac as mC,ab as wf,a8 as Zg,a5 as yl}from'./main-FEA3BAHM.js';import'./chunk-_kolzKbl.js';import'./chunk-DvV6rFWO.js';import'./chunk-BfoCTjUr.js';import'./chunk-BxT6IsjS.js';import {y as yt,w as wt}from'./chunk-DFaRJnOg.js';var R=class n{threadState=g(U);codayService=g(Ge);threadList=F$1(this.threadState.threadList$,{initialValue:[]});selectedThread=F$1(this.threadState.selectedThread$,{initialValue:null});isThinking=F$1(this.codayService.isThinking$,{initialValue:false});inviteEvent=F$1(this.codayService.currentInviteEvent$.pipe(ue$1(t=>t?.invite===We?null:t)),{initialValue:null});tasks=mT(()=>{let t=this.threadList(),e=this.selectedThread(),r=this.isThinking(),o=this.inviteEvent();return t.filter(i=>!i.parentThreadId).map(i=>{let m=!!e&&i.id===e.id;return {id:i.id,name:i.name,summary:i.summary,modifiedDate:i.modifiedDate,starring:i.starring??[],users:i.users??[],status:this.deriveStatus(i,m,r,!!o),isActive:m,worktreeProject:i.worktreeProject}}).sort((i,m)=>{let q=kt[i.status]-kt[m.status];return q!==0?q:i.modifiedDate>m.modifiedDate?-1:1})});deriveStatus(t,e,r,o){let i=Date.now()-new Date(t.modifiedDate).getTime();return t.closedByUser?"done":t.pendingInvite?"waiting-you":e?r?"in-progress":"paused":i<bt?"in-progress":"paused"}static \u0275fac=function(e){return new(e||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})};var F=class n{projectState=g(P);threadState=g(U);destroy$=new ce$1;eventSource=null;currentProject=null;constructor(){this.projectState.selectedProject$.pipe(Vy(this.destroy$)).subscribe(t=>{let e=t?.name??null;e!==this.currentProject&&(this.disconnect(),e&&this.connect(e));});}connect(t,e=5e3){this.currentProject=t;let r=`/api/projects/${encodeURIComponent(t)}/event-stream`;console.log(`[PROJECT_SSE] Connecting to ${r}`),this.eventSource=new EventSource(r),this.eventSource.onmessage=o=>{try{let i=JSON.parse(o.data),m=ce$2(i);if(!m)return;m instanceof V&&(console.log("[PROJECT_SSE] ThreadUpdateEvent \u2014 refreshing thread list"),this.threadState.refreshThreadList());}catch(i){console.warn("[PROJECT_SSE] Failed to parse event:",i);}},this.eventSource.onerror=()=>{this.eventSource?.readyState===EventSource.CLOSED&&(console.warn(`[PROJECT_SSE] Connection closed for ${t}, reconnecting in ${e}ms`),this.eventSource=null,setTimeout(()=>{this.currentProject===t&&this.connect(t,Math.min(e*2,6e4));},e));};}disconnect(){this.eventSource&&(this.eventSource.close(),this.eventSource=null,console.log(`[PROJECT_SSE] Disconnected from project ${this.currentProject}`)),this.currentProject=null;}ngOnDestroy(){this.disconnect(),this.destroy$.next(),this.destroy$.complete();}static \u0275fac=function(e){return new(e||n)};static \u0275prov=x({token:n,factory:n.\u0275fac,providedIn:"root"})};var ce=(n,t)=>t.key,de=(n,t)=>t.status,le=(n,t)=>t.id;function pe(n,t){n&1&&bg(0,"mat-spinner",6);}function me(n,t){n&1&&(vs(0,"mat-icon"),WC(1,"add"),fl());}function ue(n,t){if(n&1&&(vs(0,"span",16),WC(1),fl()),n&2){let e=mC().$implicit,r=mC();XE(),Zg(r.filterCounts()[e.key]);}}function ge(n,t){if(n&1){let e=dC();vs(0,"button",15),Ag("click",function(){let o=If(e).$implicit,i=mC();return wf(i.setFilter(o.key))}),vs(1,"mat-icon",10),WC(2),fl(),vs(3,"span"),WC(4),fl(),eC(5,ue,2,1,"span",16),fl();}if(n&2){let e=t.$implicit,r=mC();Hg("active",r.activeFilter()===e.key),Cg("aria-selected",r.activeFilter()===e.key),XE(2),Zg(e.icon),XE(2),Zg(e.label),XE(),tC(r.filterCounts()[e.key]>0?5:-1);}}function _e(n,t){n&1&&(vs(0,"div",12),bg(1,"mat-spinner",17),vs(2,"p"),WC(3,"Loading tasks\u2026"),fl()());}function fe(n,t){if(n&1){let e=dC();vs(0,"p"),WC(1,"No tasks yet. Start your first one!"),fl(),vs(2,"button",19),Ag("click",function(){If(e);let o=mC(2);return wf(o.createTask())}),vs(3,"mat-icon"),WC(4,"add"),fl(),WC(5," New Task "),fl();}}function he(n,t){n&1&&(vs(0,"p"),WC(1,"No tasks in this category."),fl());}function ke(n,t){if(n&1&&(vs(0,"div",13)(1,"mat-icon",18),WC(2,"rocket_launch"),fl(),eC(3,fe,6,0)(4,he,2,0,"p"),fl()),n&2){let e=mC();XE(3),tC(e.activeFilter()==="all"?3:4);}}function ve(n,t){if(n&1){let e=dC();vs(0,"app-task-card",25),Ag("stopRequested",function(o){If(e);let i=mC(3);return wf(i.onStopRequested(o))})("deleteRequested",function(o){If(e);let i=mC(3);return wf(i.onDeleteRequested(o))})("starToggled",function(o){If(e);let i=mC(3);return wf(i.onStarToggled(o))})("markDoneRequested",function(o){If(e);let i=mC(3);return wf(i.onMarkDoneRequested(o))})("markActiveRequested",function(o){If(e);let i=mC(3);return wf(i.onMarkActiveRequested(o))}),fl();}if(n&2){let e=t.$implicit;Tg("task",e);}}function Ce(n,t){if(n&1&&(vs(0,"section",20)(1,"h2",21)(2,"mat-icon",22),WC(3),fl(),WC(4),vs(5,"span",23),WC(6),fl()(),vs(7,"div",14),oC(8,ve,1,1,"app-task-card",24,le),fl()()),n&2){let e=t.$implicit;XE(3),Zg(e.icon),XE(),yl(" ",e.label," "),XE(2),Zg(e.tasks.length),XE(2),iC(e.tasks);}}function be(n,t){if(n&1&&oC(0,Ce,10,3,"section",20,de),n&2){let e=mC();iC(e.taskGroups());}}function ye(n,t){if(n&1){let e=dC();vs(0,"app-task-card",25),Ag("stopRequested",function(o){If(e);let i=mC(2);return wf(i.onStopRequested(o))})("deleteRequested",function(o){If(e);let i=mC(2);return wf(i.onDeleteRequested(o))})("starToggled",function(o){If(e);let i=mC(2);return wf(i.onStarToggled(o))})("markDoneRequested",function(o){If(e);let i=mC(2);return wf(i.onMarkDoneRequested(o))})("markActiveRequested",function(o){If(e);let i=mC(2);return wf(i.onMarkActiveRequested(o))}),fl();}if(n&2){let e=t.$implicit;Tg("task",e);}}function xe(n,t){if(n&1&&(vs(0,"div",14),oC(1,ye,1,1,"app-task-card",24,le),fl()),n&2){let e=mC();XE(),iC(e.filteredTasks());}}var Te=[{key:"all",label:"All",icon:"grid_view"},{key:"waiting-you",label:"Waiting for you",icon:"mark_unread_chat_alt"},{key:"in-progress",label:"In progress",icon:"pending"},{key:"paused",label:"Paused",icon:"pause_circle"},{key:"done",label:"Done",icon:"check_circle"}],se=class n{router=g(G);projectState=g(P);threadState=g(U);threadApi=g(N);taskStatus=g(R);userService=g(he$1);projectApi=g(c);destroyRef=g(we);_projectEventStream=g(F);filters=Te;activeFilter=Hi("all");starredOnly=Hi(false);isCreating=Hi(false);isLoadingList=F$1(this.threadState.isLoadingThreadList$,{initialValue:false});username=F$1(this.userService.username$,{initialValue:null});allTasks=this.taskStatus.tasks;filteredTasks=mT(()=>{let t=this.activeFilter(),e=this.username(),r=this.allTasks();return this.starredOnly()&&e&&(r=r.filter(o=>o.starring.includes(e))),t==="all"?r:r.filter(o=>o.status===t)});filterCounts=mT(()=>{let t=this.username(),e=this.allTasks();return this.starredOnly()&&t&&(e=e.filter(r=>r.starring.includes(t))),{all:e.length,"waiting-you":e.filter(r=>r.status==="waiting-you").length,"in-progress":e.filter(r=>r.status==="in-progress").length,paused:e.filter(r=>r.status==="paused").length,done:e.filter(r=>r.status==="done").length}});taskGroups=mT(()=>{let t=this.username(),e=this.allTasks();this.starredOnly()&&t&&(e=e.filter(o=>o.starring.includes(t)));let r=[{status:"waiting-you",label:"Waiting for you",icon:"mark_unread_chat_alt",tasks:[]},{status:"in-progress",label:"In progress",icon:"pending",tasks:[]},{status:"done",label:"Done",icon:"check_circle",tasks:[]},{status:"paused",label:"Paused",icon:"pause_circle",tasks:[]},{status:"error",label:"Error",icon:"error",tasks:[]}];for(let o of e){let i=r.find(m=>m.status===o.status);i&&i.tasks.push(o);}return r.filter(o=>o.tasks.length>0)});ngOnInit(){this.userService.fetchCurrentUser().pipe(U$1(this.destroyRef)).subscribe({error:t=>console.warn("[TASK-CONTROL] Could not fetch user:",t)});}setFilter(t){this.activeFilter.set(t);}toggleStarredFilter(){this.starredOnly.update(t=>!t);}createTask(){let t=this.projectState.getSelectedProjectId();!t||this.isCreating()||(this.isCreating.set(true),this.threadApi.createThread().pipe(U$1(this.destroyRef)).subscribe({next:e=>{this.isCreating.set(false),this.router.navigate(["project",t,"thread",e.thread.id]);},error:e=>{console.error("[TASK-CONTROL] Failed to create thread:",e),this.isCreating.set(false);}}));}onStopRequested(t){this.threadApi.stopThread(t).pipe(U$1(this.destroyRef)).subscribe({error:e=>console.error("[TASK-CONTROL] Failed to stop thread:",e)});}onDeleteRequested(t){this.threadApi.deleteThread(t).pipe(U$1(this.destroyRef)).subscribe({next:()=>this.threadState.refreshThreadList(),error:e=>console.error("[TASK-CONTROL] Failed to delete thread:",e)});}onStarToggled(t){let e=this.username();if(!e)return;let r=this.allTasks().find(m=>m.id===t);if(!r)return;let o=r.starring.includes(e),i=o?this.threadApi.unstarThread(t):this.threadApi.starThread(t);this.threadState.updateStarLocal(t,!o,e),i.pipe(U$1(this.destroyRef)).subscribe({error:m=>{console.error("[TASK-CONTROL] Failed to toggle star:",m),this.threadState.refreshThreadList();}});}onMarkDoneRequested(t){let e=this.projectState.getSelectedProjectId();e&&this.projectApi.markThreadDone(e,t).pipe(U$1(this.destroyRef)).subscribe({next:()=>this.threadState.refreshThreadList(),error:r=>console.error("[TASK-CONTROL] Failed to mark task as done:",r)});}onMarkActiveRequested(t){let e=this.projectState.getSelectedProjectId();e&&this.projectApi.markThreadActive(e,t).pipe(U$1(this.destroyRef)).subscribe({next:()=>this.threadState.refreshThreadList(),error:r=>console.error("[TASK-CONTROL] Failed to mark task as active:",r)});}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Aw({type:n,selectors:[["app-task-control"]],decls:25,vars:6,consts:[[1,"task-control"],[1,"tc-header"],[1,"tc-title-row"],[1,"tc-title"],[1,"title-icon"],["mat-flat-button","","aria-label","Start a new task",1,"new-task-btn",3,"click","disabled"],["diameter","16"],["role","tablist","aria-label","Filter tasks",1,"tc-filters"],["role","tab",1,"filter-chip",3,"active"],["role","switch","aria-label","Show starred tasks only",1,"filter-chip","starred-filter",3,"click"],[1,"filter-icon"],[1,"tc-grid-wrapper"],[1,"tc-loading"],[1,"tc-empty"],[1,"tc-grid"],["role","tab",1,"filter-chip",3,"click"],[1,"filter-badge"],["diameter","40"],[1,"empty-icon"],["mat-flat-button","",1,"new-task-btn",3,"click"],[1,"tc-group"],[1,"tc-group-title"],[1,"group-icon"],[1,"group-count"],[3,"task"],[3,"stopRequested","deleteRequested","starToggled","markDoneRequested","markActiveRequested","task"]],template:function(e,r){e&1&&(vs(0,"app-sidenav")(1,"div",0)(2,"header",1)(3,"div",2)(4,"h1",3)(5,"mat-icon",4),WC(6,"rocket_launch"),fl(),WC(7," Task Control "),fl(),vs(8,"button",5),Ag("click",function(){return r.createTask()}),eC(9,pe,1,0,"mat-spinner",6)(10,me,2,0,"mat-icon"),WC(11," New Task "),fl()(),vs(12,"nav",7),oC(13,ge,6,6,"button",8,ce),vs(15,"button",9),Ag("click",function(){return r.toggleStarredFilter()}),vs(16,"mat-icon",10),WC(17,"star"),fl(),vs(18,"span"),WC(19,"Starred"),fl()()()(),vs(20,"main",11),eC(21,_e,4,0,"div",12)(22,ke,5,1,"div",13)(23,be,2,0)(24,xe,3,0,"div",14),fl()()()),e&2&&(XE(8),Tg("disabled",r.isCreating()),XE(),tC(r.isCreating()?9:10),XE(4),iC(r.filters),XE(2),Hg("active",r.starredOnly()),Cg("aria-checked",r.starredOnly()),XE(6),tC(r.isLoadingList()?21:r.filteredTasks().length===0?22:r.activeFilter()==="all"?23:24));},dependencies:[A,St,yt,wt,hr,pr,Et,yt$1],styles:[".glass-panel[_ngcontent-%COMP%]{background:var(--glass-bg);backdrop-filter:var(--glass-backdrop-blur);-webkit-backdrop-filter:var(--glass-backdrop-blur);border:1px solid var(--glass-border);box-shadow:var(--glass-shadow)}.glass-interactive[_ngcontent-%COMP%]{background:var(--glass-bg);backdrop-filter:var(--glass-backdrop-blur);-webkit-backdrop-filter:var(--glass-backdrop-blur);border:1px solid var(--glass-border);box-shadow:var(--glass-shadow);transition:all .3s cubic-bezier(.4,0,.2,1)}.glass-interactive[_ngcontent-%COMP%]:hover{transform:translateY(-2px);box-shadow:0 12px 40px #00000026}.glass-interactive[_ngcontent-%COMP%]:active{transform:translateY(0)}.glass-card[_ngcontent-%COMP%]{background:var(--glass-bg);backdrop-filter:var(--glass-backdrop-blur);-webkit-backdrop-filter:var(--glass-backdrop-blur);border:1px solid var(--glass-border);box-shadow:var(--glass-shadow);border-radius:20px;padding:1.5rem}.glass-button[_ngcontent-%COMP%]{background:var(--glass-bg);backdrop-filter:var(--glass-backdrop-blur);-webkit-backdrop-filter:var(--glass-backdrop-blur);border:1px solid var(--glass-border);box-shadow:var(--glass-shadow);transition:all .3s cubic-bezier(.4,0,.2,1)}.glass-button[_ngcontent-%COMP%]:hover{transform:translateY(-2px);box-shadow:0 12px 40px #00000026}.glass-button[_ngcontent-%COMP%]:active{transform:translateY(0)}.glass-button[_ngcontent-%COMP%]{border-radius:12px;padding:.75rem 1.5rem;font-weight:600;cursor:pointer}.glass-button[_ngcontent-%COMP%]:disabled{opacity:.5;cursor:not-allowed;transform:none}.glass-button[_ngcontent-%COMP%]:disabled:hover{transform:none}.smooth-theme-transition[_ngcontent-%COMP%]{transition:background .3s ease,color .3s ease,border-color .3s ease,box-shadow .3s ease}[_nghost-%COMP%]{display:flex;height:100vh;width:100%;overflow:hidden}.task-control[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:hidden;padding:1.5rem;gap:1.25rem;box-sizing:border-box}.tc-header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1rem;flex-shrink:0}.tc-title-row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:1rem}.tc-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin:0;font-size:1.5rem;font-weight:700;color:var(--color-text)}.tc-title[_ngcontent-%COMP%] .title-icon[_ngcontent-%COMP%]{font-size:1.5rem;width:1.5rem;height:1.5rem;color:var(--color-primary)}.new-task-btn[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.375rem;background:var(--color-primary);color:var(--color-text-inverse);border-radius:12px;font-weight:600;padding:0 1rem;height:36px;flex-shrink:0}.new-task-btn[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:1.1rem;width:1.1rem;height:1.1rem}.new-task-btn[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%]{display:inline-block}.tc-filters[_ngcontent-%COMP%]{display:flex;gap:.5rem;flex-wrap:wrap}.filter-chip[_ngcontent-%COMP%]{background:var(--glass-bg);backdrop-filter:var(--glass-backdrop-blur);-webkit-backdrop-filter:var(--glass-backdrop-blur);border:1px solid var(--glass-border);box-shadow:var(--glass-shadow);display:flex;align-items:center;gap:.375rem;padding:.375rem .875rem;border-radius:100px;font-size:.8rem;font-weight:500;color:var(--color-text-secondary);cursor:pointer;border:1px solid var(--color-border);transition:background .15s ease,color .15s ease,border-color .15s ease;white-space:nowrap}.filter-chip[_ngcontent-%COMP%] .filter-icon[_ngcontent-%COMP%]{font-size:.9rem;width:.9rem;height:.9rem}.filter-chip[_ngcontent-%COMP%] .filter-badge[_ngcontent-%COMP%]{background:var(--color-primary);color:var(--color-text-inverse);border-radius:100px;padding:0 .375rem;font-size:.7rem;font-weight:700;min-width:18px;text-align:center;line-height:18px}.filter-chip.active[_ngcontent-%COMP%]{background:var(--color-primary);color:var(--color-text-inverse);border-color:var(--color-primary)}.filter-chip.active[_ngcontent-%COMP%] .filter-icon[_ngcontent-%COMP%]{color:var(--color-text-inverse)}.filter-chip.active[_ngcontent-%COMP%] .filter-badge[_ngcontent-%COMP%]{background:#ffffff4d;color:var(--color-text-inverse)}.filter-chip[_ngcontent-%COMP%]:hover:not(.active){background:var(--color-bg-hover);color:var(--color-text)}.starred-filter.active[_ngcontent-%COMP%]{background:#f5a62326;border-color:#f5a623;color:#f5a623}.starred-filter.active[_ngcontent-%COMP%] .filter-icon[_ngcontent-%COMP%]{color:#f5a623}.tc-group[_ngcontent-%COMP%]{margin-bottom:1.5rem}.tc-group[_ngcontent-%COMP%]:last-child{margin-bottom:0}.tc-group-title[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;margin:0 0 .75rem;font-size:.85rem;font-weight:600;color:var(--color-text-secondary);text-transform:uppercase;letter-spacing:.05em}.tc-group-title[_ngcontent-%COMP%] .group-icon[_ngcontent-%COMP%]{font-size:1rem;width:1rem;height:1rem}.tc-group-title[_ngcontent-%COMP%] .group-count[_ngcontent-%COMP%]{background:var(--color-bg-hover);border-radius:100px;padding:0 .375rem;font-size:.75rem;font-weight:700;min-width:18px;text-align:center;line-height:18px}.tc-grid-wrapper[_ngcontent-%COMP%]{flex:1;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--color-border) transparent}.tc-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:1rem;padding-bottom:1rem}@media(max-width:600px){.tc-grid[_ngcontent-%COMP%]{grid-template-columns:1fr}}.tc-loading[_ngcontent-%COMP%], .tc-empty[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem;height:100%;min-height:240px;color:var(--color-text-secondary);text-align:center}.tc-loading[_ngcontent-%COMP%] p[_ngcontent-%COMP%], .tc-empty[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin:0;font-size:.95rem}.empty-icon[_ngcontent-%COMP%]{font-size:3rem;width:3rem;height:3rem;opacity:.3}"]})};export{se as TaskControlComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {g,G,P,A as Aw,i as hr,p as pr,v as vs,l as Ag,W as WC,k as fl,n as eC,X as XE,r as Tg,t as tC,a5 as yl,al as yt$1,am as Gm,a9 as dC,ai as Jg,aa as If,aj as KC,ab as wf,a3 as HI,ak as Xg,a6 as $I,D as Fg,I as IC,E as wC,ac as mC,a8 as Zg}from'./main-
|
|
1
|
+
import {g,G,P,A as Aw,i as hr,p as pr,v as vs,l as Ag,W as WC,k as fl,n as eC,X as XE,r as Tg,t as tC,a5 as yl,al as yt$1,am as Gm,a9 as dC,ai as Jg,aa as If,aj as KC,ab as wf,a3 as HI,ak as Xg,a6 as $I,D as Fg,I as IC,E as wC,ac as mC,a8 as Zg}from'./main-FEA3BAHM.js';import {y as yt,w as wt,t as ti,Y as Ye,Z as Zn,c as cn}from'./chunk-DFaRJnOg.js';var J=["inputElement"];function K(o,r){if(o&1&&(vs(0,"span",3),WC(1),fl()),o&2){let t=mC();XE(),Zg(t.label);}}function U(o,r){if(o&1&&(vs(0,"small",5),WC(1),fl()),o&2){let t=mC();XE(),Zg(t.hint);}}var h=class o{label="";placeholder="";hint="";isDisabled=false;value="";autoFocus=true;valueChange=new yt$1;enterPressed=new yt$1;inputElement;inputValue="";ngAfterViewInit(){this.inputValue=this.value,this.autoFocus&&setTimeout(()=>this.inputElement?.nativeElement.focus(),100);}onValueChange(r){this.valueChange.emit(r);}onEnter(){this.inputValue.trim()&&this.enterPressed.emit(this.inputValue.trim());}focus(){this.inputElement?.nativeElement.focus();}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=Aw({type:o,selectors:[["app-text-input"]],viewQuery:function(t,e){if(t&1&&Fg(J,5),t&2){let p;IC(p=wC())&&(e.inputElement=p.first);}},inputs:{label:"label",placeholder:"placeholder",hint:"hint",isDisabled:"isDisabled",value:"value",autoFocus:"autoFocus"},outputs:{valueChange:"valueChange",enterPressed:"enterPressed"},decls:6,vars:5,consts:[["inputElement",""],[1,"text-input-container"],[1,"text-input-wrapper"],[1,"text-input-label"],["type","text",1,"text-input-field",3,"ngModelChange","keydown.enter","ngModel","placeholder","disabled"],[1,"text-input-hint"]],template:function(t,e){if(t&1){let p=dC();vs(0,"div",1)(1,"label",2),eC(2,K,2,1,"span",3),vs(3,"input",4,0),Jg("ngModelChange",function(m){return If(p),KC(e.inputValue,m)||(e.inputValue=m),wf(m)}),Ag("ngModelChange",function(m){return e.onValueChange(m)})("keydown.enter",function(){return e.onEnter()}),fl(),HI(),fl(),eC(5,U,2,1,"small",5),fl();}t&2&&(XE(2),tC(e.label?2:-1),XE(),Xg("ngModel",e.inputValue),Tg("placeholder",e.placeholder)("disabled",e.isDisabled),$I(),XE(2),tC(e.hint?5:-1));},dependencies:[ti,Ye,Zn,cn,Gm],styles:[".text-input-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%}.text-input-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem;width:100%;cursor:text}.text-input-label[_ngcontent-%COMP%]{font-size:.95rem;font-weight:500;color:var(--color-text);margin:0}.text-input-field[_ngcontent-%COMP%]{width:100%;padding:.75rem 1rem;font-size:1rem;color:var(--color-text);background:var(--color-bg);border:1px solid var(--color-border);border-radius:8px;outline:none;transition:all .2s ease}.text-input-field[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary);opacity:.7}.text-input-field[_ngcontent-%COMP%]:focus{border-color:var(--color-primary);box-shadow:0 0 0 3px rgba(var(--color-primary-rgb),.1)}.text-input-field[_ngcontent-%COMP%]:disabled{opacity:.6;cursor:not-allowed;background:var(--color-surface)}.text-input-hint[_ngcontent-%COMP%]{font-size:.85rem;color:var(--color-text-secondary);margin:0;font-style:italic}@media(max-width:768px){.text-input-field[_ngcontent-%COMP%]{padding:.65rem .85rem;font-size:.95rem}.text-input-label[_ngcontent-%COMP%]{font-size:.9rem}.text-input-hint[_ngcontent-%COMP%]{font-size:.8rem}}"],changeDetection:1})};function X(o,r){if(o&1&&(vs(0,"div",8),WC(1),fl()),o&2){let t=mC();XE(),Zg(t.errorMessage);}}var L=class o{router=g(G);projectStateService=g(P);projectName="";projectPath="";isCreating=false;errorMessage=null;isValid(){return this.projectName.trim()!==""&&this.projectPath.trim()!==""}onCreate(){if(!this.isValid()){this.errorMessage="Both name and path are required";return}this.isCreating=true,this.errorMessage=null,this.projectStateService.createProject(this.projectName.trim(),this.projectPath.trim()).subscribe({next:()=>{let r=this.projectName.trim();this.isCreating=false,this.projectStateService.selectProject(r),this.router.navigate(["project",r]);},error:r=>{this.errorMessage=r.error?.error??"Failed to create project",this.isCreating=false;}});}onCancel(){this.router.navigate(["/"]);}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=Aw({type:o,selectors:[["app-project-new"]],decls:19,vars:9,consts:[[1,"project-new-page"],[1,"project-new-card"],["mat-button","",1,"project-new__back",3,"click"],[1,"project-new__title"],[1,"project-new__subtitle"],[1,"project-new__form"],["label","Project name","placeholder","my-project",3,"valueChange","value","isDisabled","autoFocus"],["label","Project path","placeholder","/path/to/project","hint","Absolute path to the project directory",3,"valueChange","enterPressed","value","isDisabled"],[1,"project-new__error"],[1,"project-new__actions"],["mat-button","",3,"click","disabled"],["mat-flat-button","","color","primary",3,"click","disabled"]],template:function(t,e){t&1&&(vs(0,"div",0)(1,"div",1)(2,"button",2),Ag("click",function(){return e.onCancel()}),vs(3,"mat-icon"),WC(4,"arrow_back"),fl(),WC(5," Back to projects "),fl(),vs(6,"h1",3),WC(7,"New project"),fl(),vs(8,"p",4),WC(9,"Point Coday to an existing directory on your machine."),fl(),vs(10,"div",5)(11,"app-text-input",6),Ag("valueChange",function(d){return e.projectName=d}),fl(),vs(12,"app-text-input",7),Ag("valueChange",function(d){return e.projectPath=d})("enterPressed",function(){return e.onCreate()}),fl(),eC(13,X,2,1,"div",8),fl(),vs(14,"div",9)(15,"button",10),Ag("click",function(){return e.onCancel()}),WC(16,"Cancel"),fl(),vs(17,"button",11),Ag("click",function(){return e.onCreate()}),WC(18),fl()()()()),t&2&&(XE(11),Tg("value",e.projectName)("isDisabled",e.isCreating)("autoFocus",true),XE(),Tg("value",e.projectPath)("isDisabled",e.isCreating),XE(),tC(e.errorMessage?13:-1),XE(2),Tg("disabled",e.isCreating),XE(2),Tg("disabled",!e.isValid()||e.isCreating),XE(),yl(" ",e.isCreating?"Creating\u2026":"Create project"," "));},dependencies:[hr,pr,yt,wt,h],styles:[".project-new-page[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:center;min-height:100vh;width:100%;background:var(--color-bg);padding:2rem 1.5rem;box-sizing:border-box}.project-new-card[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.5rem;width:100%;max-width:560px;padding:2rem;background:var(--color-bg-secondary, rgba(255, 255, 255, .7));border:1px solid var(--color-border, rgba(0, 0, 0, .1));border-radius:16px;box-shadow:var(--glass-shadow, 0 8px 32px rgba(31, 38, 135, .15));margin-top:2rem}.project-new__back[_ngcontent-%COMP%]{align-self:flex-start;margin-left:-.5rem;color:var(--color-text-secondary, #6e6e73)}.project-new__title[_ngcontent-%COMP%]{margin:0;font-size:1.625rem;font-weight:700;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.project-new__subtitle[_ngcontent-%COMP%]{margin:-.75rem 0 0;font-size:.9375rem;color:var(--color-text-secondary, #6e6e73)}.project-new__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.project-new__error[_ngcontent-%COMP%]{padding:.75rem 1rem;background:#dc262614;border:1px solid rgba(220,38,38,.25);border-radius:8px;color:var(--color-error, #ff3b30);font-size:.875rem}.project-new__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;justify-content:flex-end;padding-top:.25rem}"],changeDetection:1})};export{L as ProjectNewComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {z}from'./chunk-
|
|
1
|
+
import {z}from'./chunk-CTx3Z0hA.js';import {s}from'./chunk-CH0b9ss9.js';import {g as g$1,G,P,R as Re,w as we,F,m as mT,z as z$1,a as P$1,ae as Ot,b as U,A as Aw,j as Gn,s as si,v as vs,l as Ag,o as bg,k as fl,af as Dg,ag as fT,T as TC,X as XE,r as Tg,a9 as dC,aa as If,ac as mC,ab as wf,W as WC,ah as rT}from'./main-FEA3BAHM.js';import'./chunk-_kolzKbl.js';import {W as Wn,o as ot}from'./chunk-DXVBbChn.js';import'./chunk-BxT6IsjS.js';import {y as yt,w as wt}from'./chunk-DFaRJnOg.js';var ee=()=>[];function te(u,t){if(u&1){let o=dC();vs(0,"div",5)(1,"ds-entity-card",6),Ag("selected",function(r){If(o);let i=mC();return wf(i.onItemSelected(r))}),fl(),vs(2,"button",7),Ag("click",function(r){let i=If(o).$implicit,f=mC();return r.stopPropagation(),wf(f.onDeleteRequested(i.id))}),vs(3,"mat-icon"),WC(4,"close"),fl()()();}if(u&2){let o=t.$implicit;XE(),Tg("id",o.id)("name",o.name)("description",o.description)("badges",o.badges??rT(4,ee));}}var g="__",Y=class u{router=g$1(G);projectStateService=g$1(P);dialog=g$1(Re);destroyRef=g$1(we);notification=g$1(s);projects=F(this.projectStateService.projectList$);forcedProject=F(this.projectStateService.forcedProject$,{initialValue:null});isLoading=F(this.projectStateService.isLoading$,{initialValue:false});projectItems=mT(()=>{let t=this.projects();if(!t)return [];let o=t.filter(e=>!e.name.includes(g)),n=t.filter(e=>e.name.includes(g)),r=new Set(o.map(e=>e.name)),i=e=>e.split(g)[0]??null,f=new Set(n.map(e=>i(e.name)).filter(e=>e!==null&&r.has(e))),l=[],G=[...f].sort((e,a)=>e.localeCompare(a));for(let e of G){let a=o.find(s=>s.name===e);l.push(z$1(P$1({},this.toEntityListItem(a)),{groupKey:e,groupLabel:e}));let Z=n.filter(s=>i(s.name)===e).sort((s,C)=>s.name.localeCompare(C.name));for(let s of Z){let C=s.name.slice(e.length+g.length);l.push(z$1(P$1({},this.toEntityListItem(s)),{name:C,description:s.name,groupKey:e,groupLabel:e}));}}let H=[...o].filter(e=>!f.has(e.name)&&!e.volatile).sort((e,a)=>e.name.localeCompare(a.name));for(let e of H)l.push(z$1(P$1({},this.toEntityListItem(e)),{groupKey:"__standalone__",groupLabel:"Projects"}));let Q=[...o].filter(e=>!f.has(e.name)&&e.volatile).sort((e,a)=>e.name.localeCompare(a.name));for(let e of Q)l.push(z$1(P$1({},this.toEntityListItem(e)),{groupKey:"__volatile__",groupLabel:"Temporary"}));let X=n.filter(e=>{let a=i(e.name);return a!==null&&!r.has(a)}).sort((e,a)=>e.name.localeCompare(a.name));for(let e of X)l.push(z$1(P$1({},this.toEntityListItem(e)),{groupKey:"__orphaned__",groupLabel:"Orphaned worktrees"}));return l});showCreateButton=mT(()=>!this.forcedProject());constructor(){}onItemSelected(t){this.projectStateService.selectProject(t),this.router.navigate(["project",t]);}onCreateRequested(){this.router.navigate(["project","new"]);}onDeleteRequested(t){let o=t.includes(g);this.dialog.open(z,{width:"400px",panelClass:"confirm-dialog-panel",data:P$1({title:"Delete project",message:`This will remove the project "${t}" from Coday and archive its configuration. The project source code on disk is not affected.`,confirmLabel:"Delete",cancelLabel:"Cancel",isDestructive:true},o?{checkboxLabel:"Also remove git worktree from disk"}:{})}).afterClosed().pipe(Ot(r=>r?.confirmed===true),U(this.destroyRef)).subscribe(r=>{this.notification.info("Deleting project\u2026"),this.projectStateService.deleteProject(t,r.checkboxChecked).pipe(U(this.destroyRef)).subscribe({next:()=>{this.notification.success(`Project "${t}" deleted`),this.router.url.includes(`/project/${encodeURIComponent(t)}`)&&this.router.navigate(["/"]);},error:i=>{console.error("[PROJECT-LIST] Failed to delete project:",i),this.notification.error(i?.error?.error??"Failed to delete project");}});});}toEntityListItem(t){return {id:t.name,name:t.name,badges:t.volatile?[{label:"temp",variant:"warning"}]:[]}}static \u0275fac=function(o){return new(o||u)};static \u0275cmp=Aw({type:u,selectors:[["app-project-selection"]],decls:6,vars:5,consts:[["projectCard",""],[1,"project-page-layout"],["title","Projects","contentMaxWidth","1400px","searchPlaceholder","Filter projects\u2026","emptyMessage","No projects found.",3,"itemSelected","createRequested","items","loading","itemTemplate","showCreate","autoFocusSearch"],["toolbar-start","","routerLink","/","title","Back to tasks",1,"project-list__logo"],["src","CODAY-Logo.png","alt","Coday"],[1,"project-card-wrapper"],[3,"selected","id","name","description","badges"],["mat-icon-button","","title","Delete project",1,"project-card-wrapper__delete",3,"click"]],template:function(o,n){if(o&1&&(vs(0,"div",1)(1,"ds-entity-list",2),Ag("itemSelected",function(i){return n.onItemSelected(i)})("createRequested",function(){return n.onCreateRequested()}),vs(2,"a",3),bg(3,"img",4),fl()()(),Dg(4,te,5,5,"ng-template",null,0,fT)),o&2){let r=TC(5);XE(),Tg("items",n.projectItems())("loading",n.isLoading())("itemTemplate",r)("showCreate",n.showCreateButton())("autoFocusSearch",true);}},dependencies:[Wn,ot,yt,wt,Gn,si],styles:["[_nghost-%COMP%]{display:block;width:100%;min-height:100vh;background:var(--color-bg);overflow-y:auto}.project-page-layout[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:100%}.project-list__logo[_ngcontent-%COMP%]{display:flex;align-items:center;flex-shrink:0;border-radius:4px;opacity:.85;transition:opacity .15s ease;cursor:pointer}.project-list__logo[_ngcontent-%COMP%]:hover{opacity:1}.project-list__logo[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:40px;height:40px;object-fit:contain;border-radius:4px}.project-card-wrapper[_ngcontent-%COMP%]{position:relative}.project-card-wrapper__delete[_ngcontent-%COMP%]{position:absolute;top:4px;right:4px;width:28px;height:28px;line-height:28px;padding:0;opacity:0;transition:opacity .15s ease;color:var(--color-text-secondary, #6e6e73)}.project-card-wrapper__delete[_ngcontent-%COMP%] .mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px}.project-card-wrapper__delete[_ngcontent-%COMP%]:hover{color:var(--color-error, #ff3b30)}.project-card-wrapper[_ngcontent-%COMP%]:hover .project-card-wrapper__delete[_ngcontent-%COMP%]{opacity:1}"],changeDetection:1})};export{Y as ProjectListComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import {c}from'./chunk-Bh_9bCDZ.js';import {g,ao as V,G,w as we$1,d8 as M,d9 as he$1,da as fe$1,H as Hi,db as ge$1,F,bQ as bd,m as mT,Q as By,b as U,a7 as ga,S as ha,z as z$1,a as P,A as Aw,v as vs,l as Ag,W as WC,k as fl,n as eC,X as XE,a5 as yl,t as tC,a9 as dC,o as bg,a3 as HI,q as oC,ac as mC,r as Tg,y as Hg,a6 as $I,x as iC,a8 as Zg,aa as If,ab as wf,bj as yh}from'./main-DXWHG4XK.js';import {o as z,k as _t,b as _e$1,n as ni,J as Jn,Q as Qn,e as ei,Y as Ye,f as fn,a as wt,A as At,Z as Zn,l as Xn,$ as $t,C as Cn,E as En}from'./chunk-BBJc_ez4.js';var A=(n,t)=>t.value,se=(n,t)=>t.id;function pe(n,t){n&1&&(vs(0,"p",5),WC(1,"Loading\u2026"),fl());}function ue(n,t){n&1&&(vs(0,"span",12),WC(1," Name is required. "),fl());}function fe(n,t){if(n&1&&(vs(0,"p",40),WC(1),fl(),vs(2,"span",13),WC(3,"Agent Config cannot be changed after creation."),fl()),n&2){let e=mC(2);XE(),Zg(e.resolveAgentConfigName(e.agentConfigIdControl.value));}}function _e(n,t){if(n&1&&(vs(0,"a",41),WC(1,"Add an agent config"),fl(),WC(2," first. ")),n&2){let e=mC(3);Tg("href","/agentos/"+e.namespaceId+"/agent-configs/new",yh);}}function he(n,t){if(n&1&&(vs(0,"p",13),WC(1," No agent configs available in this scope yet. "),eC(2,_e,3,1),fl()),n&2){let e=mC(2);XE(2),tC(e.isPlatformMode?-1:2);}}function ge(n,t){if(n&1&&(vs(0,"option",23),WC(1),fl()),n&2){let e=t.$implicit;Tg("value",e.id),XE(),Zg(e.name);}}function Ce(n,t){n&1&&(vs(0,"span",12),WC(1,"Agent Config is required."),fl());}function ve(n,t){if(n&1&&(vs(0,"select",42)(1,"option",43),WC(2,"Select an agent config\u2026"),fl(),oC(3,ge,2,2,"option",23,se),fl(),HI(),eC(5,Ce,2,0,"span",12),vs(6,"span",13),WC(7,"Immutable after creation."),fl()),n&2){let e=mC(2);Tg("formControl",e.agentConfigIdControl),$I(),XE(3),iC(e.availableAgentConfigs()),XE(2),tC(e.agentConfigIdControl.invalid&&e.agentConfigIdControl.touched?5:-1);}}function ye(n,t){n&1&&(vs(0,"span",12),WC(1,"Opening message is required."),fl());}function be(n,t){if(n&1&&(vs(0,"option",23),WC(1),fl()),n&2){let e=t.$implicit;Tg("value",e.value),XE(),Zg(e.label);}}function xe(n,t){if(n&1){let e=dC();vs(0,"label",46)(1,"input",47),Ag("change",function(){let h=If(e).$implicit,P=mC(3);return wf(P.toggleDay(h.value))}),fl(),vs(2,"span",48),WC(3),fl()();}if(n&2){let e=t.$implicit,l=mC(3);XE(),Tg("checked",l.isDaySelected(e.value)),XE(2),Zg(e.label);}}function Se(n,t){if(n&1&&(vs(0,"div",8)(1,"span",44),WC(2,"Days of week"),fl(),vs(3,"div",45),oC(4,xe,4,2,"label",46,A),fl(),vs(6,"span",13),WC(7,"Leave empty to run every day of the week."),fl()()),n&2){let e=mC(2);XE(4),iC(e.dayOptions);}}function Pe(n,t){n&1&&(vs(0,"span",12),WC(1,"Valid time is required (HH:mm)."),fl());}function Ee(n,t){n&1&&(vs(0,"span",12),WC(1,"Start date is required."),fl());}function Me(n,t){if(n&1&&(vs(0,"option",23),WC(1),fl()),n&2){let e=t.$implicit;Tg("value",e.value),XE(),Zg(e.label);}}function Oe(n,t){n&1&&(vs(0,"span",12),WC(1,"End date is required."),fl());}function De(n,t){if(n&1&&(vs(0,"div",8)(1,"label",49),WC(2," End date "),vs(3,"span",10),WC(4,"*"),fl()(),bg(5,"input",50),HI(),eC(6,Oe,2,0,"span",12),fl()),n&2){let e=mC(2);XE(5),Hg("scheduled-prompt-form__input--invalid",e.form.hasError("endDateRequired")&&e.endDateControl.touched),Tg("formControl",e.endDateControl),$I(),XE(),tC(e.form.hasError("endDateRequired")&&e.endDateControl.touched?6:-1);}}function Te(n,t){n&1&&(vs(0,"span",12),WC(1,"Must be at least 1."),fl());}function we(n,t){if(n&1&&(vs(0,"div",8)(1,"label",51),WC(2," Number of occurrences "),vs(3,"span",10),WC(4,"*"),fl()(),bg(5,"input",52),HI(),eC(6,Te,2,0,"span",12),fl()),n&2){let e=mC(2);XE(5),Hg("scheduled-prompt-form__input--invalid",e.form.hasError("occurrenceCountRequired")&&e.occurrenceCountControl.touched),Tg("formControl",e.occurrenceCountControl),$I(),XE(),tC(e.form.hasError("occurrenceCountRequired")&&e.occurrenceCountControl.touched?6:-1);}}function ke(n,t){if(n&1&&(vs(0,"p",36),WC(1),fl()),n&2){let e=mC(2);XE(),Zg(e.errorMessage());}}function Fe(n,t){if(n&1){let e=dC();vs(0,"form",7),Ag("ngSubmit",function(){If(e);let h=mC();return wf(h.submit())}),vs(1,"div",8)(2,"label",9),WC(3," Name "),vs(4,"span",10),WC(5,"*"),fl()(),bg(6,"input",11),HI(),eC(7,ue,2,0,"span",12),vs(8,"span",13),WC(9,'Free-form name (e.g. "Weekly Report"). Cannot be changed after creation.'),fl()(),vs(10,"div",8)(11,"label",14),WC(12,"Description"),fl(),bg(13,"input",15),HI(),fl(),vs(14,"div",8)(15,"label",16),WC(16," Agent Config "),vs(17,"span",10),WC(18,"*"),fl()(),eC(19,fe,4,1)(20,he,3,1,"p",13)(21,ve,8,2),fl(),vs(22,"div",8)(23,"label",17),WC(24," Opening message "),vs(25,"span",10),WC(26,"*"),fl()(),bg(27,"textarea",18),HI(),eC(28,ye,2,0,"span",12),vs(29,"span",13),WC(30," The message sent to the agent when the scheduled prompt fires. "),fl()(),vs(31,"fieldset",19)(32,"legend",20),WC(33,"Recurrence"),fl(),vs(34,"div",8)(35,"label",21),WC(36," Unit "),vs(37,"span",10),WC(38,"*"),fl()(),vs(39,"select",22),oC(40,be,2,2,"option",23,A),fl(),HI(),fl(),eC(42,Se,8,0,"div",8),vs(43,"div",8)(44,"label",24),WC(45," Time (UTC) "),vs(46,"span",10),WC(47,"*"),fl()(),vs(48,"div",25),bg(49,"input",26),HI(),vs(50,"span",27),WC(51,"UTC"),fl()(),eC(52,Pe,2,0,"span",12),fl()(),vs(53,"fieldset",19)(54,"legend",20),WC(55,"Planning"),fl(),vs(56,"div",8)(57,"label",28),WC(58," Start date "),vs(59,"span",10),WC(60,"*"),fl()(),bg(61,"input",29),HI(),eC(62,Ee,2,0,"span",12),fl(),vs(63,"div",8)(64,"label",30),WC(65," Ends "),vs(66,"span",10),WC(67,"*"),fl()(),vs(68,"select",31),oC(69,Me,2,2,"option",23,A),fl(),HI(),fl(),eC(71,De,7,4,"div",8),eC(72,we,7,4,"div",8),fl(),vs(73,"div",8)(74,"label",32),bg(75,"input",33),HI(),vs(76,"span",34),WC(77,"Enabled"),fl()(),vs(78,"p",35),WC(79," When disabled, the scheduled prompt is saved but will not run on schedule. "),fl()(),eC(80,ke,2,1,"p",36),vs(81,"div",37)(82,"button",38),WC(83),fl(),vs(84,"button",39),Ag("click",function(){If(e);let h=mC();return wf(h.cancel())}),WC(85,"Cancel"),fl()()();}if(n&2){let e=mC();Tg("formGroup",e.form),XE(6),Hg("scheduled-prompt-form__input--invalid",e.nameControl.invalid&&e.nameControl.touched),Tg("formControl",e.nameControl),$I(),XE(),tC(e.nameControl.invalid&&e.nameControl.touched?7:-1),XE(6),Tg("formControl",e.descriptionControl),$I(),XE(6),tC(e.isEditMode()?19:e.availableAgentConfigs().length===0?20:21),XE(8),Hg("scheduled-prompt-form__textarea--invalid",e.promptContentControl.invalid&&e.promptContentControl.touched),Tg("formControl",e.promptContentControl),$I(),XE(),tC(e.promptContentControl.invalid&&e.promptContentControl.touched?28:-1),XE(11),Tg("formControl",e.unitControl),$I(),XE(),iC(e.schedulerUnits),XE(2),tC(e.showDayFilter()?42:-1),XE(7),Tg("formControl",e.timeUtcControl),$I(),XE(3),tC(e.timeUtcControl.invalid&&e.timeUtcControl.touched?52:-1),XE(9),Hg("scheduled-prompt-form__input--invalid",e.startDateControl.invalid&&e.startDateControl.touched),Tg("formControl",e.startDateControl),$I(),XE(),tC(e.startDateControl.invalid&&e.startDateControl.touched?62:-1),XE(6),Tg("formControl",e.endTypeControl),$I(),XE(),iC(e.endTypes),XE(2),tC(e.showEndDate()?71:-1),XE(),tC(e.showOccurrenceCount()?72:-1),XE(3),Tg("formControl",e.enabledControl),$I(),XE(5),tC(e.errorMessage()?80:-1),XE(2),Tg("disabled",e.form.invalid||e.isSubmitting()),XE(),yl(" ",e.isEditMode()?"Save changes":"Create scheduled prompt"," ");}}var me=class n{route=g(V);router=g(G);destroyRef=g(we$1);state=g(c);agentConfigController=g(M);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=!this.namespaceId;form=new z({name:new _t("",{nonNullable:true,validators:[_e$1.required]}),description:new _t(null),agentConfigId:new _t("",{nonNullable:true,validators:[_e$1.required]}),promptContent:new _t("",{nonNullable:true,validators:[_e$1.required]}),unit:new _t(fe$1.WEEK,{nonNullable:true,validators:[_e$1.required]}),days:new _t([],{nonNullable:true}),timeUtc:new _t("09:00",{nonNullable:true,validators:[_e$1.required,_e$1.pattern(/^([01]\d|2[0-3]):[0-5]\d$/)]}),startDate:new _t("",{nonNullable:true,validators:[_e$1.required]}),endType:new _t(he$1.NEVER,{nonNullable:true,validators:[_e$1.required]}),endDate:new _t(null),occurrenceCount:new _t(null),enabled:new _t(true,{nonNullable:true})},{validators:[Ne,Ie]});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get agentConfigIdControl(){return this.form.controls.agentConfigId}get promptContentControl(){return this.form.controls.promptContent}get unitControl(){return this.form.controls.unit}get daysControl(){return this.form.controls.days}get timeUtcControl(){return this.form.controls.timeUtc}get startDateControl(){return this.form.controls.startDate}get endTypeControl(){return this.form.controls.endType}get endDateControl(){return this.form.controls.endDate}get occurrenceCountControl(){return this.form.controls.occurrenceCount}get enabledControl(){return this.form.controls.enabled}isEditMode=Hi(false);isSubmitting=Hi(false);isLoading=Hi(false);errorMessage=Hi(null);SchedulerUnit=fe$1;SchedulerEndType=he$1;schedulerUnits=[{value:fe$1.WEEK,label:"Week(s)"},{value:fe$1.MONTH,label:"Month(s)"}];endTypes=[{value:he$1.NEVER,label:"Never"},{value:he$1.ON_DATE,label:"On date"},{value:he$1.OCCURRENCES,label:"After N occurrences"}];dayOptions=Object.entries(ge$1).map(([t,e])=>({value:t,label:e}));unitSignal=F(this.unitControl.valueChanges.pipe(bd(this.unitControl.value)));endTypeSignal=F(this.endTypeControl.valueChanges.pipe(bd(this.endTypeControl.value)));showDayFilter=mT(()=>this.unitSignal()===fe$1.WEEK);showEndDate=mT(()=>this.endTypeSignal()===he$1.ON_DATE);showOccurrenceCount=mT(()=>this.endTypeSignal()===he$1.OCCURRENCES);agentConfigs=Hi([]);availableAgentConfigs=this.agentConfigs.asReadonly();existingPrompt=null;ngOnInit(){this.startDateControl.setValue(Ve());let t=this.route.snapshot.paramMap.get("scheduledPromptId");t?(this.isEditMode.set(true),this.loadPromptAndResources(t)):this.loadResources();}loadPromptAndResources(t){this.isLoading.set(true),By({prompt:this.state.getById(t),agentConfigs:this.agentConfigs$()}).pipe(U(this.destroyRef)).subscribe({next:({prompt:e,agentConfigs:l})=>{this.existingPrompt=e,this.agentConfigs.set(l),this.hydrateForm(e),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),this.navigateBack();}});}loadResources(){this.agentConfigs$().pipe(U(this.destroyRef)).subscribe(t=>this.agentConfigs.set(t));}agentConfigs$(){return (this.isPlatformMode?this.agentConfigController.listPlatformAgentsAgentConfig():this.agentConfigController.listByParentAgentConfig(this.namespaceId)).pipe(ga(()=>ha([])))}hydrateForm(t){this.nameControl.setValue(t.name),this.descriptionControl.setValue(t.description??null),this.agentConfigIdControl.setValue(t.agentConfigId),this.promptContentControl.setValue(t.promptContent),this.unitControl.setValue(t.recurrence.unit),this.daysControl.setValue(t.recurrence.days??[]),this.timeUtcControl.setValue(t.recurrence.timeUtc),this.startDateControl.setValue(t.planning.startDate),this.endTypeControl.setValue(t.planning.endType),this.endDateControl.setValue(t.planning.endDate??null),this.occurrenceCountControl.setValue(t.planning.maxOccurrenceCount??null),this.enabledControl.setValue(t.enabled);}isDaySelected(t){return this.daysControl.value.includes(t)}toggleDay(t){let e=this.daysControl.value,l=e.includes(t)?e.filter(h=>h!==t):[...e,t];this.daysControl.setValue(l);}resolveAgentConfigName(t){return this.agentConfigs().find(e=>e.id===t)?.name??t}submit(){if(this.form.invalid||this.isSubmitting())return;this.isSubmitting.set(true),this.errorMessage.set(null);let t=this.isEditMode()&&!!this.existingPrompt?.id,e=this.endTypeControl.value,l=z$1(P({},this.existingPrompt??{}),{namespaceId:this.namespaceId??null,name:this.nameControl.value.trim(),description:this.descriptionControl.value?.trim()||void 0,agentConfigId:t?this.existingPrompt.agentConfigId:this.agentConfigIdControl.value,promptContent:this.promptContentControl.value.trim(),recurrence:{unit:this.unitControl.value,days:this.daysControl.value,timeUtc:this.timeUtcControl.value},planning:{startDate:this.startDateControl.value,endType:e,endDate:e===he$1.ON_DATE?this.endDateControl.value??void 0:void 0,maxOccurrenceCount:e===he$1.OCCURRENCES?this.occurrenceCountControl.value??void 0:void 0},enabled:this.enabledControl.value});(t?this.state.update(this.existingPrompt.id,l):this.state.create(l)).pipe(U(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:P=>{this.isSubmitting.set(false),P.status===409?this.errorMessage.set(`A scheduled prompt named "${l.name}" already exists in this scope.`):P.status===400?this.errorMessage.set(P.error?.message??"Invalid scheduled prompt data."):this.errorMessage.set("An unexpected error occurred. Please try again.");}});}cancel(){this.navigateBack();}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","scheduled-prompts"]):this.router.navigate(["/agentos",this.namespaceId,"scheduled-prompts"]);}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Aw({type:n,selectors:[["agentos-scheduled-prompt-form"]],decls:10,vars:3,consts:[[1,"scheduled-prompt-form"],[1,"scheduled-prompt-form__header"],["type","button","title","Back to scheduled prompts",1,"scheduled-prompt-form__back",3,"click"],[1,"scheduled-prompt-form__back-icon"],[1,"scheduled-prompt-form__title"],[1,"scheduled-prompt-form__loading"],[1,"scheduled-prompt-form__form",3,"formGroup"],[1,"scheduled-prompt-form__form",3,"ngSubmit","formGroup"],[1,"scheduled-prompt-form__field"],["for","sp-name",1,"scheduled-prompt-form__label"],["aria-hidden","true"],["id","sp-name","type","text","placeholder","e.g. Weekly Report","autocomplete","off",1,"scheduled-prompt-form__input",3,"formControl"],[1,"scheduled-prompt-form__field-error"],[1,"scheduled-prompt-form__field-hint"],["for","sp-description",1,"scheduled-prompt-form__label"],["id","sp-description","type","text","placeholder","Optional \u2014 short description","autocomplete","off",1,"scheduled-prompt-form__input",3,"formControl"],["for","sp-agent-config",1,"scheduled-prompt-form__label"],["for","sp-prompt-content",1,"scheduled-prompt-form__label"],["id","sp-prompt-content","rows","6","placeholder","Enter the message sent to the agent when the scheduled prompt fires\u2026",1,"scheduled-prompt-form__textarea",3,"formControl"],[1,"scheduled-prompt-form__fieldset"],[1,"scheduled-prompt-form__legend"],["for","sp-unit",1,"scheduled-prompt-form__label"],["id","sp-unit",1,"scheduled-prompt-form__select",3,"formControl"],[3,"value"],["for","sp-time",1,"scheduled-prompt-form__label"],[1,"scheduled-prompt-form__time-wrapper"],["id","sp-time","type","time",1,"scheduled-prompt-form__input","scheduled-prompt-form__input--time",3,"formControl"],[1,"scheduled-prompt-form__utc-badge"],["for","sp-start-date",1,"scheduled-prompt-form__label"],["id","sp-start-date","type","date",1,"scheduled-prompt-form__input",3,"formControl"],["for","sp-end-type",1,"scheduled-prompt-form__label"],["id","sp-end-type",1,"scheduled-prompt-form__select",3,"formControl"],[1,"scheduled-prompt-form__toggle-label"],["type","checkbox",1,"scheduled-prompt-form__toggle-checkbox",3,"formControl"],[1,"scheduled-prompt-form__toggle-text"],[1,"scheduled-prompt-form__toggle-hint"],[1,"scheduled-prompt-form__error"],[1,"scheduled-prompt-form__actions"],["type","submit",1,"scheduled-prompt-form__btn","scheduled-prompt-form__btn--primary",3,"disabled"],["type","button",1,"scheduled-prompt-form__btn",3,"click"],[1,"scheduled-prompt-form__readonly-value"],[3,"href"],["id","sp-agent-config",1,"scheduled-prompt-form__select",3,"formControl"],["value","","disabled",""],[1,"scheduled-prompt-form__label"],[1,"scheduled-prompt-form__day-grid"],[1,"scheduled-prompt-form__day-label"],["type","checkbox",1,"scheduled-prompt-form__day-checkbox",3,"change","checked"],[1,"scheduled-prompt-form__day-text"],["for","sp-end-date",1,"scheduled-prompt-form__label"],["id","sp-end-date","type","date",1,"scheduled-prompt-form__input",3,"formControl"],["for","sp-occurrence-count",1,"scheduled-prompt-form__label"],["id","sp-occurrence-count","type","number","min","1",1,"scheduled-prompt-form__input","scheduled-prompt-form__input--number",3,"formControl"]],template:function(e,l){e&1&&(vs(0,"div",0)(1,"header",1)(2,"button",2),Ag("click",function(){return l.cancel()}),vs(3,"span",3),WC(4,"\u2190"),fl(),WC(5),fl(),vs(6,"h1",4),WC(7),fl()(),eC(8,pe,2,0,"p",5)(9,Fe,86,26,"form",6),fl()),e&2&&(XE(5),yl(" ",l.isPlatformMode?"Platform Scheduled Prompts":"Scheduled Prompts"," "),XE(2),yl(" ",l.isEditMode()?"Edit scheduled prompt":"New scheduled prompt"," "),XE(),tC(l.isLoading()?8:9));},dependencies:[ni,Jn,Qn,ei,Ye,fn,wt,At,Zn,Xn,$t,Cn,En],styles:[".scheduled-prompt-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.scheduled-prompt-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.scheduled-prompt-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-primary, #007aff);font-family:inherit}.scheduled-prompt-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.scheduled-prompt-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.scheduled-prompt-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.scheduled-prompt-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.scheduled-prompt-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.scheduled-prompt-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.scheduled-prompt-form__row[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.scheduled-prompt-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text, #1d1d1f)}.scheduled-prompt-form__input[_ngcontent-%COMP%], .scheduled-prompt-form__select[_ngcontent-%COMP%], .scheduled-prompt-form__textarea[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;transition:border-color .15s ease}.scheduled-prompt-form__input[_ngcontent-%COMP%]:focus, .scheduled-prompt-form__select[_ngcontent-%COMP%]:focus, .scheduled-prompt-form__textarea[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.scheduled-prompt-form__input[_ngcontent-%COMP%]::placeholder, .scheduled-prompt-form__select[_ngcontent-%COMP%]::placeholder, .scheduled-prompt-form__textarea[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.scheduled-prompt-form__select[_ngcontent-%COMP%]{cursor:pointer;appearance:auto}.scheduled-prompt-form__textarea[_ngcontent-%COMP%]{resize:vertical;min-height:100px;line-height:1.5}.scheduled-prompt-form__input--time[_ngcontent-%COMP%]{flex:1;min-width:0}.scheduled-prompt-form__input--number[_ngcontent-%COMP%]{max-width:120px}.scheduled-prompt-form__time-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.scheduled-prompt-form__utc-badge[_ngcontent-%COMP%]{flex-shrink:0;font-size:.75rem;font-weight:600;font-family:monospace;color:var(--color-text-secondary, #6e6e73);background:var(--color-surface, rgba(0, 0, 0, .05));padding:.25rem .5rem;border-radius:4px;text-transform:uppercase;letter-spacing:.06em}.scheduled-prompt-form__fieldset[_ngcontent-%COMP%]{border:1px solid var(--color-border, rgba(0, 0, 0, .1));border-radius:8px;padding:1rem 1.25rem 1.25rem;margin:0;display:flex;flex-direction:column;gap:1.25rem}.scheduled-prompt-form__legend[_ngcontent-%COMP%]{font-size:.8125rem;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--color-text-secondary, #6e6e73);padding:0 .375rem}.scheduled-prompt-form__day-grid[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.5rem}.scheduled-prompt-form__day-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.375rem;cursor:pointer;-webkit-user-select:none;user-select:none}.scheduled-prompt-form__day-checkbox[_ngcontent-%COMP%]{width:1rem;height:1rem;flex-shrink:0;accent-color:var(--color-primary, #007aff);cursor:pointer}.scheduled-prompt-form__day-text[_ngcontent-%COMP%]{font-size:.875rem;color:var(--color-text, #1d1d1f)}.scheduled-prompt-form__hint[_ngcontent-%COMP%]{margin:0;font-size:.875rem;color:var(--color-text-secondary, #6e6e73)}.scheduled-prompt-form__hint[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--color-primary, #007aff);text-decoration:none}.scheduled-prompt-form__hint[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}.scheduled-prompt-form__error[_ngcontent-%COMP%]{font-size:.8rem;color:var(--color-error, #ff3b30);margin:0}.scheduled-prompt-form__field-error[_ngcontent-%COMP%]{font-size:.8rem;color:var(--color-error, #ff3b30)}.scheduled-prompt-form__field-hint[_ngcontent-%COMP%]{font-size:.8rem;color:var(--color-text-secondary, #6e6e73);line-height:1.4}.scheduled-prompt-form__field-hint[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--color-primary, #007aff);text-decoration:none}.scheduled-prompt-form__field-hint[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}.scheduled-prompt-form__readonly-value[_ngcontent-%COMP%]{margin:0;font-size:.9375rem;color:var(--color-text, #1d1d1f);padding:.625rem .875rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .08));background:var(--color-surface, rgba(0, 0, 0, .03))}.scheduled-prompt-form__input--invalid[_ngcontent-%COMP%], .scheduled-prompt-form__textarea--invalid[_ngcontent-%COMP%]{border-color:var(--color-error, #ff3b30)}.scheduled-prompt-form__toggle-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none}.scheduled-prompt-form__toggle-checkbox[_ngcontent-%COMP%]{width:1rem;height:1rem;flex-shrink:0;accent-color:var(--color-primary, #007aff);cursor:pointer}.scheduled-prompt-form__toggle-text[_ngcontent-%COMP%]{font-size:.9rem;font-weight:500;color:var(--color-text, #1d1d1f)}.scheduled-prompt-form__toggle-hint[_ngcontent-%COMP%]{margin:.25rem 0 0 1.5rem;font-size:.8rem;color:var(--color-text-secondary, #6e6e73);line-height:1.4}.scheduled-prompt-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.scheduled-prompt-form__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;cursor:pointer;transition:background .15s ease,border-color .15s ease}.scheduled-prompt-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.scheduled-prompt-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.scheduled-prompt-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);border-color:var(--color-primary, #007aff);color:#fff}.scheduled-prompt-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover, #0051d5);border-color:var(--color-primary-hover, #0051d5)}"]})};function Ne(n){let t=n.get("endType")?.value,e=n.get("endDate")?.value;return t===he$1.ON_DATE&&!e?{endDateRequired:true}:null}function Ie(n){let t=n.get("endType")?.value,e=n.get("occurrenceCount")?.value;return t===he$1.OCCURRENCES&&(e==null||e<1)?{occurrenceCountRequired:true}:null}function Ve(){let n=new Date,t=n.getFullYear(),e=String(n.getMonth()+1).padStart(2,"0"),l=String(n.getDate()).padStart(2,"0");return `${t}-${e}-${l}`}export{me as ScheduledPromptFormComponent};
|
|
1
|
+
import {c}from'./chunk-CsvLyu6R.js';import {g,ao as V,G,w as we$1,d7 as M,d8 as he$1,d9 as fe$1,H as Hi,da as ge$1,F,bQ as bd,m as mT,Q as By,b as U,a7 as ga,S as ha,z as z$1,a as P,A as Aw,v as vs,l as Ag,W as WC,k as fl,n as eC,X as XE,a5 as yl,t as tC,a9 as dC,o as bg,a3 as HI,q as oC,ac as mC,r as Tg,y as Hg,a6 as $I,x as iC,a8 as Zg,aa as If,ab as wf,bj as yh}from'./main-FEA3BAHM.js';import {o as z,k as _t,b as _e$1,n as ni,J as Jn,Q as Qn,e as ei,Y as Ye,f as fn,a as wt,A as At,Z as Zn,l as Xn,$ as $t,C as Cn,E as En}from'./chunk-DFaRJnOg.js';var A=(n,t)=>t.value,se=(n,t)=>t.id;function pe(n,t){n&1&&(vs(0,"p",5),WC(1,"Loading\u2026"),fl());}function ue(n,t){n&1&&(vs(0,"span",12),WC(1," Name is required. "),fl());}function fe(n,t){if(n&1&&(vs(0,"p",40),WC(1),fl(),vs(2,"span",13),WC(3,"Agent Config cannot be changed after creation."),fl()),n&2){let e=mC(2);XE(),Zg(e.resolveAgentConfigName(e.agentConfigIdControl.value));}}function _e(n,t){if(n&1&&(vs(0,"a",41),WC(1,"Add an agent config"),fl(),WC(2," first. ")),n&2){let e=mC(3);Tg("href","/agentos/"+e.namespaceId+"/agent-configs/new",yh);}}function he(n,t){if(n&1&&(vs(0,"p",13),WC(1," No agent configs available in this scope yet. "),eC(2,_e,3,1),fl()),n&2){let e=mC(2);XE(2),tC(e.isPlatformMode?-1:2);}}function ge(n,t){if(n&1&&(vs(0,"option",23),WC(1),fl()),n&2){let e=t.$implicit;Tg("value",e.id),XE(),Zg(e.name);}}function Ce(n,t){n&1&&(vs(0,"span",12),WC(1,"Agent Config is required."),fl());}function ve(n,t){if(n&1&&(vs(0,"select",42)(1,"option",43),WC(2,"Select an agent config\u2026"),fl(),oC(3,ge,2,2,"option",23,se),fl(),HI(),eC(5,Ce,2,0,"span",12),vs(6,"span",13),WC(7,"Immutable after creation."),fl()),n&2){let e=mC(2);Tg("formControl",e.agentConfigIdControl),$I(),XE(3),iC(e.availableAgentConfigs()),XE(2),tC(e.agentConfigIdControl.invalid&&e.agentConfigIdControl.touched?5:-1);}}function ye(n,t){n&1&&(vs(0,"span",12),WC(1,"Opening message is required."),fl());}function be(n,t){if(n&1&&(vs(0,"option",23),WC(1),fl()),n&2){let e=t.$implicit;Tg("value",e.value),XE(),Zg(e.label);}}function xe(n,t){if(n&1){let e=dC();vs(0,"label",46)(1,"input",47),Ag("change",function(){let h=If(e).$implicit,P=mC(3);return wf(P.toggleDay(h.value))}),fl(),vs(2,"span",48),WC(3),fl()();}if(n&2){let e=t.$implicit,l=mC(3);XE(),Tg("checked",l.isDaySelected(e.value)),XE(2),Zg(e.label);}}function Se(n,t){if(n&1&&(vs(0,"div",8)(1,"span",44),WC(2,"Days of week"),fl(),vs(3,"div",45),oC(4,xe,4,2,"label",46,A),fl(),vs(6,"span",13),WC(7,"Leave empty to run every day of the week."),fl()()),n&2){let e=mC(2);XE(4),iC(e.dayOptions);}}function Pe(n,t){n&1&&(vs(0,"span",12),WC(1,"Valid time is required (HH:mm)."),fl());}function Ee(n,t){n&1&&(vs(0,"span",12),WC(1,"Start date is required."),fl());}function Me(n,t){if(n&1&&(vs(0,"option",23),WC(1),fl()),n&2){let e=t.$implicit;Tg("value",e.value),XE(),Zg(e.label);}}function Oe(n,t){n&1&&(vs(0,"span",12),WC(1,"End date is required."),fl());}function De(n,t){if(n&1&&(vs(0,"div",8)(1,"label",49),WC(2," End date "),vs(3,"span",10),WC(4,"*"),fl()(),bg(5,"input",50),HI(),eC(6,Oe,2,0,"span",12),fl()),n&2){let e=mC(2);XE(5),Hg("scheduled-prompt-form__input--invalid",e.form.hasError("endDateRequired")&&e.endDateControl.touched),Tg("formControl",e.endDateControl),$I(),XE(),tC(e.form.hasError("endDateRequired")&&e.endDateControl.touched?6:-1);}}function Te(n,t){n&1&&(vs(0,"span",12),WC(1,"Must be at least 1."),fl());}function we(n,t){if(n&1&&(vs(0,"div",8)(1,"label",51),WC(2," Number of occurrences "),vs(3,"span",10),WC(4,"*"),fl()(),bg(5,"input",52),HI(),eC(6,Te,2,0,"span",12),fl()),n&2){let e=mC(2);XE(5),Hg("scheduled-prompt-form__input--invalid",e.form.hasError("occurrenceCountRequired")&&e.occurrenceCountControl.touched),Tg("formControl",e.occurrenceCountControl),$I(),XE(),tC(e.form.hasError("occurrenceCountRequired")&&e.occurrenceCountControl.touched?6:-1);}}function ke(n,t){if(n&1&&(vs(0,"p",36),WC(1),fl()),n&2){let e=mC(2);XE(),Zg(e.errorMessage());}}function Fe(n,t){if(n&1){let e=dC();vs(0,"form",7),Ag("ngSubmit",function(){If(e);let h=mC();return wf(h.submit())}),vs(1,"div",8)(2,"label",9),WC(3," Name "),vs(4,"span",10),WC(5,"*"),fl()(),bg(6,"input",11),HI(),eC(7,ue,2,0,"span",12),vs(8,"span",13),WC(9,'Free-form name (e.g. "Weekly Report"). Cannot be changed after creation.'),fl()(),vs(10,"div",8)(11,"label",14),WC(12,"Description"),fl(),bg(13,"input",15),HI(),fl(),vs(14,"div",8)(15,"label",16),WC(16," Agent Config "),vs(17,"span",10),WC(18,"*"),fl()(),eC(19,fe,4,1)(20,he,3,1,"p",13)(21,ve,8,2),fl(),vs(22,"div",8)(23,"label",17),WC(24," Opening message "),vs(25,"span",10),WC(26,"*"),fl()(),bg(27,"textarea",18),HI(),eC(28,ye,2,0,"span",12),vs(29,"span",13),WC(30," The message sent to the agent when the scheduled prompt fires. "),fl()(),vs(31,"fieldset",19)(32,"legend",20),WC(33,"Recurrence"),fl(),vs(34,"div",8)(35,"label",21),WC(36," Unit "),vs(37,"span",10),WC(38,"*"),fl()(),vs(39,"select",22),oC(40,be,2,2,"option",23,A),fl(),HI(),fl(),eC(42,Se,8,0,"div",8),vs(43,"div",8)(44,"label",24),WC(45," Time (UTC) "),vs(46,"span",10),WC(47,"*"),fl()(),vs(48,"div",25),bg(49,"input",26),HI(),vs(50,"span",27),WC(51,"UTC"),fl()(),eC(52,Pe,2,0,"span",12),fl()(),vs(53,"fieldset",19)(54,"legend",20),WC(55,"Planning"),fl(),vs(56,"div",8)(57,"label",28),WC(58," Start date "),vs(59,"span",10),WC(60,"*"),fl()(),bg(61,"input",29),HI(),eC(62,Ee,2,0,"span",12),fl(),vs(63,"div",8)(64,"label",30),WC(65," Ends "),vs(66,"span",10),WC(67,"*"),fl()(),vs(68,"select",31),oC(69,Me,2,2,"option",23,A),fl(),HI(),fl(),eC(71,De,7,4,"div",8),eC(72,we,7,4,"div",8),fl(),vs(73,"div",8)(74,"label",32),bg(75,"input",33),HI(),vs(76,"span",34),WC(77,"Enabled"),fl()(),vs(78,"p",35),WC(79," When disabled, the scheduled prompt is saved but will not run on schedule. "),fl()(),eC(80,ke,2,1,"p",36),vs(81,"div",37)(82,"button",38),WC(83),fl(),vs(84,"button",39),Ag("click",function(){If(e);let h=mC();return wf(h.cancel())}),WC(85,"Cancel"),fl()()();}if(n&2){let e=mC();Tg("formGroup",e.form),XE(6),Hg("scheduled-prompt-form__input--invalid",e.nameControl.invalid&&e.nameControl.touched),Tg("formControl",e.nameControl),$I(),XE(),tC(e.nameControl.invalid&&e.nameControl.touched?7:-1),XE(6),Tg("formControl",e.descriptionControl),$I(),XE(6),tC(e.isEditMode()?19:e.availableAgentConfigs().length===0?20:21),XE(8),Hg("scheduled-prompt-form__textarea--invalid",e.promptContentControl.invalid&&e.promptContentControl.touched),Tg("formControl",e.promptContentControl),$I(),XE(),tC(e.promptContentControl.invalid&&e.promptContentControl.touched?28:-1),XE(11),Tg("formControl",e.unitControl),$I(),XE(),iC(e.schedulerUnits),XE(2),tC(e.showDayFilter()?42:-1),XE(7),Tg("formControl",e.timeUtcControl),$I(),XE(3),tC(e.timeUtcControl.invalid&&e.timeUtcControl.touched?52:-1),XE(9),Hg("scheduled-prompt-form__input--invalid",e.startDateControl.invalid&&e.startDateControl.touched),Tg("formControl",e.startDateControl),$I(),XE(),tC(e.startDateControl.invalid&&e.startDateControl.touched?62:-1),XE(6),Tg("formControl",e.endTypeControl),$I(),XE(),iC(e.endTypes),XE(2),tC(e.showEndDate()?71:-1),XE(),tC(e.showOccurrenceCount()?72:-1),XE(3),Tg("formControl",e.enabledControl),$I(),XE(5),tC(e.errorMessage()?80:-1),XE(2),Tg("disabled",e.form.invalid||e.isSubmitting()),XE(),yl(" ",e.isEditMode()?"Save changes":"Create scheduled prompt"," ");}}var me=class n{route=g(V);router=g(G);destroyRef=g(we$1);state=g(c);agentConfigController=g(M);namespaceId=this.route.snapshot.params.namespaceId;isPlatformMode=!this.namespaceId;form=new z({name:new _t("",{nonNullable:true,validators:[_e$1.required]}),description:new _t(null),agentConfigId:new _t("",{nonNullable:true,validators:[_e$1.required]}),promptContent:new _t("",{nonNullable:true,validators:[_e$1.required]}),unit:new _t(fe$1.WEEK,{nonNullable:true,validators:[_e$1.required]}),days:new _t([],{nonNullable:true}),timeUtc:new _t("09:00",{nonNullable:true,validators:[_e$1.required,_e$1.pattern(/^([01]\d|2[0-3]):[0-5]\d$/)]}),startDate:new _t("",{nonNullable:true,validators:[_e$1.required]}),endType:new _t(he$1.NEVER,{nonNullable:true,validators:[_e$1.required]}),endDate:new _t(null),occurrenceCount:new _t(null),enabled:new _t(true,{nonNullable:true})},{validators:[Ne,Ie]});get nameControl(){return this.form.controls.name}get descriptionControl(){return this.form.controls.description}get agentConfigIdControl(){return this.form.controls.agentConfigId}get promptContentControl(){return this.form.controls.promptContent}get unitControl(){return this.form.controls.unit}get daysControl(){return this.form.controls.days}get timeUtcControl(){return this.form.controls.timeUtc}get startDateControl(){return this.form.controls.startDate}get endTypeControl(){return this.form.controls.endType}get endDateControl(){return this.form.controls.endDate}get occurrenceCountControl(){return this.form.controls.occurrenceCount}get enabledControl(){return this.form.controls.enabled}isEditMode=Hi(false);isSubmitting=Hi(false);isLoading=Hi(false);errorMessage=Hi(null);SchedulerUnit=fe$1;SchedulerEndType=he$1;schedulerUnits=[{value:fe$1.WEEK,label:"Week(s)"},{value:fe$1.MONTH,label:"Month(s)"}];endTypes=[{value:he$1.NEVER,label:"Never"},{value:he$1.ON_DATE,label:"On date"},{value:he$1.OCCURRENCES,label:"After N occurrences"}];dayOptions=Object.entries(ge$1).map(([t,e])=>({value:t,label:e}));unitSignal=F(this.unitControl.valueChanges.pipe(bd(this.unitControl.value)));endTypeSignal=F(this.endTypeControl.valueChanges.pipe(bd(this.endTypeControl.value)));showDayFilter=mT(()=>this.unitSignal()===fe$1.WEEK);showEndDate=mT(()=>this.endTypeSignal()===he$1.ON_DATE);showOccurrenceCount=mT(()=>this.endTypeSignal()===he$1.OCCURRENCES);agentConfigs=Hi([]);availableAgentConfigs=this.agentConfigs.asReadonly();existingPrompt=null;ngOnInit(){this.startDateControl.setValue(Ve());let t=this.route.snapshot.paramMap.get("scheduledPromptId");t?(this.isEditMode.set(true),this.loadPromptAndResources(t)):this.loadResources();}loadPromptAndResources(t){this.isLoading.set(true),By({prompt:this.state.getById(t),agentConfigs:this.agentConfigs$()}).pipe(U(this.destroyRef)).subscribe({next:({prompt:e,agentConfigs:l})=>{this.existingPrompt=e,this.agentConfigs.set(l),this.hydrateForm(e),this.isLoading.set(false);},error:()=>{this.isLoading.set(false),this.navigateBack();}});}loadResources(){this.agentConfigs$().pipe(U(this.destroyRef)).subscribe(t=>this.agentConfigs.set(t));}agentConfigs$(){return (this.isPlatformMode?this.agentConfigController.listPlatformAgentsAgentConfig():this.agentConfigController.listByParentAgentConfig(this.namespaceId)).pipe(ga(()=>ha([])))}hydrateForm(t){this.nameControl.setValue(t.name),this.descriptionControl.setValue(t.description??null),this.agentConfigIdControl.setValue(t.agentConfigId),this.promptContentControl.setValue(t.promptContent),this.unitControl.setValue(t.recurrence.unit),this.daysControl.setValue(t.recurrence.days??[]),this.timeUtcControl.setValue(t.recurrence.timeUtc),this.startDateControl.setValue(t.planning.startDate),this.endTypeControl.setValue(t.planning.endType),this.endDateControl.setValue(t.planning.endDate??null),this.occurrenceCountControl.setValue(t.planning.maxOccurrenceCount??null),this.enabledControl.setValue(t.enabled);}isDaySelected(t){return this.daysControl.value.includes(t)}toggleDay(t){let e=this.daysControl.value,l=e.includes(t)?e.filter(h=>h!==t):[...e,t];this.daysControl.setValue(l);}resolveAgentConfigName(t){return this.agentConfigs().find(e=>e.id===t)?.name??t}submit(){if(this.form.invalid||this.isSubmitting())return;this.isSubmitting.set(true),this.errorMessage.set(null);let t=this.isEditMode()&&!!this.existingPrompt?.id,e=this.endTypeControl.value,l=z$1(P({},this.existingPrompt??{}),{namespaceId:this.namespaceId??null,name:this.nameControl.value.trim(),description:this.descriptionControl.value?.trim()||void 0,agentConfigId:t?this.existingPrompt.agentConfigId:this.agentConfigIdControl.value,promptContent:this.promptContentControl.value.trim(),recurrence:{unit:this.unitControl.value,days:this.daysControl.value,timeUtc:this.timeUtcControl.value},planning:{startDate:this.startDateControl.value,endType:e,endDate:e===he$1.ON_DATE?this.endDateControl.value??void 0:void 0,maxOccurrenceCount:e===he$1.OCCURRENCES?this.occurrenceCountControl.value??void 0:void 0},enabled:this.enabledControl.value});(t?this.state.update(this.existingPrompt.id,l):this.state.create(l)).pipe(U(this.destroyRef)).subscribe({next:()=>this.navigateBack(),error:P=>{this.isSubmitting.set(false),P.status===409?this.errorMessage.set(`A scheduled prompt named "${l.name}" already exists in this scope.`):P.status===400?this.errorMessage.set(P.error?.message??"Invalid scheduled prompt data."):this.errorMessage.set("An unexpected error occurred. Please try again.");}});}cancel(){this.navigateBack();}navigateBack(){this.isPlatformMode?this.router.navigate(["/agentos","admin","scheduled-prompts"]):this.router.navigate(["/agentos",this.namespaceId,"scheduled-prompts"]);}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=Aw({type:n,selectors:[["agentos-scheduled-prompt-form"]],decls:10,vars:3,consts:[[1,"scheduled-prompt-form"],[1,"scheduled-prompt-form__header"],["type","button","title","Back to scheduled prompts",1,"scheduled-prompt-form__back",3,"click"],[1,"scheduled-prompt-form__back-icon"],[1,"scheduled-prompt-form__title"],[1,"scheduled-prompt-form__loading"],[1,"scheduled-prompt-form__form",3,"formGroup"],[1,"scheduled-prompt-form__form",3,"ngSubmit","formGroup"],[1,"scheduled-prompt-form__field"],["for","sp-name",1,"scheduled-prompt-form__label"],["aria-hidden","true"],["id","sp-name","type","text","placeholder","e.g. Weekly Report","autocomplete","off",1,"scheduled-prompt-form__input",3,"formControl"],[1,"scheduled-prompt-form__field-error"],[1,"scheduled-prompt-form__field-hint"],["for","sp-description",1,"scheduled-prompt-form__label"],["id","sp-description","type","text","placeholder","Optional \u2014 short description","autocomplete","off",1,"scheduled-prompt-form__input",3,"formControl"],["for","sp-agent-config",1,"scheduled-prompt-form__label"],["for","sp-prompt-content",1,"scheduled-prompt-form__label"],["id","sp-prompt-content","rows","6","placeholder","Enter the message sent to the agent when the scheduled prompt fires\u2026",1,"scheduled-prompt-form__textarea",3,"formControl"],[1,"scheduled-prompt-form__fieldset"],[1,"scheduled-prompt-form__legend"],["for","sp-unit",1,"scheduled-prompt-form__label"],["id","sp-unit",1,"scheduled-prompt-form__select",3,"formControl"],[3,"value"],["for","sp-time",1,"scheduled-prompt-form__label"],[1,"scheduled-prompt-form__time-wrapper"],["id","sp-time","type","time",1,"scheduled-prompt-form__input","scheduled-prompt-form__input--time",3,"formControl"],[1,"scheduled-prompt-form__utc-badge"],["for","sp-start-date",1,"scheduled-prompt-form__label"],["id","sp-start-date","type","date",1,"scheduled-prompt-form__input",3,"formControl"],["for","sp-end-type",1,"scheduled-prompt-form__label"],["id","sp-end-type",1,"scheduled-prompt-form__select",3,"formControl"],[1,"scheduled-prompt-form__toggle-label"],["type","checkbox",1,"scheduled-prompt-form__toggle-checkbox",3,"formControl"],[1,"scheduled-prompt-form__toggle-text"],[1,"scheduled-prompt-form__toggle-hint"],[1,"scheduled-prompt-form__error"],[1,"scheduled-prompt-form__actions"],["type","submit",1,"scheduled-prompt-form__btn","scheduled-prompt-form__btn--primary",3,"disabled"],["type","button",1,"scheduled-prompt-form__btn",3,"click"],[1,"scheduled-prompt-form__readonly-value"],[3,"href"],["id","sp-agent-config",1,"scheduled-prompt-form__select",3,"formControl"],["value","","disabled",""],[1,"scheduled-prompt-form__label"],[1,"scheduled-prompt-form__day-grid"],[1,"scheduled-prompt-form__day-label"],["type","checkbox",1,"scheduled-prompt-form__day-checkbox",3,"change","checked"],[1,"scheduled-prompt-form__day-text"],["for","sp-end-date",1,"scheduled-prompt-form__label"],["id","sp-end-date","type","date",1,"scheduled-prompt-form__input",3,"formControl"],["for","sp-occurrence-count",1,"scheduled-prompt-form__label"],["id","sp-occurrence-count","type","number","min","1",1,"scheduled-prompt-form__input","scheduled-prompt-form__input--number",3,"formControl"]],template:function(e,l){e&1&&(vs(0,"div",0)(1,"header",1)(2,"button",2),Ag("click",function(){return l.cancel()}),vs(3,"span",3),WC(4,"\u2190"),fl(),WC(5),fl(),vs(6,"h1",4),WC(7),fl()(),eC(8,pe,2,0,"p",5)(9,Fe,86,26,"form",6),fl()),e&2&&(XE(5),yl(" ",l.isPlatformMode?"Platform Scheduled Prompts":"Scheduled Prompts"," "),XE(2),yl(" ",l.isEditMode()?"Edit scheduled prompt":"New scheduled prompt"," "),XE(),tC(l.isLoading()?8:9));},dependencies:[ni,Jn,Qn,ei,Ye,fn,wt,At,Zn,Xn,$t,Cn,En],styles:[".scheduled-prompt-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2rem;max-width:560px;margin:0 auto;padding:2rem 1rem}.scheduled-prompt-form__header[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.5rem}.scheduled-prompt-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-primary, #007aff);font-family:inherit}.scheduled-prompt-form__back[_ngcontent-%COMP%]:hover{text-decoration:underline}.scheduled-prompt-form__back-icon[_ngcontent-%COMP%]{font-size:1rem;line-height:1}.scheduled-prompt-form__title[_ngcontent-%COMP%]{margin:0;font-size:1.5rem;font-weight:600;color:var(--color-text, #1d1d1f);letter-spacing:-.02em}.scheduled-prompt-form__loading[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73);font-size:.9rem;margin:0}.scheduled-prompt-form__form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:1.25rem}.scheduled-prompt-form__field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.375rem}.scheduled-prompt-form__row[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.scheduled-prompt-form__label[_ngcontent-%COMP%]{font-size:.875rem;font-weight:500;color:var(--color-text, #1d1d1f)}.scheduled-prompt-form__input[_ngcontent-%COMP%], .scheduled-prompt-form__select[_ngcontent-%COMP%], .scheduled-prompt-form__textarea[_ngcontent-%COMP%]{width:100%;padding:.625rem .875rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;outline:none;box-sizing:border-box;transition:border-color .15s ease}.scheduled-prompt-form__input[_ngcontent-%COMP%]:focus, .scheduled-prompt-form__select[_ngcontent-%COMP%]:focus, .scheduled-prompt-form__textarea[_ngcontent-%COMP%]:focus{border-color:var(--color-primary, #007aff)}.scheduled-prompt-form__input[_ngcontent-%COMP%]::placeholder, .scheduled-prompt-form__select[_ngcontent-%COMP%]::placeholder, .scheduled-prompt-form__textarea[_ngcontent-%COMP%]::placeholder{color:var(--color-text-secondary, #6e6e73)}.scheduled-prompt-form__select[_ngcontent-%COMP%]{cursor:pointer;appearance:auto}.scheduled-prompt-form__textarea[_ngcontent-%COMP%]{resize:vertical;min-height:100px;line-height:1.5}.scheduled-prompt-form__input--time[_ngcontent-%COMP%]{flex:1;min-width:0}.scheduled-prompt-form__input--number[_ngcontent-%COMP%]{max-width:120px}.scheduled-prompt-form__time-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem}.scheduled-prompt-form__utc-badge[_ngcontent-%COMP%]{flex-shrink:0;font-size:.75rem;font-weight:600;font-family:monospace;color:var(--color-text-secondary, #6e6e73);background:var(--color-surface, rgba(0, 0, 0, .05));padding:.25rem .5rem;border-radius:4px;text-transform:uppercase;letter-spacing:.06em}.scheduled-prompt-form__fieldset[_ngcontent-%COMP%]{border:1px solid var(--color-border, rgba(0, 0, 0, .1));border-radius:8px;padding:1rem 1.25rem 1.25rem;margin:0;display:flex;flex-direction:column;gap:1.25rem}.scheduled-prompt-form__legend[_ngcontent-%COMP%]{font-size:.8125rem;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:var(--color-text-secondary, #6e6e73);padding:0 .375rem}.scheduled-prompt-form__day-grid[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:.5rem}.scheduled-prompt-form__day-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.375rem;cursor:pointer;-webkit-user-select:none;user-select:none}.scheduled-prompt-form__day-checkbox[_ngcontent-%COMP%]{width:1rem;height:1rem;flex-shrink:0;accent-color:var(--color-primary, #007aff);cursor:pointer}.scheduled-prompt-form__day-text[_ngcontent-%COMP%]{font-size:.875rem;color:var(--color-text, #1d1d1f)}.scheduled-prompt-form__hint[_ngcontent-%COMP%]{margin:0;font-size:.875rem;color:var(--color-text-secondary, #6e6e73)}.scheduled-prompt-form__hint[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--color-primary, #007aff);text-decoration:none}.scheduled-prompt-form__hint[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}.scheduled-prompt-form__error[_ngcontent-%COMP%]{font-size:.8rem;color:var(--color-error, #ff3b30);margin:0}.scheduled-prompt-form__field-error[_ngcontent-%COMP%]{font-size:.8rem;color:var(--color-error, #ff3b30)}.scheduled-prompt-form__field-hint[_ngcontent-%COMP%]{font-size:.8rem;color:var(--color-text-secondary, #6e6e73);line-height:1.4}.scheduled-prompt-form__field-hint[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:var(--color-primary, #007aff);text-decoration:none}.scheduled-prompt-form__field-hint[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{text-decoration:underline}.scheduled-prompt-form__readonly-value[_ngcontent-%COMP%]{margin:0;font-size:.9375rem;color:var(--color-text, #1d1d1f);padding:.625rem .875rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .08));background:var(--color-surface, rgba(0, 0, 0, .03))}.scheduled-prompt-form__input--invalid[_ngcontent-%COMP%], .scheduled-prompt-form__textarea--invalid[_ngcontent-%COMP%]{border-color:var(--color-error, #ff3b30)}.scheduled-prompt-form__toggle-label[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;cursor:pointer;-webkit-user-select:none;user-select:none}.scheduled-prompt-form__toggle-checkbox[_ngcontent-%COMP%]{width:1rem;height:1rem;flex-shrink:0;accent-color:var(--color-primary, #007aff);cursor:pointer}.scheduled-prompt-form__toggle-text[_ngcontent-%COMP%]{font-size:.9rem;font-weight:500;color:var(--color-text, #1d1d1f)}.scheduled-prompt-form__toggle-hint[_ngcontent-%COMP%]{margin:.25rem 0 0 1.5rem;font-size:.8rem;color:var(--color-text-secondary, #6e6e73);line-height:1.4}.scheduled-prompt-form__actions[_ngcontent-%COMP%]{display:flex;gap:.75rem;padding-top:.5rem}.scheduled-prompt-form__btn[_ngcontent-%COMP%]{padding:.6rem 1.25rem;border-radius:8px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:transparent;color:var(--color-text, #1d1d1f);font-size:.9375rem;font-family:inherit;cursor:pointer;transition:background .15s ease,border-color .15s ease}.scheduled-prompt-form__btn[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-surface-hover, rgba(0, 0, 0, .04))}.scheduled-prompt-form__btn[_ngcontent-%COMP%]:disabled{opacity:.45;cursor:not-allowed}.scheduled-prompt-form__btn--primary[_ngcontent-%COMP%]{background:var(--color-primary, #007aff);border-color:var(--color-primary, #007aff);color:#fff}.scheduled-prompt-form__btn--primary[_ngcontent-%COMP%]:hover:not(:disabled){background:var(--color-primary-hover, #0051d5);border-color:var(--color-primary-hover, #0051d5)}"]})};function Ne(n){let t=n.get("endType")?.value,e=n.get("endDate")?.value;return t===he$1.ON_DATE&&!e?{endDateRequired:true}:null}function Ie(n){let t=n.get("endType")?.value,e=n.get("occurrenceCount")?.value;return t===he$1.OCCURRENCES&&(e==null||e<1)?{occurrenceCountRequired:true}:null}function Ve(){let n=new Date,t=n.getFullYear(),e=String(n.getMonth()+1).padStart(2,"0"),l=String(n.getDate()).padStart(2,"0");return `${t}-${e}-${l}`}export{me as ScheduledPromptFormComponent};
|
package/browser/index.html
CHANGED
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
<style>:root{--color-bg:#f5f6f8;--color-bg-solid:#f5f6f8;--color-bg-secondary:rgba(255, 255, 255, .7);--color-bg-secondary-rgb:255 255 255;--color-text:#1d1d1f;--color-text-secondary:#6e6e73;--color-text-inverse:#ffffff;--color-text-tertiary:#a1a1a6;--color-primary:#007aff;--color-primary-hover:#0051d5;--color-accent:#8b5cf6;--color-link:#007aff;--color-border:rgba(0, 0, 0, .1);--color-border-light:rgba(40, 40, 40, .08);--color-input-bg:rgba(255, 255, 255, .8);--color-bg-hover:rgba(0, 0, 0, .04);--color-success:#34c759;--color-success-bg:#e3f5e1;--color-error:#ff3b30;--color-warning:#ff9500;--color-info:#5ac8fa;--color-message-user:rgba(0, 122, 255, .1);--color-message-ai:rgba(255, 255, 255, .8);--color-code-bg:rgba(142, 142, 147, .12);--color-code-text:#ff375f;--glass-bg:rgba(255, 255, 255, .72);--glass-border:rgba(255, 255, 255, .18);--glass-shadow:0 8px 32px 0 rgba(31, 38, 135, .15);--glass-backdrop-blur:blur(20px);--color-modal-bg:#ffffff;--color-surface:#ffffff;--color-modal-border:rgba(0, 0, 0, .12);--color-modal-shadow:0 8px 40px rgba(0, 0, 0, .18), 0 2px 8px rgba(0, 0, 0, .1);--color-shadow:rgba(0, 0, 0, .08);--color-overlay:rgba(0, 0, 0, .4);--color-surface-hover:var(--color-bg-hover);--color-surface-secondary:rgba(0, 0, 0, .03);--color-surface-muted:rgba(0, 0, 0, .05);--color-divider:rgba(0, 0, 0, .1)}@media print{html,body,app-root{height:auto!important;max-height:none!important;min-height:auto!important;overflow:visible!important;position:static!important}body{background:#fff!important;color:#000!important;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif!important;font-size:11pt;line-height:1.6;padding:1rem!important}*{animation:none!important;transition:none!important;box-shadow:none!important;text-shadow:none!important}}*{box-sizing:border-box}html{color-scheme:light}html{--mat-sys-background:light-dark(#faf9fd, #121316);--mat-sys-error:light-dark(#ba1a1a, #ffb4ab);--mat-sys-error-container:light-dark(#ffdad6, #93000a);--mat-sys-inverse-on-surface:light-dark(#f2f0f4, #2f3033);--mat-sys-inverse-primary:light-dark(#abc7ff, #005cbb);--mat-sys-inverse-surface:light-dark(#2f3033, #e3e2e6);--mat-sys-on-background:light-dark(#1a1b1f, #e3e2e6);--mat-sys-on-error:light-dark(#ffffff, #690005);--mat-sys-on-error-container:light-dark(#93000a, #ffdad6);--mat-sys-on-primary:light-dark(#ffffff, #002f65);--mat-sys-on-primary-container:light-dark(#00458f, #d7e3ff);--mat-sys-on-primary-fixed:light-dark(#001b3f, #001b3f);--mat-sys-on-primary-fixed-variant:light-dark(#00458f, #00458f);--mat-sys-on-secondary:light-dark(#ffffff, #283041);--mat-sys-on-secondary-container:light-dark(#3e4759, #dae2f9);--mat-sys-on-secondary-fixed:light-dark(#131c2b, #131c2b);--mat-sys-on-secondary-fixed-variant:light-dark(#3e4759, #3e4759);--mat-sys-on-surface:light-dark(#1a1b1f, #e3e2e6);--mat-sys-on-surface-variant:light-dark(#44474e, #e0e2ec);--mat-sys-on-tertiary:light-dark(#ffffff, #002f65);--mat-sys-on-tertiary-container:light-dark(#00458f, #d7e3ff);--mat-sys-on-tertiary-fixed:light-dark(#001b3f, #001b3f);--mat-sys-on-tertiary-fixed-variant:light-dark(#00458f, #00458f);--mat-sys-outline:light-dark(#74777f, #8e9099);--mat-sys-outline-variant:light-dark(#c4c6d0, #44474e);--mat-sys-primary:light-dark(#005cbb, #abc7ff);--mat-sys-primary-container:light-dark(#d7e3ff, #00458f);--mat-sys-primary-fixed:light-dark(#d7e3ff, #d7e3ff);--mat-sys-primary-fixed-dim:light-dark(#abc7ff, #abc7ff);--mat-sys-scrim:light-dark(#000000, #000000);--mat-sys-secondary:light-dark(#565e71, #bec6dc);--mat-sys-secondary-container:light-dark(#dae2f9, #3e4759);--mat-sys-secondary-fixed:light-dark(#dae2f9, #dae2f9);--mat-sys-secondary-fixed-dim:light-dark(#bec6dc, #bec6dc);--mat-sys-shadow:light-dark(#000000, #000000);--mat-sys-surface:light-dark(#faf9fd, #121316);--mat-sys-surface-bright:light-dark(#faf9fd, #38393c);--mat-sys-surface-container:light-dark(#efedf0, #1f2022);--mat-sys-surface-container-high:light-dark(#e9e7eb, #292a2c);--mat-sys-surface-container-highest:light-dark(#e3e2e6, #343537);--mat-sys-surface-container-low:light-dark(#f4f3f6, #1a1b1f);--mat-sys-surface-container-lowest:light-dark(#ffffff, #0d0e11);--mat-sys-surface-dim:light-dark(#dbd9dd, #121316);--mat-sys-surface-tint:light-dark(#005cbb, #abc7ff);--mat-sys-surface-variant:light-dark(#e0e2ec, #44474e);--mat-sys-tertiary:light-dark(#005cbb, #abc7ff);--mat-sys-tertiary-container:light-dark(#d7e3ff, #00458f);--mat-sys-tertiary-fixed:light-dark(#d7e3ff, #d7e3ff);--mat-sys-tertiary-fixed-dim:light-dark(#abc7ff, #abc7ff);--mat-sys-neutral-variant20:#2d3038;--mat-sys-neutral10:#1a1b1f;--mat-sys-level0:0px 0px 0px 0px rgba(0, 0, 0, .2), 0px 0px 0px 0px rgba(0, 0, 0, .14), 0px 0px 0px 0px rgba(0, 0, 0, .12);--mat-sys-level1:0px 2px 1px -1px rgba(0, 0, 0, .2), 0px 1px 1px 0px rgba(0, 0, 0, .14), 0px 1px 3px 0px rgba(0, 0, 0, .12);--mat-sys-level2:0px 3px 3px -2px rgba(0, 0, 0, .2), 0px 3px 4px 0px rgba(0, 0, 0, .14), 0px 1px 8px 0px rgba(0, 0, 0, .12);--mat-sys-level3:0px 3px 5px -1px rgba(0, 0, 0, .2), 0px 6px 10px 0px rgba(0, 0, 0, .14), 0px 1px 18px 0px rgba(0, 0, 0, .12);--mat-sys-level4:0px 5px 5px -3px rgba(0, 0, 0, .2), 0px 8px 10px 1px rgba(0, 0, 0, .14), 0px 3px 14px 2px rgba(0, 0, 0, .12);--mat-sys-level5:0px 7px 8px -4px rgba(0, 0, 0, .2), 0px 12px 17px 2px rgba(0, 0, 0, .14), 0px 5px 22px 4px rgba(0, 0, 0, .12);--mat-sys-body-large:400 1rem / 1.5rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-body-large-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-body-large-line-height:1.5rem;--mat-sys-body-large-size:1rem;--mat-sys-body-large-tracking:.031rem;--mat-sys-body-large-weight:400;--mat-sys-body-medium:400 .875rem / 1.25rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-body-medium-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-body-medium-line-height:1.25rem;--mat-sys-body-medium-size:.875rem;--mat-sys-body-medium-tracking:.016rem;--mat-sys-body-medium-weight:400;--mat-sys-body-small:400 .75rem / 1rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-body-small-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-body-small-line-height:1rem;--mat-sys-body-small-size:.75rem;--mat-sys-body-small-tracking:.025rem;--mat-sys-body-small-weight:400;--mat-sys-display-large:400 3.562rem / 4rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-display-large-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-display-large-line-height:4rem;--mat-sys-display-large-size:3.562rem;--mat-sys-display-large-tracking:-.016rem;--mat-sys-display-large-weight:400;--mat-sys-display-medium:400 2.812rem / 3.25rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-display-medium-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-display-medium-line-height:3.25rem;--mat-sys-display-medium-size:2.812rem;--mat-sys-display-medium-tracking:0;--mat-sys-display-medium-weight:400;--mat-sys-display-small:400 2.25rem / 2.75rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-display-small-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-display-small-line-height:2.75rem;--mat-sys-display-small-size:2.25rem;--mat-sys-display-small-tracking:0;--mat-sys-display-small-weight:400;--mat-sys-headline-large:400 2rem / 2.5rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-headline-large-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-headline-large-line-height:2.5rem;--mat-sys-headline-large-size:2rem;--mat-sys-headline-large-tracking:0;--mat-sys-headline-large-weight:400;--mat-sys-headline-medium:400 1.75rem / 2.25rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-headline-medium-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-headline-medium-line-height:2.25rem;--mat-sys-headline-medium-size:1.75rem;--mat-sys-headline-medium-tracking:0;--mat-sys-headline-medium-weight:400;--mat-sys-headline-small:400 1.5rem / 2rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-headline-small-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-headline-small-line-height:2rem;--mat-sys-headline-small-size:1.5rem;--mat-sys-headline-small-tracking:0;--mat-sys-headline-small-weight:400;--mat-sys-label-large:500 .875rem / 1.25rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-label-large-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-label-large-line-height:1.25rem;--mat-sys-label-large-size:.875rem;--mat-sys-label-large-tracking:.006rem;--mat-sys-label-large-weight:500;--mat-sys-label-large-weight-prominent:700;--mat-sys-label-medium:500 .75rem / 1rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-label-medium-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-label-medium-line-height:1rem;--mat-sys-label-medium-size:.75rem;--mat-sys-label-medium-tracking:.031rem;--mat-sys-label-medium-weight:500;--mat-sys-label-medium-weight-prominent:700;--mat-sys-label-small:500 .688rem / 1rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-label-small-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-label-small-line-height:1rem;--mat-sys-label-small-size:.688rem;--mat-sys-label-small-tracking:.031rem;--mat-sys-label-small-weight:500;--mat-sys-title-large:400 1.375rem / 1.75rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-title-large-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-title-large-line-height:1.75rem;--mat-sys-title-large-size:1.375rem;--mat-sys-title-large-tracking:0;--mat-sys-title-large-weight:400;--mat-sys-title-medium:500 1rem / 1.5rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-title-medium-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-title-medium-line-height:1.5rem;--mat-sys-title-medium-size:1rem;--mat-sys-title-medium-tracking:.009rem;--mat-sys-title-medium-weight:500;--mat-sys-title-small:500 .875rem / 1.25rem -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-title-small-font:-apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;--mat-sys-title-small-line-height:1.25rem;--mat-sys-title-small-size:.875rem;--mat-sys-title-small-tracking:.006rem;--mat-sys-title-small-weight:500;--mat-sys-corner-extra-large:28px;--mat-sys-corner-extra-large-top:28px 28px 0 0;--mat-sys-corner-extra-small:4px;--mat-sys-corner-extra-small-top:4px 4px 0 0;--mat-sys-corner-full:9999px;--mat-sys-corner-large:16px;--mat-sys-corner-large-end:0 16px 16px 0;--mat-sys-corner-large-start:16px 0 0 16px;--mat-sys-corner-large-top:16px 16px 0 0;--mat-sys-corner-medium:12px;--mat-sys-corner-none:0;--mat-sys-corner-small:8px;--mat-sys-dragged-state-layer-opacity:.16;--mat-sys-focus-state-layer-opacity:.12;--mat-sys-hover-state-layer-opacity:.08;--mat-sys-pressed-state-layer-opacity:.12;--mat-snack-bar-container-shape:transparent;--mat-snack-bar-container-color:transparent;--mat-snack-bar-supporting-text-color:var(--color-text)}html,body{margin:0;padding:0;width:100%;height:100%}body{background:var(--color-bg);color:var(--color-text);font-family:-apple-system,BlinkMacSystemFont,SF Pro Display,Segoe UI,Helvetica Neue,Arial,sans-serif;transition:background .3s ease,color .3s ease;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;padding:0!important}</style><link rel="stylesheet" href="styles-HDA2O7OH.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="styles-HDA2O7OH.css"></noscript></head>
|
|
32
32
|
<body>
|
|
33
33
|
<app-root></app-root>
|
|
34
|
-
<script src="polyfills-2FSRUXKO.js" type="module"></script><script src="main-
|
|
34
|
+
<script src="polyfills-2FSRUXKO.js" type="module"></script><script src="main-FEA3BAHM.js" type="module"></script></body>
|
|
35
35
|
</html>
|