@ehfuse/taskbox 0.5.168 → 0.5.169

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 ms="waiting",IB="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 Ky(e){let o=[`[\uC5C5\uBB34] ${e.title}`],t=Qo(e.start_date),n=Qo(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=To(e).name;r&&o.push(`\uC0C1\uD0DC: ${r}`);let i=Um(e.content);i&&o.push("",i);let a=String(e.note??"").trim();return a&&o.push("",`\uBE44\uACE0: ${a}`),o.join(`
13
- `)}function Km(e){navigator.clipboard.writeText(e).then(()=>Uy("\uC5C5\uBB34 \uB0B4\uC6A9\uC744 \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>Vy("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uB0B4\uC6A9\uC744 \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD574 \uC8FC\uC138\uC694."))}function gr(e,o){let t=Ky(e);if(o&&typeof navigator.share=="function"){navigator.share({text:t}).catch(n=>{n?.name!=="AbortError"&&Km(t)});return}Km(t)}import{Fragment as Jy,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:u,onPrint:x}){let f=we(),[m,d]=Al(!1),[v,I]=Al(null),[k,g]=Al(null),D=e.is_notice?he(e.icon||wo):null,B=!!e.is_notice,P=!!e.is_event,S=B&&o>0&&(e.author_account_seq??0)===o,M=!qt(e,o),O=!P&&(B?S:(e.author_account_seq??0)===o||(e.manager_account_seq??0)===o);return Gm(Jy,{children:[Gm(br,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[l&&a?Ve(Gr,{"aria-label":"\uB4A4\uB85C",onClick:a,sx:{color:"#37352f",ml:-1},children:Ve(jy,{})}):null,O&&!l?Ve(aa,{title:e.completed&&e.completed_by?`${e.completed_by} \xB7 ${it(e.completed_time)} \uC644\uB8CC`:"",arrow:!0,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:Ve(br,{sx:{display:"flex",flexShrink:0},children:Ve(Tt,{onClick:R=>g({anchorEl:R.currentTarget,nextCompleted:!e.completed}),children:e.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC"})})}):null,l||!D?null:Ve(br,{sx:{display:"flex",px:.5,color:e.icon_color||(B?"#e5484d":"#1e3a8a")},children:Ve(D,{sx:{fontSize:20}})}),v!==null?Ve(br,{component:"input",autoFocus:!0,spellCheck:!1,value:v,onChange:R=>I(R.target.value),onBlur:()=>{v.trim()&&v.trim()!==e.title&&n(e.seq,v.trim()),I(null)},onKeyDown:R=>{R.key==="Enter"&&R.target.blur(),R.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(br,{sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:B?"\uACF5\uC9C0":P?"\uC77C\uC815":e.is_bug?"\uC624\uB958":"\uC5C5\uBB34"}):Ve(br,{onClick:M?void 0:()=>I(e.title),sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:M?"default":"text",textDecoration:e.completed?"line-through":"none"},children:e.title}),u?Ve(aa,{title:"\uD65C\uB3D9",arrow:!0,children:Ve(Gr,{"aria-label":"\uD65C\uB3D9",onClick:()=>d(!0),sx:{color:"#6b7280"},children:Ve(Qy,{sx:{fontSize:20}})})}):null,Ve(aa,{title:f?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:Ve(Gr,{"aria-label":f?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>gr(e,f),sx:{color:"#6b7280"},children:f?Ve(Yy,{sx:{fontSize:20}}):Ve(Xy,{sx:{fontSize:20}})})}),x?Ve(aa,{title:"\uC778\uC1C4",arrow:!0,children:Ve(Gr,{"aria-label":"\uC778\uC1C4",onClick:()=>x(e),sx:{color:"#6b7280"},children:Ve(Zy,{sx:{fontSize:20}})})}):null,a&&!l?Ve(Gr,{"aria-label":"\uB2EB\uAE30",onClick:a,sx:{color:"#6b7280"},children:Ve(Gy,{})}):null]}),Ve(De,{open:!!k,anchorEl:k?.anchorEl??null,title:k?.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:k?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>g(null),onConfirm:()=>{k&&t(e.seq,k.nextCompleted),g(null)}}),Ve(ia,{open:m,taskSeq:e.seq,items:p,loading:c,onLoad:u,onClose:()=>d(!1)})]})}import{useState as pt}from"react";import{Box as no,Button as hr,ButtonBase as c0,Checkbox as m0,Divider as Fn,Menu as $l,MenuItem as Vl}from"@mui/material";import u0 from"@mui/icons-material/ExpandLess";import d0 from"@mui/icons-material/ExpandMore";import p0 from"@mui/icons-material/ConfirmationNumberOutlined";import eu from"@mui/icons-material/Check";import f0 from"@mui/icons-material/DirectionsRunOutlined";import x0 from"@mui/icons-material/SpeedOutlined";import Ul from"@mui/icons-material/CheckCircle";import g0 from"@mui/icons-material/CheckCircleOutlineOutlined";import Kl from"@mui/icons-material/CheckCircleOutlined";import ou from"@mui/icons-material/AccessTimeOutlined";import b0 from"@mui/icons-material/AutorenewOutlined";import h0 from"@mui/icons-material/LabelOutlined";import k0 from"@mui/icons-material/PersonOutlineOutlined";import T0 from"@mui/icons-material/SubjectOutlined";import y0 from"@mui/icons-material/StickyNote2Outlined";import S0 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 B0 from"@mui/icons-material/Repeat";import C0 from"@mui/icons-material/EventOutlined";import{ConfirmDialog as iu,InfoAlert as v0}from"@ehfuse/alerts";import{DatePicker as I0}from"@ehfuse/mui-datetime-picker";import{useState as e0}from"react";import{TextField as o0}from"@ehfuse/mui-form-controls";import{jsx as t0}from"react/jsx-runtime";function Ym({value:e,onCommit:o,onDraftChange:t,readOnly:n=!1}){let[r,i]=e0(null);return t0(o0,{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 Fl,useState as Hl}from"react";import{Box as Co,Button as Zm,IconButton as n0}from"@mui/material";import r0 from"@mui/icons-material/AccountTreeOutlined";import i0 from"@mui/icons-material/Add";import a0 from"@mui/icons-material/Close";import l0 from"@mui/icons-material/NextPlanOutlined";function Nn(e){return e.relations??[]}function Rz(e,o,t){return Nn(e).some(n=>n.type===t&&n.task_seq===o.seq)||Nn(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 Ll(e,o){let t=new Map(o.map(m=>[m.seq,m]));t.set(e.seq,e);let n=new Map,r=(m,d)=>{n.has(m)||n.set(m,new Set),n.has(d)||n.set(d,new Set),n.get(m).add(d),n.get(d).add(m)};for(let m of t.values())for(let d of Nn(m))d.type==="follow_up"&&t.has(d.task_seq)&&r(m.seq,d.task_seq);let i=new Set([e.seq]),a=[e.seq];for(;a.length>0;){let m=a.shift();for(let d of n.get(m)??[])i.has(d)||(i.add(d),a.push(d))}let l=[...i].map(m=>t.get(m)).filter(m=>!!m).sort((m,d)=>Xm(m).localeCompare(Xm(d))),p=new Set;for(let m of Nn(e))m.type==="related"&&p.add(m.task_seq);for(let m of t.values())m.seq!==e.seq&&Nn(m).some(d=>d.type==="related"&&d.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),u=[...t.values()].filter(m=>m.seq!==e.seq&&Nn(m).some(d=>d.type==="duplicate_of"&&d.task_seq===e.seq)),x=Nn(e).find(m=>m.type==="duplicate_of")?.task_seq,f=x?t.get(x)??null:null;return{lineage:l,related:c,duplicates:u,duplicateOf:f}}function Nl(e,o){let t=Ll(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 Nl(e,o)>0}import{Fragment as s0,jsx as je,jsxs as dt}from"react/jsx-runtime";function Wl({item:e,caption:o,onOpen:t,onUnlink:n}){let r=he(e.icon||go);return dt(Co,{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(Co,{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(Co,{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(Pe,{option:To(e),small:!0}),n?je(n0,{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(a0,{sx:{fontSize:15}})}):null]})}function Jm({task:e,tasks:o,readOnly:t=!1,onOpenTask:n,onLink:r,onUnlink:i,onCreateFollowUp:a}){let[l,p]=Hl(!1),[c,u]=Hl(null),[x,f]=Hl(null),m=Fl(()=>Ll(e,o),[e,o]),d=m.lineage.length>=2,v=Fl(()=>Nl(e,o),[e,o]),I=Fl(()=>{let g=new Set;for(let D of m.lineage)g.add(D.seq);for(let D of m.related)g.add(D.seq);for(let D of m.duplicates)g.add(D.seq);return m.duplicateOf&&g.add(m.duplicateOf.seq),[...g]},[m]),k=(g,D,B)=>{f({anchorEl:g,targetSeq:D,type:B})};return dt(ot,{icon:je(r0,{sx:{fontSize:19,display:"block"}}),title:dt(s0,{children:["\uAD00\uB828 \uC5C5\uBB34",v>0?je(Co,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:v}):null]}),titleExtra:t?null:dt(Co,{sx:{ml:"auto",display:"flex",alignItems:"center",gap:.5},children:[a?je(Zm,{size:"small",color:"inherit",startIcon:je(l0,{sx:{fontSize:16}}),onClick:g=>u(g.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(i0,{sx:{fontSize:16}}),onClick:()=>p(!0),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uC5F0\uACB0"}):null]}),children:[dt(Co,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:[d?je(Co,{sx:{mb:m.related.length||m.duplicates.length||m.duplicateOf?1:0},children:m.lineage.map((g,D)=>{let B=g.seq===e.seq,P=D===m.lineage.length-1;return dt(Co,{sx:{display:"flex",gap:1},children:[dt(Co,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:14,flexShrink:0,pt:1.1},children:[je(Co,{sx:{width:B?9:7,height:B?9:7,borderRadius:"50%",bgcolor:B?"#2f80ed":g.completed?"#9a9a97":"#c9c8c5",flexShrink:0}}),P?null:je(Co,{sx:{width:"2px",flex:1,bgcolor:"#e6e6e3"}})]}),dt(Co,{sx:{flex:1,minWidth:0,pb:P?0:.5},children:[dt(Co,{sx:{display:"flex",alignItems:"center",gap:.75},children:[dt(Co,{component:"span",onClick:!B&&n?()=>n(g.seq):void 0,sx:{minWidth:0,fontSize:14,fontWeight:B?600:400,color:B?"#2f80ed":g.completed?"#9a9a97":"#37352f",textDecoration:g.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...!B&&n?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[g.ticket_no?`${g.ticket_no} `:"",g.title]}),je(Pe,{option:To(g),small:!0})]}),je(Co,{sx:{fontSize:12,color:"#9a9a97"},children:g.completed&&g.completed_time?`${g.completed_time} \uC644\uB8CC`:g.created_time??""})]})]},g.seq)})}):null,m.duplicateOf?je(Wl,{item:m.duplicateOf,caption:"\uC6D0\uBCF8",onOpen:n?()=>n(m.duplicateOf.seq):void 0,onUnlink:!t&&i?g=>k(g.currentTarget,m.duplicateOf.seq,"duplicate_of"):void 0}):null,m.duplicates.map(g=>je(Wl,{item:g,caption:"\uC911\uBCF5",onOpen:n?()=>n(g.seq):void 0,onUnlink:!t&&i?D=>k(D.currentTarget,g.seq,"duplicate_of"):void 0},`dup-${g.seq}`)),m.related.map(g=>je(Wl,{item:g,onOpen:n?()=>n(g.seq):void 0,onUnlink:!t&&i?D=>k(D.currentTarget,g.seq,"related"):void 0},`rel-${g.seq}`)),v===0?je(Co,{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(Vi,{open:l,task:e,tasks:o,excludeSeqs:I,onClose:()=>p(!1),onSubmit:(g,D)=>r(e.seq,g,D)}):null,je(De,{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:()=>u(null),onConfirm:()=>{a?.(e.seq),u(null)}}),je(De,{open:!!x,anchorEl:x?.anchorEl??null,title:"\uC774 \uC5C5\uBB34\uC640\uC758 \uC5F0\uACB0\uC744 \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uD574\uC81C",onCancel:()=>f(null),onConfirm:()=>{x&&i?.(e.seq,x.targetSeq,x.type),f(null)}})]})}import{Fragment as Fo,jsx as A,jsxs as Ye}from"react/jsx-runtime";function kn({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return A(no,{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:u,onMemberEdit:x,onChangePriority:f,onChangeVisibility:m,onChangeRepeat:d,departments:v=[],onChangeEstimatedTime:I,onChangeEventTime:k,onChangeEventPlace:g,onChangeEventAddress:D,onChangeNote:B,onChangeNoteDraft:P,onChangeContent:S,onChangeContentHeight:M,onAddChecklistItem:O,onToggleChecklistItem:R,onRemoveChecklistItem:_,onUpdateChecklistItem:Y,onConvertChecklistToTask:b,onOpenChecklistTask:s,onLinkChecklistTask:y,resolveChecklistTask:h,relatedTasksPool:T,onOpenRelatedTask:w,onLinkRelatedTask:V,onUnlinkRelatedTask:J,onCreateFollowUpTask:ye,onAddAttachments:ue,onRemoveAttachment:fe,onPreview:de,onDownload:le,onUpdateComment:Te,onRemoveComment:qe,onToggleCommentReaction:Fe,currentUserName:W="",myAccountSeq:F=0,noticeAdmin:te=!1,hideProject:C=!1,hideLabel:N=!1,showTitle:Q=!1,onChangeTitle:$,onToggleCompleted:Me,onChangeIcon:Xe,onChangeIconColor:Qe,employees:He=[],onAckConfirm:ve,onRequestConfirm:Ze,onChangeBugField:X,sprints:Se=[],sprintProject:gt=!1,hideSprint:G=!1,onChangeSprint:ho,onChangeStoryPoints:Go,onChangeResolution:jo,onClaimTask:z,onVerifyBug:pe}){let[Oe,Ae]=pt(null),[Le,Io]=pt(null),[Ot,Be]=pt(null),[L,H]=pt(!1),ne={[st]:L?{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"}},[me,Ue]=pt(null),[We,Ie]=pt(null),[fo,xo]=pt(null),[ko,co]=pt(null),[yn,_e]=pt(null),[tt,Wo]=pt(null),[tn,Rt]=pt(null),Je=!!e.is_notice,ro=!!e.is_event,$o=!!e.is_bug,Jr=!!z&&mi(e,F),ei=!!z&&ui(e,F),jn=!!pe&&$o&&!!e.completed&&F>0&&(e.author_account_seq??0)===F&&!(e.acks??[]).some(E=>E.account_seq===F),_o=!qt(e,F),Sn=!e.is_event&&(e.is_notice?F>0&&(e.author_account_seq??0)===F:(e.author_account_seq??0)===F||(e.manager_account_seq??0)===F),Bn=e.is_notice||e.is_event?he(e.icon||(e.is_notice?wo:ht)):null,Cn=Je?!ci(e,F):_o,nn=Jr||ei?Ye(Tt,{onClick:E=>Rt(E.currentTarget),children:[A(S0,{sx:{fontSize:16,mr:.5}}),"\uAC00\uC838\uAC00\uAE30"]}):null,da=Je?Zi(e,He):"",Yo=Je?wm(e,He,F):null,Po=!Je&&!ro?Si(e,F):null,pa=!!(Po&&Po.total>0||Je&&Yo),fa=!Je;return Ye(Fo,{children:[Q?Ye(no,{sx:{px:2,pt:2,pb:.5,display:"flex",alignItems:"flex-start",gap:1},children:[Sn?A(m0,{checked:e.completed,icon:A(g0,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:A(Ul,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(E,nt)=>{Le||Io({anchorEl:E.currentTarget,nextCompleted:nt})},sx:{p:0,mt:.25}}):null,Bn?A(no,{sx:{display:"flex",p:0,mt:.25,color:e.icon_color||(Je?"#e5484d":"#1e3a8a")},children:A(Bn,{sx:{fontSize:20}})}):null,A(no,{sx:{flex:1,minWidth:0},children:Oe!==null?A(no,{component:"input",autoFocus:!0,spellCheck:!1,value:Oe,onChange:E=>Ae(E.target.value),onBlur:()=>{Oe.trim()&&Oe.trim()!==e.title&&$(e.seq,Oe.trim()),Ae(null)},onKeyDown:E=>{E.key==="Enter"&&E.target.blur(),E.key==="Escape"&&Ae(null)},sx:{width:"100%",border:"none",outline:"none",font:"inherit",fontSize:19,fontWeight:600,color:"#37352f",p:0,m:0}}):A(no,{onClick:()=>Ae(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})}),A(De,{open:!!Le,anchorEl:Le?.anchorEl??null,title:Le?.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:Le?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>Io(null),onConfirm:()=>{Le&&Me(e.seq,Le.nextCompleted),Io(null)}})]}):null,Ye(no,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:0,[st]:{pb:0,"& > :last-child":{mb:0}}},children:[A(Hi,{hideProject:C,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,estimatedTime:e.estimated_time,eventTime:e.event_time??"",eventPlace:e.event_place??"",eventAddress:e.event_address??""},customTabs:o,avatarSrcByName:n,showEstimatedTime:!ro,notice:Je,event:ro,readOnly:_o,targetSummary:da,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=>u(e.seq,E),onChangePriority:E=>f(e.seq,E),onChangeEstimatedTime:E=>I(e.seq,E),onChangeEventTime:E=>k?.(e.seq,E),onChangeEventPlace:E=>g?.(e.seq,E),onChangeEventAddress:E=>D?.(e.seq,E),onMemberEdit:E=>x(e,E,null),narrowCollapsedSx:ne,reminderLocked:e.completed,managerAction:nn,leading:Ye(Fo,{children:[jn||nn&&(Je||ro)?Ye(no,{sx:{gridColumn:"1 / -1",display:"flex",justifyContent:"flex-start",gap:2,px:2,py:1.5},children:[Je||ro?nn:null,jn?Ye(Fo,{children:[A(hr,{variant:"contained",size:"large",onClick:()=>pe?.(e.seq,!0),sx:{bgcolor:"#2f80ed"},children:"\uAC80\uC99D\uC644\uB8CC"}),A(hr,{variant:"outlined",size:"large",color:"error",onClick:()=>pe?.(e.seq,!1),children:"\uC7AC\uC624\uD508"})]}):null]}):null,$o&&e.ticket_no?A(ae,{icon:A(p0,{sx:{fontSize:17}}),label:"\uD2F0\uCF13",children:A(no,{component:"span",sx:{fontVariantNumeric:"tabular-nums"},children:e.ticket_no})}):null,ro?null:A(no,{sx:$o&&e.ticket_no||fa||pa?void 0:{gridColumn:"1 / -1"},children:A(ae,{icon:A(b0,{sx:{fontSize:17}}),label:"\uC0C1\uD0DC",onClick:_o||e.completed?void 0:E=>Ue(E),children:A(Pe,{option:To(e)})})}),Je?null:(()=>{let E=rt(e),nt=E==="all"?A(nu,{sx:{fontSize:17,color:"#2f80ed"}}):E==="group"?A(ru,{sx:{fontSize:17,color:"#d9730d"}}):A(tu,{sx:{fontSize:17}}),rn=E==="all"?"\uC804\uCCB4\uACF5\uAC1C":E==="group"?`\uBD80\uC11C\uACF5\uAC1C \xB7 ${v.find(bt=>bt.seq===(e.visibility_group_seq??0))?.name??"\uBD80\uC11C"}`:"\uBE44\uACF5\uAC1C";return A(no,{children:A(ae,{icon:nt,label:"\uACF5\uAC1C",onClick:_o||!m?void 0:bt=>Ie(bt),children:rn})})})(),!Je&&!$o?A(no,{children:A(ae,{icon:A(B0,{sx:{fontSize:17,...e.repeat_rule?{color:"#2f80ed"}:{}}}),label:"\uBC18\uBCF5",onClick:_o||!d?void 0:E=>xo(E),children:e.repeat_rule?qi(e.repeat_rule):A(kn,{label:"\uC5C6\uC74C"})})}):null,!Je&&!$o&&e.repeat_rule?A(no,{children:A(ae,{icon:A(C0,{sx:{fontSize:17}}),label:"\uBC18\uBCF5 \uC885\uB8CC",onClick:_o||!d?void 0:E=>co(E),children:e.repeat_until?`${e.repeat_until}\uAE4C\uC9C0`:A(kn,{})})}):null,Po&&Po.total>0?A(no,{children:A(ae,{icon:A(Kl,{sx:{fontSize:17}}),label:"\uD655\uC778",children:Po.canConfirm?A(hr,{size:"small",variant:"contained",onClick:()=>ve?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):Ye(hr,{size:"small",variant:"outlined",color:"inherit",startIcon:Po.myTime?A(Ul,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:E=>Be({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:[Po.count," / ",Po.total]})})}):null,Je&&Yo?A(no,{children:A(ae,{icon:A(Kl,{sx:{fontSize:17}}),label:"\uD655\uC778",children:A(no,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,minWidth:0},children:Yo.canAck?A(hr,{size:"small",variant:"contained",onClick:()=>ve?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):A(hr,{size:"small",variant:"outlined",color:"inherit",startIcon:Yo.acked?A(Ul,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:E=>Be({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:Yo.total>0&&Yo.count>=Yo.total?"\uC644\uB8CC":Ye(Fo,{children:[Yo.count,A(no,{component:"span",sx:{mx:.4},children:"/"}),Yo.total]})})})})}):null,gt&&!G&&!ro&&!Je?Ye(Fo,{children:[A(ae,{icon:A(f0,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:_o?void 0:E=>_e(E),children:(e.sprint_seq??0)>0?Se.find(E=>E.seq===e.sprint_seq)?.name??"\uC0AD\uC81C\uB41C \uC2A4\uD504\uB9B0\uD2B8":A(kn,{label:"\uBBF8\uBC30\uC815"})}),A(ae,{icon:A(x0,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",children:A(Xt,{value:(e.story_points??0)>0?String(e.story_points):"",placeholder:"\uBBF8\uCD94\uC815",readOnly:_o,onCommit:E=>Go?.(e.seq,Number(E.replace(/[^0-9.]/g,""))||0)})})]}):null,ro||N?null:A(no,{sx:[{gridColumn:"1 / -1"},ne??null],children:A(ae,{icon:A(h0,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:_o?void 0:E=>Wo(E),children:(e.label_keys??[]).length>0?A(an,{labelKeys:e.label_keys??[],labelOptions:t}):A(kn,{})})})]}),trailing:Ye(Fo,{children:[$o?A(Wi,{values:{repro:e.bug_repro??"",device:e.bug_device??"",where:e.bug_where??"",version:e.bug_version??"",resolution:e.resolution??""},readOnly:_o,showResolution:!!e.completed,onChangeRepro:E=>X?.(e.seq,"bug_repro",E),onChangeDevice:E=>X?.(e.seq,"bug_device",E),onChangeWhere:E=>X?.(e.seq,"bug_where",E),onChangeVersion:E=>X?.(e.seq,"bug_version",E),onChangeResolution:E=>jo?.(e.seq,E)}):null,A(ae,{icon:A(k0,{sx:{fontSize:17}}),label:"\uC791\uC131\uC790",sx:[So(9),ne??null],children:e.created_by?Ye(Fo,{children:[A(qo,{names:[e.created_by],size:20,avatarSrcByName:n}),e.created_by]}):A(kn,{})}),A(ae,{icon:A(ou,{sx:{fontSize:17}}),label:"\uC791\uC131\uC2DC\uAC04",sx:[So(11),ne??null],children:e.created_time?it(e.created_time):A(kn,{})}),e.completed?Ye(Fo,{children:[A(ae,{icon:A(Kl,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC790",sx:[So(10),ne??null],children:e.completed_by?Ye(Fo,{children:[A(qo,{names:[e.completed_by],size:20,avatarSrcByName:n}),e.completed_by]}):A(kn,{})}),A(ae,{icon:A(ou,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC2DC\uAC04",sx:[So(12),ne??null],children:e.completed_time?it(e.completed_time):A(kn,{})})]}):null]})}),Ye(no,{sx:{display:"none",[st]:{display:"block",mt:1.5,mb:0}},children:[A(Fn,{sx:{borderColor:"#e6e6e3"}}),A(c0,{onClick:()=>H(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:L?Ye(Fo,{children:["\uC811\uAE30 ",A(u0,{sx:{fontSize:18}})]}):Ye(Fo,{children:["\uC815\uBCF4 \uB354\uBCF4\uAE30 ",A(d0,{sx:{fontSize:18}})]})})]}),Ye(no,{children:[A(Fn,{sx:{my:1.5,borderColor:"#e6e6e3",[st]:{mt:0,mb:1.25}}}),A(ot,{icon:A(T0,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",children:A(no,{sx:{userSelect:"text"},children:A($i,{syncKey:e.seq,value:e.content??"",height:e.content_height??0,onChangeHeight:M?E=>M(e.seq,E):void 0,readOnly:_o,onChange:E=>S(e.seq,E)})})}),e.is_bug?null:Ye(Fo,{children:[A(Fn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),A(ot,{icon:A(y0,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:A(no,{sx:{userSelect:"text"},children:A(Ym,{value:e.note,readOnly:Cn,onCommit:E=>B(e.seq,E),onDraftChange:P?E=>P(e.seq,E):void 0})})})]}),ro?null:Ye(Fo,{children:[A(Fn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),A(Ui,{taskSeq:e.seq,checklist:e.checklist??[],removeLocked:Cn,onAdd:O,onToggle:R,onRemove:_,onUpdate:Y,onConvertToTask:b,onOpenLinkedTask:s,resolveLinkedTask:h,myAccountSeq:F,linkCandidates:T,linkBaseTask:e,onLinkExistingTask:y})]}),T&&!ro&&!Je&&Qm(e,T)?Ye(Fo,{children:[A(Fn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),A(Jm,{task:e,tasks:T,readOnly:_o,onOpenTask:w,onLink:V,onUnlink:J,onCreateFollowUp:ye})]}):null,A(Fn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),A(Yi,{taskSeq:e.seq,attachments:e.attachments??[],removeLocked:Cn,onAdd:ue,onRemove:fe,onPreview:de?E=>de({...E,taskSeq:e.seq}):void 0,onDownload:le?E=>le({...E,taskSeq:e.seq}):void 0})]}),A(Fn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),A(Wm,{taskSeq:e.seq,comments:e.comments??[],currentUserName:W,myAccountSeq:F,avatarSrcByName:n,onUpdate:Te,onRemove:qe,onToggleReaction:Fe,onPreview:de?E=>de({...E,taskSeq:e.seq}):void 0,onDownload:le?E=>le({...E,taskSeq:e.seq}):void 0})]}),A(Zn,{anchorEl:me,value:e.status,options:Je?_r:$o?In:wr,onSelect:E=>r(e.seq,E),onClose:()=>Ue(null)}),A($l,{transitionDuration:0,anchorEl:fo,open:!!fo,onClose:()=>xo(null),children:[{value:"",label:"\uC5C6\uC74C"},...Fr].map(E=>A(Vl,{selected:(e.repeat_rule??"")===E.value,onClick:()=>{xo(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)"})&&d?.(e.seq,"","");return}let rn=String(e.due_date??"").slice(0,10);if(!rn){v0(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\uAE30\uD55C\uC744 \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."})||d?.(e.seq,E.value,Ai(rn,E.value))})()},sx:{fontSize:14,minWidth:140},children:E.label},E.value||"none"))}),A(I0,{anchorEl:ko,open:!!ko,onClose:()=>co(null),selectedDate:e.repeat_until?new Date(`${e.repeat_until}T00:00:00`):new Date,onDateChange:E=>{co(null);let nt=xa=>String(xa).padStart(2,"0"),rn=`${E.getFullYear()}-${nt(E.getMonth()+1)}-${nt(E.getDate())}`,bt=e.repeat_rule??"";bt&&d?.(e.seq,bt,rn)}}),A($l,{transitionDuration:0,anchorEl:We,open:!!We,onClose:()=>Ie(null),children:[{key:"involved",label:"\uBE44\uACF5\uAC1C",icon:A(tu,{sx:{fontSize:17,color:"#57564f"}}),selected:rt(e)==="involved",onPick:()=>m?.(e.seq,"involved",0)},{key:"all",label:"\uC804\uCCB4\uACF5\uAC1C",icon:A(nu,{sx:{fontSize:17,color:"#2f80ed"}}),selected:rt(e)==="all",onPick:()=>m?.(e.seq,"all",0)},...v.map(E=>({key:`group-${E.seq}`,label:`\uBD80\uC11C\uACF5\uAC1C \xB7 ${E.name}`,icon:A(ru,{sx:{fontSize:17,color:"#d9730d"}}),selected:rt(e)==="group"&&(e.visibility_group_seq??0)===E.seq,onPick:()=>m?.(e.seq,"group",E.seq)}))].map(E=>Ye(Vl,{selected:E.selected,onClick:()=>{E.onPick(),Ie(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[E.icon,E.label,E.selected?A(eu,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},E.key))}),A($l,{transitionDuration:0,anchorEl:yn,open:!!yn,onClose:()=>_e(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...Se.filter(E=>`custom-${E.group_seq}`===String(e.tab_key??"")).map(E=>({seq:E.seq,label:Jo(E)}))].map(E=>Ye(Vl,{onClick:()=>{ho?.(e.seq,E.seq),_e(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[E.label,(e.sprint_seq??0)===E.seq?A(eu,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},E.seq))}),A(yi,{anchorEl:Ot?.anchorEl??null,open:!!Ot?.open,acks:e.acks??[],total:Yo?.total??Po?.total??0,avatarSrcByName:n,onRequestConfirm:Ze&&Po&&Po.count<Po.total?()=>{Ze(e.seq),Be(E=>E?{...E,open:!1}:null)}:void 0,onClose:()=>Be(E=>E?{...E,open:!1}:null)}),A(Qi,{anchorEl:tt,selectedKeys:e.label_keys??[],labelOptions:t,onToggle:E=>i(e.seq,li(e.label_keys??[],E)),onAddLabel:a,onClose:()=>Wo(null)}),A(De,{open:!!tn,anchorEl:tn,title:Jr?"\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:()=>Rt(null),onConfirm:()=>{z?.(e.seq),Rt(null)}})]})}import{Fragment as R0,jsx as Ro,jsxs as du}from"react/jsx-runtime";function uA(){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 dA({open:e,task:o,onClose:t,onAddComment:n,onSaveFields:r,myAccountSeq:i=0,onToggleCompleted:a,onChangeTitle:l,onChangeIcon:p,onChangeIconColor:c,activityItems:u,activityLoading:x,onLoadActivity:f,onPrint:m,...d}){let v=we(),I=su(null);o&&(I.current=o);let k=o??I.current,[g,D]=cu(!1),[B,P]=cu({}),S=Object.keys(B).length>0;lu(()=>{P({})},[o?.seq,e]);let M=su(null);if(lu(()=>{M.current?.scrollTo({top:0})},[o?.seq]),!k)return null;let O=v&&S?{...k,...B}:k,R=O.checklist??[],_=(h,T)=>{v?P(w=>({...w,...h})):T()},Y=()=>{let h=B;P({});let T=k.seq,w=h.title===void 0?void 0:String(h.title).trim();if(r){let V={...h};w!==void 0&&(w?V.title=w:delete V.title),Object.keys(V).length>0&&r(T,V),uu({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"});return}w&&l(T,w),h.icon!==void 0&&p(T,String(h.icon)),h.icon_color!==void 0&&c?.(T,String(h.icon_color)),h.status!==void 0&&d.onChangeStatus(T,h.status),h.label_keys!==void 0&&d.onChangeLabels(T,h.label_keys??[]),h.tab_key!==void 0&&d.onChangeProject(T,String(h.tab_key??"")),h.start_date!==void 0&&d.onChangeDate(T,"start_date",String(h.start_date??"")),h.due_date!==void 0&&d.onChangeDate(T,"due_date",String(h.due_date??"")),h.reminder!==void 0&&d.onChangeReminder(T,h.reminder),h.priority!==void 0&&d.onChangePriority(T,h.priority),h.estimated_time!==void 0&&d.onChangeEstimatedTime(T,String(h.estimated_time??"")),h.event_time!==void 0&&d.onChangeEventTime?.(T,String(h.event_time??"")),h.event_place!==void 0&&d.onChangeEventPlace?.(T,String(h.event_place??"")),h.event_address!==void 0&&d.onChangeEventAddress?.(T,String(h.event_address??"")),h.content!==void 0&&d.onChangeContent(T,String(h.content??"")),h.note!==void 0&&d.onChangeNote(T,String(h.note??"")),h.visibility!==void 0&&d.onChangeVisibility?.(T,h.visibility,Number(h.visibility_group_seq??0)),uu({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"})},b={...d,onChangeStatus:(h,T)=>_({status:T},()=>d.onChangeStatus(h,T)),onChangeLabels:(h,T)=>_({label_keys:T},()=>d.onChangeLabels(h,T)),onChangeProject:(h,T)=>_({tab_key:T},()=>d.onChangeProject(h,T)),onChangeDate:(h,T,w)=>_({[T]:w},()=>d.onChangeDate(h,T,w)),onChangeReminder:(h,T)=>_({reminder:T},()=>d.onChangeReminder(h,T)),onChangePriority:(h,T)=>_({priority:T},()=>d.onChangePriority(h,T)),onChangeEstimatedTime:(h,T)=>_({estimated_time:T},()=>d.onChangeEstimatedTime(h,T)),onChangeEventTime:(h,T)=>_({event_time:T},()=>d.onChangeEventTime?.(h,T)),onChangeEventPlace:(h,T)=>_({event_place:T},()=>d.onChangeEventPlace?.(h,T)),onChangeEventAddress:(h,T)=>_({event_address:T},()=>d.onChangeEventAddress?.(h,T)),onChangeContent:(h,T)=>_({content:T},()=>d.onChangeContent(h,T)),onChangeNote:(h,T)=>_({note:T},()=>d.onChangeNote(h,T)),onMemberEdit:(h,T)=>d.onMemberEdit(h,T,v?w=>P(V=>({...V,...w})):null),onChangeNoteDraft:v?(h,T)=>_({note:T},()=>{}):void 0,onChangeVisibility:d.onChangeVisibility?(h,T,w)=>_({visibility:T,visibility_group_seq:w},()=>d.onChangeVisibility?.(h,T,w)):void 0,onAddChecklistItem:(h,T)=>_({checklist:[...R,{label:T,checked:!1}]},()=>d.onAddChecklistItem(h,T)),onToggleChecklistItem:(h,T,w)=>_({checklist:R.map((V,J)=>J===T?{...V,checked:w}:V)},()=>d.onToggleChecklistItem(h,T,w)),onRemoveChecklistItem:(h,T)=>_({checklist:R.filter((w,V)=>V!==T)},()=>d.onRemoveChecklistItem(h,T)),onUpdateChecklistItem:d.onUpdateChecklistItem?(h,T,w)=>_({checklist:R.map((V,J)=>J===T?{...V,label:w}:V)},()=>d.onUpdateChecklistItem?.(h,T,w)):void 0,onLinkChecklistTask:d.onLinkChecklistTask?(h,T,w)=>_({checklist:[...R,{label:w,checked:!1,task_seq:T}]},()=>d.onLinkChecklistTask?.(h,T,w)):void 0},s=Ro(au,{...b,task:O,myAccountSeq:i,onChangeTitle:(h,T)=>_({title:T},()=>l(h,T)),onToggleCompleted:a,onChangeIcon:(h,T)=>_({icon:T},()=>p(h,T)),onChangeIconColor:(h,T)=>_({icon_color:T},()=>c?.(h,T)),showTitle:v}),y=Ro($m,{onSubmit:(h,T)=>n(O.seq,h,T)},O.seq);return v?du(R0,{children:[Ro(O0,{open:e,onClose:t,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:O.is_notice?"\uACF5\uC9C0\uC0AC\uD56D":O.is_event?"\uC77C\uC815":O.is_bug?"\uC624\uB958":"\uC5C5\uBB34",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1},custom:[...f?[{icon:Ro(E0,{sx:{ml:2,color:"#6b7280"}}),tooltip:"\uD65C\uB3D9",onClick:()=>D(!0)}]:[],{icon:Ro(D0,{sx:{ml:f?0:2,color:"#6b7280"}}),tooltip:"\uACF5\uC720\uD558\uAE30",onClick:()=>gr(O,!0)},{icon:Ro(_0,{variant:"contained",size:"small",disableElevation:!0,disabled:!S,onClick:S?Y: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:y},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:Ro(la,{sx:{userSelect:"none",width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:s})}]},k.seq),Ro(ia,{open:g,taskSeq:O.seq,items:u,loading:x,onLoad:f,onClose:()=>D(!1)})]}):Ro(w0,{anchor:"right",open:e,onClose:t,disableAutoFocus:!0,disableEnforceFocus:!0,sx:{zIndex:h=>h.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:du(la,{sx:{display:"flex",flexDirection:"column",height:"100%",userSelect:"none"},children:[Ro(jm,{task:O,myAccountSeq:i,onToggleCompleted:a,onChangeTitle:l,onChangeIcon:p,onChangeIconColor:c,onClose:t,activityItems:u,activityLoading:x,onLoadActivity:f,onPrint:m}),Ro(mu,{sx:{borderColor:"#e6e6e3"}}),Ro(la,{sx:{flex:1,minHeight:0},children:Ro(M0,{ref:M,style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:s})}),Ro(mu,{sx:{borderColor:"#37352f"}}),Ro(la,{sx:{flexShrink:0},children:y})]})})}import{useEffect as z0,useState as Hn}from"react";import{Box as Ho,Button as Yl,IconButton as pu}from"@mui/material";import{FormDialog as q0}from"@ehfuse/mui-form-dialog";import A0 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 Gl="custom-";function P0(e){return e.startsWith(Gl)}function xA(e){return e>0?`${Gl}${e}`:""}function jl(e){if(!P0(e))return 0;let o=Number(e.slice(Gl.length));return Number.isInteger(o)&&o>0?o:0}import{Fragment as N0,jsx as ao,jsxs as Tn}from"react/jsx-runtime";var L0=[{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 vA({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,u]=Hn(""),[x,f]=Hn(""),[m,d]=Hn(""),[v,I]=Hn(""),[k,g]=Hn(""),[D,B]=Hn(!1),[P,S]=Hn(0);z0(()=>{e&&(u(p.length===1?p[0].key:""),f(""),d(""),I(""),g(""),S(0))},[e]);let M=()=>{f(""),d(""),I(""),g(""),S(0)},O=b=>{S(b.seq),u(`custom-${b.group_seq}`),f(b.name),d(b.goal),I(b.start_date),g(b.end_date)},R=async()=>{let b=jl(c);if(!b){fu("\uBAA9\uD45C\uB97C \uB9CC\uB4E4 \uD504\uB85C\uC81D\uD2B8\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}if(!x.trim()){fu("\uBAA9\uD45C \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}B(!0);try{if(P>0){i(P,{name:x.trim(),goal:m.trim(),start_date:v,end_date:k}),M();return}await r({group_seq:b,name:x.trim(),goal:m.trim(),start_date:v,end_date:k})&&M()}finally{B(!1)}},_=new Map(o.map(b=>[jl(b.key),b.label])),Y=ao(Ho,{children:p.length===0?ao(Ho,{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.'}):Tn(N0,{children:[Tn(Ho,{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=>u(String(b.target.value)),disabled:P>0}),ao(xu,{label:"\uBAA9\uD45C \uC774\uB984",size:"medium",placeholder:"\uC608: 8\uC6D4 2\uC8FC\uCC28",value:x,onChange:b=>f(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:k,onChange:b=>g(b.target.value)}),ao(xu,{label:"\uC124\uBA85",size:"medium",placeholder:"\uC120\uD0DD \uC785\uB825",value:m,onChange:b=>d(b.target.value),sx:{gridColumn:"1 / -1"}})]}),Tn(Ho,{sx:{mt:1.5,display:"flex",justifyContent:"flex-end",gap:1},children:[P>0?ao(Yl,{color:"inherit",onClick:M,disabled:D,children:"\uCDE8\uC18C"}):null,ao(Yl,{variant:"contained",onClick:()=>{R()},disabled:D,children:P>0?"\uBAA9\uD45C \uC800\uC7A5":"\uBAA9\uD45C \uB9CC\uB4E4\uAE30"})]}),ao(Ho,{sx:{mt:2,borderTop:"1px solid #e6e6e3"},children:t.length===0?ao(Ho,{sx:{py:3,textAlign:"center",fontSize:14,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):t.map(b=>Tn(Ho,{sx:{display:"flex",flexDirection:"column",gap:1,py:1.75,borderBottom:"1px solid #f0efed"},children:[Tn(Ho,{sx:{minWidth:0},children:[Tn(Ho,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[ao(Ho,{component:"span",sx:{fontSize:16,fontWeight:600,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:b.name}),ao(Ho,{component:"span",sx:{flexShrink:0,px:1,py:.25,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:13,fontWeight:500},children:_.get(b.group_seq)??"\uC0AD\uC81C\uB41C \uD504\uB85C\uC81D\uD2B8"}),Tn(Ho,{component:"span",sx:{flexShrink:0,fontSize:14,color:"#57564f"},children:[hu(b.start_date)," ~ ",hu(b.end_date)]})]}),b.goal?ao(Ho,{sx:{mt:.5,fontSize:14,color:"#787774",lineHeight:1.5},children:b.goal}):null]}),Tn(Ho,{sx:{display:"flex",alignItems:"center",gap:.5},children:[ao(bu,{label:"\uC0C1\uD0DC",showLabel:!1,size:"small",value:b.status,options:L0.map(s=>({value:s.value,label:s.label})),onChange:s=>a(b.seq,String(s.target.value)),sx:{width:104,flexShrink:0}}),ao(pu,{"aria-label":"\uBAA9\uD45C \uC218\uC815",onClick:()=>O(b),sx:{color:"#9a9a97","&:hover":{color:"#2563eb"}},children:ao(A0,{sx:{fontSize:18}})}),ao(pu,{"aria-label":"\uBAA9\uD45C \uC0AD\uC81C",onClick:()=>l(b.seq),sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:ao(Ct,{style:{width:16,height:16}})})]})]},b.seq))})]})});return ao(q0,{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:Y}],actions:{showCancelButton:!1,right:ao(Yl,{variant:"contained",onClick:n,children:"\uB2EB\uAE30"})}})}import{useState as ku}from"react";import{Box as po,Button as Xl,Divider as F0,IconButton as H0,TextField as W0}from"@mui/material";import{FormDialog as $0}from"@ehfuse/mui-form-dialog";import V0 from"@mui/icons-material/OpenInNewOutlined";import U0 from"@mui/icons-material/EventOutlined";import{ConfirmDialog as K0}from"@ehfuse/alerts";import{jsx as ze,jsxs as Wn}from"react/jsx-runtime";function zA({open:e,imports:o,onRegister:t,onRemove:n,onClose:r}){let[i,a]=ku(""),[l,p]=ku(!1),c=async()=>{let f=i.trim();if(f){p(!0);try{await t(f)&&a("")}finally{p(!1)}}},u=async f=>{await K0({title:"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",message:`"${f.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}" \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&n(f.seq)},x=Wn(po,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[Wn(po,{sx:{color:"#37352f",lineHeight:1.7},children:["\uAD6C\uAE00 \uCE98\uB9B0\uB354\uC758 \uC77C\uC815\uC744 ",ze("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uC5C5\uBB34\uD568 \uCE98\uB9B0\uB354\uC5D0 \uD568\uAED8 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4.",ze("br",{}),"\uD45C\uC2DC/\uC228\uAE40\uC740 \uC5C5\uBB34\uD568 \uC6B0\uC0C1\uB2E8\uC758 ",ze("b",{children:"\uAD6C\uAE00 \uC77C\uC815"})," \uC2A4\uC704\uCE58\uB85C \uCF1C\uACE0 \uB055\uB2C8\uB2E4."]}),ze(po,{sx:{fontWeight:700,color:"#37352f",mt:.5},children:"\uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354"}),o.length>0?ze(po,{sx:{display:"flex",flexDirection:"column",border:"1px solid #e6e6e3",borderRadius:1},children:o.map((f,m)=>Wn(po,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:.75,borderTop:m>0?"1px solid #efefed":"none"},children:[ze(U0,{sx:{fontSize:18,color:"#0f9d58",flexShrink:0}}),ze(po,{component:"span",sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:f.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),ze(H0,{"aria-label":"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",size:"small",onClick:()=>{u(f)},sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:ze(Ct,{sx:{fontSize:18}})})]},f.seq))}):ze(po,{sx:{color:"#9a9a97",px:.5},children:"\uC544\uC9C1 \uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}),ze(F0,{sx:{my:1,borderColor:"#e6e6e3"}}),ze(po,{sx:{fontWeight:700,color:"#37352f"},children:"\uC0C8 \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30"}),Wn(po,{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:[ze(po,{children:Wn(po,{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 > ",ze("b",{children:"\uC124\uC815 \uBC0F \uACF5\uC720"}),"\uB97C \uC5FD\uB2C8\uB2E4."]})}),ze(po,{children:Wn(po,{component:"span",children:[ze("b",{children:"\uCE98\uB9B0\uB354 \uD1B5\uD569"})," \uC139\uC158\uC758 ",ze("b",{children:'"iCal \uD615\uC2DD\uC758 \uBE44\uBC00 \uC8FC\uC18C"'})," \uB97C \uBCF5\uC0AC\uD574 \uC544\uB798\uC5D0 \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),ze(po,{children:ze(po,{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."})}),ze(po,{children:ze(po,{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."})})]}),Wn(po,{sx:{display:"flex",gap:2,alignItems:"center"},children:[ze(W0,{value:i,onChange:f=>a(f.target.value),fullWidth:!0,label:"\uBE44\uBC00 iCal \uC8FC\uC18C",placeholder:"https://calendar.google.com/calendar/ical/\u2026/basic.ics",slotProps:{input:{spellCheck:!1}}}),ze(Xl,{variant:"contained",disabled:!i.trim()||l,onClick:()=>{c()},sx:{flexShrink:0},children:l?"\uD655\uC778 \uC911\u2026":"\uB4F1\uB85D"})]})]});return ze($0,{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:x}],actions:{showCancelButton:!1,left:ze(Xl,{variant:"outlined",startIcon:ze(V0,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:ze(Xl,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})}})}import{Box as en,Button as jr,TextField as G0}from"@mui/material";import{FormDialog as j0}from"@ehfuse/mui-form-dialog";import Y0 from"@mui/icons-material/ContentCopyOutlined";import Tu from"@mui/icons-material/OpenInNewOutlined";import{InfoAlert as yu}from"@ehfuse/alerts";import{Fragment as Q0,jsx as lo,jsxs as $n}from"react/jsx-runtime";function X0(e){return`${window.location.origin}/api/v1/taskbox/calendar/${e}.ics`}function $A({open:e,feed:o,feedTaskCount:t,buildFeedUrl:n,onSubscribe:r,onClose:i}){let a=n??X0,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 x=l.replace(/^https?:\/\//,"webcal://");window.open(`https://calendar.google.com/calendar/r?cid=${encodeURIComponent(x)}`,"_blank")},u=$n(en,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[$n(en,{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?$n(en,{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\uAE30\uD55C\uC774 \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?$n(Q0,{children:[lo(G0,{value:l,fullWidth:!0,label:"\uB0B4 \uD53C\uB4DC \uC8FC\uC18C",slotProps:{input:{readOnly:!0}}}),$n(en,{sx:{display:"flex",gap:2},children:[lo(jr,{variant:"outlined",startIcon:lo(Y0,{}),onClick:p,children:"\uC8FC\uC18C \uBCF5\uC0AC"}),lo(jr,{variant:"contained",startIcon:lo(Tu,{}),onClick:c,children:"Google \uCE98\uB9B0\uB354\uC5D0 \uCD94\uAC00"})]}),$n(en,{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(en,{children:$n("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(en,{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(en,{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(en,{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(jr,{variant:"contained",onClick:r,sx:{alignSelf:"flex-start"},children:"\uAD6C\uB3C5 \uC2DC\uC791 (\uD53C\uB4DC \uBC1C\uAE09)"})]});return lo(j0,{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:u}],actions:{showCancelButton:!1,left:lo(jr,{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(jr,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}import{useEffect as Z0,useMemo as Ql,useState as Zl}from"react";import{Box as Yr,Button as J0,Typography as eS}from"@mui/material";import{FormDialog as oS}from"@ehfuse/mui-form-dialog";import{SearchTextField as tS}from"@ehfuse/mui-form-controls";import{TreeView as nS}from"@ehfuse/tree-view";import{Fragment as cS,jsx as ft,jsxs as mS}from"react/jsx-runtime";function Su(e){return`${e.name}#${e.seq}`}function rS(e){return Number(e.slice(e.lastIndexOf("#")+1))||0}function iS(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 aS(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 lS(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(Yr,{component:"span",sx:{display:"inline-flex",alignItems:"baseline",gap:.75},children:ft(Yr,{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=>aS(r,o)).map(lS);return t.length===0&&n.length===0?null:{id:`group:${e.key}`,label:e.name,children:[...t,...n]}}function sS({groups:e,allEmployees:o,initialSelectedSeqs:t,multiple:n,isMobile:r,onSelectionChange:i}){let[a,l]=Zl(""),p=Ql(()=>e.map(u=>Bu(u,a.trim().toLowerCase())).filter(u=>u!==null),[e,a]),c=Ql(()=>o.filter(u=>t.includes(u.seq)).map(Su),[]);return mS(cS,{children:[ft(Yr,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:ft(tS,{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(Yr,{sx:r?{display:"flex",flexDirection:"column"}:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:ft(nS,{items:p,checkbox:!0,multiSelect:n,selectionMode:"child",showSearch:!1,defaultExpanded:!0,initialSelections:c,onChange:u=>i(u.map(rS).filter(x=>x>0)),styles:{border:"none",borderRadius:"0"}})})]})}function ZA({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=we(),[u,x]=Zl([]),[f,m]=Zl(0),d=Ql(()=>iS(n),[n]),v=i??[];Z0(()=>{e&&(x(v),m(k=>k+1))},[e]);let I=()=>{let k=d.filter(g=>u.includes(g.seq));l(r?k:k.slice(0,1)),p()};return ft(oS,{open:e,onClose:p,title:`${o}${r&&u.length>0?` (${u.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(Yr,{sx:{...c?{}:{height:560},display:"flex",flexDirection:"column",border:"1px solid #cccccc",borderRadius:1,...c?{}:{overflow:"hidden"},userSelect:"none"},children:ft(sS,{groups:n,allEmployees:d,initialSelectedSeqs:v,multiple:r,isMobile:c,onSelectionChange:x},f)})}],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(eS,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.35},children:t}):void 0,right:ft(J0,{variant:"contained",onClick:I,children:a})}})}import{useEffect as fS,useMemo as xS,useState as gS}from"react";import{Box as yr,Button as bS,Divider as hS}from"@mui/material";import{FormDialog as kS}from"@ehfuse/mui-form-dialog";import{LabelSelect as TS}from"@ehfuse/mui-form-controls";import{Box as Et}from"@mui/material";import{jsx as kr,jsxs as Tr}from"react/jsx-runtime";function uS(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((u,x)=>`${u.start_date}|${u.seq}`.localeCompare(`${x.start_date}|${x.seq}`)).map(u=>({sprint:u,...uS(u,o)})),i=r.some(u=>u.points>0),a=r.map(u=>i?u.points:u.count),l=Math.max(1,...a),p=r.filter(u=>u.sprint.status==="closed").map(u=>i?u.points:u.count),c=p.length>0?Math.round(p.reduce((u,x)=>u+x,0)/p.length*10)/10:null;return r.length===0?kr(Et,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uD45C\uC2DC\uD560 \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):Tr(Et,{children:[Tr(Et,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[Tr("span",{children:["\uC644\uB8CC ",i?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uBAA9\uD45C\uBCC4"]}),c!==null?Tr("span",{children:["\uD3C9\uADE0(\uC885\uB8CC \uBAA9\uD45C)"," ",kr(Et,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:c}),i?"SP":"\uAC74"]}):null]}),kr(Et,{sx:{display:"flex",alignItems:"flex-end",gap:2,height:t,px:.5},children:r.map(u=>{let x=i?u.points:u.count,f=Math.round((t-24)*x/l),m=u.sprint.status==="closed";return Tr(Et,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-end",height:"100%"},children:[kr(Et,{sx:{fontSize:14,fontWeight:700,color:"#37352f",lineHeight:1.5},children:x}),kr(Et,{sx:{width:"60%",maxWidth:56,height:Math.max(2,f),borderRadius:"4px 4px 0 0",bgcolor:m?"#2f80ed":"#a9c9f5"}})]},u.sprint.seq)})}),kr(Et,{sx:{display:"flex",gap:2,px:.5,mt:.5},children:r.map(u=>Tr(Et,{sx:{flex:1,minWidth:0,textAlign:"center",fontSize:13.5,color:"#000",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[u.sprint.name,u.sprint.status!=="closed"?" (\uC9C4\uD589\uC911)":""]},u.sprint.seq))})]})}import{useMemo as dS}from"react";import{Box as Vn}from"@mui/material";import{jsx as Mt,jsxs as Un}from"react/jsx-runtime";function vu(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?new Date(`${e}T00:00:00`):null}function pS(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function Jl(e){return e.slice(5).replace("-",".")}function Iu({sprint:e,tasks:o,todayStr:t,height:n=200}){let r=dS(()=>{let k=vu(e.start_date),g=vu(e.end_date);if(!k||!g||g<k||Math.round((g.getTime()-k.getTime())/864e5)+1>366)return null;let B=o.filter(b=>b.sprint_seq===e.seq&&!b.archived);if(B.length===0)return{empty:!0};let P=B.some(b=>(b.story_points??0)>0),S=b=>P?b.story_points??0:1,M=B.reduce((b,s)=>b+S(s),0),O=new Map;for(let b of B){if(!b.completed)continue;let s=(b.completed_time??"").slice(0,10),y=/^\d{4}-\d{2}-\d{2}$/.test(s)?s:e.start_date;O.set(y,(O.get(y)??0)+S(b))}let R=[];for(let b=new Date(k);b<=g;b.setDate(b.getDate()+1))R.push(pS(b));let _=M,Y=[];for(let b of R){if(b>t)break;_-=O.get(b)??0,Y.push({day:b,value:Math.max(0,_)})}return{empty:!1,days:R,total:M,usePoints:P,actual:Y}},[e,o,t]);if(!r)return Mt(Vn,{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 Mt(Vn,{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,u=200,x=8,f=k=>i.length===1?0:k/(i.length-1)*c,m=k=>x+(u-x*2)*(1-k/Math.max(1,a)),d=`${f(0)},${m(a)} ${f(i.length-1)},${m(0)}`,v=p.map(k=>`${f(i.indexOf(k.day))},${m(k.value)}`).join(" "),I=p[p.length-1];return Un(Vn,{children:[Un(Vn,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[Un("span",{children:["\uB0A8\uC740 ",l?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uCD1D ",a]}),I?Un("span",{children:["\uD604\uC7AC"," ",Mt(Vn,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:I.value}),l?"SP":"\uAC74"," \uB0A8\uC74C"]}):null]}),Mt(Vn,{sx:{border:"1px solid #e6e6e3",borderRadius:1,bgcolor:"#fafaf9",px:1,py:.5},children:Un("svg",{viewBox:`0 0 ${c} ${u}`,preserveAspectRatio:"none",style:{display:"block",width:"100%",height:n},children:[Mt("line",{x1:0,y1:m(0),x2:c,y2:m(0),stroke:"#e6e6e3",strokeWidth:1}),Mt("polyline",{points:d,fill:"none",stroke:"#9a9a97",strokeWidth:1.5,strokeDasharray:"6 5",vectorEffect:"non-scaling-stroke"}),p.length>1?Mt("polyline",{points:v,fill:"none",stroke:"#2f80ed",strokeWidth:2.5,vectorEffect:"non-scaling-stroke"}):null,I?Mt("circle",{cx:f(i.indexOf(I.day)),cy:m(I.value),r:4,fill:"#2f80ed",vectorEffect:"non-scaling-stroke"}):null]})}),Un(Vn,{sx:{mt:.5,display:"flex",justifyContent:"space-between",fontSize:13.5,color:"#000"},children:[Mt("span",{children:Jl(e.start_date)}),t>e.start_date&&t<e.end_date?Un("span",{children:["\uC624\uB298 ",Jl(t)]}):null,Mt("span",{children:Jl(e.end_date)})]})]})}import{jsx as on,jsxs as es}from"react/jsx-runtime";function x7({open:e,sprints:o,tasks:t,todayStr:n,initialSprintSeq:r=0,onClose:i}){let[a,l]=gS(0);fS(()=>{if(!e)return;let u=o.find(f=>f.status==="active")??o[0],x=o.find(f=>f.seq===r)??u;l(x?.seq??0)},[e]);let p=xS(()=>o.find(u=>u.seq===a)??null,[o,a]),c=es(yr,{sx:{display:"flex",flexDirection:"column"},children:[es(yr,{sx:{px:3,py:2.5},children:[on(yr,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBCA8\uB85C\uC2DC\uD2F0"}),on(Cu,{sprints:o,tasks:t})]}),on(hS,{sx:{borderColor:"#e6e6e3"}}),es(yr,{sx:{px:3,py:2.5},children:[on(yr,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBC88\uB2E4\uC6B4"}),on(TS,{label:"\uBAA9\uD45C",showLabel:!1,value:a?String(a):"",options:o.map(u=>({value:String(u.seq),label:Jo(u)})),onChange:u=>l(Number(u.target.value)||0),sx:{width:280,mb:2}}),p?on(Iu,{sprint:p,tasks:t,todayStr:n}):on(yr,{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 on(kS,{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:on(bS,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}import{Checkbox as yS,Divider as SS,Menu as BS,MenuItem as os}from"@mui/material";import{jsx as Xr,jsxs as _u}from"react/jsx-runtime";function T7({anchorEl:e,candidates:o,selectedNames:t,avatarSrcByName:n,onToggle:r,onClear:i,onClose:a}){return _u(BS,{anchorEl:e,open:!!e,onClose:a,transitionDuration:0,children:[o.length===0?Xr(os,{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(os,{onClick:()=>r(l),sx:{fontSize:14,minWidth:170,gap:1},children:[Xr(yS,{size:"small",checked:p,sx:{p:0}}),Xr(qo,{names:[l.name],size:20,avatarSrcByName:n}),l.name]},`${l.accountSeq}-${l.name}`)}),Xr(SS,{}),Xr(os,{disabled:t.length===0,onClick:i,sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{useState as CS}from"react";import{ButtonBase as vS,Menu as IS,MenuItem as _S}from"@mui/material";import wS from"@mui/icons-material/KeyboardArrowDown";import DS from"@mui/icons-material/Check";import{Fragment as ES,jsx as ts,jsxs as ns}from"react/jsx-runtime";function w7({value:e,onChange:o,options:t}){let[n,r]=CS(null),i=t??Ea,a=Ea.find(l=>l.value===e)?.label??"";return ns(ES,{children:[ns(vS,{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,ts(wS,{sx:{fontSize:17,color:"#9a9a97"}})]}),ts(IS,{transitionDuration:0,anchorEl:n,open:!!n,onClose:()=>r(null),children:i.map(l=>ns(_S,{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?ts(DS,{sx:{fontSize:16,color:"#2f80ed"}}):null]},l.value))})]})}import{Box as rs,ButtonBase as MS,Divider as OS,Popover as RS}from"@mui/material";import PS from"@mui/icons-material/Check";import zS from"@ehfuse/overlay-scrollbar";import{jsx as Kn,jsxs as Du}from"react/jsx-runtime";var wu=["#1e3a8a","#2f80ed","#06b6d4","#0fa3a3","#2f9e5b","#84cc16","#e8a33d","#d9730d","#e5484d","#e255a1","#a355c0","#8a5a2b","#57564f","#111827"];function q7({anchorEl:e,value:o,color:t="",onSelect:n,onSelectColor:r,onClose:i}){return Kn(RS,{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(rs,{sx:{width:"min(492px, calc(100vw - 32px))"},children:[Kn(zS,{style:{maxHeight:"min(432px, calc(100dvh - 240px))"},contentStyle:{minWidth:0,padding:10},thumb:{width:6},children:Kn(bi,{value:o||go,onChange:a=>{n(a),i()}})}),r?Du(rs,{sx:{px:1.25,pb:1.25},children:[Kn(OS,{sx:{mb:1,borderColor:"#efefed"}}),Kn(rs,{sx:{display:"flex",flexWrap:"wrap",gap:.75},children:wu.map(a=>{let l=(t||wu[0])===a;return Kn(MS,{"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?Kn(PS,{sx:{fontSize:15,color:"#ffffff"}}):null},a)})})]}):null]})})}import{Box as ca,ButtonBase as qS}from"@mui/material";import{DateTextField as Eu}from"@ehfuse/mui-form-controls";function Gn(e){let o=t=>String(t).padStart(2,"0");return`${e.getFullYear()}-${o(e.getMonth()+1)}-${o(e.getDate())}`}function sa(e,o=new Date){let t=new Date(o);return t.setMonth(t.getMonth()-e),t}function N7(e=new Date){return{fromDate:Gn(sa(1,e)),toDate:Gn(e)}}import{jsx as Qr,jsxs as Mu}from"react/jsx-runtime";var AS=[{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(Gn(sa(i)),Gn(new Date))},r=i=>i<=0?!e&&!o:!e||!o?!1:e===Gn(sa(i))&&o===Gn(new Date);return Mu(ca,{sx:{display:"flex",alignItems:"center",gap:1.5,flexWrap:"wrap"},children:[Qr(ca,{sx:{display:"flex",alignItems:"center",gap:1.5},children:AS.map(i=>{let a=r(i.months);return Qr(qS,{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(ca,{sx:{display:"flex",alignItems:"center",gap:.5},children:[Qr(Eu,{value:e,size:"small",placeholder:"\uC2DC\uC791\uC77C",onChange:i=>t(i.target.value,o),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}}),Qr(ca,{component:"span",sx:{fontSize:13,color:"#9a9a97"},children:"~"}),Qr(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 LS}from"@mui/material";import{jsx as Ru}from"react/jsx-runtime";function j7({anchorEl:e,fromDate:o,toDate:t,onChange:n,onClose:r}){return Ru(LS,{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 NS,ButtonBase as FS,Tab as HS,Tabs as WS}from"@mui/material";import $S from"@mui/icons-material/Checklist";import VS from"@mui/icons-material/Face";import US from"@mui/icons-material/Publish";import KS from"@mui/icons-material/NotificationsOutlined";import GS from"@mui/icons-material/BugReportOutlined";import jS from"@mui/icons-material/DescriptionOutlined";import YS from"@mui/icons-material/Inventory2Outlined";import{jsx as xt}from"react/jsx-runtime";function Pu(e,o){return o>0?`${e} (${o})`:e}var lL=[{id:"my",label:"\uC804\uCCB4",icon:xt($S,{sx:{fontSize:18}})},{id:"notice",label:"\uACF5\uC9C0\uC0AC\uD56D",icon:xt(KS,{sx:{fontSize:18}})},{id:"mine",label:"\uB0B4 \uC5C5\uBB34",icon:xt(VS,{sx:{fontSize:18}})},{id:"sent",label:"\uBCF4\uB0B8 \uC5C5\uBB34",icon:xt(US,{sx:{fontSize:18}})},{id:"bug",label:"\uC624\uB958",icon:xt(GS,{sx:{fontSize:18}})},{id:"archive",label:"\uBCF4\uAD00\uD568",icon:xt(YS,{sx:{fontSize:18}}),hideCount:!0},{id:"report",label:"\uBCF4\uACE0\uC11C",icon:xt(jS,{sx:{fontSize:18}}),hideCount:!0}];function XS(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=re(),a=XS(i.tabs),l=e;return r?xt(NS,{sx:{display:"flex",flexWrap:"wrap",gap:1.25},children:l.map(p=>{let c=o===p.id;return xt(FS,{onClick:()=>n(p.id),sx:{px:1.5,py:.75,borderRadius:1,fontSize:zo(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(WS,{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(HS,{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 QS,useMemo as ZS,useState as is}from"react";import{Divider as as,ListItemIcon as Ko,Menu as ls,MenuItem as vo}from"@mui/material";import JS from"@mui/icons-material/OpenInNewOutlined";import eB from"@mui/icons-material/Check";import oB from"@mui/icons-material/CheckCircleOutlined";import tB from"@mui/icons-material/RadioButtonUnchecked";import nB from"@mui/icons-material/SendOutlined";import rB from"@mui/icons-material/EventOutlined";import iB from"@mui/icons-material/PersonOutlineOutlined";import aB from"@mui/icons-material/ViewKanbanOutlined";import lB from"@mui/icons-material/ContentCopyOutlined";import sB from"@mui/icons-material/NextPlanOutlined";import cB from"@mui/icons-material/ContentPasteOutlined";import mB from"@mui/icons-material/ShareOutlined";import uB from"@mui/icons-material/DirectionsRunOutlined";import zu from"@mui/icons-material/ChevronRight";import dB from"@mui/icons-material/ArchiveOutlined";import pB from"@mui/icons-material/UnarchiveOutlined";import{ConfirmDialog as fB}from"@ehfuse/alerts";import{Fragment as xB,jsx as ce,jsxs as bo}from"react/jsx-runtime";function LL({target:e,onClose:o,customTabs:t,sprints:n=[],myAccountSeq:r=0,onOpenDetail:i,onToggleCompleted:a,onRequestConfirm:l,onChangeDueDate:p,onChangeReminder:c,onMemberEdit:u,onMoveProject:x,onDuplicate:f,onCreateFollowUp:m,onShare:d,onAssignSprint:v,onArchiveToggle:I,onDelete:k}){let g=we(),D=kt(),[B,P]=is(null),[S,M]=is(null),[O,R]=is(null);QS(()=>{e||(P(null),M(null),R(null))},[e]);let _=e?.task??null,Y=!!_?.is_notice,b=!!_?.is_event,s=_?!qt(_,r):!1,y=ZS(()=>new Set(t.filter(w=>w.useSprints).map(w=>w.key)),[t]),h=async(w="one")=>{let V=_;if(o(),!V)return;await fB({title:"\uC5C5\uBB34 \uC0AD\uC81C",message:w==="series"?`"${V.title}" \uC758 \uC774 \uD68C\uCC28\uC640 \uC774\uD6C4 \uBC18\uBCF5 \uD68C\uCC28\uB97C \uBAA8\uB450 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`:`"${V.title}" \uC5C5\uBB34\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&k(V.seq,w)},T=()=>{_&&I(_.seq,!_.archived),o()};return bo(xB,{children:[bo(ls,{open:!!e,onClose:o,transitionDuration:0,anchorReference:g?"none":"anchorPosition",anchorPosition:!g&&e?{top:e.position.top,left:e.position.left}:void 0,slotProps:{paper:{sx:{minWidth:190,...g?{position:"fixed",top:"50%",left:"50%",translate:"-50% -50%",maxHeight:"70vh"}:{}}},list:g?{sx:{"& .MuiMenuItem-root":{py:1,minHeight:0}}}:void 0},children:[bo(vo,{onClick:()=>{_&&i(_),o()},sx:{fontSize:14},children:[ce(Ko,{children:ce(JS,{sx:{fontSize:19}})}),"\uC0C1\uC138 \uC5F4\uAE30"]}),bo(vo,{disabled:Y?(_?.author_account_seq??0)!==r:(_?.author_account_seq??0)!==r&&(_?.manager_account_seq??0)!==r,onClick:()=>{_&&a(_.seq,!_.completed),o()},sx:{fontSize:14},children:[ce(Ko,{children:_?.completed?ce(tB,{sx:{fontSize:19}}):ce(oB,{sx:{fontSize:19}})}),_?.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC"]}),!Y&&l?bo(vo,{disabled:!(_?.manager_account_seq??0)&&(_?.receiver_account_seqs??[]).length===0,onClick:()=>{_&&l(_),o()},sx:{fontSize:14},children:[ce(Ko,{children:ce(nB,{sx:{fontSize:19}})}),"\uD655\uC778 \uC694\uCCAD"]}):null,b?null:ce(as,{}),b?null:bo(vo,{disabled:s,onClick:w=>{_&&P({anchorEl:w.currentTarget,task:_})},sx:{fontSize:14},children:[ce(Ko,{children:ce(rB,{sx:{fontSize:19}})}),"\uB9C8\uAC10\uAE30\uD55C \uBCC0\uACBD"]}),!Y&&!b&&u?bo(vo,{onClick:()=>{_&&u(_,"manager"),o()},sx:{fontSize:14},children:[ce(Ko,{children:ce(iB,{sx:{fontSize:19}})}),"\uCC45\uC784\uC790 \uBCC0\uACBD"]}):null,b?null:bo(vo,{disabled:s,onClick:w=>{_&&M({anchorEl:w.currentTarget,task:_})},sx:{fontSize:14},children:[ce(Ko,{children:ce(aB,{sx:{fontSize:19}})}),"\uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9",ce(zu,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}),ce(as,{}),f?bo(vo,{disabled:s,onClick:()=>{_&&f(_.seq),o()},sx:{fontSize:14},children:[ce(Ko,{children:ce(lB,{sx:{fontSize:19}})}),"\uBCF5\uC81C"]}):null,m&&_&&!_.is_event&&!_.is_notice?bo(vo,{onClick:()=>{_&&m(_.seq),o()},sx:{fontSize:14},children:[ce(Ko,{children:ce(sB,{sx:{fontSize:19}})}),"\uD6C4\uC18D \uC5C5\uBB34 \uB9CC\uB4E4\uAE30"]}):null,bo(vo,{onClick:()=>{_&&(d?d(_):gr(_,g)),o()},sx:{fontSize:14},children:[ce(Ko,{children:g?ce(mB,{sx:{fontSize:19}}):ce(cB,{sx:{fontSize:19}})}),g?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC"]}),_&&!_.is_notice&&!_.is_event&&y.has(String(_.tab_key??""))&&v?bo(vo,{onClick:w=>R(w.currentTarget),sx:{fontSize:14},children:[ce(Ko,{children:ce(uB,{sx:{fontSize:19}})}),"\uBAA9\uD45C\uC5D0 \uB123\uAE30",ce(zu,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}):null,bo(vo,{onClick:T,disabled:s||!_?.archived&&!(_&&ri(_)),sx:{fontSize:14},children:[ce(Ko,{children:_?.archived?ce(pB,{sx:{fontSize:19}}):ce(dB,{sx:{fontSize:19}})}),_?.archived?"\uBCF4\uAD00 \uD574\uC81C":"\uBCF4\uAD00"]}),ce(as,{}),bo(vo,{disabled:s,onClick:()=>{h("one")},sx:{fontSize:14,color:"#e5484d"},children:[ce(Ko,{children:ce(Ct,{sx:{fontSize:19,color:"#e5484d"}})}),(_?.repeat_group_key??0)>0?"\uC0AD\uC81C (\uC774 \uD68C\uCC28\uB9CC)":"\uC0AD\uC81C"]}),(_?.repeat_group_key??0)>0?bo(vo,{disabled:s,onClick:()=>{h("series")},sx:{fontSize:14,color:"#e5484d"},children:[ce(Ko,{children:ce(Ct,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC0AD\uC81C (\uC774\uD6C4 \uBC18\uBCF5 \uC804\uCCB4)"]}):null]}),ce(yt,{anchorEl:B?.anchorEl??null,open:!!B,date:B?.task.due_date??"",reminder:B?.task.reminder??"none",hideReminder:!!B?.task.completed,centered:g,onClose:()=>{P(null),o()},onDateChange:w=>{B&&p(B.task.seq,w)},onReminderChange:w=>{B&&c?.(B.task.seq,w)}}),bo(ls,{transitionDuration:0,anchorEl:S?.anchorEl??null,open:!!S,onClose:()=>{M(null),o()},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...D,children:[ce(vo,{selected:!S?.task.tab_key,onClick:()=>{S&&x(S.task.seq,""),M(null),o()},sx:{fontSize:14,minWidth:170},children:"\uC5C6\uC74C"}),t.filter(w=>!w.archived).map(w=>ce(vo,{selected:S?.task.tab_key===w.key,onClick:()=>{S&&x(S.task.seq,w.key),M(null),o()},sx:{fontSize:14,minWidth:170},children:w.label},w.key))]}),ce(ls,{transitionDuration:0,anchorEl:O,open:!!O,onClose:()=>R(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...n.filter(w=>`custom-${w.group_seq}`===String(_?.tab_key??"")).map(w=>({seq:w.seq,label:Jo(w)}))].map(w=>bo(vo,{onClick:()=>{_&&v?.(_.seq,w.seq),R(null),o()},sx:{fontSize:14,minWidth:160,gap:1},children:[w.label,(_?.sprint_seq??0)===w.seq?ce(eB,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},w.seq))})]})}import{Checkbox as gB,Divider as bB,Menu as hB,MenuItem as qu}from"@mui/material";import{jsx as ma,jsxs as Au}from"react/jsx-runtime";function $L({anchorEl:e,labelOptions:o,selectedKeys:t,onToggle:n,onClear:r,onClose:i}){return Au(hB,{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:[ma(gB,{size:"small",checked:l,sx:{p:0}}),ma(Pe,{option:a})]},a.key)}),ma(bB,{}),ma(qu,{disabled:t.length===0,onClick:()=>{r(),i()},sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{Divider as Lu,Menu as kB,MenuItem as ss}from"@mui/material";import TB from"@mui/icons-material/Check";import yB from"@mui/icons-material/BarChartOutlined";import SB from"@mui/icons-material/SettingsOutlined";import{jsx as Zr,jsxs as ua}from"react/jsx-runtime";function QL(e){let{anchorEl:o,sprints:t,value:n,onSelect:r,onManage:i,onCharts:a,onClose:l}=e;return ua(kB,{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:Jo(p)}))].map(p=>ua(ss,{onClick:()=>{r(p.seq),l()},sx:{fontSize:14,minWidth:180,gap:1},children:[p.label,n===p.seq?Zr(TB,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},p.seq)),Zr(Lu,{}),a?ua(ss,{onClick:()=>{l(),a()},sx:{fontSize:14,gap:1},children:[Zr(yB,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uCC28\uD2B8"]}):null,a?Zr(Lu,{}):null,ua(ss,{onClick:()=>{l(),i()},sx:{fontSize:14,gap:1},children:[Zr(SB,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uAD00\uB9AC\u2026"]})]})}var BB={my:"tasks",mine:"tasks",sent:"tasks",notice:"notice",bug:"bug",archive:"archive",done:"done",report:"report"};function CB(e){return BB[e]??"tasks"}var eN={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"],vB=["list","card"];function oN(e){let o=CB(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:vB,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{N1 as ALL_TASK_VIEWER_ACCOUNT_SEQS,Cm as AddLabelDialog,hi as AddTabDialog,Tm as AttachmentUploadGauge,wl as AttachmentUploadPercent,Ca as BUG_DEVICE_OPTIONS,Ir as BUG_ICON_COLOR,QI as BUG_KANBAN_COLUMNS,Ba as BUG_REPRO_OPTIONS,va as BUG_RESOLUTION_OPTIONS,In as BUG_STATUS_OPTIONS,vr as BUG_TASK_ICON,Wi as BugPropertiesGrid,ax as COLUMN_WIDTHS,_a as COMPLETED_STATUS_OPTION,Gl as CUSTOM_TAB_KEY_PREFIX,zA as CalendarImportDialog,$A as CalendarSubscribeDialog,sn as CommentBubbleIcon,or as ConfirmCountButton,Js as DATE_REMINDER_OPTIONS,Tk as DEFAULT_COMPACT_COLUMNS,ba as DEFAULT_PROJECT_ICON,lL as DEFAULT_TASKBOX_TAB_ITEMS,go as DEFAULT_TASK_ICON,yl as DRAWER_SECTION_TITLE_FONT_SIZE,j7 as DateRangeFilterPopover,ot as DrawerSection,yt as DueDatePickerPopover,Nf as ENDED_EVENT_STATUS_OPTION,Pm as EVENT_ICON_COLOR,ht as EVENT_TASK_ICON,ZA as EmployeeSelectDialog,Ea as GROUP_BY_OPTIONS,ar as GoogleEventChip,w7 as GroupByMenuButton,bi as IconPickerGrid,im as InlineAddressInput,Xt as InlineTextValue,wa as KANBAN_CLOSED_COLUMN_KEY,$L as LabelFilterMenu,Qi as LabelSelectMenu,wr as MANUAL_TASK_STATUS_OPTIONS,T7 as MemberFilterMenu,_r as NOTICE_STATUS_OPTIONS,wo as NOTICE_TASK_ICON,Ts as NO_TASK_ICON,ha as PROJECT_ICON_OPTIONS,ae as PropertyRow,er as RECEIVER_AVATAR_COLORS,ec as REMINDER_OPTIONS,qo as ReceiverAvatarStack,Jm as RelatedTasksSection,IB as STATUS_KEY_REPLIED,ms as STATUS_KEY_WAITING,ac as SortableTaskCard,Iu as SprintBurndownChart,x7 as SprintChartsDialog,QL as SprintFilterMenu,vA as SprintManageDialog,Cu as SprintVelocityChart,Zn as StatusSelectMenu,Ra as TASKBOX_COLUMNS,st as TASKBOX_DRAWER_NARROW_MQ,ys as TASKBOX_UI_STATE_ID,eN as TASKBOX_VIEW_LABELS,LM as TASKBOX_VIEW_MODES,Fr as TASK_REPEAT_RULE_OPTIONS,vn as TASK_STATUS_OPTIONS,tg as TIME_REMINDER_OPTIONS,yi as TaskAckListPopover,Tt as TaskActionButton,ia as TaskActivityDialog,Yi as TaskAttachmentsSection,Gc as TaskBoxColumnSummary,XO as TaskBoxCompactTable,Za as TaskBoxGroupBoard,CO as TaskBoxMobileList,qc as TaskBoxMonthAgenda,Mc as TaskBoxMonthCalendar,QM as TaskBoxSprintColumnSummary,nc as TaskBoxTable,sL as TaskBoxTabs,Wc as TaskBoxTimeline,AM as TaskBoxView,Ic as TaskBoxWeekCalendar,Rr as TaskCardContent,Ui as TaskChecklistSection,$m as TaskCommentInput,Wm as TaskCommentsSection,$i as TaskContentEditor,LL as TaskContextMenu,Hi as TaskCorePropertiesGrid,Rl as TaskCreateBody,B2 as TaskCreateDrawer,Ou as TaskDateRangeFilter,au as TaskDetailBody,dA as TaskDetailDrawer,jm as TaskDetailHeader,q7 as TaskIconPickerPopover,an as TaskLabelChips,Vi as TaskLinkDialog,Ym as TaskNoteField,Uo as TaskPriorityChip,Pe as TaskStatusChip,i1 as TaskStatusChips,$u as TaskboxProvider,X0 as buildCalendarFeedUrl,Bi as buildCardBaseSx,Ds as buildStatusOptionColors,Ma as buildTaskGroupSections,Ll as buildTaskRelationsModel,Ky as buildTaskShareText,ti as buildTaskboxTheme,As as canAssignBugManager,mi as canClaimTaskItem,Ls as canCompleteTaskItem,qt as canEditTaskItem,ci as canViewTaskItem,ui as canVolunteerTaskItem,Nl as countTaskRelations,Vc as countWorkdays,Pf as createTaskboxTheme,Kc as daysLeftUntil,Ai as defaultRepeatUntil,ka as defaultTaskBoxFormValues,Ta as defaultTaskboxUiStateValues,Dm as filterFilesWithinLimit,Vw as formatConfirmTime,$c as formatHours,Qo as formatKoreanDate,it as formatKoreanDateTime,Jo as formatSprintOptionLabel,_s as getBugDeviceName,Is as getBugReproName,ni as getBugResolutionName,Ff as getBugStatusOption,N7 as getDefaultDateRange,Dr as getEventDisplayStatusOption,JI as getNoDueStatusRank,wm as getNoticeAckInfo,ws as getNoticeStatusOption,wP as getNoticeTargetDisplay,SI as getProjectIconAnchorComponent,he as getProjectIconComponent,Ha as getReminderLabel,Fa as getReminderOptions,qi as getRepeatRuleLabel,ai as getStatusOptionsForTask,oN as getTabHeaderConfig,za as getTaskBoxColumnDefs,Os as getTaskBoxGridTemplate,CB as getTaskBoxTabKind,Si as getTaskConfirmInfo,To as getTaskDisplayStatusOption,ii as getTaskStatusOption,nr as groupGoogleEventsByDate,jl as groupSeqFromTabKey,Rz as hasRelation,Qm as hasTaskRelations,hT as htmlToPlainText,P0 as isCustomTabKey,qs as isOpenPoolTaskItem,Ia as isPastEvent,ri as isTaskDone,ZI as isWaitingTask,sa as monthsAgoDate,So as narrowOrderSx,uA as nowDateTimeString,Uh as parseEstimatedHours,Nn as relationsOf,Qn as resolveTaskStatusOptions,Sa as resolveTaskboxTheme,YO as selectDepartmentSharedTasks,gr as shareTaskText,Uc as sumRemainingHours,Zi as summarizeNoticeTargets,xA as tabKeyFromGroupSeq,rt as taskVisibilityOf,Gn as toYmd,li as toggleLabelKey,Br as useBuildFileUrl,km as useTaskAttachmentUploadMeta,Vo as useTaskboxConfig,Df as useTaskboxForm,re as useTaskboxTheme,zt as useTaskboxUiState,Cr as useUploadMaxMb};
13
+ `)}function Km(e){navigator.clipboard.writeText(e).then(()=>Uy("\uC5C5\uBB34 \uB0B4\uC6A9\uC744 \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>Vy("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uB0B4\uC6A9\uC744 \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD574 \uC8FC\uC138\uC694."))}function gr(e,o){let t=Ky(e);if(o&&typeof navigator.share=="function"){navigator.share({text:t}).catch(n=>{n?.name!=="AbortError"&&Km(t)});return}Km(t)}import{Fragment as Jy,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:u,onPrint:x}){let f=we(),[m,d]=Al(!1),[v,I]=Al(null),[k,g]=Al(null),D=e.is_notice?he(e.icon||wo):null,B=!!e.is_notice,P=!!e.is_event,S=B&&o>0&&(e.author_account_seq??0)===o,M=!qt(e,o),O=!P&&(B?S:(e.author_account_seq??0)===o||(e.manager_account_seq??0)===o);return Gm(Jy,{children:[Gm(br,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[l&&a?Ve(Gr,{"aria-label":"\uB4A4\uB85C",onClick:a,sx:{color:"#37352f",ml:-1},children:Ve(jy,{})}):null,O&&!l?Ve(aa,{title:e.completed&&e.completed_by?`${e.completed_by} \xB7 ${it(e.completed_time)} \uC644\uB8CC`:"",arrow:!0,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:Ve(br,{sx:{display:"flex",flexShrink:0,mr:1.5},children:Ve(Tt,{onClick:R=>g({anchorEl:R.currentTarget,nextCompleted:!e.completed}),children:e.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC"})})}):null,l||!D?null:Ve(br,{sx:{display:"flex",px:.5,color:e.icon_color||(B?"#e5484d":"#1e3a8a")},children:Ve(D,{sx:{fontSize:20}})}),v!==null?Ve(br,{component:"input",autoFocus:!0,spellCheck:!1,value:v,onChange:R=>I(R.target.value),onBlur:()=>{v.trim()&&v.trim()!==e.title&&n(e.seq,v.trim()),I(null)},onKeyDown:R=>{R.key==="Enter"&&R.target.blur(),R.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(br,{sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:B?"\uACF5\uC9C0":P?"\uC77C\uC815":e.is_bug?"\uC624\uB958":"\uC5C5\uBB34"}):Ve(br,{onClick:M?void 0:()=>I(e.title),sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:M?"default":"text",textDecoration:e.completed?"line-through":"none"},children:e.title}),u?Ve(aa,{title:"\uD65C\uB3D9",arrow:!0,children:Ve(Gr,{"aria-label":"\uD65C\uB3D9",onClick:()=>d(!0),sx:{color:"#6b7280"},children:Ve(Qy,{sx:{fontSize:20}})})}):null,Ve(aa,{title:f?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:Ve(Gr,{"aria-label":f?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>gr(e,f),sx:{color:"#6b7280"},children:f?Ve(Yy,{sx:{fontSize:20}}):Ve(Xy,{sx:{fontSize:20}})})}),x?Ve(aa,{title:"\uC778\uC1C4",arrow:!0,children:Ve(Gr,{"aria-label":"\uC778\uC1C4",onClick:()=>x(e),sx:{color:"#6b7280"},children:Ve(Zy,{sx:{fontSize:20}})})}):null,a&&!l?Ve(Gr,{"aria-label":"\uB2EB\uAE30",onClick:a,sx:{color:"#6b7280"},children:Ve(Gy,{})}):null]}),Ve(De,{open:!!k,anchorEl:k?.anchorEl??null,title:k?.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:k?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>g(null),onConfirm:()=>{k&&t(e.seq,k.nextCompleted),g(null)}}),Ve(ia,{open:m,taskSeq:e.seq,items:p,loading:c,onLoad:u,onClose:()=>d(!1)})]})}import{useState as pt}from"react";import{Box as no,Button as hr,ButtonBase as c0,Checkbox as m0,Divider as Fn,Menu as $l,MenuItem as Vl}from"@mui/material";import u0 from"@mui/icons-material/ExpandLess";import d0 from"@mui/icons-material/ExpandMore";import p0 from"@mui/icons-material/ConfirmationNumberOutlined";import eu from"@mui/icons-material/Check";import f0 from"@mui/icons-material/DirectionsRunOutlined";import x0 from"@mui/icons-material/SpeedOutlined";import Ul from"@mui/icons-material/CheckCircle";import g0 from"@mui/icons-material/CheckCircleOutlineOutlined";import Kl from"@mui/icons-material/CheckCircleOutlined";import ou from"@mui/icons-material/AccessTimeOutlined";import b0 from"@mui/icons-material/AutorenewOutlined";import h0 from"@mui/icons-material/LabelOutlined";import k0 from"@mui/icons-material/PersonOutlineOutlined";import T0 from"@mui/icons-material/SubjectOutlined";import y0 from"@mui/icons-material/StickyNote2Outlined";import S0 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 B0 from"@mui/icons-material/Repeat";import C0 from"@mui/icons-material/EventOutlined";import{ConfirmDialog as iu,InfoAlert as v0}from"@ehfuse/alerts";import{DatePicker as I0}from"@ehfuse/mui-datetime-picker";import{useState as e0}from"react";import{TextField as o0}from"@ehfuse/mui-form-controls";import{jsx as t0}from"react/jsx-runtime";function Ym({value:e,onCommit:o,onDraftChange:t,readOnly:n=!1}){let[r,i]=e0(null);return t0(o0,{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 Fl,useState as Hl}from"react";import{Box as Co,Button as Zm,IconButton as n0}from"@mui/material";import r0 from"@mui/icons-material/AccountTreeOutlined";import i0 from"@mui/icons-material/Add";import a0 from"@mui/icons-material/Close";import l0 from"@mui/icons-material/NextPlanOutlined";function Nn(e){return e.relations??[]}function Rz(e,o,t){return Nn(e).some(n=>n.type===t&&n.task_seq===o.seq)||Nn(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 Ll(e,o){let t=new Map(o.map(m=>[m.seq,m]));t.set(e.seq,e);let n=new Map,r=(m,d)=>{n.has(m)||n.set(m,new Set),n.has(d)||n.set(d,new Set),n.get(m).add(d),n.get(d).add(m)};for(let m of t.values())for(let d of Nn(m))d.type==="follow_up"&&t.has(d.task_seq)&&r(m.seq,d.task_seq);let i=new Set([e.seq]),a=[e.seq];for(;a.length>0;){let m=a.shift();for(let d of n.get(m)??[])i.has(d)||(i.add(d),a.push(d))}let l=[...i].map(m=>t.get(m)).filter(m=>!!m).sort((m,d)=>Xm(m).localeCompare(Xm(d))),p=new Set;for(let m of Nn(e))m.type==="related"&&p.add(m.task_seq);for(let m of t.values())m.seq!==e.seq&&Nn(m).some(d=>d.type==="related"&&d.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),u=[...t.values()].filter(m=>m.seq!==e.seq&&Nn(m).some(d=>d.type==="duplicate_of"&&d.task_seq===e.seq)),x=Nn(e).find(m=>m.type==="duplicate_of")?.task_seq,f=x?t.get(x)??null:null;return{lineage:l,related:c,duplicates:u,duplicateOf:f}}function Nl(e,o){let t=Ll(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 Nl(e,o)>0}import{Fragment as s0,jsx as je,jsxs as dt}from"react/jsx-runtime";function Wl({item:e,caption:o,onOpen:t,onUnlink:n}){let r=he(e.icon||go);return dt(Co,{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(Co,{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(Co,{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(Pe,{option:To(e),small:!0}),n?je(n0,{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(a0,{sx:{fontSize:15}})}):null]})}function Jm({task:e,tasks:o,readOnly:t=!1,onOpenTask:n,onLink:r,onUnlink:i,onCreateFollowUp:a}){let[l,p]=Hl(!1),[c,u]=Hl(null),[x,f]=Hl(null),m=Fl(()=>Ll(e,o),[e,o]),d=m.lineage.length>=2,v=Fl(()=>Nl(e,o),[e,o]),I=Fl(()=>{let g=new Set;for(let D of m.lineage)g.add(D.seq);for(let D of m.related)g.add(D.seq);for(let D of m.duplicates)g.add(D.seq);return m.duplicateOf&&g.add(m.duplicateOf.seq),[...g]},[m]),k=(g,D,B)=>{f({anchorEl:g,targetSeq:D,type:B})};return dt(ot,{icon:je(r0,{sx:{fontSize:19,display:"block"}}),title:dt(s0,{children:["\uAD00\uB828 \uC5C5\uBB34",v>0?je(Co,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:v}):null]}),titleExtra:t?null:dt(Co,{sx:{ml:"auto",display:"flex",alignItems:"center",gap:.5},children:[a?je(Zm,{size:"small",color:"inherit",startIcon:je(l0,{sx:{fontSize:16}}),onClick:g=>u(g.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(i0,{sx:{fontSize:16}}),onClick:()=>p(!0),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uC5F0\uACB0"}):null]}),children:[dt(Co,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:[d?je(Co,{sx:{mb:m.related.length||m.duplicates.length||m.duplicateOf?1:0},children:m.lineage.map((g,D)=>{let B=g.seq===e.seq,P=D===m.lineage.length-1;return dt(Co,{sx:{display:"flex",gap:1},children:[dt(Co,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:14,flexShrink:0,pt:1.1},children:[je(Co,{sx:{width:B?9:7,height:B?9:7,borderRadius:"50%",bgcolor:B?"#2f80ed":g.completed?"#9a9a97":"#c9c8c5",flexShrink:0}}),P?null:je(Co,{sx:{width:"2px",flex:1,bgcolor:"#e6e6e3"}})]}),dt(Co,{sx:{flex:1,minWidth:0,pb:P?0:.5},children:[dt(Co,{sx:{display:"flex",alignItems:"center",gap:.75},children:[dt(Co,{component:"span",onClick:!B&&n?()=>n(g.seq):void 0,sx:{minWidth:0,fontSize:14,fontWeight:B?600:400,color:B?"#2f80ed":g.completed?"#9a9a97":"#37352f",textDecoration:g.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...!B&&n?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[g.ticket_no?`${g.ticket_no} `:"",g.title]}),je(Pe,{option:To(g),small:!0})]}),je(Co,{sx:{fontSize:12,color:"#9a9a97"},children:g.completed&&g.completed_time?`${g.completed_time} \uC644\uB8CC`:g.created_time??""})]})]},g.seq)})}):null,m.duplicateOf?je(Wl,{item:m.duplicateOf,caption:"\uC6D0\uBCF8",onOpen:n?()=>n(m.duplicateOf.seq):void 0,onUnlink:!t&&i?g=>k(g.currentTarget,m.duplicateOf.seq,"duplicate_of"):void 0}):null,m.duplicates.map(g=>je(Wl,{item:g,caption:"\uC911\uBCF5",onOpen:n?()=>n(g.seq):void 0,onUnlink:!t&&i?D=>k(D.currentTarget,g.seq,"duplicate_of"):void 0},`dup-${g.seq}`)),m.related.map(g=>je(Wl,{item:g,onOpen:n?()=>n(g.seq):void 0,onUnlink:!t&&i?D=>k(D.currentTarget,g.seq,"related"):void 0},`rel-${g.seq}`)),v===0?je(Co,{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(Vi,{open:l,task:e,tasks:o,excludeSeqs:I,onClose:()=>p(!1),onSubmit:(g,D)=>r(e.seq,g,D)}):null,je(De,{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:()=>u(null),onConfirm:()=>{a?.(e.seq),u(null)}}),je(De,{open:!!x,anchorEl:x?.anchorEl??null,title:"\uC774 \uC5C5\uBB34\uC640\uC758 \uC5F0\uACB0\uC744 \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uD574\uC81C",onCancel:()=>f(null),onConfirm:()=>{x&&i?.(e.seq,x.targetSeq,x.type),f(null)}})]})}import{Fragment as Fo,jsx as A,jsxs as Ye}from"react/jsx-runtime";function kn({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return A(no,{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:u,onMemberEdit:x,onChangePriority:f,onChangeVisibility:m,onChangeRepeat:d,departments:v=[],onChangeEstimatedTime:I,onChangeEventTime:k,onChangeEventPlace:g,onChangeEventAddress:D,onChangeNote:B,onChangeNoteDraft:P,onChangeContent:S,onChangeContentHeight:M,onAddChecklistItem:O,onToggleChecklistItem:R,onRemoveChecklistItem:_,onUpdateChecklistItem:Y,onConvertChecklistToTask:b,onOpenChecklistTask:s,onLinkChecklistTask:y,resolveChecklistTask:h,relatedTasksPool:T,onOpenRelatedTask:w,onLinkRelatedTask:V,onUnlinkRelatedTask:J,onCreateFollowUpTask:ye,onAddAttachments:ue,onRemoveAttachment:fe,onPreview:de,onDownload:le,onUpdateComment:Te,onRemoveComment:qe,onToggleCommentReaction:Fe,currentUserName:W="",myAccountSeq:F=0,noticeAdmin:te=!1,hideProject:C=!1,hideLabel:N=!1,showTitle:Q=!1,onChangeTitle:$,onToggleCompleted:Me,onChangeIcon:Xe,onChangeIconColor:Qe,employees:He=[],onAckConfirm:ve,onRequestConfirm:Ze,onChangeBugField:X,sprints:Se=[],sprintProject:gt=!1,hideSprint:G=!1,onChangeSprint:ho,onChangeStoryPoints:Go,onChangeResolution:jo,onClaimTask:z,onVerifyBug:pe}){let[Oe,Ae]=pt(null),[Le,Io]=pt(null),[Ot,Be]=pt(null),[L,H]=pt(!1),ne={[st]:L?{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"}},[me,Ue]=pt(null),[We,Ie]=pt(null),[fo,xo]=pt(null),[ko,co]=pt(null),[yn,_e]=pt(null),[tt,Wo]=pt(null),[tn,Rt]=pt(null),Je=!!e.is_notice,ro=!!e.is_event,$o=!!e.is_bug,Jr=!!z&&mi(e,F),ei=!!z&&ui(e,F),jn=!!pe&&$o&&!!e.completed&&F>0&&(e.author_account_seq??0)===F&&!(e.acks??[]).some(E=>E.account_seq===F),_o=!qt(e,F),Sn=!e.is_event&&(e.is_notice?F>0&&(e.author_account_seq??0)===F:(e.author_account_seq??0)===F||(e.manager_account_seq??0)===F),Bn=e.is_notice||e.is_event?he(e.icon||(e.is_notice?wo:ht)):null,Cn=Je?!ci(e,F):_o,nn=Jr||ei?Ye(Tt,{onClick:E=>Rt(E.currentTarget),children:[A(S0,{sx:{fontSize:16,mr:.5}}),"\uAC00\uC838\uAC00\uAE30"]}):null,da=Je?Zi(e,He):"",Yo=Je?wm(e,He,F):null,Po=!Je&&!ro?Si(e,F):null,pa=!!(Po&&Po.total>0||Je&&Yo),fa=!Je;return Ye(Fo,{children:[Q?Ye(no,{sx:{px:2,pt:2,pb:.5,display:"flex",alignItems:"flex-start",gap:1},children:[Sn?A(m0,{checked:e.completed,icon:A(g0,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:A(Ul,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(E,nt)=>{Le||Io({anchorEl:E.currentTarget,nextCompleted:nt})},sx:{p:0,mt:.25}}):null,Bn?A(no,{sx:{display:"flex",p:0,mt:.25,color:e.icon_color||(Je?"#e5484d":"#1e3a8a")},children:A(Bn,{sx:{fontSize:20}})}):null,A(no,{sx:{flex:1,minWidth:0},children:Oe!==null?A(no,{component:"input",autoFocus:!0,spellCheck:!1,value:Oe,onChange:E=>Ae(E.target.value),onBlur:()=>{Oe.trim()&&Oe.trim()!==e.title&&$(e.seq,Oe.trim()),Ae(null)},onKeyDown:E=>{E.key==="Enter"&&E.target.blur(),E.key==="Escape"&&Ae(null)},sx:{width:"100%",border:"none",outline:"none",font:"inherit",fontSize:19,fontWeight:600,color:"#37352f",p:0,m:0}}):A(no,{onClick:()=>Ae(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})}),A(De,{open:!!Le,anchorEl:Le?.anchorEl??null,title:Le?.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:Le?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>Io(null),onConfirm:()=>{Le&&Me(e.seq,Le.nextCompleted),Io(null)}})]}):null,Ye(no,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:0,[st]:{pb:0,"& > :last-child":{mb:0}}},children:[A(Hi,{hideProject:C,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,estimatedTime:e.estimated_time,eventTime:e.event_time??"",eventPlace:e.event_place??"",eventAddress:e.event_address??""},customTabs:o,avatarSrcByName:n,showEstimatedTime:!ro,notice:Je,event:ro,readOnly:_o,targetSummary:da,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=>u(e.seq,E),onChangePriority:E=>f(e.seq,E),onChangeEstimatedTime:E=>I(e.seq,E),onChangeEventTime:E=>k?.(e.seq,E),onChangeEventPlace:E=>g?.(e.seq,E),onChangeEventAddress:E=>D?.(e.seq,E),onMemberEdit:E=>x(e,E,null),narrowCollapsedSx:ne,reminderLocked:e.completed,managerAction:nn,leading:Ye(Fo,{children:[jn||nn&&(Je||ro)?Ye(no,{sx:{gridColumn:"1 / -1",display:"flex",justifyContent:"flex-start",gap:2,px:2,py:1.5},children:[Je||ro?nn:null,jn?Ye(Fo,{children:[A(hr,{variant:"contained",size:"large",onClick:()=>pe?.(e.seq,!0),sx:{bgcolor:"#2f80ed"},children:"\uAC80\uC99D\uC644\uB8CC"}),A(hr,{variant:"outlined",size:"large",color:"error",onClick:()=>pe?.(e.seq,!1),children:"\uC7AC\uC624\uD508"})]}):null]}):null,$o&&e.ticket_no?A(ae,{icon:A(p0,{sx:{fontSize:17}}),label:"\uD2F0\uCF13",children:A(no,{component:"span",sx:{fontVariantNumeric:"tabular-nums"},children:e.ticket_no})}):null,ro?null:A(no,{sx:$o&&e.ticket_no||fa||pa?void 0:{gridColumn:"1 / -1"},children:A(ae,{icon:A(b0,{sx:{fontSize:17}}),label:"\uC0C1\uD0DC",onClick:_o||e.completed?void 0:E=>Ue(E),children:A(Pe,{option:To(e)})})}),Je?null:(()=>{let E=rt(e),nt=E==="all"?A(nu,{sx:{fontSize:17,color:"#2f80ed"}}):E==="group"?A(ru,{sx:{fontSize:17,color:"#d9730d"}}):A(tu,{sx:{fontSize:17}}),rn=E==="all"?"\uC804\uCCB4\uACF5\uAC1C":E==="group"?`\uBD80\uC11C\uACF5\uAC1C \xB7 ${v.find(bt=>bt.seq===(e.visibility_group_seq??0))?.name??"\uBD80\uC11C"}`:"\uBE44\uACF5\uAC1C";return A(no,{children:A(ae,{icon:nt,label:"\uACF5\uAC1C",onClick:_o||!m?void 0:bt=>Ie(bt),children:rn})})})(),!Je&&!$o?A(no,{children:A(ae,{icon:A(B0,{sx:{fontSize:17,...e.repeat_rule?{color:"#2f80ed"}:{}}}),label:"\uBC18\uBCF5",onClick:_o||!d?void 0:E=>xo(E),children:e.repeat_rule?qi(e.repeat_rule):A(kn,{label:"\uC5C6\uC74C"})})}):null,!Je&&!$o&&e.repeat_rule?A(no,{children:A(ae,{icon:A(C0,{sx:{fontSize:17}}),label:"\uBC18\uBCF5 \uC885\uB8CC",onClick:_o||!d?void 0:E=>co(E),children:e.repeat_until?`${e.repeat_until}\uAE4C\uC9C0`:A(kn,{})})}):null,Po&&Po.total>0?A(no,{children:A(ae,{icon:A(Kl,{sx:{fontSize:17}}),label:"\uD655\uC778",children:Po.canConfirm?A(hr,{size:"small",variant:"contained",onClick:()=>ve?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):Ye(hr,{size:"small",variant:"outlined",color:"inherit",startIcon:Po.myTime?A(Ul,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:E=>Be({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:[Po.count," / ",Po.total]})})}):null,Je&&Yo?A(no,{children:A(ae,{icon:A(Kl,{sx:{fontSize:17}}),label:"\uD655\uC778",children:A(no,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,minWidth:0},children:Yo.canAck?A(hr,{size:"small",variant:"contained",onClick:()=>ve?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):A(hr,{size:"small",variant:"outlined",color:"inherit",startIcon:Yo.acked?A(Ul,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:E=>Be({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:Yo.total>0&&Yo.count>=Yo.total?"\uC644\uB8CC":Ye(Fo,{children:[Yo.count,A(no,{component:"span",sx:{mx:.4},children:"/"}),Yo.total]})})})})}):null,gt&&!G&&!ro&&!Je?Ye(Fo,{children:[A(ae,{icon:A(f0,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:_o?void 0:E=>_e(E),children:(e.sprint_seq??0)>0?Se.find(E=>E.seq===e.sprint_seq)?.name??"\uC0AD\uC81C\uB41C \uC2A4\uD504\uB9B0\uD2B8":A(kn,{label:"\uBBF8\uBC30\uC815"})}),A(ae,{icon:A(x0,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",children:A(Xt,{value:(e.story_points??0)>0?String(e.story_points):"",placeholder:"\uBBF8\uCD94\uC815",readOnly:_o,onCommit:E=>Go?.(e.seq,Number(E.replace(/[^0-9.]/g,""))||0)})})]}):null,ro||N?null:A(no,{sx:[{gridColumn:"1 / -1"},ne??null],children:A(ae,{icon:A(h0,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:_o?void 0:E=>Wo(E),children:(e.label_keys??[]).length>0?A(an,{labelKeys:e.label_keys??[],labelOptions:t}):A(kn,{})})})]}),trailing:Ye(Fo,{children:[$o?A(Wi,{values:{repro:e.bug_repro??"",device:e.bug_device??"",where:e.bug_where??"",version:e.bug_version??"",resolution:e.resolution??""},readOnly:_o,showResolution:!!e.completed,onChangeRepro:E=>X?.(e.seq,"bug_repro",E),onChangeDevice:E=>X?.(e.seq,"bug_device",E),onChangeWhere:E=>X?.(e.seq,"bug_where",E),onChangeVersion:E=>X?.(e.seq,"bug_version",E),onChangeResolution:E=>jo?.(e.seq,E)}):null,A(ae,{icon:A(k0,{sx:{fontSize:17}}),label:"\uC791\uC131\uC790",sx:[So(9),ne??null],children:e.created_by?Ye(Fo,{children:[A(qo,{names:[e.created_by],size:20,avatarSrcByName:n}),e.created_by]}):A(kn,{})}),A(ae,{icon:A(ou,{sx:{fontSize:17}}),label:"\uC791\uC131\uC2DC\uAC04",sx:[So(11),ne??null],children:e.created_time?it(e.created_time):A(kn,{})}),e.completed?Ye(Fo,{children:[A(ae,{icon:A(Kl,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC790",sx:[So(10),ne??null],children:e.completed_by?Ye(Fo,{children:[A(qo,{names:[e.completed_by],size:20,avatarSrcByName:n}),e.completed_by]}):A(kn,{})}),A(ae,{icon:A(ou,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC2DC\uAC04",sx:[So(12),ne??null],children:e.completed_time?it(e.completed_time):A(kn,{})})]}):null]})}),Ye(no,{sx:{display:"none",[st]:{display:"block",mt:1.5,mb:0}},children:[A(Fn,{sx:{borderColor:"#e6e6e3"}}),A(c0,{onClick:()=>H(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:L?Ye(Fo,{children:["\uC811\uAE30 ",A(u0,{sx:{fontSize:18}})]}):Ye(Fo,{children:["\uC815\uBCF4 \uB354\uBCF4\uAE30 ",A(d0,{sx:{fontSize:18}})]})})]}),Ye(no,{children:[A(Fn,{sx:{my:1.5,borderColor:"#e6e6e3",[st]:{mt:0,mb:1.25}}}),A(ot,{icon:A(T0,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",children:A(no,{sx:{userSelect:"text"},children:A($i,{syncKey:e.seq,value:e.content??"",height:e.content_height??0,onChangeHeight:M?E=>M(e.seq,E):void 0,readOnly:_o,onChange:E=>S(e.seq,E)})})}),e.is_bug?null:Ye(Fo,{children:[A(Fn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),A(ot,{icon:A(y0,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:A(no,{sx:{userSelect:"text"},children:A(Ym,{value:e.note,readOnly:Cn,onCommit:E=>B(e.seq,E),onDraftChange:P?E=>P(e.seq,E):void 0})})})]}),ro?null:Ye(Fo,{children:[A(Fn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),A(Ui,{taskSeq:e.seq,checklist:e.checklist??[],removeLocked:Cn,onAdd:O,onToggle:R,onRemove:_,onUpdate:Y,onConvertToTask:b,onOpenLinkedTask:s,resolveLinkedTask:h,myAccountSeq:F,linkCandidates:T,linkBaseTask:e,onLinkExistingTask:y})]}),T&&!ro&&!Je&&Qm(e,T)?Ye(Fo,{children:[A(Fn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),A(Jm,{task:e,tasks:T,readOnly:_o,onOpenTask:w,onLink:V,onUnlink:J,onCreateFollowUp:ye})]}):null,A(Fn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),A(Yi,{taskSeq:e.seq,attachments:e.attachments??[],removeLocked:Cn,onAdd:ue,onRemove:fe,onPreview:de?E=>de({...E,taskSeq:e.seq}):void 0,onDownload:le?E=>le({...E,taskSeq:e.seq}):void 0})]}),A(Fn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),A(Wm,{taskSeq:e.seq,comments:e.comments??[],currentUserName:W,myAccountSeq:F,avatarSrcByName:n,onUpdate:Te,onRemove:qe,onToggleReaction:Fe,onPreview:de?E=>de({...E,taskSeq:e.seq}):void 0,onDownload:le?E=>le({...E,taskSeq:e.seq}):void 0})]}),A(Zn,{anchorEl:me,value:e.status,options:Je?_r:$o?In:wr,onSelect:E=>r(e.seq,E),onClose:()=>Ue(null)}),A($l,{transitionDuration:0,anchorEl:fo,open:!!fo,onClose:()=>xo(null),children:[{value:"",label:"\uC5C6\uC74C"},...Fr].map(E=>A(Vl,{selected:(e.repeat_rule??"")===E.value,onClick:()=>{xo(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)"})&&d?.(e.seq,"","");return}let rn=String(e.due_date??"").slice(0,10);if(!rn){v0(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\uAE30\uD55C\uC744 \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."})||d?.(e.seq,E.value,Ai(rn,E.value))})()},sx:{fontSize:14,minWidth:140},children:E.label},E.value||"none"))}),A(I0,{anchorEl:ko,open:!!ko,onClose:()=>co(null),selectedDate:e.repeat_until?new Date(`${e.repeat_until}T00:00:00`):new Date,onDateChange:E=>{co(null);let nt=xa=>String(xa).padStart(2,"0"),rn=`${E.getFullYear()}-${nt(E.getMonth()+1)}-${nt(E.getDate())}`,bt=e.repeat_rule??"";bt&&d?.(e.seq,bt,rn)}}),A($l,{transitionDuration:0,anchorEl:We,open:!!We,onClose:()=>Ie(null),children:[{key:"involved",label:"\uBE44\uACF5\uAC1C",icon:A(tu,{sx:{fontSize:17,color:"#57564f"}}),selected:rt(e)==="involved",onPick:()=>m?.(e.seq,"involved",0)},{key:"all",label:"\uC804\uCCB4\uACF5\uAC1C",icon:A(nu,{sx:{fontSize:17,color:"#2f80ed"}}),selected:rt(e)==="all",onPick:()=>m?.(e.seq,"all",0)},...v.map(E=>({key:`group-${E.seq}`,label:`\uBD80\uC11C\uACF5\uAC1C \xB7 ${E.name}`,icon:A(ru,{sx:{fontSize:17,color:"#d9730d"}}),selected:rt(e)==="group"&&(e.visibility_group_seq??0)===E.seq,onPick:()=>m?.(e.seq,"group",E.seq)}))].map(E=>Ye(Vl,{selected:E.selected,onClick:()=>{E.onPick(),Ie(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[E.icon,E.label,E.selected?A(eu,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},E.key))}),A($l,{transitionDuration:0,anchorEl:yn,open:!!yn,onClose:()=>_e(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...Se.filter(E=>`custom-${E.group_seq}`===String(e.tab_key??"")).map(E=>({seq:E.seq,label:Jo(E)}))].map(E=>Ye(Vl,{onClick:()=>{ho?.(e.seq,E.seq),_e(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[E.label,(e.sprint_seq??0)===E.seq?A(eu,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},E.seq))}),A(yi,{anchorEl:Ot?.anchorEl??null,open:!!Ot?.open,acks:e.acks??[],total:Yo?.total??Po?.total??0,avatarSrcByName:n,onRequestConfirm:Ze&&Po&&Po.count<Po.total?()=>{Ze(e.seq),Be(E=>E?{...E,open:!1}:null)}:void 0,onClose:()=>Be(E=>E?{...E,open:!1}:null)}),A(Qi,{anchorEl:tt,selectedKeys:e.label_keys??[],labelOptions:t,onToggle:E=>i(e.seq,li(e.label_keys??[],E)),onAddLabel:a,onClose:()=>Wo(null)}),A(De,{open:!!tn,anchorEl:tn,title:Jr?"\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:()=>Rt(null),onConfirm:()=>{z?.(e.seq),Rt(null)}})]})}import{Fragment as R0,jsx as Ro,jsxs as du}from"react/jsx-runtime";function uA(){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 dA({open:e,task:o,onClose:t,onAddComment:n,onSaveFields:r,myAccountSeq:i=0,onToggleCompleted:a,onChangeTitle:l,onChangeIcon:p,onChangeIconColor:c,activityItems:u,activityLoading:x,onLoadActivity:f,onPrint:m,...d}){let v=we(),I=su(null);o&&(I.current=o);let k=o??I.current,[g,D]=cu(!1),[B,P]=cu({}),S=Object.keys(B).length>0;lu(()=>{P({})},[o?.seq,e]);let M=su(null);if(lu(()=>{M.current?.scrollTo({top:0})},[o?.seq]),!k)return null;let O=v&&S?{...k,...B}:k,R=O.checklist??[],_=(h,T)=>{v?P(w=>({...w,...h})):T()},Y=()=>{let h=B;P({});let T=k.seq,w=h.title===void 0?void 0:String(h.title).trim();if(r){let V={...h};w!==void 0&&(w?V.title=w:delete V.title),Object.keys(V).length>0&&r(T,V),uu({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"});return}w&&l(T,w),h.icon!==void 0&&p(T,String(h.icon)),h.icon_color!==void 0&&c?.(T,String(h.icon_color)),h.status!==void 0&&d.onChangeStatus(T,h.status),h.label_keys!==void 0&&d.onChangeLabels(T,h.label_keys??[]),h.tab_key!==void 0&&d.onChangeProject(T,String(h.tab_key??"")),h.start_date!==void 0&&d.onChangeDate(T,"start_date",String(h.start_date??"")),h.due_date!==void 0&&d.onChangeDate(T,"due_date",String(h.due_date??"")),h.reminder!==void 0&&d.onChangeReminder(T,h.reminder),h.priority!==void 0&&d.onChangePriority(T,h.priority),h.estimated_time!==void 0&&d.onChangeEstimatedTime(T,String(h.estimated_time??"")),h.event_time!==void 0&&d.onChangeEventTime?.(T,String(h.event_time??"")),h.event_place!==void 0&&d.onChangeEventPlace?.(T,String(h.event_place??"")),h.event_address!==void 0&&d.onChangeEventAddress?.(T,String(h.event_address??"")),h.content!==void 0&&d.onChangeContent(T,String(h.content??"")),h.note!==void 0&&d.onChangeNote(T,String(h.note??"")),h.visibility!==void 0&&d.onChangeVisibility?.(T,h.visibility,Number(h.visibility_group_seq??0)),uu({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"})},b={...d,onChangeStatus:(h,T)=>_({status:T},()=>d.onChangeStatus(h,T)),onChangeLabels:(h,T)=>_({label_keys:T},()=>d.onChangeLabels(h,T)),onChangeProject:(h,T)=>_({tab_key:T},()=>d.onChangeProject(h,T)),onChangeDate:(h,T,w)=>_({[T]:w},()=>d.onChangeDate(h,T,w)),onChangeReminder:(h,T)=>_({reminder:T},()=>d.onChangeReminder(h,T)),onChangePriority:(h,T)=>_({priority:T},()=>d.onChangePriority(h,T)),onChangeEstimatedTime:(h,T)=>_({estimated_time:T},()=>d.onChangeEstimatedTime(h,T)),onChangeEventTime:(h,T)=>_({event_time:T},()=>d.onChangeEventTime?.(h,T)),onChangeEventPlace:(h,T)=>_({event_place:T},()=>d.onChangeEventPlace?.(h,T)),onChangeEventAddress:(h,T)=>_({event_address:T},()=>d.onChangeEventAddress?.(h,T)),onChangeContent:(h,T)=>_({content:T},()=>d.onChangeContent(h,T)),onChangeNote:(h,T)=>_({note:T},()=>d.onChangeNote(h,T)),onMemberEdit:(h,T)=>d.onMemberEdit(h,T,v?w=>P(V=>({...V,...w})):null),onChangeNoteDraft:v?(h,T)=>_({note:T},()=>{}):void 0,onChangeVisibility:d.onChangeVisibility?(h,T,w)=>_({visibility:T,visibility_group_seq:w},()=>d.onChangeVisibility?.(h,T,w)):void 0,onAddChecklistItem:(h,T)=>_({checklist:[...R,{label:T,checked:!1}]},()=>d.onAddChecklistItem(h,T)),onToggleChecklistItem:(h,T,w)=>_({checklist:R.map((V,J)=>J===T?{...V,checked:w}:V)},()=>d.onToggleChecklistItem(h,T,w)),onRemoveChecklistItem:(h,T)=>_({checklist:R.filter((w,V)=>V!==T)},()=>d.onRemoveChecklistItem(h,T)),onUpdateChecklistItem:d.onUpdateChecklistItem?(h,T,w)=>_({checklist:R.map((V,J)=>J===T?{...V,label:w}:V)},()=>d.onUpdateChecklistItem?.(h,T,w)):void 0,onLinkChecklistTask:d.onLinkChecklistTask?(h,T,w)=>_({checklist:[...R,{label:w,checked:!1,task_seq:T}]},()=>d.onLinkChecklistTask?.(h,T,w)):void 0},s=Ro(au,{...b,task:O,myAccountSeq:i,onChangeTitle:(h,T)=>_({title:T},()=>l(h,T)),onToggleCompleted:a,onChangeIcon:(h,T)=>_({icon:T},()=>p(h,T)),onChangeIconColor:(h,T)=>_({icon_color:T},()=>c?.(h,T)),showTitle:v}),y=Ro($m,{onSubmit:(h,T)=>n(O.seq,h,T)},O.seq);return v?du(R0,{children:[Ro(O0,{open:e,onClose:t,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:O.is_notice?"\uACF5\uC9C0\uC0AC\uD56D":O.is_event?"\uC77C\uC815":O.is_bug?"\uC624\uB958":"\uC5C5\uBB34",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1},custom:[...f?[{icon:Ro(E0,{sx:{ml:2,color:"#6b7280"}}),tooltip:"\uD65C\uB3D9",onClick:()=>D(!0)}]:[],{icon:Ro(D0,{sx:{ml:f?0:2,color:"#6b7280"}}),tooltip:"\uACF5\uC720\uD558\uAE30",onClick:()=>gr(O,!0)},{icon:Ro(_0,{variant:"contained",size:"small",disableElevation:!0,disabled:!S,onClick:S?Y: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:y},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:Ro(la,{sx:{userSelect:"none",width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:s})}]},k.seq),Ro(ia,{open:g,taskSeq:O.seq,items:u,loading:x,onLoad:f,onClose:()=>D(!1)})]}):Ro(w0,{anchor:"right",open:e,onClose:t,disableAutoFocus:!0,disableEnforceFocus:!0,sx:{zIndex:h=>h.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:du(la,{sx:{display:"flex",flexDirection:"column",height:"100%",userSelect:"none"},children:[Ro(jm,{task:O,myAccountSeq:i,onToggleCompleted:a,onChangeTitle:l,onChangeIcon:p,onChangeIconColor:c,onClose:t,activityItems:u,activityLoading:x,onLoadActivity:f,onPrint:m}),Ro(mu,{sx:{borderColor:"#e6e6e3"}}),Ro(la,{sx:{flex:1,minHeight:0},children:Ro(M0,{ref:M,style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:s})}),Ro(mu,{sx:{borderColor:"#37352f"}}),Ro(la,{sx:{flexShrink:0},children:y})]})})}import{useEffect as z0,useState as Hn}from"react";import{Box as Ho,Button as Yl,IconButton as pu}from"@mui/material";import{FormDialog as q0}from"@ehfuse/mui-form-dialog";import A0 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 Gl="custom-";function P0(e){return e.startsWith(Gl)}function xA(e){return e>0?`${Gl}${e}`:""}function jl(e){if(!P0(e))return 0;let o=Number(e.slice(Gl.length));return Number.isInteger(o)&&o>0?o:0}import{Fragment as N0,jsx as ao,jsxs as Tn}from"react/jsx-runtime";var L0=[{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 vA({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,u]=Hn(""),[x,f]=Hn(""),[m,d]=Hn(""),[v,I]=Hn(""),[k,g]=Hn(""),[D,B]=Hn(!1),[P,S]=Hn(0);z0(()=>{e&&(u(p.length===1?p[0].key:""),f(""),d(""),I(""),g(""),S(0))},[e]);let M=()=>{f(""),d(""),I(""),g(""),S(0)},O=b=>{S(b.seq),u(`custom-${b.group_seq}`),f(b.name),d(b.goal),I(b.start_date),g(b.end_date)},R=async()=>{let b=jl(c);if(!b){fu("\uBAA9\uD45C\uB97C \uB9CC\uB4E4 \uD504\uB85C\uC81D\uD2B8\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}if(!x.trim()){fu("\uBAA9\uD45C \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}B(!0);try{if(P>0){i(P,{name:x.trim(),goal:m.trim(),start_date:v,end_date:k}),M();return}await r({group_seq:b,name:x.trim(),goal:m.trim(),start_date:v,end_date:k})&&M()}finally{B(!1)}},_=new Map(o.map(b=>[jl(b.key),b.label])),Y=ao(Ho,{children:p.length===0?ao(Ho,{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.'}):Tn(N0,{children:[Tn(Ho,{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=>u(String(b.target.value)),disabled:P>0}),ao(xu,{label:"\uBAA9\uD45C \uC774\uB984",size:"medium",placeholder:"\uC608: 8\uC6D4 2\uC8FC\uCC28",value:x,onChange:b=>f(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:k,onChange:b=>g(b.target.value)}),ao(xu,{label:"\uC124\uBA85",size:"medium",placeholder:"\uC120\uD0DD \uC785\uB825",value:m,onChange:b=>d(b.target.value),sx:{gridColumn:"1 / -1"}})]}),Tn(Ho,{sx:{mt:1.5,display:"flex",justifyContent:"flex-end",gap:1},children:[P>0?ao(Yl,{color:"inherit",onClick:M,disabled:D,children:"\uCDE8\uC18C"}):null,ao(Yl,{variant:"contained",onClick:()=>{R()},disabled:D,children:P>0?"\uBAA9\uD45C \uC800\uC7A5":"\uBAA9\uD45C \uB9CC\uB4E4\uAE30"})]}),ao(Ho,{sx:{mt:2,borderTop:"1px solid #e6e6e3"},children:t.length===0?ao(Ho,{sx:{py:3,textAlign:"center",fontSize:14,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):t.map(b=>Tn(Ho,{sx:{display:"flex",flexDirection:"column",gap:1,py:1.75,borderBottom:"1px solid #f0efed"},children:[Tn(Ho,{sx:{minWidth:0},children:[Tn(Ho,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[ao(Ho,{component:"span",sx:{fontSize:16,fontWeight:600,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:b.name}),ao(Ho,{component:"span",sx:{flexShrink:0,px:1,py:.25,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:13,fontWeight:500},children:_.get(b.group_seq)??"\uC0AD\uC81C\uB41C \uD504\uB85C\uC81D\uD2B8"}),Tn(Ho,{component:"span",sx:{flexShrink:0,fontSize:14,color:"#57564f"},children:[hu(b.start_date)," ~ ",hu(b.end_date)]})]}),b.goal?ao(Ho,{sx:{mt:.5,fontSize:14,color:"#787774",lineHeight:1.5},children:b.goal}):null]}),Tn(Ho,{sx:{display:"flex",alignItems:"center",gap:.5},children:[ao(bu,{label:"\uC0C1\uD0DC",showLabel:!1,size:"small",value:b.status,options:L0.map(s=>({value:s.value,label:s.label})),onChange:s=>a(b.seq,String(s.target.value)),sx:{width:104,flexShrink:0}}),ao(pu,{"aria-label":"\uBAA9\uD45C \uC218\uC815",onClick:()=>O(b),sx:{color:"#9a9a97","&:hover":{color:"#2563eb"}},children:ao(A0,{sx:{fontSize:18}})}),ao(pu,{"aria-label":"\uBAA9\uD45C \uC0AD\uC81C",onClick:()=>l(b.seq),sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:ao(Ct,{style:{width:16,height:16}})})]})]},b.seq))})]})});return ao(q0,{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:Y}],actions:{showCancelButton:!1,right:ao(Yl,{variant:"contained",onClick:n,children:"\uB2EB\uAE30"})}})}import{useState as ku}from"react";import{Box as po,Button as Xl,Divider as F0,IconButton as H0,TextField as W0}from"@mui/material";import{FormDialog as $0}from"@ehfuse/mui-form-dialog";import V0 from"@mui/icons-material/OpenInNewOutlined";import U0 from"@mui/icons-material/EventOutlined";import{ConfirmDialog as K0}from"@ehfuse/alerts";import{jsx as ze,jsxs as Wn}from"react/jsx-runtime";function zA({open:e,imports:o,onRegister:t,onRemove:n,onClose:r}){let[i,a]=ku(""),[l,p]=ku(!1),c=async()=>{let f=i.trim();if(f){p(!0);try{await t(f)&&a("")}finally{p(!1)}}},u=async f=>{await K0({title:"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",message:`"${f.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}" \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&n(f.seq)},x=Wn(po,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[Wn(po,{sx:{color:"#37352f",lineHeight:1.7},children:["\uAD6C\uAE00 \uCE98\uB9B0\uB354\uC758 \uC77C\uC815\uC744 ",ze("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uC5C5\uBB34\uD568 \uCE98\uB9B0\uB354\uC5D0 \uD568\uAED8 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4.",ze("br",{}),"\uD45C\uC2DC/\uC228\uAE40\uC740 \uC5C5\uBB34\uD568 \uC6B0\uC0C1\uB2E8\uC758 ",ze("b",{children:"\uAD6C\uAE00 \uC77C\uC815"})," \uC2A4\uC704\uCE58\uB85C \uCF1C\uACE0 \uB055\uB2C8\uB2E4."]}),ze(po,{sx:{fontWeight:700,color:"#37352f",mt:.5},children:"\uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354"}),o.length>0?ze(po,{sx:{display:"flex",flexDirection:"column",border:"1px solid #e6e6e3",borderRadius:1},children:o.map((f,m)=>Wn(po,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:.75,borderTop:m>0?"1px solid #efefed":"none"},children:[ze(U0,{sx:{fontSize:18,color:"#0f9d58",flexShrink:0}}),ze(po,{component:"span",sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:f.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),ze(H0,{"aria-label":"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",size:"small",onClick:()=>{u(f)},sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:ze(Ct,{sx:{fontSize:18}})})]},f.seq))}):ze(po,{sx:{color:"#9a9a97",px:.5},children:"\uC544\uC9C1 \uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}),ze(F0,{sx:{my:1,borderColor:"#e6e6e3"}}),ze(po,{sx:{fontWeight:700,color:"#37352f"},children:"\uC0C8 \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30"}),Wn(po,{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:[ze(po,{children:Wn(po,{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 > ",ze("b",{children:"\uC124\uC815 \uBC0F \uACF5\uC720"}),"\uB97C \uC5FD\uB2C8\uB2E4."]})}),ze(po,{children:Wn(po,{component:"span",children:[ze("b",{children:"\uCE98\uB9B0\uB354 \uD1B5\uD569"})," \uC139\uC158\uC758 ",ze("b",{children:'"iCal \uD615\uC2DD\uC758 \uBE44\uBC00 \uC8FC\uC18C"'})," \uB97C \uBCF5\uC0AC\uD574 \uC544\uB798\uC5D0 \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),ze(po,{children:ze(po,{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."})}),ze(po,{children:ze(po,{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."})})]}),Wn(po,{sx:{display:"flex",gap:2,alignItems:"center"},children:[ze(W0,{value:i,onChange:f=>a(f.target.value),fullWidth:!0,label:"\uBE44\uBC00 iCal \uC8FC\uC18C",placeholder:"https://calendar.google.com/calendar/ical/\u2026/basic.ics",slotProps:{input:{spellCheck:!1}}}),ze(Xl,{variant:"contained",disabled:!i.trim()||l,onClick:()=>{c()},sx:{flexShrink:0},children:l?"\uD655\uC778 \uC911\u2026":"\uB4F1\uB85D"})]})]});return ze($0,{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:x}],actions:{showCancelButton:!1,left:ze(Xl,{variant:"outlined",startIcon:ze(V0,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:ze(Xl,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})}})}import{Box as en,Button as jr,TextField as G0}from"@mui/material";import{FormDialog as j0}from"@ehfuse/mui-form-dialog";import Y0 from"@mui/icons-material/ContentCopyOutlined";import Tu from"@mui/icons-material/OpenInNewOutlined";import{InfoAlert as yu}from"@ehfuse/alerts";import{Fragment as Q0,jsx as lo,jsxs as $n}from"react/jsx-runtime";function X0(e){return`${window.location.origin}/api/v1/taskbox/calendar/${e}.ics`}function $A({open:e,feed:o,feedTaskCount:t,buildFeedUrl:n,onSubscribe:r,onClose:i}){let a=n??X0,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 x=l.replace(/^https?:\/\//,"webcal://");window.open(`https://calendar.google.com/calendar/r?cid=${encodeURIComponent(x)}`,"_blank")},u=$n(en,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[$n(en,{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?$n(en,{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\uAE30\uD55C\uC774 \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?$n(Q0,{children:[lo(G0,{value:l,fullWidth:!0,label:"\uB0B4 \uD53C\uB4DC \uC8FC\uC18C",slotProps:{input:{readOnly:!0}}}),$n(en,{sx:{display:"flex",gap:2},children:[lo(jr,{variant:"outlined",startIcon:lo(Y0,{}),onClick:p,children:"\uC8FC\uC18C \uBCF5\uC0AC"}),lo(jr,{variant:"contained",startIcon:lo(Tu,{}),onClick:c,children:"Google \uCE98\uB9B0\uB354\uC5D0 \uCD94\uAC00"})]}),$n(en,{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(en,{children:$n("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(en,{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(en,{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(en,{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(jr,{variant:"contained",onClick:r,sx:{alignSelf:"flex-start"},children:"\uAD6C\uB3C5 \uC2DC\uC791 (\uD53C\uB4DC \uBC1C\uAE09)"})]});return lo(j0,{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:u}],actions:{showCancelButton:!1,left:lo(jr,{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(jr,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}import{useEffect as Z0,useMemo as Ql,useState as Zl}from"react";import{Box as Yr,Button as J0,Typography as eS}from"@mui/material";import{FormDialog as oS}from"@ehfuse/mui-form-dialog";import{SearchTextField as tS}from"@ehfuse/mui-form-controls";import{TreeView as nS}from"@ehfuse/tree-view";import{Fragment as cS,jsx as ft,jsxs as mS}from"react/jsx-runtime";function Su(e){return`${e.name}#${e.seq}`}function rS(e){return Number(e.slice(e.lastIndexOf("#")+1))||0}function iS(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 aS(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 lS(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(Yr,{component:"span",sx:{display:"inline-flex",alignItems:"baseline",gap:.75},children:ft(Yr,{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=>aS(r,o)).map(lS);return t.length===0&&n.length===0?null:{id:`group:${e.key}`,label:e.name,children:[...t,...n]}}function sS({groups:e,allEmployees:o,initialSelectedSeqs:t,multiple:n,isMobile:r,onSelectionChange:i}){let[a,l]=Zl(""),p=Ql(()=>e.map(u=>Bu(u,a.trim().toLowerCase())).filter(u=>u!==null),[e,a]),c=Ql(()=>o.filter(u=>t.includes(u.seq)).map(Su),[]);return mS(cS,{children:[ft(Yr,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:ft(tS,{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(Yr,{sx:r?{display:"flex",flexDirection:"column"}:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:ft(nS,{items:p,checkbox:!0,multiSelect:n,selectionMode:"child",showSearch:!1,defaultExpanded:!0,initialSelections:c,onChange:u=>i(u.map(rS).filter(x=>x>0)),styles:{border:"none",borderRadius:"0"}})})]})}function ZA({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=we(),[u,x]=Zl([]),[f,m]=Zl(0),d=Ql(()=>iS(n),[n]),v=i??[];Z0(()=>{e&&(x(v),m(k=>k+1))},[e]);let I=()=>{let k=d.filter(g=>u.includes(g.seq));l(r?k:k.slice(0,1)),p()};return ft(oS,{open:e,onClose:p,title:`${o}${r&&u.length>0?` (${u.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(Yr,{sx:{...c?{}:{height:560},display:"flex",flexDirection:"column",border:"1px solid #cccccc",borderRadius:1,...c?{}:{overflow:"hidden"},userSelect:"none"},children:ft(sS,{groups:n,allEmployees:d,initialSelectedSeqs:v,multiple:r,isMobile:c,onSelectionChange:x},f)})}],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(eS,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.35},children:t}):void 0,right:ft(J0,{variant:"contained",onClick:I,children:a})}})}import{useEffect as fS,useMemo as xS,useState as gS}from"react";import{Box as yr,Button as bS,Divider as hS}from"@mui/material";import{FormDialog as kS}from"@ehfuse/mui-form-dialog";import{LabelSelect as TS}from"@ehfuse/mui-form-controls";import{Box as Et}from"@mui/material";import{jsx as kr,jsxs as Tr}from"react/jsx-runtime";function uS(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((u,x)=>`${u.start_date}|${u.seq}`.localeCompare(`${x.start_date}|${x.seq}`)).map(u=>({sprint:u,...uS(u,o)})),i=r.some(u=>u.points>0),a=r.map(u=>i?u.points:u.count),l=Math.max(1,...a),p=r.filter(u=>u.sprint.status==="closed").map(u=>i?u.points:u.count),c=p.length>0?Math.round(p.reduce((u,x)=>u+x,0)/p.length*10)/10:null;return r.length===0?kr(Et,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uD45C\uC2DC\uD560 \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):Tr(Et,{children:[Tr(Et,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[Tr("span",{children:["\uC644\uB8CC ",i?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uBAA9\uD45C\uBCC4"]}),c!==null?Tr("span",{children:["\uD3C9\uADE0(\uC885\uB8CC \uBAA9\uD45C)"," ",kr(Et,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:c}),i?"SP":"\uAC74"]}):null]}),kr(Et,{sx:{display:"flex",alignItems:"flex-end",gap:2,height:t,px:.5},children:r.map(u=>{let x=i?u.points:u.count,f=Math.round((t-24)*x/l),m=u.sprint.status==="closed";return Tr(Et,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-end",height:"100%"},children:[kr(Et,{sx:{fontSize:14,fontWeight:700,color:"#37352f",lineHeight:1.5},children:x}),kr(Et,{sx:{width:"60%",maxWidth:56,height:Math.max(2,f),borderRadius:"4px 4px 0 0",bgcolor:m?"#2f80ed":"#a9c9f5"}})]},u.sprint.seq)})}),kr(Et,{sx:{display:"flex",gap:2,px:.5,mt:.5},children:r.map(u=>Tr(Et,{sx:{flex:1,minWidth:0,textAlign:"center",fontSize:13.5,color:"#000",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[u.sprint.name,u.sprint.status!=="closed"?" (\uC9C4\uD589\uC911)":""]},u.sprint.seq))})]})}import{useMemo as dS}from"react";import{Box as Vn}from"@mui/material";import{jsx as Mt,jsxs as Un}from"react/jsx-runtime";function vu(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?new Date(`${e}T00:00:00`):null}function pS(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function Jl(e){return e.slice(5).replace("-",".")}function Iu({sprint:e,tasks:o,todayStr:t,height:n=200}){let r=dS(()=>{let k=vu(e.start_date),g=vu(e.end_date);if(!k||!g||g<k||Math.round((g.getTime()-k.getTime())/864e5)+1>366)return null;let B=o.filter(b=>b.sprint_seq===e.seq&&!b.archived);if(B.length===0)return{empty:!0};let P=B.some(b=>(b.story_points??0)>0),S=b=>P?b.story_points??0:1,M=B.reduce((b,s)=>b+S(s),0),O=new Map;for(let b of B){if(!b.completed)continue;let s=(b.completed_time??"").slice(0,10),y=/^\d{4}-\d{2}-\d{2}$/.test(s)?s:e.start_date;O.set(y,(O.get(y)??0)+S(b))}let R=[];for(let b=new Date(k);b<=g;b.setDate(b.getDate()+1))R.push(pS(b));let _=M,Y=[];for(let b of R){if(b>t)break;_-=O.get(b)??0,Y.push({day:b,value:Math.max(0,_)})}return{empty:!1,days:R,total:M,usePoints:P,actual:Y}},[e,o,t]);if(!r)return Mt(Vn,{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 Mt(Vn,{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,u=200,x=8,f=k=>i.length===1?0:k/(i.length-1)*c,m=k=>x+(u-x*2)*(1-k/Math.max(1,a)),d=`${f(0)},${m(a)} ${f(i.length-1)},${m(0)}`,v=p.map(k=>`${f(i.indexOf(k.day))},${m(k.value)}`).join(" "),I=p[p.length-1];return Un(Vn,{children:[Un(Vn,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[Un("span",{children:["\uB0A8\uC740 ",l?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uCD1D ",a]}),I?Un("span",{children:["\uD604\uC7AC"," ",Mt(Vn,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:I.value}),l?"SP":"\uAC74"," \uB0A8\uC74C"]}):null]}),Mt(Vn,{sx:{border:"1px solid #e6e6e3",borderRadius:1,bgcolor:"#fafaf9",px:1,py:.5},children:Un("svg",{viewBox:`0 0 ${c} ${u}`,preserveAspectRatio:"none",style:{display:"block",width:"100%",height:n},children:[Mt("line",{x1:0,y1:m(0),x2:c,y2:m(0),stroke:"#e6e6e3",strokeWidth:1}),Mt("polyline",{points:d,fill:"none",stroke:"#9a9a97",strokeWidth:1.5,strokeDasharray:"6 5",vectorEffect:"non-scaling-stroke"}),p.length>1?Mt("polyline",{points:v,fill:"none",stroke:"#2f80ed",strokeWidth:2.5,vectorEffect:"non-scaling-stroke"}):null,I?Mt("circle",{cx:f(i.indexOf(I.day)),cy:m(I.value),r:4,fill:"#2f80ed",vectorEffect:"non-scaling-stroke"}):null]})}),Un(Vn,{sx:{mt:.5,display:"flex",justifyContent:"space-between",fontSize:13.5,color:"#000"},children:[Mt("span",{children:Jl(e.start_date)}),t>e.start_date&&t<e.end_date?Un("span",{children:["\uC624\uB298 ",Jl(t)]}):null,Mt("span",{children:Jl(e.end_date)})]})]})}import{jsx as on,jsxs as es}from"react/jsx-runtime";function x7({open:e,sprints:o,tasks:t,todayStr:n,initialSprintSeq:r=0,onClose:i}){let[a,l]=gS(0);fS(()=>{if(!e)return;let u=o.find(f=>f.status==="active")??o[0],x=o.find(f=>f.seq===r)??u;l(x?.seq??0)},[e]);let p=xS(()=>o.find(u=>u.seq===a)??null,[o,a]),c=es(yr,{sx:{display:"flex",flexDirection:"column"},children:[es(yr,{sx:{px:3,py:2.5},children:[on(yr,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBCA8\uB85C\uC2DC\uD2F0"}),on(Cu,{sprints:o,tasks:t})]}),on(hS,{sx:{borderColor:"#e6e6e3"}}),es(yr,{sx:{px:3,py:2.5},children:[on(yr,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBC88\uB2E4\uC6B4"}),on(TS,{label:"\uBAA9\uD45C",showLabel:!1,value:a?String(a):"",options:o.map(u=>({value:String(u.seq),label:Jo(u)})),onChange:u=>l(Number(u.target.value)||0),sx:{width:280,mb:2}}),p?on(Iu,{sprint:p,tasks:t,todayStr:n}):on(yr,{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 on(kS,{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:on(bS,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}import{Checkbox as yS,Divider as SS,Menu as BS,MenuItem as os}from"@mui/material";import{jsx as Xr,jsxs as _u}from"react/jsx-runtime";function T7({anchorEl:e,candidates:o,selectedNames:t,avatarSrcByName:n,onToggle:r,onClear:i,onClose:a}){return _u(BS,{anchorEl:e,open:!!e,onClose:a,transitionDuration:0,children:[o.length===0?Xr(os,{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(os,{onClick:()=>r(l),sx:{fontSize:14,minWidth:170,gap:1},children:[Xr(yS,{size:"small",checked:p,sx:{p:0}}),Xr(qo,{names:[l.name],size:20,avatarSrcByName:n}),l.name]},`${l.accountSeq}-${l.name}`)}),Xr(SS,{}),Xr(os,{disabled:t.length===0,onClick:i,sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{useState as CS}from"react";import{ButtonBase as vS,Menu as IS,MenuItem as _S}from"@mui/material";import wS from"@mui/icons-material/KeyboardArrowDown";import DS from"@mui/icons-material/Check";import{Fragment as ES,jsx as ts,jsxs as ns}from"react/jsx-runtime";function w7({value:e,onChange:o,options:t}){let[n,r]=CS(null),i=t??Ea,a=Ea.find(l=>l.value===e)?.label??"";return ns(ES,{children:[ns(vS,{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,ts(wS,{sx:{fontSize:17,color:"#9a9a97"}})]}),ts(IS,{transitionDuration:0,anchorEl:n,open:!!n,onClose:()=>r(null),children:i.map(l=>ns(_S,{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?ts(DS,{sx:{fontSize:16,color:"#2f80ed"}}):null]},l.value))})]})}import{Box as rs,ButtonBase as MS,Divider as OS,Popover as RS}from"@mui/material";import PS from"@mui/icons-material/Check";import zS from"@ehfuse/overlay-scrollbar";import{jsx as Kn,jsxs as Du}from"react/jsx-runtime";var wu=["#1e3a8a","#2f80ed","#06b6d4","#0fa3a3","#2f9e5b","#84cc16","#e8a33d","#d9730d","#e5484d","#e255a1","#a355c0","#8a5a2b","#57564f","#111827"];function q7({anchorEl:e,value:o,color:t="",onSelect:n,onSelectColor:r,onClose:i}){return Kn(RS,{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(rs,{sx:{width:"min(492px, calc(100vw - 32px))"},children:[Kn(zS,{style:{maxHeight:"min(432px, calc(100dvh - 240px))"},contentStyle:{minWidth:0,padding:10},thumb:{width:6},children:Kn(bi,{value:o||go,onChange:a=>{n(a),i()}})}),r?Du(rs,{sx:{px:1.25,pb:1.25},children:[Kn(OS,{sx:{mb:1,borderColor:"#efefed"}}),Kn(rs,{sx:{display:"flex",flexWrap:"wrap",gap:.75},children:wu.map(a=>{let l=(t||wu[0])===a;return Kn(MS,{"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?Kn(PS,{sx:{fontSize:15,color:"#ffffff"}}):null},a)})})]}):null]})})}import{Box as ca,ButtonBase as qS}from"@mui/material";import{DateTextField as Eu}from"@ehfuse/mui-form-controls";function Gn(e){let o=t=>String(t).padStart(2,"0");return`${e.getFullYear()}-${o(e.getMonth()+1)}-${o(e.getDate())}`}function sa(e,o=new Date){let t=new Date(o);return t.setMonth(t.getMonth()-e),t}function N7(e=new Date){return{fromDate:Gn(sa(1,e)),toDate:Gn(e)}}import{jsx as Qr,jsxs as Mu}from"react/jsx-runtime";var AS=[{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(Gn(sa(i)),Gn(new Date))},r=i=>i<=0?!e&&!o:!e||!o?!1:e===Gn(sa(i))&&o===Gn(new Date);return Mu(ca,{sx:{display:"flex",alignItems:"center",gap:1.5,flexWrap:"wrap"},children:[Qr(ca,{sx:{display:"flex",alignItems:"center",gap:1.5},children:AS.map(i=>{let a=r(i.months);return Qr(qS,{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(ca,{sx:{display:"flex",alignItems:"center",gap:.5},children:[Qr(Eu,{value:e,size:"small",placeholder:"\uC2DC\uC791\uC77C",onChange:i=>t(i.target.value,o),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}}),Qr(ca,{component:"span",sx:{fontSize:13,color:"#9a9a97"},children:"~"}),Qr(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 LS}from"@mui/material";import{jsx as Ru}from"react/jsx-runtime";function j7({anchorEl:e,fromDate:o,toDate:t,onChange:n,onClose:r}){return Ru(LS,{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 NS,ButtonBase as FS,Tab as HS,Tabs as WS}from"@mui/material";import $S from"@mui/icons-material/Checklist";import VS from"@mui/icons-material/Face";import US from"@mui/icons-material/Publish";import KS from"@mui/icons-material/NotificationsOutlined";import GS from"@mui/icons-material/BugReportOutlined";import jS from"@mui/icons-material/DescriptionOutlined";import YS from"@mui/icons-material/Inventory2Outlined";import{jsx as xt}from"react/jsx-runtime";function Pu(e,o){return o>0?`${e} (${o})`:e}var lL=[{id:"my",label:"\uC804\uCCB4",icon:xt($S,{sx:{fontSize:18}})},{id:"notice",label:"\uACF5\uC9C0\uC0AC\uD56D",icon:xt(KS,{sx:{fontSize:18}})},{id:"mine",label:"\uB0B4 \uC5C5\uBB34",icon:xt(VS,{sx:{fontSize:18}})},{id:"sent",label:"\uBCF4\uB0B8 \uC5C5\uBB34",icon:xt(US,{sx:{fontSize:18}})},{id:"bug",label:"\uC624\uB958",icon:xt(GS,{sx:{fontSize:18}})},{id:"archive",label:"\uBCF4\uAD00\uD568",icon:xt(YS,{sx:{fontSize:18}}),hideCount:!0},{id:"report",label:"\uBCF4\uACE0\uC11C",icon:xt(jS,{sx:{fontSize:18}}),hideCount:!0}];function XS(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=re(),a=XS(i.tabs),l=e;return r?xt(NS,{sx:{display:"flex",flexWrap:"wrap",gap:1.25},children:l.map(p=>{let c=o===p.id;return xt(FS,{onClick:()=>n(p.id),sx:{px:1.5,py:.75,borderRadius:1,fontSize:zo(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(WS,{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(HS,{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 QS,useMemo as ZS,useState as is}from"react";import{Divider as as,ListItemIcon as Ko,Menu as ls,MenuItem as vo}from"@mui/material";import JS from"@mui/icons-material/OpenInNewOutlined";import eB from"@mui/icons-material/Check";import oB from"@mui/icons-material/CheckCircleOutlined";import tB from"@mui/icons-material/RadioButtonUnchecked";import nB from"@mui/icons-material/SendOutlined";import rB from"@mui/icons-material/EventOutlined";import iB from"@mui/icons-material/PersonOutlineOutlined";import aB from"@mui/icons-material/ViewKanbanOutlined";import lB from"@mui/icons-material/ContentCopyOutlined";import sB from"@mui/icons-material/NextPlanOutlined";import cB from"@mui/icons-material/ContentPasteOutlined";import mB from"@mui/icons-material/ShareOutlined";import uB from"@mui/icons-material/DirectionsRunOutlined";import zu from"@mui/icons-material/ChevronRight";import dB from"@mui/icons-material/ArchiveOutlined";import pB from"@mui/icons-material/UnarchiveOutlined";import{ConfirmDialog as fB}from"@ehfuse/alerts";import{Fragment as xB,jsx as ce,jsxs as bo}from"react/jsx-runtime";function LL({target:e,onClose:o,customTabs:t,sprints:n=[],myAccountSeq:r=0,onOpenDetail:i,onToggleCompleted:a,onRequestConfirm:l,onChangeDueDate:p,onChangeReminder:c,onMemberEdit:u,onMoveProject:x,onDuplicate:f,onCreateFollowUp:m,onShare:d,onAssignSprint:v,onArchiveToggle:I,onDelete:k}){let g=we(),D=kt(),[B,P]=is(null),[S,M]=is(null),[O,R]=is(null);QS(()=>{e||(P(null),M(null),R(null))},[e]);let _=e?.task??null,Y=!!_?.is_notice,b=!!_?.is_event,s=_?!qt(_,r):!1,y=ZS(()=>new Set(t.filter(w=>w.useSprints).map(w=>w.key)),[t]),h=async(w="one")=>{let V=_;if(o(),!V)return;await fB({title:"\uC5C5\uBB34 \uC0AD\uC81C",message:w==="series"?`"${V.title}" \uC758 \uC774 \uD68C\uCC28\uC640 \uC774\uD6C4 \uBC18\uBCF5 \uD68C\uCC28\uB97C \uBAA8\uB450 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`:`"${V.title}" \uC5C5\uBB34\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&k(V.seq,w)},T=()=>{_&&I(_.seq,!_.archived),o()};return bo(xB,{children:[bo(ls,{open:!!e,onClose:o,transitionDuration:0,anchorReference:g?"none":"anchorPosition",anchorPosition:!g&&e?{top:e.position.top,left:e.position.left}:void 0,slotProps:{paper:{sx:{minWidth:190,...g?{position:"fixed",top:"50%",left:"50%",translate:"-50% -50%",maxHeight:"70vh"}:{}}},list:g?{sx:{"& .MuiMenuItem-root":{py:1,minHeight:0}}}:void 0},children:[bo(vo,{onClick:()=>{_&&i(_),o()},sx:{fontSize:14},children:[ce(Ko,{children:ce(JS,{sx:{fontSize:19}})}),"\uC0C1\uC138 \uC5F4\uAE30"]}),bo(vo,{disabled:Y?(_?.author_account_seq??0)!==r:(_?.author_account_seq??0)!==r&&(_?.manager_account_seq??0)!==r,onClick:()=>{_&&a(_.seq,!_.completed),o()},sx:{fontSize:14},children:[ce(Ko,{children:_?.completed?ce(tB,{sx:{fontSize:19}}):ce(oB,{sx:{fontSize:19}})}),_?.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC"]}),!Y&&l?bo(vo,{disabled:!(_?.manager_account_seq??0)&&(_?.receiver_account_seqs??[]).length===0,onClick:()=>{_&&l(_),o()},sx:{fontSize:14},children:[ce(Ko,{children:ce(nB,{sx:{fontSize:19}})}),"\uD655\uC778 \uC694\uCCAD"]}):null,b?null:ce(as,{}),b?null:bo(vo,{disabled:s,onClick:w=>{_&&P({anchorEl:w.currentTarget,task:_})},sx:{fontSize:14},children:[ce(Ko,{children:ce(rB,{sx:{fontSize:19}})}),"\uB9C8\uAC10\uAE30\uD55C \uBCC0\uACBD"]}),!Y&&!b&&u?bo(vo,{onClick:()=>{_&&u(_,"manager"),o()},sx:{fontSize:14},children:[ce(Ko,{children:ce(iB,{sx:{fontSize:19}})}),"\uCC45\uC784\uC790 \uBCC0\uACBD"]}):null,b?null:bo(vo,{disabled:s,onClick:w=>{_&&M({anchorEl:w.currentTarget,task:_})},sx:{fontSize:14},children:[ce(Ko,{children:ce(aB,{sx:{fontSize:19}})}),"\uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9",ce(zu,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}),ce(as,{}),f?bo(vo,{disabled:s,onClick:()=>{_&&f(_.seq),o()},sx:{fontSize:14},children:[ce(Ko,{children:ce(lB,{sx:{fontSize:19}})}),"\uBCF5\uC81C"]}):null,m&&_&&!_.is_event&&!_.is_notice?bo(vo,{onClick:()=>{_&&m(_.seq),o()},sx:{fontSize:14},children:[ce(Ko,{children:ce(sB,{sx:{fontSize:19}})}),"\uD6C4\uC18D \uC5C5\uBB34 \uB9CC\uB4E4\uAE30"]}):null,bo(vo,{onClick:()=>{_&&(d?d(_):gr(_,g)),o()},sx:{fontSize:14},children:[ce(Ko,{children:g?ce(mB,{sx:{fontSize:19}}):ce(cB,{sx:{fontSize:19}})}),g?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC"]}),_&&!_.is_notice&&!_.is_event&&y.has(String(_.tab_key??""))&&v?bo(vo,{onClick:w=>R(w.currentTarget),sx:{fontSize:14},children:[ce(Ko,{children:ce(uB,{sx:{fontSize:19}})}),"\uBAA9\uD45C\uC5D0 \uB123\uAE30",ce(zu,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}):null,bo(vo,{onClick:T,disabled:s||!_?.archived&&!(_&&ri(_)),sx:{fontSize:14},children:[ce(Ko,{children:_?.archived?ce(pB,{sx:{fontSize:19}}):ce(dB,{sx:{fontSize:19}})}),_?.archived?"\uBCF4\uAD00 \uD574\uC81C":"\uBCF4\uAD00"]}),ce(as,{}),bo(vo,{disabled:s,onClick:()=>{h("one")},sx:{fontSize:14,color:"#e5484d"},children:[ce(Ko,{children:ce(Ct,{sx:{fontSize:19,color:"#e5484d"}})}),(_?.repeat_group_key??0)>0?"\uC0AD\uC81C (\uC774 \uD68C\uCC28\uB9CC)":"\uC0AD\uC81C"]}),(_?.repeat_group_key??0)>0?bo(vo,{disabled:s,onClick:()=>{h("series")},sx:{fontSize:14,color:"#e5484d"},children:[ce(Ko,{children:ce(Ct,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC0AD\uC81C (\uC774\uD6C4 \uBC18\uBCF5 \uC804\uCCB4)"]}):null]}),ce(yt,{anchorEl:B?.anchorEl??null,open:!!B,date:B?.task.due_date??"",reminder:B?.task.reminder??"none",hideReminder:!!B?.task.completed,centered:g,onClose:()=>{P(null),o()},onDateChange:w=>{B&&p(B.task.seq,w)},onReminderChange:w=>{B&&c?.(B.task.seq,w)}}),bo(ls,{transitionDuration:0,anchorEl:S?.anchorEl??null,open:!!S,onClose:()=>{M(null),o()},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...D,children:[ce(vo,{selected:!S?.task.tab_key,onClick:()=>{S&&x(S.task.seq,""),M(null),o()},sx:{fontSize:14,minWidth:170},children:"\uC5C6\uC74C"}),t.filter(w=>!w.archived).map(w=>ce(vo,{selected:S?.task.tab_key===w.key,onClick:()=>{S&&x(S.task.seq,w.key),M(null),o()},sx:{fontSize:14,minWidth:170},children:w.label},w.key))]}),ce(ls,{transitionDuration:0,anchorEl:O,open:!!O,onClose:()=>R(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...n.filter(w=>`custom-${w.group_seq}`===String(_?.tab_key??"")).map(w=>({seq:w.seq,label:Jo(w)}))].map(w=>bo(vo,{onClick:()=>{_&&v?.(_.seq,w.seq),R(null),o()},sx:{fontSize:14,minWidth:160,gap:1},children:[w.label,(_?.sprint_seq??0)===w.seq?ce(eB,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},w.seq))})]})}import{Checkbox as gB,Divider as bB,Menu as hB,MenuItem as qu}from"@mui/material";import{jsx as ma,jsxs as Au}from"react/jsx-runtime";function $L({anchorEl:e,labelOptions:o,selectedKeys:t,onToggle:n,onClear:r,onClose:i}){return Au(hB,{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:[ma(gB,{size:"small",checked:l,sx:{p:0}}),ma(Pe,{option:a})]},a.key)}),ma(bB,{}),ma(qu,{disabled:t.length===0,onClick:()=>{r(),i()},sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{Divider as Lu,Menu as kB,MenuItem as ss}from"@mui/material";import TB from"@mui/icons-material/Check";import yB from"@mui/icons-material/BarChartOutlined";import SB from"@mui/icons-material/SettingsOutlined";import{jsx as Zr,jsxs as ua}from"react/jsx-runtime";function QL(e){let{anchorEl:o,sprints:t,value:n,onSelect:r,onManage:i,onCharts:a,onClose:l}=e;return ua(kB,{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:Jo(p)}))].map(p=>ua(ss,{onClick:()=>{r(p.seq),l()},sx:{fontSize:14,minWidth:180,gap:1},children:[p.label,n===p.seq?Zr(TB,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},p.seq)),Zr(Lu,{}),a?ua(ss,{onClick:()=>{l(),a()},sx:{fontSize:14,gap:1},children:[Zr(yB,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uCC28\uD2B8"]}):null,a?Zr(Lu,{}):null,ua(ss,{onClick:()=>{l(),i()},sx:{fontSize:14,gap:1},children:[Zr(SB,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uAD00\uB9AC\u2026"]})]})}var BB={my:"tasks",mine:"tasks",sent:"tasks",notice:"notice",bug:"bug",archive:"archive",done:"done",report:"report"};function CB(e){return BB[e]??"tasks"}var eN={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"],vB=["list","card"];function oN(e){let o=CB(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:vB,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{N1 as ALL_TASK_VIEWER_ACCOUNT_SEQS,Cm as AddLabelDialog,hi as AddTabDialog,Tm as AttachmentUploadGauge,wl as AttachmentUploadPercent,Ca as BUG_DEVICE_OPTIONS,Ir as BUG_ICON_COLOR,QI as BUG_KANBAN_COLUMNS,Ba as BUG_REPRO_OPTIONS,va as BUG_RESOLUTION_OPTIONS,In as BUG_STATUS_OPTIONS,vr as BUG_TASK_ICON,Wi as BugPropertiesGrid,ax as COLUMN_WIDTHS,_a as COMPLETED_STATUS_OPTION,Gl as CUSTOM_TAB_KEY_PREFIX,zA as CalendarImportDialog,$A as CalendarSubscribeDialog,sn as CommentBubbleIcon,or as ConfirmCountButton,Js as DATE_REMINDER_OPTIONS,Tk as DEFAULT_COMPACT_COLUMNS,ba as DEFAULT_PROJECT_ICON,lL as DEFAULT_TASKBOX_TAB_ITEMS,go as DEFAULT_TASK_ICON,yl as DRAWER_SECTION_TITLE_FONT_SIZE,j7 as DateRangeFilterPopover,ot as DrawerSection,yt as DueDatePickerPopover,Nf as ENDED_EVENT_STATUS_OPTION,Pm as EVENT_ICON_COLOR,ht as EVENT_TASK_ICON,ZA as EmployeeSelectDialog,Ea as GROUP_BY_OPTIONS,ar as GoogleEventChip,w7 as GroupByMenuButton,bi as IconPickerGrid,im as InlineAddressInput,Xt as InlineTextValue,wa as KANBAN_CLOSED_COLUMN_KEY,$L as LabelFilterMenu,Qi as LabelSelectMenu,wr as MANUAL_TASK_STATUS_OPTIONS,T7 as MemberFilterMenu,_r as NOTICE_STATUS_OPTIONS,wo as NOTICE_TASK_ICON,Ts as NO_TASK_ICON,ha as PROJECT_ICON_OPTIONS,ae as PropertyRow,er as RECEIVER_AVATAR_COLORS,ec as REMINDER_OPTIONS,qo as ReceiverAvatarStack,Jm as RelatedTasksSection,IB as STATUS_KEY_REPLIED,ms as STATUS_KEY_WAITING,ac as SortableTaskCard,Iu as SprintBurndownChart,x7 as SprintChartsDialog,QL as SprintFilterMenu,vA as SprintManageDialog,Cu as SprintVelocityChart,Zn as StatusSelectMenu,Ra as TASKBOX_COLUMNS,st as TASKBOX_DRAWER_NARROW_MQ,ys as TASKBOX_UI_STATE_ID,eN as TASKBOX_VIEW_LABELS,LM as TASKBOX_VIEW_MODES,Fr as TASK_REPEAT_RULE_OPTIONS,vn as TASK_STATUS_OPTIONS,tg as TIME_REMINDER_OPTIONS,yi as TaskAckListPopover,Tt as TaskActionButton,ia as TaskActivityDialog,Yi as TaskAttachmentsSection,Gc as TaskBoxColumnSummary,XO as TaskBoxCompactTable,Za as TaskBoxGroupBoard,CO as TaskBoxMobileList,qc as TaskBoxMonthAgenda,Mc as TaskBoxMonthCalendar,QM as TaskBoxSprintColumnSummary,nc as TaskBoxTable,sL as TaskBoxTabs,Wc as TaskBoxTimeline,AM as TaskBoxView,Ic as TaskBoxWeekCalendar,Rr as TaskCardContent,Ui as TaskChecklistSection,$m as TaskCommentInput,Wm as TaskCommentsSection,$i as TaskContentEditor,LL as TaskContextMenu,Hi as TaskCorePropertiesGrid,Rl as TaskCreateBody,B2 as TaskCreateDrawer,Ou as TaskDateRangeFilter,au as TaskDetailBody,dA as TaskDetailDrawer,jm as TaskDetailHeader,q7 as TaskIconPickerPopover,an as TaskLabelChips,Vi as TaskLinkDialog,Ym as TaskNoteField,Uo as TaskPriorityChip,Pe as TaskStatusChip,i1 as TaskStatusChips,$u as TaskboxProvider,X0 as buildCalendarFeedUrl,Bi as buildCardBaseSx,Ds as buildStatusOptionColors,Ma as buildTaskGroupSections,Ll as buildTaskRelationsModel,Ky as buildTaskShareText,ti as buildTaskboxTheme,As as canAssignBugManager,mi as canClaimTaskItem,Ls as canCompleteTaskItem,qt as canEditTaskItem,ci as canViewTaskItem,ui as canVolunteerTaskItem,Nl as countTaskRelations,Vc as countWorkdays,Pf as createTaskboxTheme,Kc as daysLeftUntil,Ai as defaultRepeatUntil,ka as defaultTaskBoxFormValues,Ta as defaultTaskboxUiStateValues,Dm as filterFilesWithinLimit,Vw as formatConfirmTime,$c as formatHours,Qo as formatKoreanDate,it as formatKoreanDateTime,Jo as formatSprintOptionLabel,_s as getBugDeviceName,Is as getBugReproName,ni as getBugResolutionName,Ff as getBugStatusOption,N7 as getDefaultDateRange,Dr as getEventDisplayStatusOption,JI as getNoDueStatusRank,wm as getNoticeAckInfo,ws as getNoticeStatusOption,wP as getNoticeTargetDisplay,SI as getProjectIconAnchorComponent,he as getProjectIconComponent,Ha as getReminderLabel,Fa as getReminderOptions,qi as getRepeatRuleLabel,ai as getStatusOptionsForTask,oN as getTabHeaderConfig,za as getTaskBoxColumnDefs,Os as getTaskBoxGridTemplate,CB as getTaskBoxTabKind,Si as getTaskConfirmInfo,To as getTaskDisplayStatusOption,ii as getTaskStatusOption,nr as groupGoogleEventsByDate,jl as groupSeqFromTabKey,Rz as hasRelation,Qm as hasTaskRelations,hT as htmlToPlainText,P0 as isCustomTabKey,qs as isOpenPoolTaskItem,Ia as isPastEvent,ri as isTaskDone,ZI as isWaitingTask,sa as monthsAgoDate,So as narrowOrderSx,uA as nowDateTimeString,Uh as parseEstimatedHours,Nn as relationsOf,Qn as resolveTaskStatusOptions,Sa as resolveTaskboxTheme,YO as selectDepartmentSharedTasks,gr as shareTaskText,Uc as sumRemainingHours,Zi as summarizeNoticeTargets,xA as tabKeyFromGroupSeq,rt as taskVisibilityOf,Gn as toYmd,li as toggleLabelKey,Br as useBuildFileUrl,km as useTaskAttachmentUploadMeta,Vo as useTaskboxConfig,Df as useTaskboxForm,re as useTaskboxTheme,zt as useTaskboxUiState,Cr as useUploadMaxMb};
14
14
  //# sourceMappingURL=index.esm.js.map