@whoz-oss/coday-client 0.210.0 → 0.211.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/chunk-2AZPKCT2.js +1 -0
- package/browser/{chunk-CHA2WYM2.js → chunk-2BY3KQRI.js} +1 -1
- package/browser/{chunk-CRXWZUPY.js → chunk-2C5ENIQ7.js} +1 -1
- package/browser/{chunk-JIHPEYRG.js → chunk-2S57CBYZ.js} +1 -1
- package/browser/{chunk-7MQRVE7E.js → chunk-32554AB2.js} +1 -1
- package/browser/{chunk-5K5EFCNT.js → chunk-3KLIHIYI.js} +1 -1
- package/browser/{chunk-M7LNEVHA.js → chunk-46WOQYAR.js} +1 -1
- package/browser/{chunk-G2BRVRGR.js → chunk-5TU5JR3W.js} +1 -1
- package/browser/{chunk-67HAMCVY.js → chunk-5V6YWKKW.js} +1 -1
- package/browser/{chunk-5VKJNF6W.js → chunk-63CH53ZX.js} +1 -1
- package/browser/{chunk-ENVCSKNG.js → chunk-6XJNC5K6.js} +1 -1
- package/browser/{chunk-RECIDGD4.js → chunk-74OAAPUO.js} +1 -1
- package/browser/{chunk-NBUZGGH4.js → chunk-76J57JUY.js} +1 -1
- package/browser/{chunk-BMUZTI7K.js → chunk-7BVQ2WHQ.js} +1 -1
- package/browser/{chunk-WLSXA23B.js → chunk-7VQ75OC6.js} +1 -1
- package/browser/{chunk-NOTRPH4G.js → chunk-7ZPD4MSE.js} +1 -1
- package/browser/{chunk-WX6YI2AB.js → chunk-AFDQ6DZP.js} +1 -1
- package/browser/{chunk-XBPK63K2.js → chunk-AR4TQRY3.js} +1 -1
- package/browser/{chunk-LW2QPJTT.js → chunk-BE7M4IG4.js} +1 -1
- package/browser/{chunk-IQNIJADZ.js → chunk-BFHBI6M4.js} +1 -1
- package/browser/{chunk-62EFBVKZ.js → chunk-BIRQBBDM.js} +1 -1
- package/browser/{chunk-IRZNRZ5Q.js → chunk-BVQ4XPRS.js} +1 -1
- package/browser/{chunk-74I5YU6R.js → chunk-C2WDN7VC.js} +1 -1
- package/browser/{chunk-4F2LQOD7.js → chunk-CHH2YNB6.js} +1 -1
- package/browser/{chunk-Z3NYRWYS.js → chunk-CJGAUAQG.js} +1 -1
- package/browser/{chunk-PRFGHN7L.js → chunk-CK52GCRW.js} +1 -1
- package/browser/{chunk-YWCHIQG6.js → chunk-DCQJI6UI.js} +1 -1
- package/browser/{chunk-XZKE2ZVV.js → chunk-E5DDFFB5.js} +1 -1
- package/browser/{chunk-ATKHLJJ3.js → chunk-E5MHC5FO.js} +1 -1
- package/browser/{chunk-TG75SVZ4.js → chunk-EIJAV76W.js} +1 -1
- package/browser/{chunk-QN2VKIVS.js → chunk-EKDXOFZ4.js} +1 -1
- package/browser/chunk-ERDL7CBL.js +1 -0
- package/browser/{chunk-ZDPUAQJJ.js → chunk-F5MVOI67.js} +1 -1
- package/browser/{chunk-L27W6223.js → chunk-F7X52MX4.js} +1 -1
- package/browser/{chunk-7V5RIRTC.js → chunk-FM5EGDVD.js} +1 -1
- package/browser/chunk-GFBKFSKL.js +1 -0
- package/browser/{chunk-WOOHWBWX.js → chunk-GMEPQIKD.js} +1 -1
- package/browser/{chunk-ESL6L24I.js → chunk-GPFXEDNE.js} +1 -1
- package/browser/{chunk-C3AMWFD7.js → chunk-H3TZ44FQ.js} +1 -1
- package/browser/{chunk-FAM7HWYV.js → chunk-HTKDXFLE.js} +1 -1
- package/browser/{chunk-W6TYWCQH.js → chunk-IAIUV3RV.js} +1 -1
- package/browser/{chunk-XWC7QZZV.js → chunk-ICVL3MNG.js} +1 -1
- package/browser/{chunk-WSXYJWT4.js → chunk-JE46DHIY.js} +1 -1
- package/browser/{chunk-NUBLOJ5E.js → chunk-JEQJLLFU.js} +1 -1
- package/browser/{chunk-Q4Y7AQCA.js → chunk-JKGV5VDH.js} +1 -1
- package/browser/{chunk-4KEHW6KL.js → chunk-JLMNYKPP.js} +1 -1
- package/browser/{chunk-KKWNUTR6.js → chunk-JZJSONXG.js} +1 -1
- package/browser/{chunk-DVSVPID7.js → chunk-KCCB2UUO.js} +1 -1
- package/browser/{chunk-6RZUBD7A.js → chunk-KQBJFLLL.js} +1 -1
- package/browser/chunk-LNJHIZH4.js +1 -0
- package/browser/{chunk-43DMEMMQ.js → chunk-LRFTCV6X.js} +1 -1
- package/browser/{chunk-4R6QW4JM.js → chunk-M7KJM66I.js} +1 -1
- package/browser/{chunk-LH4ATU27.js → chunk-MAHIDPCP.js} +1 -1
- package/browser/{chunk-COV73VGL.js → chunk-MXMEO3GF.js} +1 -1
- package/browser/{chunk-E3XC4CVU.js → chunk-NNVKL253.js} +1 -1
- package/browser/{chunk-PQIRH5Z6.js → chunk-NXKPUZGQ.js} +1 -1
- package/browser/chunk-OGRY5XOW.js +1 -0
- package/browser/{chunk-UG4U3HIK.js → chunk-P2H3E3A5.js} +1 -1
- package/browser/{chunk-RJBF3TIH.js → chunk-PG25CCE5.js} +1 -1
- package/browser/{chunk-EQXGFCI5.js → chunk-Q4QETBSU.js} +1 -1
- package/browser/{chunk-5J7BTB5J.js → chunk-QDO3O2UB.js} +4 -4
- package/browser/chunk-QGAK24J7.js +1 -0
- package/browser/{chunk-OBV4LQBZ.js → chunk-QN7OUZIZ.js} +1 -1
- package/browser/chunk-QP5FMZO7.js +1 -0
- package/browser/{chunk-TSCT2WKN.js → chunk-RAN3AUJQ.js} +1 -1
- package/browser/{chunk-FMSF6MCK.js → chunk-RAZWY4EA.js} +1 -1
- package/browser/{chunk-A2R5GVPT.js → chunk-RMX22TIL.js} +1 -1
- package/browser/{chunk-KZJRQ6RN.js → chunk-RULUSI5M.js} +1 -1
- package/browser/{chunk-RRBTVPFV.js → chunk-RYCGZWL2.js} +1 -1
- package/browser/{chunk-3ZE5RVI4.js → chunk-S7353OXG.js} +1 -1
- package/browser/{chunk-VYU454KQ.js → chunk-SDPYXC6U.js} +1 -1
- package/browser/{chunk-HPGBBOAI.js → chunk-SECZWZIB.js} +1 -1
- package/browser/{chunk-WYJF32O5.js → chunk-SVDYPTKV.js} +1 -1
- package/browser/{chunk-WQ5AIKDC.js → chunk-TD5QFOMN.js} +1 -1
- package/browser/{chunk-LBMJRBEQ.js → chunk-TGWQ4PGG.js} +1 -1
- package/browser/{chunk-L4MEWC6G.js → chunk-TISGZSTL.js} +1 -1
- package/browser/{chunk-QVN5DC7H.js → chunk-TT7A5DFQ.js} +1 -1
- package/browser/chunk-UQKCMPNK.js +1 -0
- package/browser/{chunk-YBAWPWX4.js → chunk-VMVYRYDR.js} +1 -1
- package/browser/{chunk-SF7PCURW.js → chunk-VSCZ2PDC.js} +1 -1
- package/browser/{chunk-LIFWT4DH.js → chunk-WBQOEBH7.js} +1 -1
- package/browser/{chunk-LRKPIL3B.js → chunk-WE6G6IT3.js} +1 -1
- package/browser/{chunk-LM2BKZRF.js → chunk-WFACDK2M.js} +1 -1
- package/browser/{chunk-5CBZIB6D.js → chunk-X5QAL64P.js} +1 -1
- package/browser/{chunk-OOFL4BOO.js → chunk-XEZ6VJ4O.js} +1 -1
- package/browser/{chunk-JNMBUP4W.js → chunk-XMX2HILZ.js} +1 -1
- package/browser/{chunk-UUHOSVZY.js → chunk-Y7F5MAVT.js} +1 -1
- package/browser/{chunk-S2C3L6HO.js → chunk-Z54GR5ZE.js} +1 -1
- package/browser/{chunk-VIDPCJ3F.js → chunk-ZX7BSCA5.js} +1 -1
- package/browser/index.html +1 -1
- package/browser/{main-I3MCZXWP.js → main-NWHBJ3QR.js} +1 -1
- package/package.json +1 -1
- package/browser/chunk-3AOPEZPX.js +0 -1
- package/browser/chunk-CHA2ZDSZ.js +0 -1
- package/browser/chunk-D6MSPWHT.js +0 -1
- package/browser/chunk-H4PZNDTU.js +0 -1
- package/browser/chunk-SCK76QV6.js +0 -1
- package/browser/chunk-UC4AZ2QN.js +0 -1
- package/browser/chunk-URX4BP67.js +0 -1
- package/browser/chunk-YP44HLIL.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as re,b as ie,c as V}from"./chunk-KKWNUTR6.js";import{a as oe}from"./chunk-NBUZGGH4.js";import{a as Q,b as X,e as ne}from"./chunk-3ZE5RVI4.js";import{a as G,b as C,c as B,h as Z,s as ee,x as te}from"./chunk-LRKPIL3B.js";import{c as K}from"./chunk-7MQRVE7E.js";import"./chunk-HPGBBOAI.js";import"./chunk-LIFWT4DH.js";import"./chunk-PQIRH5Z6.js";import"./chunk-LBMJRBEQ.js";import"./chunk-OBV4LQBZ.js";import{a as _,c as f}from"./chunk-IRZNRZ5Q.js";import{a as H,b as W}from"./chunk-FAM7HWYV.js";import"./chunk-WLSXA23B.js";import{a as Y,b as M}from"./chunk-7V5RIRTC.js";import{Q as U,S as J}from"./chunk-E3XC4CVU.js";import{Bb as S,Db as h,Fb as l,Ka as p,Rb as j,T as L,Tb as c,Ub as k,Vb as z,Wa as N,Z as w,ca as d,ga as u,h as A,ha as g,jb as E,lb as b,lc as v,ma as $,mb as y,pb as x,qb as T,rb as P,sb as a,t as I,ta as O,tb as s,ub as D}from"./chunk-5J7BTB5J.js";var R=class n{threadState=d(C);codayService=d(ne);threadList=f(this.threadState.threadList$,{initialValue:[]});selectedThread=f(this.threadState.selectedThread$,{initialValue:null});isThinking=f(this.codayService.isThinking$,{initialValue:!1});inviteEvent=f(this.codayService.currentInviteEvent$.pipe(I(t=>t?.invite===Z?null:t)),{initialValue:null});tasks=v(()=>{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=V[i.status]-V[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<ie?"in-progress":"paused"}static \u0275fac=function(e){return new(e||n)};static \u0275prov=w({token:n,factory:n.\u0275fac,providedIn:"root"})};var F=class n{projectState=d(M);threadState=d(C);destroy$=new A;eventSource=null;currentProject=null;constructor(){this.projectState.selectedProject$.pipe(L(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=te(i);if(!m)return;m instanceof ee&&(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=w({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&&D(0,"mat-spinner",6)}function me(n,t){n&1&&(a(0,"mat-icon"),c(1,"add"),s())}function ue(n,t){if(n&1&&(a(0,"span",16),c(1),s()),n&2){let e=l().$implicit,r=l();p(),k(r.filterCounts()[e.key])}}function ge(n,t){if(n&1){let e=S();a(0,"button",15),h("click",function(){let o=u(e).$implicit,i=l();return g(i.setFilter(o.key))}),a(1,"mat-icon",10),c(2),s(),a(3,"span"),c(4),s(),b(5,ue,2,1,"span",16),s()}if(n&2){let e=t.$implicit,r=l();j("active",r.activeFilter()===e.key),E("aria-selected",r.activeFilter()===e.key),p(2),k(e.icon),p(2),k(e.label),p(),y(r.filterCounts()[e.key]>0?5:-1)}}function _e(n,t){n&1&&(a(0,"div",12),D(1,"mat-spinner",17),a(2,"p"),c(3,"Loading tasks\u2026"),s()())}function fe(n,t){if(n&1){let e=S();a(0,"p"),c(1,"No tasks yet. Start your first one!"),s(),a(2,"button",19),h("click",function(){u(e);let o=l(2);return g(o.createTask())}),a(3,"mat-icon"),c(4,"add"),s(),c(5," New Task "),s()}}function he(n,t){n&1&&(a(0,"p"),c(1,"No tasks in this category."),s())}function ke(n,t){if(n&1&&(a(0,"div",13)(1,"mat-icon",18),c(2,"rocket_launch"),s(),b(3,fe,6,0)(4,he,2,0,"p"),s()),n&2){let e=l();p(3),y(e.activeFilter()==="all"?3:4)}}function ve(n,t){if(n&1){let e=S();a(0,"app-task-card",25),h("stopRequested",function(o){u(e);let i=l(3);return g(i.onStopRequested(o))})("deleteRequested",function(o){u(e);let i=l(3);return g(i.onDeleteRequested(o))})("starToggled",function(o){u(e);let i=l(3);return g(i.onStarToggled(o))})("markDoneRequested",function(o){u(e);let i=l(3);return g(i.onMarkDoneRequested(o))})("markActiveRequested",function(o){u(e);let i=l(3);return g(i.onMarkActiveRequested(o))}),s()}if(n&2){let e=t.$implicit;P("task",e)}}function Ce(n,t){if(n&1&&(a(0,"section",20)(1,"h2",21)(2,"mat-icon",22),c(3),s(),c(4),a(5,"span",23),c(6),s()(),a(7,"div",14),x(8,ve,1,1,"app-task-card",24,le),s()()),n&2){let e=t.$implicit;p(3),k(e.icon),p(),z(" ",e.label," "),p(2),k(e.tasks.length),p(2),T(e.tasks)}}function be(n,t){if(n&1&&x(0,Ce,10,3,"section",20,de),n&2){let e=l();T(e.taskGroups())}}function ye(n,t){if(n&1){let e=S();a(0,"app-task-card",25),h("stopRequested",function(o){u(e);let i=l(2);return g(i.onStopRequested(o))})("deleteRequested",function(o){u(e);let i=l(2);return g(i.onDeleteRequested(o))})("starToggled",function(o){u(e);let i=l(2);return g(i.onStarToggled(o))})("markDoneRequested",function(o){u(e);let i=l(2);return g(i.onMarkDoneRequested(o))})("markActiveRequested",function(o){u(e);let i=l(2);return g(i.onMarkActiveRequested(o))}),s()}if(n&2){let e=t.$implicit;P("task",e)}}function xe(n,t){if(n&1&&(a(0,"div",14),x(1,ye,1,1,"app-task-card",24,le),s()),n&2){let e=l();p(),T(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=d(K);projectState=d(M);threadState=d(C);threadApi=d(G);taskStatus=d(R);userService=d(B);projectApi=d(Y);destroyRef=d($);_projectEventStream=d(F);filters=Te;activeFilter=O("all");starredOnly=O(!1);isCreating=O(!1);isLoadingList=f(this.threadState.isLoadingThreadList$,{initialValue:!1});username=f(this.userService.username$,{initialValue:null});allTasks=this.taskStatus.tasks;filteredTasks=v(()=>{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=v(()=>{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=v(()=>{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(_(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(!0),this.threadApi.createThread().pipe(_(this.destroyRef)).subscribe({next:e=>{this.isCreating.set(!1),this.router.navigate(["project",t,"thread",e.thread.id])},error:e=>{console.error("[TASK-CONTROL] Failed to create thread:",e),this.isCreating.set(!1)}}))}onStopRequested(t){this.threadApi.stopThread(t).pipe(_(this.destroyRef)).subscribe({error:e=>console.error("[TASK-CONTROL] Failed to stop thread:",e)})}onDeleteRequested(t){this.threadApi.deleteThread(t).pipe(_(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(_(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(_(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(_(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=N({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&&(a(0,"app-sidenav")(1,"div",0)(2,"header",1)(3,"div",2)(4,"h1",3)(5,"mat-icon",4),c(6,"rocket_launch"),s(),c(7," Task Control "),s(),a(8,"button",5),h("click",function(){return r.createTask()}),b(9,pe,1,0,"mat-spinner",6)(10,me,2,0,"mat-icon"),c(11," New Task "),s()(),a(12,"nav",7),x(13,ge,6,6,"button",8,ce),a(15,"button",9),h("click",function(){return r.toggleStarredFilter()}),a(16,"mat-icon",10),c(17,"star"),s(),a(18,"span"),c(19,"Starred"),s()()()(),a(20,"main",11),b(21,_e,4,0,"div",12)(22,ke,5,1,"div",13)(23,be,2,0)(24,xe,3,0,"div",14),s()()()),e&2&&(p(8),P("disabled",r.isCreating()),p(),y(r.isCreating()?9:10),p(4),T(r.filters),p(2),j("active",r.starredOnly()),E("aria-checked",r.starredOnly()),p(6),y(r.isLoadingList()?21:r.filteredTasks().length===0?22:r.activeFilter()==="all"?23:24))},dependencies:[re,oe,W,H,J,U,X,Q],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}"],changeDetection:0})};export{se as TaskControlComponent};
|
|
1
|
+
import{a as re,b as ie,c as V}from"./chunk-JZJSONXG.js";import{a as oe}from"./chunk-76J57JUY.js";import{a as Q,b as X,e as ne}from"./chunk-S7353OXG.js";import{a as G,b as C,c as B,h as Z,s as ee,x as te}from"./chunk-WE6G6IT3.js";import{c as K}from"./chunk-32554AB2.js";import"./chunk-SECZWZIB.js";import"./chunk-WBQOEBH7.js";import"./chunk-NXKPUZGQ.js";import"./chunk-TGWQ4PGG.js";import"./chunk-QN7OUZIZ.js";import{a as _,c as f}from"./chunk-BVQ4XPRS.js";import{a as H,b as W}from"./chunk-HTKDXFLE.js";import"./chunk-7VQ75OC6.js";import{a as Y,b as M}from"./chunk-FM5EGDVD.js";import{Q as U,S as J}from"./chunk-NNVKL253.js";import{Bb as S,Db as h,Fb as l,Ka as p,Rb as j,T as L,Tb as c,Ub as k,Vb as z,Wa as N,Z as w,ca as d,ga as u,h as A,ha as g,jb as E,lb as b,lc as v,ma as $,mb as y,pb as x,qb as T,rb as P,sb as a,t as I,ta as O,tb as s,ub as D}from"./chunk-QDO3O2UB.js";var R=class n{threadState=d(C);codayService=d(ne);threadList=f(this.threadState.threadList$,{initialValue:[]});selectedThread=f(this.threadState.selectedThread$,{initialValue:null});isThinking=f(this.codayService.isThinking$,{initialValue:!1});inviteEvent=f(this.codayService.currentInviteEvent$.pipe(I(t=>t?.invite===Z?null:t)),{initialValue:null});tasks=v(()=>{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=V[i.status]-V[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<ie?"in-progress":"paused"}static \u0275fac=function(e){return new(e||n)};static \u0275prov=w({token:n,factory:n.\u0275fac,providedIn:"root"})};var F=class n{projectState=d(M);threadState=d(C);destroy$=new A;eventSource=null;currentProject=null;constructor(){this.projectState.selectedProject$.pipe(L(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=te(i);if(!m)return;m instanceof ee&&(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=w({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&&D(0,"mat-spinner",6)}function me(n,t){n&1&&(a(0,"mat-icon"),c(1,"add"),s())}function ue(n,t){if(n&1&&(a(0,"span",16),c(1),s()),n&2){let e=l().$implicit,r=l();p(),k(r.filterCounts()[e.key])}}function ge(n,t){if(n&1){let e=S();a(0,"button",15),h("click",function(){let o=u(e).$implicit,i=l();return g(i.setFilter(o.key))}),a(1,"mat-icon",10),c(2),s(),a(3,"span"),c(4),s(),b(5,ue,2,1,"span",16),s()}if(n&2){let e=t.$implicit,r=l();j("active",r.activeFilter()===e.key),E("aria-selected",r.activeFilter()===e.key),p(2),k(e.icon),p(2),k(e.label),p(),y(r.filterCounts()[e.key]>0?5:-1)}}function _e(n,t){n&1&&(a(0,"div",12),D(1,"mat-spinner",17),a(2,"p"),c(3,"Loading tasks\u2026"),s()())}function fe(n,t){if(n&1){let e=S();a(0,"p"),c(1,"No tasks yet. Start your first one!"),s(),a(2,"button",19),h("click",function(){u(e);let o=l(2);return g(o.createTask())}),a(3,"mat-icon"),c(4,"add"),s(),c(5," New Task "),s()}}function he(n,t){n&1&&(a(0,"p"),c(1,"No tasks in this category."),s())}function ke(n,t){if(n&1&&(a(0,"div",13)(1,"mat-icon",18),c(2,"rocket_launch"),s(),b(3,fe,6,0)(4,he,2,0,"p"),s()),n&2){let e=l();p(3),y(e.activeFilter()==="all"?3:4)}}function ve(n,t){if(n&1){let e=S();a(0,"app-task-card",25),h("stopRequested",function(o){u(e);let i=l(3);return g(i.onStopRequested(o))})("deleteRequested",function(o){u(e);let i=l(3);return g(i.onDeleteRequested(o))})("starToggled",function(o){u(e);let i=l(3);return g(i.onStarToggled(o))})("markDoneRequested",function(o){u(e);let i=l(3);return g(i.onMarkDoneRequested(o))})("markActiveRequested",function(o){u(e);let i=l(3);return g(i.onMarkActiveRequested(o))}),s()}if(n&2){let e=t.$implicit;P("task",e)}}function Ce(n,t){if(n&1&&(a(0,"section",20)(1,"h2",21)(2,"mat-icon",22),c(3),s(),c(4),a(5,"span",23),c(6),s()(),a(7,"div",14),x(8,ve,1,1,"app-task-card",24,le),s()()),n&2){let e=t.$implicit;p(3),k(e.icon),p(),z(" ",e.label," "),p(2),k(e.tasks.length),p(2),T(e.tasks)}}function be(n,t){if(n&1&&x(0,Ce,10,3,"section",20,de),n&2){let e=l();T(e.taskGroups())}}function ye(n,t){if(n&1){let e=S();a(0,"app-task-card",25),h("stopRequested",function(o){u(e);let i=l(2);return g(i.onStopRequested(o))})("deleteRequested",function(o){u(e);let i=l(2);return g(i.onDeleteRequested(o))})("starToggled",function(o){u(e);let i=l(2);return g(i.onStarToggled(o))})("markDoneRequested",function(o){u(e);let i=l(2);return g(i.onMarkDoneRequested(o))})("markActiveRequested",function(o){u(e);let i=l(2);return g(i.onMarkActiveRequested(o))}),s()}if(n&2){let e=t.$implicit;P("task",e)}}function xe(n,t){if(n&1&&(a(0,"div",14),x(1,ye,1,1,"app-task-card",24,le),s()),n&2){let e=l();p(),T(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=d(K);projectState=d(M);threadState=d(C);threadApi=d(G);taskStatus=d(R);userService=d(B);projectApi=d(Y);destroyRef=d($);_projectEventStream=d(F);filters=Te;activeFilter=O("all");starredOnly=O(!1);isCreating=O(!1);isLoadingList=f(this.threadState.isLoadingThreadList$,{initialValue:!1});username=f(this.userService.username$,{initialValue:null});allTasks=this.taskStatus.tasks;filteredTasks=v(()=>{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=v(()=>{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=v(()=>{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(_(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(!0),this.threadApi.createThread().pipe(_(this.destroyRef)).subscribe({next:e=>{this.isCreating.set(!1),this.router.navigate(["project",t,"thread",e.thread.id])},error:e=>{console.error("[TASK-CONTROL] Failed to create thread:",e),this.isCreating.set(!1)}}))}onStopRequested(t){this.threadApi.stopThread(t).pipe(_(this.destroyRef)).subscribe({error:e=>console.error("[TASK-CONTROL] Failed to stop thread:",e)})}onDeleteRequested(t){this.threadApi.deleteThread(t).pipe(_(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(_(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(_(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(_(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=N({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&&(a(0,"app-sidenav")(1,"div",0)(2,"header",1)(3,"div",2)(4,"h1",3)(5,"mat-icon",4),c(6,"rocket_launch"),s(),c(7," Task Control "),s(),a(8,"button",5),h("click",function(){return r.createTask()}),b(9,pe,1,0,"mat-spinner",6)(10,me,2,0,"mat-icon"),c(11," New Task "),s()(),a(12,"nav",7),x(13,ge,6,6,"button",8,ce),a(15,"button",9),h("click",function(){return r.toggleStarredFilter()}),a(16,"mat-icon",10),c(17,"star"),s(),a(18,"span"),c(19,"Starred"),s()()()(),a(20,"main",11),b(21,_e,4,0,"div",12)(22,ke,5,1,"div",13)(23,be,2,0)(24,xe,3,0,"div",14),s()()()),e&2&&(p(8),P("disabled",r.isCreating()),p(),y(r.isCreating()?9:10),p(4),T(r.filters),p(2),j("active",r.starredOnly()),E("aria-checked",r.starredOnly()),p(6),y(r.isLoadingList()?21:r.filteredTasks().length===0?22:r.activeFilter()==="all"?23:24))},dependencies:[re,oe,W,H,J,U,X,Q],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}"],changeDetection:0})};export{se as TaskControlComponent};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as Ut,b as Xt,c as Zt}from"./chunk-PQIRH5Z6.js";import{d as Ht,f as Te,h as zt,i as qt,j as Kt,l as Qt,m as $t,p as Wt,s as Yt,v as Jt}from"./chunk-OBV4LQBZ.js";import{a as Qe}from"./chunk-IRZNRZ5Q.js";import{a as $e}from"./chunk-FAM7HWYV.js";import{F as We,b as en,c as tn,g as nn,h as on,j as an,l as Oe,o as rn,r as sn,s as ln,w as cn,x as dn,y as mn,z as pn}from"./chunk-WLSXA23B.js";import{A as Bt,E as U,K as ne,M as ie,N as he,O as Gt,P as oe,a as jt,b as Vt,h as Ee,i as pe,j as Lt,t as W,u as ue,w as Ke}from"./chunk-E3XC4CVU.js";import{$a as De,$b as Tt,A as ae,Ab as ot,B as Z,Bb as O,Cb as se,Db as _,Eb as Ie,F as gt,Fb as d,G as Ne,Gb as L,Hb as M,Hc as Nt,Ib as te,J as _t,Jb as Q,Ka as r,Kb as D,Lb as I,Ma as Ct,Na as we,Pa as ze,Pb as Se,Qb as le,R as ee,Ra as Mt,Rb as P,S as ve,Sa as ke,Sb as ce,T as bt,Tb as u,Ub as C,Vb as de,Wa as b,Wb as Et,Xa as K,Ya as j,Z as yt,_ as q,a as X,aa as F,ab as re,ac as $,b as ye,bb as wt,bc as Ot,ca as s,cc as at,db as kt,e as J,ga as x,h as S,ha as v,ia as je,ib as Dt,ic as Pt,jb as g,k as ft,ka as Ce,kc as At,la as Me,lb as h,lc as G,m as xe,ma as Ve,mb as f,nb as It,nc as Rt,oa as y,ob as qe,oc as me,pa as Le,pb as E,pc as w,qb as T,rb as p,sb as l,ta as B,tb as c,ua as xt,ub as k,uc as z,va as Be,vb as N,vc as A,wa as vt,wb as V,wc as Ft,xb as St,ya as H,za as He}from"./chunk-5J7BTB5J.js";var Vn=["mat-menu-item",""],Ln=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],Bn=["mat-icon, [matMenuItemIcon]","*"];function Hn(n,o){n&1&&(je(),l(0,"svg",2),k(1,"polygon",3),c())}var zn=["*"];function qn(n,o){if(n&1){let e=O();N(0,"div",0),Ie("click",function(){x(e);let i=d();return v(i.closed.emit("click"))})("animationstart",function(i){x(e);let a=d();return v(a._onAnimationStart(i.animationName))})("animationend",function(i){x(e);let a=d();return v(a._onAnimationDone(i.animationName))})("animationcancel",function(i){x(e);let a=d();return v(a._onAnimationDone(i.animationName))}),N(1,"div",1),M(2),V()()}if(n&2){let e=d();ce(e._classList),P("mat-menu-panel-animations-disabled",e._animationsDisabled)("mat-menu-panel-exit-animation",e._panelAnimationState==="void")("mat-menu-panel-animating",e._isAnimating()),se("id",e.panelId),g("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby||null)("aria-describedby",e.ariaDescribedby||null)}}var st=new F("MAT_MENU_PANEL"),Pe=(()=>{class n{_elementRef=s(H);_document=s(Me);_focusMonitor=s(Ee);_parentMenu=s(st,{optional:!0});_changeDetectorRef=s(z);role="menuitem";disabled=!1;disableRipple=!1;_hovered=new S;_focused=new S;_highlighted=!1;_triggersSubmenu=!1;constructor(){s(pe).load(he),this._parentMenu?.addItem?.(this)}focus(e,t){this._focusMonitor&&e?this._focusMonitor.focusVia(this._getHostElement(),e,t):this._getHostElement().focus(t),this._focused.next(this)}ngAfterViewInit(){this._focusMonitor&&this._focusMonitor.monitor(this._elementRef,!1)}ngOnDestroy(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete(),this._focused.complete()}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._elementRef.nativeElement}_checkDisabled(e){this.disabled&&(e.preventDefault(),e.stopPropagation())}_handleMouseEnter(){this._hovered.next(this)}getLabel(){let e=this._elementRef.nativeElement.cloneNode(!0),t=e.querySelectorAll("mat-icon, .material-icons");for(let i=0;i<t.length;i++)t[i].remove();return e.textContent?.trim()||""}_setHighlighted(e){this._highlighted=e,this._changeDetectorRef.markForCheck()}_setTriggersSubmenu(e){this._triggersSubmenu=e,this._changeDetectorRef.markForCheck()}_hasFocus(){return this._document&&this._document.activeElement===this._getHostElement()}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=b({type:n,selectors:[["","mat-menu-item",""]],hostAttrs:[1,"mat-mdc-menu-item","mat-focus-indicator"],hostVars:8,hostBindings:function(t,i){t&1&&_("click",function(m){return i._checkDisabled(m)})("mouseenter",function(){return i._handleMouseEnter()}),t&2&&(g("role",i.role)("tabindex",i._getTabIndex())("aria-disabled",i.disabled)("disabled",i.disabled||null),P("mat-mdc-menu-item-highlighted",i._highlighted)("mat-mdc-menu-item-submenu-trigger",i._triggersSubmenu))},inputs:{role:"role",disabled:[2,"disabled","disabled",A],disableRipple:[2,"disableRipple","disableRipple",A]},exportAs:["matMenuItem"],attrs:Vn,ngContentSelectors:Bn,decls:5,vars:3,consts:[[1,"mat-mdc-menu-item-text"],["matRipple","",1,"mat-mdc-menu-ripple",3,"matRippleDisabled","matRippleTrigger"],["viewBox","0 0 5 10","focusable","false","aria-hidden","true",1,"mat-mdc-menu-submenu-icon"],["points","0,0 5,5 0,10"]],template:function(t,i){t&1&&(L(Ln),M(0),l(1,"span",0),M(2,1),c(),k(3,"div",1),h(4,Hn,2,0,":svg:svg",2)),t&2&&(r(3),p("matRippleDisabled",i.disableRipple||i.disabled)("matRippleTrigger",i._getHostElement()),r(),f(i._triggersSubmenu?4:-1))},dependencies:[ie],encapsulation:2,changeDetection:0})}return n})();var fn=new F("MatMenuContent"),Bo=(()=>{class n{_template=s(we);_appRef=s(Dt);_injector=s(Ce);_viewContainerRef=s(ke);_document=s(Me);_changeDetectorRef=s(z);_portal;_outlet;_attached=new S;constructor(){}attach(e={}){this._portal||(this._portal=new Te(this._template,this._viewContainerRef)),this.detach(),this._outlet||(this._outlet=new zt(this._document.createElement("div"),this._appRef,this._injector));let t=this._template.elementRef.nativeElement;t.parentNode.insertBefore(this._outlet.outletElement,t),this._changeDetectorRef.markForCheck(),this._portal.attach(this._outlet,e),this._attached.next()}detach(){this._portal?.isAttached&&this._portal.detach()}ngOnDestroy(){this.detach(),this._outlet?.dispose()}static \u0275fac=function(t){return new(t||n)};static \u0275dir=j({type:n,selectors:[["ng-template","matMenuContent",""]],features:[$([{provide:fn,useExisting:n}])]})}return n})(),Kn=new F("mat-menu-default-options",{providedIn:"root",factory:()=>({overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"})}),rt="_mat-menu-enter",Ye="_mat-menu-exit",ge=(()=>{class n{_elementRef=s(H);_changeDetectorRef=s(z);_injector=s(Ce);_keyManager;_xPosition;_yPosition;_firstItemFocusRef;_exitFallbackTimeout;_animationsDisabled=ne();_allItems;_directDescendantItems=new He;_classList={};_panelAnimationState="void";_animationDone=new S;_isAnimating=B(!1);parentMenu;direction;overlayPanelClass;backdropClass;ariaLabel;ariaLabelledby;ariaDescribedby;get xPosition(){return this._xPosition}set xPosition(e){this._xPosition=e,this.setPositionClasses()}get yPosition(){return this._yPosition}set yPosition(e){this._yPosition=e,this.setPositionClasses()}templateRef;items;lazyContent;overlapTrigger=!1;hasBackdrop;set panelClass(e){let t=this._previousPanelClass,i=X({},this._classList);t&&t.length&&t.split(" ").forEach(a=>{i[a]=!1}),this._previousPanelClass=e,e&&e.length&&(e.split(" ").forEach(a=>{i[a]=!0}),this._elementRef.nativeElement.className=""),this._classList=i}_previousPanelClass;get classList(){return this.panelClass}set classList(e){this.panelClass=e}closed=new y;close=this.closed;panelId=s(W).getId("mat-menu-panel-");constructor(){let e=s(Kn);this.overlayPanelClass=e.overlayPanelClass||"",this._xPosition=e.xPosition,this._yPosition=e.yPosition,this.backdropClass=e.backdropClass,this.overlapTrigger=e.overlapTrigger,this.hasBackdrop=e.hasBackdrop}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new Ke(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(ee(this._directDescendantItems),ve(e=>ae(...e.map(t=>t._focused)))).subscribe(e=>this._keyManager.updateActiveItem(e)),this._directDescendantItems.changes.subscribe(e=>{let t=this._keyManager;if(this._panelAnimationState==="enter"&&t.activeItem?._hasFocus()){let i=e.toArray(),a=Math.max(0,Math.min(i.length-1,t.activeItemIndex||0));i[a]&&!i[a].disabled?t.setActiveItem(a):t.setNextItemActive()}})}ngOnDestroy(){this._keyManager?.destroy(),this._directDescendantItems.destroy(),this.closed.complete(),this._firstItemFocusRef?.destroy(),clearTimeout(this._exitFallbackTimeout)}_hovered(){return this._directDescendantItems.changes.pipe(ee(this._directDescendantItems),ve(t=>ae(...t.map(i=>i._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){let t=e.keyCode,i=this._keyManager;switch(t){case 27:ue(e)||(e.preventDefault(),this.closed.emit("keydown"));break;case 37:this.parentMenu&&this.direction==="ltr"&&this.closed.emit("keydown");break;case 39:this.parentMenu&&this.direction==="rtl"&&this.closed.emit("keydown");break;default:(t===38||t===40)&&i.setFocusOrigin("keyboard"),i.onKeydown(e);return}}focusFirstItem(e="program"){this._firstItemFocusRef?.destroy(),this._firstItemFocusRef=Ct(()=>{let t=this._resolvePanel();if(!t||!t.contains(document.activeElement)){let i=this._keyManager;i.setFocusOrigin(e).setFirstItemActive(),!i.activeItem&&t&&t.focus()}},{injector:this._injector})}resetActiveItem(){this._keyManager.setActiveItem(-1)}setElevation(e){}setPositionClasses(e=this.xPosition,t=this.yPosition){this._classList=ye(X({},this._classList),{"mat-menu-before":e==="before","mat-menu-after":e==="after","mat-menu-above":t==="above","mat-menu-below":t==="below"}),this._changeDetectorRef.markForCheck()}_onAnimationDone(e){let t=e===Ye;(t||e===rt)&&(t&&(clearTimeout(this._exitFallbackTimeout),this._exitFallbackTimeout=void 0),this._animationDone.next(t?"void":"enter"),this._isAnimating.set(!1))}_onAnimationStart(e){(e===rt||e===Ye)&&this._isAnimating.set(!0)}_setIsOpen(e){if(this._panelAnimationState=e?"enter":"void",e){if(this._keyManager.activeItemIndex===0){let t=this._resolvePanel();t&&(t.scrollTop=0)}}else this._animationsDisabled||(this._exitFallbackTimeout=setTimeout(()=>this._onAnimationDone(Ye),200));this._animationsDisabled&&setTimeout(()=>{this._onAnimationDone(e?rt:Ye)}),this._changeDetectorRef.markForCheck()}_updateDirectDescendants(){this._allItems.changes.pipe(ee(this._allItems)).subscribe(e=>{this._directDescendantItems.reset(e.filter(t=>t._parentMenu===this)),this._directDescendantItems.notifyOnChanges()})}_resolvePanel(){let e=null;return this._directDescendantItems.length&&(e=this._directDescendantItems.first._getHostElement().closest('[role="menu"]')),e}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=b({type:n,selectors:[["mat-menu"]],contentQueries:function(t,i,a){if(t&1&&te(a,fn,5)(a,Pe,5)(a,Pe,4),t&2){let m;D(m=I())&&(i.lazyContent=m.first),D(m=I())&&(i._allItems=m),D(m=I())&&(i.items=m)}},viewQuery:function(t,i){if(t&1&&Q(we,5),t&2){let a;D(a=I())&&(i.templateRef=a.first)}},hostVars:3,hostBindings:function(t,i){t&2&&g("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},inputs:{backdropClass:"backdropClass",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],xPosition:"xPosition",yPosition:"yPosition",overlapTrigger:[2,"overlapTrigger","overlapTrigger",A],hasBackdrop:[2,"hasBackdrop","hasBackdrop",e=>e==null?null:A(e)],panelClass:[0,"class","panelClass"],classList:"classList"},outputs:{closed:"closed",close:"close"},exportAs:["matMenu"],features:[$([{provide:st,useExisting:n}])],ngContentSelectors:zn,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-mdc-menu-panel",3,"click","animationstart","animationend","animationcancel","id"],[1,"mat-mdc-menu-content"]],template:function(t,i){t&1&&(L(),wt(0,qn,3,12,"ng-template"))},styles:[`mat-menu{display:none}.mat-mdc-menu-content{margin:0;padding:8px 0;outline:0}.mat-mdc-menu-content,.mat-mdc-menu-content .mat-mdc-menu-item .mat-mdc-menu-item-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;flex:1;white-space:normal;font-family:var(--mat-menu-item-label-text-font, var(--mat-sys-label-large-font));line-height:var(--mat-menu-item-label-text-line-height, var(--mat-sys-label-large-line-height));font-size:var(--mat-menu-item-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-menu-item-label-text-tracking, var(--mat-sys-label-large-tracking));font-weight:var(--mat-menu-item-label-text-weight, var(--mat-sys-label-large-weight))}@keyframes _mat-menu-enter{from{opacity:0;transform:scale(0.8)}to{opacity:1;transform:none}}@keyframes _mat-menu-exit{from{opacity:1}to{opacity:0}}.mat-mdc-menu-panel{min-width:112px;max-width:280px;overflow:auto;box-sizing:border-box;outline:0;animation:_mat-menu-enter 120ms cubic-bezier(0, 0, 0.2, 1);border-radius:var(--mat-menu-container-shape, var(--mat-sys-corner-extra-small));background-color:var(--mat-menu-container-color, var(--mat-sys-surface-container));box-shadow:var(--mat-menu-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));will-change:transform,opacity}.mat-mdc-menu-panel.mat-menu-panel-exit-animation{animation:_mat-menu-exit 100ms 25ms linear forwards}.mat-mdc-menu-panel.mat-menu-panel-animations-disabled{animation:none}.mat-mdc-menu-panel.mat-menu-panel-animating{pointer-events:none}.mat-mdc-menu-panel.mat-menu-panel-animating:has(.mat-mdc-menu-content:empty){display:none}@media(forced-colors: active){.mat-mdc-menu-panel{outline:solid 1px}}.mat-mdc-menu-panel .mat-divider{border-top-color:var(--mat-menu-divider-color, var(--mat-sys-surface-variant));margin-bottom:var(--mat-menu-divider-bottom-spacing, 8px);margin-top:var(--mat-menu-divider-top-spacing, 8px)}.mat-mdc-menu-item{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;cursor:pointer;width:100%;text-align:left;box-sizing:border-box;color:inherit;font-size:inherit;background:none;text-decoration:none;margin:0;min-height:48px;padding-left:var(--mat-menu-item-leading-spacing, 12px);padding-right:var(--mat-menu-item-trailing-spacing, 12px);-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-menu-item::-moz-focus-inner{border:0}[dir=rtl] .mat-mdc-menu-item{padding-left:var(--mat-menu-item-trailing-spacing, 12px);padding-right:var(--mat-menu-item-leading-spacing, 12px)}.mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-left:var(--mat-menu-item-with-icon-leading-spacing, 12px);padding-right:var(--mat-menu-item-with-icon-trailing-spacing, 12px)}[dir=rtl] .mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-left:var(--mat-menu-item-with-icon-trailing-spacing, 12px);padding-right:var(--mat-menu-item-with-icon-leading-spacing, 12px)}.mat-mdc-menu-item,.mat-mdc-menu-item:visited,.mat-mdc-menu-item:link{color:var(--mat-menu-item-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-menu-item .mat-icon-no-color,.mat-mdc-menu-item .mat-mdc-menu-submenu-icon{color:var(--mat-menu-item-icon-color, var(--mat-sys-on-surface-variant))}.mat-mdc-menu-item[disabled]{cursor:default;opacity:.38}.mat-mdc-menu-item[disabled]::after{display:block;position:absolute;content:"";top:0;left:0;bottom:0;right:0}.mat-mdc-menu-item:focus{outline:0}.mat-mdc-menu-item .mat-icon{flex-shrink:0;margin-right:var(--mat-menu-item-spacing, 12px);height:var(--mat-menu-item-icon-size, 24px);width:var(--mat-menu-item-icon-size, 24px)}[dir=rtl] .mat-mdc-menu-item{text-align:right}[dir=rtl] .mat-mdc-menu-item .mat-icon{margin-right:0;margin-left:var(--mat-menu-item-spacing, 12px)}.mat-mdc-menu-item:not([disabled]):hover{background-color:var(--mat-menu-item-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))}.mat-mdc-menu-item:not([disabled]).cdk-program-focused,.mat-mdc-menu-item:not([disabled]).cdk-keyboard-focused,.mat-mdc-menu-item:not([disabled]).mat-mdc-menu-item-highlighted{background-color:var(--mat-menu-item-focus-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-focus-state-layer-opacity) * 100%), transparent))}@media(forced-colors: active){.mat-mdc-menu-item{margin-top:1px}}.mat-mdc-menu-submenu-icon{width:var(--mat-menu-item-icon-size, 24px);height:10px;fill:currentColor;padding-left:var(--mat-menu-item-spacing, 12px)}[dir=rtl] .mat-mdc-menu-submenu-icon{padding-right:var(--mat-menu-item-spacing, 12px);padding-left:0}[dir=rtl] .mat-mdc-menu-submenu-icon polygon{transform:scaleX(-1);transform-origin:center}@media(forced-colors: active){.mat-mdc-menu-submenu-icon{fill:CanvasText}}.mat-mdc-menu-item .mat-mdc-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}
|
|
1
|
+
import{a as Ut,b as Xt,c as Zt}from"./chunk-NXKPUZGQ.js";import{d as Ht,f as Te,h as zt,i as qt,j as Kt,l as Qt,m as $t,p as Wt,s as Yt,v as Jt}from"./chunk-QN7OUZIZ.js";import{a as Qe}from"./chunk-BVQ4XPRS.js";import{a as $e}from"./chunk-HTKDXFLE.js";import{F as We,b as en,c as tn,g as nn,h as on,j as an,l as Oe,o as rn,r as sn,s as ln,w as cn,x as dn,y as mn,z as pn}from"./chunk-7VQ75OC6.js";import{A as Bt,E as U,K as ne,M as ie,N as he,O as Gt,P as oe,a as jt,b as Vt,h as Ee,i as pe,j as Lt,t as W,u as ue,w as Ke}from"./chunk-NNVKL253.js";import{$a as De,$b as Tt,A as ae,Ab as ot,B as Z,Bb as O,Cb as se,Db as _,Eb as Ie,F as gt,Fb as d,G as Ne,Gb as L,Hb as M,Hc as Nt,Ib as te,J as _t,Jb as Q,Ka as r,Kb as D,Lb as I,Ma as Ct,Na as we,Pa as ze,Pb as Se,Qb as le,R as ee,Ra as Mt,Rb as P,S as ve,Sa as ke,Sb as ce,T as bt,Tb as u,Ub as C,Vb as de,Wa as b,Wb as Et,Xa as K,Ya as j,Z as yt,_ as q,a as X,aa as F,ab as re,ac as $,b as ye,bb as wt,bc as Ot,ca as s,cc as at,db as kt,e as J,ga as x,h as S,ha as v,ia as je,ib as Dt,ic as Pt,jb as g,k as ft,ka as Ce,kc as At,la as Me,lb as h,lc as G,m as xe,ma as Ve,mb as f,nb as It,nc as Rt,oa as y,ob as qe,oc as me,pa as Le,pb as E,pc as w,qb as T,rb as p,sb as l,ta as B,tb as c,ua as xt,ub as k,uc as z,va as Be,vb as N,vc as A,wa as vt,wb as V,wc as Ft,xb as St,ya as H,za as He}from"./chunk-QDO3O2UB.js";var Vn=["mat-menu-item",""],Ln=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],Bn=["mat-icon, [matMenuItemIcon]","*"];function Hn(n,o){n&1&&(je(),l(0,"svg",2),k(1,"polygon",3),c())}var zn=["*"];function qn(n,o){if(n&1){let e=O();N(0,"div",0),Ie("click",function(){x(e);let i=d();return v(i.closed.emit("click"))})("animationstart",function(i){x(e);let a=d();return v(a._onAnimationStart(i.animationName))})("animationend",function(i){x(e);let a=d();return v(a._onAnimationDone(i.animationName))})("animationcancel",function(i){x(e);let a=d();return v(a._onAnimationDone(i.animationName))}),N(1,"div",1),M(2),V()()}if(n&2){let e=d();ce(e._classList),P("mat-menu-panel-animations-disabled",e._animationsDisabled)("mat-menu-panel-exit-animation",e._panelAnimationState==="void")("mat-menu-panel-animating",e._isAnimating()),se("id",e.panelId),g("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby||null)("aria-describedby",e.ariaDescribedby||null)}}var st=new F("MAT_MENU_PANEL"),Pe=(()=>{class n{_elementRef=s(H);_document=s(Me);_focusMonitor=s(Ee);_parentMenu=s(st,{optional:!0});_changeDetectorRef=s(z);role="menuitem";disabled=!1;disableRipple=!1;_hovered=new S;_focused=new S;_highlighted=!1;_triggersSubmenu=!1;constructor(){s(pe).load(he),this._parentMenu?.addItem?.(this)}focus(e,t){this._focusMonitor&&e?this._focusMonitor.focusVia(this._getHostElement(),e,t):this._getHostElement().focus(t),this._focused.next(this)}ngAfterViewInit(){this._focusMonitor&&this._focusMonitor.monitor(this._elementRef,!1)}ngOnDestroy(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete(),this._focused.complete()}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._elementRef.nativeElement}_checkDisabled(e){this.disabled&&(e.preventDefault(),e.stopPropagation())}_handleMouseEnter(){this._hovered.next(this)}getLabel(){let e=this._elementRef.nativeElement.cloneNode(!0),t=e.querySelectorAll("mat-icon, .material-icons");for(let i=0;i<t.length;i++)t[i].remove();return e.textContent?.trim()||""}_setHighlighted(e){this._highlighted=e,this._changeDetectorRef.markForCheck()}_setTriggersSubmenu(e){this._triggersSubmenu=e,this._changeDetectorRef.markForCheck()}_hasFocus(){return this._document&&this._document.activeElement===this._getHostElement()}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=b({type:n,selectors:[["","mat-menu-item",""]],hostAttrs:[1,"mat-mdc-menu-item","mat-focus-indicator"],hostVars:8,hostBindings:function(t,i){t&1&&_("click",function(m){return i._checkDisabled(m)})("mouseenter",function(){return i._handleMouseEnter()}),t&2&&(g("role",i.role)("tabindex",i._getTabIndex())("aria-disabled",i.disabled)("disabled",i.disabled||null),P("mat-mdc-menu-item-highlighted",i._highlighted)("mat-mdc-menu-item-submenu-trigger",i._triggersSubmenu))},inputs:{role:"role",disabled:[2,"disabled","disabled",A],disableRipple:[2,"disableRipple","disableRipple",A]},exportAs:["matMenuItem"],attrs:Vn,ngContentSelectors:Bn,decls:5,vars:3,consts:[[1,"mat-mdc-menu-item-text"],["matRipple","",1,"mat-mdc-menu-ripple",3,"matRippleDisabled","matRippleTrigger"],["viewBox","0 0 5 10","focusable","false","aria-hidden","true",1,"mat-mdc-menu-submenu-icon"],["points","0,0 5,5 0,10"]],template:function(t,i){t&1&&(L(Ln),M(0),l(1,"span",0),M(2,1),c(),k(3,"div",1),h(4,Hn,2,0,":svg:svg",2)),t&2&&(r(3),p("matRippleDisabled",i.disableRipple||i.disabled)("matRippleTrigger",i._getHostElement()),r(),f(i._triggersSubmenu?4:-1))},dependencies:[ie],encapsulation:2,changeDetection:0})}return n})();var fn=new F("MatMenuContent"),Bo=(()=>{class n{_template=s(we);_appRef=s(Dt);_injector=s(Ce);_viewContainerRef=s(ke);_document=s(Me);_changeDetectorRef=s(z);_portal;_outlet;_attached=new S;constructor(){}attach(e={}){this._portal||(this._portal=new Te(this._template,this._viewContainerRef)),this.detach(),this._outlet||(this._outlet=new zt(this._document.createElement("div"),this._appRef,this._injector));let t=this._template.elementRef.nativeElement;t.parentNode.insertBefore(this._outlet.outletElement,t),this._changeDetectorRef.markForCheck(),this._portal.attach(this._outlet,e),this._attached.next()}detach(){this._portal?.isAttached&&this._portal.detach()}ngOnDestroy(){this.detach(),this._outlet?.dispose()}static \u0275fac=function(t){return new(t||n)};static \u0275dir=j({type:n,selectors:[["ng-template","matMenuContent",""]],features:[$([{provide:fn,useExisting:n}])]})}return n})(),Kn=new F("mat-menu-default-options",{providedIn:"root",factory:()=>({overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"})}),rt="_mat-menu-enter",Ye="_mat-menu-exit",ge=(()=>{class n{_elementRef=s(H);_changeDetectorRef=s(z);_injector=s(Ce);_keyManager;_xPosition;_yPosition;_firstItemFocusRef;_exitFallbackTimeout;_animationsDisabled=ne();_allItems;_directDescendantItems=new He;_classList={};_panelAnimationState="void";_animationDone=new S;_isAnimating=B(!1);parentMenu;direction;overlayPanelClass;backdropClass;ariaLabel;ariaLabelledby;ariaDescribedby;get xPosition(){return this._xPosition}set xPosition(e){this._xPosition=e,this.setPositionClasses()}get yPosition(){return this._yPosition}set yPosition(e){this._yPosition=e,this.setPositionClasses()}templateRef;items;lazyContent;overlapTrigger=!1;hasBackdrop;set panelClass(e){let t=this._previousPanelClass,i=X({},this._classList);t&&t.length&&t.split(" ").forEach(a=>{i[a]=!1}),this._previousPanelClass=e,e&&e.length&&(e.split(" ").forEach(a=>{i[a]=!0}),this._elementRef.nativeElement.className=""),this._classList=i}_previousPanelClass;get classList(){return this.panelClass}set classList(e){this.panelClass=e}closed=new y;close=this.closed;panelId=s(W).getId("mat-menu-panel-");constructor(){let e=s(Kn);this.overlayPanelClass=e.overlayPanelClass||"",this._xPosition=e.xPosition,this._yPosition=e.yPosition,this.backdropClass=e.backdropClass,this.overlapTrigger=e.overlapTrigger,this.hasBackdrop=e.hasBackdrop}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new Ke(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(ee(this._directDescendantItems),ve(e=>ae(...e.map(t=>t._focused)))).subscribe(e=>this._keyManager.updateActiveItem(e)),this._directDescendantItems.changes.subscribe(e=>{let t=this._keyManager;if(this._panelAnimationState==="enter"&&t.activeItem?._hasFocus()){let i=e.toArray(),a=Math.max(0,Math.min(i.length-1,t.activeItemIndex||0));i[a]&&!i[a].disabled?t.setActiveItem(a):t.setNextItemActive()}})}ngOnDestroy(){this._keyManager?.destroy(),this._directDescendantItems.destroy(),this.closed.complete(),this._firstItemFocusRef?.destroy(),clearTimeout(this._exitFallbackTimeout)}_hovered(){return this._directDescendantItems.changes.pipe(ee(this._directDescendantItems),ve(t=>ae(...t.map(i=>i._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){let t=e.keyCode,i=this._keyManager;switch(t){case 27:ue(e)||(e.preventDefault(),this.closed.emit("keydown"));break;case 37:this.parentMenu&&this.direction==="ltr"&&this.closed.emit("keydown");break;case 39:this.parentMenu&&this.direction==="rtl"&&this.closed.emit("keydown");break;default:(t===38||t===40)&&i.setFocusOrigin("keyboard"),i.onKeydown(e);return}}focusFirstItem(e="program"){this._firstItemFocusRef?.destroy(),this._firstItemFocusRef=Ct(()=>{let t=this._resolvePanel();if(!t||!t.contains(document.activeElement)){let i=this._keyManager;i.setFocusOrigin(e).setFirstItemActive(),!i.activeItem&&t&&t.focus()}},{injector:this._injector})}resetActiveItem(){this._keyManager.setActiveItem(-1)}setElevation(e){}setPositionClasses(e=this.xPosition,t=this.yPosition){this._classList=ye(X({},this._classList),{"mat-menu-before":e==="before","mat-menu-after":e==="after","mat-menu-above":t==="above","mat-menu-below":t==="below"}),this._changeDetectorRef.markForCheck()}_onAnimationDone(e){let t=e===Ye;(t||e===rt)&&(t&&(clearTimeout(this._exitFallbackTimeout),this._exitFallbackTimeout=void 0),this._animationDone.next(t?"void":"enter"),this._isAnimating.set(!1))}_onAnimationStart(e){(e===rt||e===Ye)&&this._isAnimating.set(!0)}_setIsOpen(e){if(this._panelAnimationState=e?"enter":"void",e){if(this._keyManager.activeItemIndex===0){let t=this._resolvePanel();t&&(t.scrollTop=0)}}else this._animationsDisabled||(this._exitFallbackTimeout=setTimeout(()=>this._onAnimationDone(Ye),200));this._animationsDisabled&&setTimeout(()=>{this._onAnimationDone(e?rt:Ye)}),this._changeDetectorRef.markForCheck()}_updateDirectDescendants(){this._allItems.changes.pipe(ee(this._allItems)).subscribe(e=>{this._directDescendantItems.reset(e.filter(t=>t._parentMenu===this)),this._directDescendantItems.notifyOnChanges()})}_resolvePanel(){let e=null;return this._directDescendantItems.length&&(e=this._directDescendantItems.first._getHostElement().closest('[role="menu"]')),e}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=b({type:n,selectors:[["mat-menu"]],contentQueries:function(t,i,a){if(t&1&&te(a,fn,5)(a,Pe,5)(a,Pe,4),t&2){let m;D(m=I())&&(i.lazyContent=m.first),D(m=I())&&(i._allItems=m),D(m=I())&&(i.items=m)}},viewQuery:function(t,i){if(t&1&&Q(we,5),t&2){let a;D(a=I())&&(i.templateRef=a.first)}},hostVars:3,hostBindings:function(t,i){t&2&&g("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},inputs:{backdropClass:"backdropClass",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],xPosition:"xPosition",yPosition:"yPosition",overlapTrigger:[2,"overlapTrigger","overlapTrigger",A],hasBackdrop:[2,"hasBackdrop","hasBackdrop",e=>e==null?null:A(e)],panelClass:[0,"class","panelClass"],classList:"classList"},outputs:{closed:"closed",close:"close"},exportAs:["matMenu"],features:[$([{provide:st,useExisting:n}])],ngContentSelectors:zn,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-mdc-menu-panel",3,"click","animationstart","animationend","animationcancel","id"],[1,"mat-mdc-menu-content"]],template:function(t,i){t&1&&(L(),wt(0,qn,3,12,"ng-template"))},styles:[`mat-menu{display:none}.mat-mdc-menu-content{margin:0;padding:8px 0;outline:0}.mat-mdc-menu-content,.mat-mdc-menu-content .mat-mdc-menu-item .mat-mdc-menu-item-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;flex:1;white-space:normal;font-family:var(--mat-menu-item-label-text-font, var(--mat-sys-label-large-font));line-height:var(--mat-menu-item-label-text-line-height, var(--mat-sys-label-large-line-height));font-size:var(--mat-menu-item-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-menu-item-label-text-tracking, var(--mat-sys-label-large-tracking));font-weight:var(--mat-menu-item-label-text-weight, var(--mat-sys-label-large-weight))}@keyframes _mat-menu-enter{from{opacity:0;transform:scale(0.8)}to{opacity:1;transform:none}}@keyframes _mat-menu-exit{from{opacity:1}to{opacity:0}}.mat-mdc-menu-panel{min-width:112px;max-width:280px;overflow:auto;box-sizing:border-box;outline:0;animation:_mat-menu-enter 120ms cubic-bezier(0, 0, 0.2, 1);border-radius:var(--mat-menu-container-shape, var(--mat-sys-corner-extra-small));background-color:var(--mat-menu-container-color, var(--mat-sys-surface-container));box-shadow:var(--mat-menu-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));will-change:transform,opacity}.mat-mdc-menu-panel.mat-menu-panel-exit-animation{animation:_mat-menu-exit 100ms 25ms linear forwards}.mat-mdc-menu-panel.mat-menu-panel-animations-disabled{animation:none}.mat-mdc-menu-panel.mat-menu-panel-animating{pointer-events:none}.mat-mdc-menu-panel.mat-menu-panel-animating:has(.mat-mdc-menu-content:empty){display:none}@media(forced-colors: active){.mat-mdc-menu-panel{outline:solid 1px}}.mat-mdc-menu-panel .mat-divider{border-top-color:var(--mat-menu-divider-color, var(--mat-sys-surface-variant));margin-bottom:var(--mat-menu-divider-bottom-spacing, 8px);margin-top:var(--mat-menu-divider-top-spacing, 8px)}.mat-mdc-menu-item{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;cursor:pointer;width:100%;text-align:left;box-sizing:border-box;color:inherit;font-size:inherit;background:none;text-decoration:none;margin:0;min-height:48px;padding-left:var(--mat-menu-item-leading-spacing, 12px);padding-right:var(--mat-menu-item-trailing-spacing, 12px);-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-menu-item::-moz-focus-inner{border:0}[dir=rtl] .mat-mdc-menu-item{padding-left:var(--mat-menu-item-trailing-spacing, 12px);padding-right:var(--mat-menu-item-leading-spacing, 12px)}.mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-left:var(--mat-menu-item-with-icon-leading-spacing, 12px);padding-right:var(--mat-menu-item-with-icon-trailing-spacing, 12px)}[dir=rtl] .mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-left:var(--mat-menu-item-with-icon-trailing-spacing, 12px);padding-right:var(--mat-menu-item-with-icon-leading-spacing, 12px)}.mat-mdc-menu-item,.mat-mdc-menu-item:visited,.mat-mdc-menu-item:link{color:var(--mat-menu-item-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-menu-item .mat-icon-no-color,.mat-mdc-menu-item .mat-mdc-menu-submenu-icon{color:var(--mat-menu-item-icon-color, var(--mat-sys-on-surface-variant))}.mat-mdc-menu-item[disabled]{cursor:default;opacity:.38}.mat-mdc-menu-item[disabled]::after{display:block;position:absolute;content:"";top:0;left:0;bottom:0;right:0}.mat-mdc-menu-item:focus{outline:0}.mat-mdc-menu-item .mat-icon{flex-shrink:0;margin-right:var(--mat-menu-item-spacing, 12px);height:var(--mat-menu-item-icon-size, 24px);width:var(--mat-menu-item-icon-size, 24px)}[dir=rtl] .mat-mdc-menu-item{text-align:right}[dir=rtl] .mat-mdc-menu-item .mat-icon{margin-right:0;margin-left:var(--mat-menu-item-spacing, 12px)}.mat-mdc-menu-item:not([disabled]):hover{background-color:var(--mat-menu-item-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))}.mat-mdc-menu-item:not([disabled]).cdk-program-focused,.mat-mdc-menu-item:not([disabled]).cdk-keyboard-focused,.mat-mdc-menu-item:not([disabled]).mat-mdc-menu-item-highlighted{background-color:var(--mat-menu-item-focus-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-focus-state-layer-opacity) * 100%), transparent))}@media(forced-colors: active){.mat-mdc-menu-item{margin-top:1px}}.mat-mdc-menu-submenu-icon{width:var(--mat-menu-item-icon-size, 24px);height:10px;fill:currentColor;padding-left:var(--mat-menu-item-spacing, 12px)}[dir=rtl] .mat-mdc-menu-submenu-icon{padding-right:var(--mat-menu-item-spacing, 12px);padding-left:0}[dir=rtl] .mat-mdc-menu-submenu-icon polygon{transform:scaleX(-1);transform-origin:center}@media(forced-colors: active){.mat-mdc-menu-submenu-icon{fill:CanvasText}}.mat-mdc-menu-item .mat-mdc-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}
|
|
2
2
|
`],encapsulation:2,changeDetection:0})}return n})(),Qn=new F("mat-menu-scroll-strategy",{providedIn:"root",factory:()=>{let n=s(Ce);return()=>Qt(n)}});var fe=new WeakMap,$n=(()=>{class n{_canHaveBackdrop;_element=s(H);_viewContainerRef=s(ke);_menuItemInstance=s(Pe,{optional:!0,self:!0});_dir=s(Bt,{optional:!0});_focusMonitor=s(Ee);_ngZone=s(Le);_injector=s(Ce);_scrollStrategy=s(Qn);_changeDetectorRef=s(z);_animationsDisabled=ne();_portal;_overlayRef=null;_menuOpen=!1;_closingActionsSubscription=J.EMPTY;_menuCloseSubscription=J.EMPTY;_pendingRemoval;_parentMaterialMenu;_parentInnerPadding;_openedBy=void 0;get _menu(){return this._menuInternal}set _menu(e){e!==this._menuInternal&&(this._menuInternal=e,this._menuCloseSubscription.unsubscribe(),e&&(this._parentMaterialMenu,this._menuCloseSubscription=e.close.subscribe(t=>{this._destroyMenu(t),(t==="click"||t==="tab")&&this._parentMaterialMenu&&this._parentMaterialMenu.closed.emit(t)})),this._menuItemInstance?._setTriggersSubmenu(this._triggersSubmenu()))}_menuInternal=null;constructor(e){this._canHaveBackdrop=e;let t=s(st,{optional:!0});this._parentMaterialMenu=t instanceof ge?t:void 0}ngOnDestroy(){this._menu&&this._ownsMenu(this._menu)&&fe.delete(this._menu),this._pendingRemoval?.unsubscribe(),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null)}get menuOpen(){return this._menuOpen}get dir(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}_triggersSubmenu(){return!!(this._menuItemInstance&&this._parentMaterialMenu&&this._menu)}_closeMenu(){this._menu?.close.emit()}_openMenu(e){if(this._triggerIsAriaDisabled())return;let t=this._menu;if(this._menuOpen||!t)return;this._pendingRemoval?.unsubscribe();let i=fe.get(t);fe.set(t,this),i&&i!==this&&i._closeMenu();let a=this._createOverlay(t),m=a.getConfig(),Y=m.positionStrategy;this._setPosition(t,Y),this._canHaveBackdrop?m.hasBackdrop=t.hasBackdrop==null?!this._triggersSubmenu():t.hasBackdrop:m.hasBackdrop=t.hasBackdrop??!1,a.hasAttached()||(a.attach(this._getPortal(t)),t.lazyContent?.attach(this.menuData)),this._closingActionsSubscription=this._menuClosingActions().subscribe(()=>this._closeMenu()),t.parentMenu=this._triggersSubmenu()?this._parentMaterialMenu:void 0,t.direction=this.dir,e&&t.focusFirstItem(this._openedBy||"program"),this._setIsMenuOpen(!0),t instanceof ge&&(t._setIsOpen(!0),t._directDescendantItems.changes.pipe(bt(t.close)).subscribe(()=>{Y.withLockedPosition(!1).reapplyLastPosition(),Y.withLockedPosition(!0)}))}focus(e,t){this._focusMonitor&&e?this._focusMonitor.focusVia(this._element,e,t):this._element.nativeElement.focus(t)}_destroyMenu(e){let t=this._overlayRef,i=this._menu;!t||!this.menuOpen||(this._closingActionsSubscription.unsubscribe(),this._pendingRemoval?.unsubscribe(),i instanceof ge&&this._ownsMenu(i)?(this._pendingRemoval=i._animationDone.pipe(Ne(1)).subscribe(()=>{t.detach(),fe.has(i)||i.lazyContent?.detach()}),i._setIsOpen(!1)):(t.detach(),i?.lazyContent?.detach()),i&&this._ownsMenu(i)&&fe.delete(i),this.restoreFocus&&(e==="keydown"||!this._openedBy||!this._triggersSubmenu())&&this.focus(this._openedBy),this._openedBy=void 0,this._setIsMenuOpen(!1))}_setIsMenuOpen(e){e!==this._menuOpen&&(this._menuOpen=e,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this._triggersSubmenu()&&this._menuItemInstance._setHighlighted(e),this._changeDetectorRef.markForCheck())}_createOverlay(e){if(!this._overlayRef){let t=this._getOverlayConfig(e);this._subscribeToPositions(e,t.positionStrategy),this._overlayRef=Yt(this._injector,t),this._overlayRef.keydownEvents().subscribe(i=>{this._menu instanceof ge&&this._menu._handleKeydown(i)})}return this._overlayRef}_getOverlayConfig(e){return new $t({positionStrategy:Wt(this._injector,this._getOverlayOrigin()).withLockedPosition().withGrowAfterOpen().withTransformOriginOn(".mat-menu-panel, .mat-mdc-menu-panel"),backdropClass:e.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:e.overlayPanelClass,scrollStrategy:this._scrollStrategy(),direction:this._dir||"ltr",disableAnimations:this._animationsDisabled})}_subscribeToPositions(e,t){e.setPositionClasses&&t.positionChanges.subscribe(i=>{this._ngZone.run(()=>{let a=i.connectionPair.overlayX==="start"?"after":"before",m=i.connectionPair.overlayY==="top"?"below":"above";e.setPositionClasses(a,m)})})}_setPosition(e,t){let[i,a]=e.xPosition==="before"?["end","start"]:["start","end"],[m,Y]=e.yPosition==="above"?["bottom","top"]:["top","bottom"],[et,tt]=[m,Y],[nt,it]=[i,a],be=0;if(this._triggersSubmenu()){if(it=i=e.xPosition==="before"?"start":"end",a=nt=i==="end"?"start":"end",this._parentMaterialMenu){if(this._parentInnerPadding==null){let ht=this._parentMaterialMenu.items.first;this._parentInnerPadding=ht?ht._getHostElement().offsetTop:0}be=m==="bottom"?this._parentInnerPadding:-this._parentInnerPadding}}else e.overlapTrigger||(et=m==="top"?"bottom":"top",tt=Y==="top"?"bottom":"top");t.withPositions([{originX:i,originY:et,overlayX:nt,overlayY:m,offsetY:be},{originX:a,originY:et,overlayX:it,overlayY:m,offsetY:be},{originX:i,originY:tt,overlayX:nt,overlayY:Y,offsetY:-be},{originX:a,originY:tt,overlayX:it,overlayY:Y,offsetY:-be}])}_menuClosingActions(){let e=this._getOutsideClickStream(this._overlayRef),t=this._overlayRef.detachments(),i=this._parentMaterialMenu?this._parentMaterialMenu.closed:xe(),a=this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(Z(m=>this._menuOpen&&m!==this._menuItemInstance)):xe();return ae(e,i,a,t)}_getPortal(e){return(!this._portal||this._portal.templateRef!==e.templateRef)&&(this._portal=new Te(e.templateRef,this._viewContainerRef)),this._portal}_ownsMenu(e){return fe.get(e)===this}_triggerIsAriaDisabled(){return A(this._element.nativeElement.getAttribute("aria-disabled"))}static \u0275fac=function(t){Mt()};static \u0275dir=j({type:n})}return n})(),gn=(()=>{class n extends $n{_cleanupTouchstart;_hoverSubscription=J.EMPTY;get _deprecatedMatMenuTriggerFor(){return this.menu}set _deprecatedMatMenuTriggerFor(e){this.menu=e}get menu(){return this._menu}set menu(e){this._menu=e}menuData;restoreFocus=!0;menuOpened=new y;onMenuOpen=this.menuOpened;menuClosed=new y;onMenuClose=this.menuClosed;constructor(){super(!0);let e=s(ze);this._cleanupTouchstart=e.listen(this._element.nativeElement,"touchstart",t=>{Vt(t)||(this._openedBy="touch")},{passive:!0})}triggersSubmenu(){return super._triggersSubmenu()}toggleMenu(){return this.menuOpen?this.closeMenu():this.openMenu()}openMenu(){this._openMenu(!0)}closeMenu(){this._closeMenu()}updatePosition(){this._overlayRef?.updatePosition()}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){super.ngOnDestroy(),this._cleanupTouchstart(),this._hoverSubscription.unsubscribe()}_getOverlayOrigin(){return this._element}_getOutsideClickStream(e){return e.backdropClick()}_handleMousedown(e){jt(e)||(this._openedBy=e.button===0?"mouse":void 0,this.triggersSubmenu()&&e.preventDefault())}_handleKeydown(e){let t=e.keyCode;(t===13||t===32)&&(this._openedBy="keyboard"),this.triggersSubmenu()&&(t===39&&this.dir==="ltr"||t===37&&this.dir==="rtl")&&(this._openedBy="keyboard",this.openMenu())}_handleClick(e){this.triggersSubmenu()?(e.stopPropagation(),this.openMenu()):this.toggleMenu()}_handleHover(){this.triggersSubmenu()&&this._parentMaterialMenu&&(this._hoverSubscription=this._parentMaterialMenu._hovered().subscribe(e=>{e===this._menuItemInstance&&!e.disabled&&this._parentMaterialMenu?._panelAnimationState!=="void"&&(this._openedBy="mouse",this._openMenu(!1))}))}static \u0275fac=function(t){return new(t||n)};static \u0275dir=j({type:n,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],hostVars:3,hostBindings:function(t,i){t&1&&_("click",function(m){return i._handleClick(m)})("mousedown",function(m){return i._handleMousedown(m)})("keydown",function(m){return i._handleKeydown(m)}),t&2&&g("aria-haspopup",i.menu?"menu":null)("aria-expanded",i.menuOpen)("aria-controls",i.menuOpen?i.menu==null?null:i.menu.panelId:null)},inputs:{_deprecatedMatMenuTriggerFor:[0,"mat-menu-trigger-for","_deprecatedMatMenuTriggerFor"],menu:[0,"matMenuTriggerFor","menu"],menuData:[0,"matMenuTriggerData","menuData"],restoreFocus:[0,"matMenuTriggerRestoreFocus","restoreFocus"]},outputs:{menuOpened:"menuOpened",onMenuOpen:"onMenuOpen",menuClosed:"menuClosed",onMenuClose:"onMenuClose"},exportAs:["matMenuTrigger"],features:[De]})}return n})();var _n=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=K({type:n});static \u0275inj=q({imports:[oe,Jt,U,Ht]})}return n})();var Je=class n{icon;title="";disabled=!1;variant="default";action=new y;onClick(){this.disabled||this.action.emit()}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["ds-icon-button"]],inputs:{icon:"icon",title:"title",disabled:"disabled",variant:"variant"},outputs:{action:"action"},decls:3,vars:5,consts:[["mat-icon-button","","type","button",3,"click","disabled","title"]],template:function(e,t){e&1&&(l(0,"button",0),_("click",function(){return t.onClick()}),l(1,"mat-icon"),u(2),c()()),e&2&&(ce("icon-button variant-"+t.variant),p("disabled",t.disabled)("title",t.title),r(2),C(t.icon))},dependencies:[Gt,$e],styles:['@charset "UTF-8";.icon-button[_ngcontent-%COMP%]{transition:color .2s ease,background .2s ease,transform .12s ease,opacity .2s ease}.icon-button[_ngcontent-%COMP%]:hover:not(:disabled){transform:scale(1.1)}.icon-button[_ngcontent-%COMP%]:active:not(:disabled){transform:scale(1.15)}.icon-button[_ngcontent-%COMP%]:disabled{opacity:.4;cursor:not-allowed}.icon-button.variant-default[_ngcontent-%COMP%]{color:var(--color-text-secondary, #6e6e73)}.icon-button.variant-default[_ngcontent-%COMP%]:hover:not(:disabled){color:var(--color-primary, #007aff)}.icon-button.variant-primary[_ngcontent-%COMP%]:hover:not(:disabled), .icon-button.variant-danger[_ngcontent-%COMP%]:hover:not(:disabled){color:var(--color-text-inverse, #ffffff);box-shadow:0 4px 14px var(--icon-button-shadow-color);background:var(--icon-button-accent-color)}.icon-button.variant-primary[_ngcontent-%COMP%]{--icon-button-accent-color: var(--color-primary, #007aff);--icon-button-shadow-color: rgba(0, 122, 255, .3);color:var(--color-primary, #007aff)}.icon-button.variant-danger[_ngcontent-%COMP%]{--icon-button-accent-color: var(--color-error, #ff3b30);--icon-button-shadow-color: rgba(255, 59, 48, .3);color:var(--color-error, #ff3b30)}']})};var Jn=(n,o)=>o.uid;function Gn(n,o){n&1&&(l(0,"span",2),u(1,"*"),c())}function Un(n,o){if(n&1&&(l(0,"p",3),u(1),c()),n&2){let e=d();r(),C(e.description)}}function Xn(n,o){if(n&1&&k(0,"input",4),n&2){let e=d();p("type",e.htmlInputType)("id",e.inputId)("formControl",e.control()),g("required",e.required()||null)}}function Zn(n,o){if(n&1&&k(0,"input",5),n&2){let e=d();p("id",e.inputId)("formControl",e.control()),g("required",e.required()||null)}}function ei(n,o){if(n&1&&(l(0,"div",6),k(1,"input",11),l(2,"span",12),u(3),c()()),n&2){let e=d();r(),p("id",e.inputId)("formControl",e.control()),r(2),C(e.label)}}function ti(n,o){n&1&&(l(0,"option",13),u(1,"\u2014 none \u2014"),c())}function ni(n,o){if(n&1&&(l(0,"option",14),u(1),c()),n&2){let e=o.$implicit;p("value",e),r(),C(e)}}function ii(n,o){if(n&1&&(l(0,"select",7),h(1,ti,2,0,"option",13),E(2,ni,2,2,"option",14,qe),c()),n&2){let e=d();p("id",e.inputId)("formControl",e.control()),g("required",e.required()||null),r(),f(e.required()?-1:1),r(),T(e.enumOptions)}}function oi(n,o){if(n&1){let e=O();l(0,"div",15),k(1,"input",17),l(2,"button",18),_("click",function(){let i=x(e).$index,a=d(2);return v(a.removeScalarItem(i))}),u(3," \xD7 "),c()()}if(n&2){let e=o.$index,t=d(2);r(),p("type",t.itemInputType)("formControl",t.getScalarItemControl(e)),g("aria-label",t.label+" item "+(e+1)),r(),g("aria-label","Remove "+t.label+" item "+(e+1))}}function ai(n,o){if(n&1){let e=O();l(0,"div",8),E(1,oi,4,4,"div",15,It),l(3,"button",16),_("click",function(){x(e);let i=d();return v(i.addScalarItem())}),u(4),c()()}if(n&2){let e=d();r(),T(e.itemArray.controls),r(3),de("+ Add ",e.label)}}function ri(n,o){if(n&1){let e=O();l(0,"div",19)(1,"div",20)(2,"span",21),u(3),c(),l(4,"button",18),_("click",function(){let i=x(e).$implicit,a=d(2);return v(a.removeObjectItem(i.uid))}),u(5," \xD7 "),c()(),l(6,"ds-json-schema-form",22),_("valueChange",function(i){let a=x(e).$implicit,m=d(2);return v(m.onObjectItemChange(a.uid,i))}),c()()}if(n&2){let e=o.$implicit,t=o.$index,i=d(2);r(3),Et("",(i.itemObjectSchema==null?null:i.itemObjectSchema.title)??i.label," ",t+1),r(),g("aria-label","Remove "+i.label+" item "+(t+1)),r(2),p("schema",i.itemObjectSchema)("value",e.seed)}}function si(n,o){if(n&1){let e=O();l(0,"div",8),E(1,ri,7,5,"div",19,Jn),l(3,"button",16),_("click",function(){x(e);let i=d();return v(i.addObjectItem())}),u(4),c()()}if(n&2){let e=d();r(),T(e.objectItems()),r(3),de("+ Add ",e.label)}}function li(n,o){if(n&1){let e=O();l(0,"div",9)(1,"ds-json-schema-form",22),_("valueChange",function(i){x(e);let a=d();return v(a.onNestedValueChange(i))}),c()()}if(n&2){let e=d();r(),p("schema",e.fieldSchema())("value",e.nestedInitialValue())}}function ci(n,o){if(n&1&&k(0,"textarea",10),n&2){let e=d();p("id",e.inputId)("formControl",e.control()),g("required",e.required()||null)}}var di=0;function bn(n){return{uid:di++,seed:n,value:n}}var Ge=class n{fieldKey=w.required();fieldSchema=w.required();control=w.required();required=w(!1);itemArray=new sn([]);objectItems=B([]);nestedInitialValue=B(null);ngOnInit(){if(this.fieldType==="array-scalar")this.initScalarArray();else if(this.fieldType==="array-object")this.initObjectArray();else if(this.fieldType==="nested-object"){let o=this.control().value;this.nestedInitialValue.set(o&&typeof o=="object"&&!Array.isArray(o)?o:null)}}initScalarArray(){let o=this.control().value;(Array.isArray(o)?o:[]).forEach(t=>this.itemArray.push(new Oe(t))),this.itemArray.valueChanges.subscribe(t=>{this.control().setValue(t,{emitEvent:!0})})}addScalarItem(){this.itemArray.push(new Oe(null))}removeScalarItem(o){this.itemArray.removeAt(o)}getScalarItemControl(o){return this.itemArray.at(o)}get itemInputType(){let o=this.fieldSchema().items;if(!o)return"text";let e=Array.isArray(o.type)?o.type[0]:o.type;return e==="number"||e==="integer"?"number":"text"}initObjectArray(){let o=this.control().value,e=Array.isArray(o)?o:[];this.objectItems.set(e.map(t=>bn(X({},t))))}addObjectItem(){this.objectItems.update(o=>[...o,bn(null)]),this.syncObjectArrayToControl()}removeObjectItem(o){this.objectItems.update(e=>e.filter(t=>t.uid!==o)),this.syncObjectArrayToControl()}onObjectItemChange(o,e){this.objectItems.update(t=>t.map(i=>i.uid===o?ye(X({},i),{value:e}):i)),this.syncObjectArrayToControl()}get itemObjectSchema(){return this.fieldSchema().items??null}syncObjectArrayToControl(){this.control().setValue(this.objectItems().map(o=>o.value),{emitEvent:!0})}get label(){return this.fieldSchema().title??this.fieldKey()}get description(){return this.fieldSchema().description}get fieldType(){let o=this.fieldSchema();if(o.enum?.length)return"enum";switch(Array.isArray(o.type)?o.type[0]:o.type){case"number":case"integer":return"number";case"boolean":return"boolean";case"array":{let t=o.items;return(t?Array.isArray(t.type)?t.type[0]:t.type:void 0)==="object"&&t?.properties?"array-object":"array-scalar"}case"object":return o.properties?"nested-object":"textarea";default:return"text"}}get htmlInputType(){switch(this.fieldSchema().format){case"password":return"password";case"email":return"email";case"uri":case"url":return"url";case"date":return"date";case"date-time":return"datetime-local";default:return"text"}}get enumOptions(){return this.fieldSchema().enum??[]}get inputId(){return`ds-field-${this.fieldKey()}`}onNestedValueChange(o){let e=this.control().value;JSON.stringify(e)!==JSON.stringify(o)&&this.control().setValue(o,{emitEvent:!0})}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["ds-json-schema-field"]],inputs:{fieldKey:[1,"fieldKey"],fieldSchema:[1,"fieldSchema"],control:[1,"control"],required:[1,"required"]},decls:13,vars:5,consts:[[1,"ds-field"],[1,"ds-field__label",3,"for"],["aria-hidden","true",1,"ds-field__required"],[1,"ds-field__description"],[1,"ds-field__input",3,"type","id","formControl"],["type","number",1,"ds-field__input",3,"id","formControl"],[1,"ds-field__checkbox-row"],[1,"ds-field__select",3,"id","formControl"],[1,"ds-field__array"],[1,"ds-field__nested"],["rows","4","placeholder","JSON",1,"ds-field__textarea",3,"id","formControl"],["type","checkbox",1,"ds-field__checkbox",3,"id","formControl"],[1,"ds-field__checkbox-label"],["value",""],[3,"value"],[1,"ds-field__array-row"],["type","button",1,"ds-field__array-add",3,"click"],[1,"ds-field__input","ds-field__input--array-item",3,"type","formControl"],["type","button",1,"ds-field__array-remove",3,"click"],[1,"ds-field__array-object-card"],[1,"ds-field__array-object-header"],[1,"ds-field__array-object-title"],[3,"valueChange","schema","value"]],template:function(e,t){if(e&1&&(l(0,"div",0)(1,"label",1),u(2),h(3,Gn,2,0,"span",2),c(),h(4,Un,2,1,"p",3),h(5,Xn,1,4,"input",4)(6,Zn,1,3,"input",5)(7,ei,4,3,"div",6)(8,ii,4,4,"select",7)(9,ai,5,1,"div",8)(10,si,5,1,"div",8)(11,li,2,2,"div",9)(12,ci,1,3,"textarea",10),c()),e&2){let i;r(),p("for",t.inputId),r(),de(" ",t.label," "),r(),f(t.required()?3:-1),r(),f(t.description?4:-1),r(),f((i=t.fieldType)==="text"?5:i==="number"?6:i==="boolean"?7:i==="enum"?8:i==="array-scalar"?9:i==="array-object"?10:i==="nested-object"?11:i==="textarea"?12:-1)}},dependencies:()=>[We,mn,pn,tn,rn,en,dn,nn,ln,Ue],styles:[".ds-field[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px}.ds-field__label[_ngcontent-%COMP%]{font-size:.8125rem;font-weight:500;color:var(--color-text, #1d1d1f)}.ds-field__required[_ngcontent-%COMP%]{color:var(--color-error, #d32f2f);margin-left:2px}.ds-field__description[_ngcontent-%COMP%]{font-size:.75rem;color:var(--color-text-secondary, #6e6e73);margin:0}.ds-field__input[_ngcontent-%COMP%], .ds-field__select[_ngcontent-%COMP%], .ds-field__textarea[_ngcontent-%COMP%]{width:100%;padding:6px 10px;border:1px solid var(--color-border, #d1d1d6);border-radius:6px;background:var(--color-bg-secondary, #f5f5f7);color:var(--color-text, #1d1d1f);font-size:.875rem;font-family:inherit;box-sizing:border-box;transition:border-color .15s ease}.ds-field__input[_ngcontent-%COMP%]:focus, .ds-field__select[_ngcontent-%COMP%]:focus, .ds-field__textarea[_ngcontent-%COMP%]:focus{outline:none;border-color:var(--color-primary, #007aff)}.ds-field__textarea[_ngcontent-%COMP%]{font-family:Menlo,Monaco,Courier New,monospace;font-size:.8125rem;resize:vertical;background:var(--color-code-bg, #f5f5f7)}.ds-field__checkbox-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px}.ds-field__checkbox[_ngcontent-%COMP%]{width:16px;height:16px;cursor:pointer;accent-color:var(--color-primary, #007aff);flex-shrink:0}.ds-field__checkbox-label[_ngcontent-%COMP%]{font-size:.875rem;color:var(--color-text, #1d1d1f)}.ds-field__array[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px}.ds-field__array-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px}.ds-field__input--array-item[_ngcontent-%COMP%]{flex:1}.ds-field__array-remove[_ngcontent-%COMP%]{flex-shrink:0;width:28px;height:28px;padding:0;border:1px solid var(--color-border, #d1d1d6);border-radius:6px;background:transparent;color:var(--color-text-secondary, #6e6e73);font-size:1rem;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:border-color .15s ease,color .15s ease}.ds-field__array-remove[_ngcontent-%COMP%]:hover{border-color:var(--color-error, #d32f2f);color:var(--color-error, #d32f2f)}.ds-field__array-object-card[_ngcontent-%COMP%]{border:1px solid var(--color-border-light, #e5e5ea);border-radius:8px;padding:12px;background:var(--color-bg-secondary, #f5f5f7);display:flex;flex-direction:column;gap:10px}.ds-field__array-object-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}.ds-field__array-object-title[_ngcontent-%COMP%]{font-size:.8125rem;font-weight:500;color:var(--color-text-secondary, #6e6e73)}.ds-field__array-add[_ngcontent-%COMP%]{align-self:flex-start;padding:4px 10px;border:1px dashed var(--color-border, #d1d1d6);border-radius:6px;background:transparent;color:var(--color-primary, #007aff);font-size:.8125rem;font-family:inherit;cursor:pointer;transition:border-color .15s ease}.ds-field__array-add[_ngcontent-%COMP%]:hover{border-color:var(--color-primary, #007aff)}.ds-field__nested[_ngcontent-%COMP%]{border:1px solid var(--color-border-light, #e5e5ea);border-radius:8px;padding:12px;background:var(--color-bg-secondary, #f5f5f7)}"],changeDetection:0})};function mi(n,o){if(n&1&&k(0,"ds-json-schema-field",1),n&2){let e=o.$implicit,t=d(2);p("fieldKey",e)("fieldSchema",t.getFieldSchema(e))("control",t.getControl(e))("required",t.isRequired(e))}}function pi(n,o){if(n&1&&(l(0,"div",0),E(1,mi,1,4,"ds-json-schema-field",1,qe),c()),n&2){let e=d();p("formGroup",e.formGroup),r(),T(e.fieldKeys())}}var Ue=class n{destroyRef=s(Ve);schema=w(null);value=w(null);valueChange=me();formGroup=new an({});fieldKeys=G(()=>{let o=this.schema();return o?.properties?Object.keys(o.properties):[]});hasFields=G(()=>this.fieldKeys().length>0);constructor(){xt(()=>{let o=this.schema(),e=At(()=>this.value());this.rebuildForm(o,e)})}rebuildForm(o,e){if(Object.keys(this.formGroup.controls).forEach(t=>{this.formGroup.removeControl(t)}),!o?.properties){this.valueChange.emit(null);return}for(let[t,i]of Object.entries(o.properties)){let a=e?.[t]??i.default??null;this.formGroup.addControl(t,new Oe(a))}this.formGroup.valueChanges.pipe(Qe(this.destroyRef)).subscribe(()=>this.emitValue()),this.emitValue()}emitValue(){if(!this.schema()?.properties){this.valueChange.emit(null);return}this.valueChange.emit(this.formGroup.value)}getFieldSchema(o){return this.schema()?.properties?.[o]??{}}isRequired(o){return this.schema()?.required?.includes(o)??!1}getControl(o){return this.formGroup.get(o)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["ds-json-schema-form"]],inputs:{schema:[1,"schema"],value:[1,"value"]},outputs:{valueChange:"valueChange"},decls:1,vars:1,consts:[[1,"ds-json-schema-form",3,"formGroup"],[3,"fieldKey","fieldSchema","control","required"]],template:function(e,t){e&1&&h(0,pi,3,1,"div",0),e&2&&f(t.hasFields()?0:-1)},dependencies:[We,on,cn,Ge],styles:[".ds-json-schema-form[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px}"]})};var Xe=class n{static \u0275fac=function(e){return new(e||n)};static \u0275dir=j({type:n,selectors:[["","dsCardActions",""]]})};var yn=(()=>{class n{_animationsDisabled=ne();state="unchecked";disabled=!1;appearance="full";constructor(){}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=b({type:n,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(t,i){t&2&&P("mat-pseudo-checkbox-indeterminate",i.state==="indeterminate")("mat-pseudo-checkbox-checked",i.state==="checked")("mat-pseudo-checkbox-disabled",i.disabled)("mat-pseudo-checkbox-minimal",i.appearance==="minimal")("mat-pseudo-checkbox-full",i.appearance==="full")("_mat-animation-noopable",i._animationsDisabled)},inputs:{state:"state",disabled:"disabled",appearance:"appearance"},decls:0,vars:0,template:function(t,i){},styles:[`.mat-pseudo-checkbox{border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:"";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox._mat-animation-noopable{transition:none !important;animation:none !important}.mat-pseudo-checkbox._mat-animation-noopable::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{left:1px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{left:1px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-pseudo-checkbox-minimal-selected-checkmark-color, var(--mat-sys-primary))}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-pseudo-checkbox-minimal-disabled-selected-checkmark-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-pseudo-checkbox-full{border-color:var(--mat-pseudo-checkbox-full-unselected-icon-color, var(--mat-sys-on-surface-variant));border-width:2px;border-style:solid}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-disabled{border-color:var(--mat-pseudo-checkbox-full-disabled-unselected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate{background-color:var(--mat-pseudo-checkbox-full-selected-icon-color, var(--mat-sys-primary));border-color:rgba(0,0,0,0)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-pseudo-checkbox-full-selected-checkmark-color, var(--mat-sys-on-primary))}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled{background-color:var(--mat-pseudo-checkbox-full-disabled-selected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-pseudo-checkbox-full-disabled-selected-checkmark-color, var(--mat-sys-surface))}.mat-pseudo-checkbox{width:18px;height:18px}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after{width:14px;height:6px;transform-origin:center;top:-4.2426406871px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{top:8px;width:16px}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after{width:10px;height:4px;transform-origin:center;top:-2.8284271247px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{top:6px;width:12px}
|
|
3
3
|
`],encapsulation:2,changeDetection:0})}return n})();var xn=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=K({type:n});static \u0275inj=q({imports:[U]})}return n})();var ui=["text"],hi=[[["mat-icon"]],"*"],fi=["mat-icon","*"];function gi(n,o){if(n&1&&k(0,"mat-pseudo-checkbox",1),n&2){let e=d();p("disabled",e.disabled)("state",e.selected?"checked":"unchecked")}}function _i(n,o){if(n&1&&k(0,"mat-pseudo-checkbox",3),n&2){let e=d();p("disabled",e.disabled)}}function bi(n,o){if(n&1&&(l(0,"span",4),u(1),c()),n&2){let e=d();r(),de("(",e.group.label,")")}}var yi=new F("MAT_OPTION_PARENT_COMPONENT"),xi=new F("MatOptgroup");var lt=class{source;isUserInput;constructor(o,e=!1){this.source=o,this.isUserInput=e}},vn=(()=>{class n{_element=s(H);_changeDetectorRef=s(z);_parent=s(yi,{optional:!0});group=s(xi,{optional:!0});_signalDisableRipple=!1;_selected=!1;_active=!1;_mostRecentViewValue="";get multiple(){return this._parent&&this._parent.multiple}get selected(){return this._selected}value;id=s(W).getId("mat-option-");get disabled(){return this.group&&this.group.disabled||this._disabled()}set disabled(e){this._disabled.set(e)}_disabled=B(!1);get disableRipple(){return this._signalDisableRipple?this._parent.disableRipple():!!this._parent?.disableRipple}get hideSingleSelectionIndicator(){return!!(this._parent&&this._parent.hideSingleSelectionIndicator)}onSelectionChange=new y;_text;_stateChanges=new S;constructor(){let e=s(pe);e.load(he),e.load(Lt),this._signalDisableRipple=!!this._parent&&kt(this._parent.disableRipple)}get active(){return this._active}get viewValue(){return(this._text?.nativeElement.textContent||"").trim()}select(e=!0){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),e&&this._emitSelectionChangeEvent())}deselect(e=!0){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),e&&this._emitSelectionChangeEvent())}focus(e,t){let i=this._getHostElement();typeof i.focus=="function"&&i.focus(t)}setActiveStyles(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}setInactiveStyles(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}getLabel(){return this.viewValue}_handleKeydown(e){(e.keyCode===13||e.keyCode===32)&&!ue(e)&&(this._selectViaInteraction(),e.preventDefault())}_selectViaInteraction(){this.disabled||(this._selected=this.multiple?!this._selected:!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._element.nativeElement}ngAfterViewChecked(){if(this._selected){let e=this.viewValue;e!==this._mostRecentViewValue&&(this._mostRecentViewValue&&this._stateChanges.next(),this._mostRecentViewValue=e)}}ngOnDestroy(){this._stateChanges.complete()}_emitSelectionChangeEvent(e=!1){this.onSelectionChange.emit(new lt(this,e))}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=b({type:n,selectors:[["mat-option"]],viewQuery:function(t,i){if(t&1&&Q(ui,7),t&2){let a;D(a=I())&&(i._text=a.first)}},hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(t,i){t&1&&_("click",function(){return i._selectViaInteraction()})("keydown",function(m){return i._handleKeydown(m)}),t&2&&(se("id",i.id),g("aria-selected",i.selected)("aria-disabled",i.disabled.toString()),P("mdc-list-item--selected",i.selected)("mat-mdc-option-multiple",i.multiple)("mat-mdc-option-active",i.active)("mdc-list-item--disabled",i.disabled))},inputs:{value:"value",id:"id",disabled:[2,"disabled","disabled",A]},outputs:{onSelectionChange:"onSelectionChange"},exportAs:["matOption"],ngContentSelectors:fi,decls:8,vars:5,consts:[["text",""],["aria-hidden","true",1,"mat-mdc-option-pseudo-checkbox",3,"disabled","state"],[1,"mdc-list-item__primary-text"],["state","checked","aria-hidden","true","appearance","minimal",1,"mat-mdc-option-pseudo-checkbox",3,"disabled"],[1,"cdk-visually-hidden"],["aria-hidden","true","mat-ripple","",1,"mat-mdc-option-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled"]],template:function(t,i){t&1&&(L(hi),h(0,gi,1,2,"mat-pseudo-checkbox",1),M(1),l(2,"span",2,0),M(4,1),c(),h(5,_i,1,1,"mat-pseudo-checkbox",3),h(6,bi,2,1,"span",4),k(7,"div",5)),t&2&&(f(i.multiple?0:-1),r(5),f(!i.multiple&&i.selected&&!i.hideSingleSelectionIndicator?5:-1),r(),f(i.group&&i.group._inert?6:-1),r(),p("matRippleTrigger",i._getHostElement())("matRippleDisabled",i.disabled||i.disableRipple))},dependencies:[yn,ie],styles:[`.mat-mdc-option{-webkit-user-select:none;user-select:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;min-height:48px;padding:0 16px;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--mat-option-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-option-label-text-font, var(--mat-sys-label-large-font));line-height:var(--mat-option-label-text-line-height, var(--mat-sys-label-large-line-height));font-size:var(--mat-option-label-text-size, var(--mat-sys-body-large-size));letter-spacing:var(--mat-option-label-text-tracking, var(--mat-sys-label-large-tracking));font-weight:var(--mat-option-label-text-weight, var(--mat-sys-body-large-weight))}.mat-mdc-option:hover:not(.mdc-list-item--disabled){background-color:var(--mat-option-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))}.mat-mdc-option:focus.mdc-list-item,.mat-mdc-option.mat-mdc-option-active.mdc-list-item{background-color:var(--mat-option-focus-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-focus-state-layer-opacity) * 100%), transparent));outline:0}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled):not(.mat-mdc-option-active,.mat-mdc-option-multiple,:focus,:hover){background-color:var(--mat-option-selected-state-layer-color, var(--mat-sys-secondary-container))}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled):not(.mat-mdc-option-active,.mat-mdc-option-multiple,:focus,:hover) .mdc-list-item__primary-text{color:var(--mat-option-selected-state-label-text-color, var(--mat-sys-on-secondary-container))}.mat-mdc-option .mat-pseudo-checkbox{--mat-pseudo-checkbox-minimal-selected-checkmark-color: var(--mat-option-selected-state-label-text-color, var(--mat-sys-on-secondary-container))}.mat-mdc-option.mdc-list-item{align-items:center;background:rgba(0,0,0,0)}.mat-mdc-option.mdc-list-item--disabled{cursor:default;pointer-events:none}.mat-mdc-option.mdc-list-item--disabled .mat-mdc-option-pseudo-checkbox,.mat-mdc-option.mdc-list-item--disabled .mdc-list-item__primary-text,.mat-mdc-option.mdc-list-item--disabled>mat-icon{opacity:.38}.mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:32px}[dir=rtl] .mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:16px;padding-right:32px}.mat-mdc-option .mat-icon,.mat-mdc-option .mat-pseudo-checkbox-full{margin-right:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-icon,[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-full{margin-right:0;margin-left:16px}.mat-mdc-option .mat-pseudo-checkbox-minimal{margin-left:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-minimal{margin-right:16px;margin-left:0}.mat-mdc-option .mat-mdc-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-mdc-option .mdc-list-item__primary-text{white-space:normal;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;font-family:inherit;text-decoration:inherit;text-transform:inherit;margin-right:auto}[dir=rtl] .mat-mdc-option .mdc-list-item__primary-text{margin-right:0;margin-left:auto}@media(forced-colors: active){.mat-mdc-option.mdc-list-item--selected:not(:has(.mat-mdc-option-pseudo-checkbox))::after{content:"";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}[dir=rtl] .mat-mdc-option.mdc-list-item--selected:not(:has(.mat-mdc-option-pseudo-checkbox))::after{right:auto;left:16px}}.mat-mdc-option-multiple{--mat-list-list-item-selected-container-color: var(--mat-list-list-item-container-color, transparent)}.mat-mdc-option-active .mat-focus-indicator::before{content:""}
|
|
4
4
|
`],encapsulation:2,changeDetection:0})}return n})();function Ea(n,o,e){if(e.length){let t=o.toArray(),i=e.toArray(),a=0;for(let m=0;m<n+1;m++)t[m].group&&t[m].group===i[a]&&a++;return a}return 0}function Ta(n,o,e,t){return n<e?n:n+o>e+t?Math.max(0,n-t+o):e}var ja=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=K({type:n});static \u0275inj=q({imports:[oe,xn,vn,U]})}return n})();var Ci=[[["","dsCardActions",""]]],Mi=["[dsCardActions]"],wi=(n,o)=>o.label;function ki(n,o){if(n&1&&(l(0,"span"),u(1),c()),n&2){let e=o.$implicit;ce(Tt("entity-card__badge badge-",e.variant)),r(),C(e.label)}}function Di(n,o){if(n&1&&(l(0,"div",3),E(1,ki,2,4,"span",6,wi),c()),n&2){let e=d();r(),T(e.badges)}}function Ii(n,o){if(n&1&&(l(0,"span",4),u(1),c()),n&2){let e=d();p("matTooltip",e.description),r(),C(e.description)}}function Si(n,o){n&1&&(l(0,"div",5),M(1),c())}var Ze=class n{id;name;description=void 0;badges=[];selected=new y;cardActions;get hasActions(){return this.cardActions!==void 0}onClick(){this.selected.emit(this.id)}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=b({type:n,selectors:[["ds-entity-card"]],contentQueries:function(e,t,i){if(e&1&&te(i,Xe,5),e&2){let a;D(a=I())&&(t.cardActions=a.first)}},inputs:{id:"id",name:"name",description:"description",badges:"badges"},outputs:{selected:"selected"},ngContentSelectors:Mi,decls:7,vars:8,consts:[["matRipple","",1,"entity-card",3,"click","keydown.enter","keydown.space"],[1,"entity-card__body"],[1,"entity-card__name"],[1,"entity-card__badges"],["matTooltipShowDelay","600",1,"entity-card__description",3,"matTooltip"],[1,"entity-card__actions"],[3,"class"]],template:function(e,t){e&1&&(L(Ci),l(0,"div",0),_("click",function(){return!t.hasActions&&t.onClick()})("keydown.enter",function(){return!t.hasActions&&t.onClick()})("keydown.space",function(){return!t.hasActions&&t.onClick()}),l(1,"div",1)(2,"span",2),u(3),c(),h(4,Di,3,0,"div",3),h(5,Ii,2,2,"span",4),c(),h(6,Si,2,0,"div",5),c()),e&2&&(P("entity-card--clickable",!t.hasActions),g("role",t.hasActions?null:"button")("tabindex",t.hasActions?null:"0"),r(3),C(t.name),r(),f(t.badges.length>0?4:-1),r(),f(t.description?5:-1),r(),f(t.hasActions?6:-1))},dependencies:[oe,ie,Xt,Ut],styles:[".entity-card[_ngcontent-%COMP%]{box-sizing:border-box;display:flex;align-items:center;gap:.5rem;width:100%;padding:1rem 1.25rem;background:var(--color-bg-secondary, rgba(255, 255, 255, .7));border:1px solid var(--color-border, rgba(0, 0, 0, .1));border-radius:12px;overflow:hidden;position:relative;transition:background .15s ease,border-color .15s ease,box-shadow .15s ease,transform .12s ease}.entity-card--clickable[_ngcontent-%COMP%]{cursor:pointer}.entity-card--clickable[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .04));border-color:var(--color-primary, #007aff);box-shadow:0 2px 12px var(--color-shadow, rgba(0, 0, 0, .08));transform:translateY(-1px)}.entity-card--clickable[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-primary, #007aff);outline-offset:2px}.entity-card--clickable[_ngcontent-%COMP%]:active{transform:translateY(0)}.entity-card__body[_ngcontent-%COMP%]{flex:1;min-width:0;display:flex;flex-direction:column;gap:.375rem}.entity-card__name[_ngcontent-%COMP%]{font-size:.9375rem;font-weight:600;color:var(--color-text, #1d1d1f);line-height:1.3}.entity-card__description[_ngcontent-%COMP%]{font-size:.8125rem;color:var(--color-text-secondary, #6e6e73);line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.entity-card__badges[_ngcontent-%COMP%]{display:flex;gap:.25rem;flex-wrap:wrap}.entity-card__badge[_ngcontent-%COMP%]{display:inline-flex;align-items:center;padding:.0625rem .3rem;border-radius:999px;font-size:.5625rem;font-weight:900;letter-spacing:.05em;text-transform:uppercase;color:#fff}.entity-card__badge.badge-warning[_ngcontent-%COMP%]{background:var(--color-warning, #ff9500)}.entity-card__badge.badge-info[_ngcontent-%COMP%]{background:var(--color-info, #5ac8fa)}.entity-card__badge.badge-success[_ngcontent-%COMP%]{background:var(--color-success, #34c759)}.entity-card__badge.badge-error[_ngcontent-%COMP%]{background:var(--color-error, #ff3b30)}.entity-card__actions[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.25rem;flex-shrink:0}"],changeDetection:0})};var Fe=(()=>{class n{_listeners=[];notify(e,t){for(let i of this._listeners)i(e,t)}listen(e){return this._listeners.push(e),()=>{this._listeners=this._listeners.filter(t=>e!==t)}}ngOnDestroy(){this._listeners=[]}static \u0275fac=function(t){return new(t||n)};static \u0275prov=yt({token:n,factory:n.\u0275fac,providedIn:"root"})}return n})();var ct=new F("CdkAccordion"),Cn=(()=>{class n{_stateChanges=new S;_openCloseAllActions=new S;id=s(W).getId("cdk-accordion-");multi=!1;openAll(){this.multi&&this._openCloseAllActions.next(!0)}closeAll(){this._openCloseAllActions.next(!1)}ngOnChanges(e){this._stateChanges.next(e)}ngOnDestroy(){this._stateChanges.complete(),this._openCloseAllActions.complete()}static \u0275fac=function(t){return new(t||n)};static \u0275dir=j({type:n,selectors:[["cdk-accordion"],["","cdkAccordion",""]],inputs:{multi:[2,"multi","multi",A]},exportAs:["cdkAccordion"],features:[$([{provide:ct,useExisting:n}]),Be]})}return n})(),Mn=(()=>{class n{accordion=s(ct,{optional:!0,skipSelf:!0});_changeDetectorRef=s(z);_expansionDispatcher=s(Fe);_openCloseAllSubscription=J.EMPTY;closed=new y;opened=new y;destroyed=new y;expandedChange=new y;id=s(W).getId("cdk-accordion-child-");get expanded(){return this._expanded}set expanded(e){if(this._expanded!==e){if(this._expanded=e,this.expandedChange.emit(e),e){this.opened.emit();let t=this.accordion?this.accordion.id:this.id;this._expansionDispatcher.notify(this.id,t)}else this.closed.emit();this._changeDetectorRef.markForCheck()}}_expanded=!1;get disabled(){return this._disabled()}set disabled(e){this._disabled.set(e)}_disabled=B(!1);_removeUniqueSelectionListener=()=>{};constructor(){}ngOnInit(){this._removeUniqueSelectionListener=this._expansionDispatcher.listen((e,t)=>{this.accordion&&!this.accordion.multi&&this.accordion.id===t&&this.id!==e&&(this.expanded=!1)}),this.accordion&&(this._openCloseAllSubscription=this._subscribeToOpenCloseAllActions())}ngOnDestroy(){this.opened.complete(),this.closed.complete(),this.destroyed.emit(),this.destroyed.complete(),this._removeUniqueSelectionListener(),this._openCloseAllSubscription.unsubscribe()}toggle(){this.disabled||(this.expanded=!this.expanded)}close(){this.disabled||(this.expanded=!1)}open(){this.disabled||(this.expanded=!0)}_subscribeToOpenCloseAllActions(){return this.accordion._openCloseAllActions.subscribe(e=>{this.disabled||(this.expanded=e)})}static \u0275fac=function(t){return new(t||n)};static \u0275dir=j({type:n,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:[2,"expanded","expanded",A],disabled:[2,"disabled","disabled",A]},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],features:[$([{provide:ct,useValue:void 0}])]})}return n})(),wn=(()=>{class n{static \u0275fac=function(t){return new(t||n)};static \u0275mod=K({type:n});static \u0275inj=q({})}return n})();var dt=class{_multiple;_emitChanges;compareWith;_selection=new Set;_deselectedToEmit=[];_selectedToEmit=[];_selected=null;get selected(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected}changed=new S;constructor(o=!1,e,t=!0,i){this._multiple=o,this._emitChanges=t,this.compareWith=i,e&&e.length&&(o?e.forEach(a=>this._markSelected(a)):this._markSelected(e[0]),this._selectedToEmit.length=0)}select(...o){this._verifyValueAssignment(o),o.forEach(t=>this._markSelected(t));let e=this._hasQueuedChanges();return this._emitChangeEvent(),e}deselect(...o){this._verifyValueAssignment(o),o.forEach(t=>this._unmarkSelected(t));let e=this._hasQueuedChanges();return this._emitChangeEvent(),e}setSelection(...o){this._verifyValueAssignment(o);let e=this.selected,t=new Set(o.map(a=>this._getConcreteValue(a)));o.forEach(a=>this._markSelected(a)),e.filter(a=>!t.has(this._getConcreteValue(a,t))).forEach(a=>this._unmarkSelected(a));let i=this._hasQueuedChanges();return this._emitChangeEvent(),i}toggle(o){return this.isSelected(o)?this.deselect(o):this.select(o)}clear(o=!0){this._unmarkAll();let e=this._hasQueuedChanges();return o&&this._emitChangeEvent(),e}isSelected(o){return this._selection.has(this._getConcreteValue(o))}isEmpty(){return this._selection.size===0}hasValue(){return!this.isEmpty()}sort(o){this._multiple&&this.selected&&this._selected.sort(o)}isMultipleSelection(){return this._multiple}_emitChangeEvent(){this._selected=null,(this._selectedToEmit.length||this._deselectedToEmit.length)&&(this.changed.next({source:this,added:this._selectedToEmit,removed:this._deselectedToEmit}),this._deselectedToEmit=[],this._selectedToEmit=[])}_markSelected(o){o=this._getConcreteValue(o),this.isSelected(o)||(this._multiple||this._unmarkAll(),this.isSelected(o)||this._selection.add(o),this._emitChanges&&this._selectedToEmit.push(o))}_unmarkSelected(o){o=this._getConcreteValue(o),this.isSelected(o)&&(this._selection.delete(o),this._emitChanges&&this._deselectedToEmit.push(o))}_unmarkAll(){this.isEmpty()||this._selection.forEach(o=>this._unmarkSelected(o))}_verifyValueAssignment(o){o.length>1&&this._multiple}_hasQueuedChanges(){return!!(this._deselectedToEmit.length||this._selectedToEmit.length)}_getConcreteValue(o,e){if(this.compareWith){e=e??this._selection;for(let t of e)if(this.compareWith(o,t))return t;return o}else return o}};var Ei=["body"],Ti=["bodyWrapper"],Oi=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],Pi=["mat-expansion-panel-header","*","mat-action-row"];function Ai(n,o){}var Ri=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],Fi=["mat-panel-title","mat-panel-description","*"];function Ni(n,o){n&1&&(N(0,"span",1),je(),N(1,"svg",2),St(2,"path",3),V()())}var mt=new F("MAT_ACCORDION"),kn=new F("MAT_EXPANSION_PANEL"),ji=(()=>{class n{_template=s(we);_expansionPanel=s(kn,{optional:!0});constructor(){}static \u0275fac=function(t){return new(t||n)};static \u0275dir=j({type:n,selectors:[["ng-template","matExpansionPanelContent",""]]})}return n})(),Dn=new F("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS"),pt=(()=>{class n extends Mn{_viewContainerRef=s(ke);_animationsDisabled=ne();_document=s(Me);_ngZone=s(Le);_elementRef=s(H);_renderer=s(ze);_cleanupTransitionEnd;get hideToggle(){return this._hideToggle||this.accordion&&this.accordion.hideToggle}set hideToggle(e){this._hideToggle=e}_hideToggle=!1;get togglePosition(){return this._togglePosition||this.accordion&&this.accordion.togglePosition}set togglePosition(e){this._togglePosition=e}_togglePosition;afterExpand=new y;afterCollapse=new y;_inputChanges=new S;accordion=s(mt,{optional:!0,skipSelf:!0});_lazyContent;_body;_bodyWrapper;_portal;_headerId=s(W).getId("mat-expansion-panel-header-");constructor(){super();let e=s(Dn,{optional:!0});this._expansionDispatcher=s(Fe),e&&(this.hideToggle=e.hideToggle)}_hasSpacing(){return this.accordion?this.expanded&&this.accordion.displayMode==="default":!1}_getExpandedState(){return this.expanded?"expanded":"collapsed"}toggle(){this.expanded=!this.expanded}close(){this.expanded=!1}open(){this.expanded=!0}ngAfterContentInit(){this._lazyContent&&this._lazyContent._expansionPanel===this&&this.opened.pipe(ee(null),Z(()=>this.expanded&&!this._portal),Ne(1)).subscribe(()=>{this._portal=new Te(this._lazyContent._template,this._viewContainerRef)}),this._setupAnimationEvents()}ngOnChanges(e){this._inputChanges.next(e)}ngOnDestroy(){super.ngOnDestroy(),this._cleanupTransitionEnd?.(),this._inputChanges.complete()}_containsFocus(){if(this._body){let e=this._document.activeElement,t=this._body.nativeElement;return e===t||t.contains(e)}return!1}_transitionEndListener=({target:e,propertyName:t})=>{e===this._bodyWrapper?.nativeElement&&t==="grid-template-rows"&&this._ngZone.run(()=>{this.expanded?this.afterExpand.emit():this.afterCollapse.emit()})};_setupAnimationEvents(){this._ngZone.runOutsideAngular(()=>{this._animationsDisabled?(this.opened.subscribe(()=>this._ngZone.run(()=>this.afterExpand.emit())),this.closed.subscribe(()=>this._ngZone.run(()=>this.afterCollapse.emit()))):setTimeout(()=>{let e=this._elementRef.nativeElement;this._cleanupTransitionEnd=this._renderer.listen(e,"transitionend",this._transitionEndListener),e.classList.add("mat-expansion-panel-animations-enabled")},200)})}static \u0275fac=function(t){return new(t||n)};static \u0275cmp=b({type:n,selectors:[["mat-expansion-panel"]],contentQueries:function(t,i,a){if(t&1&&te(a,ji,5),t&2){let m;D(m=I())&&(i._lazyContent=m.first)}},viewQuery:function(t,i){if(t&1&&Q(Ei,5)(Ti,5),t&2){let a;D(a=I())&&(i._body=a.first),D(a=I())&&(i._bodyWrapper=a.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:4,hostBindings:function(t,i){t&2&&P("mat-expanded",i.expanded)("mat-expansion-panel-spacing",i._hasSpacing())},inputs:{hideToggle:[2,"hideToggle","hideToggle",A],togglePosition:"togglePosition"},outputs:{afterExpand:"afterExpand",afterCollapse:"afterCollapse"},exportAs:["matExpansionPanel"],features:[$([{provide:mt,useValue:void 0},{provide:kn,useExisting:n}]),De,Be],ngContentSelectors:Pi,decls:9,vars:4,consts:[["bodyWrapper",""],["body",""],[1,"mat-expansion-panel-content-wrapper"],["role","region",1,"mat-expansion-panel-content",3,"id"],[1,"mat-expansion-panel-body"],[3,"cdkPortalOutlet"]],template:function(t,i){t&1&&(L(Oi),M(0),l(1,"div",2,0)(3,"div",3,1)(5,"div",4),M(6,1),re(7,Ai,0,0,"ng-template",5),c(),M(8,2),c()()),t&2&&(r(),g("inert",i.expanded?null:""),r(2),p("id",i.id),g("aria-labelledby",i._headerId),r(4),p("cdkPortalOutlet",i._portal))},dependencies:[qt],styles:[`.mat-expansion-panel{box-sizing:content-box;display:block;margin:0;overflow:hidden}.mat-expansion-panel.mat-expansion-panel-animations-enabled{transition:margin 225ms cubic-bezier(0.4, 0, 0.2, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel{position:relative;background:var(--mat-expansion-container-background-color, var(--mat-sys-surface));color:var(--mat-expansion-container-text-color, var(--mat-sys-on-surface));border-radius:var(--mat-expansion-container-shape, 12px)}.mat-expansion-panel:not([class*=mat-elevation-z]){box-shadow:var(--mat-expansion-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12))}.mat-accordion .mat-expansion-panel:not(.mat-expanded),.mat-accordion .mat-expansion-panel:not(.mat-expansion-panel-spacing){border-radius:0}.mat-accordion .mat-expansion-panel:first-of-type{border-top-right-radius:var(--mat-expansion-container-shape, 12px);border-top-left-radius:var(--mat-expansion-container-shape, 12px)}.mat-accordion .mat-expansion-panel:last-of-type{border-bottom-right-radius:var(--mat-expansion-container-shape, 12px);border-bottom-left-radius:var(--mat-expansion-container-shape, 12px)}@media(forced-colors: active){.mat-expansion-panel{outline:solid 1px}}.mat-expansion-panel-content-wrapper{display:grid;grid-template-rows:0fr;grid-template-columns:100%}.mat-expansion-panel-animations-enabled .mat-expansion-panel-content-wrapper{transition:grid-template-rows 225ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel.mat-expanded>.mat-expansion-panel-content-wrapper{grid-template-rows:1fr}@supports not (grid-template-rows: 0fr){.mat-expansion-panel-content-wrapper{height:0}.mat-expansion-panel.mat-expanded>.mat-expansion-panel-content-wrapper{height:auto}}@media print{.mat-expansion-panel-content-wrapper{height:0}.mat-expansion-panel.mat-expanded>.mat-expansion-panel-content-wrapper{height:auto}}.mat-expansion-panel-content{display:flex;flex-direction:column;overflow:visible;min-height:0;visibility:hidden}.mat-expansion-panel-animations-enabled .mat-expansion-panel-content{transition:visibility 190ms linear}.mat-expansion-panel.mat-expanded>.mat-expansion-panel-content-wrapper>.mat-expansion-panel-content{visibility:visible}.mat-expansion-panel-content{font-family:var(--mat-expansion-container-text-font, var(--mat-sys-body-large-font));font-size:var(--mat-expansion-container-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-expansion-container-text-weight, var(--mat-sys-body-large-weight));line-height:var(--mat-expansion-container-text-line-height, var(--mat-sys-body-large-line-height));letter-spacing:var(--mat-expansion-container-text-tracking, var(--mat-sys-body-large-tracking))}.mat-expansion-panel-body{padding:0 24px 16px}.mat-expansion-panel-spacing{margin:16px 0}.mat-accordion>.mat-expansion-panel-spacing:first-child,.mat-accordion>*:first-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-top:0}.mat-accordion>.mat-expansion-panel-spacing:last-child,.mat-accordion>*:last-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-bottom:0}.mat-action-row{border-top-style:solid;border-top-width:1px;display:flex;flex-direction:row;justify-content:flex-end;padding:16px 8px 16px 24px;border-top-color:var(--mat-expansion-actions-divider-color, var(--mat-sys-outline))}.mat-action-row .mat-button-base,.mat-action-row .mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-action-row .mat-button-base,[dir=rtl] .mat-action-row .mat-mdc-button-base{margin-left:0;margin-right:8px}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{G as p,P as g,S as h,Uc as j,V as o,Z as n,ca as c,d as u,i,m as b,t as l,u as d}from"./chunk-
|
|
1
|
+
import{G as p,P as g,S as h,Uc as j,V as o,Z as n,ca as c,d as u,i,m as b,t as l,u as d}from"./chunk-QDO3O2UB.js";var a=class s{baseUrl="/api/projects";http=c(j);listProjects(){return this.http.get(this.baseUrl)}getProject(e){return this.http.get(`${this.baseUrl}/${e}`)}getProjectConfig(e){return this.http.get(`${this.baseUrl}/${e}/config`)}updateProjectConfig(e,t){return this.http.put(`${this.baseUrl}/${e}/config`,t)}createProject(e,t){return this.http.post(this.baseUrl,{name:e,path:t})}getGitBranches(e){return this.http.get(`${this.baseUrl}/${e}/git/branches`)}createTask(e,t,r,f,v,m,S){return this.http.post(`${this.baseUrl}/${e}/missions`,{agentName:t,task:r,mode:f,branch:v,issueNumber:m,branchType:S})}closeTask(e,t){return this.http.delete(`${this.baseUrl}/${e}/missions/${t}`)}markThreadDone(e,t){return this.http.post(`${this.baseUrl}/${e}/threads/${t}/done`,{})}markThreadActive(e,t){return this.http.delete(`${this.baseUrl}/${e}/threads/${t}/done`)}deleteProject(e,t){let r={};return t&&(r.removeGitWorktree="true"),this.http.delete(`${this.baseUrl}/${encodeURIComponent(e)}`,{params:r})}getPreviewEntries(e){return this.http.get(`${this.baseUrl}/${e}/preview/entries`)}startPreview(e,t){return this.http.post(`${this.baseUrl}/${e}/preview/${t}/start`,{})}stopPreview(e,t){return this.http.post(`${this.baseUrl}/${e}/preview/${t}/stop`,{})}getPreviewStatus(e,t){return this.http.get(`${this.baseUrl}/${e}/preview/${t}/status`)}getPreviewLogs(e,t){return this.http.get(`${this.baseUrl}/${e}/preview/${t}/logs`)}static \u0275fac=function(t){return new(t||s)};static \u0275prov=n({token:s,factory:s.\u0275fac,providedIn:"root"})};var P=class s{selectedProjectIdSubject=new i(null);isLoadingSubject=new i(!1);refreshTriggerSubject=new i(void 0);hasInitialized=!1;isLoading$=this.isLoadingSubject.asObservable();projectApi=c(a);projectListCall=this.refreshTriggerSubject.pipe(h(()=>this.projectApi.listProjects()),g({bufferSize:1,refCount:!0}));projectList$=this.projectListCall.pipe(l(e=>e.projects));forcedProject$=this.projectListCall.pipe(l(e=>e.forcedProject));selectedProject$=d([this.selectedProjectIdSubject,this.forcedProject$]).pipe(h(([e,t])=>{let r=t??e;return r?this.projectApi.getProject(r):b(null)}),o(e=>{e&&e.name!==this.selectedProjectIdSubject.value&&(console.log("[PROJECT-STATE] Backend returned different project name:",e.name),this.selectedProjectIdSubject.next(e.name))}),g({bufferSize:1,refCount:!0}));selectProject(e){console.log("[PROJECT-STATE] Explicit project selection:",e),this.forcedProject$.pipe(p(1)).subscribe(t=>this.selectedProjectIdSubject.next(t??e))}getSelectedProjectId(){return this.selectedProjectIdSubject.value}getSelectedProjectIdOrThrow(){let e=this.selectedProjectIdSubject.value;if(!e)throw new Error("[PROJECT_STATE] No project selected");return e}clearSelection(){console.log("[PROJECT-STATE] Clearing project selection"),this.selectedProjectIdSubject.next(null)}initializeDefaultProject(){return u(this,null,function*(){if(this.hasInitialized){console.log("[PROJECT-STATE] Already initialized, skipping");return}this.hasInitialized=!0;let e=yield this.projectApi.listProjects().pipe(p(1)).toPromise();if(!e){console.log("[PROJECT-STATE] No response from project API");return}let{defaultProject:t,forcedProject:r}=e;t&&!r?(console.log("[PROJECT-STATE] Initializing with default project:",t),this.selectedProjectIdSubject.next(t)):r?(console.log("[PROJECT-STATE] Initializing with forced project:",r),this.selectedProjectIdSubject.next(r)):console.log("[PROJECT-STATE] No default project, staying on selection page")})}createProject(e,t){return this.isLoadingSubject.next(!0),this.projectApi.createProject(e,t).pipe(o(()=>{this.isLoadingSubject.next(!1),this.refreshTriggerSubject.next()}))}deleteProject(e,t){return this.isLoadingSubject.next(!0),this.projectApi.deleteProject(e,t).pipe(o(()=>{this.isLoadingSubject.next(!1),this.refreshTriggerSubject.next(),this.selectedProjectIdSubject.value===e&&this.clearSelection()}))}static \u0275fac=function(t){return new(t||s)};static \u0275prov=n({token:s,factory:s.\u0275fac,providedIn:"root"})};export{a,P as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b}from"./chunk-46WOQYAR.js";import"./chunk-32554AB2.js";import"./chunk-QDO3O2UB.js";export{a as OAUTH_CALLBACK_STORAGE_KEY,b as OAuthCallbackComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as D}from"./chunk-
|
|
1
|
+
import{a as D}from"./chunk-VMVYRYDR.js";import{a as k}from"./chunk-7BVQ2WHQ.js";import"./chunk-5TU5JR3W.js";import{c as x}from"./chunk-32554AB2.js";import{o as B,t as $}from"./chunk-F7X52MX4.js";import"./chunk-NXKPUZGQ.js";import"./chunk-QN7OUZIZ.js";import{a as d}from"./chunk-BVQ4XPRS.js";import"./chunk-HTKDXFLE.js";import"./chunk-7VQ75OC6.js";import"./chunk-NNVKL253.js";import{Bb as b,Db as m,Fb as l,Ic as T,Pb as w,S as _,Wa as g,ab as C,bc as I,ca as i,ec as M,fc as R,ga as u,ha as y,i as c,ic as S,lb as h,ma as P,mb as v,rb as a,sb as p,t as f,tb as s}from"./chunk-QDO3O2UB.js";var F=()=>[];function L(o,e){if(o&1){let t=b();p(0,"agentos-prompt-item",4),m("deleteRequested",function(r){u(t);let E=l(2);return y(E.deletePrompt(r))}),s()}o&2&&a("prompt",e)("platformMode",!0)}function N(o,e){if(o&1&&h(0,L,1,2,"agentos-prompt-item",3),o&2){let t,n=e.$implicit,r=l();v((t=r.resolvePrompt(n.id))?0:-1,t)}}var q=class o{router=i(x);destroyRef=i(P);promptState=i(k);refresh$=new c(void 0);prompts$=this.refresh$.pipe(_(()=>this.promptState.listPlatform()));promptItems$=this.prompts$.pipe(f(e=>e.map(t=>({id:t.id??"",name:t.name,description:t.description}))));promptsById=new Map;constructor(){this.prompts$.pipe(d(this.destroyRef)).subscribe(e=>{this.promptsById=new Map(e.map(t=>[t.id??"",t]))})}goBack(){this.router.navigate(["/agentos","admin"])}openCreateForm(){this.router.navigate(["/agentos","admin","prompts","new"])}deletePrompt(e){this.promptState.delete(e.id??"").pipe(d(this.destroyRef)).subscribe(()=>this.refresh$.next())}resolvePrompt(e){return this.promptsById.get(e)??null}static \u0275fac=function(t){return new(t||o)};static \u0275cmp=g({type:o,selectors:[["agentos-platform-prompts"]],decls:5,vars:6,consts:[["promptItemTpl",""],["title","Platform Prompts","emptyMessage","No platform prompts defined yet. Add one above.","cardMinWidth","400px",3,"createRequested","items","showCreate","itemTemplate"],["toolbar-start","","icon","arrow_back","title","Back",3,"action"],[3,"prompt","platformMode"],[3,"deleteRequested","prompt","platformMode"]],template:function(t,n){if(t&1&&(p(0,"ds-entity-list",1),M(1,"async"),m("createRequested",function(){return n.openCreateForm()}),p(2,"ds-icon-button",2),m("action",function(){return n.goBack()}),s()(),C(3,N,1,1,"ng-template",null,0,S)),t&2){let r=w(4);a("items",R(1,3,n.promptItems$)??I(5,F))("showCreate",!0)("itemTemplate",r)}},dependencies:[$,D,B,T],styles:[".platform-prompts__back[_ngcontent-%COMP%]{background:none;border:none;padding:0;cursor:pointer;font-size:.875rem;color:var(--color-primary, #007aff);font-family:inherit}.platform-prompts__back[_ngcontent-%COMP%]:hover{text-decoration:underline}"],changeDetection:0})};export{q as PlatformPromptsComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{o as h,u as w}from"./chunk-
|
|
1
|
+
import{o as h,u as w}from"./chunk-F7X52MX4.js";import{Bb as u,Db as p,Fb as r,Ka as d,Tb as m,Ub as g,Vb as x,Wa as C,ga as s,ha as c,lb as y,mb as M,oc as b,pc as _,rb as v,sb as t,ta as f,tb as n}from"./chunk-QDO3O2UB.js";function k(o,a){if(o&1){let e=u();t(0,"span",7),m(1,"Delete?"),n(),t(2,"ds-icon-button",8),p("action",function(){s(e);let l=r();return c(l.onDeleteConfirmed())}),n(),t(3,"ds-icon-button",9),p("action",function(){s(e);let l=r();return c(l.onDeleteCancelled())}),n()}}function O(o,a){if(o&1){let e=u();t(0,"ds-kebab-menu",10),p("itemSelected",function(l){s(e);let I=r();return c(I.onMenuAction(l))}),n()}if(o&2){let e=r();v("items",e.menuItems)}}var D=class o{model=_.required();namespaceId=_(void 0);readOnly=_(!1);deleteRequested=b();editRequested=b();pendingDelete=f(!1);menuItems=[{key:"edit",label:"Edit model",icon:"edit"},{key:"delete",label:"Delete model",icon:"delete",variant:"danger"}];get displayTitle(){return this.model().alias??this.model().apiModelName}onMenuAction(a){switch(a){case"edit":this.editRequested.emit(this.model());break;case"delete":this.pendingDelete.set(!0);break}}onDeleteConfirmed(){this.pendingDelete.set(!1),this.deleteRequested.emit(this.model())}onDeleteCancelled(){this.pendingDelete.set(!1)}static \u0275fac=function(e){return new(e||o)};static \u0275cmp=C({type:o,selectors:[["agentos-ai-model-item"]],inputs:{model:[1,"model"],namespaceId:[1,"namespaceId"],readOnly:[1,"readOnly"]},outputs:{deleteRequested:"deleteRequested",editRequested:"editRequested"},decls:12,vars:4,consts:[["role","listitem",1,"ai-model-item"],[1,"ai-model-item__body"],[1,"ai-model-item__name"],[1,"ai-model-item__api-name"],[1,"ai-model-item__params"],[1,"ai-model-item__actions"],[3,"items"],[1,"ai-model-item__confirm-label"],["icon","check","variant","danger","title","Confirm deletion",3,"action"],["icon","close","title","Cancel deletion",3,"action"],[3,"itemSelected","items"]],template:function(e,i){e&1&&(t(0,"div",0)(1,"div",1)(2,"span",2),m(3),n(),t(4,"span",3),m(5),n(),t(6,"span",4)(7,"span"),m(8),n()()(),t(9,"div",5),y(10,k,4,0)(11,O,1,1,"ds-kebab-menu",6),n()()),e&2&&(d(3),g(i.displayTitle),d(2),g(i.model().apiModelName),d(3),x("priority: ",i.model().priority),d(2),M(i.pendingDelete()?10:i.readOnly()?-1:11))},dependencies:[w,h],styles:[".ai-model-item[_ngcontent-%COMP%]{display:flex;align-items:center;gap:.5rem;padding:.75rem 1rem;border-radius:10px;border:1px solid var(--color-border, rgba(0, 0, 0, .08));background:var(--glass-bg, rgba(255, 255, 255, .72));-webkit-backdrop-filter:var(--glass-backdrop-blur, blur(20px));backdrop-filter:var(--glass-backdrop-blur, blur(20px));transition:background .15s ease,border-color .15s ease}.ai-model-item[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .04));border-color:var(--color-primary, #007aff)}.ai-model-item__body[_ngcontent-%COMP%]{flex:1;display:flex;flex-direction:column;gap:.2rem;min-width:0}.ai-model-item__name[_ngcontent-%COMP%]{font-size:.95rem;font-weight:500;color:var(--color-text, #1d1d1f);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ai-model-item__api-name[_ngcontent-%COMP%]{font-size:.78rem;color:var(--color-text-secondary, #6e6e73);font-family:monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ai-model-item__params[_ngcontent-%COMP%]{display:flex;gap:.75rem;font-size:.75rem;color:var(--color-text-secondary, #6e6e73)}.ai-model-item__actions[_ngcontent-%COMP%]{flex-shrink:0;display:flex;align-items:center;gap:.125rem;opacity:0;transition:opacity .15s ease}.ai-model-item[_ngcontent-%COMP%]:hover .ai-model-item__actions[_ngcontent-%COMP%], .ai-model-item[_ngcontent-%COMP%]:focus-within .ai-model-item__actions[_ngcontent-%COMP%]{opacity:1}.ai-model-item__confirm-label[_ngcontent-%COMP%]{font-size:.8rem;font-weight:500;color:var(--color-error, #ff3b30);margin-right:.25rem;white-space:nowrap}"],changeDetection:0})};export{D as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as V}from"./chunk-
|
|
1
|
+
import{u as V}from"./chunk-F7X52MX4.js";import{Ab as v,Bb as C,Db as f,Fb as a,Gb as A,Ha as M,Hb as I,Hc as N,Ka as o,Mb as S,Ob as T,Pb as k,Rb as E,Tb as _,Ub as g,Wa as w,Ya as O,ab as x,ga as b,ha as u,ic as D,lb as d,mb as s,oc as y,pc as c,rb as p,rc as j,sb as i,tb as r,ub as P}from"./chunk-QDO3O2UB.js";var Q=[[["","agentosCardChips",""]]],q=["[agentosCardChips]"];function F(n,t){n&1&&v(0)}function U(n,t){if(n&1){let e=C();i(0,"button",3),f("click",function(){b(e);let l=a();return u(l.nameClicked.emit())}),x(1,F,1,0,"ng-container",4),r()}if(n&2){a();let e=k(3);o(),p("ngTemplateOutlet",e)}}function Y(n,t){n&1&&v(0)}function R(n,t){if(n&1&&(i(0,"div",2),x(1,Y,1,0,"ng-container",4),r()),n&2){a();let e=k(3);o(),p("ngTemplateOutlet",e)}}function B(n,t){if(n&1&&(i(0,"div",7),P(1,"img",15),r()),n&2){let e=a(2);o(),p("src",e.logo(),M)("alt",e.name())}}function G(n,t){if(n&1&&(i(0,"div",16),_(1),r()),n&2){let e=a(2);E("ac__mark--emoji",e.markIsEmoji()),o(),g(e.resolvedMark)}}function H(n,t){if(n&1&&(i(0,"span",10),_(1),r()),n&2){let e=a(2);o(),g(e.name())}}function J(n,t){if(n&1){let e=C();i(0,"button",17),f("click",function(){b(e);let l=a(2);return u(l.nameClicked.emit())}),_(1),r()}if(n&2){let e=a(2);o(),g(e.name())}}function L(n,t){if(n&1&&(i(0,"p",12),_(1),r()),n&2){let e=a(2);o(),g(e.description())}}function W(n,t){if(n&1){let e=C();i(0,"ds-kebab-menu",18),f("itemSelected",function(l){b(e);let K=a(2);return u(K.menuAction.emit(l))}),r()}if(n&2){let e=a(2);p("items",e.menuItems())}}function X(n,t){n&1&&(i(0,"div",14),I(1),r())}function Z(n,t){if(n&1&&(i(0,"div",5)(1,"div",6),d(2,B,2,2,"div",7)(3,G,2,3,"div",8),i(4,"div",9),d(5,H,2,1,"span",10)(6,J,2,1,"button",11),d(7,L,2,1,"p",12),r()(),d(8,W,1,1,"ds-kebab-menu",13),r(),d(9,X,2,0,"div",14)),n&2){let e=a();o(2),s(e.logo()?2:3),o(3),s(e.clickable()?5:6),o(2),s(e.description()?7:-1),o(),s(e.hasMenu?8:-1),o(),s(e.hasChips?9:-1)}}var h=class n{static \u0275fac=function(e){return new(e||n)};static \u0275dir=O({type:n,selectors:[["","agentosCardChips",""]]})},z=class n{name=c.required();description=c(null);mark=c(null);markIsEmoji=c(!1);logo=c(null);menuItems=c([]);clickable=c(!1);nameClicked=y();menuAction=y();chipsSlot=j(h);get resolvedMark(){return this.mark()??(this.name().charAt(0).toUpperCase()||"?")}get hasChips(){return this.chipsSlot()!==void 0}get hasMenu(){return this.menuItems().length>0}static \u0275fac=function(e){return new(e||n)};static \u0275cmp=w({type:n,selectors:[["agentos-action-card"]],contentQueries:function(e,m,l){e&1&&S(l,m.chipsSlot,h,5),e&2&&T()},inputs:{name:[1,"name"],description:[1,"description"],mark:[1,"mark"],markIsEmoji:[1,"markIsEmoji"],logo:[1,"logo"],menuItems:[1,"menuItems"],clickable:[1,"clickable"]},outputs:{nameClicked:"nameClicked",menuAction:"menuAction"},ngContentSelectors:q,decls:4,vars:1,consts:[["cardContent",""],["type","button",1,"ac","ac--clickable"],[1,"ac"],["type","button",1,"ac","ac--clickable",3,"click"],[4,"ngTemplateOutlet"],[1,"ac__header"],[1,"ac__id"],["aria-hidden","true",1,"ac__mark","ac__mark--logo"],["aria-hidden","true",1,"ac__mark",3,"ac__mark--emoji"],[1,"ac__meta"],[1,"ac__name"],["type","button",1,"ac__name"],[1,"ac__description"],[3,"items"],[1,"ac__chips"],[1,"ac__logo-img",3,"src","alt"],["aria-hidden","true",1,"ac__mark"],["type","button",1,"ac__name",3,"click"],[3,"itemSelected","items"]],template:function(e,m){e&1&&(A(Q),d(0,U,2,1,"button",1)(1,R,2,1,"div",2),x(2,Z,10,5,"ng-template",null,0,D)),e&2&&s(m.clickable()?0:1)},dependencies:[V,N],styles:["[_nghost-%COMP%]{display:block;height:var(--ac-height, auto)}.ac[_ngcontent-%COMP%]{background:var(--color-bg-secondary, rgba(255, 255, 255, .7));border:1px solid var(--color-border, rgba(0, 0, 0, .1));border-radius:12px;box-shadow:0 1px 3px var(--color-shadow, rgba(0, 0, 0, .05));overflow:hidden;transition:background .15s ease,border-color .15s ease,box-shadow .15s ease}.ac[_ngcontent-%COMP%]:hover{box-shadow:0 2px 8px var(--color-shadow, rgba(0, 0, 0, .08));border-color:var(--color-border, rgba(0, 0, 0, .15))}.ac[_ngcontent-%COMP%]{overflow:visible}.ac--clickable[_ngcontent-%COMP%]{appearance:none;background:transparent;border:none;padding:0;margin:0;font:inherit;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;background:var(--color-bg-secondary, rgba(255, 255, 255, .7));border:1px solid var(--color-border, rgba(0, 0, 0, .1));border-radius:12px;box-shadow:0 1px 3px var(--color-shadow, rgba(0, 0, 0, .05));overflow:hidden;transition:background .15s ease,border-color .15s ease,box-shadow .15s ease}.ac--clickable[_ngcontent-%COMP%]{background:var(--color-bg-secondary, rgba(255, 255, 255, .7));border:1px solid var(--color-border, rgba(0, 0, 0, .1));border-radius:12px;box-shadow:0 1px 3px var(--color-shadow, rgba(0, 0, 0, .05));overflow:hidden;transition:background .15s ease,border-color .15s ease,box-shadow .15s ease}.ac--clickable[_ngcontent-%COMP%]:hover{box-shadow:0 2px 8px var(--color-shadow, rgba(0, 0, 0, .08));border-color:var(--color-border, rgba(0, 0, 0, .15))}.ac--clickable[_ngcontent-%COMP%]{cursor:pointer;transition:background .15s ease,border-color .15s ease,box-shadow .15s ease,transform .12s ease}.ac--clickable[_ngcontent-%COMP%]:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .04));border-color:var(--color-primary, #007aff);box-shadow:0 2px 12px var(--color-shadow, rgba(0, 0, 0, .08));transform:translateY(-1px)}.ac--clickable[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-primary, #007aff);outline-offset:2px}.ac--clickable[_ngcontent-%COMP%]:active{transform:translateY(0)}.ac--clickable[_ngcontent-%COMP%]{overflow:visible;width:100%;height:100%;text-align:left}.ac--clickable[_ngcontent-%COMP%] .ac__name[_ngcontent-%COMP%]{cursor:inherit}.ac--clickable[_ngcontent-%COMP%] .ac__name[_ngcontent-%COMP%]:hover{text-decoration:none}.ac__header[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;padding:16px 18px 14px}.ac__id[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;min-width:0;flex:1}.ac__mark[_ngcontent-%COMP%]{width:32px;height:32px;border-radius:8px;background:#161616;color:#fff;border:none;display:flex;align-items:center;justify-content:center;flex-shrink:0}[data-theme=dark][_ngcontent-%COMP%] .ac__mark[_ngcontent-%COMP%]{background:transparent;border:1.5px solid var(--color-border, rgba(255, 255, 255, .15));color:var(--color-text, #f5f5f7)}.ac__mark[_ngcontent-%COMP%]{font-family:Inter,sans-serif;font-size:13px;font-weight:700;line-height:1;align-self:flex-start}.ac__mark--logo[_ngcontent-%COMP%]{background:var(--color-bg-secondary);border:1px solid var(--color-border);padding:4px}[data-theme=dark][_ngcontent-%COMP%] .ac__mark--logo[_ngcontent-%COMP%]{background:transparent}.ac__mark--emoji[_ngcontent-%COMP%]{font-size:18px;line-height:32px;background:var(--color-bg-secondary);border:1px solid var(--color-border);color:inherit}[data-theme=dark][_ngcontent-%COMP%] .ac__mark--emoji[_ngcontent-%COMP%]{background:transparent}.ac__logo-img[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:contain;border-radius:4px;display:block}.ac__meta[_ngcontent-%COMP%]{min-width:0}.ac__description[_ngcontent-%COMP%]{font-family:Inter,sans-serif;font-size:.8125rem;font-weight:400;line-height:1.4;color:var(--color-text-secondary, #6e6e73);margin:2px 0 0}.ac__name[_ngcontent-%COMP%]{appearance:none;background:transparent;border:none;padding:0;margin:0;font:inherit;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;font-family:Inter,sans-serif;font-size:14px;font-weight:600;line-height:1.3;color:var(--color-text, #1d1d1f);display:block;word-break:break-word;text-align:left}.ac__name[_ngcontent-%COMP%]:hover{text-decoration:underline}.ac__name[_ngcontent-%COMP%]:focus-visible{outline:2px solid var(--color-primary, #007aff);outline-offset:2px;border-radius:2px}.ac__chips[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;gap:6px;padding:0 14px 16px}[_nghost-%COMP%] .ac-chip{display:inline-flex;align-items:center;gap:5px;height:28px;padding:0 12px 0 10px;border-radius:999px;border:1px solid var(--color-border, rgba(0, 0, 0, .1));background:var(--color-surface-secondary, rgba(0, 0, 0, .03));color:var(--color-text, #1d1d1f);font-family:Inter,sans-serif;font-size:11.5px;font-weight:500;line-height:1;cursor:pointer;white-space:nowrap;transition:background .12s ease,border-color .12s ease}[_nghost-%COMP%] .ac-chip:hover{background:var(--color-bg-hover, rgba(0, 0, 0, .06));border-color:var(--color-border, rgba(0, 0, 0, .16))}[_nghost-%COMP%] .ac-chip svg{flex-shrink:0}"],changeDetection:0})};export{h as a,z as b};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{E as B,k as d}from"./chunk-E3XC4CVU.js";import{D as N,Fa as g,G as M,Gb as D,Hb as z,K as R,O as b,Rb as O,Sb as H,Uc as $,V as v,Wa as x,Xa as U,Xc as j,Z as A,_ as T,aa as E,ba as _,ca as c,e as F,jb as P,la as I,m as u,n as w,nc as k,qa as S,t as m,vc as W,ya as L,z as y}from"./chunk-5J7BTB5J.js";function V(i){return Error(`Unable to find icon with the name "${i}"`)}function X(){return Error("Could not find HttpClient for use with Angular Material icons. Please add provideHttpClient() to your providers.")}function q(i){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${i}".`)}function Y(i){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${i}".`)}var a=class{url;svgText;options;svgElement=null;constructor(l,t,e){this.url=l,this.svgText=t,this.options=e}},K=(()=>{class i{_httpClient;_sanitizer;_errorHandler;_document;_svgIconConfigs=new Map;_iconSetConfigs=new Map;_cachedIconsByUrl=new Map;_inProgressUrlFetches=new Map;_fontCssClassesByAlias=new Map;_resolvers=[];_defaultFontSetClass=["material-icons","mat-ligature-font"];constructor(t,e,n,o){this._httpClient=t,this._sanitizer=e,this._errorHandler=o,this._document=n}addSvgIcon(t,e,n){return this.addSvgIconInNamespace("",t,e,n)}addSvgIconLiteral(t,e,n){return this.addSvgIconLiteralInNamespace("",t,e,n)}addSvgIconInNamespace(t,e,n,o){return this._addSvgIconConfig(t,e,new a(n,null,o))}addSvgIconResolver(t){return this._resolvers.push(t),this}addSvgIconLiteralInNamespace(t,e,n,o){let r=this._sanitizer.sanitize(g.HTML,n);if(!r)throw Y(n);let s=d(r);return this._addSvgIconConfig(t,e,new a("",s,o))}addSvgIconSet(t,e){return this.addSvgIconSetInNamespace("",t,e)}addSvgIconSetLiteral(t,e){return this.addSvgIconSetLiteralInNamespace("",t,e)}addSvgIconSetInNamespace(t,e,n){return this._addSvgIconSetConfig(t,new a(e,null,n))}addSvgIconSetLiteralInNamespace(t,e,n){let o=this._sanitizer.sanitize(g.HTML,e);if(!o)throw Y(e);let r=d(o);return this._addSvgIconSetConfig(t,new a("",r,n))}registerFontClassAlias(t,e=t){return this._fontCssClassesByAlias.set(t,e),this}classNameForFontAlias(t){return this._fontCssClassesByAlias.get(t)||t}setDefaultFontSetClass(...t){return this._defaultFontSetClass=t,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(t){let e=this._sanitizer.sanitize(g.RESOURCE_URL,t);if(!e)throw q(t);let n=this._cachedIconsByUrl.get(e);return n?u(C(n)):this._loadSvgIconFromConfig(new a(t,null)).pipe(v(o=>this._cachedIconsByUrl.set(e,o)),m(o=>C(o)))}getNamedSvgIcon(t,e=""){let n=J(e,t),o=this._svgIconConfigs.get(n);if(o)return this._getSvgFromConfig(o);if(o=this._getIconConfigFromResolvers(e,t),o)return this._svgIconConfigs.set(n,o),this._getSvgFromConfig(o);let r=this._iconSetConfigs.get(e);return r?this._getSvgFromIconSetConfigs(t,r):w(V(n))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(t){return t.svgText?u(C(this._svgElementFromConfig(t))):this._loadSvgIconFromConfig(t).pipe(m(e=>C(e)))}_getSvgFromIconSetConfigs(t,e){let n=this._extractIconWithNameFromAnySet(t,e);if(n)return u(n);let o=e.filter(r=>!r.svgText).map(r=>this._loadSvgIconSetFromConfig(r).pipe(N(s=>{let f=`Loading icon set URL: ${this._sanitizer.sanitize(g.RESOURCE_URL,r.url)} failed: ${s.message}`;return this._errorHandler.handleError(new Error(f)),u(null)})));return y(o).pipe(m(()=>{let r=this._extractIconWithNameFromAnySet(t,e);if(!r)throw V(t);return r}))}_extractIconWithNameFromAnySet(t,e){for(let n=e.length-1;n>=0;n--){let o=e[n];if(o.svgText&&o.svgText.toString().indexOf(t)>-1){let r=this._svgElementFromConfig(o),s=this._extractSvgIconFromSet(r,t,o.options);if(s)return s}}return null}_loadSvgIconFromConfig(t){return this._fetchIcon(t).pipe(v(e=>t.svgText=e),m(()=>this._svgElementFromConfig(t)))}_loadSvgIconSetFromConfig(t){return t.svgText?u(null):this._fetchIcon(t).pipe(v(e=>t.svgText=e))}_extractSvgIconFromSet(t,e,n){let o=t.querySelector(`[id="${e}"]`);if(!o)return null;let r=o.cloneNode(!0);if(r.removeAttribute("id"),r.nodeName.toLowerCase()==="svg")return this._setSvgAttributes(r,n);if(r.nodeName.toLowerCase()==="symbol")return this._setSvgAttributes(this._toSvgElement(r),n);let s=this._svgElementFromString(d("<svg></svg>"));return s.appendChild(r),this._setSvgAttributes(s,n)}_svgElementFromString(t){let e=this._document.createElement("DIV");e.innerHTML=t;let n=e.querySelector("svg");if(!n)throw Error("<svg> tag not found");return n}_toSvgElement(t){let e=this._svgElementFromString(d("<svg></svg>")),n=t.attributes;for(let o=0;o<n.length;o++){let{name:r,value:s}=n[o];r!=="id"&&e.setAttribute(r,s)}for(let o=0;o<t.childNodes.length;o++)t.childNodes[o].nodeType===this._document.ELEMENT_NODE&&e.appendChild(t.childNodes[o].cloneNode(!0));return e}_setSvgAttributes(t,e){return t.setAttribute("fit",""),t.setAttribute("height","100%"),t.setAttribute("width","100%"),t.setAttribute("preserveAspectRatio","xMidYMid meet"),t.setAttribute("focusable","false"),e&&e.viewBox&&t.setAttribute("viewBox",e.viewBox),t}_fetchIcon(t){let{url:e,options:n}=t,o=n?.withCredentials??!1;if(!this._httpClient)throw X();if(e==null)throw Error(`Cannot fetch icon from URL "${e}".`);let r=this._sanitizer.sanitize(g.RESOURCE_URL,e);if(!r)throw q(e);let s=this._inProgressUrlFetches.get(r);if(s)return s;let h=this._httpClient.get(r,{responseType:"text",withCredentials:o}).pipe(m(f=>d(f)),R(()=>this._inProgressUrlFetches.delete(r)),b());return this._inProgressUrlFetches.set(r,h),h}_addSvgIconConfig(t,e,n){return this._svgIconConfigs.set(J(t,e),n),this}_addSvgIconSetConfig(t,e){let n=this._iconSetConfigs.get(t);return n?n.push(e):this._iconSetConfigs.set(t,[e]),this}_svgElementFromConfig(t){if(!t.svgElement){let e=this._svgElementFromString(t.svgText);this._setSvgAttributes(e,t.options),t.svgElement=e}return t.svgElement}_getIconConfigFromResolvers(t,e){for(let n=0;n<this._resolvers.length;n++){let o=this._resolvers[n](e,t);if(o)return Z(o)?new a(o.url,null,o.options):new a(o,null)}}static \u0275fac=function(e){return new(e||i)(_($,8),_(j),_(I,8),_(S))};static \u0275prov=A({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function C(i){return i.cloneNode(!0)}function J(i,l){return i+":"+l}function Z(i){return!!(i.url&&i.options)}var tt=["*"],et=new E("MAT_ICON_DEFAULT_OPTIONS"),nt=new E("mat-icon-location",{providedIn:"root",factory:()=>{let i=c(I),l=i?i.location:null;return{getPathname:()=>l?l.pathname+l.search:""}}}),G=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],ot=G.map(i=>`[${i}]`).join(", "),rt=/^url\(['"]?#(.*?)['"]?\)$/,yt=(()=>{class i{_elementRef=c(L);_iconRegistry=c(K);_location=c(nt);_errorHandler=c(S);_defaultColor;get color(){return this._color||this._defaultColor}set color(t){this._color=t}_color;inline=!1;get svgIcon(){return this._svgIcon}set svgIcon(t){t!==this._svgIcon&&(t?this._updateSvgIcon(t):this._svgIcon&&this._clearSvgElement(),this._svgIcon=t)}_svgIcon;get fontSet(){return this._fontSet}set fontSet(t){let e=this._cleanupFontValue(t);e!==this._fontSet&&(this._fontSet=e,this._updateFontIconClasses())}_fontSet;get fontIcon(){return this._fontIcon}set fontIcon(t){let e=this._cleanupFontValue(t);e!==this._fontIcon&&(this._fontIcon=e,this._updateFontIconClasses())}_fontIcon;_previousFontSetClass=[];_previousFontIconClass;_svgName=null;_svgNamespace=null;_previousPath;_elementsWithExternalReferences;_currentIconFetch=F.EMPTY;constructor(){let t=c(new k("aria-hidden"),{optional:!0}),e=c(et,{optional:!0});e&&(e.color&&(this.color=this._defaultColor=e.color),e.fontSet&&(this.fontSet=e.fontSet)),t||this._elementRef.nativeElement.setAttribute("aria-hidden","true")}_splitIconName(t){if(!t)return["",""];let e=t.split(":");switch(e.length){case 1:return["",e[0]];case 2:return e;default:throw Error(`Invalid icon name: "${t}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){let t=this._elementsWithExternalReferences;if(t&&t.size){let e=this._location.getPathname();e!==this._previousPath&&(this._previousPath=e,this._prependPathToReferences(e))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(t){this._clearSvgElement();let e=this._location.getPathname();this._previousPath=e,this._cacheChildrenWithExternalReferences(t),this._prependPathToReferences(e),this._elementRef.nativeElement.appendChild(t)}_clearSvgElement(){let t=this._elementRef.nativeElement,e=t.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();e--;){let n=t.childNodes[e];(n.nodeType!==1||n.nodeName.toLowerCase()==="svg")&&n.remove()}}_updateFontIconClasses(){if(!this._usingFontIcon())return;let t=this._elementRef.nativeElement,e=(this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/):this._iconRegistry.getDefaultFontSetClass()).filter(n=>n.length>0);this._previousFontSetClass.forEach(n=>t.classList.remove(n)),e.forEach(n=>t.classList.add(n)),this._previousFontSetClass=e,this.fontIcon!==this._previousFontIconClass&&!e.includes("mat-ligature-font")&&(this._previousFontIconClass&&t.classList.remove(this._previousFontIconClass),this.fontIcon&&t.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(t){return typeof t=="string"?t.trim().split(" ")[0]:t}_prependPathToReferences(t){let e=this._elementsWithExternalReferences;e&&e.forEach((n,o)=>{n.forEach(r=>{o.setAttribute(r.name,`url('${t}#${r.value}')`)})})}_cacheChildrenWithExternalReferences(t){let e=t.querySelectorAll(ot),n=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let o=0;o<e.length;o++)G.forEach(r=>{let s=e[o],h=s.getAttribute(r),f=h?h.match(rt):null;if(f){let p=n.get(s);p||(p=[],n.set(s,p)),p.push({name:r,value:f[1]})}})}_updateSvgIcon(t){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),t){let[e,n]=this._splitIconName(t);e&&(this._svgNamespace=e),n&&(this._svgName=n),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(n,e).pipe(M(1)).subscribe(o=>this._setSvgElement(o),o=>{let r=`Error retrieving icon ${e}:${n}! ${o.message}`;this._errorHandler.handleError(new Error(r))})}}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=x({type:i,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:10,hostBindings:function(e,n){e&2&&(P("data-mat-icon-type",n._usingFontIcon()?"font":"svg")("data-mat-icon-name",n._svgName||n.fontIcon)("data-mat-icon-namespace",n._svgNamespace||n.fontSet)("fontIcon",n._usingFontIcon()?n.fontIcon:null),H(n.color?"mat-"+n.color:""),O("mat-icon-inline",n.inline)("mat-icon-no-color",n.color!=="primary"&&n.color!=="accent"&&n.color!=="warn"))},inputs:{color:"color",inline:[2,"inline","inline",W],svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],ngContentSelectors:tt,decls:1,vars:0,template:function(e,n){e&1&&(D(),z(0))},styles:[`mat-icon,mat-icon.mat-primary,mat-icon.mat-accent,mat-icon.mat-warn{color:var(--mat-icon-color, inherit)}.mat-icon{-webkit-user-select:none;user-select:none;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px;overflow:hidden}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}.mat-icon.mat-ligature-font[fontIcon]::before{content:attr(fontIcon)}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}
|
|
1
|
+
import{E as B,k as d}from"./chunk-NNVKL253.js";import{D as N,Fa as g,G as M,Gb as D,Hb as z,K as R,O as b,Rb as O,Sb as H,Uc as $,V as v,Wa as x,Xa as U,Xc as j,Z as A,_ as T,aa as E,ba as _,ca as c,e as F,jb as P,la as I,m as u,n as w,nc as k,qa as S,t as m,vc as W,ya as L,z as y}from"./chunk-QDO3O2UB.js";function V(i){return Error(`Unable to find icon with the name "${i}"`)}function X(){return Error("Could not find HttpClient for use with Angular Material icons. Please add provideHttpClient() to your providers.")}function q(i){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${i}".`)}function Y(i){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${i}".`)}var a=class{url;svgText;options;svgElement=null;constructor(l,t,e){this.url=l,this.svgText=t,this.options=e}},K=(()=>{class i{_httpClient;_sanitizer;_errorHandler;_document;_svgIconConfigs=new Map;_iconSetConfigs=new Map;_cachedIconsByUrl=new Map;_inProgressUrlFetches=new Map;_fontCssClassesByAlias=new Map;_resolvers=[];_defaultFontSetClass=["material-icons","mat-ligature-font"];constructor(t,e,n,o){this._httpClient=t,this._sanitizer=e,this._errorHandler=o,this._document=n}addSvgIcon(t,e,n){return this.addSvgIconInNamespace("",t,e,n)}addSvgIconLiteral(t,e,n){return this.addSvgIconLiteralInNamespace("",t,e,n)}addSvgIconInNamespace(t,e,n,o){return this._addSvgIconConfig(t,e,new a(n,null,o))}addSvgIconResolver(t){return this._resolvers.push(t),this}addSvgIconLiteralInNamespace(t,e,n,o){let r=this._sanitizer.sanitize(g.HTML,n);if(!r)throw Y(n);let s=d(r);return this._addSvgIconConfig(t,e,new a("",s,o))}addSvgIconSet(t,e){return this.addSvgIconSetInNamespace("",t,e)}addSvgIconSetLiteral(t,e){return this.addSvgIconSetLiteralInNamespace("",t,e)}addSvgIconSetInNamespace(t,e,n){return this._addSvgIconSetConfig(t,new a(e,null,n))}addSvgIconSetLiteralInNamespace(t,e,n){let o=this._sanitizer.sanitize(g.HTML,e);if(!o)throw Y(e);let r=d(o);return this._addSvgIconSetConfig(t,new a("",r,n))}registerFontClassAlias(t,e=t){return this._fontCssClassesByAlias.set(t,e),this}classNameForFontAlias(t){return this._fontCssClassesByAlias.get(t)||t}setDefaultFontSetClass(...t){return this._defaultFontSetClass=t,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(t){let e=this._sanitizer.sanitize(g.RESOURCE_URL,t);if(!e)throw q(t);let n=this._cachedIconsByUrl.get(e);return n?u(C(n)):this._loadSvgIconFromConfig(new a(t,null)).pipe(v(o=>this._cachedIconsByUrl.set(e,o)),m(o=>C(o)))}getNamedSvgIcon(t,e=""){let n=J(e,t),o=this._svgIconConfigs.get(n);if(o)return this._getSvgFromConfig(o);if(o=this._getIconConfigFromResolvers(e,t),o)return this._svgIconConfigs.set(n,o),this._getSvgFromConfig(o);let r=this._iconSetConfigs.get(e);return r?this._getSvgFromIconSetConfigs(t,r):w(V(n))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(t){return t.svgText?u(C(this._svgElementFromConfig(t))):this._loadSvgIconFromConfig(t).pipe(m(e=>C(e)))}_getSvgFromIconSetConfigs(t,e){let n=this._extractIconWithNameFromAnySet(t,e);if(n)return u(n);let o=e.filter(r=>!r.svgText).map(r=>this._loadSvgIconSetFromConfig(r).pipe(N(s=>{let f=`Loading icon set URL: ${this._sanitizer.sanitize(g.RESOURCE_URL,r.url)} failed: ${s.message}`;return this._errorHandler.handleError(new Error(f)),u(null)})));return y(o).pipe(m(()=>{let r=this._extractIconWithNameFromAnySet(t,e);if(!r)throw V(t);return r}))}_extractIconWithNameFromAnySet(t,e){for(let n=e.length-1;n>=0;n--){let o=e[n];if(o.svgText&&o.svgText.toString().indexOf(t)>-1){let r=this._svgElementFromConfig(o),s=this._extractSvgIconFromSet(r,t,o.options);if(s)return s}}return null}_loadSvgIconFromConfig(t){return this._fetchIcon(t).pipe(v(e=>t.svgText=e),m(()=>this._svgElementFromConfig(t)))}_loadSvgIconSetFromConfig(t){return t.svgText?u(null):this._fetchIcon(t).pipe(v(e=>t.svgText=e))}_extractSvgIconFromSet(t,e,n){let o=t.querySelector(`[id="${e}"]`);if(!o)return null;let r=o.cloneNode(!0);if(r.removeAttribute("id"),r.nodeName.toLowerCase()==="svg")return this._setSvgAttributes(r,n);if(r.nodeName.toLowerCase()==="symbol")return this._setSvgAttributes(this._toSvgElement(r),n);let s=this._svgElementFromString(d("<svg></svg>"));return s.appendChild(r),this._setSvgAttributes(s,n)}_svgElementFromString(t){let e=this._document.createElement("DIV");e.innerHTML=t;let n=e.querySelector("svg");if(!n)throw Error("<svg> tag not found");return n}_toSvgElement(t){let e=this._svgElementFromString(d("<svg></svg>")),n=t.attributes;for(let o=0;o<n.length;o++){let{name:r,value:s}=n[o];r!=="id"&&e.setAttribute(r,s)}for(let o=0;o<t.childNodes.length;o++)t.childNodes[o].nodeType===this._document.ELEMENT_NODE&&e.appendChild(t.childNodes[o].cloneNode(!0));return e}_setSvgAttributes(t,e){return t.setAttribute("fit",""),t.setAttribute("height","100%"),t.setAttribute("width","100%"),t.setAttribute("preserveAspectRatio","xMidYMid meet"),t.setAttribute("focusable","false"),e&&e.viewBox&&t.setAttribute("viewBox",e.viewBox),t}_fetchIcon(t){let{url:e,options:n}=t,o=n?.withCredentials??!1;if(!this._httpClient)throw X();if(e==null)throw Error(`Cannot fetch icon from URL "${e}".`);let r=this._sanitizer.sanitize(g.RESOURCE_URL,e);if(!r)throw q(e);let s=this._inProgressUrlFetches.get(r);if(s)return s;let h=this._httpClient.get(r,{responseType:"text",withCredentials:o}).pipe(m(f=>d(f)),R(()=>this._inProgressUrlFetches.delete(r)),b());return this._inProgressUrlFetches.set(r,h),h}_addSvgIconConfig(t,e,n){return this._svgIconConfigs.set(J(t,e),n),this}_addSvgIconSetConfig(t,e){let n=this._iconSetConfigs.get(t);return n?n.push(e):this._iconSetConfigs.set(t,[e]),this}_svgElementFromConfig(t){if(!t.svgElement){let e=this._svgElementFromString(t.svgText);this._setSvgAttributes(e,t.options),t.svgElement=e}return t.svgElement}_getIconConfigFromResolvers(t,e){for(let n=0;n<this._resolvers.length;n++){let o=this._resolvers[n](e,t);if(o)return Z(o)?new a(o.url,null,o.options):new a(o,null)}}static \u0275fac=function(e){return new(e||i)(_($,8),_(j),_(I,8),_(S))};static \u0275prov=A({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();function C(i){return i.cloneNode(!0)}function J(i,l){return i+":"+l}function Z(i){return!!(i.url&&i.options)}var tt=["*"],et=new E("MAT_ICON_DEFAULT_OPTIONS"),nt=new E("mat-icon-location",{providedIn:"root",factory:()=>{let i=c(I),l=i?i.location:null;return{getPathname:()=>l?l.pathname+l.search:""}}}),G=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],ot=G.map(i=>`[${i}]`).join(", "),rt=/^url\(['"]?#(.*?)['"]?\)$/,yt=(()=>{class i{_elementRef=c(L);_iconRegistry=c(K);_location=c(nt);_errorHandler=c(S);_defaultColor;get color(){return this._color||this._defaultColor}set color(t){this._color=t}_color;inline=!1;get svgIcon(){return this._svgIcon}set svgIcon(t){t!==this._svgIcon&&(t?this._updateSvgIcon(t):this._svgIcon&&this._clearSvgElement(),this._svgIcon=t)}_svgIcon;get fontSet(){return this._fontSet}set fontSet(t){let e=this._cleanupFontValue(t);e!==this._fontSet&&(this._fontSet=e,this._updateFontIconClasses())}_fontSet;get fontIcon(){return this._fontIcon}set fontIcon(t){let e=this._cleanupFontValue(t);e!==this._fontIcon&&(this._fontIcon=e,this._updateFontIconClasses())}_fontIcon;_previousFontSetClass=[];_previousFontIconClass;_svgName=null;_svgNamespace=null;_previousPath;_elementsWithExternalReferences;_currentIconFetch=F.EMPTY;constructor(){let t=c(new k("aria-hidden"),{optional:!0}),e=c(et,{optional:!0});e&&(e.color&&(this.color=this._defaultColor=e.color),e.fontSet&&(this.fontSet=e.fontSet)),t||this._elementRef.nativeElement.setAttribute("aria-hidden","true")}_splitIconName(t){if(!t)return["",""];let e=t.split(":");switch(e.length){case 1:return["",e[0]];case 2:return e;default:throw Error(`Invalid icon name: "${t}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){let t=this._elementsWithExternalReferences;if(t&&t.size){let e=this._location.getPathname();e!==this._previousPath&&(this._previousPath=e,this._prependPathToReferences(e))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(t){this._clearSvgElement();let e=this._location.getPathname();this._previousPath=e,this._cacheChildrenWithExternalReferences(t),this._prependPathToReferences(e),this._elementRef.nativeElement.appendChild(t)}_clearSvgElement(){let t=this._elementRef.nativeElement,e=t.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();e--;){let n=t.childNodes[e];(n.nodeType!==1||n.nodeName.toLowerCase()==="svg")&&n.remove()}}_updateFontIconClasses(){if(!this._usingFontIcon())return;let t=this._elementRef.nativeElement,e=(this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/):this._iconRegistry.getDefaultFontSetClass()).filter(n=>n.length>0);this._previousFontSetClass.forEach(n=>t.classList.remove(n)),e.forEach(n=>t.classList.add(n)),this._previousFontSetClass=e,this.fontIcon!==this._previousFontIconClass&&!e.includes("mat-ligature-font")&&(this._previousFontIconClass&&t.classList.remove(this._previousFontIconClass),this.fontIcon&&t.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(t){return typeof t=="string"?t.trim().split(" ")[0]:t}_prependPathToReferences(t){let e=this._elementsWithExternalReferences;e&&e.forEach((n,o)=>{n.forEach(r=>{o.setAttribute(r.name,`url('${t}#${r.value}')`)})})}_cacheChildrenWithExternalReferences(t){let e=t.querySelectorAll(ot),n=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let o=0;o<e.length;o++)G.forEach(r=>{let s=e[o],h=s.getAttribute(r),f=h?h.match(rt):null;if(f){let p=n.get(s);p||(p=[],n.set(s,p)),p.push({name:r,value:f[1]})}})}_updateSvgIcon(t){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),t){let[e,n]=this._splitIconName(t);e&&(this._svgNamespace=e),n&&(this._svgName=n),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(n,e).pipe(M(1)).subscribe(o=>this._setSvgElement(o),o=>{let r=`Error retrieving icon ${e}:${n}! ${o.message}`;this._errorHandler.handleError(new Error(r))})}}static \u0275fac=function(e){return new(e||i)};static \u0275cmp=x({type:i,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:10,hostBindings:function(e,n){e&2&&(P("data-mat-icon-type",n._usingFontIcon()?"font":"svg")("data-mat-icon-name",n._svgName||n.fontIcon)("data-mat-icon-namespace",n._svgNamespace||n.fontSet)("fontIcon",n._usingFontIcon()?n.fontIcon:null),H(n.color?"mat-"+n.color:""),O("mat-icon-inline",n.inline)("mat-icon-no-color",n.color!=="primary"&&n.color!=="accent"&&n.color!=="warn"))},inputs:{color:"color",inline:[2,"inline","inline",W],svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],ngContentSelectors:tt,decls:1,vars:0,template:function(e,n){e&1&&(D(),z(0))},styles:[`mat-icon,mat-icon.mat-primary,mat-icon.mat-accent,mat-icon.mat-warn{color:var(--mat-icon-color, inherit)}.mat-icon{-webkit-user-select:none;user-select:none;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px;overflow:hidden}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}.mat-icon.mat-ligature-font[fontIcon]::before{content:attr(fontIcon)}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}
|
|
2
2
|
`],encapsulation:2,changeDetection:0})}return i})(),Nt=(()=>{class i{static \u0275fac=function(e){return new(e||i)};static \u0275mod=U({type:i});static \u0275inj=T({imports:[B]})}return i})();export{yt as a,Nt as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Z as n,aa as a,ca as i,lc as y,ta as s}from"./chunk-
|
|
1
|
+
import{Z as n,aa as a,ca as i,lc as y,ta as s}from"./chunk-QDO3O2UB.js";var l=["send","newline"],c="agentos.enter-key-behavior",d="send",o=class t{_enterKeyBehavior=s(this.readStoredBehavior());enterKeyBehavior=this._enterKeyBehavior.asReadonly();composerHint=y(()=>this._enterKeyBehavior()==="newline"?"Enter for a new line \xB7 Ctrl/Cmd+Enter to send":"Enter to send \xB7 Shift+Enter for a new line");setEnterKeyBehavior(e){this._enterKeyBehavior.set(e);try{localStorage.setItem(c,e)}catch(r){}}shouldSend(e){let r=e.key==="Enter"&&!e.isComposing,E=e.ctrlKey||e.metaKey,h=this._enterKeyBehavior()==="newline"?E:!e.shiftKey;return r&&h}readStoredBehavior(){try{let e=localStorage.getItem(c);return e&&l.includes(e)?e:d}catch(e){return d}}static \u0275fac=function(r){return new(r||t)};static \u0275prov=n({token:t,factory:t.\u0275fac,providedIn:"root"})},f=new a("agentos.user-preferences-port",{providedIn:"root",factory:()=>i(o)});export{l as a,o as b,f as c};
|