@ehfuse/taskbox 0.5.101 → 0.5.102

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -4,11 +4,11 @@ var Bl="waiting",sS="replied";import{createContext as Qm,useContext as Jm,useMem
4
4
  `),t=document.createElement("div");return t.innerHTML=o,(t.textContent??"").replace(/\n{3,}/g,`
5
5
 
6
6
  `).trim()}function gi({syncKey:e,value:o,onChange:t,readOnly:n=!1,minHeight:r=180}){let i=Fa(null),a=Fa(null),l=Fa(Date.now()+800),[u,s]=ak(!1),c=Fe();return ik(()=>{if(n)return;let m=Wa(o);a.current===m||a.current===o||(a.current=m,l.current=Date.now()+800,i.current?.setHtml(m))},[e,o,n]),n?fk(Ha,{sx:{position:"relative",mt:1},children:[fn(Ha,{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:Wa(o)}}),fn(sk,{title:"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:fn(lk,{size:"small","aria-label":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>{navigator.clipboard.writeText(pk(o)).then(()=>{s(!0),window.setTimeout(()=>s(!1),1500)})},sx:{position:"absolute",top:6,right:6,color:"#9a9a97"},children:u?fn(mk,{sx:{fontSize:17,color:"#2f9e5b"}}):fn(ck,{sx:{fontSize:17}})})})]}):fn(Ha,{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:fn(uk,{ref:i,defaultValue:Wa(o),showToolbar:!c,focusBorder:!0,styles:{focusBorderColor:"var(--primary)"},toolbarOptions:dk,locale:"ko",minHeight:r,placeholder:"\uB0B4\uC6A9\uC744 \uC785\uB825\uD558\uC138\uC694",contentStyle:{padding:"12px"},onChange:m=>{let d=Date.now()<l.current,p=m===a.current;a.current=m,!(d||p)&&t(m)}})})}import{useState as hi}from"react";import{Box as ko,Button as _c,Dialog as xk,IconButton as hr,TextField as gk,Tooltip as hk}from"@mui/material";import wc from"@mui/icons-material/Close";import bk from"@mui/icons-material/AddCircle";import Dc from"@mui/icons-material/AddTask";import kk from"@mui/icons-material/Checklist";import Tk from"@mui/icons-material/CheckCircle";import yk from"@mui/icons-material/Launch";import Sk from"@mui/icons-material/RadioButtonUnchecked";import{Fragment as Bk,jsx as ve,jsxs as Yt}from"react/jsx-runtime";function bi({taskSeq:e,checklist:o,onAdd:t,onToggle:n,onRemove:r,onUpdate:i,removeLocked:a=!1,onConvertToTask:l,onOpenLinkedTask:u,resolveLinkedTask:s}){let[c,m]=hi(""),[d,p]=hi(null),x=Fe(),[M,T]=hi(null),[g,f]=hi(null),C=y=>{let _=y.task_seq?s?.(y.task_seq):void 0;return _?_.completed:y.checked},v=o.filter(C).length,R=()=>{c.trim()&&(t(e,c),m(""))};return Yt(Ao,{icon:ve(kk,{sx:{fontSize:19,display:"block"}}),title:Yt(Bk,{children:["\uD560\uC77C",o.length>0?Yt(ko,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:[v," / ",o.length]}):null]}),titleExtra:o.length>0?ve(ko,{sx:{flex:1,minWidth:0,ml:1,height:6,borderRadius:3,bgcolor:"#ececea"},children:ve(ko,{sx:{height:"100%",borderRadius:3,width:`${Math.round(v/o.length*100)}%`,bgcolor:"#2f80ed",transition:"width 0.2s"}})}):null,children:[ve(ko,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:o.map((y,_)=>{let k=y.task_seq?s?.(y.task_seq):void 0,S=C(y),w=!!y.task_seq;return Yt(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:[ve(ko,{component:"span",onClick:()=>n(e,_,!S),sx:{display:"inline-flex",flexShrink:0,cursor:"pointer"},children:S?ve(Tk,{sx:{fontSize:18,color:"#2f80ed"}}):ve(Sk,{sx:{fontSize:18,color:"#9a9a97"}})}),d?.index===_?ve(ko,{component:"input",autoFocus:!0,spellCheck:!1,value:d.label,enterKeyHint:"done",onChange:K=>p({index:_,label:K.target.value}),onBlur:()=>{d.label.trim()&&d.label.trim()!==y.label&&i?.(e,_,d.label),p(null)},onKeyDown:K=>{K.key==="Enter"&&K.target.blur(),K.key==="Escape"&&p(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",p:0}}):ve(ko,{component:"span",onClick:w?y.task_seq&&u?()=>u(y.task_seq):void 0:a||!i?void 0:x?()=>T({index:_,label:y.label}):()=>p({index:_,label:y.label}),sx:{flex:1,minWidth:0,fontSize:14.5,color:"#37352f",textDecoration:S?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...w?u?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}:a||!i?{}:{cursor:"text"}},children:y.label}),w?Yt(ko,{component:"span",onClick:y.task_seq&&u?()=>u(y.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",...u?{cursor:"pointer"}:{}},children:[ve(yk,{sx:{fontSize:12}}),k?.manager_name?.trim()||"\uC5C5\uBB34"]}):null,!a&&!w&&l?ve(hk,{title:"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",arrow:!0,enterDelay:300,disableInteractive:!0,children:ve(hr,{className:"taskbox-checklist-convert",size:"small","aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:K=>f({anchorEl:K.currentTarget,index:_,label:y.label}),sx:{display:x?"none":"inline-flex",opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:ve(Dc,{sx:{fontSize:16}})})}):null,a?null:ve(hr,{className:"taskbox-checklist-remove",size:"small","aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>r(e,_),sx:{display:x?"none":"inline-flex",opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:ve(wc,{sx:{fontSize:15}})})]},`${y.label}-${_}`)})}),Yt(ko,{sx:{mt:.5,ml:3.25,display:"flex",alignItems:"center",gap:.5},children:[ve(ko,{component:"input",spellCheck:!1,value:c,placeholder:"+ \uD560\uC77C \uCD94\uAC00",enterKeyHint:"done",onChange:y=>m(y.target.value),onKeyDown:y=>{y.key==="Enter"&&R()},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"}}}),ve(hr,{size:"small","aria-label":"\uD560\uC77C \uCD94\uAC00",disabled:!c.trim(),onMouseDown:y=>y.preventDefault(),onClick:R,sx:{flexShrink:0,color:c.trim()?"#2f80ed":"#c9c8c5"},children:ve(bk,{sx:{fontSize:20}})})]}),ve(je,{open:!!g,anchorEl:g?.anchorEl??null,title:"\uC774 \uD560\uC77C\uC744 \uBCC4\uB3C4 \uC5C5\uBB34\uB85C \uB9CC\uB4DC\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uB9CC\uB4E4\uAE30",onCancel:()=>f(null),onConfirm:()=>{g&&l?.(e,g.index,g.label),f(null)}}),ve(xk,{open:!!M,onClose:()=>T(null),maxWidth:"xs",fullWidth:!0,slotProps:{paper:{sx:{borderRadius:2,m:2}}},children:Yt(ko,{sx:{p:2,display:"flex",flexDirection:"column",gap:1.5},children:[ve(ko,{sx:{fontSize:15.5,fontWeight:600,color:"#37352f"},children:"\uD560\uC77C \uC218\uC815"}),ve(gk,{autoFocus:!0,fullWidth:!0,size:"medium",value:M?.label??"",onChange:y=>T(_=>_&&{..._,label:y.target.value}),onKeyDown:y=>{if(y.key!=="Enter")return;let _=M;_&&_.label.trim()&&i?.(e,_.index,_.label.trim()),T(null)}}),Yt(ko,{sx:{display:"flex",alignItems:"center",gap:1},children:[!a&&l&&M&&!o[M.index]?.task_seq?ve(hr,{"aria-label":"\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30",onClick:()=>{l(e,M.index,o[M.index]?.label??""),T(null)},sx:{color:"#57564f"},children:ve(Dc,{sx:{fontSize:20}})}):null,!a&&M?ve(hr,{"aria-label":"\uD560\uC77C \uC0AD\uC81C",onClick:()=>{r(e,M.index),T(null)},sx:{color:"#e5484d"},children:ve(wc,{sx:{fontSize:19}})}):null,ve(ko,{sx:{flex:1}}),ve(_c,{color:"inherit",onClick:()=>T(null),children:"\uCDE8\uC18C"}),ve(_c,{variant:"contained",disabled:!M?.label.trim(),onClick:()=>{M&&M.label.trim()&&i?.(e,M.index,M.label.trim()),T(null)},children:"\uD655\uC778"})]})]})})]})}import{useRef as Dk,useState as Mk}from"react";import{Box as st,IconButton as Ek}from"@mui/material";import Ok from"@mui/icons-material/Close";import Pc from"@mui/icons-material/AttachFileOutlined";var Ck=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"]),Mc=e=>{let o=e?.split(".").pop()?.toLowerCase()??"";return Ck.has(o)};import{LinearProgress as vk}from"@mui/material";import{Fragment as Ik,jsx as wk,jsxs as _k}from"react/jsx-runtime";function Ec(e){let o=ft(),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 $a(){let o=ft().useValue("attachmentUpload.progress");return _k(Ik,{children:[o??0,"%"]})}function Oc(){let o=ft().useValue("attachmentUpload.progress");return wk(vk,{variant:"determinate",value:o??0,sx:{height:4,borderRadius:2,bgcolor:"#dbe9fb",mt:.75}})}import{Fragment as Pk,jsx as Io,jsxs as br}from"react/jsx-runtime";function ki(e){return e>=1048576?`${(e/1048576).toFixed(1)}MB`:`${Math.max(1,Math.round(e/1024))}KB`}var Ti={flex:1,minWidth:0,fontSize:13.5,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"};function yi({taskSeq:e,attachments:o,onAdd:t,onRemove:n,removeLocked:r=!1,onPreview:i,onDownload:a}){let[l,u]=Mk(!1),s=Dk(null),c=Fe(),m=or(),d=Ri(),p=Ec(e),x=e===0,M=v=>{if(i){i(v);return}window.open(d(v.uuid??""),"_blank","noopener,noreferrer")},T=v=>{if(a){a(v);return}window.open(d(v.uuid??"",{download:!0}),"_blank","noopener,noreferrer")},g=v=>p?v+1<p.index?"done":v+1===p.index?"uploading":"waiting":"waiting",f=(v,R,y,_={})=>br(st,{sx:{px:1,py:.5,borderRadius:1,border:"1px solid",borderColor:_.uploading?"#d5e6fb":"#e6e6e3",bgcolor:_.uploading?"#f4f9ff":"transparent","&:hover .taskbox-file-remove":{opacity:1}},children:[br(st,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[Io(Pc,{sx:{fontSize:16,color:"#9a9a97"}}),R,Io(st,{component:"span",sx:{fontSize:12,color:_.uploading?"#2f80ed":"#9a9a97",flexShrink:0},children:y}),_.removeIndex!==void 0?Io(Ek,{className:"taskbox-file-remove",size:"small","aria-label":"\uCCA8\uBD80 \uC0AD\uC81C",onClick:()=>n(e,_.removeIndex),sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:Io(Ok,{sx:{fontSize:15}})}):null]}),_.uploading?Io(Oc,{}):null]},v),C=v=>{let R=Mc(v.name);return Io(st,{component:"button",type:"button",onClick:()=>R?M(v):T(v),title:`${v.name} ${R?"\uBBF8\uB9AC\uBCF4\uAE30":"\uB2E4\uC6B4\uB85C\uB4DC"}`,sx:{...Ti,color:"#37352f",textAlign:"left",p:0,border:"none",background:"none",font:"inherit",fontSize:13.5,cursor:"pointer","&:hover":{textDecoration:"underline",color:"#2f80ed"}},children:v.name})};return br(Ao,{icon:Io(Pc,{sx:{fontSize:18,display:"block"}}),title:br(Pk,{children:["\uD30C\uC77C ",o.length>0?o.length:""]}),children:[br(st,{sx:{display:"flex",flexDirection:"column",gap:.5,mt:1},children:[o.map((v,R)=>{let y=`${v.uuid||v.name}-${R}`;if(x){let _=g(R),k=_==="uploading";return f(y,Io(st,{component:"span",sx:{...Ti,color:_==="done"?"#37352f":"#9a9a97"},children:v.name}),k?Io($a,{}):ki(v.size),{uploading:k,removeIndex:!r&&!p?R:void 0})}return v.uuid?f(y,C(v),ki(v.size),{removeIndex:r?void 0:R}):f(y,Io(st,{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:{...Ti,color:"#9a9a97"},children:v.name}),ki(v.size),{removeIndex:r?void 0:R})}),!x&&p?p.queue.slice(p.index-1).map((v,R)=>{let y=R===0;return f(`uploading-${p.index+R}-${v.name}`,Io(st,{component:"span",sx:{...Ti,color:"#9a9a97"},children:v.name}),y?Io($a,{}):ki(v.size),{uploading:y})}):null]}),Io(st,{onClick:()=>s.current?.click(),onDragOver:v=>{v.preventDefault(),u(!0)},onDragLeave:()=>u(!1),onDrop:v=>{v.preventDefault(),u(!1);let R=Array.from(v.dataTransfer.files);R.length>0&&t(e,R)},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:c?`\uD30C\uC77C\uC744 \uCCA8\uBD80\uD558\uC138\uC694 (\uCD5C\uB300 ${m}MB)`:`\uD30C\uC77C\uC744 \uB04C\uC5B4\uB2E4 \uB193\uAC70\uB098 \uD074\uB9AD\uD574 \uCCA8\uBD80\uD558\uC138\uC694 (\uCD5C\uB300 ${m}MB)`}),Io(st,{component:"input",ref:s,type:"file",multiple:!0,onChange:v=>{let R=Array.from(v.target.files??[]);R.length>0&&t(e,R),v.target.value=""},sx:{display:"none"}})]})}import{useState as Fk}from"react";import{Checkbox as Hk,Divider as Wk,ListItemIcon as $k,Menu as Kk,MenuItem as Ac}from"@mui/material";import Uk from"@mui/icons-material/Add";import{useEffect as Rk,useState as Rc}from"react";import{Box as Ka,Button as zk}from"@mui/material";import{FormDialog as qk}from"@ehfuse/mui-form-dialog";import{ClearTextField as Ak}from"@ehfuse/mui-form-controls";import{ColorPicker as Lk}from"@ehfuse/mui-color-picker";import{ErrorAlert as Nk}from"@ehfuse/alerts";import{jsx as kr,jsxs as Ua}from"react/jsx-runtime";var zc="#2f80ed";function qc({open:e,onClose:o,onSubmit:t}){let[n,r]=Rc(""),[i,a]=Rc(zc);Rk(()=>{e&&(r(""),a(zc))},[e]);let l=()=>{let c=n.trim();if(!c){Nk("\uB77C\uBCA8 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}t(c,i),o()},u=$l(i),s=Ua(Ka,{children:[Ua(Ka,{sx:{display:"flex",alignItems:"center",gap:1.5,mt:.5},children:[kr(Ak,{label:"\uB77C\uBCA8 \uC774\uB984",value:n,onChange:c=>r(c.target.value),onKeyDown:c=>{c.key==="Enter"&&(c.preventDefault(),l())},fullWidth:!0,autoFocus:!0}),kr(Lk,{value:i,onChange:c=>a(c),shape:"circle",colorSize:28})]}),Ua(Ka,{sx:{mt:2,display:"flex",alignItems:"center",gap:1,fontSize:13,color:"#787774"},children:["\uBBF8\uB9AC\uBCF4\uAE30",kr(Pe,{option:{key:"__preview__",name:n.trim()||"\uB77C\uBCA8",...u}})]})]});return kr(qk,{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:s}],actions:{showCancelButton:!0,right:kr(zk,{variant:"contained",onClick:l,children:"\uCD94\uAC00"})}})}import{Fragment as Vk,jsx as $n,jsxs as Si}from"react/jsx-runtime";function Bi({anchorEl:e,selectedKeys:o,labelOptions:t,onToggle:n,onAddLabel:r,onClose:i}){let[a,l]=Fk(!1),u=ot();return Si(Vk,{children:[Si(Kk,{anchorEl:e,open:!!e,onClose:i,transitionDuration:0,...u,children:[t.map(s=>{let c=o.includes(s.key);return Si(Ac,{onClick:()=>n(s.key),sx:{fontSize:14,minWidth:170,gap:1},children:[$n(Hk,{size:"small",checked:c,sx:{p:0}}),$n(Pe,{option:s})]},s.key)}),$n(Wk,{}),Si(Ac,{onClick:()=>l(!0),sx:{fontSize:14,color:"#787774"},children:[$n($k,{children:$n(Uk,{sx:{fontSize:18,color:"#787774"}})}),"\uB77C\uBCA8 \uCD94\uAC00"]})]}),$n(qc,{open:a,onClose:()=>l(!1),onSubmit:r})]})}function Lc(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 Nc(e,o){let t=(e.target_account_seqs??[]).filter(m=>m>0);if(t.length===0)return null;let n=new Set(t),r=Lc(e,o),i=new Map;for(let m of r){let d=String(m.department??"").trim();if(!d)continue;let p=i.get(d)??[];p.push(m),i.set(d,p)}let a=[],l=new Set;for(let[m,d]of i)if(d.every(x=>n.has(Number(x.account_seq??0)))){a.push(m);for(let x of d)l.add(Number(x.account_seq??0))}let u=new Map(r.map(m=>[Number(m.account_seq??0),m.name])),s=e.target_names??[],c=[];return t.forEach((m,d)=>{l.has(m)||c.push(u.get(m)??s[d]??"\uC774\uB984\uC5C6\uC74C")}),{teamNames:a,individualNames:c}}function Ci(e,o){let t=Nc(e,o);return t?[...t.teamNames,...t.individualNames].join(", "):"\uBAA8\uB4E0 \uC9C1\uC6D0"}function y5(e,o){let t=Nc(e,o);return t?{kind:"members",teamNames:t.teamNames,individualNames:t.individualNames}:{kind:"everyone"}}function Fc(e,o,t){let n=(e.target_account_seqs??[]).filter(c=>c>0),r=Lc(e,o),i=n.length>0?n.length:r.length,a=e.acks??[],l=t>0&&a.some(c=>c.account_seq===t),u=t>0&&Number(e.author_account_seq??0)===t,s=n.length===0||n.includes(t);return{count:a.length,total:i,acked:l,canAck:t>0&&!u&&s&&!l&&!e.completed}}function Hc(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
- \uC81C\uC678\uB41C \uD30C\uC77C: ${r.map(l=>l.name).join(", ")}`:null;return{accepted:i,rejected:r,message:a}}import{Fragment as vi,jsx as ye,jsxs as Sr}from"react/jsx-runtime";var $c="#0f9d58";function Va({form:e,statusOptions:o,customTabs:t,sprints:n=[],avatarSrcByName:r,isNotice:i=!1,hideProject:a=!1,hideBug:l=!1,leadingRow:u,hideLabel:s=!1,employees:c=[],myAccountSeq:m=0,onMemberEdit:d,onAddProject:p,onAddLabelOption:x,contentSyncKey:M="create"}){let T=ft(),g=or(),f=e.useFormValue("manager_name"),C=e.useFormValue("receiver_names"),v=e.useFormValue("start_date"),R=!!e.useFormValue("is_event"),y=!!e.useFormValue("is_bug"),_=e.useFormValue("bug_repro")??"",k=e.useFormValue("bug_device")??"",S=e.useFormValue("bug_where")??"",w=e.useFormValue("bug_version")??"",K=e.useFormValue("event_time")??"",h=e.useFormValue("event_place")??"",b=e.useFormValue("event_address")??"",A=e.useFormValue("due_date"),L=e.useFormValue("estimated_time")??"",F=e.useFormValue("reminder"),q=e.useFormValue("priority"),re=e.useFormValue("content"),de=e.useFormValue("checklist")??[],ie=e.useFormValue("tab_key"),be=e.useFormValue("sprint_seq")??0,ee=e.useFormValue("story_points")??0,ae=t.find(O=>O.key===ie&&O.useSprints),ke=ae?n.filter(O=>`custom-${O.group_seq}`===ie):[],[fe,ze]=Wc(null),H=e.useFormValue("label_keys"),[N,J]=Wc(null),B=e.useFormValue("target_names"),D=e.useFormValue("target_account_seqs"),oe=T.useValue("createAttachmentFiles")??[],Se=i?Ci({author_account_seq:m,target_names:B,target_account_seqs:D},c):"";return Sr(vi,{children:[u,i?null:ye(Tr,{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(O=>{let pe=y?"bug":R?"event":"task",Te=pe===O.value;return ye(Gk,{onClick:()=>{if(pe===O.value)return;e.setFormValue("is_event",O.value==="event"),e.setFormValue("is_bug",O.value==="bug"),e.setFormValue("is_open",O.value==="bug");let ce=e.getFormValue("icon"),U=e.getFormValue("icon_color"),Be=[Oe,"event",tr].includes(ce),$=!U||U===$c||U===nr;Be&&e.setFormValue("icon",O.value==="event"?"event":O.value==="bug"?tr:Oe),$&&e.setFormValue("icon_color",O.value==="event"?$c:O.value==="bug"?nr:"")},sx:{px:1.75,py:.75,borderRadius:99,fontSize:13.5,fontWeight:Te?600:400,color:Te?"#ffffff":"#787774",bgcolor:Te?"#2563eb":"#f4f4f2"},children:O.label},O.label)})}),ye(yr,{sx:{borderColor:"#e6e6e3"}}),Sr(Tr,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:.25},children:[ye(fi,{hideProject:a,showEstimatedTime:!R,values:{tabKey:ie,managerName:f,receiverNames:C,startDate:v,dueDate:A,reminder:F,priority:q,estimatedTime:L,eventTime:K,eventPlace:h,eventAddress:b},onChangeEstimatedTime:O=>e.setFormValue("estimated_time",O),customTabs:t,avatarSrcByName:r,notice:i,event:R,onChangeEventTime:O=>e.setFormValue("event_time",O),onChangeEventPlace:O=>e.setFormValue("event_place",O),onChangeEventAddress:O=>e.setFormValue("event_address",O),targetSummary:Se,onChangeProject:O=>e.setFormValue("tab_key",O),onAddProject:p,onChangeStartDate:O=>e.setFormValue("start_date",O),onChangeDueDate:O=>e.setFormValue("due_date",O),onChangeReminder:O=>e.setFormValue("reminder",O),onChangePriority:O=>e.setFormValue("priority",O),onMemberEdit:d,trailing:Sr(vi,{children:[ae&&!R&&!i?Sr(vi,{children:[ye(ue,{icon:ye(Zk,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:O=>ze(O),children:be>0?ke.find(O=>O.seq===be)?.name??"\uC0AD\uC81C\uB41C \uBAA9\uD45C":ye(Tr,{component:"span",sx:{color:"#9a9a97"},children:"\uBBF8\uBC30\uC815"})}),ye(ue,{icon:ye(eT,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",children:ye(Ot,{value:ee>0?String(ee):"",placeholder:"\uBBF8\uCD94\uC815",onCommit:O=>e.setFormValue("story_points",Number(O.replace(/[^0-9.]/g,""))||0)})})]}):null,y?ye(xi,{values:{repro:_,device:k,where:S,version:w},onChangeRepro:O=>e.setFormValue("bug_repro",O),onChangeDevice:O=>e.setFormValue("bug_device",O),onChangeWhere:O=>e.setFormValue("bug_where",O),onChangeVersion:O=>e.setFormValue("bug_version",O)}):null]}),leading:R||s?null:ye(Tr,{sx:{gridColumn:"1 / -1"},children:ye(ue,{icon:ye(Jk,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:O=>J(O),children:(H??[]).length>0?ye(At,{labelKeys:H??[],labelOptions:o}):ye(Tr,{component:"span",sx:{color:"#9a9a97"},children:"\uBE44\uC5B4 \uC788\uC74C"})})})}),ye(yr,{sx:{my:1.5,borderColor:"#e6e6e3"}}),ye(Ao,{icon:ye(Xk,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",children:ye(gi,{syncKey:M,value:re,onChange:O=>e.setFormValue("content",O)})}),R?null:ye(yr,{sx:{my:1.5,borderColor:"#e6e6e3"}}),R?null:ye(bi,{taskSeq:0,checklist:de,onAdd:(O,pe)=>e.setFormValue("checklist",[...de,{label:pe,checked:!1}]),onToggle:(O,pe,Te)=>e.setFormValue("checklist",de.map((ce,U)=>U===pe?{...ce,checked:Te}:ce)),onRemove:(O,pe)=>e.setFormValue("checklist",de.filter((Te,ce)=>ce!==pe)),onUpdate:(O,pe,Te)=>e.setFormValue("checklist",de.map((ce,U)=>U===pe?{...ce,label:Te}:ce))}),ye(yr,{sx:{my:1.5,borderColor:"#e6e6e3"}}),ye(yi,{taskSeq:0,attachments:oe.map(O=>({name:O.name,size:O.size})),onAdd:(O,pe)=>{let Te=Hc(pe,g);Te.message&&tT(Te.message),Te.accepted.length!==0&&T.setValue("createAttachmentFiles",[...T.getValue("createAttachmentFiles")??[],...Te.accepted])},onRemove:(O,pe)=>T.setValue("createAttachmentFiles",oe.filter((Te,ce)=>ce!==pe))}),y?null:Sr(vi,{children:[ye(yr,{sx:{my:1.5,borderColor:"#e6e6e3"}}),ye(Ao,{icon:ye(Qk,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:ye(oT,{form:e,name:"note",placeholder:"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",sx:{mt:1}})})]})]}),ye(Yk,{transitionDuration:0,anchorEl:fe,open:!!fe,onClose:()=>ze(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...ke.map(O=>({seq:O.seq,label:zo(O)}))].map(O=>ye(jk,{onClick:()=>{e.setFormValue("sprint_seq",O.seq),ze(null)},sx:{fontSize:14,minWidth:170},children:O.label},O.seq))}),ye(Bi,{anchorEl:N,selectedKeys:H??[],labelOptions:o,onToggle:O=>e.setFormValue("label_keys",zr(H??[],O)),onAddLabel:(O,pe)=>x?.(O,pe),onClose:()=>J(null)})]})}import{Fragment as Gc,jsx as Ve,jsxs as Kn}from"react/jsx-runtime";function mP({open:e,onClose:o,...t}){let{form:n,presetDueDate:r="",presetTabKey:i="",presetManager:a=null,isNotice:l=!1,defaultBug:u=!1}=t,s=ft(),c=rT(!1),[m,d]=Kc(0),[p,x]=Kc(null),M=n.useFormValue("title"),T=n.useFormValue("icon"),g=n.useFormValue("icon_color"),f=!!n.useFormValue("is_event"),C=!!n.useFormValue("is_bug"),v=Fe(),y=s.useValue("createSubmitting")??!1,_=vn(T||Oe),k=l?"\uACF5\uC9C0 \uB4F1\uB85D":f?"\uC77C\uC815 \uB4F1\uB85D":C?"\uC624\uB958 \uB4F1\uB85D":"\uC5C5\uBB34 \uB4F1\uB85D",S=l?"\uACF5\uC9C0 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694":f?"\uC77C\uC815 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694":C?"\uC5B4\uB5A4 \uC624\uB958\uC778\uC9C0 \uD55C \uC904\uB85C \uC801\uC5B4\uC8FC\uC138\uC694":"\uC5C5\uBB34 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694";nT(()=>{let h=c.current;c.current=e,!(!e||h)&&(n.setFormValues({...n.getFormValues(),title:"",icon:l?So:u?tr:Oe,icon_color:l?"#e5484d":u?nr:"",manager_name:a?.name??"",manager_account_seq:a?.accountSeq??0,receiver_names:[],receiver_account_seqs:[],is_notice:l,is_event:!1,is_bug:u,is_open:u,bug_repro:"",bug_device:"",bug_where:"",bug_version:"",event_time:"",event_place:"",event_address:"",target_names:[],target_account_seqs:[],start_date:We(new Date),due_date:r,reminder:"none",priority:"medium",note:"",content:"",checklist:[],tab_key:i}),s.setValue("createAttachmentFiles",[]),d(b=>b+1))},[e]);let w=Kn(jt,{sx:{display:"flex",alignItems:"center",gap:1,px:2,pt:2,pb:1},children:[Ve(Ga,{size:"small","aria-label":"\uC544\uC774\uCF58 \uBCC0\uACBD",onClick:h=>x(h.currentTarget),sx:{p:0,color:g||"#1e3a8a"},children:Ve(_,{sx:{fontSize:20}})}),Ve(jt,{component:"input",autoFocus:!0,spellCheck:!1,value:M,placeholder:S,onChange:h=>n.setFormValue("title",h.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}}})]}),K=Ve(Wn,{anchorEl:p,value:T,color:g||"#1e3a8a",onSelect:h=>n.setFormValue("icon",h),onSelectColor:h=>n.setFormValue("icon_color",h),onClose:()=>x(null)});return v?Kn(Gc,{children:[Ve(mT,{open:e,onClose:o,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:k,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1},custom:[{icon:Ve(sT,{sx:{ml:2,color:y?"#c9c8c5":"#2f9e5b"}}),tooltip:y?"\uB4F1\uB85D \uC911\u2026":"\uB4F1\uB85D",onClick:y?void 0:n.submit}]},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:Ve(jt,{sx:{width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:Ve(Va,{...t,contentSyncKey:`create-${m}`,leadingRow:w})})}]}),K]}):Kn(Gc,{children:[Ve(iT,{anchor:"right",open:e,onClose:o,sx:{zIndex:h=>h.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:Kn(jt,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[Kn(jt,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[Ve(aT,{title:"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,children:Ve(Ga,{size:"small",onClick:h=>x(h.currentTarget),sx:{color:g||"#1e3a8a"},children:Ve(_,{sx:{fontSize:20}})})}),Ve(jt,{component:"input",autoFocus:!0,spellCheck:!1,value:M,placeholder:S,onChange:h=>n.setFormValue("title",h.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}}}),Ve(Ga,{"aria-label":"\uB2EB\uAE30",onClick:o,sx:{color:"#6b7280"},children:Ve(lT,{})})]}),Ve(Vc,{sx:{borderColor:"#e6e6e3"}}),Ve(jt,{sx:{flex:1,minHeight:0},children:Ve(cT,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:Ve(Va,{...t,contentSyncKey:`create-${m}`})})}),Ve(Vc,{sx:{borderColor:"#e6e6e3"}}),Kn(jt,{sx:{display:"flex",justifyContent:"flex-end",gap:1,px:2,py:1.5,flexShrink:0},children:[Ve(Uc,{onClick:o,color:"inherit",disabled:y,children:"\uCDE8\uC18C"}),Ve(Uc,{onClick:n.submit,variant:"contained",disabled:y,children:y?"\uB4F1\uB85D \uC911\u2026":"\uB4F1\uB85D"})]})]})}),K]})}import{useEffect as hm,useRef as bm,useState as fy}from"react";import{Box as wi,Divider as km,Drawer as xy}from"@mui/material";import gy from"@mui/icons-material/CheckCircle";import hy from"@mui/icons-material/ShareOutlined";import by from"@ehfuse/overlay-scrollbar";import{FormDialog as ky}from"@ehfuse/mui-form-dialog";import{SuccessAlert as Tm}from"@ehfuse/alerts";import{useRef as Yc,useState as ja}from"react";import{Box as Ie,Button as jc,Chip as Zc,IconButton as xn,Tooltip as uT}from"@mui/material";import Xc from"@mui/icons-material/Send";import{TextField as dT}from"@ehfuse/mui-form-controls";import pT from"@mui/icons-material/Close";import fT from"@mui/icons-material/EditOutlined";import xT from"@mui/icons-material/Favorite";import gT from"@mui/icons-material/FavoriteBorderOutlined";import hT from"@mui/icons-material/CheckCircle";import bT from"@mui/icons-material/CheckCircleOutlineOutlined";import Xa from"@mui/icons-material/AttachFileOutlined";import kT from"@mui/icons-material/ImageOutlined";var Ya=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 Jc,jsx as te,jsxs as po}from"react/jsx-runtime";function Qc({kind:e,reactions:o,myAccountSeq:t,onToggle:n}){let r=o??[],i=t>0&&r.some(s=>s.account_seq===t),a=e==="like"?"\uC88B\uC544\uC694":"\uD655\uC778",l=r.length===0?a:te(Ie,{sx:{whiteSpace:"pre-line",fontSize:12},children:r.map(s=>`${s.name} \xB7 ${s.time}`).join(`
7
+ \uC81C\uC678\uB41C \uD30C\uC77C: ${r.map(l=>l.name).join(", ")}`:null;return{accepted:i,rejected:r,message:a}}import{Fragment as vi,jsx as ye,jsxs as Sr}from"react/jsx-runtime";var $c="#0f9d58";function Va({form:e,statusOptions:o,customTabs:t,sprints:n=[],avatarSrcByName:r,isNotice:i=!1,hideProject:a=!1,hideBug:l=!1,leadingRow:u,hideLabel:s=!1,employees:c=[],myAccountSeq:m=0,onMemberEdit:d,onAddProject:p,onAddLabelOption:x,contentSyncKey:M="create"}){let T=ft(),g=or(),f=e.useFormValue("manager_name"),C=e.useFormValue("receiver_names"),v=e.useFormValue("start_date"),R=!!e.useFormValue("is_event"),y=!!e.useFormValue("is_bug"),_=e.useFormValue("bug_repro")??"",k=e.useFormValue("bug_device")??"",S=e.useFormValue("bug_where")??"",w=e.useFormValue("bug_version")??"",K=e.useFormValue("event_time")??"",h=e.useFormValue("event_place")??"",b=e.useFormValue("event_address")??"",A=e.useFormValue("due_date"),L=e.useFormValue("estimated_time")??"",F=e.useFormValue("reminder"),q=e.useFormValue("priority"),re=e.useFormValue("content"),de=e.useFormValue("checklist")??[],ie=e.useFormValue("tab_key"),be=e.useFormValue("sprint_seq")??0,ee=e.useFormValue("story_points")??0,ae=t.find(O=>O.key===ie&&O.useSprints),ke=ae?n.filter(O=>`custom-${O.group_seq}`===ie):[],[fe,ze]=Wc(null),H=e.useFormValue("label_keys"),[N,J]=Wc(null),B=e.useFormValue("target_names"),D=e.useFormValue("target_account_seqs"),oe=T.useValue("createAttachmentFiles")??[],Se=i?Ci({author_account_seq:m,target_names:B,target_account_seqs:D},c):"";return Sr(vi,{children:[u,i?null:ye(Tr,{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(O=>{let pe=y?"bug":R?"event":"task",Te=pe===O.value;return ye(Gk,{onClick:()=>{if(pe===O.value)return;e.setFormValue("is_event",O.value==="event"),e.setFormValue("is_bug",O.value==="bug"),e.setFormValue("is_open",O.value==="bug");let ce=e.getFormValue("icon"),U=e.getFormValue("icon_color"),Be=[Oe,"event",tr].includes(ce),$=!U||U===$c||U===nr;Be&&e.setFormValue("icon",O.value==="event"?"event":O.value==="bug"?tr:Oe),$&&e.setFormValue("icon_color",O.value==="event"?$c:O.value==="bug"?nr:"")},sx:{px:1.75,py:.75,borderRadius:99,fontSize:13.5,fontWeight:Te?600:400,color:Te?"#ffffff":"#787774",bgcolor:Te?"#2563eb":"#f4f4f2"},children:O.label},O.label)})}),ye(yr,{sx:{borderColor:"#e6e6e3"}}),Sr(Tr,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:.25},children:[ye(fi,{hideProject:a,showEstimatedTime:!R,values:{tabKey:ie,managerName:f,receiverNames:C,startDate:v,dueDate:A,reminder:F,priority:q,estimatedTime:L,eventTime:K,eventPlace:h,eventAddress:b},onChangeEstimatedTime:O=>e.setFormValue("estimated_time",O),customTabs:t,avatarSrcByName:r,notice:i,event:R,onChangeEventTime:O=>e.setFormValue("event_time",O),onChangeEventPlace:O=>e.setFormValue("event_place",O),onChangeEventAddress:O=>e.setFormValue("event_address",O),targetSummary:Se,onChangeProject:O=>e.setFormValue("tab_key",O),onAddProject:p,onChangeStartDate:O=>e.setFormValue("start_date",O),onChangeDueDate:O=>e.setFormValue("due_date",O),onChangeReminder:O=>e.setFormValue("reminder",O),onChangePriority:O=>e.setFormValue("priority",O),onMemberEdit:d,trailing:Sr(vi,{children:[ae&&!R&&!i?Sr(vi,{children:[ye(ue,{icon:ye(Zk,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:O=>ze(O),children:be>0?ke.find(O=>O.seq===be)?.name??"\uC0AD\uC81C\uB41C \uBAA9\uD45C":ye(Tr,{component:"span",sx:{color:"#9a9a97"},children:"\uBBF8\uBC30\uC815"})}),ye(ue,{icon:ye(eT,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",children:ye(Ot,{value:ee>0?String(ee):"",placeholder:"\uBBF8\uCD94\uC815",onCommit:O=>e.setFormValue("story_points",Number(O.replace(/[^0-9.]/g,""))||0)})})]}):null,y?ye(xi,{values:{repro:_,device:k,where:S,version:w},onChangeRepro:O=>e.setFormValue("bug_repro",O),onChangeDevice:O=>e.setFormValue("bug_device",O),onChangeWhere:O=>e.setFormValue("bug_where",O),onChangeVersion:O=>e.setFormValue("bug_version",O)}):null]}),leading:R||s?null:ye(Tr,{sx:{gridColumn:"1 / -1"},children:ye(ue,{icon:ye(Jk,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:O=>J(O),children:(H??[]).length>0?ye(At,{labelKeys:H??[],labelOptions:o}):ye(Tr,{component:"span",sx:{color:"#9a9a97"},children:"\uBE44\uC5B4 \uC788\uC74C"})})})}),ye(yr,{sx:{my:1.5,borderColor:"#e6e6e3"}}),ye(Ao,{icon:ye(Xk,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",children:ye(gi,{syncKey:M,value:re,onChange:O=>e.setFormValue("content",O)})}),R?null:ye(yr,{sx:{my:1.5,borderColor:"#e6e6e3"}}),R?null:ye(bi,{taskSeq:0,checklist:de,onAdd:(O,pe)=>e.setFormValue("checklist",[...de,{label:pe,checked:!1}]),onToggle:(O,pe,Te)=>e.setFormValue("checklist",de.map((ce,U)=>U===pe?{...ce,checked:Te}:ce)),onRemove:(O,pe)=>e.setFormValue("checklist",de.filter((Te,ce)=>ce!==pe)),onUpdate:(O,pe,Te)=>e.setFormValue("checklist",de.map((ce,U)=>U===pe?{...ce,label:Te}:ce))}),ye(yr,{sx:{my:1.5,borderColor:"#e6e6e3"}}),ye(yi,{taskSeq:0,attachments:oe.map(O=>({name:O.name,size:O.size})),onAdd:(O,pe)=>{let Te=Hc(pe,g);Te.message&&tT(Te.message),Te.accepted.length!==0&&T.setValue("createAttachmentFiles",[...T.getValue("createAttachmentFiles")??[],...Te.accepted])},onRemove:(O,pe)=>T.setValue("createAttachmentFiles",oe.filter((Te,ce)=>ce!==pe))}),y?null:Sr(vi,{children:[ye(yr,{sx:{my:1.5,borderColor:"#e6e6e3"}}),ye(Ao,{icon:ye(Qk,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:ye(oT,{form:e,name:"note",placeholder:"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",sx:{mt:1}})})]})]}),ye(Yk,{transitionDuration:0,anchorEl:fe,open:!!fe,onClose:()=>ze(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...ke.map(O=>({seq:O.seq,label:zo(O)}))].map(O=>ye(jk,{onClick:()=>{e.setFormValue("sprint_seq",O.seq),ze(null)},sx:{fontSize:14,minWidth:170},children:O.label},O.seq))}),ye(Bi,{anchorEl:N,selectedKeys:H??[],labelOptions:o,onToggle:O=>e.setFormValue("label_keys",zr(H??[],O)),onAddLabel:(O,pe)=>x?.(O,pe),onClose:()=>J(null)})]})}import{Fragment as Gc,jsx as Ve,jsxs as Kn}from"react/jsx-runtime";function mP({open:e,onClose:o,...t}){let{form:n,presetDueDate:r="",presetTabKey:i="",presetManager:a=null,isNotice:l=!1,defaultBug:u=!1}=t,s=ft(),c=rT(!1),[m,d]=Kc(0),[p,x]=Kc(null),M=n.useFormValue("title"),T=n.useFormValue("icon"),g=n.useFormValue("icon_color"),f=!!n.useFormValue("is_event"),C=!!n.useFormValue("is_bug"),v=Fe(),y=s.useValue("createSubmitting")??!1,_=vn(T||Oe),k=l?"\uACF5\uC9C0 \uB4F1\uB85D":f?"\uC77C\uC815 \uB4F1\uB85D":C?"\uC624\uB958 \uB4F1\uB85D":"\uC5C5\uBB34 \uB4F1\uB85D",S=l?"\uACF5\uC9C0 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694":f?"\uC77C\uC815 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694":C?"\uC5B4\uB5A4 \uC624\uB958\uC778\uC9C0 \uD55C \uC904\uB85C \uC801\uC5B4\uC8FC\uC138\uC694":"\uC5C5\uBB34 \uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694";nT(()=>{let h=c.current;c.current=e,!(!e||h)&&(n.setFormValues({...n.getFormValues(),title:"",icon:l?So:u?tr:Oe,icon_color:l?"#e5484d":u?nr:"",manager_name:a?.name??"",manager_account_seq:a?.accountSeq??0,receiver_names:[],receiver_account_seqs:[],is_notice:l,is_event:!1,is_bug:u,is_open:u,bug_repro:"",bug_device:"",bug_where:"",bug_version:"",event_time:"",event_place:"",event_address:"",target_names:[],target_account_seqs:[],start_date:We(new Date),due_date:r,reminder:"none",priority:"medium",note:"",content:"",checklist:[],tab_key:i}),s.setValue("createAttachmentFiles",[]),d(b=>b+1))},[e]);let w=Kn(jt,{sx:{display:"flex",alignItems:"center",gap:1,px:2,pt:2,pb:1},children:[Ve(Ga,{size:"small","aria-label":"\uC544\uC774\uCF58 \uBCC0\uACBD",onClick:h=>x(h.currentTarget),sx:{p:0,color:g||"#1e3a8a"},children:Ve(_,{sx:{fontSize:20}})}),Ve(jt,{component:"input",autoFocus:!0,spellCheck:!1,value:M,placeholder:S,onChange:h=>n.setFormValue("title",h.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}}})]}),K=Ve(Wn,{anchorEl:p,value:T,color:g||"#1e3a8a",onSelect:h=>n.setFormValue("icon",h),onSelectColor:h=>n.setFormValue("icon_color",h),onClose:()=>x(null)});return v?Kn(Gc,{children:[Ve(mT,{open:e,onClose:o,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:k,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1},custom:[{icon:Ve(sT,{sx:{ml:2,color:y?"#c9c8c5":"#2f9e5b"}}),tooltip:y?"\uB4F1\uB85D \uC911\u2026":"\uB4F1\uB85D",onClick:y?void 0:n.submit}]},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:Ve(jt,{sx:{width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:Ve(Va,{...t,contentSyncKey:`create-${m}`,leadingRow:w})})}]}),K]}):Kn(Gc,{children:[Ve(iT,{anchor:"right",open:e,onClose:o,sx:{zIndex:h=>h.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:Kn(jt,{sx:{display:"flex",flexDirection:"column",height:"100%"},children:[Kn(jt,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[Ve(aT,{title:"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,children:Ve(Ga,{size:"small",onClick:h=>x(h.currentTarget),sx:{color:g||"#1e3a8a"},children:Ve(_,{sx:{fontSize:20}})})}),Ve(jt,{component:"input",autoFocus:!0,spellCheck:!1,value:M,placeholder:S,onChange:h=>n.setFormValue("title",h.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}}}),Ve(Ga,{"aria-label":"\uB2EB\uAE30",onClick:o,sx:{color:"#6b7280"},children:Ve(lT,{})})]}),Ve(Vc,{sx:{borderColor:"#e6e6e3"}}),Ve(jt,{sx:{flex:1,minHeight:0},children:Ve(cT,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:Ve(Va,{...t,contentSyncKey:`create-${m}`})})}),Ve(Vc,{sx:{borderColor:"#e6e6e3"}}),Kn(jt,{sx:{display:"flex",justifyContent:"flex-end",gap:1,px:2,py:1.5,flexShrink:0},children:[Ve(Uc,{onClick:o,color:"inherit",disabled:y,children:"\uCDE8\uC18C"}),Ve(Uc,{onClick:n.submit,variant:"contained",disabled:y,children:y?"\uB4F1\uB85D \uC911\u2026":"\uB4F1\uB85D"})]})]})}),K]})}import{useEffect as hm,useRef as bm,useState as fy}from"react";import{Box as wi,Button as xy,Divider as km,Drawer as gy}from"@mui/material";import hy from"@mui/icons-material/ShareOutlined";import by from"@ehfuse/overlay-scrollbar";import{FormDialog as ky}from"@ehfuse/mui-form-dialog";import{SuccessAlert as Tm}from"@ehfuse/alerts";import{useRef as Yc,useState as ja}from"react";import{Box as Ie,Button as jc,Chip as Zc,IconButton as xn,Tooltip as uT}from"@mui/material";import Xc from"@mui/icons-material/Send";import{TextField as dT}from"@ehfuse/mui-form-controls";import pT from"@mui/icons-material/Close";import fT from"@mui/icons-material/EditOutlined";import xT from"@mui/icons-material/Favorite";import gT from"@mui/icons-material/FavoriteBorderOutlined";import hT from"@mui/icons-material/CheckCircle";import bT from"@mui/icons-material/CheckCircleOutlineOutlined";import Xa from"@mui/icons-material/AttachFileOutlined";import kT from"@mui/icons-material/ImageOutlined";var Ya=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 Jc,jsx as te,jsxs as po}from"react/jsx-runtime";function Qc({kind:e,reactions:o,myAccountSeq:t,onToggle:n}){let r=o??[],i=t>0&&r.some(s=>s.account_seq===t),a=e==="like"?"\uC88B\uC544\uC694":"\uD655\uC778",l=r.length===0?a:te(Ie,{sx:{whiteSpace:"pre-line",fontSize:12},children:r.map(s=>`${s.name} \xB7 ${s.time}`).join(`
8
8
  `)}),u=e==="like"?"#e5484d":"#2f80ed";return te(uT,{title:l,arrow:!0,enterDelay:300,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:po(Ie,{sx:{display:"inline-flex",alignItems:"center"},children:[te(xn,{size:"small","aria-label":`\uB313\uAE00 ${a}`,onClick:n,sx:{color:i?u:"#c9c8c5",p:.5},children:e==="like"?i?te(xT,{sx:{fontSize:16}}):te(gT,{sx:{fontSize:16}}):i?te(hT,{sx:{fontSize:16}}):te(bT,{sx:{fontSize:16}})}),r.length>0?te(Ie,{component:"span",sx:{fontSize:12,color:i?u:"#9a9a97",ml:-.25},children:r.length}):null]})})}function em({taskSeq:e,comments:o,currentUserName:t="",myAccountSeq:n=0,avatarSrcByName:r,onUpdate:i,onRemove:a,onToggleReaction:l}){let[u,s]=ja(null),c=Mo().slots?.avatar;return po(Ie,{sx:{px:2,pb:2,display:"flex",flexDirection:"column",gap:.25},children:[po(Ie,{sx:{fontSize:14.5,fontWeight:500,color:"#37352f"},children:["\uB313\uAE00",o.length>0?` (${o.length})`:""]}),o.length===0?te(Ie,{sx:{mt:1,fontSize:13.5,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uB313\uAE00\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,te(Ie,{sx:{display:"flex",flexDirection:"column",gap:1,mt:1},children:o.map((m,d)=>po(Ie,{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 p=r?.get(m.author)??"";return c?te(Ie,{sx:{display:"inline-flex",flexShrink:0},children:te(c,{name:m.author,src:p||void 0,size:44})}):te(Ie,{sx:{display:"inline-flex",flexShrink:0},children:te(tt,{src:p,avatarSx:{width:44,height:44,fontSize:20,borderRadius:"50%",...Dn[0]},iconFontSize:24})})})(),po(Ie,{sx:{flex:1,minWidth:0},children:[po(Ie,{sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0,position:"relative"},children:[te(Ie,{component:"span",sx:{fontSize:14.5,fontWeight:700,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:m.author}),te(Ie,{component:"span",sx:{fontSize:12.5,color:"#9a9a97",flexShrink:0,whiteSpace:"nowrap"},children:m.time}),po(Ie,{sx:{display:"flex",alignItems:"center",gap:.25,ml:"auto",flexShrink:0},children:[te(Qc,{kind:"like",reactions:m.likes,myAccountSeq:n,onToggle:()=>l?.(e,d,"like")}),te(Qc,{kind:"ack",reactions:m.acks,myAccountSeq:n,onToggle:()=>l?.(e,d,"ack")})]}),t&&m.author===t?po(Ie,{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:[te(xn,{size:"small","aria-label":"\uB313\uAE00 \uC218\uC815",onClick:()=>s({index:d,text:m.text}),sx:{color:"#9a9a97"},children:te(fT,{sx:{fontSize:15}})}),te(xn,{size:"small","aria-label":"\uB313\uAE00 \uC0AD\uC81C",onClick:()=>{a(e,d),s(null)},sx:{color:"#9a9a97"},children:te(pT,{sx:{fontSize:15}})})]}):null]}),u?.index===d?po(Ie,{sx:{mt:.5},children:[te(Ie,{component:"textarea",autoFocus:!0,spellCheck:!1,value:u.text,onChange:p=>s({index:d,text:p.target.value}),sx:{width:"100%",minHeight:56,border:"1px solid #dedddb",borderRadius:1,outline:"none",font:"inherit",fontSize:14,p:1,resize:"vertical"}}),po(Ie,{sx:{display:"flex",justifyContent:"flex-end",gap:.75,mt:.5},children:[te(jc,{size:"small",color:"inherit",onClick:()=>s(null),children:"\uCDE8\uC18C"}),te(jc,{size:"small",variant:"contained",disabled:!u.text.trim(),onClick:()=>{i(e,d,u.text),s(null)},children:"\uC800\uC7A5"})]})]}):po(Ie,{children:[m.text?te(Ie,{sx:{fontSize:15,whiteSpace:"pre-wrap"},children:m.text}):null,(m.attachments??[]).length>0?te(Ie,{sx:{display:"flex",flexWrap:"wrap",gap:.5,mt:.5},children:(m.attachments??[]).map((p,x)=>te(Zc,{size:"small",icon:te(Xa,{sx:{fontSize:14}}),label:`${p.name} (${Ya(p.size)})`,sx:{fontSize:12,bgcolor:"#f1f5f9"}},`${p.name}-${x}`))}):null]})]})]},`${m.time}-${d}`))})]})}function om({onSubmit:e}){let[o,t]=ja(""),[n,r]=ja([]),i=Yc(null),a=Yc(null),l=Fe(),u=m=>{let d=Array.from(m??[]).map(p=>({name:p.name,size:p.size}));d.length!==0&&r(p=>[...p,...d].slice(0,10))},s=()=>{let m=o.trim();!m&&n.length===0||(e(m,n.length>0?n:void 0),t(""),r([]))},c=po(Jc,{children:[te(xn,{size:"small","aria-label":"\uD30C\uC77C \uCCA8\uBD80",onClick:()=>i.current?.click(),sx:{color:"#9a9a97"},children:te(Xa,{sx:{fontSize:20}})}),te(xn,{size:"small","aria-label":"\uC774\uBBF8\uC9C0 \uCCA8\uBD80",onClick:()=>a.current?.click(),sx:{color:"#9a9a97"},children:te(kT,{sx:{fontSize:20}})})]});return po(Ie,{children:[n.length>0?te(Ie,{sx:{display:"flex",flexWrap:"wrap",gap:.5,px:2,pt:1},children:n.map((m,d)=>te(Zc,{size:"small",icon:te(Xa,{sx:{fontSize:14}}),label:`${m.name} (${Ya(m.size)})`,onDelete:()=>r(p=>p.filter((x,M)=>M!==d)),sx:{fontSize:12,bgcolor:"#f1f5f9"}},`${m.name}-${d}`))}):null,po(Ie,{sx:{position:"relative",display:"flex"},children:[te(dT,{value:o,placeholder:"\uB313\uAE00\uC744 \uC785\uB825\uD558\uC138\uC694",onChange:m=>t(m.target.value),fullWidth:!0,multiline:!0,minRows:l?1:3,maxRows:3,sx:{"& .MuiInputBase-root":{pl:2,pr:l?15:6.5,pb:l?void 0:5,borderRadius:0},"& .MuiOutlinedInput-notchedOutline":{border:"none"}}}),l?po(Ie,{sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",gap:.25},children:[c,te(xn,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!o.trim()&&n.length===0,onClick:s,sx:{color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:te(Xc,{sx:{fontSize:22}})})]}):po(Jc,{children:[te(Ie,{sx:{position:"absolute",left:8,bottom:6,display:"flex",alignItems:"center",gap:.25},children:c}),te(xn,{"aria-label":"\uB313\uAE00 \uB4F1\uB85D",disabled:!o.trim()&&n.length===0,onClick:s,sx:{position:"absolute",right:8,top:"50%",transform:"translateY(-50%)",color:"#2563eb","&.Mui-disabled":{color:"#c9c8c5"}},children:te(Xc,{sx:{fontSize:22}})})]})]}),te(Ie,{component:"input",ref:i,type:"file",multiple:!0,onChange:m=>{u(m.target.files),m.target.value=""},sx:{display:"none"}}),te(Ie,{component:"input",ref:a,type:"file",accept:"image/*",multiple:!0,onChange:m=>{u(m.target.files),m.target.value=""},sx:{display:"none"}})]})}import{useState as rm}from"react";import{Box as Ii,Checkbox as BT,IconButton as _i,Tooltip as Qa}from"@mui/material";import CT from"@mui/icons-material/Close";import vT from"@mui/icons-material/ArrowBack";import IT from"@mui/icons-material/ShareOutlined";import _T from"@mui/icons-material/ContentPasteOutlined";import wT from"@mui/icons-material/CheckCircle";import DT from"@mui/icons-material/CheckCircleOutlineOutlined";import{InfoAlert as TT,SuccessAlert as yT}from"@ehfuse/alerts";var tm=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(/&nbsp;/gi," ").replace(/&lt;/gi,"<").replace(/&gt;/gi,">").replace(/&quot;/gi,'"').replace(/&#39;/gi,"'").replace(/&amp;/gi,"&").replace(/\n{3,}/g,`
11
11
 
12
12
  `).trim():"";function ST(e){let o=[`[\uC5C5\uBB34] ${e.title}`],t=nt(e.start_date),n=nt(e.due_date);(t||n)&&o.push(`\uAE30\uAC04: ${t&&n?`${t} ~ ${n}`:t||n}`),e.manager_name&&o.push(`\uCC45\uC784\uC790: ${e.manager_name}`);let r=Bo(e).name;r&&o.push(`\uC0C1\uD0DC: ${r}`);let i=tm(e.content);i&&o.push("",i);let a=String(e.note??"").trim();return a&&o.push("",`\uBE44\uACE0: ${a}`),o.join(`
13
- `)}function nm(e){navigator.clipboard.writeText(e).then(()=>yT("\uC5C5\uBB34 \uB0B4\uC6A9\uC744 \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>TT("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uB0B4\uC6A9\uC744 \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD574 \uC8FC\uC138\uC694."))}function Un(e,o){let t=ST(e);if(o&&typeof navigator.share=="function"){navigator.share({text:t}).catch(n=>{n?.name!=="AbortError"&&nm(t)});return}nm(t)}import{Fragment as MT,jsx as oo,jsxs as im}from"react/jsx-runtime";function am({task:e,myAccountSeq:o=0,onToggleCompleted:t,onChangeTitle:n,onChangeIcon:r,onChangeIconColor:i,onClose:a,appBarMode:l=!1}){let u=Fe(),[s,c]=rm(null),[m,d]=rm(null),p=vn(e.icon||(e.is_notice?So:e.is_event?"event":Oe)),x=!!e.is_notice,M=!!e.is_event,T=x&&o>0&&(e.author_account_seq??0)===o,g=!xt(e,o),f=!M&&(x?T:(e.author_account_seq??0)===o||(e.manager_account_seq??0)===o);return im(MT,{children:[im(Ii,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[l&&a?oo(_i,{"aria-label":"\uB4A4\uB85C",onClick:a,sx:{color:"#37352f",ml:-1},children:oo(vT,{})}):null,f&&!l?oo(Qa,{title:e.completed&&e.completed_by?`${e.completed_by} \xB7 ${gt(e.completed_time)} \uC644\uB8CC`:e.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC",arrow:!0,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:oo(BT,{checked:e.completed,icon:oo(DT,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:oo(wT,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(C,v)=>t(e.seq,v),sx:{p:0}})}):null,l?null:oo(Qa,{title:g?"":"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,children:oo(_i,{size:"small",onClick:g?void 0:C=>d(C.currentTarget),sx:{color:e.icon_color||(x?"#e5484d":"#1e3a8a")},children:oo(p,{sx:{fontSize:20}})})}),s!==null?oo(Ii,{component:"input",autoFocus:!0,spellCheck:!1,value:s,onChange:C=>c(C.target.value),onBlur:()=>{s.trim()&&s.trim()!==e.title&&n(e.seq,s.trim()),c(null)},onKeyDown:C=>{C.key==="Enter"&&C.target.blur(),C.key==="Escape"&&c(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:18,fontWeight:500,color:"#37352f",p:0,m:0}}):l?oo(Ii,{sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:x?"\uACF5\uC9C0":M?"\uC77C\uC815":e.is_bug?"\uC624\uB958":"\uC5C5\uBB34"}):oo(Ii,{onClick:g?void 0:()=>c(e.title),sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:g?"default":"text",textDecoration:e.completed?"line-through":"none"},children:e.title}),oo(Qa,{title:u?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:oo(_i,{"aria-label":u?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>Un(e,u),sx:{color:"#6b7280"},children:u?oo(IT,{sx:{fontSize:20}}):oo(_T,{sx:{fontSize:20}})})}),a&&!l?oo(_i,{"aria-label":"\uB2EB\uAE30",onClick:a,sx:{color:"#6b7280"},children:oo(CT,{})}):null]}),oo(Wn,{anchorEl:m,value:e.icon||(x?So:""),color:e.icon_color||(x?"#e5484d":"#1e3a8a"),onSelect:C=>r(e.seq,C),onSelectColor:C=>i?.(e.seq,C),onClose:()=>d(null)})]})}import{useState as Pt}from"react";import{Box as io,Button as Gn,ButtonBase as XT,Checkbox as QT,Divider as hn,IconButton as JT,Menu as ZT,MenuItem as ey}from"@mui/material";import oy from"@mui/icons-material/ExpandLess";import ty from"@mui/icons-material/ExpandMore";import ny from"@mui/icons-material/ConfirmationNumberOutlined";import ry from"@mui/icons-material/Check";import iy from"@mui/icons-material/DirectionsRunOutlined";import ay from"@mui/icons-material/SpeedOutlined";import tl from"@mui/icons-material/CheckCircle";import ly from"@mui/icons-material/CheckCircleOutlineOutlined";import nl from"@mui/icons-material/CheckCircleOutlined";import xm from"@mui/icons-material/AccessTimeOutlined";import sy from"@mui/icons-material/AutorenewOutlined";import cy from"@mui/icons-material/LabelOutlined";import my from"@mui/icons-material/PersonOutlineOutlined";import uy from"@mui/icons-material/SubjectOutlined";import dy from"@mui/icons-material/StickyNote2Outlined";import py from"@mui/icons-material/PanToolAltOutlined";import{useState as ET}from"react";import{TextField as OT}from"@ehfuse/mui-form-controls";import{jsx as PT}from"react/jsx-runtime";function lm({value:e,onCommit:o,onDraftChange:t,readOnly:n=!1}){let[r,i]=ET(null);return PT(OT,{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 dm,useState as el}from"react";import{Box as fo,Button as pm,IconButton as KT}from"@mui/material";import UT from"@mui/icons-material/AccountTreeOutlined";import VT from"@mui/icons-material/Add";import GT from"@mui/icons-material/Close";import YT from"@mui/icons-material/NextPlanOutlined";function gn(e){return e.relations??[]}function iR(e,o,t){return gn(e).some(n=>n.type===t&&n.task_seq===o.seq)||gn(o).some(n=>n.type===t&&n.task_seq===e.seq)}function sm(e){return`${e.created_time??""}|${String(e.seq).padStart(12,"0")}`}function cm(e,o){let t=new Map(o.map(p=>[p.seq,p]));t.set(e.seq,e);let n=new Map,r=(p,x)=>{n.has(p)||n.set(p,new Set),n.has(x)||n.set(x,new Set),n.get(p).add(x),n.get(x).add(p)};for(let p of t.values())for(let x of gn(p))x.type==="follow_up"&&t.has(x.task_seq)&&r(p.seq,x.task_seq);let i=new Set([e.seq]),a=[e.seq];for(;a.length>0;){let p=a.shift();for(let x of n.get(p)??[])i.has(x)||(i.add(x),a.push(x))}let l=[...i].map(p=>t.get(p)).filter(p=>!!p).sort((p,x)=>sm(p).localeCompare(sm(x))),u=new Set;for(let p of gn(e))p.type==="related"&&u.add(p.task_seq);for(let p of t.values())p.seq!==e.seq&&gn(p).some(x=>x.type==="related"&&x.task_seq===e.seq)&&u.add(p.seq);let s=[...u].map(p=>t.get(p)).filter(p=>p!==void 0&&p.seq!==e.seq),c=[...t.values()].filter(p=>p.seq!==e.seq&&gn(p).some(x=>x.type==="duplicate_of"&&x.task_seq===e.seq)),m=gn(e).find(p=>p.type==="duplicate_of")?.task_seq,d=m?t.get(m)??null:null;return{lineage:l,related:s,duplicates:c,duplicateOf:d}}import{useEffect as RT,useMemo as zT,useState as Ja}from"react";import{Box as Vn,Button as qT,Tab as AT,Tabs as LT}from"@mui/material";import NT from"@mui/icons-material/Check";import{FormDialog as FT}from"@ehfuse/mui-form-dialog";import{ClearTextField as HT}from"@ehfuse/mui-form-controls";import{ErrorAlert as WT}from"@ehfuse/alerts";import{OverlayScrollbar as $T}from"@ehfuse/overlay-scrollbar";import{jsx as Lo,jsxs as Za}from"react/jsx-runtime";var mm=[{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 um({open:e,task:o,tasks:t,excludeSeqs:n=[],onClose:r,onSubmit:i}){let[a,l]=Ja("related"),[u,s]=Ja(""),[c,m]=Ja(0);RT(()=>{e&&(l("related"),s(""),m(0))},[e]);let d=zT(()=>{let T=new Set([o.seq,...n]),g=u.trim().toLowerCase();return t.filter(f=>T.has(f.seq)||f.is_event||f.is_notice?!1:g?f.title.toLowerCase().includes(g)||(f.ticket_no??"").toLowerCase().includes(g):!0)},[t,o.seq,n,u]),p=()=>{if(!c){WT("\uC5F0\uACB0\uD560 \uC5C5\uBB34\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}i(c,a),r()},x=mm.find(T=>T.type===a)?.hint??"",M=Za(Vn,{children:[Lo(LT,{value:a,onChange:(T,g)=>l(g),sx:{minHeight:38,mb:.75,"& .MuiTab-root":{minHeight:38,py:.5,fontSize:14}},children:mm.map(T=>Lo(AT,{value:T.type,label:T.label},T.type))}),Lo(Vn,{sx:{mb:1.5,fontSize:12.5,color:"#9a9a97"},children:x}),Lo(HT,{label:"\uC5C5\uBB34 \uAC80\uC0C9",placeholder:"\uC81C\uBAA9\xB7\uD2F0\uCF13\uBC88\uD638\uB85C \uAC80\uC0C9",value:u,onChange:T=>s(T.target.value),fullWidth:!0,autoFocus:!0}),Lo(Vn,{sx:{mt:1.5,height:300,border:"1px solid #e6e6e3",borderRadius:1},children:Lo($T,{style:{height:"100%"},children:d.length===0?Lo(Vn,{sx:{py:4,textAlign:"center",fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uD560 \uC218 \uC788\uB294 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):d.map(T=>{let g=Ue(T.icon||Oe),f=T.seq===c;return Za(Vn,{onClick:()=>m(f?0:T.seq),sx:{display:"flex",alignItems:"center",gap:.75,px:1.25,py:.75,cursor:"pointer",bgcolor:f?"#e3eefb":"transparent","&:hover":{bgcolor:f?"#e3eefb":"#f7f7f5"}},children:[g?Lo(g,{sx:{fontSize:17,flexShrink:0,color:T.icon_color||"#1e3a8a"}}):null,Za(Vn,{component:"span",sx:{flex:1,minWidth:0,fontSize:14,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[T.ticket_no?`${T.ticket_no} `:"",T.title]}),Lo(Pe,{option:Bo(T),small:!0}),f?Lo(NT,{sx:{fontSize:17,flexShrink:0,color:"#2f80ed"}}):null]},T.seq)})})})]});return Lo(FT,{open:e,onClose:r,maxWidth:"sm",title:"\uAD00\uB828 \uC5C5\uBB34 \uC5F0\uACB0",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-task-link",sections:[{id:"task-link",showTitle:!1,children:M}],actions:{showCancelButton:!0,right:Lo(qT,{variant:"contained",disabled:!c,onClick:p,children:"\uC5F0\uACB0"})}})}import{Fragment as jT,jsx as Ke,jsxs as jo}from"react/jsx-runtime";function ol({item:e,caption:o,onOpen:t,onUnlink:n}){let r=Ue(e.icon||Oe);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(Pe,{option:Bo(e),small:!0}),n?Ke(KT,{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(GT,{sx:{fontSize:15}})}):null]})}function fm({task:e,tasks:o,readOnly:t=!1,onOpenTask:n,onLink:r,onUnlink:i,onCreateFollowUp:a}){let[l,u]=el(!1),[s,c]=el(null),[m,d]=el(null),p=dm(()=>cm(e,o),[e,o]),x=p.lineage.length>=2,M=(x?p.lineage.length-1:0)+p.related.length+p.duplicates.length+(p.duplicateOf?1:0),T=dm(()=>{let f=new Set;for(let C of p.lineage)f.add(C.seq);for(let C of p.related)f.add(C.seq);for(let C of p.duplicates)f.add(C.seq);return p.duplicateOf&&f.add(p.duplicateOf.seq),[...f]},[p]),g=(f,C,v)=>{d({anchorEl:f,targetSeq:C,type:v})};return jo(Ao,{icon:Ke(UT,{sx:{fontSize:19,display:"block"}}),title:jo(jT,{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(pm,{size:"small",color:"inherit",startIcon:Ke(YT,{sx:{fontSize:16}}),onClick:f=>c(f.currentTarget),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uD6C4\uC18D \uC5C5\uBB34"}):null,r?Ke(pm,{size:"small",color:"inherit",startIcon:Ke(VT,{sx:{fontSize:16}}),onClick:()=>u(!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:[x?Ke(fo,{sx:{mb:p.related.length||p.duplicates.length||p.duplicateOf?1:0},children:p.lineage.map((f,C)=>{let v=f.seq===e.seq,R=C===p.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:v?9:7,height:v?9:7,borderRadius:"50%",bgcolor:v?"#2f80ed":f.completed?"#9a9a97":"#c9c8c5",flexShrink:0}}),R?null:Ke(fo,{sx:{width:"2px",flex:1,bgcolor:"#e6e6e3"}})]}),jo(fo,{sx:{flex:1,minWidth:0,pb:R?0:.5},children:[jo(fo,{sx:{display:"flex",alignItems:"center",gap:.75},children:[jo(fo,{component:"span",onClick:!v&&n?()=>n(f.seq):void 0,sx:{minWidth:0,fontSize:14,fontWeight:v?600:400,color:v?"#2f80ed":f.completed?"#9a9a97":"#37352f",textDecoration:f.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...!v&&n?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[f.ticket_no?`${f.ticket_no} `:"",f.title]}),Ke(Pe,{option:Bo(f),small:!0})]}),Ke(fo,{sx:{fontSize:12,color:"#9a9a97"},children:f.completed&&f.completed_time?`${f.completed_time} \uC644\uB8CC`:f.created_time??""})]})]},f.seq)})}):null,p.duplicateOf?Ke(ol,{item:p.duplicateOf,caption:"\uC6D0\uBCF8",onOpen:n?()=>n(p.duplicateOf.seq):void 0,onUnlink:!t&&i?f=>g(f.currentTarget,p.duplicateOf.seq,"duplicate_of"):void 0}):null,p.duplicates.map(f=>Ke(ol,{item:f,caption:"\uC911\uBCF5",onOpen:n?()=>n(f.seq):void 0,onUnlink:!t&&i?C=>g(C.currentTarget,f.seq,"duplicate_of"):void 0},`dup-${f.seq}`)),p.related.map(f=>Ke(ol,{item:f,onOpen:n?()=>n(f.seq):void 0,onUnlink:!t&&i?C=>g(C.currentTarget,f.seq,"related"):void 0},`rel-${f.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(um,{open:l,task:e,tasks:o,excludeSeqs:T,onClose:()=>u(!1),onSubmit:(f,C)=>r(e.seq,f,C)}):null,Ke(je,{open:!!s,anchorEl:s,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:()=>c(null),onConfirm:()=>{a?.(e.seq),c(null)}}),Ke(je,{open:!!m,anchorEl:m?.anchorEl??null,title:"\uC774 \uC5C5\uBB34\uC640\uC758 \uC5F0\uACB0\uC744 \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uD574\uC81C",onCancel:()=>d(null),onConfirm:()=>{m&&i?.(e.seq,m.targetSeq,m.type),d(null)}})]})}import{Fragment as _o,jsx as z,jsxs as Ge}from"react/jsx-runtime";function Yn({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return z(io,{component:"span",sx:{color:"#9a9a97"},children:e})}function gm({task:e,customTabs:o,statusOptions:t,avatarSrcByName:n,onChangeStatus:r,onChangeLabels:i,onAddLabelOption:a,onChangeProject:l,onAddProject:u,onChangeDate:s,onChangeReminder:c,onMemberEdit:m,onChangePriority:d,onChangeEstimatedTime:p,onChangeEventTime:x,onChangeEventPlace:M,onChangeEventAddress:T,onChangeNote:g,onChangeContent:f,onAddChecklistItem:C,onToggleChecklistItem:v,onRemoveChecklistItem:R,onUpdateChecklistItem:y,onConvertChecklistToTask:_,onOpenChecklistTask:k,resolveChecklistTask:S,relatedTasksPool:w,onOpenRelatedTask:K,onLinkRelatedTask:h,onUnlinkRelatedTask:b,onCreateFollowUpTask:A,onAddAttachments:L,onRemoveAttachment:F,onPreview:q,onDownload:re,onUpdateComment:le,onRemoveComment:de,onToggleCommentReaction:ie,currentUserName:be="",myAccountSeq:ee=0,noticeAdmin:ae=!1,hideProject:ke=!1,hideLabel:fe=!1,showTitle:ze=!1,onChangeTitle:H,onToggleCompleted:N,onChangeIcon:J,onChangeIconColor:B,employees:D=[],onAckConfirm:Y,onRequestConfirm:oe,onChangeBugField:Se,sprints:O=[],sprintProject:pe=!1,hideSprint:Te=!1,onChangeSprint:ce,onChangeStoryPoints:U,onChangeResolution:Be,onClaimTask:$,onVerifyBug:Ye}){let[so,ut]=Pt(null),[qt,Fo]=Pt(null),[Do,dt]=Pt(null),[Qt,Ho]=Pt(null),[Jt,Oo]=Pt(!1),Jo={[Vo]:Jt?{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"}},[Ee,P]=Pt(null),[W,j]=Pt(null),[se,qe]=Pt(null),[Ae,to]=Pt(null),Q=!!e.is_notice,_e=!!e.is_event,Le=!!e.is_bug,Ze=!!$&&Nr(e,ee),Zo=!!$&&Fr(e,ee),Wo=!!Ye&&Le&&!!e.completed&&ee>0&&(e.author_account_seq??0)===ee&&!(e.acks??[]).some(E=>E.account_seq===ee),Ne=!xt(e,ee),et=!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),Jn=vn(e.icon||(e.is_notice?So:e.is_event?"event":Oe)),Cn=Q?!Lr(e,ee):Ne,Zt=Ze||Zo?Ge(Mn,{onClick:E=>to(E.currentTarget),children:[z(py,{sx:{fontSize:16,mr:.5}}),"\uAC00\uC838\uAC00\uAE30"]}):null,wr=Q?Ci(e,D):"",co=Q?Fc(e,D,ee):null,lo=!Q&&!_e?Qr(e,ee):null,Zn=!!(lo&&lo.total>0||Q&&co);return Ge(_o,{children:[ze?Ge(io,{sx:{px:2,pt:2,pb:.5,display:"flex",alignItems:"flex-start",gap:1},children:[et?z(QT,{checked:e.completed,icon:z(ly,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:z(tl,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(E,Dr)=>{Do||dt({anchorEl:E.currentTarget,nextCompleted:Dr})},sx:{p:0,mt:.25}}):null,z(JT,{size:"small","aria-label":"\uC544\uC774\uCF58 \uBCC0\uACBD",onClick:Ne?void 0:E=>Fo(E.currentTarget),sx:{p:0,mt:.25,color:e.icon_color||(Q?"#e5484d":"#1e3a8a")},children:z(Jn,{sx:{fontSize:20}})}),z(io,{sx:{flex:1,minWidth:0},children:so!==null?z(io,{component:"input",autoFocus:!0,spellCheck:!1,value:so,onChange:E=>ut(E.target.value),onBlur:()=>{so.trim()&&so.trim()!==e.title&&H(e.seq,so.trim()),ut(null)},onKeyDown:E=>{E.key==="Enter"&&E.target.blur(),E.key==="Escape"&&ut(null)},sx:{width:"100%",border:"none",outline:"none",font:"inherit",fontSize:19,fontWeight:600,color:"#37352f",p:0,m:0}}):z(io,{onClick:()=>ut(e.title),sx:{fontSize:19,fontWeight:600,color:"#37352f",lineHeight:1.35,cursor:"text",textDecoration:e.completed?"line-through":"none",userSelect:"text"},children:e.title})}),z(je,{open:!!Do,anchorEl:Do?.anchorEl??null,title:Do?.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:Do?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>dt(null),onConfirm:()=>{Do&&N(e.seq,Do.nextCompleted),dt(null)}}),z(Wn,{anchorEl:qt,value:e.icon||(Q?So:""),color:e.icon_color||(Q?"#e5484d":"#1e3a8a"),onSelect:E=>J(e.seq,E),onSelectColor:E=>B?.(e.seq,E),onClose:()=>Fo(null)})]}):null,Ge(io,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:0,[Vo]:{pb:0,"& > :last-child":{mb:0}}},children:[z(fi,{hideProject:ke,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:!_e,notice:Q,event:_e,readOnly:Ne,targetSummary:wr,onChangeProject:E=>l(e.seq,E),onAddProject:u,onChangeStartDate:E=>s(e.seq,"start_date",E),onChangeDueDate:E=>s(e.seq,"due_date",E),onChangeReminder:E=>c(e.seq,E),onChangePriority:E=>d(e.seq,E),onChangeEstimatedTime:E=>p(e.seq,E),onChangeEventTime:E=>x?.(e.seq,E),onChangeEventPlace:E=>M?.(e.seq,E),onChangeEventAddress:E=>T?.(e.seq,E),onMemberEdit:E=>m(e,E),narrowCollapsedSx:Jo,reminderLocked:e.completed,managerAction:Zt,leading:Ge(_o,{children:[Wo||Zt&&(Q||_e)?Ge(io,{sx:{gridColumn:"1 / -1",display:"flex",justifyContent:"flex-start",gap:2,px:2,py:1.5},children:[Q||_e?Zt:null,Wo?Ge(_o,{children:[z(Gn,{variant:"contained",size:"large",onClick:()=>Ye?.(e.seq,!0),sx:{bgcolor:"#2f80ed"},children:"\uAC80\uC99D\uC644\uB8CC"}),z(Gn,{variant:"outlined",size:"large",color:"error",onClick:()=>Ye?.(e.seq,!1),children:"\uC7AC\uC624\uD508"})]}):null]}):null,Le&&e.ticket_no?z(ue,{icon:z(ny,{sx:{fontSize:17}}),label:"\uD2F0\uCF13",children:z(io,{component:"span",sx:{fontVariantNumeric:"tabular-nums"},children:e.ticket_no})}):null,_e?null:z(io,{sx:Le&&e.ticket_no||Zn?void 0:{gridColumn:"1 / -1"},children:z(ue,{icon:z(sy,{sx:{fontSize:17}}),label:"\uC0C1\uD0DC",onClick:Ne||e.completed?void 0:E=>P(E),children:z(Pe,{option:Bo(e)})})}),lo&&lo.total>0?z(io,{children:z(ue,{icon:z(nl,{sx:{fontSize:17}}),label:"\uD655\uC778",children:lo.canConfirm?z(Gn,{size:"small",variant:"contained",onClick:()=>Y?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):Ge(Gn,{size:"small",variant:"outlined",color:"inherit",startIcon:lo.myTime?z(tl,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:E=>Ho({anchorEl:E.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:[lo.count," / ",lo.total]})})}):null,Q&&co?z(io,{children:z(ue,{icon:z(nl,{sx:{fontSize:17}}),label:"\uD655\uC778",children:z(io,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,minWidth:0},children:co.canAck?z(Gn,{size:"small",variant:"contained",onClick:()=>Y?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):z(Gn,{size:"small",variant:"outlined",color:"inherit",startIcon:co.acked?z(tl,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:E=>Ho({anchorEl:E.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:co.total>0&&co.count>=co.total?"\uC644\uB8CC":Ge(_o,{children:[co.count,z(io,{component:"span",sx:{mx:.4},children:"/"}),co.total]})})})})}):null,pe&&!Te&&!_e&&!Q?Ge(_o,{children:[z(ue,{icon:z(iy,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:Ne?void 0:E=>j(E),children:(e.sprint_seq??0)>0?O.find(E=>E.seq===e.sprint_seq)?.name??"\uC0AD\uC81C\uB41C \uC2A4\uD504\uB9B0\uD2B8":z(Yn,{label:"\uBBF8\uBC30\uC815"})}),z(ue,{icon:z(ay,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",children:z(Ot,{value:(e.story_points??0)>0?String(e.story_points):"",placeholder:"\uBBF8\uCD94\uC815",readOnly:Ne,onCommit:E=>U?.(e.seq,Number(E.replace(/[^0-9.]/g,""))||0)})})]}):null,_e||fe?null:z(io,{sx:[{gridColumn:"1 / -1"},Jo??null],children:z(ue,{icon:z(cy,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:Ne?void 0:E=>qe(E),children:(e.label_keys??[]).length>0?z(At,{labelKeys:e.label_keys??[],labelOptions:t}):z(Yn,{})})})]}),trailing:Ge(_o,{children:[Le?z(xi,{values:{repro:e.bug_repro??"",device:e.bug_device??"",where:e.bug_where??"",version:e.bug_version??"",resolution:e.resolution??""},readOnly:Ne,showResolution:!!e.completed,onChangeRepro:E=>Se?.(e.seq,"bug_repro",E),onChangeDevice:E=>Se?.(e.seq,"bug_device",E),onChangeWhere:E=>Se?.(e.seq,"bug_where",E),onChangeVersion:E=>Se?.(e.seq,"bug_version",E),onChangeResolution:E=>Be?.(e.seq,E)}):null,z(ue,{icon:z(my,{sx:{fontSize:17}}),label:"\uC791\uC131\uC790",sx:[uo(9),Jo??null],children:e.created_by?Ge(_o,{children:[z(Co,{names:[e.created_by],size:20,avatarSrcByName:n}),e.created_by]}):z(Yn,{})}),z(ue,{icon:z(xm,{sx:{fontSize:17}}),label:"\uC791\uC131\uC2DC\uAC04",sx:[uo(11),Jo??null],children:e.created_time?gt(e.created_time):z(Yn,{})}),e.completed?Ge(_o,{children:[z(ue,{icon:z(nl,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC790",sx:[uo(10),Jo??null],children:e.completed_by?Ge(_o,{children:[z(Co,{names:[e.completed_by],size:20,avatarSrcByName:n}),e.completed_by]}):z(Yn,{})}),z(ue,{icon:z(xm,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC2DC\uAC04",sx:[uo(12),Jo??null],children:e.completed_time?gt(e.completed_time):z(Yn,{})})]}):null]})}),Ge(io,{sx:{display:"none",[Vo]:{display:"block",mt:1.5,mb:0}},children:[z(hn,{sx:{borderColor:"#e6e6e3"}}),z(XT,{onClick:()=>Oo(E=>!E),sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:.5,pt:1.25,pb:1.25,fontSize:13.5,bgcolor:"#f4f4f2",color:"#37352f","&:active":{opacity:.6}},children:Jt?Ge(_o,{children:["\uC811\uAE30 ",z(oy,{sx:{fontSize:18}})]}):Ge(_o,{children:["\uC815\uBCF4 \uB354\uBCF4\uAE30 ",z(ty,{sx:{fontSize:18}})]})})]}),Ge(io,{children:[z(hn,{sx:{my:1.5,borderColor:"#e6e6e3",[Vo]:{mt:0,mb:1.25}}}),z(Ao,{icon:z(uy,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",children:z(io,{sx:{userSelect:"text"},children:z(gi,{syncKey:e.seq,value:e.content??"",readOnly:Ne,onChange:E=>f(e.seq,E)})})}),e.is_bug?null:Ge(_o,{children:[z(hn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),z(Ao,{icon:z(dy,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:z(io,{sx:{userSelect:"text"},children:z(lm,{value:e.note,readOnly:Cn,onCommit:E=>g(e.seq,E)})})})]}),_e?null:Ge(_o,{children:[z(hn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),z(bi,{taskSeq:e.seq,checklist:e.checklist??[],removeLocked:Cn,onAdd:C,onToggle:v,onRemove:R,onUpdate:y,onConvertToTask:_,onOpenLinkedTask:k,resolveLinkedTask:S})]}),w&&!_e&&!Q?Ge(_o,{children:[z(hn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),z(fm,{task:e,tasks:w,readOnly:Ne,onOpenTask:K,onLink:h,onUnlink:b,onCreateFollowUp:A})]}):null,z(hn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),z(yi,{taskSeq:e.seq,attachments:e.attachments??[],removeLocked:Cn,onAdd:L,onRemove:F,onPreview:q?E=>q({...E,taskSeq:e.seq}):void 0,onDownload:re?E=>re({...E,taskSeq:e.seq}):void 0})]}),z(hn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),z(em,{taskSeq:e.seq,comments:e.comments??[],currentUserName:be,myAccountSeq:ee,avatarSrcByName:n,onUpdate:le,onRemove:de,onToggleReaction:ie})]}),z(Ar,{anchorEl:Ee,value:e.status,options:Q?rr:Le?on:ir,onSelect:E=>r(e.seq,E),onClose:()=>P(null)}),z(ZT,{transitionDuration:0,anchorEl:W,open:!!W,onClose:()=>j(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...O.filter(E=>`custom-${E.group_seq}`===String(e.tab_key??"")).map(E=>({seq:E.seq,label:zo(E)}))].map(E=>Ge(ey,{onClick:()=>{ce?.(e.seq,E.seq),j(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[E.label,(e.sprint_seq??0)===E.seq?z(ry,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},E.seq))}),z(Xr,{anchorEl:Qt?.anchorEl??null,open:!!Qt?.open,acks:e.acks??[],total:co?.total??lo?.total??0,avatarSrcByName:n,onRequestConfirm:oe&&lo&&lo.count<lo.total?()=>{oe(e.seq),Ho(E=>E?{...E,open:!1}:null)}:void 0,onClose:()=>Ho(E=>E?{...E,open:!1}:null)}),z(Bi,{anchorEl:se,selectedKeys:e.label_keys??[],labelOptions:t,onToggle:E=>i(e.seq,zr(e.label_keys??[],E)),onAddLabel:a,onClose:()=>qe(null)}),z(je,{open:!!Ae,anchorEl:Ae,title:Ze?"\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:()=>to(null),onConfirm:()=>{$?.(e.seq),to(null)}})]})}import{jsx as Eo,jsxs as Ty}from"react/jsx-runtime";function N2(){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 F2({open:e,task:o,onClose:t,onAddComment:n,onSaveFields:r,myAccountSeq:i=0,onToggleCompleted:a,onChangeTitle:l,onChangeIcon:u,onChangeIconColor:s,...c}){let m=Fe(),d=bm(null);o&&(d.current=o);let p=o??d.current,[x,M]=fy({}),T=Object.keys(x).length>0;hm(()=>{M({})},[o?.seq,e]);let g=bm(null);if(hm(()=>{g.current?.scrollTo({top:0})},[o?.seq]),!p)return null;let f=m&&T?{...p,...x}:p,C=(k,S)=>{m?M(w=>({...w,...k})):S()},v=()=>{let k=x;M({});let S=p.seq,w=k.title===void 0?void 0:String(k.title).trim();if(r){let K={...k};w!==void 0&&(w?K.title=w:delete K.title),Object.keys(K).length>0&&r(S,K),Tm({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"});return}w&&l(S,w),k.icon!==void 0&&u(S,String(k.icon)),k.icon_color!==void 0&&s?.(S,String(k.icon_color)),k.status!==void 0&&c.onChangeStatus(S,k.status),k.label_keys!==void 0&&c.onChangeLabels(S,k.label_keys??[]),k.tab_key!==void 0&&c.onChangeProject(S,String(k.tab_key??"")),k.start_date!==void 0&&c.onChangeDate(S,"start_date",String(k.start_date??"")),k.due_date!==void 0&&c.onChangeDate(S,"due_date",String(k.due_date??"")),k.reminder!==void 0&&c.onChangeReminder(S,k.reminder),k.priority!==void 0&&c.onChangePriority(S,k.priority),k.estimated_time!==void 0&&c.onChangeEstimatedTime(S,String(k.estimated_time??"")),k.event_time!==void 0&&c.onChangeEventTime?.(S,String(k.event_time??"")),k.event_place!==void 0&&c.onChangeEventPlace?.(S,String(k.event_place??"")),k.event_address!==void 0&&c.onChangeEventAddress?.(S,String(k.event_address??"")),k.content!==void 0&&c.onChangeContent(S,String(k.content??"")),k.note!==void 0&&c.onChangeNote(S,String(k.note??"")),Tm({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"})},R={...c,onChangeStatus:(k,S)=>C({status:S},()=>c.onChangeStatus(k,S)),onChangeLabels:(k,S)=>C({label_keys:S},()=>c.onChangeLabels(k,S)),onChangeProject:(k,S)=>C({tab_key:S},()=>c.onChangeProject(k,S)),onChangeDate:(k,S,w)=>C({[S]:w},()=>c.onChangeDate(k,S,w)),onChangeReminder:(k,S)=>C({reminder:S},()=>c.onChangeReminder(k,S)),onChangePriority:(k,S)=>C({priority:S},()=>c.onChangePriority(k,S)),onChangeEstimatedTime:(k,S)=>C({estimated_time:S},()=>c.onChangeEstimatedTime(k,S)),onChangeEventTime:(k,S)=>C({event_time:S},()=>c.onChangeEventTime?.(k,S)),onChangeEventPlace:(k,S)=>C({event_place:S},()=>c.onChangeEventPlace?.(k,S)),onChangeEventAddress:(k,S)=>C({event_address:S},()=>c.onChangeEventAddress?.(k,S)),onChangeContent:(k,S)=>C({content:S},()=>c.onChangeContent(k,S)),onChangeNote:(k,S)=>C({note:S},()=>c.onChangeNote(k,S))},y=Eo(gm,{...R,task:f,myAccountSeq:i,onChangeTitle:(k,S)=>C({title:S},()=>l(k,S)),onToggleCompleted:a,onChangeIcon:(k,S)=>C({icon:S},()=>u(k,S)),onChangeIconColor:(k,S)=>C({icon_color:S},()=>s?.(k,S)),showTitle:m}),_=Eo(om,{onSubmit:(k,S)=>n(f.seq,k,S)},f.seq);return m?Eo(ky,{open:e,onClose:t,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:f.is_notice?"\uACF5\uC9C0\uC0AC\uD56D":f.is_event?"\uC77C\uC815":f.is_bug?"\uC624\uB958":"\uC5C5\uBB34",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1},custom:[{icon:Eo(hy,{sx:{ml:2,color:"#6b7280"}}),tooltip:"\uACF5\uC720\uD558\uAE30",onClick:()=>Un(f,!0)},{icon:Eo(gy,{sx:{ml:1,color:T?"#2f9e5b":"#c9c8c5"}}),tooltip:T?"\uC800\uC7A5":"",onClick:T?v:void 0}]},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:_},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:Eo(wi,{sx:{userSelect:"none",width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:y})}]},p.seq):Eo(xy,{anchor:"right",open:e,onClose:t,sx:{zIndex:k=>k.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:Ty(wi,{sx:{display:"flex",flexDirection:"column",height:"100%",userSelect:"none"},children:[Eo(am,{task:f,myAccountSeq:i,onToggleCompleted:a,onChangeTitle:l,onChangeIcon:u,onChangeIconColor:s,onClose:t}),Eo(km,{sx:{borderColor:"#e6e6e3"}}),Eo(wi,{sx:{flex:1,minHeight:0},children:Eo(by,{ref:g,style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:y})}),Eo(km,{sx:{borderColor:"#37352f"}}),Eo(wi,{sx:{flexShrink:0},children:_})]})})}import{useEffect as Sy,useState as bn}from"react";import{Box as wo,Button as al,IconButton as ym}from"@mui/material";import{FormDialog as By}from"@ehfuse/mui-form-dialog";import Cy from"@mui/icons-material/EditOutlined";import{ErrorAlert as Sm}from"@ehfuse/alerts";import{ClearTextField as Bm,DateTextField as Cm,LabelSelect as vm}from"@ehfuse/mui-form-controls";var rl="custom-";function yy(e){return e.startsWith(rl)}function $2(e){return e>0?`${rl}${e}`:""}function il(e){if(!yy(e))return 0;let o=Number(e.slice(rl.length));return Number.isInteger(o)&&o>0?o:0}import{Fragment as Iy,jsx as Qe,jsxs as Xt}from"react/jsx-runtime";var vy=[{value:"planning",label:"\uACC4\uD68D\uC911"},{value:"active",label:"\uC9C4\uD589\uC911"},{value:"closed",label:"\uC885\uB8CC"}];function Im(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):"-"}function Z2({open:e,customTabs:o,sprints:t,onClose:n,onCreate:r,onUpdate:i,onChangeStatus:a,onRemove:l}){let u=o.filter(h=>h.useSprints&&!h.archived),[s,c]=bn(""),[m,d]=bn(""),[p,x]=bn(""),[M,T]=bn(""),[g,f]=bn(""),[C,v]=bn(!1),[R,y]=bn(0);Sy(()=>{e&&(c(u.length===1?u[0].key:""),d(""),x(""),T(""),f(""),y(0))},[e]);let _=()=>{d(""),x(""),T(""),f(""),y(0)},k=h=>{y(h.seq),c(`custom-${h.group_seq}`),d(h.name),x(h.goal),T(h.start_date),f(h.end_date)},S=async()=>{let h=il(s);if(!h){Sm("\uBAA9\uD45C\uB97C \uB9CC\uB4E4 \uD504\uB85C\uC81D\uD2B8\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}if(!m.trim()){Sm("\uBAA9\uD45C \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}v(!0);try{if(R>0){i(R,{name:m.trim(),goal:p.trim(),start_date:M,end_date:g}),_();return}await r({group_seq:h,name:m.trim(),goal:p.trim(),start_date:M,end_date:g})&&_()}finally{v(!1)}},w=new Map(o.map(h=>[il(h.key),h.label])),K=Qe(wo,{children:u.length===0?Qe(wo,{sx:{py:2,fontSize:14,color:"#787774"},children:'\uBAA9\uD45C\uB97C \uC0AC\uC6A9\uD558\uB294 \uD504\uB85C\uC81D\uD2B8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. \uD504\uB85C\uC81D\uD2B8 \uC218\uC815\uC5D0\uC11C "\uBAA9\uD45C(\uC2A4\uD504\uB9B0\uD2B8) \uC0AC\uC6A9"\uC744 \uBA3C\uC800 \uCF1C\uC138\uC694.'}):Xt(Iy,{children:[Xt(wo,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2.5,mt:1},children:[Qe(vm,{label:"\uD504\uB85C\uC81D\uD2B8",size:"medium",value:s,options:u.map(h=>({value:h.key,label:h.label})),onChange:h=>c(String(h.target.value)),disabled:R>0}),Qe(Bm,{label:"\uBAA9\uD45C \uC774\uB984",size:"medium",placeholder:"\uC608: 8\uC6D4 2\uC8FC\uCC28",value:m,onChange:h=>d(h.target.value)}),Qe(Cm,{size:"medium",label:"\uC2DC\uC791\uC77C",value:M,onChange:h=>T(h.target.value)}),Qe(Cm,{size:"medium",label:"\uC885\uB8CC\uC77C",value:g,onChange:h=>f(h.target.value)}),Qe(Bm,{label:"\uC124\uBA85",size:"medium",placeholder:"\uC120\uD0DD \uC785\uB825",value:p,onChange:h=>x(h.target.value),sx:{gridColumn:"1 / -1"}})]}),Xt(wo,{sx:{mt:1.5,display:"flex",justifyContent:"flex-end",gap:1},children:[R>0?Qe(al,{color:"inherit",onClick:_,disabled:C,children:"\uCDE8\uC18C"}):null,Qe(al,{variant:"contained",onClick:()=>{S()},disabled:C,children:R>0?"\uBAA9\uD45C \uC800\uC7A5":"\uBAA9\uD45C \uB9CC\uB4E4\uAE30"})]}),Qe(wo,{sx:{mt:2,borderTop:"1px solid #e6e6e3"},children:t.length===0?Qe(wo,{sx:{py:3,textAlign:"center",fontSize:14,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):t.map(h=>Xt(wo,{sx:{display:"flex",flexDirection:"column",gap:1,py:1.75,borderBottom:"1px solid #f0efed"},children:[Xt(wo,{sx:{minWidth:0},children:[Xt(wo,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[Qe(wo,{component:"span",sx:{fontSize:16,fontWeight:600,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:h.name}),Qe(wo,{component:"span",sx:{flexShrink:0,px:1,py:.25,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:13,fontWeight:500},children:w.get(h.group_seq)??"\uC0AD\uC81C\uB41C \uD504\uB85C\uC81D\uD2B8"}),Xt(wo,{component:"span",sx:{flexShrink:0,fontSize:14,color:"#57564f"},children:[Im(h.start_date)," ~ ",Im(h.end_date)]})]}),h.goal?Qe(wo,{sx:{mt:.5,fontSize:14,color:"#787774",lineHeight:1.5},children:h.goal}):null]}),Xt(wo,{sx:{display:"flex",alignItems:"center",gap:.5},children:[Qe(vm,{label:"\uC0C1\uD0DC",showLabel:!1,size:"small",value:h.status,options:vy.map(b=>({value:b.value,label:b.label})),onChange:b=>a(h.seq,String(b.target.value)),sx:{width:104,flexShrink:0}}),Qe(ym,{"aria-label":"\uBAA9\uD45C \uC218\uC815",onClick:()=>k(h),sx:{color:"#9a9a97","&:hover":{color:"#2563eb"}},children:Qe(Cy,{sx:{fontSize:18}})}),Qe(ym,{"aria-label":"\uBAA9\uD45C \uC0AD\uC81C",onClick:()=>l(h.seq),sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:Qe(Tt,{style:{width:16,height:16}})})]})]},h.seq))})]})});return Qe(By,{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:K}],actions:{showCancelButton:!1,right:Qe(al,{variant:"contained",onClick:n,children:"\uB2EB\uAE30"})}})}import{useState as _m}from"react";import{Box as ao,Button as ll,Divider as _y,IconButton as wy,TextField as Dy}from"@mui/material";import{FormDialog as My}from"@ehfuse/mui-form-dialog";import Ey from"@mui/icons-material/OpenInNewOutlined";import Oy from"@mui/icons-material/EventOutlined";import{ConfirmDialog as Py}from"@ehfuse/alerts";import{jsx as Me,jsxs as kn}from"react/jsx-runtime";function cz({open:e,imports:o,onRegister:t,onRemove:n,onClose:r}){let[i,a]=_m(""),[l,u]=_m(!1),s=async()=>{let d=i.trim();if(d){u(!0);try{await t(d)&&a("")}finally{u(!1)}}},c=async d=>{await Py({title:"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",message:`"${d.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}" \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&n(d.seq)},m=kn(ao,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[kn(ao,{sx:{color:"#37352f",lineHeight:1.7},children:["\uAD6C\uAE00 \uCE98\uB9B0\uB354\uC758 \uC77C\uC815\uC744 ",Me("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uC5C5\uBB34\uD568 \uCE98\uB9B0\uB354\uC5D0 \uD568\uAED8 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4.",Me("br",{}),"\uD45C\uC2DC/\uC228\uAE40\uC740 \uC5C5\uBB34\uD568 \uC6B0\uC0C1\uB2E8\uC758 ",Me("b",{children:"\uAD6C\uAE00 \uC77C\uC815"})," \uC2A4\uC704\uCE58\uB85C \uCF1C\uACE0 \uB055\uB2C8\uB2E4."]}),Me(ao,{sx:{fontWeight:700,color:"#37352f",mt:.5},children:"\uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354"}),o.length>0?Me(ao,{sx:{display:"flex",flexDirection:"column",border:"1px solid #e6e6e3",borderRadius:1},children:o.map((d,p)=>kn(ao,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:.75,borderTop:p>0?"1px solid #efefed":"none"},children:[Me(Oy,{sx:{fontSize:18,color:"#0f9d58",flexShrink:0}}),Me(ao,{component:"span",sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:d.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),Me(wy,{"aria-label":"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",size:"small",onClick:()=>{c(d)},sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:Me(Tt,{sx:{fontSize:18}})})]},d.seq))}):Me(ao,{sx:{color:"#9a9a97",px:.5},children:"\uC544\uC9C1 \uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}),Me(_y,{sx:{my:1,borderColor:"#e6e6e3"}}),Me(ao,{sx:{fontWeight:700,color:"#37352f"},children:"\uC0C8 \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30"}),kn(ao,{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:[Me(ao,{children:kn(ao,{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 > ",Me("b",{children:"\uC124\uC815 \uBC0F \uACF5\uC720"}),"\uB97C \uC5FD\uB2C8\uB2E4."]})}),Me(ao,{children:kn(ao,{component:"span",children:[Me("b",{children:"\uCE98\uB9B0\uB354 \uD1B5\uD569"})," \uC139\uC158\uC758 ",Me("b",{children:'"iCal \uD615\uC2DD\uC758 \uBE44\uBC00 \uC8FC\uC18C"'})," \uB97C \uBCF5\uC0AC\uD574 \uC544\uB798\uC5D0 \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),Me(ao,{children:Me(ao,{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."})}),Me(ao,{children:Me(ao,{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."})})]}),kn(ao,{sx:{display:"flex",gap:2,alignItems:"center"},children:[Me(Dy,{value:i,onChange:d=>a(d.target.value),fullWidth:!0,label:"\uBE44\uBC00 iCal \uC8FC\uC18C",placeholder:"https://calendar.google.com/calendar/ical/\u2026/basic.ics",slotProps:{input:{spellCheck:!1}}}),Me(ll,{variant:"contained",disabled:!i.trim()||l,onClick:()=>{s()},sx:{flexShrink:0},children:l?"\uD655\uC778 \uC911\u2026":"\uB4F1\uB85D"})]})]});return Me(My,{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:m}],actions:{showCancelButton:!1,left:Me(ll,{variant:"outlined",startIcon:Me(Ey,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:Me(ll,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})}})}import{Box as Rt,Button as Br,TextField as Ry}from"@mui/material";import{FormDialog as zy}from"@ehfuse/mui-form-dialog";import qy from"@mui/icons-material/ContentCopyOutlined";import wm from"@mui/icons-material/OpenInNewOutlined";import{InfoAlert as Dm}from"@ehfuse/alerts";import{Fragment as Ly,jsx as Je,jsxs as Tn}from"react/jsx-runtime";function Ay(e){return`${window.location.origin}/api/v1/taskbox/calendar/${e}.ics`}function hz({open:e,feed:o,feedTaskCount:t,buildFeedUrl:n,onSubscribe:r,onClose:i}){let a=n??Ay,l=o.subscribed?a(o.token):"",u=()=>{navigator.clipboard.writeText(l).then(()=>Dm("\uD53C\uB4DC \uC8FC\uC18C\uB97C \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>Dm("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uC8FC\uC18C\uB97C \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD558\uC138\uC694."))},s=()=>{let m=l.replace(/^https?:\/\//,"webcal://");window.open(`https://calendar.google.com/calendar/r?cid=${encodeURIComponent(m)}`,"_blank")},c=Tn(Rt,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[Tn(Rt,{sx:{color:"#37352f",lineHeight:1.7},children:["\uB0B4\uAC00 \uAD00\uC5EC\uD55C \uC5C5\uBB34\uB97C ",Je("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0\uC11C \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4."]}),t===0?Tn(Rt,{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.",Je("br",{}),Je("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?Tn(Ly,{children:[Je(Ry,{value:l,fullWidth:!0,label:"\uB0B4 \uD53C\uB4DC \uC8FC\uC18C",slotProps:{input:{readOnly:!0}}}),Tn(Rt,{sx:{display:"flex",gap:2},children:[Je(Br,{variant:"outlined",startIcon:Je(qy,{}),onClick:u,children:"\uC8FC\uC18C \uBCF5\uC0AC"}),Je(Br,{variant:"contained",startIcon:Je(wm,{}),onClick:s,children:"Google \uCE98\uB9B0\uB354\uC5D0 \uCD94\uAC00"})]}),Tn(Rt,{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:[Je(Rt,{children:Tn("span",{children:["\uBC84\uD2BC\uC774 \uB3D9\uC791\uD558\uC9C0 \uC54A\uC73C\uBA74 \uAD6C\uAE00 \uCE98\uB9B0\uB354 > \uB2E4\uB978 \uCE98\uB9B0\uB354 + > ",Je("b",{children:"URL\uB85C \uCD94\uAC00"}),"\uC5D0 \uC704 \uC8FC\uC18C\uB97C \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),Je(Rt,{children:Je("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."})}),Je(Rt,{children:Je("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."})}),Je(Rt,{children:Je("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."})})]})]}):Je(Br,{variant:"contained",onClick:r,sx:{alignSelf:"flex-start"},children:"\uAD6C\uB3C5 \uC2DC\uC791 (\uD53C\uB4DC \uBC1C\uAE09)"})]});return Je(zy,{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:c}],actions:{showCancelButton:!1,left:Je(Br,{variant:"outlined",startIcon:Je(wm,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:Je(Br,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}import{useEffect as Ny,useMemo as sl,useState as cl}from"react";import{Box as Cr,Button as Fy,Typography as Hy}from"@mui/material";import{FormDialog as Wy}from"@ehfuse/mui-form-dialog";import{SearchTextField as $y}from"@ehfuse/mui-form-controls";import{TreeView as Ky}from"@ehfuse/tree-view";import{Fragment as Xy,jsx as Xo,jsxs as Qy}from"react/jsx-runtime";function Mm(e){return`${e.name}#${e.seq}`}function Uy(e){return Number(e.slice(e.lastIndexOf("#")+1))||0}function Vy(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 Gy(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 Yy(e){let o=[[e.name,e.role_name].filter(Boolean).join(" "),e.department].filter(Boolean).join(" / ");return{id:`emp:${e.seq}`,label:Mm(e),renderLabel:Xo(Cr,{component:"span",sx:{display:"inline-flex",alignItems:"baseline",gap:.75},children:Xo(Cr,{component:"span",sx:{fontWeight:400,color:"text.primary"},children:o})})}}function Em(e,o){let t=(e.groups??[]).map(r=>Em(r,o)).filter(r=>r!==null),n=(e.employees??[]).filter(r=>Gy(r,o)).map(Yy);return t.length===0&&n.length===0?null:{id:`group:${e.key}`,label:e.name,children:[...t,...n]}}function jy({groups:e,allEmployees:o,initialSelectedSeqs:t,multiple:n,isMobile:r,onSelectionChange:i}){let[a,l]=cl(""),u=sl(()=>e.map(c=>Em(c,a.trim().toLowerCase())).filter(c=>c!==null),[e,a]),s=sl(()=>o.filter(c=>t.includes(c.seq)).map(Mm),[]);return Qy(Xy,{children:[Xo(Cr,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:Xo($y,{size:"small",fullWidth:!0,placeholder:"\uC774\uB984, \uBD80\uC11C \uAC80\uC0C9",onSearch:l,onClear:()=>l(""),sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),Xo(Cr,{sx:r?{display:"flex",flexDirection:"column"}:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:Xo(Ky,{items:u,checkbox:!0,multiSelect:n,selectionMode:"child",showSearch:!1,defaultExpanded:!0,initialSelections:s,onChange:c=>i(c.map(Uy).filter(m=>m>0)),styles:{border:"none",borderRadius:"0"}})})]})}function Iz({open:e,title:o="\uC9C1\uC6D0 \uC120\uD0DD",hint:t="",groups:n,multiple:r=!1,selectedSeqs:i,confirmText:a="\uD655\uC778",onConfirm:l,onClose:u}){let s=Fe(),[c,m]=cl([]),[d,p]=cl(0),x=sl(()=>Vy(n),[n]),M=i??[];Ny(()=>{e&&(m(M),p(g=>g+1))},[e]);let T=()=>{let g=x.filter(f=>c.includes(f.seq));l(r?g:g.slice(0,1)),u()};return Xo(Wy,{open:e,onClose:u,title:`${o}${r&&c.length>0?` (${c.length}\uBA85)`:""}`,locale:"ko",fullScreen:s,mobilePresentation:s?"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:Xo(Cr,{sx:{...s?{}:{height:560},display:"flex",flexDirection:"column",border:"1px solid #cccccc",borderRadius:1,...s?{}:{overflow:"hidden"},userSelect:"none"},children:Xo(jy,{groups:n,allEmployees:x,initialSelectedSeqs:M,multiple:r,isMobile:s,onSelectionChange:m},d)})}],dialogActionSx:{"@media (max-width:1023.95px)":{gap:"0.75rem !important","& .left-actions":{flex:1,minWidth:0},"& .right-actions":{flex:1}}},actions:{visible:!0,showCancelButton:!1,left:t?Xo(Hy,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.35},children:t}):void 0,right:Xo(Fy,{variant:"contained",onClick:T,children:a})}})}import{useEffect as o0,useMemo as t0,useState as n0}from"react";import{Box as Qn,Button as r0,Divider as i0}from"@mui/material";import{FormDialog as a0}from"@ehfuse/mui-form-dialog";import{LabelSelect as l0}from"@ehfuse/mui-form-controls";import{Box as ct}from"@mui/material";import{jsx as jn,jsxs as Xn}from"react/jsx-runtime";function Jy(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 Om({sprints:e,tasks:o,height:t=160}){let r=[...e].sort((c,m)=>`${c.start_date}|${c.seq}`.localeCompare(`${m.start_date}|${m.seq}`)).map(c=>({sprint:c,...Jy(c,o)})),i=r.some(c=>c.points>0),a=r.map(c=>i?c.points:c.count),l=Math.max(1,...a),u=r.filter(c=>c.sprint.status==="closed").map(c=>i?c.points:c.count),s=u.length>0?Math.round(u.reduce((c,m)=>c+m,0)/u.length*10)/10:null;return r.length===0?jn(ct,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uD45C\uC2DC\uD560 \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):Xn(ct,{children:[Xn(ct,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[Xn("span",{children:["\uC644\uB8CC ",i?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uBAA9\uD45C\uBCC4"]}),s!==null?Xn("span",{children:["\uD3C9\uADE0(\uC885\uB8CC \uBAA9\uD45C)"," ",jn(ct,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:s}),i?"SP":"\uAC74"]}):null]}),jn(ct,{sx:{display:"flex",alignItems:"flex-end",gap:2,height:t,px:.5},children:r.map(c=>{let m=i?c.points:c.count,d=Math.round((t-24)*m/l),p=c.sprint.status==="closed";return Xn(ct,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-end",height:"100%"},children:[jn(ct,{sx:{fontSize:14,fontWeight:700,color:"#37352f",lineHeight:1.5},children:m}),jn(ct,{sx:{width:"60%",maxWidth:56,height:Math.max(2,d),borderRadius:"4px 4px 0 0",bgcolor:p?"#2f80ed":"#a9c9f5"}})]},c.sprint.seq)})}),jn(ct,{sx:{display:"flex",gap:2,px:.5,mt:.5},children:r.map(c=>Xn(ct,{sx:{flex:1,minWidth:0,textAlign:"center",fontSize:13.5,color:"#000",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[c.sprint.name,c.sprint.status!=="closed"?" (\uC9C4\uD589\uC911)":""]},c.sprint.seq))})]})}import{useMemo as Zy}from"react";import{Box as yn}from"@mui/material";import{jsx as mt,jsxs as Sn}from"react/jsx-runtime";function Pm(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?new Date(`${e}T00:00:00`):null}function e0(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function ml(e){return e.slice(5).replace("-",".")}function Rm({sprint:e,tasks:o,todayStr:t,height:n=200}){let r=Zy(()=>{let g=Pm(e.start_date),f=Pm(e.end_date);if(!g||!f||f<g||Math.round((f.getTime()-g.getTime())/864e5)+1>366)return null;let v=o.filter(h=>h.sprint_seq===e.seq&&!h.archived);if(v.length===0)return{empty:!0};let R=v.some(h=>(h.story_points??0)>0),y=h=>R?h.story_points??0:1,_=v.reduce((h,b)=>h+y(b),0),k=new Map;for(let h of v){if(!h.completed)continue;let b=(h.completed_time??"").slice(0,10),A=/^\d{4}-\d{2}-\d{2}$/.test(b)?b:e.start_date;k.set(A,(k.get(A)??0)+y(h))}let S=[];for(let h=new Date(g);h<=f;h.setDate(h.getDate()+1))S.push(e0(h));let w=_,K=[];for(let h of S){if(h>t)break;w-=k.get(h)??0,K.push({day:h,value:Math.max(0,w)})}return{empty:!1,days:S,total:_,usePoints:R,actual:K}},[e,o,t]);if(!r)return mt(yn,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uBAA9\uD45C\uC758 \uC2DC\uC791\uC77C\xB7\uC885\uB8CC\uC77C\uC774 \uC788\uC5B4\uC57C \uBC88\uB2E4\uC6B4\uC744 \uADF8\uB9B4 \uC218 \uC788\uC2B5\uB2C8\uB2E4."});if(r.empty)return mt(yn,{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:u}=r,s=600,c=200,m=8,d=g=>i.length===1?0:g/(i.length-1)*s,p=g=>m+(c-m*2)*(1-g/Math.max(1,a)),x=`${d(0)},${p(a)} ${d(i.length-1)},${p(0)}`,M=u.map(g=>`${d(i.indexOf(g.day))},${p(g.value)}`).join(" "),T=u[u.length-1];return Sn(yn,{children:[Sn(yn,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[Sn("span",{children:["\uB0A8\uC740 ",l?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uCD1D ",a]}),T?Sn("span",{children:["\uD604\uC7AC"," ",mt(yn,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:T.value}),l?"SP":"\uAC74"," \uB0A8\uC74C"]}):null]}),mt(yn,{sx:{border:"1px solid #e6e6e3",borderRadius:1,bgcolor:"#fafaf9",px:1,py:.5},children:Sn("svg",{viewBox:`0 0 ${s} ${c}`,preserveAspectRatio:"none",style:{display:"block",width:"100%",height:n},children:[mt("line",{x1:0,y1:p(0),x2:s,y2:p(0),stroke:"#e6e6e3",strokeWidth:1}),mt("polyline",{points:x,fill:"none",stroke:"#9a9a97",strokeWidth:1.5,strokeDasharray:"6 5",vectorEffect:"non-scaling-stroke"}),u.length>1?mt("polyline",{points:M,fill:"none",stroke:"#2f80ed",strokeWidth:2.5,vectorEffect:"non-scaling-stroke"}):null,T?mt("circle",{cx:d(i.indexOf(T.day)),cy:p(T.value),r:4,fill:"#2f80ed",vectorEffect:"non-scaling-stroke"}):null]})}),Sn(yn,{sx:{mt:.5,display:"flex",justifyContent:"space-between",fontSize:13.5,color:"#000"},children:[mt("span",{children:ml(e.start_date)}),t>e.start_date&&t<e.end_date?Sn("span",{children:["\uC624\uB298 ",ml(t)]}):null,mt("span",{children:ml(e.end_date)})]})]})}import{jsx as zt,jsxs as ul}from"react/jsx-runtime";function $z({open:e,sprints:o,tasks:t,todayStr:n,initialSprintSeq:r=0,onClose:i}){let[a,l]=n0(0);o0(()=>{if(!e)return;let c=o.find(d=>d.status==="active")??o[0],m=o.find(d=>d.seq===r)??c;l(m?.seq??0)},[e]);let u=t0(()=>o.find(c=>c.seq===a)??null,[o,a]),s=ul(Qn,{sx:{display:"flex",flexDirection:"column"},children:[ul(Qn,{sx:{px:3,py:2.5},children:[zt(Qn,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBCA8\uB85C\uC2DC\uD2F0"}),zt(Om,{sprints:o,tasks:t})]}),zt(i0,{sx:{borderColor:"#e6e6e3"}}),ul(Qn,{sx:{px:3,py:2.5},children:[zt(Qn,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBC88\uB2E4\uC6B4"}),zt(l0,{label:"\uBAA9\uD45C",showLabel:!1,value:a?String(a):"",options:o.map(c=>({value:String(c.seq),label:zo(c)})),onChange:c=>l(Number(c.target.value)||0),sx:{width:280,mb:2}}),u?zt(Rm,{sprint:u,tasks:t,todayStr:n}):zt(Qn,{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 zt(a0,{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:s}],actions:{showCancelButton:!1,right:zt(r0,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}import{Checkbox as s0,Divider as c0,Menu as m0,MenuItem as dl}from"@mui/material";import{jsx as vr,jsxs as zm}from"react/jsx-runtime";function Yz({anchorEl:e,candidates:o,selectedNames:t,avatarSrcByName:n,onToggle:r,onClear:i,onClose:a}){return zm(m0,{anchorEl:e,open:!!e,onClose:a,transitionDuration:0,children:[o.length===0?vr(dl,{disabled:!0,sx:{fontSize:14},children:"\uBAA9\uB85D\uC5D0 \uC9C0\uC815\uB41C \uC0AC\uB78C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):o.map(l=>{let u=t.includes(l.name);return zm(dl,{onClick:()=>r(l),sx:{fontSize:14,minWidth:170,gap:1},children:[vr(s0,{size:"small",checked:u,sx:{p:0}}),vr(Co,{names:[l.name],size:20,avatarSrcByName:n}),l.name]},`${l.accountSeq}-${l.name}`)}),vr(c0,{}),vr(dl,{disabled:t.length===0,onClick:i,sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{useState as u0}from"react";import{ButtonBase as d0,Menu as p0,MenuItem as f0}from"@mui/material";import x0 from"@mui/icons-material/KeyboardArrowDown";import g0 from"@mui/icons-material/Check";import{Fragment as h0,jsx as pl,jsxs as fl}from"react/jsx-runtime";function tq({value:e,onChange:o,options:t}){let[n,r]=u0(null),i=t??ji,a=ji.find(l=>l.value===e)?.label??"";return fl(h0,{children:[fl(d0,{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,pl(x0,{sx:{fontSize:17,color:"#9a9a97"}})]}),pl(p0,{transitionDuration:0,anchorEl:n,open:!!n,onClose:()=>r(null),children:i.map(l=>fl(f0,{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?pl(g0,{sx:{fontSize:16,color:"#2f80ed"}}):null]},l.value))})]})}import{Box as Mi,ButtonBase as b0}from"@mui/material";import{DateTextField as qm}from"@ehfuse/mui-form-controls";function Bn(e){let o=t=>String(t).padStart(2,"0");return`${e.getFullYear()}-${o(e.getMonth()+1)}-${o(e.getDate())}`}function Di(e,o=new Date){let t=new Date(o);return t.setMonth(t.getMonth()-e),t}function iq(e=new Date){return{fromDate:Bn(Di(1,e)),toDate:Bn(e)}}import{jsx as Ir,jsxs as Am}from"react/jsx-runtime";var k0=[{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 Lm({fromDate:e,toDate:o,onChange:t}){let n=i=>{if(i<=0){t("","");return}t(Bn(Di(i)),Bn(new Date))},r=i=>i<=0?!e&&!o:!e||!o?!1:e===Bn(Di(i))&&o===Bn(new Date);return Am(Mi,{sx:{display:"flex",alignItems:"center",gap:1.5,flexWrap:"wrap"},children:[Ir(Mi,{sx:{display:"flex",alignItems:"center",gap:1.5},children:k0.map(i=>{let a=r(i.months);return Ir(b0,{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)})}),Am(Mi,{sx:{display:"flex",alignItems:"center",gap:.5},children:[Ir(qm,{value:e,size:"small",placeholder:"\uC2DC\uC791\uC77C",onChange:i=>t(i.target.value,o),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}}),Ir(Mi,{component:"span",sx:{fontSize:13,color:"#9a9a97"},children:"~"}),Ir(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 T0}from"@mui/material";import{jsx as Nm}from"react/jsx-runtime";function fq({anchorEl:e,fromDate:o,toDate:t,onChange:n,onClose:r}){return Nm(T0,{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:Nm(Lm,{fromDate:o,toDate:t,onChange:n})})}import{Box as y0,ButtonBase as S0,Tab as B0,Tabs as C0}from"@mui/material";import v0 from"@mui/icons-material/Checklist";import I0 from"@mui/icons-material/Face";import _0 from"@mui/icons-material/Publish";import w0 from"@mui/icons-material/NotificationsOutlined";import D0 from"@mui/icons-material/BugReportOutlined";import M0 from"@mui/icons-material/DescriptionOutlined";import E0 from"@mui/icons-material/Inventory2Outlined";import{jsx as Qo}from"react/jsx-runtime";function Fm(e,o){return o>0?`${e} (${o})`:e}var _q=[{id:"my",label:"\uC804\uCCB4",icon:Qo(v0,{sx:{fontSize:18}})},{id:"notice",label:"\uACF5\uC9C0\uC0AC\uD56D",icon:Qo(w0,{sx:{fontSize:18}})},{id:"mine",label:"\uB0B4 \uC5C5\uBB34",icon:Qo(I0,{sx:{fontSize:18}})},{id:"sent",label:"\uBCF4\uB0B8 \uC5C5\uBB34",icon:Qo(_0,{sx:{fontSize:18}})},{id:"bug",label:"\uC624\uB958",icon:Qo(D0,{sx:{fontSize:18}})},{id:"archive",label:"\uBCF4\uAD00\uD568",icon:Qo(E0,{sx:{fontSize:18}}),hideCount:!0},{id:"report",label:"\uBCF4\uACE0\uC11C",icon:Qo(M0,{sx:{fontSize:18}}),hideCount:!0}];function O0(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 wq({items:e,activeTab:o,counts:t,onChange:n,compact:r=!1}){let i=ne(),a=O0(i.tabs),l=e;return r?Qo(y0,{sx:{display:"flex",flexWrap:"wrap",gap:1.25},children:l.map(u=>{let s=o===u.id;return Qo(S0,{onClick:()=>n(u.id),sx:{px:1.5,py:.75,borderRadius:1,fontSize:yo(13.5),fontWeight:500,whiteSpace:"nowrap",border:"1px solid",bgcolor:s?i.tabs.selectedBg:i.tabs.bg,color:s?i.tabs.selectedColor:i.tabs.color,borderColor:s?i.tabs.selectedBg:i.tabs.borderColor},children:Fm(u.label,u.hideCount?0:t[u.id]??0)},u.id)})}):Qo(C0,{value:o,onChange:(u,s)=>n(s),sx:{minHeight:46,"& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:"12px",minHeight:46}},children:l.map(u=>Qo(B0,{value:u.id,label:Fm(u.label,u.hideCount?0:t[u.id]??0),icon:u.icon,iconPosition:"start",sx:a},u.id))})}import{useEffect as P0,useMemo as R0,useState as xl}from"react";import{Divider as gl,ListItemIcon as No,Menu as hl,MenuItem as To}from"@mui/material";import z0 from"@mui/icons-material/OpenInNewOutlined";import q0 from"@mui/icons-material/Check";import A0 from"@mui/icons-material/CheckCircleOutlined";import L0 from"@mui/icons-material/RadioButtonUnchecked";import N0 from"@mui/icons-material/SendOutlined";import F0 from"@mui/icons-material/EventOutlined";import H0 from"@mui/icons-material/PersonOutlineOutlined";import W0 from"@mui/icons-material/ViewKanbanOutlined";import $0 from"@mui/icons-material/ContentCopyOutlined";import K0 from"@mui/icons-material/NextPlanOutlined";import U0 from"@mui/icons-material/ContentPasteOutlined";import V0 from"@mui/icons-material/ShareOutlined";import G0 from"@mui/icons-material/DirectionsRunOutlined";import Hm from"@mui/icons-material/ChevronRight";import Y0 from"@mui/icons-material/ArchiveOutlined";import j0 from"@mui/icons-material/UnarchiveOutlined";import{ConfirmDialog as X0}from"@ehfuse/alerts";import{Fragment as Q0,jsx as me,jsxs as xo}from"react/jsx-runtime";function rA({target:e,onClose:o,customTabs:t,sprints:n=[],myAccountSeq:r=0,onOpenDetail:i,onToggleCompleted:a,onRequestConfirm:l,onChangeDueDate:u,onChangeReminder:s,onMemberEdit:c,onMoveProject:m,onDuplicate:d,onCreateFollowUp:p,onShare:x,onAssignSprint:M,onArchiveToggle:T,onDelete:g}){let f=Fe(),C=ot(),[v,R]=xl(null),[y,_]=xl(null),[k,S]=xl(null);P0(()=>{e||(R(null),_(null),S(null))},[e]);let w=e?.task??null,K=!!w?.is_notice,h=!!w?.is_event,b=w?!xt(w,r):!1,A=R0(()=>new Set(t.filter(q=>q.useSprints).map(q=>q.key)),[t]),L=async()=>{let q=w;if(o(),!q)return;await X0({title:"\uC5C5\uBB34 \uC0AD\uC81C",message:`"${q.title}" \uC5C5\uBB34\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&g(q.seq)},F=()=>{w&&T(w.seq,!w.archived),o()};return xo(Q0,{children:[xo(hl,{open:!!e,onClose:o,transitionDuration:0,anchorReference:f?"none":"anchorPosition",anchorPosition:!f&&e?{top:e.position.top,left:e.position.left}:void 0,slotProps:{paper:{sx:{minWidth:190,...f?{position:"fixed",top:"50%",left:"50%",translate:"-50% -50%",maxHeight:"70vh"}:{}}},list:f?{sx:{"& .MuiMenuItem-root":{py:1,minHeight:0}}}:void 0},children:[xo(To,{onClick:()=>{w&&i(w),o()},sx:{fontSize:14},children:[me(No,{children:me(z0,{sx:{fontSize:19}})}),"\uC0C1\uC138 \uC5F4\uAE30"]}),xo(To,{disabled:K?(w?.author_account_seq??0)!==r:(w?.author_account_seq??0)!==r&&(w?.manager_account_seq??0)!==r,onClick:()=>{w&&a(w.seq,!w.completed),o()},sx:{fontSize:14},children:[me(No,{children:w?.completed?me(L0,{sx:{fontSize:19}}):me(A0,{sx:{fontSize:19}})}),w?.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC"]}),!K&&l?xo(To,{disabled:!(w?.manager_account_seq??0)&&(w?.receiver_account_seqs??[]).length===0,onClick:()=>{w&&l(w),o()},sx:{fontSize:14},children:[me(No,{children:me(N0,{sx:{fontSize:19}})}),"\uD655\uC778 \uC694\uCCAD"]}):null,h?null:me(gl,{}),h?null:xo(To,{disabled:b,onClick:q=>{w&&R({anchorEl:q.currentTarget,task:w})},sx:{fontSize:14},children:[me(No,{children:me(F0,{sx:{fontSize:19}})}),"\uB9C8\uAC10\uAE30\uD55C \uBCC0\uACBD"]}),!K&&!h&&c?xo(To,{onClick:()=>{w&&c(w,"manager"),o()},sx:{fontSize:14},children:[me(No,{children:me(H0,{sx:{fontSize:19}})}),"\uCC45\uC784\uC790 \uBCC0\uACBD"]}):null,h?null:xo(To,{disabled:b,onClick:q=>{w&&_({anchorEl:q.currentTarget,task:w})},sx:{fontSize:14},children:[me(No,{children:me(W0,{sx:{fontSize:19}})}),"\uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9",me(Hm,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}),me(gl,{}),d?xo(To,{disabled:b,onClick:()=>{w&&d(w.seq),o()},sx:{fontSize:14},children:[me(No,{children:me($0,{sx:{fontSize:19}})}),"\uBCF5\uC81C"]}):null,p&&w&&!w.is_event&&!w.is_notice?xo(To,{onClick:()=>{w&&p(w.seq),o()},sx:{fontSize:14},children:[me(No,{children:me(K0,{sx:{fontSize:19}})}),"\uD6C4\uC18D \uC5C5\uBB34 \uB9CC\uB4E4\uAE30"]}):null,xo(To,{onClick:()=>{w&&(x?x(w):Un(w,f)),o()},sx:{fontSize:14},children:[me(No,{children:f?me(V0,{sx:{fontSize:19}}):me(U0,{sx:{fontSize:19}})}),f?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC"]}),w&&!w.is_notice&&!w.is_event&&A.has(String(w.tab_key??""))&&M?xo(To,{onClick:q=>S(q.currentTarget),sx:{fontSize:14},children:[me(No,{children:me(G0,{sx:{fontSize:19}})}),"\uBAA9\uD45C\uC5D0 \uB123\uAE30",me(Hm,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}):null,xo(To,{onClick:F,disabled:b||!w?.archived&&!(w&&Pr(w)),sx:{fontSize:14},children:[me(No,{children:w?.archived?me(j0,{sx:{fontSize:19}}):me(Y0,{sx:{fontSize:19}})}),w?.archived?"\uBCF4\uAD00 \uD574\uC81C":"\uBCF4\uAD00"]}),me(gl,{}),xo(To,{disabled:b,onClick:L,sx:{fontSize:14,color:"#e5484d"},children:[me(No,{children:me(Tt,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC0AD\uC81C"]})]}),me(Nt,{anchorEl:v?.anchorEl??null,open:!!v,date:v?.task.due_date??"",reminder:v?.task.reminder??"none",hideReminder:!!v?.task.completed,centered:f,onClose:()=>{R(null),o()},onDateChange:q=>{v&&u(v.task.seq,q)},onReminderChange:q=>{v&&s?.(v.task.seq,q)}}),xo(hl,{transitionDuration:0,anchorEl:y?.anchorEl??null,open:!!y,onClose:()=>{_(null),o()},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...C,children:[me(To,{selected:!y?.task.tab_key,onClick:()=>{y&&m(y.task.seq,""),_(null),o()},sx:{fontSize:14,minWidth:170},children:"\uC5C6\uC74C"}),t.filter(q=>!q.archived).map(q=>me(To,{selected:y?.task.tab_key===q.key,onClick:()=>{y&&m(y.task.seq,q.key),_(null),o()},sx:{fontSize:14,minWidth:170},children:q.label},q.key))]}),me(hl,{transitionDuration:0,anchorEl:k,open:!!k,onClose:()=>S(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...n.filter(q=>`custom-${q.group_seq}`===String(w?.tab_key??"")).map(q=>({seq:q.seq,label:zo(q)}))].map(q=>xo(To,{onClick:()=>{w&&M?.(w.seq,q.seq),S(null),o()},sx:{fontSize:14,minWidth:160,gap:1},children:[q.label,(w?.sprint_seq??0)===q.seq?me(q0,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},q.seq))})]})}import{Checkbox as J0,Divider as Z0,Menu as eS,MenuItem as Wm}from"@mui/material";import{jsx as Ei,jsxs as $m}from"react/jsx-runtime";function cA({anchorEl:e,labelOptions:o,selectedKeys:t,onToggle:n,onClear:r,onClose:i}){return $m(eS,{transitionDuration:0,anchorEl:e,open:!!e,onClose:i,children:[o.map(a=>{let l=t.includes(a.key);return $m(Wm,{onClick:()=>n(a.key),sx:{fontSize:14,minWidth:190,gap:1},children:[Ei(J0,{size:"small",checked:l,sx:{p:0}}),Ei(Pe,{option:a})]},a.key)}),Ei(Z0,{}),Ei(Wm,{disabled:t.length===0,onClick:()=>{r(),i()},sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{Divider as Km,Menu as oS,MenuItem as bl}from"@mui/material";import tS from"@mui/icons-material/Check";import nS from"@mui/icons-material/BarChartOutlined";import rS from"@mui/icons-material/SettingsOutlined";import{jsx as _r,jsxs as Oi}from"react/jsx-runtime";function hA(e){let{anchorEl:o,sprints:t,value:n,onSelect:r,onManage:i,onCharts:a,onClose:l}=e;return Oi(oS,{transitionDuration:0,anchorEl:o,open:!!o,onClose:l,children:[[{seq:0,label:"\uC804\uCCB4"},{seq:-1,label:"\uBBF8\uBC30\uC815 \uC5C5\uBB34"},...t.map(u=>({seq:u.seq,label:zo(u)}))].map(u=>Oi(bl,{onClick:()=>{r(u.seq),l()},sx:{fontSize:14,minWidth:180,gap:1},children:[u.label,n===u.seq?_r(tS,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},u.seq)),_r(Km,{}),a?Oi(bl,{onClick:()=>{l(),a()},sx:{fontSize:14,gap:1},children:[_r(nS,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uCC28\uD2B8"]}):null,a?_r(Km,{}):null,Oi(bl,{onClick:()=>{l(),i()},sx:{fontSize:14,gap:1},children:[_r(rS,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uAD00\uB9AC\u2026"]})]})}var iS={my:"tasks",mine:"tasks",sent:"tasks",notice:"notice",bug:"bug",archive:"archive",done:"done",report:"report"};function aS(e){return iS[e]??"tasks"}var TA={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"},Um=["list","calendar","month","card","kanban","sprint","timeline"],lS=["list","card"];function yA(e){let o=aS(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:Um,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:lS,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:Um,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{Xv as ALL_TASK_VIEWER_ACCOUNT_SEQS,qc as AddLabelDialog,Gr as AddTabDialog,Oc as AttachmentUploadGauge,$a as AttachmentUploadPercent,Wi as BUG_DEVICE_OPTIONS,nr as BUG_ICON_COLOR,Ov as BUG_KANBAN_COLUMNS,Hi as BUG_REPRO_OPTIONS,$i as BUG_RESOLUTION_OPTIONS,on as BUG_STATUS_OPTIONS,tr as BUG_TASK_ICON,xi as BugPropertiesGrid,hf as COLUMN_WIDTHS,Ui as COMPLETED_STATUS_OPTION,rl as CUSTOM_TAB_KEY_PREFIX,cz as CalendarImportDialog,hz as CalendarSubscribeDialog,On as CommentBubbleIcon,En as ConfirmCountButton,cs as DATE_REMINDER_OPTIONS,zi as DEFAULT_PROJECT_ICON,_q as DEFAULT_TASKBOX_TAB_ITEMS,Oe as DEFAULT_TASK_ICON,fq as DateRangeFilterPopover,Ao as DrawerSection,Nt as DueDatePickerPopover,jp as ENDED_EVENT_STATUS_OPTION,$c as EVENT_ICON_COLOR,Iz as EmployeeSelectDialog,ji as GROUP_BY_OPTIONS,An as GoogleEventChip,tq as GroupByMenuButton,Vr as IconPickerGrid,hc as InlineAddressInput,Ot as InlineTextValue,Vi as KANBAN_CLOSED_COLUMN_KEY,cA as LabelFilterMenu,Bi as LabelSelectMenu,ir as MANUAL_TASK_STATUS_OPTIONS,Yz as MemberFilterMenu,rr as NOTICE_STATUS_OPTIONS,So as NOTICE_TASK_ICON,Pl as NO_TASK_ICON,qi as PROJECT_ICON_OPTIONS,ue as PropertyRow,Dn as RECEIVER_AVATAR_COLORS,ms as REMINDER_OPTIONS,Co as ReceiverAvatarStack,fm as RelatedTasksSection,sS as STATUS_KEY_REPLIED,Bl as STATUS_KEY_WAITING,bs as SortableTaskCard,Rm as SprintBurndownChart,$z as SprintChartsDialog,hA as SprintFilterMenu,Z2 as SprintManageDialog,Om as SprintVelocityChart,Ar as StatusSelectMenu,Ji as TASKBOX_COLUMNS,Vo as TASKBOX_DRAWER_NARROW_MQ,Rl as TASKBOX_UI_STATE_ID,TA as TASKBOX_VIEW_LABELS,fM as TASKBOX_VIEW_MODES,en as TASK_STATUS_OPTIONS,sx as TIME_REMINDER_OPTIONS,Xr as TaskAckListPopover,Mn as TaskActionButton,yi as TaskAttachmentsSection,ic as TaskBoxColumnSummary,ha as TaskBoxGroupBoard,eE as TaskBoxMobileList,Ys as TaskBoxMonthAgenda,$s as TaskBoxMonthCalendar,_M as TaskBoxSprintColumnSummary,xs as TaskBoxTable,wq as TaskBoxTabs,ec as TaskBoxTimeline,pM as TaskBoxView,Ls as TaskBoxWeekCalendar,mr as TaskCardContent,bi as TaskChecklistSection,om as TaskCommentInput,em as TaskCommentsSection,gi as TaskContentEditor,rA as TaskContextMenu,fi as TaskCorePropertiesGrid,Va as TaskCreateBody,mP as TaskCreateDrawer,Lm as TaskDateRangeFilter,gm as TaskDetailBody,F2 as TaskDetailDrawer,am as TaskDetailHeader,Wn as TaskIconPickerPopover,At as TaskLabelChips,um as TaskLinkDialog,lm as TaskNoteField,$o as TaskPriorityChip,Pe as TaskStatusChip,Fv as TaskStatusChips,eu as TaskboxProvider,Ay as buildCalendarFeedUrl,Jr as buildCardBaseSx,$l as buildStatusOptionColors,Xi as buildTaskGroupSections,cm as buildTaskRelationsModel,ST as buildTaskShareText,Er as buildTaskboxTheme,Kl as canAssignBugManager,Nr as canClaimTaskItem,xt as canEditTaskItem,Lr as canViewTaskItem,Fr as canVolunteerTaskItem,tc as countWorkdays,Kp as createTaskboxTheme,rc as daysLeftUntil,Ai as defaultTaskBoxFormValues,Li as defaultTaskboxUiStateValues,Hc as filterFilesWithinLimit,T_ as formatConfirmTime,oc as formatHours,nt as formatKoreanDate,gt as formatKoreanDateTime,zo as formatSprintOptionLabel,Fl as getBugDeviceName,Nl as getBugReproName,Or as getBugResolutionName,Xp as getBugStatusOption,iq as getDefaultDateRange,ar as getEventDisplayStatusOption,Rv as getNoDueStatusRank,Fc as getNoticeAckInfo,Hl as getNoticeStatusOption,y5 as getNoticeTargetDisplay,vn as getProjectIconAnchorComponent,Ue as getProjectIconComponent,la as getReminderLabel,aa as getReminderOptions,Wl as getStatusOptionsForTask,yA as getTabHeaderConfig,ea as getTaskBoxColumnDefs,Hr as getTaskBoxGridTemplate,aS as getTaskBoxTabKind,Qr as getTaskConfirmInfo,Bo as getTaskDisplayStatusOption,Rr as getTaskStatusOption,Rn as groupGoogleEventsByDate,il as groupSeqFromTabKey,iR as hasRelation,pk as htmlToPlainText,yy as isCustomTabKey,Yi as isOpenPoolTaskItem,Ki as isPastEvent,Pr as isTaskDone,Pv as isWaitingTask,Di as monthsAgoDate,uo as narrowOrderSx,N2 as nowDateTimeString,Xh as parseEstimatedHours,gn as relationsOf,_n as resolveTaskStatusOptions,Fi as resolveTaskboxTheme,Un as shareTaskText,nc as sumRemainingHours,Ci as summarizeNoticeTargets,$2 as tabKeyFromGroupSeq,Bn as toYmd,zr as toggleLabelKey,Ri as useBuildFileUrl,Ec as useTaskAttachmentUploadMeta,Mo as useTaskboxConfig,Np as useTaskboxForm,ne as useTaskboxTheme,ft as useTaskboxUiState,or as useUploadMaxMb};
13
+ `)}function nm(e){navigator.clipboard.writeText(e).then(()=>yT("\uC5C5\uBB34 \uB0B4\uC6A9\uC744 \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>TT("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uB0B4\uC6A9\uC744 \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD574 \uC8FC\uC138\uC694."))}function Un(e,o){let t=ST(e);if(o&&typeof navigator.share=="function"){navigator.share({text:t}).catch(n=>{n?.name!=="AbortError"&&nm(t)});return}nm(t)}import{Fragment as MT,jsx as oo,jsxs as im}from"react/jsx-runtime";function am({task:e,myAccountSeq:o=0,onToggleCompleted:t,onChangeTitle:n,onChangeIcon:r,onChangeIconColor:i,onClose:a,appBarMode:l=!1}){let u=Fe(),[s,c]=rm(null),[m,d]=rm(null),p=vn(e.icon||(e.is_notice?So:e.is_event?"event":Oe)),x=!!e.is_notice,M=!!e.is_event,T=x&&o>0&&(e.author_account_seq??0)===o,g=!xt(e,o),f=!M&&(x?T:(e.author_account_seq??0)===o||(e.manager_account_seq??0)===o);return im(MT,{children:[im(Ii,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[l&&a?oo(_i,{"aria-label":"\uB4A4\uB85C",onClick:a,sx:{color:"#37352f",ml:-1},children:oo(vT,{})}):null,f&&!l?oo(Qa,{title:e.completed&&e.completed_by?`${e.completed_by} \xB7 ${gt(e.completed_time)} \uC644\uB8CC`:e.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC",arrow:!0,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:oo(BT,{checked:e.completed,icon:oo(DT,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:oo(wT,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(C,v)=>t(e.seq,v),sx:{p:0}})}):null,l?null:oo(Qa,{title:g?"":"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,children:oo(_i,{size:"small",onClick:g?void 0:C=>d(C.currentTarget),sx:{color:e.icon_color||(x?"#e5484d":"#1e3a8a")},children:oo(p,{sx:{fontSize:20}})})}),s!==null?oo(Ii,{component:"input",autoFocus:!0,spellCheck:!1,value:s,onChange:C=>c(C.target.value),onBlur:()=>{s.trim()&&s.trim()!==e.title&&n(e.seq,s.trim()),c(null)},onKeyDown:C=>{C.key==="Enter"&&C.target.blur(),C.key==="Escape"&&c(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:18,fontWeight:500,color:"#37352f",p:0,m:0}}):l?oo(Ii,{sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:x?"\uACF5\uC9C0":M?"\uC77C\uC815":e.is_bug?"\uC624\uB958":"\uC5C5\uBB34"}):oo(Ii,{onClick:g?void 0:()=>c(e.title),sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:g?"default":"text",textDecoration:e.completed?"line-through":"none"},children:e.title}),oo(Qa,{title:u?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:oo(_i,{"aria-label":u?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>Un(e,u),sx:{color:"#6b7280"},children:u?oo(IT,{sx:{fontSize:20}}):oo(_T,{sx:{fontSize:20}})})}),a&&!l?oo(_i,{"aria-label":"\uB2EB\uAE30",onClick:a,sx:{color:"#6b7280"},children:oo(CT,{})}):null]}),oo(Wn,{anchorEl:m,value:e.icon||(x?So:""),color:e.icon_color||(x?"#e5484d":"#1e3a8a"),onSelect:C=>r(e.seq,C),onSelectColor:C=>i?.(e.seq,C),onClose:()=>d(null)})]})}import{useState as Pt}from"react";import{Box as io,Button as Gn,ButtonBase as XT,Checkbox as QT,Divider as hn,IconButton as JT,Menu as ZT,MenuItem as ey}from"@mui/material";import oy from"@mui/icons-material/ExpandLess";import ty from"@mui/icons-material/ExpandMore";import ny from"@mui/icons-material/ConfirmationNumberOutlined";import ry from"@mui/icons-material/Check";import iy from"@mui/icons-material/DirectionsRunOutlined";import ay from"@mui/icons-material/SpeedOutlined";import tl from"@mui/icons-material/CheckCircle";import ly from"@mui/icons-material/CheckCircleOutlineOutlined";import nl from"@mui/icons-material/CheckCircleOutlined";import xm from"@mui/icons-material/AccessTimeOutlined";import sy from"@mui/icons-material/AutorenewOutlined";import cy from"@mui/icons-material/LabelOutlined";import my from"@mui/icons-material/PersonOutlineOutlined";import uy from"@mui/icons-material/SubjectOutlined";import dy from"@mui/icons-material/StickyNote2Outlined";import py from"@mui/icons-material/PanToolAltOutlined";import{useState as ET}from"react";import{TextField as OT}from"@ehfuse/mui-form-controls";import{jsx as PT}from"react/jsx-runtime";function lm({value:e,onCommit:o,onDraftChange:t,readOnly:n=!1}){let[r,i]=ET(null);return PT(OT,{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 dm,useState as el}from"react";import{Box as fo,Button as pm,IconButton as KT}from"@mui/material";import UT from"@mui/icons-material/AccountTreeOutlined";import VT from"@mui/icons-material/Add";import GT from"@mui/icons-material/Close";import YT from"@mui/icons-material/NextPlanOutlined";function gn(e){return e.relations??[]}function iR(e,o,t){return gn(e).some(n=>n.type===t&&n.task_seq===o.seq)||gn(o).some(n=>n.type===t&&n.task_seq===e.seq)}function sm(e){return`${e.created_time??""}|${String(e.seq).padStart(12,"0")}`}function cm(e,o){let t=new Map(o.map(p=>[p.seq,p]));t.set(e.seq,e);let n=new Map,r=(p,x)=>{n.has(p)||n.set(p,new Set),n.has(x)||n.set(x,new Set),n.get(p).add(x),n.get(x).add(p)};for(let p of t.values())for(let x of gn(p))x.type==="follow_up"&&t.has(x.task_seq)&&r(p.seq,x.task_seq);let i=new Set([e.seq]),a=[e.seq];for(;a.length>0;){let p=a.shift();for(let x of n.get(p)??[])i.has(x)||(i.add(x),a.push(x))}let l=[...i].map(p=>t.get(p)).filter(p=>!!p).sort((p,x)=>sm(p).localeCompare(sm(x))),u=new Set;for(let p of gn(e))p.type==="related"&&u.add(p.task_seq);for(let p of t.values())p.seq!==e.seq&&gn(p).some(x=>x.type==="related"&&x.task_seq===e.seq)&&u.add(p.seq);let s=[...u].map(p=>t.get(p)).filter(p=>p!==void 0&&p.seq!==e.seq),c=[...t.values()].filter(p=>p.seq!==e.seq&&gn(p).some(x=>x.type==="duplicate_of"&&x.task_seq===e.seq)),m=gn(e).find(p=>p.type==="duplicate_of")?.task_seq,d=m?t.get(m)??null:null;return{lineage:l,related:s,duplicates:c,duplicateOf:d}}import{useEffect as RT,useMemo as zT,useState as Ja}from"react";import{Box as Vn,Button as qT,Tab as AT,Tabs as LT}from"@mui/material";import NT from"@mui/icons-material/Check";import{FormDialog as FT}from"@ehfuse/mui-form-dialog";import{ClearTextField as HT}from"@ehfuse/mui-form-controls";import{ErrorAlert as WT}from"@ehfuse/alerts";import{OverlayScrollbar as $T}from"@ehfuse/overlay-scrollbar";import{jsx as Lo,jsxs as Za}from"react/jsx-runtime";var mm=[{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 um({open:e,task:o,tasks:t,excludeSeqs:n=[],onClose:r,onSubmit:i}){let[a,l]=Ja("related"),[u,s]=Ja(""),[c,m]=Ja(0);RT(()=>{e&&(l("related"),s(""),m(0))},[e]);let d=zT(()=>{let T=new Set([o.seq,...n]),g=u.trim().toLowerCase();return t.filter(f=>T.has(f.seq)||f.is_event||f.is_notice?!1:g?f.title.toLowerCase().includes(g)||(f.ticket_no??"").toLowerCase().includes(g):!0)},[t,o.seq,n,u]),p=()=>{if(!c){WT("\uC5F0\uACB0\uD560 \uC5C5\uBB34\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}i(c,a),r()},x=mm.find(T=>T.type===a)?.hint??"",M=Za(Vn,{children:[Lo(LT,{value:a,onChange:(T,g)=>l(g),sx:{minHeight:38,mb:.75,"& .MuiTab-root":{minHeight:38,py:.5,fontSize:14}},children:mm.map(T=>Lo(AT,{value:T.type,label:T.label},T.type))}),Lo(Vn,{sx:{mb:1.5,fontSize:12.5,color:"#9a9a97"},children:x}),Lo(HT,{label:"\uC5C5\uBB34 \uAC80\uC0C9",placeholder:"\uC81C\uBAA9\xB7\uD2F0\uCF13\uBC88\uD638\uB85C \uAC80\uC0C9",value:u,onChange:T=>s(T.target.value),fullWidth:!0,autoFocus:!0}),Lo(Vn,{sx:{mt:1.5,height:300,border:"1px solid #e6e6e3",borderRadius:1},children:Lo($T,{style:{height:"100%"},children:d.length===0?Lo(Vn,{sx:{py:4,textAlign:"center",fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uD560 \uC218 \uC788\uB294 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):d.map(T=>{let g=Ue(T.icon||Oe),f=T.seq===c;return Za(Vn,{onClick:()=>m(f?0:T.seq),sx:{display:"flex",alignItems:"center",gap:.75,px:1.25,py:.75,cursor:"pointer",bgcolor:f?"#e3eefb":"transparent","&:hover":{bgcolor:f?"#e3eefb":"#f7f7f5"}},children:[g?Lo(g,{sx:{fontSize:17,flexShrink:0,color:T.icon_color||"#1e3a8a"}}):null,Za(Vn,{component:"span",sx:{flex:1,minWidth:0,fontSize:14,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[T.ticket_no?`${T.ticket_no} `:"",T.title]}),Lo(Pe,{option:Bo(T),small:!0}),f?Lo(NT,{sx:{fontSize:17,flexShrink:0,color:"#2f80ed"}}):null]},T.seq)})})})]});return Lo(FT,{open:e,onClose:r,maxWidth:"sm",title:"\uAD00\uB828 \uC5C5\uBB34 \uC5F0\uACB0",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-task-link",sections:[{id:"task-link",showTitle:!1,children:M}],actions:{showCancelButton:!0,right:Lo(qT,{variant:"contained",disabled:!c,onClick:p,children:"\uC5F0\uACB0"})}})}import{Fragment as jT,jsx as Ke,jsxs as jo}from"react/jsx-runtime";function ol({item:e,caption:o,onOpen:t,onUnlink:n}){let r=Ue(e.icon||Oe);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(Pe,{option:Bo(e),small:!0}),n?Ke(KT,{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(GT,{sx:{fontSize:15}})}):null]})}function fm({task:e,tasks:o,readOnly:t=!1,onOpenTask:n,onLink:r,onUnlink:i,onCreateFollowUp:a}){let[l,u]=el(!1),[s,c]=el(null),[m,d]=el(null),p=dm(()=>cm(e,o),[e,o]),x=p.lineage.length>=2,M=(x?p.lineage.length-1:0)+p.related.length+p.duplicates.length+(p.duplicateOf?1:0),T=dm(()=>{let f=new Set;for(let C of p.lineage)f.add(C.seq);for(let C of p.related)f.add(C.seq);for(let C of p.duplicates)f.add(C.seq);return p.duplicateOf&&f.add(p.duplicateOf.seq),[...f]},[p]),g=(f,C,v)=>{d({anchorEl:f,targetSeq:C,type:v})};return jo(Ao,{icon:Ke(UT,{sx:{fontSize:19,display:"block"}}),title:jo(jT,{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(pm,{size:"small",color:"inherit",startIcon:Ke(YT,{sx:{fontSize:16}}),onClick:f=>c(f.currentTarget),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uD6C4\uC18D \uC5C5\uBB34"}):null,r?Ke(pm,{size:"small",color:"inherit",startIcon:Ke(VT,{sx:{fontSize:16}}),onClick:()=>u(!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:[x?Ke(fo,{sx:{mb:p.related.length||p.duplicates.length||p.duplicateOf?1:0},children:p.lineage.map((f,C)=>{let v=f.seq===e.seq,R=C===p.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:v?9:7,height:v?9:7,borderRadius:"50%",bgcolor:v?"#2f80ed":f.completed?"#9a9a97":"#c9c8c5",flexShrink:0}}),R?null:Ke(fo,{sx:{width:"2px",flex:1,bgcolor:"#e6e6e3"}})]}),jo(fo,{sx:{flex:1,minWidth:0,pb:R?0:.5},children:[jo(fo,{sx:{display:"flex",alignItems:"center",gap:.75},children:[jo(fo,{component:"span",onClick:!v&&n?()=>n(f.seq):void 0,sx:{minWidth:0,fontSize:14,fontWeight:v?600:400,color:v?"#2f80ed":f.completed?"#9a9a97":"#37352f",textDecoration:f.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...!v&&n?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[f.ticket_no?`${f.ticket_no} `:"",f.title]}),Ke(Pe,{option:Bo(f),small:!0})]}),Ke(fo,{sx:{fontSize:12,color:"#9a9a97"},children:f.completed&&f.completed_time?`${f.completed_time} \uC644\uB8CC`:f.created_time??""})]})]},f.seq)})}):null,p.duplicateOf?Ke(ol,{item:p.duplicateOf,caption:"\uC6D0\uBCF8",onOpen:n?()=>n(p.duplicateOf.seq):void 0,onUnlink:!t&&i?f=>g(f.currentTarget,p.duplicateOf.seq,"duplicate_of"):void 0}):null,p.duplicates.map(f=>Ke(ol,{item:f,caption:"\uC911\uBCF5",onOpen:n?()=>n(f.seq):void 0,onUnlink:!t&&i?C=>g(C.currentTarget,f.seq,"duplicate_of"):void 0},`dup-${f.seq}`)),p.related.map(f=>Ke(ol,{item:f,onOpen:n?()=>n(f.seq):void 0,onUnlink:!t&&i?C=>g(C.currentTarget,f.seq,"related"):void 0},`rel-${f.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(um,{open:l,task:e,tasks:o,excludeSeqs:T,onClose:()=>u(!1),onSubmit:(f,C)=>r(e.seq,f,C)}):null,Ke(je,{open:!!s,anchorEl:s,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:()=>c(null),onConfirm:()=>{a?.(e.seq),c(null)}}),Ke(je,{open:!!m,anchorEl:m?.anchorEl??null,title:"\uC774 \uC5C5\uBB34\uC640\uC758 \uC5F0\uACB0\uC744 \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uD574\uC81C",onCancel:()=>d(null),onConfirm:()=>{m&&i?.(e.seq,m.targetSeq,m.type),d(null)}})]})}import{Fragment as _o,jsx as z,jsxs as Ge}from"react/jsx-runtime";function Yn({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return z(io,{component:"span",sx:{color:"#9a9a97"},children:e})}function gm({task:e,customTabs:o,statusOptions:t,avatarSrcByName:n,onChangeStatus:r,onChangeLabels:i,onAddLabelOption:a,onChangeProject:l,onAddProject:u,onChangeDate:s,onChangeReminder:c,onMemberEdit:m,onChangePriority:d,onChangeEstimatedTime:p,onChangeEventTime:x,onChangeEventPlace:M,onChangeEventAddress:T,onChangeNote:g,onChangeContent:f,onAddChecklistItem:C,onToggleChecklistItem:v,onRemoveChecklistItem:R,onUpdateChecklistItem:y,onConvertChecklistToTask:_,onOpenChecklistTask:k,resolveChecklistTask:S,relatedTasksPool:w,onOpenRelatedTask:K,onLinkRelatedTask:h,onUnlinkRelatedTask:b,onCreateFollowUpTask:A,onAddAttachments:L,onRemoveAttachment:F,onPreview:q,onDownload:re,onUpdateComment:le,onRemoveComment:de,onToggleCommentReaction:ie,currentUserName:be="",myAccountSeq:ee=0,noticeAdmin:ae=!1,hideProject:ke=!1,hideLabel:fe=!1,showTitle:ze=!1,onChangeTitle:H,onToggleCompleted:N,onChangeIcon:J,onChangeIconColor:B,employees:D=[],onAckConfirm:Y,onRequestConfirm:oe,onChangeBugField:Se,sprints:O=[],sprintProject:pe=!1,hideSprint:Te=!1,onChangeSprint:ce,onChangeStoryPoints:U,onChangeResolution:Be,onClaimTask:$,onVerifyBug:Ye}){let[so,ut]=Pt(null),[qt,Fo]=Pt(null),[Do,dt]=Pt(null),[Qt,Ho]=Pt(null),[Jt,Oo]=Pt(!1),Jo={[Vo]:Jt?{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"}},[Ee,P]=Pt(null),[W,j]=Pt(null),[se,qe]=Pt(null),[Ae,to]=Pt(null),Q=!!e.is_notice,_e=!!e.is_event,Le=!!e.is_bug,Ze=!!$&&Nr(e,ee),Zo=!!$&&Fr(e,ee),Wo=!!Ye&&Le&&!!e.completed&&ee>0&&(e.author_account_seq??0)===ee&&!(e.acks??[]).some(E=>E.account_seq===ee),Ne=!xt(e,ee),et=!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),Jn=vn(e.icon||(e.is_notice?So:e.is_event?"event":Oe)),Cn=Q?!Lr(e,ee):Ne,Zt=Ze||Zo?Ge(Mn,{onClick:E=>to(E.currentTarget),children:[z(py,{sx:{fontSize:16,mr:.5}}),"\uAC00\uC838\uAC00\uAE30"]}):null,wr=Q?Ci(e,D):"",co=Q?Fc(e,D,ee):null,lo=!Q&&!_e?Qr(e,ee):null,Zn=!!(lo&&lo.total>0||Q&&co);return Ge(_o,{children:[ze?Ge(io,{sx:{px:2,pt:2,pb:.5,display:"flex",alignItems:"flex-start",gap:1},children:[et?z(QT,{checked:e.completed,icon:z(ly,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:z(tl,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(E,Dr)=>{Do||dt({anchorEl:E.currentTarget,nextCompleted:Dr})},sx:{p:0,mt:.25}}):null,z(JT,{size:"small","aria-label":"\uC544\uC774\uCF58 \uBCC0\uACBD",onClick:Ne?void 0:E=>Fo(E.currentTarget),sx:{p:0,mt:.25,color:e.icon_color||(Q?"#e5484d":"#1e3a8a")},children:z(Jn,{sx:{fontSize:20}})}),z(io,{sx:{flex:1,minWidth:0},children:so!==null?z(io,{component:"input",autoFocus:!0,spellCheck:!1,value:so,onChange:E=>ut(E.target.value),onBlur:()=>{so.trim()&&so.trim()!==e.title&&H(e.seq,so.trim()),ut(null)},onKeyDown:E=>{E.key==="Enter"&&E.target.blur(),E.key==="Escape"&&ut(null)},sx:{width:"100%",border:"none",outline:"none",font:"inherit",fontSize:19,fontWeight:600,color:"#37352f",p:0,m:0}}):z(io,{onClick:()=>ut(e.title),sx:{fontSize:19,fontWeight:600,color:"#37352f",lineHeight:1.35,cursor:"text",textDecoration:e.completed?"line-through":"none",userSelect:"text"},children:e.title})}),z(je,{open:!!Do,anchorEl:Do?.anchorEl??null,title:Do?.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:Do?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>dt(null),onConfirm:()=>{Do&&N(e.seq,Do.nextCompleted),dt(null)}}),z(Wn,{anchorEl:qt,value:e.icon||(Q?So:""),color:e.icon_color||(Q?"#e5484d":"#1e3a8a"),onSelect:E=>J(e.seq,E),onSelectColor:E=>B?.(e.seq,E),onClose:()=>Fo(null)})]}):null,Ge(io,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:0,[Vo]:{pb:0,"& > :last-child":{mb:0}}},children:[z(fi,{hideProject:ke,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:!_e,notice:Q,event:_e,readOnly:Ne,targetSummary:wr,onChangeProject:E=>l(e.seq,E),onAddProject:u,onChangeStartDate:E=>s(e.seq,"start_date",E),onChangeDueDate:E=>s(e.seq,"due_date",E),onChangeReminder:E=>c(e.seq,E),onChangePriority:E=>d(e.seq,E),onChangeEstimatedTime:E=>p(e.seq,E),onChangeEventTime:E=>x?.(e.seq,E),onChangeEventPlace:E=>M?.(e.seq,E),onChangeEventAddress:E=>T?.(e.seq,E),onMemberEdit:E=>m(e,E),narrowCollapsedSx:Jo,reminderLocked:e.completed,managerAction:Zt,leading:Ge(_o,{children:[Wo||Zt&&(Q||_e)?Ge(io,{sx:{gridColumn:"1 / -1",display:"flex",justifyContent:"flex-start",gap:2,px:2,py:1.5},children:[Q||_e?Zt:null,Wo?Ge(_o,{children:[z(Gn,{variant:"contained",size:"large",onClick:()=>Ye?.(e.seq,!0),sx:{bgcolor:"#2f80ed"},children:"\uAC80\uC99D\uC644\uB8CC"}),z(Gn,{variant:"outlined",size:"large",color:"error",onClick:()=>Ye?.(e.seq,!1),children:"\uC7AC\uC624\uD508"})]}):null]}):null,Le&&e.ticket_no?z(ue,{icon:z(ny,{sx:{fontSize:17}}),label:"\uD2F0\uCF13",children:z(io,{component:"span",sx:{fontVariantNumeric:"tabular-nums"},children:e.ticket_no})}):null,_e?null:z(io,{sx:Le&&e.ticket_no||Zn?void 0:{gridColumn:"1 / -1"},children:z(ue,{icon:z(sy,{sx:{fontSize:17}}),label:"\uC0C1\uD0DC",onClick:Ne||e.completed?void 0:E=>P(E),children:z(Pe,{option:Bo(e)})})}),lo&&lo.total>0?z(io,{children:z(ue,{icon:z(nl,{sx:{fontSize:17}}),label:"\uD655\uC778",children:lo.canConfirm?z(Gn,{size:"small",variant:"contained",onClick:()=>Y?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):Ge(Gn,{size:"small",variant:"outlined",color:"inherit",startIcon:lo.myTime?z(tl,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:E=>Ho({anchorEl:E.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:[lo.count," / ",lo.total]})})}):null,Q&&co?z(io,{children:z(ue,{icon:z(nl,{sx:{fontSize:17}}),label:"\uD655\uC778",children:z(io,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,minWidth:0},children:co.canAck?z(Gn,{size:"small",variant:"contained",onClick:()=>Y?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):z(Gn,{size:"small",variant:"outlined",color:"inherit",startIcon:co.acked?z(tl,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:E=>Ho({anchorEl:E.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:co.total>0&&co.count>=co.total?"\uC644\uB8CC":Ge(_o,{children:[co.count,z(io,{component:"span",sx:{mx:.4},children:"/"}),co.total]})})})})}):null,pe&&!Te&&!_e&&!Q?Ge(_o,{children:[z(ue,{icon:z(iy,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:Ne?void 0:E=>j(E),children:(e.sprint_seq??0)>0?O.find(E=>E.seq===e.sprint_seq)?.name??"\uC0AD\uC81C\uB41C \uC2A4\uD504\uB9B0\uD2B8":z(Yn,{label:"\uBBF8\uBC30\uC815"})}),z(ue,{icon:z(ay,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",children:z(Ot,{value:(e.story_points??0)>0?String(e.story_points):"",placeholder:"\uBBF8\uCD94\uC815",readOnly:Ne,onCommit:E=>U?.(e.seq,Number(E.replace(/[^0-9.]/g,""))||0)})})]}):null,_e||fe?null:z(io,{sx:[{gridColumn:"1 / -1"},Jo??null],children:z(ue,{icon:z(cy,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:Ne?void 0:E=>qe(E),children:(e.label_keys??[]).length>0?z(At,{labelKeys:e.label_keys??[],labelOptions:t}):z(Yn,{})})})]}),trailing:Ge(_o,{children:[Le?z(xi,{values:{repro:e.bug_repro??"",device:e.bug_device??"",where:e.bug_where??"",version:e.bug_version??"",resolution:e.resolution??""},readOnly:Ne,showResolution:!!e.completed,onChangeRepro:E=>Se?.(e.seq,"bug_repro",E),onChangeDevice:E=>Se?.(e.seq,"bug_device",E),onChangeWhere:E=>Se?.(e.seq,"bug_where",E),onChangeVersion:E=>Se?.(e.seq,"bug_version",E),onChangeResolution:E=>Be?.(e.seq,E)}):null,z(ue,{icon:z(my,{sx:{fontSize:17}}),label:"\uC791\uC131\uC790",sx:[uo(9),Jo??null],children:e.created_by?Ge(_o,{children:[z(Co,{names:[e.created_by],size:20,avatarSrcByName:n}),e.created_by]}):z(Yn,{})}),z(ue,{icon:z(xm,{sx:{fontSize:17}}),label:"\uC791\uC131\uC2DC\uAC04",sx:[uo(11),Jo??null],children:e.created_time?gt(e.created_time):z(Yn,{})}),e.completed?Ge(_o,{children:[z(ue,{icon:z(nl,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC790",sx:[uo(10),Jo??null],children:e.completed_by?Ge(_o,{children:[z(Co,{names:[e.completed_by],size:20,avatarSrcByName:n}),e.completed_by]}):z(Yn,{})}),z(ue,{icon:z(xm,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC2DC\uAC04",sx:[uo(12),Jo??null],children:e.completed_time?gt(e.completed_time):z(Yn,{})})]}):null]})}),Ge(io,{sx:{display:"none",[Vo]:{display:"block",mt:1.5,mb:0}},children:[z(hn,{sx:{borderColor:"#e6e6e3"}}),z(XT,{onClick:()=>Oo(E=>!E),sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",gap:.5,pt:1.25,pb:1.25,fontSize:13.5,bgcolor:"#f4f4f2",color:"#37352f","&:active":{opacity:.6}},children:Jt?Ge(_o,{children:["\uC811\uAE30 ",z(oy,{sx:{fontSize:18}})]}):Ge(_o,{children:["\uC815\uBCF4 \uB354\uBCF4\uAE30 ",z(ty,{sx:{fontSize:18}})]})})]}),Ge(io,{children:[z(hn,{sx:{my:1.5,borderColor:"#e6e6e3",[Vo]:{mt:0,mb:1.25}}}),z(Ao,{icon:z(uy,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",children:z(io,{sx:{userSelect:"text"},children:z(gi,{syncKey:e.seq,value:e.content??"",readOnly:Ne,onChange:E=>f(e.seq,E)})})}),e.is_bug?null:Ge(_o,{children:[z(hn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),z(Ao,{icon:z(dy,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:z(io,{sx:{userSelect:"text"},children:z(lm,{value:e.note,readOnly:Cn,onCommit:E=>g(e.seq,E)})})})]}),_e?null:Ge(_o,{children:[z(hn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),z(bi,{taskSeq:e.seq,checklist:e.checklist??[],removeLocked:Cn,onAdd:C,onToggle:v,onRemove:R,onUpdate:y,onConvertToTask:_,onOpenLinkedTask:k,resolveLinkedTask:S})]}),w&&!_e&&!Q?Ge(_o,{children:[z(hn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),z(fm,{task:e,tasks:w,readOnly:Ne,onOpenTask:K,onLink:h,onUnlink:b,onCreateFollowUp:A})]}):null,z(hn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),z(yi,{taskSeq:e.seq,attachments:e.attachments??[],removeLocked:Cn,onAdd:L,onRemove:F,onPreview:q?E=>q({...E,taskSeq:e.seq}):void 0,onDownload:re?E=>re({...E,taskSeq:e.seq}):void 0})]}),z(hn,{sx:{my:1.5,borderColor:"#e6e6e3"}}),z(em,{taskSeq:e.seq,comments:e.comments??[],currentUserName:be,myAccountSeq:ee,avatarSrcByName:n,onUpdate:le,onRemove:de,onToggleReaction:ie})]}),z(Ar,{anchorEl:Ee,value:e.status,options:Q?rr:Le?on:ir,onSelect:E=>r(e.seq,E),onClose:()=>P(null)}),z(ZT,{transitionDuration:0,anchorEl:W,open:!!W,onClose:()=>j(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...O.filter(E=>`custom-${E.group_seq}`===String(e.tab_key??"")).map(E=>({seq:E.seq,label:zo(E)}))].map(E=>Ge(ey,{onClick:()=>{ce?.(e.seq,E.seq),j(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[E.label,(e.sprint_seq??0)===E.seq?z(ry,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},E.seq))}),z(Xr,{anchorEl:Qt?.anchorEl??null,open:!!Qt?.open,acks:e.acks??[],total:co?.total??lo?.total??0,avatarSrcByName:n,onRequestConfirm:oe&&lo&&lo.count<lo.total?()=>{oe(e.seq),Ho(E=>E?{...E,open:!1}:null)}:void 0,onClose:()=>Ho(E=>E?{...E,open:!1}:null)}),z(Bi,{anchorEl:se,selectedKeys:e.label_keys??[],labelOptions:t,onToggle:E=>i(e.seq,zr(e.label_keys??[],E)),onAddLabel:a,onClose:()=>qe(null)}),z(je,{open:!!Ae,anchorEl:Ae,title:Ze?"\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:()=>to(null),onConfirm:()=>{$?.(e.seq),to(null)}})]})}import{jsx as Eo,jsxs as Ty}from"react/jsx-runtime";function L2(){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 N2({open:e,task:o,onClose:t,onAddComment:n,onSaveFields:r,myAccountSeq:i=0,onToggleCompleted:a,onChangeTitle:l,onChangeIcon:u,onChangeIconColor:s,...c}){let m=Fe(),d=bm(null);o&&(d.current=o);let p=o??d.current,[x,M]=fy({}),T=Object.keys(x).length>0;hm(()=>{M({})},[o?.seq,e]);let g=bm(null);if(hm(()=>{g.current?.scrollTo({top:0})},[o?.seq]),!p)return null;let f=m&&T?{...p,...x}:p,C=(k,S)=>{m?M(w=>({...w,...k})):S()},v=()=>{let k=x;M({});let S=p.seq,w=k.title===void 0?void 0:String(k.title).trim();if(r){let K={...k};w!==void 0&&(w?K.title=w:delete K.title),Object.keys(K).length>0&&r(S,K),Tm({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"});return}w&&l(S,w),k.icon!==void 0&&u(S,String(k.icon)),k.icon_color!==void 0&&s?.(S,String(k.icon_color)),k.status!==void 0&&c.onChangeStatus(S,k.status),k.label_keys!==void 0&&c.onChangeLabels(S,k.label_keys??[]),k.tab_key!==void 0&&c.onChangeProject(S,String(k.tab_key??"")),k.start_date!==void 0&&c.onChangeDate(S,"start_date",String(k.start_date??"")),k.due_date!==void 0&&c.onChangeDate(S,"due_date",String(k.due_date??"")),k.reminder!==void 0&&c.onChangeReminder(S,k.reminder),k.priority!==void 0&&c.onChangePriority(S,k.priority),k.estimated_time!==void 0&&c.onChangeEstimatedTime(S,String(k.estimated_time??"")),k.event_time!==void 0&&c.onChangeEventTime?.(S,String(k.event_time??"")),k.event_place!==void 0&&c.onChangeEventPlace?.(S,String(k.event_place??"")),k.event_address!==void 0&&c.onChangeEventAddress?.(S,String(k.event_address??"")),k.content!==void 0&&c.onChangeContent(S,String(k.content??"")),k.note!==void 0&&c.onChangeNote(S,String(k.note??"")),Tm({message:"\uC800\uC7A5\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",position:"center"})},R={...c,onChangeStatus:(k,S)=>C({status:S},()=>c.onChangeStatus(k,S)),onChangeLabels:(k,S)=>C({label_keys:S},()=>c.onChangeLabels(k,S)),onChangeProject:(k,S)=>C({tab_key:S},()=>c.onChangeProject(k,S)),onChangeDate:(k,S,w)=>C({[S]:w},()=>c.onChangeDate(k,S,w)),onChangeReminder:(k,S)=>C({reminder:S},()=>c.onChangeReminder(k,S)),onChangePriority:(k,S)=>C({priority:S},()=>c.onChangePriority(k,S)),onChangeEstimatedTime:(k,S)=>C({estimated_time:S},()=>c.onChangeEstimatedTime(k,S)),onChangeEventTime:(k,S)=>C({event_time:S},()=>c.onChangeEventTime?.(k,S)),onChangeEventPlace:(k,S)=>C({event_place:S},()=>c.onChangeEventPlace?.(k,S)),onChangeEventAddress:(k,S)=>C({event_address:S},()=>c.onChangeEventAddress?.(k,S)),onChangeContent:(k,S)=>C({content:S},()=>c.onChangeContent(k,S)),onChangeNote:(k,S)=>C({note:S},()=>c.onChangeNote(k,S))},y=Eo(gm,{...R,task:f,myAccountSeq:i,onChangeTitle:(k,S)=>C({title:S},()=>l(k,S)),onToggleCompleted:a,onChangeIcon:(k,S)=>C({icon:S},()=>u(k,S)),onChangeIconColor:(k,S)=>C({icon_color:S},()=>s?.(k,S)),showTitle:m}),_=Eo(om,{onSubmit:(k,S)=>n(f.seq,k,S)},f.seq);return m?Eo(ky,{open:e,onClose:t,locale:"ko",fontScale:{enabled:!0,default:1.1,min:.6},title:f.is_notice?"\uACF5\uC9C0\uC0AC\uD56D":f.is_event?"\uC77C\uC815":f.is_bug?"\uC624\uB958":"\uC5C5\uBB34",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1},custom:[{icon:Eo(hy,{sx:{ml:2,color:"#6b7280"}}),tooltip:"\uACF5\uC720\uD558\uAE30",onClick:()=>Un(f,!0)},{icon:Eo(xy,{variant:"contained",size:"small",disableElevation:!0,disabled:!T,onClick:T?v: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:_},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:Eo(wi,{sx:{userSelect:"none",width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:y})}]},p.seq):Eo(gy,{anchor:"right",open:e,onClose:t,sx:{zIndex:k=>k.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:Ty(wi,{sx:{display:"flex",flexDirection:"column",height:"100%",userSelect:"none"},children:[Eo(am,{task:f,myAccountSeq:i,onToggleCompleted:a,onChangeTitle:l,onChangeIcon:u,onChangeIconColor:s,onClose:t}),Eo(km,{sx:{borderColor:"#e6e6e3"}}),Eo(wi,{sx:{flex:1,minHeight:0},children:Eo(by,{ref:g,style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:y})}),Eo(km,{sx:{borderColor:"#37352f"}}),Eo(wi,{sx:{flexShrink:0},children:_})]})})}import{useEffect as Sy,useState as bn}from"react";import{Box as wo,Button as al,IconButton as ym}from"@mui/material";import{FormDialog as By}from"@ehfuse/mui-form-dialog";import Cy from"@mui/icons-material/EditOutlined";import{ErrorAlert as Sm}from"@ehfuse/alerts";import{ClearTextField as Bm,DateTextField as Cm,LabelSelect as vm}from"@ehfuse/mui-form-controls";var rl="custom-";function yy(e){return e.startsWith(rl)}function W2(e){return e>0?`${rl}${e}`:""}function il(e){if(!yy(e))return 0;let o=Number(e.slice(rl.length));return Number.isInteger(o)&&o>0?o:0}import{Fragment as Iy,jsx as Qe,jsxs as Xt}from"react/jsx-runtime";var vy=[{value:"planning",label:"\uACC4\uD68D\uC911"},{value:"active",label:"\uC9C4\uD589\uC911"},{value:"closed",label:"\uC885\uB8CC"}];function Im(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):"-"}function J2({open:e,customTabs:o,sprints:t,onClose:n,onCreate:r,onUpdate:i,onChangeStatus:a,onRemove:l}){let u=o.filter(h=>h.useSprints&&!h.archived),[s,c]=bn(""),[m,d]=bn(""),[p,x]=bn(""),[M,T]=bn(""),[g,f]=bn(""),[C,v]=bn(!1),[R,y]=bn(0);Sy(()=>{e&&(c(u.length===1?u[0].key:""),d(""),x(""),T(""),f(""),y(0))},[e]);let _=()=>{d(""),x(""),T(""),f(""),y(0)},k=h=>{y(h.seq),c(`custom-${h.group_seq}`),d(h.name),x(h.goal),T(h.start_date),f(h.end_date)},S=async()=>{let h=il(s);if(!h){Sm("\uBAA9\uD45C\uB97C \uB9CC\uB4E4 \uD504\uB85C\uC81D\uD2B8\uB97C \uC120\uD0DD\uD558\uC138\uC694.");return}if(!m.trim()){Sm("\uBAA9\uD45C \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694.");return}v(!0);try{if(R>0){i(R,{name:m.trim(),goal:p.trim(),start_date:M,end_date:g}),_();return}await r({group_seq:h,name:m.trim(),goal:p.trim(),start_date:M,end_date:g})&&_()}finally{v(!1)}},w=new Map(o.map(h=>[il(h.key),h.label])),K=Qe(wo,{children:u.length===0?Qe(wo,{sx:{py:2,fontSize:14,color:"#787774"},children:'\uBAA9\uD45C\uB97C \uC0AC\uC6A9\uD558\uB294 \uD504\uB85C\uC81D\uD2B8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. \uD504\uB85C\uC81D\uD2B8 \uC218\uC815\uC5D0\uC11C "\uBAA9\uD45C(\uC2A4\uD504\uB9B0\uD2B8) \uC0AC\uC6A9"\uC744 \uBA3C\uC800 \uCF1C\uC138\uC694.'}):Xt(Iy,{children:[Xt(wo,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2.5,mt:1},children:[Qe(vm,{label:"\uD504\uB85C\uC81D\uD2B8",size:"medium",value:s,options:u.map(h=>({value:h.key,label:h.label})),onChange:h=>c(String(h.target.value)),disabled:R>0}),Qe(Bm,{label:"\uBAA9\uD45C \uC774\uB984",size:"medium",placeholder:"\uC608: 8\uC6D4 2\uC8FC\uCC28",value:m,onChange:h=>d(h.target.value)}),Qe(Cm,{size:"medium",label:"\uC2DC\uC791\uC77C",value:M,onChange:h=>T(h.target.value)}),Qe(Cm,{size:"medium",label:"\uC885\uB8CC\uC77C",value:g,onChange:h=>f(h.target.value)}),Qe(Bm,{label:"\uC124\uBA85",size:"medium",placeholder:"\uC120\uD0DD \uC785\uB825",value:p,onChange:h=>x(h.target.value),sx:{gridColumn:"1 / -1"}})]}),Xt(wo,{sx:{mt:1.5,display:"flex",justifyContent:"flex-end",gap:1},children:[R>0?Qe(al,{color:"inherit",onClick:_,disabled:C,children:"\uCDE8\uC18C"}):null,Qe(al,{variant:"contained",onClick:()=>{S()},disabled:C,children:R>0?"\uBAA9\uD45C \uC800\uC7A5":"\uBAA9\uD45C \uB9CC\uB4E4\uAE30"})]}),Qe(wo,{sx:{mt:2,borderTop:"1px solid #e6e6e3"},children:t.length===0?Qe(wo,{sx:{py:3,textAlign:"center",fontSize:14,color:"#9a9a97"},children:"\uB4F1\uB85D\uB41C \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):t.map(h=>Xt(wo,{sx:{display:"flex",flexDirection:"column",gap:1,py:1.75,borderBottom:"1px solid #f0efed"},children:[Xt(wo,{sx:{minWidth:0},children:[Xt(wo,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[Qe(wo,{component:"span",sx:{fontSize:16,fontWeight:600,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:h.name}),Qe(wo,{component:"span",sx:{flexShrink:0,px:1,py:.25,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:13,fontWeight:500},children:w.get(h.group_seq)??"\uC0AD\uC81C\uB41C \uD504\uB85C\uC81D\uD2B8"}),Xt(wo,{component:"span",sx:{flexShrink:0,fontSize:14,color:"#57564f"},children:[Im(h.start_date)," ~ ",Im(h.end_date)]})]}),h.goal?Qe(wo,{sx:{mt:.5,fontSize:14,color:"#787774",lineHeight:1.5},children:h.goal}):null]}),Xt(wo,{sx:{display:"flex",alignItems:"center",gap:.5},children:[Qe(vm,{label:"\uC0C1\uD0DC",showLabel:!1,size:"small",value:h.status,options:vy.map(b=>({value:b.value,label:b.label})),onChange:b=>a(h.seq,String(b.target.value)),sx:{width:104,flexShrink:0}}),Qe(ym,{"aria-label":"\uBAA9\uD45C \uC218\uC815",onClick:()=>k(h),sx:{color:"#9a9a97","&:hover":{color:"#2563eb"}},children:Qe(Cy,{sx:{fontSize:18}})}),Qe(ym,{"aria-label":"\uBAA9\uD45C \uC0AD\uC81C",onClick:()=>l(h.seq),sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:Qe(Tt,{style:{width:16,height:16}})})]})]},h.seq))})]})});return Qe(By,{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:K}],actions:{showCancelButton:!1,right:Qe(al,{variant:"contained",onClick:n,children:"\uB2EB\uAE30"})}})}import{useState as _m}from"react";import{Box as ao,Button as ll,Divider as _y,IconButton as wy,TextField as Dy}from"@mui/material";import{FormDialog as My}from"@ehfuse/mui-form-dialog";import Ey from"@mui/icons-material/OpenInNewOutlined";import Oy from"@mui/icons-material/EventOutlined";import{ConfirmDialog as Py}from"@ehfuse/alerts";import{jsx as Me,jsxs as kn}from"react/jsx-runtime";function sz({open:e,imports:o,onRegister:t,onRemove:n,onClose:r}){let[i,a]=_m(""),[l,u]=_m(!1),s=async()=>{let d=i.trim();if(d){u(!0);try{await t(d)&&a("")}finally{u(!1)}}},c=async d=>{await Py({title:"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",message:`"${d.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}" \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&n(d.seq)},m=kn(ao,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[kn(ao,{sx:{color:"#37352f",lineHeight:1.7},children:["\uAD6C\uAE00 \uCE98\uB9B0\uB354\uC758 \uC77C\uC815\uC744 ",Me("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uC5C5\uBB34\uD568 \uCE98\uB9B0\uB354\uC5D0 \uD568\uAED8 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4.",Me("br",{}),"\uD45C\uC2DC/\uC228\uAE40\uC740 \uC5C5\uBB34\uD568 \uC6B0\uC0C1\uB2E8\uC758 ",Me("b",{children:"\uAD6C\uAE00 \uC77C\uC815"})," \uC2A4\uC704\uCE58\uB85C \uCF1C\uACE0 \uB055\uB2C8\uB2E4."]}),Me(ao,{sx:{fontWeight:700,color:"#37352f",mt:.5},children:"\uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354"}),o.length>0?Me(ao,{sx:{display:"flex",flexDirection:"column",border:"1px solid #e6e6e3",borderRadius:1},children:o.map((d,p)=>kn(ao,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:.75,borderTop:p>0?"1px solid #efefed":"none"},children:[Me(Oy,{sx:{fontSize:18,color:"#0f9d58",flexShrink:0}}),Me(ao,{component:"span",sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:d.name||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),Me(wy,{"aria-label":"\uAC00\uC838\uC624\uAE30 \uD574\uC81C",size:"small",onClick:()=>{c(d)},sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:Me(Tt,{sx:{fontSize:18}})})]},d.seq))}):Me(ao,{sx:{color:"#9a9a97",px:.5},children:"\uC544\uC9C1 \uB4F1\uB85D\uB41C \uCE98\uB9B0\uB354\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}),Me(_y,{sx:{my:1,borderColor:"#e6e6e3"}}),Me(ao,{sx:{fontWeight:700,color:"#37352f"},children:"\uC0C8 \uCE98\uB9B0\uB354 \uAC00\uC838\uC624\uAE30"}),kn(ao,{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:[Me(ao,{children:kn(ao,{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 > ",Me("b",{children:"\uC124\uC815 \uBC0F \uACF5\uC720"}),"\uB97C \uC5FD\uB2C8\uB2E4."]})}),Me(ao,{children:kn(ao,{component:"span",children:[Me("b",{children:"\uCE98\uB9B0\uB354 \uD1B5\uD569"})," \uC139\uC158\uC758 ",Me("b",{children:'"iCal \uD615\uC2DD\uC758 \uBE44\uBC00 \uC8FC\uC18C"'})," \uB97C \uBCF5\uC0AC\uD574 \uC544\uB798\uC5D0 \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),Me(ao,{children:Me(ao,{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."})}),Me(ao,{children:Me(ao,{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."})})]}),kn(ao,{sx:{display:"flex",gap:2,alignItems:"center"},children:[Me(Dy,{value:i,onChange:d=>a(d.target.value),fullWidth:!0,label:"\uBE44\uBC00 iCal \uC8FC\uC18C",placeholder:"https://calendar.google.com/calendar/ical/\u2026/basic.ics",slotProps:{input:{spellCheck:!1}}}),Me(ll,{variant:"contained",disabled:!i.trim()||l,onClick:()=>{s()},sx:{flexShrink:0},children:l?"\uD655\uC778 \uC911\u2026":"\uB4F1\uB85D"})]})]});return Me(My,{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:m}],actions:{showCancelButton:!1,left:Me(ll,{variant:"outlined",startIcon:Me(Ey,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:Me(ll,{variant:"contained",onClick:r,children:"\uB2EB\uAE30"})}})}import{Box as Rt,Button as Br,TextField as Ry}from"@mui/material";import{FormDialog as zy}from"@ehfuse/mui-form-dialog";import qy from"@mui/icons-material/ContentCopyOutlined";import wm from"@mui/icons-material/OpenInNewOutlined";import{InfoAlert as Dm}from"@ehfuse/alerts";import{Fragment as Ly,jsx as Je,jsxs as Tn}from"react/jsx-runtime";function Ay(e){return`${window.location.origin}/api/v1/taskbox/calendar/${e}.ics`}function gz({open:e,feed:o,feedTaskCount:t,buildFeedUrl:n,onSubscribe:r,onClose:i}){let a=n??Ay,l=o.subscribed?a(o.token):"",u=()=>{navigator.clipboard.writeText(l).then(()=>Dm("\uD53C\uB4DC \uC8FC\uC18C\uB97C \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>Dm("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uC8FC\uC18C\uB97C \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD558\uC138\uC694."))},s=()=>{let m=l.replace(/^https?:\/\//,"webcal://");window.open(`https://calendar.google.com/calendar/r?cid=${encodeURIComponent(m)}`,"_blank")},c=Tn(Rt,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[Tn(Rt,{sx:{color:"#37352f",lineHeight:1.7},children:["\uB0B4\uAC00 \uAD00\uC5EC\uD55C \uC5C5\uBB34\uB97C ",Je("b",{children:"\uC77D\uAE30\uC804\uC6A9"}),"\uC73C\uB85C \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0\uC11C \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4."]}),t===0?Tn(Rt,{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.",Je("br",{}),Je("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?Tn(Ly,{children:[Je(Ry,{value:l,fullWidth:!0,label:"\uB0B4 \uD53C\uB4DC \uC8FC\uC18C",slotProps:{input:{readOnly:!0}}}),Tn(Rt,{sx:{display:"flex",gap:2},children:[Je(Br,{variant:"outlined",startIcon:Je(qy,{}),onClick:u,children:"\uC8FC\uC18C \uBCF5\uC0AC"}),Je(Br,{variant:"contained",startIcon:Je(wm,{}),onClick:s,children:"Google \uCE98\uB9B0\uB354\uC5D0 \uCD94\uAC00"})]}),Tn(Rt,{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:[Je(Rt,{children:Tn("span",{children:["\uBC84\uD2BC\uC774 \uB3D9\uC791\uD558\uC9C0 \uC54A\uC73C\uBA74 \uAD6C\uAE00 \uCE98\uB9B0\uB354 > \uB2E4\uB978 \uCE98\uB9B0\uB354 + > ",Je("b",{children:"URL\uB85C \uCD94\uAC00"}),"\uC5D0 \uC704 \uC8FC\uC18C\uB97C \uBD99\uC5EC\uB123\uC73C\uC138\uC694."]})}),Je(Rt,{children:Je("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."})}),Je(Rt,{children:Je("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."})}),Je(Rt,{children:Je("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."})})]})]}):Je(Br,{variant:"contained",onClick:r,sx:{alignSelf:"flex-start"},children:"\uAD6C\uB3C5 \uC2DC\uC791 (\uD53C\uB4DC \uBC1C\uAE09)"})]});return Je(zy,{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:c}],actions:{showCancelButton:!1,left:Je(Br,{variant:"outlined",startIcon:Je(wm,{sx:{fontSize:16}}),onClick:()=>window.open("https://calendar.google.com/calendar","_blank"),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354"}),right:Je(Br,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}import{useEffect as Ny,useMemo as sl,useState as cl}from"react";import{Box as Cr,Button as Fy,Typography as Hy}from"@mui/material";import{FormDialog as Wy}from"@ehfuse/mui-form-dialog";import{SearchTextField as $y}from"@ehfuse/mui-form-controls";import{TreeView as Ky}from"@ehfuse/tree-view";import{Fragment as Xy,jsx as Xo,jsxs as Qy}from"react/jsx-runtime";function Mm(e){return`${e.name}#${e.seq}`}function Uy(e){return Number(e.slice(e.lastIndexOf("#")+1))||0}function Vy(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 Gy(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 Yy(e){let o=[[e.name,e.role_name].filter(Boolean).join(" "),e.department].filter(Boolean).join(" / ");return{id:`emp:${e.seq}`,label:Mm(e),renderLabel:Xo(Cr,{component:"span",sx:{display:"inline-flex",alignItems:"baseline",gap:.75},children:Xo(Cr,{component:"span",sx:{fontWeight:400,color:"text.primary"},children:o})})}}function Em(e,o){let t=(e.groups??[]).map(r=>Em(r,o)).filter(r=>r!==null),n=(e.employees??[]).filter(r=>Gy(r,o)).map(Yy);return t.length===0&&n.length===0?null:{id:`group:${e.key}`,label:e.name,children:[...t,...n]}}function jy({groups:e,allEmployees:o,initialSelectedSeqs:t,multiple:n,isMobile:r,onSelectionChange:i}){let[a,l]=cl(""),u=sl(()=>e.map(c=>Em(c,a.trim().toLowerCase())).filter(c=>c!==null),[e,a]),s=sl(()=>o.filter(c=>t.includes(c.seq)).map(Mm),[]);return Qy(Xy,{children:[Xo(Cr,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:Xo($y,{size:"small",fullWidth:!0,placeholder:"\uC774\uB984, \uBD80\uC11C \uAC80\uC0C9",onSearch:l,onClear:()=>l(""),sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),Xo(Cr,{sx:r?{display:"flex",flexDirection:"column"}:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:Xo(Ky,{items:u,checkbox:!0,multiSelect:n,selectionMode:"child",showSearch:!1,defaultExpanded:!0,initialSelections:s,onChange:c=>i(c.map(Uy).filter(m=>m>0)),styles:{border:"none",borderRadius:"0"}})})]})}function vz({open:e,title:o="\uC9C1\uC6D0 \uC120\uD0DD",hint:t="",groups:n,multiple:r=!1,selectedSeqs:i,confirmText:a="\uD655\uC778",onConfirm:l,onClose:u}){let s=Fe(),[c,m]=cl([]),[d,p]=cl(0),x=sl(()=>Vy(n),[n]),M=i??[];Ny(()=>{e&&(m(M),p(g=>g+1))},[e]);let T=()=>{let g=x.filter(f=>c.includes(f.seq));l(r?g:g.slice(0,1)),u()};return Xo(Wy,{open:e,onClose:u,title:`${o}${r&&c.length>0?` (${c.length}\uBA85)`:""}`,locale:"ko",fullScreen:s,mobilePresentation:s?"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:Xo(Cr,{sx:{...s?{}:{height:560},display:"flex",flexDirection:"column",border:"1px solid #cccccc",borderRadius:1,...s?{}:{overflow:"hidden"},userSelect:"none"},children:Xo(jy,{groups:n,allEmployees:x,initialSelectedSeqs:M,multiple:r,isMobile:s,onSelectionChange:m},d)})}],dialogActionSx:{"@media (max-width:1023.95px)":{gap:"0.75rem !important","& .left-actions":{flex:1,minWidth:0},"& .right-actions":{flex:1}}},actions:{visible:!0,showCancelButton:!1,left:t?Xo(Hy,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.35},children:t}):void 0,right:Xo(Fy,{variant:"contained",onClick:T,children:a})}})}import{useEffect as o0,useMemo as t0,useState as n0}from"react";import{Box as Qn,Button as r0,Divider as i0}from"@mui/material";import{FormDialog as a0}from"@ehfuse/mui-form-dialog";import{LabelSelect as l0}from"@ehfuse/mui-form-controls";import{Box as ct}from"@mui/material";import{jsx as jn,jsxs as Xn}from"react/jsx-runtime";function Jy(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 Om({sprints:e,tasks:o,height:t=160}){let r=[...e].sort((c,m)=>`${c.start_date}|${c.seq}`.localeCompare(`${m.start_date}|${m.seq}`)).map(c=>({sprint:c,...Jy(c,o)})),i=r.some(c=>c.points>0),a=r.map(c=>i?c.points:c.count),l=Math.max(1,...a),u=r.filter(c=>c.sprint.status==="closed").map(c=>i?c.points:c.count),s=u.length>0?Math.round(u.reduce((c,m)=>c+m,0)/u.length*10)/10:null;return r.length===0?jn(ct,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uD45C\uC2DC\uD560 \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):Xn(ct,{children:[Xn(ct,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[Xn("span",{children:["\uC644\uB8CC ",i?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uBAA9\uD45C\uBCC4"]}),s!==null?Xn("span",{children:["\uD3C9\uADE0(\uC885\uB8CC \uBAA9\uD45C)"," ",jn(ct,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:s}),i?"SP":"\uAC74"]}):null]}),jn(ct,{sx:{display:"flex",alignItems:"flex-end",gap:2,height:t,px:.5},children:r.map(c=>{let m=i?c.points:c.count,d=Math.round((t-24)*m/l),p=c.sprint.status==="closed";return Xn(ct,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"flex-end",height:"100%"},children:[jn(ct,{sx:{fontSize:14,fontWeight:700,color:"#37352f",lineHeight:1.5},children:m}),jn(ct,{sx:{width:"60%",maxWidth:56,height:Math.max(2,d),borderRadius:"4px 4px 0 0",bgcolor:p?"#2f80ed":"#a9c9f5"}})]},c.sprint.seq)})}),jn(ct,{sx:{display:"flex",gap:2,px:.5,mt:.5},children:r.map(c=>Xn(ct,{sx:{flex:1,minWidth:0,textAlign:"center",fontSize:13.5,color:"#000",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[c.sprint.name,c.sprint.status!=="closed"?" (\uC9C4\uD589\uC911)":""]},c.sprint.seq))})]})}import{useMemo as Zy}from"react";import{Box as yn}from"@mui/material";import{jsx as mt,jsxs as Sn}from"react/jsx-runtime";function Pm(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?new Date(`${e}T00:00:00`):null}function e0(e){return`${e.getFullYear()}-${String(e.getMonth()+1).padStart(2,"0")}-${String(e.getDate()).padStart(2,"0")}`}function ml(e){return e.slice(5).replace("-",".")}function Rm({sprint:e,tasks:o,todayStr:t,height:n=200}){let r=Zy(()=>{let g=Pm(e.start_date),f=Pm(e.end_date);if(!g||!f||f<g||Math.round((f.getTime()-g.getTime())/864e5)+1>366)return null;let v=o.filter(h=>h.sprint_seq===e.seq&&!h.archived);if(v.length===0)return{empty:!0};let R=v.some(h=>(h.story_points??0)>0),y=h=>R?h.story_points??0:1,_=v.reduce((h,b)=>h+y(b),0),k=new Map;for(let h of v){if(!h.completed)continue;let b=(h.completed_time??"").slice(0,10),A=/^\d{4}-\d{2}-\d{2}$/.test(b)?b:e.start_date;k.set(A,(k.get(A)??0)+y(h))}let S=[];for(let h=new Date(g);h<=f;h.setDate(h.getDate()+1))S.push(e0(h));let w=_,K=[];for(let h of S){if(h>t)break;w-=k.get(h)??0,K.push({day:h,value:Math.max(0,w)})}return{empty:!1,days:S,total:_,usePoints:R,actual:K}},[e,o,t]);if(!r)return mt(yn,{sx:{py:4,textAlign:"center",fontSize:14.5,color:"#9a9a97"},children:"\uBAA9\uD45C\uC758 \uC2DC\uC791\uC77C\xB7\uC885\uB8CC\uC77C\uC774 \uC788\uC5B4\uC57C \uBC88\uB2E4\uC6B4\uC744 \uADF8\uB9B4 \uC218 \uC788\uC2B5\uB2C8\uB2E4."});if(r.empty)return mt(yn,{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:u}=r,s=600,c=200,m=8,d=g=>i.length===1?0:g/(i.length-1)*s,p=g=>m+(c-m*2)*(1-g/Math.max(1,a)),x=`${d(0)},${p(a)} ${d(i.length-1)},${p(0)}`,M=u.map(g=>`${d(i.indexOf(g.day))},${p(g.value)}`).join(" "),T=u[u.length-1];return Sn(yn,{children:[Sn(yn,{sx:{mb:1,display:"flex",justifyContent:"space-between",fontSize:14,color:"#000"},children:[Sn("span",{children:["\uB0A8\uC740 ",l?"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8(SP)":"\uC5C5\uBB34 \uC218(\uAC74)"," \u2014 \uCD1D ",a]}),T?Sn("span",{children:["\uD604\uC7AC"," ",mt(yn,{component:"span",sx:{color:"#2f80ed",fontWeight:700},children:T.value}),l?"SP":"\uAC74"," \uB0A8\uC74C"]}):null]}),mt(yn,{sx:{border:"1px solid #e6e6e3",borderRadius:1,bgcolor:"#fafaf9",px:1,py:.5},children:Sn("svg",{viewBox:`0 0 ${s} ${c}`,preserveAspectRatio:"none",style:{display:"block",width:"100%",height:n},children:[mt("line",{x1:0,y1:p(0),x2:s,y2:p(0),stroke:"#e6e6e3",strokeWidth:1}),mt("polyline",{points:x,fill:"none",stroke:"#9a9a97",strokeWidth:1.5,strokeDasharray:"6 5",vectorEffect:"non-scaling-stroke"}),u.length>1?mt("polyline",{points:M,fill:"none",stroke:"#2f80ed",strokeWidth:2.5,vectorEffect:"non-scaling-stroke"}):null,T?mt("circle",{cx:d(i.indexOf(T.day)),cy:p(T.value),r:4,fill:"#2f80ed",vectorEffect:"non-scaling-stroke"}):null]})}),Sn(yn,{sx:{mt:.5,display:"flex",justifyContent:"space-between",fontSize:13.5,color:"#000"},children:[mt("span",{children:ml(e.start_date)}),t>e.start_date&&t<e.end_date?Sn("span",{children:["\uC624\uB298 ",ml(t)]}):null,mt("span",{children:ml(e.end_date)})]})]})}import{jsx as zt,jsxs as ul}from"react/jsx-runtime";function Wz({open:e,sprints:o,tasks:t,todayStr:n,initialSprintSeq:r=0,onClose:i}){let[a,l]=n0(0);o0(()=>{if(!e)return;let c=o.find(d=>d.status==="active")??o[0],m=o.find(d=>d.seq===r)??c;l(m?.seq??0)},[e]);let u=t0(()=>o.find(c=>c.seq===a)??null,[o,a]),s=ul(Qn,{sx:{display:"flex",flexDirection:"column"},children:[ul(Qn,{sx:{px:3,py:2.5},children:[zt(Qn,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBCA8\uB85C\uC2DC\uD2F0"}),zt(Om,{sprints:o,tasks:t})]}),zt(i0,{sx:{borderColor:"#e6e6e3"}}),ul(Qn,{sx:{px:3,py:2.5},children:[zt(Qn,{sx:{mb:1.5,fontSize:17,fontWeight:700,color:"#37352f"},children:"\uBC88\uB2E4\uC6B4"}),zt(l0,{label:"\uBAA9\uD45C",showLabel:!1,value:a?String(a):"",options:o.map(c=>({value:String(c.seq),label:zo(c)})),onChange:c=>l(Number(c.target.value)||0),sx:{width:280,mb:2}}),u?zt(Rm,{sprint:u,tasks:t,todayStr:n}):zt(Qn,{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 zt(a0,{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:s}],actions:{showCancelButton:!1,right:zt(r0,{variant:"contained",onClick:i,children:"\uB2EB\uAE30"})}})}import{Checkbox as s0,Divider as c0,Menu as m0,MenuItem as dl}from"@mui/material";import{jsx as vr,jsxs as zm}from"react/jsx-runtime";function Gz({anchorEl:e,candidates:o,selectedNames:t,avatarSrcByName:n,onToggle:r,onClear:i,onClose:a}){return zm(m0,{anchorEl:e,open:!!e,onClose:a,transitionDuration:0,children:[o.length===0?vr(dl,{disabled:!0,sx:{fontSize:14},children:"\uBAA9\uB85D\uC5D0 \uC9C0\uC815\uB41C \uC0AC\uB78C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):o.map(l=>{let u=t.includes(l.name);return zm(dl,{onClick:()=>r(l),sx:{fontSize:14,minWidth:170,gap:1},children:[vr(s0,{size:"small",checked:u,sx:{p:0}}),vr(Co,{names:[l.name],size:20,avatarSrcByName:n}),l.name]},`${l.accountSeq}-${l.name}`)}),vr(c0,{}),vr(dl,{disabled:t.length===0,onClick:i,sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{useState as u0}from"react";import{ButtonBase as d0,Menu as p0,MenuItem as f0}from"@mui/material";import x0 from"@mui/icons-material/KeyboardArrowDown";import g0 from"@mui/icons-material/Check";import{Fragment as h0,jsx as pl,jsxs as fl}from"react/jsx-runtime";function oq({value:e,onChange:o,options:t}){let[n,r]=u0(null),i=t??ji,a=ji.find(l=>l.value===e)?.label??"";return fl(h0,{children:[fl(d0,{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,pl(x0,{sx:{fontSize:17,color:"#9a9a97"}})]}),pl(p0,{transitionDuration:0,anchorEl:n,open:!!n,onClose:()=>r(null),children:i.map(l=>fl(f0,{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?pl(g0,{sx:{fontSize:16,color:"#2f80ed"}}):null]},l.value))})]})}import{Box as Mi,ButtonBase as b0}from"@mui/material";import{DateTextField as qm}from"@ehfuse/mui-form-controls";function Bn(e){let o=t=>String(t).padStart(2,"0");return`${e.getFullYear()}-${o(e.getMonth()+1)}-${o(e.getDate())}`}function Di(e,o=new Date){let t=new Date(o);return t.setMonth(t.getMonth()-e),t}function rq(e=new Date){return{fromDate:Bn(Di(1,e)),toDate:Bn(e)}}import{jsx as Ir,jsxs as Am}from"react/jsx-runtime";var k0=[{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 Lm({fromDate:e,toDate:o,onChange:t}){let n=i=>{if(i<=0){t("","");return}t(Bn(Di(i)),Bn(new Date))},r=i=>i<=0?!e&&!o:!e||!o?!1:e===Bn(Di(i))&&o===Bn(new Date);return Am(Mi,{sx:{display:"flex",alignItems:"center",gap:1.5,flexWrap:"wrap"},children:[Ir(Mi,{sx:{display:"flex",alignItems:"center",gap:1.5},children:k0.map(i=>{let a=r(i.months);return Ir(b0,{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)})}),Am(Mi,{sx:{display:"flex",alignItems:"center",gap:.5},children:[Ir(qm,{value:e,size:"small",placeholder:"\uC2DC\uC791\uC77C",onChange:i=>t(i.target.value,o),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}}),Ir(Mi,{component:"span",sx:{fontSize:13,color:"#9a9a97"},children:"~"}),Ir(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 T0}from"@mui/material";import{jsx as Nm}from"react/jsx-runtime";function pq({anchorEl:e,fromDate:o,toDate:t,onChange:n,onClose:r}){return Nm(T0,{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:Nm(Lm,{fromDate:o,toDate:t,onChange:n})})}import{Box as y0,ButtonBase as S0,Tab as B0,Tabs as C0}from"@mui/material";import v0 from"@mui/icons-material/Checklist";import I0 from"@mui/icons-material/Face";import _0 from"@mui/icons-material/Publish";import w0 from"@mui/icons-material/NotificationsOutlined";import D0 from"@mui/icons-material/BugReportOutlined";import M0 from"@mui/icons-material/DescriptionOutlined";import E0 from"@mui/icons-material/Inventory2Outlined";import{jsx as Qo}from"react/jsx-runtime";function Fm(e,o){return o>0?`${e} (${o})`:e}var Iq=[{id:"my",label:"\uC804\uCCB4",icon:Qo(v0,{sx:{fontSize:18}})},{id:"notice",label:"\uACF5\uC9C0\uC0AC\uD56D",icon:Qo(w0,{sx:{fontSize:18}})},{id:"mine",label:"\uB0B4 \uC5C5\uBB34",icon:Qo(I0,{sx:{fontSize:18}})},{id:"sent",label:"\uBCF4\uB0B8 \uC5C5\uBB34",icon:Qo(_0,{sx:{fontSize:18}})},{id:"bug",label:"\uC624\uB958",icon:Qo(D0,{sx:{fontSize:18}})},{id:"archive",label:"\uBCF4\uAD00\uD568",icon:Qo(E0,{sx:{fontSize:18}}),hideCount:!0},{id:"report",label:"\uBCF4\uACE0\uC11C",icon:Qo(M0,{sx:{fontSize:18}}),hideCount:!0}];function O0(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 _q({items:e,activeTab:o,counts:t,onChange:n,compact:r=!1}){let i=ne(),a=O0(i.tabs),l=e;return r?Qo(y0,{sx:{display:"flex",flexWrap:"wrap",gap:1.25},children:l.map(u=>{let s=o===u.id;return Qo(S0,{onClick:()=>n(u.id),sx:{px:1.5,py:.75,borderRadius:1,fontSize:yo(13.5),fontWeight:500,whiteSpace:"nowrap",border:"1px solid",bgcolor:s?i.tabs.selectedBg:i.tabs.bg,color:s?i.tabs.selectedColor:i.tabs.color,borderColor:s?i.tabs.selectedBg:i.tabs.borderColor},children:Fm(u.label,u.hideCount?0:t[u.id]??0)},u.id)})}):Qo(C0,{value:o,onChange:(u,s)=>n(s),sx:{minHeight:46,"& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:"12px",minHeight:46}},children:l.map(u=>Qo(B0,{value:u.id,label:Fm(u.label,u.hideCount?0:t[u.id]??0),icon:u.icon,iconPosition:"start",sx:a},u.id))})}import{useEffect as P0,useMemo as R0,useState as xl}from"react";import{Divider as gl,ListItemIcon as No,Menu as hl,MenuItem as To}from"@mui/material";import z0 from"@mui/icons-material/OpenInNewOutlined";import q0 from"@mui/icons-material/Check";import A0 from"@mui/icons-material/CheckCircleOutlined";import L0 from"@mui/icons-material/RadioButtonUnchecked";import N0 from"@mui/icons-material/SendOutlined";import F0 from"@mui/icons-material/EventOutlined";import H0 from"@mui/icons-material/PersonOutlineOutlined";import W0 from"@mui/icons-material/ViewKanbanOutlined";import $0 from"@mui/icons-material/ContentCopyOutlined";import K0 from"@mui/icons-material/NextPlanOutlined";import U0 from"@mui/icons-material/ContentPasteOutlined";import V0 from"@mui/icons-material/ShareOutlined";import G0 from"@mui/icons-material/DirectionsRunOutlined";import Hm from"@mui/icons-material/ChevronRight";import Y0 from"@mui/icons-material/ArchiveOutlined";import j0 from"@mui/icons-material/UnarchiveOutlined";import{ConfirmDialog as X0}from"@ehfuse/alerts";import{Fragment as Q0,jsx as me,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:u,onChangeReminder:s,onMemberEdit:c,onMoveProject:m,onDuplicate:d,onCreateFollowUp:p,onShare:x,onAssignSprint:M,onArchiveToggle:T,onDelete:g}){let f=Fe(),C=ot(),[v,R]=xl(null),[y,_]=xl(null),[k,S]=xl(null);P0(()=>{e||(R(null),_(null),S(null))},[e]);let w=e?.task??null,K=!!w?.is_notice,h=!!w?.is_event,b=w?!xt(w,r):!1,A=R0(()=>new Set(t.filter(q=>q.useSprints).map(q=>q.key)),[t]),L=async()=>{let q=w;if(o(),!q)return;await X0({title:"\uC5C5\uBB34 \uC0AD\uC81C",message:`"${q.title}" \uC5C5\uBB34\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&g(q.seq)},F=()=>{w&&T(w.seq,!w.archived),o()};return xo(Q0,{children:[xo(hl,{open:!!e,onClose:o,transitionDuration:0,anchorReference:f?"none":"anchorPosition",anchorPosition:!f&&e?{top:e.position.top,left:e.position.left}:void 0,slotProps:{paper:{sx:{minWidth:190,...f?{position:"fixed",top:"50%",left:"50%",translate:"-50% -50%",maxHeight:"70vh"}:{}}},list:f?{sx:{"& .MuiMenuItem-root":{py:1,minHeight:0}}}:void 0},children:[xo(To,{onClick:()=>{w&&i(w),o()},sx:{fontSize:14},children:[me(No,{children:me(z0,{sx:{fontSize:19}})}),"\uC0C1\uC138 \uC5F4\uAE30"]}),xo(To,{disabled:K?(w?.author_account_seq??0)!==r:(w?.author_account_seq??0)!==r&&(w?.manager_account_seq??0)!==r,onClick:()=>{w&&a(w.seq,!w.completed),o()},sx:{fontSize:14},children:[me(No,{children:w?.completed?me(L0,{sx:{fontSize:19}}):me(A0,{sx:{fontSize:19}})}),w?.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC"]}),!K&&l?xo(To,{disabled:!(w?.manager_account_seq??0)&&(w?.receiver_account_seqs??[]).length===0,onClick:()=>{w&&l(w),o()},sx:{fontSize:14},children:[me(No,{children:me(N0,{sx:{fontSize:19}})}),"\uD655\uC778 \uC694\uCCAD"]}):null,h?null:me(gl,{}),h?null:xo(To,{disabled:b,onClick:q=>{w&&R({anchorEl:q.currentTarget,task:w})},sx:{fontSize:14},children:[me(No,{children:me(F0,{sx:{fontSize:19}})}),"\uB9C8\uAC10\uAE30\uD55C \uBCC0\uACBD"]}),!K&&!h&&c?xo(To,{onClick:()=>{w&&c(w,"manager"),o()},sx:{fontSize:14},children:[me(No,{children:me(H0,{sx:{fontSize:19}})}),"\uCC45\uC784\uC790 \uBCC0\uACBD"]}):null,h?null:xo(To,{disabled:b,onClick:q=>{w&&_({anchorEl:q.currentTarget,task:w})},sx:{fontSize:14},children:[me(No,{children:me(W0,{sx:{fontSize:19}})}),"\uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9",me(Hm,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}),me(gl,{}),d?xo(To,{disabled:b,onClick:()=>{w&&d(w.seq),o()},sx:{fontSize:14},children:[me(No,{children:me($0,{sx:{fontSize:19}})}),"\uBCF5\uC81C"]}):null,p&&w&&!w.is_event&&!w.is_notice?xo(To,{onClick:()=>{w&&p(w.seq),o()},sx:{fontSize:14},children:[me(No,{children:me(K0,{sx:{fontSize:19}})}),"\uD6C4\uC18D \uC5C5\uBB34 \uB9CC\uB4E4\uAE30"]}):null,xo(To,{onClick:()=>{w&&(x?x(w):Un(w,f)),o()},sx:{fontSize:14},children:[me(No,{children:f?me(V0,{sx:{fontSize:19}}):me(U0,{sx:{fontSize:19}})}),f?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC"]}),w&&!w.is_notice&&!w.is_event&&A.has(String(w.tab_key??""))&&M?xo(To,{onClick:q=>S(q.currentTarget),sx:{fontSize:14},children:[me(No,{children:me(G0,{sx:{fontSize:19}})}),"\uBAA9\uD45C\uC5D0 \uB123\uAE30",me(Hm,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}):null,xo(To,{onClick:F,disabled:b||!w?.archived&&!(w&&Pr(w)),sx:{fontSize:14},children:[me(No,{children:w?.archived?me(j0,{sx:{fontSize:19}}):me(Y0,{sx:{fontSize:19}})}),w?.archived?"\uBCF4\uAD00 \uD574\uC81C":"\uBCF4\uAD00"]}),me(gl,{}),xo(To,{disabled:b,onClick:L,sx:{fontSize:14,color:"#e5484d"},children:[me(No,{children:me(Tt,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC0AD\uC81C"]})]}),me(Nt,{anchorEl:v?.anchorEl??null,open:!!v,date:v?.task.due_date??"",reminder:v?.task.reminder??"none",hideReminder:!!v?.task.completed,centered:f,onClose:()=>{R(null),o()},onDateChange:q=>{v&&u(v.task.seq,q)},onReminderChange:q=>{v&&s?.(v.task.seq,q)}}),xo(hl,{transitionDuration:0,anchorEl:y?.anchorEl??null,open:!!y,onClose:()=>{_(null),o()},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...C,children:[me(To,{selected:!y?.task.tab_key,onClick:()=>{y&&m(y.task.seq,""),_(null),o()},sx:{fontSize:14,minWidth:170},children:"\uC5C6\uC74C"}),t.filter(q=>!q.archived).map(q=>me(To,{selected:y?.task.tab_key===q.key,onClick:()=>{y&&m(y.task.seq,q.key),_(null),o()},sx:{fontSize:14,minWidth:170},children:q.label},q.key))]}),me(hl,{transitionDuration:0,anchorEl:k,open:!!k,onClose:()=>S(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...n.filter(q=>`custom-${q.group_seq}`===String(w?.tab_key??"")).map(q=>({seq:q.seq,label:zo(q)}))].map(q=>xo(To,{onClick:()=>{w&&M?.(w.seq,q.seq),S(null),o()},sx:{fontSize:14,minWidth:160,gap:1},children:[q.label,(w?.sprint_seq??0)===q.seq?me(q0,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},q.seq))})]})}import{Checkbox as J0,Divider as Z0,Menu as eS,MenuItem as Wm}from"@mui/material";import{jsx as Ei,jsxs as $m}from"react/jsx-runtime";function sA({anchorEl:e,labelOptions:o,selectedKeys:t,onToggle:n,onClear:r,onClose:i}){return $m(eS,{transitionDuration:0,anchorEl:e,open:!!e,onClose:i,children:[o.map(a=>{let l=t.includes(a.key);return $m(Wm,{onClick:()=>n(a.key),sx:{fontSize:14,minWidth:190,gap:1},children:[Ei(J0,{size:"small",checked:l,sx:{p:0}}),Ei(Pe,{option:a})]},a.key)}),Ei(Z0,{}),Ei(Wm,{disabled:t.length===0,onClick:()=>{r(),i()},sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{Divider as Km,Menu as oS,MenuItem as bl}from"@mui/material";import tS from"@mui/icons-material/Check";import nS from"@mui/icons-material/BarChartOutlined";import rS from"@mui/icons-material/SettingsOutlined";import{jsx as _r,jsxs as Oi}from"react/jsx-runtime";function gA(e){let{anchorEl:o,sprints:t,value:n,onSelect:r,onManage:i,onCharts:a,onClose:l}=e;return Oi(oS,{transitionDuration:0,anchorEl:o,open:!!o,onClose:l,children:[[{seq:0,label:"\uC804\uCCB4"},{seq:-1,label:"\uBBF8\uBC30\uC815 \uC5C5\uBB34"},...t.map(u=>({seq:u.seq,label:zo(u)}))].map(u=>Oi(bl,{onClick:()=>{r(u.seq),l()},sx:{fontSize:14,minWidth:180,gap:1},children:[u.label,n===u.seq?_r(tS,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},u.seq)),_r(Km,{}),a?Oi(bl,{onClick:()=>{l(),a()},sx:{fontSize:14,gap:1},children:[_r(nS,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uCC28\uD2B8"]}):null,a?_r(Km,{}):null,Oi(bl,{onClick:()=>{l(),i()},sx:{fontSize:14,gap:1},children:[_r(rS,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uAD00\uB9AC\u2026"]})]})}var iS={my:"tasks",mine:"tasks",sent:"tasks",notice:"notice",bug:"bug",archive:"archive",done:"done",report:"report"};function aS(e){return iS[e]??"tasks"}var kA={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"},Um=["list","calendar","month","card","kanban","sprint","timeline"],lS=["list","card"];function TA(e){let o=aS(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:Um,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:lS,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:Um,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{Xv as ALL_TASK_VIEWER_ACCOUNT_SEQS,qc as AddLabelDialog,Gr as AddTabDialog,Oc as AttachmentUploadGauge,$a as AttachmentUploadPercent,Wi as BUG_DEVICE_OPTIONS,nr as BUG_ICON_COLOR,Ov as BUG_KANBAN_COLUMNS,Hi as BUG_REPRO_OPTIONS,$i as BUG_RESOLUTION_OPTIONS,on as BUG_STATUS_OPTIONS,tr as BUG_TASK_ICON,xi as BugPropertiesGrid,hf as COLUMN_WIDTHS,Ui as COMPLETED_STATUS_OPTION,rl as CUSTOM_TAB_KEY_PREFIX,sz as CalendarImportDialog,gz as CalendarSubscribeDialog,On as CommentBubbleIcon,En as ConfirmCountButton,cs as DATE_REMINDER_OPTIONS,zi as DEFAULT_PROJECT_ICON,Iq as DEFAULT_TASKBOX_TAB_ITEMS,Oe as DEFAULT_TASK_ICON,pq as DateRangeFilterPopover,Ao as DrawerSection,Nt as DueDatePickerPopover,jp as ENDED_EVENT_STATUS_OPTION,$c as EVENT_ICON_COLOR,vz as EmployeeSelectDialog,ji as GROUP_BY_OPTIONS,An as GoogleEventChip,oq as GroupByMenuButton,Vr as IconPickerGrid,hc as InlineAddressInput,Ot as InlineTextValue,Vi as KANBAN_CLOSED_COLUMN_KEY,sA as LabelFilterMenu,Bi as LabelSelectMenu,ir as MANUAL_TASK_STATUS_OPTIONS,Gz as MemberFilterMenu,rr as NOTICE_STATUS_OPTIONS,So as NOTICE_TASK_ICON,Pl as NO_TASK_ICON,qi as PROJECT_ICON_OPTIONS,ue as PropertyRow,Dn as RECEIVER_AVATAR_COLORS,ms as REMINDER_OPTIONS,Co as ReceiverAvatarStack,fm as RelatedTasksSection,sS as STATUS_KEY_REPLIED,Bl as STATUS_KEY_WAITING,bs as SortableTaskCard,Rm as SprintBurndownChart,Wz as SprintChartsDialog,gA as SprintFilterMenu,J2 as SprintManageDialog,Om as SprintVelocityChart,Ar as StatusSelectMenu,Ji as TASKBOX_COLUMNS,Vo as TASKBOX_DRAWER_NARROW_MQ,Rl as TASKBOX_UI_STATE_ID,kA as TASKBOX_VIEW_LABELS,fM as TASKBOX_VIEW_MODES,en as TASK_STATUS_OPTIONS,sx as TIME_REMINDER_OPTIONS,Xr as TaskAckListPopover,Mn as TaskActionButton,yi as TaskAttachmentsSection,ic as TaskBoxColumnSummary,ha as TaskBoxGroupBoard,eE as TaskBoxMobileList,Ys as TaskBoxMonthAgenda,$s as TaskBoxMonthCalendar,_M as TaskBoxSprintColumnSummary,xs as TaskBoxTable,_q as TaskBoxTabs,ec as TaskBoxTimeline,pM as TaskBoxView,Ls as TaskBoxWeekCalendar,mr as TaskCardContent,bi as TaskChecklistSection,om as TaskCommentInput,em as TaskCommentsSection,gi as TaskContentEditor,nA as TaskContextMenu,fi as TaskCorePropertiesGrid,Va as TaskCreateBody,mP as TaskCreateDrawer,Lm as TaskDateRangeFilter,gm as TaskDetailBody,N2 as TaskDetailDrawer,am as TaskDetailHeader,Wn as TaskIconPickerPopover,At as TaskLabelChips,um as TaskLinkDialog,lm as TaskNoteField,$o as TaskPriorityChip,Pe as TaskStatusChip,Fv as TaskStatusChips,eu as TaskboxProvider,Ay as buildCalendarFeedUrl,Jr as buildCardBaseSx,$l as buildStatusOptionColors,Xi as buildTaskGroupSections,cm as buildTaskRelationsModel,ST as buildTaskShareText,Er as buildTaskboxTheme,Kl as canAssignBugManager,Nr as canClaimTaskItem,xt as canEditTaskItem,Lr as canViewTaskItem,Fr as canVolunteerTaskItem,tc as countWorkdays,Kp as createTaskboxTheme,rc as daysLeftUntil,Ai as defaultTaskBoxFormValues,Li as defaultTaskboxUiStateValues,Hc as filterFilesWithinLimit,T_ as formatConfirmTime,oc as formatHours,nt as formatKoreanDate,gt as formatKoreanDateTime,zo as formatSprintOptionLabel,Fl as getBugDeviceName,Nl as getBugReproName,Or as getBugResolutionName,Xp as getBugStatusOption,rq as getDefaultDateRange,ar as getEventDisplayStatusOption,Rv as getNoDueStatusRank,Fc as getNoticeAckInfo,Hl as getNoticeStatusOption,y5 as getNoticeTargetDisplay,vn as getProjectIconAnchorComponent,Ue as getProjectIconComponent,la as getReminderLabel,aa as getReminderOptions,Wl as getStatusOptionsForTask,TA as getTabHeaderConfig,ea as getTaskBoxColumnDefs,Hr as getTaskBoxGridTemplate,aS as getTaskBoxTabKind,Qr as getTaskConfirmInfo,Bo as getTaskDisplayStatusOption,Rr as getTaskStatusOption,Rn as groupGoogleEventsByDate,il as groupSeqFromTabKey,iR as hasRelation,pk as htmlToPlainText,yy as isCustomTabKey,Yi as isOpenPoolTaskItem,Ki as isPastEvent,Pr as isTaskDone,Pv as isWaitingTask,Di as monthsAgoDate,uo as narrowOrderSx,L2 as nowDateTimeString,Xh as parseEstimatedHours,gn as relationsOf,_n as resolveTaskStatusOptions,Fi as resolveTaskboxTheme,Un as shareTaskText,nc as sumRemainingHours,Ci as summarizeNoticeTargets,W2 as tabKeyFromGroupSeq,Bn as toYmd,zr as toggleLabelKey,Ri as useBuildFileUrl,Ec as useTaskAttachmentUploadMeta,Mo as useTaskboxConfig,Np as useTaskboxForm,ne as useTaskboxTheme,ft as useTaskboxUiState,or as useUploadMaxMb};
14
14
  //# sourceMappingURL=index.esm.js.map