@ehfuse/taskbox 0.5.167 → 0.5.169
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +2 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10,5 +10,5 @@
|
|
|
10
10
|
`).replace(/<[^>]+>/g,"").replace(/ /gi," ").replace(/</gi,"<").replace(/>/gi,">").replace(/"/gi,'"').replace(/'/gi,"'").replace(/&/gi,"&").replace(/\n{3,}/g,`
|
|
11
11
|
|
|
12
12
|
`).trim():"";function Tx(e){let o=[`[\uC5C5\uBB34] ${e.title}`],t=Ct(e.start_date),n=Ct(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=Wo(e).name;r&&o.push(`\uC0C1\uD0DC: ${r}`);let i=hx(e.content);i&&o.push("",i);let l=String(e.note??"").trim();return l&&o.push("",`\uBE44\uACE0: ${l}`),o.join(`
|
|
13
|
-
`)}function kx(e){navigator.clipboard.writeText(e).then(()=>(0,Ha.SuccessAlert)("\uC5C5\uBB34 \uB0B4\uC6A9\uC744 \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>(0,Ha.InfoAlert)("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uB0B4\uC6A9\uC744 \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD574 \uC8FC\uC138\uC694."))}function hr(e,o){let t=Tx(e);if(o&&typeof navigator.share=="function"){navigator.share({text:t}).catch(n=>{n?.name!=="AbortError"&&kx(t)});return}kx(t)}var He=require("react/jsx-runtime");function ws({task:e,myAccountSeq:o=0,onToggleCompleted:t,onChangeTitle:n,onChangeIcon:r,onChangeIconColor:i,onClose:l,appBarMode:s=!1,activityItems:f,activityLoading:m,onLoadActivity:d,onPrint:g}){let x=je(),[u,p]=(0,Wa.useState)(!1),[_,w]=(0,Wa.useState)(null),[T,b]=(0,Wa.useState)(null),M=e.is_notice?we(e.icon||Go):null,C=!!e.is_notice,q=!!e.is_event,B=C&&o>0&&(e.author_account_seq??0)===o,R=!ln(e,o),P=!q&&(C?B:(e.author_account_seq??0)===o||(e.manager_account_seq??0)===o);return(0,He.jsxs)(He.Fragment,{children:[(0,He.jsxs)(Lo.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[s&&l?(0,He.jsx)(Lo.IconButton,{"aria-label":"\uB4A4\uB85C",onClick:l,sx:{color:"#37352f",ml:-1},children:(0,He.jsx)(Sx.default,{})}):null,P&&!s?(0,He.jsx)(Lo.Tooltip,{title:e.completed&&e.completed_by?`${e.completed_by} \xB7 ${Pt(e.completed_time)} \uC644\uB8CC`:"",arrow:!0,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:(0,He.jsx)(Lo.Box,{sx:{display:"flex",flexShrink:0},children:(0,He.jsx)(Gt,{onClick:z=>b({anchorEl:z.currentTarget,nextCompleted:!e.completed}),children:e.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC"})})}):null,s||!M?null:(0,He.jsx)(Lo.Box,{sx:{display:"flex",px:.5,color:e.icon_color||(C?"#e5484d":"#1e3a8a")},children:(0,He.jsx)(M,{sx:{fontSize:20}})}),_!==null?(0,He.jsx)(Lo.Box,{component:"input",autoFocus:!0,spellCheck:!1,value:_,onChange:z=>w(z.target.value),onBlur:()=>{_.trim()&&_.trim()!==e.title&&n(e.seq,_.trim()),w(null)},onKeyDown:z=>{z.key==="Enter"&&z.target.blur(),z.key==="Escape"&&w(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:18,fontWeight:500,color:"#37352f",p:0,m:0}}):s?(0,He.jsx)(Lo.Box,{sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:C?"\uACF5\uC9C0":q?"\uC77C\uC815":e.is_bug?"\uC624\uB958":"\uC5C5\uBB34"}):(0,He.jsx)(Lo.Box,{onClick:R?void 0:()=>w(e.title),sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:R?"default":"text",textDecoration:e.completed?"line-through":"none"},children:e.title}),d?(0,He.jsx)(Lo.Tooltip,{title:"\uD65C\uB3D9",arrow:!0,children:(0,He.jsx)(Lo.IconButton,{"aria-label":"\uD65C\uB3D9",onClick:()=>p(!0),sx:{color:"#6b7280"},children:(0,He.jsx)(vx.default,{sx:{fontSize:20}})})}):null,(0,He.jsx)(Lo.Tooltip,{title:x?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:(0,He.jsx)(Lo.IconButton,{"aria-label":x?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>hr(e,x),sx:{color:"#6b7280"},children:x?(0,He.jsx)(Bx.default,{sx:{fontSize:20}}):(0,He.jsx)(Cx.default,{sx:{fontSize:20}})})}),g?(0,He.jsx)(Lo.Tooltip,{title:"\uC778\uC1C4",arrow:!0,children:(0,He.jsx)(Lo.IconButton,{"aria-label":"\uC778\uC1C4",onClick:()=>g(e),sx:{color:"#6b7280"},children:(0,He.jsx)(Ix.default,{sx:{fontSize:20}})})}):null,l&&!s?(0,He.jsx)(Lo.IconButton,{"aria-label":"\uB2EB\uAE30",onClick:l,sx:{color:"#6b7280"},children:(0,He.jsx)(yx.default,{})}):null]}),(0,He.jsx)(Ye,{open:!!T,anchorEl:T?.anchorEl??null,title:T?.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:T?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>b(null),onConfirm:()=>{T&&t(e.seq,T.nextCompleted),b(null)}}),(0,He.jsx)(qi,{open:u,taskSeq:e.seq,items:f,loading:m,onLoad:d,onClose:()=>p(!1)})]})}var Ft=require("react"),le=require("@mui/material"),zx=a(require("@mui/icons-material/ExpandLess"),1),qx=a(require("@mui/icons-material/ExpandMore"),1),Ax=a(require("@mui/icons-material/ConfirmationNumberOutlined"),1),Rs=a(require("@mui/icons-material/Check"),1),Lx=a(require("@mui/icons-material/DirectionsRunOutlined"),1),Nx=a(require("@mui/icons-material/SpeedOutlined"),1),Ua=a(require("@mui/icons-material/CheckCircle"),1),Fx=a(require("@mui/icons-material/CheckCircleOutlineOutlined"),1),Ka=a(require("@mui/icons-material/CheckCircleOutlined"),1),Ps=a(require("@mui/icons-material/AccessTimeOutlined"),1),Hx=a(require("@mui/icons-material/AutorenewOutlined"),1),Wx=a(require("@mui/icons-material/LabelOutlined"),1),$x=a(require("@mui/icons-material/PersonOutlineOutlined"),1),Vx=a(require("@mui/icons-material/SubjectOutlined"),1),Ux=a(require("@mui/icons-material/StickyNote2Outlined"),1),Kx=a(require("@mui/icons-material/PanToolAltOutlined"),1),zs=a(require("@mui/icons-material/LockOutlined"),1),qs=a(require("@mui/icons-material/PublicOutlined"),1),As=a(require("@mui/icons-material/Group"),1),Gx=a(require("@mui/icons-material/Repeat"),1),jx=a(require("@mui/icons-material/EventOutlined"),1);var Ai=require("@ehfuse/alerts"),Yx=require("@ehfuse/mui-datetime-picker");var _x=require("react"),wx=require("@ehfuse/mui-form-controls"),Dx=require("react/jsx-runtime");function Ds({value:e,onCommit:o,onDraftChange:t,readOnly:n=!1}){let[r,i]=(0,_x.useState)(null);return(0,Dx.jsx)(wx.TextField,{value:r??e,placeholder:n?"":"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",slotProps:{input:{readOnly:n}},onChange:l=>{i(l.target.value),t?.(l.target.value)},onBlur:()=>{r!==null&&r.trim()!==e&&o(r),i(null)},onKeyDown:l=>{l.key==="Enter"&&l.target.blur(),l.key==="Escape"&&i(null)},sx:{mt:1}})}var Xn=require("react"),_o=require("@mui/material"),Mx=a(require("@mui/icons-material/AccountTreeOutlined"),1),Ox=a(require("@mui/icons-material/Add"),1),Rx=a(require("@mui/icons-material/Close"),1),Px=a(require("@mui/icons-material/NextPlanOutlined"),1);function Yn(e){return e.relations??[]}function qh(e,o,t){return Yn(e).some(n=>n.type===t&&n.task_seq===o.seq)||Yn(o).some(n=>n.type===t&&n.task_seq===e.seq)}function Ex(e){return`${e.created_time??""}|${String(e.seq).padStart(12,"0")}`}function $a(e,o){let t=new Map(o.map(u=>[u.seq,u]));t.set(e.seq,e);let n=new Map,r=(u,p)=>{n.has(u)||n.set(u,new Set),n.has(p)||n.set(p,new Set),n.get(u).add(p),n.get(p).add(u)};for(let u of t.values())for(let p of Yn(u))p.type==="follow_up"&&t.has(p.task_seq)&&r(u.seq,p.task_seq);let i=new Set([e.seq]),l=[e.seq];for(;l.length>0;){let u=l.shift();for(let p of n.get(u)??[])i.has(p)||(i.add(p),l.push(p))}let s=[...i].map(u=>t.get(u)).filter(u=>!!u).sort((u,p)=>Ex(u).localeCompare(Ex(p))),f=new Set;for(let u of Yn(e))u.type==="related"&&f.add(u.task_seq);for(let u of t.values())u.seq!==e.seq&&Yn(u).some(p=>p.type==="related"&&p.task_seq===e.seq)&&f.add(u.seq);let m=[...f].map(u=>t.get(u)).filter(u=>u!==void 0&&u.seq!==e.seq),d=[...t.values()].filter(u=>u.seq!==e.seq&&Yn(u).some(p=>p.type==="duplicate_of"&&p.task_seq===e.seq)),g=Yn(e).find(u=>u.type==="duplicate_of")?.task_seq,x=g?t.get(g)??null:null;return{lineage:s,related:m,duplicates:d,duplicateOf:x}}function Va(e,o){let t=$a(e,o);return(t.lineage.length>=2?t.lineage.length-1:0)+t.related.length+t.duplicates.length+(t.duplicateOf?1:0)}function Es(e,o){return Va(e,o)>0}var ye=require("react/jsx-runtime");function Ms({item:e,caption:o,onOpen:t,onUnlink:n}){let r=we(e.icon||Ao);return(0,ye.jsxs)(_o.Box,{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?(0,ye.jsx)(_o.Box,{component:"span",sx:{flexShrink:0,px:.6,py:.1,borderRadius:.75,fontSize:11.5,fontWeight:500,color:"#8a6d1d",bgcolor:"#faf1d7"},children:o}):null,r?(0,ye.jsx)(r,{sx:{fontSize:16,flexShrink:0,color:e.icon_color||"#1e3a8a"}}):null,(0,ye.jsxs)(_o.Box,{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]}),(0,ye.jsx)(Ge,{option:Wo(e),small:!0}),n?(0,ye.jsx)(_o.IconButton,{className:"taskbox-relation-unlink",size:"small","aria-label":"\uC5F0\uACB0 \uD574\uC81C",onClick:n,sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:(0,ye.jsx)(Rx.default,{sx:{fontSize:15}})}):null]})}function Os({task:e,tasks:o,readOnly:t=!1,onOpenTask:n,onLink:r,onUnlink:i,onCreateFollowUp:l}){let[s,f]=(0,Xn.useState)(!1),[m,d]=(0,Xn.useState)(null),[g,x]=(0,Xn.useState)(null),u=(0,Xn.useMemo)(()=>$a(e,o),[e,o]),p=u.lineage.length>=2,_=(0,Xn.useMemo)(()=>Va(e,o),[e,o]),w=(0,Xn.useMemo)(()=>{let b=new Set;for(let M of u.lineage)b.add(M.seq);for(let M of u.related)b.add(M.seq);for(let M of u.duplicates)b.add(M.seq);return u.duplicateOf&&b.add(u.duplicateOf.seq),[...b]},[u]),T=(b,M,C)=>{x({anchorEl:b,targetSeq:M,type:C})};return(0,ye.jsxs)(_t,{icon:(0,ye.jsx)(Mx.default,{sx:{fontSize:19,display:"block"}}),title:(0,ye.jsxs)(ye.Fragment,{children:["\uAD00\uB828 \uC5C5\uBB34",_>0?(0,ye.jsx)(_o.Box,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:_}):null]}),titleExtra:t?null:(0,ye.jsxs)(_o.Box,{sx:{ml:"auto",display:"flex",alignItems:"center",gap:.5},children:[l?(0,ye.jsx)(_o.Button,{size:"small",color:"inherit",startIcon:(0,ye.jsx)(Px.default,{sx:{fontSize:16}}),onClick:b=>d(b.currentTarget),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uD6C4\uC18D \uC5C5\uBB34"}):null,r?(0,ye.jsx)(_o.Button,{size:"small",color:"inherit",startIcon:(0,ye.jsx)(Ox.default,{sx:{fontSize:16}}),onClick:()=>f(!0),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uC5F0\uACB0"}):null]}),children:[(0,ye.jsxs)(_o.Box,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:[p?(0,ye.jsx)(_o.Box,{sx:{mb:u.related.length||u.duplicates.length||u.duplicateOf?1:0},children:u.lineage.map((b,M)=>{let C=b.seq===e.seq,q=M===u.lineage.length-1;return(0,ye.jsxs)(_o.Box,{sx:{display:"flex",gap:1},children:[(0,ye.jsxs)(_o.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:14,flexShrink:0,pt:1.1},children:[(0,ye.jsx)(_o.Box,{sx:{width:C?9:7,height:C?9:7,borderRadius:"50%",bgcolor:C?"#2f80ed":b.completed?"#9a9a97":"#c9c8c5",flexShrink:0}}),q?null:(0,ye.jsx)(_o.Box,{sx:{width:"2px",flex:1,bgcolor:"#e6e6e3"}})]}),(0,ye.jsxs)(_o.Box,{sx:{flex:1,minWidth:0,pb:q?0:.5},children:[(0,ye.jsxs)(_o.Box,{sx:{display:"flex",alignItems:"center",gap:.75},children:[(0,ye.jsxs)(_o.Box,{component:"span",onClick:!C&&n?()=>n(b.seq):void 0,sx:{minWidth:0,fontSize:14,fontWeight:C?600:400,color:C?"#2f80ed":b.completed?"#9a9a97":"#37352f",textDecoration:b.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...!C&&n?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[b.ticket_no?`${b.ticket_no} `:"",b.title]}),(0,ye.jsx)(Ge,{option:Wo(b),small:!0})]}),(0,ye.jsx)(_o.Box,{sx:{fontSize:12,color:"#9a9a97"},children:b.completed&&b.completed_time?`${b.completed_time} \uC644\uB8CC`:b.created_time??""})]})]},b.seq)})}):null,u.duplicateOf?(0,ye.jsx)(Ms,{item:u.duplicateOf,caption:"\uC6D0\uBCF8",onOpen:n?()=>n(u.duplicateOf.seq):void 0,onUnlink:!t&&i?b=>T(b.currentTarget,u.duplicateOf.seq,"duplicate_of"):void 0}):null,u.duplicates.map(b=>(0,ye.jsx)(Ms,{item:b,caption:"\uC911\uBCF5",onOpen:n?()=>n(b.seq):void 0,onUnlink:!t&&i?M=>T(M.currentTarget,b.seq,"duplicate_of"):void 0},`dup-${b.seq}`)),u.related.map(b=>(0,ye.jsx)(Ms,{item:b,onOpen:n?()=>n(b.seq):void 0,onUnlink:!t&&i?M=>T(M.currentTarget,b.seq,"related"):void 0},`rel-${b.seq}`)),_===0?(0,ye.jsx)(_o.Box,{sx:{px:1.25,py:.75,fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]}),r?(0,ye.jsx)(Di,{open:s,task:e,tasks:o,excludeSeqs:w,onClose:()=>f(!1),onSubmit:(b,M)=>r(e.seq,b,M)}):null,(0,ye.jsx)(Ye,{open:!!m,anchorEl:m,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:()=>d(null),onConfirm:()=>{l?.(e.seq),d(null)}}),(0,ye.jsx)(Ye,{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:()=>x(null),onConfirm:()=>{g&&i?.(e.seq,g.targetSeq,g.type),x(null)}})]})}var v=require("react/jsx-runtime");function Qn({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return(0,v.jsx)(le.Box,{component:"span",sx:{color:"#9a9a97"},children:e})}function Ls({task:e,customTabs:o,statusOptions:t,avatarSrcByName:n,onChangeStatus:r,onChangeLabels:i,onAddLabelOption:l,onChangeProject:s,onAddProject:f,onChangeDate:m,onChangeReminder:d,onMemberEdit:g,onChangePriority:x,onChangeVisibility:u,onChangeRepeat:p,departments:_=[],onChangeEstimatedTime:w,onChangeEventTime:T,onChangeEventPlace:b,onChangeEventAddress:M,onChangeNote:C,onChangeNoteDraft:q,onChangeContent:B,onChangeContentHeight:R,onAddChecklistItem:P,onToggleChecklistItem:z,onRemoveChecklistItem:D,onUpdateChecklistItem:ee,onConvertChecklistToTask:h,onOpenChecklistTask:c,onLinkChecklistTask:S,resolveChecklistTask:k,relatedTasksPool:y,onOpenRelatedTask:E,onLinkRelatedTask:Y,onUnlinkRelatedTask:re,onCreateFollowUpTask:qe,onAddAttachments:Se,onRemoveAttachment:_e,onPreview:Be,onDownload:be,onUpdateComment:Re,onRemoveComment:eo,onToggleCommentReaction:co,currentUserName:G="",myAccountSeq:W=0,noticeAdmin:se=!1,hideProject:I=!1,hideLabel:H=!1,showTitle:ne=!1,onChangeTitle:j,onToggleCompleted:Qe,onChangeIcon:To,onChangeIconColor:yo,employees:mo=[],onAckConfirm:We,onRequestConfirm:So,onChangeBugField:oe,sprints:Ae=[],sprintProject:tn=!1,hideSprint:Z=!1,onChangeSprint:Uo,onChangeStoryPoints:Dt,onChangeResolution:Et,onClaimTask:A,onVerifyBug:Ce}){let[Ze,oo]=(0,Ft.useState)(null),[io,ot]=(0,Ft.useState)(null),[Tn,Ne]=(0,Ft.useState)(null),[F,K]=(0,Ft.useState)(!1),me={[Nt]:F?{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"}},[ke,fo]=(0,Ft.useState)(null),[uo,$e]=(0,Ft.useState)(null),[Fo,Ho]=(0,Ft.useState)(null),[Ko,qo]=(0,Ft.useState)(null),[nr,Ve]=(0,Ft.useState)(null),[$t,St]=(0,Ft.useState)(null),[qn,yn]=(0,Ft.useState)(null),Bo=!!e.is_notice,Do=!!e.is_event,Bt=!!e.is_bug,Ni=!!A&&si(e,W),Fi=!!A&&ci(e,W),Tr=!!Ce&&Bt&&!!e.completed&&W>0&&(e.author_account_seq??0)===W&&!(e.acks??[]).some(O=>O.account_seq===W),tt=!ln(e,W),rr=!e.is_event&&(e.is_notice?W>0&&(e.author_account_seq??0)===W:(e.author_account_seq??0)===W||(e.manager_account_seq??0)===W),ir=e.is_notice||e.is_event?we(e.icon||(e.is_notice?Go:Ut)):null,ar=Bo?!li(e,W):tt,An=Ni||Fi?(0,v.jsxs)(Gt,{onClick:O=>yn(O.currentTarget),children:[(0,v.jsx)(Kx.default,{sx:{fontSize:16,mr:.5}}),"\uAC00\uC838\uAC00\uAE30"]}):null,Ya=Bo?Pi(e,mo):"",Mt=Bo?bs(e,mo,W):null,st=!Bo&&!Do?gi(e,W):null,Xa=!!(st&&st.total>0||Bo&&Mt),Qa=!Bo;return(0,v.jsxs)(v.Fragment,{children:[ne?(0,v.jsxs)(le.Box,{sx:{px:2,pt:2,pb:.5,display:"flex",alignItems:"flex-start",gap:1},children:[rr?(0,v.jsx)(le.Checkbox,{checked:e.completed,icon:(0,v.jsx)(Fx.default,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:(0,v.jsx)(Ua.default,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(O,Vt)=>{io||ot({anchorEl:O.currentTarget,nextCompleted:Vt})},sx:{p:0,mt:.25}}):null,ir?(0,v.jsx)(le.Box,{sx:{display:"flex",p:0,mt:.25,color:e.icon_color||(Bo?"#e5484d":"#1e3a8a")},children:(0,v.jsx)(ir,{sx:{fontSize:20}})}):null,(0,v.jsx)(le.Box,{sx:{flex:1,minWidth:0},children:Ze!==null?(0,v.jsx)(le.Box,{component:"input",autoFocus:!0,spellCheck:!1,value:Ze,onChange:O=>oo(O.target.value),onBlur:()=>{Ze.trim()&&Ze.trim()!==e.title&&j(e.seq,Ze.trim()),oo(null)},onKeyDown:O=>{O.key==="Enter"&&O.target.blur(),O.key==="Escape"&&oo(null)},sx:{width:"100%",border:"none",outline:"none",font:"inherit",fontSize:19,fontWeight:600,color:"#37352f",p:0,m:0}}):(0,v.jsx)(le.Box,{onClick:()=>oo(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})}),(0,v.jsx)(Ye,{open:!!io,anchorEl:io?.anchorEl??null,title:io?.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:io?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>ot(null),onConfirm:()=>{io&&Qe(e.seq,io.nextCompleted),ot(null)}})]}):null,(0,v.jsxs)(le.Box,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:0,[Nt]:{pb:0,"& > :last-child":{mb:0}}},children:[(0,v.jsx)(Ii,{hideProject:I,values:{tabKey:e.tab_key??"",managerName:e.manager_name,receiverNames:e.receiver_names,startDate:e.start_date,dueDate:e.due_date,reminder:e.reminder,priority:e.priority,estimatedTime:e.estimated_time,eventTime:e.event_time??"",eventPlace:e.event_place??"",eventAddress:e.event_address??""},customTabs:o,avatarSrcByName:n,showEstimatedTime:!Do,notice:Bo,event:Do,readOnly:tt,targetSummary:Ya,onChangeProject:O=>s(e.seq,O),onAddProject:f,onChangeStartDate:O=>m(e.seq,"start_date",O),onChangeDueDate:O=>m(e.seq,"due_date",O),onChangeReminder:O=>d(e.seq,O),onChangePriority:O=>x(e.seq,O),onChangeEstimatedTime:O=>w(e.seq,O),onChangeEventTime:O=>T?.(e.seq,O),onChangeEventPlace:O=>b?.(e.seq,O),onChangeEventAddress:O=>M?.(e.seq,O),onMemberEdit:O=>g(e,O,null),narrowCollapsedSx:me,reminderLocked:e.completed,managerAction:An,leading:(0,v.jsxs)(v.Fragment,{children:[Tr||An&&(Bo||Do)?(0,v.jsxs)(le.Box,{sx:{gridColumn:"1 / -1",display:"flex",justifyContent:"flex-start",gap:2,px:2,py:1.5},children:[Bo||Do?An:null,Tr?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(le.Button,{variant:"contained",size:"large",onClick:()=>Ce?.(e.seq,!0),sx:{bgcolor:"#2f80ed"},children:"\uAC80\uC99D\uC644\uB8CC"}),(0,v.jsx)(le.Button,{variant:"outlined",size:"large",color:"error",onClick:()=>Ce?.(e.seq,!1),children:"\uC7AC\uC624\uD508"})]}):null]}):null,Bt&&e.ticket_no?(0,v.jsx)(xe,{icon:(0,v.jsx)(Ax.default,{sx:{fontSize:17}}),label:"\uD2F0\uCF13",children:(0,v.jsx)(le.Box,{component:"span",sx:{fontVariantNumeric:"tabular-nums"},children:e.ticket_no})}):null,Do?null:(0,v.jsx)(le.Box,{sx:Bt&&e.ticket_no||Qa||Xa?void 0:{gridColumn:"1 / -1"},children:(0,v.jsx)(xe,{icon:(0,v.jsx)(Hx.default,{sx:{fontSize:17}}),label:"\uC0C1\uD0DC",onClick:tt||e.completed?void 0:O=>fo(O),children:(0,v.jsx)(Ge,{option:Wo(e)})})}),Bo?null:(()=>{let O=Ot(e),Vt=O==="all"?(0,v.jsx)(qs.default,{sx:{fontSize:17,color:"#2f80ed"}}):O==="group"?(0,v.jsx)(As.default,{sx:{fontSize:17,color:"#d9730d"}}):(0,v.jsx)(zs.default,{sx:{fontSize:17}}),Ln=O==="all"?"\uC804\uCCB4\uACF5\uAC1C":O==="group"?`\uBD80\uC11C\uACF5\uAC1C \xB7 ${_.find(nn=>nn.seq===(e.visibility_group_seq??0))?.name??"\uBD80\uC11C"}`:"\uBE44\uACF5\uAC1C";return(0,v.jsx)(le.Box,{children:(0,v.jsx)(xe,{icon:Vt,label:"\uACF5\uAC1C",onClick:tt||!u?void 0:nn=>$e(nn),children:Ln})})})(),!Bo&&!Bt?(0,v.jsx)(le.Box,{children:(0,v.jsx)(xe,{icon:(0,v.jsx)(Gx.default,{sx:{fontSize:17,...e.repeat_rule?{color:"#2f80ed"}:{}}}),label:"\uBC18\uBCF5",onClick:tt||!p?void 0:O=>Ho(O),children:e.repeat_rule?yi(e.repeat_rule):(0,v.jsx)(Qn,{label:"\uC5C6\uC74C"})})}):null,!Bo&&!Bt&&e.repeat_rule?(0,v.jsx)(le.Box,{children:(0,v.jsx)(xe,{icon:(0,v.jsx)(jx.default,{sx:{fontSize:17}}),label:"\uBC18\uBCF5 \uC885\uB8CC",onClick:tt||!p?void 0:O=>qo(O),children:e.repeat_until?`${e.repeat_until}\uAE4C\uC9C0`:(0,v.jsx)(Qn,{})})}):null,st&&st.total>0?(0,v.jsx)(le.Box,{children:(0,v.jsx)(xe,{icon:(0,v.jsx)(Ka.default,{sx:{fontSize:17}}),label:"\uD655\uC778",children:st.canConfirm?(0,v.jsx)(le.Button,{size:"small",variant:"contained",onClick:()=>We?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):(0,v.jsxs)(le.Button,{size:"small",variant:"outlined",color:"inherit",startIcon:st.myTime?(0,v.jsx)(Ua.default,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:O=>Ne({anchorEl:O.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:[st.count," / ",st.total]})})}):null,Bo&&Mt?(0,v.jsx)(le.Box,{children:(0,v.jsx)(xe,{icon:(0,v.jsx)(Ka.default,{sx:{fontSize:17}}),label:"\uD655\uC778",children:(0,v.jsx)(le.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,minWidth:0},children:Mt.canAck?(0,v.jsx)(le.Button,{size:"small",variant:"contained",onClick:()=>We?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):(0,v.jsx)(le.Button,{size:"small",variant:"outlined",color:"inherit",startIcon:Mt.acked?(0,v.jsx)(Ua.default,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:O=>Ne({anchorEl:O.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:Mt.total>0&&Mt.count>=Mt.total?"\uC644\uB8CC":(0,v.jsxs)(v.Fragment,{children:[Mt.count,(0,v.jsx)(le.Box,{component:"span",sx:{mx:.4},children:"/"}),Mt.total]})})})})}):null,tn&&!Z&&!Do&&!Bo?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(xe,{icon:(0,v.jsx)(Lx.default,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:tt?void 0:O=>Ve(O),children:(e.sprint_seq??0)>0?Ae.find(O=>O.seq===e.sprint_seq)?.name??"\uC0AD\uC81C\uB41C \uC2A4\uD504\uB9B0\uD2B8":(0,v.jsx)(Qn,{label:"\uBBF8\uBC30\uC815"})}),(0,v.jsx)(xe,{icon:(0,v.jsx)(Nx.default,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",children:(0,v.jsx)(un,{value:(e.story_points??0)>0?String(e.story_points):"",placeholder:"\uBBF8\uCD94\uC815",readOnly:tt,onCommit:O=>Dt?.(e.seq,Number(O.replace(/[^0-9.]/g,""))||0)})})]}):null,Do||H?null:(0,v.jsx)(le.Box,{sx:[{gridColumn:"1 / -1"},me??null],children:(0,v.jsx)(xe,{icon:(0,v.jsx)(Wx.default,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:tt?void 0:O=>St(O),children:(e.label_keys??[]).length>0?(0,v.jsx)(Bn,{labelKeys:e.label_keys??[],labelOptions:t}):(0,v.jsx)(Qn,{})})})]}),trailing:(0,v.jsxs)(v.Fragment,{children:[Bt?(0,v.jsx)(_i,{values:{repro:e.bug_repro??"",device:e.bug_device??"",where:e.bug_where??"",version:e.bug_version??"",resolution:e.resolution??""},readOnly:tt,showResolution:!!e.completed,onChangeRepro:O=>oe?.(e.seq,"bug_repro",O),onChangeDevice:O=>oe?.(e.seq,"bug_device",O),onChangeWhere:O=>oe?.(e.seq,"bug_where",O),onChangeVersion:O=>oe?.(e.seq,"bug_version",O),onChangeResolution:O=>Et?.(e.seq,O)}):null,(0,v.jsx)(xe,{icon:(0,v.jsx)($x.default,{sx:{fontSize:17}}),label:"\uC791\uC131\uC790",sx:[$o(9),me??null],children:e.created_by?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(rt,{names:[e.created_by],size:20,avatarSrcByName:n}),e.created_by]}):(0,v.jsx)(Qn,{})}),(0,v.jsx)(xe,{icon:(0,v.jsx)(Ps.default,{sx:{fontSize:17}}),label:"\uC791\uC131\uC2DC\uAC04",sx:[$o(11),me??null],children:e.created_time?Pt(e.created_time):(0,v.jsx)(Qn,{})}),e.completed?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(xe,{icon:(0,v.jsx)(Ka.default,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC790",sx:[$o(10),me??null],children:e.completed_by?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(rt,{names:[e.completed_by],size:20,avatarSrcByName:n}),e.completed_by]}):(0,v.jsx)(Qn,{})}),(0,v.jsx)(xe,{icon:(0,v.jsx)(Ps.default,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC2DC\uAC04",sx:[$o(12),me??null],children:e.completed_time?Pt(e.completed_time):(0,v.jsx)(Qn,{})})]}):null]})}),(0,v.jsxs)(le.Box,{sx:{display:"none",[Nt]:{display:"block",mt:1.5,mb:0}},children:[(0,v.jsx)(le.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,v.jsx)(le.ButtonBase,{onClick:()=>K(O=>!O),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:F?(0,v.jsxs)(v.Fragment,{children:["\uC811\uAE30 ",(0,v.jsx)(zx.default,{sx:{fontSize:18}})]}):(0,v.jsxs)(v.Fragment,{children:["\uC815\uBCF4 \uB354\uBCF4\uAE30 ",(0,v.jsx)(qx.default,{sx:{fontSize:18}})]})})]}),(0,v.jsxs)(le.Box,{children:[(0,v.jsx)(le.Divider,{sx:{my:1.5,borderColor:"#e6e6e3",[Nt]:{mt:0,mb:1.25}}}),(0,v.jsx)(_t,{icon:(0,v.jsx)(Vx.default,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",children:(0,v.jsx)(le.Box,{sx:{userSelect:"text"},children:(0,v.jsx)(wi,{syncKey:e.seq,value:e.content??"",height:e.content_height??0,onChangeHeight:R?O=>R(e.seq,O):void 0,readOnly:tt,onChange:O=>B(e.seq,O)})})}),e.is_bug?null:(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(le.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,v.jsx)(_t,{icon:(0,v.jsx)(Ux.default,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:(0,v.jsx)(le.Box,{sx:{userSelect:"text"},children:(0,v.jsx)(Ds,{value:e.note,readOnly:ar,onCommit:O=>C(e.seq,O),onDraftChange:q?O=>q(e.seq,O):void 0})})})]}),Do?null:(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(le.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,v.jsx)(Ei,{taskSeq:e.seq,checklist:e.checklist??[],removeLocked:ar,onAdd:P,onToggle:z,onRemove:D,onUpdate:ee,onConvertToTask:h,onOpenLinkedTask:c,resolveLinkedTask:k,myAccountSeq:W,linkCandidates:y,linkBaseTask:e,onLinkExistingTask:S})]}),y&&!Do&&!Bo&&Es(e,y)?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(le.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,v.jsx)(Os,{task:e,tasks:y,readOnly:tt,onOpenTask:E,onLink:Y,onUnlink:re,onCreateFollowUp:qe})]}):null,(0,v.jsx)(le.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,v.jsx)(Mi,{taskSeq:e.seq,attachments:e.attachments??[],removeLocked:ar,onAdd:Se,onRemove:_e,onPreview:Be?O=>Be({...O,taskSeq:e.seq}):void 0,onDownload:be?O=>be({...O,taskSeq:e.seq}):void 0})]}),(0,v.jsx)(le.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,v.jsx)(Is,{taskSeq:e.seq,comments:e.comments??[],currentUserName:G,myAccountSeq:W,avatarSrcByName:n,onUpdate:Re,onRemove:eo,onToggleReaction:co,onPreview:Be?O=>Be({...O,taskSeq:e.seq}):void 0,onDownload:be?O=>be({...O,taskSeq:e.seq}):void 0})]}),(0,v.jsx)(cr,{anchorEl:ke,value:e.status,options:Bo?_r:Bt?Fn:wr,onSelect:O=>r(e.seq,O),onClose:()=>fo(null)}),(0,v.jsx)(le.Menu,{transitionDuration:0,anchorEl:Fo,open:!!Fo,onClose:()=>Ho(null),children:[{value:"",label:"\uC5C6\uC74C"},...Vr].map(O=>(0,v.jsx)(le.MenuItem,{selected:(e.repeat_rule??"")===O.value,onClick:()=>{Ho(null),(async()=>{let Vt=e.repeat_rule??"";if(O.value===Vt)return;if(O.value===""){await(0,Ai.ConfirmDialog)({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)"})&&p?.(e.seq,"","");return}let Ln=String(e.due_date??"").slice(0,10);if(!Ln){(0,Ai.InfoAlert)(e.is_event?"\uBC18\uBCF5\uD558\uB824\uBA74 \uC77C\uC815 \uB0A0\uC9DC\uB97C \uBA3C\uC800 \uC120\uD0DD\uD558\uC138\uC694.":"\uBC18\uBCF5\uD558\uB824\uBA74 \uB9C8\uAC10\uAE30\uD55C\uC744 \uBA3C\uC800 \uC120\uD0DD\uD558\uC138\uC694.");return}Vt&&!await(0,Ai.ConfirmDialog)({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."})||p?.(e.seq,O.value,Si(Ln,O.value))})()},sx:{fontSize:14,minWidth:140},children:O.label},O.value||"none"))}),(0,v.jsx)(Yx.DatePicker,{anchorEl:Ko,open:!!Ko,onClose:()=>qo(null),selectedDate:e.repeat_until?new Date(`${e.repeat_until}T00:00:00`):new Date,onDateChange:O=>{qo(null);let Vt=Za=>String(Za).padStart(2,"0"),Ln=`${O.getFullYear()}-${Vt(O.getMonth()+1)}-${Vt(O.getDate())}`,nn=e.repeat_rule??"";nn&&p?.(e.seq,nn,Ln)}}),(0,v.jsx)(le.Menu,{transitionDuration:0,anchorEl:uo,open:!!uo,onClose:()=>$e(null),children:[{key:"involved",label:"\uBE44\uACF5\uAC1C",icon:(0,v.jsx)(zs.default,{sx:{fontSize:17,color:"#57564f"}}),selected:Ot(e)==="involved",onPick:()=>u?.(e.seq,"involved",0)},{key:"all",label:"\uC804\uCCB4\uACF5\uAC1C",icon:(0,v.jsx)(qs.default,{sx:{fontSize:17,color:"#2f80ed"}}),selected:Ot(e)==="all",onPick:()=>u?.(e.seq,"all",0)},..._.map(O=>({key:`group-${O.seq}`,label:`\uBD80\uC11C\uACF5\uAC1C \xB7 ${O.name}`,icon:(0,v.jsx)(As.default,{sx:{fontSize:17,color:"#d9730d"}}),selected:Ot(e)==="group"&&(e.visibility_group_seq??0)===O.seq,onPick:()=>u?.(e.seq,"group",O.seq)}))].map(O=>(0,v.jsxs)(le.MenuItem,{selected:O.selected,onClick:()=>{O.onPick(),$e(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[O.icon,O.label,O.selected?(0,v.jsx)(Rs.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},O.key))}),(0,v.jsx)(le.Menu,{transitionDuration:0,anchorEl:nr,open:!!nr,onClose:()=>Ve(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...Ae.filter(O=>`custom-${O.group_seq}`===String(e.tab_key??"")).map(O=>({seq:O.seq,label:It(O)}))].map(O=>(0,v.jsxs)(le.MenuItem,{onClick:()=>{Uo?.(e.seq,O.seq),Ve(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[O.label,(e.sprint_seq??0)===O.seq?(0,v.jsx)(Rs.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},O.seq))}),(0,v.jsx)(xi,{anchorEl:Tn?.anchorEl??null,open:!!Tn?.open,acks:e.acks??[],total:Mt?.total??st?.total??0,avatarSrcByName:n,onRequestConfirm:So&&st&&st.count<st.total?()=>{So(e.seq),Ne(O=>O?{...O,open:!1}:null)}:void 0,onClose:()=>Ne(O=>O?{...O,open:!1}:null)}),(0,v.jsx)(Ri,{anchorEl:$t,selectedKeys:e.label_keys??[],labelOptions:t,onToggle:O=>i(e.seq,ii(e.label_keys??[],O)),onAddLabel:l,onClose:()=>St(null)}),(0,v.jsx)(Ye,{open:!!qn,anchorEl:qn,title:Ni?"\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:()=>yn(null),onConfirm:()=>{A?.(e.seq),yn(null)}})]})}var Mo=require("react/jsx-runtime");function Ah(){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 Lh({open:e,task:o,onClose:t,onAddComment:n,onSaveFields:r,myAccountSeq:i=0,onToggleCompleted:l,onChangeTitle:s,onChangeIcon:f,onChangeIconColor:m,activityItems:d,activityLoading:g,onLoadActivity:x,onPrint:u,...p}){let _=je(),w=(0,En.useRef)(null);o&&(w.current=o);let T=o??w.current,[b,M]=(0,En.useState)(!1),[C,q]=(0,En.useState)({}),B=Object.keys(C).length>0;(0,En.useEffect)(()=>{q({})},[o?.seq,e]);let R=(0,En.useRef)(null);if((0,En.useEffect)(()=>{R.current?.scrollTo({top:0})},[o?.seq]),!T)return null;let P=_&&B?{...T,...C}:T,z=P.checklist??[],D=(k,y)=>{_?q(E=>({...E,...k})):y()},ee=()=>{let k=C;q({});let y=T.seq,E=k.title===void 0?void 0:String(k.title).trim();if(r){let Y={...k};E!==void 0&&(E?Y.title=E:delete Y.title),Object.keys(Y).length>0&&r(y,Y),(0,Ns.SuccessAlert)({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"});return}E&&s(y,E),k.icon!==void 0&&f(y,String(k.icon)),k.icon_color!==void 0&&m?.(y,String(k.icon_color)),k.status!==void 0&&p.onChangeStatus(y,k.status),k.label_keys!==void 0&&p.onChangeLabels(y,k.label_keys??[]),k.tab_key!==void 0&&p.onChangeProject(y,String(k.tab_key??"")),k.start_date!==void 0&&p.onChangeDate(y,"start_date",String(k.start_date??"")),k.due_date!==void 0&&p.onChangeDate(y,"due_date",String(k.due_date??"")),k.reminder!==void 0&&p.onChangeReminder(y,k.reminder),k.priority!==void 0&&p.onChangePriority(y,k.priority),k.estimated_time!==void 0&&p.onChangeEstimatedTime(y,String(k.estimated_time??"")),k.event_time!==void 0&&p.onChangeEventTime?.(y,String(k.event_time??"")),k.event_place!==void 0&&p.onChangeEventPlace?.(y,String(k.event_place??"")),k.event_address!==void 0&&p.onChangeEventAddress?.(y,String(k.event_address??"")),k.content!==void 0&&p.onChangeContent(y,String(k.content??"")),k.note!==void 0&&p.onChangeNote(y,String(k.note??"")),k.visibility!==void 0&&p.onChangeVisibility?.(y,k.visibility,Number(k.visibility_group_seq??0)),(0,Ns.SuccessAlert)({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"})},h={...p,onChangeStatus:(k,y)=>D({status:y},()=>p.onChangeStatus(k,y)),onChangeLabels:(k,y)=>D({label_keys:y},()=>p.onChangeLabels(k,y)),onChangeProject:(k,y)=>D({tab_key:y},()=>p.onChangeProject(k,y)),onChangeDate:(k,y,E)=>D({[y]:E},()=>p.onChangeDate(k,y,E)),onChangeReminder:(k,y)=>D({reminder:y},()=>p.onChangeReminder(k,y)),onChangePriority:(k,y)=>D({priority:y},()=>p.onChangePriority(k,y)),onChangeEstimatedTime:(k,y)=>D({estimated_time:y},()=>p.onChangeEstimatedTime(k,y)),onChangeEventTime:(k,y)=>D({event_time:y},()=>p.onChangeEventTime?.(k,y)),onChangeEventPlace:(k,y)=>D({event_place:y},()=>p.onChangeEventPlace?.(k,y)),onChangeEventAddress:(k,y)=>D({event_address:y},()=>p.onChangeEventAddress?.(k,y)),onChangeContent:(k,y)=>D({content:y},()=>p.onChangeContent(k,y)),onChangeNote:(k,y)=>D({note:y},()=>p.onChangeNote(k,y)),onMemberEdit:(k,y)=>p.onMemberEdit(k,y,_?E=>q(Y=>({...Y,...E})):null),onChangeNoteDraft:_?(k,y)=>D({note:y},()=>{}):void 0,onChangeVisibility:p.onChangeVisibility?(k,y,E)=>D({visibility:y,visibility_group_seq:E},()=>p.onChangeVisibility?.(k,y,E)):void 0,onAddChecklistItem:(k,y)=>D({checklist:[...z,{label:y,checked:!1}]},()=>p.onAddChecklistItem(k,y)),onToggleChecklistItem:(k,y,E)=>D({checklist:z.map((Y,re)=>re===y?{...Y,checked:E}:Y)},()=>p.onToggleChecklistItem(k,y,E)),onRemoveChecklistItem:(k,y)=>D({checklist:z.filter((E,Y)=>Y!==y)},()=>p.onRemoveChecklistItem(k,y)),onUpdateChecklistItem:p.onUpdateChecklistItem?(k,y,E)=>D({checklist:z.map((Y,re)=>re===y?{...Y,label:E}:Y)},()=>p.onUpdateChecklistItem?.(k,y,E)):void 0,onLinkChecklistTask:p.onLinkChecklistTask?(k,y,E)=>D({checklist:[...z,{label:E,checked:!1,task_seq:y}]},()=>p.onLinkChecklistTask?.(k,y,E)):void 0},c=(0,Mo.jsx)(Ls,{...h,task:P,myAccountSeq:i,onChangeTitle:(k,y)=>D({title:y},()=>s(k,y)),onToggleCompleted:l,onChangeIcon:(k,y)=>D({icon:y},()=>f(k,y)),onChangeIconColor:(k,y)=>D({icon_color:y},()=>m?.(k,y)),showTitle:_}),S=(0,Mo.jsx)(_s,{onSubmit:(k,y)=>n(P.seq,k,y)},P.seq);return _?(0,Mo.jsxs)(Mo.Fragment,{children:[(0,Mo.jsx)(Jx.FormDialog,{open:e,onClose:t,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:P.is_notice?"\uACF5\uC9C0\uC0AC\uD56D":P.is_event?"\uC77C\uC815":P.is_bug?"\uC624\uB958":"\uC5C5\uBB34",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1},custom:[...x?[{icon:(0,Mo.jsx)(Qx.default,{sx:{ml:2,color:"#6b7280"}}),tooltip:"\uD65C\uB3D9",onClick:()=>M(!0)}]:[],{icon:(0,Mo.jsx)(Xx.default,{sx:{ml:x?0:2,color:"#6b7280"}}),tooltip:"\uACF5\uC720\uD558\uAE30",onClick:()=>hr(P,!0)},{icon:(0,Mo.jsx)(Ht.Button,{variant:"contained",size:"small",disableElevation:!0,disabled:!B,onClick:B?ee: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:S},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:(0,Mo.jsx)(Ht.Box,{sx:{userSelect:"none",width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:c})}]},T.seq),(0,Mo.jsx)(qi,{open:b,taskSeq:P.seq,items:d,loading:g,onLoad:x,onClose:()=>M(!1)})]}):(0,Mo.jsx)(Ht.Drawer,{anchor:"right",open:e,onClose:t,disableAutoFocus:!0,disableEnforceFocus:!0,sx:{zIndex:k=>k.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:(0,Mo.jsxs)(Ht.Box,{sx:{display:"flex",flexDirection:"column",height:"100%",userSelect:"none"},children:[(0,Mo.jsx)(ws,{task:P,myAccountSeq:i,onToggleCompleted:l,onChangeTitle:s,onChangeIcon:f,onChangeIconColor:m,onClose:t,activityItems:d,activityLoading:g,onLoadActivity:x,onPrint:u}),(0,Mo.jsx)(Ht.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,Mo.jsx)(Ht.Box,{sx:{flex:1,minHeight:0},children:(0,Mo.jsx)(Zx.default,{ref:R,style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:c})}),(0,Mo.jsx)(Ht.Divider,{sx:{borderColor:"#37352f"}}),(0,Mo.jsx)(Ht.Box,{sx:{flexShrink:0},children:S})]})})}var fn=require("react"),wo=require("@mui/material"),tg=require("@ehfuse/mui-form-dialog"),ng=a(require("@mui/icons-material/EditOutlined"),1),Fs=require("@ehfuse/alerts"),Mn=require("@ehfuse/mui-form-controls");var Ga="custom-";function eg(e){return e.startsWith(Ga)}function Nh(e){return e>0?`${Ga}${e}`:""}function ja(e){if(!eg(e))return 0;let o=Number(e.slice(Ga.length));return Number.isInteger(o)&&o>0?o:0}var Oe=require("react/jsx-runtime"),Fh=[{value:"planning",label:"\uACC4\uD68D\uC911"},{value:"active",label:"\uC9C4\uD589\uC911"},{value:"closed",label:"\uC885\uB8CC"}];function og(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):"-"}function Hh({open:e,customTabs:o,sprints:t,onClose:n,onCreate:r,onUpdate:i,onChangeStatus:l,onRemove:s}){let f=o.filter(h=>h.useSprints&&!h.archived),[m,d]=(0,fn.useState)(""),[g,x]=(0,fn.useState)(""),[u,p]=(0,fn.useState)(""),[_,w]=(0,fn.useState)(""),[T,b]=(0,fn.useState)(""),[M,C]=(0,fn.useState)(!1),[q,B]=(0,fn.useState)(0);(0,fn.useEffect)(()=>{e&&(d(f.length===1?f[0].key:""),x(""),p(""),w(""),b(""),B(0))},[e]);let R=()=>{x(""),p(""),w(""),b(""),B(0)},P=h=>{B(h.seq),d(`custom-${h.group_seq}`),x(h.name),p(h.goal),w(h.start_date),b(h.end_date)},z=async()=>{let h=ja(m);if(!h){(0,Fs.ErrorAlert)("\uBAA9\uD45C\uB97C \uB9CC\uB4E4 \uD504\uB85C\uC81D\uD2B8\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}if(!g.trim()){(0,Fs.ErrorAlert)("\uBAA9\uD45C \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}C(!0);try{if(q>0){i(q,{name:g.trim(),goal:u.trim(),start_date:_,end_date:T}),R();return}await r({group_seq:h,name:g.trim(),goal:u.trim(),start_date:_,end_date:T})&&R()}finally{C(!1)}},D=new Map(o.map(h=>[ja(h.key),h.label])),ee=(0,Oe.jsx)(wo.Box,{children:f.length===0?(0,Oe.jsx)(wo.Box,{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.'}):(0,Oe.jsxs)(Oe.Fragment,{children:[(0,Oe.jsxs)(wo.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2.5,mt:1},children:[(0,Oe.jsx)(Mn.LabelSelect,{label:"\uD504\uB85C\uC81D\uD2B8",size:"medium",value:m,options:f.map(h=>({value:h.key,label:h.label})),onChange:h=>d(String(h.target.value)),disabled:q>0}),(0,Oe.jsx)(Mn.ClearTextField,{label:"\uBAA9\uD45C \uC774\uB984",size:"medium",placeholder:"\uC608: 8\uC6D4 2\uC8FC\uCC28",value:g,onChange:h=>x(h.target.value)}),(0,Oe.jsx)(Mn.DateTextField,{size:"medium",label:"\uC2DC\uC791\uC77C",value:_,onChange:h=>w(h.target.value)}),(0,Oe.jsx)(Mn.DateTextField,{size:"medium",label:"\uC885\uB8CC\uC77C",value:T,onChange:h=>b(h.target.value)}),(0,Oe.jsx)(Mn.ClearTextField,{label:"\uC124\uBA85",size:"medium",placeholder:"\uC120\uD0DD \uC785\uB825",value:u,onChange:h=>p(h.target.value),sx:{gridColumn:"1 / -1"}})]}),(0,Oe.jsxs)(wo.Box,{sx:{mt:1.5,display:"flex",justifyContent:"flex-end",gap:1},children:[q>0?(0,Oe.jsx)(wo.Button,{color:"inherit",onClick:R,disabled:M,children:"\uCDE8\uC18C"}):null,(0,Oe.jsx)(wo.Button,{variant:"contained",onClick:()=>{z()},disabled:M,children:q>0?"\uBAA9\uD45C \uC800\uC7A5":"\uBAA9\uD45C \uB9CC\uB4E4\uAE30"})]}),(0,Oe.jsx)(wo.Box,{sx:{mt:2,borderTop:"1px solid #e6e6e3"},children:t.length===0?(0,Oe.jsx)(wo.Box,{sx:{py:3,textAlign:"center",fontSize:14,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):t.map(h=>(0,Oe.jsxs)(wo.Box,{sx:{display:"flex",flexDirection:"column",gap:1,py:1.75,borderBottom:"1px solid #f0efed"},children:[(0,Oe.jsxs)(wo.Box,{sx:{minWidth:0},children:[(0,Oe.jsxs)(wo.Box,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[(0,Oe.jsx)(wo.Box,{component:"span",sx:{fontSize:16,fontWeight:600,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:h.name}),(0,Oe.jsx)(wo.Box,{component:"span",sx:{flexShrink:0,px:1,py:.25,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:13,fontWeight:500},children:D.get(h.group_seq)??"\uC0AD\uC81C\uB41C \uD504\uB85C\uC81D\uD2B8"}),(0,Oe.jsxs)(wo.Box,{component:"span",sx:{flexShrink:0,fontSize:14,color:"#57564f"},children:[og(h.start_date)," ~ ",og(h.end_date)]})]}),h.goal?(0,Oe.jsx)(wo.Box,{sx:{mt:.5,fontSize:14,color:"#787774",lineHeight:1.5},children:h.goal}):null]}),(0,Oe.jsxs)(wo.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[(0,Oe.jsx)(Mn.LabelSelect,{label:"\uC0C1\uD0DC",showLabel:!1,size:"small",value:h.status,options:Fh.map(c=>({value:c.value,label:c.label})),onChange:c=>l(h.seq,String(c.target.value)),sx:{width:104,flexShrink:0}}),(0,Oe.jsx)(wo.IconButton,{"aria-label":"\uBAA9\uD45C \uC218\uC815",onClick:()=>P(h),sx:{color:"#9a9a97","&:hover":{color:"#2563eb"}},children:(0,Oe.jsx)(ng.default,{sx:{fontSize:18}})}),(0,Oe.jsx)(wo.IconButton,{"aria-label":"\uBAA9\uD45C \uC0AD\uC81C",onClick:()=>s(h.seq),sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:(0,Oe.jsx)(sn,{style:{width:16,height:16}})})]})]},h.seq))})]})});return(0,Oe.jsx)(tg.FormDialog,{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:ee}],actions:{showCancelButton:!1,right:(0,Oe.jsx)(wo.Button,{variant:"contained",onClick:n,children:"\uB2EB\uAE30"})}})}var Hs=require("react"),Ke=require("@mui/material"),rg=require("@ehfuse/mui-form-dialog"),ig=a(require("@mui/icons-material/OpenInNewOutlined"),1),ag=a(require("@mui/icons-material/EventOutlined"),1),lg=require("@ehfuse/alerts");var Ie=require("react/jsx-runtime");function Wh({open:e,imports:o,onRegister:t,onRemove:n,onClose:r}){let[i,l]=(0,Hs.useState)(""),[s,f]=(0,Hs.useState)(!1),m=async()=>{let x=i.trim();if(x){f(!0);try{await t(x)&&l("")}finally{f(!1)}}},d=async x=>{await(0,lg.ConfirmDialog)({title:"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",message:`"${x.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}" \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&n(x.seq)},g=(0,Ie.jsxs)(Ke.Box,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[(0,Ie.jsxs)(Ke.Box,{sx:{color:"#37352f",lineHeight:1.7},children:["\uAD6C\uAE00 \uCE98\uB9B0\uB354\uC758 \uC77C\uC815\uC744 ",(0,Ie.jsx)("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uC5C5\uBB34\uD568 \uCE98\uB9B0\uB354\uC5D0 \uD568\uAED8 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4.",(0,Ie.jsx)("br",{}),"\uD45C\uC2DC/\uC228\uAE40\uC740 \uC5C5\uBB34\uD568 \uC6B0\uC0C1\uB2E8\uC758 ",(0,Ie.jsx)("b",{children:"\uAD6C\uAE00 \uC77C\uC815"})," \uC2A4\uC704\uCE58\uB85C \uCF1C\uACE0 \uB055\uB2C8\uB2E4."]}),(0,Ie.jsx)(Ke.Box,{sx:{fontWeight:700,color:"#37352f",mt:.5},children:"\uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354"}),o.length>0?(0,Ie.jsx)(Ke.Box,{sx:{display:"flex",flexDirection:"column",border:"1px solid #e6e6e3",borderRadius:1},children:o.map((x,u)=>(0,Ie.jsxs)(Ke.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:.75,borderTop:u>0?"1px solid #efefed":"none"},children:[(0,Ie.jsx)(ag.default,{sx:{fontSize:18,color:"#0f9d58",flexShrink:0}}),(0,Ie.jsx)(Ke.Box,{component:"span",sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:x.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),(0,Ie.jsx)(Ke.IconButton,{"aria-label":"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",size:"small",onClick:()=>{d(x)},sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:(0,Ie.jsx)(sn,{sx:{fontSize:18}})})]},x.seq))}):(0,Ie.jsx)(Ke.Box,{sx:{color:"#9a9a97",px:.5},children:"\uC544\uC9C1 \uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}),(0,Ie.jsx)(Ke.Divider,{sx:{my:1,borderColor:"#e6e6e3"}}),(0,Ie.jsx)(Ke.Box,{sx:{fontWeight:700,color:"#37352f"},children:"\uC0C8 \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30"}),(0,Ie.jsxs)(Ke.Box,{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:[(0,Ie.jsx)(Ke.Box,{children:(0,Ie.jsxs)(Ke.Box,{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 > ",(0,Ie.jsx)("b",{children:"\uC124\uC815 \uBC0F \uACF5\uC720"}),"\uB97C \uC5FD\uB2C8\uB2E4."]})}),(0,Ie.jsx)(Ke.Box,{children:(0,Ie.jsxs)(Ke.Box,{component:"span",children:[(0,Ie.jsx)("b",{children:"\uCE98\uB9B0\uB354 \uD1B5\uD569"})," \uC139\uC158\uC758 ",(0,Ie.jsx)("b",{children:'"iCal \uD615\uC2DD\uC758 \uBE44\uBC00 \uC8FC\uC18C"'})," \uB97C \uBCF5\uC0AC\uD574 \uC544\uB798\uC5D0 \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),(0,Ie.jsx)(Ke.Box,{children:(0,Ie.jsx)(Ke.Box,{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."})}),(0,Ie.jsx)(Ke.Box,{children:(0,Ie.jsx)(Ke.Box,{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."})})]}),(0,Ie.jsxs)(Ke.Box,{sx:{display:"flex",gap:2,alignItems:"center"},children:[(0,Ie.jsx)(Ke.TextField,{value:i,onChange:x=>l(x.target.value),fullWidth:!0,label:"\uBE44\uBC00 iCal \uC8FC\uC18C",placeholder:"https://calendar.google.com/calendar/ical/\u2026/basic.ics",slotProps:{input:{spellCheck:!1}}}),(0,Ie.jsx)(Ke.Button,{variant:"contained",disabled:!i.trim()||s,onClick:()=>{m()},sx:{flexShrink:0},children:s?"\uD655\uC778 \uC911\u2026":"\uB4F1\uB85D"})]})]});return(0,Ie.jsx)(rg.FormDialog,{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:(0,Ie.jsx)(Ke.Button,{variant:"outlined",startIcon:(0,Ie.jsx)(ig.default,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:(0,Ie.jsx)(Ke.Button,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})}})}var No=require("@mui/material"),sg=require("@ehfuse/mui-form-dialog"),cg=a(require("@mui/icons-material/ContentCopyOutlined"),1),Ws=a(require("@mui/icons-material/OpenInNewOutlined"),1),$s=require("@ehfuse/alerts"),ze=require("react/jsx-runtime");function mg(e){return`${window.location.origin}/api/v1/taskbox/calendar/${e}.ics`}function $h({open:e,feed:o,feedTaskCount:t,buildFeedUrl:n,onSubscribe:r,onClose:i}){let l=n??mg,s=o.subscribed?l(o.token):"",f=()=>{navigator.clipboard.writeText(s).then(()=>(0,$s.InfoAlert)("\uD53C\uB4DC \uC8FC\uC18C\uB97C \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>(0,$s.InfoAlert)("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uC8FC\uC18C\uB97C \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD558\uC138\uC694."))},m=()=>{let g=s.replace(/^https?:\/\//,"webcal://");window.open(`https://calendar.google.com/calendar/r?cid=${encodeURIComponent(g)}`,"_blank")},d=(0,ze.jsxs)(No.Box,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[(0,ze.jsxs)(No.Box,{sx:{color:"#37352f",lineHeight:1.7},children:["\uB0B4\uAC00 \uAD00\uC5EC\uD55C \uC5C5\uBB34\uB97C ",(0,ze.jsx)("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0\uC11C \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4."]}),t===0?(0,ze.jsxs)(No.Box,{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.",(0,ze.jsx)("br",{}),(0,ze.jsx)("b",{children:"\uB9C8\uAC10\uAE30\uD55C\uC774 \uC788\uB294 \uB0B4 \uC5C5\uBB34 \uB610\uB294 \uBCF4\uB0B8\uC5C5\uBB34"}),"\uAC00 \uC0DD\uAE30\uBA74"," ",o.subscribed?"\uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0 \uC790\uB3D9\uC73C\uB85C \uD45C\uC2DC\uB429\uB2C8\uB2E4.":"\uC5EC\uAE30\uC11C \uAD6C\uB3C5\uC744 \uC2DC\uC791\uD558\uC138\uC694."]}):o.subscribed&&o.enabled?(0,ze.jsxs)(ze.Fragment,{children:[(0,ze.jsx)(No.TextField,{value:s,fullWidth:!0,label:"\uB0B4 \uD53C\uB4DC \uC8FC\uC18C",slotProps:{input:{readOnly:!0}}}),(0,ze.jsxs)(No.Box,{sx:{display:"flex",gap:2},children:[(0,ze.jsx)(No.Button,{variant:"outlined",startIcon:(0,ze.jsx)(cg.default,{}),onClick:f,children:"\uC8FC\uC18C \uBCF5\uC0AC"}),(0,ze.jsx)(No.Button,{variant:"contained",startIcon:(0,ze.jsx)(Ws.default,{}),onClick:m,children:"Google \uCE98\uB9B0\uB354\uC5D0 \uCD94\uAC00"})]}),(0,ze.jsxs)(No.Box,{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:[(0,ze.jsx)(No.Box,{children:(0,ze.jsxs)("span",{children:["\uBC84\uD2BC\uC774 \uB3D9\uC791\uD558\uC9C0 \uC54A\uC73C\uBA74 \uAD6C\uAE00 \uCE98\uB9B0\uB354 > \uB2E4\uB978 \uCE98\uB9B0\uB354 + > ",(0,ze.jsx)("b",{children:"URL\uB85C \uCD94\uAC00"}),"\uC5D0 \uC704 \uC8FC\uC18C\uB97C \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),(0,ze.jsx)(No.Box,{children:(0,ze.jsx)("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."})}),(0,ze.jsx)(No.Box,{children:(0,ze.jsx)("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."})}),(0,ze.jsx)(No.Box,{children:(0,ze.jsx)("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."})})]})]}):(0,ze.jsx)(No.Button,{variant:"contained",onClick:r,sx:{alignSelf:"flex-start"},children:"\uAD6C\uB3C5 \uC2DC\uC791 (\uD53C\uB4DC \uBC1C\uAE09)"})]});return(0,ze.jsx)(sg.FormDialog,{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:d}],actions:{showCancelButton:!1,left:(0,ze.jsx)(No.Button,{variant:"outlined",startIcon:(0,ze.jsx)(Ws.default,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:(0,ze.jsx)(No.Button,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}var xn=require("react"),gn=require("@mui/material"),ug=require("@ehfuse/mui-form-dialog"),dg=require("@ehfuse/mui-form-controls"),pg=require("@ehfuse/tree-view");var et=require("react/jsx-runtime");function fg(e){return`${e.name}#${e.seq}`}function Vh(e){return Number(e.slice(e.lastIndexOf("#")+1))||0}function Uh(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 Kh(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 Gh(e){let o=[[e.name,e.role_name].filter(Boolean).join(" "),e.department].filter(Boolean).join(" / ");return{id:`emp:${e.seq}`,label:fg(e),renderLabel:(0,et.jsx)(gn.Box,{component:"span",sx:{display:"inline-flex",alignItems:"baseline",gap:.75},children:(0,et.jsx)(gn.Box,{component:"span",sx:{fontWeight:400,color:"text.primary"},children:o})})}}function xg(e,o){let t=(e.groups??[]).map(r=>xg(r,o)).filter(r=>r!==null),n=(e.employees??[]).filter(r=>Kh(r,o)).map(Gh);return t.length===0&&n.length===0?null:{id:`group:${e.key}`,label:e.name,children:[...t,...n]}}function jh({groups:e,allEmployees:o,initialSelectedSeqs:t,multiple:n,isMobile:r,onSelectionChange:i}){let[l,s]=(0,xn.useState)(""),f=(0,xn.useMemo)(()=>e.map(d=>xg(d,l.trim().toLowerCase())).filter(d=>d!==null),[e,l]),m=(0,xn.useMemo)(()=>o.filter(d=>t.includes(d.seq)).map(fg),[]);return(0,et.jsxs)(et.Fragment,{children:[(0,et.jsx)(gn.Box,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:(0,et.jsx)(dg.SearchTextField,{size:"small",fullWidth:!0,placeholder:"\uC774\uB984, \uBD80\uC11C \uAC80\uC0C9",onSearch:s,onClear:()=>s(""),sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),(0,et.jsx)(gn.Box,{sx:r?{display:"flex",flexDirection:"column"}:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:(0,et.jsx)(pg.TreeView,{items:f,checkbox:!0,multiSelect:n,selectionMode:"child",showSearch:!1,defaultExpanded:!0,initialSelections:m,onChange:d=>i(d.map(Vh).filter(g=>g>0)),styles:{border:"none",borderRadius:"0"}})})]})}function Yh({open:e,title:o="\uC9C1\uC6D0 \uC120\uD0DD",hint:t="",groups:n,multiple:r=!1,selectedSeqs:i,confirmText:l="\uD655\uC778",onConfirm:s,onClose:f}){let m=je(),[d,g]=(0,xn.useState)([]),[x,u]=(0,xn.useState)(0),p=(0,xn.useMemo)(()=>Uh(n),[n]),_=i??[];(0,xn.useEffect)(()=>{e&&(g(_),u(T=>T+1))},[e]);let w=()=>{let T=p.filter(b=>d.includes(b.seq));s(r?T:T.slice(0,1)),f()};return(0,et.jsx)(ug.FormDialog,{open:e,onClose:f,title:`${o}${r&&d.length>0?` (${d.length}\uBA85)`:""}`,locale:"ko",fullScreen:m,mobilePresentation:m?"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:(0,et.jsx)(gn.Box,{sx:{...m?{}:{height:560},display:"flex",flexDirection:"column",border:"1px solid #cccccc",borderRadius:1,...m?{}:{overflow:"hidden"},userSelect:"none"},children:(0,et.jsx)(jh,{groups:n,allEmployees:p,initialSelectedSeqs:_,multiple:r,isMobile:m,onSelectionChange:g},x)})}],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?(0,et.jsx)(gn.Typography,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.35},children:t}):void 0,right:(0,et.jsx)(gn.Button,{variant:"contained",onClick:w,children:l})}})}var Qr=require("react"),Jt=require("@mui/material"),hg=require("@ehfuse/mui-form-dialog"),kg=require("@ehfuse/mui-form-controls");var Zt=require("@mui/material"),Tt=require("react/jsx-runtime");function Xh(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 Vs({sprints:e,tasks:o,height:t=160}){let r=[...e].sort((d,g)=>`${d.start_date}|${d.seq}`.localeCompare(`${g.start_date}|${g.seq}`)).map(d=>({sprint:d,...Xh(d,o)})),i=r.some(d=>d.points>0),l=r.map(d=>i?d.points:d.count),s=Math.max(1,...l),f=r.filter(d=>d.sprint.status==="closed").map(d=>i?d.points:d.count),m=f.length>0?Math.round(f.reduce((d,g)=>d+g,0)/f.length*10)/10:null;return r.length===0?(0,Tt.jsx)(Zt.Box,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uD45C\uC2DC\uD560 \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):(0,Tt.jsxs)(Zt.Box,{children:[(0,Tt.jsxs)(Zt.Box,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[(0,Tt.jsxs)("span",{children:["\uC644\uB8CC ",i?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uBAA9\uD45C\uBCC4"]}),m!==null?(0,Tt.jsxs)("span",{children:["\uD3C9\uADE0(\uC885\uB8CC \uBAA9\uD45C)"," ",(0,Tt.jsx)(Zt.Box,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:m}),i?"SP":"\uAC74"]}):null]}),(0,Tt.jsx)(Zt.Box,{sx:{display:"flex",alignItems:"flex-end",gap:2,height:t,px:.5},children:r.map(d=>{let g=i?d.points:d.count,x=Math.round((t-24)*g/s),u=d.sprint.status==="closed";return(0,Tt.jsxs)(Zt.Box,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-end",height:"100%"},children:[(0,Tt.jsx)(Zt.Box,{sx:{fontSize:14,fontWeight:700,color:"#37352f",lineHeight:1.5},children:g}),(0,Tt.jsx)(Zt.Box,{sx:{width:"60%",maxWidth:56,height:Math.max(2,x),borderRadius:"4px 4px 0 0",bgcolor:u?"#2f80ed":"#a9c9f5"}})]},d.sprint.seq)})}),(0,Tt.jsx)(Zt.Box,{sx:{display:"flex",gap:2,px:.5,mt:.5},children:r.map(d=>(0,Tt.jsxs)(Zt.Box,{sx:{flex:1,minWidth:0,textAlign:"center",fontSize:13.5,color:"#000",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[d.sprint.name,d.sprint.status!=="closed"?" (\uC9C4\uD589\uC911)":""]},d.sprint.seq))})]})}var bg=require("react"),Zn=require("@mui/material"),zo=require("react/jsx-runtime");function gg(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?new Date(`${e}T00:00:00`):null}function Qh(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function Us(e){return e.slice(5).replace("-",".")}function Ks({sprint:e,tasks:o,todayStr:t,height:n=200}){let r=(0,bg.useMemo)(()=>{let T=gg(e.start_date),b=gg(e.end_date);if(!T||!b||b<T||Math.round((b.getTime()-T.getTime())/864e5)+1>366)return null;let C=o.filter(h=>h.sprint_seq===e.seq&&!h.archived);if(C.length===0)return{empty:!0};let q=C.some(h=>(h.story_points??0)>0),B=h=>q?h.story_points??0:1,R=C.reduce((h,c)=>h+B(c),0),P=new Map;for(let h of C){if(!h.completed)continue;let c=(h.completed_time??"").slice(0,10),S=/^\d{4}-\d{2}-\d{2}$/.test(c)?c:e.start_date;P.set(S,(P.get(S)??0)+B(h))}let z=[];for(let h=new Date(T);h<=b;h.setDate(h.getDate()+1))z.push(Qh(h));let D=R,ee=[];for(let h of z){if(h>t)break;D-=P.get(h)??0,ee.push({day:h,value:Math.max(0,D)})}return{empty:!1,days:z,total:R,usePoints:q,actual:ee}},[e,o,t]);if(!r)return(0,zo.jsx)(Zn.Box,{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(0,zo.jsx)(Zn.Box,{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:l,usePoints:s,actual:f}=r,m=600,d=200,g=8,x=T=>i.length===1?0:T/(i.length-1)*m,u=T=>g+(d-g*2)*(1-T/Math.max(1,l)),p=`${x(0)},${u(l)} ${x(i.length-1)},${u(0)}`,_=f.map(T=>`${x(i.indexOf(T.day))},${u(T.value)}`).join(" "),w=f[f.length-1];return(0,zo.jsxs)(Zn.Box,{children:[(0,zo.jsxs)(Zn.Box,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[(0,zo.jsxs)("span",{children:["\uB0A8\uC740 ",s?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uCD1D ",l]}),w?(0,zo.jsxs)("span",{children:["\uD604\uC7AC"," ",(0,zo.jsx)(Zn.Box,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:w.value}),s?"SP":"\uAC74"," \uB0A8\uC74C"]}):null]}),(0,zo.jsx)(Zn.Box,{sx:{border:"1px solid #e6e6e3",borderRadius:1,bgcolor:"#fafaf9",px:1,py:.5},children:(0,zo.jsxs)("svg",{viewBox:`0 0 ${m} ${d}`,preserveAspectRatio:"none",style:{display:"block",width:"100%",height:n},children:[(0,zo.jsx)("line",{x1:0,y1:u(0),x2:m,y2:u(0),stroke:"#e6e6e3",strokeWidth:1}),(0,zo.jsx)("polyline",{points:p,fill:"none",stroke:"#9a9a97",strokeWidth:1.5,strokeDasharray:"6 5",vectorEffect:"non-scaling-stroke"}),f.length>1?(0,zo.jsx)("polyline",{points:_,fill:"none",stroke:"#2f80ed",strokeWidth:2.5,vectorEffect:"non-scaling-stroke"}):null,w?(0,zo.jsx)("circle",{cx:x(i.indexOf(w.day)),cy:u(w.value),r:4,fill:"#2f80ed",vectorEffect:"non-scaling-stroke"}):null]})}),(0,zo.jsxs)(Zn.Box,{sx:{mt:.5,display:"flex",justifyContent:"space-between",fontSize:13.5,color:"#000"},children:[(0,zo.jsx)("span",{children:Us(e.start_date)}),t>e.start_date&&t<e.end_date?(0,zo.jsxs)("span",{children:["\uC624\uB298 ",Us(t)]}):null,(0,zo.jsx)("span",{children:Us(e.end_date)})]})]})}var yt=require("react/jsx-runtime");function Zh({open:e,sprints:o,tasks:t,todayStr:n,initialSprintSeq:r=0,onClose:i}){let[l,s]=(0,Qr.useState)(0);(0,Qr.useEffect)(()=>{if(!e)return;let d=o.find(x=>x.status==="active")??o[0],g=o.find(x=>x.seq===r)??d;s(g?.seq??0)},[e]);let f=(0,Qr.useMemo)(()=>o.find(d=>d.seq===l)??null,[o,l]),m=(0,yt.jsxs)(Jt.Box,{sx:{display:"flex",flexDirection:"column"},children:[(0,yt.jsxs)(Jt.Box,{sx:{px:3,py:2.5},children:[(0,yt.jsx)(Jt.Box,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBCA8\uB85C\uC2DC\uD2F0"}),(0,yt.jsx)(Vs,{sprints:o,tasks:t})]}),(0,yt.jsx)(Jt.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,yt.jsxs)(Jt.Box,{sx:{px:3,py:2.5},children:[(0,yt.jsx)(Jt.Box,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBC88\uB2E4\uC6B4"}),(0,yt.jsx)(kg.LabelSelect,{label:"\uBAA9\uD45C",showLabel:!1,value:l?String(l):"",options:o.map(d=>({value:String(d.seq),label:It(d)})),onChange:d=>s(Number(d.target.value)||0),sx:{width:280,mb:2}}),f?(0,yt.jsx)(Ks,{sprint:f,tasks:t,todayStr:n}):(0,yt.jsx)(Jt.Box,{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(0,yt.jsx)(hg.FormDialog,{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:m}],actions:{showCancelButton:!1,right:(0,yt.jsx)(Jt.Button,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}var bn=require("@mui/material");var On=require("react/jsx-runtime");function Jh({anchorEl:e,candidates:o,selectedNames:t,avatarSrcByName:n,onToggle:r,onClear:i,onClose:l}){return(0,On.jsxs)(bn.Menu,{anchorEl:e,open:!!e,onClose:l,transitionDuration:0,children:[o.length===0?(0,On.jsx)(bn.MenuItem,{disabled:!0,sx:{fontSize:14},children:"\uBAA9\uB85D\uC5D0 \uC9C0\uC815\uB41C \uC0AC\uB78C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):o.map(s=>{let f=t.includes(s.name);return(0,On.jsxs)(bn.MenuItem,{onClick:()=>r(s),sx:{fontSize:14,minWidth:170,gap:1},children:[(0,On.jsx)(bn.Checkbox,{size:"small",checked:f,sx:{p:0}}),(0,On.jsx)(rt,{names:[s.name],size:20,avatarSrcByName:n}),s.name]},`${s.accountSeq}-${s.name}`)}),(0,On.jsx)(bn.Divider,{}),(0,On.jsx)(bn.MenuItem,{disabled:t.length===0,onClick:i,sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}var Tg=require("react"),Zr=require("@mui/material"),yg=a(require("@mui/icons-material/KeyboardArrowDown"),1),Sg=a(require("@mui/icons-material/Check"),1);var hn=require("react/jsx-runtime");function ek({value:e,onChange:o,options:t}){let[n,r]=(0,Tg.useState)(null),i=t??ta,l=ta.find(s=>s.value===e)?.label??"";return(0,hn.jsxs)(hn.Fragment,{children:[(0,hn.jsxs)(Zr.ButtonBase,{onClick:s=>r(s.currentTarget),sx:{display:"flex",alignItems:"center",gap:.5,px:1,py:.5,borderRadius:1,fontSize:13.5,color:"#37352f","&:hover":{bgcolor:"#f2f2f0"}},children:[l,(0,hn.jsx)(yg.default,{sx:{fontSize:17,color:"#9a9a97"}})]}),(0,hn.jsx)(Zr.Menu,{transitionDuration:0,anchorEl:n,open:!!n,onClose:()=>r(null),children:i.map(s=>(0,hn.jsxs)(Zr.MenuItem,{selected:s.value===e,onClick:()=>{o(s.value),r(null)},sx:{fontSize:14,minWidth:140,justifyContent:"space-between",gap:1},children:[s.label,s.value===e?(0,hn.jsx)(Sg.default,{sx:{fontSize:16,color:"#2f80ed"}}):null]},s.value))})]})}var kn=require("@mui/material"),Cg=a(require("@mui/icons-material/Check"),1),vg=a(require("@ehfuse/overlay-scrollbar"),1);var en=require("react/jsx-runtime"),Bg=["#1e3a8a","#2f80ed","#06b6d4","#0fa3a3","#2f9e5b","#84cc16","#e8a33d","#d9730d","#e5484d","#e255a1","#a355c0","#8a5a2b","#57564f","#111827"];function ok({anchorEl:e,value:o,color:t="",onSelect:n,onSelectColor:r,onClose:i}){return(0,en.jsx)(kn.Popover,{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:(0,en.jsxs)(kn.Box,{sx:{width:"min(492px, calc(100vw - 32px))"},children:[(0,en.jsx)(vg.default,{style:{maxHeight:"min(432px, calc(100dvh - 240px))"},contentStyle:{minWidth:0,padding:10},thumb:{width:6},children:(0,en.jsx)(pi,{value:o||Ao,onChange:l=>{n(l),i()}})}),r?(0,en.jsxs)(kn.Box,{sx:{px:1.25,pb:1.25},children:[(0,en.jsx)(kn.Divider,{sx:{mb:1,borderColor:"#efefed"}}),(0,en.jsx)(kn.Box,{sx:{display:"flex",flexWrap:"wrap",gap:.75},children:Bg.map(l=>{let s=(t||Bg[0])===l;return(0,en.jsx)(kn.ButtonBase,{"aria-label":`\uC544\uC774\uCF58 \uC0C9 ${l}`,onClick:()=>r(l),sx:{width:26,height:26,borderRadius:"50%",bgcolor:l,display:"flex",alignItems:"center",justifyContent:"center"},children:s?(0,en.jsx)(Cg.default,{sx:{fontSize:15,color:"#ffffff"}}):null},l)})})]}):null]})})}var kr=require("@mui/material"),Gs=require("@ehfuse/mui-form-controls");function Jn(e){let o=t=>String(t).padStart(2,"0");return`${e.getFullYear()}-${o(e.getMonth()+1)}-${o(e.getDate())}`}function Li(e,o=new Date){let t=new Date(o);return t.setMonth(t.getMonth()-e),t}function tk(e=new Date){return{fromDate:Jn(Li(1,e)),toDate:Jn(e)}}var Rn=require("react/jsx-runtime"),nk=[{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 js({fromDate:e,toDate:o,onChange:t}){let n=i=>{if(i<=0){t("","");return}t(Jn(Li(i)),Jn(new Date))},r=i=>i<=0?!e&&!o:!e||!o?!1:e===Jn(Li(i))&&o===Jn(new Date);return(0,Rn.jsxs)(kr.Box,{sx:{display:"flex",alignItems:"center",gap:1.5,flexWrap:"wrap"},children:[(0,Rn.jsx)(kr.Box,{sx:{display:"flex",alignItems:"center",gap:1.5},children:nk.map(i=>{let l=r(i.months);return(0,Rn.jsx)(kr.ButtonBase,{onClick:()=>n(i.months),sx:{px:1.25,py:.85,borderRadius:1,fontSize:13,fontWeight:l?500:400,border:"1px solid",borderColor:l?"#2f80ed":"#dedddb",color:l?"#2f80ed":"#37352f",bgcolor:l?"#eef6ff":"transparent","&:hover":{bgcolor:l?"#eef6ff":"#f7f7f5"}},children:i.label},i.label)})}),(0,Rn.jsxs)(kr.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[(0,Rn.jsx)(Gs.DateTextField,{value:e,size:"small",placeholder:"\uC2DC\uC791\uC77C",onChange:i=>t(i.target.value,o),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}}),(0,Rn.jsx)(kr.Box,{component:"span",sx:{fontSize:13,color:"#9a9a97"},children:"~"}),(0,Rn.jsx)(Gs.DateTextField,{value:o,size:"small",placeholder:"\uC885\uB8CC\uC77C",onChange:i=>t(e,i.target.value),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}})]})]})}var Ig=require("@mui/material");var Ys=require("react/jsx-runtime");function rk({anchorEl:e,fromDate:o,toDate:t,onChange:n,onClose:r}){return(0,Ys.jsx)(Ig.Popover,{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:(0,Ys.jsx)(js,{fromDate:o,toDate:t,onChange:n})})}var er=require("@mui/material"),wg=a(require("@mui/icons-material/Checklist"),1),Dg=a(require("@mui/icons-material/Face"),1),Eg=a(require("@mui/icons-material/Publish"),1),Mg=a(require("@mui/icons-material/NotificationsOutlined"),1),Og=a(require("@mui/icons-material/BugReportOutlined"),1),Rg=a(require("@mui/icons-material/DescriptionOutlined"),1),Pg=a(require("@mui/icons-material/Inventory2Outlined"),1);var Wt=require("react/jsx-runtime");function _g(e,o){return o>0?`${e} (${o})`:e}var ik=[{id:"my",label:"\uC804\uCCB4",icon:(0,Wt.jsx)(wg.default,{sx:{fontSize:18}})},{id:"notice",label:"\uACF5\uC9C0\uC0AC\uD56D",icon:(0,Wt.jsx)(Mg.default,{sx:{fontSize:18}})},{id:"mine",label:"\uB0B4 \uC5C5\uBB34",icon:(0,Wt.jsx)(Dg.default,{sx:{fontSize:18}})},{id:"sent",label:"\uBCF4\uB0B8 \uC5C5\uBB34",icon:(0,Wt.jsx)(Eg.default,{sx:{fontSize:18}})},{id:"bug",label:"\uC624\uB958",icon:(0,Wt.jsx)(Og.default,{sx:{fontSize:18}})},{id:"archive",label:"\uBCF4\uAD00\uD568",icon:(0,Wt.jsx)(Pg.default,{sx:{fontSize:18}}),hideCount:!0},{id:"report",label:"\uBCF4\uACE0\uC11C",icon:(0,Wt.jsx)(Rg.default,{sx:{fontSize:18}}),hideCount:!0}];function ak(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 lk({items:e,activeTab:o,counts:t,onChange:n,compact:r=!1}){let i=ue(),l=ak(i.tabs),s=e;return r?(0,Wt.jsx)(er.Box,{sx:{display:"flex",flexWrap:"wrap",gap:1.25},children:s.map(f=>{let m=o===f.id;return(0,Wt.jsx)(er.ButtonBase,{onClick:()=>n(f.id),sx:{px:1.5,py:.75,borderRadius:1,fontSize:ct(13.5),fontWeight:500,whiteSpace:"nowrap",border:"1px solid",bgcolor:m?i.tabs.selectedBg:i.tabs.bg,color:m?i.tabs.selectedColor:i.tabs.color,borderColor:m?i.tabs.selectedBg:i.tabs.borderColor},children:_g(f.label,f.hideCount?0:t[f.id]??0)},f.id)})}):(0,Wt.jsx)(er.Tabs,{value:o,onChange:(f,m)=>n(m),sx:{minHeight:46,"& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:"12px",minHeight:46}},children:s.map(f=>(0,Wt.jsx)(er.Tab,{value:f.id,label:_g(f.label,f.hideCount?0:t[f.id]??0),icon:f.icon,iconPosition:"start",sx:l},f.id))})}var or=require("react"),he=require("@mui/material"),zg=a(require("@mui/icons-material/OpenInNewOutlined"),1),qg=a(require("@mui/icons-material/Check"),1),Ag=a(require("@mui/icons-material/CheckCircleOutlined"),1),Lg=a(require("@mui/icons-material/RadioButtonUnchecked"),1),Ng=a(require("@mui/icons-material/SendOutlined"),1),Fg=a(require("@mui/icons-material/EventOutlined"),1),Hg=a(require("@mui/icons-material/PersonOutlineOutlined"),1),Wg=a(require("@mui/icons-material/ViewKanbanOutlined"),1),$g=a(require("@mui/icons-material/ContentCopyOutlined"),1),Vg=a(require("@mui/icons-material/NextPlanOutlined"),1),Ug=a(require("@mui/icons-material/ContentPasteOutlined"),1),Kg=a(require("@mui/icons-material/ShareOutlined"),1),Gg=a(require("@mui/icons-material/DirectionsRunOutlined"),1),Xs=a(require("@mui/icons-material/ChevronRight"),1),jg=a(require("@mui/icons-material/ArchiveOutlined"),1),Yg=a(require("@mui/icons-material/UnarchiveOutlined"),1),Xg=require("@ehfuse/alerts");var te=require("react/jsx-runtime");function sk({target:e,onClose:o,customTabs:t,sprints:n=[],myAccountSeq:r=0,onOpenDetail:i,onToggleCompleted:l,onRequestConfirm:s,onChangeDueDate:f,onChangeReminder:m,onMemberEdit:d,onMoveProject:g,onDuplicate:x,onCreateFollowUp:u,onShare:p,onAssignSprint:_,onArchiveToggle:w,onDelete:T}){let b=je(),M=an(),[C,q]=(0,or.useState)(null),[B,R]=(0,or.useState)(null),[P,z]=(0,or.useState)(null);(0,or.useEffect)(()=>{e||(q(null),R(null),z(null))},[e]);let D=e?.task??null,ee=!!D?.is_notice,h=!!D?.is_event,c=D?!ln(D,r):!1,S=(0,or.useMemo)(()=>new Set(t.filter(E=>E.useSprints).map(E=>E.key)),[t]),k=async(E="one")=>{let Y=D;if(o(),!Y)return;await(0,Xg.ConfirmDialog)({title:"\uC5C5\uBB34 \uC0AD\uC81C",message:E==="series"?`"${Y.title}" \uC758 \uC774 \uD68C\uCC28\uC640 \uC774\uD6C4 \uBC18\uBCF5 \uD68C\uCC28\uB97C \uBAA8\uB450 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`:`"${Y.title}" \uC5C5\uBB34\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&T(Y.seq,E)},y=()=>{D&&w(D.seq,!D.archived),o()};return(0,te.jsxs)(te.Fragment,{children:[(0,te.jsxs)(he.Menu,{open:!!e,onClose:o,transitionDuration:0,anchorReference:b?"none":"anchorPosition",anchorPosition:!b&&e?{top:e.position.top,left:e.position.left}:void 0,slotProps:{paper:{sx:{minWidth:190,...b?{position:"fixed",top:"50%",left:"50%",translate:"-50% -50%",maxHeight:"70vh"}:{}}},list:b?{sx:{"& .MuiMenuItem-root":{py:1,minHeight:0}}}:void 0},children:[(0,te.jsxs)(he.MenuItem,{onClick:()=>{D&&i(D),o()},sx:{fontSize:14},children:[(0,te.jsx)(he.ListItemIcon,{children:(0,te.jsx)(zg.default,{sx:{fontSize:19}})}),"\uC0C1\uC138 \uC5F4\uAE30"]}),(0,te.jsxs)(he.MenuItem,{disabled:ee?(D?.author_account_seq??0)!==r:(D?.author_account_seq??0)!==r&&(D?.manager_account_seq??0)!==r,onClick:()=>{D&&l(D.seq,!D.completed),o()},sx:{fontSize:14},children:[(0,te.jsx)(he.ListItemIcon,{children:D?.completed?(0,te.jsx)(Lg.default,{sx:{fontSize:19}}):(0,te.jsx)(Ag.default,{sx:{fontSize:19}})}),D?.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC"]}),!ee&&s?(0,te.jsxs)(he.MenuItem,{disabled:!(D?.manager_account_seq??0)&&(D?.receiver_account_seqs??[]).length===0,onClick:()=>{D&&s(D),o()},sx:{fontSize:14},children:[(0,te.jsx)(he.ListItemIcon,{children:(0,te.jsx)(Ng.default,{sx:{fontSize:19}})}),"\uD655\uC778 \uC694\uCCAD"]}):null,h?null:(0,te.jsx)(he.Divider,{}),h?null:(0,te.jsxs)(he.MenuItem,{disabled:c,onClick:E=>{D&&q({anchorEl:E.currentTarget,task:D})},sx:{fontSize:14},children:[(0,te.jsx)(he.ListItemIcon,{children:(0,te.jsx)(Fg.default,{sx:{fontSize:19}})}),"\uB9C8\uAC10\uAE30\uD55C \uBCC0\uACBD"]}),!ee&&!h&&d?(0,te.jsxs)(he.MenuItem,{onClick:()=>{D&&d(D,"manager"),o()},sx:{fontSize:14},children:[(0,te.jsx)(he.ListItemIcon,{children:(0,te.jsx)(Hg.default,{sx:{fontSize:19}})}),"\uCC45\uC784\uC790 \uBCC0\uACBD"]}):null,h?null:(0,te.jsxs)(he.MenuItem,{disabled:c,onClick:E=>{D&&R({anchorEl:E.currentTarget,task:D})},sx:{fontSize:14},children:[(0,te.jsx)(he.ListItemIcon,{children:(0,te.jsx)(Wg.default,{sx:{fontSize:19}})}),"\uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9",(0,te.jsx)(Xs.default,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}),(0,te.jsx)(he.Divider,{}),x?(0,te.jsxs)(he.MenuItem,{disabled:c,onClick:()=>{D&&x(D.seq),o()},sx:{fontSize:14},children:[(0,te.jsx)(he.ListItemIcon,{children:(0,te.jsx)($g.default,{sx:{fontSize:19}})}),"\uBCF5\uC81C"]}):null,u&&D&&!D.is_event&&!D.is_notice?(0,te.jsxs)(he.MenuItem,{onClick:()=>{D&&u(D.seq),o()},sx:{fontSize:14},children:[(0,te.jsx)(he.ListItemIcon,{children:(0,te.jsx)(Vg.default,{sx:{fontSize:19}})}),"\uD6C4\uC18D \uC5C5\uBB34 \uB9CC\uB4E4\uAE30"]}):null,(0,te.jsxs)(he.MenuItem,{onClick:()=>{D&&(p?p(D):hr(D,b)),o()},sx:{fontSize:14},children:[(0,te.jsx)(he.ListItemIcon,{children:b?(0,te.jsx)(Kg.default,{sx:{fontSize:19}}):(0,te.jsx)(Ug.default,{sx:{fontSize:19}})}),b?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC"]}),D&&!D.is_notice&&!D.is_event&&S.has(String(D.tab_key??""))&&_?(0,te.jsxs)(he.MenuItem,{onClick:E=>z(E.currentTarget),sx:{fontSize:14},children:[(0,te.jsx)(he.ListItemIcon,{children:(0,te.jsx)(Gg.default,{sx:{fontSize:19}})}),"\uBAA9\uD45C\uC5D0 \uB123\uAE30",(0,te.jsx)(Xs.default,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}):null,(0,te.jsxs)(he.MenuItem,{onClick:y,disabled:c||!D?.archived&&!(D&&ti(D)),sx:{fontSize:14},children:[(0,te.jsx)(he.ListItemIcon,{children:D?.archived?(0,te.jsx)(Yg.default,{sx:{fontSize:19}}):(0,te.jsx)(jg.default,{sx:{fontSize:19}})}),D?.archived?"\uBCF4\uAD00 \uD574\uC81C":"\uBCF4\uAD00"]}),(0,te.jsx)(he.Divider,{}),(0,te.jsxs)(he.MenuItem,{disabled:c,onClick:()=>{k("one")},sx:{fontSize:14,color:"#e5484d"},children:[(0,te.jsx)(he.ListItemIcon,{children:(0,te.jsx)(sn,{sx:{fontSize:19,color:"#e5484d"}})}),(D?.repeat_group_key??0)>0?"\uC0AD\uC81C (\uC774 \uD68C\uCC28\uB9CC)":"\uC0AD\uC81C"]}),(D?.repeat_group_key??0)>0?(0,te.jsxs)(he.MenuItem,{disabled:c,onClick:()=>{k("series")},sx:{fontSize:14,color:"#e5484d"},children:[(0,te.jsx)(he.ListItemIcon,{children:(0,te.jsx)(sn,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC0AD\uC81C (\uC774\uD6C4 \uBC18\uBCF5 \uC804\uCCB4)"]}):null]}),(0,te.jsx)(jt,{anchorEl:C?.anchorEl??null,open:!!C,date:C?.task.due_date??"",reminder:C?.task.reminder??"none",hideReminder:!!C?.task.completed,centered:b,onClose:()=>{q(null),o()},onDateChange:E=>{C&&f(C.task.seq,E)},onReminderChange:E=>{C&&m?.(C.task.seq,E)}}),(0,te.jsxs)(he.Menu,{transitionDuration:0,anchorEl:B?.anchorEl??null,open:!!B,onClose:()=>{R(null),o()},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...M,children:[(0,te.jsx)(he.MenuItem,{selected:!B?.task.tab_key,onClick:()=>{B&&g(B.task.seq,""),R(null),o()},sx:{fontSize:14,minWidth:170},children:"\uC5C6\uC74C"}),t.filter(E=>!E.archived).map(E=>(0,te.jsx)(he.MenuItem,{selected:B?.task.tab_key===E.key,onClick:()=>{B&&g(B.task.seq,E.key),R(null),o()},sx:{fontSize:14,minWidth:170},children:E.label},E.key))]}),(0,te.jsx)(he.Menu,{transitionDuration:0,anchorEl:P,open:!!P,onClose:()=>z(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...n.filter(E=>`custom-${E.group_seq}`===String(D?.tab_key??"")).map(E=>({seq:E.seq,label:It(E)}))].map(E=>(0,te.jsxs)(he.MenuItem,{onClick:()=>{D&&_?.(D.seq,E.seq),z(null),o()},sx:{fontSize:14,minWidth:160,gap:1},children:[E.label,(D?.sprint_seq??0)===E.seq?(0,te.jsx)(qg.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},E.seq))})]})}var Pn=require("@mui/material");var tr=require("react/jsx-runtime");function ck({anchorEl:e,labelOptions:o,selectedKeys:t,onToggle:n,onClear:r,onClose:i}){return(0,tr.jsxs)(Pn.Menu,{transitionDuration:0,anchorEl:e,open:!!e,onClose:i,children:[o.map(l=>{let s=t.includes(l.key);return(0,tr.jsxs)(Pn.MenuItem,{onClick:()=>n(l.key),sx:{fontSize:14,minWidth:190,gap:1},children:[(0,tr.jsx)(Pn.Checkbox,{size:"small",checked:s,sx:{p:0}}),(0,tr.jsx)(Ge,{option:l})]},l.key)}),(0,tr.jsx)(Pn.Divider,{}),(0,tr.jsx)(Pn.MenuItem,{disabled:t.length===0,onClick:()=>{r(),i()},sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}var zn=require("@mui/material"),Qg=a(require("@mui/icons-material/Check"),1),Zg=a(require("@mui/icons-material/BarChartOutlined"),1),Jg=a(require("@mui/icons-material/SettingsOutlined"),1);var on=require("react/jsx-runtime");function mk(e){let{anchorEl:o,sprints:t,value:n,onSelect:r,onManage:i,onCharts:l,onClose:s}=e;return(0,on.jsxs)(zn.Menu,{transitionDuration:0,anchorEl:o,open:!!o,onClose:s,children:[[{seq:0,label:"\uC804\uCCB4"},{seq:-1,label:"\uBBF8\uBC30\uC815 \uC5C5\uBB34"},...t.map(f=>({seq:f.seq,label:It(f)}))].map(f=>(0,on.jsxs)(zn.MenuItem,{onClick:()=>{r(f.seq),s()},sx:{fontSize:14,minWidth:180,gap:1},children:[f.label,n===f.seq?(0,on.jsx)(Qg.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},f.seq)),(0,on.jsx)(zn.Divider,{}),l?(0,on.jsxs)(zn.MenuItem,{onClick:()=>{s(),l()},sx:{fontSize:14,gap:1},children:[(0,on.jsx)(Zg.default,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uCC28\uD2B8"]}):null,l?(0,on.jsx)(zn.Divider,{}):null,(0,on.jsxs)(zn.MenuItem,{onClick:()=>{s(),i()},sx:{fontSize:14,gap:1},children:[(0,on.jsx)(Jg.default,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uAD00\uB9AC\u2026"]})]})}var uk={my:"tasks",mine:"tasks",sent:"tasks",notice:"notice",bug:"bug",archive:"archive",done:"done",report:"report"};function ob(e){return uk[e]??"tasks"}var dk={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"},eb=["list","calendar","month","card","kanban","sprint","timeline"],pk=["list","card"];function fk(e){let o=ob(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:eb,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:pk,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:eb,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"}:{}}}}
|
|
13
|
+
`)}function kx(e){navigator.clipboard.writeText(e).then(()=>(0,Ha.SuccessAlert)("\uC5C5\uBB34 \uB0B4\uC6A9\uC744 \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>(0,Ha.InfoAlert)("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uB0B4\uC6A9\uC744 \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD574 \uC8FC\uC138\uC694."))}function hr(e,o){let t=Tx(e);if(o&&typeof navigator.share=="function"){navigator.share({text:t}).catch(n=>{n?.name!=="AbortError"&&kx(t)});return}kx(t)}var He=require("react/jsx-runtime");function ws({task:e,myAccountSeq:o=0,onToggleCompleted:t,onChangeTitle:n,onChangeIcon:r,onChangeIconColor:i,onClose:l,appBarMode:s=!1,activityItems:f,activityLoading:m,onLoadActivity:d,onPrint:g}){let x=je(),[u,p]=(0,Wa.useState)(!1),[_,w]=(0,Wa.useState)(null),[T,b]=(0,Wa.useState)(null),M=e.is_notice?we(e.icon||Go):null,C=!!e.is_notice,q=!!e.is_event,B=C&&o>0&&(e.author_account_seq??0)===o,R=!ln(e,o),P=!q&&(C?B:(e.author_account_seq??0)===o||(e.manager_account_seq??0)===o);return(0,He.jsxs)(He.Fragment,{children:[(0,He.jsxs)(Lo.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[s&&l?(0,He.jsx)(Lo.IconButton,{"aria-label":"\uB4A4\uB85C",onClick:l,sx:{color:"#37352f",ml:-1},children:(0,He.jsx)(Sx.default,{})}):null,P&&!s?(0,He.jsx)(Lo.Tooltip,{title:e.completed&&e.completed_by?`${e.completed_by} \xB7 ${Pt(e.completed_time)} \uC644\uB8CC`:"",arrow:!0,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:(0,He.jsx)(Lo.Box,{sx:{display:"flex",flexShrink:0,mr:1.5},children:(0,He.jsx)(Gt,{onClick:z=>b({anchorEl:z.currentTarget,nextCompleted:!e.completed}),children:e.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC"})})}):null,s||!M?null:(0,He.jsx)(Lo.Box,{sx:{display:"flex",px:.5,color:e.icon_color||(C?"#e5484d":"#1e3a8a")},children:(0,He.jsx)(M,{sx:{fontSize:20}})}),_!==null?(0,He.jsx)(Lo.Box,{component:"input",autoFocus:!0,spellCheck:!1,value:_,onChange:z=>w(z.target.value),onBlur:()=>{_.trim()&&_.trim()!==e.title&&n(e.seq,_.trim()),w(null)},onKeyDown:z=>{z.key==="Enter"&&z.target.blur(),z.key==="Escape"&&w(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:18,fontWeight:500,color:"#37352f",p:0,m:0}}):s?(0,He.jsx)(Lo.Box,{sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:C?"\uACF5\uC9C0":q?"\uC77C\uC815":e.is_bug?"\uC624\uB958":"\uC5C5\uBB34"}):(0,He.jsx)(Lo.Box,{onClick:R?void 0:()=>w(e.title),sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:R?"default":"text",textDecoration:e.completed?"line-through":"none"},children:e.title}),d?(0,He.jsx)(Lo.Tooltip,{title:"\uD65C\uB3D9",arrow:!0,children:(0,He.jsx)(Lo.IconButton,{"aria-label":"\uD65C\uB3D9",onClick:()=>p(!0),sx:{color:"#6b7280"},children:(0,He.jsx)(vx.default,{sx:{fontSize:20}})})}):null,(0,He.jsx)(Lo.Tooltip,{title:x?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:(0,He.jsx)(Lo.IconButton,{"aria-label":x?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>hr(e,x),sx:{color:"#6b7280"},children:x?(0,He.jsx)(Bx.default,{sx:{fontSize:20}}):(0,He.jsx)(Cx.default,{sx:{fontSize:20}})})}),g?(0,He.jsx)(Lo.Tooltip,{title:"\uC778\uC1C4",arrow:!0,children:(0,He.jsx)(Lo.IconButton,{"aria-label":"\uC778\uC1C4",onClick:()=>g(e),sx:{color:"#6b7280"},children:(0,He.jsx)(Ix.default,{sx:{fontSize:20}})})}):null,l&&!s?(0,He.jsx)(Lo.IconButton,{"aria-label":"\uB2EB\uAE30",onClick:l,sx:{color:"#6b7280"},children:(0,He.jsx)(yx.default,{})}):null]}),(0,He.jsx)(Ye,{open:!!T,anchorEl:T?.anchorEl??null,title:T?.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:T?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>b(null),onConfirm:()=>{T&&t(e.seq,T.nextCompleted),b(null)}}),(0,He.jsx)(qi,{open:u,taskSeq:e.seq,items:f,loading:m,onLoad:d,onClose:()=>p(!1)})]})}var Ft=require("react"),le=require("@mui/material"),zx=a(require("@mui/icons-material/ExpandLess"),1),qx=a(require("@mui/icons-material/ExpandMore"),1),Ax=a(require("@mui/icons-material/ConfirmationNumberOutlined"),1),Rs=a(require("@mui/icons-material/Check"),1),Lx=a(require("@mui/icons-material/DirectionsRunOutlined"),1),Nx=a(require("@mui/icons-material/SpeedOutlined"),1),Ua=a(require("@mui/icons-material/CheckCircle"),1),Fx=a(require("@mui/icons-material/CheckCircleOutlineOutlined"),1),Ka=a(require("@mui/icons-material/CheckCircleOutlined"),1),Ps=a(require("@mui/icons-material/AccessTimeOutlined"),1),Hx=a(require("@mui/icons-material/AutorenewOutlined"),1),Wx=a(require("@mui/icons-material/LabelOutlined"),1),$x=a(require("@mui/icons-material/PersonOutlineOutlined"),1),Vx=a(require("@mui/icons-material/SubjectOutlined"),1),Ux=a(require("@mui/icons-material/StickyNote2Outlined"),1),Kx=a(require("@mui/icons-material/PanToolAltOutlined"),1),zs=a(require("@mui/icons-material/LockOutlined"),1),qs=a(require("@mui/icons-material/PublicOutlined"),1),As=a(require("@mui/icons-material/Group"),1),Gx=a(require("@mui/icons-material/Repeat"),1),jx=a(require("@mui/icons-material/EventOutlined"),1);var Ai=require("@ehfuse/alerts"),Yx=require("@ehfuse/mui-datetime-picker");var _x=require("react"),wx=require("@ehfuse/mui-form-controls"),Dx=require("react/jsx-runtime");function Ds({value:e,onCommit:o,onDraftChange:t,readOnly:n=!1}){let[r,i]=(0,_x.useState)(null);return(0,Dx.jsx)(wx.TextField,{value:r??e,placeholder:n?"":"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",slotProps:{input:{readOnly:n}},onChange:l=>{i(l.target.value),t?.(l.target.value)},onBlur:()=>{r!==null&&r.trim()!==e&&o(r),i(null)},onKeyDown:l=>{l.key==="Enter"&&l.target.blur(),l.key==="Escape"&&i(null)},sx:{mt:1}})}var Xn=require("react"),_o=require("@mui/material"),Mx=a(require("@mui/icons-material/AccountTreeOutlined"),1),Ox=a(require("@mui/icons-material/Add"),1),Rx=a(require("@mui/icons-material/Close"),1),Px=a(require("@mui/icons-material/NextPlanOutlined"),1);function Yn(e){return e.relations??[]}function qh(e,o,t){return Yn(e).some(n=>n.type===t&&n.task_seq===o.seq)||Yn(o).some(n=>n.type===t&&n.task_seq===e.seq)}function Ex(e){return`${e.created_time??""}|${String(e.seq).padStart(12,"0")}`}function $a(e,o){let t=new Map(o.map(u=>[u.seq,u]));t.set(e.seq,e);let n=new Map,r=(u,p)=>{n.has(u)||n.set(u,new Set),n.has(p)||n.set(p,new Set),n.get(u).add(p),n.get(p).add(u)};for(let u of t.values())for(let p of Yn(u))p.type==="follow_up"&&t.has(p.task_seq)&&r(u.seq,p.task_seq);let i=new Set([e.seq]),l=[e.seq];for(;l.length>0;){let u=l.shift();for(let p of n.get(u)??[])i.has(p)||(i.add(p),l.push(p))}let s=[...i].map(u=>t.get(u)).filter(u=>!!u).sort((u,p)=>Ex(u).localeCompare(Ex(p))),f=new Set;for(let u of Yn(e))u.type==="related"&&f.add(u.task_seq);for(let u of t.values())u.seq!==e.seq&&Yn(u).some(p=>p.type==="related"&&p.task_seq===e.seq)&&f.add(u.seq);let m=[...f].map(u=>t.get(u)).filter(u=>u!==void 0&&u.seq!==e.seq),d=[...t.values()].filter(u=>u.seq!==e.seq&&Yn(u).some(p=>p.type==="duplicate_of"&&p.task_seq===e.seq)),g=Yn(e).find(u=>u.type==="duplicate_of")?.task_seq,x=g?t.get(g)??null:null;return{lineage:s,related:m,duplicates:d,duplicateOf:x}}function Va(e,o){let t=$a(e,o);return(t.lineage.length>=2?t.lineage.length-1:0)+t.related.length+t.duplicates.length+(t.duplicateOf?1:0)}function Es(e,o){return Va(e,o)>0}var ye=require("react/jsx-runtime");function Ms({item:e,caption:o,onOpen:t,onUnlink:n}){let r=we(e.icon||Ao);return(0,ye.jsxs)(_o.Box,{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?(0,ye.jsx)(_o.Box,{component:"span",sx:{flexShrink:0,px:.6,py:.1,borderRadius:.75,fontSize:11.5,fontWeight:500,color:"#8a6d1d",bgcolor:"#faf1d7"},children:o}):null,r?(0,ye.jsx)(r,{sx:{fontSize:16,flexShrink:0,color:e.icon_color||"#1e3a8a"}}):null,(0,ye.jsxs)(_o.Box,{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]}),(0,ye.jsx)(Ge,{option:Wo(e),small:!0}),n?(0,ye.jsx)(_o.IconButton,{className:"taskbox-relation-unlink",size:"small","aria-label":"\uC5F0\uACB0 \uD574\uC81C",onClick:n,sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:(0,ye.jsx)(Rx.default,{sx:{fontSize:15}})}):null]})}function Os({task:e,tasks:o,readOnly:t=!1,onOpenTask:n,onLink:r,onUnlink:i,onCreateFollowUp:l}){let[s,f]=(0,Xn.useState)(!1),[m,d]=(0,Xn.useState)(null),[g,x]=(0,Xn.useState)(null),u=(0,Xn.useMemo)(()=>$a(e,o),[e,o]),p=u.lineage.length>=2,_=(0,Xn.useMemo)(()=>Va(e,o),[e,o]),w=(0,Xn.useMemo)(()=>{let b=new Set;for(let M of u.lineage)b.add(M.seq);for(let M of u.related)b.add(M.seq);for(let M of u.duplicates)b.add(M.seq);return u.duplicateOf&&b.add(u.duplicateOf.seq),[...b]},[u]),T=(b,M,C)=>{x({anchorEl:b,targetSeq:M,type:C})};return(0,ye.jsxs)(_t,{icon:(0,ye.jsx)(Mx.default,{sx:{fontSize:19,display:"block"}}),title:(0,ye.jsxs)(ye.Fragment,{children:["\uAD00\uB828 \uC5C5\uBB34",_>0?(0,ye.jsx)(_o.Box,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:_}):null]}),titleExtra:t?null:(0,ye.jsxs)(_o.Box,{sx:{ml:"auto",display:"flex",alignItems:"center",gap:.5},children:[l?(0,ye.jsx)(_o.Button,{size:"small",color:"inherit",startIcon:(0,ye.jsx)(Px.default,{sx:{fontSize:16}}),onClick:b=>d(b.currentTarget),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uD6C4\uC18D \uC5C5\uBB34"}):null,r?(0,ye.jsx)(_o.Button,{size:"small",color:"inherit",startIcon:(0,ye.jsx)(Ox.default,{sx:{fontSize:16}}),onClick:()=>f(!0),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uC5F0\uACB0"}):null]}),children:[(0,ye.jsxs)(_o.Box,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:[p?(0,ye.jsx)(_o.Box,{sx:{mb:u.related.length||u.duplicates.length||u.duplicateOf?1:0},children:u.lineage.map((b,M)=>{let C=b.seq===e.seq,q=M===u.lineage.length-1;return(0,ye.jsxs)(_o.Box,{sx:{display:"flex",gap:1},children:[(0,ye.jsxs)(_o.Box,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:14,flexShrink:0,pt:1.1},children:[(0,ye.jsx)(_o.Box,{sx:{width:C?9:7,height:C?9:7,borderRadius:"50%",bgcolor:C?"#2f80ed":b.completed?"#9a9a97":"#c9c8c5",flexShrink:0}}),q?null:(0,ye.jsx)(_o.Box,{sx:{width:"2px",flex:1,bgcolor:"#e6e6e3"}})]}),(0,ye.jsxs)(_o.Box,{sx:{flex:1,minWidth:0,pb:q?0:.5},children:[(0,ye.jsxs)(_o.Box,{sx:{display:"flex",alignItems:"center",gap:.75},children:[(0,ye.jsxs)(_o.Box,{component:"span",onClick:!C&&n?()=>n(b.seq):void 0,sx:{minWidth:0,fontSize:14,fontWeight:C?600:400,color:C?"#2f80ed":b.completed?"#9a9a97":"#37352f",textDecoration:b.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...!C&&n?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[b.ticket_no?`${b.ticket_no} `:"",b.title]}),(0,ye.jsx)(Ge,{option:Wo(b),small:!0})]}),(0,ye.jsx)(_o.Box,{sx:{fontSize:12,color:"#9a9a97"},children:b.completed&&b.completed_time?`${b.completed_time} \uC644\uB8CC`:b.created_time??""})]})]},b.seq)})}):null,u.duplicateOf?(0,ye.jsx)(Ms,{item:u.duplicateOf,caption:"\uC6D0\uBCF8",onOpen:n?()=>n(u.duplicateOf.seq):void 0,onUnlink:!t&&i?b=>T(b.currentTarget,u.duplicateOf.seq,"duplicate_of"):void 0}):null,u.duplicates.map(b=>(0,ye.jsx)(Ms,{item:b,caption:"\uC911\uBCF5",onOpen:n?()=>n(b.seq):void 0,onUnlink:!t&&i?M=>T(M.currentTarget,b.seq,"duplicate_of"):void 0},`dup-${b.seq}`)),u.related.map(b=>(0,ye.jsx)(Ms,{item:b,onOpen:n?()=>n(b.seq):void 0,onUnlink:!t&&i?M=>T(M.currentTarget,b.seq,"related"):void 0},`rel-${b.seq}`)),_===0?(0,ye.jsx)(_o.Box,{sx:{px:1.25,py:.75,fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]}),r?(0,ye.jsx)(Di,{open:s,task:e,tasks:o,excludeSeqs:w,onClose:()=>f(!1),onSubmit:(b,M)=>r(e.seq,b,M)}):null,(0,ye.jsx)(Ye,{open:!!m,anchorEl:m,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:()=>d(null),onConfirm:()=>{l?.(e.seq),d(null)}}),(0,ye.jsx)(Ye,{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:()=>x(null),onConfirm:()=>{g&&i?.(e.seq,g.targetSeq,g.type),x(null)}})]})}var v=require("react/jsx-runtime");function Qn({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return(0,v.jsx)(le.Box,{component:"span",sx:{color:"#9a9a97"},children:e})}function Ls({task:e,customTabs:o,statusOptions:t,avatarSrcByName:n,onChangeStatus:r,onChangeLabels:i,onAddLabelOption:l,onChangeProject:s,onAddProject:f,onChangeDate:m,onChangeReminder:d,onMemberEdit:g,onChangePriority:x,onChangeVisibility:u,onChangeRepeat:p,departments:_=[],onChangeEstimatedTime:w,onChangeEventTime:T,onChangeEventPlace:b,onChangeEventAddress:M,onChangeNote:C,onChangeNoteDraft:q,onChangeContent:B,onChangeContentHeight:R,onAddChecklistItem:P,onToggleChecklistItem:z,onRemoveChecklistItem:D,onUpdateChecklistItem:ee,onConvertChecklistToTask:h,onOpenChecklistTask:c,onLinkChecklistTask:S,resolveChecklistTask:k,relatedTasksPool:y,onOpenRelatedTask:E,onLinkRelatedTask:Y,onUnlinkRelatedTask:re,onCreateFollowUpTask:qe,onAddAttachments:Se,onRemoveAttachment:_e,onPreview:Be,onDownload:be,onUpdateComment:Re,onRemoveComment:eo,onToggleCommentReaction:co,currentUserName:G="",myAccountSeq:W=0,noticeAdmin:se=!1,hideProject:I=!1,hideLabel:H=!1,showTitle:ne=!1,onChangeTitle:j,onToggleCompleted:Qe,onChangeIcon:To,onChangeIconColor:yo,employees:mo=[],onAckConfirm:We,onRequestConfirm:So,onChangeBugField:oe,sprints:Ae=[],sprintProject:tn=!1,hideSprint:Z=!1,onChangeSprint:Uo,onChangeStoryPoints:Dt,onChangeResolution:Et,onClaimTask:A,onVerifyBug:Ce}){let[Ze,oo]=(0,Ft.useState)(null),[io,ot]=(0,Ft.useState)(null),[Tn,Ne]=(0,Ft.useState)(null),[F,K]=(0,Ft.useState)(!1),me={[Nt]:F?{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"}},[ke,fo]=(0,Ft.useState)(null),[uo,$e]=(0,Ft.useState)(null),[Fo,Ho]=(0,Ft.useState)(null),[Ko,qo]=(0,Ft.useState)(null),[nr,Ve]=(0,Ft.useState)(null),[$t,St]=(0,Ft.useState)(null),[qn,yn]=(0,Ft.useState)(null),Bo=!!e.is_notice,Do=!!e.is_event,Bt=!!e.is_bug,Ni=!!A&&si(e,W),Fi=!!A&&ci(e,W),Tr=!!Ce&&Bt&&!!e.completed&&W>0&&(e.author_account_seq??0)===W&&!(e.acks??[]).some(O=>O.account_seq===W),tt=!ln(e,W),rr=!e.is_event&&(e.is_notice?W>0&&(e.author_account_seq??0)===W:(e.author_account_seq??0)===W||(e.manager_account_seq??0)===W),ir=e.is_notice||e.is_event?we(e.icon||(e.is_notice?Go:Ut)):null,ar=Bo?!li(e,W):tt,An=Ni||Fi?(0,v.jsxs)(Gt,{onClick:O=>yn(O.currentTarget),children:[(0,v.jsx)(Kx.default,{sx:{fontSize:16,mr:.5}}),"\uAC00\uC838\uAC00\uAE30"]}):null,Ya=Bo?Pi(e,mo):"",Mt=Bo?bs(e,mo,W):null,st=!Bo&&!Do?gi(e,W):null,Xa=!!(st&&st.total>0||Bo&&Mt),Qa=!Bo;return(0,v.jsxs)(v.Fragment,{children:[ne?(0,v.jsxs)(le.Box,{sx:{px:2,pt:2,pb:.5,display:"flex",alignItems:"flex-start",gap:1},children:[rr?(0,v.jsx)(le.Checkbox,{checked:e.completed,icon:(0,v.jsx)(Fx.default,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:(0,v.jsx)(Ua.default,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(O,Vt)=>{io||ot({anchorEl:O.currentTarget,nextCompleted:Vt})},sx:{p:0,mt:.25}}):null,ir?(0,v.jsx)(le.Box,{sx:{display:"flex",p:0,mt:.25,color:e.icon_color||(Bo?"#e5484d":"#1e3a8a")},children:(0,v.jsx)(ir,{sx:{fontSize:20}})}):null,(0,v.jsx)(le.Box,{sx:{flex:1,minWidth:0},children:Ze!==null?(0,v.jsx)(le.Box,{component:"input",autoFocus:!0,spellCheck:!1,value:Ze,onChange:O=>oo(O.target.value),onBlur:()=>{Ze.trim()&&Ze.trim()!==e.title&&j(e.seq,Ze.trim()),oo(null)},onKeyDown:O=>{O.key==="Enter"&&O.target.blur(),O.key==="Escape"&&oo(null)},sx:{width:"100%",border:"none",outline:"none",font:"inherit",fontSize:19,fontWeight:600,color:"#37352f",p:0,m:0}}):(0,v.jsx)(le.Box,{onClick:()=>oo(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})}),(0,v.jsx)(Ye,{open:!!io,anchorEl:io?.anchorEl??null,title:io?.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:io?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>ot(null),onConfirm:()=>{io&&Qe(e.seq,io.nextCompleted),ot(null)}})]}):null,(0,v.jsxs)(le.Box,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:0,[Nt]:{pb:0,"& > :last-child":{mb:0}}},children:[(0,v.jsx)(Ii,{hideProject:I,values:{tabKey:e.tab_key??"",managerName:e.manager_name,receiverNames:e.receiver_names,startDate:e.start_date,dueDate:e.due_date,reminder:e.reminder,priority:e.priority,estimatedTime:e.estimated_time,eventTime:e.event_time??"",eventPlace:e.event_place??"",eventAddress:e.event_address??""},customTabs:o,avatarSrcByName:n,showEstimatedTime:!Do,notice:Bo,event:Do,readOnly:tt,targetSummary:Ya,onChangeProject:O=>s(e.seq,O),onAddProject:f,onChangeStartDate:O=>m(e.seq,"start_date",O),onChangeDueDate:O=>m(e.seq,"due_date",O),onChangeReminder:O=>d(e.seq,O),onChangePriority:O=>x(e.seq,O),onChangeEstimatedTime:O=>w(e.seq,O),onChangeEventTime:O=>T?.(e.seq,O),onChangeEventPlace:O=>b?.(e.seq,O),onChangeEventAddress:O=>M?.(e.seq,O),onMemberEdit:O=>g(e,O,null),narrowCollapsedSx:me,reminderLocked:e.completed,managerAction:An,leading:(0,v.jsxs)(v.Fragment,{children:[Tr||An&&(Bo||Do)?(0,v.jsxs)(le.Box,{sx:{gridColumn:"1 / -1",display:"flex",justifyContent:"flex-start",gap:2,px:2,py:1.5},children:[Bo||Do?An:null,Tr?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(le.Button,{variant:"contained",size:"large",onClick:()=>Ce?.(e.seq,!0),sx:{bgcolor:"#2f80ed"},children:"\uAC80\uC99D\uC644\uB8CC"}),(0,v.jsx)(le.Button,{variant:"outlined",size:"large",color:"error",onClick:()=>Ce?.(e.seq,!1),children:"\uC7AC\uC624\uD508"})]}):null]}):null,Bt&&e.ticket_no?(0,v.jsx)(xe,{icon:(0,v.jsx)(Ax.default,{sx:{fontSize:17}}),label:"\uD2F0\uCF13",children:(0,v.jsx)(le.Box,{component:"span",sx:{fontVariantNumeric:"tabular-nums"},children:e.ticket_no})}):null,Do?null:(0,v.jsx)(le.Box,{sx:Bt&&e.ticket_no||Qa||Xa?void 0:{gridColumn:"1 / -1"},children:(0,v.jsx)(xe,{icon:(0,v.jsx)(Hx.default,{sx:{fontSize:17}}),label:"\uC0C1\uD0DC",onClick:tt||e.completed?void 0:O=>fo(O),children:(0,v.jsx)(Ge,{option:Wo(e)})})}),Bo?null:(()=>{let O=Ot(e),Vt=O==="all"?(0,v.jsx)(qs.default,{sx:{fontSize:17,color:"#2f80ed"}}):O==="group"?(0,v.jsx)(As.default,{sx:{fontSize:17,color:"#d9730d"}}):(0,v.jsx)(zs.default,{sx:{fontSize:17}}),Ln=O==="all"?"\uC804\uCCB4\uACF5\uAC1C":O==="group"?`\uBD80\uC11C\uACF5\uAC1C \xB7 ${_.find(nn=>nn.seq===(e.visibility_group_seq??0))?.name??"\uBD80\uC11C"}`:"\uBE44\uACF5\uAC1C";return(0,v.jsx)(le.Box,{children:(0,v.jsx)(xe,{icon:Vt,label:"\uACF5\uAC1C",onClick:tt||!u?void 0:nn=>$e(nn),children:Ln})})})(),!Bo&&!Bt?(0,v.jsx)(le.Box,{children:(0,v.jsx)(xe,{icon:(0,v.jsx)(Gx.default,{sx:{fontSize:17,...e.repeat_rule?{color:"#2f80ed"}:{}}}),label:"\uBC18\uBCF5",onClick:tt||!p?void 0:O=>Ho(O),children:e.repeat_rule?yi(e.repeat_rule):(0,v.jsx)(Qn,{label:"\uC5C6\uC74C"})})}):null,!Bo&&!Bt&&e.repeat_rule?(0,v.jsx)(le.Box,{children:(0,v.jsx)(xe,{icon:(0,v.jsx)(jx.default,{sx:{fontSize:17}}),label:"\uBC18\uBCF5 \uC885\uB8CC",onClick:tt||!p?void 0:O=>qo(O),children:e.repeat_until?`${e.repeat_until}\uAE4C\uC9C0`:(0,v.jsx)(Qn,{})})}):null,st&&st.total>0?(0,v.jsx)(le.Box,{children:(0,v.jsx)(xe,{icon:(0,v.jsx)(Ka.default,{sx:{fontSize:17}}),label:"\uD655\uC778",children:st.canConfirm?(0,v.jsx)(le.Button,{size:"small",variant:"contained",onClick:()=>We?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):(0,v.jsxs)(le.Button,{size:"small",variant:"outlined",color:"inherit",startIcon:st.myTime?(0,v.jsx)(Ua.default,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:O=>Ne({anchorEl:O.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:[st.count," / ",st.total]})})}):null,Bo&&Mt?(0,v.jsx)(le.Box,{children:(0,v.jsx)(xe,{icon:(0,v.jsx)(Ka.default,{sx:{fontSize:17}}),label:"\uD655\uC778",children:(0,v.jsx)(le.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,minWidth:0},children:Mt.canAck?(0,v.jsx)(le.Button,{size:"small",variant:"contained",onClick:()=>We?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):(0,v.jsx)(le.Button,{size:"small",variant:"outlined",color:"inherit",startIcon:Mt.acked?(0,v.jsx)(Ua.default,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:O=>Ne({anchorEl:O.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:Mt.total>0&&Mt.count>=Mt.total?"\uC644\uB8CC":(0,v.jsxs)(v.Fragment,{children:[Mt.count,(0,v.jsx)(le.Box,{component:"span",sx:{mx:.4},children:"/"}),Mt.total]})})})})}):null,tn&&!Z&&!Do&&!Bo?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(xe,{icon:(0,v.jsx)(Lx.default,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:tt?void 0:O=>Ve(O),children:(e.sprint_seq??0)>0?Ae.find(O=>O.seq===e.sprint_seq)?.name??"\uC0AD\uC81C\uB41C \uC2A4\uD504\uB9B0\uD2B8":(0,v.jsx)(Qn,{label:"\uBBF8\uBC30\uC815"})}),(0,v.jsx)(xe,{icon:(0,v.jsx)(Nx.default,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",children:(0,v.jsx)(un,{value:(e.story_points??0)>0?String(e.story_points):"",placeholder:"\uBBF8\uCD94\uC815",readOnly:tt,onCommit:O=>Dt?.(e.seq,Number(O.replace(/[^0-9.]/g,""))||0)})})]}):null,Do||H?null:(0,v.jsx)(le.Box,{sx:[{gridColumn:"1 / -1"},me??null],children:(0,v.jsx)(xe,{icon:(0,v.jsx)(Wx.default,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:tt?void 0:O=>St(O),children:(e.label_keys??[]).length>0?(0,v.jsx)(Bn,{labelKeys:e.label_keys??[],labelOptions:t}):(0,v.jsx)(Qn,{})})})]}),trailing:(0,v.jsxs)(v.Fragment,{children:[Bt?(0,v.jsx)(_i,{values:{repro:e.bug_repro??"",device:e.bug_device??"",where:e.bug_where??"",version:e.bug_version??"",resolution:e.resolution??""},readOnly:tt,showResolution:!!e.completed,onChangeRepro:O=>oe?.(e.seq,"bug_repro",O),onChangeDevice:O=>oe?.(e.seq,"bug_device",O),onChangeWhere:O=>oe?.(e.seq,"bug_where",O),onChangeVersion:O=>oe?.(e.seq,"bug_version",O),onChangeResolution:O=>Et?.(e.seq,O)}):null,(0,v.jsx)(xe,{icon:(0,v.jsx)($x.default,{sx:{fontSize:17}}),label:"\uC791\uC131\uC790",sx:[$o(9),me??null],children:e.created_by?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(rt,{names:[e.created_by],size:20,avatarSrcByName:n}),e.created_by]}):(0,v.jsx)(Qn,{})}),(0,v.jsx)(xe,{icon:(0,v.jsx)(Ps.default,{sx:{fontSize:17}}),label:"\uC791\uC131\uC2DC\uAC04",sx:[$o(11),me??null],children:e.created_time?Pt(e.created_time):(0,v.jsx)(Qn,{})}),e.completed?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(xe,{icon:(0,v.jsx)(Ka.default,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC790",sx:[$o(10),me??null],children:e.completed_by?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(rt,{names:[e.completed_by],size:20,avatarSrcByName:n}),e.completed_by]}):(0,v.jsx)(Qn,{})}),(0,v.jsx)(xe,{icon:(0,v.jsx)(Ps.default,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC2DC\uAC04",sx:[$o(12),me??null],children:e.completed_time?Pt(e.completed_time):(0,v.jsx)(Qn,{})})]}):null]})}),(0,v.jsxs)(le.Box,{sx:{display:"none",[Nt]:{display:"block",mt:1.5,mb:0}},children:[(0,v.jsx)(le.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,v.jsx)(le.ButtonBase,{onClick:()=>K(O=>!O),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:F?(0,v.jsxs)(v.Fragment,{children:["\uC811\uAE30 ",(0,v.jsx)(zx.default,{sx:{fontSize:18}})]}):(0,v.jsxs)(v.Fragment,{children:["\uC815\uBCF4 \uB354\uBCF4\uAE30 ",(0,v.jsx)(qx.default,{sx:{fontSize:18}})]})})]}),(0,v.jsxs)(le.Box,{children:[(0,v.jsx)(le.Divider,{sx:{my:1.5,borderColor:"#e6e6e3",[Nt]:{mt:0,mb:1.25}}}),(0,v.jsx)(_t,{icon:(0,v.jsx)(Vx.default,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",children:(0,v.jsx)(le.Box,{sx:{userSelect:"text"},children:(0,v.jsx)(wi,{syncKey:e.seq,value:e.content??"",height:e.content_height??0,onChangeHeight:R?O=>R(e.seq,O):void 0,readOnly:tt,onChange:O=>B(e.seq,O)})})}),e.is_bug?null:(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(le.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,v.jsx)(_t,{icon:(0,v.jsx)(Ux.default,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:(0,v.jsx)(le.Box,{sx:{userSelect:"text"},children:(0,v.jsx)(Ds,{value:e.note,readOnly:ar,onCommit:O=>C(e.seq,O),onDraftChange:q?O=>q(e.seq,O):void 0})})})]}),Do?null:(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(le.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,v.jsx)(Ei,{taskSeq:e.seq,checklist:e.checklist??[],removeLocked:ar,onAdd:P,onToggle:z,onRemove:D,onUpdate:ee,onConvertToTask:h,onOpenLinkedTask:c,resolveLinkedTask:k,myAccountSeq:W,linkCandidates:y,linkBaseTask:e,onLinkExistingTask:S})]}),y&&!Do&&!Bo&&Es(e,y)?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(le.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,v.jsx)(Os,{task:e,tasks:y,readOnly:tt,onOpenTask:E,onLink:Y,onUnlink:re,onCreateFollowUp:qe})]}):null,(0,v.jsx)(le.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,v.jsx)(Mi,{taskSeq:e.seq,attachments:e.attachments??[],removeLocked:ar,onAdd:Se,onRemove:_e,onPreview:Be?O=>Be({...O,taskSeq:e.seq}):void 0,onDownload:be?O=>be({...O,taskSeq:e.seq}):void 0})]}),(0,v.jsx)(le.Divider,{sx:{my:1.5,borderColor:"#e6e6e3"}}),(0,v.jsx)(Is,{taskSeq:e.seq,comments:e.comments??[],currentUserName:G,myAccountSeq:W,avatarSrcByName:n,onUpdate:Re,onRemove:eo,onToggleReaction:co,onPreview:Be?O=>Be({...O,taskSeq:e.seq}):void 0,onDownload:be?O=>be({...O,taskSeq:e.seq}):void 0})]}),(0,v.jsx)(cr,{anchorEl:ke,value:e.status,options:Bo?_r:Bt?Fn:wr,onSelect:O=>r(e.seq,O),onClose:()=>fo(null)}),(0,v.jsx)(le.Menu,{transitionDuration:0,anchorEl:Fo,open:!!Fo,onClose:()=>Ho(null),children:[{value:"",label:"\uC5C6\uC74C"},...Vr].map(O=>(0,v.jsx)(le.MenuItem,{selected:(e.repeat_rule??"")===O.value,onClick:()=>{Ho(null),(async()=>{let Vt=e.repeat_rule??"";if(O.value===Vt)return;if(O.value===""){await(0,Ai.ConfirmDialog)({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)"})&&p?.(e.seq,"","");return}let Ln=String(e.due_date??"").slice(0,10);if(!Ln){(0,Ai.InfoAlert)(e.is_event?"\uBC18\uBCF5\uD558\uB824\uBA74 \uC77C\uC815 \uB0A0\uC9DC\uB97C \uBA3C\uC800 \uC120\uD0DD\uD558\uC138\uC694.":"\uBC18\uBCF5\uD558\uB824\uBA74 \uB9C8\uAC10\uAE30\uD55C\uC744 \uBA3C\uC800 \uC120\uD0DD\uD558\uC138\uC694.");return}Vt&&!await(0,Ai.ConfirmDialog)({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."})||p?.(e.seq,O.value,Si(Ln,O.value))})()},sx:{fontSize:14,minWidth:140},children:O.label},O.value||"none"))}),(0,v.jsx)(Yx.DatePicker,{anchorEl:Ko,open:!!Ko,onClose:()=>qo(null),selectedDate:e.repeat_until?new Date(`${e.repeat_until}T00:00:00`):new Date,onDateChange:O=>{qo(null);let Vt=Za=>String(Za).padStart(2,"0"),Ln=`${O.getFullYear()}-${Vt(O.getMonth()+1)}-${Vt(O.getDate())}`,nn=e.repeat_rule??"";nn&&p?.(e.seq,nn,Ln)}}),(0,v.jsx)(le.Menu,{transitionDuration:0,anchorEl:uo,open:!!uo,onClose:()=>$e(null),children:[{key:"involved",label:"\uBE44\uACF5\uAC1C",icon:(0,v.jsx)(zs.default,{sx:{fontSize:17,color:"#57564f"}}),selected:Ot(e)==="involved",onPick:()=>u?.(e.seq,"involved",0)},{key:"all",label:"\uC804\uCCB4\uACF5\uAC1C",icon:(0,v.jsx)(qs.default,{sx:{fontSize:17,color:"#2f80ed"}}),selected:Ot(e)==="all",onPick:()=>u?.(e.seq,"all",0)},..._.map(O=>({key:`group-${O.seq}`,label:`\uBD80\uC11C\uACF5\uAC1C \xB7 ${O.name}`,icon:(0,v.jsx)(As.default,{sx:{fontSize:17,color:"#d9730d"}}),selected:Ot(e)==="group"&&(e.visibility_group_seq??0)===O.seq,onPick:()=>u?.(e.seq,"group",O.seq)}))].map(O=>(0,v.jsxs)(le.MenuItem,{selected:O.selected,onClick:()=>{O.onPick(),$e(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[O.icon,O.label,O.selected?(0,v.jsx)(Rs.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},O.key))}),(0,v.jsx)(le.Menu,{transitionDuration:0,anchorEl:nr,open:!!nr,onClose:()=>Ve(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...Ae.filter(O=>`custom-${O.group_seq}`===String(e.tab_key??"")).map(O=>({seq:O.seq,label:It(O)}))].map(O=>(0,v.jsxs)(le.MenuItem,{onClick:()=>{Uo?.(e.seq,O.seq),Ve(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[O.label,(e.sprint_seq??0)===O.seq?(0,v.jsx)(Rs.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},O.seq))}),(0,v.jsx)(xi,{anchorEl:Tn?.anchorEl??null,open:!!Tn?.open,acks:e.acks??[],total:Mt?.total??st?.total??0,avatarSrcByName:n,onRequestConfirm:So&&st&&st.count<st.total?()=>{So(e.seq),Ne(O=>O?{...O,open:!1}:null)}:void 0,onClose:()=>Ne(O=>O?{...O,open:!1}:null)}),(0,v.jsx)(Ri,{anchorEl:$t,selectedKeys:e.label_keys??[],labelOptions:t,onToggle:O=>i(e.seq,ii(e.label_keys??[],O)),onAddLabel:l,onClose:()=>St(null)}),(0,v.jsx)(Ye,{open:!!qn,anchorEl:qn,title:Ni?"\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:()=>yn(null),onConfirm:()=>{A?.(e.seq),yn(null)}})]})}var Mo=require("react/jsx-runtime");function Ah(){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 Lh({open:e,task:o,onClose:t,onAddComment:n,onSaveFields:r,myAccountSeq:i=0,onToggleCompleted:l,onChangeTitle:s,onChangeIcon:f,onChangeIconColor:m,activityItems:d,activityLoading:g,onLoadActivity:x,onPrint:u,...p}){let _=je(),w=(0,En.useRef)(null);o&&(w.current=o);let T=o??w.current,[b,M]=(0,En.useState)(!1),[C,q]=(0,En.useState)({}),B=Object.keys(C).length>0;(0,En.useEffect)(()=>{q({})},[o?.seq,e]);let R=(0,En.useRef)(null);if((0,En.useEffect)(()=>{R.current?.scrollTo({top:0})},[o?.seq]),!T)return null;let P=_&&B?{...T,...C}:T,z=P.checklist??[],D=(k,y)=>{_?q(E=>({...E,...k})):y()},ee=()=>{let k=C;q({});let y=T.seq,E=k.title===void 0?void 0:String(k.title).trim();if(r){let Y={...k};E!==void 0&&(E?Y.title=E:delete Y.title),Object.keys(Y).length>0&&r(y,Y),(0,Ns.SuccessAlert)({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"});return}E&&s(y,E),k.icon!==void 0&&f(y,String(k.icon)),k.icon_color!==void 0&&m?.(y,String(k.icon_color)),k.status!==void 0&&p.onChangeStatus(y,k.status),k.label_keys!==void 0&&p.onChangeLabels(y,k.label_keys??[]),k.tab_key!==void 0&&p.onChangeProject(y,String(k.tab_key??"")),k.start_date!==void 0&&p.onChangeDate(y,"start_date",String(k.start_date??"")),k.due_date!==void 0&&p.onChangeDate(y,"due_date",String(k.due_date??"")),k.reminder!==void 0&&p.onChangeReminder(y,k.reminder),k.priority!==void 0&&p.onChangePriority(y,k.priority),k.estimated_time!==void 0&&p.onChangeEstimatedTime(y,String(k.estimated_time??"")),k.event_time!==void 0&&p.onChangeEventTime?.(y,String(k.event_time??"")),k.event_place!==void 0&&p.onChangeEventPlace?.(y,String(k.event_place??"")),k.event_address!==void 0&&p.onChangeEventAddress?.(y,String(k.event_address??"")),k.content!==void 0&&p.onChangeContent(y,String(k.content??"")),k.note!==void 0&&p.onChangeNote(y,String(k.note??"")),k.visibility!==void 0&&p.onChangeVisibility?.(y,k.visibility,Number(k.visibility_group_seq??0)),(0,Ns.SuccessAlert)({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"})},h={...p,onChangeStatus:(k,y)=>D({status:y},()=>p.onChangeStatus(k,y)),onChangeLabels:(k,y)=>D({label_keys:y},()=>p.onChangeLabels(k,y)),onChangeProject:(k,y)=>D({tab_key:y},()=>p.onChangeProject(k,y)),onChangeDate:(k,y,E)=>D({[y]:E},()=>p.onChangeDate(k,y,E)),onChangeReminder:(k,y)=>D({reminder:y},()=>p.onChangeReminder(k,y)),onChangePriority:(k,y)=>D({priority:y},()=>p.onChangePriority(k,y)),onChangeEstimatedTime:(k,y)=>D({estimated_time:y},()=>p.onChangeEstimatedTime(k,y)),onChangeEventTime:(k,y)=>D({event_time:y},()=>p.onChangeEventTime?.(k,y)),onChangeEventPlace:(k,y)=>D({event_place:y},()=>p.onChangeEventPlace?.(k,y)),onChangeEventAddress:(k,y)=>D({event_address:y},()=>p.onChangeEventAddress?.(k,y)),onChangeContent:(k,y)=>D({content:y},()=>p.onChangeContent(k,y)),onChangeNote:(k,y)=>D({note:y},()=>p.onChangeNote(k,y)),onMemberEdit:(k,y)=>p.onMemberEdit(k,y,_?E=>q(Y=>({...Y,...E})):null),onChangeNoteDraft:_?(k,y)=>D({note:y},()=>{}):void 0,onChangeVisibility:p.onChangeVisibility?(k,y,E)=>D({visibility:y,visibility_group_seq:E},()=>p.onChangeVisibility?.(k,y,E)):void 0,onAddChecklistItem:(k,y)=>D({checklist:[...z,{label:y,checked:!1}]},()=>p.onAddChecklistItem(k,y)),onToggleChecklistItem:(k,y,E)=>D({checklist:z.map((Y,re)=>re===y?{...Y,checked:E}:Y)},()=>p.onToggleChecklistItem(k,y,E)),onRemoveChecklistItem:(k,y)=>D({checklist:z.filter((E,Y)=>Y!==y)},()=>p.onRemoveChecklistItem(k,y)),onUpdateChecklistItem:p.onUpdateChecklistItem?(k,y,E)=>D({checklist:z.map((Y,re)=>re===y?{...Y,label:E}:Y)},()=>p.onUpdateChecklistItem?.(k,y,E)):void 0,onLinkChecklistTask:p.onLinkChecklistTask?(k,y,E)=>D({checklist:[...z,{label:E,checked:!1,task_seq:y}]},()=>p.onLinkChecklistTask?.(k,y,E)):void 0},c=(0,Mo.jsx)(Ls,{...h,task:P,myAccountSeq:i,onChangeTitle:(k,y)=>D({title:y},()=>s(k,y)),onToggleCompleted:l,onChangeIcon:(k,y)=>D({icon:y},()=>f(k,y)),onChangeIconColor:(k,y)=>D({icon_color:y},()=>m?.(k,y)),showTitle:_}),S=(0,Mo.jsx)(_s,{onSubmit:(k,y)=>n(P.seq,k,y)},P.seq);return _?(0,Mo.jsxs)(Mo.Fragment,{children:[(0,Mo.jsx)(Jx.FormDialog,{open:e,onClose:t,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:P.is_notice?"\uACF5\uC9C0\uC0AC\uD56D":P.is_event?"\uC77C\uC815":P.is_bug?"\uC624\uB958":"\uC5C5\uBB34",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1},custom:[...x?[{icon:(0,Mo.jsx)(Qx.default,{sx:{ml:2,color:"#6b7280"}}),tooltip:"\uD65C\uB3D9",onClick:()=>M(!0)}]:[],{icon:(0,Mo.jsx)(Xx.default,{sx:{ml:x?0:2,color:"#6b7280"}}),tooltip:"\uACF5\uC720\uD558\uAE30",onClick:()=>hr(P,!0)},{icon:(0,Mo.jsx)(Ht.Button,{variant:"contained",size:"small",disableElevation:!0,disabled:!B,onClick:B?ee: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:S},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:(0,Mo.jsx)(Ht.Box,{sx:{userSelect:"none",width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:c})}]},T.seq),(0,Mo.jsx)(qi,{open:b,taskSeq:P.seq,items:d,loading:g,onLoad:x,onClose:()=>M(!1)})]}):(0,Mo.jsx)(Ht.Drawer,{anchor:"right",open:e,onClose:t,disableAutoFocus:!0,disableEnforceFocus:!0,sx:{zIndex:k=>k.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:(0,Mo.jsxs)(Ht.Box,{sx:{display:"flex",flexDirection:"column",height:"100%",userSelect:"none"},children:[(0,Mo.jsx)(ws,{task:P,myAccountSeq:i,onToggleCompleted:l,onChangeTitle:s,onChangeIcon:f,onChangeIconColor:m,onClose:t,activityItems:d,activityLoading:g,onLoadActivity:x,onPrint:u}),(0,Mo.jsx)(Ht.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,Mo.jsx)(Ht.Box,{sx:{flex:1,minHeight:0},children:(0,Mo.jsx)(Zx.default,{ref:R,style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:c})}),(0,Mo.jsx)(Ht.Divider,{sx:{borderColor:"#37352f"}}),(0,Mo.jsx)(Ht.Box,{sx:{flexShrink:0},children:S})]})})}var fn=require("react"),wo=require("@mui/material"),tg=require("@ehfuse/mui-form-dialog"),ng=a(require("@mui/icons-material/EditOutlined"),1),Fs=require("@ehfuse/alerts"),Mn=require("@ehfuse/mui-form-controls");var Ga="custom-";function eg(e){return e.startsWith(Ga)}function Nh(e){return e>0?`${Ga}${e}`:""}function ja(e){if(!eg(e))return 0;let o=Number(e.slice(Ga.length));return Number.isInteger(o)&&o>0?o:0}var Oe=require("react/jsx-runtime"),Fh=[{value:"planning",label:"\uACC4\uD68D\uC911"},{value:"active",label:"\uC9C4\uD589\uC911"},{value:"closed",label:"\uC885\uB8CC"}];function og(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):"-"}function Hh({open:e,customTabs:o,sprints:t,onClose:n,onCreate:r,onUpdate:i,onChangeStatus:l,onRemove:s}){let f=o.filter(h=>h.useSprints&&!h.archived),[m,d]=(0,fn.useState)(""),[g,x]=(0,fn.useState)(""),[u,p]=(0,fn.useState)(""),[_,w]=(0,fn.useState)(""),[T,b]=(0,fn.useState)(""),[M,C]=(0,fn.useState)(!1),[q,B]=(0,fn.useState)(0);(0,fn.useEffect)(()=>{e&&(d(f.length===1?f[0].key:""),x(""),p(""),w(""),b(""),B(0))},[e]);let R=()=>{x(""),p(""),w(""),b(""),B(0)},P=h=>{B(h.seq),d(`custom-${h.group_seq}`),x(h.name),p(h.goal),w(h.start_date),b(h.end_date)},z=async()=>{let h=ja(m);if(!h){(0,Fs.ErrorAlert)("\uBAA9\uD45C\uB97C \uB9CC\uB4E4 \uD504\uB85C\uC81D\uD2B8\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}if(!g.trim()){(0,Fs.ErrorAlert)("\uBAA9\uD45C \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}C(!0);try{if(q>0){i(q,{name:g.trim(),goal:u.trim(),start_date:_,end_date:T}),R();return}await r({group_seq:h,name:g.trim(),goal:u.trim(),start_date:_,end_date:T})&&R()}finally{C(!1)}},D=new Map(o.map(h=>[ja(h.key),h.label])),ee=(0,Oe.jsx)(wo.Box,{children:f.length===0?(0,Oe.jsx)(wo.Box,{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.'}):(0,Oe.jsxs)(Oe.Fragment,{children:[(0,Oe.jsxs)(wo.Box,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2.5,mt:1},children:[(0,Oe.jsx)(Mn.LabelSelect,{label:"\uD504\uB85C\uC81D\uD2B8",size:"medium",value:m,options:f.map(h=>({value:h.key,label:h.label})),onChange:h=>d(String(h.target.value)),disabled:q>0}),(0,Oe.jsx)(Mn.ClearTextField,{label:"\uBAA9\uD45C \uC774\uB984",size:"medium",placeholder:"\uC608: 8\uC6D4 2\uC8FC\uCC28",value:g,onChange:h=>x(h.target.value)}),(0,Oe.jsx)(Mn.DateTextField,{size:"medium",label:"\uC2DC\uC791\uC77C",value:_,onChange:h=>w(h.target.value)}),(0,Oe.jsx)(Mn.DateTextField,{size:"medium",label:"\uC885\uB8CC\uC77C",value:T,onChange:h=>b(h.target.value)}),(0,Oe.jsx)(Mn.ClearTextField,{label:"\uC124\uBA85",size:"medium",placeholder:"\uC120\uD0DD \uC785\uB825",value:u,onChange:h=>p(h.target.value),sx:{gridColumn:"1 / -1"}})]}),(0,Oe.jsxs)(wo.Box,{sx:{mt:1.5,display:"flex",justifyContent:"flex-end",gap:1},children:[q>0?(0,Oe.jsx)(wo.Button,{color:"inherit",onClick:R,disabled:M,children:"\uCDE8\uC18C"}):null,(0,Oe.jsx)(wo.Button,{variant:"contained",onClick:()=>{z()},disabled:M,children:q>0?"\uBAA9\uD45C \uC800\uC7A5":"\uBAA9\uD45C \uB9CC\uB4E4\uAE30"})]}),(0,Oe.jsx)(wo.Box,{sx:{mt:2,borderTop:"1px solid #e6e6e3"},children:t.length===0?(0,Oe.jsx)(wo.Box,{sx:{py:3,textAlign:"center",fontSize:14,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):t.map(h=>(0,Oe.jsxs)(wo.Box,{sx:{display:"flex",flexDirection:"column",gap:1,py:1.75,borderBottom:"1px solid #f0efed"},children:[(0,Oe.jsxs)(wo.Box,{sx:{minWidth:0},children:[(0,Oe.jsxs)(wo.Box,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[(0,Oe.jsx)(wo.Box,{component:"span",sx:{fontSize:16,fontWeight:600,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:h.name}),(0,Oe.jsx)(wo.Box,{component:"span",sx:{flexShrink:0,px:1,py:.25,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:13,fontWeight:500},children:D.get(h.group_seq)??"\uC0AD\uC81C\uB41C \uD504\uB85C\uC81D\uD2B8"}),(0,Oe.jsxs)(wo.Box,{component:"span",sx:{flexShrink:0,fontSize:14,color:"#57564f"},children:[og(h.start_date)," ~ ",og(h.end_date)]})]}),h.goal?(0,Oe.jsx)(wo.Box,{sx:{mt:.5,fontSize:14,color:"#787774",lineHeight:1.5},children:h.goal}):null]}),(0,Oe.jsxs)(wo.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[(0,Oe.jsx)(Mn.LabelSelect,{label:"\uC0C1\uD0DC",showLabel:!1,size:"small",value:h.status,options:Fh.map(c=>({value:c.value,label:c.label})),onChange:c=>l(h.seq,String(c.target.value)),sx:{width:104,flexShrink:0}}),(0,Oe.jsx)(wo.IconButton,{"aria-label":"\uBAA9\uD45C \uC218\uC815",onClick:()=>P(h),sx:{color:"#9a9a97","&:hover":{color:"#2563eb"}},children:(0,Oe.jsx)(ng.default,{sx:{fontSize:18}})}),(0,Oe.jsx)(wo.IconButton,{"aria-label":"\uBAA9\uD45C \uC0AD\uC81C",onClick:()=>s(h.seq),sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:(0,Oe.jsx)(sn,{style:{width:16,height:16}})})]})]},h.seq))})]})});return(0,Oe.jsx)(tg.FormDialog,{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:ee}],actions:{showCancelButton:!1,right:(0,Oe.jsx)(wo.Button,{variant:"contained",onClick:n,children:"\uB2EB\uAE30"})}})}var Hs=require("react"),Ke=require("@mui/material"),rg=require("@ehfuse/mui-form-dialog"),ig=a(require("@mui/icons-material/OpenInNewOutlined"),1),ag=a(require("@mui/icons-material/EventOutlined"),1),lg=require("@ehfuse/alerts");var Ie=require("react/jsx-runtime");function Wh({open:e,imports:o,onRegister:t,onRemove:n,onClose:r}){let[i,l]=(0,Hs.useState)(""),[s,f]=(0,Hs.useState)(!1),m=async()=>{let x=i.trim();if(x){f(!0);try{await t(x)&&l("")}finally{f(!1)}}},d=async x=>{await(0,lg.ConfirmDialog)({title:"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",message:`"${x.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}" \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&n(x.seq)},g=(0,Ie.jsxs)(Ke.Box,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[(0,Ie.jsxs)(Ke.Box,{sx:{color:"#37352f",lineHeight:1.7},children:["\uAD6C\uAE00 \uCE98\uB9B0\uB354\uC758 \uC77C\uC815\uC744 ",(0,Ie.jsx)("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uC5C5\uBB34\uD568 \uCE98\uB9B0\uB354\uC5D0 \uD568\uAED8 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4.",(0,Ie.jsx)("br",{}),"\uD45C\uC2DC/\uC228\uAE40\uC740 \uC5C5\uBB34\uD568 \uC6B0\uC0C1\uB2E8\uC758 ",(0,Ie.jsx)("b",{children:"\uAD6C\uAE00 \uC77C\uC815"})," \uC2A4\uC704\uCE58\uB85C \uCF1C\uACE0 \uB055\uB2C8\uB2E4."]}),(0,Ie.jsx)(Ke.Box,{sx:{fontWeight:700,color:"#37352f",mt:.5},children:"\uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354"}),o.length>0?(0,Ie.jsx)(Ke.Box,{sx:{display:"flex",flexDirection:"column",border:"1px solid #e6e6e3",borderRadius:1},children:o.map((x,u)=>(0,Ie.jsxs)(Ke.Box,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:.75,borderTop:u>0?"1px solid #efefed":"none"},children:[(0,Ie.jsx)(ag.default,{sx:{fontSize:18,color:"#0f9d58",flexShrink:0}}),(0,Ie.jsx)(Ke.Box,{component:"span",sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:x.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),(0,Ie.jsx)(Ke.IconButton,{"aria-label":"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",size:"small",onClick:()=>{d(x)},sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:(0,Ie.jsx)(sn,{sx:{fontSize:18}})})]},x.seq))}):(0,Ie.jsx)(Ke.Box,{sx:{color:"#9a9a97",px:.5},children:"\uC544\uC9C1 \uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}),(0,Ie.jsx)(Ke.Divider,{sx:{my:1,borderColor:"#e6e6e3"}}),(0,Ie.jsx)(Ke.Box,{sx:{fontWeight:700,color:"#37352f"},children:"\uC0C8 \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30"}),(0,Ie.jsxs)(Ke.Box,{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:[(0,Ie.jsx)(Ke.Box,{children:(0,Ie.jsxs)(Ke.Box,{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 > ",(0,Ie.jsx)("b",{children:"\uC124\uC815 \uBC0F \uACF5\uC720"}),"\uB97C \uC5FD\uB2C8\uB2E4."]})}),(0,Ie.jsx)(Ke.Box,{children:(0,Ie.jsxs)(Ke.Box,{component:"span",children:[(0,Ie.jsx)("b",{children:"\uCE98\uB9B0\uB354 \uD1B5\uD569"})," \uC139\uC158\uC758 ",(0,Ie.jsx)("b",{children:'"iCal \uD615\uC2DD\uC758 \uBE44\uBC00 \uC8FC\uC18C"'})," \uB97C \uBCF5\uC0AC\uD574 \uC544\uB798\uC5D0 \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),(0,Ie.jsx)(Ke.Box,{children:(0,Ie.jsx)(Ke.Box,{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."})}),(0,Ie.jsx)(Ke.Box,{children:(0,Ie.jsx)(Ke.Box,{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."})})]}),(0,Ie.jsxs)(Ke.Box,{sx:{display:"flex",gap:2,alignItems:"center"},children:[(0,Ie.jsx)(Ke.TextField,{value:i,onChange:x=>l(x.target.value),fullWidth:!0,label:"\uBE44\uBC00 iCal \uC8FC\uC18C",placeholder:"https://calendar.google.com/calendar/ical/\u2026/basic.ics",slotProps:{input:{spellCheck:!1}}}),(0,Ie.jsx)(Ke.Button,{variant:"contained",disabled:!i.trim()||s,onClick:()=>{m()},sx:{flexShrink:0},children:s?"\uD655\uC778 \uC911\u2026":"\uB4F1\uB85D"})]})]});return(0,Ie.jsx)(rg.FormDialog,{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:(0,Ie.jsx)(Ke.Button,{variant:"outlined",startIcon:(0,Ie.jsx)(ig.default,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:(0,Ie.jsx)(Ke.Button,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})}})}var No=require("@mui/material"),sg=require("@ehfuse/mui-form-dialog"),cg=a(require("@mui/icons-material/ContentCopyOutlined"),1),Ws=a(require("@mui/icons-material/OpenInNewOutlined"),1),$s=require("@ehfuse/alerts"),ze=require("react/jsx-runtime");function mg(e){return`${window.location.origin}/api/v1/taskbox/calendar/${e}.ics`}function $h({open:e,feed:o,feedTaskCount:t,buildFeedUrl:n,onSubscribe:r,onClose:i}){let l=n??mg,s=o.subscribed?l(o.token):"",f=()=>{navigator.clipboard.writeText(s).then(()=>(0,$s.InfoAlert)("\uD53C\uB4DC \uC8FC\uC18C\uB97C \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>(0,$s.InfoAlert)("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uC8FC\uC18C\uB97C \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD558\uC138\uC694."))},m=()=>{let g=s.replace(/^https?:\/\//,"webcal://");window.open(`https://calendar.google.com/calendar/r?cid=${encodeURIComponent(g)}`,"_blank")},d=(0,ze.jsxs)(No.Box,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[(0,ze.jsxs)(No.Box,{sx:{color:"#37352f",lineHeight:1.7},children:["\uB0B4\uAC00 \uAD00\uC5EC\uD55C \uC5C5\uBB34\uB97C ",(0,ze.jsx)("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0\uC11C \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4."]}),t===0?(0,ze.jsxs)(No.Box,{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.",(0,ze.jsx)("br",{}),(0,ze.jsx)("b",{children:"\uB9C8\uAC10\uAE30\uD55C\uC774 \uC788\uB294 \uB0B4 \uC5C5\uBB34 \uB610\uB294 \uBCF4\uB0B8\uC5C5\uBB34"}),"\uAC00 \uC0DD\uAE30\uBA74"," ",o.subscribed?"\uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0 \uC790\uB3D9\uC73C\uB85C \uD45C\uC2DC\uB429\uB2C8\uB2E4.":"\uC5EC\uAE30\uC11C \uAD6C\uB3C5\uC744 \uC2DC\uC791\uD558\uC138\uC694."]}):o.subscribed&&o.enabled?(0,ze.jsxs)(ze.Fragment,{children:[(0,ze.jsx)(No.TextField,{value:s,fullWidth:!0,label:"\uB0B4 \uD53C\uB4DC \uC8FC\uC18C",slotProps:{input:{readOnly:!0}}}),(0,ze.jsxs)(No.Box,{sx:{display:"flex",gap:2},children:[(0,ze.jsx)(No.Button,{variant:"outlined",startIcon:(0,ze.jsx)(cg.default,{}),onClick:f,children:"\uC8FC\uC18C \uBCF5\uC0AC"}),(0,ze.jsx)(No.Button,{variant:"contained",startIcon:(0,ze.jsx)(Ws.default,{}),onClick:m,children:"Google \uCE98\uB9B0\uB354\uC5D0 \uCD94\uAC00"})]}),(0,ze.jsxs)(No.Box,{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:[(0,ze.jsx)(No.Box,{children:(0,ze.jsxs)("span",{children:["\uBC84\uD2BC\uC774 \uB3D9\uC791\uD558\uC9C0 \uC54A\uC73C\uBA74 \uAD6C\uAE00 \uCE98\uB9B0\uB354 > \uB2E4\uB978 \uCE98\uB9B0\uB354 + > ",(0,ze.jsx)("b",{children:"URL\uB85C \uCD94\uAC00"}),"\uC5D0 \uC704 \uC8FC\uC18C\uB97C \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),(0,ze.jsx)(No.Box,{children:(0,ze.jsx)("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."})}),(0,ze.jsx)(No.Box,{children:(0,ze.jsx)("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."})}),(0,ze.jsx)(No.Box,{children:(0,ze.jsx)("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."})})]})]}):(0,ze.jsx)(No.Button,{variant:"contained",onClick:r,sx:{alignSelf:"flex-start"},children:"\uAD6C\uB3C5 \uC2DC\uC791 (\uD53C\uB4DC \uBC1C\uAE09)"})]});return(0,ze.jsx)(sg.FormDialog,{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:d}],actions:{showCancelButton:!1,left:(0,ze.jsx)(No.Button,{variant:"outlined",startIcon:(0,ze.jsx)(Ws.default,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:(0,ze.jsx)(No.Button,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}var xn=require("react"),gn=require("@mui/material"),ug=require("@ehfuse/mui-form-dialog"),dg=require("@ehfuse/mui-form-controls"),pg=require("@ehfuse/tree-view");var et=require("react/jsx-runtime");function fg(e){return`${e.name}#${e.seq}`}function Vh(e){return Number(e.slice(e.lastIndexOf("#")+1))||0}function Uh(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 Kh(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 Gh(e){let o=[[e.name,e.role_name].filter(Boolean).join(" "),e.department].filter(Boolean).join(" / ");return{id:`emp:${e.seq}`,label:fg(e),renderLabel:(0,et.jsx)(gn.Box,{component:"span",sx:{display:"inline-flex",alignItems:"baseline",gap:.75},children:(0,et.jsx)(gn.Box,{component:"span",sx:{fontWeight:400,color:"text.primary"},children:o})})}}function xg(e,o){let t=(e.groups??[]).map(r=>xg(r,o)).filter(r=>r!==null),n=(e.employees??[]).filter(r=>Kh(r,o)).map(Gh);return t.length===0&&n.length===0?null:{id:`group:${e.key}`,label:e.name,children:[...t,...n]}}function jh({groups:e,allEmployees:o,initialSelectedSeqs:t,multiple:n,isMobile:r,onSelectionChange:i}){let[l,s]=(0,xn.useState)(""),f=(0,xn.useMemo)(()=>e.map(d=>xg(d,l.trim().toLowerCase())).filter(d=>d!==null),[e,l]),m=(0,xn.useMemo)(()=>o.filter(d=>t.includes(d.seq)).map(fg),[]);return(0,et.jsxs)(et.Fragment,{children:[(0,et.jsx)(gn.Box,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:(0,et.jsx)(dg.SearchTextField,{size:"small",fullWidth:!0,placeholder:"\uC774\uB984, \uBD80\uC11C \uAC80\uC0C9",onSearch:s,onClear:()=>s(""),sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),(0,et.jsx)(gn.Box,{sx:r?{display:"flex",flexDirection:"column"}:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:(0,et.jsx)(pg.TreeView,{items:f,checkbox:!0,multiSelect:n,selectionMode:"child",showSearch:!1,defaultExpanded:!0,initialSelections:m,onChange:d=>i(d.map(Vh).filter(g=>g>0)),styles:{border:"none",borderRadius:"0"}})})]})}function Yh({open:e,title:o="\uC9C1\uC6D0 \uC120\uD0DD",hint:t="",groups:n,multiple:r=!1,selectedSeqs:i,confirmText:l="\uD655\uC778",onConfirm:s,onClose:f}){let m=je(),[d,g]=(0,xn.useState)([]),[x,u]=(0,xn.useState)(0),p=(0,xn.useMemo)(()=>Uh(n),[n]),_=i??[];(0,xn.useEffect)(()=>{e&&(g(_),u(T=>T+1))},[e]);let w=()=>{let T=p.filter(b=>d.includes(b.seq));s(r?T:T.slice(0,1)),f()};return(0,et.jsx)(ug.FormDialog,{open:e,onClose:f,title:`${o}${r&&d.length>0?` (${d.length}\uBA85)`:""}`,locale:"ko",fullScreen:m,mobilePresentation:m?"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:(0,et.jsx)(gn.Box,{sx:{...m?{}:{height:560},display:"flex",flexDirection:"column",border:"1px solid #cccccc",borderRadius:1,...m?{}:{overflow:"hidden"},userSelect:"none"},children:(0,et.jsx)(jh,{groups:n,allEmployees:p,initialSelectedSeqs:_,multiple:r,isMobile:m,onSelectionChange:g},x)})}],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?(0,et.jsx)(gn.Typography,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.35},children:t}):void 0,right:(0,et.jsx)(gn.Button,{variant:"contained",onClick:w,children:l})}})}var Qr=require("react"),Jt=require("@mui/material"),hg=require("@ehfuse/mui-form-dialog"),kg=require("@ehfuse/mui-form-controls");var Zt=require("@mui/material"),Tt=require("react/jsx-runtime");function Xh(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 Vs({sprints:e,tasks:o,height:t=160}){let r=[...e].sort((d,g)=>`${d.start_date}|${d.seq}`.localeCompare(`${g.start_date}|${g.seq}`)).map(d=>({sprint:d,...Xh(d,o)})),i=r.some(d=>d.points>0),l=r.map(d=>i?d.points:d.count),s=Math.max(1,...l),f=r.filter(d=>d.sprint.status==="closed").map(d=>i?d.points:d.count),m=f.length>0?Math.round(f.reduce((d,g)=>d+g,0)/f.length*10)/10:null;return r.length===0?(0,Tt.jsx)(Zt.Box,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uD45C\uC2DC\uD560 \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):(0,Tt.jsxs)(Zt.Box,{children:[(0,Tt.jsxs)(Zt.Box,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[(0,Tt.jsxs)("span",{children:["\uC644\uB8CC ",i?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uBAA9\uD45C\uBCC4"]}),m!==null?(0,Tt.jsxs)("span",{children:["\uD3C9\uADE0(\uC885\uB8CC \uBAA9\uD45C)"," ",(0,Tt.jsx)(Zt.Box,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:m}),i?"SP":"\uAC74"]}):null]}),(0,Tt.jsx)(Zt.Box,{sx:{display:"flex",alignItems:"flex-end",gap:2,height:t,px:.5},children:r.map(d=>{let g=i?d.points:d.count,x=Math.round((t-24)*g/s),u=d.sprint.status==="closed";return(0,Tt.jsxs)(Zt.Box,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-end",height:"100%"},children:[(0,Tt.jsx)(Zt.Box,{sx:{fontSize:14,fontWeight:700,color:"#37352f",lineHeight:1.5},children:g}),(0,Tt.jsx)(Zt.Box,{sx:{width:"60%",maxWidth:56,height:Math.max(2,x),borderRadius:"4px 4px 0 0",bgcolor:u?"#2f80ed":"#a9c9f5"}})]},d.sprint.seq)})}),(0,Tt.jsx)(Zt.Box,{sx:{display:"flex",gap:2,px:.5,mt:.5},children:r.map(d=>(0,Tt.jsxs)(Zt.Box,{sx:{flex:1,minWidth:0,textAlign:"center",fontSize:13.5,color:"#000",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[d.sprint.name,d.sprint.status!=="closed"?" (\uC9C4\uD589\uC911)":""]},d.sprint.seq))})]})}var bg=require("react"),Zn=require("@mui/material"),zo=require("react/jsx-runtime");function gg(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?new Date(`${e}T00:00:00`):null}function Qh(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function Us(e){return e.slice(5).replace("-",".")}function Ks({sprint:e,tasks:o,todayStr:t,height:n=200}){let r=(0,bg.useMemo)(()=>{let T=gg(e.start_date),b=gg(e.end_date);if(!T||!b||b<T||Math.round((b.getTime()-T.getTime())/864e5)+1>366)return null;let C=o.filter(h=>h.sprint_seq===e.seq&&!h.archived);if(C.length===0)return{empty:!0};let q=C.some(h=>(h.story_points??0)>0),B=h=>q?h.story_points??0:1,R=C.reduce((h,c)=>h+B(c),0),P=new Map;for(let h of C){if(!h.completed)continue;let c=(h.completed_time??"").slice(0,10),S=/^\d{4}-\d{2}-\d{2}$/.test(c)?c:e.start_date;P.set(S,(P.get(S)??0)+B(h))}let z=[];for(let h=new Date(T);h<=b;h.setDate(h.getDate()+1))z.push(Qh(h));let D=R,ee=[];for(let h of z){if(h>t)break;D-=P.get(h)??0,ee.push({day:h,value:Math.max(0,D)})}return{empty:!1,days:z,total:R,usePoints:q,actual:ee}},[e,o,t]);if(!r)return(0,zo.jsx)(Zn.Box,{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(0,zo.jsx)(Zn.Box,{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:l,usePoints:s,actual:f}=r,m=600,d=200,g=8,x=T=>i.length===1?0:T/(i.length-1)*m,u=T=>g+(d-g*2)*(1-T/Math.max(1,l)),p=`${x(0)},${u(l)} ${x(i.length-1)},${u(0)}`,_=f.map(T=>`${x(i.indexOf(T.day))},${u(T.value)}`).join(" "),w=f[f.length-1];return(0,zo.jsxs)(Zn.Box,{children:[(0,zo.jsxs)(Zn.Box,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[(0,zo.jsxs)("span",{children:["\uB0A8\uC740 ",s?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uCD1D ",l]}),w?(0,zo.jsxs)("span",{children:["\uD604\uC7AC"," ",(0,zo.jsx)(Zn.Box,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:w.value}),s?"SP":"\uAC74"," \uB0A8\uC74C"]}):null]}),(0,zo.jsx)(Zn.Box,{sx:{border:"1px solid #e6e6e3",borderRadius:1,bgcolor:"#fafaf9",px:1,py:.5},children:(0,zo.jsxs)("svg",{viewBox:`0 0 ${m} ${d}`,preserveAspectRatio:"none",style:{display:"block",width:"100%",height:n},children:[(0,zo.jsx)("line",{x1:0,y1:u(0),x2:m,y2:u(0),stroke:"#e6e6e3",strokeWidth:1}),(0,zo.jsx)("polyline",{points:p,fill:"none",stroke:"#9a9a97",strokeWidth:1.5,strokeDasharray:"6 5",vectorEffect:"non-scaling-stroke"}),f.length>1?(0,zo.jsx)("polyline",{points:_,fill:"none",stroke:"#2f80ed",strokeWidth:2.5,vectorEffect:"non-scaling-stroke"}):null,w?(0,zo.jsx)("circle",{cx:x(i.indexOf(w.day)),cy:u(w.value),r:4,fill:"#2f80ed",vectorEffect:"non-scaling-stroke"}):null]})}),(0,zo.jsxs)(Zn.Box,{sx:{mt:.5,display:"flex",justifyContent:"space-between",fontSize:13.5,color:"#000"},children:[(0,zo.jsx)("span",{children:Us(e.start_date)}),t>e.start_date&&t<e.end_date?(0,zo.jsxs)("span",{children:["\uC624\uB298 ",Us(t)]}):null,(0,zo.jsx)("span",{children:Us(e.end_date)})]})]})}var yt=require("react/jsx-runtime");function Zh({open:e,sprints:o,tasks:t,todayStr:n,initialSprintSeq:r=0,onClose:i}){let[l,s]=(0,Qr.useState)(0);(0,Qr.useEffect)(()=>{if(!e)return;let d=o.find(x=>x.status==="active")??o[0],g=o.find(x=>x.seq===r)??d;s(g?.seq??0)},[e]);let f=(0,Qr.useMemo)(()=>o.find(d=>d.seq===l)??null,[o,l]),m=(0,yt.jsxs)(Jt.Box,{sx:{display:"flex",flexDirection:"column"},children:[(0,yt.jsxs)(Jt.Box,{sx:{px:3,py:2.5},children:[(0,yt.jsx)(Jt.Box,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBCA8\uB85C\uC2DC\uD2F0"}),(0,yt.jsx)(Vs,{sprints:o,tasks:t})]}),(0,yt.jsx)(Jt.Divider,{sx:{borderColor:"#e6e6e3"}}),(0,yt.jsxs)(Jt.Box,{sx:{px:3,py:2.5},children:[(0,yt.jsx)(Jt.Box,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBC88\uB2E4\uC6B4"}),(0,yt.jsx)(kg.LabelSelect,{label:"\uBAA9\uD45C",showLabel:!1,value:l?String(l):"",options:o.map(d=>({value:String(d.seq),label:It(d)})),onChange:d=>s(Number(d.target.value)||0),sx:{width:280,mb:2}}),f?(0,yt.jsx)(Ks,{sprint:f,tasks:t,todayStr:n}):(0,yt.jsx)(Jt.Box,{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(0,yt.jsx)(hg.FormDialog,{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:m}],actions:{showCancelButton:!1,right:(0,yt.jsx)(Jt.Button,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}var bn=require("@mui/material");var On=require("react/jsx-runtime");function Jh({anchorEl:e,candidates:o,selectedNames:t,avatarSrcByName:n,onToggle:r,onClear:i,onClose:l}){return(0,On.jsxs)(bn.Menu,{anchorEl:e,open:!!e,onClose:l,transitionDuration:0,children:[o.length===0?(0,On.jsx)(bn.MenuItem,{disabled:!0,sx:{fontSize:14},children:"\uBAA9\uB85D\uC5D0 \uC9C0\uC815\uB41C \uC0AC\uB78C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):o.map(s=>{let f=t.includes(s.name);return(0,On.jsxs)(bn.MenuItem,{onClick:()=>r(s),sx:{fontSize:14,minWidth:170,gap:1},children:[(0,On.jsx)(bn.Checkbox,{size:"small",checked:f,sx:{p:0}}),(0,On.jsx)(rt,{names:[s.name],size:20,avatarSrcByName:n}),s.name]},`${s.accountSeq}-${s.name}`)}),(0,On.jsx)(bn.Divider,{}),(0,On.jsx)(bn.MenuItem,{disabled:t.length===0,onClick:i,sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}var Tg=require("react"),Zr=require("@mui/material"),yg=a(require("@mui/icons-material/KeyboardArrowDown"),1),Sg=a(require("@mui/icons-material/Check"),1);var hn=require("react/jsx-runtime");function ek({value:e,onChange:o,options:t}){let[n,r]=(0,Tg.useState)(null),i=t??ta,l=ta.find(s=>s.value===e)?.label??"";return(0,hn.jsxs)(hn.Fragment,{children:[(0,hn.jsxs)(Zr.ButtonBase,{onClick:s=>r(s.currentTarget),sx:{display:"flex",alignItems:"center",gap:.5,px:1,py:.5,borderRadius:1,fontSize:13.5,color:"#37352f","&:hover":{bgcolor:"#f2f2f0"}},children:[l,(0,hn.jsx)(yg.default,{sx:{fontSize:17,color:"#9a9a97"}})]}),(0,hn.jsx)(Zr.Menu,{transitionDuration:0,anchorEl:n,open:!!n,onClose:()=>r(null),children:i.map(s=>(0,hn.jsxs)(Zr.MenuItem,{selected:s.value===e,onClick:()=>{o(s.value),r(null)},sx:{fontSize:14,minWidth:140,justifyContent:"space-between",gap:1},children:[s.label,s.value===e?(0,hn.jsx)(Sg.default,{sx:{fontSize:16,color:"#2f80ed"}}):null]},s.value))})]})}var kn=require("@mui/material"),Cg=a(require("@mui/icons-material/Check"),1),vg=a(require("@ehfuse/overlay-scrollbar"),1);var en=require("react/jsx-runtime"),Bg=["#1e3a8a","#2f80ed","#06b6d4","#0fa3a3","#2f9e5b","#84cc16","#e8a33d","#d9730d","#e5484d","#e255a1","#a355c0","#8a5a2b","#57564f","#111827"];function ok({anchorEl:e,value:o,color:t="",onSelect:n,onSelectColor:r,onClose:i}){return(0,en.jsx)(kn.Popover,{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:(0,en.jsxs)(kn.Box,{sx:{width:"min(492px, calc(100vw - 32px))"},children:[(0,en.jsx)(vg.default,{style:{maxHeight:"min(432px, calc(100dvh - 240px))"},contentStyle:{minWidth:0,padding:10},thumb:{width:6},children:(0,en.jsx)(pi,{value:o||Ao,onChange:l=>{n(l),i()}})}),r?(0,en.jsxs)(kn.Box,{sx:{px:1.25,pb:1.25},children:[(0,en.jsx)(kn.Divider,{sx:{mb:1,borderColor:"#efefed"}}),(0,en.jsx)(kn.Box,{sx:{display:"flex",flexWrap:"wrap",gap:.75},children:Bg.map(l=>{let s=(t||Bg[0])===l;return(0,en.jsx)(kn.ButtonBase,{"aria-label":`\uC544\uC774\uCF58 \uC0C9 ${l}`,onClick:()=>r(l),sx:{width:26,height:26,borderRadius:"50%",bgcolor:l,display:"flex",alignItems:"center",justifyContent:"center"},children:s?(0,en.jsx)(Cg.default,{sx:{fontSize:15,color:"#ffffff"}}):null},l)})})]}):null]})})}var kr=require("@mui/material"),Gs=require("@ehfuse/mui-form-controls");function Jn(e){let o=t=>String(t).padStart(2,"0");return`${e.getFullYear()}-${o(e.getMonth()+1)}-${o(e.getDate())}`}function Li(e,o=new Date){let t=new Date(o);return t.setMonth(t.getMonth()-e),t}function tk(e=new Date){return{fromDate:Jn(Li(1,e)),toDate:Jn(e)}}var Rn=require("react/jsx-runtime"),nk=[{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 js({fromDate:e,toDate:o,onChange:t}){let n=i=>{if(i<=0){t("","");return}t(Jn(Li(i)),Jn(new Date))},r=i=>i<=0?!e&&!o:!e||!o?!1:e===Jn(Li(i))&&o===Jn(new Date);return(0,Rn.jsxs)(kr.Box,{sx:{display:"flex",alignItems:"center",gap:1.5,flexWrap:"wrap"},children:[(0,Rn.jsx)(kr.Box,{sx:{display:"flex",alignItems:"center",gap:1.5},children:nk.map(i=>{let l=r(i.months);return(0,Rn.jsx)(kr.ButtonBase,{onClick:()=>n(i.months),sx:{px:1.25,py:.85,borderRadius:1,fontSize:13,fontWeight:l?500:400,border:"1px solid",borderColor:l?"#2f80ed":"#dedddb",color:l?"#2f80ed":"#37352f",bgcolor:l?"#eef6ff":"transparent","&:hover":{bgcolor:l?"#eef6ff":"#f7f7f5"}},children:i.label},i.label)})}),(0,Rn.jsxs)(kr.Box,{sx:{display:"flex",alignItems:"center",gap:.5},children:[(0,Rn.jsx)(Gs.DateTextField,{value:e,size:"small",placeholder:"\uC2DC\uC791\uC77C",onChange:i=>t(i.target.value,o),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}}),(0,Rn.jsx)(kr.Box,{component:"span",sx:{fontSize:13,color:"#9a9a97"},children:"~"}),(0,Rn.jsx)(Gs.DateTextField,{value:o,size:"small",placeholder:"\uC885\uB8CC\uC77C",onChange:i=>t(e,i.target.value),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}})]})]})}var Ig=require("@mui/material");var Ys=require("react/jsx-runtime");function rk({anchorEl:e,fromDate:o,toDate:t,onChange:n,onClose:r}){return(0,Ys.jsx)(Ig.Popover,{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:(0,Ys.jsx)(js,{fromDate:o,toDate:t,onChange:n})})}var er=require("@mui/material"),wg=a(require("@mui/icons-material/Checklist"),1),Dg=a(require("@mui/icons-material/Face"),1),Eg=a(require("@mui/icons-material/Publish"),1),Mg=a(require("@mui/icons-material/NotificationsOutlined"),1),Og=a(require("@mui/icons-material/BugReportOutlined"),1),Rg=a(require("@mui/icons-material/DescriptionOutlined"),1),Pg=a(require("@mui/icons-material/Inventory2Outlined"),1);var Wt=require("react/jsx-runtime");function _g(e,o){return o>0?`${e} (${o})`:e}var ik=[{id:"my",label:"\uC804\uCCB4",icon:(0,Wt.jsx)(wg.default,{sx:{fontSize:18}})},{id:"notice",label:"\uACF5\uC9C0\uC0AC\uD56D",icon:(0,Wt.jsx)(Mg.default,{sx:{fontSize:18}})},{id:"mine",label:"\uB0B4 \uC5C5\uBB34",icon:(0,Wt.jsx)(Dg.default,{sx:{fontSize:18}})},{id:"sent",label:"\uBCF4\uB0B8 \uC5C5\uBB34",icon:(0,Wt.jsx)(Eg.default,{sx:{fontSize:18}})},{id:"bug",label:"\uC624\uB958",icon:(0,Wt.jsx)(Og.default,{sx:{fontSize:18}})},{id:"archive",label:"\uBCF4\uAD00\uD568",icon:(0,Wt.jsx)(Pg.default,{sx:{fontSize:18}}),hideCount:!0},{id:"report",label:"\uBCF4\uACE0\uC11C",icon:(0,Wt.jsx)(Rg.default,{sx:{fontSize:18}}),hideCount:!0}];function ak(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 lk({items:e,activeTab:o,counts:t,onChange:n,compact:r=!1}){let i=ue(),l=ak(i.tabs),s=e;return r?(0,Wt.jsx)(er.Box,{sx:{display:"flex",flexWrap:"wrap",gap:1.25},children:s.map(f=>{let m=o===f.id;return(0,Wt.jsx)(er.ButtonBase,{onClick:()=>n(f.id),sx:{px:1.5,py:.75,borderRadius:1,fontSize:ct(13.5),fontWeight:500,whiteSpace:"nowrap",border:"1px solid",bgcolor:m?i.tabs.selectedBg:i.tabs.bg,color:m?i.tabs.selectedColor:i.tabs.color,borderColor:m?i.tabs.selectedBg:i.tabs.borderColor},children:_g(f.label,f.hideCount?0:t[f.id]??0)},f.id)})}):(0,Wt.jsx)(er.Tabs,{value:o,onChange:(f,m)=>n(m),sx:{minHeight:46,"& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:"12px",minHeight:46}},children:s.map(f=>(0,Wt.jsx)(er.Tab,{value:f.id,label:_g(f.label,f.hideCount?0:t[f.id]??0),icon:f.icon,iconPosition:"start",sx:l},f.id))})}var or=require("react"),he=require("@mui/material"),zg=a(require("@mui/icons-material/OpenInNewOutlined"),1),qg=a(require("@mui/icons-material/Check"),1),Ag=a(require("@mui/icons-material/CheckCircleOutlined"),1),Lg=a(require("@mui/icons-material/RadioButtonUnchecked"),1),Ng=a(require("@mui/icons-material/SendOutlined"),1),Fg=a(require("@mui/icons-material/EventOutlined"),1),Hg=a(require("@mui/icons-material/PersonOutlineOutlined"),1),Wg=a(require("@mui/icons-material/ViewKanbanOutlined"),1),$g=a(require("@mui/icons-material/ContentCopyOutlined"),1),Vg=a(require("@mui/icons-material/NextPlanOutlined"),1),Ug=a(require("@mui/icons-material/ContentPasteOutlined"),1),Kg=a(require("@mui/icons-material/ShareOutlined"),1),Gg=a(require("@mui/icons-material/DirectionsRunOutlined"),1),Xs=a(require("@mui/icons-material/ChevronRight"),1),jg=a(require("@mui/icons-material/ArchiveOutlined"),1),Yg=a(require("@mui/icons-material/UnarchiveOutlined"),1),Xg=require("@ehfuse/alerts");var te=require("react/jsx-runtime");function sk({target:e,onClose:o,customTabs:t,sprints:n=[],myAccountSeq:r=0,onOpenDetail:i,onToggleCompleted:l,onRequestConfirm:s,onChangeDueDate:f,onChangeReminder:m,onMemberEdit:d,onMoveProject:g,onDuplicate:x,onCreateFollowUp:u,onShare:p,onAssignSprint:_,onArchiveToggle:w,onDelete:T}){let b=je(),M=an(),[C,q]=(0,or.useState)(null),[B,R]=(0,or.useState)(null),[P,z]=(0,or.useState)(null);(0,or.useEffect)(()=>{e||(q(null),R(null),z(null))},[e]);let D=e?.task??null,ee=!!D?.is_notice,h=!!D?.is_event,c=D?!ln(D,r):!1,S=(0,or.useMemo)(()=>new Set(t.filter(E=>E.useSprints).map(E=>E.key)),[t]),k=async(E="one")=>{let Y=D;if(o(),!Y)return;await(0,Xg.ConfirmDialog)({title:"\uC5C5\uBB34 \uC0AD\uC81C",message:E==="series"?`"${Y.title}" \uC758 \uC774 \uD68C\uCC28\uC640 \uC774\uD6C4 \uBC18\uBCF5 \uD68C\uCC28\uB97C \uBAA8\uB450 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`:`"${Y.title}" \uC5C5\uBB34\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&T(Y.seq,E)},y=()=>{D&&w(D.seq,!D.archived),o()};return(0,te.jsxs)(te.Fragment,{children:[(0,te.jsxs)(he.Menu,{open:!!e,onClose:o,transitionDuration:0,anchorReference:b?"none":"anchorPosition",anchorPosition:!b&&e?{top:e.position.top,left:e.position.left}:void 0,slotProps:{paper:{sx:{minWidth:190,...b?{position:"fixed",top:"50%",left:"50%",translate:"-50% -50%",maxHeight:"70vh"}:{}}},list:b?{sx:{"& .MuiMenuItem-root":{py:1,minHeight:0}}}:void 0},children:[(0,te.jsxs)(he.MenuItem,{onClick:()=>{D&&i(D),o()},sx:{fontSize:14},children:[(0,te.jsx)(he.ListItemIcon,{children:(0,te.jsx)(zg.default,{sx:{fontSize:19}})}),"\uC0C1\uC138 \uC5F4\uAE30"]}),(0,te.jsxs)(he.MenuItem,{disabled:ee?(D?.author_account_seq??0)!==r:(D?.author_account_seq??0)!==r&&(D?.manager_account_seq??0)!==r,onClick:()=>{D&&l(D.seq,!D.completed),o()},sx:{fontSize:14},children:[(0,te.jsx)(he.ListItemIcon,{children:D?.completed?(0,te.jsx)(Lg.default,{sx:{fontSize:19}}):(0,te.jsx)(Ag.default,{sx:{fontSize:19}})}),D?.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC"]}),!ee&&s?(0,te.jsxs)(he.MenuItem,{disabled:!(D?.manager_account_seq??0)&&(D?.receiver_account_seqs??[]).length===0,onClick:()=>{D&&s(D),o()},sx:{fontSize:14},children:[(0,te.jsx)(he.ListItemIcon,{children:(0,te.jsx)(Ng.default,{sx:{fontSize:19}})}),"\uD655\uC778 \uC694\uCCAD"]}):null,h?null:(0,te.jsx)(he.Divider,{}),h?null:(0,te.jsxs)(he.MenuItem,{disabled:c,onClick:E=>{D&&q({anchorEl:E.currentTarget,task:D})},sx:{fontSize:14},children:[(0,te.jsx)(he.ListItemIcon,{children:(0,te.jsx)(Fg.default,{sx:{fontSize:19}})}),"\uB9C8\uAC10\uAE30\uD55C \uBCC0\uACBD"]}),!ee&&!h&&d?(0,te.jsxs)(he.MenuItem,{onClick:()=>{D&&d(D,"manager"),o()},sx:{fontSize:14},children:[(0,te.jsx)(he.ListItemIcon,{children:(0,te.jsx)(Hg.default,{sx:{fontSize:19}})}),"\uCC45\uC784\uC790 \uBCC0\uACBD"]}):null,h?null:(0,te.jsxs)(he.MenuItem,{disabled:c,onClick:E=>{D&&R({anchorEl:E.currentTarget,task:D})},sx:{fontSize:14},children:[(0,te.jsx)(he.ListItemIcon,{children:(0,te.jsx)(Wg.default,{sx:{fontSize:19}})}),"\uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9",(0,te.jsx)(Xs.default,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}),(0,te.jsx)(he.Divider,{}),x?(0,te.jsxs)(he.MenuItem,{disabled:c,onClick:()=>{D&&x(D.seq),o()},sx:{fontSize:14},children:[(0,te.jsx)(he.ListItemIcon,{children:(0,te.jsx)($g.default,{sx:{fontSize:19}})}),"\uBCF5\uC81C"]}):null,u&&D&&!D.is_event&&!D.is_notice?(0,te.jsxs)(he.MenuItem,{onClick:()=>{D&&u(D.seq),o()},sx:{fontSize:14},children:[(0,te.jsx)(he.ListItemIcon,{children:(0,te.jsx)(Vg.default,{sx:{fontSize:19}})}),"\uD6C4\uC18D \uC5C5\uBB34 \uB9CC\uB4E4\uAE30"]}):null,(0,te.jsxs)(he.MenuItem,{onClick:()=>{D&&(p?p(D):hr(D,b)),o()},sx:{fontSize:14},children:[(0,te.jsx)(he.ListItemIcon,{children:b?(0,te.jsx)(Kg.default,{sx:{fontSize:19}}):(0,te.jsx)(Ug.default,{sx:{fontSize:19}})}),b?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC"]}),D&&!D.is_notice&&!D.is_event&&S.has(String(D.tab_key??""))&&_?(0,te.jsxs)(he.MenuItem,{onClick:E=>z(E.currentTarget),sx:{fontSize:14},children:[(0,te.jsx)(he.ListItemIcon,{children:(0,te.jsx)(Gg.default,{sx:{fontSize:19}})}),"\uBAA9\uD45C\uC5D0 \uB123\uAE30",(0,te.jsx)(Xs.default,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}):null,(0,te.jsxs)(he.MenuItem,{onClick:y,disabled:c||!D?.archived&&!(D&&ti(D)),sx:{fontSize:14},children:[(0,te.jsx)(he.ListItemIcon,{children:D?.archived?(0,te.jsx)(Yg.default,{sx:{fontSize:19}}):(0,te.jsx)(jg.default,{sx:{fontSize:19}})}),D?.archived?"\uBCF4\uAD00 \uD574\uC81C":"\uBCF4\uAD00"]}),(0,te.jsx)(he.Divider,{}),(0,te.jsxs)(he.MenuItem,{disabled:c,onClick:()=>{k("one")},sx:{fontSize:14,color:"#e5484d"},children:[(0,te.jsx)(he.ListItemIcon,{children:(0,te.jsx)(sn,{sx:{fontSize:19,color:"#e5484d"}})}),(D?.repeat_group_key??0)>0?"\uC0AD\uC81C (\uC774 \uD68C\uCC28\uB9CC)":"\uC0AD\uC81C"]}),(D?.repeat_group_key??0)>0?(0,te.jsxs)(he.MenuItem,{disabled:c,onClick:()=>{k("series")},sx:{fontSize:14,color:"#e5484d"},children:[(0,te.jsx)(he.ListItemIcon,{children:(0,te.jsx)(sn,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC0AD\uC81C (\uC774\uD6C4 \uBC18\uBCF5 \uC804\uCCB4)"]}):null]}),(0,te.jsx)(jt,{anchorEl:C?.anchorEl??null,open:!!C,date:C?.task.due_date??"",reminder:C?.task.reminder??"none",hideReminder:!!C?.task.completed,centered:b,onClose:()=>{q(null),o()},onDateChange:E=>{C&&f(C.task.seq,E)},onReminderChange:E=>{C&&m?.(C.task.seq,E)}}),(0,te.jsxs)(he.Menu,{transitionDuration:0,anchorEl:B?.anchorEl??null,open:!!B,onClose:()=>{R(null),o()},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...M,children:[(0,te.jsx)(he.MenuItem,{selected:!B?.task.tab_key,onClick:()=>{B&&g(B.task.seq,""),R(null),o()},sx:{fontSize:14,minWidth:170},children:"\uC5C6\uC74C"}),t.filter(E=>!E.archived).map(E=>(0,te.jsx)(he.MenuItem,{selected:B?.task.tab_key===E.key,onClick:()=>{B&&g(B.task.seq,E.key),R(null),o()},sx:{fontSize:14,minWidth:170},children:E.label},E.key))]}),(0,te.jsx)(he.Menu,{transitionDuration:0,anchorEl:P,open:!!P,onClose:()=>z(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...n.filter(E=>`custom-${E.group_seq}`===String(D?.tab_key??"")).map(E=>({seq:E.seq,label:It(E)}))].map(E=>(0,te.jsxs)(he.MenuItem,{onClick:()=>{D&&_?.(D.seq,E.seq),z(null),o()},sx:{fontSize:14,minWidth:160,gap:1},children:[E.label,(D?.sprint_seq??0)===E.seq?(0,te.jsx)(qg.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},E.seq))})]})}var Pn=require("@mui/material");var tr=require("react/jsx-runtime");function ck({anchorEl:e,labelOptions:o,selectedKeys:t,onToggle:n,onClear:r,onClose:i}){return(0,tr.jsxs)(Pn.Menu,{transitionDuration:0,anchorEl:e,open:!!e,onClose:i,children:[o.map(l=>{let s=t.includes(l.key);return(0,tr.jsxs)(Pn.MenuItem,{onClick:()=>n(l.key),sx:{fontSize:14,minWidth:190,gap:1},children:[(0,tr.jsx)(Pn.Checkbox,{size:"small",checked:s,sx:{p:0}}),(0,tr.jsx)(Ge,{option:l})]},l.key)}),(0,tr.jsx)(Pn.Divider,{}),(0,tr.jsx)(Pn.MenuItem,{disabled:t.length===0,onClick:()=>{r(),i()},sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}var zn=require("@mui/material"),Qg=a(require("@mui/icons-material/Check"),1),Zg=a(require("@mui/icons-material/BarChartOutlined"),1),Jg=a(require("@mui/icons-material/SettingsOutlined"),1);var on=require("react/jsx-runtime");function mk(e){let{anchorEl:o,sprints:t,value:n,onSelect:r,onManage:i,onCharts:l,onClose:s}=e;return(0,on.jsxs)(zn.Menu,{transitionDuration:0,anchorEl:o,open:!!o,onClose:s,children:[[{seq:0,label:"\uC804\uCCB4"},{seq:-1,label:"\uBBF8\uBC30\uC815 \uC5C5\uBB34"},...t.map(f=>({seq:f.seq,label:It(f)}))].map(f=>(0,on.jsxs)(zn.MenuItem,{onClick:()=>{r(f.seq),s()},sx:{fontSize:14,minWidth:180,gap:1},children:[f.label,n===f.seq?(0,on.jsx)(Qg.default,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},f.seq)),(0,on.jsx)(zn.Divider,{}),l?(0,on.jsxs)(zn.MenuItem,{onClick:()=>{s(),l()},sx:{fontSize:14,gap:1},children:[(0,on.jsx)(Zg.default,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uCC28\uD2B8"]}):null,l?(0,on.jsx)(zn.Divider,{}):null,(0,on.jsxs)(zn.MenuItem,{onClick:()=>{s(),i()},sx:{fontSize:14,gap:1},children:[(0,on.jsx)(Jg.default,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uAD00\uB9AC\u2026"]})]})}var uk={my:"tasks",mine:"tasks",sent:"tasks",notice:"notice",bug:"bug",archive:"archive",done:"done",report:"report"};function ob(e){return uk[e]??"tasks"}var dk={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"},eb=["list","calendar","month","card","kanban","sprint","timeline"],pk=["list","card"];function fk(e){let o=ob(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:eb,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:pk,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:eb,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"}:{}}}}
|
|
14
14
|
//# sourceMappingURL=index.js.map
|