PageSourceSearch

https://fitwithpulse.ai/_next/static/chunks/pages/admin/projectManagement-d046abec29697489.js

js fitwithpulse.ai collected 2026-10-05 13:48:56 UTC 57,570 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[30055],{78941:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/admin/projectManagement",function(){return s(92839)}])},96964:function(e,t,s){"use strict";s.d(t,{Z:function(){return l}});let l=(0,s(51601).Z)("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]])},72918:function(e,t,s){"use strict";s.d(t,{Z:function(){return l}});let l=(0,s(51601).Z)("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},71994:function(e,t,s){"use strict";s.d(t,{Z:function(){return l}});let l=(0,s(51601).Z)("CircleUserRound",[["path",{d:"M18 20a6 6 0 0 0-12 0",key:"1qehca"}],["circle",{cx:"12",cy:"10",r:"4",key:"1h16sb"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]])},65774:function(e,t,s){"use strict";s.d(t,{Z:function(){return l}});let l=(0,s(51601).Z)("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]])},99518:function(e,t,s){"use strict";s.d(t,{Z:function(){return l}});let l=(0,s(51601).Z)("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]])},90169:function(e,t,s){"use strict";s.d(t,{Z:function(){return l}});let l=(0,s(51601).Z)("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]])},36508:function(e,t,s){"use strict";s.d(t,{Z:function(){return l}});let l=(0,s(51601).Z)("ListOrdered",[["path",{d:"M10 12h11",key:"6m4ad9"}],["path",{d:"M10 18h11",key:"11hvi2"}],["path",{d:"M10 6h11",key:"c7qv1k"}],["path",{d:"M4 10h2",key:"16xx2s"}],["path",{d:"M4 6h1v4",key:"cnovpq"}],["path",{d:"M6 18H4c0-1 2-2 2-3s-1-1.5-2-1",key:"m9a95d"}]])},19320:function(e,t,s){"use strict";s.d(t,{Z:function(){return l}});let l=(0,s(51601).Z)("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]])},71578:function(e,t,s){"use strict";s.d(t,{Z:function(){return l}});let l=(0,s(51601).Z)("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]])},7971:function(e,t,s){"use strict";s.d(t,{Z:function(){return l}});let l=(0,s(51601).Z)("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},14386:function(e,t,s){"use strict";s.d(t,{Z:function(){return l}});let l=(0,s(51601).Z)("Server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]])},60081:function(e,t,s){"use strict";s.d(t,{Z:function(){return l}});let l=(0,s(51601).Z)("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},35272:function(e,t,s){"use strict";s.d(t,{Z:function(){return l}});let l=(0,s(51601).Z)("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]])},59710:function(e,t,s){"use strict";s.d(t,{Z:function(){return l}});let l=(0,s(51601).Z)("SquarePen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]])},87697:function(e,t,s){"use strict";s.d(t,{Z:function(){return l}});let l=(0,s(51601).Z)("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]])},51158:function(e,t,s){"use strict";s.d(t,{Z:function(){return l}});let l=(0,s(51601).Z)("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.
1172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]])},80011:function(e,t,s){"use strict";s.d(t,{Z:function(){return l}});let l=(0,s(51601).Z)("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]])},8134:function(e,t,s){"use strict";s.d(t,{Z:function(){return l}});let l=(0,s(51601).Z)("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]])},92839:function(e,t,s){"use strict";s.r(t),s.d(t,{default:function(){return F}});var l=s(72646),a=s(32586),r=s(52676),n=s(75271),i=s(60889),c=s.n(i),o=s(81785),d=s(39866),x=s(21019),u=s(88603),m=s(59710),h=s(80011);let p=(0,s(51601).Z)("GripVertical",[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]]);var b=s(65774),g=s(36508),f=s(35272),j=s(51158),v=s(8134),y=s(96964),N=s(7971),w=s(87697),k=s(63086),z=s(90169),C=s(40768),T=s(51929),M=s(95196);let S=[{value:"todo",label:"Act I — Hypothesis",helper:"Shape the bet and audience"},{value:"in-progress",label:"Act II — Work in Flight",helper:"Show proof every 60–90m"},{value:"done",label:"Act III — Result / Decision",helper:"Close loop & log decision"}],_=[{key:"actOne",label:"Act I — Hypothesis",placeholder:"What are we testing and for whom?"},{key:"actTwo",label:"Act II — Work in Flight",placeholder:"Milestone or proof-of-work you expect next."},{key:"actThree",label:"Act III — Result / Decision",placeholder:"What will we decide or learn when finished?"}],Z={signals:{label:"Signals",subtitle:"Listening Mode",bg:"bg-sky-800/20",text:"text-sky-200",border:"border-sky-500/30",accent:"text-sky-300",defaultIdle:120,idleHint:"Blue lane resets every hypothesis pulse (120m idle threshold)."},meanings:{label:"Meanings",subtitle:"Story Mode",bg:"bg-orange-800/20",text:"text-orange-100",border:"border-orange-500/30",accent:"text-orange-200",defaultIdle:45,idleHint:"Orange lane enforces 45m friction checks before nudges escalate."}},A={blue:{label:"Blue • Listening",classes:"bg-sky-500/15 border-sky-500/40 text-sky-200"},green:{label:"Green • Momentum",classes:"bg-emerald-500/15 border-emerald-500/40 text-emerald-200"},yellow:{label:"Yellow • Friction",classes:"bg-amber-500/15 border-amber-500/40 text-amber-100"},red:{label:"Red • Hot",classes:"bg-red-500/15 border-red-500/40 text-red-100"}},E=[{value:"signals",label:"Signals (Listening Mode)"},{value:"meanings",label:"Meanings (Story Mode)"}],D=[{value:"blue",label:"Blue \xb7 Listening"},{value:"green",label:"Green \xb7 Momentum"},{value:"yellow",label:"Yellow \xb7 Friction"},{value:"red",label:"Red \xb7 Hot"}],L=["signals","meanings"],O=e=>{let t,{task:s,onEdit:l,onDelete:a,onDragStart:n,onClick:i}=e,c=s.getMinutesSinceWorkBeat(),o=s.getNeedsIdleAlert(),d=s.lastWorkBeatAt?"".concat(c,"m since work beat"):"No work beat logged yet",x=Z[s.lane||"signals"],u=A[s.color||"blue"],N=_.map(e=>{let{key:t,label:l}=e;return{label:l,value:s[t]}}).filter(e=>e.value&&e.value.trim().length>0);return(0,r.jsxs)("div",{draggable:!0,onDragStart:e=>n(e,s),onClick:()=>i(s),className:"bg-[#1a1e24] border rounded-lg p-4 mb-3 cursor-pointer hover:border-zinc-500 transition-colors group ".concat(o?"border-red-500/70 shadow-[0_0_12px_rgba(239,68,68,0.35)]":"border-zinc-700"),children:[(0,r.jsxs)("div",{className:"flex items-start justify-between mb-2",children:[(0,r.jsx)("h4",{className:"text-white font-medium text-sm leading-5 flex-1 mr-2",children:s.name}),(0,r.jsxs)("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[(0,r.jsx)("button",{onClick:e=>{e.stopPropagation(),l(s)},className:"p-1 text-zinc-400 hover:text-blue-400 transition-colors",title:"Quick edit task",children:(0,r.jsx)(m.Z,{className:"w-3 h-3"})}),(0,r.jsx)("button",{onClick:e=>{e.stopPropagation(),a(s.id)},className:"p-1 text-zinc-400 hover:text-red-400 transition-colors",title:"Delete task",children:(0,r.jsx)(h.Z,{className:"w-3 h-3"})}),(0,r.jsx)(p,{className:"w-3 h-3 text-zinc-600"})]})]}),(0,r.jsxs)("div",{className:"flex flex-wrap gap-2 mb-3 text-[11px]",children:[(0,r.jsxs)("span",{className:"px-2 py-1 rounded-full border ".concat(x.bg," ").concat(x.text," ").concat(x.border),children:[x.label," \xb7 ",x.subtitle]}),(0,r.jsx)("span",{className:"px-2 py-1 rounded-full border ".concat(u.classes),children:u.label}),(0,r.jsxs)("span",{className:"px-2 py-1 rounded-full border border-zinc-600 text-zinc-300",children:["Status: ",s.status.replace("-"," ")]}),s.objectiveCode&&(0,r.jsxs)("span",{className:"px-2 py-1 rounded-full border border-indigo-500/40 text-indigo-200",children:["Objective \xb7 ",s.objectiveCode]})]}),o&&(0,r.jsxs)("div",{className:"bg-red-500/15 border border-red-500/40 text-red-100 text-xs rounded-md px-3 py-2 mb-3 flex items-center gap-2",children:[(0,r.jsx)(b.Z,{className:"w-3 h-3"}),(0,r.jsxs)("span",{children:["Idle threshold exceeded \xb7 ",c,"m since last work beat"]})]}),s.description&&(0,r.jsx)("p",{className:"text-zinc-400 text-xs mb-3 line-clamp-2",children:s.description}),s.notes&&(0,r.jsx)("div",{className:"bg-amber-500/10 border border-amber-400/30 rounded-md p-2 mb-3",children:(0,r.jsx)("p",{className:"text-amber-100 text-xs leading-relaxed whitespace-pre-wrap",children:s.notes.length>160?"".concat(s.notes.slice(0,157),"..."):s.notes})}),N.length>0&&(0,r.jsxs)("div",{className:"bg-[#101318] border border-zinc-700/70 rounded-md p-3 mb-3",children:[(0,r.jsxs)("div",{className:"text-[10px] uppercase tracking-[0.2em] text-zinc-500 flex items-center gap-2 mb-2",children:[(0,r.jsx)(g.Z,{className:"w-3 h-3 text-zinc-400"}),"Three-Beat Objective"]}),(0,r.jsx)("div",{className:"space-y-1.5",children:N.map(e=>(0,r.jsxs)("div",{className:"text-xs",children:[(0,r.jsxs)("span",{className:"text-zinc-500 mr-2 font-semibold",children:[e.label,":"]}
1),(0,r.jsx)("span",{className:"text-zinc-100",children:e.value})]},e.label))})]}),s.subtasks.length>0&&(0,r.jsxs)("div",{className:"mb-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between text-xs text-zinc-500 mb-1",children:[(0,r.jsxs)("span",{className:"flex items-center gap-1",children:[(0,r.jsx)(f.Z,{className:"w-3 h-3"}),"Subtasks"]}),(0,r.jsxs)("span",{children:[s.getSubtaskProgress().completed,"/",s.getSubtaskProgress().total]})]}),(0,r.jsx)("div",{className:"w-full bg-zinc-700 rounded-full h-1",children:(0,r.jsx)("div",{className:"bg-blue-500 h-1 rounded-full transition-all duration-300",style:{width:"".concat(s.getSubtaskProgress().percentage,"%")}})})]}),(0,r.jsxs)("div",{className:"space-y-2",children:[s.project&&(0,r.jsxs)("div",{className:"flex items-center gap-1 text-xs text-zinc-500",children:[(0,r.jsx)(j.Z,{className:"w-3 h-3"}),(0,r.jsx)("span",{className:"font-medium",children:"Project:"}),(0,r.jsx)("span",{children:s.project})]}),s.theme&&(0,r.jsxs)("div",{className:"flex items-center gap-1 text-xs text-zinc-500",children:[(0,r.jsx)(b.Z,{className:"w-3 h-3"}),(0,r.jsx)("span",{className:"font-medium",children:"Theme:"}),(0,r.jsx)("span",{children:s.theme})]}),s.assignee&&(0,r.jsxs)("div",{className:"flex items-center gap-1 text-xs text-zinc-500",children:[(0,r.jsx)(v.Z,{className:"w-3 h-3"}),(0,r.jsx)("span",{className:"font-medium",children:"Assignee:"}),(0,r.jsx)("span",{children:s.assignee})]}),(0,r.jsxs)("div",{className:"flex items-center gap-1 text-xs text-zinc-500",children:[(0,r.jsx)(y.Z,{className:"w-3 h-3"}),(0,r.jsx)("span",{children:(t=s.createdAt,new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",year:"numeric"}).format(t))})]}),(0,r.jsxs)("div",{className:"flex items-center gap-1 text-xs text-zinc-400",children:[(0,r.jsx)(b.Z,{className:"w-3 h-3"}),(0,r.jsx)("span",{children:d})]})]})]})},I=e=>{let{task:t,isOpen:s,onClose:i,onSave:c,onDelete:o,onRefresh:d}=e,[u,z]=(0,n.useState)(!1),[S,L]=(0,n.useState)({name:"",description:"",project:"",theme:"",assignee:"",status:"todo",lane:"signals",color:"blue",idleThresholdMinutes:120,notes:"",objectiveCode:"",actOne:"",actTwo:"",actThree:""}),O=(e,t)=>{L(s=>(0,a._)((0,l._)({},s),{[e]:t}))},[I,P]=(0,n.useState)(""),[B,F]=(0,n.useState)(!1),[q,H]=(0,n.useState)(null),[R,W]=(0,n.useState)(""),[U,V]=(0,n.useState)(null),[Q,G]=(0,n.useState)(null),[Y,X]=(0,n.useState)([]),[K,J]=(0,n.use
1State)([]),[$,ee]=(0,n.useState)(!1),[et,es]=(0,n.useState)(!1),[el,ea]=(0,n.useState)([]),[er,en]=(0,n.useState)(!1),[ei,ec]=(0,n.useState)(!1),[eo,ed]=(0,n.useState)(""),[ex,eu]=(0,n.useState)(!1),em=n.useMemo(()=>t?_.map(e=>{let{key:s,label:l}=e;return{label:l,value:t[s]}}).filter(e=>e.value&&e.value.trim().length>0):[],[t]);(0,n.useEffect)(()=>{s&&u&&eh()},[s,u]);let eh=async()=>{try{let e=await x.g.fetchAllTasks(),t=e.map(e=>e.project).filter(e=>e&&""!==e.trim()).filter((e,t,s)=>s.indexOf(e)===t).sort(),s=e.map(e=>e.theme).filter(e=>e&&""!==e.trim()).filter((e,t,s)=>s.indexOf(e)===t).sort();X(t),J(s)}catch(e){console.error("Error loading projects and themes:",e)}};(0,n.useEffect)(()=>{if(t){var e;L({name:t.name,description:t.description,project:t.project,theme:t.theme,assignee:t.assignee,status:t.status,lane:t.lane||"signals",color:t.color||"blue",idleThresholdMinutes:null!==(e=t.idleThresholdMinutes)&&void 0!==e?e:120,notes:t.notes||"",objectiveCode:t.objectiveCode||"",actOne:t.actOne||"",actTwo:t.actTwo||"",actThree:t.actThree||""}),ed(t.assignee)}z(!1)},[t,s]);let ep=n.useMemo(()=>{if(!S.project)return Y;let e=S.project.toLowerCase();return Y.filter(t=>t.toLowerCase().includes(e))},[Y,S.project]),eb=n.useMemo(()=>{if(!S.theme)return K;let e=S.theme.toLowerCase();return K.filter(t=>t.toLowerCase().includes(e))},[K,S.theme]),eg=async e=>{if(!e||e.length<2){ea([]);return}try{en(!0);let t=(0,C.collection)(T.db,"users"),s=(0,C.query)(t,(0,C.orderBy)("displayName")),l=(await (0,C.getDocs)(s)).docs.map(e=>({id:e.id,email:e.data().email||"",displayName:e.data().displayName||"",username:e.data().username||""})).filter(e=>e.email).filter(t=>{let s=e.toLowerCase();return t.displayName.toLowerCase().includes(s)||t.username.toLowerCase().includes(s)||t.email.toLowerCase().includes(s)}),a=[];for(let e of l.slice(0,10))try{await M.Q.isAdmin(e.email)&&a.push(e)}catch(t){console.warn("Error checking admin for ".concat(e.email,":"),t)}ea(a)}catch(e){console.error("Error searching admin users:",e),ea([])}finally{en(!1)}},ef=e=>{if(ed(e),L((0,a._)((0,l._)({},S),{assignee:e})),e.includes("@")){let t=e.split("@").pop()||"";t.length>=1?(eg(t),ec(!0)):(ea([]),ec(!1))}else e.length>=2?(eg(e),ec(!0)):(ea([]),ec(!1))},ej=async function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(t&&I.trim())try{await x.g.addSubtask(t.id,I.trim()),P(""),e||F(!1),d&&d()}catch(e){console.error("Error adding subtask:",e)}},ev=()=>{ej(!0)},ey=async e=>{if(t)try{await x.g.toggleSubtaskCompletion(t.id,e),d&&d()}catch(e){console.error("Error toggling subtask:",e)}},eN=async e=>{if(t&&R.trim())try{await x.g.updateSubtask(t.id,e,{title:R.trim()}),H(null),W(""),d&&d()}catch(e){console.error("Error editing subtask:",e)}},ew=async e=>{if(t&&confirm("Are you sure you want to delete this subtask?"))try{await x.g.deleteSubtask(t.id,e),d&&d()}catch(e){console.error("Error deleting subtask:",e)}},ek=(e,t)=>{H(e),W(t)},ez=()=>{H(null),W("")},eC=async()=>{if(t)try{eu(!0),await x.g.logWorkBeat(t.id),null==d||d()}catch(e){console.error("Error logging work beat:",e)}finally{eu(!1)}},eT=(e,t)=>{V(t),e.dataTransfer.effectAllowed="move"},eM=(e,t)=>{e.preventDefault(),e.dataTransfer.dropEffect="move";let s=e.currentTarget.getBoundingClientRect(),l=s.top+s.height/2;G({taskId:t,position:e.clientY<l?"above":"below"})},eS=e=>{let t=e.currentTarget.getBoundingClientRect();(e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom)&&G(null)},e_=async(e,s)=>{if(e.preventDefault(),!t||!U||!Q||U===s){V(null),G(null);return}try{let e=[...t.subtasks],l=e.findIndex(e=>e.id===U),a=e.findIndex(e=>e.id===s);if(-1===l||-1===a)return;let[r]=e.splice(l,1),n=l<a?a-1:a,i="above"===Q.position?n:n+1;e.splice(i,0,r),await x.g.reorderSubtasks(t.id,e),d&&d()}catch(e){console.error("Error reordering subtasks:",e)}finally{V(null),G(null)}},eZ=e=>new Intl.DateTimeFormat("en-US",{month:"long",day:"numeric",year:"numeric",hour:"2-digit",minute:"2-digit"}).format(e);return s&&t?(0,r.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 p-4",children:(0,r.jsxs)("div",{className:"bg-[#1a1e24] border border-zinc-700 rounded-xl w-full max-w-2xl max-h-[90vh] overflow-y-auto",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between p-6 border-b border-zinc-700",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3",children:[(0,r.jsx)("h2",{className:"text-xl font-semibold text-white",children:"Task Details"}),(0,r.jsx)("div",{className:"px-2 py-1 rounded-md text-xs font-medium border ".concat((e=>{switch(e){case"todo":return"bg-blue-500/20 text-blue-400 border-blue-500/30";case"in-progress":return"bg-yellow-500/20 text-yellow-400 border-yellow-500/30";case"done":return"bg-green-500/20 text-green-400 border-green-500/30";default:return"bg-zinc-500/20 text-zinc-400 border-zinc-500/30"}})(t.status)),children:"in-progress"===t.status?"In Progress":t.status.charAt(0).toUpperCase()+t.status.slice(1)})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[u?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("button",{onClick:()=>{t&&S.name.trim()&&(c((0,l._)({},t,S)),z(!1))},className:"px-3 py-2 bg-[#d7ff00] text-black font-medium rounded-lg hover:bg-[#c4e600] transition-colors",children:"Save Changes"}),(0,r.jsx)("button",{onClick:()=>z(!1),className:"px-3 py-2 bg-zinc-700 text-white rounded-lg hover:bg-zinc-600 transition-colors",children:"Cancel"})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("button",{onClick:()=>z(!0),className:"px-3 py-2 bg-blue-600 text-white rounded-lg hover:bg-blue-700 transition-colors flex items-center gap-2",children:[(0,r.jsx)(m.Z,{className:"w-4 h-4"}),"Edit"]}),(0,r.jsxs)("button",{onClick:()=>{t&&confirm("Are you sure you want to delete this task?")&&(o(t.id),i())},className:"px-3 py-2 bg-red-600 text-white rounded-lg hover:bg-red-700 transition-colors flex items-center gap-2",children:[(0,r.jsx)(h.Z,{className:"w-4 h-4"}),"Delete"]})]}),(0,r.jsx)("button",{onClick:i,className:"p-2 text-zinc-400 hover:text-white rounded-lg hover:bg-zinc-700 transition-colors",children:"✕"})]})]}),(0,r.jsx)("div",{className:"p-6 space-y-6",children:u?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"bg-[#262a30] rounded-lg p-4 space-y-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"text-sm font-medium text-zinc-400",children:"Lane"}),(0,r.jsx)("span",{className:"px-2 py-1 rounded-full border text-xs",children:Z[t.lane||"signals"].label})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"text-sm font-medium text-zinc-400",children:"Color"}),(0,r.jsx)("span",{className:"px-2 py-1 rounded-full border text-xs",children:A[t.color||"blue"].label})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"text-sm font-medium text-zinc-400",children:"Idle Threshold"}),(0,r.jsxs)("span",{className:"text-white",children:[t.idleThresholdMinutes,"m"]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("span",{className:"text-sm font-medium text-zinc-400",children:"Last Work Beat"}),(0,r.jsx)("span",{className:"text-white",children:t.lastWorkBeatAt?"".concat(t.getMinutesSinceWorkBeat(
1),"m ago"):"Not logged yet"})]}),(0,r.jsx)("button",{onClick:eC,disabled:ex,className:"mt-2 text-xs bg-sky-600 px-3 py-1.5 rounded-lg text-white hover:bg-sky-500 disabled:opacity-50",children:ex?"Logging…":"Log Work Beat"})]}),(0,r.jsxs)("div",{className:"space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-zinc-300 mb-2",children:"Task Name *"}),(0,r.jsx)("input",{type:"text",value:S.name,onChange:e=>L((0,a._)((0,l._)({},S),{name:e.target.value})),className:"w-full px-3 py-2 bg-[#262a30] border border-zinc-600 rounded-lg text-white placeholder-zinc-500 focus:outline-none focus:border-blue-500",placeholder:"Enter task name"})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-zinc-300 mb-2",children:"Description"}),(0,r.jsx)("textarea",{value:S.description,onChange:e=>L((0,a._)((0,l._)({},S),{description:e.target.value})),className:"w-full px-3 py-2 bg-[#262a30] border border-zinc-600 rounded-lg text-white placeholder-zinc-500 focus:outline-none focus:border-blue-500 resize-none",placeholder:"Enter task description",rows:4})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-zinc-300 mb-2",children:"Notes"}),(0,r.jsx)("textarea",{value:S.notes,onChange:e=>L((0,a._)((0,l._)({},S),{notes:e.target.value})),className:"w-full px-3 py-2 bg-[#262a30] border border-amber-500/40 rounded-lg text-white placeholder-zinc-500 focus:outline-none focus:border-amber-400 resize-none",placeholder:"Drop quick updates, blockers, or context for Tremaine...",rows:4}),(0,r.jsx)("p",{className:"text-xs text-zinc-500 mt-1",children:"Only visible to admins inside this board."})]}),(0,r.jsxs)("div",{className:"bg-[#15191f] border border-zinc-700 rounded-xl p-4 space-y-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("label",{className:"text-sm font-medium text-zinc-200",children:"Objective Code"}),(0,r.jsx)("span",{className:"text-[10px] uppercase tracking-widest text-zinc-500",children:"Three-Beat Template"})]}),(0,r.jsx)("input",{type:"text",value:S.objectiveCode,onChange:e=>L((0,a._)((0,l._)({},S),{objectiveCode:e.target.value.toUpperCase()})),className:"w-full px-3 py-2 bg-[#262a30] border border-zinc-600 rounded-lg text-white placeholder-zinc-500 focus:outline-none focus:border-blue-500",placeholder:"CR-02"}),(0,r.jsx)("div",{className:"grid grid-cols-1 gap-2",children:_.map(e=>(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-xs font-semibold text-zinc-400 mb-1",children:e.label}),(0,r.jsx)("textarea",{value:S[e.key],onChange:t=>O(e.key,t.target.value),className:"w-full px-3 py-2 bg-[#262a30] border border-zinc-600 rounded-lg text-white placeholder-zinc-500 focus:outline-none focus:border-blue-500 resize-none",placeholder:e.placeholder,rows:2})]},e.key))})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsxs)("label",{className:"block text-sm font-medium text-zinc-300 mb-2",children:["Project ",(0,r.jsx)("span",{className:"text-zinc-500 text-xs",children:"(Quarterly)"})]}),(0,r.jsx)("input",{type:"text",value:S.project,onChange:e=>{L((0,a._)((0,l._)({},S),{project:e.target.value})),ee(e.target.value.length>0&&ep.length>0)},onFocus:()=>S.project.length>0&&ep.length>0&&ee(!0),onBlur:()=>setTimeout(()=>ee(!1),150),className:"w-full px-3 py-2 bg-[#262a30] border border-zinc-600 rounded-lg text-white placeholder-zinc-500 focus:outline-none focus:border-blue-500",placeholder:"Q1 Goals"}),$&&ep.length>0&&(0,r.jsx)("div",{className:"absolute z-20 w-full mt-1 bg-[#262a30] border border-zinc-600 rounded-lg shadow-lg max-h-32 overflow-y-auto",children:ep.map(e=>(0,r.jsx)("button",{type:"button",onClick:()=>{L((0,a._)((0,l._)({},S),{project:e})),ee(!1)},className:"w-full text-left px-3 py-2 hover:bg-[#1a1e24] text-white text-sm border-b border-zinc-700 last:border-b-0",children:e},e))})]}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsxs)("label",{className:"block text-sm font-medium text-zinc-300 mb-2",children:["Theme ",(0,r.jsx)("span",{className:"text-zinc-500 text-xs",children:"(M
1onthly)"})]}),(0,r.jsx)("input",{type:"text",value:S.theme,onChange:e=>{L((0,a._)((0,l._)({},S),{theme:e.target.value})),es(e.target.value.length>0&&eb.length>0)},onFocus:()=>S.theme.length>0&&eb.length>0&&es(!0),onBlur:()=>setTimeout(()=>es(!1),150),className:"w-full px-3 py-2 bg-[#262a30] border border-zinc-600 rounded-lg text-white placeholder-zinc-500 focus:outline-none focus:border-blue-500",placeholder:"March Focus"}),et&&eb.length>0&&(0,r.jsx)("div",{className:"absolute z-20 w-full mt-1 bg-[#262a30] border border-zinc-600 rounded-lg shadow-lg max-h-32 overflow-y-auto",children:eb.map(e=>(0,r.jsx)("button",{type:"button",onClick:()=>{L((0,a._)((0,l._)({},S),{theme:e})),es(!1)},className:"w-full text-left px-3 py-2 hover:bg-[#1a1e24] text-white text-sm border-b border-zinc-700 last:border-b-0",children:e},e))})]})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsxs)("label",{className:"block text-sm font-medium text-zinc-300 mb-2",children:["Assignee ",(0,r.jsx)("span",{className:"text-zinc-500 text-xs",children:"(Type @ to search admin users)"})]}),(0,r.jsx)("input",{type:"text",value:eo,onChange:e=>ef(e.target.value),className:"w-full px-3 py-2 bg-[#262a30] border border-zinc-600 rounded-lg text-white placeholder-zinc-500 focus:outline-none focus:border-blue-500",placeholder:"Enter assignee name or type @ to search admin users"}),er&&(0,r.jsx)("div",{className:"absolute right-2 top-9",children:(0,r.jsx)("div",{className:"w-4 h-4 border-2 border-zinc-500 border-t-blue-500 rounded-full animate-spin"})}),ei&&el.length>0&&(0,r.jsx)("div",{className:"absolute z-10 w-full mt-1 bg-[#262a30] border border-zinc-600 rounded-lg shadow-lg max-h-40 overflow-y-auto",children:el.map(e=>(0,r.jsxs)("button",{type:"button",onClick:()=>{let t=e.displayName||e.username||e.email;L((0,a._)((0,l._)({},S),{assignee:t})),ed(t),ec(!1),ea([])},className:"w-full text-left px-3 py-2 hover:bg-[#1a1e24] text-white text-sm border-b border-zinc-700 last:border-b-0 flex items-center gap-2",children:[(0,r.jsx)("div",{className:"w-6 h-6 bg-blue-500 rounded-full flex items-center justify-center text-xs font-medium",children:(e.displayName||e.username||e.email).charAt(0).toUpperCase()}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"font-medium",children:e.displayName||e.username}),(0,r.jsx)("div",{className:"text-xs text-zinc-400",children:e.email})]})]},e.id))})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-zinc-300 mb-2",children:"Status"}),(0,r.jsxs)("select",{value:S.status,onChange:e=>L((0,a._)((0,l._)({},S),{status:e.target.value})),className:"w-full px-3 py-2 bg-[#262a30] border border-zinc-600 rounded-lg text-white focus:outline-none focus:border-blue-500",children:[(0,r.jsx)("option",{value:"todo",children:"Todo"}),(0,r.jsx)("option",{value:"in-progress",children:"In Progress"}),(0,r.jsx)("option",{value:"done",children:"Done"})]})]})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3 mt-4",children:[(0,r.jsxs)("label",{className:"block text-sm font-medium text-zinc-300",children:["Lane",(0,r.jsx)("select",{value:S.lane,onChange:e=>L((0,a._)((0,l._)({},S),{lane:e.target.value})),className:"mt-1 w-full px-3 py-2 bg-[#262a30] border border-zinc-600 rounded-lg text-white",children:E.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))})]}),(0,r.jsxs)("label",{className:"block text-sm font-medium text-zinc-300",children:["Color",(0,r.jsx)("select",{value:S.color,onChange:e=>L((0,a._)((0,l._)({},S),{color:e.target.value})),className:"mt-1 w-full px-3 py-2 bg-[#262a30] border border-zinc-600 rounded-lg text-white",children:D.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))})]}),(0,r.jsxs)("label",{className:"block text-sm font-medium text-zinc-300",children:["Idle Threshold (minutes)",(0,r.jsx)("input",{type:"number",min:30,value:S.idleThresholdMinutes,onChange:e=>L((0,a._)((0,l._)({},S),{idleThresholdMinutes:Number(e.target.value)||0})),className:"mt-1 w-full px-3 py-2 bg-[#262a30] border border-zinc-600 rounded-lg text-white"})]})]})]})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h3",{className:"text-lg font-medium text-white mb-2",children:t.name}),t.description&&(0,r.jsx)("p",{className:"text-zinc-300 leading-relaxed",children:t.description})]}),t.notes&&(0,r.jsxs)("div",{className:"bg-[#262a30] rounded-lg p-4 border border-zinc-700/60",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,r.jsx)("svg",{className:"w-4 h-4 text-amber-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:"2",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01"})}),(0,r.jsx)("span",{className:"text-sm font-medium text-zinc-400",children:"Notes"})]}),(0,r.jsx)("p",{className:"text-zinc-200 whitespace-pre-wrap text-sm leading-relaxed",children:t.notes})]}),(t.objectiveCode||em.length>0)&&(0,r.jsxs)("div",{className:"bg-[#262a30] rounded-lg p-4 border border-sky-700/50",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(g.Z,{className:"w-4 h-4 text-sky-300"}),(0,r.jsx)("span",{className:"text-sm font-medium text-zinc-300",children:"Three-Beat Objective"})]}),t.objectiveCode&&(0,r.jsx)("span",{className:"text-xs text-sky-300 uppercase tracking-widest",children:t.objectiveCode})]}),(0,r.jsx)("div",{className:"space-y-2",children:em.map(e=>(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-[11px] text-zinc-500 uppercase tracking-widest mb-1",children:e.label}),(0,r.jsx)("p",{className:"text-sm text-white leading-snug",children:e.value})]},e.label))})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.project&&(0,r.jsxs)("div",{className:"bg-[#262a30] rounded-lg p-4",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,r.jsx)(j.Z,{className:"w-4 h-4 text-blue-400"}),(0,r.jsx)("span",{className:"text-sm font-medium text-zinc-400",children:"Project"})]}),(0,r.jsx)("p",{className:"text-white",children:t.project}),(0,r.jsx)("p",{className:"text-xs text-zinc-500 mt-1",children:"Quarterly Goal"})]}),t.theme&&(0,r.jsxs)("div",{className:"bg-[#262a30] rounded-lg p-4",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,r.jsx)(b.Z,{className:"w-4 h-4 text-purple-400"}),(0,r.jsx)("span",{className:"text-sm font-medium text-zinc-400",children:"Theme"})]}),(0,r.jsx)("p",{className:"text-white",children:t.theme}),(0,r.jsx)("p",{className:"text-xs text-zinc-500 mt-1",children:"Monthly Focus"})]}),t.assignee&&(0,r.jsxs)("div",{className:"bg-[#262a30] rounded-lg p-4",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,r.jsx)(v.Z,{className:"w-4 h-4 text-green-400"}),(0,r.jsx)("span",{className:"text-sm font-medium text-zinc-400",children:"Assignee"})]}),(0,r.jsx)("p",{className:"text-white",children:t.assignee})]}),(0,r.jsxs)("div",{className:"bg-[#262a30] rounded-lg p-4",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,r.jsx)(y.Z,{className:"w-4 h-4 text-orange-400"}),(0,r.jsx)("span",{className:"text-sm font-medium text-zinc-400",children:"Created"})]}),(0,r.jsx)("p",{className:"text-white",children:eZ(t.createdAt)}),t.updatedAt&&t.updatedAt.getTime()!==t.createdAt.getTime()&&(0,r.jsxs)("p",{className:"text-xs text-zinc-500 mt-1",children:["Updated: ",eZ(t.updatedAt)]})]})]}),(0,r.jsxs)("div",{className:"bg-[#262a30] rounded-lg p-4",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)(f.Z,{className:"w-4 h-4 text-blue-400"}),(0,r.jsx)("span",{className:"text-sm font-medium text-zinc-400",children:"Subtasks"}),t.subtasks.length>0&&(0,r.jsxs)("span",{className:"text-xs text-zinc-500",children:[t.getSubtaskProgress().c
1ompleted,"/",t.getSubtaskProgress().total," completed"]})]}),!u&&(0,r.jsxs)("button",{onClick:()=>F(!0),className:"text-xs bg-blue-600 text-white px-2 py-1 rounded hover:bg-blue-700 transition-colors flex items-center gap-1",children:[(0,r.jsx)(N.Z,{className:"w-3 h-3"}),"Add"]})]}),(0,r.jsxs)("div",{className:"space-y-2",children:[t.subtasks.map(e=>(0,r.jsxs)("div",{draggable:!q&&q!==e.id,onDragStart:t=>eT(t,e.id),onDragOver:t=>eM(t,e.id),onDragLeave:e=>eS(e),onDrop:t=>e_(t,e.id),className:"flex items-center gap-3 p-2 bg-[#1a1e24] rounded-lg group transition-all relative ".concat(q===e.id?"cursor-default":"cursor-move"," ").concat(U===e.id?"opacity-50 scale-95":"border border-transparent"),children:[q!==e.id?(0,r.jsx)("div",{className:"flex-shrink-0 cursor-grab active:cursor-grabbing p-1 hover:bg-zinc-700/50 rounded transition-colors",children:(0,r.jsx)(p,{className:"w-3 h-3 text-zinc-500 hover:text-zinc-400"})}):(0,r.jsx)("div",{className:"flex-shrink-0 w-5 h-5"}),(0,r.jsx)("button",{onClick:()=>ey(e.id),className:"flex-shrink-0",children:e.completed?(0,r.jsx)(f.Z,{className:"w-4 h-4 text-green-400"}):(0,r.jsx)(w.Z,{className:"w-4 h-4 text-zinc-500 hover:text-zinc-400"})}),q===e.id?(0,r.jsxs)("div",{className:"flex-1 flex items-center gap-2",children:[(0,r.jsx)("input",{type:"text",value:R,onChange:e=>W(e.target.value),onKeyDown:t=>{"Enter"===t.key?eN(e.id):"Escape"===t.key&&ez()},className:"flex-1 px-2 py-1 bg-[#262a30] border border-zinc-600 rounded text-white text-sm focus:outline-none focus:border-blue-500",autoFocus:!0}),(0,r.jsx)("button",{onClick:()=>eN(e.id),className:"p-1 text-green-400 hover:text-green-300",children:(0,r.jsx)(f.Z,{className:"w-3 h-3"})}),(0,r.jsx)("button",{onClick:ez,className:"p-1 text-zinc-400 hover:text-zinc-300",children:(0,r.jsx)(k.Z,{className:"w-3 h-3"})})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"flex-1 text-sm ".concat(e.completed?"text-zinc-500 line-through":"text-white"),children:e.title}),(0,r.jsxs)("div",{className:"flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[(0,r.jsx)("button",{onClick:()=>ek(e.id,e.title),className:"p-1 text-zinc-400 hover:text-blue-400",children:(0,r.jsx)(m.Z,{className:"w-3 h-3"})}),(0,r.jsx)("button",{onClick:()=>ew(e.id),className:"p-1 text-zinc-400 hover:text-red-400",children:(0,r.jsx)(h.Z,{className:"w-3 h-3"})})]})]}),Q&&Q.taskId===e.id&&(0,r.jsx)("div",{className:"absolute left-0 right-0 h-0.5 bg-blue-500 z-10 ".concat("above"===Q.position?"-top-px":"-bottom-px")})]},e.id)),B&&(0,r.jsxs)("div",{className:"flex items-center gap-2 p-2 bg-[#1a1e24] rounded-lg border border-blue-500/30",children:[(0,r.jsx)(w.Z,{className:"w-4 h-4 text-zinc-500 flex-shrink-0"}),(0,r.jsx)("input",{type:"text",value:I,onChange:e=>P(e.target.value),onKeyDown:e=>{"Enter"===e.key?ev():"Escape"===e.key&&(F(!1),P(""))},placeholder:"Enter subtask title...",className:"flex-1 px-2 py-1 bg-transparent border-none text-white text-sm placeholder-zinc-500 focus:outline-none",autoFocus:!0}),(0,r.jsx)("button",{onClick:()=>ej(!1),className:"p-1 text-green-400 hover:text-green-300",children:(0,r.jsx)(f.Z,{className:"w-3 h-3"})}),(0,r.jsx)("button",{onClick:()=>{F(!1),P("")},className:"p-1 text-zinc-400 hover:text-zinc-300",children:(0,r.jsx)(k.Z,{className:"w-3 h-3"})})]}),0===t.subtasks.length&&!B&&(0,r.jsx)("div",{className:"text-center py-4 text-zinc-500 text-sm",children:'No subtasks yet. Click "Add" to create one.'})]}),t.subtasks.length>0&&(0,r.jsxs)("div",{className:"mt-4",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between text-xs text-zinc-500 mb-1",children:[(0,r.jsx)("span",{children:"Progress"}),(0,r.jsxs)("span",{children:[t.getSubtaskProgress().percentage,"%"]})]}),(0,r.jsx)("div",{className:"w-full bg-zinc-700 rounded-full h-2",children:(0,r.jsx)("div",{className:"bg-blue-500 h-2 rounded-full transition-all duration-300",style:{width:"".concat(t.getSubtaskProgress().percentage,"%")}})})]})]})]})})]})}):null},P=e=>{let{task:t,isOpen:s,onClose:i,onSave:c,mode:o}
1=e,[d,u]=(0,n.useState)({name:"",description:"",project:"",theme:"",assignee:"",status:"todo",lane:"signals",color:"blue",idleThresholdMinutes:120,notes:"",objectiveCode:"",actOne:"",actTwo:"",actThree:""}),[m,h]=(0,n.useState)([]),[p,b]=(0,n.useState)(!1),[g,f]=(0,n.useState)(!1),[j,v]=(0,n.useState)(""),[y,N]=(0,n.useState)([]),[w,k]=(0,n.useState)([]),[z,S]=(0,n.useState)(!1),[Z,A]=(0,n.useState)(!1),[L,O]=(0,n.useState)(!1);(0,n.useEffect)(()=>{s&&P()},[s]);let I=(e,t)=>{u(s=>(0,a._)((0,l._)({},s),{[e]:t}))},P=async()=>{try{O(!0);let e=await x.g.fetchAllTasks(),t=e.map(e=>e.project).filter(e=>e&&""!==e.trim()).filter((e,t,s)=>s.indexOf(e)===t).sort(),s=e.map(e=>e.theme).filter(e=>e&&""!==e.trim()).filter((e,t,s)=>s.indexOf(e)===t).sort();N(t),k(s),console.log("[ProjectManagement] Loaded ".concat(t.length," projects and ").concat(s.length," themes"))}catch(e){console.error("[ProjectManagement] Error loading projects and themes:",e),N([]),k([])}finally{O(!1)}};(0,n.useEffect)(()=>{if(t){var e;u({name:t.name,description:t.description,project:t.project,theme:t.theme,assignee:t.assignee,status:t.status,lane:t.lane||"signals",color:t.color||"blue",idleThresholdMinutes:null!==(e=t.idleThresholdMinutes)&&void 0!==e?e:120,notes:t.notes||"",objectiveCode:t.objectiveCode||"",actOne:t.actOne||"",actTwo:t.actTwo||"",actThree:t.actThree||""}),v(t.assignee)}else u({name:"",description:"",project:"",theme:"",assignee:"",status:"todo",lane:"signals",color:"blue",idleThresholdMinutes:120,notes:"",objectiveCode:"",actOne:"",actTwo:"",actThree:""}),v("")},[t,s]);let B=n.useMemo(()=>{if(!d.project)return y;let e=d.project.toLowerCase();return y.filter(t=>t.toLowerCase().includes(e))},[y,d.project]),F=n.useMemo(()=>{if(!d.theme)return w;let e=d.theme.toLowerCase();return w.filter(t=>t.toLowerCase().includes(e))},[w,d.theme]),q=e=>{u((0,a._)((0,l._)({},d),{project:e})),S(e.length>0&&B.length>0)},H=e=>{u((0,a._)((0,l._)({},d),{theme:e})),A(e.length>0&&F.length>0)},R=e=>{u((0,a._)((0,l._)({},d),{project:e})),S(!1)},W=e=>{u((0,a._)((0,l._)({},d),{theme:e})),A(!1)},U=async e=>{if(!e||e.length<2){h([]);return}try{b(!0),console.log('[ProjectManagement] Searching admin users with query: "'.concat(e,'"'));let t=(0,C.collection)(T.db,"users"),s=(0,C.query)(t,(0,C.orderBy)("displayName")),l=(await (0,C.getDocs)(s)).docs.map(e=>({id:e.id,email:e.data().email||"",displayName:e.data().displayName||"",username:e.data().username||""})).filter(e=>e.email).filter(t=>{let s=e.toLowerCase();return t.displayName.toLowerCase().includes(s)||t.username.toLowerCase().includes(s)||t.email.toLowerCase().includes(s)});console.log("[ProjectManagement] Found ".concat(l.length," matching users, checking admin status..."));let a=[];for(let e of l.slice(0,10))try{await M.Q.isAdmin(e.email)&&a.push(e)}catch(t){console.warn("[ProjectManagement] Error checking admin for ".concat(e.email,":"),t)}console.log("[ProjectManagement] Found ".concat(a.length,' admin users matching "').concat(e,'"')),h(a)}catch(e){console.error("[ProjectManagement] Error searching admin users:",e),h([])}finally{b(!1)}},V=e=>{let t=e.displayName||e.username||e.email;u((0,a._)((0,l._)({},d),{assignee:t})),v(t),f(!1),h([])},Q=e=>{if(v(e),u((0,a._)((0,l._)({},d),{assignee:e})),e.includes("@")){let t=e.split("@").pop()||"";t.length>=1?(U(t),f(!0)):(h([]),f(!1))}else e.length>=2?(U(e),f(!0)):(h([]),f(!1))};return s?(0,r.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 p-4",children:(0,r.jsxs)("div",{className:"bg-[#1a1e24] border border-zinc-700 rounded-xl p-6 w-full max-w-md",children:[(0,r.jsx)("h3",{className:"text-xl font-semibold text-white mb-4",children:"create"===o?"Create New Task":"Edit Task"}),(0,r.jsxs)("form",{onSubmit:e=>{if(e.preventDefault(),!d.name.trim())return;let s=(0,a._)((0,l._)({},d),{objectiveCode:d.objectiveCode.toUpperCase()});"edit"===o&&t?c((0,l._)({},t,s)):c(s),i()},className:"space-y-4",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-zinc-300 mb-1",children:"Task Name *"}),(0,r.jsx)("input",{type:"text",value:d.name,onChange:e=>u((0,a._)((0,l._)({},d),{name:e.target.value})),className:"w-full px-3 py-2 bg-[#262a30] border border-zinc-600 rounded-lg text-white placeholder-zinc-500 focus:outline-none focus:border-blue-500",placeholder:"Enter task name",required:!0})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-zinc-300 mb-1",children:"Description"}),(0,r.jsx)("textarea",{value:d.description,onChange:e=>u((0,a._)((0,l._)({},d),{description:e.target.value})),className:"w-full px-3 py-2 bg-[#262a30] border border-zinc-600 rounded-lg text-white placeholder-zinc-500 focus:outline-none focus:border-blue-500 resize-none",placeholder:"Enter task description",rows:3})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-zinc-300 mb-1",children:"Notes"}),(0,r.jsx)("textarea",{value:d.notes,onChange:e=>u((0,a._)((0,l._)({},d),{notes:e.target.value})),className:"w-full px-3 py-2 bg-[#262a30] border border-amber-500/40 rounded-lg text-white placeholder-zinc-500 focus:outline-none focus:border-amber-400 resize-none",placeholder:"Leave context, investor updates, blockers, etc.",rows:3})]}),(0,r.jsxs)("div",{className:"bg-[#15191f] border border-zinc-700 rounded-xl p-4 space-y-3",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsx)("label",{className:"text-sm font-medium text-zinc-200",children:"Objective Code"}),(0,r.jsx)("span",{className:"text-[10px] uppercase tracking-widest text-zinc-500",children:"Three-Beat Template"})]}),(0,r.jsx)("input",{type:"text",value:d.objectiveCode,onChange:e=>u((0,a._)((0,l._)({},d),{objectiveCode:e.target.value.toUpperCase()})),className:"w-full px-3 py-2 bg-[#262a30] border border-zinc-600 rounded-lg text-white placeholder-zinc-500 focus:outline-none focus:border-blue-500",placeholder:"CR-02"}),(0,r.jsx)("div",{className:"grid grid-cols-1 gap-2",children:_.map(e=>(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-xs font-semibold text-zinc-400 mb-1",children:e.label}),(0,r.jsx)("textarea",{value:d[e.key],onChange:t=>
1I(e.key,t.target.value),className:"w-full px-3 py-2 bg-[#262a30] border border-zinc-600 rounded-lg text-white placeholder-zinc-500 focus:outline-none focus:border-blue-500 resize-none",placeholder:e.placeholder,rows:2})]},e.key))})]}),(0,r.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsxs)("label",{className:"block text-sm font-medium text-zinc-300 mb-1",children:["Project ",(0,r.jsx)("span",{className:"text-zinc-500 text-xs",children:"(Quarterly)"})]}),(0,r.jsx)("input",{type:"text",value:d.project,onChange:e=>q(e.target.value),onFocus:()=>d.project.length>0&&B.length>0&&S(!0),onBlur:()=>setTimeout(()=>S(!1),150),className:"w-full px-3 py-2 bg-[#262a30] border border-zinc-600 rounded-lg text-white placeholder-zinc-500 focus:outline-none focus:border-blue-500",placeholder:"Q1 Goals"}),z&&B.length>0&&(0,r.jsx)("div",{className:"absolute z-20 w-full mt-1 bg-[#262a30] border border-zinc-600 rounded-lg shadow-lg max-h-32 overflow-y-auto",children:B.map(e=>(0,r.jsx)("button",{type:"button",onClick:()=>R(e),className:"w-full text-left px-3 py-2 hover:bg-[#1a1e24] text-white text-sm border-b border-zinc-700 last:border-b-0",children:e},e))})]}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsxs)("label",{className:"block text-sm font-medium text-zinc-300 mb-1",children:["Theme ",(0,r.jsx)("span",{className:"text-zinc-500 text-xs",children:"(Monthly)"})]}),(0,r.jsx)("input",{type:"text",value:d.theme,onChange:e=>H(e.target.value),onFocus:()=>d.theme.length>0&&F.length>0&&A(!0),onBlur:()=>setTimeout(()=>A(!1),150),className:"w-full px-3 py-2 bg-[#262a30] border border-zinc-600 rounded-lg text-white placeholder-zinc-500 focus:outline-none focus:border-blue-500",placeholder:"March Focus"}),Z&&F.length>0&&(0,r.jsx)("div",{className:"absolute z-20 w-full mt-1 bg-[#262a30] border border-zinc-600 rounded-lg shadow-lg max-h-32 overflow-y-auto",children:F.map(e=>(0,r.jsx)("button",{type:"button",onClick:()=>W(e),className:"w-full text-left px-3 py-2 hover:bg-[#1a1e24] text-white text-sm border-b border-zinc-700 last:border-b-0",children:e},e))})]})]}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsxs)("label",{className:"block text-sm font-medium text-zinc-300 mb-1",children:["Assignee ",(0,r.jsx)("span",{className:"text-zinc-500 text-xs",children:"(Type @ to search admin users)"})]}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("input",{type:"text",value:j,onChange:e=>Q(e.target.value),className:"w-full px-3 py-2 bg-[#262a30] border border-zinc-600 rounded-lg text-white placeholder-zinc-500 focus:outline-none focus:border-blue-500",placeholder:"Enter assignee name or type @ to search admin users"}),p&&(0,r.jsx)("div",{className:"absolute right-2 top-1/2 transform -translate-y-1/2",children:(0,r.jsx)("div",{className:"w-4 h-4 border-2 border-zinc-500 border-t-blue-500 rounded-full animate-spin"})})]}),g&&m.length>0&&(0,r.jsx)("div",{className:"absolute z-10 w-full mt-1 bg-[#262a30] border border-zinc-600 rounded-lg shadow-lg max-h-40 overflow-y-auto",children:m.map(e=>(0,r.jsxs)("button",{type:"button",onClick:()=>V(e),className:"w-full text-left px-3 py-2 hover:bg-[#1a1e24] text-white text-sm border-b border-zinc-700 last:border-b-0 flex items-center gap-2",children:[(0,r.jsx)("div",{className:"w-6 h-6 bg-blue-500 rounded-full flex items-center justify-center text-xs font-medium",children:(e.displayName||e.username||e.email).charAt(0).toUpperCase()}),(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"font-medium",children:e.displayName||e.username}),(0,r.jsx)("div",{className:"text-xs text-zinc-400",children:e.email})]})]},e.id))}),g&&0===m.length&&!p&&j.includes("@")&&(0,r.jsx)("div",{className:"absolute z-10 w-full mt-1 bg-[#262a30] border border-zinc-600 rounded-lg shadow-lg p-3",children:(0,r.jsx)("div",{className:"text-zinc-400 text-sm",children:"No admin users found. Try a different search term."})})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("label",{className:"block text-sm font-medium text-zinc-300 mb-1",children:"Status"}),(0,r.jsxs)("select",{value:d.status,onChange:e=>u((0,a._)((0,l._)({},d),{status:e.target.value})),className:"w-full px-3 py-2 bg-[#262a30] border border-zinc-600 rounded-lg text-white focus:outline-none focus:border-blue-500",children:[(0,r.jsx)("option",{value:"todo",children:"Todo"}),(0,r.jsx)("option",{value:"in-progress",children:"In Progress"}),(0,r.jsx)("option",{value:"done",children:"Done"})]})]}),(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3",children:[(0,r.jsxs)("label",{className:"block text-sm font-medium text-zinc-300",children:["Lane",(0,r.jsx)("select",{value:d.lane,onChange:e=>u((0,a._)((0,l._)({},d),{lane:e.target.value})),className:"mt-1 w-full px-3 py-2 bg-[#262a30] border border-zinc-600 rounded-lg text-white",children:E.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))})]}),(0,r.jsxs)("label",{className:"block text-sm font-medium text-zinc-300",children:["Color",(0,r.jsx)("select",{value:d.color,onChange:e=>u((0,a._)((0,l._)({},d),{color:e.target.value})),className:"mt-1 w-full px-3 py-2 bg-[#262a30] border border-zinc-600 rounded-lg text-white",children:D.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))})]}),(0,r.jsxs)("label",{className:"block text-sm font-medium text-zinc-300",children:["Idle Threshold (minutes)",(0,r.jsx)("input",{type:"number",min:30,value:d.idleThresholdMinutes,onChange:e=>u((0,a._)((0,l._)({},d),{idleThresholdMinutes:Number(e.target.value)||0})),className:"mt-1 w-full px-3 py-2 bg-[#262a30] border border-zinc-600 rounded-lg text-white"})]})]}),(0,r.jsxs)("div",{className:"flex gap-3 pt-4",children:[(0,r.jsx)("button",{type:"submit",className:"flex-1 bg-[#d7ff00] text-black font-medium py-2 px-4 roun
1ded-lg hover:bg-[#c4e600] transition-colors",children:"create"===o?"Create Task":"Save Changes"}),(0,r.jsx)("button",{type:"button",onClick:i,className:"flex-1 bg-zinc-700 text-white font-medium py-2 px-4 rounded-lg hover:bg-zinc-600 transition-colors",children:"Cancel"})]})]})]})}):null},B=e=>{let{lane:t,tasks:s,onTaskEdit:l,onTaskDelete:a,onTaskClick:n,onDragStart:i,onDrop:c,onDragOver:o}=e,d=Z[t],x={todo:[],"in-progress":[],done:[]};return s.forEach(e=>{x[(0,u.I9)(e.status)].push(e)}),(0,r.jsxs)("div",{className:"bg-[#101418] border rounded-2xl p-5 flex flex-col gap-4 ".concat(d.border),children:[(0,r.jsxs)("div",{className:"flex items-start justify-between",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-xs uppercase tracking-[0.3em] ".concat(d.text),children:d.subtitle}),(0,r.jsx)("h3",{className:"text-2xl font-semibold text-white",children:d.label}),(0,r.jsx)("p",{className:"text-[11px] text-zinc-500 mt-1",children:d.idleHint})]}),(0,r.jsxs)("div",{className:"text-right",children:[(0,r.jsx)("p",{className:"text-xs ".concat(d.accent),children:"Default Idle"}),(0,r.jsxs)("p",{className:"text-lg font-semibold text-white",children:[d.defaultIdle,"m"]})]})]}),(0,r.jsx)("div",{className:"space-y-4",children:S.map(e=>{var s,d,u;return(0,r.jsxs)("div",{className:"bg-[#0c0f13] border border-dashed border-zinc-700 rounded-xl p-4",onDrop:s=>c(s,e.value,t),onDragOver:o,children:[(0,r.jsxs)("div",{className:"flex items-center justify-between",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("p",{className:"text-sm font-semibold text-zinc-200",children:e.label}),(0,r.jsx)("p",{className:"text-[11px] text-zinc-500",children:e.helper})]}),(0,r.jsx)("span",{className:"bg-zinc-800 text-zinc-400 text-xs px-2 py-1 rounded-full",children:(null===(s=x[e.value])||void 0===s?void 0:s.length)||0})]}),(0,r.jsxs)("div",{className:"space-y-3 mt-3 min-h-[90px]",children:[null===(d=x[e.value])||void 0===d?void 0:d.map(e=>(0,r.jsx)(O,{task:e,onEdit:l,onDelete:a,onDragStart:i,onClick:n},e.id)),(null===(u=x[e.value])||void 0===u?void 0:u.length)===0&&(0,r.jsxs)("div",{className:"text-[11px] text-zinc-500 border border-dashed border-zinc-700 rounded-lg p-3 text-center",children:["Drop ",e.label.split("—")[0].trim()," cards here"]})]})]},"".concat(t,"-").concat(e.value))})})]})};var F=()=>{let e=(0,o.useRouter)(),[t,s]=(0,n.useState)([]),[l,a]=(0,n.useState)(!0),[i,u]=(0,n.use
1State)(!1),[m,h]=(0,n.useState)("create"),[p,b]=(0,n.useState)(null),[g,f]=(0,n.useState)(null),[j,v]=(0,n.useState)(!1),y=(0,n.useRef)(null),[w,k]=(0,n.useState)("all"),[C,T]=(0,n.useState)("all"),[M,S]=(0,n.useState)("all"),_=(0,n.useCallback)(async()=>{try{a(!0);let e=await x.g.fetchAllTasks();s(e)}catch(e){console.error("Error fetching tasks:",e)}finally{a(!1)}},[]),Z=(0,n.useCallback)(async()=>{try{let e=await x.g.fetchAllTasks();if(s(e),p&&j){let t=e.find(e=>e.id===p.id);t&&b(t)}}catch(e){console.error("Error refreshing tasks:",e)}},[p,j]);(0,n.useEffect)(()=>{_()},[_]),(0,n.useEffect)(()=>{if(!e.isReady||0===t.length)return;let s=e.query.taskId,l=Array.isArray(s)?s[0]:s;if(!l||y.current===l)return;let a=t.find(e=>e.id===l||e.objectiveCode===l);a&&(y.current=l,b(a),h("edit"),v(!0))},[e.isReady,e.query.taskId,t]);let A=n.useMemo(()=>t.map(e=>e.project).filter(e=>e&&""!==e.trim()).filter((e,t,s)=>s.indexOf(e)===t).sort(),[t]),E=n.useMemo(()=>t.map(e=>e.theme).filter(e=>e&&""!==e.trim()).filter((e,t,s)=>s.indexOf(e)===t).sort(),[t]),D=n.useMemo(()=>t.map(e=>e.assignee).filter(e=>e&&""!==e.trim()).filter((e,t,s)=>s.indexOf(e)===t).sort(),[t]),O=n.useMemo(()=>t.filter(e=>{let t="all"===w||e.project===w,s="all"===C||e.theme===C,l="all"===M||e.assignee===M;return t&&s&&l}),[t,w,C,M]),F=n.useMemo(()=>({signals:O.filter(e=>"signals"===(e.lane||"signals")),meanings:O.filter(e=>"meanings"===e.lane)}),[O]),q=e=>{b(e),h("edit"),u(!0)},H=async e=>{if(confirm("Are you sure you want to delete this task?"))try{await x.g.deleteTask(e),await _()}catch(e){console.error("Error deleting task:",e)}},R=async e=>{try{let s=e.id||(null==p?void 0:p.id);if(s)await x.g.updateTask(s,{name:e.name,description:e.description,project:e.project,theme:e.theme,assignee:e.assignee,status:e.status,lane:e.lane,color:e.color,idleThresholdMinutes:e.idleThresholdMinutes,notes:e.notes,objectiveCode:e.objectiveCode,actOne:e.actOne,actTwo:e.actTwo,actThree:e.actThree});else{var t;await x.g.createTask({name:e.name,description:e.description,project:e.project,theme:e.theme,assignee:e.assignee,status:e.status,lane:e.lane||"signals",color:e.color||"blue",idleThresholdMinutes:null!==(t=e.idleThresholdMinutes)&&void 0!==t?t:120,notes:e.notes||"",objectiveCode:e.objectiveCode||"",actOne:e.actOne||"",actTwo:e.actTwo||"",actThree:e.actThree||"",subtasks:[]})}await _()}catch(e){console.error("Error saving task:",e)}},W=(e,t)=>{f(t)},U=e=>{e.preventDefault()},V=async(e,t,s)=>{if(e.preventDefault(),!g||g.status===t&&g.lane===s){f(null);return}try{await x.g.updateTask(g.id,{status:t,lane:s}),await _()}catch(e){console.error("Error updating task status:",e)}finally{f(null)}},Q=e=>{b(e),h("edit"),v(!0)};return(0,r.jsxs)(d.Z,{children:[(0,r.jsx)(c(),{children:(0,r.jsx)("title",{children:"Project Management - Pulse Admin"})}),(0,r.jsx)("div",{className:"min-h-screen bg-[#111417] text-white py-8 px-4",children:(0,r.jsxs)("div",{className:"max-w-7xl mx-auto",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("h1",{className:"text-3xl font-bold text-white mb-2",children:"Project Management"}),(0,r.jsx)("p",{className:"text-zinc-400",children:"Kanban board for tracking development tasks and project progress"})]}),(0,r.jsxs)("button",{onClick:()=>{b(null),h("create"),u(!0)},className:"bg-[#d7ff00] text-black font-medium px-4 py-2 rounded-lg hover:bg-[#c4e600] transition-colors flex items-center gap-2",children:[(0,r.jsx)(N.Z,{className:"w-4 h-4"}),"Add Task"]})]}),(0,r.jsx)("div",{className:"bg-[#1a1e24] border border-zinc-700 rounded-xl p-4 mb-6",children:(0,r.jsxs)("div",{className:"flex items-center gap-4",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 text-zinc-400",children:[(0,r.jsx)(z.Z,{className:"w-4 h-4"}),(0,r.jsx)("span",{className:"text-sm font-medium",children:"Filters:"})]}),(0,r.jsxs)("div",{className:"flex items-center gap-4",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("label",{className:"text-sm text-zinc-400",children:"Project:"}),(0,r.jsxs)("select",{value:w,onChange:e=>k(e.target.value),className:"bg-[#262a30] border border-zinc-600 rounded-lg px-3 py-1 text-white text-sm focus:outline-none focus:border-blue-500 min-w-[140px]",children:[(0,r.jsx)("option",{value:"all",children:"All Projects"}),A.map(e=>(0,r.jsx)("option",{value:e,children:e},e))]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("label",{className:"text-sm text-zinc-400",children:"Theme:"}),(0,r.jsxs)("select",{value:C,onChange:e=>T(e.target.value),className:"bg-[#262a30] border border-zinc-600 rounded-lg px-3 py-1 text-white text-sm focus:outline-none focus:border-blue-500 min-w-[140px]",children:[(0,r.jsx)("option",{value:"all",children:"All Themes"}),E.map(e=>(0,r.jsx)("option",{value:e,children:e},e))]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("label",{className:"text-sm text-zinc-400",children:"Assignee:"}),(0,r.jsxs)("select",{value:M,onChange:e=>S(e.target.value),className:"bg-[#262a30] border border-zinc-600 rounded-lg px-3 py-1 text-white text-sm focus:outline-none focus:border-blue-500 min-w-[140px]",children:[(0,r.jsx)("option",{value:"all",children:"All Assignees"}),D.map(e=>(0,r.jsx)("option",{value:e,children:e},e))]})]})]}),("all"!==w||"all"!==C||"all"!==M)&&(0,r.jsxs)("div",{className:"flex items-center gap-2 ml-auto",children:[(0,r.jsxs)("span",{className:"text-xs text-zinc-500",children:["Showing ",O.length," of ",t.length," tasks"]}),(0,r.jsx)("button",{onClick:()=>{k("all"),T("all"),S("all")},className:"text-xs text-blue-400 hover:text-blue-300 underline",children:"Clear filters"})]})]})}),l?(0,r.jsx)("div",{className:"flex items-center justify-center py-20",children:(0,r.jsx)("div",{className:"text-zinc-400",children:"Loading tasks..."})}):(0,r.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:L.map(e=>(0,r.jsx)(B,{lane:e,tasks:F[e],onTaskEdit:q,onTaskDelete:H,onTaskClick:Q,onDragStart:W,onDrop:V,onDragOver:U},e))}),(0,r.jsx)(P,{task:p,isOpen:i,onClose:()=>u(!1),onSave:R,mode:m}),(0,r.jsx)(I,{task:p,isOpen:j,onClose:()=>v(!1),onSave:R,onDelete:H,onRefresh:Z})]})})]})}}},function(e){e.O(0,[31095,95196,39866,21019,92888,49774,40179],function(){return e(e.s=78941)}),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.