PageSourceSearch

https://eisenhowertodoist.netlify.app/assets/DailyReviewDialog-cTmWj_Jx.js

js eisenhowertodoist.netlify.app collected 2026-10-03 10:41:38 UTC 22,590 bytes, 1 lines download raw bytes

1import{L as ot,c as d,N as rt,j as e,a2 as nt,a5 as it,a6 as lt,aq as je,aI as ke,bf as dt,K as F}from"./vendor-1kUQ7zn2.js";import{d as ct}from"./vendor-supabase-Dh2gyaRa.js";import{aD as xt,p as mt,aE as U,g as ut,c as l,D as pt,aF as ht,aG as ft,h as bt,i as gt,j as vt,aH as yt,k as Ne,aI as wt,aJ as jt,aK as Se,w as kt,aL as Nt,aM as _e,aN as Ce,aO as St,s as _t}from"./index--kdl1ae9.js";import{P as Ae}from"./ParentHint-C6NcJBXf.js";import{u as Ct,A as Te,a as T}from"./vendor-motion-BX-jsy7E.js";import{a as De,D as B,g as Tt,j as $e,h as Dt}from"./vendor-date-en1IyhsK.js";const Mt=()=>{const o=ot();return{updateTaskLabels:(x,p)=>{o.setQueryData(["tasks"],h=>h&&h.map(f=>f.id===x?{...f,labels:p}:f))},batchUpdateTaskLabels:(x,p)=>{o.setQueryData(["tasks"],h=>h&&h.map(f=>x.includes(f.id)?{...f,labels:p}:f))}}},Pe=[{token:"do",label:"Do First",color:"#ef4444"},{token:"schedule",label:"Schedule",color:"#3b82f6"},{token:"delegate",label:"Delegate",color:"#fb923c"},{token:"backlog",label:"Backlog",color:"#8a8580"}],Me={4:"#ef4444",3:"#f59e0b",2:"#3b82f6"},C=3,se=8,Ee=12,Oe=["triage","pick","summary"],re=[.22,1,.36,1],Et=620,Ot=200,Rt=[36,20,7],It=["var(--dr-sun-dawn)","#fcd34d","#fbbf24"],Lt=["none","0 0 16px 2px rgba(251,191,36,.25)","0 0 24px 6px rgba(251,191,36,.45)"],At=["var(--dr-glow-1)","var(--dr-glow-2)","var(--dr-glow-3)"],j="focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-amber-400 focus-visible:ring-offset-2 focus-visible:ring-offset-[color:var(--dr-surface)]",Re="bg-[color:var(--dr-primary)] text-[color:var(--dr-on-primary)] shadow-[0_1px_2px_rgba(0,0,0,.14)]",Ie="bg-amber-400 text-[#1d1b18] shadow-[inset_0_1px_0_rgba(255,255,255,.45),0_8px_20px_-8px_rgba(217,119,6,.6)]",ae=(o,c)=>`${o} ${c}${o===1?"":"s"}`,$t=o=>{const c=(o.labels??[]).map(n=>n.toLowerCase());return Pe.find(n=>c.includes(n.token))},Pt=(o,c)=>{if(!o)return"";const n=$e(c,o);return n<=1?"Since yesterday":n<7?`Since ${B(o,"EEEE")}`:`Since ${B(o,"MMM d")}`},Le=(o,c)=>{const n=$t(o),x=U(o.due);let p="";if(x){const h=$e(x,c);if(h===0){const f=Nt(o.due);p=f?`Today ${f}`:"Today"}else h===1?p=_e("Tomorrow",x,Ce(o.due)):p=_e(B(x,"MMM d"),x,Ce(o.due))}return{quadrant:n,text:[n?.label,p].filter(Boolean).join(" · ")}},Fe=({priority:o})=>o&&Me[o]?e.jsx("span",{className:"h-1.5 w-1.5 shrink-0 rounded-full",style:{backgroundColor:Me[o]},"aria-hidden":!0}):null,Ft=300,Ht=({open:o,onOpenChange:c,tasks:n,apiKey:x,onTaskUpdate:p,completeReview:h,skipReview:f,initialStep:G="triage",initialSelectedIds:k})=>{const[i,N]=d.useState(G),[Ue,ne]=d.useState(1),[z,ie]=d.useState([]),[W,H]=d.useState({}),[Be,Y]=d.useState(new Set),[v,K]=d.useState([]),[D,le]=d.useState(!1),X=d.useRef([]),S=Ct()??!1,{handleCompleteTask:Ge}=xt({apiKey:x,onTaskUpdate:p,isFocusMode:!1}),{updateTaskLabels:We}=Mt(),{data:O}=mt(),{session:qe}=ct.useSessionContext(),R=qe?.user?.id,q=R?`daily-review-intro-seen:${R}`:null,[Qe,de]=d.useState(!1),J=d.useRef(!1);d.useEffect(()=>{if(q){if(o&&!J.current){let t=!0;try{t=!!localStorage.getItem(q)}catch{}de(!t)}if(!o&&J.current){try{localStorage.setItem(q,"1")}catch{}de(!1)}J.current=o}},[o,q]);const{data:ce}=rt({queryKey:["daily-review-yesterday",R],enabled:o&&!!R,staleTime:5*6e4,queryFn:async()=>{const t=De(new Date),s=Dt(t,1),{count:a,error:r}=await _t.from("task_completions").select("id",{count:"exact",head:!0}).eq("user_id",R).gte("completed_at",s.toISOString()).lt("completed_at",t.toISOString());if(r)throw r;return a??0}});d.useEffect(()=>{o&&(N(G),ne(1),ie([]),H({}),Y(new Set),K((k??[]).slice(0,C)))},[o]),d.useEffect(()=>()=>{X.current.forEach(t=>window.clearTimeout(t)),X.current=[]},[]);const y=De(new Date),ze=B(y,"yyyy-MM-dd");d.useEffect(()=>{if(!o)return;const t=n.filter(a=>{const r=U(a.due);return!!r&&r<y}),s=new Map(t.map(a=>[a.id,a]));ie(a=>{const r=a.filter(u=>s.has(u.id)||W[u.id]).map(u=>s.get(u.id)??u),g=new Set(r.map(u=>u.id));return[...r,...t.filter(u=>!g.has(u.id))]})},[o,n,W]);const I=z.filter(t=>!Be.has(t.id)),b=z.length,L=z.filter(t=>W[t.id]).length,xe=b-L,He=b>0&&I.length===0,w=d.useMemo(()=>n.filter(s=>{const a=(s.labels??[]).map(g=>g.toLowerCase());if(!a.includes("do")&&!a.includes("schedule"))return!1;const r=U(s.due);return!r||r>=y}
1).sort((s,a)=>{const r=(s.labels??[]).some(u=>u.toLowerCase()==="do")?0:1,g=(a.labels??[]).some(u=>u.toLowerCase()==="do")?0:1;return r!==g?r-g:(a.priority??1)-(s.priority??1)}),[n]),Ye=d.useMemo(()=>{const t=w.slice(0,Ee),s=w.slice(Ee).filter(a=>v.includes(a.id));return[...t,...s]},[w,v]),A=d.useMemo(()=>v.map(t=>w.find(s=>s.id===t)).filter(t=>!!t),[w,v]),M=d.useMemo(()=>{const t=Tt(y,1),s=a=>{const r=U(a.due),g=!!r&&r<t,u=(a.labels??[]).some(at=>at.toLowerCase()==="do");return(g?4:0)+(u?2:0)+(a.priority??1)/4};return[...w].sort((a,r)=>s(r)-s(a)).slice(0,C).map(a=>a.id)},[w]),me=M.length>0&&M.length===v.length&&M.every(t=>v.includes(t)),$=(t,s)=>{H(a=>({...a,[t.id]:s})),X.current.push(window.setTimeout(()=>Y(a=>new Set(a).add(t.id)),S?Ot:Et))},ue=t=>{H(s=>{const a={...s};return delete a[t],a}),Y(s=>{const a=new Set(s);return a.delete(t),a})},Ke=async t=>{$(t,"Done"),await Ge(t.id)},Xe=async t=>{if(t.due?.isRecurring){const s=t.due.string;if(!s){F.error("Can't read this task's repeat rule. Complete it to move it to its next date.");return}$(t,"Moved to today");try{await new Se(x).updateTask(t.id,{due_string:s}),kt("due_changed",{via:"quick",kind:"date"}),await p()}catch{F.error("Couldn't reschedule. Check your Todoist connection."),ue(t.id)}return}window.dispatchEvent(new CustomEvent("task:set-due",{detail:{taskId:t.id,date:ze,isRecurring:!1,via:"quick"}})),$(t,"Moved to today")},Je=async(t,s)=>{$(t,`Moved to ${s.label}`);const a=jt(t.labels,s.token);try{We(t.id,a),await new Se(x).updateTaskLabels(t.id,a),await p()}catch{F.error("Couldn't move the task. Check your Todoist connection."),ue(t.id)}},Ve=t=>K(s=>s.includes(t)?s.filter(a=>a!==t):s.length>=C?s:[...s,t]),pe=async(t=!1)=>{le(!0);try{await h(A.map(a=>({id:a.id,title:a.title})));const s=t?A[0]:void 0;!St()&&!s&&F.success(A.length>0?"Focus saved":"Review saved"),c(!1),s&&window.setTimeout(()=>{window.dispatchEvent(new CustomEvent("task:open-focus",{detail:{taskId:s.id,task:s}}))},Ft)}catch{F.error("Couldn't save. Try again.")}finally{le(!1)}},Ze=async()=>{try{await f()}catch{}c(!1)},P=d.useMemo(()=>O?O.activeToday?O.current:O.current+1:0,[O]),m=Oe.indexOf(i),he=t=>{ne(t>m?1:-1),N(Oe[t])},_=v.length,V=_>=C,fe=new Date().getHours(),et=fe<12?"Good morning":fe<18?"Good afternoon":"Good evening";let be=B(y,"EEEE, MMMM d"),Z=et,Q;i==="triage"?Q=b===0?"Nothing carried over.":L===0?`${ae(b,"task")} carried over.`:xe>0?`${L} cleared, ${xe} to go.`:"All caught up.":i==="pick"?(Z="Pick today's focus",Q=V?"Three picked.":"Up to three tasks."):(P>1&&(be=`Day ${P} streak`),Z="Today's plan",Q=_>0?`${ae(_,"task")} for today.`:"Nothing picked.");const tt=[{key:"clear",label:i==="triage"&&b?`Clear · ${L}/${b}`:"Clear",pct:m>0?1:b?L/b:1,color:"var(--dr-done)"},{key:"choose",label:i==="pick"?`Choose · ${_}/${C}`:"Choose",pct:m<1?0:m===1?_/C:1,color:"#fbbf24"},{key:"commit",label:"Commit",pct:m===2?1:0,color:"#fbbf24"}],ee={initial:S?{opacity:0}:{opacity:0,x:Ue*12},animate:{opacity:1,x:0,transition:S?{duration:.12}:{opacity:{duration:.22},x:{duration:.32,ease:re}}},exit:{opacity:0,transition:{duration:.12}}},E=i==="summary",ge=E?D?"Saving…":_>0?"Start with #1":"Done":"Continue",ve=E&&_>0,ye=E?()=>pe(ve):()=>he(m+1),st=ut(),we="font-semibold transition-[background-color,color,box-shadow,transform] duration-300 active:scale-[0.97] disabled:opacity-70 motion-reduce:active:scale-100",te=l("h-9 rounded-[10px] font-medium transition-colors hover:bg-[color:var(--dr-fill)] disabled:opacity-50 max-sm:h-11 max-sm:rounded-xl max-sm:text-[15px]",j);return e.jsx(pt,{open:o,onOpenChange:c,children:e.jsxs(ht,{children:[e.jsx(ft,{className:"bg-[#14100a]/[0.22] backdrop-blur-sm dark:bg-black/50"}),e.jsxs(nt,{onOpenAutoFocus:t=>{t.preventDefault(),t.currentTarget.focus()},className:l("daily-review fixed z-50 flex w-full flex-col overflow-hidden bg-[color:var(--dr-surface)] text-[color:var(--dr-ink)] antialiased shadow-[var(--dr-shadow)] duration-200 focus:outline-none","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","max-sm:inset-x-0 max-sm:bottom-0 max-sm:max-h-[92vh] max-sm:rounded-t-[22px] max-sm:data-[state=open]:slide-in-from-bottom max-sm:data-[state=closed]:slide-out-to-bottom","sm:left-1/2 sm:top-1/2 sm:max-w-[448px] sm:-translate-x-1/2 sm:-translate-y-1/2 sm:rounded-[20px] sm:data-[state=open]:zoom-in-[0.98] sm:data-[state=closed]:zoom-out-[0.98]",st&&"mx-review"),children:[e.jsx("div",{className:"mx-auto mt-2 h-[5px] w-9 shrink-0 rounded-full bg-[color:var(--dr-line-2)] sm:hidden","aria-hidden":!0}),e.jsxs("div",{className:"relative shrink-0 overflow-hidden px-6 pb-4 pt-5 max-sm:px-5 max-sm:pb-3.5 max-sm:pt-3.5",children:[At.map((t,s)=>
1e.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-x-0 top-0 h-[200px] transition-opacity [transition-duration:600ms] motion-reduce:transition-none",style:{background:`radial-gradient(80% 100% at 92% 0%, ${t}, transparent 72%)`,opacity:m===s?1:0}},t)),e.jsx("ol",{className:"relative mb-[18px] grid grid-cols-3 gap-1.5","aria-label":"Progress",children:tt.map((t,s)=>e.jsxs("li",{className:"flex flex-col gap-[7px]","aria-current":s===m?"step":void 0,children:[e.jsx("div",{className:"h-[3px] overflow-hidden rounded-full bg-[color:var(--dr-fill-2)]",children:e.jsx("div",{className:"h-full rounded-full transition-[width] [transition-duration:420ms] [transition-timing-function:cubic-bezier(.22,1,.36,1)] motion-reduce:transition-none",style:{width:`${t.pct*100}%`,backgroundColor:t.color}})}),e.jsx("span",{className:l("whitespace-nowrap text-xs leading-4",s===m?"font-semibold text-[color:var(--dr-ink)]":s<m?"font-medium text-[color:var(--dr-ink-2)]":"font-medium text-[color:var(--dr-ink-3)]"),children:t.label})]},t.key))}),e.jsxs("div",{className:"relative flex items-start gap-4",children:[e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-[3px]",children:[e.jsx("p",{className:l("text-[13px] font-medium leading-[18px]",E&&P>1?"text-[color:var(--dr-focus-ink)]":"text-[color:var(--dr-ink-2)]"),children:be}),e.jsx(it,{className:"text-2xl font-semibold leading-[30px] tracking-[-0.02em]",children:Z}),e.jsx(lt,{className:"text-sm leading-5 text-[color:var(--dr-ink-2)]","aria-live":"polite",children:Q}),i==="triage"&&Qe&&e.jsx("p",{className:"mt-2 text-[12.5px] leading-[17px] text-[color:var(--dr-ink-2)]",children:"Your two-minute plan: clear what carried over, then pick up to three tasks to focus on today."}),i==="triage"&&(ce??0)>0&&e.jsxs("div",{className:"mt-2.5 inline-flex h-6 items-center gap-1.5 self-start rounded-full bg-[color:var(--dr-done-tint)] px-2.5 text-[12.5px] font-medium leading-4 text-[color:var(--dr-done-ink)]",children:[e.jsx(je,{className:"h-3 w-3",strokeWidth:3,"aria-hidden":!0}),ce," done yesterday",P>1&&` · Day ${P} streak`]})]}),e.jsxs("div",{"aria-hidden":!0,className:"relative mt-1 h-[52px] w-16 shrink-0",style:{clipPath:"inset(-40px -40px 0 -40px)"},children:[e.jsx("div",{className:"absolute left-3 h-10 w-10 rounded-full transition-[top,background-color,box-shadow] [transition-duration:700ms] [transition-timing-function:cubic-bezier(.22,1,.36,1)] motion-reduce:transition-none",style:{top:Rt[m],background:It[m],boxShadow:Lt[m]}}),e.jsx("div",{className:"absolute inset-x-0 bottom-0 h-px bg-gradient-to-r from-transparent via-[color:var(--dr-line-2)] to-transparent"})]})]})]}),e.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto overflow-x-hidden sm:max-h-[min(52vh,440px)]",children:e.jsxs(Te,{mode:"wait",initial:!1,children:[i==="triage"&&e.jsxs(T.div,{...ee,children:[I.length>0&&e.jsxs("div",{className:"flex flex-col px-3.5 pb-2.5 max-sm:px-2.5 max-sm:pb-2",children:[e.jsx(Te,{initial:!1,children:I.slice(0,se).map(t=>e.jsx(Ut,{task:t,today:y,resolution:W[t.id],reduceMotion:S,onComplete:()=>Ke(t),onToday:()=>Xe(t),onMove:s=>Je(t,s),onSkip:()=>$(t,"Skipped for now")},t.id))}),I.length>se&&e.jsxs("p",{className:"pt-1 text-center text-[12.5px] text-[color:var(--dr-ink-2)]",children:["+",I.length-se," more in the matrix"]})]}),(b===0||He)&&e.jsx(oe,{icon:e.jsx("div",{className:"grid h-[52px] w-[52px] place-items-center rounded-full bg-[color:var(--dr-done-tint)] shadow-[0_0_0_8px_var(--dr-done-halo)]",children:e.jsx(je,{className:"h-6 w-6 text-[color:var(--dr-done)]",strokeWidth:2.6})}),title:b?`${ae(b,"task")} cleared`:"All clear",body:"Next, pick today's focus."})]},"triage"),i==="pick"&&e.jsx(T.div,{...ee,children:w.length>0?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center justify-between px-6 pb-2 max-sm:px-5",children:[e.jsx("div",{className:"flex items-center gap-1.5","aria-hidden":!0,children:Array.from({length:C},(t,s)=>e.jsx("span",{className:l("grid h-[22px] w-[22px] place-items-center rounded-full text-[11px] font-bold text-[#1d1b18] transition-colors duration-150",v[s]?"bg-amber-400":"border-[1.5px] border-dashed border-[color:var(--dr-line-2)]"),children:v[s]?s+1:""},s))}),M.length>0&&e.jsx("button",{type:"button",onClick:()=>K([...M]),className:l("-mr-2 h-7 rounded-lg px-2 text-[13px] font-semibold text-[color:var(--dr-focus-ink)] transition-colors hover:bg-[color:var(--dr-focus-tint)] max-sm:h-11",me&&"opacity-60",j),children:me?"Suggestions applied":"Use suggestions"})]}),e.jsx("div",{className:"flex flex-col gap-0.5 px-3 pb-2 max-sm:px-2.5",children:Ye.map(t=>{const s=v.indexOf(t.id),a=s>=0,r=V&&!a,g=Le(t,y);return e.jsxs("button",{type:"button","aria-pressed":a,disabled:r,onClick:()=>Ve(t.id),className:l("flex min-h-[54px] w-full items-center gap-3 rounded-xl py-[9px] pl-3.5 pr-2.5 text-left transition-[background-color,box-shadow,opacity] duration-200 max-sm:min-h-[62px] max-sm:py-2.5",a?"bg-[color:var(--dr-focus-tint)] shadow-[inset_0_0_0_1px_var(--dr-focus-line)]":"hover:bg-[color:var(--dr-fill)]",r&&"curs
1or-default opacity-[0.42] hover:bg-transparent",j),children:[e.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full",style:{backgroundColor:g.quadrant?.color},"aria-hidden":!0}),e.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[e.jsx("span",{className:"truncate text-[15px] font-medium leading-5 max-sm:text-base max-sm:leading-[22px]",children:t.title}),e.jsxs("span",{className:"flex min-w-0 items-center gap-1.5 text-[12.5px] leading-4 text-[color:var(--dr-ink-2)]",children:[e.jsx("span",{className:"shrink-0",children:g.text}),e.jsx(Fe,{priority:t.priority}),e.jsx(Ae,{task:t})]})]}),M.includes(t.id)&&e.jsx("span",{className:"inline-flex h-5 shrink-0 items-center rounded-md bg-[color:var(--dr-fill-2)] px-[7px] text-[11.5px] font-medium text-[color:var(--dr-ink-2)]",children:"Suggested"}),e.jsx(T.span,{"aria-hidden":!0,initial:!1,animate:a&&!S?{scale:[1,1.15,1]}:{scale:1},transition:{duration:.26},className:l("grid h-6 w-6 shrink-0 place-items-center rounded-full text-xs font-bold text-[#1d1b18] transition-colors duration-150",a?"bg-amber-400":"border-[1.5px] border-[color:var(--dr-line-2)]"),children:a?s+1:""})]},t.id)})}),V&&e.jsx("p",{className:"px-6 pb-3.5 pt-0.5 text-center text-[12.5px] leading-4 text-[color:var(--dr-ink-2)]",children:"Tap a pick to remove it."})]}):e.jsx(oe,{icon:e.jsx("div",{className:"grid h-[52px] w-[52px] place-items-center rounded-full bg-[color:var(--dr-focus-tint)]",children:e.jsx(ke,{className:"h-[22px] w-[22px] text-[color:var(--dr-focus-ink)]",strokeWidth:2})}),title:"Nothing to pick",body:"Do First and Schedule have nothing for today."})},"pick"),i==="summary"&&e.jsx(T.div,{...ee,children:A.length>0?e.jsx("div",{className:"flex flex-col gap-2 px-6 pb-[18px] pt-0.5 max-sm:px-5",children:A.map((t,s)=>{const a=Le(t,y),r=.08+s*.07;return e.jsxs(T.div,{initial:S?{opacity:0}:{opacity:0,y:8},animate:{opacity:1,y:0},transition:S?{duration:.12}:{opacity:{duration:.26,delay:r},y:{duration:.34,delay:r,ease:re}},className:"flex items-center gap-3 rounded-[14px] bg-[color:var(--dr-focus-tint)] px-4 py-3.5 shadow-[inset_0_0_0_1px_var(--dr-focus-line)] max-sm:py-[15px]",children:[e.jsx("span",{className:"grid h-[26px] w-[26px] shrink-0 place-items-center rounded-full bg-amber-400 text-[13px] font-bold text-[#1d1b18]",children:s+1}),e.jsxs("span",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[e.jsx("span",{className:"truncate text-[15px] font-semibold leading-5",children:t.title}),e.jsxs("span",{className:"flex items-center gap-1.5 text-[12.5px] leading-4 text-[color:var(--dr-ink-2)]",children:[e.jsx("span",{className:"h-[7px] w-[7px] shrink-0 rounded-full",style:{backgroundColor:a.quadrant?.color},"aria-hidden":!0}),a.text]})]}),e.jsx(ke,{className:"h-4 w-4 shrink-0 fill-amber-400 text-amber-400","aria-hidden":!0})]},t.id)})}):e.jsx(oe,{icon:e.jsx("div",{className:"grid h-[52px] w-[52px] place-items-center rounded-full bg-[color:var(--dr-fill-2)]",children:e.jsx("div",{className:"h-[18px] w-[18px] rounded-full bg-amber-400"})}),title:"No focus today",body:"Your tasks stay in the matrix."})},"summary")]})}),e.jsx("div",{className:"shrink-0 border-t border-[color:var(--dr-line)] pb-4 pl-3 pr-4 pt-3.5 max-sm:px-4 max-sm:pb-[calc(30px+env(safe-area-inset-bottom))] max-sm:pt-2",children:e.jsxs("div",{className:"flex items-center justify-between gap-2 max-sm:flex-col max-sm:items-stretch max-sm:gap-1",children:[e.jsxs("div",{className:"flex items-center justify-between sm:contents",children:[e.jsx("button",{type:"button",onClick:Ze,disabled:D,className:l(te,"px-3 text-[13.5px] text-[color:var(--dr-ink-2)] max-sm:px-2.5"),children:"Skip today"}),e.jsxs("div",{className:"flex items-center gap-1.5",children:[m>0&&e.jsx("button",{type:"button",onClick:()=>he(m-1),disabled:D,className:l(te,"px-3.5 text-sm max-sm:px-3"),children:"Back"}),ve&&e.jsx("button",{type:"button",onClick:()=>pe(!1),disabled:D,className:l(te,"px-3.5 text-sm max-sm:px-3"),children:"Done"}),e.jsx("button",{type:"button",onClick:ye,disabled:D,className:l(we,"h-9 rounded-[10px] px-4 text-sm max-sm:hidden",E?Ie:Re,j),children:ge})]})]}),e.jsx("button",{type:"button",onClick:ye,disabled:D,className:l(we,"h-[50px] w-full rounded-[14px] px-4 text-base sm:hidden",E?Ie:Re,j),children:ge})]})})]})]})})},oe=({icon:o,title:c,body:n})=>e.jsxs("div",{className:"flex flex-col items-center gap-1.5 px-6 pb-7 pt-5 text-center",children:[e.jsx("div",{className:"mb-2",children:o}),e.jsx("p",{className:"text-base font-semibold leading-[22px]",children:c}),e.jsx("p",{className:"max-w-[290px] text-[13.5px] leading-[19px] text-[color:var(--dr-ink-2)]",children:n})]}),Ut=({task:o,today:c,resolution:n,reduceMotion:x,onComplete:p,onToday:h,onMove:f,onSkip:G})=>{const k=n==="Done",i=!!n;return e.jsx(T.div,{initial:!1,exit:x?{opacity:0,transition:{duration:.12}}:{height:0,opacity:0,transition:{height:{duration:.28,ease:re}
1,opacity:{duration:.2}}},className:l(i&&"overflow-hidden"),children:e.jsxs("div",{className:"flex min-h-[54px] items-center gap-2.5 rounded-xl py-[7px] pl-1 pr-1.5 max-sm:min-h-16 max-sm:gap-2 max-sm:py-1.5 max-sm:pl-0.5 max-sm:pr-1",children:[e.jsx("button",{type:"button",onClick:()=>!i&&p(),disabled:i,"aria-label":`Complete ${o.title}`,className:l("grid h-8 w-8 shrink-0 place-items-center rounded-full transition-colors hover:bg-[color:var(--dr-done-tint)] disabled:hover:bg-transparent max-sm:h-11 max-sm:w-11",j),children:e.jsx(T.span,{initial:!1,animate:k&&!x?{scale:[1,1.18,1]}:{scale:1},transition:{duration:.26},className:l("grid h-[22px] w-[22px] place-items-center rounded-full border-[1.5px] transition-colors [transition-duration:180ms]",k?"border-[color:var(--dr-done)] bg-[color:var(--dr-done)]":"border-[color:var(--dr-line-2)]"),children:e.jsx("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"#fff",strokeWidth:"3.2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:e.jsx("polyline",{points:"20 6 9 17 4 12",strokeDasharray:24,strokeDashoffset:k?0:24,className:"transition-[stroke-dashoffset] [transition-delay:60ms] [transition-duration:260ms] ease-out motion-reduce:transition-none"})})})}),e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[e.jsx("p",{className:l("truncate text-[15px] font-medium leading-5 transition-colors duration-200 max-sm:text-base max-sm:leading-[22px]",i?"text-[color:var(--dr-ink-3)]":"text-[color:var(--dr-ink)]",k&&"line-through"),children:o.title}),e.jsxs("div",{className:"flex min-w-0 items-center gap-1.5 text-[12.5px] leading-4",children:[!i&&e.jsx(Fe,{priority:o.priority}),e.jsx("span",{className:l(k?"font-semibold text-[color:var(--dr-done-ink)]":i?"font-semibold text-[color:var(--dr-focus-ink)]":"text-[color:var(--dr-ink-2)]"),children:n??Pt(U(o.due),c)}),!i&&e.jsx(Ae,{task:o,className:"text-[color:var(--dr-ink-2)]"})]})]}),!i&&e.jsxs("div",{className:"flex shrink-0 items-center gap-0.5",children:[e.jsx("button",{type:"button",onClick:h,"aria-label":"Move to today",className:l("h-7 rounded-lg bg-[color:var(--dr-fill)] px-2.5 text-[13px] font-medium transition-colors hover:bg-[color:var(--dr-fill-2)] max-sm:h-11 max-sm:rounded-xl max-sm:px-3.5 max-sm:text-sm",j),children:"Today"}),e.jsxs(bt,{modal:!1,children:[e.jsx(gt,{asChild:!0,children:e.jsx("button",{type:"button","aria-label":"More actions",className:l("grid h-7 w-7 shrink-0 place-items-center rounded-lg text-[color:var(--dr-ink-2)] transition-colors hover:bg-[color:var(--dr-fill)] max-sm:h-11 max-sm:w-11 max-sm:rounded-xl",j),children:e.jsx(dt,{className:"h-4 w-4"})})}),e.jsxs(vt,{align:"end",sideOffset:6,className:"daily-review w-[196px] rounded-xl border-[color:var(--dr-line)] bg-[color:var(--dr-menu)] p-1.5 text-[color:var(--dr-ink)] shadow-[0_12px_32px_-8px_rgba(0,0,0,.22),0_2px_6px_rgba(0,0,0,.06)] backdrop-blur-xl",children:[e.jsx(yt,{className:"px-2 pb-1 pt-1.5 text-[11.5px] font-medium leading-[14px] text-[color:var(--dr-ink-2)]",children:"Move to"}),Pe.map(N=>e.jsxs(Ne,{onSelect:()=>f(N),className:"h-8 gap-2.5 rounded-lg px-2 text-[13.5px] focus:bg-[color:var(--dr-fill-2)] focus:text-[color:var(--dr-ink)]",children:[e.jsx("span",{className:"h-2 w-2 shrink-0 rounded-full",style:{backgroundColor:N.color},"aria-hidden":!0}),N.label]},N.token)),e.jsx(wt,{className:"mx-0.5 my-1 bg-[color:var(--dr-line)]"}),e.jsx(Ne,{onSelect:G,className:"h-8 rounded-lg px-2 text-[13.5px] text-[color:var(--dr-ink-2)] focus:bg-[color:var(--dr-fill-2)] focus:text-[color:var(--dr-ink)]",children:"Skip for now"})]})]})]})]})})};export{Ht as DailyReviewDialog};

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.