@ehfuse/taskbox 0.5.190 → 0.5.191

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