@ehfuse/taskbox 0.5.132 → 0.5.134
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 +2 -2
- 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.esm.js
CHANGED
|
@@ -3,12 +3,12 @@ var Fl="waiting",IS="replied";import{createContext as mu,useContext as uu,useMem
|
|
|
3
3
|
`).replace(/<\/(p|div|li|h[1-6]|blockquote)>/gi,`
|
|
4
4
|
`),t=document.createElement("div");return t.innerHTML=o,(t.textContent??"").replace(/\n{3,}/g,`
|
|
5
5
|
|
|
6
|
-
`).trim()}function Di({syncKey:e,value:o,onChange:t,readOnly:n=!1,minHeight:r=180,height:i=0,onChangeHeight:a}){let l=Sn(null),d=Sn(null),c=i>0?i:0,s=Sn(c),f=Sn(a);f.current=a;let p=Sn(null),m=Sn(Date.now()+800),[g,M]=bk(!1),v=Oe();nl(()=>{if(n)return;let x=il(o);p.current===x||p.current===o||(p.current=x,m.current=Date.now()+800,l.current?.setHtml(x))},[e,o,n]);let h=Sn(-1);return nl(()=>{if(n||v||i<=0||h.current===i||(h.current=i,Math.abs(i-s.current)<1))return;let x=d.current?.querySelector(".ehfuse-editor-container");x&&(Math.abs(x.getBoundingClientRect().height-i)<1||(x.style.height=`${i}px`,s.current=i))},[n,v,i]),nl(()=>{if(n||v)return;let x=d.current?.querySelector(".ehfuse-editor-container");if(!x||typeof ResizeObserver>"u")return;let B,S=new ResizeObserver(D=>{let y=Math.round(D[0]?.contentRect.height??0);y<=0||(window.clearTimeout(B),B=window.setTimeout(()=>{Math.abs(y-s.current)<1||(s.current=y,f.current?.(y))},300))});return S.observe(x),()=>{window.clearTimeout(B),S.disconnect()}},[n,v]),n?Ik(rl,{sx:{position:"relative",mt:1},children:[Bn(rl,{sx:{border:"1px solid #e0e0e0",borderRadius:1,p:"12px",pr:"40px",minHeight:r,fontSize:16,lineHeight:1.6,color:"#37352f",wordBreak:"break-word",userSelect:"none","& > p:first-of-type":{mt:0},"& > p:last-of-type":{mb:0}},dangerouslySetInnerHTML:{__html:il(o)}}),Bn(Tk,{title:"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:Bn(kk,{size:"small","aria-label":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>{navigator.clipboard.writeText(vk(o)).then(()=>{M(!0),window.setTimeout(()=>M(!1),1500)})},sx:{position:"absolute",top:6,right:6,color:"#9a9a97"},children:g?Bn(Sk,{sx:{fontSize:17,color:"#2f9e5b"}}):Bn(yk,{sx:{fontSize:17}})})})]}):Bn(rl,{ref:d,onDragOver:x=>x.stopPropagation(),onDrop:x=>x.stopPropagation(),sx:{mt:1,"& .ehfuse-editor-content > p:first-of-type":{mt:0},"& .ehfuse-editor-content > p:last-of-type":{mb:0},"& .ehfuse-editor-content.ehfuse-editor-empty::before":{top:"12px",left:"12px"}},children:Bn(Bk,{ref:l,defaultValue:il(o),autoHeight:v,resizable:!v,showToolbar:!v,focusBorder:!0,styles:{focusBorderColor:"var(--primary)"},toolbarOptions:Ck,locale:"ko",minHeight:c||r,placeholder:"\uB0B4\uC6A9\uC744 \uC785\uB825\uD558\uC138\uC694",contentStyle:{padding:"12px"},onChange:x=>{let B=Date.now()<m.current,S=x===p.current;p.current=x,!(B||S)&&t(x)}})})}import{useState as Dr}from"react";import{Box as ko,Button as Uc,Dialog as Lk,IconButton as Zn,TextField as Nk,Tooltip as Vc}from"@mui/material";import Gc from"@mui/icons-material/Close";import Fk from"@mui/icons-material/AddCircle";import Yc from"@mui/icons-material/AddTask";import Hk from"@mui/icons-material/Checklist";import Wk from"@mui/icons-material/CheckCircle";import $k from"@mui/icons-material/Launch";import Kk from"@mui/icons-material/LinkOutlined";import Uk from"@mui/icons-material/RadioButtonUnchecked";import{useEffect as _k,useMemo as wk,useState as al}from"react";import{Box as Pt,Button as Dk,Tab as Ek,Tabs as Mk}from"@mui/material";import{FormDialog as Ok}from"@ehfuse/mui-form-dialog";import{ClearTextField as Rk}from"@ehfuse/mui-form-controls";import{ErrorAlert as Pk}from"@ehfuse/alerts";import zk from"@mui/icons-material/CheckCircle";import qk from"@mui/icons-material/RadioButtonUnchecked";import{OverlayScrollbar as Ak}from"@ehfuse/overlay-scrollbar";import{jsx as po,jsxs as ll}from"react/jsx-runtime";var Kc=[{type:"related",label:"\uAD00\uB828",hint:"\uB2E8\uC21C\uD788 \uAD00\uB828 \uC788\uB294 \uC5C5\uBB34\uB85C \uC5F0\uACB0\uD569\uB2C8\uB2E4"},{type:"follow_up",label:"\uC774\uC804 \uC5C5\uBB34",hint:"\uC774 \uC5C5\uBB34\uAC00 \uC120\uD0DD\uD55C \uC5C5\uBB34\uC5D0\uC11C \uC774\uC5B4\uC9C4 \uD6C4\uC18D\uC784\uC744 \uD45C\uC2DC\uD569\uB2C8\uB2E4(\uC774\uB825 \uD0C0\uC784\uB77C\uC778)"},{type:"duplicate_of",label:"\uC911\uBCF5(\uC6D0\uBCF8)",hint:"\uC774 \uC5C5\uBB34\uAC00 \uC120\uD0DD\uD55C \uC6D0\uBCF8 \uC5C5\uBB34\uC758 \uC911\uBCF5\uC784\uC744 \uD45C\uC2DC\uD569\uB2C8\uB2E4"}];function Ei({open:e,task:o,tasks:t,excludeSeqs:n=[],onClose:r,onSubmit:i,hideRelationType:a=!1,title:l="\uAD00\uB828 \uC5C5\uBB34 \uC5F0\uACB0",confirmLabel:d="\uC5F0\uACB0",multiSelect:c=!1}){let s=Oe(),[f,p]=al("related"),[m,g]=al(""),[M,v]=al([]);_k(()=>{e&&(p("related"),g(""),v([]))},[e]);let h=wk(()=>{let y=new Set([o.seq,...n]),w=m.trim().toLowerCase();return t.filter(T=>y.has(T.seq)||T.is_event||T.is_notice?!1:w?T.title.toLowerCase().includes(w)||(T.ticket_no??"").toLowerCase().includes(w):!0).sort((T,b)=>!!T.completed!=!!b.completed?T.completed?1:-1:b.seq-T.seq)},[t,o.seq,n,m]),x=()=>{if(M.length===0){Pk("\uC5F0\uACB0\uD560 \uC5C5\uBB34\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}for(let y of M)i(y,f);r()},B=y=>{v(w=>w.includes(y)?w.filter(T=>T!==y):c?[...w,y]:[y])},S=Kc.find(y=>y.type===f)?.hint??"",D=ll(Pt,{sx:{...s?{height:"100%",minHeight:0}:{height:560},display:"flex",flexDirection:"column",...s?{}:{border:"1px solid #cccccc",borderRadius:1},overflow:"hidden",userSelect:"none"},children:[a?null:po(Mk,{value:f,onChange:(y,w)=>p(w),sx:{minHeight:38,mb:.75,flexShrink:0,"& .MuiTab-root":{minHeight:38,py:.5,fontSize:14}},children:Kc.map(y=>po(Ek,{value:y.type,label:y.label},y.type))}),a?null:po(Pt,{sx:{mb:1.5,fontSize:12.5,color:"#9a9a97"},children:S}),po(Pt,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:po(Rk,{placeholder:"\uC81C\uBAA9\xB7\uD2F0\uCF13\uBC88\uD638\uB85C \uAC80\uC0C9",value:m,onChange:y=>g(y.target.value),fullWidth:!0,autoFocus:!0,size:"small",sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),po(Pt,{sx:{flex:1,minHeight:0},children:po(Ak,{style:{height:"100%"},contentStyle:{paddingLeft:8,paddingRight:8,paddingTop:8},children:po(Pt,{sx:{display:"flex",flexDirection:"column","&::after":{content:'""',flexShrink:0,height:"8px"}},children:h.length===0?po(Pt,{sx:{py:4,textAlign:"center",fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uD560 \uC218 \uC788\uB294 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):h.map(y=>{let w=Ve(y.icon||Me),T=M.includes(y.seq);return ll(Pt,{onClick:()=>B(y.seq),sx:{display:"flex",alignItems:"flex-start",gap:.75,px:1.25,py:1,mb:1,flexShrink:0,"&:last-of-type":{mb:0},cursor:"pointer",border:"1px solid",borderColor:T?"#9dc0ee":"#e6e6e3",borderRadius:1.5,bgcolor:T?"#e3eefb":"#fff","&:hover":{bgcolor:T?"#e3eefb":"#f7f7f5"}},children:[T?po(zk,{sx:{fontSize:20,flexShrink:0,mt:"1px",color:"#2f6fd0"}}):po(qk,{sx:{fontSize:20,flexShrink:0,mt:"1px",color:"#c9c8c5"}}),w?po(w,{sx:{fontSize:17,flexShrink:0,mt:"3px",color:y.icon_color||"#1e3a8a"}}):null,ll(Pt,{component:"span",sx:{flex:1,minWidth:0,fontSize:15,color:"#37352f",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:3,overflow:"hidden",lineHeight:1.5,wordBreak:"break-word"},children:[y.ticket_no?`${y.ticket_no} `:"",y.title]}),po(Pt,{sx:{flexShrink:0,mt:"1px"},children:po(Re,{option:Io(y)})})]},y.seq)})})})})]});return po(Ok,{open:e,onClose:r,maxWidth:"sm",fullScreen:s,mobilePresentation:s?"slide":"dialog",...s?{contentPaddingX:0,contentTopPadding:0,sectionsPaddingTop:0}:{},sx:s?{DialogContent:{"& .os-content > div":{height:"100%",boxSizing:"border-box"},"& .FormSection-content, & .section-content":{height:"100%"}}}:void 0,title:l,locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-task-link",sections:[{id:"task-link",showTitle:!1,children:D}],scrollPastLastSection:!1,sectionContentPaddingTop:0,actions:{showCancelButton:!0,right:po(Dk,{variant:"contained",disabled:M.length===0,onClick:x,children:d})}})}import{Fragment as Vk,jsx as ke,jsxs as Jt}from"react/jsx-runtime";function Mi({taskSeq:e,checklist:o,onAdd:t,onToggle:n,onRemove:r,onUpdate:i,removeLocked:a=!1,onConvertToTask:l,onOpenLinkedTask:d,linkCandidates:c,linkBaseTask:s,onLinkExistingTask:f,resolveLinkedTask:p}){let[m,g]=Dr(""),[M,v]=Dr(!1),[h,x]=Dr(null),B=Oe(),[S,D]=Dr(null),[y,w]=Dr(null),T=z=>{let u=z.task_seq?p?.(z.task_seq):void 0;return u?u.completed:z.checked},b=o.filter(T).length,I=()=>{m.trim()&&(t(e,m),g(""))};return Jt(Wo,{icon:ke(Hk,{sx:{fontSize:19,display:"block"}}),title:Jt(Vk,{children:["\uD560\uC77C",o.length>0?Jt(ko,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:[b," / ",o.length]}):null]}),titleExtra:o.length>0?ke(ko,{sx:{flex:1,minWidth:0,ml:1,height:6,borderRadius:3,bgcolor:"#ececea"},children:ke(ko,{sx:{height:"100%",borderRadius:3,width:`${Math.round(b/o.length*100)}%`,bgcolor:"#2f80ed",transition:"width 0.2s"}})}):null,children:[ke(ko,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:o.map((z,u)=>{let k=z.task_seq?p?.(z.task_seq):void 0,R=T(z),A=!!z.task_seq;return Jt(ko,{sx:{display:"flex",alignItems:"center",gap:1,px:1.25,py:.5,borderRadius:1,"&:hover":{bgcolor:"#f7f7f5"},"&:hover .taskbox-checklist-remove":{opacity:1},"&:hover .taskbox-checklist-convert":{opacity:1}},children:[ke(ko,{component:"span",onClick:()=>n(e,u,!R),sx:{display:"inline-flex",flexShrink:0,cursor:"pointer"},children:R?ke(Wk,{sx:{fontSize:18,color:"#2f80ed"}}):ke(Uk,{sx:{fontSize:18,color:"#9a9a97"}})}),h?.index===u?ke(ko,{component:"input",autoFocus:!0,spellCheck:!1,value:h.label,enterKeyHint:"done",onChange:L=>x({index:u,label:L.target.value}),onBlur:()=>{h.label.trim()&&h.label.trim()!==z.label&&i?.(e,u,h.label),x(null)},onKeyDown:L=>{L.key==="Enter"&&L.target.blur(),L.key==="Escape"&&x(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",p:0}}):ke(ko,{component:"span",onClick:A?z.task_seq&&d?()=>d(z.task_seq):void 0:a||!i?void 0:B?()=>D({index:u,label:z.label}):()=>x({index:u,label:z.label}),sx:{flex:1,minWidth:0,fontSize:14.5,color:"#37352f",textDecoration:R?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...A?d?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}:a||!i?{}:{cursor:"text"}},children:z.label}),A?Jt(ko,{component:"span",onClick:z.task_seq&&d?()=>d(z.task_seq):void 0,sx:{display:"inline-flex",alignItems:"center",gap:.4,flexShrink:0,px:.75,py:.2,borderRadius:1,fontSize:12,fontWeight:500,color:"#1d4f91",bgcolor:"#e3eefb",whiteSpace:"nowrap",...d?{cursor:"pointer"}:{}},children:[ke($k,{sx:{fontSize:12}}),k?.manager_name?.trim()||"\uC5C5\uBB34"]}):null,!a&&!A&&l?ke(Vc,{title:"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",arrow:!0,enterDelay:300,disableInteractive:!0,children:ke(Zn,{className:"taskbox-checklist-convert",size:"small","aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:L=>w({anchorEl:L.currentTarget,index:u,label:z.label}),sx:{display:B?"none":"inline-flex",opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:ke(Yc,{sx:{fontSize:16}})})}):null,a?null:ke(Zn,{className:"taskbox-checklist-remove",size:"small","aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>r(e,u),sx:{display:B?"none":"inline-flex",opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:ke(Gc,{sx:{fontSize:15}})})]},`${z.label}-${u}`)})}),Jt(ko,{sx:{mt:.5,ml:3.25,display:"flex",alignItems:"center",gap:.5},children:[ke(ko,{component:"input",spellCheck:!1,value:m,placeholder:"+ \uD560\uC77C \uCD94\uAC00",enterKeyHint:"done",onChange:z=>g(z.target.value),onKeyDown:z=>{z.key==="Enter"&&I()},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",px:1.25,py:.75,"&::placeholder":{color:"#9a9a97"}}}),c&&s&&f?ke(Vc,{title:"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",arrow:!0,children:ke(Zn,{size:"small","aria-label":"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",onMouseDown:z=>z.preventDefault(),onClick:()=>v(!0),sx:{flexShrink:0,color:"#9a9a97"},children:ke(Kk,{sx:{fontSize:20}})})}):null,ke(Zn,{size:"small","aria-label":"\uD560\uC77C \uCD94\uAC00",disabled:!m.trim(),onMouseDown:z=>z.preventDefault(),onClick:I,sx:{flexShrink:0,color:m.trim()?"#2f80ed":"#c9c8c5"},children:ke(Fk,{sx:{fontSize:20}})})]}),c&&s&&f?ke(Ei,{open:M,task:s,tasks:c,excludeSeqs:o.map(z=>Number(z.task_seq??0)).filter(z=>z>0),hideRelationType:!0,multiSelect:!0,title:"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",confirmLabel:"\uBD99\uC774\uAE30",onClose:()=>v(!1),onSubmit:z=>{let u=c.find(k=>k.seq===z);f(e,z,String(u?.title??"").trim())}}):null,ke(We,{open:!!y,anchorEl:y?.anchorEl??null,title:"\uC774 \uD560\uC77C\uC744 \uBCC4\uB3C4 \uC5C5\uBB34\uB85C \uB9CC\uB4DC\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uB9CC\uB4E4\uAE30",onCancel:()=>w(null),onConfirm:()=>{y&&l?.(e,y.index,y.label),w(null)}}),ke(Lk,{open:!!S,onClose:()=>D(null),maxWidth:"xs",fullWidth:!0,slotProps:{paper:{sx:{borderRadius:2,m:2}}},children:Jt(ko,{sx:{p:2,display:"flex",flexDirection:"column",gap:1.5},children:[ke(ko,{sx:{fontSize:15.5,fontWeight:600,color:"#37352f"},children:"\uD560\uC77C \uC218\uC815"}),ke(Nk,{autoFocus:!0,fullWidth:!0,size:"medium",value:S?.label??"",onChange:z=>D(u=>u&&{...u,label:z.target.value}),onKeyDown:z=>{if(z.key!=="Enter")return;let u=S;u&&u.label.trim()&&i?.(e,u.index,u.label.trim()),D(null)}}),Jt(ko,{sx:{display:"flex",alignItems:"center",gap:1},children:[!a&&l&&S&&!o[S.index]?.task_seq?ke(Zn,{"aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:()=>{l(e,S.index,o[S.index]?.label??""),D(null)},sx:{color:"#57564f"},children:ke(Yc,{sx:{fontSize:20}})}):null,!a&&S?ke(Zn,{"aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>{r(e,S.index),D(null)},sx:{color:"#e5484d"},children:ke(Gc,{sx:{fontSize:19}})}):null,ke(ko,{sx:{flex:1}}),ke(Uc,{color:"inherit",onClick:()=>D(null),children:"\uCDE8\uC18C"}),ke(Uc,{variant:"contained",disabled:!S?.label.trim(),onClick:()=>{S&&S.label.trim()&&i?.(e,S.index,S.label.trim()),D(null)},children:"\uD655\uC778"})]})]})})]})}import{useRef as Zk,useState as Jk}from"react";import{Box as mt,IconButton as eT}from"@mui/material";import oT from"@mui/icons-material/Close";import Qc from"@mui/icons-material/AttachFileOutlined";var Gk=new Set(["jpg","jpeg","png","gif","bmp","webp","svg","pdf","txt","json","xml","log","md","markdown","csv","xls","xlsx","html","htm","js","jsx","ts","tsx","css","scss","sass","less","php","py","java","c","cpp","h","hpp","cs","go","rs","rb","swift","kt","scala","sql","sh","bash","bat","ps1","yml","yaml","toml","ini","conf","mp4","avi","mov","wmv","flv","webm","mp3","wav","ogg","m4a","aac"]),Oi=e=>{let o=e?.split(".").pop()?.toLowerCase()??"";return Gk.has(o)};import{LinearProgress as Yk}from"@mui/material";import{Fragment as jk,jsx as Qk,jsxs as Xk}from"react/jsx-runtime";function jc(e){let o=gt(),t=o.useValue("attachmentUpload.taskSeq"),n=o.useValue("attachmentUpload.index"),r=o.useValue("attachmentUpload.total"),i=o.useValue("attachmentUpload.queue"),a=n??0;return!a||e>0&&(t??0)!==e?null:{index:a,total:r??0,queue:i??[]}}function sl(){let o=gt().useValue("attachmentUpload.progress");return Xk(jk,{children:[o??0,"%"]})}function Xc(){let o=gt().useValue("attachmentUpload.progress");return Qk(Yk,{variant:"determinate",value:o??0,sx:{height:4,borderRadius:2,bgcolor:"#dbe9fb",mt:.75}})}import{Fragment as tT,jsx as Do,jsxs as Er}from"react/jsx-runtime";function Ri(e){return e>=1048576?`${(e/1048576).toFixed(1)}MB`:`${Math.max(1,Math.round(e/1024))}KB`}var Pi={flex:1,minWidth:0,fontSize:13.5,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"};function zi({taskSeq:e,attachments:o,onAdd:t,onRemove:n,removeLocked:r=!1,onPreview:i,onDownload:a}){let[l,d]=Jk(!1),c=Zk(null),s=Oe(),f=dr(),p=ur(),m=jc(e),g=e===0,M=S=>{if(i){i(S);return}window.open(p(S.uuid??""),"_blank","noopener,noreferrer")},v=S=>{if(a){a(S);return}window.open(p(S.uuid??"",{download:!0}),"_blank","noopener,noreferrer")},h=S=>m?S+1<m.index?"done":S+1===m.index?"uploading":"waiting":"waiting",x=(S,D,y,w={})=>Er(mt,{sx:{px:1,py:.5,borderRadius:1,border:"1px solid",borderColor:w.uploading?"#d5e6fb":"#e6e6e3",bgcolor:w.uploading?"#f4f9ff":"transparent","&:hover .taskbox-file-remove":{opacity:1}},children:[Er(mt,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[Do(Qc,{sx:{fontSize:16,color:"#9a9a97"}}),D,Do(mt,{component:"span",sx:{fontSize:12,color:w.uploading?"#2f80ed":"#9a9a97",flexShrink:0},children:y}),w.removeIndex!==void 0?Do(eT,{className:"taskbox-file-remove",size:"small","aria-label":"\uCCA8\uBD80 \uC0AD\uC81C",onClick:()=>n(e,w.removeIndex),sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:Do(oT,{sx:{fontSize:15}})}):null]}),w.uploading?Do(Xc,{}):null]},S),B=S=>{let D=Oi(S.name);return Do(mt,{component:"button",type:"button",onClick:()=>D?M(S):v(S),title:`${S.name} ${D?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`,sx:{...Pi,color:"#37352f",textAlign:"left",p:0,border:"none",background:"none",font:"inherit",fontSize:13.5,cursor:"pointer","&:hover":{textDecoration:"underline",color:"#2f80ed"}},children:S.name})};return Er(Wo,{icon:Do(Qc,{sx:{fontSize:18,display:"block"}}),title:Er(tT,{children:["\uD30C\uC77C ",o.length>0?o.length:""]}),children:[Er(mt,{sx:{display:"flex",flexDirection:"column",gap:.5,mt:1},children:[o.map((S,D)=>{let y=`${S.uuid||S.name}-${D}`;if(g){let w=h(D),T=w==="uploading";return x(y,Do(mt,{component:"span",sx:{...Pi,color:w==="done"?"#37352f":"#9a9a97"},children:S.name}),T?Do(sl,{}):Ri(S.size),{uploading:T,removeIndex:!r&&!m?D:void 0})}return S.uuid?x(y,B(S),Ri(S.size),{removeIndex:r?void 0:D}):x(y,Do(mt,{component:"span",title:"\uC2E4\uD30C\uC77C\uC774 \uC5C6\uB294 \uC774\uC804 \uBC29\uC2DD \uCCA8\uBD80\uC785\uB2C8\uB2E4(\uB2E4\uC6B4\uB85C\uB4DC \uBD88\uAC00) \u2014 \uB2E4\uC2DC \uCCA8\uBD80\uD574 \uC8FC\uC138\uC694.",sx:{...Pi,color:"#9a9a97"},children:S.name}),Ri(S.size),{removeIndex:r?void 0:D})}),!g&&m?m.queue.slice(m.index-1).map((S,D)=>{let y=D===0;return x(`uploading-${m.index+D}-${S.name}`,Do(mt,{component:"span",sx:{...Pi,color:"#9a9a97"},children:S.name}),y?Do(sl,{}):Ri(S.size),{uploading:y})}):null]}),Do(mt,{onClick:()=>c.current?.click(),onDragOver:S=>{S.preventDefault(),d(!0)},onDragLeave:()=>d(!1),onDrop:S=>{S.preventDefault(),d(!1);let D=Array.from(S.dataTransfer.files);D.length>0&&t(e,D)},sx:{mt:1,py:2.5,display:"flex",alignItems:"center",justifyContent:"center",gap:.5,border:"1.5px dashed",borderColor:l?"#2f80ed":"#cfcfcc",borderRadius:1,bgcolor:l?"#eef6ff":"transparent",color:"#787774",fontSize:13.5,cursor:"pointer",transition:"background-color 0.15s, border-color 0.15s","&:hover":{bgcolor:"#fafaf9",borderColor:"#9a9a97"}},children:s?`\uD30C\uC77C\uC744 \uCCA8\uBD80\uD558\uC138\uC694 (\uCD5C\uB300 ${f}MB)`:`\uD30C\uC77C\uC744 \uB04C\uC5B4\uB2E4 \uB193\uAC70\uB098 \uD074\uB9AD\uD574 \uCCA8\uBD80\uD558\uC138\uC694 (\uCD5C\uB300 ${f}MB)`}),Do(mt,{component:"input",ref:c,type:"file",multiple:!0,onChange:S=>{let D=Array.from(S.target.files??[]);D.length>0&&t(e,D),S.target.value=""},sx:{display:"none"}})]})}import{useState as cT}from"react";import{Checkbox as mT,Divider as uT,ListItemIcon as dT,Menu as pT,MenuItem as om}from"@mui/material";import fT from"@mui/icons-material/Add";import{useEffect as nT,useState as Zc}from"react";import{Box as cl,Button as rT}from"@mui/material";import{FormDialog as iT}from"@ehfuse/mui-form-dialog";import{ClearTextField as aT}from"@ehfuse/mui-form-controls";import{ColorPicker as lT}from"@ehfuse/mui-color-picker";import{ErrorAlert as sT}from"@ehfuse/alerts";import{jsx as Mr,jsxs as ml}from"react/jsx-runtime";var Jc="#2f80ed";function em({open:e,onClose:o,onSubmit:t}){let[n,r]=Zc(""),[i,a]=Zc(Jc);nT(()=>{e&&(r(""),a(Jc))},[e]);let l=()=>{let s=n.trim();if(!s){sT("\uB77C\uBCA8 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}t(s,i),o()},d=as(i),c=ml(cl,{children:[ml(cl,{sx:{display:"flex",alignItems:"center",gap:1.5,mt:.5},children:[Mr(aT,{label:"\uB77C\uBCA8 \uC774\uB984",value:n,onChange:s=>r(s.target.value),onKeyDown:s=>{s.key==="Enter"&&(s.preventDefault(),l())},fullWidth:!0,autoFocus:!0}),Mr(lT,{value:i,onChange:s=>a(s),shape:"circle",colorSize:28})]}),ml(cl,{sx:{mt:2,display:"flex",alignItems:"center",gap:1,fontSize:13,color:"#787774"},children:["\uBBF8\uB9AC\uBCF4\uAE30",Mr(Re,{option:{key:"__preview__",name:n.trim()||"\uB77C\uBCA8",...d}})]})]});return Mr(iT,{open:e,onClose:o,maxWidth:"xs",title:"\uC0C8 \uB77C\uBCA8 \uCD94\uAC00",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-add-label",sections:[{id:"add-label",showTitle:!1,children:c}],actions:{showCancelButton:!0,right:Mr(rT,{variant:"contained",onClick:l,children:"\uCD94\uAC00"})}})}import{Fragment as xT,jsx as Jn,jsxs as qi}from"react/jsx-runtime";function Ai({anchorEl:e,selectedKeys:o,labelOptions:t,onToggle:n,onAddLabel:r,onClose:i}){let[a,l]=cT(!1),d=nt();return qi(xT,{children:[qi(pT,{anchorEl:e,open:!!e,onClose:i,transitionDuration:0,...d,children:[t.map(c=>{let s=o.includes(c.key);return qi(om,{onClick:()=>n(c.key),sx:{fontSize:14,minWidth:170,gap:1},children:[Jn(mT,{size:"small",checked:s,sx:{p:0}}),Jn(Re,{option:c})]},c.key)}),Jn(uT,{}),qi(om,{onClick:()=>l(!0),sx:{fontSize:14,color:"#787774"},children:[Jn(dT,{children:Jn(fT,{sx:{fontSize:18,color:"#787774"}})}),"\uB77C\uBCA8 \uCD94\uAC00"]})]}),Jn(em,{open:a,onClose:()=>l(!1),onSubmit:r})]})}function tm(e,o){let t=Number(e.author_account_seq??0);return o.filter(n=>{let r=Number(n.account_seq??0);return r>0&&r!==t})}function nm(e,o){let t=(e.target_account_seqs??[]).filter(f=>f>0);if(t.length===0)return null;let n=new Set(t),r=tm(e,o),i=new Map;for(let f of r){let p=String(f.department??"").trim();if(!p)continue;let m=i.get(p)??[];m.push(f),i.set(p,m)}let a=[],l=new Set;for(let[f,p]of i)if(p.every(g=>n.has(Number(g.account_seq??0)))){a.push(f);for(let g of p)l.add(Number(g.account_seq??0))}let d=new Map(r.map(f=>[Number(f.account_seq??0),f.name])),c=e.target_names??[],s=[];return t.forEach((f,p)=>{l.has(f)||s.push(d.get(f)??c[p]??"\uC774\uB984\uC5C6\uC74C")}),{teamNames:a,individualNames:s}}function Li(e,o){let t=nm(e,o);return t?[...t.teamNames,...t.individualNames].join(", "):"\uBAA8\uB4E0 \uC9C1\uC6D0"}function oR(e,o){let t=nm(e,o);return t?{kind:"members",teamNames:t.teamNames,individualNames:t.individualNames}:{kind:"everyone"}}function rm(e,o,t){let n=(e.target_account_seqs??[]).filter(s=>s>0),r=tm(e,o),i=n.length>0?n.length:r.length,a=e.acks??[],l=t>0&&a.some(s=>s.account_seq===t),d=t>0&&Number(e.author_account_seq??0)===t,c=n.length===0||n.includes(t);return{count:a.length,total:i,acked:l,canAck:t>0&&!d&&c&&!l&&!e.completed}}function im(e,o){let t=Number(o)||50,n=t*1024*1024,r=e.filter(l=>l.size>n),i=e.filter(l=>l.size<=n),a=r.length>0?`\uD30C\uC77C\uC740 1\uAC1C\uB2F9 \uCD5C\uB300 ${t}MB \uAE4C\uC9C0 \uCCA8\uBD80\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
|
|
6
|
+
`).trim()}function Di({syncKey:e,value:o,onChange:t,readOnly:n=!1,minHeight:r=180,height:i=0,onChangeHeight:a}){let l=Sn(null),d=Sn(null),c=i>0?i:0,s=Sn(c),f=Sn(a);f.current=a;let p=Sn(null),m=Sn(Date.now()+800),[g,M]=bk(!1),v=Oe();nl(()=>{if(n)return;let x=il(o);p.current===x||p.current===o||(p.current=x,m.current=Date.now()+800,l.current?.setHtml(x))},[e,o,n]);let h=Sn(-1);return nl(()=>{if(n||v||i<=0||h.current===i||(h.current=i,Math.abs(i-s.current)<1))return;let x=d.current?.querySelector(".ehfuse-editor-container");x&&(Math.abs(x.getBoundingClientRect().height-i)<1||(x.style.height=`${i}px`,s.current=i))},[n,v,i]),nl(()=>{if(n||v)return;let x=d.current?.querySelector(".ehfuse-editor-container");if(!x||typeof ResizeObserver>"u")return;let B,S=new ResizeObserver(D=>{let y=Math.round(D[0]?.contentRect.height??0);y<=0||(window.clearTimeout(B),B=window.setTimeout(()=>{Math.abs(y-s.current)<1||(s.current=y,f.current?.(y))},300))});return S.observe(x),()=>{window.clearTimeout(B),S.disconnect()}},[n,v]),n?Ik(rl,{sx:{position:"relative",mt:1},children:[Bn(rl,{sx:{border:"1px solid #e0e0e0",borderRadius:1,p:"12px",pr:"40px",minHeight:r,fontSize:16,lineHeight:1.6,color:"#37352f",wordBreak:"break-word",userSelect:"none","& > p:first-of-type":{mt:0},"& > p:last-of-type":{mb:0}},dangerouslySetInnerHTML:{__html:il(o)}}),Bn(Tk,{title:"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:Bn(kk,{size:"small","aria-label":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>{navigator.clipboard.writeText(vk(o)).then(()=>{M(!0),window.setTimeout(()=>M(!1),1500)})},sx:{position:"absolute",top:6,right:6,color:"#9a9a97"},children:g?Bn(Sk,{sx:{fontSize:17,color:"#2f9e5b"}}):Bn(yk,{sx:{fontSize:17}})})})]}):Bn(rl,{ref:d,onDragOver:x=>x.stopPropagation(),onDrop:x=>x.stopPropagation(),sx:{mt:1,"& .ehfuse-editor-content > p:first-of-type":{mt:0},"& .ehfuse-editor-content > p:last-of-type":{mb:0},"& .ehfuse-editor-content.ehfuse-editor-empty::before":{top:"12px",left:"12px"}},children:Bn(Bk,{ref:l,defaultValue:il(o),autoHeight:v,resizable:!v,showToolbar:!v,focusBorder:!0,styles:{focusBorderColor:"var(--primary)"},toolbarOptions:Ck,locale:"ko",minHeight:c||r,placeholder:"\uB0B4\uC6A9\uC744 \uC785\uB825\uD558\uC138\uC694",contentStyle:{padding:"12px"},onChange:x=>{let B=Date.now()<m.current,S=x===p.current;p.current=x,!(B||S)&&t(x)}})})}import{useState as Dr}from"react";import{Box as ko,Button as Uc,Dialog as Lk,IconButton as Zn,TextField as Nk,Tooltip as Vc}from"@mui/material";import Gc from"@mui/icons-material/Close";import Fk from"@mui/icons-material/AddCircle";import Yc from"@mui/icons-material/AddTask";import Hk from"@mui/icons-material/Checklist";import Wk from"@mui/icons-material/CheckCircle";import $k from"@mui/icons-material/Launch";import Kk from"@mui/icons-material/LinkOutlined";import Uk from"@mui/icons-material/RadioButtonUnchecked";import{useEffect as _k,useMemo as wk,useState as al}from"react";import{Box as Pt,Button as Dk,Tab as Ek,Tabs as Mk}from"@mui/material";import{FormDialog as Ok}from"@ehfuse/mui-form-dialog";import{ClearTextField as Rk}from"@ehfuse/mui-form-controls";import{ErrorAlert as Pk}from"@ehfuse/alerts";import zk from"@mui/icons-material/CheckCircle";import qk from"@mui/icons-material/RadioButtonUnchecked";import{OverlayScrollbar as Ak}from"@ehfuse/overlay-scrollbar";import{jsx as po,jsxs as ll}from"react/jsx-runtime";var Kc=[{type:"related",label:"\uAD00\uB828",hint:"\uB2E8\uC21C\uD788 \uAD00\uB828 \uC788\uB294 \uC5C5\uBB34\uB85C \uC5F0\uACB0\uD569\uB2C8\uB2E4"},{type:"follow_up",label:"\uC774\uC804 \uC5C5\uBB34",hint:"\uC774 \uC5C5\uBB34\uAC00 \uC120\uD0DD\uD55C \uC5C5\uBB34\uC5D0\uC11C \uC774\uC5B4\uC9C4 \uD6C4\uC18D\uC784\uC744 \uD45C\uC2DC\uD569\uB2C8\uB2E4(\uC774\uB825 \uD0C0\uC784\uB77C\uC778)"},{type:"duplicate_of",label:"\uC911\uBCF5(\uC6D0\uBCF8)",hint:"\uC774 \uC5C5\uBB34\uAC00 \uC120\uD0DD\uD55C \uC6D0\uBCF8 \uC5C5\uBB34\uC758 \uC911\uBCF5\uC784\uC744 \uD45C\uC2DC\uD569\uB2C8\uB2E4"}];function Ei({open:e,task:o,tasks:t,excludeSeqs:n=[],onClose:r,onSubmit:i,hideRelationType:a=!1,title:l="\uAD00\uB828 \uC5C5\uBB34 \uC5F0\uACB0",confirmLabel:d="\uC5F0\uACB0",multiSelect:c=!1}){let s=Oe(),[f,p]=al("related"),[m,g]=al(""),[M,v]=al([]);_k(()=>{e&&(p("related"),g(""),v([]))},[e]);let h=wk(()=>{let y=new Set([o.seq,...n]),w=m.trim().toLowerCase();return t.filter(T=>y.has(T.seq)||T.is_event||T.is_notice?!1:w?T.title.toLowerCase().includes(w)||(T.ticket_no??"").toLowerCase().includes(w):!0).sort((T,b)=>!!T.completed!=!!b.completed?T.completed?1:-1:b.seq-T.seq)},[t,o.seq,n,m]),x=()=>{if(M.length===0){Pk("\uC5F0\uACB0\uD560 \uC5C5\uBB34\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}for(let y of M)i(y,f);r()},B=y=>{v(w=>w.includes(y)?w.filter(T=>T!==y):c?[...w,y]:[y])},S=Kc.find(y=>y.type===f)?.hint??"",D=ll(Pt,{sx:{...s?{height:"100%",minHeight:0}:{height:560},display:"flex",flexDirection:"column",...s?{}:{border:"1px solid #cccccc",borderRadius:1},overflow:"hidden",userSelect:"none"},children:[a?null:po(Mk,{value:f,onChange:(y,w)=>p(w),sx:{minHeight:38,mb:.75,flexShrink:0,"& .MuiTab-root":{minHeight:38,py:.5,fontSize:14}},children:Kc.map(y=>po(Ek,{value:y.type,label:y.label},y.type))}),a?null:po(Pt,{sx:{mb:1.5,fontSize:12.5,color:"#9a9a97"},children:S}),po(Pt,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:po(Rk,{placeholder:"\uC81C\uBAA9\xB7\uD2F0\uCF13\uBC88\uD638\uB85C \uAC80\uC0C9",value:m,onChange:y=>g(y.target.value),fullWidth:!0,autoFocus:!0,size:"small",sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),po(Pt,{sx:{flex:1,minHeight:0},children:po(Ak,{style:{height:"100%"},contentStyle:{paddingTop:0},children:po(Pt,{sx:{display:"flex",flexDirection:"column"},children:h.length===0?po(Pt,{sx:{py:4,textAlign:"center",fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uD560 \uC218 \uC788\uB294 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):h.map(y=>{let w=Ve(y.icon||Me),T=M.includes(y.seq);return ll(Pt,{onClick:()=>B(y.seq),sx:{display:"flex",alignItems:"center",gap:.75,px:1.5,py:1.25,flexShrink:0,cursor:"pointer",borderBottom:"1px solid #ededeb","&:last-of-type":{borderBottom:"none"},bgcolor:T?"#e3eefb":"transparent","&:hover":{bgcolor:T?"#e3eefb":"#f7f7f5"}},children:[T?po(zk,{sx:{fontSize:20,flexShrink:0,color:"#2f6fd0"}}):po(qk,{sx:{fontSize:20,flexShrink:0,color:"#c9c8c5"}}),w?po(w,{sx:{fontSize:17,flexShrink:0,color:y.icon_color||"#1e3a8a"}}):null,ll(Pt,{component:"span",sx:{flex:1,minWidth:0,fontSize:15,color:"#37352f",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:3,overflow:"hidden",lineHeight:1.5,wordBreak:"break-word"},children:[y.ticket_no?`${y.ticket_no} `:"",y.title]}),po(Pt,{sx:{flexShrink:0,display:"flex",alignItems:"center"},children:po(Re,{option:Io(y)})})]},y.seq)})})})})]});return po(Ok,{open:e,onClose:r,maxWidth:"sm",fullScreen:s,mobilePresentation:s?"slide":"dialog",...s?{contentPaddingX:0,contentTopPadding:0,sectionsPaddingTop:0}:{},sx:s?{DialogContent:{"& .os-content > div":{height:"100%",boxSizing:"border-box"},"& .FormSection-content, & .section-content":{height:"100%"}}}:void 0,title:l,locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-task-link",sections:[{id:"task-link",showTitle:!1,children:D}],scrollPastLastSection:!1,sectionContentPaddingTop:0,actions:{showCancelButton:!0,right:po(Dk,{variant:"contained",disabled:M.length===0,onClick:x,children:d})}})}import{Fragment as Vk,jsx as ke,jsxs as Jt}from"react/jsx-runtime";function Mi({taskSeq:e,checklist:o,onAdd:t,onToggle:n,onRemove:r,onUpdate:i,removeLocked:a=!1,onConvertToTask:l,onOpenLinkedTask:d,linkCandidates:c,linkBaseTask:s,onLinkExistingTask:f,resolveLinkedTask:p}){let[m,g]=Dr(""),[M,v]=Dr(!1),[h,x]=Dr(null),B=Oe(),[S,D]=Dr(null),[y,w]=Dr(null),T=z=>{let u=z.task_seq?p?.(z.task_seq):void 0;return u?u.completed:z.checked},b=o.filter(T).length,I=()=>{m.trim()&&(t(e,m),g(""))};return Jt(Wo,{icon:ke(Hk,{sx:{fontSize:19,display:"block"}}),title:Jt(Vk,{children:["\uD560\uC77C",o.length>0?Jt(ko,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:[b," / ",o.length]}):null]}),titleExtra:o.length>0?ke(ko,{sx:{flex:1,minWidth:0,ml:1,height:6,borderRadius:3,bgcolor:"#ececea"},children:ke(ko,{sx:{height:"100%",borderRadius:3,width:`${Math.round(b/o.length*100)}%`,bgcolor:"#2f80ed",transition:"width 0.2s"}})}):null,children:[ke(ko,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:o.map((z,u)=>{let k=z.task_seq?p?.(z.task_seq):void 0,R=T(z),A=!!z.task_seq;return Jt(ko,{sx:{display:"flex",alignItems:"center",gap:1,px:1.25,py:.5,borderRadius:1,"&:hover":{bgcolor:"#f7f7f5"},"&:hover .taskbox-checklist-remove":{opacity:1},"&:hover .taskbox-checklist-convert":{opacity:1}},children:[ke(ko,{component:"span",onClick:()=>n(e,u,!R),sx:{display:"inline-flex",flexShrink:0,cursor:"pointer"},children:R?ke(Wk,{sx:{fontSize:18,color:"#2f80ed"}}):ke(Uk,{sx:{fontSize:18,color:"#9a9a97"}})}),h?.index===u?ke(ko,{component:"input",autoFocus:!0,spellCheck:!1,value:h.label,enterKeyHint:"done",onChange:L=>x({index:u,label:L.target.value}),onBlur:()=>{h.label.trim()&&h.label.trim()!==z.label&&i?.(e,u,h.label),x(null)},onKeyDown:L=>{L.key==="Enter"&&L.target.blur(),L.key==="Escape"&&x(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",p:0}}):ke(ko,{component:"span",onClick:A?z.task_seq&&d?()=>d(z.task_seq):void 0:a||!i?void 0:B?()=>D({index:u,label:z.label}):()=>x({index:u,label:z.label}),sx:{flex:1,minWidth:0,fontSize:14.5,color:"#37352f",textDecoration:R?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...A?d?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}:a||!i?{}:{cursor:"text"}},children:z.label}),A?Jt(ko,{component:"span",onClick:z.task_seq&&d?()=>d(z.task_seq):void 0,sx:{display:"inline-flex",alignItems:"center",gap:.4,flexShrink:0,px:.75,py:.2,borderRadius:1,fontSize:12,fontWeight:500,color:"#1d4f91",bgcolor:"#e3eefb",whiteSpace:"nowrap",...d?{cursor:"pointer"}:{}},children:[ke($k,{sx:{fontSize:12}}),k?.manager_name?.trim()||"\uC5C5\uBB34"]}):null,!a&&!A&&l?ke(Vc,{title:"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",arrow:!0,enterDelay:300,disableInteractive:!0,children:ke(Zn,{className:"taskbox-checklist-convert",size:"small","aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:L=>w({anchorEl:L.currentTarget,index:u,label:z.label}),sx:{display:B?"none":"inline-flex",opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:ke(Yc,{sx:{fontSize:16}})})}):null,a?null:ke(Zn,{className:"taskbox-checklist-remove",size:"small","aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>r(e,u),sx:{display:B?"none":"inline-flex",opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:ke(Gc,{sx:{fontSize:15}})})]},`${z.label}-${u}`)})}),Jt(ko,{sx:{mt:.5,ml:3.25,display:"flex",alignItems:"center",gap:.5},children:[ke(ko,{component:"input",spellCheck:!1,value:m,placeholder:"+ \uD560\uC77C \uCD94\uAC00",enterKeyHint:"done",onChange:z=>g(z.target.value),onKeyDown:z=>{z.key==="Enter"&&I()},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",px:1.25,py:.75,"&::placeholder":{color:"#9a9a97"}}}),c&&s&&f?ke(Vc,{title:"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",arrow:!0,children:ke(Zn,{size:"small","aria-label":"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",onMouseDown:z=>z.preventDefault(),onClick:()=>v(!0),sx:{flexShrink:0,color:"#9a9a97"},children:ke(Kk,{sx:{fontSize:20}})})}):null,ke(Zn,{size:"small","aria-label":"\uD560\uC77C \uCD94\uAC00",disabled:!m.trim(),onMouseDown:z=>z.preventDefault(),onClick:I,sx:{flexShrink:0,color:m.trim()?"#2f80ed":"#c9c8c5"},children:ke(Fk,{sx:{fontSize:20}})})]}),c&&s&&f?ke(Ei,{open:M,task:s,tasks:c,excludeSeqs:o.map(z=>Number(z.task_seq??0)).filter(z=>z>0),hideRelationType:!0,multiSelect:!0,title:"\uAE30\uC874 \uC5C5\uBB34 \uBD99\uC774\uAE30",confirmLabel:"\uBD99\uC774\uAE30",onClose:()=>v(!1),onSubmit:z=>{let u=c.find(k=>k.seq===z);f(e,z,String(u?.title??"").trim())}}):null,ke(We,{open:!!y,anchorEl:y?.anchorEl??null,title:"\uC774 \uD560\uC77C\uC744 \uBCC4\uB3C4 \uC5C5\uBB34\uB85C \uB9CC\uB4DC\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uB9CC\uB4E4\uAE30",onCancel:()=>w(null),onConfirm:()=>{y&&l?.(e,y.index,y.label),w(null)}}),ke(Lk,{open:!!S,onClose:()=>D(null),maxWidth:"xs",fullWidth:!0,slotProps:{paper:{sx:{borderRadius:2,m:2}}},children:Jt(ko,{sx:{p:2,display:"flex",flexDirection:"column",gap:1.5},children:[ke(ko,{sx:{fontSize:15.5,fontWeight:600,color:"#37352f"},children:"\uD560\uC77C \uC218\uC815"}),ke(Nk,{autoFocus:!0,fullWidth:!0,size:"medium",value:S?.label??"",onChange:z=>D(u=>u&&{...u,label:z.target.value}),onKeyDown:z=>{if(z.key!=="Enter")return;let u=S;u&&u.label.trim()&&i?.(e,u.index,u.label.trim()),D(null)}}),Jt(ko,{sx:{display:"flex",alignItems:"center",gap:1},children:[!a&&l&&S&&!o[S.index]?.task_seq?ke(Zn,{"aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:()=>{l(e,S.index,o[S.index]?.label??""),D(null)},sx:{color:"#57564f"},children:ke(Yc,{sx:{fontSize:20}})}):null,!a&&S?ke(Zn,{"aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>{r(e,S.index),D(null)},sx:{color:"#e5484d"},children:ke(Gc,{sx:{fontSize:19}})}):null,ke(ko,{sx:{flex:1}}),ke(Uc,{color:"inherit",onClick:()=>D(null),children:"\uCDE8\uC18C"}),ke(Uc,{variant:"contained",disabled:!S?.label.trim(),onClick:()=>{S&&S.label.trim()&&i?.(e,S.index,S.label.trim()),D(null)},children:"\uD655\uC778"})]})]})})]})}import{useRef as Zk,useState as Jk}from"react";import{Box as mt,IconButton as eT}from"@mui/material";import oT from"@mui/icons-material/Close";import Qc from"@mui/icons-material/AttachFileOutlined";var Gk=new Set(["jpg","jpeg","png","gif","bmp","webp","svg","pdf","txt","json","xml","log","md","markdown","csv","xls","xlsx","html","htm","js","jsx","ts","tsx","css","scss","sass","less","php","py","java","c","cpp","h","hpp","cs","go","rs","rb","swift","kt","scala","sql","sh","bash","bat","ps1","yml","yaml","toml","ini","conf","mp4","avi","mov","wmv","flv","webm","mp3","wav","ogg","m4a","aac"]),Oi=e=>{let o=e?.split(".").pop()?.toLowerCase()??"";return Gk.has(o)};import{LinearProgress as Yk}from"@mui/material";import{Fragment as jk,jsx as Qk,jsxs as Xk}from"react/jsx-runtime";function jc(e){let o=gt(),t=o.useValue("attachmentUpload.taskSeq"),n=o.useValue("attachmentUpload.index"),r=o.useValue("attachmentUpload.total"),i=o.useValue("attachmentUpload.queue"),a=n??0;return!a||e>0&&(t??0)!==e?null:{index:a,total:r??0,queue:i??[]}}function sl(){let o=gt().useValue("attachmentUpload.progress");return Xk(jk,{children:[o??0,"%"]})}function Xc(){let o=gt().useValue("attachmentUpload.progress");return Qk(Yk,{variant:"determinate",value:o??0,sx:{height:4,borderRadius:2,bgcolor:"#dbe9fb",mt:.75}})}import{Fragment as tT,jsx as Do,jsxs as Er}from"react/jsx-runtime";function Ri(e){return e>=1048576?`${(e/1048576).toFixed(1)}MB`:`${Math.max(1,Math.round(e/1024))}KB`}var Pi={flex:1,minWidth:0,fontSize:13.5,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"};function zi({taskSeq:e,attachments:o,onAdd:t,onRemove:n,removeLocked:r=!1,onPreview:i,onDownload:a}){let[l,d]=Jk(!1),c=Zk(null),s=Oe(),f=dr(),p=ur(),m=jc(e),g=e===0,M=S=>{if(i){i(S);return}window.open(p(S.uuid??""),"_blank","noopener,noreferrer")},v=S=>{if(a){a(S);return}window.open(p(S.uuid??"",{download:!0}),"_blank","noopener,noreferrer")},h=S=>m?S+1<m.index?"done":S+1===m.index?"uploading":"waiting":"waiting",x=(S,D,y,w={})=>Er(mt,{sx:{px:1,py:.5,borderRadius:1,border:"1px solid",borderColor:w.uploading?"#d5e6fb":"#e6e6e3",bgcolor:w.uploading?"#f4f9ff":"transparent","&:hover .taskbox-file-remove":{opacity:1}},children:[Er(mt,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[Do(Qc,{sx:{fontSize:16,color:"#9a9a97"}}),D,Do(mt,{component:"span",sx:{fontSize:12,color:w.uploading?"#2f80ed":"#9a9a97",flexShrink:0},children:y}),w.removeIndex!==void 0?Do(eT,{className:"taskbox-file-remove",size:"small","aria-label":"\uCCA8\uBD80 \uC0AD\uC81C",onClick:()=>n(e,w.removeIndex),sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:Do(oT,{sx:{fontSize:15}})}):null]}),w.uploading?Do(Xc,{}):null]},S),B=S=>{let D=Oi(S.name);return Do(mt,{component:"button",type:"button",onClick:()=>D?M(S):v(S),title:`${S.name} ${D?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`,sx:{...Pi,color:"#37352f",textAlign:"left",p:0,border:"none",background:"none",font:"inherit",fontSize:13.5,cursor:"pointer","&:hover":{textDecoration:"underline",color:"#2f80ed"}},children:S.name})};return Er(Wo,{icon:Do(Qc,{sx:{fontSize:18,display:"block"}}),title:Er(tT,{children:["\uD30C\uC77C ",o.length>0?o.length:""]}),children:[Er(mt,{sx:{display:"flex",flexDirection:"column",gap:.5,mt:1},children:[o.map((S,D)=>{let y=`${S.uuid||S.name}-${D}`;if(g){let w=h(D),T=w==="uploading";return x(y,Do(mt,{component:"span",sx:{...Pi,color:w==="done"?"#37352f":"#9a9a97"},children:S.name}),T?Do(sl,{}):Ri(S.size),{uploading:T,removeIndex:!r&&!m?D:void 0})}return S.uuid?x(y,B(S),Ri(S.size),{removeIndex:r?void 0:D}):x(y,Do(mt,{component:"span",title:"\uC2E4\uD30C\uC77C\uC774 \uC5C6\uB294 \uC774\uC804 \uBC29\uC2DD \uCCA8\uBD80\uC785\uB2C8\uB2E4(\uB2E4\uC6B4\uB85C\uB4DC \uBD88\uAC00) \u2014 \uB2E4\uC2DC \uCCA8\uBD80\uD574 \uC8FC\uC138\uC694.",sx:{...Pi,color:"#9a9a97"},children:S.name}),Ri(S.size),{removeIndex:r?void 0:D})}),!g&&m?m.queue.slice(m.index-1).map((S,D)=>{let y=D===0;return x(`uploading-${m.index+D}-${S.name}`,Do(mt,{component:"span",sx:{...Pi,color:"#9a9a97"},children:S.name}),y?Do(sl,{}):Ri(S.size),{uploading:y})}):null]}),Do(mt,{onClick:()=>c.current?.click(),onDragOver:S=>{S.preventDefault(),d(!0)},onDragLeave:()=>d(!1),onDrop:S=>{S.preventDefault(),d(!1);let D=Array.from(S.dataTransfer.files);D.length>0&&t(e,D)},sx:{mt:1,py:2.5,display:"flex",alignItems:"center",justifyContent:"center",gap:.5,border:"1.5px dashed",borderColor:l?"#2f80ed":"#cfcfcc",borderRadius:1,bgcolor:l?"#eef6ff":"transparent",color:"#787774",fontSize:13.5,cursor:"pointer",transition:"background-color 0.15s, border-color 0.15s","&:hover":{bgcolor:"#fafaf9",borderColor:"#9a9a97"}},children:s?`\uD30C\uC77C\uC744 \uCCA8\uBD80\uD558\uC138\uC694 (\uCD5C\uB300 ${f}MB)`:`\uD30C\uC77C\uC744 \uB04C\uC5B4\uB2E4 \uB193\uAC70\uB098 \uD074\uB9AD\uD574 \uCCA8\uBD80\uD558\uC138\uC694 (\uCD5C\uB300 ${f}MB)`}),Do(mt,{component:"input",ref:c,type:"file",multiple:!0,onChange:S=>{let D=Array.from(S.target.files??[]);D.length>0&&t(e,D),S.target.value=""},sx:{display:"none"}})]})}import{useState as cT}from"react";import{Checkbox as mT,Divider as uT,ListItemIcon as dT,Menu as pT,MenuItem as om}from"@mui/material";import fT from"@mui/icons-material/Add";import{useEffect as nT,useState as Zc}from"react";import{Box as cl,Button as rT}from"@mui/material";import{FormDialog as iT}from"@ehfuse/mui-form-dialog";import{ClearTextField as aT}from"@ehfuse/mui-form-controls";import{ColorPicker as lT}from"@ehfuse/mui-color-picker";import{ErrorAlert as sT}from"@ehfuse/alerts";import{jsx as Mr,jsxs as ml}from"react/jsx-runtime";var Jc="#2f80ed";function em({open:e,onClose:o,onSubmit:t}){let[n,r]=Zc(""),[i,a]=Zc(Jc);nT(()=>{e&&(r(""),a(Jc))},[e]);let l=()=>{let s=n.trim();if(!s){sT("\uB77C\uBCA8 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}t(s,i),o()},d=as(i),c=ml(cl,{children:[ml(cl,{sx:{display:"flex",alignItems:"center",gap:1.5,mt:.5},children:[Mr(aT,{label:"\uB77C\uBCA8 \uC774\uB984",value:n,onChange:s=>r(s.target.value),onKeyDown:s=>{s.key==="Enter"&&(s.preventDefault(),l())},fullWidth:!0,autoFocus:!0}),Mr(lT,{value:i,onChange:s=>a(s),shape:"circle",colorSize:28})]}),ml(cl,{sx:{mt:2,display:"flex",alignItems:"center",gap:1,fontSize:13,color:"#787774"},children:["\uBBF8\uB9AC\uBCF4\uAE30",Mr(Re,{option:{key:"__preview__",name:n.trim()||"\uB77C\uBCA8",...d}})]})]});return Mr(iT,{open:e,onClose:o,maxWidth:"xs",title:"\uC0C8 \uB77C\uBCA8 \uCD94\uAC00",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-add-label",sections:[{id:"add-label",showTitle:!1,children:c}],actions:{showCancelButton:!0,right:Mr(rT,{variant:"contained",onClick:l,children:"\uCD94\uAC00"})}})}import{Fragment as xT,jsx as Jn,jsxs as qi}from"react/jsx-runtime";function Ai({anchorEl:e,selectedKeys:o,labelOptions:t,onToggle:n,onAddLabel:r,onClose:i}){let[a,l]=cT(!1),d=nt();return qi(xT,{children:[qi(pT,{anchorEl:e,open:!!e,onClose:i,transitionDuration:0,...d,children:[t.map(c=>{let s=o.includes(c.key);return qi(om,{onClick:()=>n(c.key),sx:{fontSize:14,minWidth:170,gap:1},children:[Jn(mT,{size:"small",checked:s,sx:{p:0}}),Jn(Re,{option:c})]},c.key)}),Jn(uT,{}),qi(om,{onClick:()=>l(!0),sx:{fontSize:14,color:"#787774"},children:[Jn(dT,{children:Jn(fT,{sx:{fontSize:18,color:"#787774"}})}),"\uB77C\uBCA8 \uCD94\uAC00"]})]}),Jn(em,{open:a,onClose:()=>l(!1),onSubmit:r})]})}function tm(e,o){let t=Number(e.author_account_seq??0);return o.filter(n=>{let r=Number(n.account_seq??0);return r>0&&r!==t})}function nm(e,o){let t=(e.target_account_seqs??[]).filter(f=>f>0);if(t.length===0)return null;let n=new Set(t),r=tm(e,o),i=new Map;for(let f of r){let p=String(f.department??"").trim();if(!p)continue;let m=i.get(p)??[];m.push(f),i.set(p,m)}let a=[],l=new Set;for(let[f,p]of i)if(p.every(g=>n.has(Number(g.account_seq??0)))){a.push(f);for(let g of p)l.add(Number(g.account_seq??0))}let d=new Map(r.map(f=>[Number(f.account_seq??0),f.name])),c=e.target_names??[],s=[];return t.forEach((f,p)=>{l.has(f)||s.push(d.get(f)??c[p]??"\uC774\uB984\uC5C6\uC74C")}),{teamNames:a,individualNames:s}}function Li(e,o){let t=nm(e,o);return t?[...t.teamNames,...t.individualNames].join(", "):"\uBAA8\uB4E0 \uC9C1\uC6D0"}function oR(e,o){let t=nm(e,o);return t?{kind:"members",teamNames:t.teamNames,individualNames:t.individualNames}:{kind:"everyone"}}function rm(e,o,t){let n=(e.target_account_seqs??[]).filter(s=>s>0),r=tm(e,o),i=n.length>0?n.length:r.length,a=e.acks??[],l=t>0&&a.some(s=>s.account_seq===t),d=t>0&&Number(e.author_account_seq??0)===t,c=n.length===0||n.includes(t);return{count:a.length,total:i,acked:l,canAck:t>0&&!d&&c&&!l&&!e.completed}}function im(e,o){let t=Number(o)||50,n=t*1024*1024,r=e.filter(l=>l.size>n),i=e.filter(l=>l.size<=n),a=r.length>0?`\uD30C\uC77C\uC740 1\uAC1C\uB2F9 \uCD5C\uB300 ${t}MB \uAE4C\uC9C0 \uCCA8\uBD80\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.
|
|
7
7
|
\uC81C\uC678\uB41C \uD30C\uC77C: ${r.map(l=>l.name).join(", ")}`:null;return{accepted:i,rejected:r,message:a}}import{Fragment as Ni,jsx as Ce,jsxs as Pr}from"react/jsx-runtime";var lm="#0f9d58";function ul({form:e,statusOptions:o,customTabs:t,sprints:n=[],avatarSrcByName:r,isNotice:i=!1,hideProject:a=!1,hideBug:l=!1,leadingRow:d,hideLabel:c=!1,employees:s=[],myAccountSeq:f=0,onMemberEdit:p,onAddProject:m,onAddLabelOption:g,contentSyncKey:M="create"}){let v=gt(),h=dr(),x=e.useFormValue("manager_name"),B=e.useFormValue("receiver_names"),S=e.useFormValue("start_date"),D=!!e.useFormValue("is_event"),y=!!e.useFormValue("is_bug"),w=e.useFormValue("bug_repro")??"",T=e.useFormValue("bug_device")??"",b=e.useFormValue("bug_where")??"",I=e.useFormValue("bug_version")??"",z=e.useFormValue("event_time")??"",u=e.useFormValue("event_place")??"",k=e.useFormValue("event_address")??"",R=e.useFormValue("due_date"),A=e.useFormValue("estimated_time")??"",L=e.useFormValue("reminder"),F=e.useFormValue("priority"),le=e.useFormValue("content"),me=e.useFormValue("checklist")??[],se=e.useFormValue("tab_key"),Te=e.useFormValue("sprint_seq")??0,fe=e.useFormValue("story_points")??0,ae=t.find(q=>q.key===se&&q.useSprints),ee=ae?n.filter(q=>`custom-${q.group_seq}`===se):[],[ye,ze]=am(null),W=e.useFormValue("label_keys"),[H,Z]=am(null),C=e.useFormValue("target_names"),E=e.useFormValue("target_account_seqs"),oe=v.useValue("createAttachmentFiles")??[],Ie=i?Li({author_account_seq:f,target_names:C,target_account_seqs:E},s):"";return Pr(Ni,{children:[d,i?null:Ce(Or,{sx:{display:"flex",gap:1.25,px:2,pt:1.5,pb:1.5,flexShrink:0},children:[{value:"task",label:"\uC5C5\uBB34"},{value:"event",label:"\uC77C\uC815"},...l?[]:[{value:"bug",label:"\uC624\uB958"}]].map(q=>{let xe=y?"bug":D?"event":"task",Se=xe===q.value;return Ce(gT,{onClick:()=>{if(xe===q.value)return;e.setFormValue("is_event",q.value==="event"),e.setFormValue("is_bug",q.value==="bug"),e.setFormValue("is_open",q.value==="bug");let ce=e.getFormValue("icon"),V=e.getFormValue("icon_color"),Be=[Me,"event",pr].includes(ce),U=!V||V===lm||V===fr;Be&&e.setFormValue("icon",q.value==="event"?"event":q.value==="bug"?pr:Me),U&&e.setFormValue("icon_color",q.value==="event"?lm:q.value==="bug"?fr:"")},sx:{px:1.75,py:.75,borderRadius:99,fontSize:13.5,fontWeight:Se?600:400,color:Se?"#ffffff":"#787774",bgcolor:Se?"#2563eb":"#f4f4f2"},children:q.label},q.label)})}),Ce(Rr,{sx:{borderColor:"#e6e6e3"}}),Pr(Or,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:.25},children:[Ce(_i,{hideProject:a,showEstimatedTime:!D,values:{tabKey:se,managerName:x,receiverNames:B,startDate:S,dueDate:R,reminder:L,priority:F,estimatedTime:A,eventTime:z,eventPlace:u,eventAddress:k},onChangeEstimatedTime:q=>e.setFormValue("estimated_time",q),customTabs:t,avatarSrcByName:r,notice:i,event:D,onChangeEventTime:q=>e.setFormValue("event_time",q),onChangeEventPlace:q=>e.setFormValue("event_place",q),onChangeEventAddress:q=>e.setFormValue("event_address",q),targetSummary:Ie,onChangeProject:q=>e.setFormValue("tab_key",q),onAddProject:m,onChangeStartDate:q=>e.setFormValue("start_date",q),onChangeDueDate:q=>e.setFormValue("due_date",q),onChangeReminder:q=>e.setFormValue("reminder",q),onChangePriority:q=>e.setFormValue("priority",q),onMemberEdit:p,trailing:Pr(Ni,{children:[ae&&!D&&!i?Pr(Ni,{children:[Ce(pe,{icon:Ce(ST,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:q=>ze(q),children:Te>0?ee.find(q=>q.seq===Te)?.name??"\uC0AD\uC81C\uB41C \uBAA9\uD45C":Ce(Or,{component:"span",sx:{color:"#9a9a97"},children:"\uBBF8\uBC30\uC815"})}),Ce(pe,{icon:Ce(BT,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",children:Ce(Rt,{value:fe>0?String(fe):"",placeholder:"\uBBF8\uCD94\uC815",onCommit:q=>e.setFormValue("story_points",Number(q.replace(/[^0-9.]/g,""))||0)})})]}):null,y?Ce(wi,{values:{repro:w,device:T,where:b,version:I},onChangeRepro:q=>e.setFormValue("bug_repro",q),onChangeDevice:q=>e.setFormValue("bug_device",q),onChangeWhere:q=>e.setFormValue("bug_where",q),onChangeVersion:q=>e.setFormValue("bug_version",q)}):null]}),leading:D||c?null:Ce(Or,{sx:{gridColumn:"1 / -1"},children:Ce(pe,{icon:Ce(yT,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:q=>Z(q),children:(W??[]).length>0?Ce(Ht,{labelKeys:W??[],labelOptions:o}):Ce(Or,{component:"span",sx:{color:"#9a9a97"},children:"\uBE44\uC5B4 \uC788\uC74C"})})})}),Ce(Rr,{sx:{my:1.5,borderColor:"#e6e6e3"}}),Ce(Wo,{icon:Ce(kT,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",children:Ce(Di,{syncKey:M,value:le,onChange:q=>e.setFormValue("content",q)})}),D?null:Ce(Rr,{sx:{my:1.5,borderColor:"#e6e6e3"}}),D?null:Ce(Mi,{taskSeq:0,checklist:me,onAdd:(q,xe)=>e.setFormValue("checklist",[...me,{label:xe,checked:!1}]),onToggle:(q,xe,Se)=>e.setFormValue("checklist",me.map((ce,V)=>V===xe?{...ce,checked:Se}:ce)),onRemove:(q,xe)=>e.setFormValue("checklist",me.filter((Se,ce)=>ce!==xe)),onUpdate:(q,xe,Se)=>e.setFormValue("checklist",me.map((ce,V)=>V===xe?{...ce,label:Se}:ce))}),Ce(Rr,{sx:{my:1.5,borderColor:"#e6e6e3"}}),Ce(zi,{taskSeq:0,attachments:oe.map(q=>({name:q.name,size:q.size})),onAdd:(q,xe)=>{let Se=im(xe,h);Se.message&&vT(Se.message),Se.accepted.length!==0&&v.setValue("createAttachmentFiles",[...v.getValue("createAttachmentFiles")??[],...Se.accepted])},onRemove:(q,xe)=>v.setValue("createAttachmentFiles",oe.filter((Se,ce)=>ce!==xe))}),y?null:Pr(Ni,{children:[Ce(Rr,{sx:{my:1.5,borderColor:"#e6e6e3"}}),Ce(Wo,{icon:Ce(TT,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:Ce(CT,{form:e,name:"note",placeholder:"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",sx:{mt:1}})})]})]}),Ce(hT,{transitionDuration:0,anchorEl:ye,open:!!ye,onClose:()=>ze(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...ee.map(q=>({seq:q.seq,label:Fo(q)}))].map(q=>Ce(bT,{onClick:()=>{e.setFormValue("sprint_seq",q.seq),ze(null)},sx:{fontSize:14,minWidth:170},children:q.label},q.seq))}),Ce(Ai,{anchorEl:H,selectedKeys:W??[],labelOptions:o,onToggle:q=>e.setFormValue("label_keys",Yr(W??[],q)),onAddLabel:(q,xe)=>g?.(q,xe),onClose:()=>Z(null)})]})}import{Fragment as mm,jsx as Ge,jsxs as er}from"react/jsx-runtime";function $R({open:e,onClose:o,...t}){let{form:n,presetDueDate:r="",presetTabKey:i="",presetManager:a=null,isNotice:l=!1,defaultBug:d=!1}=t,c=gt(),s=_T(!1),[f,p]=sm(0),[m,g]=sm(null),M=n.useFormValue("title"),v=n.useFormValue("icon"),h=n.useFormValue("icon_color"),x=!!n.useFormValue("is_event"),B=!!n.useFormValue("is_bug"),S=Oe(),y=c.useValue("createSubmitting")??!1,w=zn(v||Me),T=l?"\uACF5\uC9C0 \uB4F1\uB85D":x?"\uC77C\uC815 \uB4F1\uB85D":B?"\uC624\uB958 \uB4F1\uB85D":"\uC5C5\uBB34 \uB4F1\uB85D",b=l?"\uACF5\uC9C0 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694":x?"\uC77C\uC815 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694":B?"\uC5B4\uB5A4 \uC624\uB958\uC778\uC9C0 \uD55C \uC904\uB85C \uC801\uC5B4\uC8FC\uC138\uC694":"\uC5C5\uBB34 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694";IT(()=>{let u=s.current;s.current=e,!(!e||u)&&(n.setFormValues({...n.getFormValues(),title:"",icon:l?vo:d?pr:Me,icon_color:l?"#e5484d":d?fr:"",manager_name:a?.name??"",manager_account_seq:a?.accountSeq??0,receiver_names:[],receiver_account_seqs:[],is_notice:l,is_event:!1,is_bug:d,is_open:d,bug_repro:"",bug_device:"",bug_where:"",bug_version:"",event_time:"",event_place:"",event_address:"",target_names:[],target_account_seqs:[],start_date:He(new Date),due_date:r,reminder:"none",priority:"medium",note:"",content:"",checklist:[],tab_key:i}),c.setValue("createAttachmentFiles",[]),p(k=>k+1))},[e]);let I=er(en,{sx:{display:"flex",alignItems:"center",gap:1,px:2,pt:2,pb:1},children:[Ge(pl,{size:"small","aria-label":"\uC544\uC774\uCF58 \uBCC0\uACBD",onClick:u=>g(u.currentTarget),sx:{p:0,color:h||"#1e3a8a"},children:Ge(w,{sx:{fontSize:20}})}),Ge(en,{component:"input",autoFocus:!0,spellCheck:!1,value:M,placeholder:b,onChange:u=>n.setFormValue("title",u.target.value),sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:19,fontWeight:600,color:"#37352f",p:0,m:0,"&::placeholder":{color:"#c9c8c5",fontWeight:400}}})]}),z=Ge(Qn,{anchorEl:m,value:v,color:h||"#1e3a8a",onSelect:u=>n.setFormValue("icon",u),onSelectColor:u=>n.setFormValue("icon_color",u),onClose:()=>g(null)});return S?er(mm,{children:[Ge(OT,{open:e,onClose:o,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:T,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1},custom:[{icon:Ge(dl,{variant:"contained",size:"small",disableElevation:!0,disabled:y,onClick:y?void 0:n.submit,sx:{ml:2,minWidth:0,px:1.5,py:.35,fontSize:14,fontWeight:600,bgcolor:"#2f80ed","&:hover":{bgcolor:"#2f80ed"}},children:"\uC800\uC7A5"}),tooltip:y?"\uC800\uC7A5 \uC911\u2026":""}]},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:!1},sections:[{id:"task-create",title:"",showTitle:!1,children:Ge(en,{sx:{width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:Ge(ul,{...t,contentSyncKey:`create-${f}`,leadingRow:I})})}]}),z]}):er(mm,{children:[Ge(wT,{anchor:"right",open:e,onClose:o,sx:{zIndex:u=>u.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:er(en,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[er(en,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[Ge(DT,{title:"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,children:Ge(pl,{size:"small",onClick:u=>g(u.currentTarget),sx:{color:h||"#1e3a8a"},children:Ge(w,{sx:{fontSize:20}})})}),Ge(en,{component:"input",autoFocus:!0,spellCheck:!1,value:M,placeholder:b,onChange:u=>n.setFormValue("title",u.target.value),sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:18,fontWeight:500,color:"#37352f",p:0,m:0,"&::placeholder":{color:"#c9c8c5",fontWeight:400}}}),Ge(pl,{"aria-label":"\uB2EB\uAE30",onClick:o,sx:{color:"#6b7280"},children:Ge(ET,{})})]}),Ge(cm,{sx:{borderColor:"#e6e6e3"}}),Ge(en,{sx:{flex:1,minHeight:0},children:Ge(MT,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:Ge(ul,{...t,contentSyncKey:`create-${f}`})})}),Ge(cm,{sx:{borderColor:"#e6e6e3"}}),er(en,{sx:{display:"flex",justifyContent:"flex-end",gap:1,px:2,py:1.5,flexShrink:0},children:[Ge(dl,{onClick:o,color:"inherit",disabled:y,children:"\uCDE8\uC18C"}),Ge(dl,{onClick:n.submit,variant:"contained",disabled:y,children:y?"\uB4F1\uB85D \uC911\u2026":"\uB4F1\uB85D"})]})]})}),z]})}import{useEffect as Om,useRef as Rm,useState as Oy}from"react";import{Box as Ui,Button as Ry,Divider as Pm,Drawer as Py}from"@mui/material";import zy from"@mui/icons-material/ShareOutlined";import qy from"@ehfuse/overlay-scrollbar";import{FormDialog as Ay}from"@ehfuse/mui-form-dialog";import{SuccessAlert as zm}from"@ehfuse/alerts";import{useRef as xl,useState as or}from"react";import{Box as re,Button as um,Chip as Fi,IconButton as Zo,Tooltip as xm}from"@mui/material";import dm from"@mui/icons-material/Send";import{TextField as RT}from"@ehfuse/mui-form-controls";import Hi from"@mui/icons-material/Close";import PT from"@mui/icons-material/EditOutlined";import zT from"@mui/icons-material/Favorite";import qT from"@mui/icons-material/FavoriteBorderOutlined";import AT from"@mui/icons-material/CheckCircle";import LT from"@mui/icons-material/CheckCircleOutlineOutlined";import tr from"@mui/icons-material/AttachFileOutlined";import NT from"@mui/icons-material/AddCircleOutline";import FT from"@mui/icons-material/ImageOutlined";var fl=e=>{if(e===0)return"0 Bytes";let o=1024,t=["Bytes","KB","MB","GB","TB"],n=Math.floor(Math.log(e)/Math.log(o));return parseFloat((e/Math.pow(o,n)).toFixed(2))+" "+t[n]};import{Fragment as fm,jsx as K,jsxs as Ye}from"react/jsx-runtime";var HT=5;function pm({kind:e,reactions:o,myAccountSeq:t,onToggle:n}){let r=o??[],i=t>0&&r.some(c=>c.account_seq===t),a=e==="like"?"\uC88B\uC544\uC694":"\uD655\uC778",l=r.length===0?a:K(re,{sx:{whiteSpace:"pre-line",fontSize:12},children:r.map(c=>`${c.name} \xB7 ${c.time}`).join(`
|
|
8
8
|
`)}),d=e==="like"?"#e5484d":"#2f80ed";return K(xm,{title:l,arrow:!0,enterDelay:300,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:Ye(re,{sx:{display:"inline-flex",alignItems:"center"},children:[K(Zo,{size:"small","aria-label":`\uB313\uAE00 ${a}`,onClick:n,sx:{color:i?d:"#c9c8c5",p:.5},children:e==="like"?i?K(zT,{sx:{fontSize:16}}):K(qT,{sx:{fontSize:16}}):i?K(AT,{sx:{fontSize:16}}):K(LT,{sx:{fontSize:16}})}),r.length>0?K(re,{component:"span",sx:{fontSize:12,color:i?d:"#9a9a97",ml:-.25},children:r.length}):null]})})}function gm({taskSeq:e,comments:o,currentUserName:t="",myAccountSeq:n=0,avatarSrcByName:r,onUpdate:i,onRemove:a,onToggleReaction:l,onPreview:d,onDownload:c}){let[s,f]=or(null),p=xl(null),[m,g]=or(null),[M,v]=or(!1),h=Math.max(0,o.length-HT),x=h>0&&!M,B=s?Math.min(s.index,h):h,S=o.map((b,I)=>({comment:b,index:I})).slice(x?B:0),D=ur(),y=b=>{if(d){d(b);return}window.open(D(b.uuid??""),"_blank","noopener,noreferrer")},w=b=>{if(c){c(b);return}window.open(D(b.uuid??"",{download:!0}),"_blank","noopener,noreferrer")},T=Ro().slots?.avatar;return Ye(re,{sx:{px:2,pb:2,display:"flex",flexDirection:"column",gap:.25},children:[Ye(re,{sx:{display:"flex",alignItems:"center",gap:1},children:[K($t,{sx:{fontSize:18,display:"block",color:"#37352f"}}),Ye(re,{sx:{fontSize:wr,fontWeight:500,color:"#37352f"},children:["\uB313\uAE00",o.length>0?` (${o.length})`:""]}),h>0&&(!x||B>0)?K(re,{role:"button",tabIndex:0,onClick:()=>v(b=>!b),onKeyDown:b=>{(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),v(I=>!I))},sx:{ml:"auto",flexShrink:0,cursor:"pointer",fontSize:14.5,color:"#5b87d6","&:hover":{textDecoration:"underline"}},children:x?`\uC774\uC804 \uB313\uAE00 ${B}\uAC1C \uB354 \uBCF4\uAE30`:"\uC774\uC804 \uB313\uAE00 \uC811\uAE30"}):null]}),o.length===0?K(re,{sx:{mt:1,fontSize:14.5,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uB313\uAE00\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,K(re,{sx:{display:"flex",flexDirection:"column",gap:1,mt:1},children:S.map(({comment:b,index:I})=>{let z=!!t&&b.author===t;return Ye(re,{sx:{display:"flex",gap:1.5,alignItems:"flex-start","&:hover .taskbox-comment-actions":{opacity:1,pointerEvents:"auto"},"&:not(:last-child)":{borderBottom:"1px dashed #e0dfdc",pb:1}},children:[(()=>{let u=r?.get(b.author)??"";return T?K(re,{sx:{display:"inline-flex",flexShrink:0},children:K(T,{name:b.author,src:u||void 0,size:44})}):K(re,{sx:{display:"inline-flex",flexShrink:0},children:K(rt,{src:u,avatarSx:{width:44,height:44,fontSize:20,borderRadius:"50%",...Nn[0]},iconFontSize:24})})})(),Ye(re,{sx:{flex:1,minWidth:0},children:[Ye(re,{sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0,position:"relative"},children:[K(re,{component:"span",sx:{fontSize:14.5,fontWeight:700,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:b.author}),K(re,{component:"span",sx:{fontSize:12.5,color:"#9a9a97",flexShrink:0,whiteSpace:"nowrap"},children:b.time}),z?K(re,{sx:{ml:"auto"}}):Ye(re,{sx:{display:"flex",alignItems:"center",gap:.25,ml:"auto",flexShrink:0},children:[K(pm,{kind:"like",reactions:b.likes,myAccountSeq:n,onToggle:()=>l?.(e,I,"like")}),K(pm,{kind:"ack",reactions:b.acks,myAccountSeq:n,onToggle:()=>l?.(e,I,"ack")})]}),z?Ye(re,{className:"taskbox-comment-actions",sx:{display:"flex",alignItems:"center",gap:.25,position:"absolute",right:0,top:"50%",transform:"translateY(-50%)",pointerEvents:"none",backgroundColor:"#fff",opacity:0,transition:"opacity 0.15s"},children:[K(Zo,{size:"small","aria-label":"\uB313\uAE00 \uC218\uC815",onClick:()=>f({index:I,text:b.text,attachments:[...b.attachments??[]],files:[]}),sx:{color:"#9a9a97"},children:K(PT,{sx:{fontSize:15}})}),K(Zo,{size:"small","aria-label":"\uB313\uAE00 \uC0AD\uC81C",onClick:u=>g({anchorEl:u.currentTarget,index:I}),sx:{color:"#9a9a97"},children:K(Hi,{sx:{fontSize:15}})})]}):null]}),s?.index===I?Ye(re,{sx:{mt:.5},children:[K(re,{component:"textarea",autoFocus:!0,spellCheck:!1,value:s.text,onChange:u=>f({...s,text:u.target.value}),sx:{width:"100%",minHeight:56,border:"1px solid #dedddb",borderRadius:1,outline:"none",font:"inherit",fontSize:14,p:1,resize:"vertical"}}),Ye(re,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:.75,mt:.75},children:[s.attachments.map((u,k)=>{let R=()=>f({...s,attachments:s.attachments.filter((A,L)=>L!==k)});return Wi(u.name)&&u.uuid?Ye(re,{sx:{position:"relative"},children:[K(re,{component:"img",src:D(u.uuid,{thumb:"md"}),alt:u.name,title:u.name,loading:"lazy",sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",display:"block"}}),K(Zo,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:R,sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:K(Hi,{sx:{fontSize:14}})})]},`kept-${u.uuid}-${k}`):K(Fi,{size:"small",icon:K(tr,{sx:{fontSize:14}}),label:u.name,onDelete:R,sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`kept-${u.uuid??u.name}-${k}`)}),s.files.map((u,k)=>{let R=()=>f({...s,files:s.files.filter((A,L)=>L!==k)});return Wi(u.name)?Ye(re,{sx:{position:"relative"},children:[K(re,{component:"img",src:URL.createObjectURL(u),alt:u.name,title:`${u.name} (\uC0C8 \uD30C\uC77C)`,onLoad:A=>URL.revokeObjectURL(A.target.src),sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"2px solid #2f80ed",display:"block"}}),K(Zo,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:R,sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:K(Hi,{sx:{fontSize:14}})})]},`new-${u.name}-${k}`):K(Fi,{size:"small",icon:K(tr,{sx:{fontSize:14}}),label:`${u.name} (\uC0C8 \uD30C\uC77C)`,onDelete:R,sx:{fontSize:14,height:26,bgcolor:"#eef4ff"}},`new-${u.name}-${k}`)}),K(xm,{title:"\uCCA8\uBD80 \uCD94\uAC00",arrow:!0,children:K(Zo,{size:"small","aria-label":"\uCCA8\uBD80 \uCD94\uAC00",onClick:()=>p.current?.click(),sx:{ml:"auto",color:"#2f80ed"},children:K(NT,{sx:{fontSize:20}})})})]}),Ye(re,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:.75,mt:.5},children:[K(um,{size:"small",color:"inherit",onClick:()=>f(null),children:"\uCDE8\uC18C"}),K(um,{size:"small",variant:"contained",disabled:!s.text.trim()&&s.attachments.length===0&&s.files.length===0,onClick:()=>{i(e,I,s.text,{attachments:s.attachments,files:s.files}),f(null)},children:"\uC800\uC7A5"})]}),K(re,{component:"input",type:"file",multiple:!0,ref:p,sx:{display:"none"},onChange:u=>{let k=Array.from(u.target.files??[]);k.length>0&&f({...s,files:[...s.files,...k].slice(0,10)}),u.target.value=""}})]}):Ye(re,{children:[b.text?K(re,{sx:{fontSize:15,whiteSpace:"pre-wrap"},children:b.text}):null,(b.attachments??[]).length>0?K(re,{sx:{display:"flex",flexWrap:"wrap",gap:.75,mt:.75},children:(b.attachments??[]).map((u,k)=>{let R=!!u.uuid;if(Wi(u.name)&&R)return K(re,{component:"img",src:D(u.uuid??"",{thumb:"md"}),alt:u.name,title:`${u.name} \uD06C\uAC8C \uBCF4\uAE30`,loading:"lazy",onClick:()=>y(u),sx:{width:96,height:96,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",cursor:"pointer",bgcolor:"#f8fafc"}},`${u.name}-${k}`);let L=Oi(u.name);return K(Fi,{size:"small",icon:K(tr,{sx:{fontSize:14}}),label:`${u.name} (${fl(u.size)})`,clickable:R,onClick:R?()=>L?y(u):w(u):void 0,title:R?`${u.name} ${L?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`:u.name,sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`${u.name}-${k}`)})}):null]})]})]},`${b.time}-${I}`)})}),K(We,{open:!!m,anchorEl:m?.anchorEl??null,title:"\uC774 \uB313\uAE00\uC744 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uC0AD\uC81C",onCancel:()=>g(null),onConfirm:()=>{m&&(a(e,m.index),f(null)),g(null)}})]})}function Wi(e){return/\.(png|jpe?g|gif|webp|bmp|svg|heic|heif)$/i.test(String(e??"").trim())}function hm({onSubmit:e}){let[o,t]=or(""),[n,r]=or([]),[i,a]=or(!1),l=xl(null),d=xl(null),c=Oe(),s=m=>{let g=Array.from(m??[]);g.length!==0&&r(M=>[...M,...g].slice(0,10))},f=()=>{let m=o.trim();!m&&n.length===0||(e(m,n.length>0?n:void 0),t(""),r([]))},p=Ye(fm,{children:[K(Zo,{size:"small","aria-label":"\uD30C\uC77C \uCCA8\uBD80",onClick:()=>l.current?.click(),sx:{color:"#9a9a97"},children:K(tr,{sx:{fontSize:20}})}),K(Zo,{size:"small","aria-label":"\uC774\uBBF8\uC9C0 \uCCA8\uBD80",onClick:()=>d.current?.click(),sx:{color:"#9a9a97"},children:K(FT,{sx:{fontSize:20}})})]});return Ye(re,{children:[n.length>0?K(re,{sx:{display:"flex",flexWrap:"wrap",alignItems:"center",gap:.75,px:2,pt:1},children:n.map((m,g)=>Wi(m.name)?Ye(re,{sx:{position:"relative"},children:[K(re,{component:"img",src:URL.createObjectURL(m),alt:m.name,title:m.name,onLoad:M=>URL.revokeObjectURL(M.target.src),sx:{width:72,height:72,objectFit:"cover",borderRadius:1,border:"1px solid #e6e6e3",display:"block"}}),K(Zo,{size:"small","aria-label":"\uCCA8\uBD80 \uC81C\uAC70",onClick:()=>r(M=>M.filter((v,h)=>h!==g)),sx:{position:"absolute",top:-6,right:-6,p:.25,bgcolor:"#ffffff",border:"1px solid #e6e6e3","&:hover":{bgcolor:"#f1f5f9"}},children:K(Hi,{sx:{fontSize:14}})})]},`${m.name}-${g}`):K(Fi,{size:"small",icon:K(tr,{sx:{fontSize:14}}),label:`${m.name} (${fl(m.size)})`,onDelete:()=>r(M=>M.filter((v,h)=>h!==g)),sx:{fontSize:14,height:26,bgcolor:"#f1f5f9"}},`${m.name}-${g}`))}):null,Ye(re,{sx:{position:"relative",display:"flex"},onDragOver:m=>{Array.from(m.dataTransfer?.types??[]).includes("Files")&&(m.preventDefault(),a(!0))},onDragLeave:m=>{m.currentTarget.contains(m.relatedTarget)||a(!1)},onDrop:m=>{Array.from(m.dataTransfer?.types??[]).includes("Files")&&(m.preventDefault(),a(!1),s(m.dataTransfer?.files??null))},children:[i?Ye(re,{sx:{position:"absolute",inset:0,zIndex:2,display:"flex",alignItems:"center",justifyContent:"center",gap:.75,borderRadius:1,border:"2px dashed #2f80ed",bgcolor:"rgba(47,128,237,0.08)",color:"#2f80ed",fontSize:14,fontWeight:600,pointerEvents:"none"},children:[K(tr,{sx:{fontSize:18}}),"\uC5EC\uAE30\uC5D0 \uB193\uC73C\uBA74 \uCCA8\uBD80\uB429\uB2C8\uB2E4"]}):null,K(RT,{value:o,placeholder:"\uB313\uAE00\uC744 \uC785\uB825\uD558\uC138\uC694",onChange:m=>t(m.target.value),fullWidth:!0,multiline:!0,minRows:c?1:3,maxRows:3,sx:{"& .MuiInputBase-root":{pl:2,pr:c?15:6.5,pb:c?void 0:5,borderRadius:0},"& .MuiOutlinedInput-notchedOutline":{border:"none"}}}),c?Ye(re,{sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",gap:.25},children:[p,K(Zo,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!o.trim()&&n.length===0,onClick:f,sx:{color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:K(dm,{sx:{fontSize:22}})})]}):Ye(fm,{children:[K(re,{sx:{position:"absolute",left:8,bottom:6,display:"flex",alignItems:"center",gap:.25},children:p}),K(Zo,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!o.trim()&&n.length===0,onClick:f,sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:K(dm,{sx:{fontSize:22}})})]})]}),K(re,{component:"input",ref:l,type:"file",multiple:!0,onChange:m=>{s(m.target.files),m.target.value=""},sx:{display:"none"}}),K(re,{component:"input",ref:d,type:"file",accept:"image/*",multiple:!0,onChange:m=>{s(m.target.files),m.target.value=""},sx:{display:"none"}})]})}import{useState as Tm}from"react";import{Box as $i,Checkbox as UT,IconButton as Ki,Tooltip as gl}from"@mui/material";import VT from"@mui/icons-material/Close";import GT from"@mui/icons-material/ArrowBack";import YT from"@mui/icons-material/ShareOutlined";import jT from"@mui/icons-material/ContentCopyOutlined";import XT from"@mui/icons-material/CheckCircle";import QT from"@mui/icons-material/CheckCircleOutlineOutlined";import{InfoAlert as WT,SuccessAlert as $T}from"@ehfuse/alerts";var bm=e=>e?e.replace(/<(script|style)[\s\S]*?<\/\1>/gi,"").replace(/<br\s*\/?>/gi,`
|
|
9
9
|
`).replace(/<\/(p|div|li|h[1-6]|tr)>/gi,`
|
|
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 KT(e){let o=[`[\uC5C5\uBB34] ${e.title}`],t=it(e.start_date),n=it(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=Io(e).name;r&&o.push(`\uC0C1\uD0DC: ${r}`);let i=bm(e.content);i&&o.push("",i);let a=String(e.note??"").trim();return a&&o.push("",`\uBE44\uACE0: ${a}`),o.join(`
|
|
13
|
-
`)}function km(e){navigator.clipboard.writeText(e).then(()=>$T("\uC5C5\uBB34 \uB0B4\uC6A9\uC744 \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>WT("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uB0B4\uC6A9\uC744 \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD574 \uC8FC\uC138\uC694."))}function nr(e,o){let t=KT(e);if(o&&typeof navigator.share=="function"){navigator.share({text:t}).catch(n=>{n?.name!=="AbortError"&&km(t)});return}km(t)}import{Fragment as ZT,jsx as no,jsxs as ym}from"react/jsx-runtime";function Sm({task:e,myAccountSeq:o=0,onToggleCompleted:t,onChangeTitle:n,onChangeIcon:r,onChangeIconColor:i,onClose:a,appBarMode:l=!1}){let d=Oe(),[c,s]=Tm(null),[f,p]=Tm(null),m=zn(e.icon||(e.is_notice?vo:e.is_event?"event":Me)),g=!!e.is_notice,M=!!e.is_event,v=g&&o>0&&(e.author_account_seq??0)===o,h=!ht(e,o),x=!M&&(g?v:(e.author_account_seq??0)===o||(e.manager_account_seq??0)===o);return ym(ZT,{children:[ym($i,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[l&&a?no(Ki,{"aria-label":"\uB4A4\uB85C",onClick:a,sx:{color:"#37352f",ml:-1},children:no(GT,{})}):null,x&&!l?no(gl,{title:e.completed&&e.completed_by?`${e.completed_by} \xB7 ${Vo(e.completed_time)} \uC644\uB8CC`:e.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC",arrow:!0,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:no(UT,{checked:e.completed,icon:no(QT,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:no(XT,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(B,S)=>t(e.seq,S),sx:{p:0}})}):null,l?null:no(gl,{title:h?"":"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,children:no(Ki,{size:"small",onClick:h?void 0:B=>p(B.currentTarget),sx:{color:e.icon_color||(g?"#e5484d":"#1e3a8a")},children:no(m,{sx:{fontSize:20}})})}),c!==null?no($i,{component:"input",autoFocus:!0,spellCheck:!1,value:c,onChange:B=>s(B.target.value),onBlur:()=>{c.trim()&&c.trim()!==e.title&&n(e.seq,c.trim()),s(null)},onKeyDown:B=>{B.key==="Enter"&&B.target.blur(),B.key==="Escape"&&s(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:18,fontWeight:500,color:"#37352f",p:0,m:0}}):l?no($i,{sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:g?"\uACF5\uC9C0":M?"\uC77C\uC815":e.is_bug?"\uC624\uB958":"\uC5C5\uBB34"}):no($i,{onClick:h?void 0:()=>s(e.title),sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:h?"default":"text",textDecoration:e.completed?"line-through":"none"},children:e.title}),no(gl,{title:d?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:no(Ki,{"aria-label":d?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>nr(e,d),sx:{color:"#6b7280"},children:d?no(YT,{sx:{fontSize:20}}):no(jT,{sx:{fontSize:20}})})}),a&&!l?no(Ki,{"aria-label":"\uB2EB\uAE30",onClick:a,sx:{color:"#6b7280"},children:no(VT,{})}):null]}),no(Qn,{anchorEl:f,value:e.icon||(g?vo:""),color:e.icon_color||(g?"#e5484d":"#1e3a8a"),onSelect:B=>r(e.seq,B),onSelectColor:B=>i?.(e.seq,B),onClose:()=>p(null)})]})}import{useState as zt}from"react";import{Box as lo,Button as ir,ButtonBase as fy,Checkbox as xy,Divider as tn,IconButton as gy,Menu as hy,MenuItem as by}from"@mui/material";import ky from"@mui/icons-material/ExpandLess";import Ty from"@mui/icons-material/ExpandMore";import yy from"@mui/icons-material/ConfirmationNumberOutlined";import Sy from"@mui/icons-material/Check";import By from"@mui/icons-material/DirectionsRunOutlined";import Cy from"@mui/icons-material/SpeedOutlined";import Sl from"@mui/icons-material/CheckCircle";import vy from"@mui/icons-material/CheckCircleOutlineOutlined";import Bl from"@mui/icons-material/CheckCircleOutlined";import Em from"@mui/icons-material/AccessTimeOutlined";import Iy from"@mui/icons-material/AutorenewOutlined";import _y from"@mui/icons-material/LabelOutlined";import wy from"@mui/icons-material/PersonOutlineOutlined";import Dy from"@mui/icons-material/SubjectOutlined";import Ey from"@mui/icons-material/StickyNote2Outlined";import My from"@mui/icons-material/PanToolAltOutlined";import{useState as JT}from"react";import{TextField as ey}from"@ehfuse/mui-form-controls";import{jsx as oy}from"react/jsx-runtime";function Bm({value:e,onCommit:o,onDraftChange:t,readOnly:n=!1}){let[r,i]=JT(null);return oy(ey,{value:r??e,placeholder:n?"":"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",slotProps:{input:{readOnly:n}},onChange:a=>{i(a.target.value),t?.(a.target.value)},onBlur:()=>{r!==null&&r.trim()!==e&&o(r),i(null)},onKeyDown:a=>{a.key==="Enter"&&a.target.blur(),a.key==="Escape"&&i(null)},sx:{mt:1}})}import{useMemo as kl,useState as Tl}from"react";import{Box as fo,Button as Im,IconButton as ty}from"@mui/material";import ny from"@mui/icons-material/AccountTreeOutlined";import ry from"@mui/icons-material/Add";import iy from"@mui/icons-material/Close";import ay from"@mui/icons-material/NextPlanOutlined";function Cn(e){return e.relations??[]}function $P(e,o,t){return Cn(e).some(n=>n.type===t&&n.task_seq===o.seq)||Cn(o).some(n=>n.type===t&&n.task_seq===e.seq)}function Cm(e){return`${e.created_time??""}|${String(e.seq).padStart(12,"0")}`}function hl(e,o){let t=new Map(o.map(m=>[m.seq,m]));t.set(e.seq,e);let n=new Map,r=(m,g)=>{n.has(m)||n.set(m,new Set),n.has(g)||n.set(g,new Set),n.get(m).add(g),n.get(g).add(m)};for(let m of t.values())for(let g of Cn(m))g.type==="follow_up"&&t.has(g.task_seq)&&r(m.seq,g.task_seq);let i=new Set([e.seq]),a=[e.seq];for(;a.length>0;){let m=a.shift();for(let g of n.get(m)??[])i.has(g)||(i.add(g),a.push(g))}let l=[...i].map(m=>t.get(m)).filter(m=>!!m).sort((m,g)=>Cm(m).localeCompare(Cm(g))),d=new Set;for(let m of Cn(e))m.type==="related"&&d.add(m.task_seq);for(let m of t.values())m.seq!==e.seq&&Cn(m).some(g=>g.type==="related"&&g.task_seq===e.seq)&&d.add(m.seq);let c=[...d].map(m=>t.get(m)).filter(m=>m!==void 0&&m.seq!==e.seq),s=[...t.values()].filter(m=>m.seq!==e.seq&&Cn(m).some(g=>g.type==="duplicate_of"&&g.task_seq===e.seq)),f=Cn(e).find(m=>m.type==="duplicate_of")?.task_seq,p=f?t.get(f)??null:null;return{lineage:l,related:c,duplicates:s,duplicateOf:p}}function bl(e,o){let t=hl(e,o);return(t.lineage.length>=2?t.lineage.length-1:0)+t.related.length+t.duplicates.length+(t.duplicateOf?1:0)}function vm(e,o){return bl(e,o)>0}import{Fragment as ly,jsx as Ke,jsxs as Jo}from"react/jsx-runtime";function yl({item:e,caption:o,onOpen:t,onUnlink:n}){let r=Ve(e.icon||Me);return Jo(fo,{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?Ke(fo,{component:"span",sx:{flexShrink:0,px:.6,py:.1,borderRadius:.75,fontSize:11.5,fontWeight:500,color:"#8a6d1d",bgcolor:"#faf1d7"},children:o}):null,r?Ke(r,{sx:{fontSize:16,flexShrink:0,color:e.icon_color||"#1e3a8a"}}):null,Jo(fo,{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]}),Ke(Re,{option:Io(e),small:!0}),n?Ke(ty,{className:"taskbox-relation-unlink",size:"small","aria-label":"\uC5F0\uACB0 \uD574\uC81C",onClick:n,sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:Ke(iy,{sx:{fontSize:15}})}):null]})}function _m({task:e,tasks:o,readOnly:t=!1,onOpenTask:n,onLink:r,onUnlink:i,onCreateFollowUp:a}){let[l,d]=Tl(!1),[c,s]=Tl(null),[f,p]=Tl(null),m=kl(()=>hl(e,o),[e,o]),g=m.lineage.length>=2,M=kl(()=>bl(e,o),[e,o]),v=kl(()=>{let x=new Set;for(let B of m.lineage)x.add(B.seq);for(let B of m.related)x.add(B.seq);for(let B of m.duplicates)x.add(B.seq);return m.duplicateOf&&x.add(m.duplicateOf.seq),[...x]},[m]),h=(x,B,S)=>{p({anchorEl:x,targetSeq:B,type:S})};return Jo(Wo,{icon:Ke(ny,{sx:{fontSize:19,display:"block"}}),title:Jo(ly,{children:["\uAD00\uB828 \uC5C5\uBB34",M>0?Ke(fo,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:M}):null]}),titleExtra:t?null:Jo(fo,{sx:{ml:"auto",display:"flex",alignItems:"center",gap:.5},children:[a?Ke(Im,{size:"small",color:"inherit",startIcon:Ke(ay,{sx:{fontSize:16}}),onClick:x=>s(x.currentTarget),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uD6C4\uC18D \uC5C5\uBB34"}):null,r?Ke(Im,{size:"small",color:"inherit",startIcon:Ke(ry,{sx:{fontSize:16}}),onClick:()=>d(!0),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uC5F0\uACB0"}):null]}),children:[Jo(fo,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:[g?Ke(fo,{sx:{mb:m.related.length||m.duplicates.length||m.duplicateOf?1:0},children:m.lineage.map((x,B)=>{let S=x.seq===e.seq,D=B===m.lineage.length-1;return Jo(fo,{sx:{display:"flex",gap:1},children:[Jo(fo,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:14,flexShrink:0,pt:1.1},children:[Ke(fo,{sx:{width:S?9:7,height:S?9:7,borderRadius:"50%",bgcolor:S?"#2f80ed":x.completed?"#9a9a97":"#c9c8c5",flexShrink:0}}),D?null:Ke(fo,{sx:{width:"2px",flex:1,bgcolor:"#e6e6e3"}})]}),Jo(fo,{sx:{flex:1,minWidth:0,pb:D?0:.5},children:[Jo(fo,{sx:{display:"flex",alignItems:"center",gap:.75},children:[Jo(fo,{component:"span",onClick:!S&&n?()=>n(x.seq):void 0,sx:{minWidth:0,fontSize:14,fontWeight:S?600:400,color:S?"#2f80ed":x.completed?"#9a9a97":"#37352f",textDecoration:x.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...!S&&n?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[x.ticket_no?`${x.ticket_no} `:"",x.title]}),Ke(Re,{option:Io(x),small:!0})]}),Ke(fo,{sx:{fontSize:12,color:"#9a9a97"},children:x.completed&&x.completed_time?`${x.completed_time} \uC644\uB8CC`:x.created_time??""})]})]},x.seq)})}):null,m.duplicateOf?Ke(yl,{item:m.duplicateOf,caption:"\uC6D0\uBCF8",onOpen:n?()=>n(m.duplicateOf.seq):void 0,onUnlink:!t&&i?x=>h(x.currentTarget,m.duplicateOf.seq,"duplicate_of"):void 0}):null,m.duplicates.map(x=>Ke(yl,{item:x,caption:"\uC911\uBCF5",onOpen:n?()=>n(x.seq):void 0,onUnlink:!t&&i?B=>h(B.currentTarget,x.seq,"duplicate_of"):void 0},`dup-${x.seq}`)),m.related.map(x=>Ke(yl,{item:x,onOpen:n?()=>n(x.seq):void 0,onUnlink:!t&&i?B=>h(B.currentTarget,x.seq,"related"):void 0},`rel-${x.seq}`)),M===0?Ke(fo,{sx:{px:1.25,py:.75,fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]}),r?Ke(Ei,{open:l,task:e,tasks:o,excludeSeqs:v,onClose:()=>d(!1),onSubmit:(x,B)=>r(e.seq,x,B)}):null,Ke(We,{open:!!c,anchorEl:c,title:"\uC774 \uC5C5\uBB34\uC5D0\uC11C \uC774\uC5B4\uC9C0\uB294 \uD6C4\uC18D \uC5C5\uBB34\uB97C \uB9CC\uB4DC\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uB9CC\uB4E4\uAE30",onCancel:()=>s(null),onConfirm:()=>{a?.(e.seq),s(null)}}),Ke(We,{open:!!f,anchorEl:f?.anchorEl??null,title:"\uC774 \uC5C5\uBB34\uC640\uC758 \uC5F0\uACB0\uC744 \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uD574\uC81C",onCancel:()=>p(null),onConfirm:()=>{f&&i?.(e.seq,f.targetSeq,f.type),p(null)}})]})}import{useState as sy}from"react";import{Box as et,CircularProgress as cy}from"@mui/material";import my from"@mui/icons-material/HistoryOutlined";import uy from"@mui/icons-material/ExpandMore";import{jsx as on,jsxs as rr}from"react/jsx-runtime";var dy={created:"\uC5C5\uBB34\uB97C \uB4F1\uB85D\uD588\uC2B5\uB2C8\uB2E4",completed:"\uC644\uB8CC \uCC98\uB9AC\uD588\uC2B5\uB2C8\uB2E4",uncompleted:"\uC644\uB8CC\uB97C \uD574\uC81C\uD588\uC2B5\uB2C8\uB2E4",confirm_requested:"\uD655\uC778\uC744 \uC694\uCCAD\uD588\uC2B5\uB2C8\uB2E4",acked:"\uD655\uC778\uD588\uC2B5\uB2C8\uB2E4",claimed:"\uC5C5\uBB34\uB97C \uAC00\uC838\uAC14\uC2B5\uB2C8\uB2E4",bug_verified:"\uC218\uC815\uC744 \uD655\uC778\uD588\uC2B5\uB2C8\uB2E4(\uC885\uB8CC)",bug_reopened:"\uC7AC\uC624\uD508\uD588\uC2B5\uB2C8\uB2E4"};function wm(e){return String(e??"").trim()||"\uC5C6\uC74C"}function py(e){if(e.kind!=="field")return dy[String(e.kind)]??"\uBCC0\uACBD\uD588\uC2B5\uB2C8\uB2E4";let o=String(e.field_label??e.field??"").trim()||"\uD56D\uBAA9",t=String(e.old_value??"").trim(),n=String(e.new_value??"").trim();return!t&&n?`${o}\uC744(\uB97C) "${n}"(\uC73C)\uB85C \uC785\uB825\uD588\uC2B5\uB2C8\uB2E4`:t&&!n?`${o}\uC744(\uB97C) \uBE44\uC6E0\uC2B5\uB2C8\uB2E4`:`${o}\uC744(\uB97C) "${wm(t)}" \u2192 "${wm(n)}" \uB85C \uBC14\uAFE8\uC2B5\uB2C8\uB2E4`}function Dm({taskSeq:e,items:o,loading:t,onExpand:n}){let[r,i]=sy(!1),a=()=>{let l=!r;i(l),l&&!o&&n?.(e)};return rr(et,{sx:{px:2,pb:2,display:"flex",flexDirection:"column",gap:.25},children:[rr(et,{role:"button",tabIndex:0,onClick:a,onKeyDown:l=>{(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),a())},sx:{display:"flex",alignItems:"center",gap:1,cursor:"pointer",fontSize:wr,fontWeight:500,color:"#37352f",userSelect:"none"},children:[on(my,{sx:{fontSize:18,display:"block",color:"#37352f"}}),"\uD65C\uB3D9",o&&o.length>0?` (${o.length})`:"",on(uy,{sx:{ml:"auto",fontSize:20,color:"#9a9a97",transition:"transform 120ms",transform:r?"rotate(180deg)":"none"}})]}),r?rr(et,{sx:{mt:1,display:"flex",flexDirection:"column",gap:1},children:[t&&!o?rr(et,{sx:{display:"flex",alignItems:"center",gap:1,color:"#9a9a97",fontSize:14.5},children:[on(cy,{size:14,thickness:5,sx:{color:"#9a9a97"}}),"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"]}):null,o&&o.length===0?on(et,{sx:{fontSize:14.5,color:"#9a9a97"},children:"\uAE30\uB85D\uB41C \uD65C\uB3D9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,(o??[]).map(l=>rr(et,{sx:{display:"flex",gap:1,alignItems:"baseline",minWidth:0},children:[on(et,{sx:{flexShrink:0,width:5,height:5,borderRadius:"50%",bgcolor:"#d5d8dc",transform:"translateY(-2px)"}}),rr(et,{sx:{minWidth:0,fontSize:14.5,color:"#37352f",lineHeight:1.5},children:[on(et,{component:"span",sx:{fontWeight:500},children:String(l.actor_name??"").trim()||"\uC774\uB984\uC5C6\uC74C"}),on(et,{component:"span",sx:{ml:.5},children:py(l)}),on(et,{component:"span",sx:{ml:.75,fontSize:13.5,color:"#9a9a97"},children:Vo(l.acted_time)})]})]},l.seq))]}):null]})}import{Fragment as To,jsx as N,jsxs as Ue}from"react/jsx-runtime";function ar({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return N(lo,{component:"span",sx:{color:"#9a9a97"},children:e})}function Mm({task:e,customTabs:o,statusOptions:t,avatarSrcByName:n,onChangeStatus:r,onChangeLabels:i,onAddLabelOption:a,onChangeProject:l,onAddProject:d,onChangeDate:c,onChangeReminder:s,onMemberEdit:f,onChangePriority:p,onChangeEstimatedTime:m,onChangeEventTime:g,onChangeEventPlace:M,onChangeEventAddress:v,onChangeNote:h,onChangeContent:x,onChangeContentHeight:B,onAddChecklistItem:S,onToggleChecklistItem:D,onRemoveChecklistItem:y,onUpdateChecklistItem:w,onConvertChecklistToTask:T,onOpenChecklistTask:b,onLinkChecklistTask:I,resolveChecklistTask:z,relatedTasksPool:u,onOpenRelatedTask:k,onLinkRelatedTask:R,onUnlinkRelatedTask:A,onCreateFollowUpTask:L,onAddAttachments:F,onRemoveAttachment:le,onPreview:ie,onDownload:me,onUpdateComment:se,onRemoveComment:Te,onToggleCommentReaction:fe,currentUserName:ae="",myAccountSeq:ee=0,noticeAdmin:ye=!1,hideProject:ze=!1,hideLabel:W=!1,showTitle:H=!1,onChangeTitle:Z,onToggleCompleted:C,onChangeIcon:E,onChangeIconColor:X,employees:oe=[],onAckConfirm:Ie,onRequestConfirm:q,activityItems:xe,activityLoading:Se,onLoadActivity:ce,onChangeBugField:V,sprints:Be=[],sprintProject:U=!1,hideSprint:Je=!1,onChangeSprint:zo,onChangeStoryPoints:Mn,onChangeResolution:Lt,onClaimTask:qo,onVerifyBug:pt}){let[Ko,ft]=zt(null),[Nt,rn]=zt(null),[ro,an]=zt(null),[De,P]=zt(null),[$,Q]=zt(!1),te={[jo]:$?{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"}},[Fe,qe]=zt(null),[co,ue]=zt(null),[eo,je]=zt(null),[oo,Ao]=zt(null),Ae=!!e.is_notice,Le=!!e.is_event,So=!!e.is_bug,On=!!qo&&Zr(e,ee),Fr=!!qo&&Jr(e,ee),Rn=!!pt&&So&&!!e.completed&&ee>0&&(e.author_account_seq??0)===ee&&!(e.acks??[]).some(O=>O.account_seq===ee),Mo=!ht(e,ee),ln=!e.is_event&&(e.is_notice?ee>0&&(e.author_account_seq??0)===ee:(e.author_account_seq??0)===ee||(e.manager_account_seq??0)===ee),Pn=zn(e.icon||(e.is_notice?vo:e.is_event?"event":Me)),sn=Ae?!Qr(e,ee):Mo,Ft=On||Fr?Ue(Fn,{onClick:O=>Ao(O.currentTarget),children:[N(My,{sx:{fontSize:16,mr:.5}}),"\uAC00\uC838\uAC00\uAE30"]}):null,Hr=Ae?Li(e,oe):"",Oo=Ae?rm(e,oe,ee):null,Bo=!Ae&&!Le?mi(e,ee):null,Wr=!!(Bo&&Bo.total>0||Ae&&Oo);return Ue(To,{children:[H?Ue(lo,{sx:{px:2,pt:2,pb:.5,display:"flex",alignItems:"flex-start",gap:1},children:[ln?N(xy,{checked:e.completed,icon:N(vy,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:N(Sl,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(O,Xi)=>{ro||an({anchorEl:O.currentTarget,nextCompleted:Xi})},sx:{p:0,mt:.25}}):null,N(gy,{size:"small","aria-label":"\uC544\uC774\uCF58 \uBCC0\uACBD",onClick:Mo?void 0:O=>rn(O.currentTarget),sx:{p:0,mt:.25,color:e.icon_color||(Ae?"#e5484d":"#1e3a8a")},children:N(Pn,{sx:{fontSize:20}})}),N(lo,{sx:{flex:1,minWidth:0},children:Ko!==null?N(lo,{component:"input",autoFocus:!0,spellCheck:!1,value:Ko,onChange:O=>ft(O.target.value),onBlur:()=>{Ko.trim()&&Ko.trim()!==e.title&&Z(e.seq,Ko.trim()),ft(null)},onKeyDown:O=>{O.key==="Enter"&&O.target.blur(),O.key==="Escape"&&ft(null)},sx:{width:"100%",border:"none",outline:"none",font:"inherit",fontSize:19,fontWeight:600,color:"#37352f",p:0,m:0}}):N(lo,{onClick:()=>ft(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})}),N(We,{open:!!ro,anchorEl:ro?.anchorEl??null,title:ro?.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:ro?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>an(null),onConfirm:()=>{ro&&C(e.seq,ro.nextCompleted),an(null)}}),N(Qn,{anchorEl:Nt,value:e.icon||(Ae?vo:""),color:e.icon_color||(Ae?"#e5484d":"#1e3a8a"),onSelect:O=>E(e.seq,O),onSelectColor:O=>X?.(e.seq,O),onClose:()=>rn(null)})]}):null,Ue(lo,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:0,[jo]:{pb:0,"& > :last-child":{mb:0}}},children:[N(_i,{hideProject:ze,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:!Le,notice:Ae,event:Le,readOnly:Mo,targetSummary:Hr,onChangeProject:O=>l(e.seq,O),onAddProject:d,onChangeStartDate:O=>c(e.seq,"start_date",O),onChangeDueDate:O=>c(e.seq,"due_date",O),onChangeReminder:O=>s(e.seq,O),onChangePriority:O=>p(e.seq,O),onChangeEstimatedTime:O=>m(e.seq,O),onChangeEventTime:O=>g?.(e.seq,O),onChangeEventPlace:O=>M?.(e.seq,O),onChangeEventAddress:O=>v?.(e.seq,O),onMemberEdit:O=>f(e,O),narrowCollapsedSx:te,reminderLocked:e.completed,managerAction:Ft,leading:Ue(To,{children:[Rn||Ft&&(Ae||Le)?Ue(lo,{sx:{gridColumn:"1 / -1",display:"flex",justifyContent:"flex-start",gap:2,px:2,py:1.5},children:[Ae||Le?Ft:null,Rn?Ue(To,{children:[N(ir,{variant:"contained",size:"large",onClick:()=>pt?.(e.seq,!0),sx:{bgcolor:"#2f80ed"},children:"\uAC80\uC99D\uC644\uB8CC"}),N(ir,{variant:"outlined",size:"large",color:"error",onClick:()=>pt?.(e.seq,!1),children:"\uC7AC\uC624\uD508"})]}):null]}):null,So&&e.ticket_no?N(pe,{icon:N(yy,{sx:{fontSize:17}}),label:"\uD2F0\uCF13",children:N(lo,{component:"span",sx:{fontVariantNumeric:"tabular-nums"},children:e.ticket_no})}):null,Le?null:N(lo,{sx:So&&e.ticket_no||Wr?void 0:{gridColumn:"1 / -1"},children:N(pe,{icon:N(Iy,{sx:{fontSize:17}}),label:"\uC0C1\uD0DC",onClick:Mo||e.completed?void 0:O=>qe(O),children:N(Re,{option:Io(e)})})}),Bo&&Bo.total>0?N(lo,{children:N(pe,{icon:N(Bl,{sx:{fontSize:17}}),label:"\uD655\uC778",children:Bo.canConfirm?N(ir,{size:"small",variant:"contained",onClick:()=>Ie?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):Ue(ir,{size:"small",variant:"outlined",color:"inherit",startIcon:Bo.myTime?N(Sl,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:O=>P({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:[Bo.count," / ",Bo.total]})})}):null,Ae&&Oo?N(lo,{children:N(pe,{icon:N(Bl,{sx:{fontSize:17}}),label:"\uD655\uC778",children:N(lo,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,minWidth:0},children:Oo.canAck?N(ir,{size:"small",variant:"contained",onClick:()=>Ie?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):N(ir,{size:"small",variant:"outlined",color:"inherit",startIcon:Oo.acked?N(Sl,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:O=>P({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:Oo.total>0&&Oo.count>=Oo.total?"\uC644\uB8CC":Ue(To,{children:[Oo.count,N(lo,{component:"span",sx:{mx:.4},children:"/"}),Oo.total]})})})})}):null,U&&!Je&&!Le&&!Ae?Ue(To,{children:[N(pe,{icon:N(By,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:Mo?void 0:O=>ue(O),children:(e.sprint_seq??0)>0?Be.find(O=>O.seq===e.sprint_seq)?.name??"\uC0AD\uC81C\uB41C \uC2A4\uD504\uB9B0\uD2B8":N(ar,{label:"\uBBF8\uBC30\uC815"})}),N(pe,{icon:N(Cy,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",children:N(Rt,{value:(e.story_points??0)>0?String(e.story_points):"",placeholder:"\uBBF8\uCD94\uC815",readOnly:Mo,onCommit:O=>Mn?.(e.seq,Number(O.replace(/[^0-9.]/g,""))||0)})})]}):null,Le||W?null:N(lo,{sx:[{gridColumn:"1 / -1"},te??null],children:N(pe,{icon:N(_y,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:Mo?void 0:O=>je(O),children:(e.label_keys??[]).length>0?N(Ht,{labelKeys:e.label_keys??[],labelOptions:t}):N(ar,{})})})]}),trailing:Ue(To,{children:[So?N(wi,{values:{repro:e.bug_repro??"",device:e.bug_device??"",where:e.bug_where??"",version:e.bug_version??"",resolution:e.resolution??""},readOnly:Mo,showResolution:!!e.completed,onChangeRepro:O=>V?.(e.seq,"bug_repro",O),onChangeDevice:O=>V?.(e.seq,"bug_device",O),onChangeWhere:O=>V?.(e.seq,"bug_where",O),onChangeVersion:O=>V?.(e.seq,"bug_version",O),onChangeResolution:O=>Lt?.(e.seq,O)}):null,N(pe,{icon:N(wy,{sx:{fontSize:17}}),label:"\uC791\uC131\uC790",sx:[uo(9),te??null],children:e.created_by?Ue(To,{children:[N(_o,{names:[e.created_by],size:20,avatarSrcByName:n}),e.created_by]}):N(ar,{})}),N(pe,{icon:N(Em,{sx:{fontSize:17}}),label:"\uC791\uC131\uC2DC\uAC04",sx:[uo(11),te??null],children:e.created_time?Vo(e.created_time):N(ar,{})}),e.completed?Ue(To,{children:[N(pe,{icon:N(Bl,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC790",sx:[uo(10),te??null],children:e.completed_by?Ue(To,{children:[N(_o,{names:[e.completed_by],size:20,avatarSrcByName:n}),e.completed_by]}):N(ar,{})}),N(pe,{icon:N(Em,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC2DC\uAC04",sx:[uo(12),te??null],children:e.completed_time?Vo(e.completed_time):N(ar,{})})]}):null]})}),Ue(lo,{sx:{display:"none",[jo]:{display:"block",mt:1.5,mb:0}},children:[N(tn,{sx:{borderColor:"#e6e6e3"}}),N(fy,{onClick:()=>Q(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:$?Ue(To,{children:["\uC811\uAE30 ",N(ky,{sx:{fontSize:18}})]}):Ue(To,{children:["\uC815\uBCF4 \uB354\uBCF4\uAE30 ",N(Ty,{sx:{fontSize:18}})]})})]}),Ue(lo,{children:[N(tn,{sx:{my:1.5,borderColor:"#e6e6e3",[jo]:{mt:0,mb:1.25}}}),N(Wo,{icon:N(Dy,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",children:N(lo,{sx:{userSelect:"text"},children:N(Di,{syncKey:e.seq,value:e.content??"",height:e.content_height??0,onChangeHeight:B?O=>B(e.seq,O):void 0,readOnly:Mo,onChange:O=>x(e.seq,O)})})}),e.is_bug?null:Ue(To,{children:[N(tn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),N(Wo,{icon:N(Ey,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:N(lo,{sx:{userSelect:"text"},children:N(Bm,{value:e.note,readOnly:sn,onCommit:O=>h(e.seq,O)})})})]}),Le?null:Ue(To,{children:[N(tn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),N(Mi,{taskSeq:e.seq,checklist:e.checklist??[],removeLocked:sn,onAdd:S,onToggle:D,onRemove:y,onUpdate:w,onConvertToTask:T,onOpenLinkedTask:b,resolveLinkedTask:z,linkCandidates:u,linkBaseTask:e,onLinkExistingTask:I})]}),u&&!Le&&!Ae&&vm(e,u)?Ue(To,{children:[N(tn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),N(_m,{task:e,tasks:u,readOnly:Mo,onOpenTask:k,onLink:R,onUnlink:A,onCreateFollowUp:L})]}):null,N(tn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),N(zi,{taskSeq:e.seq,attachments:e.attachments??[],removeLocked:sn,onAdd:F,onRemove:le,onPreview:ie?O=>ie({...O,taskSeq:e.seq}):void 0,onDownload:me?O=>me({...O,taskSeq:e.seq}):void 0})]}),N(tn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),N(gm,{taskSeq:e.seq,comments:e.comments??[],currentUserName:ae,myAccountSeq:ee,avatarSrcByName:n,onUpdate:se,onRemove:Te,onToggleReaction:fe,onPreview:ie?O=>ie({...O,taskSeq:e.seq}):void 0,onDownload:me?O=>me({...O,taskSeq:e.seq}):void 0}),ce?Ue(To,{children:[N(tn,{sx:{mb:1.5,borderColor:"#e6e6e3"}}),N(Dm,{taskSeq:e.seq,items:xe,loading:Se,onExpand:ce})]}):null]}),N(Xr,{anchorEl:Fe,value:e.status,options:Ae?xr:So?mn:gr,onSelect:O=>r(e.seq,O),onClose:()=>qe(null)}),N(hy,{transitionDuration:0,anchorEl:co,open:!!co,onClose:()=>ue(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...Be.filter(O=>`custom-${O.group_seq}`===String(e.tab_key??"")).map(O=>({seq:O.seq,label:Fo(O)}))].map(O=>Ue(by,{onClick:()=>{zo?.(e.seq,O.seq),ue(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[O.label,(e.sprint_seq??0)===O.seq?N(Sy,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},O.seq))}),N(ci,{anchorEl:De?.anchorEl??null,open:!!De?.open,acks:e.acks??[],total:Oo?.total??Bo?.total??0,avatarSrcByName:n,onRequestConfirm:q&&Bo&&Bo.count<Bo.total?()=>{q(e.seq),P(O=>O?{...O,open:!1}:null)}:void 0,onClose:()=>P(O=>O?{...O,open:!1}:null)}),N(Ai,{anchorEl:eo,selectedKeys:e.label_keys??[],labelOptions:t,onToggle:O=>i(e.seq,Yr(e.label_keys??[],O)),onAddLabel:a,onClose:()=>je(null)}),N(We,{open:!!oo,anchorEl:oo,title:On?"\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:()=>Ao(null),onConfirm:()=>{qo?.(e.seq),Ao(null)}})]})}import{jsx as Po,jsxs as Ly}from"react/jsx-runtime";function Tz(){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 yz({open:e,task:o,onClose:t,onAddComment:n,onSaveFields:r,myAccountSeq:i=0,onToggleCompleted:a,onChangeTitle:l,onChangeIcon:d,onChangeIconColor:c,...s}){let f=Oe(),p=Rm(null);o&&(p.current=o);let m=o??p.current,[g,M]=Oy({}),v=Object.keys(g).length>0;Om(()=>{M({})},[o?.seq,e]);let h=Rm(null);if(Om(()=>{h.current?.scrollTo({top:0})},[o?.seq]),!m)return null;let x=f&&v?{...m,...g}:m,B=(T,b)=>{f?M(I=>({...I,...T})):b()},S=()=>{let T=g;M({});let b=m.seq,I=T.title===void 0?void 0:String(T.title).trim();if(r){let z={...T};I!==void 0&&(I?z.title=I:delete z.title),Object.keys(z).length>0&&r(b,z),zm({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"});return}I&&l(b,I),T.icon!==void 0&&d(b,String(T.icon)),T.icon_color!==void 0&&c?.(b,String(T.icon_color)),T.status!==void 0&&s.onChangeStatus(b,T.status),T.label_keys!==void 0&&s.onChangeLabels(b,T.label_keys??[]),T.tab_key!==void 0&&s.onChangeProject(b,String(T.tab_key??"")),T.start_date!==void 0&&s.onChangeDate(b,"start_date",String(T.start_date??"")),T.due_date!==void 0&&s.onChangeDate(b,"due_date",String(T.due_date??"")),T.reminder!==void 0&&s.onChangeReminder(b,T.reminder),T.priority!==void 0&&s.onChangePriority(b,T.priority),T.estimated_time!==void 0&&s.onChangeEstimatedTime(b,String(T.estimated_time??"")),T.event_time!==void 0&&s.onChangeEventTime?.(b,String(T.event_time??"")),T.event_place!==void 0&&s.onChangeEventPlace?.(b,String(T.event_place??"")),T.event_address!==void 0&&s.onChangeEventAddress?.(b,String(T.event_address??"")),T.content!==void 0&&s.onChangeContent(b,String(T.content??"")),T.note!==void 0&&s.onChangeNote(b,String(T.note??"")),zm({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"})},D={...s,onChangeStatus:(T,b)=>B({status:b},()=>s.onChangeStatus(T,b)),onChangeLabels:(T,b)=>B({label_keys:b},()=>s.onChangeLabels(T,b)),onChangeProject:(T,b)=>B({tab_key:b},()=>s.onChangeProject(T,b)),onChangeDate:(T,b,I)=>B({[b]:I},()=>s.onChangeDate(T,b,I)),onChangeReminder:(T,b)=>B({reminder:b},()=>s.onChangeReminder(T,b)),onChangePriority:(T,b)=>B({priority:b},()=>s.onChangePriority(T,b)),onChangeEstimatedTime:(T,b)=>B({estimated_time:b},()=>s.onChangeEstimatedTime(T,b)),onChangeEventTime:(T,b)=>B({event_time:b},()=>s.onChangeEventTime?.(T,b)),onChangeEventPlace:(T,b)=>B({event_place:b},()=>s.onChangeEventPlace?.(T,b)),onChangeEventAddress:(T,b)=>B({event_address:b},()=>s.onChangeEventAddress?.(T,b)),onChangeContent:(T,b)=>B({content:b},()=>s.onChangeContent(T,b)),onChangeNote:(T,b)=>B({note:b},()=>s.onChangeNote(T,b))},y=Po(Mm,{...D,task:x,myAccountSeq:i,onChangeTitle:(T,b)=>B({title:b},()=>l(T,b)),onToggleCompleted:a,onChangeIcon:(T,b)=>B({icon:b},()=>d(T,b)),onChangeIconColor:(T,b)=>B({icon_color:b},()=>c?.(T,b)),showTitle:f}),w=Po(hm,{onSubmit:(T,b)=>n(x.seq,T,b)},x.seq);return f?Po(Ay,{open:e,onClose:t,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:x.is_notice?"\uACF5\uC9C0\uC0AC\uD56D":x.is_event?"\uC77C\uC815":x.is_bug?"\uC624\uB958":"\uC5C5\uBB34",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1},custom:[{icon:Po(zy,{sx:{ml:2,color:"#6b7280"}}),tooltip:"\uACF5\uC720\uD558\uAE30",onClick:()=>nr(x,!0)},{icon:Po(Ry,{variant:"contained",size:"small",disableElevation:!0,disabled:!v,onClick:v?S:void 0,sx:{ml:1,minWidth:0,px:1.5,py:.35,fontSize:14,fontWeight:600,bgcolor:"#2f80ed","&:hover":{bgcolor:"#2f80ed"}},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:w},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:Po(Ui,{sx:{userSelect:"none",width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:y})}]},m.seq):Po(Py,{anchor:"right",open:e,onClose:t,sx:{zIndex:T=>T.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:Ly(Ui,{sx:{display:"flex",flexDirection:"column",height:"100%",userSelect:"none"},children:[Po(Sm,{task:x,myAccountSeq:i,onToggleCompleted:a,onChangeTitle:l,onChangeIcon:d,onChangeIconColor:c,onClose:t}),Po(Pm,{sx:{borderColor:"#e6e6e3"}}),Po(Ui,{sx:{flex:1,minHeight:0},children:Po(qy,{ref:h,style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:y})}),Po(Pm,{sx:{borderColor:"#37352f"}}),Po(Ui,{sx:{flexShrink:0},children:w})]})})}import{useEffect as Fy,useState as vn}from"react";import{Box as Eo,Button as Il,IconButton as qm}from"@mui/material";import{FormDialog as Hy}from"@ehfuse/mui-form-dialog";import Wy from"@mui/icons-material/EditOutlined";import{ErrorAlert as Am}from"@ehfuse/alerts";import{ClearTextField as Lm,DateTextField as Nm,LabelSelect as Fm}from"@ehfuse/mui-form-controls";var Cl="custom-";function Ny(e){return e.startsWith(Cl)}function Cz(e){return e>0?`${Cl}${e}`:""}function vl(e){if(!Ny(e))return 0;let o=Number(e.slice(Cl.length));return Number.isInteger(o)&&o>0?o:0}import{Fragment as Ky,jsx as Qe,jsxs as nn}from"react/jsx-runtime";var $y=[{value:"planning",label:"\uACC4\uD68D\uC911"},{value:"active",label:"\uC9C4\uD589\uC911"},{value:"closed",label:"\uC885\uB8CC"}];function Hm(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):"-"}function Pz({open:e,customTabs:o,sprints:t,onClose:n,onCreate:r,onUpdate:i,onChangeStatus:a,onRemove:l}){let d=o.filter(u=>u.useSprints&&!u.archived),[c,s]=vn(""),[f,p]=vn(""),[m,g]=vn(""),[M,v]=vn(""),[h,x]=vn(""),[B,S]=vn(!1),[D,y]=vn(0);Fy(()=>{e&&(s(d.length===1?d[0].key:""),p(""),g(""),v(""),x(""),y(0))},[e]);let w=()=>{p(""),g(""),v(""),x(""),y(0)},T=u=>{y(u.seq),s(`custom-${u.group_seq}`),p(u.name),g(u.goal),v(u.start_date),x(u.end_date)},b=async()=>{let u=vl(c);if(!u){Am("\uBAA9\uD45C\uB97C \uB9CC\uB4E4 \uD504\uB85C\uC81D\uD2B8\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}if(!f.trim()){Am("\uBAA9\uD45C \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}S(!0);try{if(D>0){i(D,{name:f.trim(),goal:m.trim(),start_date:M,end_date:h}),w();return}await r({group_seq:u,name:f.trim(),goal:m.trim(),start_date:M,end_date:h})&&w()}finally{S(!1)}},I=new Map(o.map(u=>[vl(u.key),u.label])),z=Qe(Eo,{children:d.length===0?Qe(Eo,{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.'}):nn(Ky,{children:[nn(Eo,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2.5,mt:1},children:[Qe(Fm,{label:"\uD504\uB85C\uC81D\uD2B8",size:"medium",value:c,options:d.map(u=>({value:u.key,label:u.label})),onChange:u=>s(String(u.target.value)),disabled:D>0}),Qe(Lm,{label:"\uBAA9\uD45C \uC774\uB984",size:"medium",placeholder:"\uC608: 8\uC6D4 2\uC8FC\uCC28",value:f,onChange:u=>p(u.target.value)}),Qe(Nm,{size:"medium",label:"\uC2DC\uC791\uC77C",value:M,onChange:u=>v(u.target.value)}),Qe(Nm,{size:"medium",label:"\uC885\uB8CC\uC77C",value:h,onChange:u=>x(u.target.value)}),Qe(Lm,{label:"\uC124\uBA85",size:"medium",placeholder:"\uC120\uD0DD \uC785\uB825",value:m,onChange:u=>g(u.target.value),sx:{gridColumn:"1 / -1"}})]}),nn(Eo,{sx:{mt:1.5,display:"flex",justifyContent:"flex-end",gap:1},children:[D>0?Qe(Il,{color:"inherit",onClick:w,disabled:B,children:"\uCDE8\uC18C"}):null,Qe(Il,{variant:"contained",onClick:()=>{b()},disabled:B,children:D>0?"\uBAA9\uD45C \uC800\uC7A5":"\uBAA9\uD45C \uB9CC\uB4E4\uAE30"})]}),Qe(Eo,{sx:{mt:2,borderTop:"1px solid #e6e6e3"},children:t.length===0?Qe(Eo,{sx:{py:3,textAlign:"center",fontSize:14,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):t.map(u=>nn(Eo,{sx:{display:"flex",flexDirection:"column",gap:1,py:1.75,borderBottom:"1px solid #f0efed"},children:[nn(Eo,{sx:{minWidth:0},children:[nn(Eo,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[Qe(Eo,{component:"span",sx:{fontSize:16,fontWeight:600,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:u.name}),Qe(Eo,{component:"span",sx:{flexShrink:0,px:1,py:.25,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:13,fontWeight:500},children:I.get(u.group_seq)??"\uC0AD\uC81C\uB41C \uD504\uB85C\uC81D\uD2B8"}),nn(Eo,{component:"span",sx:{flexShrink:0,fontSize:14,color:"#57564f"},children:[Hm(u.start_date)," ~ ",Hm(u.end_date)]})]}),u.goal?Qe(Eo,{sx:{mt:.5,fontSize:14,color:"#787774",lineHeight:1.5},children:u.goal}):null]}),nn(Eo,{sx:{display:"flex",alignItems:"center",gap:.5},children:[Qe(Fm,{label:"\uC0C1\uD0DC",showLabel:!1,size:"small",value:u.status,options:$y.map(k=>({value:k.value,label:k.label})),onChange:k=>a(u.seq,String(k.target.value)),sx:{width:104,flexShrink:0}}),Qe(qm,{"aria-label":"\uBAA9\uD45C \uC218\uC815",onClick:()=>T(u),sx:{color:"#9a9a97","&:hover":{color:"#2563eb"}},children:Qe(Wy,{sx:{fontSize:18}})}),Qe(qm,{"aria-label":"\uBAA9\uD45C \uC0AD\uC81C",onClick:()=>l(u.seq),sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:Qe(yt,{style:{width:16,height:16}})})]})]},u.seq))})]})});return Qe(Hy,{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:z}],actions:{showCancelButton:!1,right:Qe(Il,{variant:"contained",onClick:n,children:"\uB2EB\uAE30"})}})}import{useState as Wm}from"react";import{Box as so,Button as _l,Divider as Uy,IconButton as Vy,TextField as Gy}from"@mui/material";import{FormDialog as Yy}from"@ehfuse/mui-form-dialog";import jy from"@mui/icons-material/OpenInNewOutlined";import Xy from"@mui/icons-material/EventOutlined";import{ConfirmDialog as Qy}from"@ehfuse/alerts";import{jsx as Ee,jsxs as In}from"react/jsx-runtime";function Kz({open:e,imports:o,onRegister:t,onRemove:n,onClose:r}){let[i,a]=Wm(""),[l,d]=Wm(!1),c=async()=>{let p=i.trim();if(p){d(!0);try{await t(p)&&a("")}finally{d(!1)}}},s=async p=>{await Qy({title:"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",message:`"${p.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}" \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&n(p.seq)},f=In(so,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[In(so,{sx:{color:"#37352f",lineHeight:1.7},children:["\uAD6C\uAE00 \uCE98\uB9B0\uB354\uC758 \uC77C\uC815\uC744 ",Ee("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uC5C5\uBB34\uD568 \uCE98\uB9B0\uB354\uC5D0 \uD568\uAED8 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4.",Ee("br",{}),"\uD45C\uC2DC/\uC228\uAE40\uC740 \uC5C5\uBB34\uD568 \uC6B0\uC0C1\uB2E8\uC758 ",Ee("b",{children:"\uAD6C\uAE00 \uC77C\uC815"})," \uC2A4\uC704\uCE58\uB85C \uCF1C\uACE0 \uB055\uB2C8\uB2E4."]}),Ee(so,{sx:{fontWeight:700,color:"#37352f",mt:.5},children:"\uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354"}),o.length>0?Ee(so,{sx:{display:"flex",flexDirection:"column",border:"1px solid #e6e6e3",borderRadius:1},children:o.map((p,m)=>In(so,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:.75,borderTop:m>0?"1px solid #efefed":"none"},children:[Ee(Xy,{sx:{fontSize:18,color:"#0f9d58",flexShrink:0}}),Ee(so,{component:"span",sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:p.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),Ee(Vy,{"aria-label":"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",size:"small",onClick:()=>{s(p)},sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:Ee(yt,{sx:{fontSize:18}})})]},p.seq))}):Ee(so,{sx:{color:"#9a9a97",px:.5},children:"\uC544\uC9C1 \uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}),Ee(Uy,{sx:{my:1,borderColor:"#e6e6e3"}}),Ee(so,{sx:{fontWeight:700,color:"#37352f"},children:"\uC0C8 \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30"}),In(so,{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:[Ee(so,{children:In(so,{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 > ",Ee("b",{children:"\uC124\uC815 \uBC0F \uACF5\uC720"}),"\uB97C \uC5FD\uB2C8\uB2E4."]})}),Ee(so,{children:In(so,{component:"span",children:[Ee("b",{children:"\uCE98\uB9B0\uB354 \uD1B5\uD569"})," \uC139\uC158\uC758 ",Ee("b",{children:'"iCal \uD615\uC2DD\uC758 \uBE44\uBC00 \uC8FC\uC18C"'})," \uB97C \uBCF5\uC0AC\uD574 \uC544\uB798\uC5D0 \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),Ee(so,{children:Ee(so,{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."})}),Ee(so,{children:Ee(so,{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."})})]}),In(so,{sx:{display:"flex",gap:2,alignItems:"center"},children:[Ee(Gy,{value:i,onChange:p=>a(p.target.value),fullWidth:!0,label:"\uBE44\uBC00 iCal \uC8FC\uC18C",placeholder:"https://calendar.google.com/calendar/ical/\u2026/basic.ics",slotProps:{input:{spellCheck:!1}}}),Ee(_l,{variant:"contained",disabled:!i.trim()||l,onClick:()=>{c()},sx:{flexShrink:0},children:l?"\uD655\uC778 \uC911\u2026":"\uB4F1\uB85D"})]})]});return Ee(Yy,{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:f}],actions:{showCancelButton:!1,left:Ee(_l,{variant:"outlined",startIcon:Ee(jy,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:Ee(_l,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})}})}import{Box as qt,Button as zr,TextField as Zy}from"@mui/material";import{FormDialog as Jy}from"@ehfuse/mui-form-dialog";import e0 from"@mui/icons-material/ContentCopyOutlined";import $m from"@mui/icons-material/OpenInNewOutlined";import{InfoAlert as Km}from"@ehfuse/alerts";import{Fragment as t0,jsx as Ze,jsxs as _n}from"react/jsx-runtime";function o0(e){return`${window.location.origin}/api/v1/taskbox/calendar/${e}.ics`}function Zz({open:e,feed:o,feedTaskCount:t,buildFeedUrl:n,onSubscribe:r,onClose:i}){let a=n??o0,l=o.subscribed?a(o.token):"",d=()=>{navigator.clipboard.writeText(l).then(()=>Km("\uD53C\uB4DC \uC8FC\uC18C\uB97C \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>Km("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uC8FC\uC18C\uB97C \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD558\uC138\uC694."))},c=()=>{let f=l.replace(/^https?:\/\//,"webcal://");window.open(`https://calendar.google.com/calendar/r?cid=${encodeURIComponent(f)}`,"_blank")},s=_n(qt,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[_n(qt,{sx:{color:"#37352f",lineHeight:1.7},children:["\uB0B4\uAC00 \uAD00\uC5EC\uD55C \uC5C5\uBB34\uB97C ",Ze("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0\uC11C \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4."]}),t===0?_n(qt,{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.",Ze("br",{}),Ze("b",{children:"\uB9C8\uAC10\uAE30\uD55C\uC774 \uC788\uB294 \uB0B4 \uC5C5\uBB34 \uB610\uB294 \uBCF4\uB0B8\uC5C5\uBB34"}),"\uAC00 \uC0DD\uAE30\uBA74"," ",o.subscribed?"\uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0 \uC790\uB3D9\uC73C\uB85C \uD45C\uC2DC\uB429\uB2C8\uB2E4.":"\uC5EC\uAE30\uC11C \uAD6C\uB3C5\uC744 \uC2DC\uC791\uD558\uC138\uC694."]}):o.subscribed&&o.enabled?_n(t0,{children:[Ze(Zy,{value:l,fullWidth:!0,label:"\uB0B4 \uD53C\uB4DC \uC8FC\uC18C",slotProps:{input:{readOnly:!0}}}),_n(qt,{sx:{display:"flex",gap:2},children:[Ze(zr,{variant:"outlined",startIcon:Ze(e0,{}),onClick:d,children:"\uC8FC\uC18C \uBCF5\uC0AC"}),Ze(zr,{variant:"contained",startIcon:Ze($m,{}),onClick:c,children:"Google \uCE98\uB9B0\uB354\uC5D0 \uCD94\uAC00"})]}),_n(qt,{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:[Ze(qt,{children:_n("span",{children:["\uBC84\uD2BC\uC774 \uB3D9\uC791\uD558\uC9C0 \uC54A\uC73C\uBA74 \uAD6C\uAE00 \uCE98\uB9B0\uB354 > \uB2E4\uB978 \uCE98\uB9B0\uB354 + > ",Ze("b",{children:"URL\uB85C \uCD94\uAC00"}),"\uC5D0 \uC704 \uC8FC\uC18C\uB97C \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),Ze(qt,{children:Ze("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."})}),Ze(qt,{children:Ze("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."})}),Ze(qt,{children:Ze("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."})})]})]}):Ze(zr,{variant:"contained",onClick:r,sx:{alignSelf:"flex-start"},children:"\uAD6C\uB3C5 \uC2DC\uC791 (\uD53C\uB4DC \uBC1C\uAE09)"})]});return Ze(Jy,{open:e,onClose:i,width:680,title:"\uAD6C\uAE00 \uCE98\uB9B0\uB354\uB85C \uB0B4\uBCF4\uB0B4\uAE30",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-calendar-subscribe",sections:[{id:"calendar-subscribe",showTitle:!1,children:s}],actions:{showCancelButton:!1,left:Ze(zr,{variant:"outlined",startIcon:Ze($m,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:Ze(zr,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}import{useEffect as n0,useMemo as wl,useState as Dl}from"react";import{Box as qr,Button as r0,Typography as i0}from"@mui/material";import{FormDialog as a0}from"@ehfuse/mui-form-dialog";import{SearchTextField as l0}from"@ehfuse/mui-form-controls";import{TreeView as s0}from"@ehfuse/tree-view";import{Fragment as f0,jsx as ot,jsxs as x0}from"react/jsx-runtime";function Um(e){return`${e.name}#${e.seq}`}function c0(e){return Number(e.slice(e.lastIndexOf("#")+1))||0}function m0(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 u0(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 d0(e){let o=[[e.name,e.role_name].filter(Boolean).join(" "),e.department].filter(Boolean).join(" / ");return{id:`emp:${e.seq}`,label:Um(e),renderLabel:ot(qr,{component:"span",sx:{display:"inline-flex",alignItems:"baseline",gap:.75},children:ot(qr,{component:"span",sx:{fontWeight:400,color:"text.primary"},children:o})})}}function Vm(e,o){let t=(e.groups??[]).map(r=>Vm(r,o)).filter(r=>r!==null),n=(e.employees??[]).filter(r=>u0(r,o)).map(d0);return t.length===0&&n.length===0?null:{id:`group:${e.key}`,label:e.name,children:[...t,...n]}}function p0({groups:e,allEmployees:o,initialSelectedSeqs:t,multiple:n,isMobile:r,onSelectionChange:i}){let[a,l]=Dl(""),d=wl(()=>e.map(s=>Vm(s,a.trim().toLowerCase())).filter(s=>s!==null),[e,a]),c=wl(()=>o.filter(s=>t.includes(s.seq)).map(Um),[]);return x0(f0,{children:[ot(qr,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:ot(l0,{size:"small",fullWidth:!0,placeholder:"\uC774\uB984, \uBD80\uC11C \uAC80\uC0C9",onSearch:l,onClear:()=>l(""),sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),ot(qr,{sx:r?{display:"flex",flexDirection:"column"}:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:ot(s0,{items:d,checkbox:!0,multiSelect:n,selectionMode:"child",showSearch:!1,defaultExpanded:!0,initialSelections:c,onChange:s=>i(s.map(c0).filter(f=>f>0)),styles:{border:"none",borderRadius:"0"}})})]})}function lq({open:e,title:o="\uC9C1\uC6D0 \uC120\uD0DD",hint:t="",groups:n,multiple:r=!1,selectedSeqs:i,confirmText:a="\uD655\uC778",onConfirm:l,onClose:d}){let c=Oe(),[s,f]=Dl([]),[p,m]=Dl(0),g=wl(()=>m0(n),[n]),M=i??[];n0(()=>{e&&(f(M),m(h=>h+1))},[e]);let v=()=>{let h=g.filter(x=>s.includes(x.seq));l(r?h:h.slice(0,1)),d()};return ot(a0,{open:e,onClose:d,title:`${o}${r&&s.length>0?` (${s.length}\uBA85)`:""}`,locale:"ko",fullScreen:c,mobilePresentation:c?"slide":"dialog",draggable:!0,width:"600px",tabs:{visible:!1},titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},scrollPastLastSection:!1,sectionContentPaddingTop:0,fontScale:{enabled:!0},fontScaleKey:"taskbox-employee-select",sections:[{id:"employee-select",title:"\uC9C1\uC6D0 \uC120\uD0DD",showTitle:!1,children:ot(qr,{sx:{...c?{}:{height:560},display:"flex",flexDirection:"column",border:"1px solid #cccccc",borderRadius:1,...c?{}:{overflow:"hidden"},userSelect:"none"},children:ot(p0,{groups:n,allEmployees:g,initialSelectedSeqs:M,multiple:r,isMobile:c,onSelectionChange:f},p)})}],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?ot(i0,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.35},children:t}):void 0,right:ot(r0,{variant:"contained",onClick:v,children:a})}})}import{useEffect as k0,useMemo as T0,useState as y0}from"react";import{Box as cr,Button as S0,Divider as B0}from"@mui/material";import{FormDialog as C0}from"@ehfuse/mui-form-dialog";import{LabelSelect as v0}from"@ehfuse/mui-form-controls";import{Box as ut}from"@mui/material";import{jsx as lr,jsxs as sr}from"react/jsx-runtime";function g0(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 Gm({sprints:e,tasks:o,height:t=160}){let r=[...e].sort((s,f)=>`${s.start_date}|${s.seq}`.localeCompare(`${f.start_date}|${f.seq}`)).map(s=>({sprint:s,...g0(s,o)})),i=r.some(s=>s.points>0),a=r.map(s=>i?s.points:s.count),l=Math.max(1,...a),d=r.filter(s=>s.sprint.status==="closed").map(s=>i?s.points:s.count),c=d.length>0?Math.round(d.reduce((s,f)=>s+f,0)/d.length*10)/10:null;return r.length===0?lr(ut,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uD45C\uC2DC\uD560 \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):sr(ut,{children:[sr(ut,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[sr("span",{children:["\uC644\uB8CC ",i?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uBAA9\uD45C\uBCC4"]}),c!==null?sr("span",{children:["\uD3C9\uADE0(\uC885\uB8CC \uBAA9\uD45C)"," ",lr(ut,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:c}),i?"SP":"\uAC74"]}):null]}),lr(ut,{sx:{display:"flex",alignItems:"flex-end",gap:2,height:t,px:.5},children:r.map(s=>{let f=i?s.points:s.count,p=Math.round((t-24)*f/l),m=s.sprint.status==="closed";return sr(ut,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-end",height:"100%"},children:[lr(ut,{sx:{fontSize:14,fontWeight:700,color:"#37352f",lineHeight:1.5},children:f}),lr(ut,{sx:{width:"60%",maxWidth:56,height:Math.max(2,p),borderRadius:"4px 4px 0 0",bgcolor:m?"#2f80ed":"#a9c9f5"}})]},s.sprint.seq)})}),lr(ut,{sx:{display:"flex",gap:2,px:.5,mt:.5},children:r.map(s=>sr(ut,{sx:{flex:1,minWidth:0,textAlign:"center",fontSize:13.5,color:"#000",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[s.sprint.name,s.sprint.status!=="closed"?" (\uC9C4\uD589\uC911)":""]},s.sprint.seq))})]})}import{useMemo as h0}from"react";import{Box as wn}from"@mui/material";import{jsx as dt,jsxs as Dn}from"react/jsx-runtime";function Ym(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?new Date(`${e}T00:00:00`):null}function b0(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function El(e){return e.slice(5).replace("-",".")}function jm({sprint:e,tasks:o,todayStr:t,height:n=200}){let r=h0(()=>{let h=Ym(e.start_date),x=Ym(e.end_date);if(!h||!x||x<h||Math.round((x.getTime()-h.getTime())/864e5)+1>366)return null;let S=o.filter(u=>u.sprint_seq===e.seq&&!u.archived);if(S.length===0)return{empty:!0};let D=S.some(u=>(u.story_points??0)>0),y=u=>D?u.story_points??0:1,w=S.reduce((u,k)=>u+y(k),0),T=new Map;for(let u of S){if(!u.completed)continue;let k=(u.completed_time??"").slice(0,10),R=/^\d{4}-\d{2}-\d{2}$/.test(k)?k:e.start_date;T.set(R,(T.get(R)??0)+y(u))}let b=[];for(let u=new Date(h);u<=x;u.setDate(u.getDate()+1))b.push(b0(u));let I=w,z=[];for(let u of b){if(u>t)break;I-=T.get(u)??0,z.push({day:u,value:Math.max(0,I)})}return{empty:!1,days:b,total:w,usePoints:D,actual:z}},[e,o,t]);if(!r)return dt(wn,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uBAA9\uD45C\uC758 \uC2DC\uC791\uC77C\xB7\uC885\uB8CC\uC77C\uC774 \uC788\uC5B4\uC57C \uBC88\uB2E4\uC6B4\uC744 \uADF8\uB9B4 \uC218 \uC788\uC2B5\uB2C8\uB2E4."});if(r.empty)return dt(wn,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uBC30\uC815\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."});let{days:i,total:a,usePoints:l,actual:d}=r,c=600,s=200,f=8,p=h=>i.length===1?0:h/(i.length-1)*c,m=h=>f+(s-f*2)*(1-h/Math.max(1,a)),g=`${p(0)},${m(a)} ${p(i.length-1)},${m(0)}`,M=d.map(h=>`${p(i.indexOf(h.day))},${m(h.value)}`).join(" "),v=d[d.length-1];return Dn(wn,{children:[Dn(wn,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[Dn("span",{children:["\uB0A8\uC740 ",l?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uCD1D ",a]}),v?Dn("span",{children:["\uD604\uC7AC"," ",dt(wn,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:v.value}),l?"SP":"\uAC74"," \uB0A8\uC74C"]}):null]}),dt(wn,{sx:{border:"1px solid #e6e6e3",borderRadius:1,bgcolor:"#fafaf9",px:1,py:.5},children:Dn("svg",{viewBox:`0 0 ${c} ${s}`,preserveAspectRatio:"none",style:{display:"block",width:"100%",height:n},children:[dt("line",{x1:0,y1:m(0),x2:c,y2:m(0),stroke:"#e6e6e3",strokeWidth:1}),dt("polyline",{points:g,fill:"none",stroke:"#9a9a97",strokeWidth:1.5,strokeDasharray:"6 5",vectorEffect:"non-scaling-stroke"}),d.length>1?dt("polyline",{points:M,fill:"none",stroke:"#2f80ed",strokeWidth:2.5,vectorEffect:"non-scaling-stroke"}):null,v?dt("circle",{cx:p(i.indexOf(v.day)),cy:m(v.value),r:4,fill:"#2f80ed",vectorEffect:"non-scaling-stroke"}):null]})}),Dn(wn,{sx:{mt:.5,display:"flex",justifyContent:"space-between",fontSize:13.5,color:"#000"},children:[dt("span",{children:El(e.start_date)}),t>e.start_date&&t<e.end_date?Dn("span",{children:["\uC624\uB298 ",El(t)]}):null,dt("span",{children:El(e.end_date)})]})]})}import{jsx as At,jsxs as Ml}from"react/jsx-runtime";function Cq({open:e,sprints:o,tasks:t,todayStr:n,initialSprintSeq:r=0,onClose:i}){let[a,l]=y0(0);k0(()=>{if(!e)return;let s=o.find(p=>p.status==="active")??o[0],f=o.find(p=>p.seq===r)??s;l(f?.seq??0)},[e]);let d=T0(()=>o.find(s=>s.seq===a)??null,[o,a]),c=Ml(cr,{sx:{display:"flex",flexDirection:"column"},children:[Ml(cr,{sx:{px:3,py:2.5},children:[At(cr,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBCA8\uB85C\uC2DC\uD2F0"}),At(Gm,{sprints:o,tasks:t})]}),At(B0,{sx:{borderColor:"#e6e6e3"}}),Ml(cr,{sx:{px:3,py:2.5},children:[At(cr,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBC88\uB2E4\uC6B4"}),At(v0,{label:"\uBAA9\uD45C",showLabel:!1,value:a?String(a):"",options:o.map(s=>({value:String(s.seq),label:Fo(s)})),onChange:s=>l(Number(s.target.value)||0),sx:{width:280,mb:2}}),d?At(jm,{sprint:d,tasks:t,todayStr:n}):At(cr,{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 At(C0,{open:e,onClose:i,width:680,title:"\uBAA9\uD45C \uCC28\uD2B8",locale:"ko",contentTopPadding:0,contentPaddingX:0,sectionsPaddingTop:0,tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-sprint-charts",sections:[{id:"sprint-charts",showTitle:!1,children:c}],actions:{showCancelButton:!1,right:At(S0,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}import{Checkbox as I0,Divider as _0,Menu as w0,MenuItem as Ol}from"@mui/material";import{jsx as Ar,jsxs as Xm}from"react/jsx-runtime";function Dq({anchorEl:e,candidates:o,selectedNames:t,avatarSrcByName:n,onToggle:r,onClear:i,onClose:a}){return Xm(w0,{anchorEl:e,open:!!e,onClose:a,transitionDuration:0,children:[o.length===0?Ar(Ol,{disabled:!0,sx:{fontSize:14},children:"\uBAA9\uB85D\uC5D0 \uC9C0\uC815\uB41C \uC0AC\uB78C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):o.map(l=>{let d=t.includes(l.name);return Xm(Ol,{onClick:()=>r(l),sx:{fontSize:14,minWidth:170,gap:1},children:[Ar(I0,{size:"small",checked:d,sx:{p:0}}),Ar(_o,{names:[l.name],size:20,avatarSrcByName:n}),l.name]},`${l.accountSeq}-${l.name}`)}),Ar(_0,{}),Ar(Ol,{disabled:t.length===0,onClick:i,sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{useState as D0}from"react";import{ButtonBase as E0,Menu as M0,MenuItem as O0}from"@mui/material";import R0 from"@mui/icons-material/KeyboardArrowDown";import P0 from"@mui/icons-material/Check";import{Fragment as z0,jsx as Rl,jsxs as Pl}from"react/jsx-runtime";function Aq({value:e,onChange:o,options:t}){let[n,r]=D0(null),i=t??da,a=da.find(l=>l.value===e)?.label??"";return Pl(z0,{children:[Pl(E0,{onClick:l=>r(l.currentTarget),sx:{display:"flex",alignItems:"center",gap:.5,px:1,py:.5,borderRadius:1,fontSize:13.5,color:"#37352f","&:hover":{bgcolor:"#f2f2f0"}},children:[a,Rl(R0,{sx:{fontSize:17,color:"#9a9a97"}})]}),Rl(M0,{transitionDuration:0,anchorEl:n,open:!!n,onClose:()=>r(null),children:i.map(l=>Pl(O0,{selected:l.value===e,onClick:()=>{o(l.value),r(null)},sx:{fontSize:14,minWidth:140,justifyContent:"space-between",gap:1},children:[l.label,l.value===e?Rl(P0,{sx:{fontSize:16,color:"#2f80ed"}}):null]},l.value))})]})}import{Box as Gi,ButtonBase as q0}from"@mui/material";import{DateTextField as Qm}from"@ehfuse/mui-form-controls";function En(e){let o=t=>String(t).padStart(2,"0");return`${e.getFullYear()}-${o(e.getMonth()+1)}-${o(e.getDate())}`}function Vi(e,o=new Date){let t=new Date(o);return t.setMonth(t.getMonth()-e),t}function Fq(e=new Date){return{fromDate:En(Vi(1,e)),toDate:En(e)}}import{jsx as Lr,jsxs as Zm}from"react/jsx-runtime";var A0=[{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 Jm({fromDate:e,toDate:o,onChange:t}){let n=i=>{if(i<=0){t("","");return}t(En(Vi(i)),En(new Date))},r=i=>i<=0?!e&&!o:!e||!o?!1:e===En(Vi(i))&&o===En(new Date);return Zm(Gi,{sx:{display:"flex",alignItems:"center",gap:1.5,flexWrap:"wrap"},children:[Lr(Gi,{sx:{display:"flex",alignItems:"center",gap:1.5},children:A0.map(i=>{let a=r(i.months);return Lr(q0,{onClick:()=>n(i.months),sx:{px:1.25,py:.85,borderRadius:1,fontSize:13,fontWeight:a?500:400,border:"1px solid",borderColor:a?"#2f80ed":"#dedddb",color:a?"#2f80ed":"#37352f",bgcolor:a?"#eef6ff":"transparent","&:hover":{bgcolor:a?"#eef6ff":"#f7f7f5"}},children:i.label},i.label)})}),Zm(Gi,{sx:{display:"flex",alignItems:"center",gap:.5},children:[Lr(Qm,{value:e,size:"small",placeholder:"\uC2DC\uC791\uC77C",onChange:i=>t(i.target.value,o),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}}),Lr(Gi,{component:"span",sx:{fontSize:13,color:"#9a9a97"},children:"~"}),Lr(Qm,{value:o,size:"small",placeholder:"\uC885\uB8CC\uC77C",onChange:i=>t(e,i.target.value),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}})]})]})}import{Popover as L0}from"@mui/material";import{jsx as eu}from"react/jsx-runtime";function jq({anchorEl:e,fromDate:o,toDate:t,onChange:n,onClose:r}){return eu(L0,{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:eu(Jm,{fromDate:o,toDate:t,onChange:n})})}import{Box as N0,ButtonBase as F0,Tab as H0,Tabs as W0}from"@mui/material";import $0 from"@mui/icons-material/Checklist";import K0 from"@mui/icons-material/Face";import U0 from"@mui/icons-material/Publish";import V0 from"@mui/icons-material/NotificationsOutlined";import G0 from"@mui/icons-material/BugReportOutlined";import Y0 from"@mui/icons-material/DescriptionOutlined";import j0 from"@mui/icons-material/Inventory2Outlined";import{jsx as tt}from"react/jsx-runtime";function ou(e,o){return o>0?`${e} (${o})`:e}var sA=[{id:"my",label:"\uC804\uCCB4",icon:tt($0,{sx:{fontSize:18}})},{id:"notice",label:"\uACF5\uC9C0\uC0AC\uD56D",icon:tt(V0,{sx:{fontSize:18}})},{id:"mine",label:"\uB0B4 \uC5C5\uBB34",icon:tt(K0,{sx:{fontSize:18}})},{id:"sent",label:"\uBCF4\uB0B8 \uC5C5\uBB34",icon:tt(U0,{sx:{fontSize:18}})},{id:"bug",label:"\uC624\uB958",icon:tt(G0,{sx:{fontSize:18}})},{id:"archive",label:"\uBCF4\uAD00\uD568",icon:tt(j0,{sx:{fontSize:18}}),hideCount:!0},{id:"report",label:"\uBCF4\uACE0\uC11C",icon:tt(Y0,{sx:{fontSize:18}}),hideCount:!0}];function X0(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 cA({items:e,activeTab:o,counts:t,onChange:n,compact:r=!1}){let i=ne(),a=X0(i.tabs),l=e;return r?tt(N0,{sx:{display:"flex",flexWrap:"wrap",gap:1.25},children:l.map(d=>{let c=o===d.id;return tt(F0,{onClick:()=>n(d.id),sx:{px:1.5,py:.75,borderRadius:1,fontSize:Co(13.5),fontWeight:500,whiteSpace:"nowrap",border:"1px solid",bgcolor:c?i.tabs.selectedBg:i.tabs.bg,color:c?i.tabs.selectedColor:i.tabs.color,borderColor:c?i.tabs.selectedBg:i.tabs.borderColor},children:ou(d.label,d.hideCount?0:t[d.id]??0)},d.id)})}):tt(W0,{value:o,onChange:(d,c)=>n(c),sx:{minHeight:46,"& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:"12px",minHeight:46}},children:l.map(d=>tt(H0,{value:d.id,label:ou(d.label,d.hideCount?0:t[d.id]??0),icon:d.icon,iconPosition:"start",sx:a},d.id))})}import{useEffect as Q0,useMemo as Z0,useState as zl}from"react";import{Divider as ql,ListItemIcon as $o,Menu as Al,MenuItem as yo}from"@mui/material";import J0 from"@mui/icons-material/OpenInNewOutlined";import eS from"@mui/icons-material/Check";import oS from"@mui/icons-material/CheckCircleOutlined";import tS from"@mui/icons-material/RadioButtonUnchecked";import nS from"@mui/icons-material/SendOutlined";import rS from"@mui/icons-material/EventOutlined";import iS from"@mui/icons-material/PersonOutlineOutlined";import aS from"@mui/icons-material/ViewKanbanOutlined";import lS from"@mui/icons-material/ContentCopyOutlined";import sS from"@mui/icons-material/NextPlanOutlined";import cS from"@mui/icons-material/ContentPasteOutlined";import mS from"@mui/icons-material/ShareOutlined";import uS from"@mui/icons-material/DirectionsRunOutlined";import tu from"@mui/icons-material/ChevronRight";import dS from"@mui/icons-material/ArchiveOutlined";import pS from"@mui/icons-material/UnarchiveOutlined";import{ConfirmDialog as fS}from"@ehfuse/alerts";import{Fragment as xS,jsx as de,jsxs as xo}from"react/jsx-runtime";function NA({target:e,onClose:o,customTabs:t,sprints:n=[],myAccountSeq:r=0,onOpenDetail:i,onToggleCompleted:a,onRequestConfirm:l,onChangeDueDate:d,onChangeReminder:c,onMemberEdit:s,onMoveProject:f,onDuplicate:p,onCreateFollowUp:m,onShare:g,onAssignSprint:M,onArchiveToggle:v,onDelete:h}){let x=Oe(),B=nt(),[S,D]=zl(null),[y,w]=zl(null),[T,b]=zl(null);Q0(()=>{e||(D(null),w(null),b(null))},[e]);let I=e?.task??null,z=!!I?.is_notice,u=!!I?.is_event,k=I?!ht(I,r):!1,R=Z0(()=>new Set(t.filter(F=>F.useSprints).map(F=>F.key)),[t]),A=async()=>{let F=I;if(o(),!F)return;await fS({title:"\uC5C5\uBB34 \uC0AD\uC81C",message:`"${F.title}" \uC5C5\uBB34\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&h(F.seq)},L=()=>{I&&v(I.seq,!I.archived),o()};return xo(xS,{children:[xo(Al,{open:!!e,onClose:o,transitionDuration:0,anchorReference:x?"none":"anchorPosition",anchorPosition:!x&&e?{top:e.position.top,left:e.position.left}:void 0,slotProps:{paper:{sx:{minWidth:190,...x?{position:"fixed",top:"50%",left:"50%",translate:"-50% -50%",maxHeight:"70vh"}:{}}},list:x?{sx:{"& .MuiMenuItem-root":{py:1,minHeight:0}}}:void 0},children:[xo(yo,{onClick:()=>{I&&i(I),o()},sx:{fontSize:14},children:[de($o,{children:de(J0,{sx:{fontSize:19}})}),"\uC0C1\uC138 \uC5F4\uAE30"]}),xo(yo,{disabled:z?(I?.author_account_seq??0)!==r:(I?.author_account_seq??0)!==r&&(I?.manager_account_seq??0)!==r,onClick:()=>{I&&a(I.seq,!I.completed),o()},sx:{fontSize:14},children:[de($o,{children:I?.completed?de(tS,{sx:{fontSize:19}}):de(oS,{sx:{fontSize:19}})}),I?.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC"]}),!z&&l?xo(yo,{disabled:!(I?.manager_account_seq??0)&&(I?.receiver_account_seqs??[]).length===0,onClick:()=>{I&&l(I),o()},sx:{fontSize:14},children:[de($o,{children:de(nS,{sx:{fontSize:19}})}),"\uD655\uC778 \uC694\uCCAD"]}):null,u?null:de(ql,{}),u?null:xo(yo,{disabled:k,onClick:F=>{I&&D({anchorEl:F.currentTarget,task:I})},sx:{fontSize:14},children:[de($o,{children:de(rS,{sx:{fontSize:19}})}),"\uB9C8\uAC10\uAE30\uD55C \uBCC0\uACBD"]}),!z&&!u&&s?xo(yo,{onClick:()=>{I&&s(I,"manager"),o()},sx:{fontSize:14},children:[de($o,{children:de(iS,{sx:{fontSize:19}})}),"\uCC45\uC784\uC790 \uBCC0\uACBD"]}):null,u?null:xo(yo,{disabled:k,onClick:F=>{I&&w({anchorEl:F.currentTarget,task:I})},sx:{fontSize:14},children:[de($o,{children:de(aS,{sx:{fontSize:19}})}),"\uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9",de(tu,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}),de(ql,{}),p?xo(yo,{disabled:k,onClick:()=>{I&&p(I.seq),o()},sx:{fontSize:14},children:[de($o,{children:de(lS,{sx:{fontSize:19}})}),"\uBCF5\uC81C"]}):null,m&&I&&!I.is_event&&!I.is_notice?xo(yo,{onClick:()=>{I&&m(I.seq),o()},sx:{fontSize:14},children:[de($o,{children:de(sS,{sx:{fontSize:19}})}),"\uD6C4\uC18D \uC5C5\uBB34 \uB9CC\uB4E4\uAE30"]}):null,xo(yo,{onClick:()=>{I&&(g?g(I):nr(I,x)),o()},sx:{fontSize:14},children:[de($o,{children:x?de(mS,{sx:{fontSize:19}}):de(cS,{sx:{fontSize:19}})}),x?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC"]}),I&&!I.is_notice&&!I.is_event&&R.has(String(I.tab_key??""))&&M?xo(yo,{onClick:F=>b(F.currentTarget),sx:{fontSize:14},children:[de($o,{children:de(uS,{sx:{fontSize:19}})}),"\uBAA9\uD45C\uC5D0 \uB123\uAE30",de(tu,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}):null,xo(yo,{onClick:L,disabled:k||!I?.archived&&!(I&&Vr(I)),sx:{fontSize:14},children:[de($o,{children:I?.archived?de(pS,{sx:{fontSize:19}}):de(dS,{sx:{fontSize:19}})}),I?.archived?"\uBCF4\uAD00 \uD574\uC81C":"\uBCF4\uAD00"]}),de(ql,{}),xo(yo,{disabled:k,onClick:A,sx:{fontSize:14,color:"#e5484d"},children:[de($o,{children:de(yt,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC0AD\uC81C"]})]}),de(Kt,{anchorEl:S?.anchorEl??null,open:!!S,date:S?.task.due_date??"",reminder:S?.task.reminder??"none",hideReminder:!!S?.task.completed,centered:x,onClose:()=>{D(null),o()},onDateChange:F=>{S&&d(S.task.seq,F)},onReminderChange:F=>{S&&c?.(S.task.seq,F)}}),xo(Al,{transitionDuration:0,anchorEl:y?.anchorEl??null,open:!!y,onClose:()=>{w(null),o()},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...B,children:[de(yo,{selected:!y?.task.tab_key,onClick:()=>{y&&f(y.task.seq,""),w(null),o()},sx:{fontSize:14,minWidth:170},children:"\uC5C6\uC74C"}),t.filter(F=>!F.archived).map(F=>de(yo,{selected:y?.task.tab_key===F.key,onClick:()=>{y&&f(y.task.seq,F.key),w(null),o()},sx:{fontSize:14,minWidth:170},children:F.label},F.key))]}),de(Al,{transitionDuration:0,anchorEl:T,open:!!T,onClose:()=>b(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...n.filter(F=>`custom-${F.group_seq}`===String(I?.tab_key??"")).map(F=>({seq:F.seq,label:Fo(F)}))].map(F=>xo(yo,{onClick:()=>{I&&M?.(I.seq,F.seq),b(null),o()},sx:{fontSize:14,minWidth:160,gap:1},children:[F.label,(I?.sprint_seq??0)===F.seq?de(eS,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},F.seq))})]})}import{Checkbox as gS,Divider as hS,Menu as bS,MenuItem as nu}from"@mui/material";import{jsx as Yi,jsxs as ru}from"react/jsx-runtime";function KA({anchorEl:e,labelOptions:o,selectedKeys:t,onToggle:n,onClear:r,onClose:i}){return ru(bS,{transitionDuration:0,anchorEl:e,open:!!e,onClose:i,children:[o.map(a=>{let l=t.includes(a.key);return ru(nu,{onClick:()=>n(a.key),sx:{fontSize:14,minWidth:190,gap:1},children:[Yi(gS,{size:"small",checked:l,sx:{p:0}}),Yi(Re,{option:a})]},a.key)}),Yi(hS,{}),Yi(nu,{disabled:t.length===0,onClick:()=>{r(),i()},sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{Divider as iu,Menu as kS,MenuItem as Ll}from"@mui/material";import TS from"@mui/icons-material/Check";import yS from"@mui/icons-material/BarChartOutlined";import SS from"@mui/icons-material/SettingsOutlined";import{jsx as Nr,jsxs as ji}from"react/jsx-runtime";function ZA(e){let{anchorEl:o,sprints:t,value:n,onSelect:r,onManage:i,onCharts:a,onClose:l}=e;return ji(kS,{transitionDuration:0,anchorEl:o,open:!!o,onClose:l,children:[[{seq:0,label:"\uC804\uCCB4"},{seq:-1,label:"\uBBF8\uBC30\uC815 \uC5C5\uBB34"},...t.map(d=>({seq:d.seq,label:Fo(d)}))].map(d=>ji(Ll,{onClick:()=>{r(d.seq),l()},sx:{fontSize:14,minWidth:180,gap:1},children:[d.label,n===d.seq?Nr(TS,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},d.seq)),Nr(iu,{}),a?ji(Ll,{onClick:()=>{l(),a()},sx:{fontSize:14,gap:1},children:[Nr(yS,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uCC28\uD2B8"]}):null,a?Nr(iu,{}):null,ji(Ll,{onClick:()=>{l(),i()},sx:{fontSize:14,gap:1},children:[Nr(SS,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uAD00\uB9AC\u2026"]})]})}var BS={my:"tasks",mine:"tasks",sent:"tasks",notice:"notice",bug:"bug",archive:"archive",done:"done",report:"report"};function CS(e){return BS[e]??"tasks"}var oL={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"},au=["list","calendar","month","card","kanban","sprint","timeline"],vS=["list","card"];function tL(e){let o=CS(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:au,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:vS,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:au,showCreate:!0,createLabel:"\uC5C5\uBB34 \uB4F1\uB85D",showGroupBy:!0,showSprintFilter:!0,showDateRange:!1,showHideCompleted:!0,forceFlatList:!1,columns:e==="mine"?{showRequest:!1,confirmMode:"action"}:e==="sent"?{confirmMode:"time"}:{}}}}export{fI as ALL_TASK_VIEWER_ACCOUNT_SEQS,em as AddLabelDialog,ai as AddTabDialog,Xc as AttachmentUploadGauge,sl as AttachmentUploadPercent,ia as BUG_DEVICE_OPTIONS,fr as BUG_ICON_COLOR,Xv as BUG_KANBAN_COLUMNS,ra as BUG_REPRO_OPTIONS,aa as BUG_RESOLUTION_OPTIONS,mn as BUG_STATUS_OPTIONS,pr as BUG_TASK_ICON,wi as BugPropertiesGrid,Ef as COLUMN_WIDTHS,sa as COMPLETED_STATUS_OPTION,Cl as CUSTOM_TAB_KEY_PREFIX,Kz as CalendarImportDialog,Zz as CalendarSubscribeDialog,$t as CommentBubbleIcon,Hn as ConfirmCountButton,Is as DATE_REMINDER_OPTIONS,Zi as DEFAULT_PROJECT_ICON,sA as DEFAULT_TASKBOX_TAB_ITEMS,Me as DEFAULT_TASK_ICON,wr as DRAWER_SECTION_TITLE_FONT_SIZE,jq as DateRangeFilterPopover,Wo as DrawerSection,Kt as DueDatePickerPopover,cf as ENDED_EVENT_STATUS_OPTION,lm as EVENT_ICON_COLOR,lq as EmployeeSelectDialog,da as GROUP_BY_OPTIONS,Vn as GoogleEventChip,Aq as GroupByMenuButton,ii as IconPickerGrid,Pc as InlineAddressInput,Rt as InlineTextValue,ca as KANBAN_CLOSED_COLUMN_KEY,KA as LabelFilterMenu,Ai as LabelSelectMenu,gr as MANUAL_TASK_STATUS_OPTIONS,Dq as MemberFilterMenu,xr as NOTICE_STATUS_OPTIONS,vo as NOTICE_TASK_ICON,Xl as NO_TASK_ICON,Ji as PROJECT_ICON_OPTIONS,pe as PropertyRow,Nn as RECEIVER_AVATAR_COLORS,_s as REMINDER_OPTIONS,_o as ReceiverAvatarStack,_m as RelatedTasksSection,IS as STATUS_KEY_REPLIED,Fl as STATUS_KEY_WAITING,zs as SortableTaskCard,jm as SprintBurndownChart,Cq as SprintChartsDialog,ZA as SprintFilterMenu,Pz as SprintManageDialog,Gm as SprintVelocityChart,Xr as StatusSelectMenu,xa as TASKBOX_COLUMNS,jo as TASKBOX_DRAWER_NARROW_MQ,Ql as TASKBOX_UI_STATE_ID,oL as TASKBOX_VIEW_LABELS,OE as TASKBOX_VIEW_MODES,cn as TASK_STATUS_OPTIONS,yx as TIME_REMINDER_OPTIONS,ci as TaskAckListPopover,Fn as TaskActionButton,Dm as TaskActivitySection,zi as TaskAttachmentsSection,Sc as TaskBoxColumnSummary,Pa as TaskBoxGroupBoard,bM as TaskBoxMobileList,uc as TaskBoxMonthAgenda,ac as TaskBoxMonthCalendar,UE as TaskBoxSprintColumnSummary,Os as TaskBoxTable,cA as TaskBoxTabs,hc as TaskBoxTimeline,ME as TaskBoxView,oc as TaskBoxWeekCalendar,yr as TaskCardContent,Mi as TaskChecklistSection,hm as TaskCommentInput,gm as TaskCommentsSection,Di as TaskContentEditor,NA as TaskContextMenu,_i as TaskCorePropertiesGrid,ul as TaskCreateBody,$R as TaskCreateDrawer,Jm as TaskDateRangeFilter,Mm as TaskDetailBody,yz as TaskDetailDrawer,Sm as TaskDetailHeader,Qn as TaskIconPickerPopover,Ht as TaskLabelChips,Ei as TaskLinkDialog,Bm as TaskNoteField,Uo as TaskPriorityChip,Re as TaskStatusChip,rI as TaskStatusChips,pu as TaskboxProvider,o0 as buildCalendarFeedUrl,ui as buildCardBaseSx,as as buildStatusOptionColors,pa as buildTaskGroupSections,hl as buildTaskRelationsModel,KT as buildTaskShareText,Kr as buildTaskboxTheme,ls as canAssignBugManager,Zr as canClaimTaskItem,ht as canEditTaskItem,Qr as canViewTaskItem,Jr as canVolunteerTaskItem,bl as countTaskRelations,kc as countWorkdays,nf as createTaskboxTheme,yc as daysLeftUntil,ea as defaultTaskBoxFormValues,oa as defaultTaskboxUiStateValues,im as filterFilesWithinLimit,L_ as formatConfirmTime,bc as formatHours,it as formatKoreanDate,Vo as formatKoreanDateTime,Fo as formatSprintOptionLabel,ns as getBugDeviceName,ts as getBugReproName,Ur as getBugResolutionName,mf as getBugStatusOption,Fq as getDefaultDateRange,hr as getEventDisplayStatusOption,Zv as getNoDueStatusRank,rm as getNoticeAckInfo,rs as getNoticeStatusOption,oR as getNoticeTargetDisplay,zn as getProjectIconAnchorComponent,Ve as getProjectIconComponent,Ca as getReminderLabel,Ba as getReminderOptions,is as getStatusOptionsForTask,tL as getTabHeaderConfig,ha as getTaskBoxColumnDefs,ei as getTaskBoxGridTemplate,CS as getTaskBoxTabKind,mi as getTaskConfirmInfo,Io as getTaskDisplayStatusOption,Gr as getTaskStatusOption,$n as groupGoogleEventsByDate,vl as groupSeqFromTabKey,$P as hasRelation,vm as hasTaskRelations,vk as htmlToPlainText,Ny as isCustomTabKey,ua as isOpenPoolTaskItem,la as isPastEvent,Vr as isTaskDone,Qv as isWaitingTask,Vi as monthsAgoDate,uo as narrowOrderSx,Tz as nowDateTimeString,cb as parseEstimatedHours,Cn as relationsOf,An as resolveTaskStatusOptions,na as resolveTaskboxTheme,nr as shareTaskText,Tc as sumRemainingHours,Li as summarizeNoticeTargets,Cz as tabKeyFromGroupSeq,En as toYmd,Yr as toggleLabelKey,ur as useBuildFileUrl,jc as useTaskAttachmentUploadMeta,Ro as useTaskboxConfig,Zp as useTaskboxForm,ne as useTaskboxTheme,gt as useTaskboxUiState,dr as useUploadMaxMb};
|
|
13
|
+
`)}function km(e){navigator.clipboard.writeText(e).then(()=>$T("\uC5C5\uBB34 \uB0B4\uC6A9\uC744 \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>WT("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uB0B4\uC6A9\uC744 \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD574 \uC8FC\uC138\uC694."))}function nr(e,o){let t=KT(e);if(o&&typeof navigator.share=="function"){navigator.share({text:t}).catch(n=>{n?.name!=="AbortError"&&km(t)});return}km(t)}import{Fragment as ZT,jsx as no,jsxs as ym}from"react/jsx-runtime";function Sm({task:e,myAccountSeq:o=0,onToggleCompleted:t,onChangeTitle:n,onChangeIcon:r,onChangeIconColor:i,onClose:a,appBarMode:l=!1}){let d=Oe(),[c,s]=Tm(null),[f,p]=Tm(null),m=zn(e.icon||(e.is_notice?vo:e.is_event?"event":Me)),g=!!e.is_notice,M=!!e.is_event,v=g&&o>0&&(e.author_account_seq??0)===o,h=!ht(e,o),x=!M&&(g?v:(e.author_account_seq??0)===o||(e.manager_account_seq??0)===o);return ym(ZT,{children:[ym($i,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[l&&a?no(Ki,{"aria-label":"\uB4A4\uB85C",onClick:a,sx:{color:"#37352f",ml:-1},children:no(GT,{})}):null,x&&!l?no(gl,{title:e.completed&&e.completed_by?`${e.completed_by} \xB7 ${Vo(e.completed_time)} \uC644\uB8CC`:e.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC",arrow:!0,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:no(UT,{checked:e.completed,icon:no(QT,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:no(XT,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(B,S)=>t(e.seq,S),sx:{p:0}})}):null,l?null:no(gl,{title:h?"":"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,children:no(Ki,{size:"small",onClick:h?void 0:B=>p(B.currentTarget),sx:{color:e.icon_color||(g?"#e5484d":"#1e3a8a")},children:no(m,{sx:{fontSize:20}})})}),c!==null?no($i,{component:"input",autoFocus:!0,spellCheck:!1,value:c,onChange:B=>s(B.target.value),onBlur:()=>{c.trim()&&c.trim()!==e.title&&n(e.seq,c.trim()),s(null)},onKeyDown:B=>{B.key==="Enter"&&B.target.blur(),B.key==="Escape"&&s(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:18,fontWeight:500,color:"#37352f",p:0,m:0}}):l?no($i,{sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:g?"\uACF5\uC9C0":M?"\uC77C\uC815":e.is_bug?"\uC624\uB958":"\uC5C5\uBB34"}):no($i,{onClick:h?void 0:()=>s(e.title),sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:h?"default":"text",textDecoration:e.completed?"line-through":"none"},children:e.title}),no(gl,{title:d?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:no(Ki,{"aria-label":d?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>nr(e,d),sx:{color:"#6b7280"},children:d?no(YT,{sx:{fontSize:20}}):no(jT,{sx:{fontSize:20}})})}),a&&!l?no(Ki,{"aria-label":"\uB2EB\uAE30",onClick:a,sx:{color:"#6b7280"},children:no(VT,{})}):null]}),no(Qn,{anchorEl:f,value:e.icon||(g?vo:""),color:e.icon_color||(g?"#e5484d":"#1e3a8a"),onSelect:B=>r(e.seq,B),onSelectColor:B=>i?.(e.seq,B),onClose:()=>p(null)})]})}import{useState as zt}from"react";import{Box as lo,Button as ir,ButtonBase as fy,Checkbox as xy,Divider as tn,IconButton as gy,Menu as hy,MenuItem as by}from"@mui/material";import ky from"@mui/icons-material/ExpandLess";import Ty from"@mui/icons-material/ExpandMore";import yy from"@mui/icons-material/ConfirmationNumberOutlined";import Sy from"@mui/icons-material/Check";import By from"@mui/icons-material/DirectionsRunOutlined";import Cy from"@mui/icons-material/SpeedOutlined";import Sl from"@mui/icons-material/CheckCircle";import vy from"@mui/icons-material/CheckCircleOutlineOutlined";import Bl from"@mui/icons-material/CheckCircleOutlined";import Em from"@mui/icons-material/AccessTimeOutlined";import Iy from"@mui/icons-material/AutorenewOutlined";import _y from"@mui/icons-material/LabelOutlined";import wy from"@mui/icons-material/PersonOutlineOutlined";import Dy from"@mui/icons-material/SubjectOutlined";import Ey from"@mui/icons-material/StickyNote2Outlined";import My from"@mui/icons-material/PanToolAltOutlined";import{useState as JT}from"react";import{TextField as ey}from"@ehfuse/mui-form-controls";import{jsx as oy}from"react/jsx-runtime";function Bm({value:e,onCommit:o,onDraftChange:t,readOnly:n=!1}){let[r,i]=JT(null);return oy(ey,{value:r??e,placeholder:n?"":"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",slotProps:{input:{readOnly:n}},onChange:a=>{i(a.target.value),t?.(a.target.value)},onBlur:()=>{r!==null&&r.trim()!==e&&o(r),i(null)},onKeyDown:a=>{a.key==="Enter"&&a.target.blur(),a.key==="Escape"&&i(null)},sx:{mt:1}})}import{useMemo as kl,useState as Tl}from"react";import{Box as fo,Button as Im,IconButton as ty}from"@mui/material";import ny from"@mui/icons-material/AccountTreeOutlined";import ry from"@mui/icons-material/Add";import iy from"@mui/icons-material/Close";import ay from"@mui/icons-material/NextPlanOutlined";function Cn(e){return e.relations??[]}function $P(e,o,t){return Cn(e).some(n=>n.type===t&&n.task_seq===o.seq)||Cn(o).some(n=>n.type===t&&n.task_seq===e.seq)}function Cm(e){return`${e.created_time??""}|${String(e.seq).padStart(12,"0")}`}function hl(e,o){let t=new Map(o.map(m=>[m.seq,m]));t.set(e.seq,e);let n=new Map,r=(m,g)=>{n.has(m)||n.set(m,new Set),n.has(g)||n.set(g,new Set),n.get(m).add(g),n.get(g).add(m)};for(let m of t.values())for(let g of Cn(m))g.type==="follow_up"&&t.has(g.task_seq)&&r(m.seq,g.task_seq);let i=new Set([e.seq]),a=[e.seq];for(;a.length>0;){let m=a.shift();for(let g of n.get(m)??[])i.has(g)||(i.add(g),a.push(g))}let l=[...i].map(m=>t.get(m)).filter(m=>!!m).sort((m,g)=>Cm(m).localeCompare(Cm(g))),d=new Set;for(let m of Cn(e))m.type==="related"&&d.add(m.task_seq);for(let m of t.values())m.seq!==e.seq&&Cn(m).some(g=>g.type==="related"&&g.task_seq===e.seq)&&d.add(m.seq);let c=[...d].map(m=>t.get(m)).filter(m=>m!==void 0&&m.seq!==e.seq),s=[...t.values()].filter(m=>m.seq!==e.seq&&Cn(m).some(g=>g.type==="duplicate_of"&&g.task_seq===e.seq)),f=Cn(e).find(m=>m.type==="duplicate_of")?.task_seq,p=f?t.get(f)??null:null;return{lineage:l,related:c,duplicates:s,duplicateOf:p}}function bl(e,o){let t=hl(e,o);return(t.lineage.length>=2?t.lineage.length-1:0)+t.related.length+t.duplicates.length+(t.duplicateOf?1:0)}function vm(e,o){return bl(e,o)>0}import{Fragment as ly,jsx as Ke,jsxs as Jo}from"react/jsx-runtime";function yl({item:e,caption:o,onOpen:t,onUnlink:n}){let r=Ve(e.icon||Me);return Jo(fo,{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?Ke(fo,{component:"span",sx:{flexShrink:0,px:.6,py:.1,borderRadius:.75,fontSize:11.5,fontWeight:500,color:"#8a6d1d",bgcolor:"#faf1d7"},children:o}):null,r?Ke(r,{sx:{fontSize:16,flexShrink:0,color:e.icon_color||"#1e3a8a"}}):null,Jo(fo,{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]}),Ke(Re,{option:Io(e),small:!0}),n?Ke(ty,{className:"taskbox-relation-unlink",size:"small","aria-label":"\uC5F0\uACB0 \uD574\uC81C",onClick:n,sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:Ke(iy,{sx:{fontSize:15}})}):null]})}function _m({task:e,tasks:o,readOnly:t=!1,onOpenTask:n,onLink:r,onUnlink:i,onCreateFollowUp:a}){let[l,d]=Tl(!1),[c,s]=Tl(null),[f,p]=Tl(null),m=kl(()=>hl(e,o),[e,o]),g=m.lineage.length>=2,M=kl(()=>bl(e,o),[e,o]),v=kl(()=>{let x=new Set;for(let B of m.lineage)x.add(B.seq);for(let B of m.related)x.add(B.seq);for(let B of m.duplicates)x.add(B.seq);return m.duplicateOf&&x.add(m.duplicateOf.seq),[...x]},[m]),h=(x,B,S)=>{p({anchorEl:x,targetSeq:B,type:S})};return Jo(Wo,{icon:Ke(ny,{sx:{fontSize:19,display:"block"}}),title:Jo(ly,{children:["\uAD00\uB828 \uC5C5\uBB34",M>0?Ke(fo,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:M}):null]}),titleExtra:t?null:Jo(fo,{sx:{ml:"auto",display:"flex",alignItems:"center",gap:.5},children:[a?Ke(Im,{size:"small",color:"inherit",startIcon:Ke(ay,{sx:{fontSize:16}}),onClick:x=>s(x.currentTarget),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uD6C4\uC18D \uC5C5\uBB34"}):null,r?Ke(Im,{size:"small",color:"inherit",startIcon:Ke(ry,{sx:{fontSize:16}}),onClick:()=>d(!0),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uC5F0\uACB0"}):null]}),children:[Jo(fo,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:[g?Ke(fo,{sx:{mb:m.related.length||m.duplicates.length||m.duplicateOf?1:0},children:m.lineage.map((x,B)=>{let S=x.seq===e.seq,D=B===m.lineage.length-1;return Jo(fo,{sx:{display:"flex",gap:1},children:[Jo(fo,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:14,flexShrink:0,pt:1.1},children:[Ke(fo,{sx:{width:S?9:7,height:S?9:7,borderRadius:"50%",bgcolor:S?"#2f80ed":x.completed?"#9a9a97":"#c9c8c5",flexShrink:0}}),D?null:Ke(fo,{sx:{width:"2px",flex:1,bgcolor:"#e6e6e3"}})]}),Jo(fo,{sx:{flex:1,minWidth:0,pb:D?0:.5},children:[Jo(fo,{sx:{display:"flex",alignItems:"center",gap:.75},children:[Jo(fo,{component:"span",onClick:!S&&n?()=>n(x.seq):void 0,sx:{minWidth:0,fontSize:14,fontWeight:S?600:400,color:S?"#2f80ed":x.completed?"#9a9a97":"#37352f",textDecoration:x.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...!S&&n?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[x.ticket_no?`${x.ticket_no} `:"",x.title]}),Ke(Re,{option:Io(x),small:!0})]}),Ke(fo,{sx:{fontSize:12,color:"#9a9a97"},children:x.completed&&x.completed_time?`${x.completed_time} \uC644\uB8CC`:x.created_time??""})]})]},x.seq)})}):null,m.duplicateOf?Ke(yl,{item:m.duplicateOf,caption:"\uC6D0\uBCF8",onOpen:n?()=>n(m.duplicateOf.seq):void 0,onUnlink:!t&&i?x=>h(x.currentTarget,m.duplicateOf.seq,"duplicate_of"):void 0}):null,m.duplicates.map(x=>Ke(yl,{item:x,caption:"\uC911\uBCF5",onOpen:n?()=>n(x.seq):void 0,onUnlink:!t&&i?B=>h(B.currentTarget,x.seq,"duplicate_of"):void 0},`dup-${x.seq}`)),m.related.map(x=>Ke(yl,{item:x,onOpen:n?()=>n(x.seq):void 0,onUnlink:!t&&i?B=>h(B.currentTarget,x.seq,"related"):void 0},`rel-${x.seq}`)),M===0?Ke(fo,{sx:{px:1.25,py:.75,fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]}),r?Ke(Ei,{open:l,task:e,tasks:o,excludeSeqs:v,onClose:()=>d(!1),onSubmit:(x,B)=>r(e.seq,x,B)}):null,Ke(We,{open:!!c,anchorEl:c,title:"\uC774 \uC5C5\uBB34\uC5D0\uC11C \uC774\uC5B4\uC9C0\uB294 \uD6C4\uC18D \uC5C5\uBB34\uB97C \uB9CC\uB4DC\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uB9CC\uB4E4\uAE30",onCancel:()=>s(null),onConfirm:()=>{a?.(e.seq),s(null)}}),Ke(We,{open:!!f,anchorEl:f?.anchorEl??null,title:"\uC774 \uC5C5\uBB34\uC640\uC758 \uC5F0\uACB0\uC744 \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uD574\uC81C",onCancel:()=>p(null),onConfirm:()=>{f&&i?.(e.seq,f.targetSeq,f.type),p(null)}})]})}import{useState as sy}from"react";import{Box as et,CircularProgress as cy}from"@mui/material";import my from"@mui/icons-material/HistoryOutlined";import uy from"@mui/icons-material/ExpandMore";import{jsx as on,jsxs as rr}from"react/jsx-runtime";var dy={created:"\uC5C5\uBB34\uB97C \uB4F1\uB85D\uD588\uC2B5\uB2C8\uB2E4",completed:"\uC644\uB8CC \uCC98\uB9AC\uD588\uC2B5\uB2C8\uB2E4",uncompleted:"\uC644\uB8CC\uB97C \uD574\uC81C\uD588\uC2B5\uB2C8\uB2E4",confirm_requested:"\uD655\uC778\uC744 \uC694\uCCAD\uD588\uC2B5\uB2C8\uB2E4",acked:"\uD655\uC778\uD588\uC2B5\uB2C8\uB2E4",claimed:"\uC5C5\uBB34\uB97C \uAC00\uC838\uAC14\uC2B5\uB2C8\uB2E4",bug_verified:"\uC218\uC815\uC744 \uD655\uC778\uD588\uC2B5\uB2C8\uB2E4(\uC885\uB8CC)",bug_reopened:"\uC7AC\uC624\uD508\uD588\uC2B5\uB2C8\uB2E4"};function wm(e){return String(e??"").trim()||"\uC5C6\uC74C"}function py(e){if(e.kind!=="field")return dy[String(e.kind)]??"\uBCC0\uACBD\uD588\uC2B5\uB2C8\uB2E4";let o=String(e.field_label??e.field??"").trim()||"\uD56D\uBAA9",t=String(e.old_value??"").trim(),n=String(e.new_value??"").trim();return!t&&n?`${o}\uC744(\uB97C) "${n}"(\uC73C)\uB85C \uC785\uB825\uD588\uC2B5\uB2C8\uB2E4`:t&&!n?`${o}\uC744(\uB97C) \uBE44\uC6E0\uC2B5\uB2C8\uB2E4`:`${o}\uC744(\uB97C) "${wm(t)}" \u2192 "${wm(n)}" \uB85C \uBC14\uAFE8\uC2B5\uB2C8\uB2E4`}function Dm({taskSeq:e,items:o,loading:t,onExpand:n}){let[r,i]=sy(!1),a=()=>{let l=!r;i(l),l&&!o&&n?.(e)};return rr(et,{sx:{px:2,pb:2,display:"flex",flexDirection:"column",gap:.25},children:[rr(et,{role:"button",tabIndex:0,onClick:a,onKeyDown:l=>{(l.key==="Enter"||l.key===" ")&&(l.preventDefault(),a())},sx:{display:"flex",alignItems:"center",gap:1,cursor:"pointer",fontSize:wr,fontWeight:500,color:"#37352f",userSelect:"none"},children:[on(my,{sx:{fontSize:18,display:"block",color:"#37352f"}}),"\uD65C\uB3D9",o&&o.length>0?` (${o.length})`:"",on(uy,{sx:{ml:"auto",fontSize:20,color:"#9a9a97",transition:"transform 120ms",transform:r?"rotate(180deg)":"none"}})]}),r?rr(et,{sx:{mt:1,display:"flex",flexDirection:"column",gap:1},children:[t&&!o?rr(et,{sx:{display:"flex",alignItems:"center",gap:1,color:"#9a9a97",fontSize:14.5},children:[on(cy,{size:14,thickness:5,sx:{color:"#9a9a97"}}),"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"]}):null,o&&o.length===0?on(et,{sx:{fontSize:14.5,color:"#9a9a97"},children:"\uAE30\uB85D\uB41C \uD65C\uB3D9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,(o??[]).map(l=>rr(et,{sx:{display:"flex",gap:1,alignItems:"baseline",minWidth:0},children:[on(et,{sx:{flexShrink:0,width:5,height:5,borderRadius:"50%",bgcolor:"#d5d8dc",transform:"translateY(-2px)"}}),rr(et,{sx:{minWidth:0,fontSize:14.5,color:"#37352f",lineHeight:1.5},children:[on(et,{component:"span",sx:{fontWeight:500},children:String(l.actor_name??"").trim()||"\uC774\uB984\uC5C6\uC74C"}),on(et,{component:"span",sx:{ml:.5},children:py(l)}),on(et,{component:"span",sx:{ml:.75,fontSize:13.5,color:"#9a9a97"},children:Vo(l.acted_time)})]})]},l.seq))]}):null]})}import{Fragment as To,jsx as N,jsxs as Ue}from"react/jsx-runtime";function ar({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return N(lo,{component:"span",sx:{color:"#9a9a97"},children:e})}function Mm({task:e,customTabs:o,statusOptions:t,avatarSrcByName:n,onChangeStatus:r,onChangeLabels:i,onAddLabelOption:a,onChangeProject:l,onAddProject:d,onChangeDate:c,onChangeReminder:s,onMemberEdit:f,onChangePriority:p,onChangeEstimatedTime:m,onChangeEventTime:g,onChangeEventPlace:M,onChangeEventAddress:v,onChangeNote:h,onChangeContent:x,onChangeContentHeight:B,onAddChecklistItem:S,onToggleChecklistItem:D,onRemoveChecklistItem:y,onUpdateChecklistItem:w,onConvertChecklistToTask:T,onOpenChecklistTask:b,onLinkChecklistTask:I,resolveChecklistTask:z,relatedTasksPool:u,onOpenRelatedTask:k,onLinkRelatedTask:R,onUnlinkRelatedTask:A,onCreateFollowUpTask:L,onAddAttachments:F,onRemoveAttachment:le,onPreview:ie,onDownload:me,onUpdateComment:se,onRemoveComment:Te,onToggleCommentReaction:fe,currentUserName:ae="",myAccountSeq:ee=0,noticeAdmin:ye=!1,hideProject:ze=!1,hideLabel:W=!1,showTitle:H=!1,onChangeTitle:Z,onToggleCompleted:C,onChangeIcon:E,onChangeIconColor:X,employees:oe=[],onAckConfirm:Ie,onRequestConfirm:q,activityItems:xe,activityLoading:Se,onLoadActivity:ce,onChangeBugField:V,sprints:Be=[],sprintProject:U=!1,hideSprint:Je=!1,onChangeSprint:zo,onChangeStoryPoints:Mn,onChangeResolution:Lt,onClaimTask:qo,onVerifyBug:pt}){let[Ko,ft]=zt(null),[Nt,rn]=zt(null),[ro,an]=zt(null),[De,P]=zt(null),[$,Q]=zt(!1),te={[jo]:$?{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"}},[Fe,qe]=zt(null),[co,ue]=zt(null),[eo,je]=zt(null),[oo,Ao]=zt(null),Ae=!!e.is_notice,Le=!!e.is_event,So=!!e.is_bug,On=!!qo&&Zr(e,ee),Fr=!!qo&&Jr(e,ee),Rn=!!pt&&So&&!!e.completed&&ee>0&&(e.author_account_seq??0)===ee&&!(e.acks??[]).some(O=>O.account_seq===ee),Mo=!ht(e,ee),ln=!e.is_event&&(e.is_notice?ee>0&&(e.author_account_seq??0)===ee:(e.author_account_seq??0)===ee||(e.manager_account_seq??0)===ee),Pn=zn(e.icon||(e.is_notice?vo:e.is_event?"event":Me)),sn=Ae?!Qr(e,ee):Mo,Ft=On||Fr?Ue(Fn,{onClick:O=>Ao(O.currentTarget),children:[N(My,{sx:{fontSize:16,mr:.5}}),"\uAC00\uC838\uAC00\uAE30"]}):null,Hr=Ae?Li(e,oe):"",Oo=Ae?rm(e,oe,ee):null,Bo=!Ae&&!Le?mi(e,ee):null,Wr=!!(Bo&&Bo.total>0||Ae&&Oo);return Ue(To,{children:[H?Ue(lo,{sx:{px:2,pt:2,pb:.5,display:"flex",alignItems:"flex-start",gap:1},children:[ln?N(xy,{checked:e.completed,icon:N(vy,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:N(Sl,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(O,Xi)=>{ro||an({anchorEl:O.currentTarget,nextCompleted:Xi})},sx:{p:0,mt:.25}}):null,N(gy,{size:"small","aria-label":"\uC544\uC774\uCF58 \uBCC0\uACBD",onClick:Mo?void 0:O=>rn(O.currentTarget),sx:{p:0,mt:.25,color:e.icon_color||(Ae?"#e5484d":"#1e3a8a")},children:N(Pn,{sx:{fontSize:20}})}),N(lo,{sx:{flex:1,minWidth:0},children:Ko!==null?N(lo,{component:"input",autoFocus:!0,spellCheck:!1,value:Ko,onChange:O=>ft(O.target.value),onBlur:()=>{Ko.trim()&&Ko.trim()!==e.title&&Z(e.seq,Ko.trim()),ft(null)},onKeyDown:O=>{O.key==="Enter"&&O.target.blur(),O.key==="Escape"&&ft(null)},sx:{width:"100%",border:"none",outline:"none",font:"inherit",fontSize:19,fontWeight:600,color:"#37352f",p:0,m:0}}):N(lo,{onClick:()=>ft(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})}),N(We,{open:!!ro,anchorEl:ro?.anchorEl??null,title:ro?.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:ro?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>an(null),onConfirm:()=>{ro&&C(e.seq,ro.nextCompleted),an(null)}}),N(Qn,{anchorEl:Nt,value:e.icon||(Ae?vo:""),color:e.icon_color||(Ae?"#e5484d":"#1e3a8a"),onSelect:O=>E(e.seq,O),onSelectColor:O=>X?.(e.seq,O),onClose:()=>rn(null)})]}):null,Ue(lo,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:0,[jo]:{pb:0,"& > :last-child":{mb:0}}},children:[N(_i,{hideProject:ze,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:!Le,notice:Ae,event:Le,readOnly:Mo,targetSummary:Hr,onChangeProject:O=>l(e.seq,O),onAddProject:d,onChangeStartDate:O=>c(e.seq,"start_date",O),onChangeDueDate:O=>c(e.seq,"due_date",O),onChangeReminder:O=>s(e.seq,O),onChangePriority:O=>p(e.seq,O),onChangeEstimatedTime:O=>m(e.seq,O),onChangeEventTime:O=>g?.(e.seq,O),onChangeEventPlace:O=>M?.(e.seq,O),onChangeEventAddress:O=>v?.(e.seq,O),onMemberEdit:O=>f(e,O),narrowCollapsedSx:te,reminderLocked:e.completed,managerAction:Ft,leading:Ue(To,{children:[Rn||Ft&&(Ae||Le)?Ue(lo,{sx:{gridColumn:"1 / -1",display:"flex",justifyContent:"flex-start",gap:2,px:2,py:1.5},children:[Ae||Le?Ft:null,Rn?Ue(To,{children:[N(ir,{variant:"contained",size:"large",onClick:()=>pt?.(e.seq,!0),sx:{bgcolor:"#2f80ed"},children:"\uAC80\uC99D\uC644\uB8CC"}),N(ir,{variant:"outlined",size:"large",color:"error",onClick:()=>pt?.(e.seq,!1),children:"\uC7AC\uC624\uD508"})]}):null]}):null,So&&e.ticket_no?N(pe,{icon:N(yy,{sx:{fontSize:17}}),label:"\uD2F0\uCF13",children:N(lo,{component:"span",sx:{fontVariantNumeric:"tabular-nums"},children:e.ticket_no})}):null,Le?null:N(lo,{sx:So&&e.ticket_no||Wr?void 0:{gridColumn:"1 / -1"},children:N(pe,{icon:N(Iy,{sx:{fontSize:17}}),label:"\uC0C1\uD0DC",onClick:Mo||e.completed?void 0:O=>qe(O),children:N(Re,{option:Io(e)})})}),Bo&&Bo.total>0?N(lo,{children:N(pe,{icon:N(Bl,{sx:{fontSize:17}}),label:"\uD655\uC778",children:Bo.canConfirm?N(ir,{size:"small",variant:"contained",onClick:()=>Ie?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):Ue(ir,{size:"small",variant:"outlined",color:"inherit",startIcon:Bo.myTime?N(Sl,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:O=>P({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:[Bo.count," / ",Bo.total]})})}):null,Ae&&Oo?N(lo,{children:N(pe,{icon:N(Bl,{sx:{fontSize:17}}),label:"\uD655\uC778",children:N(lo,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,minWidth:0},children:Oo.canAck?N(ir,{size:"small",variant:"contained",onClick:()=>Ie?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):N(ir,{size:"small",variant:"outlined",color:"inherit",startIcon:Oo.acked?N(Sl,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:O=>P({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:Oo.total>0&&Oo.count>=Oo.total?"\uC644\uB8CC":Ue(To,{children:[Oo.count,N(lo,{component:"span",sx:{mx:.4},children:"/"}),Oo.total]})})})})}):null,U&&!Je&&!Le&&!Ae?Ue(To,{children:[N(pe,{icon:N(By,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:Mo?void 0:O=>ue(O),children:(e.sprint_seq??0)>0?Be.find(O=>O.seq===e.sprint_seq)?.name??"\uC0AD\uC81C\uB41C \uC2A4\uD504\uB9B0\uD2B8":N(ar,{label:"\uBBF8\uBC30\uC815"})}),N(pe,{icon:N(Cy,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",children:N(Rt,{value:(e.story_points??0)>0?String(e.story_points):"",placeholder:"\uBBF8\uCD94\uC815",readOnly:Mo,onCommit:O=>Mn?.(e.seq,Number(O.replace(/[^0-9.]/g,""))||0)})})]}):null,Le||W?null:N(lo,{sx:[{gridColumn:"1 / -1"},te??null],children:N(pe,{icon:N(_y,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:Mo?void 0:O=>je(O),children:(e.label_keys??[]).length>0?N(Ht,{labelKeys:e.label_keys??[],labelOptions:t}):N(ar,{})})})]}),trailing:Ue(To,{children:[So?N(wi,{values:{repro:e.bug_repro??"",device:e.bug_device??"",where:e.bug_where??"",version:e.bug_version??"",resolution:e.resolution??""},readOnly:Mo,showResolution:!!e.completed,onChangeRepro:O=>V?.(e.seq,"bug_repro",O),onChangeDevice:O=>V?.(e.seq,"bug_device",O),onChangeWhere:O=>V?.(e.seq,"bug_where",O),onChangeVersion:O=>V?.(e.seq,"bug_version",O),onChangeResolution:O=>Lt?.(e.seq,O)}):null,N(pe,{icon:N(wy,{sx:{fontSize:17}}),label:"\uC791\uC131\uC790",sx:[uo(9),te??null],children:e.created_by?Ue(To,{children:[N(_o,{names:[e.created_by],size:20,avatarSrcByName:n}),e.created_by]}):N(ar,{})}),N(pe,{icon:N(Em,{sx:{fontSize:17}}),label:"\uC791\uC131\uC2DC\uAC04",sx:[uo(11),te??null],children:e.created_time?Vo(e.created_time):N(ar,{})}),e.completed?Ue(To,{children:[N(pe,{icon:N(Bl,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC790",sx:[uo(10),te??null],children:e.completed_by?Ue(To,{children:[N(_o,{names:[e.completed_by],size:20,avatarSrcByName:n}),e.completed_by]}):N(ar,{})}),N(pe,{icon:N(Em,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC2DC\uAC04",sx:[uo(12),te??null],children:e.completed_time?Vo(e.completed_time):N(ar,{})})]}):null]})}),Ue(lo,{sx:{display:"none",[jo]:{display:"block",mt:1.5,mb:0}},children:[N(tn,{sx:{borderColor:"#e6e6e3"}}),N(fy,{onClick:()=>Q(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:$?Ue(To,{children:["\uC811\uAE30 ",N(ky,{sx:{fontSize:18}})]}):Ue(To,{children:["\uC815\uBCF4 \uB354\uBCF4\uAE30 ",N(Ty,{sx:{fontSize:18}})]})})]}),Ue(lo,{children:[N(tn,{sx:{my:1.5,borderColor:"#e6e6e3",[jo]:{mt:0,mb:1.25}}}),N(Wo,{icon:N(Dy,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",children:N(lo,{sx:{userSelect:"text"},children:N(Di,{syncKey:e.seq,value:e.content??"",height:e.content_height??0,onChangeHeight:B?O=>B(e.seq,O):void 0,readOnly:Mo,onChange:O=>x(e.seq,O)})})}),e.is_bug?null:Ue(To,{children:[N(tn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),N(Wo,{icon:N(Ey,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:N(lo,{sx:{userSelect:"text"},children:N(Bm,{value:e.note,readOnly:sn,onCommit:O=>h(e.seq,O)})})})]}),Le?null:Ue(To,{children:[N(tn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),N(Mi,{taskSeq:e.seq,checklist:e.checklist??[],removeLocked:sn,onAdd:S,onToggle:D,onRemove:y,onUpdate:w,onConvertToTask:T,onOpenLinkedTask:b,resolveLinkedTask:z,linkCandidates:u,linkBaseTask:e,onLinkExistingTask:I})]}),u&&!Le&&!Ae&&vm(e,u)?Ue(To,{children:[N(tn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),N(_m,{task:e,tasks:u,readOnly:Mo,onOpenTask:k,onLink:R,onUnlink:A,onCreateFollowUp:L})]}):null,N(tn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),N(zi,{taskSeq:e.seq,attachments:e.attachments??[],removeLocked:sn,onAdd:F,onRemove:le,onPreview:ie?O=>ie({...O,taskSeq:e.seq}):void 0,onDownload:me?O=>me({...O,taskSeq:e.seq}):void 0})]}),N(tn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),N(gm,{taskSeq:e.seq,comments:e.comments??[],currentUserName:ae,myAccountSeq:ee,avatarSrcByName:n,onUpdate:se,onRemove:Te,onToggleReaction:fe,onPreview:ie?O=>ie({...O,taskSeq:e.seq}):void 0,onDownload:me?O=>me({...O,taskSeq:e.seq}):void 0}),ce?Ue(To,{children:[N(tn,{sx:{mb:1.5,borderColor:"#e6e6e3"}}),N(Dm,{taskSeq:e.seq,items:xe,loading:Se,onExpand:ce})]}):null]}),N(Xr,{anchorEl:Fe,value:e.status,options:Ae?xr:So?mn:gr,onSelect:O=>r(e.seq,O),onClose:()=>qe(null)}),N(hy,{transitionDuration:0,anchorEl:co,open:!!co,onClose:()=>ue(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...Be.filter(O=>`custom-${O.group_seq}`===String(e.tab_key??"")).map(O=>({seq:O.seq,label:Fo(O)}))].map(O=>Ue(by,{onClick:()=>{zo?.(e.seq,O.seq),ue(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[O.label,(e.sprint_seq??0)===O.seq?N(Sy,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},O.seq))}),N(ci,{anchorEl:De?.anchorEl??null,open:!!De?.open,acks:e.acks??[],total:Oo?.total??Bo?.total??0,avatarSrcByName:n,onRequestConfirm:q&&Bo&&Bo.count<Bo.total?()=>{q(e.seq),P(O=>O?{...O,open:!1}:null)}:void 0,onClose:()=>P(O=>O?{...O,open:!1}:null)}),N(Ai,{anchorEl:eo,selectedKeys:e.label_keys??[],labelOptions:t,onToggle:O=>i(e.seq,Yr(e.label_keys??[],O)),onAddLabel:a,onClose:()=>je(null)}),N(We,{open:!!oo,anchorEl:oo,title:On?"\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:()=>Ao(null),onConfirm:()=>{qo?.(e.seq),Ao(null)}})]})}import{jsx as Po,jsxs as Ly}from"react/jsx-runtime";function Tz(){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 yz({open:e,task:o,onClose:t,onAddComment:n,onSaveFields:r,myAccountSeq:i=0,onToggleCompleted:a,onChangeTitle:l,onChangeIcon:d,onChangeIconColor:c,...s}){let f=Oe(),p=Rm(null);o&&(p.current=o);let m=o??p.current,[g,M]=Oy({}),v=Object.keys(g).length>0;Om(()=>{M({})},[o?.seq,e]);let h=Rm(null);if(Om(()=>{h.current?.scrollTo({top:0})},[o?.seq]),!m)return null;let x=f&&v?{...m,...g}:m,B=(T,b)=>{f?M(I=>({...I,...T})):b()},S=()=>{let T=g;M({});let b=m.seq,I=T.title===void 0?void 0:String(T.title).trim();if(r){let z={...T};I!==void 0&&(I?z.title=I:delete z.title),Object.keys(z).length>0&&r(b,z),zm({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"});return}I&&l(b,I),T.icon!==void 0&&d(b,String(T.icon)),T.icon_color!==void 0&&c?.(b,String(T.icon_color)),T.status!==void 0&&s.onChangeStatus(b,T.status),T.label_keys!==void 0&&s.onChangeLabels(b,T.label_keys??[]),T.tab_key!==void 0&&s.onChangeProject(b,String(T.tab_key??"")),T.start_date!==void 0&&s.onChangeDate(b,"start_date",String(T.start_date??"")),T.due_date!==void 0&&s.onChangeDate(b,"due_date",String(T.due_date??"")),T.reminder!==void 0&&s.onChangeReminder(b,T.reminder),T.priority!==void 0&&s.onChangePriority(b,T.priority),T.estimated_time!==void 0&&s.onChangeEstimatedTime(b,String(T.estimated_time??"")),T.event_time!==void 0&&s.onChangeEventTime?.(b,String(T.event_time??"")),T.event_place!==void 0&&s.onChangeEventPlace?.(b,String(T.event_place??"")),T.event_address!==void 0&&s.onChangeEventAddress?.(b,String(T.event_address??"")),T.content!==void 0&&s.onChangeContent(b,String(T.content??"")),T.note!==void 0&&s.onChangeNote(b,String(T.note??"")),zm({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"})},D={...s,onChangeStatus:(T,b)=>B({status:b},()=>s.onChangeStatus(T,b)),onChangeLabels:(T,b)=>B({label_keys:b},()=>s.onChangeLabels(T,b)),onChangeProject:(T,b)=>B({tab_key:b},()=>s.onChangeProject(T,b)),onChangeDate:(T,b,I)=>B({[b]:I},()=>s.onChangeDate(T,b,I)),onChangeReminder:(T,b)=>B({reminder:b},()=>s.onChangeReminder(T,b)),onChangePriority:(T,b)=>B({priority:b},()=>s.onChangePriority(T,b)),onChangeEstimatedTime:(T,b)=>B({estimated_time:b},()=>s.onChangeEstimatedTime(T,b)),onChangeEventTime:(T,b)=>B({event_time:b},()=>s.onChangeEventTime?.(T,b)),onChangeEventPlace:(T,b)=>B({event_place:b},()=>s.onChangeEventPlace?.(T,b)),onChangeEventAddress:(T,b)=>B({event_address:b},()=>s.onChangeEventAddress?.(T,b)),onChangeContent:(T,b)=>B({content:b},()=>s.onChangeContent(T,b)),onChangeNote:(T,b)=>B({note:b},()=>s.onChangeNote(T,b))},y=Po(Mm,{...D,task:x,myAccountSeq:i,onChangeTitle:(T,b)=>B({title:b},()=>l(T,b)),onToggleCompleted:a,onChangeIcon:(T,b)=>B({icon:b},()=>d(T,b)),onChangeIconColor:(T,b)=>B({icon_color:b},()=>c?.(T,b)),showTitle:f}),w=Po(hm,{onSubmit:(T,b)=>n(x.seq,T,b)},x.seq);return f?Po(Ay,{open:e,onClose:t,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:x.is_notice?"\uACF5\uC9C0\uC0AC\uD56D":x.is_event?"\uC77C\uC815":x.is_bug?"\uC624\uB958":"\uC5C5\uBB34",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1},custom:[{icon:Po(zy,{sx:{ml:2,color:"#6b7280"}}),tooltip:"\uACF5\uC720\uD558\uAE30",onClick:()=>nr(x,!0)},{icon:Po(Ry,{variant:"contained",size:"small",disableElevation:!0,disabled:!v,onClick:v?S:void 0,sx:{ml:1,minWidth:0,px:1.5,py:.35,fontSize:14,fontWeight:600,bgcolor:"#2f80ed","&:hover":{bgcolor:"#2f80ed"}},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:w},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:Po(Ui,{sx:{userSelect:"none",width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:y})}]},m.seq):Po(Py,{anchor:"right",open:e,onClose:t,sx:{zIndex:T=>T.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:Ly(Ui,{sx:{display:"flex",flexDirection:"column",height:"100%",userSelect:"none"},children:[Po(Sm,{task:x,myAccountSeq:i,onToggleCompleted:a,onChangeTitle:l,onChangeIcon:d,onChangeIconColor:c,onClose:t}),Po(Pm,{sx:{borderColor:"#e6e6e3"}}),Po(Ui,{sx:{flex:1,minHeight:0},children:Po(qy,{ref:h,style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:y})}),Po(Pm,{sx:{borderColor:"#37352f"}}),Po(Ui,{sx:{flexShrink:0},children:w})]})})}import{useEffect as Fy,useState as vn}from"react";import{Box as Eo,Button as Il,IconButton as qm}from"@mui/material";import{FormDialog as Hy}from"@ehfuse/mui-form-dialog";import Wy from"@mui/icons-material/EditOutlined";import{ErrorAlert as Am}from"@ehfuse/alerts";import{ClearTextField as Lm,DateTextField as Nm,LabelSelect as Fm}from"@ehfuse/mui-form-controls";var Cl="custom-";function Ny(e){return e.startsWith(Cl)}function Cz(e){return e>0?`${Cl}${e}`:""}function vl(e){if(!Ny(e))return 0;let o=Number(e.slice(Cl.length));return Number.isInteger(o)&&o>0?o:0}import{Fragment as Ky,jsx as Qe,jsxs as nn}from"react/jsx-runtime";var $y=[{value:"planning",label:"\uACC4\uD68D\uC911"},{value:"active",label:"\uC9C4\uD589\uC911"},{value:"closed",label:"\uC885\uB8CC"}];function Hm(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):"-"}function Pz({open:e,customTabs:o,sprints:t,onClose:n,onCreate:r,onUpdate:i,onChangeStatus:a,onRemove:l}){let d=o.filter(u=>u.useSprints&&!u.archived),[c,s]=vn(""),[f,p]=vn(""),[m,g]=vn(""),[M,v]=vn(""),[h,x]=vn(""),[B,S]=vn(!1),[D,y]=vn(0);Fy(()=>{e&&(s(d.length===1?d[0].key:""),p(""),g(""),v(""),x(""),y(0))},[e]);let w=()=>{p(""),g(""),v(""),x(""),y(0)},T=u=>{y(u.seq),s(`custom-${u.group_seq}`),p(u.name),g(u.goal),v(u.start_date),x(u.end_date)},b=async()=>{let u=vl(c);if(!u){Am("\uBAA9\uD45C\uB97C \uB9CC\uB4E4 \uD504\uB85C\uC81D\uD2B8\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}if(!f.trim()){Am("\uBAA9\uD45C \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}S(!0);try{if(D>0){i(D,{name:f.trim(),goal:m.trim(),start_date:M,end_date:h}),w();return}await r({group_seq:u,name:f.trim(),goal:m.trim(),start_date:M,end_date:h})&&w()}finally{S(!1)}},I=new Map(o.map(u=>[vl(u.key),u.label])),z=Qe(Eo,{children:d.length===0?Qe(Eo,{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.'}):nn(Ky,{children:[nn(Eo,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2.5,mt:1},children:[Qe(Fm,{label:"\uD504\uB85C\uC81D\uD2B8",size:"medium",value:c,options:d.map(u=>({value:u.key,label:u.label})),onChange:u=>s(String(u.target.value)),disabled:D>0}),Qe(Lm,{label:"\uBAA9\uD45C \uC774\uB984",size:"medium",placeholder:"\uC608: 8\uC6D4 2\uC8FC\uCC28",value:f,onChange:u=>p(u.target.value)}),Qe(Nm,{size:"medium",label:"\uC2DC\uC791\uC77C",value:M,onChange:u=>v(u.target.value)}),Qe(Nm,{size:"medium",label:"\uC885\uB8CC\uC77C",value:h,onChange:u=>x(u.target.value)}),Qe(Lm,{label:"\uC124\uBA85",size:"medium",placeholder:"\uC120\uD0DD \uC785\uB825",value:m,onChange:u=>g(u.target.value),sx:{gridColumn:"1 / -1"}})]}),nn(Eo,{sx:{mt:1.5,display:"flex",justifyContent:"flex-end",gap:1},children:[D>0?Qe(Il,{color:"inherit",onClick:w,disabled:B,children:"\uCDE8\uC18C"}):null,Qe(Il,{variant:"contained",onClick:()=>{b()},disabled:B,children:D>0?"\uBAA9\uD45C \uC800\uC7A5":"\uBAA9\uD45C \uB9CC\uB4E4\uAE30"})]}),Qe(Eo,{sx:{mt:2,borderTop:"1px solid #e6e6e3"},children:t.length===0?Qe(Eo,{sx:{py:3,textAlign:"center",fontSize:14,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):t.map(u=>nn(Eo,{sx:{display:"flex",flexDirection:"column",gap:1,py:1.75,borderBottom:"1px solid #f0efed"},children:[nn(Eo,{sx:{minWidth:0},children:[nn(Eo,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[Qe(Eo,{component:"span",sx:{fontSize:16,fontWeight:600,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:u.name}),Qe(Eo,{component:"span",sx:{flexShrink:0,px:1,py:.25,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:13,fontWeight:500},children:I.get(u.group_seq)??"\uC0AD\uC81C\uB41C \uD504\uB85C\uC81D\uD2B8"}),nn(Eo,{component:"span",sx:{flexShrink:0,fontSize:14,color:"#57564f"},children:[Hm(u.start_date)," ~ ",Hm(u.end_date)]})]}),u.goal?Qe(Eo,{sx:{mt:.5,fontSize:14,color:"#787774",lineHeight:1.5},children:u.goal}):null]}),nn(Eo,{sx:{display:"flex",alignItems:"center",gap:.5},children:[Qe(Fm,{label:"\uC0C1\uD0DC",showLabel:!1,size:"small",value:u.status,options:$y.map(k=>({value:k.value,label:k.label})),onChange:k=>a(u.seq,String(k.target.value)),sx:{width:104,flexShrink:0}}),Qe(qm,{"aria-label":"\uBAA9\uD45C \uC218\uC815",onClick:()=>T(u),sx:{color:"#9a9a97","&:hover":{color:"#2563eb"}},children:Qe(Wy,{sx:{fontSize:18}})}),Qe(qm,{"aria-label":"\uBAA9\uD45C \uC0AD\uC81C",onClick:()=>l(u.seq),sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:Qe(yt,{style:{width:16,height:16}})})]})]},u.seq))})]})});return Qe(Hy,{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:z}],actions:{showCancelButton:!1,right:Qe(Il,{variant:"contained",onClick:n,children:"\uB2EB\uAE30"})}})}import{useState as Wm}from"react";import{Box as so,Button as _l,Divider as Uy,IconButton as Vy,TextField as Gy}from"@mui/material";import{FormDialog as Yy}from"@ehfuse/mui-form-dialog";import jy from"@mui/icons-material/OpenInNewOutlined";import Xy from"@mui/icons-material/EventOutlined";import{ConfirmDialog as Qy}from"@ehfuse/alerts";import{jsx as Ee,jsxs as In}from"react/jsx-runtime";function Kz({open:e,imports:o,onRegister:t,onRemove:n,onClose:r}){let[i,a]=Wm(""),[l,d]=Wm(!1),c=async()=>{let p=i.trim();if(p){d(!0);try{await t(p)&&a("")}finally{d(!1)}}},s=async p=>{await Qy({title:"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",message:`"${p.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}" \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&n(p.seq)},f=In(so,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[In(so,{sx:{color:"#37352f",lineHeight:1.7},children:["\uAD6C\uAE00 \uCE98\uB9B0\uB354\uC758 \uC77C\uC815\uC744 ",Ee("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uC5C5\uBB34\uD568 \uCE98\uB9B0\uB354\uC5D0 \uD568\uAED8 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4.",Ee("br",{}),"\uD45C\uC2DC/\uC228\uAE40\uC740 \uC5C5\uBB34\uD568 \uC6B0\uC0C1\uB2E8\uC758 ",Ee("b",{children:"\uAD6C\uAE00 \uC77C\uC815"})," \uC2A4\uC704\uCE58\uB85C \uCF1C\uACE0 \uB055\uB2C8\uB2E4."]}),Ee(so,{sx:{fontWeight:700,color:"#37352f",mt:.5},children:"\uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354"}),o.length>0?Ee(so,{sx:{display:"flex",flexDirection:"column",border:"1px solid #e6e6e3",borderRadius:1},children:o.map((p,m)=>In(so,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:.75,borderTop:m>0?"1px solid #efefed":"none"},children:[Ee(Xy,{sx:{fontSize:18,color:"#0f9d58",flexShrink:0}}),Ee(so,{component:"span",sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:p.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),Ee(Vy,{"aria-label":"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",size:"small",onClick:()=>{s(p)},sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:Ee(yt,{sx:{fontSize:18}})})]},p.seq))}):Ee(so,{sx:{color:"#9a9a97",px:.5},children:"\uC544\uC9C1 \uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}),Ee(Uy,{sx:{my:1,borderColor:"#e6e6e3"}}),Ee(so,{sx:{fontWeight:700,color:"#37352f"},children:"\uC0C8 \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30"}),In(so,{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:[Ee(so,{children:In(so,{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 > ",Ee("b",{children:"\uC124\uC815 \uBC0F \uACF5\uC720"}),"\uB97C \uC5FD\uB2C8\uB2E4."]})}),Ee(so,{children:In(so,{component:"span",children:[Ee("b",{children:"\uCE98\uB9B0\uB354 \uD1B5\uD569"})," \uC139\uC158\uC758 ",Ee("b",{children:'"iCal \uD615\uC2DD\uC758 \uBE44\uBC00 \uC8FC\uC18C"'})," \uB97C \uBCF5\uC0AC\uD574 \uC544\uB798\uC5D0 \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),Ee(so,{children:Ee(so,{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."})}),Ee(so,{children:Ee(so,{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."})})]}),In(so,{sx:{display:"flex",gap:2,alignItems:"center"},children:[Ee(Gy,{value:i,onChange:p=>a(p.target.value),fullWidth:!0,label:"\uBE44\uBC00 iCal \uC8FC\uC18C",placeholder:"https://calendar.google.com/calendar/ical/\u2026/basic.ics",slotProps:{input:{spellCheck:!1}}}),Ee(_l,{variant:"contained",disabled:!i.trim()||l,onClick:()=>{c()},sx:{flexShrink:0},children:l?"\uD655\uC778 \uC911\u2026":"\uB4F1\uB85D"})]})]});return Ee(Yy,{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:f}],actions:{showCancelButton:!1,left:Ee(_l,{variant:"outlined",startIcon:Ee(jy,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:Ee(_l,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})}})}import{Box as qt,Button as zr,TextField as Zy}from"@mui/material";import{FormDialog as Jy}from"@ehfuse/mui-form-dialog";import e0 from"@mui/icons-material/ContentCopyOutlined";import $m from"@mui/icons-material/OpenInNewOutlined";import{InfoAlert as Km}from"@ehfuse/alerts";import{Fragment as t0,jsx as Ze,jsxs as _n}from"react/jsx-runtime";function o0(e){return`${window.location.origin}/api/v1/taskbox/calendar/${e}.ics`}function Zz({open:e,feed:o,feedTaskCount:t,buildFeedUrl:n,onSubscribe:r,onClose:i}){let a=n??o0,l=o.subscribed?a(o.token):"",d=()=>{navigator.clipboard.writeText(l).then(()=>Km("\uD53C\uB4DC \uC8FC\uC18C\uB97C \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>Km("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uC8FC\uC18C\uB97C \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD558\uC138\uC694."))},c=()=>{let f=l.replace(/^https?:\/\//,"webcal://");window.open(`https://calendar.google.com/calendar/r?cid=${encodeURIComponent(f)}`,"_blank")},s=_n(qt,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[_n(qt,{sx:{color:"#37352f",lineHeight:1.7},children:["\uB0B4\uAC00 \uAD00\uC5EC\uD55C \uC5C5\uBB34\uB97C ",Ze("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0\uC11C \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4."]}),t===0?_n(qt,{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.",Ze("br",{}),Ze("b",{children:"\uB9C8\uAC10\uAE30\uD55C\uC774 \uC788\uB294 \uB0B4 \uC5C5\uBB34 \uB610\uB294 \uBCF4\uB0B8\uC5C5\uBB34"}),"\uAC00 \uC0DD\uAE30\uBA74"," ",o.subscribed?"\uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0 \uC790\uB3D9\uC73C\uB85C \uD45C\uC2DC\uB429\uB2C8\uB2E4.":"\uC5EC\uAE30\uC11C \uAD6C\uB3C5\uC744 \uC2DC\uC791\uD558\uC138\uC694."]}):o.subscribed&&o.enabled?_n(t0,{children:[Ze(Zy,{value:l,fullWidth:!0,label:"\uB0B4 \uD53C\uB4DC \uC8FC\uC18C",slotProps:{input:{readOnly:!0}}}),_n(qt,{sx:{display:"flex",gap:2},children:[Ze(zr,{variant:"outlined",startIcon:Ze(e0,{}),onClick:d,children:"\uC8FC\uC18C \uBCF5\uC0AC"}),Ze(zr,{variant:"contained",startIcon:Ze($m,{}),onClick:c,children:"Google \uCE98\uB9B0\uB354\uC5D0 \uCD94\uAC00"})]}),_n(qt,{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:[Ze(qt,{children:_n("span",{children:["\uBC84\uD2BC\uC774 \uB3D9\uC791\uD558\uC9C0 \uC54A\uC73C\uBA74 \uAD6C\uAE00 \uCE98\uB9B0\uB354 > \uB2E4\uB978 \uCE98\uB9B0\uB354 + > ",Ze("b",{children:"URL\uB85C \uCD94\uAC00"}),"\uC5D0 \uC704 \uC8FC\uC18C\uB97C \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),Ze(qt,{children:Ze("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."})}),Ze(qt,{children:Ze("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."})}),Ze(qt,{children:Ze("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."})})]})]}):Ze(zr,{variant:"contained",onClick:r,sx:{alignSelf:"flex-start"},children:"\uAD6C\uB3C5 \uC2DC\uC791 (\uD53C\uB4DC \uBC1C\uAE09)"})]});return Ze(Jy,{open:e,onClose:i,width:680,title:"\uAD6C\uAE00 \uCE98\uB9B0\uB354\uB85C \uB0B4\uBCF4\uB0B4\uAE30",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-calendar-subscribe",sections:[{id:"calendar-subscribe",showTitle:!1,children:s}],actions:{showCancelButton:!1,left:Ze(zr,{variant:"outlined",startIcon:Ze($m,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:Ze(zr,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}import{useEffect as n0,useMemo as wl,useState as Dl}from"react";import{Box as qr,Button as r0,Typography as i0}from"@mui/material";import{FormDialog as a0}from"@ehfuse/mui-form-dialog";import{SearchTextField as l0}from"@ehfuse/mui-form-controls";import{TreeView as s0}from"@ehfuse/tree-view";import{Fragment as f0,jsx as ot,jsxs as x0}from"react/jsx-runtime";function Um(e){return`${e.name}#${e.seq}`}function c0(e){return Number(e.slice(e.lastIndexOf("#")+1))||0}function m0(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 u0(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 d0(e){let o=[[e.name,e.role_name].filter(Boolean).join(" "),e.department].filter(Boolean).join(" / ");return{id:`emp:${e.seq}`,label:Um(e),renderLabel:ot(qr,{component:"span",sx:{display:"inline-flex",alignItems:"baseline",gap:.75},children:ot(qr,{component:"span",sx:{fontWeight:400,color:"text.primary"},children:o})})}}function Vm(e,o){let t=(e.groups??[]).map(r=>Vm(r,o)).filter(r=>r!==null),n=(e.employees??[]).filter(r=>u0(r,o)).map(d0);return t.length===0&&n.length===0?null:{id:`group:${e.key}`,label:e.name,children:[...t,...n]}}function p0({groups:e,allEmployees:o,initialSelectedSeqs:t,multiple:n,isMobile:r,onSelectionChange:i}){let[a,l]=Dl(""),d=wl(()=>e.map(s=>Vm(s,a.trim().toLowerCase())).filter(s=>s!==null),[e,a]),c=wl(()=>o.filter(s=>t.includes(s.seq)).map(Um),[]);return x0(f0,{children:[ot(qr,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:ot(l0,{size:"small",fullWidth:!0,placeholder:"\uC774\uB984, \uBD80\uC11C \uAC80\uC0C9",onSearch:l,onClear:()=>l(""),sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),ot(qr,{sx:r?{display:"flex",flexDirection:"column"}:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:ot(s0,{items:d,checkbox:!0,multiSelect:n,selectionMode:"child",showSearch:!1,defaultExpanded:!0,initialSelections:c,onChange:s=>i(s.map(c0).filter(f=>f>0)),styles:{border:"none",borderRadius:"0"}})})]})}function lq({open:e,title:o="\uC9C1\uC6D0 \uC120\uD0DD",hint:t="",groups:n,multiple:r=!1,selectedSeqs:i,confirmText:a="\uD655\uC778",onConfirm:l,onClose:d}){let c=Oe(),[s,f]=Dl([]),[p,m]=Dl(0),g=wl(()=>m0(n),[n]),M=i??[];n0(()=>{e&&(f(M),m(h=>h+1))},[e]);let v=()=>{let h=g.filter(x=>s.includes(x.seq));l(r?h:h.slice(0,1)),d()};return ot(a0,{open:e,onClose:d,title:`${o}${r&&s.length>0?` (${s.length}\uBA85)`:""}`,locale:"ko",fullScreen:c,mobilePresentation:c?"slide":"dialog",draggable:!0,width:"600px",tabs:{visible:!1},titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},scrollPastLastSection:!1,sectionContentPaddingTop:0,fontScale:{enabled:!0},fontScaleKey:"taskbox-employee-select",sections:[{id:"employee-select",title:"\uC9C1\uC6D0 \uC120\uD0DD",showTitle:!1,children:ot(qr,{sx:{...c?{}:{height:560},display:"flex",flexDirection:"column",border:"1px solid #cccccc",borderRadius:1,...c?{}:{overflow:"hidden"},userSelect:"none"},children:ot(p0,{groups:n,allEmployees:g,initialSelectedSeqs:M,multiple:r,isMobile:c,onSelectionChange:f},p)})}],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?ot(i0,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.35},children:t}):void 0,right:ot(r0,{variant:"contained",onClick:v,children:a})}})}import{useEffect as k0,useMemo as T0,useState as y0}from"react";import{Box as cr,Button as S0,Divider as B0}from"@mui/material";import{FormDialog as C0}from"@ehfuse/mui-form-dialog";import{LabelSelect as v0}from"@ehfuse/mui-form-controls";import{Box as ut}from"@mui/material";import{jsx as lr,jsxs as sr}from"react/jsx-runtime";function g0(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 Gm({sprints:e,tasks:o,height:t=160}){let r=[...e].sort((s,f)=>`${s.start_date}|${s.seq}`.localeCompare(`${f.start_date}|${f.seq}`)).map(s=>({sprint:s,...g0(s,o)})),i=r.some(s=>s.points>0),a=r.map(s=>i?s.points:s.count),l=Math.max(1,...a),d=r.filter(s=>s.sprint.status==="closed").map(s=>i?s.points:s.count),c=d.length>0?Math.round(d.reduce((s,f)=>s+f,0)/d.length*10)/10:null;return r.length===0?lr(ut,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uD45C\uC2DC\uD560 \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):sr(ut,{children:[sr(ut,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[sr("span",{children:["\uC644\uB8CC ",i?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uBAA9\uD45C\uBCC4"]}),c!==null?sr("span",{children:["\uD3C9\uADE0(\uC885\uB8CC \uBAA9\uD45C)"," ",lr(ut,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:c}),i?"SP":"\uAC74"]}):null]}),lr(ut,{sx:{display:"flex",alignItems:"flex-end",gap:2,height:t,px:.5},children:r.map(s=>{let f=i?s.points:s.count,p=Math.round((t-24)*f/l),m=s.sprint.status==="closed";return sr(ut,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-end",height:"100%"},children:[lr(ut,{sx:{fontSize:14,fontWeight:700,color:"#37352f",lineHeight:1.5},children:f}),lr(ut,{sx:{width:"60%",maxWidth:56,height:Math.max(2,p),borderRadius:"4px 4px 0 0",bgcolor:m?"#2f80ed":"#a9c9f5"}})]},s.sprint.seq)})}),lr(ut,{sx:{display:"flex",gap:2,px:.5,mt:.5},children:r.map(s=>sr(ut,{sx:{flex:1,minWidth:0,textAlign:"center",fontSize:13.5,color:"#000",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[s.sprint.name,s.sprint.status!=="closed"?" (\uC9C4\uD589\uC911)":""]},s.sprint.seq))})]})}import{useMemo as h0}from"react";import{Box as wn}from"@mui/material";import{jsx as dt,jsxs as Dn}from"react/jsx-runtime";function Ym(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?new Date(`${e}T00:00:00`):null}function b0(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function El(e){return e.slice(5).replace("-",".")}function jm({sprint:e,tasks:o,todayStr:t,height:n=200}){let r=h0(()=>{let h=Ym(e.start_date),x=Ym(e.end_date);if(!h||!x||x<h||Math.round((x.getTime()-h.getTime())/864e5)+1>366)return null;let S=o.filter(u=>u.sprint_seq===e.seq&&!u.archived);if(S.length===0)return{empty:!0};let D=S.some(u=>(u.story_points??0)>0),y=u=>D?u.story_points??0:1,w=S.reduce((u,k)=>u+y(k),0),T=new Map;for(let u of S){if(!u.completed)continue;let k=(u.completed_time??"").slice(0,10),R=/^\d{4}-\d{2}-\d{2}$/.test(k)?k:e.start_date;T.set(R,(T.get(R)??0)+y(u))}let b=[];for(let u=new Date(h);u<=x;u.setDate(u.getDate()+1))b.push(b0(u));let I=w,z=[];for(let u of b){if(u>t)break;I-=T.get(u)??0,z.push({day:u,value:Math.max(0,I)})}return{empty:!1,days:b,total:w,usePoints:D,actual:z}},[e,o,t]);if(!r)return dt(wn,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uBAA9\uD45C\uC758 \uC2DC\uC791\uC77C\xB7\uC885\uB8CC\uC77C\uC774 \uC788\uC5B4\uC57C \uBC88\uB2E4\uC6B4\uC744 \uADF8\uB9B4 \uC218 \uC788\uC2B5\uB2C8\uB2E4."});if(r.empty)return dt(wn,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uBC30\uC815\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."});let{days:i,total:a,usePoints:l,actual:d}=r,c=600,s=200,f=8,p=h=>i.length===1?0:h/(i.length-1)*c,m=h=>f+(s-f*2)*(1-h/Math.max(1,a)),g=`${p(0)},${m(a)} ${p(i.length-1)},${m(0)}`,M=d.map(h=>`${p(i.indexOf(h.day))},${m(h.value)}`).join(" "),v=d[d.length-1];return Dn(wn,{children:[Dn(wn,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[Dn("span",{children:["\uB0A8\uC740 ",l?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uCD1D ",a]}),v?Dn("span",{children:["\uD604\uC7AC"," ",dt(wn,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:v.value}),l?"SP":"\uAC74"," \uB0A8\uC74C"]}):null]}),dt(wn,{sx:{border:"1px solid #e6e6e3",borderRadius:1,bgcolor:"#fafaf9",px:1,py:.5},children:Dn("svg",{viewBox:`0 0 ${c} ${s}`,preserveAspectRatio:"none",style:{display:"block",width:"100%",height:n},children:[dt("line",{x1:0,y1:m(0),x2:c,y2:m(0),stroke:"#e6e6e3",strokeWidth:1}),dt("polyline",{points:g,fill:"none",stroke:"#9a9a97",strokeWidth:1.5,strokeDasharray:"6 5",vectorEffect:"non-scaling-stroke"}),d.length>1?dt("polyline",{points:M,fill:"none",stroke:"#2f80ed",strokeWidth:2.5,vectorEffect:"non-scaling-stroke"}):null,v?dt("circle",{cx:p(i.indexOf(v.day)),cy:m(v.value),r:4,fill:"#2f80ed",vectorEffect:"non-scaling-stroke"}):null]})}),Dn(wn,{sx:{mt:.5,display:"flex",justifyContent:"space-between",fontSize:13.5,color:"#000"},children:[dt("span",{children:El(e.start_date)}),t>e.start_date&&t<e.end_date?Dn("span",{children:["\uC624\uB298 ",El(t)]}):null,dt("span",{children:El(e.end_date)})]})]})}import{jsx as At,jsxs as Ml}from"react/jsx-runtime";function Cq({open:e,sprints:o,tasks:t,todayStr:n,initialSprintSeq:r=0,onClose:i}){let[a,l]=y0(0);k0(()=>{if(!e)return;let s=o.find(p=>p.status==="active")??o[0],f=o.find(p=>p.seq===r)??s;l(f?.seq??0)},[e]);let d=T0(()=>o.find(s=>s.seq===a)??null,[o,a]),c=Ml(cr,{sx:{display:"flex",flexDirection:"column"},children:[Ml(cr,{sx:{px:3,py:2.5},children:[At(cr,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBCA8\uB85C\uC2DC\uD2F0"}),At(Gm,{sprints:o,tasks:t})]}),At(B0,{sx:{borderColor:"#e6e6e3"}}),Ml(cr,{sx:{px:3,py:2.5},children:[At(cr,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBC88\uB2E4\uC6B4"}),At(v0,{label:"\uBAA9\uD45C",showLabel:!1,value:a?String(a):"",options:o.map(s=>({value:String(s.seq),label:Fo(s)})),onChange:s=>l(Number(s.target.value)||0),sx:{width:280,mb:2}}),d?At(jm,{sprint:d,tasks:t,todayStr:n}):At(cr,{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 At(C0,{open:e,onClose:i,width:680,title:"\uBAA9\uD45C \uCC28\uD2B8",locale:"ko",contentTopPadding:0,contentPaddingX:0,sectionsPaddingTop:0,tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-sprint-charts",sections:[{id:"sprint-charts",showTitle:!1,children:c}],actions:{showCancelButton:!1,right:At(S0,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}import{Checkbox as I0,Divider as _0,Menu as w0,MenuItem as Ol}from"@mui/material";import{jsx as Ar,jsxs as Xm}from"react/jsx-runtime";function Dq({anchorEl:e,candidates:o,selectedNames:t,avatarSrcByName:n,onToggle:r,onClear:i,onClose:a}){return Xm(w0,{anchorEl:e,open:!!e,onClose:a,transitionDuration:0,children:[o.length===0?Ar(Ol,{disabled:!0,sx:{fontSize:14},children:"\uBAA9\uB85D\uC5D0 \uC9C0\uC815\uB41C \uC0AC\uB78C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):o.map(l=>{let d=t.includes(l.name);return Xm(Ol,{onClick:()=>r(l),sx:{fontSize:14,minWidth:170,gap:1},children:[Ar(I0,{size:"small",checked:d,sx:{p:0}}),Ar(_o,{names:[l.name],size:20,avatarSrcByName:n}),l.name]},`${l.accountSeq}-${l.name}`)}),Ar(_0,{}),Ar(Ol,{disabled:t.length===0,onClick:i,sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{useState as D0}from"react";import{ButtonBase as E0,Menu as M0,MenuItem as O0}from"@mui/material";import R0 from"@mui/icons-material/KeyboardArrowDown";import P0 from"@mui/icons-material/Check";import{Fragment as z0,jsx as Rl,jsxs as Pl}from"react/jsx-runtime";function Aq({value:e,onChange:o,options:t}){let[n,r]=D0(null),i=t??da,a=da.find(l=>l.value===e)?.label??"";return Pl(z0,{children:[Pl(E0,{onClick:l=>r(l.currentTarget),sx:{display:"flex",alignItems:"center",gap:.5,px:1,py:.5,borderRadius:1,fontSize:13.5,color:"#37352f","&:hover":{bgcolor:"#f2f2f0"}},children:[a,Rl(R0,{sx:{fontSize:17,color:"#9a9a97"}})]}),Rl(M0,{transitionDuration:0,anchorEl:n,open:!!n,onClose:()=>r(null),children:i.map(l=>Pl(O0,{selected:l.value===e,onClick:()=>{o(l.value),r(null)},sx:{fontSize:14,minWidth:140,justifyContent:"space-between",gap:1},children:[l.label,l.value===e?Rl(P0,{sx:{fontSize:16,color:"#2f80ed"}}):null]},l.value))})]})}import{Box as Gi,ButtonBase as q0}from"@mui/material";import{DateTextField as Qm}from"@ehfuse/mui-form-controls";function En(e){let o=t=>String(t).padStart(2,"0");return`${e.getFullYear()}-${o(e.getMonth()+1)}-${o(e.getDate())}`}function Vi(e,o=new Date){let t=new Date(o);return t.setMonth(t.getMonth()-e),t}function Fq(e=new Date){return{fromDate:En(Vi(1,e)),toDate:En(e)}}import{jsx as Lr,jsxs as Zm}from"react/jsx-runtime";var A0=[{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 Jm({fromDate:e,toDate:o,onChange:t}){let n=i=>{if(i<=0){t("","");return}t(En(Vi(i)),En(new Date))},r=i=>i<=0?!e&&!o:!e||!o?!1:e===En(Vi(i))&&o===En(new Date);return Zm(Gi,{sx:{display:"flex",alignItems:"center",gap:1.5,flexWrap:"wrap"},children:[Lr(Gi,{sx:{display:"flex",alignItems:"center",gap:1.5},children:A0.map(i=>{let a=r(i.months);return Lr(q0,{onClick:()=>n(i.months),sx:{px:1.25,py:.85,borderRadius:1,fontSize:13,fontWeight:a?500:400,border:"1px solid",borderColor:a?"#2f80ed":"#dedddb",color:a?"#2f80ed":"#37352f",bgcolor:a?"#eef6ff":"transparent","&:hover":{bgcolor:a?"#eef6ff":"#f7f7f5"}},children:i.label},i.label)})}),Zm(Gi,{sx:{display:"flex",alignItems:"center",gap:.5},children:[Lr(Qm,{value:e,size:"small",placeholder:"\uC2DC\uC791\uC77C",onChange:i=>t(i.target.value,o),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}}),Lr(Gi,{component:"span",sx:{fontSize:13,color:"#9a9a97"},children:"~"}),Lr(Qm,{value:o,size:"small",placeholder:"\uC885\uB8CC\uC77C",onChange:i=>t(e,i.target.value),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}})]})]})}import{Popover as L0}from"@mui/material";import{jsx as eu}from"react/jsx-runtime";function jq({anchorEl:e,fromDate:o,toDate:t,onChange:n,onClose:r}){return eu(L0,{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:eu(Jm,{fromDate:o,toDate:t,onChange:n})})}import{Box as N0,ButtonBase as F0,Tab as H0,Tabs as W0}from"@mui/material";import $0 from"@mui/icons-material/Checklist";import K0 from"@mui/icons-material/Face";import U0 from"@mui/icons-material/Publish";import V0 from"@mui/icons-material/NotificationsOutlined";import G0 from"@mui/icons-material/BugReportOutlined";import Y0 from"@mui/icons-material/DescriptionOutlined";import j0 from"@mui/icons-material/Inventory2Outlined";import{jsx as tt}from"react/jsx-runtime";function ou(e,o){return o>0?`${e} (${o})`:e}var sA=[{id:"my",label:"\uC804\uCCB4",icon:tt($0,{sx:{fontSize:18}})},{id:"notice",label:"\uACF5\uC9C0\uC0AC\uD56D",icon:tt(V0,{sx:{fontSize:18}})},{id:"mine",label:"\uB0B4 \uC5C5\uBB34",icon:tt(K0,{sx:{fontSize:18}})},{id:"sent",label:"\uBCF4\uB0B8 \uC5C5\uBB34",icon:tt(U0,{sx:{fontSize:18}})},{id:"bug",label:"\uC624\uB958",icon:tt(G0,{sx:{fontSize:18}})},{id:"archive",label:"\uBCF4\uAD00\uD568",icon:tt(j0,{sx:{fontSize:18}}),hideCount:!0},{id:"report",label:"\uBCF4\uACE0\uC11C",icon:tt(Y0,{sx:{fontSize:18}}),hideCount:!0}];function X0(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 cA({items:e,activeTab:o,counts:t,onChange:n,compact:r=!1}){let i=ne(),a=X0(i.tabs),l=e;return r?tt(N0,{sx:{display:"flex",flexWrap:"wrap",gap:1.25},children:l.map(d=>{let c=o===d.id;return tt(F0,{onClick:()=>n(d.id),sx:{px:1.5,py:.75,borderRadius:1,fontSize:Co(13.5),fontWeight:500,whiteSpace:"nowrap",border:"1px solid",bgcolor:c?i.tabs.selectedBg:i.tabs.bg,color:c?i.tabs.selectedColor:i.tabs.color,borderColor:c?i.tabs.selectedBg:i.tabs.borderColor},children:ou(d.label,d.hideCount?0:t[d.id]??0)},d.id)})}):tt(W0,{value:o,onChange:(d,c)=>n(c),sx:{minHeight:46,"& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:"12px",minHeight:46}},children:l.map(d=>tt(H0,{value:d.id,label:ou(d.label,d.hideCount?0:t[d.id]??0),icon:d.icon,iconPosition:"start",sx:a},d.id))})}import{useEffect as Q0,useMemo as Z0,useState as zl}from"react";import{Divider as ql,ListItemIcon as $o,Menu as Al,MenuItem as yo}from"@mui/material";import J0 from"@mui/icons-material/OpenInNewOutlined";import eS from"@mui/icons-material/Check";import oS from"@mui/icons-material/CheckCircleOutlined";import tS from"@mui/icons-material/RadioButtonUnchecked";import nS from"@mui/icons-material/SendOutlined";import rS from"@mui/icons-material/EventOutlined";import iS from"@mui/icons-material/PersonOutlineOutlined";import aS from"@mui/icons-material/ViewKanbanOutlined";import lS from"@mui/icons-material/ContentCopyOutlined";import sS from"@mui/icons-material/NextPlanOutlined";import cS from"@mui/icons-material/ContentPasteOutlined";import mS from"@mui/icons-material/ShareOutlined";import uS from"@mui/icons-material/DirectionsRunOutlined";import tu from"@mui/icons-material/ChevronRight";import dS from"@mui/icons-material/ArchiveOutlined";import pS from"@mui/icons-material/UnarchiveOutlined";import{ConfirmDialog as fS}from"@ehfuse/alerts";import{Fragment as xS,jsx as de,jsxs as xo}from"react/jsx-runtime";function NA({target:e,onClose:o,customTabs:t,sprints:n=[],myAccountSeq:r=0,onOpenDetail:i,onToggleCompleted:a,onRequestConfirm:l,onChangeDueDate:d,onChangeReminder:c,onMemberEdit:s,onMoveProject:f,onDuplicate:p,onCreateFollowUp:m,onShare:g,onAssignSprint:M,onArchiveToggle:v,onDelete:h}){let x=Oe(),B=nt(),[S,D]=zl(null),[y,w]=zl(null),[T,b]=zl(null);Q0(()=>{e||(D(null),w(null),b(null))},[e]);let I=e?.task??null,z=!!I?.is_notice,u=!!I?.is_event,k=I?!ht(I,r):!1,R=Z0(()=>new Set(t.filter(F=>F.useSprints).map(F=>F.key)),[t]),A=async()=>{let F=I;if(o(),!F)return;await fS({title:"\uC5C5\uBB34 \uC0AD\uC81C",message:`"${F.title}" \uC5C5\uBB34\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&h(F.seq)},L=()=>{I&&v(I.seq,!I.archived),o()};return xo(xS,{children:[xo(Al,{open:!!e,onClose:o,transitionDuration:0,anchorReference:x?"none":"anchorPosition",anchorPosition:!x&&e?{top:e.position.top,left:e.position.left}:void 0,slotProps:{paper:{sx:{minWidth:190,...x?{position:"fixed",top:"50%",left:"50%",translate:"-50% -50%",maxHeight:"70vh"}:{}}},list:x?{sx:{"& .MuiMenuItem-root":{py:1,minHeight:0}}}:void 0},children:[xo(yo,{onClick:()=>{I&&i(I),o()},sx:{fontSize:14},children:[de($o,{children:de(J0,{sx:{fontSize:19}})}),"\uC0C1\uC138 \uC5F4\uAE30"]}),xo(yo,{disabled:z?(I?.author_account_seq??0)!==r:(I?.author_account_seq??0)!==r&&(I?.manager_account_seq??0)!==r,onClick:()=>{I&&a(I.seq,!I.completed),o()},sx:{fontSize:14},children:[de($o,{children:I?.completed?de(tS,{sx:{fontSize:19}}):de(oS,{sx:{fontSize:19}})}),I?.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC"]}),!z&&l?xo(yo,{disabled:!(I?.manager_account_seq??0)&&(I?.receiver_account_seqs??[]).length===0,onClick:()=>{I&&l(I),o()},sx:{fontSize:14},children:[de($o,{children:de(nS,{sx:{fontSize:19}})}),"\uD655\uC778 \uC694\uCCAD"]}):null,u?null:de(ql,{}),u?null:xo(yo,{disabled:k,onClick:F=>{I&&D({anchorEl:F.currentTarget,task:I})},sx:{fontSize:14},children:[de($o,{children:de(rS,{sx:{fontSize:19}})}),"\uB9C8\uAC10\uAE30\uD55C \uBCC0\uACBD"]}),!z&&!u&&s?xo(yo,{onClick:()=>{I&&s(I,"manager"),o()},sx:{fontSize:14},children:[de($o,{children:de(iS,{sx:{fontSize:19}})}),"\uCC45\uC784\uC790 \uBCC0\uACBD"]}):null,u?null:xo(yo,{disabled:k,onClick:F=>{I&&w({anchorEl:F.currentTarget,task:I})},sx:{fontSize:14},children:[de($o,{children:de(aS,{sx:{fontSize:19}})}),"\uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9",de(tu,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}),de(ql,{}),p?xo(yo,{disabled:k,onClick:()=>{I&&p(I.seq),o()},sx:{fontSize:14},children:[de($o,{children:de(lS,{sx:{fontSize:19}})}),"\uBCF5\uC81C"]}):null,m&&I&&!I.is_event&&!I.is_notice?xo(yo,{onClick:()=>{I&&m(I.seq),o()},sx:{fontSize:14},children:[de($o,{children:de(sS,{sx:{fontSize:19}})}),"\uD6C4\uC18D \uC5C5\uBB34 \uB9CC\uB4E4\uAE30"]}):null,xo(yo,{onClick:()=>{I&&(g?g(I):nr(I,x)),o()},sx:{fontSize:14},children:[de($o,{children:x?de(mS,{sx:{fontSize:19}}):de(cS,{sx:{fontSize:19}})}),x?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC"]}),I&&!I.is_notice&&!I.is_event&&R.has(String(I.tab_key??""))&&M?xo(yo,{onClick:F=>b(F.currentTarget),sx:{fontSize:14},children:[de($o,{children:de(uS,{sx:{fontSize:19}})}),"\uBAA9\uD45C\uC5D0 \uB123\uAE30",de(tu,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}):null,xo(yo,{onClick:L,disabled:k||!I?.archived&&!(I&&Vr(I)),sx:{fontSize:14},children:[de($o,{children:I?.archived?de(pS,{sx:{fontSize:19}}):de(dS,{sx:{fontSize:19}})}),I?.archived?"\uBCF4\uAD00 \uD574\uC81C":"\uBCF4\uAD00"]}),de(ql,{}),xo(yo,{disabled:k,onClick:A,sx:{fontSize:14,color:"#e5484d"},children:[de($o,{children:de(yt,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC0AD\uC81C"]})]}),de(Kt,{anchorEl:S?.anchorEl??null,open:!!S,date:S?.task.due_date??"",reminder:S?.task.reminder??"none",hideReminder:!!S?.task.completed,centered:x,onClose:()=>{D(null),o()},onDateChange:F=>{S&&d(S.task.seq,F)},onReminderChange:F=>{S&&c?.(S.task.seq,F)}}),xo(Al,{transitionDuration:0,anchorEl:y?.anchorEl??null,open:!!y,onClose:()=>{w(null),o()},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...B,children:[de(yo,{selected:!y?.task.tab_key,onClick:()=>{y&&f(y.task.seq,""),w(null),o()},sx:{fontSize:14,minWidth:170},children:"\uC5C6\uC74C"}),t.filter(F=>!F.archived).map(F=>de(yo,{selected:y?.task.tab_key===F.key,onClick:()=>{y&&f(y.task.seq,F.key),w(null),o()},sx:{fontSize:14,minWidth:170},children:F.label},F.key))]}),de(Al,{transitionDuration:0,anchorEl:T,open:!!T,onClose:()=>b(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...n.filter(F=>`custom-${F.group_seq}`===String(I?.tab_key??"")).map(F=>({seq:F.seq,label:Fo(F)}))].map(F=>xo(yo,{onClick:()=>{I&&M?.(I.seq,F.seq),b(null),o()},sx:{fontSize:14,minWidth:160,gap:1},children:[F.label,(I?.sprint_seq??0)===F.seq?de(eS,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},F.seq))})]})}import{Checkbox as gS,Divider as hS,Menu as bS,MenuItem as nu}from"@mui/material";import{jsx as Yi,jsxs as ru}from"react/jsx-runtime";function KA({anchorEl:e,labelOptions:o,selectedKeys:t,onToggle:n,onClear:r,onClose:i}){return ru(bS,{transitionDuration:0,anchorEl:e,open:!!e,onClose:i,children:[o.map(a=>{let l=t.includes(a.key);return ru(nu,{onClick:()=>n(a.key),sx:{fontSize:14,minWidth:190,gap:1},children:[Yi(gS,{size:"small",checked:l,sx:{p:0}}),Yi(Re,{option:a})]},a.key)}),Yi(hS,{}),Yi(nu,{disabled:t.length===0,onClick:()=>{r(),i()},sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{Divider as iu,Menu as kS,MenuItem as Ll}from"@mui/material";import TS from"@mui/icons-material/Check";import yS from"@mui/icons-material/BarChartOutlined";import SS from"@mui/icons-material/SettingsOutlined";import{jsx as Nr,jsxs as ji}from"react/jsx-runtime";function ZA(e){let{anchorEl:o,sprints:t,value:n,onSelect:r,onManage:i,onCharts:a,onClose:l}=e;return ji(kS,{transitionDuration:0,anchorEl:o,open:!!o,onClose:l,children:[[{seq:0,label:"\uC804\uCCB4"},{seq:-1,label:"\uBBF8\uBC30\uC815 \uC5C5\uBB34"},...t.map(d=>({seq:d.seq,label:Fo(d)}))].map(d=>ji(Ll,{onClick:()=>{r(d.seq),l()},sx:{fontSize:14,minWidth:180,gap:1},children:[d.label,n===d.seq?Nr(TS,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},d.seq)),Nr(iu,{}),a?ji(Ll,{onClick:()=>{l(),a()},sx:{fontSize:14,gap:1},children:[Nr(yS,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uCC28\uD2B8"]}):null,a?Nr(iu,{}):null,ji(Ll,{onClick:()=>{l(),i()},sx:{fontSize:14,gap:1},children:[Nr(SS,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uAD00\uB9AC\u2026"]})]})}var BS={my:"tasks",mine:"tasks",sent:"tasks",notice:"notice",bug:"bug",archive:"archive",done:"done",report:"report"};function CS(e){return BS[e]??"tasks"}var o7={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"},au=["list","calendar","month","card","kanban","sprint","timeline"],vS=["list","card"];function t7(e){let o=CS(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:au,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:vS,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:au,showCreate:!0,createLabel:"\uC5C5\uBB34 \uB4F1\uB85D",showGroupBy:!0,showSprintFilter:!0,showDateRange:!1,showHideCompleted:!0,forceFlatList:!1,columns:e==="mine"?{showRequest:!1,confirmMode:"action"}:e==="sent"?{confirmMode:"time"}:{}}}}export{fI as ALL_TASK_VIEWER_ACCOUNT_SEQS,em as AddLabelDialog,ai as AddTabDialog,Xc as AttachmentUploadGauge,sl as AttachmentUploadPercent,ia as BUG_DEVICE_OPTIONS,fr as BUG_ICON_COLOR,Xv as BUG_KANBAN_COLUMNS,ra as BUG_REPRO_OPTIONS,aa as BUG_RESOLUTION_OPTIONS,mn as BUG_STATUS_OPTIONS,pr as BUG_TASK_ICON,wi as BugPropertiesGrid,Ef as COLUMN_WIDTHS,sa as COMPLETED_STATUS_OPTION,Cl as CUSTOM_TAB_KEY_PREFIX,Kz as CalendarImportDialog,Zz as CalendarSubscribeDialog,$t as CommentBubbleIcon,Hn as ConfirmCountButton,Is as DATE_REMINDER_OPTIONS,Zi as DEFAULT_PROJECT_ICON,sA as DEFAULT_TASKBOX_TAB_ITEMS,Me as DEFAULT_TASK_ICON,wr as DRAWER_SECTION_TITLE_FONT_SIZE,jq as DateRangeFilterPopover,Wo as DrawerSection,Kt as DueDatePickerPopover,cf as ENDED_EVENT_STATUS_OPTION,lm as EVENT_ICON_COLOR,lq as EmployeeSelectDialog,da as GROUP_BY_OPTIONS,Vn as GoogleEventChip,Aq as GroupByMenuButton,ii as IconPickerGrid,Pc as InlineAddressInput,Rt as InlineTextValue,ca as KANBAN_CLOSED_COLUMN_KEY,KA as LabelFilterMenu,Ai as LabelSelectMenu,gr as MANUAL_TASK_STATUS_OPTIONS,Dq as MemberFilterMenu,xr as NOTICE_STATUS_OPTIONS,vo as NOTICE_TASK_ICON,Xl as NO_TASK_ICON,Ji as PROJECT_ICON_OPTIONS,pe as PropertyRow,Nn as RECEIVER_AVATAR_COLORS,_s as REMINDER_OPTIONS,_o as ReceiverAvatarStack,_m as RelatedTasksSection,IS as STATUS_KEY_REPLIED,Fl as STATUS_KEY_WAITING,zs as SortableTaskCard,jm as SprintBurndownChart,Cq as SprintChartsDialog,ZA as SprintFilterMenu,Pz as SprintManageDialog,Gm as SprintVelocityChart,Xr as StatusSelectMenu,xa as TASKBOX_COLUMNS,jo as TASKBOX_DRAWER_NARROW_MQ,Ql as TASKBOX_UI_STATE_ID,o7 as TASKBOX_VIEW_LABELS,OE as TASKBOX_VIEW_MODES,cn as TASK_STATUS_OPTIONS,yx as TIME_REMINDER_OPTIONS,ci as TaskAckListPopover,Fn as TaskActionButton,Dm as TaskActivitySection,zi as TaskAttachmentsSection,Sc as TaskBoxColumnSummary,Pa as TaskBoxGroupBoard,bM as TaskBoxMobileList,uc as TaskBoxMonthAgenda,ac as TaskBoxMonthCalendar,UE as TaskBoxSprintColumnSummary,Os as TaskBoxTable,cA as TaskBoxTabs,hc as TaskBoxTimeline,ME as TaskBoxView,oc as TaskBoxWeekCalendar,yr as TaskCardContent,Mi as TaskChecklistSection,hm as TaskCommentInput,gm as TaskCommentsSection,Di as TaskContentEditor,NA as TaskContextMenu,_i as TaskCorePropertiesGrid,ul as TaskCreateBody,$R as TaskCreateDrawer,Jm as TaskDateRangeFilter,Mm as TaskDetailBody,yz as TaskDetailDrawer,Sm as TaskDetailHeader,Qn as TaskIconPickerPopover,Ht as TaskLabelChips,Ei as TaskLinkDialog,Bm as TaskNoteField,Uo as TaskPriorityChip,Re as TaskStatusChip,rI as TaskStatusChips,pu as TaskboxProvider,o0 as buildCalendarFeedUrl,ui as buildCardBaseSx,as as buildStatusOptionColors,pa as buildTaskGroupSections,hl as buildTaskRelationsModel,KT as buildTaskShareText,Kr as buildTaskboxTheme,ls as canAssignBugManager,Zr as canClaimTaskItem,ht as canEditTaskItem,Qr as canViewTaskItem,Jr as canVolunteerTaskItem,bl as countTaskRelations,kc as countWorkdays,nf as createTaskboxTheme,yc as daysLeftUntil,ea as defaultTaskBoxFormValues,oa as defaultTaskboxUiStateValues,im as filterFilesWithinLimit,L_ as formatConfirmTime,bc as formatHours,it as formatKoreanDate,Vo as formatKoreanDateTime,Fo as formatSprintOptionLabel,ns as getBugDeviceName,ts as getBugReproName,Ur as getBugResolutionName,mf as getBugStatusOption,Fq as getDefaultDateRange,hr as getEventDisplayStatusOption,Zv as getNoDueStatusRank,rm as getNoticeAckInfo,rs as getNoticeStatusOption,oR as getNoticeTargetDisplay,zn as getProjectIconAnchorComponent,Ve as getProjectIconComponent,Ca as getReminderLabel,Ba as getReminderOptions,is as getStatusOptionsForTask,t7 as getTabHeaderConfig,ha as getTaskBoxColumnDefs,ei as getTaskBoxGridTemplate,CS as getTaskBoxTabKind,mi as getTaskConfirmInfo,Io as getTaskDisplayStatusOption,Gr as getTaskStatusOption,$n as groupGoogleEventsByDate,vl as groupSeqFromTabKey,$P as hasRelation,vm as hasTaskRelations,vk as htmlToPlainText,Ny as isCustomTabKey,ua as isOpenPoolTaskItem,la as isPastEvent,Vr as isTaskDone,Qv as isWaitingTask,Vi as monthsAgoDate,uo as narrowOrderSx,Tz as nowDateTimeString,cb as parseEstimatedHours,Cn as relationsOf,An as resolveTaskStatusOptions,na as resolveTaskboxTheme,nr as shareTaskText,Tc as sumRemainingHours,Li as summarizeNoticeTargets,Cz as tabKeyFromGroupSeq,En as toYmd,Yr as toggleLabelKey,ur as useBuildFileUrl,jc as useTaskAttachmentUploadMeta,Ro as useTaskboxConfig,Zp as useTaskboxForm,ne as useTaskboxTheme,gt as useTaskboxUiState,dr as useUploadMaxMb};
|
|
14
14
|
//# sourceMappingURL=index.esm.js.map
|