@ehfuse/taskbox 0.5.184 → 0.5.186

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/dist/index.esm.js CHANGED
@@ -10,5 +10,5 @@ var us="waiting",LB="replied";import{createContext as Fu,useContext as Hu,useMem
10
10
  `).replace(/<[^>]+>/g,"").replace(/&nbsp;/gi," ").replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&quot;/gi,'"').replace(/&#39;/gi,"'").replace(/&amp;/gi,"&").replace(/\n{3,}/g,`
11
11
 
12
12
  `).trim():"";function r0(e){let o=[`[\uC5C5\uBB34] ${e.title}`],t=Zo(e.start_date),n=Zo(e.due_date);(t||n)&&o.push(`\uAE30\uAC04: ${t&&n?`${t} ~ ${n}`:t||n}`),e.manager_name&&o.push(`\uCC45\uC784\uC790: ${e.manager_name}`);let r=Bo(e).name;r&&o.push(`\uC0C1\uD0DC: ${r}`);let i=Km(e.content);i&&o.push("",i);let a=String(e.note??"").trim();return a&&o.push("",`\uBE44\uACE0: ${a}`),o.join(`
13
- `)}function Um(e){navigator.clipboard.writeText(e).then(()=>n0("\uC5C5\uBB34 \uB0B4\uC6A9\uC744 \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>t0("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uB0B4\uC6A9\uC744 \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD574 \uC8FC\uC138\uC694."))}function br(e,o){let t=r0(e);if(o&&typeof navigator.share=="function"){navigator.share({text:t}).catch(n=>{n?.name!=="AbortError"&&Um(t)});return}Um(t)}import{Fragment as u0,jsx as Ve,jsxs as Gm}from"react/jsx-runtime";function jm({task:e,myAccountSeq:o=0,onToggleCompleted:t,onChangeTitle:n,onChangeIcon:r,onChangeIconColor:i,onClose:a,appBarMode:l=!1,activityItems:p,activityLoading:c,onLoadActivity:s,onPrint:g}){let d=Oe(),[m,u]=Nl(!1),[v,I]=Nl(null),[h,x]=Nl(null),w=e.is_notice?ye(e.icon||no):null,S=!!e.is_notice,O=!!e.is_event,y=S&&o>0&&(e.author_account_seq??0)===o,_=!Pt(e,o),M=!O&&(S?y:(e.author_account_seq??0)===o||(e.manager_account_seq??0)===o);return Gm(u0,{children:[Gm(hr,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[l&&a?Ve(Xr,{"aria-label":"\uB4A4\uB85C",onClick:a,sx:{color:"#37352f",ml:-1},children:Ve(a0,{})}):null,M&&!l?Ve(sa,{title:e.completed&&e.completed_by?`${e.completed_by} \xB7 ${Uo(e.completed_time)} \uC644\uB8CC`:"",arrow:!0,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:Ve(hr,{sx:{display:"flex",flexShrink:0,mr:1.5},children:Ve(ht,{onClick:q=>x({anchorEl:q.currentTarget,nextCompleted:!e.completed}),children:e.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC"})})}):null,l||!w?null:Ve(hr,{sx:{display:"flex",px:.5,color:e.icon_color||(S?"#e5484d":"#1e3a8a")},children:Ve(w,{sx:{fontSize:20}})}),v!==null?Ve(hr,{component:"input",autoFocus:!0,spellCheck:!1,value:v,onChange:q=>I(q.target.value),onBlur:()=>{v.trim()&&v.trim()!==e.title&&n(e.seq,v.trim()),I(null)},onKeyDown:q=>{q.key==="Enter"&&q.target.blur(),q.key==="Escape"&&I(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:18,fontWeight:500,color:"#37352f",p:0,m:0}}):l?Ve(hr,{sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:S?"\uACF5\uC9C0":O?"\uC77C\uC815":e.is_bug?"\uC624\uB958":"\uC5C5\uBB34"}):Ve(hr,{onClick:_?void 0:()=>I(e.title),sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:_?"default":"text",textDecoration:e.completed?"line-through":"none"},children:e.title}),s?Ve(sa,{title:"\uD65C\uB3D9",arrow:!0,children:Ve(Xr,{"aria-label":"\uD65C\uB3D9",onClick:()=>u(!0),sx:{color:"#6b7280"},children:Ve(c0,{sx:{fontSize:20}})})}):null,Ve(sa,{title:d?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:Ve(Xr,{"aria-label":d?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>br(e,d),sx:{color:"#6b7280"},children:d?Ve(l0,{sx:{fontSize:20}}):Ve(s0,{sx:{fontSize:20}})})}),g?Ve(sa,{title:"\uC778\uC1C4",arrow:!0,children:Ve(Xr,{"aria-label":"\uC778\uC1C4",onClick:()=>g(e),sx:{color:"#6b7280"},children:Ve(m0,{sx:{fontSize:20}})})}):null,a&&!l?Ve(Xr,{"aria-label":"\uB2EB\uAE30",onClick:a,sx:{color:"#6b7280"},children:Ve(i0,{})}):null]}),Ve(Re,{open:!!h,anchorEl:h?.anchorEl??null,title:h?.nextCompleted?"\uC774 \uC5C5\uBB34\uB97C \uC644\uB8CC \uCC98\uB9AC\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?":"\uC644\uB8CC\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:h?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>x(null),onConfirm:()=>{h&&t(e.seq,h.nextCompleted),x(null)}}),Ve(la,{open:m,taskSeq:e.seq,items:p,loading:c,onLoad:s,onClose:()=>u(!1)})]})}import{useState as pt}from"react";import{Box as eo,Button as kr,ButtonBase as y0,Checkbox as S0,Divider as Wn,Menu as Kl,MenuItem as Ul}from"@mui/material";import B0 from"@mui/icons-material/ExpandLess";import C0 from"@mui/icons-material/ExpandMore";import v0 from"@mui/icons-material/ConfirmationNumberOutlined";import eu from"@mui/icons-material/Check";import I0 from"@mui/icons-material/DirectionsRunOutlined";import _0 from"@mui/icons-material/SpeedOutlined";import Gl from"@mui/icons-material/CheckCircle";import w0 from"@mui/icons-material/CheckCircleOutlineOutlined";import jl from"@mui/icons-material/CheckCircleOutlined";import ou from"@mui/icons-material/AccessTimeOutlined";import D0 from"@mui/icons-material/AutorenewOutlined";import E0 from"@mui/icons-material/LabelOutlined";import M0 from"@mui/icons-material/PersonOutlineOutlined";import O0 from"@mui/icons-material/SubjectOutlined";import R0 from"@mui/icons-material/StickyNote2Outlined";import P0 from"@mui/icons-material/PanToolAltOutlined";import tu from"@mui/icons-material/LockOutlined";import nu from"@mui/icons-material/PublicOutlined";import ru from"@mui/icons-material/Group";import z0 from"@mui/icons-material/Repeat";import q0 from"@mui/icons-material/EventOutlined";import{ConfirmDialog as iu,InfoAlert as A0}from"@ehfuse/alerts";import{DatePicker as L0}from"@ehfuse/mui-datetime-picker";import{useState as d0}from"react";import{TextField as p0}from"@ehfuse/mui-form-controls";import{jsx as f0}from"react/jsx-runtime";function Ym({value:e,onCommit:o,onDraftChange:t,readOnly:n=!1}){let[r,i]=d0(null);return f0(p0,{value:r??e,placeholder:n?"":"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",slotProps:{input:{readOnly:n}},onChange:a=>{i(a.target.value),t?.(a.target.value)},onBlur:()=>{r!==null&&r.trim()!==e&&o(r),i(null)},onKeyDown:a=>{a.key==="Enter"&&a.target.blur(),a.key==="Escape"&&i(null)},sx:{mt:1}})}import{useMemo as Wl,useState as $l}from"react";import{Box as _o,Button as Zm,IconButton as x0}from"@mui/material";import g0 from"@mui/icons-material/AccountTreeOutlined";import b0 from"@mui/icons-material/Add";import h0 from"@mui/icons-material/Close";import k0 from"@mui/icons-material/NextPlanOutlined";function Hn(e){return e.relations??[]}function Gz(e,o,t){return Hn(e).some(n=>n.type===t&&n.task_seq===o.seq)||Hn(o).some(n=>n.type===t&&n.task_seq===e.seq)}function Xm(e){return`${e.created_time??""}|${String(e.seq).padStart(12,"0")}`}function Fl(e,o){let t=new Map(o.map(m=>[m.seq,m]));t.set(e.seq,e);let n=new Map,r=(m,u)=>{n.has(m)||n.set(m,new Set),n.has(u)||n.set(u,new Set),n.get(m).add(u),n.get(u).add(m)};for(let m of t.values())for(let u of Hn(m))u.type==="follow_up"&&t.has(u.task_seq)&&r(m.seq,u.task_seq);let i=new Set([e.seq]),a=[e.seq];for(;a.length>0;){let m=a.shift();for(let u of n.get(m)??[])i.has(u)||(i.add(u),a.push(u))}let l=[...i].map(m=>t.get(m)).filter(m=>!!m).sort((m,u)=>Xm(m).localeCompare(Xm(u))),p=new Set;for(let m of Hn(e))m.type==="related"&&p.add(m.task_seq);for(let m of t.values())m.seq!==e.seq&&Hn(m).some(u=>u.type==="related"&&u.task_seq===e.seq)&&p.add(m.seq);let c=[...p].map(m=>t.get(m)).filter(m=>m!==void 0&&m.seq!==e.seq),s=[...t.values()].filter(m=>m.seq!==e.seq&&Hn(m).some(u=>u.type==="duplicate_of"&&u.task_seq===e.seq)),g=Hn(e).find(m=>m.type==="duplicate_of")?.task_seq,d=g?t.get(g)??null:null;return{lineage:l,related:c,duplicates:s,duplicateOf:d}}function Hl(e,o){let t=Fl(e,o);return(t.lineage.length>=2?t.lineage.length-1:0)+t.related.length+t.duplicates.length+(t.duplicateOf?1:0)}function Qm(e,o){return Hl(e,o)>0}import{Fragment as T0,jsx as je,jsxs as dt}from"react/jsx-runtime";function Vl({item:e,caption:o,onOpen:t,onUnlink:n}){let r=e.is_notice||e.is_event?ye(e.icon||(e.is_notice?no:po)):null;return dt(_o,{sx:{display:"flex",alignItems:"center",gap:.75,px:1.25,py:.5,borderRadius:1,"&:hover":{bgcolor:"#f7f7f5"},"&:hover .taskbox-relation-unlink":{opacity:1}},children:[o?je(_o,{component:"span",sx:{flexShrink:0,px:.6,py:.1,borderRadius:.75,fontSize:11.5,fontWeight:500,color:"#8a6d1d",bgcolor:"#faf1d7"},children:o}):null,r?je(r,{sx:{fontSize:16,flexShrink:0,color:e.icon_color||"#1e3a8a"}}):null,dt(_o,{component:"span",onClick:t,sx:{flex:1,minWidth:0,fontSize:14,color:e.completed?"#9a9a97":"#37352f",textDecoration:e.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...t?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[e.ticket_no?`${e.ticket_no} `:"",e.title]}),je(Ae,{option:Bo(e),small:!0}),n?je(x0,{className:"taskbox-relation-unlink",size:"small","aria-label":"\uC5F0\uACB0 \uD574\uC81C",onClick:n,sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:je(h0,{sx:{fontSize:15}})}):null]})}function Jm({task:e,tasks:o,readOnly:t=!1,onOpenTask:n,onLink:r,onUnlink:i,onCreateFollowUp:a}){let[l,p]=$l(!1),[c,s]=$l(null),[g,d]=$l(null),m=Wl(()=>Fl(e,o),[e,o]),u=m.lineage.length>=2,v=Wl(()=>Hl(e,o),[e,o]),I=Wl(()=>{let x=new Set;for(let w of m.lineage)x.add(w.seq);for(let w of m.related)x.add(w.seq);for(let w of m.duplicates)x.add(w.seq);return m.duplicateOf&&x.add(m.duplicateOf.seq),[...x]},[m]),h=(x,w,S)=>{d({anchorEl:x,targetSeq:w,type:S})};return dt(tt,{icon:je(g0,{sx:{fontSize:19,display:"block"}}),title:dt(T0,{children:["\uAD00\uB828 \uC5C5\uBB34",v>0?je(_o,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:v}):null]}),titleExtra:t?null:dt(_o,{sx:{ml:"auto",display:"flex",alignItems:"center",gap:.5},children:[a?je(Zm,{size:"small",color:"inherit",startIcon:je(k0,{sx:{fontSize:16}}),onClick:x=>s(x.currentTarget),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uD6C4\uC18D \uC5C5\uBB34"}):null,r?je(Zm,{size:"small",color:"inherit",startIcon:je(b0,{sx:{fontSize:16}}),onClick:()=>p(!0),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uC5F0\uACB0"}):null]}),children:[dt(_o,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:[u?je(_o,{sx:{mb:m.related.length||m.duplicates.length||m.duplicateOf?1:0},children:m.lineage.map((x,w)=>{let S=x.seq===e.seq,O=w===m.lineage.length-1;return dt(_o,{sx:{display:"flex",gap:1},children:[dt(_o,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:14,flexShrink:0,pt:1.1},children:[je(_o,{sx:{width:S?9:7,height:S?9:7,borderRadius:"50%",bgcolor:S?"#2f80ed":x.completed?"#9a9a97":"#c9c8c5",flexShrink:0}}),O?null:je(_o,{sx:{width:"2px",flex:1,bgcolor:"#e6e6e3"}})]}),dt(_o,{sx:{flex:1,minWidth:0,pb:O?0:.5},children:[dt(_o,{sx:{display:"flex",alignItems:"center",gap:.75},children:[dt(_o,{component:"span",onClick:!S&&n?()=>n(x.seq):void 0,sx:{minWidth:0,fontSize:14,fontWeight:S?600:400,color:S?"#2f80ed":x.completed?"#9a9a97":"#37352f",textDecoration:x.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...!S&&n?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[x.ticket_no?`${x.ticket_no} `:"",x.title]}),je(Ae,{option:Bo(x),small:!0})]}),je(_o,{sx:{fontSize:12,color:"#9a9a97"},children:x.completed&&x.completed_time?`${x.completed_time} \uC644\uB8CC`:x.created_time??""})]})]},x.seq)})}):null,m.duplicateOf?je(Vl,{item:m.duplicateOf,caption:"\uC6D0\uBCF8",onOpen:n?()=>n(m.duplicateOf.seq):void 0,onUnlink:!t&&i?x=>h(x.currentTarget,m.duplicateOf.seq,"duplicate_of"):void 0}):null,m.duplicates.map(x=>je(Vl,{item:x,caption:"\uC911\uBCF5",onOpen:n?()=>n(x.seq):void 0,onUnlink:!t&&i?w=>h(w.currentTarget,x.seq,"duplicate_of"):void 0},`dup-${x.seq}`)),m.related.map(x=>je(Vl,{item:x,onOpen:n?()=>n(x.seq):void 0,onUnlink:!t&&i?w=>h(w.currentTarget,x.seq,"related"):void 0},`rel-${x.seq}`)),v===0?je(_o,{sx:{px:1.25,py:.75,fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]}),r?je(Gi,{open:l,task:e,tasks:o,excludeSeqs:I,onClose:()=>p(!1),onSubmit:(x,w)=>r(e.seq,x,w)}):null,je(Re,{open:!!c,anchorEl:c,title:"\uC774 \uC5C5\uBB34\uC5D0\uC11C \uC774\uC5B4\uC9C0\uB294 \uD6C4\uC18D \uC5C5\uBB34\uB97C \uB9CC\uB4DC\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uB9CC\uB4E4\uAE30",onCancel:()=>s(null),onConfirm:()=>{a?.(e.seq),s(null)}}),je(Re,{open:!!g,anchorEl:g?.anchorEl??null,title:"\uC774 \uC5C5\uBB34\uC640\uC758 \uC5F0\uACB0\uC744 \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uD574\uC81C",onCancel:()=>d(null),onConfirm:()=>{g&&i?.(e.seq,g.targetSeq,g.type),d(null)}})]})}import{Fragment as qo,jsx as z,jsxs as Ke}from"react/jsx-runtime";function bn({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return z(eo,{component:"span",sx:{color:"#9a9a97"},children:e})}function au({task:e,customTabs:o,statusOptions:t,avatarSrcByName:n,onChangeStatus:r,onChangeLabels:i,onAddLabelOption:a,onChangeProject:l,onAddProject:p,onChangeDate:c,onChangeReminder:s,onMemberEdit:g,onChangePriority:d,onChangeVisibility:m,onChangeRepeat:u,departments:v=[],onChangeEventTime:I,onChangeEventPlace:h,onChangeEventAddress:x,onChangeNote:w,onChangeNoteDraft:S,onChangeContent:O,onChangeContentHeight:y,onAddChecklistItem:_,onToggleChecklistItem:M,onRemoveChecklistItem:q,onUpdateChecklistItem:B,onReorderChecklist:J,onConvertChecklistToTask:b,onOpenChecklistTask:f,onLinkChecklistTask:C,resolveChecklistTask:k,relatedTasksPool:T,onOpenRelatedTask:D,onLinkRelatedTask:X,onUnlinkRelatedTask:F,onCreateFollowUpTask:Q,onAddAttachments:te,onRemoveAttachment:ue,onPreview:se,onDownload:re,onUpdateComment:he,onRemoveComment:ve,onToggleCommentReaction:Se,currentUserName:U="",myAccountSeq:H=0,noticeAdmin:ie=!1,hideProject:A=!1,hideLabel:W=!1,showTitle:L=!1,onChangeTitle:K,onToggleCompleted:ge,onChangeIcon:Ee,onChangeIconColor:oo,employees:Ye=[],onAckConfirm:Ie,onRequestConfirm:to,onChangeBugField:G,sprints:$=[],sprintProject:mo=!1,hideSprint:Yo=!1,onChangeSprint:on,onChangeStoryPoints:kn,onChangeResolution:R,onClaimTask:be,onVerifyBug:Be}){let[Ne,He]=pt(null),[so,Do]=pt(null),[Tn,_e]=pt(null),[N,V]=pt(!1),ae={[st]:N?{maxHeight:120,opacity:1,overflow:"hidden",transition:"max-height 0.25s ease, opacity 0.2s ease"}:{minHeight:0,maxHeight:0,opacity:0,overflow:"hidden",pointerEvents:"none",transition:"max-height 0.25s ease, opacity 0.2s ease"}},[xe,Ue]=pt(null),[We,Me]=pt(null),[ko,To]=pt(null),[So,uo]=pt(null),[yn,ze]=pt(null),[gt,$o]=pt(null),[tn,Et]=pt(null),Xe=!!e.is_notice,we=!!e.is_event,Eo=!!e.is_bug,ti=!!be&&pi(e,H),ni=!!be&&fi(e,H),Xn=!!Be&&Eo&&!!e.completed&&H>0&&(e.author_account_seq??0)===H&&!(e.acks??[]).some(E=>E.account_seq===H),Mo=!Pt(e,H),Sn=!e.is_event&&(e.is_notice?H>0&&(e.author_account_seq??0)===H:(e.author_account_seq??0)===H||(e.manager_account_seq??0)===H),Bn=e.is_notice||e.is_event?ye(e.icon||(e.is_notice?no:po)):null,Cn=Xe?!di(e,H):Mo,nn=ti||ni?Ke(ht,{onClick:E=>Et(E.currentTarget),children:[z(P0,{sx:{fontSize:16,mr:.5}}),"\uAC00\uC838\uAC00\uAE30"]}):null,fa=Xe?oa(e,Ye):"",Xo=Xe?wm(e,Ye,H):null,Lo=Xe?null:vi(e,H),xa=!!(Lo&&Lo.total>0||Xe&&Xo),ga=!Xe,Br=Ke(qo,{children:[z(de,{icon:z(M0,{sx:{fontSize:17}}),label:"\uC791\uC131\uC790",sx:[vt(9),ae??null,...we?[]:[io(1)]],children:e.created_by?Ke(qo,{children:[z(Fo,{names:[e.created_by],size:20,avatarSrcByName:n}),e.created_by]}):z(bn,{})}),z(de,{icon:z(ou,{sx:{fontSize:17}}),label:"\uC791\uC131\uC2DC\uAC04",sx:[vt(11),ae??null,...we?[]:[io(2)]],children:e.created_time?Uo(e.created_time):z(bn,{})})]});return Ke(qo,{children:[L?Ke(eo,{sx:{px:2,pt:2,pb:.5,display:"flex",alignItems:"flex-start",gap:1},children:[Sn?z(S0,{checked:e.completed,icon:z(w0,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:z(Gl,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(E,nt)=>{so||Do({anchorEl:E.currentTarget,nextCompleted:nt})},sx:{p:0,mt:.25}}):null,Bn?z(eo,{sx:{display:"flex",p:0,mt:.25,color:e.icon_color||(Xe?"#e5484d":"#1e3a8a")},children:z(Bn,{sx:{fontSize:20}})}):null,z(eo,{sx:{flex:1,minWidth:0},children:Ne!==null?z(eo,{component:"input",autoFocus:!0,spellCheck:!1,value:Ne,onChange:E=>He(E.target.value),onBlur:()=>{Ne.trim()&&Ne.trim()!==e.title&&K(e.seq,Ne.trim()),He(null)},onKeyDown:E=>{E.key==="Enter"&&E.target.blur(),E.key==="Escape"&&He(null)},sx:{width:"100%",border:"none",outline:"none",font:"inherit",fontSize:19,fontWeight:600,color:"#37352f",p:0,m:0}}):z(eo,{onClick:()=>He(e.title),sx:{fontSize:19,fontWeight:600,color:"#37352f",lineHeight:1.35,cursor:"text",textDecoration:e.completed?"line-through":"none",userSelect:"text"},children:e.title})}),z(Re,{open:!!so,anchorEl:so?.anchorEl??null,title:so?.nextCompleted?"\uC774 \uC5C5\uBB34\uB97C \uC644\uB8CC \uCC98\uB9AC\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?":"\uC644\uB8CC\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:so?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>Do(null),onConfirm:()=>{so&&ge(e.seq,so.nextCompleted),Do(null)}})]}):null,Ke(eo,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:0,[st]:{pb:0,"& > :last-child":{mb:0}}},children:[z(Vi,{hideProject:A,pinColumns:!0,values:{tabKey:e.tab_key??"",managerName:e.manager_name,receiverNames:e.receiver_names,startDate:e.start_date,dueDate:e.due_date,reminder:e.reminder,priority:e.priority,eventTime:e.event_time??"",eventPlace:e.event_place??"",eventAddress:e.event_address??""},customTabs:o,avatarSrcByName:n,hideDueDate:!we&&!!e.repeat_rule,hideReminder:!!e.repeat_rule,notice:Xe,event:we,readOnly:Mo,targetSummary:fa,onChangeProject:E=>l(e.seq,E),onAddProject:p,onChangeStartDate:E=>c(e.seq,"start_date",E),onChangeDueDate:E=>c(e.seq,"due_date",E),onChangeReminder:E=>s(e.seq,E),onChangePriority:E=>d(e.seq,E),onChangeEventTime:E=>I?.(e.seq,E),onChangeEventPlace:E=>h?.(e.seq,E),onChangeEventAddress:E=>x?.(e.seq,E),onMemberEdit:E=>g(e,E,null),narrowCollapsedSx:ae,reminderLocked:e.completed,managerAction:nn,leading:Ke(qo,{children:[Xn||nn&&(Xe||we)?Ke(eo,{sx:{gridColumn:"1 / -1",display:"flex",justifyContent:"flex-start",gap:2,px:2,py:1.5},children:[Xe||we?nn:null,Xn?Ke(qo,{children:[z(kr,{variant:"contained",size:"large",onClick:()=>Be?.(e.seq,!0),sx:{bgcolor:"#2f80ed"},children:"\uAC80\uC99D\uC644\uB8CC"}),z(kr,{variant:"outlined",size:"large",color:"error",onClick:()=>Be?.(e.seq,!1),children:"\uC7AC\uC624\uD508"})]}):null]}):null,Eo&&e.ticket_no?z(de,{icon:z(v0,{sx:{fontSize:17}}),label:"\uD2F0\uCF13",sx:io(1),children:z(eo,{component:"span",sx:{fontVariantNumeric:"tabular-nums"},children:e.ticket_no})}):null,we?null:z(eo,{sx:Eo&&e.ticket_no||ga||xa?io(Eo&&e.ticket_no?2:1):{gridColumn:"1 / -1"},children:z(de,{icon:z(D0,{sx:{fontSize:17}}),label:"\uC0C1\uD0DC",onClick:Mo||e.completed?void 0:E=>Ue(E),children:z(Ae,{option:Bo(e)})})}),Xe?null:(()=>{let E=it(e),nt=E==="all"?z(nu,{sx:{fontSize:17,color:"#2f80ed"}}):E==="group"?z(ru,{sx:{fontSize:17,color:"#d9730d"}}):z(tu,{sx:{fontSize:17}}),rn=E==="all"?"\uC804\uCCB4\uACF5\uAC1C":E==="group"?`\uBD80\uC11C\uACF5\uAC1C \xB7 ${v.find(rt=>rt.seq===(e.visibility_group_seq??0))?.name??"\uBD80\uC11C"}`:"\uBE44\uACF5\uAC1C";return z(eo,{sx:we?void 0:io(Eo?1:2),children:z(de,{icon:nt,label:"\uACF5\uAC1C",onClick:Mo||!m?void 0:rt=>Me(rt),children:rn})})})(),!Xe&&!Eo?z(eo,{sx:we?void 0:io(1),children:z(de,{icon:z(z0,{sx:{fontSize:17,...e.repeat_rule?{color:"#2f80ed"}:{}}}),label:"\uBC18\uBCF5",onClick:Mo||!u?void 0:E=>To(E),children:e.repeat_rule?Ni(e.repeat_rule):z(bn,{label:"\uC5C6\uC74C"})})}):null,!Xe&&!Eo&&e.repeat_rule?z(eo,{sx:we?void 0:io(2),children:z(de,{icon:z(q0,{sx:{fontSize:17}}),label:"\uBC18\uBCF5 \uC885\uB8CC",onClick:Mo||!u?void 0:E=>uo(E),children:e.repeat_until?`${e.repeat_until}\uAE4C\uC9C0`:z(bn,{})})}):null,Lo&&Lo.total>0?z(eo,{sx:we?void 0:io(2),children:z(de,{icon:z(jl,{sx:{fontSize:17}}),label:"\uD655\uC778",children:Lo.canConfirm?z(kr,{size:"small",variant:"contained",onClick:()=>Ie?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):Ke(kr,{size:"small",variant:"outlined",color:"inherit",startIcon:Lo.myTime?z(Gl,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:E=>_e({anchorEl:E.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:[Lo.count," / ",Lo.total]})})}):null,Xe&&Xo?z(eo,{sx:io(2),children:z(de,{icon:z(jl,{sx:{fontSize:17}}),label:"\uD655\uC778",children:z(eo,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,minWidth:0},children:Xo.canAck?z(kr,{size:"small",variant:"contained",onClick:()=>Ie?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):z(kr,{size:"small",variant:"outlined",color:"inherit",startIcon:Xo.acked?z(Gl,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:E=>_e({anchorEl:E.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:Xo.total>0&&Xo.count>=Xo.total?"\uC644\uB8CC":Ke(qo,{children:[Xo.count,z(eo,{component:"span",sx:{mx:.4},children:"/"}),Xo.total]})})})})}):null,mo&&!Yo&&!we&&!Xe?Ke(qo,{children:[z(de,{icon:z(I0,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:Mo?void 0:E=>ze(E),sx:io(1),children:(e.sprint_seq??0)>0?$.find(E=>E.seq===e.sprint_seq)?.name??"\uC0AD\uC81C\uB41C \uC2A4\uD504\uB9B0\uD2B8":z(bn,{label:"\uBBF8\uBC30\uC815"})}),z(de,{icon:z(_0,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",sx:io(2),children:z(Yt,{value:(e.story_points??0)>0?String(e.story_points):"",placeholder:"\uBBF8\uCD94\uC815",readOnly:Mo,onCommit:E=>kn?.(e.seq,Number(E.replace(/[^0-9.]/g,""))||0)})})]}):null,we||W?null:z(eo,{sx:[{gridColumn:"1 / -1"},ae??null],children:z(de,{icon:z(E0,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:Mo?void 0:E=>$o(E),children:(e.label_keys??[]).length>0?z(an,{labelKeys:e.label_keys??[],labelOptions:t}):z(bn,{})})}),we?null:Br]}),trailing:Ke(qo,{children:[Eo?z(Ki,{values:{repro:e.bug_repro??"",device:e.bug_device??"",where:e.bug_where??"",version:e.bug_version??"",resolution:e.resolution??""},readOnly:Mo,showResolution:!!e.completed,onChangeRepro:E=>G?.(e.seq,"bug_repro",E),onChangeDevice:E=>G?.(e.seq,"bug_device",E),onChangeWhere:E=>G?.(e.seq,"bug_where",E),onChangeVersion:E=>G?.(e.seq,"bug_version",E),onChangeResolution:E=>R?.(e.seq,E)}):null,we?Br:null,e.completed?Ke(qo,{children:[z(de,{icon:z(jl,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC790",sx:[vt(10),ae??null,...we?[]:[io(1)]],children:e.completed_by?Ke(qo,{children:[z(Fo,{names:[e.completed_by],size:20,avatarSrcByName:n}),e.completed_by]}):z(bn,{})}),z(de,{icon:z(ou,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC2DC\uAC04",sx:[vt(12),ae??null,...we?[]:[io(2)]],children:e.completed_time?Uo(e.completed_time):z(bn,{})})]}):null]})}),Ke(eo,{sx:{display:"none",[st]:{display:"block",mt:1.5,mb:0}},children:[z(Wn,{sx:{borderColor:"#e6e6e3"}}),z(y0,{onClick:()=>V(E=>!E),sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:.5,pt:1.25,pb:1.25,fontSize:13.5,bgcolor:"#f4f4f2",color:"#37352f","&:active":{opacity:.6}},children:N?Ke(qo,{children:["\uC811\uAE30 ",z(B0,{sx:{fontSize:18}})]}):Ke(qo,{children:["\uC815\uBCF4 \uB354\uBCF4\uAE30 ",z(C0,{sx:{fontSize:18}})]})})]}),Ke(eo,{children:[z(Wn,{sx:{my:1.5,borderColor:"#e6e6e3",[st]:{mt:0,mb:1.25}}}),z(tt,{icon:z(O0,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",children:z(eo,{sx:{userSelect:"text"},children:z(Ui,{syncKey:e.seq,value:e.content??"",height:e.content_height??0,onChangeHeight:y?E=>y(e.seq,E):void 0,readOnly:Mo,onChange:E=>O(e.seq,E)})})}),e.is_bug?null:Ke(qo,{children:[z(Wn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),z(tt,{icon:z(R0,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:z(eo,{sx:{userSelect:"text"},children:z(Ym,{value:e.note,readOnly:Cn,onCommit:E=>w(e.seq,E),onDraftChange:S?E=>S(e.seq,E):void 0})})})]}),we?null:Ke(qo,{children:[z(Wn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),z(ji,{taskSeq:e.seq,checklist:e.checklist??[],removeLocked:Cn,onAdd:_,onToggle:M,onRemove:q,onUpdate:B,onReorder:J,onConvertToTask:b,onOpenLinkedTask:f,resolveLinkedTask:k,myAccountSeq:H,linkCandidates:T,linkBaseTask:e,onLinkExistingTask:C})]}),T&&!we&&!Xe&&Qm(e,T)?Ke(qo,{children:[z(Wn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),z(Jm,{task:e,tasks:T,readOnly:Mo,onOpenTask:D,onLink:X,onUnlink:F,onCreateFollowUp:Q})]}):null,z(Wn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),z(Zi,{taskSeq:e.seq,attachments:e.attachments??[],removeLocked:Cn,onAdd:te,onRemove:ue,onPreview:se?E=>se({...E,taskSeq:e.seq}):void 0,onDownload:re?E=>re({...E,taskSeq:e.seq}):void 0})]}),z(Wn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),z(Wm,{taskSeq:e.seq,comments:e.comments??[],currentUserName:U,myAccountSeq:H,avatarSrcByName:n,onUpdate:he,onRemove:ve,onToggleReaction:Se,onPreview:se?E=>se({...E,taskSeq:e.seq}):void 0,onDownload:re?E=>re({...E,taskSeq:e.seq}):void 0})]}),z(er,{anchorEl:xe,value:e.status,options:Xe?Dr:Eo?In:Er,onSelect:E=>r(e.seq,E),onClose:()=>Ue(null)}),z(Kl,{transitionDuration:0,anchorEl:ko,open:!!ko,onClose:()=>To(null),children:[{value:"",label:"\uC5C6\uC74C"},...Wr].map(E=>z(Ul,{selected:(e.repeat_rule??"")===E.value,onClick:()=>{To(null),(async()=>{let nt=e.repeat_rule??"";if(E.value===nt)return;if(E.value===""){await iu({title:"\uBC18\uBCF5 \uD574\uC81C",message:"\uC774\uD6C4 \uBC18\uBCF5 \uD68C\uCC28\uB97C \uBAA8\uB450 \uC0AD\uC81C\uD558\uACE0 \uBC18\uBCF5\uC744 \uD574\uC81C\uD560\uAE4C\uC694? (\uC9C0\uB09C \uD68C\uCC28\uB294 \uB0A8\uC2B5\uB2C8\uB2E4)"})&&u?.(e.seq,"","");return}let rn=String(e.due_date??"").slice(0,10);if(!rn){A0(e.is_event?"\uBC18\uBCF5\uD558\uB824\uBA74 \uC77C\uC815 \uB0A0\uC9DC\uB97C \uBA3C\uC800 \uC120\uD0DD\uD558\uC138\uC694.":"\uBC18\uBCF5\uD558\uB824\uBA74 \uB9C8\uAC10\uC77C\uC2DC\uB97C \uBA3C\uC800 \uC120\uD0DD\uD558\uC138\uC694.");return}nt&&!await iu({title:"\uBC18\uBCF5 \uBCC0\uACBD",message:"\uC774\uD6C4 \uD68C\uCC28\uB97C \uC0C8 \uADDC\uCE59\uC73C\uB85C \uB2E4\uC2DC \uC0DD\uC131\uD560\uAE4C\uC694? \uC774\uD6C4 \uD68C\uCC28\uC758 \uB313\uAE00\xB7\uCCA8\uBD80\uB294 \uC0AC\uB77C\uC9D1\uB2C8\uB2E4."})||u?.(e.seq,E.value,Fi(rn,E.value))})()},sx:{fontSize:14,minWidth:140},children:E.label},E.value||"none"))}),z(L0,{anchorEl:So,open:!!So,onClose:()=>uo(null),selectedDate:e.repeat_until?new Date(`${e.repeat_until}T00:00:00`):new Date,onDateChange:E=>{uo(null);let nt=P=>String(P).padStart(2,"0"),rn=`${E.getFullYear()}-${nt(E.getMonth()+1)}-${nt(E.getDate())}`,rt=e.repeat_rule??"";rt&&u?.(e.seq,rt,rn)}}),z(Kl,{transitionDuration:0,anchorEl:We,open:!!We,onClose:()=>Me(null),children:[{key:"involved",label:"\uBE44\uACF5\uAC1C",icon:z(tu,{sx:{fontSize:17,color:"#57564f"}}),selected:it(e)==="involved",onPick:()=>m?.(e.seq,"involved",0)},{key:"all",label:"\uC804\uCCB4\uACF5\uAC1C",icon:z(nu,{sx:{fontSize:17,color:"#2f80ed"}}),selected:it(e)==="all",onPick:()=>m?.(e.seq,"all",0)},...v.map(E=>({key:`group-${E.seq}`,label:`\uBD80\uC11C\uACF5\uAC1C \xB7 ${E.name}`,icon:z(ru,{sx:{fontSize:17,color:"#d9730d"}}),selected:it(e)==="group"&&(e.visibility_group_seq??0)===E.seq,onPick:()=>m?.(e.seq,"group",E.seq)}))].map(E=>Ke(Ul,{selected:E.selected,onClick:()=>{E.onPick(),Me(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[E.icon,E.label,E.selected?z(eu,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},E.key))}),z(Kl,{transitionDuration:0,anchorEl:yn,open:!!yn,onClose:()=>ze(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...$.filter(E=>`custom-${E.group_seq}`===String(e.tab_key??"")).map(E=>({seq:E.seq,label:et(E)}))].map(E=>Ke(Ul,{onClick:()=>{on?.(e.seq,E.seq),ze(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[E.label,(e.sprint_seq??0)===E.seq?z(eu,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},E.seq))}),z(Ci,{anchorEl:Tn?.anchorEl??null,open:!!Tn?.open,acks:e.acks??[],total:Xo?.total??Lo?.total??0,avatarSrcByName:n,onRequestConfirm:to&&Lo&&Lo.count<Lo.total?()=>{to(e.seq),_e(E=>E?{...E,open:!1}:null)}:void 0,onClose:()=>_e(E=>E?{...E,open:!1}:null)}),z(ea,{anchorEl:gt,selectedKeys:e.label_keys??[],labelOptions:t,onToggle:E=>i(e.seq,mi(e.label_keys??[],E)),onAddLabel:a,onClose:()=>$o(null)}),z(Re,{open:!!tn,anchorEl:tn,title:ti?"\uC774 \uC5C5\uBB34\uB97C \uAC00\uC838\uC640 \uCC45\uC784\uC790\uB97C \uB9E1\uC73C\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?":"\uC774 \uC5C5\uBB34\uC758 \uCC45\uC784\uC790\uB97C \uB9E1\uC73C\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uAC00\uC838\uAC00\uAE30",onCancel:()=>Et(null),onConfirm:()=>{be?.(e.seq),Et(null)}})]})}import{Fragment as K0,jsx as Ao,jsxs as du}from"react/jsx-runtime";function vA(){let e=new Date,o=t=>String(t).padStart(2,"0");return`${e.getFullYear()}-${o(e.getMonth()+1)}-${o(e.getDate())} ${o(e.getHours())}:${o(e.getMinutes())}`}function IA({open:e,task:o,onClose:t,onAddComment:n,onSaveFields:r,myAccountSeq:i=0,onToggleCompleted:a,onChangeTitle:l,onChangeIcon:p,onChangeIconColor:c,activityItems:s,activityLoading:g,onLoadActivity:d,onPrint:m,...u}){let v=Oe(),I=su(null);o&&(I.current=o);let h=o??I.current,[x,w]=cu(!1),[S,O]=cu({}),y=Object.keys(S).length>0;lu(()=>{O({})},[o?.seq,e]);let _=su(null);if(lu(()=>{_.current?.scrollTo({top:0})},[o?.seq]),!h)return null;let M=v&&y?{...h,...S}:h,q=M.checklist??[],B=(k,T)=>{v?O(D=>({...D,...k})):T()},J=()=>{let k=S;O({});let T=h.seq,D=k.title===void 0?void 0:String(k.title).trim();if(r){let X={...k};D!==void 0&&(D?X.title=D:delete X.title),Object.keys(X).length>0&&r(T,X),uu({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"});return}D&&l(T,D),k.icon!==void 0&&p(T,String(k.icon)),k.icon_color!==void 0&&c?.(T,String(k.icon_color)),k.status!==void 0&&u.onChangeStatus(T,k.status),k.label_keys!==void 0&&u.onChangeLabels(T,k.label_keys??[]),k.tab_key!==void 0&&u.onChangeProject(T,String(k.tab_key??"")),k.start_date!==void 0&&u.onChangeDate(T,"start_date",String(k.start_date??"")),k.due_date!==void 0&&u.onChangeDate(T,"due_date",String(k.due_date??"")),k.reminder!==void 0&&u.onChangeReminder(T,k.reminder),k.priority!==void 0&&u.onChangePriority(T,k.priority),k.event_time!==void 0&&u.onChangeEventTime?.(T,String(k.event_time??"")),k.event_place!==void 0&&u.onChangeEventPlace?.(T,String(k.event_place??"")),k.event_address!==void 0&&u.onChangeEventAddress?.(T,String(k.event_address??"")),k.content!==void 0&&u.onChangeContent(T,String(k.content??"")),k.note!==void 0&&u.onChangeNote(T,String(k.note??"")),k.visibility!==void 0&&u.onChangeVisibility?.(T,k.visibility,Number(k.visibility_group_seq??0)),uu({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"})},b={...u,onChangeStatus:(k,T)=>B({status:T},()=>u.onChangeStatus(k,T)),onChangeLabels:(k,T)=>B({label_keys:T},()=>u.onChangeLabels(k,T)),onChangeProject:(k,T)=>B({tab_key:T},()=>u.onChangeProject(k,T)),onChangeDate:(k,T,D)=>B({[T]:D},()=>u.onChangeDate(k,T,D)),onChangeReminder:(k,T)=>B({reminder:T},()=>u.onChangeReminder(k,T)),onChangePriority:(k,T)=>B({priority:T},()=>u.onChangePriority(k,T)),onChangeEventTime:(k,T)=>B({event_time:T},()=>u.onChangeEventTime?.(k,T)),onChangeEventPlace:(k,T)=>B({event_place:T},()=>u.onChangeEventPlace?.(k,T)),onChangeEventAddress:(k,T)=>B({event_address:T},()=>u.onChangeEventAddress?.(k,T)),onChangeContent:(k,T)=>B({content:T},()=>u.onChangeContent(k,T)),onChangeNote:(k,T)=>B({note:T},()=>u.onChangeNote(k,T)),onMemberEdit:(k,T)=>u.onMemberEdit(k,T,v?D=>O(X=>({...X,...D})):null),onChangeNoteDraft:v?(k,T)=>B({note:T},()=>{}):void 0,onChangeVisibility:u.onChangeVisibility?(k,T,D)=>B({visibility:T,visibility_group_seq:D},()=>u.onChangeVisibility?.(k,T,D)):void 0,onAddChecklistItem:(k,T)=>B({checklist:[...q,{label:T,checked:!1}]},()=>u.onAddChecklistItem(k,T)),onToggleChecklistItem:(k,T,D)=>B({checklist:q.map((X,F)=>F===T?{...X,checked:D}:X)},()=>u.onToggleChecklistItem(k,T,D)),onRemoveChecklistItem:(k,T)=>B({checklist:q.filter((D,X)=>X!==T)},()=>u.onRemoveChecklistItem(k,T)),onUpdateChecklistItem:u.onUpdateChecklistItem?(k,T,D)=>B({checklist:q.map((X,F)=>F===T?{...X,label:D}:X)},()=>u.onUpdateChecklistItem?.(k,T,D)):void 0,onReorderChecklist:u.onReorderChecklist?(k,T)=>B({checklist:T},()=>u.onReorderChecklist?.(k,T)):void 0,onLinkChecklistTask:u.onLinkChecklistTask?(k,T,D)=>B({checklist:[...q,{label:D,checked:!1,task_seq:T}]},()=>u.onLinkChecklistTask?.(k,T,D)):void 0},f=Ao(au,{...b,task:M,myAccountSeq:i,onChangeTitle:(k,T)=>B({title:T},()=>l(k,T)),onToggleCompleted:a,onChangeIcon:(k,T)=>B({icon:T},()=>p(k,T)),onChangeIconColor:(k,T)=>B({icon_color:T},()=>c?.(k,T)),showTitle:v}),C=Ao($m,{onSubmit:(k,T)=>n(M.seq,k,T)},M.seq);return v?du(K0,{children:[Ao(V0,{open:e,onClose:t,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:M.is_notice?"\uACF5\uC9C0\uC0AC\uD56D":M.is_event?"\uC77C\uC815":M.is_bug?"\uC624\uB958":"\uC5C5\uBB34",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1},custom:[...d?[{icon:Ao(W0,{sx:{ml:2,color:"#6b7280"}}),tooltip:"\uD65C\uB3D9",onClick:()=>w(!0)}]:[],{icon:Ao(H0,{sx:{ml:d?0:2,color:"#6b7280"}}),tooltip:"\uACF5\uC720\uD558\uAE30",onClick:()=>br(M,!0)},{icon:Ao(N0,{variant:"contained",size:"small",disableElevation:!0,disabled:!y,onClick:y?J:void 0,sx:{ml:1,minWidth:0,px:1.5,py:.35,fontSize:14,fontWeight:600,bgcolor:"#2f80ed","&:hover":{bgcolor:"#2f80ed"},"&.Mui-disabled":{bgcolor:"#e6e6e3",color:"#9a9a97"}},children:"\uC800\uC7A5"}),tooltip:""}]},fullScreen:!0,mobilePresentation:"slide",tabs:{visible:!1},contentTopPadding:0,contentPaddingX:0,sectionsPaddingTop:0,sectionContentPaddingTop:0,contentBottomPadding:0,scrollPastLastSection:!1,overlayScrollbar:{enabled:!0,contentStyle:{minWidth:0}},actions:{visible:!0,showCancelButton:!1,left:C},sx:{DialogContent:{borderBottom:"none"}},dialogActionSx:{padding:"0 !important","@media (max-width:1023.95px)":{padding:"0 !important"},borderTop:"1px solid #37352f","& .left-actions":{flex:1,width:"100%",minWidth:0,"& > *":{flex:1,minWidth:0}},"& .right-actions":{display:"none"}},sections:[{id:"task-detail",title:"",showTitle:!1,children:Ao(ca,{sx:{userSelect:"none",width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:f})}]},h.seq),Ao(la,{open:x,taskSeq:M.seq,items:s,loading:g,onLoad:d,onClose:()=>w(!1)})]}):Ao(F0,{anchor:"right",open:e,onClose:t,disableAutoFocus:!0,disableEnforceFocus:!0,sx:{zIndex:k=>k.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:du(ca,{sx:{display:"flex",flexDirection:"column",height:"100%",userSelect:"none"},children:[Ao(jm,{task:M,myAccountSeq:i,onToggleCompleted:a,onChangeTitle:l,onChangeIcon:p,onChangeIconColor:c,onClose:t,activityItems:s,activityLoading:g,onLoadActivity:d,onPrint:m}),Ao(mu,{sx:{borderColor:"#e6e6e3"}}),Ao(ca,{sx:{flex:1,minHeight:0},children:Ao($0,{ref:_,style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:f})}),Ao(mu,{sx:{borderColor:"#37352f"}}),Ao(ca,{sx:{flexShrink:0},children:C})]})})}import{useEffect as G0,useState as $n}from"react";import{Box as Wo,Button as Ql,IconButton as pu}from"@mui/material";import{FormDialog as j0}from"@ehfuse/mui-form-dialog";import Y0 from"@mui/icons-material/EditOutlined";import{ErrorAlert as fu}from"@ehfuse/alerts";import{ClearTextField as xu,DateTextField as gu,LabelSelect as bu}from"@ehfuse/mui-form-controls";var Yl="custom-";function U0(e){return e.startsWith(Yl)}function DA(e){return e>0?`${Yl}${e}`:""}function Xl(e){if(!U0(e))return 0;let o=Number(e.slice(Yl.length));return Number.isInteger(o)&&o>0?o:0}import{Fragment as Q0,jsx as ao,jsxs as hn}from"react/jsx-runtime";var X0=[{value:"planning",label:"\uACC4\uD68D\uC911"},{value:"active",label:"\uC9C4\uD589\uC911"},{value:"closed",label:"\uC885\uB8CC"}];function hu(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):"-"}function NA({open:e,customTabs:o,sprints:t,onClose:n,onCreate:r,onUpdate:i,onChangeStatus:a,onRemove:l}){let p=o.filter(b=>b.useSprints&&!b.archived),[c,s]=$n(""),[g,d]=$n(""),[m,u]=$n(""),[v,I]=$n(""),[h,x]=$n(""),[w,S]=$n(!1),[O,y]=$n(0);G0(()=>{e&&(s(p.length===1?p[0].key:""),d(""),u(""),I(""),x(""),y(0))},[e]);let _=()=>{d(""),u(""),I(""),x(""),y(0)},M=b=>{y(b.seq),s(`custom-${b.group_seq}`),d(b.name),u(b.goal),I(b.start_date),x(b.end_date)},q=async()=>{let b=Xl(c);if(!b){fu("\uBAA9\uD45C\uB97C \uB9CC\uB4E4 \uD504\uB85C\uC81D\uD2B8\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}if(!g.trim()){fu("\uBAA9\uD45C \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}S(!0);try{if(O>0){i(O,{name:g.trim(),goal:m.trim(),start_date:v,end_date:h}),_();return}await r({group_seq:b,name:g.trim(),goal:m.trim(),start_date:v,end_date:h})&&_()}finally{S(!1)}},B=new Map(o.map(b=>[Xl(b.key),b.label])),J=ao(Wo,{children:p.length===0?ao(Wo,{sx:{py:2,fontSize:14,color:"#787774"},children:'\uBAA9\uD45C\uB97C \uC0AC\uC6A9\uD558\uB294 \uD504\uB85C\uC81D\uD2B8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. \uD504\uB85C\uC81D\uD2B8 \uC218\uC815\uC5D0\uC11C "\uBAA9\uD45C(\uC2A4\uD504\uB9B0\uD2B8) \uC0AC\uC6A9"\uC744 \uBA3C\uC800 \uCF1C\uC138\uC694.'}):hn(Q0,{children:[hn(Wo,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2.5,mt:1},children:[ao(bu,{label:"\uD504\uB85C\uC81D\uD2B8",size:"medium",value:c,options:p.map(b=>({value:b.key,label:b.label})),onChange:b=>s(String(b.target.value)),disabled:O>0}),ao(xu,{label:"\uBAA9\uD45C \uC774\uB984",size:"medium",placeholder:"\uC608: 8\uC6D4 2\uC8FC\uCC28",value:g,onChange:b=>d(b.target.value)}),ao(gu,{size:"medium",label:"\uC2DC\uC791\uC77C",value:v,onChange:b=>I(b.target.value)}),ao(gu,{size:"medium",label:"\uC885\uB8CC\uC77C",value:h,onChange:b=>x(b.target.value)}),ao(xu,{label:"\uC124\uBA85",size:"medium",placeholder:"\uC120\uD0DD \uC785\uB825",value:m,onChange:b=>u(b.target.value),sx:{gridColumn:"1 / -1"}})]}),hn(Wo,{sx:{mt:1.5,display:"flex",justifyContent:"flex-end",gap:1},children:[O>0?ao(Ql,{color:"inherit",onClick:_,disabled:w,children:"\uCDE8\uC18C"}):null,ao(Ql,{variant:"contained",onClick:()=>{q()},disabled:w,children:O>0?"\uBAA9\uD45C \uC800\uC7A5":"\uBAA9\uD45C \uB9CC\uB4E4\uAE30"})]}),ao(Wo,{sx:{mt:2,borderTop:"1px solid #e6e6e3"},children:t.length===0?ao(Wo,{sx:{py:3,textAlign:"center",fontSize:14,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):t.map(b=>hn(Wo,{sx:{display:"flex",flexDirection:"column",gap:1,py:1.75,borderBottom:"1px solid #f0efed"},children:[hn(Wo,{sx:{minWidth:0},children:[hn(Wo,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[ao(Wo,{component:"span",sx:{fontSize:16,fontWeight:600,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:b.name}),ao(Wo,{component:"span",sx:{flexShrink:0,px:1,py:.25,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:13,fontWeight:500},children:B.get(b.group_seq)??"\uC0AD\uC81C\uB41C \uD504\uB85C\uC81D\uD2B8"}),hn(Wo,{component:"span",sx:{flexShrink:0,fontSize:14,color:"#57564f"},children:[hu(b.start_date)," ~ ",hu(b.end_date)]})]}),b.goal?ao(Wo,{sx:{mt:.5,fontSize:14,color:"#787774",lineHeight:1.5},children:b.goal}):null]}),hn(Wo,{sx:{display:"flex",alignItems:"center",gap:.5},children:[ao(bu,{label:"\uC0C1\uD0DC",showLabel:!1,size:"small",value:b.status,options:X0.map(f=>({value:f.value,label:f.label})),onChange:f=>a(b.seq,String(f.target.value)),sx:{width:104,flexShrink:0}}),ao(pu,{"aria-label":"\uBAA9\uD45C \uC218\uC815",onClick:()=>M(b),sx:{color:"#9a9a97","&:hover":{color:"#2563eb"}},children:ao(Y0,{sx:{fontSize:18}})}),ao(pu,{"aria-label":"\uBAA9\uD45C \uC0AD\uC81C",onClick:()=>l(b.seq),sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:ao(Tt,{style:{width:16,height:16}})})]})]},b.seq))})]})});return ao(j0,{open:e,onClose:n,maxWidth:"sm",title:"\uBAA9\uD45C \uAD00\uB9AC",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-sprint-manage",sections:[{id:"sprint-manage",showTitle:!1,children:J}],actions:{showCancelButton:!1,right:ao(Ql,{variant:"contained",onClick:n,children:"\uB2EB\uAE30"})}})}import{useState as ku}from"react";import{Box as ho,Button as Zl,Divider as Z0,IconButton as J0,TextField as eS}from"@mui/material";import{FormDialog as oS}from"@ehfuse/mui-form-dialog";import tS from"@mui/icons-material/OpenInNewOutlined";import nS from"@mui/icons-material/EventOutlined";import{ConfirmDialog as rS}from"@ehfuse/alerts";import{jsx as Le,jsxs as Vn}from"react/jsx-runtime";function YA({open:e,imports:o,onRegister:t,onRemove:n,onClose:r}){let[i,a]=ku(""),[l,p]=ku(!1),c=async()=>{let d=i.trim();if(d){p(!0);try{await t(d)&&a("")}finally{p(!1)}}},s=async d=>{await rS({title:"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",message:`"${d.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}" \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&n(d.seq)},g=Vn(ho,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[Vn(ho,{sx:{color:"#37352f",lineHeight:1.7},children:["\uAD6C\uAE00 \uCE98\uB9B0\uB354\uC758 \uC77C\uC815\uC744 ",Le("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uC5C5\uBB34\uD568 \uCE98\uB9B0\uB354\uC5D0 \uD568\uAED8 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4.",Le("br",{}),"\uD45C\uC2DC/\uC228\uAE40\uC740 \uC5C5\uBB34\uD568 \uC6B0\uC0C1\uB2E8\uC758 ",Le("b",{children:"\uAD6C\uAE00 \uC77C\uC815"})," \uC2A4\uC704\uCE58\uB85C \uCF1C\uACE0 \uB055\uB2C8\uB2E4."]}),Le(ho,{sx:{fontWeight:700,color:"#37352f",mt:.5},children:"\uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354"}),o.length>0?Le(ho,{sx:{display:"flex",flexDirection:"column",border:"1px solid #e6e6e3",borderRadius:1},children:o.map((d,m)=>Vn(ho,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:.75,borderTop:m>0?"1px solid #efefed":"none"},children:[Le(nS,{sx:{fontSize:18,color:"#0f9d58",flexShrink:0}}),Le(ho,{component:"span",sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:d.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),Le(J0,{"aria-label":"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",size:"small",onClick:()=>{s(d)},sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:Le(Tt,{sx:{fontSize:18}})})]},d.seq))}):Le(ho,{sx:{color:"#9a9a97",px:.5},children:"\uC544\uC9C1 \uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}),Le(Z0,{sx:{my:1,borderColor:"#e6e6e3"}}),Le(ho,{sx:{fontWeight:700,color:"#37352f"},children:"\uC0C8 \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30"}),Vn(ho,{sx:{bgcolor:"#f2f6fa",borderRadius:1,px:1.5,py:1.25,mb:1,fontSize:15,lineHeight:1.8,display:"flex",flexDirection:"column",gap:.25,"& > div":{display:"flex",gap:1},"& > div::before":{content:'"\u2022"',flexShrink:0}},children:[Le(ho,{children:Vn(ho,{component:"span",children:["\uAD6C\uAE00 \uCE98\uB9B0\uB354(\uC6F9) > \uC67C\uCABD \uBAA9\uB85D\uC5D0\uC11C \uAC00\uC838\uC62C \uCE98\uB9B0\uB354\uC5D0 \uB9C8\uC6B0\uC2A4\uB97C \uC62C\uB824 \u22EE > ",Le("b",{children:"\uC124\uC815 \uBC0F \uACF5\uC720"}),"\uB97C \uC5FD\uB2C8\uB2E4."]})}),Le(ho,{children:Vn(ho,{component:"span",children:[Le("b",{children:"\uCE98\uB9B0\uB354 \uD1B5\uD569"})," \uC139\uC158\uC758 ",Le("b",{children:'"iCal \uD615\uC2DD\uC758 \uBE44\uBC00 \uC8FC\uC18C"'})," \uB97C \uBCF5\uC0AC\uD574 \uC544\uB798\uC5D0 \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),Le(ho,{children:Le(ho,{component:"span",children:"\uBE44\uBC00 \uC8FC\uC18C\uB294 \uBCF8\uC778 \uC804\uC6A9\uC785\uB2C8\uB2E4. \uC11C\uBC84\uC5D0 \uC800\uC7A5\uB418\uBA70 \uB2E4\uB978 \uC9C1\uC6D0\uC5D0\uAC8C \uBCF4\uC774\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."})}),Le(ho,{children:Le(ho,{component:"span",children:"\uC77C\uC815\uC740 \uC57D 10\uBD84 \uAC04\uACA9\uC73C\uB85C \uAC31\uC2E0\uB418\uACE0, \uBC18\uBCF5 \uC77C\uC815\uC740 \uC77C\uBC18\uC801\uC778 \uADDC\uCE59(\uB9E4\uC77C/\uB9E4\uC8FC/\uB9E4\uC6D4/\uB9E4\uB144)\uB9CC \uC9C0\uC6D0\uD569\uB2C8\uB2E4."})})]}),Vn(ho,{sx:{display:"flex",gap:2,alignItems:"center"},children:[Le(eS,{value:i,onChange:d=>a(d.target.value),fullWidth:!0,label:"\uBE44\uBC00 iCal \uC8FC\uC18C",placeholder:"https://calendar.google.com/calendar/ical/\u2026/basic.ics",slotProps:{input:{spellCheck:!1}}}),Le(Zl,{variant:"contained",disabled:!i.trim()||l,onClick:()=>{c()},sx:{flexShrink:0},children:l?"\uD655\uC778 \uC911\u2026":"\uB4F1\uB85D"})]})]});return Le(oS,{open:e,onClose:r,width:680,title:"\uAD6C\uAE00 \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-calendar-import",sections:[{id:"calendar-import",showTitle:!1,children:g}],actions:{showCancelButton:!1,left:Le(Zl,{variant:"outlined",startIcon:Le(tS,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:Le(Zl,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})}})}import{Box as Jt,Button as Qr,TextField as iS}from"@mui/material";import{FormDialog as aS}from"@ehfuse/mui-form-dialog";import lS from"@mui/icons-material/ContentCopyOutlined";import Tu from"@mui/icons-material/OpenInNewOutlined";import{InfoAlert as yu}from"@ehfuse/alerts";import{Fragment as cS,jsx as lo,jsxs as Kn}from"react/jsx-runtime";function sS(e){return`${window.location.origin}/api/v1/taskbox/calendar/${e}.ics`}function n7({open:e,feed:o,feedTaskCount:t,buildFeedUrl:n,onSubscribe:r,onClose:i}){let a=n??sS,l=o.subscribed?a(o.token):"",p=()=>{navigator.clipboard.writeText(l).then(()=>yu("\uD53C\uB4DC \uC8FC\uC18C\uB97C \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>yu("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uC8FC\uC18C\uB97C \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD558\uC138\uC694."))},c=()=>{let g=l.replace(/^https?:\/\//,"webcal://");window.open(`https://calendar.google.com/calendar/r?cid=${encodeURIComponent(g)}`,"_blank")},s=Kn(Jt,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[Kn(Jt,{sx:{color:"#37352f",lineHeight:1.7},children:["\uB0B4\uAC00 \uAD00\uC5EC\uD55C \uC5C5\uBB34\uB97C ",lo("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0\uC11C \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4."]}),t===0?Kn(Jt,{sx:{color:"#8a6d1d",bgcolor:"#faf1d7",borderRadius:1,px:1.5,py:1.25,lineHeight:1.7},children:["\uC9C0\uAE08\uC740 \uCE98\uB9B0\uB354\uC5D0 \uD45C\uC2DC\uD560 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",lo("br",{}),lo("b",{children:"\uB9C8\uAC10\uC77C\uC2DC\uAC00 \uC788\uB294 \uB0B4 \uC5C5\uBB34 \uB610\uB294 \uBCF4\uB0B8\uC5C5\uBB34"}),"\uAC00 \uC0DD\uAE30\uBA74"," ",o.subscribed?"\uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0 \uC790\uB3D9\uC73C\uB85C \uD45C\uC2DC\uB429\uB2C8\uB2E4.":"\uC5EC\uAE30\uC11C \uAD6C\uB3C5\uC744 \uC2DC\uC791\uD558\uC138\uC694."]}):o.subscribed&&o.enabled?Kn(cS,{children:[lo(iS,{value:l,fullWidth:!0,label:"\uB0B4 \uD53C\uB4DC \uC8FC\uC18C",slotProps:{input:{readOnly:!0}}}),Kn(Jt,{sx:{display:"flex",gap:2},children:[lo(Qr,{variant:"outlined",startIcon:lo(lS,{}),onClick:p,children:"\uC8FC\uC18C \uBCF5\uC0AC"}),lo(Qr,{variant:"contained",startIcon:lo(Tu,{}),onClick:c,children:"Google \uCE98\uB9B0\uB354\uC5D0 \uCD94\uAC00"})]}),Kn(Jt,{sx:{bgcolor:"#f2f6fa",borderRadius:1,px:1.5,py:1.25,fontSize:15,lineHeight:1.8,display:"flex",flexDirection:"column",gap:.25,"& > div":{display:"flex",gap:1},"& > div::before":{content:'"\u2022"',flexShrink:0}},children:[lo(Jt,{children:Kn("span",{children:["\uBC84\uD2BC\uC774 \uB3D9\uC791\uD558\uC9C0 \uC54A\uC73C\uBA74 \uAD6C\uAE00 \uCE98\uB9B0\uB354 > \uB2E4\uB978 \uCE98\uB9B0\uB354 + > ",lo("b",{children:"URL\uB85C \uCD94\uAC00"}),"\uC5D0 \uC704 \uC8FC\uC18C\uB97C \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),lo(Jt,{children:lo("span",{children:"\uAD6C\uAE00\uC774 \uD53C\uB4DC\uB97C \uC8FC\uAE30\uC801\uC73C\uB85C(\uC218 \uC2DC\uAC04 \uAC04\uACA9) \uAC00\uC838\uAC00\uBBC0\uB85C \uBCC0\uACBD\uC0AC\uD56D \uBC18\uC601\uC774 \uB2A6\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4."})}),lo(Jt,{children:lo("span",{children:"\uB0B4\uBCF4\uB0B4\uAE30\uB97C \uADF8\uB9CC\uD558\uB824\uBA74 \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0\uC11C \uCD94\uAC00\uD55C \uCE98\uB9B0\uB354\uB97C \uC0AD\uC81C\uD558\uBA74 \uB429\uB2C8\uB2E4."})}),lo(Jt,{children:lo("span",{children:"\uC774 \uC8FC\uC18C\uB294 \uBCF8\uC778 \uC804\uC6A9\uC785\uB2C8\uB2E4. \uACF5\uC720\uD558\uBA74 \uB0B4 \uC5C5\uBB34 \uC77C\uC815\uC774 \uB178\uCD9C\uB429\uB2C8\uB2E4."})})]})]}):lo(Qr,{variant:"contained",onClick:r,sx:{alignSelf:"flex-start"},children:"\uAD6C\uB3C5 \uC2DC\uC791 (\uD53C\uB4DC \uBC1C\uAE09)"})]});return lo(aS,{open:e,onClose:i,width:680,title:"\uAD6C\uAE00 \uCE98\uB9B0\uB354\uB85C \uB0B4\uBCF4\uB0B4\uAE30",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-calendar-subscribe",sections:[{id:"calendar-subscribe",showTitle:!1,children:s}],actions:{showCancelButton:!1,left:lo(Qr,{variant:"outlined",startIcon:lo(Tu,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:lo(Qr,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}import{useEffect as mS,useMemo as Jl,useState as es}from"react";import{Box as Zr,Button as uS,Typography as dS}from"@mui/material";import{FormDialog as pS}from"@ehfuse/mui-form-dialog";import{SearchTextField as fS}from"@ehfuse/mui-form-controls";import{TreeView as xS}from"@ehfuse/tree-view";import{Fragment as yS,jsx as ft,jsxs as SS}from"react/jsx-runtime";function Su(e){return`${e.name}#${e.seq}`}function gS(e){return Number(e.slice(e.lastIndexOf("#")+1))||0}function bS(e){let o=[],t=n=>{for(let r of n.employees??[])o.push(r);for(let r of n.groups??[])t(r)};for(let n of e)t(n);return o}function hS(e,o){return o?[e.name,e.department,e.role_name,e.work_position].filter(Boolean).some(t=>String(t).toLowerCase().includes(o)):!0}function kS(e){let o=[[e.name,e.role_name].filter(Boolean).join(" "),e.department].filter(Boolean).join(" / ");return{id:`emp:${e.seq}`,label:Su(e),renderLabel:ft(Zr,{component:"span",sx:{display:"inline-flex",alignItems:"baseline",gap:.75},children:ft(Zr,{component:"span",sx:{fontWeight:400,color:"text.primary"},children:o})})}}function Bu(e,o){let t=(e.groups??[]).map(r=>Bu(r,o)).filter(r=>r!==null),n=(e.employees??[]).filter(r=>hS(r,o)).map(kS);return t.length===0&&n.length===0?null:{id:`group:${e.key}`,label:e.name,children:[...t,...n]}}function TS({groups:e,allEmployees:o,initialSelectedSeqs:t,multiple:n,isMobile:r,onSelectionChange:i}){let[a,l]=es(""),p=Jl(()=>e.map(s=>Bu(s,a.trim().toLowerCase())).filter(s=>s!==null),[e,a]),c=Jl(()=>o.filter(s=>t.includes(s.seq)).map(Su),[]);return SS(yS,{children:[ft(Zr,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:ft(fS,{size:"small",fullWidth:!0,placeholder:"\uC774\uB984, \uBD80\uC11C \uAC80\uC0C9",onSearch:l,onClear:()=>l(""),sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),ft(Zr,{sx:r?{display:"flex",flexDirection:"column"}:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:ft(xS,{items:p,checkbox:!0,multiSelect:n,selectionMode:"child",showSearch:!1,defaultExpanded:!0,initialSelections:c,onChange:s=>i(s.map(gS).filter(g=>g>0)),styles:{border:"none",borderRadius:"0"}})})]})}function d7({open:e,title:o="\uC9C1\uC6D0 \uC120\uD0DD",hint:t="",groups:n,multiple:r=!1,selectedSeqs:i,confirmText:a="\uD655\uC778",onConfirm:l,onClose:p}){let c=Oe(),[s,g]=es([]),[d,m]=es(0),u=Jl(()=>bS(n),[n]),v=i??[];mS(()=>{e&&(g(v),m(h=>h+1))},[e]);let I=()=>{let h=u.filter(x=>s.includes(x.seq));l(r?h:h.slice(0,1)),p()};return ft(pS,{open:e,onClose:p,title:`${o}${r&&s.length>0?` (${s.length}\uBA85)`:""}`,locale:"ko",fullScreen:c,mobilePresentation:c?"slide":"dialog",draggable:!0,width:"600px",tabs:{visible:!1},titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},scrollPastLastSection:!1,sectionContentPaddingTop:0,fontScale:{enabled:!0},fontScaleKey:"taskbox-employee-select",sections:[{id:"employee-select",title:"\uC9C1\uC6D0 \uC120\uD0DD",showTitle:!1,children:ft(Zr,{sx:{...c?{}:{height:560},display:"flex",flexDirection:"column",border:"1px solid #cccccc",borderRadius:1,...c?{}:{overflow:"hidden"},userSelect:"none"},children:ft(TS,{groups:n,allEmployees:u,initialSelectedSeqs:v,multiple:r,isMobile:c,onSelectionChange:g},d)})}],dialogActionSx:{"@media (max-width:1023.95px)":{gap:"0.75rem !important","& .left-actions":{flex:1,minWidth:0},"& .right-actions":{flex:1}}},actions:{visible:!0,showCancelButton:!1,left:t?ft(dS,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.35},children:t}):void 0,right:ft(uS,{variant:"contained",onClick:I,children:a})}})}import{useEffect as IS,useMemo as _S,useState as wS}from"react";import{Box as Sr,Button as DS,Divider as ES}from"@mui/material";import{FormDialog as MS}from"@ehfuse/mui-form-dialog";import{LabelSelect as OS}from"@ehfuse/mui-form-controls";import{Box as wt}from"@mui/material";import{jsx as Tr,jsxs as yr}from"react/jsx-runtime";function BS(e,o){let t=o.filter(n=>n.sprint_seq===e.seq&&!n.archived&&n.completed);return{points:t.reduce((n,r)=>n+(r.story_points??0),0),count:t.length}}function Cu({sprints:e,tasks:o,height:t=160}){let r=[...e].sort((s,g)=>`${s.start_date}|${s.seq}`.localeCompare(`${g.start_date}|${g.seq}`)).map(s=>({sprint:s,...BS(s,o)})),i=r.some(s=>s.points>0),a=r.map(s=>i?s.points:s.count),l=Math.max(1,...a),p=r.filter(s=>s.sprint.status==="closed").map(s=>i?s.points:s.count),c=p.length>0?Math.round(p.reduce((s,g)=>s+g,0)/p.length*10)/10:null;return r.length===0?Tr(wt,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uD45C\uC2DC\uD560 \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):yr(wt,{children:[yr(wt,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[yr("span",{children:["\uC644\uB8CC ",i?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uBAA9\uD45C\uBCC4"]}),c!==null?yr("span",{children:["\uD3C9\uADE0(\uC885\uB8CC \uBAA9\uD45C)"," ",Tr(wt,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:c}),i?"SP":"\uAC74"]}):null]}),Tr(wt,{sx:{display:"flex",alignItems:"flex-end",gap:2,height:t,px:.5},children:r.map(s=>{let g=i?s.points:s.count,d=Math.round((t-24)*g/l),m=s.sprint.status==="closed";return yr(wt,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-end",height:"100%"},children:[Tr(wt,{sx:{fontSize:14,fontWeight:700,color:"#37352f",lineHeight:1.5},children:g}),Tr(wt,{sx:{width:"60%",maxWidth:56,height:Math.max(2,d),borderRadius:"4px 4px 0 0",bgcolor:m?"#2f80ed":"#a9c9f5"}})]},s.sprint.seq)})}),Tr(wt,{sx:{display:"flex",gap:2,px:.5,mt:.5},children:r.map(s=>yr(wt,{sx:{flex:1,minWidth:0,textAlign:"center",fontSize:13.5,color:"#000",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[s.sprint.name,s.sprint.status!=="closed"?" (\uC9C4\uD589\uC911)":""]},s.sprint.seq))})]})}import{useMemo as CS}from"react";import{Box as Un}from"@mui/material";import{jsx as Dt,jsxs as Gn}from"react/jsx-runtime";function vu(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?new Date(`${e}T00:00:00`):null}function vS(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function os(e){return e.slice(5).replace("-",".")}function Iu({sprint:e,tasks:o,todayStr:t,height:n=200}){let r=CS(()=>{let h=vu(e.start_date),x=vu(e.end_date);if(!h||!x||x<h||Math.round((x.getTime()-h.getTime())/864e5)+1>366)return null;let S=o.filter(b=>b.sprint_seq===e.seq&&!b.archived);if(S.length===0)return{empty:!0};let O=S.some(b=>(b.story_points??0)>0),y=b=>O?b.story_points??0:1,_=S.reduce((b,f)=>b+y(f),0),M=new Map;for(let b of S){if(!b.completed)continue;let f=(b.completed_time??"").slice(0,10),C=/^\d{4}-\d{2}-\d{2}$/.test(f)?f:e.start_date;M.set(C,(M.get(C)??0)+y(b))}let q=[];for(let b=new Date(h);b<=x;b.setDate(b.getDate()+1))q.push(vS(b));let B=_,J=[];for(let b of q){if(b>t)break;B-=M.get(b)??0,J.push({day:b,value:Math.max(0,B)})}return{empty:!1,days:q,total:_,usePoints:O,actual:J}},[e,o,t]);if(!r)return Dt(Un,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uBAA9\uD45C\uC758 \uC2DC\uC791\uC77C\xB7\uC885\uB8CC\uC77C\uC774 \uC788\uC5B4\uC57C \uBC88\uB2E4\uC6B4\uC744 \uADF8\uB9B4 \uC218 \uC788\uC2B5\uB2C8\uB2E4."});if(r.empty)return Dt(Un,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uBC30\uC815\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."});let{days:i,total:a,usePoints:l,actual:p}=r,c=600,s=200,g=8,d=h=>i.length===1?0:h/(i.length-1)*c,m=h=>g+(s-g*2)*(1-h/Math.max(1,a)),u=`${d(0)},${m(a)} ${d(i.length-1)},${m(0)}`,v=p.map(h=>`${d(i.indexOf(h.day))},${m(h.value)}`).join(" "),I=p[p.length-1];return Gn(Un,{children:[Gn(Un,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[Gn("span",{children:["\uB0A8\uC740 ",l?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uCD1D ",a]}),I?Gn("span",{children:["\uD604\uC7AC"," ",Dt(Un,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:I.value}),l?"SP":"\uAC74"," \uB0A8\uC74C"]}):null]}),Dt(Un,{sx:{border:"1px solid #e6e6e3",borderRadius:1,bgcolor:"#fafaf9",px:1,py:.5},children:Gn("svg",{viewBox:`0 0 ${c} ${s}`,preserveAspectRatio:"none",style:{display:"block",width:"100%",height:n},children:[Dt("line",{x1:0,y1:m(0),x2:c,y2:m(0),stroke:"#e6e6e3",strokeWidth:1}),Dt("polyline",{points:u,fill:"none",stroke:"#9a9a97",strokeWidth:1.5,strokeDasharray:"6 5",vectorEffect:"non-scaling-stroke"}),p.length>1?Dt("polyline",{points:v,fill:"none",stroke:"#2f80ed",strokeWidth:2.5,vectorEffect:"non-scaling-stroke"}):null,I?Dt("circle",{cx:d(i.indexOf(I.day)),cy:m(I.value),r:4,fill:"#2f80ed",vectorEffect:"non-scaling-stroke"}):null]})}),Gn(Un,{sx:{mt:.5,display:"flex",justifyContent:"space-between",fontSize:13.5,color:"#000"},children:[Dt("span",{children:os(e.start_date)}),t>e.start_date&&t<e.end_date?Gn("span",{children:["\uC624\uB298 ",os(t)]}):null,Dt("span",{children:os(e.end_date)})]})]})}import{jsx as en,jsxs as ts}from"react/jsx-runtime";function D7({open:e,sprints:o,tasks:t,todayStr:n,initialSprintSeq:r=0,onClose:i}){let[a,l]=wS(0);IS(()=>{if(!e)return;let s=o.find(d=>d.status==="active")??o[0],g=o.find(d=>d.seq===r)??s;l(g?.seq??0)},[e]);let p=_S(()=>o.find(s=>s.seq===a)??null,[o,a]),c=ts(Sr,{sx:{display:"flex",flexDirection:"column"},children:[ts(Sr,{sx:{px:3,py:2.5},children:[en(Sr,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBCA8\uB85C\uC2DC\uD2F0"}),en(Cu,{sprints:o,tasks:t})]}),en(ES,{sx:{borderColor:"#e6e6e3"}}),ts(Sr,{sx:{px:3,py:2.5},children:[en(Sr,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBC88\uB2E4\uC6B4"}),en(OS,{label:"\uBAA9\uD45C",showLabel:!1,value:a?String(a):"",options:o.map(s=>({value:String(s.seq),label:et(s)})),onChange:s=>l(Number(s.target.value)||0),sx:{width:280,mb:2}}),p?en(Iu,{sprint:p,tasks:t,todayStr:n}):en(Sr,{sx:{py:4,textAlign:"center",fontSize:13.5,color:"#9a9a97"},children:"\uBC88\uB2E4\uC6B4\uC744 \uBCFC \uBAA9\uD45C\uB97C \uC120\uD0DD\uD558\uC138\uC694."})]})]});return en(MS,{open:e,onClose:i,width:680,title:"\uBAA9\uD45C \uCC28\uD2B8",locale:"ko",contentTopPadding:0,contentPaddingX:0,sectionsPaddingTop:0,tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-sprint-charts",sections:[{id:"sprint-charts",showTitle:!1,children:c}],actions:{showCancelButton:!1,right:en(DS,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}import{Checkbox as RS,Divider as PS,Menu as zS,MenuItem as ns}from"@mui/material";import{jsx as Jr,jsxs as _u}from"react/jsx-runtime";function P7({anchorEl:e,candidates:o,selectedNames:t,avatarSrcByName:n,onToggle:r,onClear:i,onClose:a}){return _u(zS,{anchorEl:e,open:!!e,onClose:a,transitionDuration:0,children:[o.length===0?Jr(ns,{disabled:!0,sx:{fontSize:14},children:"\uBAA9\uB85D\uC5D0 \uC9C0\uC815\uB41C \uC0AC\uB78C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):o.map(l=>{let p=t.includes(l.name);return _u(ns,{onClick:()=>r(l),sx:{fontSize:14,minWidth:170,gap:1},children:[Jr(RS,{size:"small",checked:p,sx:{p:0}}),Jr(Fo,{names:[l.name],size:20,avatarSrcByName:n}),l.name]},`${l.accountSeq}-${l.name}`)}),Jr(PS,{}),Jr(ns,{disabled:t.length===0,onClick:i,sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{useState as qS}from"react";import{ButtonBase as AS,Menu as LS,MenuItem as NS}from"@mui/material";import FS from"@mui/icons-material/KeyboardArrowDown";import HS from"@mui/icons-material/Check";import{Fragment as WS,jsx as rs,jsxs as is}from"react/jsx-runtime";function W7({value:e,onChange:o,options:t}){let[n,r]=qS(null),i=t??Ma,a=Ma.find(l=>l.value===e)?.label??"";return is(WS,{children:[is(AS,{onClick:l=>r(l.currentTarget),sx:{display:"flex",alignItems:"center",gap:.5,px:1,py:.5,borderRadius:1,fontSize:13.5,color:"#37352f","&:hover":{bgcolor:"#f2f2f0"}},children:[a,rs(FS,{sx:{fontSize:17,color:"#9a9a97"}})]}),rs(LS,{transitionDuration:0,anchorEl:n,open:!!n,onClose:()=>r(null),children:i.map(l=>is(NS,{selected:l.value===e,onClick:()=>{o(l.value),r(null)},sx:{fontSize:14,minWidth:140,justifyContent:"space-between",gap:1},children:[l.label,l.value===e?rs(HS,{sx:{fontSize:16,color:"#2f80ed"}}):null]},l.value))})]})}import{Box as as,ButtonBase as $S,Divider as VS,Popover as KS}from"@mui/material";import US from"@mui/icons-material/Check";import GS from"@ehfuse/overlay-scrollbar";import{jsx as jn,jsxs as Du}from"react/jsx-runtime";var wu=["#1e3a8a","#2f80ed","#06b6d4","#0fa3a3","#2f9e5b","#84cc16","#e8a33d","#d9730d","#e5484d","#e255a1","#a355c0","#8a5a2b","#57564f","#111827"];function X7({anchorEl:e,value:o,color:t="",onSelect:n,onSelectColor:r,onClose:i}){return jn(KS,{transitionDuration:0,open:!!e,anchorEl:e,onClose:i,anchorOrigin:{vertical:"bottom",horizontal:"left"},marginThreshold:16,slotProps:{paper:{sx:{mt:1,maxHeight:"calc(100dvh - 96px)"}}},children:Du(as,{sx:{width:"min(492px, calc(100vw - 32px))"},children:[jn(GS,{style:{maxHeight:"min(432px, calc(100dvh - 240px))"},contentStyle:{minWidth:0,padding:10},thumb:{width:6},children:jn(Ti,{value:o||Ot,onChange:a=>{n(a),i()}})}),r?Du(as,{sx:{px:1.25,pb:1.25},children:[jn(VS,{sx:{mb:1,borderColor:"#efefed"}}),jn(as,{sx:{display:"flex",flexWrap:"wrap",gap:.75},children:wu.map(a=>{let l=(t||wu[0])===a;return jn($S,{"aria-label":`\uC544\uC774\uCF58 \uC0C9 ${a}`,onClick:()=>r(a),sx:{width:26,height:26,borderRadius:"50%",bgcolor:a,display:"flex",alignItems:"center",justifyContent:"center"},children:l?jn(US,{sx:{fontSize:15,color:"#ffffff"}}):null},a)})})]}):null]})})}import{Box as ua,ButtonBase as jS}from"@mui/material";import{DateTextField as Eu}from"@ehfuse/mui-form-controls";function Yn(e){let o=t=>String(t).padStart(2,"0");return`${e.getFullYear()}-${o(e.getMonth()+1)}-${o(e.getDate())}`}function ma(e,o=new Date){let t=new Date(o);return t.setMonth(t.getMonth()-e),t}function J7(e=new Date){return{fromDate:Yn(ma(1,e)),toDate:Yn(e)}}import{jsx as ei,jsxs as Mu}from"react/jsx-runtime";var YS=[{label:"1\uAC1C\uC6D4",months:1},{label:"3\uAC1C\uC6D4",months:3},{label:"6\uAC1C\uC6D4",months:6},{label:"1\uB144",months:12},{label:"\uC804\uCCB4",months:0}];function Ou({fromDate:e,toDate:o,onChange:t}){let n=i=>{if(i<=0){t("","");return}t(Yn(ma(i)),Yn(new Date))},r=i=>i<=0?!e&&!o:!e||!o?!1:e===Yn(ma(i))&&o===Yn(new Date);return Mu(ua,{sx:{display:"flex",alignItems:"center",gap:1.5,flexWrap:"wrap"},children:[ei(ua,{sx:{display:"flex",alignItems:"center",gap:1.5},children:YS.map(i=>{let a=r(i.months);return ei(jS,{onClick:()=>n(i.months),sx:{px:1.25,py:.85,borderRadius:1,fontSize:13,fontWeight:a?500:400,border:"1px solid",borderColor:a?"#2f80ed":"#dedddb",color:a?"#2f80ed":"#37352f",bgcolor:a?"#eef6ff":"transparent","&:hover":{bgcolor:a?"#eef6ff":"#f7f7f5"}},children:i.label},i.label)})}),Mu(ua,{sx:{display:"flex",alignItems:"center",gap:.5},children:[ei(Eu,{value:e,size:"small",placeholder:"\uC2DC\uC791\uC77C",onChange:i=>t(i.target.value,o),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}}),ei(ua,{component:"span",sx:{fontSize:13,color:"#9a9a97"},children:"~"}),ei(Eu,{value:o,size:"small",placeholder:"\uC885\uB8CC\uC77C",onChange:i=>t(e,i.target.value),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}})]})]})}import{Popover as XS}from"@mui/material";import{jsx as Ru}from"react/jsx-runtime";function sL({anchorEl:e,fromDate:o,toDate:t,onChange:n,onClose:r}){return Ru(XS,{transitionDuration:0,anchorEl:e,open:!!e,onClose:r,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{sx:{p:1.5}}},children:Ru(Ou,{fromDate:o,toDate:t,onChange:n})})}import{Box as QS,ButtonBase as ZS,Tab as JS,Tabs as eB}from"@mui/material";import oB from"@mui/icons-material/Checklist";import tB from"@mui/icons-material/Face";import nB from"@mui/icons-material/Publish";import rB from"@mui/icons-material/NotificationsOutlined";import iB from"@mui/icons-material/BugReportOutlined";import aB from"@mui/icons-material/DescriptionOutlined";import lB from"@mui/icons-material/Inventory2Outlined";import{jsx as xt}from"react/jsx-runtime";function Pu(e,o){return o>0?`${e} (${o})`:e}var yL=[{id:"my",label:"\uC804\uCCB4",icon:xt(oB,{sx:{fontSize:18}})},{id:"notice",label:"\uACF5\uC9C0\uC0AC\uD56D",icon:xt(rB,{sx:{fontSize:18}})},{id:"mine",label:"\uB0B4 \uC5C5\uBB34",icon:xt(tB,{sx:{fontSize:18}})},{id:"sent",label:"\uBCF4\uB0B8 \uC5C5\uBB34",icon:xt(nB,{sx:{fontSize:18}})},{id:"bug",label:"\uC624\uB958",icon:xt(iB,{sx:{fontSize:18}})},{id:"archive",label:"\uBCF4\uAD00\uD568",icon:xt(lB,{sx:{fontSize:18}}),hideCount:!0},{id:"report",label:"\uBCF4\uACE0\uC11C",icon:xt(aB,{sx:{fontSize:18}}),hideCount:!0}];function sB(e){return{minHeight:46,minWidth:75,bgcolor:e.bg,color:e.color,borderRadius:"8px 8px 0 0",padding:"10px 18px",textTransform:"none",fontSize:14,fontWeight:500,border:`1px solid ${e.borderColor}`,borderBottom:"none","&:hover":{bgcolor:e.hoverBg},"&.Mui-selected":{bgcolor:e.selectedBg,color:e.selectedColor,border:`1px solid ${e.selectedBg}`,borderBottom:"none","&:hover":{bgcolor:e.selectedBg}},...e.sx}}function SL({items:e,activeTab:o,counts:t,onChange:n,compact:r=!1}){let i=le(),a=sB(i.tabs),l=e;return r?xt(QS,{sx:{display:"flex",flexWrap:"wrap",gap:1.25},children:l.map(p=>{let c=o===p.id;return xt(ZS,{onClick:()=>n(p.id),sx:{px:1.5,py:.75,borderRadius:1,fontSize:No(13.5),fontWeight:500,whiteSpace:"nowrap",border:"1px solid",bgcolor:c?i.tabs.selectedBg:i.tabs.bg,color:c?i.tabs.selectedColor:i.tabs.color,borderColor:c?i.tabs.selectedBg:i.tabs.borderColor},children:Pu(p.label,p.hideCount?0:t[p.id]??0)},p.id)})}):xt(eB,{value:o,onChange:(p,c)=>n(c),sx:{minHeight:46,"& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:"12px",minHeight:46}},children:l.map(p=>xt(JS,{value:p.id,label:Pu(p.label,p.hideCount?0:t[p.id]??0),icon:p.icon,iconPosition:"start",sx:a},p.id))})}import{useEffect as cB,useMemo as mB,useState as ls}from"react";import{Divider as ss,ListItemIcon as jo,Menu as cs,MenuItem as wo}from"@mui/material";import uB from"@mui/icons-material/OpenInNewOutlined";import dB from"@mui/icons-material/Check";import pB from"@mui/icons-material/CheckCircleOutlined";import fB from"@mui/icons-material/RadioButtonUnchecked";import xB from"@mui/icons-material/SendOutlined";import gB from"@mui/icons-material/EventOutlined";import bB from"@mui/icons-material/PersonOutlineOutlined";import hB from"@mui/icons-material/ViewKanbanOutlined";import kB from"@mui/icons-material/ContentCopyOutlined";import TB from"@mui/icons-material/NextPlanOutlined";import yB from"@mui/icons-material/ContentPasteOutlined";import SB from"@mui/icons-material/ShareOutlined";import BB from"@mui/icons-material/DirectionsRunOutlined";import zu from"@mui/icons-material/ChevronRight";import CB from"@mui/icons-material/ArchiveOutlined";import vB from"@mui/icons-material/UnarchiveOutlined";import{ConfirmDialog as IB}from"@ehfuse/alerts";import{Fragment as _B,jsx as fe,jsxs as yo}from"react/jsx-runtime";function ZL({target:e,onClose:o,customTabs:t,sprints:n=[],myAccountSeq:r=0,onOpenDetail:i,onToggleCompleted:a,onRequestConfirm:l,onChangeDueDate:p,onChangeReminder:c,onMemberEdit:s,onMoveProject:g,onDuplicate:d,onCreateFollowUp:m,onShare:u,onAssignSprint:v,onArchiveToggle:I,onDelete:h}){let x=Oe(),w=bt(),[S,O]=ls(null),[y,_]=ls(null),[M,q]=ls(null);cB(()=>{e||(O(null),_(null),q(null))},[e]);let B=e?.task??null,J=!!B?.is_notice,b=!!B?.is_event,f=B?!Pt(B,r):!1,C=mB(()=>new Set(t.filter(D=>D.useSprints).map(D=>D.key)),[t]),k=async(D="one")=>{let X=B;if(o(),!X)return;await IB({title:"\uC5C5\uBB34 \uC0AD\uC81C",message:D==="series"?`"${X.title}" \uC758 \uC774 \uD68C\uCC28\uC640 \uC774\uD6C4 \uBC18\uBCF5 \uD68C\uCC28\uB97C \uBAA8\uB450 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`:`"${X.title}" \uC5C5\uBB34\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&h(X.seq,D)},T=()=>{B&&I(B.seq,!B.archived),o()};return yo(_B,{children:[yo(cs,{open:!!e,onClose:o,transitionDuration:0,anchorReference:x?"none":"anchorPosition",anchorPosition:!x&&e?{top:e.position.top,left:e.position.left}:void 0,slotProps:{paper:{sx:{minWidth:190,...x?{position:"fixed",top:"50%",left:"50%",translate:"-50% -50%",maxHeight:"70vh"}:{}}},list:x?{sx:{"& .MuiMenuItem-root":{py:1,minHeight:0}}}:void 0},children:[yo(wo,{onClick:()=>{B&&i(B),o()},sx:{fontSize:14},children:[fe(jo,{children:fe(uB,{sx:{fontSize:19}})}),"\uC0C1\uC138 \uC5F4\uAE30"]}),yo(wo,{disabled:J?(B?.author_account_seq??0)!==r:(B?.author_account_seq??0)!==r&&(B?.manager_account_seq??0)!==r,onClick:()=>{B&&a(B.seq,!B.completed),o()},sx:{fontSize:14},children:[fe(jo,{children:B?.completed?fe(fB,{sx:{fontSize:19}}):fe(pB,{sx:{fontSize:19}})}),B?.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC"]}),!J&&l?yo(wo,{disabled:!(B?.manager_account_seq??0)&&(B?.receiver_account_seqs??[]).length===0,onClick:()=>{B&&l(B),o()},sx:{fontSize:14},children:[fe(jo,{children:fe(xB,{sx:{fontSize:19}})}),"\uD655\uC778 \uC694\uCCAD"]}):null,b?null:fe(ss,{}),b?null:yo(wo,{disabled:f,onClick:D=>{B&&O({anchorEl:D.currentTarget,task:B})},sx:{fontSize:14},children:[fe(jo,{children:fe(gB,{sx:{fontSize:19}})}),"\uB9C8\uAC10\uC77C\uC2DC \uBCC0\uACBD"]}),!J&&!b&&s?yo(wo,{onClick:()=>{B&&s(B,"manager"),o()},sx:{fontSize:14},children:[fe(jo,{children:fe(bB,{sx:{fontSize:19}})}),"\uCC45\uC784\uC790 \uBCC0\uACBD"]}):null,b?null:yo(wo,{disabled:f,onClick:D=>{B&&_({anchorEl:D.currentTarget,task:B})},sx:{fontSize:14},children:[fe(jo,{children:fe(hB,{sx:{fontSize:19}})}),"\uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9",fe(zu,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}),fe(ss,{}),d?yo(wo,{disabled:f,onClick:()=>{B&&d(B.seq),o()},sx:{fontSize:14},children:[fe(jo,{children:fe(kB,{sx:{fontSize:19}})}),"\uBCF5\uC81C"]}):null,m&&B&&!B.is_event&&!B.is_notice?yo(wo,{onClick:()=>{B&&m(B.seq),o()},sx:{fontSize:14},children:[fe(jo,{children:fe(TB,{sx:{fontSize:19}})}),"\uD6C4\uC18D \uC5C5\uBB34 \uB9CC\uB4E4\uAE30"]}):null,yo(wo,{onClick:()=>{B&&(u?u(B):br(B,x)),o()},sx:{fontSize:14},children:[fe(jo,{children:x?fe(SB,{sx:{fontSize:19}}):fe(yB,{sx:{fontSize:19}})}),x?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC"]}),B&&!B.is_notice&&!B.is_event&&C.has(String(B.tab_key??""))&&v?yo(wo,{onClick:D=>q(D.currentTarget),sx:{fontSize:14},children:[fe(jo,{children:fe(BB,{sx:{fontSize:19}})}),"\uBAA9\uD45C\uC5D0 \uB123\uAE30",fe(zu,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}):null,yo(wo,{onClick:T,disabled:f||!B?.archived&&!(B&&li(B)),sx:{fontSize:14},children:[fe(jo,{children:B?.archived?fe(vB,{sx:{fontSize:19}}):fe(CB,{sx:{fontSize:19}})}),B?.archived?"\uBCF4\uAD00 \uD574\uC81C":"\uBCF4\uAD00"]}),fe(ss,{}),yo(wo,{disabled:f,onClick:()=>{k("one")},sx:{fontSize:14,color:"#e5484d"},children:[fe(jo,{children:fe(Tt,{sx:{fontSize:19,color:"#e5484d"}})}),(B?.repeat_group_key??0)>0?"\uC0AD\uC81C (\uC774 \uD68C\uCC28\uB9CC)":"\uC0AD\uC81C"]}),(B?.repeat_group_key??0)>0?yo(wo,{disabled:f,onClick:()=>{k("series")},sx:{fontSize:14,color:"#e5484d"},children:[fe(jo,{children:fe(Tt,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC0AD\uC81C (\uC774\uD6C4 \uBC18\uBCF5 \uC804\uCCB4)"]}):null]}),fe(Jo,{anchorEl:S?.anchorEl??null,open:!!S,date:S?.task.due_date??"",reminder:S?.task.reminder??"none",hideReminder:!!S?.task.completed,centered:x,onClose:()=>{O(null),o()},onDateChange:D=>{S&&p(S.task.seq,D)},onReminderChange:D=>{S&&c?.(S.task.seq,D)}}),yo(cs,{transitionDuration:0,anchorEl:y?.anchorEl??null,open:!!y,onClose:()=>{_(null),o()},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...w,children:[fe(wo,{selected:!y?.task.tab_key,onClick:()=>{y&&g(y.task.seq,""),_(null),o()},sx:{fontSize:14,minWidth:170},children:"\uC5C6\uC74C"}),t.filter(D=>!D.archived).map(D=>fe(wo,{selected:y?.task.tab_key===D.key,onClick:()=>{y&&g(y.task.seq,D.key),_(null),o()},sx:{fontSize:14,minWidth:170},children:D.label},D.key))]}),fe(cs,{transitionDuration:0,anchorEl:M,open:!!M,onClose:()=>q(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...n.filter(D=>`custom-${D.group_seq}`===String(B?.tab_key??"")).map(D=>({seq:D.seq,label:et(D)}))].map(D=>yo(wo,{onClick:()=>{B&&v?.(B.seq,D.seq),q(null),o()},sx:{fontSize:14,minWidth:160,gap:1},children:[D.label,(B?.sprint_seq??0)===D.seq?fe(dB,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},D.seq))})]})}import{Checkbox as wB,Divider as DB,Menu as EB,MenuItem as qu}from"@mui/material";import{jsx as da,jsxs as Au}from"react/jsx-runtime";function nN({anchorEl:e,labelOptions:o,selectedKeys:t,onToggle:n,onClear:r,onClose:i}){return Au(EB,{transitionDuration:0,anchorEl:e,open:!!e,onClose:i,children:[o.map(a=>{let l=t.includes(a.key);return Au(qu,{onClick:()=>n(a.key),sx:{fontSize:14,minWidth:190,gap:1},children:[da(wB,{size:"small",checked:l,sx:{p:0}}),da(Ae,{option:a})]},a.key)}),da(DB,{}),da(qu,{disabled:t.length===0,onClick:()=>{r(),i()},sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{Divider as Lu,Menu as MB,MenuItem as ms}from"@mui/material";import OB from"@mui/icons-material/Check";import RB from"@mui/icons-material/BarChartOutlined";import PB from"@mui/icons-material/SettingsOutlined";import{jsx as oi,jsxs as pa}from"react/jsx-runtime";function uN(e){let{anchorEl:o,sprints:t,value:n,onSelect:r,onManage:i,onCharts:a,onClose:l}=e;return pa(MB,{transitionDuration:0,anchorEl:o,open:!!o,onClose:l,children:[[{seq:0,label:"\uC804\uCCB4"},{seq:-1,label:"\uBBF8\uBC30\uC815 \uC5C5\uBB34"},...t.map(p=>({seq:p.seq,label:et(p)}))].map(p=>pa(ms,{onClick:()=>{r(p.seq),l()},sx:{fontSize:14,minWidth:180,gap:1},children:[p.label,n===p.seq?oi(OB,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},p.seq)),oi(Lu,{}),a?pa(ms,{onClick:()=>{l(),a()},sx:{fontSize:14,gap:1},children:[oi(RB,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uCC28\uD2B8"]}):null,a?oi(Lu,{}):null,pa(ms,{onClick:()=>{l(),i()},sx:{fontSize:14,gap:1},children:[oi(PB,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uAD00\uB9AC\u2026"]})]})}var zB={my:"tasks",mine:"tasks",sent:"tasks",notice:"notice",bug:"bug",archive:"archive",done:"done",report:"report"};function qB(e){return zB[e]??"tasks"}var fN={list:"\uBAA9\uB85D",card:"\uD504\uB85C\uC81D\uD2B8",kanban:"\uC0C1\uD0DC",sprint:"\uBAA9\uD45C",calendar:"\uC8FC\uAC04",month:"\uC6D4\uAC04",agenda:"\uC544\uC820\uB2E4",timeline:"\uD0C0\uC784\uB77C\uC778"},Nu=["list","calendar","month","card","kanban","sprint","timeline"],AB=["list","card"];function xN(e){let o=qB(e);switch(o){case"notice":return{kind:o,viewOptions:[],showCreate:!0,createLabel:"\uACF5\uC9C0\uC0AC\uD56D \uB4F1\uB85D",showGroupBy:!1,showSprintFilter:!1,showDateRange:!1,showHideCompleted:!0,forceFlatList:!0,columns:{notice:!0}};case"bug":return{kind:o,viewOptions:Nu,showCreate:!0,createLabel:"\uC624\uB958 \uB4F1\uB85D",showGroupBy:!0,showSprintFilter:!0,showDateRange:!1,showHideCompleted:!0,forceFlatList:!1,columns:{bug:!0}};case"archive":return{kind:o,viewOptions:AB,showCreate:!1,createLabel:"",showGroupBy:!1,showSprintFilter:!1,showDateRange:!0,showHideCompleted:!1,forceFlatList:!0,columns:{showActions:!1}};case"done":return{kind:o,viewOptions:["list"],showCreate:!1,createLabel:"",showGroupBy:!1,showSprintFilter:!1,showDateRange:!0,showHideCompleted:!1,forceFlatList:!0,columns:{showActions:!1}};case"report":return{kind:o,viewOptions:[],showCreate:!1,createLabel:"",showGroupBy:!1,showSprintFilter:!1,showDateRange:!0,showHideCompleted:!1,forceFlatList:!0,columns:{}};default:return{kind:o,viewOptions:Nu,showCreate:!0,createLabel:"\uC5C5\uBB34 \uB4F1\uB85D",showGroupBy:!0,showSprintFilter:!0,showDateRange:!1,showHideCompleted:!0,forceFlatList:!1,columns:e==="mine"?{showRequest:!1,confirmMode:"action"}:e==="sent"?{confirmMode:"time"}:{}}}}export{Q1 as ALL_TASK_VIEWER_ACCOUNT_SEQS,Cm as AddLabelDialog,yi as AddTabDialog,Tm as AttachmentUploadGauge,El as AttachmentUploadPercent,va as BUG_DEVICE_OPTIONS,wr as BUG_ICON_COLOR,s1 as BUG_KANBAN_COLUMNS,Ca as BUG_REPRO_OPTIONS,Ia as BUG_RESOLUTION_OPTIONS,In as BUG_STATUS_OPTIONS,_r as BUG_TASK_ICON,Ki as BugPropertiesGrid,ax as COLUMN_WIDTHS,wa as COMPLETED_STATUS_OPTION,Yl as CUSTOM_TAB_KEY_PREFIX,YA as CalendarImportDialog,n7 as CalendarSubscribeDialog,sn as CommentBubbleIcon,nr as ConfirmCountButton,nc as DATE_REMINDER_OPTIONS,gk as DEFAULT_COMPACT_COLUMNS,ha as DEFAULT_PROJECT_ICON,yL as DEFAULT_TASKBOX_TAB_ITEMS,Ot as DEFAULT_TASK_ICON,Bl as DRAWER_SECTION_TITLE_FONT_SIZE,sL as DateRangeFilterPopover,tt as DrawerSection,Jo as DueDatePickerPopover,Lf as ENDED_EVENT_STATUS_OPTION,Pm as EVENT_ICON_COLOR,po as EVENT_TASK_ICON,d7 as EmployeeSelectDialog,Ma as GROUP_BY_OPTIONS,lr as GoogleEventChip,W7 as GroupByMenuButton,Ti as IconPickerGrid,lm as InlineAddressInput,Yt as InlineTextValue,Da as KANBAN_CLOSED_COLUMN_KEY,nN as LabelFilterMenu,ea as LabelSelectMenu,Er as MANUAL_TASK_STATUS_OPTIONS,P7 as MemberFilterMenu,Dr as NOTICE_STATUS_OPTIONS,no as NOTICE_TASK_ICON,ys as NO_TASK_ICON,ka as PROJECT_ICON_OPTIONS,de as PropertyRow,tr as RECEIVER_AVATAR_COLORS,rc as REMINDER_OPTIONS,Fo as ReceiverAvatarStack,Jm as RelatedTasksSection,LB as STATUS_KEY_REPLIED,us as STATUS_KEY_WAITING,mc as SortableTaskCard,Iu as SprintBurndownChart,D7 as SprintChartsDialog,uN as SprintFilterMenu,NA as SprintManageDialog,Cu as SprintVelocityChart,er as StatusSelectMenu,Pa as TASKBOX_COLUMNS,st as TASKBOX_DRAWER_NARROW_MQ,Ss as TASKBOX_UI_STATE_ID,fN as TASKBOX_VIEW_LABELS,jM as TASKBOX_VIEW_MODES,Wr as TASK_REPEAT_RULE_OPTIONS,vn as TASK_STATUS_OPTIONS,og as TIME_REMINDER_OPTIONS,Ci as TaskAckListPopover,ht as TaskActionButton,la as TaskActivityDialog,Zi as TaskAttachmentsSection,jc as TaskBoxColumnSummary,lR as TaskBoxCompactTable,el as TaskBoxGroupBoard,zO as TaskBoxMobileList,Fc as TaskBoxMonthAgenda,zc as TaskBoxMonthCalendar,sO as TaskBoxSprintColumnSummary,lc as TaskBoxTable,SL as TaskBoxTabs,Uc as TaskBoxTimeline,GM as TaskBoxView,Ec as TaskBoxWeekCalendar,zr as TaskCardContent,ji as TaskChecklistSection,$m as TaskCommentInput,Wm as TaskCommentsSection,Ui as TaskContentEditor,ZL as TaskContextMenu,Vi as TaskCorePropertiesGrid,zl as TaskCreateBody,A2 as TaskCreateDrawer,Ou as TaskDateRangeFilter,au as TaskDetailBody,IA as TaskDetailDrawer,jm as TaskDetailHeader,X7 as TaskIconPickerPopover,an as TaskLabelChips,Gi as TaskLinkDialog,Ym as TaskNoteField,Ko as TaskPriorityChip,Ae as TaskStatusChip,g1 as TaskStatusChips,$u as TaskboxProvider,sS as buildCalendarFeedUrl,Ii as buildCardBaseSx,Ds as buildStatusOptionColors,Oa as buildTaskGroupSections,Fl as buildTaskRelationsModel,r0 as buildTaskShareText,ii as buildTaskboxTheme,Ls as canAssignBugManager,pi as canClaimTaskItem,Ns as canCompleteTaskItem,Pt as canEditTaskItem,di as canViewTaskItem,fi as canVolunteerTaskItem,Hl as countTaskRelations,Yc as countWorkdays,Pf as createTaskboxTheme,Gc as daysLeftUntil,Fi as defaultRepeatUntil,Ta as defaultTaskBoxFormValues,ya as defaultTaskboxUiStateValues,Dm as filterFilesWithinLimit,eD as formatConfirmTime,oO as formatHours,Zo as formatKoreanDate,Uo as formatKoreanDateTime,et as formatSprintOptionLabel,_s as getBugDeviceName,Is as getBugReproName,ai as getBugResolutionName,Nf as getBugStatusOption,J7 as getDefaultDateRange,Mr as getEventDisplayStatusOption,m1 as getNoDueStatusRank,wm as getNoticeAckInfo,ws as getNoticeStatusOption,$P as getNoticeTargetDisplay,PI as getProjectIconAnchorComponent,ye as getProjectIconComponent,$a as getReminderLabel,Wa as getReminderOptions,Ni as getRepeatRuleLabel,ci as getStatusOptionsForTask,xN as getTabHeaderConfig,qa as getTaskBoxColumnDefs,Rs as getTaskBoxGridTemplate,qB as getTaskBoxTabKind,vi as getTaskConfirmInfo,Bo as getTaskDisplayStatusOption,si as getTaskStatusOption,rr as groupGoogleEventsByDate,Xl as groupSeqFromTabKey,Gz as hasRelation,Qm as hasTaskRelations,xT as htmlToPlainText,U0 as isCustomTabKey,As as isOpenPoolTaskItem,_a as isPastEvent,li as isTaskDone,c1 as isWaitingTask,ma as monthsAgoDate,vt as narrowOrderSx,vA as nowDateTimeString,Wh as parseEstimatedHours,Hn as relationsOf,Jn as resolveTaskStatusOptions,Ba as resolveTaskboxTheme,aR as selectDepartmentSharedTasks,br as shareTaskText,tO as sumRemainingHours,oa as summarizeNoticeTargets,DA as tabKeyFromGroupSeq,it as taskVisibilityOf,Yn as toYmd,mi as toggleLabelKey,vr as useBuildFileUrl,km as useTaskAttachmentUploadMeta,Vo as useTaskboxConfig,Df as useTaskboxForm,le as useTaskboxTheme,Rt as useTaskboxUiState,Ir as useUploadMaxMb,io as wideColumnSx};
13
+ `)}function Um(e){navigator.clipboard.writeText(e).then(()=>n0("\uC5C5\uBB34 \uB0B4\uC6A9\uC744 \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>t0("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uB0B4\uC6A9\uC744 \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD574 \uC8FC\uC138\uC694."))}function br(e,o){let t=r0(e);if(o&&typeof navigator.share=="function"){navigator.share({text:t}).catch(n=>{n?.name!=="AbortError"&&Um(t)});return}Um(t)}import{Fragment as u0,jsx as Ve,jsxs as Gm}from"react/jsx-runtime";function jm({task:e,myAccountSeq:o=0,onToggleCompleted:t,onChangeTitle:n,onChangeIcon:r,onChangeIconColor:i,onClose:a,appBarMode:l=!1,activityItems:p,activityLoading:c,onLoadActivity:s,onPrint:g}){let d=Oe(),[m,u]=Nl(!1),[v,I]=Nl(null),[h,x]=Nl(null),w=e.is_notice?ye(e.icon||no):null,S=!!e.is_notice,O=!!e.is_event,y=S&&o>0&&(e.author_account_seq??0)===o,_=!Pt(e,o),M=!O&&(S?y:(e.author_account_seq??0)===o||(e.manager_account_seq??0)===o);return Gm(u0,{children:[Gm(hr,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[l&&a?Ve(Xr,{"aria-label":"\uB4A4\uB85C",onClick:a,sx:{color:"#37352f",ml:-1},children:Ve(a0,{})}):null,M&&!l?Ve(sa,{title:e.completed&&e.completed_by?`${e.completed_by} \xB7 ${Uo(e.completed_time)} \uC644\uB8CC`:"",arrow:!0,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:Ve(hr,{sx:{display:"flex",flexShrink:0,mr:1.5},children:Ve(ht,{onClick:q=>x({anchorEl:q.currentTarget,nextCompleted:!e.completed}),children:e.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC"})})}):null,l||!w?null:Ve(hr,{sx:{display:"flex",px:.5,color:e.icon_color||(S?"#e5484d":"#1e3a8a")},children:Ve(w,{sx:{fontSize:20}})}),v!==null?Ve(hr,{component:"input",autoFocus:!0,spellCheck:!1,value:v,onChange:q=>I(q.target.value),onBlur:()=>{v.trim()&&v.trim()!==e.title&&n(e.seq,v.trim()),I(null)},onKeyDown:q=>{q.key==="Enter"&&q.target.blur(),q.key==="Escape"&&I(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:18,fontWeight:500,color:"#37352f",p:0,m:0}}):l?Ve(hr,{sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:S?"\uACF5\uC9C0":O?"\uC77C\uC815":e.is_bug?"\uC624\uB958":"\uC5C5\uBB34"}):Ve(hr,{onClick:_?void 0:()=>I(e.title),sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:_?"default":"text",textDecoration:e.completed?"line-through":"none"},children:e.title}),s?Ve(sa,{title:"\uD65C\uB3D9",arrow:!0,children:Ve(Xr,{"aria-label":"\uD65C\uB3D9",onClick:()=>u(!0),sx:{color:"#6b7280"},children:Ve(c0,{sx:{fontSize:20}})})}):null,Ve(sa,{title:d?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:Ve(Xr,{"aria-label":d?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>br(e,d),sx:{color:"#6b7280"},children:d?Ve(l0,{sx:{fontSize:20}}):Ve(s0,{sx:{fontSize:20}})})}),g?Ve(sa,{title:"\uC778\uC1C4",arrow:!0,children:Ve(Xr,{"aria-label":"\uC778\uC1C4",onClick:()=>g(e),sx:{color:"#6b7280"},children:Ve(m0,{sx:{fontSize:20}})})}):null,a&&!l?Ve(Xr,{"aria-label":"\uB2EB\uAE30",onClick:a,sx:{color:"#6b7280"},children:Ve(i0,{})}):null]}),Ve(Re,{open:!!h,anchorEl:h?.anchorEl??null,title:h?.nextCompleted?"\uC774 \uC5C5\uBB34\uB97C \uC644\uB8CC \uCC98\uB9AC\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?":"\uC644\uB8CC\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:h?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>x(null),onConfirm:()=>{h&&t(e.seq,h.nextCompleted),x(null)}}),Ve(la,{open:m,taskSeq:e.seq,items:p,loading:c,onLoad:s,onClose:()=>u(!1)})]})}import{useState as pt}from"react";import{Box as eo,Button as kr,ButtonBase as y0,Checkbox as S0,Divider as Wn,Menu as Kl,MenuItem as Ul}from"@mui/material";import B0 from"@mui/icons-material/ExpandLess";import C0 from"@mui/icons-material/ExpandMore";import v0 from"@mui/icons-material/ConfirmationNumberOutlined";import eu from"@mui/icons-material/Check";import I0 from"@mui/icons-material/DirectionsRunOutlined";import _0 from"@mui/icons-material/SpeedOutlined";import Gl from"@mui/icons-material/CheckCircle";import w0 from"@mui/icons-material/CheckCircleOutlineOutlined";import jl from"@mui/icons-material/CheckCircleOutlined";import ou from"@mui/icons-material/AccessTimeOutlined";import D0 from"@mui/icons-material/AutorenewOutlined";import E0 from"@mui/icons-material/LabelOutlined";import M0 from"@mui/icons-material/PersonOutlineOutlined";import O0 from"@mui/icons-material/SubjectOutlined";import R0 from"@mui/icons-material/StickyNote2Outlined";import P0 from"@mui/icons-material/PanToolAltOutlined";import tu from"@mui/icons-material/LockOutlined";import nu from"@mui/icons-material/PublicOutlined";import ru from"@mui/icons-material/Group";import z0 from"@mui/icons-material/Repeat";import q0 from"@mui/icons-material/EventOutlined";import{ConfirmDialog as iu,InfoAlert as A0}from"@ehfuse/alerts";import{DatePicker as L0}from"@ehfuse/mui-datetime-picker";import{useState as d0}from"react";import{TextField as p0}from"@ehfuse/mui-form-controls";import{jsx as f0}from"react/jsx-runtime";function Ym({value:e,onCommit:o,onDraftChange:t,readOnly:n=!1}){let[r,i]=d0(null);return f0(p0,{value:r??e,placeholder:n?"":"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",slotProps:{input:{readOnly:n}},onChange:a=>{i(a.target.value),t?.(a.target.value)},onBlur:()=>{r!==null&&r.trim()!==e&&o(r),i(null)},onKeyDown:a=>{a.key==="Enter"&&a.target.blur(),a.key==="Escape"&&i(null)},sx:{mt:1}})}import{useMemo as Wl,useState as $l}from"react";import{Box as _o,Button as Zm,IconButton as x0}from"@mui/material";import g0 from"@mui/icons-material/AccountTreeOutlined";import b0 from"@mui/icons-material/Add";import h0 from"@mui/icons-material/Close";import k0 from"@mui/icons-material/NextPlanOutlined";function Hn(e){return e.relations??[]}function Gz(e,o,t){return Hn(e).some(n=>n.type===t&&n.task_seq===o.seq)||Hn(o).some(n=>n.type===t&&n.task_seq===e.seq)}function Xm(e){return`${e.created_time??""}|${String(e.seq).padStart(12,"0")}`}function Fl(e,o){let t=new Map(o.map(m=>[m.seq,m]));t.set(e.seq,e);let n=new Map,r=(m,u)=>{n.has(m)||n.set(m,new Set),n.has(u)||n.set(u,new Set),n.get(m).add(u),n.get(u).add(m)};for(let m of t.values())for(let u of Hn(m))u.type==="follow_up"&&t.has(u.task_seq)&&r(m.seq,u.task_seq);let i=new Set([e.seq]),a=[e.seq];for(;a.length>0;){let m=a.shift();for(let u of n.get(m)??[])i.has(u)||(i.add(u),a.push(u))}let l=[...i].map(m=>t.get(m)).filter(m=>!!m).sort((m,u)=>Xm(m).localeCompare(Xm(u))),p=new Set;for(let m of Hn(e))m.type==="related"&&p.add(m.task_seq);for(let m of t.values())m.seq!==e.seq&&Hn(m).some(u=>u.type==="related"&&u.task_seq===e.seq)&&p.add(m.seq);let c=[...p].map(m=>t.get(m)).filter(m=>m!==void 0&&m.seq!==e.seq),s=[...t.values()].filter(m=>m.seq!==e.seq&&Hn(m).some(u=>u.type==="duplicate_of"&&u.task_seq===e.seq)),g=Hn(e).find(m=>m.type==="duplicate_of")?.task_seq,d=g?t.get(g)??null:null;return{lineage:l,related:c,duplicates:s,duplicateOf:d}}function Hl(e,o){let t=Fl(e,o);return(t.lineage.length>=2?t.lineage.length-1:0)+t.related.length+t.duplicates.length+(t.duplicateOf?1:0)}function Qm(e,o){return Hl(e,o)>0}import{Fragment as T0,jsx as je,jsxs as dt}from"react/jsx-runtime";function Vl({item:e,caption:o,onOpen:t,onUnlink:n}){let r=e.is_notice||e.is_event?ye(e.icon||(e.is_notice?no:po)):null;return dt(_o,{sx:{display:"flex",alignItems:"center",gap:.75,px:1.25,py:.5,borderRadius:1,"&:hover":{bgcolor:"#f7f7f5"},"&:hover .taskbox-relation-unlink":{opacity:1}},children:[o?je(_o,{component:"span",sx:{flexShrink:0,px:.6,py:.1,borderRadius:.75,fontSize:11.5,fontWeight:500,color:"#8a6d1d",bgcolor:"#faf1d7"},children:o}):null,r?je(r,{sx:{fontSize:16,flexShrink:0,color:e.icon_color||"#1e3a8a"}}):null,dt(_o,{component:"span",onClick:t,sx:{flex:1,minWidth:0,fontSize:14,color:e.completed?"#9a9a97":"#37352f",textDecoration:e.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...t?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[e.ticket_no?`${e.ticket_no} `:"",e.title]}),je(Ae,{option:Bo(e),small:!0}),n?je(x0,{className:"taskbox-relation-unlink",size:"small","aria-label":"\uC5F0\uACB0 \uD574\uC81C",onClick:n,sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:je(h0,{sx:{fontSize:15}})}):null]})}function Jm({task:e,tasks:o,readOnly:t=!1,onOpenTask:n,onLink:r,onUnlink:i,onCreateFollowUp:a}){let[l,p]=$l(!1),[c,s]=$l(null),[g,d]=$l(null),m=Wl(()=>Fl(e,o),[e,o]),u=m.lineage.length>=2,v=Wl(()=>Hl(e,o),[e,o]),I=Wl(()=>{let x=new Set;for(let w of m.lineage)x.add(w.seq);for(let w of m.related)x.add(w.seq);for(let w of m.duplicates)x.add(w.seq);return m.duplicateOf&&x.add(m.duplicateOf.seq),[...x]},[m]),h=(x,w,S)=>{d({anchorEl:x,targetSeq:w,type:S})};return dt(tt,{icon:je(g0,{sx:{fontSize:19,display:"block"}}),title:dt(T0,{children:["\uAD00\uB828 \uC5C5\uBB34",v>0?je(_o,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:v}):null]}),titleExtra:t?null:dt(_o,{sx:{ml:"auto",display:"flex",alignItems:"center",gap:.5},children:[a?je(Zm,{size:"small",color:"inherit",startIcon:je(k0,{sx:{fontSize:16}}),onClick:x=>s(x.currentTarget),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uD6C4\uC18D \uC5C5\uBB34"}):null,r?je(Zm,{size:"small",color:"inherit",startIcon:je(b0,{sx:{fontSize:16}}),onClick:()=>p(!0),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uC5F0\uACB0"}):null]}),children:[dt(_o,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:[u?je(_o,{sx:{mb:m.related.length||m.duplicates.length||m.duplicateOf?1:0},children:m.lineage.map((x,w)=>{let S=x.seq===e.seq,O=w===m.lineage.length-1;return dt(_o,{sx:{display:"flex",gap:1},children:[dt(_o,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:14,flexShrink:0,pt:1.1},children:[je(_o,{sx:{width:S?9:7,height:S?9:7,borderRadius:"50%",bgcolor:S?"#2f80ed":x.completed?"#9a9a97":"#c9c8c5",flexShrink:0}}),O?null:je(_o,{sx:{width:"2px",flex:1,bgcolor:"#e6e6e3"}})]}),dt(_o,{sx:{flex:1,minWidth:0,pb:O?0:.5},children:[dt(_o,{sx:{display:"flex",alignItems:"center",gap:.75},children:[dt(_o,{component:"span",onClick:!S&&n?()=>n(x.seq):void 0,sx:{minWidth:0,fontSize:14,fontWeight:S?600:400,color:S?"#2f80ed":x.completed?"#9a9a97":"#37352f",textDecoration:x.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...!S&&n?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[x.ticket_no?`${x.ticket_no} `:"",x.title]}),je(Ae,{option:Bo(x),small:!0})]}),je(_o,{sx:{fontSize:12,color:"#9a9a97"},children:x.completed&&x.completed_time?`${x.completed_time} \uC644\uB8CC`:x.created_time??""})]})]},x.seq)})}):null,m.duplicateOf?je(Vl,{item:m.duplicateOf,caption:"\uC6D0\uBCF8",onOpen:n?()=>n(m.duplicateOf.seq):void 0,onUnlink:!t&&i?x=>h(x.currentTarget,m.duplicateOf.seq,"duplicate_of"):void 0}):null,m.duplicates.map(x=>je(Vl,{item:x,caption:"\uC911\uBCF5",onOpen:n?()=>n(x.seq):void 0,onUnlink:!t&&i?w=>h(w.currentTarget,x.seq,"duplicate_of"):void 0},`dup-${x.seq}`)),m.related.map(x=>je(Vl,{item:x,onOpen:n?()=>n(x.seq):void 0,onUnlink:!t&&i?w=>h(w.currentTarget,x.seq,"related"):void 0},`rel-${x.seq}`)),v===0?je(_o,{sx:{px:1.25,py:.75,fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]}),r?je(Gi,{open:l,task:e,tasks:o,excludeSeqs:I,onClose:()=>p(!1),onSubmit:(x,w)=>r(e.seq,x,w)}):null,je(Re,{open:!!c,anchorEl:c,title:"\uC774 \uC5C5\uBB34\uC5D0\uC11C \uC774\uC5B4\uC9C0\uB294 \uD6C4\uC18D \uC5C5\uBB34\uB97C \uB9CC\uB4DC\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uB9CC\uB4E4\uAE30",onCancel:()=>s(null),onConfirm:()=>{a?.(e.seq),s(null)}}),je(Re,{open:!!g,anchorEl:g?.anchorEl??null,title:"\uC774 \uC5C5\uBB34\uC640\uC758 \uC5F0\uACB0\uC744 \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uD574\uC81C",onCancel:()=>d(null),onConfirm:()=>{g&&i?.(e.seq,g.targetSeq,g.type),d(null)}})]})}import{Fragment as qo,jsx as z,jsxs as Ke}from"react/jsx-runtime";function bn({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return z(eo,{component:"span",sx:{color:"#9a9a97"},children:e})}function au({task:e,customTabs:o,statusOptions:t,avatarSrcByName:n,onChangeStatus:r,onChangeLabels:i,onAddLabelOption:a,onChangeProject:l,onAddProject:p,onChangeDate:c,onChangeReminder:s,onMemberEdit:g,onChangePriority:d,onChangeVisibility:m,onChangeRepeat:u,departments:v=[],onChangeEventTime:I,onChangeEventPlace:h,onChangeEventAddress:x,onChangeNote:w,onChangeNoteDraft:S,onChangeContent:O,onChangeContentHeight:y,onAddChecklistItem:_,onToggleChecklistItem:M,onRemoveChecklistItem:q,onUpdateChecklistItem:B,onReorderChecklist:J,onConvertChecklistToTask:b,onOpenChecklistTask:f,onLinkChecklistTask:C,resolveChecklistTask:k,relatedTasksPool:T,onOpenRelatedTask:D,onLinkRelatedTask:X,onUnlinkRelatedTask:F,onCreateFollowUpTask:Q,onAddAttachments:te,onRemoveAttachment:ue,onPreview:se,onDownload:re,onUpdateComment:he,onRemoveComment:ve,onToggleCommentReaction:Se,currentUserName:U="",myAccountSeq:H=0,noticeAdmin:ie=!1,hideProject:A=!1,hideLabel:W=!1,showTitle:L=!1,onChangeTitle:K,onToggleCompleted:ge,onChangeIcon:Ee,onChangeIconColor:oo,employees:Ye=[],onAckConfirm:Ie,onRequestConfirm:to,onChangeBugField:G,sprints:$=[],sprintProject:mo=!1,hideSprint:Yo=!1,onChangeSprint:on,onChangeStoryPoints:kn,onChangeResolution:R,onClaimTask:be,onVerifyBug:Be}){let[Ne,He]=pt(null),[so,Do]=pt(null),[Tn,_e]=pt(null),[N,V]=pt(!1),ae={[st]:N?{maxHeight:120,opacity:1,overflow:"hidden",transition:"max-height 0.25s ease, opacity 0.2s ease"}:{minHeight:0,maxHeight:0,opacity:0,overflow:"hidden",pointerEvents:"none",transition:"max-height 0.25s ease, opacity 0.2s ease"}},[xe,Ue]=pt(null),[We,Me]=pt(null),[ko,To]=pt(null),[So,uo]=pt(null),[yn,ze]=pt(null),[gt,$o]=pt(null),[tn,Et]=pt(null),Xe=!!e.is_notice,we=!!e.is_event,Eo=!!e.is_bug,ti=!!be&&pi(e,H),ni=!!be&&fi(e,H),Xn=!!Be&&Eo&&!!e.completed&&H>0&&(e.author_account_seq??0)===H&&!(e.acks??[]).some(E=>E.account_seq===H),Mo=!Pt(e,H),Sn=!e.is_event&&(e.is_notice?H>0&&(e.author_account_seq??0)===H:(e.author_account_seq??0)===H||(e.manager_account_seq??0)===H),Bn=e.is_notice||e.is_event?ye(e.icon||(e.is_notice?no:po)):null,Cn=Xe?!di(e,H):Mo,nn=ti||ni?Ke(ht,{onClick:E=>Et(E.currentTarget),children:[z(P0,{sx:{fontSize:16,mr:.5}}),"\uAC00\uC838\uAC00\uAE30"]}):null,fa=Xe?oa(e,Ye):"",Xo=Xe?wm(e,Ye,H):null,Lo=Xe?null:vi(e,H),xa=!!(Lo&&Lo.total>0||Xe&&Xo),ga=!Xe,Br=Ke(qo,{children:[z(de,{icon:z(M0,{sx:{fontSize:17}}),label:"\uC791\uC131\uC790",sx:[vt(9),ae??null,...we?[]:[io(1)]],children:e.created_by?Ke(qo,{children:[z(Fo,{names:[e.created_by],size:20,avatarSrcByName:n}),e.created_by]}):z(bn,{})}),z(de,{icon:z(ou,{sx:{fontSize:17}}),label:"\uC791\uC131\uC77C\uC2DC",sx:[vt(11),ae??null,...we?[]:[io(2)]],children:e.created_time?Uo(e.created_time):z(bn,{})})]});return Ke(qo,{children:[L?Ke(eo,{sx:{px:2,pt:2,pb:.5,display:"flex",alignItems:"flex-start",gap:1},children:[Sn?z(S0,{checked:e.completed,icon:z(w0,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:z(Gl,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(E,nt)=>{so||Do({anchorEl:E.currentTarget,nextCompleted:nt})},sx:{p:0,mt:.25}}):null,Bn?z(eo,{sx:{display:"flex",p:0,mt:.25,color:e.icon_color||(Xe?"#e5484d":"#1e3a8a")},children:z(Bn,{sx:{fontSize:20}})}):null,z(eo,{sx:{flex:1,minWidth:0},children:Ne!==null?z(eo,{component:"input",autoFocus:!0,spellCheck:!1,value:Ne,onChange:E=>He(E.target.value),onBlur:()=>{Ne.trim()&&Ne.trim()!==e.title&&K(e.seq,Ne.trim()),He(null)},onKeyDown:E=>{E.key==="Enter"&&E.target.blur(),E.key==="Escape"&&He(null)},sx:{width:"100%",border:"none",outline:"none",font:"inherit",fontSize:19,fontWeight:600,color:"#37352f",p:0,m:0}}):z(eo,{onClick:()=>He(e.title),sx:{fontSize:19,fontWeight:600,color:"#37352f",lineHeight:1.35,cursor:"text",textDecoration:e.completed?"line-through":"none",userSelect:"text"},children:e.title})}),z(Re,{open:!!so,anchorEl:so?.anchorEl??null,title:so?.nextCompleted?"\uC774 \uC5C5\uBB34\uB97C \uC644\uB8CC \uCC98\uB9AC\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?":"\uC644\uB8CC\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:so?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>Do(null),onConfirm:()=>{so&&ge(e.seq,so.nextCompleted),Do(null)}})]}):null,Ke(eo,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:0,[st]:{pb:0,"& > :last-child":{mb:0}}},children:[z(Vi,{hideProject:A,pinColumns:!0,values:{tabKey:e.tab_key??"",managerName:e.manager_name,receiverNames:e.receiver_names,startDate:e.start_date,dueDate:e.due_date,reminder:e.reminder,priority:e.priority,eventTime:e.event_time??"",eventPlace:e.event_place??"",eventAddress:e.event_address??""},customTabs:o,avatarSrcByName:n,hideDueDate:!we&&!!e.repeat_rule,hideReminder:!!e.repeat_rule,notice:Xe,event:we,readOnly:Mo,targetSummary:fa,onChangeProject:E=>l(e.seq,E),onAddProject:p,onChangeStartDate:E=>c(e.seq,"start_date",E),onChangeDueDate:E=>c(e.seq,"due_date",E),onChangeReminder:E=>s(e.seq,E),onChangePriority:E=>d(e.seq,E),onChangeEventTime:E=>I?.(e.seq,E),onChangeEventPlace:E=>h?.(e.seq,E),onChangeEventAddress:E=>x?.(e.seq,E),onMemberEdit:E=>g(e,E,null),narrowCollapsedSx:ae,reminderLocked:e.completed,managerAction:nn,leading:Ke(qo,{children:[Xn||nn&&(Xe||we)?Ke(eo,{sx:{gridColumn:"1 / -1",display:"flex",justifyContent:"flex-start",gap:2,px:2,py:1.5},children:[Xe||we?nn:null,Xn?Ke(qo,{children:[z(kr,{variant:"contained",size:"large",onClick:()=>Be?.(e.seq,!0),sx:{bgcolor:"#2f80ed"},children:"\uAC80\uC99D\uC644\uB8CC"}),z(kr,{variant:"outlined",size:"large",color:"error",onClick:()=>Be?.(e.seq,!1),children:"\uC7AC\uC624\uD508"})]}):null]}):null,Eo&&e.ticket_no?z(de,{icon:z(v0,{sx:{fontSize:17}}),label:"\uD2F0\uCF13",sx:io(1),children:z(eo,{component:"span",sx:{fontVariantNumeric:"tabular-nums"},children:e.ticket_no})}):null,we?null:z(eo,{sx:Eo&&e.ticket_no||ga||xa?io(Eo&&e.ticket_no?2:1):{gridColumn:"1 / -1"},children:z(de,{icon:z(D0,{sx:{fontSize:17}}),label:"\uC0C1\uD0DC",onClick:Mo||e.completed?void 0:E=>Ue(E),children:z(Ae,{option:Bo(e)})})}),Xe?null:(()=>{let E=it(e),nt=E==="all"?z(nu,{sx:{fontSize:17,color:"#2f80ed"}}):E==="group"?z(ru,{sx:{fontSize:17,color:"#d9730d"}}):z(tu,{sx:{fontSize:17}}),rn=E==="all"?"\uC804\uCCB4\uACF5\uAC1C":E==="group"?`\uBD80\uC11C\uACF5\uAC1C \xB7 ${v.find(rt=>rt.seq===(e.visibility_group_seq??0))?.name??"\uBD80\uC11C"}`:"\uBE44\uACF5\uAC1C";return z(eo,{sx:we?void 0:io(Eo?1:2),children:z(de,{icon:nt,label:"\uACF5\uAC1C",onClick:Mo||!m?void 0:rt=>Me(rt),children:rn})})})(),!Xe&&!Eo?z(eo,{sx:we?void 0:io(1),children:z(de,{icon:z(z0,{sx:{fontSize:17,...e.repeat_rule?{color:"#2f80ed"}:{}}}),label:"\uBC18\uBCF5",onClick:Mo||!u?void 0:E=>To(E),children:e.repeat_rule?Ni(e.repeat_rule):z(bn,{label:"\uC5C6\uC74C"})})}):null,!Xe&&!Eo&&e.repeat_rule?z(eo,{sx:we?void 0:io(2),children:z(de,{icon:z(q0,{sx:{fontSize:17}}),label:"\uBC18\uBCF5 \uC885\uB8CC",onClick:Mo||!u?void 0:E=>uo(E),children:e.repeat_until?`${e.repeat_until}\uAE4C\uC9C0`:z(bn,{})})}):null,Lo&&Lo.total>0?z(eo,{sx:we?void 0:io(2),children:z(de,{icon:z(jl,{sx:{fontSize:17}}),label:"\uD655\uC778",children:Lo.canConfirm?z(kr,{size:"small",variant:"contained",onClick:()=>Ie?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):Ke(kr,{size:"small",variant:"outlined",color:"inherit",startIcon:Lo.myTime?z(Gl,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:E=>_e({anchorEl:E.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:[Lo.count," / ",Lo.total]})})}):null,Xe&&Xo?z(eo,{sx:io(2),children:z(de,{icon:z(jl,{sx:{fontSize:17}}),label:"\uD655\uC778",children:z(eo,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,minWidth:0},children:Xo.canAck?z(kr,{size:"small",variant:"contained",onClick:()=>Ie?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):z(kr,{size:"small",variant:"outlined",color:"inherit",startIcon:Xo.acked?z(Gl,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:E=>_e({anchorEl:E.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:Xo.total>0&&Xo.count>=Xo.total?"\uC644\uB8CC":Ke(qo,{children:[Xo.count,z(eo,{component:"span",sx:{mx:.4},children:"/"}),Xo.total]})})})})}):null,mo&&!Yo&&!we&&!Xe?Ke(qo,{children:[z(de,{icon:z(I0,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:Mo?void 0:E=>ze(E),sx:io(1),children:(e.sprint_seq??0)>0?$.find(E=>E.seq===e.sprint_seq)?.name??"\uC0AD\uC81C\uB41C \uC2A4\uD504\uB9B0\uD2B8":z(bn,{label:"\uBBF8\uBC30\uC815"})}),z(de,{icon:z(_0,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",sx:io(2),children:z(Yt,{value:(e.story_points??0)>0?String(e.story_points):"",placeholder:"\uBBF8\uCD94\uC815",readOnly:Mo,onCommit:E=>kn?.(e.seq,Number(E.replace(/[^0-9.]/g,""))||0)})})]}):null,we||W?null:z(eo,{sx:[{gridColumn:"1 / -1"},ae??null],children:z(de,{icon:z(E0,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:Mo?void 0:E=>$o(E),children:(e.label_keys??[]).length>0?z(an,{labelKeys:e.label_keys??[],labelOptions:t}):z(bn,{})})}),we?null:Br]}),trailing:Ke(qo,{children:[Eo?z(Ki,{values:{repro:e.bug_repro??"",device:e.bug_device??"",where:e.bug_where??"",version:e.bug_version??"",resolution:e.resolution??""},readOnly:Mo,showResolution:!!e.completed,onChangeRepro:E=>G?.(e.seq,"bug_repro",E),onChangeDevice:E=>G?.(e.seq,"bug_device",E),onChangeWhere:E=>G?.(e.seq,"bug_where",E),onChangeVersion:E=>G?.(e.seq,"bug_version",E),onChangeResolution:E=>R?.(e.seq,E)}):null,we?Br:null,e.completed?Ke(qo,{children:[z(de,{icon:z(jl,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC790",sx:[vt(10),ae??null,...we?[]:[io(1)]],children:e.completed_by?Ke(qo,{children:[z(Fo,{names:[e.completed_by],size:20,avatarSrcByName:n}),e.completed_by]}):z(bn,{})}),z(de,{icon:z(ou,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC77C\uC2DC",sx:[vt(12),ae??null,...we?[]:[io(2)]],children:e.completed_time?Uo(e.completed_time):z(bn,{})})]}):null]})}),Ke(eo,{sx:{display:"none",[st]:{display:"block",mt:1.5,mb:0}},children:[z(Wn,{sx:{borderColor:"#e6e6e3"}}),z(y0,{onClick:()=>V(E=>!E),sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:.5,pt:1.25,pb:1.25,fontSize:13.5,bgcolor:"#f4f4f2",color:"#37352f","&:active":{opacity:.6}},children:N?Ke(qo,{children:["\uC811\uAE30 ",z(B0,{sx:{fontSize:18}})]}):Ke(qo,{children:["\uC815\uBCF4 \uB354\uBCF4\uAE30 ",z(C0,{sx:{fontSize:18}})]})})]}),Ke(eo,{children:[z(Wn,{sx:{my:1.5,borderColor:"#e6e6e3",[st]:{mt:0,mb:1.25}}}),z(tt,{icon:z(O0,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",children:z(eo,{sx:{userSelect:"text"},children:z(Ui,{syncKey:e.seq,value:e.content??"",height:e.content_height??0,onChangeHeight:y?E=>y(e.seq,E):void 0,readOnly:Mo,onChange:E=>O(e.seq,E)})})}),e.is_bug?null:Ke(qo,{children:[z(Wn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),z(tt,{icon:z(R0,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:z(eo,{sx:{userSelect:"text"},children:z(Ym,{value:e.note,readOnly:Cn,onCommit:E=>w(e.seq,E),onDraftChange:S?E=>S(e.seq,E):void 0})})})]}),we?null:Ke(qo,{children:[z(Wn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),z(ji,{taskSeq:e.seq,checklist:e.checklist??[],removeLocked:Cn,onAdd:_,onToggle:M,onRemove:q,onUpdate:B,onReorder:J,onConvertToTask:b,onOpenLinkedTask:f,resolveLinkedTask:k,myAccountSeq:H,linkCandidates:T,linkBaseTask:e,onLinkExistingTask:C})]}),T&&!we&&!Xe&&Qm(e,T)?Ke(qo,{children:[z(Wn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),z(Jm,{task:e,tasks:T,readOnly:Mo,onOpenTask:D,onLink:X,onUnlink:F,onCreateFollowUp:Q})]}):null,z(Wn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),z(Zi,{taskSeq:e.seq,attachments:e.attachments??[],removeLocked:Cn,onAdd:te,onRemove:ue,onPreview:se?E=>se({...E,taskSeq:e.seq}):void 0,onDownload:re?E=>re({...E,taskSeq:e.seq}):void 0})]}),z(Wn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),z(Wm,{taskSeq:e.seq,comments:e.comments??[],currentUserName:U,myAccountSeq:H,avatarSrcByName:n,onUpdate:he,onRemove:ve,onToggleReaction:Se,onPreview:se?E=>se({...E,taskSeq:e.seq}):void 0,onDownload:re?E=>re({...E,taskSeq:e.seq}):void 0})]}),z(er,{anchorEl:xe,value:e.status,options:Xe?Dr:Eo?In:Er,onSelect:E=>r(e.seq,E),onClose:()=>Ue(null)}),z(Kl,{transitionDuration:0,anchorEl:ko,open:!!ko,onClose:()=>To(null),children:[{value:"",label:"\uC5C6\uC74C"},...Wr].map(E=>z(Ul,{selected:(e.repeat_rule??"")===E.value,onClick:()=>{To(null),(async()=>{let nt=e.repeat_rule??"";if(E.value===nt)return;if(E.value===""){await iu({title:"\uBC18\uBCF5 \uD574\uC81C",message:"\uC774\uD6C4 \uBC18\uBCF5 \uD68C\uCC28\uB97C \uBAA8\uB450 \uC0AD\uC81C\uD558\uACE0 \uBC18\uBCF5\uC744 \uD574\uC81C\uD560\uAE4C\uC694? (\uC9C0\uB09C \uD68C\uCC28\uB294 \uB0A8\uC2B5\uB2C8\uB2E4)"})&&u?.(e.seq,"","");return}let rn=String(e.due_date??"").slice(0,10);if(!rn){A0(e.is_event?"\uBC18\uBCF5\uD558\uB824\uBA74 \uC77C\uC815 \uB0A0\uC9DC\uB97C \uBA3C\uC800 \uC120\uD0DD\uD558\uC138\uC694.":"\uBC18\uBCF5\uD558\uB824\uBA74 \uB9C8\uAC10\uC77C\uC2DC\uB97C \uBA3C\uC800 \uC120\uD0DD\uD558\uC138\uC694.");return}nt&&!await iu({title:"\uBC18\uBCF5 \uBCC0\uACBD",message:"\uC774\uD6C4 \uD68C\uCC28\uB97C \uC0C8 \uADDC\uCE59\uC73C\uB85C \uB2E4\uC2DC \uC0DD\uC131\uD560\uAE4C\uC694? \uC774\uD6C4 \uD68C\uCC28\uC758 \uB313\uAE00\xB7\uCCA8\uBD80\uB294 \uC0AC\uB77C\uC9D1\uB2C8\uB2E4."})||u?.(e.seq,E.value,Fi(rn,E.value))})()},sx:{fontSize:14,minWidth:140},children:E.label},E.value||"none"))}),z(L0,{anchorEl:So,open:!!So,onClose:()=>uo(null),selectedDate:e.repeat_until?new Date(`${e.repeat_until}T00:00:00`):new Date,onDateChange:E=>{uo(null);let nt=P=>String(P).padStart(2,"0"),rn=`${E.getFullYear()}-${nt(E.getMonth()+1)}-${nt(E.getDate())}`,rt=e.repeat_rule??"";rt&&u?.(e.seq,rt,rn)}}),z(Kl,{transitionDuration:0,anchorEl:We,open:!!We,onClose:()=>Me(null),children:[{key:"involved",label:"\uBE44\uACF5\uAC1C",icon:z(tu,{sx:{fontSize:17,color:"#57564f"}}),selected:it(e)==="involved",onPick:()=>m?.(e.seq,"involved",0)},{key:"all",label:"\uC804\uCCB4\uACF5\uAC1C",icon:z(nu,{sx:{fontSize:17,color:"#2f80ed"}}),selected:it(e)==="all",onPick:()=>m?.(e.seq,"all",0)},...v.map(E=>({key:`group-${E.seq}`,label:`\uBD80\uC11C\uACF5\uAC1C \xB7 ${E.name}`,icon:z(ru,{sx:{fontSize:17,color:"#d9730d"}}),selected:it(e)==="group"&&(e.visibility_group_seq??0)===E.seq,onPick:()=>m?.(e.seq,"group",E.seq)}))].map(E=>Ke(Ul,{selected:E.selected,onClick:()=>{E.onPick(),Me(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[E.icon,E.label,E.selected?z(eu,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},E.key))}),z(Kl,{transitionDuration:0,anchorEl:yn,open:!!yn,onClose:()=>ze(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...$.filter(E=>`custom-${E.group_seq}`===String(e.tab_key??"")).map(E=>({seq:E.seq,label:et(E)}))].map(E=>Ke(Ul,{onClick:()=>{on?.(e.seq,E.seq),ze(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[E.label,(e.sprint_seq??0)===E.seq?z(eu,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},E.seq))}),z(Ci,{anchorEl:Tn?.anchorEl??null,open:!!Tn?.open,acks:e.acks??[],total:Xo?.total??Lo?.total??0,avatarSrcByName:n,onRequestConfirm:to&&Lo&&Lo.count<Lo.total?()=>{to(e.seq),_e(E=>E?{...E,open:!1}:null)}:void 0,onClose:()=>_e(E=>E?{...E,open:!1}:null)}),z(ea,{anchorEl:gt,selectedKeys:e.label_keys??[],labelOptions:t,onToggle:E=>i(e.seq,mi(e.label_keys??[],E)),onAddLabel:a,onClose:()=>$o(null)}),z(Re,{open:!!tn,anchorEl:tn,title:ti?"\uC774 \uC5C5\uBB34\uB97C \uAC00\uC838\uC640 \uCC45\uC784\uC790\uB97C \uB9E1\uC73C\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?":"\uC774 \uC5C5\uBB34\uC758 \uCC45\uC784\uC790\uB97C \uB9E1\uC73C\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uAC00\uC838\uAC00\uAE30",onCancel:()=>Et(null),onConfirm:()=>{be?.(e.seq),Et(null)}})]})}import{Fragment as K0,jsx as Ao,jsxs as du}from"react/jsx-runtime";function vA(){let e=new Date,o=t=>String(t).padStart(2,"0");return`${e.getFullYear()}-${o(e.getMonth()+1)}-${o(e.getDate())} ${o(e.getHours())}:${o(e.getMinutes())}`}function IA({open:e,task:o,onClose:t,onAddComment:n,onSaveFields:r,myAccountSeq:i=0,onToggleCompleted:a,onChangeTitle:l,onChangeIcon:p,onChangeIconColor:c,activityItems:s,activityLoading:g,onLoadActivity:d,onPrint:m,...u}){let v=Oe(),I=su(null);o&&(I.current=o);let h=o??I.current,[x,w]=cu(!1),[S,O]=cu({}),y=Object.keys(S).length>0;lu(()=>{O({})},[o?.seq,e]);let _=su(null);if(lu(()=>{_.current?.scrollTo({top:0})},[o?.seq]),!h)return null;let M=v&&y?{...h,...S}:h,q=M.checklist??[],B=(k,T)=>{v?O(D=>({...D,...k})):T()},J=()=>{let k=S;O({});let T=h.seq,D=k.title===void 0?void 0:String(k.title).trim();if(r){let X={...k};D!==void 0&&(D?X.title=D:delete X.title),Object.keys(X).length>0&&r(T,X),uu({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"});return}D&&l(T,D),k.icon!==void 0&&p(T,String(k.icon)),k.icon_color!==void 0&&c?.(T,String(k.icon_color)),k.status!==void 0&&u.onChangeStatus(T,k.status),k.label_keys!==void 0&&u.onChangeLabels(T,k.label_keys??[]),k.tab_key!==void 0&&u.onChangeProject(T,String(k.tab_key??"")),k.start_date!==void 0&&u.onChangeDate(T,"start_date",String(k.start_date??"")),k.due_date!==void 0&&u.onChangeDate(T,"due_date",String(k.due_date??"")),k.reminder!==void 0&&u.onChangeReminder(T,k.reminder),k.priority!==void 0&&u.onChangePriority(T,k.priority),k.event_time!==void 0&&u.onChangeEventTime?.(T,String(k.event_time??"")),k.event_place!==void 0&&u.onChangeEventPlace?.(T,String(k.event_place??"")),k.event_address!==void 0&&u.onChangeEventAddress?.(T,String(k.event_address??"")),k.content!==void 0&&u.onChangeContent(T,String(k.content??"")),k.note!==void 0&&u.onChangeNote(T,String(k.note??"")),k.visibility!==void 0&&u.onChangeVisibility?.(T,k.visibility,Number(k.visibility_group_seq??0)),uu({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"})},b={...u,onChangeStatus:(k,T)=>B({status:T},()=>u.onChangeStatus(k,T)),onChangeLabels:(k,T)=>B({label_keys:T},()=>u.onChangeLabels(k,T)),onChangeProject:(k,T)=>B({tab_key:T},()=>u.onChangeProject(k,T)),onChangeDate:(k,T,D)=>B({[T]:D},()=>u.onChangeDate(k,T,D)),onChangeReminder:(k,T)=>B({reminder:T},()=>u.onChangeReminder(k,T)),onChangePriority:(k,T)=>B({priority:T},()=>u.onChangePriority(k,T)),onChangeEventTime:(k,T)=>B({event_time:T},()=>u.onChangeEventTime?.(k,T)),onChangeEventPlace:(k,T)=>B({event_place:T},()=>u.onChangeEventPlace?.(k,T)),onChangeEventAddress:(k,T)=>B({event_address:T},()=>u.onChangeEventAddress?.(k,T)),onChangeContent:(k,T)=>B({content:T},()=>u.onChangeContent(k,T)),onChangeNote:(k,T)=>B({note:T},()=>u.onChangeNote(k,T)),onMemberEdit:(k,T)=>u.onMemberEdit(k,T,v?D=>O(X=>({...X,...D})):null),onChangeNoteDraft:v?(k,T)=>B({note:T},()=>{}):void 0,onChangeVisibility:u.onChangeVisibility?(k,T,D)=>B({visibility:T,visibility_group_seq:D},()=>u.onChangeVisibility?.(k,T,D)):void 0,onAddChecklistItem:(k,T)=>B({checklist:[...q,{label:T,checked:!1}]},()=>u.onAddChecklistItem(k,T)),onToggleChecklistItem:(k,T,D)=>B({checklist:q.map((X,F)=>F===T?{...X,checked:D}:X)},()=>u.onToggleChecklistItem(k,T,D)),onRemoveChecklistItem:(k,T)=>B({checklist:q.filter((D,X)=>X!==T)},()=>u.onRemoveChecklistItem(k,T)),onUpdateChecklistItem:u.onUpdateChecklistItem?(k,T,D)=>B({checklist:q.map((X,F)=>F===T?{...X,label:D}:X)},()=>u.onUpdateChecklistItem?.(k,T,D)):void 0,onReorderChecklist:u.onReorderChecklist?(k,T)=>B({checklist:T},()=>u.onReorderChecklist?.(k,T)):void 0,onLinkChecklistTask:u.onLinkChecklistTask?(k,T,D)=>B({checklist:[...q,{label:D,checked:!1,task_seq:T}]},()=>u.onLinkChecklistTask?.(k,T,D)):void 0},f=Ao(au,{...b,task:M,myAccountSeq:i,onChangeTitle:(k,T)=>B({title:T},()=>l(k,T)),onToggleCompleted:a,onChangeIcon:(k,T)=>B({icon:T},()=>p(k,T)),onChangeIconColor:(k,T)=>B({icon_color:T},()=>c?.(k,T)),showTitle:v}),C=Ao($m,{onSubmit:(k,T)=>n(M.seq,k,T)},M.seq);return v?du(K0,{children:[Ao(V0,{open:e,onClose:t,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:M.is_notice?"\uACF5\uC9C0\uC0AC\uD56D":M.is_event?"\uC77C\uC815":M.is_bug?"\uC624\uB958":"\uC5C5\uBB34",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1},custom:[...d?[{icon:Ao(W0,{sx:{ml:2,color:"#6b7280"}}),tooltip:"\uD65C\uB3D9",onClick:()=>w(!0)}]:[],{icon:Ao(H0,{sx:{ml:d?0:2,color:"#6b7280"}}),tooltip:"\uACF5\uC720\uD558\uAE30",onClick:()=>br(M,!0)},{icon:Ao(N0,{variant:"contained",size:"small",disableElevation:!0,disabled:!y,onClick:y?J:void 0,sx:{ml:1,minWidth:0,px:1.5,py:.35,fontSize:14,fontWeight:600,bgcolor:"#2f80ed","&:hover":{bgcolor:"#2f80ed"},"&.Mui-disabled":{bgcolor:"#e6e6e3",color:"#9a9a97"}},children:"\uC800\uC7A5"}),tooltip:""}]},fullScreen:!0,mobilePresentation:"slide",tabs:{visible:!1},contentTopPadding:0,contentPaddingX:0,sectionsPaddingTop:0,sectionContentPaddingTop:0,contentBottomPadding:0,scrollPastLastSection:!1,overlayScrollbar:{enabled:!0,contentStyle:{minWidth:0}},actions:{visible:!0,showCancelButton:!1,left:C},sx:{DialogContent:{borderBottom:"none"}},dialogActionSx:{padding:"0 !important","@media (max-width:1023.95px)":{padding:"0 !important"},borderTop:"1px solid #37352f","& .left-actions":{flex:1,width:"100%",minWidth:0,"& > *":{flex:1,minWidth:0}},"& .right-actions":{display:"none"}},sections:[{id:"task-detail",title:"",showTitle:!1,children:Ao(ca,{sx:{userSelect:"none",width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:f})}]},h.seq),Ao(la,{open:x,taskSeq:M.seq,items:s,loading:g,onLoad:d,onClose:()=>w(!1)})]}):Ao(F0,{anchor:"right",open:e,onClose:t,disableAutoFocus:!0,disableEnforceFocus:!0,sx:{zIndex:k=>k.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:du(ca,{sx:{display:"flex",flexDirection:"column",height:"100%",userSelect:"none"},children:[Ao(jm,{task:M,myAccountSeq:i,onToggleCompleted:a,onChangeTitle:l,onChangeIcon:p,onChangeIconColor:c,onClose:t,activityItems:s,activityLoading:g,onLoadActivity:d,onPrint:m}),Ao(mu,{sx:{borderColor:"#e6e6e3"}}),Ao(ca,{sx:{flex:1,minHeight:0},children:Ao($0,{ref:_,style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:f})}),Ao(mu,{sx:{borderColor:"#37352f"}}),Ao(ca,{sx:{flexShrink:0},children:C})]})})}import{useEffect as G0,useState as $n}from"react";import{Box as Wo,Button as Ql,IconButton as pu}from"@mui/material";import{FormDialog as j0}from"@ehfuse/mui-form-dialog";import Y0 from"@mui/icons-material/EditOutlined";import{ErrorAlert as fu}from"@ehfuse/alerts";import{ClearTextField as xu,DateTextField as gu,LabelSelect as bu}from"@ehfuse/mui-form-controls";var Yl="custom-";function U0(e){return e.startsWith(Yl)}function DA(e){return e>0?`${Yl}${e}`:""}function Xl(e){if(!U0(e))return 0;let o=Number(e.slice(Yl.length));return Number.isInteger(o)&&o>0?o:0}import{Fragment as Q0,jsx as ao,jsxs as hn}from"react/jsx-runtime";var X0=[{value:"planning",label:"\uACC4\uD68D\uC911"},{value:"active",label:"\uC9C4\uD589\uC911"},{value:"closed",label:"\uC885\uB8CC"}];function hu(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):"-"}function NA({open:e,customTabs:o,sprints:t,onClose:n,onCreate:r,onUpdate:i,onChangeStatus:a,onRemove:l}){let p=o.filter(b=>b.useSprints&&!b.archived),[c,s]=$n(""),[g,d]=$n(""),[m,u]=$n(""),[v,I]=$n(""),[h,x]=$n(""),[w,S]=$n(!1),[O,y]=$n(0);G0(()=>{e&&(s(p.length===1?p[0].key:""),d(""),u(""),I(""),x(""),y(0))},[e]);let _=()=>{d(""),u(""),I(""),x(""),y(0)},M=b=>{y(b.seq),s(`custom-${b.group_seq}`),d(b.name),u(b.goal),I(b.start_date),x(b.end_date)},q=async()=>{let b=Xl(c);if(!b){fu("\uBAA9\uD45C\uB97C \uB9CC\uB4E4 \uD504\uB85C\uC81D\uD2B8\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}if(!g.trim()){fu("\uBAA9\uD45C \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}S(!0);try{if(O>0){i(O,{name:g.trim(),goal:m.trim(),start_date:v,end_date:h}),_();return}await r({group_seq:b,name:g.trim(),goal:m.trim(),start_date:v,end_date:h})&&_()}finally{S(!1)}},B=new Map(o.map(b=>[Xl(b.key),b.label])),J=ao(Wo,{children:p.length===0?ao(Wo,{sx:{py:2,fontSize:14,color:"#787774"},children:'\uBAA9\uD45C\uB97C \uC0AC\uC6A9\uD558\uB294 \uD504\uB85C\uC81D\uD2B8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. \uD504\uB85C\uC81D\uD2B8 \uC218\uC815\uC5D0\uC11C "\uBAA9\uD45C(\uC2A4\uD504\uB9B0\uD2B8) \uC0AC\uC6A9"\uC744 \uBA3C\uC800 \uCF1C\uC138\uC694.'}):hn(Q0,{children:[hn(Wo,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2.5,mt:1},children:[ao(bu,{label:"\uD504\uB85C\uC81D\uD2B8",size:"medium",value:c,options:p.map(b=>({value:b.key,label:b.label})),onChange:b=>s(String(b.target.value)),disabled:O>0}),ao(xu,{label:"\uBAA9\uD45C \uC774\uB984",size:"medium",placeholder:"\uC608: 8\uC6D4 2\uC8FC\uCC28",value:g,onChange:b=>d(b.target.value)}),ao(gu,{size:"medium",label:"\uC2DC\uC791\uC77C",value:v,onChange:b=>I(b.target.value)}),ao(gu,{size:"medium",label:"\uC885\uB8CC\uC77C",value:h,onChange:b=>x(b.target.value)}),ao(xu,{label:"\uC124\uBA85",size:"medium",placeholder:"\uC120\uD0DD \uC785\uB825",value:m,onChange:b=>u(b.target.value),sx:{gridColumn:"1 / -1"}})]}),hn(Wo,{sx:{mt:1.5,display:"flex",justifyContent:"flex-end",gap:1},children:[O>0?ao(Ql,{color:"inherit",onClick:_,disabled:w,children:"\uCDE8\uC18C"}):null,ao(Ql,{variant:"contained",onClick:()=>{q()},disabled:w,children:O>0?"\uBAA9\uD45C \uC800\uC7A5":"\uBAA9\uD45C \uB9CC\uB4E4\uAE30"})]}),ao(Wo,{sx:{mt:2,borderTop:"1px solid #e6e6e3"},children:t.length===0?ao(Wo,{sx:{py:3,textAlign:"center",fontSize:14,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):t.map(b=>hn(Wo,{sx:{display:"flex",flexDirection:"column",gap:1,py:1.75,borderBottom:"1px solid #f0efed"},children:[hn(Wo,{sx:{minWidth:0},children:[hn(Wo,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[ao(Wo,{component:"span",sx:{fontSize:16,fontWeight:600,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:b.name}),ao(Wo,{component:"span",sx:{flexShrink:0,px:1,py:.25,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:13,fontWeight:500},children:B.get(b.group_seq)??"\uC0AD\uC81C\uB41C \uD504\uB85C\uC81D\uD2B8"}),hn(Wo,{component:"span",sx:{flexShrink:0,fontSize:14,color:"#57564f"},children:[hu(b.start_date)," ~ ",hu(b.end_date)]})]}),b.goal?ao(Wo,{sx:{mt:.5,fontSize:14,color:"#787774",lineHeight:1.5},children:b.goal}):null]}),hn(Wo,{sx:{display:"flex",alignItems:"center",gap:.5},children:[ao(bu,{label:"\uC0C1\uD0DC",showLabel:!1,size:"small",value:b.status,options:X0.map(f=>({value:f.value,label:f.label})),onChange:f=>a(b.seq,String(f.target.value)),sx:{width:104,flexShrink:0}}),ao(pu,{"aria-label":"\uBAA9\uD45C \uC218\uC815",onClick:()=>M(b),sx:{color:"#9a9a97","&:hover":{color:"#2563eb"}},children:ao(Y0,{sx:{fontSize:18}})}),ao(pu,{"aria-label":"\uBAA9\uD45C \uC0AD\uC81C",onClick:()=>l(b.seq),sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:ao(Tt,{style:{width:16,height:16}})})]})]},b.seq))})]})});return ao(j0,{open:e,onClose:n,maxWidth:"sm",title:"\uBAA9\uD45C \uAD00\uB9AC",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-sprint-manage",sections:[{id:"sprint-manage",showTitle:!1,children:J}],actions:{showCancelButton:!1,right:ao(Ql,{variant:"contained",onClick:n,children:"\uB2EB\uAE30"})}})}import{useState as ku}from"react";import{Box as ho,Button as Zl,Divider as Z0,IconButton as J0,TextField as eS}from"@mui/material";import{FormDialog as oS}from"@ehfuse/mui-form-dialog";import tS from"@mui/icons-material/OpenInNewOutlined";import nS from"@mui/icons-material/EventOutlined";import{ConfirmDialog as rS}from"@ehfuse/alerts";import{jsx as Le,jsxs as Vn}from"react/jsx-runtime";function YA({open:e,imports:o,onRegister:t,onRemove:n,onClose:r}){let[i,a]=ku(""),[l,p]=ku(!1),c=async()=>{let d=i.trim();if(d){p(!0);try{await t(d)&&a("")}finally{p(!1)}}},s=async d=>{await rS({title:"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",message:`"${d.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}" \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&n(d.seq)},g=Vn(ho,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[Vn(ho,{sx:{color:"#37352f",lineHeight:1.7},children:["\uAD6C\uAE00 \uCE98\uB9B0\uB354\uC758 \uC77C\uC815\uC744 ",Le("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uC5C5\uBB34\uD568 \uCE98\uB9B0\uB354\uC5D0 \uD568\uAED8 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4.",Le("br",{}),"\uD45C\uC2DC/\uC228\uAE40\uC740 \uC5C5\uBB34\uD568 \uC6B0\uC0C1\uB2E8\uC758 ",Le("b",{children:"\uAD6C\uAE00 \uC77C\uC815"})," \uC2A4\uC704\uCE58\uB85C \uCF1C\uACE0 \uB055\uB2C8\uB2E4."]}),Le(ho,{sx:{fontWeight:700,color:"#37352f",mt:.5},children:"\uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354"}),o.length>0?Le(ho,{sx:{display:"flex",flexDirection:"column",border:"1px solid #e6e6e3",borderRadius:1},children:o.map((d,m)=>Vn(ho,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:.75,borderTop:m>0?"1px solid #efefed":"none"},children:[Le(nS,{sx:{fontSize:18,color:"#0f9d58",flexShrink:0}}),Le(ho,{component:"span",sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:d.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),Le(J0,{"aria-label":"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",size:"small",onClick:()=>{s(d)},sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:Le(Tt,{sx:{fontSize:18}})})]},d.seq))}):Le(ho,{sx:{color:"#9a9a97",px:.5},children:"\uC544\uC9C1 \uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}),Le(Z0,{sx:{my:1,borderColor:"#e6e6e3"}}),Le(ho,{sx:{fontWeight:700,color:"#37352f"},children:"\uC0C8 \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30"}),Vn(ho,{sx:{bgcolor:"#f2f6fa",borderRadius:1,px:1.5,py:1.25,mb:1,fontSize:15,lineHeight:1.8,display:"flex",flexDirection:"column",gap:.25,"& > div":{display:"flex",gap:1},"& > div::before":{content:'"\u2022"',flexShrink:0}},children:[Le(ho,{children:Vn(ho,{component:"span",children:["\uAD6C\uAE00 \uCE98\uB9B0\uB354(\uC6F9) > \uC67C\uCABD \uBAA9\uB85D\uC5D0\uC11C \uAC00\uC838\uC62C \uCE98\uB9B0\uB354\uC5D0 \uB9C8\uC6B0\uC2A4\uB97C \uC62C\uB824 \u22EE > ",Le("b",{children:"\uC124\uC815 \uBC0F \uACF5\uC720"}),"\uB97C \uC5FD\uB2C8\uB2E4."]})}),Le(ho,{children:Vn(ho,{component:"span",children:[Le("b",{children:"\uCE98\uB9B0\uB354 \uD1B5\uD569"})," \uC139\uC158\uC758 ",Le("b",{children:'"iCal \uD615\uC2DD\uC758 \uBE44\uBC00 \uC8FC\uC18C"'})," \uB97C \uBCF5\uC0AC\uD574 \uC544\uB798\uC5D0 \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),Le(ho,{children:Le(ho,{component:"span",children:"\uBE44\uBC00 \uC8FC\uC18C\uB294 \uBCF8\uC778 \uC804\uC6A9\uC785\uB2C8\uB2E4. \uC11C\uBC84\uC5D0 \uC800\uC7A5\uB418\uBA70 \uB2E4\uB978 \uC9C1\uC6D0\uC5D0\uAC8C \uBCF4\uC774\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."})}),Le(ho,{children:Le(ho,{component:"span",children:"\uC77C\uC815\uC740 \uC57D 10\uBD84 \uAC04\uACA9\uC73C\uB85C \uAC31\uC2E0\uB418\uACE0, \uBC18\uBCF5 \uC77C\uC815\uC740 \uC77C\uBC18\uC801\uC778 \uADDC\uCE59(\uB9E4\uC77C/\uB9E4\uC8FC/\uB9E4\uC6D4/\uB9E4\uB144)\uB9CC \uC9C0\uC6D0\uD569\uB2C8\uB2E4."})})]}),Vn(ho,{sx:{display:"flex",gap:2,alignItems:"center"},children:[Le(eS,{value:i,onChange:d=>a(d.target.value),fullWidth:!0,label:"\uBE44\uBC00 iCal \uC8FC\uC18C",placeholder:"https://calendar.google.com/calendar/ical/\u2026/basic.ics",slotProps:{input:{spellCheck:!1}}}),Le(Zl,{variant:"contained",disabled:!i.trim()||l,onClick:()=>{c()},sx:{flexShrink:0},children:l?"\uD655\uC778 \uC911\u2026":"\uB4F1\uB85D"})]})]});return Le(oS,{open:e,onClose:r,width:680,title:"\uAD6C\uAE00 \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-calendar-import",sections:[{id:"calendar-import",showTitle:!1,children:g}],actions:{showCancelButton:!1,left:Le(Zl,{variant:"outlined",startIcon:Le(tS,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:Le(Zl,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})}})}import{Box as Jt,Button as Qr,TextField as iS}from"@mui/material";import{FormDialog as aS}from"@ehfuse/mui-form-dialog";import lS from"@mui/icons-material/ContentCopyOutlined";import Tu from"@mui/icons-material/OpenInNewOutlined";import{InfoAlert as yu}from"@ehfuse/alerts";import{Fragment as cS,jsx as lo,jsxs as Kn}from"react/jsx-runtime";function sS(e){return`${window.location.origin}/api/v1/taskbox/calendar/${e}.ics`}function n7({open:e,feed:o,feedTaskCount:t,buildFeedUrl:n,onSubscribe:r,onClose:i}){let a=n??sS,l=o.subscribed?a(o.token):"",p=()=>{navigator.clipboard.writeText(l).then(()=>yu("\uD53C\uB4DC \uC8FC\uC18C\uB97C \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>yu("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uC8FC\uC18C\uB97C \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD558\uC138\uC694."))},c=()=>{let g=l.replace(/^https?:\/\//,"webcal://");window.open(`https://calendar.google.com/calendar/r?cid=${encodeURIComponent(g)}`,"_blank")},s=Kn(Jt,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[Kn(Jt,{sx:{color:"#37352f",lineHeight:1.7},children:["\uB0B4\uAC00 \uAD00\uC5EC\uD55C \uC5C5\uBB34\uB97C ",lo("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0\uC11C \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4."]}),t===0?Kn(Jt,{sx:{color:"#8a6d1d",bgcolor:"#faf1d7",borderRadius:1,px:1.5,py:1.25,lineHeight:1.7},children:["\uC9C0\uAE08\uC740 \uCE98\uB9B0\uB354\uC5D0 \uD45C\uC2DC\uD560 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",lo("br",{}),lo("b",{children:"\uB9C8\uAC10\uC77C\uC2DC\uAC00 \uC788\uB294 \uB0B4 \uC5C5\uBB34 \uB610\uB294 \uBCF4\uB0B8\uC5C5\uBB34"}),"\uAC00 \uC0DD\uAE30\uBA74"," ",o.subscribed?"\uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0 \uC790\uB3D9\uC73C\uB85C \uD45C\uC2DC\uB429\uB2C8\uB2E4.":"\uC5EC\uAE30\uC11C \uAD6C\uB3C5\uC744 \uC2DC\uC791\uD558\uC138\uC694."]}):o.subscribed&&o.enabled?Kn(cS,{children:[lo(iS,{value:l,fullWidth:!0,label:"\uB0B4 \uD53C\uB4DC \uC8FC\uC18C",slotProps:{input:{readOnly:!0}}}),Kn(Jt,{sx:{display:"flex",gap:2},children:[lo(Qr,{variant:"outlined",startIcon:lo(lS,{}),onClick:p,children:"\uC8FC\uC18C \uBCF5\uC0AC"}),lo(Qr,{variant:"contained",startIcon:lo(Tu,{}),onClick:c,children:"Google \uCE98\uB9B0\uB354\uC5D0 \uCD94\uAC00"})]}),Kn(Jt,{sx:{bgcolor:"#f2f6fa",borderRadius:1,px:1.5,py:1.25,fontSize:15,lineHeight:1.8,display:"flex",flexDirection:"column",gap:.25,"& > div":{display:"flex",gap:1},"& > div::before":{content:'"\u2022"',flexShrink:0}},children:[lo(Jt,{children:Kn("span",{children:["\uBC84\uD2BC\uC774 \uB3D9\uC791\uD558\uC9C0 \uC54A\uC73C\uBA74 \uAD6C\uAE00 \uCE98\uB9B0\uB354 > \uB2E4\uB978 \uCE98\uB9B0\uB354 + > ",lo("b",{children:"URL\uB85C \uCD94\uAC00"}),"\uC5D0 \uC704 \uC8FC\uC18C\uB97C \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),lo(Jt,{children:lo("span",{children:"\uAD6C\uAE00\uC774 \uD53C\uB4DC\uB97C \uC8FC\uAE30\uC801\uC73C\uB85C(\uC218 \uC2DC\uAC04 \uAC04\uACA9) \uAC00\uC838\uAC00\uBBC0\uB85C \uBCC0\uACBD\uC0AC\uD56D \uBC18\uC601\uC774 \uB2A6\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4."})}),lo(Jt,{children:lo("span",{children:"\uB0B4\uBCF4\uB0B4\uAE30\uB97C \uADF8\uB9CC\uD558\uB824\uBA74 \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0\uC11C \uCD94\uAC00\uD55C \uCE98\uB9B0\uB354\uB97C \uC0AD\uC81C\uD558\uBA74 \uB429\uB2C8\uB2E4."})}),lo(Jt,{children:lo("span",{children:"\uC774 \uC8FC\uC18C\uB294 \uBCF8\uC778 \uC804\uC6A9\uC785\uB2C8\uB2E4. \uACF5\uC720\uD558\uBA74 \uB0B4 \uC5C5\uBB34 \uC77C\uC815\uC774 \uB178\uCD9C\uB429\uB2C8\uB2E4."})})]})]}):lo(Qr,{variant:"contained",onClick:r,sx:{alignSelf:"flex-start"},children:"\uAD6C\uB3C5 \uC2DC\uC791 (\uD53C\uB4DC \uBC1C\uAE09)"})]});return lo(aS,{open:e,onClose:i,width:680,title:"\uAD6C\uAE00 \uCE98\uB9B0\uB354\uB85C \uB0B4\uBCF4\uB0B4\uAE30",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-calendar-subscribe",sections:[{id:"calendar-subscribe",showTitle:!1,children:s}],actions:{showCancelButton:!1,left:lo(Qr,{variant:"outlined",startIcon:lo(Tu,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:lo(Qr,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}import{useEffect as mS,useMemo as Jl,useState as es}from"react";import{Box as Zr,Button as uS,Typography as dS}from"@mui/material";import{FormDialog as pS}from"@ehfuse/mui-form-dialog";import{SearchTextField as fS}from"@ehfuse/mui-form-controls";import{TreeView as xS}from"@ehfuse/tree-view";import{Fragment as yS,jsx as ft,jsxs as SS}from"react/jsx-runtime";function Su(e){return`${e.name}#${e.seq}`}function gS(e){return Number(e.slice(e.lastIndexOf("#")+1))||0}function bS(e){let o=[],t=n=>{for(let r of n.employees??[])o.push(r);for(let r of n.groups??[])t(r)};for(let n of e)t(n);return o}function hS(e,o){return o?[e.name,e.department,e.role_name,e.work_position].filter(Boolean).some(t=>String(t).toLowerCase().includes(o)):!0}function kS(e){let o=[[e.name,e.role_name].filter(Boolean).join(" "),e.department].filter(Boolean).join(" / ");return{id:`emp:${e.seq}`,label:Su(e),renderLabel:ft(Zr,{component:"span",sx:{display:"inline-flex",alignItems:"baseline",gap:.75},children:ft(Zr,{component:"span",sx:{fontWeight:400,color:"text.primary"},children:o})})}}function Bu(e,o){let t=(e.groups??[]).map(r=>Bu(r,o)).filter(r=>r!==null),n=(e.employees??[]).filter(r=>hS(r,o)).map(kS);return t.length===0&&n.length===0?null:{id:`group:${e.key}`,label:e.name,children:[...t,...n]}}function TS({groups:e,allEmployees:o,initialSelectedSeqs:t,multiple:n,isMobile:r,onSelectionChange:i}){let[a,l]=es(""),p=Jl(()=>e.map(s=>Bu(s,a.trim().toLowerCase())).filter(s=>s!==null),[e,a]),c=Jl(()=>o.filter(s=>t.includes(s.seq)).map(Su),[]);return SS(yS,{children:[ft(Zr,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:ft(fS,{size:"small",fullWidth:!0,placeholder:"\uC774\uB984, \uBD80\uC11C \uAC80\uC0C9",onSearch:l,onClear:()=>l(""),sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),ft(Zr,{sx:r?{display:"flex",flexDirection:"column"}:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:ft(xS,{items:p,checkbox:!0,multiSelect:n,selectionMode:"child",showSearch:!1,defaultExpanded:!0,initialSelections:c,onChange:s=>i(s.map(gS).filter(g=>g>0)),styles:{border:"none",borderRadius:"0"}})})]})}function d7({open:e,title:o="\uC9C1\uC6D0 \uC120\uD0DD",hint:t="",groups:n,multiple:r=!1,selectedSeqs:i,confirmText:a="\uD655\uC778",onConfirm:l,onClose:p}){let c=Oe(),[s,g]=es([]),[d,m]=es(0),u=Jl(()=>bS(n),[n]),v=i??[];mS(()=>{e&&(g(v),m(h=>h+1))},[e]);let I=()=>{let h=u.filter(x=>s.includes(x.seq));l(r?h:h.slice(0,1)),p()};return ft(pS,{open:e,onClose:p,title:`${o}${r&&s.length>0?` (${s.length}\uBA85)`:""}`,locale:"ko",fullScreen:c,mobilePresentation:c?"slide":"dialog",draggable:!0,width:"600px",tabs:{visible:!1},titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},scrollPastLastSection:!1,sectionContentPaddingTop:0,fontScale:{enabled:!0},fontScaleKey:"taskbox-employee-select",sections:[{id:"employee-select",title:"\uC9C1\uC6D0 \uC120\uD0DD",showTitle:!1,children:ft(Zr,{sx:{...c?{}:{height:560},display:"flex",flexDirection:"column",border:"1px solid #cccccc",borderRadius:1,...c?{}:{overflow:"hidden"},userSelect:"none"},children:ft(TS,{groups:n,allEmployees:u,initialSelectedSeqs:v,multiple:r,isMobile:c,onSelectionChange:g},d)})}],dialogActionSx:{"@media (max-width:1023.95px)":{gap:"0.75rem !important","& .left-actions":{flex:1,minWidth:0},"& .right-actions":{flex:1}}},actions:{visible:!0,showCancelButton:!1,left:t?ft(dS,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.35},children:t}):void 0,right:ft(uS,{variant:"contained",onClick:I,children:a})}})}import{useEffect as IS,useMemo as _S,useState as wS}from"react";import{Box as Sr,Button as DS,Divider as ES}from"@mui/material";import{FormDialog as MS}from"@ehfuse/mui-form-dialog";import{LabelSelect as OS}from"@ehfuse/mui-form-controls";import{Box as wt}from"@mui/material";import{jsx as Tr,jsxs as yr}from"react/jsx-runtime";function BS(e,o){let t=o.filter(n=>n.sprint_seq===e.seq&&!n.archived&&n.completed);return{points:t.reduce((n,r)=>n+(r.story_points??0),0),count:t.length}}function Cu({sprints:e,tasks:o,height:t=160}){let r=[...e].sort((s,g)=>`${s.start_date}|${s.seq}`.localeCompare(`${g.start_date}|${g.seq}`)).map(s=>({sprint:s,...BS(s,o)})),i=r.some(s=>s.points>0),a=r.map(s=>i?s.points:s.count),l=Math.max(1,...a),p=r.filter(s=>s.sprint.status==="closed").map(s=>i?s.points:s.count),c=p.length>0?Math.round(p.reduce((s,g)=>s+g,0)/p.length*10)/10:null;return r.length===0?Tr(wt,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uD45C\uC2DC\uD560 \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):yr(wt,{children:[yr(wt,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[yr("span",{children:["\uC644\uB8CC ",i?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uBAA9\uD45C\uBCC4"]}),c!==null?yr("span",{children:["\uD3C9\uADE0(\uC885\uB8CC \uBAA9\uD45C)"," ",Tr(wt,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:c}),i?"SP":"\uAC74"]}):null]}),Tr(wt,{sx:{display:"flex",alignItems:"flex-end",gap:2,height:t,px:.5},children:r.map(s=>{let g=i?s.points:s.count,d=Math.round((t-24)*g/l),m=s.sprint.status==="closed";return yr(wt,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-end",height:"100%"},children:[Tr(wt,{sx:{fontSize:14,fontWeight:700,color:"#37352f",lineHeight:1.5},children:g}),Tr(wt,{sx:{width:"60%",maxWidth:56,height:Math.max(2,d),borderRadius:"4px 4px 0 0",bgcolor:m?"#2f80ed":"#a9c9f5"}})]},s.sprint.seq)})}),Tr(wt,{sx:{display:"flex",gap:2,px:.5,mt:.5},children:r.map(s=>yr(wt,{sx:{flex:1,minWidth:0,textAlign:"center",fontSize:13.5,color:"#000",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[s.sprint.name,s.sprint.status!=="closed"?" (\uC9C4\uD589\uC911)":""]},s.sprint.seq))})]})}import{useMemo as CS}from"react";import{Box as Un}from"@mui/material";import{jsx as Dt,jsxs as Gn}from"react/jsx-runtime";function vu(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?new Date(`${e}T00:00:00`):null}function vS(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function os(e){return e.slice(5).replace("-",".")}function Iu({sprint:e,tasks:o,todayStr:t,height:n=200}){let r=CS(()=>{let h=vu(e.start_date),x=vu(e.end_date);if(!h||!x||x<h||Math.round((x.getTime()-h.getTime())/864e5)+1>366)return null;let S=o.filter(b=>b.sprint_seq===e.seq&&!b.archived);if(S.length===0)return{empty:!0};let O=S.some(b=>(b.story_points??0)>0),y=b=>O?b.story_points??0:1,_=S.reduce((b,f)=>b+y(f),0),M=new Map;for(let b of S){if(!b.completed)continue;let f=(b.completed_time??"").slice(0,10),C=/^\d{4}-\d{2}-\d{2}$/.test(f)?f:e.start_date;M.set(C,(M.get(C)??0)+y(b))}let q=[];for(let b=new Date(h);b<=x;b.setDate(b.getDate()+1))q.push(vS(b));let B=_,J=[];for(let b of q){if(b>t)break;B-=M.get(b)??0,J.push({day:b,value:Math.max(0,B)})}return{empty:!1,days:q,total:_,usePoints:O,actual:J}},[e,o,t]);if(!r)return Dt(Un,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uBAA9\uD45C\uC758 \uC2DC\uC791\uC77C\xB7\uC885\uB8CC\uC77C\uC774 \uC788\uC5B4\uC57C \uBC88\uB2E4\uC6B4\uC744 \uADF8\uB9B4 \uC218 \uC788\uC2B5\uB2C8\uB2E4."});if(r.empty)return Dt(Un,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uBC30\uC815\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."});let{days:i,total:a,usePoints:l,actual:p}=r,c=600,s=200,g=8,d=h=>i.length===1?0:h/(i.length-1)*c,m=h=>g+(s-g*2)*(1-h/Math.max(1,a)),u=`${d(0)},${m(a)} ${d(i.length-1)},${m(0)}`,v=p.map(h=>`${d(i.indexOf(h.day))},${m(h.value)}`).join(" "),I=p[p.length-1];return Gn(Un,{children:[Gn(Un,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[Gn("span",{children:["\uB0A8\uC740 ",l?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uCD1D ",a]}),I?Gn("span",{children:["\uD604\uC7AC"," ",Dt(Un,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:I.value}),l?"SP":"\uAC74"," \uB0A8\uC74C"]}):null]}),Dt(Un,{sx:{border:"1px solid #e6e6e3",borderRadius:1,bgcolor:"#fafaf9",px:1,py:.5},children:Gn("svg",{viewBox:`0 0 ${c} ${s}`,preserveAspectRatio:"none",style:{display:"block",width:"100%",height:n},children:[Dt("line",{x1:0,y1:m(0),x2:c,y2:m(0),stroke:"#e6e6e3",strokeWidth:1}),Dt("polyline",{points:u,fill:"none",stroke:"#9a9a97",strokeWidth:1.5,strokeDasharray:"6 5",vectorEffect:"non-scaling-stroke"}),p.length>1?Dt("polyline",{points:v,fill:"none",stroke:"#2f80ed",strokeWidth:2.5,vectorEffect:"non-scaling-stroke"}):null,I?Dt("circle",{cx:d(i.indexOf(I.day)),cy:m(I.value),r:4,fill:"#2f80ed",vectorEffect:"non-scaling-stroke"}):null]})}),Gn(Un,{sx:{mt:.5,display:"flex",justifyContent:"space-between",fontSize:13.5,color:"#000"},children:[Dt("span",{children:os(e.start_date)}),t>e.start_date&&t<e.end_date?Gn("span",{children:["\uC624\uB298 ",os(t)]}):null,Dt("span",{children:os(e.end_date)})]})]})}import{jsx as en,jsxs as ts}from"react/jsx-runtime";function D7({open:e,sprints:o,tasks:t,todayStr:n,initialSprintSeq:r=0,onClose:i}){let[a,l]=wS(0);IS(()=>{if(!e)return;let s=o.find(d=>d.status==="active")??o[0],g=o.find(d=>d.seq===r)??s;l(g?.seq??0)},[e]);let p=_S(()=>o.find(s=>s.seq===a)??null,[o,a]),c=ts(Sr,{sx:{display:"flex",flexDirection:"column"},children:[ts(Sr,{sx:{px:3,py:2.5},children:[en(Sr,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBCA8\uB85C\uC2DC\uD2F0"}),en(Cu,{sprints:o,tasks:t})]}),en(ES,{sx:{borderColor:"#e6e6e3"}}),ts(Sr,{sx:{px:3,py:2.5},children:[en(Sr,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBC88\uB2E4\uC6B4"}),en(OS,{label:"\uBAA9\uD45C",showLabel:!1,value:a?String(a):"",options:o.map(s=>({value:String(s.seq),label:et(s)})),onChange:s=>l(Number(s.target.value)||0),sx:{width:280,mb:2}}),p?en(Iu,{sprint:p,tasks:t,todayStr:n}):en(Sr,{sx:{py:4,textAlign:"center",fontSize:13.5,color:"#9a9a97"},children:"\uBC88\uB2E4\uC6B4\uC744 \uBCFC \uBAA9\uD45C\uB97C \uC120\uD0DD\uD558\uC138\uC694."})]})]});return en(MS,{open:e,onClose:i,width:680,title:"\uBAA9\uD45C \uCC28\uD2B8",locale:"ko",contentTopPadding:0,contentPaddingX:0,sectionsPaddingTop:0,tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-sprint-charts",sections:[{id:"sprint-charts",showTitle:!1,children:c}],actions:{showCancelButton:!1,right:en(DS,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}import{Checkbox as RS,Divider as PS,Menu as zS,MenuItem as ns}from"@mui/material";import{jsx as Jr,jsxs as _u}from"react/jsx-runtime";function P7({anchorEl:e,candidates:o,selectedNames:t,avatarSrcByName:n,onToggle:r,onClear:i,onClose:a}){return _u(zS,{anchorEl:e,open:!!e,onClose:a,transitionDuration:0,children:[o.length===0?Jr(ns,{disabled:!0,sx:{fontSize:14},children:"\uBAA9\uB85D\uC5D0 \uC9C0\uC815\uB41C \uC0AC\uB78C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):o.map(l=>{let p=t.includes(l.name);return _u(ns,{onClick:()=>r(l),sx:{fontSize:14,minWidth:170,gap:1},children:[Jr(RS,{size:"small",checked:p,sx:{p:0}}),Jr(Fo,{names:[l.name],size:20,avatarSrcByName:n}),l.name]},`${l.accountSeq}-${l.name}`)}),Jr(PS,{}),Jr(ns,{disabled:t.length===0,onClick:i,sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{useState as qS}from"react";import{ButtonBase as AS,Menu as LS,MenuItem as NS}from"@mui/material";import FS from"@mui/icons-material/KeyboardArrowDown";import HS from"@mui/icons-material/Check";import{Fragment as WS,jsx as rs,jsxs as is}from"react/jsx-runtime";function W7({value:e,onChange:o,options:t}){let[n,r]=qS(null),i=t??Ma,a=Ma.find(l=>l.value===e)?.label??"";return is(WS,{children:[is(AS,{onClick:l=>r(l.currentTarget),sx:{display:"flex",alignItems:"center",gap:.5,px:1,py:.5,borderRadius:1,fontSize:13.5,color:"#37352f","&:hover":{bgcolor:"#f2f2f0"}},children:[a,rs(FS,{sx:{fontSize:17,color:"#9a9a97"}})]}),rs(LS,{transitionDuration:0,anchorEl:n,open:!!n,onClose:()=>r(null),children:i.map(l=>is(NS,{selected:l.value===e,onClick:()=>{o(l.value),r(null)},sx:{fontSize:14,minWidth:140,justifyContent:"space-between",gap:1},children:[l.label,l.value===e?rs(HS,{sx:{fontSize:16,color:"#2f80ed"}}):null]},l.value))})]})}import{Box as as,ButtonBase as $S,Divider as VS,Popover as KS}from"@mui/material";import US from"@mui/icons-material/Check";import GS from"@ehfuse/overlay-scrollbar";import{jsx as jn,jsxs as Du}from"react/jsx-runtime";var wu=["#1e3a8a","#2f80ed","#06b6d4","#0fa3a3","#2f9e5b","#84cc16","#e8a33d","#d9730d","#e5484d","#e255a1","#a355c0","#8a5a2b","#57564f","#111827"];function X7({anchorEl:e,value:o,color:t="",onSelect:n,onSelectColor:r,onClose:i}){return jn(KS,{transitionDuration:0,open:!!e,anchorEl:e,onClose:i,anchorOrigin:{vertical:"bottom",horizontal:"left"},marginThreshold:16,slotProps:{paper:{sx:{mt:1,maxHeight:"calc(100dvh - 96px)"}}},children:Du(as,{sx:{width:"min(492px, calc(100vw - 32px))"},children:[jn(GS,{style:{maxHeight:"min(432px, calc(100dvh - 240px))"},contentStyle:{minWidth:0,padding:10},thumb:{width:6},children:jn(Ti,{value:o||Ot,onChange:a=>{n(a),i()}})}),r?Du(as,{sx:{px:1.25,pb:1.25},children:[jn(VS,{sx:{mb:1,borderColor:"#efefed"}}),jn(as,{sx:{display:"flex",flexWrap:"wrap",gap:.75},children:wu.map(a=>{let l=(t||wu[0])===a;return jn($S,{"aria-label":`\uC544\uC774\uCF58 \uC0C9 ${a}`,onClick:()=>r(a),sx:{width:26,height:26,borderRadius:"50%",bgcolor:a,display:"flex",alignItems:"center",justifyContent:"center"},children:l?jn(US,{sx:{fontSize:15,color:"#ffffff"}}):null},a)})})]}):null]})})}import{Box as ua,ButtonBase as jS}from"@mui/material";import{DateTextField as Eu}from"@ehfuse/mui-form-controls";function Yn(e){let o=t=>String(t).padStart(2,"0");return`${e.getFullYear()}-${o(e.getMonth()+1)}-${o(e.getDate())}`}function ma(e,o=new Date){let t=new Date(o);return t.setMonth(t.getMonth()-e),t}function J7(e=new Date){return{fromDate:Yn(ma(1,e)),toDate:Yn(e)}}import{jsx as ei,jsxs as Mu}from"react/jsx-runtime";var YS=[{label:"1\uAC1C\uC6D4",months:1},{label:"3\uAC1C\uC6D4",months:3},{label:"6\uAC1C\uC6D4",months:6},{label:"1\uB144",months:12},{label:"\uC804\uCCB4",months:0}];function Ou({fromDate:e,toDate:o,onChange:t}){let n=i=>{if(i<=0){t("","");return}t(Yn(ma(i)),Yn(new Date))},r=i=>i<=0?!e&&!o:!e||!o?!1:e===Yn(ma(i))&&o===Yn(new Date);return Mu(ua,{sx:{display:"flex",alignItems:"center",gap:1.5,flexWrap:"wrap"},children:[ei(ua,{sx:{display:"flex",alignItems:"center",gap:1.5},children:YS.map(i=>{let a=r(i.months);return ei(jS,{onClick:()=>n(i.months),sx:{px:1.25,py:.85,borderRadius:1,fontSize:13,fontWeight:a?500:400,border:"1px solid",borderColor:a?"#2f80ed":"#dedddb",color:a?"#2f80ed":"#37352f",bgcolor:a?"#eef6ff":"transparent","&:hover":{bgcolor:a?"#eef6ff":"#f7f7f5"}},children:i.label},i.label)})}),Mu(ua,{sx:{display:"flex",alignItems:"center",gap:.5},children:[ei(Eu,{value:e,size:"small",placeholder:"\uC2DC\uC791\uC77C",onChange:i=>t(i.target.value,o),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}}),ei(ua,{component:"span",sx:{fontSize:13,color:"#9a9a97"},children:"~"}),ei(Eu,{value:o,size:"small",placeholder:"\uC885\uB8CC\uC77C",onChange:i=>t(e,i.target.value),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}})]})]})}import{Popover as XS}from"@mui/material";import{jsx as Ru}from"react/jsx-runtime";function sL({anchorEl:e,fromDate:o,toDate:t,onChange:n,onClose:r}){return Ru(XS,{transitionDuration:0,anchorEl:e,open:!!e,onClose:r,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{sx:{p:1.5}}},children:Ru(Ou,{fromDate:o,toDate:t,onChange:n})})}import{Box as QS,ButtonBase as ZS,Tab as JS,Tabs as eB}from"@mui/material";import oB from"@mui/icons-material/Checklist";import tB from"@mui/icons-material/Face";import nB from"@mui/icons-material/Publish";import rB from"@mui/icons-material/NotificationsOutlined";import iB from"@mui/icons-material/BugReportOutlined";import aB from"@mui/icons-material/DescriptionOutlined";import lB from"@mui/icons-material/Inventory2Outlined";import{jsx as xt}from"react/jsx-runtime";function Pu(e,o){return o>0?`${e} (${o})`:e}var yL=[{id:"my",label:"\uC804\uCCB4",icon:xt(oB,{sx:{fontSize:18}})},{id:"notice",label:"\uACF5\uC9C0\uC0AC\uD56D",icon:xt(rB,{sx:{fontSize:18}})},{id:"mine",label:"\uB0B4 \uC5C5\uBB34",icon:xt(tB,{sx:{fontSize:18}})},{id:"sent",label:"\uBCF4\uB0B8 \uC5C5\uBB34",icon:xt(nB,{sx:{fontSize:18}})},{id:"bug",label:"\uC624\uB958",icon:xt(iB,{sx:{fontSize:18}})},{id:"archive",label:"\uBCF4\uAD00\uD568",icon:xt(lB,{sx:{fontSize:18}}),hideCount:!0},{id:"report",label:"\uBCF4\uACE0\uC11C",icon:xt(aB,{sx:{fontSize:18}}),hideCount:!0}];function sB(e){return{minHeight:46,minWidth:75,bgcolor:e.bg,color:e.color,borderRadius:"8px 8px 0 0",padding:"10px 18px",textTransform:"none",fontSize:14,fontWeight:500,border:`1px solid ${e.borderColor}`,borderBottom:"none","&:hover":{bgcolor:e.hoverBg},"&.Mui-selected":{bgcolor:e.selectedBg,color:e.selectedColor,border:`1px solid ${e.selectedBg}`,borderBottom:"none","&:hover":{bgcolor:e.selectedBg}},...e.sx}}function SL({items:e,activeTab:o,counts:t,onChange:n,compact:r=!1}){let i=le(),a=sB(i.tabs),l=e;return r?xt(QS,{sx:{display:"flex",flexWrap:"wrap",gap:1.25},children:l.map(p=>{let c=o===p.id;return xt(ZS,{onClick:()=>n(p.id),sx:{px:1.5,py:.75,borderRadius:1,fontSize:No(13.5),fontWeight:500,whiteSpace:"nowrap",border:"1px solid",bgcolor:c?i.tabs.selectedBg:i.tabs.bg,color:c?i.tabs.selectedColor:i.tabs.color,borderColor:c?i.tabs.selectedBg:i.tabs.borderColor},children:Pu(p.label,p.hideCount?0:t[p.id]??0)},p.id)})}):xt(eB,{value:o,onChange:(p,c)=>n(c),sx:{minHeight:46,"& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:"12px",minHeight:46}},children:l.map(p=>xt(JS,{value:p.id,label:Pu(p.label,p.hideCount?0:t[p.id]??0),icon:p.icon,iconPosition:"start",sx:a},p.id))})}import{useEffect as cB,useMemo as mB,useState as ls}from"react";import{Divider as ss,ListItemIcon as jo,Menu as cs,MenuItem as wo}from"@mui/material";import uB from"@mui/icons-material/OpenInNewOutlined";import dB from"@mui/icons-material/Check";import pB from"@mui/icons-material/CheckCircleOutlined";import fB from"@mui/icons-material/RadioButtonUnchecked";import xB from"@mui/icons-material/SendOutlined";import gB from"@mui/icons-material/EventOutlined";import bB from"@mui/icons-material/PersonOutlineOutlined";import hB from"@mui/icons-material/ViewKanbanOutlined";import kB from"@mui/icons-material/ContentCopyOutlined";import TB from"@mui/icons-material/NextPlanOutlined";import yB from"@mui/icons-material/ContentPasteOutlined";import SB from"@mui/icons-material/ShareOutlined";import BB from"@mui/icons-material/DirectionsRunOutlined";import zu from"@mui/icons-material/ChevronRight";import CB from"@mui/icons-material/ArchiveOutlined";import vB from"@mui/icons-material/UnarchiveOutlined";import{ConfirmDialog as IB}from"@ehfuse/alerts";import{Fragment as _B,jsx as fe,jsxs as yo}from"react/jsx-runtime";function ZL({target:e,onClose:o,customTabs:t,sprints:n=[],myAccountSeq:r=0,onOpenDetail:i,onToggleCompleted:a,onRequestConfirm:l,onChangeDueDate:p,onChangeReminder:c,onMemberEdit:s,onMoveProject:g,onDuplicate:d,onCreateFollowUp:m,onShare:u,onAssignSprint:v,onArchiveToggle:I,onDelete:h}){let x=Oe(),w=bt(),[S,O]=ls(null),[y,_]=ls(null),[M,q]=ls(null);cB(()=>{e||(O(null),_(null),q(null))},[e]);let B=e?.task??null,J=!!B?.is_notice,b=!!B?.is_event,f=B?!Pt(B,r):!1,C=mB(()=>new Set(t.filter(D=>D.useSprints).map(D=>D.key)),[t]),k=async(D="one")=>{let X=B;if(o(),!X)return;await IB({title:"\uC5C5\uBB34 \uC0AD\uC81C",message:D==="series"?`"${X.title}" \uC758 \uC774 \uD68C\uCC28\uC640 \uC774\uD6C4 \uBC18\uBCF5 \uD68C\uCC28\uB97C \uBAA8\uB450 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`:`"${X.title}" \uC5C5\uBB34\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&h(X.seq,D)},T=()=>{B&&I(B.seq,!B.archived),o()};return yo(_B,{children:[yo(cs,{open:!!e,onClose:o,transitionDuration:0,anchorReference:x?"none":"anchorPosition",anchorPosition:!x&&e?{top:e.position.top,left:e.position.left}:void 0,slotProps:{paper:{sx:{minWidth:190,...x?{position:"fixed",top:"50%",left:"50%",translate:"-50% -50%",maxHeight:"70vh"}:{}}},list:x?{sx:{"& .MuiMenuItem-root":{py:1,minHeight:0}}}:void 0},children:[yo(wo,{onClick:()=>{B&&i(B),o()},sx:{fontSize:14},children:[fe(jo,{children:fe(uB,{sx:{fontSize:19}})}),"\uC0C1\uC138 \uC5F4\uAE30"]}),yo(wo,{disabled:J?(B?.author_account_seq??0)!==r:(B?.author_account_seq??0)!==r&&(B?.manager_account_seq??0)!==r,onClick:()=>{B&&a(B.seq,!B.completed),o()},sx:{fontSize:14},children:[fe(jo,{children:B?.completed?fe(fB,{sx:{fontSize:19}}):fe(pB,{sx:{fontSize:19}})}),B?.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC"]}),!J&&l?yo(wo,{disabled:!(B?.manager_account_seq??0)&&(B?.receiver_account_seqs??[]).length===0,onClick:()=>{B&&l(B),o()},sx:{fontSize:14},children:[fe(jo,{children:fe(xB,{sx:{fontSize:19}})}),"\uD655\uC778 \uC694\uCCAD"]}):null,b?null:fe(ss,{}),b?null:yo(wo,{disabled:f,onClick:D=>{B&&O({anchorEl:D.currentTarget,task:B})},sx:{fontSize:14},children:[fe(jo,{children:fe(gB,{sx:{fontSize:19}})}),"\uB9C8\uAC10\uC77C\uC2DC \uBCC0\uACBD"]}),!J&&!b&&s?yo(wo,{onClick:()=>{B&&s(B,"manager"),o()},sx:{fontSize:14},children:[fe(jo,{children:fe(bB,{sx:{fontSize:19}})}),"\uCC45\uC784\uC790 \uBCC0\uACBD"]}):null,b?null:yo(wo,{disabled:f,onClick:D=>{B&&_({anchorEl:D.currentTarget,task:B})},sx:{fontSize:14},children:[fe(jo,{children:fe(hB,{sx:{fontSize:19}})}),"\uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9",fe(zu,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}),fe(ss,{}),d?yo(wo,{disabled:f,onClick:()=>{B&&d(B.seq),o()},sx:{fontSize:14},children:[fe(jo,{children:fe(kB,{sx:{fontSize:19}})}),"\uBCF5\uC81C"]}):null,m&&B&&!B.is_event&&!B.is_notice?yo(wo,{onClick:()=>{B&&m(B.seq),o()},sx:{fontSize:14},children:[fe(jo,{children:fe(TB,{sx:{fontSize:19}})}),"\uD6C4\uC18D \uC5C5\uBB34 \uB9CC\uB4E4\uAE30"]}):null,yo(wo,{onClick:()=>{B&&(u?u(B):br(B,x)),o()},sx:{fontSize:14},children:[fe(jo,{children:x?fe(SB,{sx:{fontSize:19}}):fe(yB,{sx:{fontSize:19}})}),x?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC"]}),B&&!B.is_notice&&!B.is_event&&C.has(String(B.tab_key??""))&&v?yo(wo,{onClick:D=>q(D.currentTarget),sx:{fontSize:14},children:[fe(jo,{children:fe(BB,{sx:{fontSize:19}})}),"\uBAA9\uD45C\uC5D0 \uB123\uAE30",fe(zu,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}):null,yo(wo,{onClick:T,disabled:f||!B?.archived&&!(B&&li(B)),sx:{fontSize:14},children:[fe(jo,{children:B?.archived?fe(vB,{sx:{fontSize:19}}):fe(CB,{sx:{fontSize:19}})}),B?.archived?"\uBCF4\uAD00 \uD574\uC81C":"\uBCF4\uAD00"]}),fe(ss,{}),yo(wo,{disabled:f,onClick:()=>{k("one")},sx:{fontSize:14,color:"#e5484d"},children:[fe(jo,{children:fe(Tt,{sx:{fontSize:19,color:"#e5484d"}})}),(B?.repeat_group_key??0)>0?"\uC0AD\uC81C (\uC774 \uD68C\uCC28\uB9CC)":"\uC0AD\uC81C"]}),(B?.repeat_group_key??0)>0?yo(wo,{disabled:f,onClick:()=>{k("series")},sx:{fontSize:14,color:"#e5484d"},children:[fe(jo,{children:fe(Tt,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC0AD\uC81C (\uC774\uD6C4 \uBC18\uBCF5 \uC804\uCCB4)"]}):null]}),fe(Jo,{anchorEl:S?.anchorEl??null,open:!!S,date:S?.task.due_date??"",reminder:S?.task.reminder??"none",hideReminder:!!S?.task.completed,centered:x,onClose:()=>{O(null),o()},onDateChange:D=>{S&&p(S.task.seq,D)},onReminderChange:D=>{S&&c?.(S.task.seq,D)}}),yo(cs,{transitionDuration:0,anchorEl:y?.anchorEl??null,open:!!y,onClose:()=>{_(null),o()},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...w,children:[fe(wo,{selected:!y?.task.tab_key,onClick:()=>{y&&g(y.task.seq,""),_(null),o()},sx:{fontSize:14,minWidth:170},children:"\uC5C6\uC74C"}),t.filter(D=>!D.archived).map(D=>fe(wo,{selected:y?.task.tab_key===D.key,onClick:()=>{y&&g(y.task.seq,D.key),_(null),o()},sx:{fontSize:14,minWidth:170},children:D.label},D.key))]}),fe(cs,{transitionDuration:0,anchorEl:M,open:!!M,onClose:()=>q(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...n.filter(D=>`custom-${D.group_seq}`===String(B?.tab_key??"")).map(D=>({seq:D.seq,label:et(D)}))].map(D=>yo(wo,{onClick:()=>{B&&v?.(B.seq,D.seq),q(null),o()},sx:{fontSize:14,minWidth:160,gap:1},children:[D.label,(B?.sprint_seq??0)===D.seq?fe(dB,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},D.seq))})]})}import{Checkbox as wB,Divider as DB,Menu as EB,MenuItem as qu}from"@mui/material";import{jsx as da,jsxs as Au}from"react/jsx-runtime";function nN({anchorEl:e,labelOptions:o,selectedKeys:t,onToggle:n,onClear:r,onClose:i}){return Au(EB,{transitionDuration:0,anchorEl:e,open:!!e,onClose:i,children:[o.map(a=>{let l=t.includes(a.key);return Au(qu,{onClick:()=>n(a.key),sx:{fontSize:14,minWidth:190,gap:1},children:[da(wB,{size:"small",checked:l,sx:{p:0}}),da(Ae,{option:a})]},a.key)}),da(DB,{}),da(qu,{disabled:t.length===0,onClick:()=>{r(),i()},sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{Divider as Lu,Menu as MB,MenuItem as ms}from"@mui/material";import OB from"@mui/icons-material/Check";import RB from"@mui/icons-material/BarChartOutlined";import PB from"@mui/icons-material/SettingsOutlined";import{jsx as oi,jsxs as pa}from"react/jsx-runtime";function uN(e){let{anchorEl:o,sprints:t,value:n,onSelect:r,onManage:i,onCharts:a,onClose:l}=e;return pa(MB,{transitionDuration:0,anchorEl:o,open:!!o,onClose:l,children:[[{seq:0,label:"\uC804\uCCB4"},{seq:-1,label:"\uBBF8\uBC30\uC815 \uC5C5\uBB34"},...t.map(p=>({seq:p.seq,label:et(p)}))].map(p=>pa(ms,{onClick:()=>{r(p.seq),l()},sx:{fontSize:14,minWidth:180,gap:1},children:[p.label,n===p.seq?oi(OB,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},p.seq)),oi(Lu,{}),a?pa(ms,{onClick:()=>{l(),a()},sx:{fontSize:14,gap:1},children:[oi(RB,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uCC28\uD2B8"]}):null,a?oi(Lu,{}):null,pa(ms,{onClick:()=>{l(),i()},sx:{fontSize:14,gap:1},children:[oi(PB,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uAD00\uB9AC\u2026"]})]})}var zB={my:"tasks",mine:"tasks",sent:"tasks",notice:"notice",bug:"bug",archive:"archive",done:"done",report:"report"};function qB(e){return zB[e]??"tasks"}var fN={list:"\uBAA9\uB85D",card:"\uD504\uB85C\uC81D\uD2B8",kanban:"\uC0C1\uD0DC",sprint:"\uBAA9\uD45C",calendar:"\uC8FC\uAC04",month:"\uC6D4\uAC04",agenda:"\uC544\uC820\uB2E4",timeline:"\uD0C0\uC784\uB77C\uC778"},Nu=["list","calendar","month","card","kanban","sprint","timeline"],AB=["list","card"];function xN(e){let o=qB(e);switch(o){case"notice":return{kind:o,viewOptions:[],showCreate:!0,createLabel:"\uACF5\uC9C0\uC0AC\uD56D \uB4F1\uB85D",showGroupBy:!1,showSprintFilter:!1,showDateRange:!1,showHideCompleted:!0,forceFlatList:!0,columns:{notice:!0}};case"bug":return{kind:o,viewOptions:Nu,showCreate:!0,createLabel:"\uC624\uB958 \uB4F1\uB85D",showGroupBy:!0,showSprintFilter:!0,showDateRange:!1,showHideCompleted:!0,forceFlatList:!1,columns:{bug:!0}};case"archive":return{kind:o,viewOptions:AB,showCreate:!1,createLabel:"",showGroupBy:!1,showSprintFilter:!1,showDateRange:!0,showHideCompleted:!1,forceFlatList:!0,columns:{showActions:!1}};case"done":return{kind:o,viewOptions:["list"],showCreate:!1,createLabel:"",showGroupBy:!1,showSprintFilter:!1,showDateRange:!0,showHideCompleted:!1,forceFlatList:!0,columns:{showActions:!1}};case"report":return{kind:o,viewOptions:[],showCreate:!1,createLabel:"",showGroupBy:!1,showSprintFilter:!1,showDateRange:!0,showHideCompleted:!1,forceFlatList:!0,columns:{}};default:return{kind:o,viewOptions:Nu,showCreate:!0,createLabel:"\uC5C5\uBB34 \uB4F1\uB85D",showGroupBy:!0,showSprintFilter:!0,showDateRange:!1,showHideCompleted:!0,forceFlatList:!1,columns:e==="mine"?{showRequest:!1,confirmMode:"action"}:e==="sent"?{confirmMode:"time"}:{}}}}export{Q1 as ALL_TASK_VIEWER_ACCOUNT_SEQS,Cm as AddLabelDialog,yi as AddTabDialog,Tm as AttachmentUploadGauge,El as AttachmentUploadPercent,va as BUG_DEVICE_OPTIONS,wr as BUG_ICON_COLOR,s1 as BUG_KANBAN_COLUMNS,Ca as BUG_REPRO_OPTIONS,Ia as BUG_RESOLUTION_OPTIONS,In as BUG_STATUS_OPTIONS,_r as BUG_TASK_ICON,Ki as BugPropertiesGrid,ax as COLUMN_WIDTHS,wa as COMPLETED_STATUS_OPTION,Yl as CUSTOM_TAB_KEY_PREFIX,YA as CalendarImportDialog,n7 as CalendarSubscribeDialog,sn as CommentBubbleIcon,nr as ConfirmCountButton,nc as DATE_REMINDER_OPTIONS,gk as DEFAULT_COMPACT_COLUMNS,ha as DEFAULT_PROJECT_ICON,yL as DEFAULT_TASKBOX_TAB_ITEMS,Ot as DEFAULT_TASK_ICON,Bl as DRAWER_SECTION_TITLE_FONT_SIZE,sL as DateRangeFilterPopover,tt as DrawerSection,Jo as DueDatePickerPopover,Lf as ENDED_EVENT_STATUS_OPTION,Pm as EVENT_ICON_COLOR,po as EVENT_TASK_ICON,d7 as EmployeeSelectDialog,Ma as GROUP_BY_OPTIONS,lr as GoogleEventChip,W7 as GroupByMenuButton,Ti as IconPickerGrid,lm as InlineAddressInput,Yt as InlineTextValue,Da as KANBAN_CLOSED_COLUMN_KEY,nN as LabelFilterMenu,ea as LabelSelectMenu,Er as MANUAL_TASK_STATUS_OPTIONS,P7 as MemberFilterMenu,Dr as NOTICE_STATUS_OPTIONS,no as NOTICE_TASK_ICON,ys as NO_TASK_ICON,ka as PROJECT_ICON_OPTIONS,de as PropertyRow,tr as RECEIVER_AVATAR_COLORS,rc as REMINDER_OPTIONS,Fo as ReceiverAvatarStack,Jm as RelatedTasksSection,LB as STATUS_KEY_REPLIED,us as STATUS_KEY_WAITING,mc as SortableTaskCard,Iu as SprintBurndownChart,D7 as SprintChartsDialog,uN as SprintFilterMenu,NA as SprintManageDialog,Cu as SprintVelocityChart,er as StatusSelectMenu,Pa as TASKBOX_COLUMNS,st as TASKBOX_DRAWER_NARROW_MQ,Ss as TASKBOX_UI_STATE_ID,fN as TASKBOX_VIEW_LABELS,jM as TASKBOX_VIEW_MODES,Wr as TASK_REPEAT_RULE_OPTIONS,vn as TASK_STATUS_OPTIONS,og as TIME_REMINDER_OPTIONS,Ci as TaskAckListPopover,ht as TaskActionButton,la as TaskActivityDialog,Zi as TaskAttachmentsSection,jc as TaskBoxColumnSummary,lR as TaskBoxCompactTable,el as TaskBoxGroupBoard,zO as TaskBoxMobileList,Fc as TaskBoxMonthAgenda,zc as TaskBoxMonthCalendar,sO as TaskBoxSprintColumnSummary,lc as TaskBoxTable,SL as TaskBoxTabs,Uc as TaskBoxTimeline,GM as TaskBoxView,Ec as TaskBoxWeekCalendar,zr as TaskCardContent,ji as TaskChecklistSection,$m as TaskCommentInput,Wm as TaskCommentsSection,Ui as TaskContentEditor,ZL as TaskContextMenu,Vi as TaskCorePropertiesGrid,zl as TaskCreateBody,A2 as TaskCreateDrawer,Ou as TaskDateRangeFilter,au as TaskDetailBody,IA as TaskDetailDrawer,jm as TaskDetailHeader,X7 as TaskIconPickerPopover,an as TaskLabelChips,Gi as TaskLinkDialog,Ym as TaskNoteField,Ko as TaskPriorityChip,Ae as TaskStatusChip,g1 as TaskStatusChips,$u as TaskboxProvider,sS as buildCalendarFeedUrl,Ii as buildCardBaseSx,Ds as buildStatusOptionColors,Oa as buildTaskGroupSections,Fl as buildTaskRelationsModel,r0 as buildTaskShareText,ii as buildTaskboxTheme,Ls as canAssignBugManager,pi as canClaimTaskItem,Ns as canCompleteTaskItem,Pt as canEditTaskItem,di as canViewTaskItem,fi as canVolunteerTaskItem,Hl as countTaskRelations,Yc as countWorkdays,Pf as createTaskboxTheme,Gc as daysLeftUntil,Fi as defaultRepeatUntil,Ta as defaultTaskBoxFormValues,ya as defaultTaskboxUiStateValues,Dm as filterFilesWithinLimit,eD as formatConfirmTime,oO as formatHours,Zo as formatKoreanDate,Uo as formatKoreanDateTime,et as formatSprintOptionLabel,_s as getBugDeviceName,Is as getBugReproName,ai as getBugResolutionName,Nf as getBugStatusOption,J7 as getDefaultDateRange,Mr as getEventDisplayStatusOption,m1 as getNoDueStatusRank,wm as getNoticeAckInfo,ws as getNoticeStatusOption,$P as getNoticeTargetDisplay,PI as getProjectIconAnchorComponent,ye as getProjectIconComponent,$a as getReminderLabel,Wa as getReminderOptions,Ni as getRepeatRuleLabel,ci as getStatusOptionsForTask,xN as getTabHeaderConfig,qa as getTaskBoxColumnDefs,Rs as getTaskBoxGridTemplate,qB as getTaskBoxTabKind,vi as getTaskConfirmInfo,Bo as getTaskDisplayStatusOption,si as getTaskStatusOption,rr as groupGoogleEventsByDate,Xl as groupSeqFromTabKey,Gz as hasRelation,Qm as hasTaskRelations,xT as htmlToPlainText,U0 as isCustomTabKey,As as isOpenPoolTaskItem,_a as isPastEvent,li as isTaskDone,c1 as isWaitingTask,ma as monthsAgoDate,vt as narrowOrderSx,vA as nowDateTimeString,Wh as parseEstimatedHours,Hn as relationsOf,Jn as resolveTaskStatusOptions,Ba as resolveTaskboxTheme,aR as selectDepartmentSharedTasks,br as shareTaskText,tO as sumRemainingHours,oa as summarizeNoticeTargets,DA as tabKeyFromGroupSeq,it as taskVisibilityOf,Yn as toYmd,mi as toggleLabelKey,vr as useBuildFileUrl,km as useTaskAttachmentUploadMeta,Vo as useTaskboxConfig,Df as useTaskboxForm,le as useTaskboxTheme,Rt as useTaskboxUiState,Ir as useUploadMaxMb,io as wideColumnSx};
14
14
  //# sourceMappingURL=index.esm.js.map