@ehfuse/taskbox 0.7.26 → 0.7.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +2 -2
- package/dist/index.esm.js.map +2 -2
- package/dist/index.js +2 -2
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -3,7 +3,7 @@ import{a as ia,b as ld,c as hc,d as GP,e as KP,f as YP,g as jP,h as XP}from"./ch
|
|
|
3
3
|
\uC0AC\uC720\uB294 \uB313\uAE00\uB85C \uB0A8\uACE0 \uC644\uB8CC \uCC98\uB9AC\uC790\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC11\uB2C8\uB2E4.`:o?"\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:s?"\uB418\uB3CC\uB9AC\uAE30":o?"\uC644\uB8CC":"\uD574\uC81C",content:s?nm(iS,{sx:{mt:1},children:nm(aS,{autoFocus:!0,fullWidth:!0,multiline:!0,minRows:4,size:"small",placeholder:"\uB418\uB3CC\uB9AC\uB294 \uC0AC\uC720\uB97C \uC785\uB825\uD558\uC138\uC694 (\uD544\uC218)",value:a,onChange:m=>l(m.target.value),onClick:m=>m.stopPropagation(),onKeyDown:m=>m.stopPropagation()})}):void 0,onCancel:r,onConfirm:()=>{s&&!a.trim()||i(s?a.trim():"")}})}import{memo as qS}from"react";function ln(e){let t=e.visibility;return t==="involved"||t==="group"||t==="all"?t:e.is_open?"all":"involved"}function Nl(e,t,o=0){if(t<=0)return!1;if(e.is_notice){if((e.author_account_seq??0)===t)return!0;let i=(e.target_account_seqs??[]).filter(a=>a>0);return i.length===0||i.includes(t)}if((e.author_account_seq??0)===t||(e.manager_account_seq??0)===t||(e.receiver_account_seqs??[]).includes(t))return!0;let r=ln(e);if(r==="all")return!0;if(r==="group"){let i=e.visibility_group_seq??0;return i>0&&o===i}return!1}function Gd(e){return e.is_notice||e.is_event||e.completed||e.archived||(e.manager_account_seq??0)!==0?!1:ln(e)!=="involved"}function Fl(e,t){return t<=0||(e.author_account_seq??0)===t?!1:Gd(e)}function $l(e,t){return t<=0||e.is_notice||e.is_event||e.completed||e.archived||(e.manager_account_seq??0)>0||(e.author_account_seq??0)===t||Gd(e)?!1:(e.receiver_account_seqs??[]).includes(t)}function Kd(e){return!!e.is_bug&&(e.manager_account_seq??0)===0&&e.status==="bug_received"}function Hl(e){return(e.origin_license_seq??0)>0}function Yd(e,t){if(t<=0)return!1;let o=(e.author_account_seq??0)===t;return e.is_notice?o:o||(e.manager_account_seq??0)===t}function Cn(e,t){return t<=0?!1:Hl(e)?!0:e.is_notice?(e.author_account_seq??0)===t:(e.author_account_seq??0)===t||(e.manager_account_seq??0)===t||(e.receiver_account_seqs??[]).includes(t)}function sS(e,t){return t<=0?!1:Hl(e)?!0:e.is_notice?(e.author_account_seq??0)===t:(e.author_account_seq??0)===t||(e.manager_account_seq??0)===t}function cS(e,t){return t<=0?!1:Hl(e)?!0:(e.author_account_seq??0)===t}function Sr(e,t,o){return o==="coreAuthorManager"?!sS(e,t):!Cn(e,t)}function jr(e,t,o,n){return o==="coreAuthorManager"?!cS(e,t):n}var qz=[119,121,141,143];function Wl(e,t){let o=String(e.origin_author_avatar??"").trim(),n=String(e.author_name||e.origin_author_name||e.created_by||"").trim();if(!o||!n||!Hl(e)||t?.get(n)===o)return t;let r=new Map(t??[]);return r.set(n,o),r}import{memo as vS,useEffect as IS,useRef as _S,useState as am}from"react";import{Box as qe,Button as op,ButtonBase as wS,Checkbox as DS,Tooltip as Si}from"@mui/material";import ES from"@mui/icons-material/PublicOutlined";import RS from"@mui/icons-material/Group";import MS from"@mui/icons-material/CheckCircle";import PS from"@mui/icons-material/CheckCircleOutlineOutlined";import{useEffect as mS,useState as jd}from"react";import{Avatar as Xd,Box as uS}from"@mui/material";import dS from"@mui/icons-material/PersonOutlineOutlined";import{jsx as Vl}from"react/jsx-runtime";var rm=new Set,Qd=e=>e.startsWith("data:")||e.startsWith("blob:");function pS(e){let t=e.trim();return t?([...t][0]??"").toUpperCase():""}function Vo({src:e,name:t="",avatarSx:o,iconFontSize:n=40}){let[r,i]=jd(()=>e?Qd(e)||rm.has(e):!1),[a,l]=jd(!1),s={position:"relative",overflow:"hidden",borderRadius:"15px"},m=o?[s,...Array.isArray(o)?o:[o]]:s;if(mS(()=>{l(!1),i(e?Qd(e)||rm.has(e):!1)},[e]),!e||a){let c=pS(t);return Vl(Xd,{sx:m,children:c?Vl(uS,{component:"span",sx:{fontSize:"inherit",fontWeight:600,lineHeight:1,userSelect:"none"},children:c}):Vl(dS,{sx:{fontSize:n}})})}return Vl(Xd,{src:e,imgProps:{onLoad:()=>{rm.add(e),i(!0)},onError:()=>l(!0),style:r?void 0:{opacity:0}},sx:m})}var fS=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Ul=(e,t)=>{if(!t||!t.trim())return[{text:e,highlight:!1}];try{let o=fS(t.trim()),n=new RegExp(`(${o})`,"gi");return e.split(n).map(i=>i.toLowerCase()===t.trim().toLowerCase()?{text:i,highlight:!0}:{text:i,highlight:!1}).filter(i=>i.text)}catch{return[{text:e,highlight:!1}]}};var gS=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"];function Uo(e){let t=String(e??"").trim().slice(0,10);if(!/^\d{4}-\d{2}-\d{2}$/.test(t))return"";let o=new Date(`${t}T00:00:00`);return Number.isNaN(o.getTime())?"":`${t.slice(2).replaceAll("-",".")} (${gS[o.getDay()]})`}function im(e){let t=String(e??"").trim().slice(0,10);if(!/^\d{4}-\d{2}-\d{2}$/.test(t))return"";let o=Number(t.slice(5,7)),n=Number(t.slice(8,10));return!o||!n?"":`${o}\uC6D4 ${n}\uC77C`}function Po(e){let t=String(e??"").trim(),[o,n=""]=t.split(" "),r=Uo(o);return r?n?`${r} ${n.slice(0,5)}`:r:""}function ki(e,t){let o=(e.checklist??[]).filter(r=>!(t&&r.task_seq&&!t(Number(r.task_seq))));return o.length===0?"":`${o.filter(r=>r.checked).length}/${o.length}`}import{Box as Zd,Tooltip as xS}from"@mui/material";import{jsx as Gl}from"react/jsx-runtime";var Ti=[{bgcolor:"#dbe7ff",color:"#24408e"},{bgcolor:"#ffe4d6",color:"#8a4b21"},{bgcolor:"#dcf2e3",color:"#1f6b3a"},{bgcolor:"#f3e3f7",color:"#6d2f80"},{bgcolor:"#fdf0cf",color:"#8a6d1d"},{bgcolor:"#e0f0f6",color:"#1d5f78"},{bgcolor:"#efe6dc",color:"#6b4a2b"}];function go({names:e,size:t=22,ringFirst:o=!1,avatarSrcByName:n}){let r=xe(),i=ue().avatarSrcByName,a=n??i;return Gl(Zd,{sx:{display:"flex",alignItems:"center"},children:e.map((l,s)=>Gl(xS,{title:o&&s===0?`\uCC45\uC784\uC790 \xB7 ${l}`:l,arrow:!0,children:Gl(Zd,{sx:{ml:s===0?0:"-7px",zIndex:s,borderRadius:"50%",border:`2px solid ${r.avatar.separatorColor}`,display:"inline-flex",...r.avatar.sx},children:Gl(Vo,{src:a?.get(l)??"",name:l,avatarSx:{width:t,height:t,fontSize:Math.round(t/2),borderRadius:"50%",...Ti[s%Ti.length]},iconFontSize:Math.round(t*.6)})})},`${l}-${s}`))})}import{Box as Jd,Button as tp}from"@mui/material";import bS from"@mui/icons-material/CheckCircle";import{Fragment as TS,jsx as ka,jsxs as ep}from"react/jsx-runtime";function hS(e){let t=e.mode==="dark";return{minWidth:0,width:"100%",px:1,py:.25,gap:.5,fontSize:13,color:e.table.rowColor,borderColor:e.colors.borderStrong,background:t?e.colors.surfaceHover:"linear-gradient(180deg, #ffffff 0%, #f6f7f9 100%)",whiteSpace:"nowrap","&:hover":{background:t?e.colors.surfaceSubtle:"linear-gradient(180deg, #fcfcfd 0%, #f0f2f4 100%)",borderColor:e.colors.borderStrong}}}function kS(e){return{minWidth:0,px:1.25,py:.25,fontSize:13,whiteSpace:"nowrap",color:e.actionButton.color,backgroundColor:e.actionButton.bg,backgroundImage:e.actionButton.bgImage,boxShadow:"none","&:hover":{backgroundColor:e.actionButton.hoverBg,backgroundImage:e.actionButton.hoverBgImage,boxShadow:"none"},...e.actionButton.sx}}var Cr={minWidth:0,px:1.25,py:.25,fontSize:13,fontWeight:600,whiteSpace:"nowrap",color:"#fff",backgroundColor:"#8b5cf6",backgroundImage:"linear-gradient(180deg, #a685f9 0%, #8b5cf6 100%)",boxShadow:"none","&:hover":{backgroundColor:"#7c4ee8",backgroundImage:"linear-gradient(180deg, #9873f2 0%, #7c4ee8 100%)",boxShadow:"none"}};function Oo({onClick:e,children:t,fullWidth:o=!1,sx:n}){let r=xe();return ka(tp,{size:"small",variant:"contained",color:"inherit",fullWidth:o,sx:[kS(r),...Array.isArray(n)?n:n?[n]:[]],onClick:i=>{i.stopPropagation(),e(i)},children:t})}function yi({canConfirm:e,count:t,total:o,myConfirmed:n=!1,onConfirm:r,onShowList:i}){let a=xe(),l=hS(a);return e?ka(Oo,{onClick:()=>r(),children:"\uD655\uC778"}):ep(tp,{size:"small",variant:"outlined",color:"inherit",sx:l,onClick:s=>{s.stopPropagation(),i(s.currentTarget)},children:[n?ka(bS,{sx:{fontSize:16,color:"#2f80ed",flexShrink:0}}):null,ka(Jd,{component:"span",sx:{flex:1,textAlign:"center",minWidth:0},children:o>0&&t>=o?"\uD655\uC778\uC644\uB8CC":ep(TS,{children:[t,ka(Jd,{component:"span",sx:{mx:.15},children:"/"}),o]})})]})}import{ConfirmActionPopper as yS}from"@ehfuse/mui-confirm-action";import{jsx as SS}from"react/jsx-runtime";function Br({anchorEl:e,onCancel:t,onConfirm:o}){return SS(yS,{open:!!e,anchorEl:e,title:"\uAC80\uC218\uB97C \uC644\uB8CC\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",onCancel:t,onConfirm:o})}import{SvgIcon as CS}from"@mui/material";import{jsx as Kl,jsxs as BS}from"react/jsx-runtime";function vr({sx:e,...t}){return BS(CS,{viewBox:"0 0 48 48",...t,sx:{fill:"none",...e},children:[Kl("path",{d:"M24,6C13.23,6,4.5,12.93,4.5,21.46c0,5.39,3.5,10.13,8.79,12.89l-1.76,7.06a.46.46,0,0,0,.68.51L21,36.7a24,24,0,0,0,3,.2c10.77,0,19.5-6.91,19.5-15.44S34.77,6,24,6Z",fill:"none",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round"}),Kl("circle",{cx:"23.91",cy:"21.46",r:"2.71",fill:"currentColor",stroke:"none"}),Kl("circle",{cx:"33.65",cy:"21.46",r:"2.71",fill:"currentColor",stroke:"none"}),Kl("circle",{cx:"14.18",cy:"21.46",r:"2.71",fill:"currentColor",stroke:"none"})]})}import{Fragment as Yl,jsx as ee,jsxs as Xr}from"react/jsx-runtime";function Ta(e){let t=String(e??"").trim();if(!t)return"-";let o=t.slice(2,10).replaceAll("-","."),n=t.slice(11,16);return/^\d{2}:\d{2}$/.test(n)?`${o} ${n}`:o}function OS(e){let t=String(e.event_time??"").trim();return e.is_event&&/^\d{2}:\d{2}$/.test(t)?Ta(`${String(e.due_date??"").slice(0,10)} ${t}`):Ta(e.due_date)}function sm(e,t){let o=String(e??"").trim()||"-";return Ul(o,t).map((n,r)=>ee("span",{className:n.highlight?"font-semibold text-blue-600":void 0,children:n.text},`${n.text}-${r}`))}function Ci({names:e,searchText:t,avatarSrcByName:o,emphasize:n=!1}){let r=e.filter(i=>i.trim());if(r.length===0)return null;if(r.length===1){let i=r[0]??"";return Xr(Yl,{children:[ee(Vo,{src:o?.get(i)??"",name:i,avatarSx:{width:24,height:24,fontSize:12,borderRadius:"50%",...Ti[0]},iconFontSize:15}),ee(qe,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...n?{fontWeight:500,color:"#2f80ed"}:{}},children:sm(i,t)})]})}return ee(go,{names:r,size:22,avatarSrcByName:o})}function np({display:e,summary:t,searchText:o,avatarSrcByName:n}){if(!e||e.kind==="everyone")return ee(qe,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t||"\uBAA8\uB4E0 \uC9C1\uC6D0"});let{teamNames:r,individualNames:i}=e;if(r.length===0)return ee(Ci,{names:i,searchText:o,avatarSrcByName:n});let a=[...r,...i],l=a.join(", ");return a.length>2?ee(Si,{title:l,arrow:!0,children:ee(qe,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:`${a[0]}, ${a[1]} \uC678 ${a.length-2}\uBA85`})}):ee(Si,{title:l,arrow:!0,children:Xr(qe,{sx:{display:"flex",alignItems:"center",gap:.75,minWidth:0},children:[ee(qe,{component:"span",sx:{flexShrink:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:r.join(", ")+(i.length>0?",":"")}),i.length>0?ee(Ci,{names:i,searchText:o,avatarSrcByName:n}):null]})})}function jl(e){return e==="\uC624\uB958\uC81C\uBCF4"?"\uC624\uB958":e}function rp(e){return e==="\uBB38\uC758"?{bg:"#e8f1fd",fg:"#2f80ed"}:e==="\uAC74\uC758\uC0AC\uD56D"?{bg:"#f1ecfe",fg:"#8b5cf6"}:e==="\uC624\uB958\uC81C\uBCF4"?{bg:"#fdecec",fg:"#e5484d"}:e==="\uC0C1\uB2F4\uC2E0\uCCAD"?{bg:"#e6f7ec",fg:"#1f8a4c"}:{bg:"#f1f1ef",fg:"#6f6f6c"}}function lm({label:e,bg:t,fg:o}){return ee(qe,{component:"span",sx:{flexShrink:0,px:.75,fontSize:12,fontWeight:500,lineHeight:"20px",color:o,bgcolor:t,borderRadius:"4px",whiteSpace:"nowrap",maxWidth:140,overflow:"hidden",textOverflow:"ellipsis"},children:e})}var ip=vS(function({task:t,gridTemplate:o,statusOptions:n,avatarSrcByName:r,searchText:i,myAccountSeq:a=0,todayStr:l,showProject:s=!1,showManager:m=!0,showActions:c=!0,showRequest:p=!0,confirmMode:d="none",bugMode:u=!1,supportMode:f=!1,managerCentered:g=!1,trashMode:v=!1,dimCompleted:D=!0,confirmInfo:b,onConfirmTask:S,projectLabel:h="",projectIcon:E="",onProjectClick:y,onRequestToggleCompleted:T,onDateClick:I,onChangeNote:A,onMemberClick:q,onClaimClick:C,onVolunteerClick:k,onStatusClick:x,onOpenDetail:B,onTaskContextMenu:w,hideBottomBorder:P=!1,completeLocked:H=!1,unread:_=!1,notice:N=!1,noticeReadOnly:G=!1,coreLocked:Q,readOnly:se=!1,onIconClick:me,lastColumnCentered:Y=!1,noteLocked:O=!1,targetSummary:oe="",targetDisplay:F,onArchiveTask:W,ackInfo:V,onAckConfirm:U,onAckListClick:de,onPriorityClick:re}){let[Te,j]=am(!1),[ne,he]=am(null),[Ce,_e]=am(""),Le=_S(null);IS(()=>{if(!Te)return;let Z=z=>{let Oe=Le.current;Oe&&(z.target instanceof Node&&Oe.contains(z.target)||Oe.blur())};return document.addEventListener("mousedown",Z,!0),document.addEventListener("touchstart",Z,!0),()=>{document.removeEventListener("mousedown",Z,!0),document.removeEventListener("touchstart",Z,!0)}},[Te]);let ct=[t.manager_account_seq??0,...t.receiver_account_seqs??[]].some(Z=>Z>0&&Z!==(t.author_account_seq??0)),Ge=G||se,Pe=(Q??G)||se,Ne=a>0&&!t.is_notice&&!t.is_event&&(t.manager_account_seq??0)===a,K=Pe||!!t.is_notice,ae=xe(),We=!!C&&Fl(t,a),Ft=!!k&&$l(t,a),$o=K&&!Kd(t),$t=t.is_notice?ee(yi,{canConfirm:!!V?.canAck,count:V?.count??0,total:V?.total??0,myConfirmed:!!V?.acked,onConfirm:()=>U?.(t),onShowList:Z=>de?.(t,Z)}):null,ie=!t.is_notice&&!t.completed&&!!t.due_date&&t.due_date.slice(0,10)<=l,Qe=ue(),Ho=ki(t,Qe.resolveTask),Co=!t.is_notice&&t.completed&&t.review_pending&&Qe.onReviewDone&&(Qe.myAccountSeq??0)>0&&(t.author_account_seq??0)===(Qe.myAccountSeq??0)?Xr(Yl,{children:[ee(op,{variant:"contained",size:"small",disableElevation:!0,onClick:Z=>{Z.stopPropagation(),he(Z.currentTarget)},sx:Cr,children:"\uAC80\uC218\uC644\uB8CC"}),ee(Br,{anchorEl:ne,onCancel:()=>he(null),onConfirm:()=>{Qe.onReviewDone?.(t),he(null)}})]}):null,Ht=t.is_event&&t.due_date?t.due_date.slice(0,10):"",Bo=!!Ht&&Ht<l?ae.colors.textSecondary:ie?"#e5484d":ae.colors.textPrimary,wt=ee(qe,{className:"cell",onClick:Pe?void 0:Z=>I(t,"due_date",Z.currentTarget),sx:{justifyContent:"center",color:Bo,fontWeight:500,whiteSpace:"nowrap",...Pe?{}:{cursor:"pointer","&:hover":{bgcolor:ae.table.cellHoverBg}}},children:t.due_date?OS(t):null});return Xr(qe,{onContextMenu:Z=>w(t,Z),sx:{display:"grid",gridTemplateColumns:o,minHeight:48,position:"relative",fontSize:15,bgcolor:ae.table.rowBg,color:ae.table.rowColor,borderBottom:P?"none":`1px solid ${ae.table.rowBorderColor}`,"&:hover":{bgcolor:ae.table.rowHoverBg},"& > .cell":{px:1,minWidth:0,display:"flex",alignItems:"center",borderRight:`1px solid ${ae.table.rowBorderColor}`},"& > .cell:first-of-type":{px:1.5},"& > .cell:last-of-type":{borderRight:"none",pr:2,...Y?{pl:2}:{}}},children:[ee(qe,{className:"cell",sx:{justifyContent:"center"},children:t.is_event?(()=>{let Z=ze(t.icon||Rt);if(!Z)return null;let z=ee(Z,{sx:{fontSize:19,color:t.icon_color||"#1e3a8a"}});return Ge||!me?z:ee(Si,{title:"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,enterDelay:400,disableInteractive:!0,children:ee(wS,{onClick:Oe=>{Oe.stopPropagation(),me(t,Oe.currentTarget)},sx:{p:.25,borderRadius:1,"&:hover":{bgcolor:ae.table.cellHoverBg}},children:z})})})():!G&&!H&&!v?ee(Si,{title:t.completed&&t.completed_by?`${t.completed_by} \xB7 ${Po(t.completed_time)} \uC644\uB8CC`:t.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC",arrow:!0,enterDelay:300,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:ee(DS,{checked:t.completed,inputProps:{"aria-label":t.completed?`${t.title} \uC644\uB8CC \uD574\uC81C`:`${t.title} \uC644\uB8CC \uCC98\uB9AC`},icon:ee(PS,{sx:{fontSize:20,color:"#9a9a97",opacity:.45}}),checkedIcon:ee(MS,{sx:{fontSize:20,color:"#2f80ed"}}),onClick:Z=>Z.stopPropagation(),onChange:(Z,z)=>T({anchorEl:Z.currentTarget,task:t,nextCompleted:z}),sx:{p:.5}})}):null}),u?ee(qe,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",fontVariantNumeric:"tabular-nums",color:"#37352f"},children:t.ticket_no||"-"}):null,f?ee(qe,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap"},children:t.support_type?(()=>{let Z=rp(t.support_type);return ee(lm,{label:jl(t.support_type),bg:Z.bg,fg:Z.fg})})():"-"}):null,Xr(qe,{className:"cell",onClick:()=>B(t),sx:{gap:1,pl:2,cursor:"pointer","&:hover":{bgcolor:ae.table.cellHoverBg}},children:[(()=>{if(!t.is_notice)return null;let Z=ze(t.icon||xt);return Z?ee(Z,{sx:{fontSize:18,flexShrink:0,color:t.icon_color||"#e5484d"}}):null})(),!f&&t.is_support&&t.support_type?(()=>{let Z=rp(t.support_type);return ee(lm,{label:jl(t.support_type),bg:Z.bg,fg:Z.fg})})():null,u&&(t.origin_license_seq??0)>0&&t.origin_license_name?ee(lm,{label:t.origin_license_name,bg:"#fdf0e6",fg:"#d9730d"}):null,(()=>{if(t.is_notice||f||t.is_support)return null;let Z=ln(t);return Z==="involved"?null:ee(Si,{title:Z==="all"?"\uC804\uCCB4\uACF5\uAC1C \u2014 \uBAA8\uB4E0 \uC9C1\uC6D0\uC774 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4":"\uBD80\uC11C\uACF5\uAC1C \u2014 \uC9C0\uC815\uD55C \uBD80\uC11C\uC758 \uC9C1\uC6D0\uC774 \uBCFC \uC218 \uC788\uC2B5\uB2C8\uB2E4",arrow:!0,disableInteractive:!0,children:Z==="all"?ee(ES,{sx:{fontSize:15,flexShrink:0,color:"#2f80ed"}}):ee(RS,{sx:{fontSize:15,flexShrink:0,color:"#d9730d"}})})})(),ee(qe,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:15,fontWeight:t.completed&&D?400:ae.table.rowTitleFontWeight,color:t.completed&&D?ae.colors.textMuted:ae.table.rowTitleColor,textDecoration:t.completed&&D?"line-through":"none"},children:sm(t.title,i)}),Ho?ee(qe,{component:"span",sx:{flexShrink:0,fontSize:12.5,color:ae.colors.textMuted,fontVariantNumeric:"tabular-nums"},children:Ho}):null,(t.comment_count??t.comments?.length??0)>0?ee(vr,{sx:{fontSize:16,flexShrink:0,color:"#9a9a97"}}):null,ee(qe,{sx:{flexShrink:0,display:"flex",alignItems:"center"},children:ee(yr,{labelKeys:t.label_keys??[],labelOptions:n})}),_&&!t.completed?ee(qe,{component:"span",sx:{flexShrink:0,px:.55,fontSize:10.5,fontWeight:700,lineHeight:1.6,color:"#fff",bgcolor:"#e5484d",borderRadius:"4px"},children:"N"}):null,El(t)&&!t.archived&&!Ge&&W?ee(op,{size:"small",variant:"outlined",color:"inherit",sx:{ml:"auto",flexShrink:0,minWidth:0,px:1.25,py:.25,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},onClick:Z=>{Z.stopPropagation(),W(t)},children:"\uBCF4\uAD00"}):null]}),(()=>{let Z=Ge||!!t.is_event||!!t.completed;return ee(qe,{className:"cell",onClick:Z?void 0:z=>x(t,z.currentTarget),sx:{py:.5,justifyContent:"center",...Z?{}:{cursor:"pointer","&:hover":{bgcolor:ae.table.cellHoverBg}}},children:t.is_event?(()=>{let z=xa(t);return z?ee($e,{option:z}):null})():ee($e,{option:Mt(t)})})})(),f?ee(qe,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",fontVariantNumeric:"tabular-nums"},children:Ta(t.created_time)}):null,ee(qe,{className:"cell",onClick:Pe?void 0:Z=>I(t,"start_date",Z.currentTarget),sx:{justifyContent:"center",whiteSpace:"nowrap",...Pe?{}:{cursor:"pointer","&:hover":{bgcolor:ae.table.cellHoverBg}}},children:Ta(t.start_date)}),wt,f?Xr(Yl,{children:[ee(Si,{title:t.origin_license_name||"",arrow:!0,placement:"top",disableInteractive:!0,slotProps:{transition:{timeout:0}},children:ee(qe,{className:"cell",sx:{gap:.75,justifyContent:"center"},children:ee(Ci,{names:[t.author_name||t.origin_author_name||t.created_by||""],searchText:i,avatarSrcByName:Wl(t,r)})})}),ee(qe,{className:"cell",sx:{gap:.75,justifyContent:"center"},children:ee(Ci,{names:(t.answerer_names??[]).slice(0,1),searchText:i,avatarSrcByName:r})})]}):null,N?ee(qe,{className:"cell",onClick:Pe?void 0:()=>q(t,"targets"),sx:{gap:.75,...Pe?{}:{cursor:"pointer","&:hover":{bgcolor:ae.table.cellHoverBg}}},children:ee(np,{display:F,summary:oe,searchText:i,avatarSrcByName:r})}):null,!N&&t.is_notice?ee(qe,{className:"cell",onClick:Pe?void 0:()=>q(t,"targets"),sx:{gridColumn:m?"span 2":"auto",gap:.75,...Pe?{}:{cursor:"pointer","&:hover":{bgcolor:ae.table.cellHoverBg}}},children:ee(np,{display:F,summary:oe,searchText:i,avatarSrcByName:r})}):null,!N&&!t.is_notice&&!t.is_event&&m?ee(qe,{className:"cell",onClick:$o?void 0:()=>q(t,"manager"),sx:{gap:.75,...We||Ft||g?{justifyContent:"center"}:{},...$o?{}:{cursor:"pointer","&:hover":{bgcolor:ae.table.cellHoverBg}}},children:We?ee(Oo,{onClick:Z=>C?.(t,Z.currentTarget),children:"\uAC00\uC838\uAC00\uAE30"}):Ft?ee(Oo,{onClick:Z=>k?.(t,Z.currentTarget),children:"\uAC00\uC838\uAC00\uAE30"}):ee(Ci,{names:t.manager_name?[t.manager_name]:[],searchText:i,avatarSrcByName:r,emphasize:Ne})}):null,!N&&!t.is_notice?ee(qe,{className:"cell",onClick:K?void 0:()=>q(t,"receivers"),sx:{gridColumn:t.is_event&&m?"span 2":"auto",gap:.75,...K?{}:{cursor:"pointer","&:hover":{bgcolor:ae.table.cellHoverBg}}},children:ee(Ci,{names:t.receiver_names,searchText:i,avatarSrcByName:r})}):null,ee(qe,{className:"cell",onClick:Ge?void 0:Z=>re?.(t,Z.currentTarget),sx:{py:.5,justifyContent:"center",...Ge?{}:{cursor:"pointer","&:hover":{bgcolor:ae.table.cellHoverBg}}},children:ee(oo,{priority:t.priority,plain:!0})}),s?ee(qe,{className:"cell",onClick:Pe?void 0:Z=>y?.(t,Z.currentTarget),sx:{gap:.5,justifyContent:"flex-start",...Pe?{}:{cursor:"pointer","&:hover":{bgcolor:ae.table.cellHoverBg}}},children:h?Xr(Yl,{children:[(()=>{let Z=ze(E);return Z?ee(Z,{sx:{fontSize:15,flexShrink:0,color:"#1e3a8a"}}):null})(),ee(qe,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h})]}):null}):null,N?ee(qe,{className:"cell",sx:{justifyContent:"center"},children:$t}):null,!N&&c&&p&&!f?ee(qe,{className:"cell",sx:{justifyContent:"center"},children:t.is_notice?$t:Co||(ct?ee(yi,{canConfirm:!!b?.canConfirm,count:b?.count??0,total:b?.total??0,myConfirmed:!!b?.myTime,onConfirm:()=>S?.(t),onShowList:Z=>de?.(t,Z)}):null)}):null,!N&&d==="action"?ee(qe,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",color:ae.table.rowSubColor},children:t.is_notice?$t:Co||(b&&b.total>0?ee(yi,{canConfirm:!!b.canConfirm,count:b.count,total:b.total,myConfirmed:!!b.myTime,onConfirm:()=>S?.(t),onShowList:Z=>de?.(t,Z)}):"-")}):null,!N&&!c?ee(qe,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",color:v?ae.colors.danger:D?ae.table.rowSubColor:ae.table.rowTitleColor},children:v?Ta(t.deleted_time):t.completed_time||"-"}):null,u||f?null:ee(qe,{className:"cell",onClick:()=>{!O&&!Te&&(_e(t.note),j(!0))},sx:{color:"#6f6f6c",cursor:O?"default":"text"},children:Te?ee(qe,{component:"input",ref:Le,autoFocus:!0,spellCheck:!1,value:Ce,onChange:Z=>_e(Z.target.value),onBlur:()=>{j(!1),Ce.trim()!==t.note&&A(t.seq,Ce)},onKeyDown:Z=>{Z.key==="Enter"&&Z.target.blur(),Z.key==="Escape"&&(_e(t.note),j(!1))},sx:{flex:1,minWidth:0,width:"100%",border:"none",outline:"none",bgcolor:"transparent",font:"inherit",lineHeight:"inherit",letterSpacing:"inherit",color:ae.table.rowTitleColor,caretColor:ae.table.rowTitleColor,p:0,m:0}}):ee(qe,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t.note?sm(t.note,i):""})}),Ne?ee(qe,{component:"span",sx:{position:"absolute",left:3,top:6,bottom:6,width:3,bgcolor:"#2f80ed",borderRadius:1.5,pointerEvents:"none"}}):null]})});import{jsx as zS}from"react/jsx-runtime";var ap=qS(function(t){let n=(t.useTaskItem?t.useTaskItem(t.task.seq):void 0)??t.task,{myAccountSeq:r}=t,{editPolicy:i}=ue(),a=t.projectByKey.get(n.tab_key??"");return zS(ip,{hideBottomBorder:t.hideBottomBorder,gridTemplate:t.gridTemplate,task:n,statusOptions:t.statusOptions,avatarSrcByName:t.avatarSrcByName,searchText:t.searchText,myAccountSeq:r,todayStr:t.todayStr,showProject:t.showProject,showManager:t.showManager,showActions:t.showActions,showRequest:t.showRequest,confirmMode:t.confirmMode,confirmInfo:n.is_notice?void 0:t.getConfirmInfo?.(n),onConfirmTask:t.onConfirmTask,projectLabel:a?.label??"",projectIcon:a?.icon??"",onProjectClick:t.onProjectClick,onRequestReply:t.onRequestReply,onRequestToggleCompleted:t.onRequestToggleCompleted,onDateClick:t.onDateClick,onChangeNote:t.onChangeNote,onMemberClick:t.onMemberClick,onClaimClick:t.onClaimClick,onVolunteerClick:t.onVolunteerClick,onStatusClick:t.onStatusClick,onOpenDetail:t.onOpenDetail,onTaskContextMenu:t.onTaskContextMenu,notice:t.notice,bugMode:t.bugMode,supportMode:t.supportMode,managerCentered:t.managerCentered,trashMode:t.trashMode,dimCompleted:t.dimCompleted,noticeReadOnly:!Cn(n,r),coreLocked:Sr(n,r,i),readOnly:t.readOnly,noteLocked:t.readOnly||(n.is_notice?!Nl(n,r):!Cn(n,r)),completeLocked:n.is_event?!0:n.is_notice?(n.author_account_seq??0)!==r:(n.author_account_seq??0)!==r&&(n.manager_account_seq??0)!==r,targetSummary:n.is_notice?t.getTargetSummary?.(n):void 0,targetDisplay:n.is_notice?t.getTargetDisplay?.(n):void 0,onArchiveTask:t.onArchiveTask,unread:t.isTaskUnread?.(n)??!1,ackInfo:n.is_notice?t.getAckInfo?.(n):void 0,onAckConfirm:t.onAckConfirm,onAckListClick:t.onAckListClick,onPriorityClick:t.onPriorityClick,onIconClick:t.onIconClick,lastColumnCentered:t.lastColumnCentered})});import{useMemo as lp,useState as mm}from"react";import{Box as Qr,Button as sp,ButtonBase as cp,Dialog as NS,Divider as um,Menu as FS,MenuItem as $S,Popover as HS}from"@mui/material";import mp from"@mui/icons-material/ChevronRight";import WS from"@mui/icons-material/Check";import VS from"@mui/icons-material/NotificationsActiveOutlined";import{SimpleCalendar as US,TimePicker as GS}from"@ehfuse/mui-datetime-picker";import KS from"@mui/icons-material/TimerOutlined";import{useEffect as AS,useState as LS}from"react";function Bn(e){let{loadHolidays:t}=ue(),[o,n]=LS(()=>new Map),r=e.join(",");return AS(()=>{if(!t||!r){n(new Map);return}let i=!1;return t(r.split(",").map(Number)).then(a=>{if(i)return;let l=new Map;for(let s of a)l.has(s.date)||l.set(s.date,s.name);n(l)}).catch(()=>{}),()=>{i=!0}},[t,r]),o}var cm=["min30_before","hour1_before","hour2_before","same_day","day_before","two_days_before","three_days_before","week_before"];function vn(e){let t=Array.isArray(e?.reminders)?e?.reminders:[e?.reminder],o=new Set;for(let n of t){let r=String(n??"").trim();cm.includes(r)&&o.add(r)}return cm.filter(n=>o.has(n))}function Xl(e,t){if(t==="none")return[];let o=e.includes(t)?e.filter(n=>n!==t):[...e,t];return cm.filter(n=>o.includes(n))}import{Fragment as up,jsx as no,jsxs as sn}from"react/jsx-runtime";var YS=9,jS=[{value:"min30_before",label:"30\uBD84 \uC804"},{value:"hour1_before",label:"1\uC2DC\uAC04 \uC804"},{value:"hour2_before",label:"2\uC2DC\uAC04 \uC804"}],dp=[{value:"day_before",label:"1\uC77C \uC804"},{value:"two_days_before",label:"2\uC77C \uC804"},{value:"three_days_before",label:"3\uC77C \uC804"},{value:"week_before",label:"1\uC8FC\uC77C \uC804"}],pp=[{value:"none",label:"\uC5C6\uC74C"},...jS,...dp];function dm(e){return e?pp:[{value:"none",label:"\uC5C6\uC74C"},...dp]}function XS(e){return e==="same_day"?"\uB2F9\uC77C":pp.find(t=>t.value===e)?.label??"\uC5C6\uC74C"}function pm(e){if(e.length===0)return"\uC5C6\uC74C";let t=e.map(o=>XS(o));return t.length<=3?t.join(", "):`${t.slice(0,3).join(", ")} \uC678 ${t.length-3}`}function QS(e){let t=e?new Date(`${e}T00:00:00`):new Date;return Number.isNaN(t.getTime())?new Date:t}function Go({anchorEl:e,open:t,date:o,reminders:n,hideReminder:r=!1,showTime:i=!1,autoFillTime:a=!0,centered:l=!1,onClose:s,onDateChange:m,onReminderChange:c}){let[p,d]=mm(null),[u,f]=mm(null),g=Sn(),v=String(o??"").trim().slice(0,10),D=String(o??"").trim().slice(11,16),b=/^\d{2}:\d{2}$/.test(D)?D:"",S=(x,B)=>m(B?`${x} ${B}`:x),{defaultDueHour:h}=ue(),E=`${String(Number.isInteger(h)&&h>=0&&h<=23?h:YS).padStart(2,"0")}:00`,y=x=>{if(b)return b;if(!a)return"";let B=new Date;return x===Bt(B)?`${String(B.getHours()).padStart(2,"0")}:${String(B.getMinutes()).padStart(2,"0")}`:E},[T,I]=mm(()=>{let x=Number(v.slice(0,4));return Number.isFinite(x)&&x>1900?x:new Date().getFullYear()}),A=lp(()=>[T-1,T,T+1],[T]),q=Bn(A),C=lp(()=>{let x=[];for(let B of q.keys()){let w=new Date(`${B}T00:00:00`);Number.isNaN(w.getTime())||x.push(w)}return x},[q]),k=sn(Qr,{sx:{width:300,maxWidth:"100%"},children:[no(Qr,{sx:{height:320},children:no(US,{selectedDate:QS(v),onSelect:x=>{S(Bt(x),i?y(Bt(x)):b),i||s()},onClose:s,showFooter:!1,autoApply:!0,holidays:C,onYearChange:x=>I(x),onMonthChange:(x,B)=>{typeof B=="number"&&I(B)}})}),i?sn(up,{children:[no(um,{sx:{borderColor:"#e6e6e3"}}),sn(cp,{onClick:x=>f(x.currentTarget),sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",px:2,py:1.25,fontSize:14,"&:hover":{bgcolor:"#f8f8f7"}},children:[sn(Qr,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.75,color:"#37352f"},children:[no(KS,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC2DC\uAC01"]}),sn(Qr,{component:"span",sx:{display:"inline-flex",alignItems:"center",color:"#37352f"},children:[b||"\uC5C6\uC74C",no(mp,{sx:{fontSize:18,ml:.25,color:"#9a9a97"}})]})]}),no(GS,{anchorEl:u,open:!!u,onClose:()=>f(null),centered:l,value:{hour:b.slice(0,2)||E.slice(0,2),minute:b.slice(3,5)||"00"},format:"HH:mm",minuteStep:5,autoApply:!0,locale:"ko",onChange:(x,B)=>{S(v||Bt(new Date),`${x}:${B}`),f(null)}})]}):null,r?null:sn(up,{children:[no(um,{sx:{borderColor:"#e6e6e3"}}),sn(cp,{onClick:x=>d(x.currentTarget),sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",px:2,py:1.25,fontSize:14,"&:hover":{bgcolor:"#f8f8f7"}},children:[sn(Qr,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.75,color:"#37352f"},children:[no(VS,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC0AC\uC804\uC54C\uB9BC"]}),sn(Qr,{component:"span",sx:{display:"inline-flex",alignItems:"center",color:"#37352f"},children:[pm(n),no(mp,{sx:{fontSize:18,ml:.25,color:"#9a9a97"}})]})]}),no(FS,{transitionDuration:0,anchorEl:p,open:!!p,onClose:()=>d(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...g,children:dm(!!b).map(x=>{let B=x.value==="none"?n.length===0:n.includes(x.value);return sn($S,{selected:B,onClick:()=>{c(Xl(n,x.value)),x.value==="none"&&d(null)},sx:{fontSize:14,minWidth:140,justifyContent:"space-between",gap:1},children:[x.label,B?no(WS,{sx:{fontSize:16,color:"#2f80ed"}}):null]},x.value)})})]}),no(um,{sx:{borderColor:"#e6e6e3"}}),sn(Qr,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",px:1,py:.5},children:[no(sp,{size:"small",onClick:()=>{S(Bt(new Date),i?y(Bt(new Date)):b),s()},sx:{minWidth:0,px:1.25,fontSize:13.5,color:"#2563eb"},children:"\uC624\uB298"}),no(sp,{size:"small",onClick:s,sx:{minWidth:0,px:1.25,fontSize:13.5,color:"#2563eb"},children:"\uB2EB\uAE30"})]})]});return l?no(NS,{open:t,onClose:s,slotProps:{paper:{sx:{borderRadius:3,width:300,maxWidth:"calc(100vw - 48px)",overflow:"hidden"}}},children:k}):no(HS,{transitionDuration:0,open:t,anchorEl:e,onClose:s,anchorOrigin:{vertical:"bottom",horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},slotProps:{paper:{sx:{borderRadius:2,boxShadow:"0 8px 24px rgba(0,0,0,0.14)"}}},children:k})}import{Box as Zr,Button as mC}from"@mui/material";import{FormDialog as uC}from"@ehfuse/mui-form-dialog";import{ClearTextField as dC,Switch as pC}from"@ehfuse/mui-form-controls";import{useMemo as ZS,useState as JS}from"react";import{Box as ya,ButtonBase as eC,InputBase as tC,Typography as fp}from"@mui/material";import oC from"@mui/icons-material/Search";import nC from"@ehfuse/overlay-scrollbar";import{Fragment as rC,jsx as In,jsxs as Sa}from"react/jsx-runtime";function gp({iconKey:e,Icon:t,selected:o,onChange:n}){return In(eC,{onClick:()=>n(e),title:e,sx:{display:"flex",alignItems:"center",justifyContent:"center",height:40,minWidth:0,borderRadius:1,border:o?"2px solid #2563eb":"1px solid #dedddb",bgcolor:o?"#eef4ff":"#fff",color:o?"#1e3a8a":"#787774","&:hover":{bgcolor:o?"#eef4ff":"#f4f4f2"}},children:In(t,{sx:{fontSize:20}})})}function Ql({value:e,onChange:t,maxHeight:o=360}){let[n,r]=JS(""),{groups:i}=Cd(),a=n.trim().toLowerCase(),l=ZS(()=>{if(!a)return null;let s=new Set,m=[];for(let c of i)for(let p of c.options)s.has(p.key)||!p.key.toLowerCase().includes(a)||(s.add(p.key),m.push(p));return m},[a,i]);return Sa(ya,{sx:{display:"flex",flexDirection:"column",gap:1,minWidth:0},children:[Sa(ya,{sx:{display:"flex",alignItems:"center",gap:1,px:1.25,height:44,borderRadius:1,border:"1px solid #dedddb",bgcolor:"#fff"},children:[In(oC,{sx:{fontSize:20,color:"#9b9a97"}}),In(tC,{value:n,onChange:s=>r(s.target.value),placeholder:"\uC544\uC774\uCF58 \uAC80\uC0C9(\uC601\uBB38)",autoFocus:!0,sx:{flex:1,fontSize:15},inputProps:{"aria-label":"\uC544\uC774\uCF58 \uAC80\uC0C9"}})]}),Sa(nC,{style:{maxHeight:o},contentStyle:{minWidth:0,paddingRight:4},thumb:{width:6},children:[l&&Sa(rC,{children:[In(fp,{sx:{fontSize:12,color:"#9b9a97"},children:l.length>0?`\uAC80\uC0C9 \uACB0\uACFC ${l.length}\uAC1C`:"\uCC3E\uB294 \uC544\uC774\uCF58\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}),In(ya,{sx:{display:"grid",gridTemplateColumns:"repeat(10, minmax(0, 1fr))",gap:.5},children:l.map(({key:s,Icon:m})=>In(gp,{iconKey:s,Icon:m,selected:s===e,onChange:t},s))})]}),!l&&i.map((s,m)=>Sa(ya,{sx:{contentVisibility:"auto",containIntrinsicSize:`${42+Math.ceil(s.options.length/10)*44}px`},children:[In(fp,{sx:{fontSize:13,fontWeight:700,color:"#1d4ed8",mt:m===0?0:2,pb:.5},children:s.label}),In(ya,{sx:{display:"grid",gridTemplateColumns:"repeat(10, minmax(0, 1fr))",gap:.5},children:s.options.map(({key:c,Icon:p})=>In(gp,{iconKey:c,Icon:p,selected:c===e,onChange:t},c))})]},s.id))]})]})}import{useGlobalForm as sC}from"@ehfuse/forma";import{ErrorAlert as cC}from"@ehfuse/alerts";import{useEffect as iC,useId as aC,useRef as Zl}from"react";import{useModal as lC}from"@ehfuse/forma";function we(e){return`${e}-${aC()}`}function Zt({modalIdPrefix:e,open:t,onClose:o,onOpen:n}){let r=Zl(o);r.current=o;let i=Zl(n);i.current=n;let a=lC({modalId:we(e),onClose:()=>r.current()}),l=Zl(a);l.current=a;let s=Zl(!1);return iC(()=>{t&&!s.current?(i.current?.(),l.current.open()):!t&&s.current&&l.current.isOpen&&l.current.close(),s.current=t},[t]),a}function xp({open:e,initialLabel:t="",initialIcon:o=ma,initialUseSprints:n=!1,onClose:r,onSubmit:i}){let a=sC({formId:we("taskbox-add-tab-form"),initialValues:{label:"",icon:ma,useSprints:!1},onValidate:s=>String(s.label??"").trim()?!0:(cC("\uD504\uB85C\uC81D\uD2B8 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694."),!1),onSubmit:s=>(i(String(s.label).trim(),s.icon,!!s.useSprints),l.form.close(),!0)}),l={form:Zt({modalIdPrefix:"taskbox-add-tab-dialog",open:e,onClose:r,onOpen:()=>a.setFormValues({label:t,icon:o,useSprints:n})})};return{form:a,modals:l}}import{jsx as Un,jsxs as fm}from"react/jsx-runtime";function Jl({open:e,title:t="\uC0C8 \uD504\uB85C\uC81D\uD2B8 \uCD94\uAC00",initialLabel:o="",initialIcon:n=ma,confirmText:r="\uCD94\uAC00",initialUseSprints:i=!1,onClose:a,onSubmit:l}){let{form:s,modals:m}=xp({open:e,initialLabel:o,initialIcon:n,initialUseSprints:i,onClose:a,onSubmit:l}),c=String(s.useFormValue("icon")??""),p=fm(Zr,{children:[Un(dC,{form:s,name:"label",label:"\uD504\uB85C\uC81D\uD2B8 \uC774\uB984",onKeyDown:d=>{d.key==="Enter"&&(d.preventDefault(),s.submit())},fullWidth:!0,autoFocus:!0,sx:{mt:.5}}),Un(Zr,{sx:{mt:2,fontSize:13,color:"#787774"},children:"\uC544\uC774\uCF58"}),Un(Zr,{sx:{mt:1},children:Un(Ql,{value:c,onChange:d=>s.setFormValue("icon",d),maxHeight:264})}),fm(Zr,{sx:{mt:2,display:"flex",alignItems:"center",justifyContent:"space-between",gap:1},children:[fm(Zr,{children:[Un(Zr,{sx:{fontSize:14,color:"#37352f"},children:"\uBAA9\uD45C(\uC2A4\uD504\uB9B0\uD2B8) \uC0AC\uC6A9"}),Un(Zr,{sx:{fontSize:12.5,color:"#9a9a97"},children:"\uBAA9\uD45C \uBC30\uC815\uC73C\uB85C \uBC18\uBCF5 \uC8FC\uAE30\uB97C \uAD00\uB9AC\uD569\uB2C8\uB2E4(\uAC1C\uBC1C\uD300\uC6A9)"})]}),Un(pC,{form:s,name:"useSprints"})]})]});return Un(uC,{open:m.form.isOpen,onClose:m.form.close,maxWidth:"xs",title:t,locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-add-tab",sections:[{id:"add-tab",showTitle:!1,children:p}],actions:{showCancelButton:!0,right:Un(mC,{variant:"contained",onClick:()=>{s.submit()},children:r})}})}import{Box as fC}from"@mui/material";import{jsx as gC}from"react/jsx-runtime";function Bi({size:e=40}){return gC(fC,{sx:{boxSizing:"border-box",width:e,height:e,borderRadius:"50%",border:"4px solid rgba(28, 64, 125, 0.14)",borderTopColor:"#1c407d",animation:"taskbox-content-loading-spin 0.75s linear infinite","@keyframes taskbox-content-loading-spin":{to:{transform:"rotate(360deg)"}}}})}import{Box as es,ButtonBase as xC,Divider as bC,Popover as hC}from"@mui/material";import kC from"@mui/icons-material/Check";import{jsx as Jr,jsxs as bp}from"react/jsx-runtime";var gm=["#1e3a8a","#2f80ed","#06b6d4","#0fa3a3","#2f9e5b","#84cc16","#e8a33d","#d9730d","#e5484d","#e255a1","#a355c0","#8a5a2b","#57564f","#111827"];function Ir({anchorEl:e,value:t,color:o="",onSelect:n,onSelectColor:r,onClose:i}){return Jr(hC,{transitionDuration:0,open:!!e,anchorEl:e,onClose:i,anchorOrigin:{vertical:"bottom",horizontal:"left"},marginThreshold:16,slotProps:{paper:{sx:{mt:1,maxHeight:"calc(100dvh - 96px)"}}},children:bp(es,{sx:{width:"min(492px, calc(100vw - 32px))"},children:[Jr(es,{sx:{p:1.25},children:Jr(Ql,{value:t||Tr,maxHeight:"min(432px, calc(100dvh - 300px))",onChange:a=>{n(a),i()}})}),r?bp(es,{sx:{px:1.25,pb:1.25},children:[Jr(bC,{sx:{mb:1,borderColor:"#efefed"}}),Jr(es,{sx:{display:"grid",gridTemplateColumns:`repeat(${gm.length}, 1fr)`,justifyItems:"center"},children:gm.map(a=>{let l=(o||gm[0])===a;return Jr(xC,{"aria-label":`\uC544\uC774\uCF58 \uC0C9 ${a}`,onClick:()=>r(a),sx:{width:"100%",maxWidth:26,aspectRatio:"1 / 1",borderRadius:"50%",bgcolor:a,display:"flex",alignItems:"center",justifyContent:"center"},children:l?Jr(kC,{sx:{fontSize:15,color:"#ffffff"}}):null},a)})})]}):null]})})}import{Fragment as yp,jsx as Be,jsxs as wo}from"react/jsx-runtime";var Tp=48,MC=5;function Sp({tasks:e,statusOptions:t,avatarSrcByName:o,searchText:n,todayStr:r,sortBy:i,sortDirection:a,onSort:l,onRequestReply:s,onToggleCompleted:m,onChangeTaskDate:c,onChangeTaskReminder:p,onChangeTaskEventTime:d,groupBy:u,collapsedGroupKeys:f,customTabs:g,onToggleGroup:v,hideCompleted:D=!1,loading:b=!1,dimCompleted:S=!0,readOnly:h=!1,onChangeTaskIcon:E,onChangeTaskIconColor:y,onAddInGroup:T,canAddInGroup:I,renderGroupSummary:A,renderGroupTitleSummary:q,onChangeTaskProject:C,onAddProject:k,onChangeNote:x,onMemberClick:B,onClaimTask:w,onChangeTaskStatus:P,onOpenDetail:H,onTaskContextMenu:_,onMemberFilterClick:N,activeMemberFilters:G=[],onStatusFilterClick:Q,statusFilterActive:se=!1,onAckFilterClick:me,ackFilterActive:Y=!1,onProjectFilterClick:O,projectFilterActive:oe=!1,onPriorityFilterClick:F,priorityFilterActive:W=!1,onValueFilterClick:V,activeValueFilters:U=[],columns:de,getConfirmInfo:re,onConfirmTask:Te,myAccountSeq:j=0,currentUserName:ne="",groupManagerByMyRole:he=!1,pinKindGroups:Ce=!1,allowManagerVolunteer:_e=!0,noticeAdmin:Le=!1,getTargetSummary:ct,getTargetDisplay:Ge,onArchiveTask:Pe,isTaskUnread:Ne,getAckInfo:K,onAckConfirm:ae,onAckListClick:We,onChangeTaskPriority:Ft,onEndReached:$o,useTaskItem:$t}){let ie=xe(),Qe=cn(()=>({showManager:!0,showActions:!0,showRequest:!0,...de}),[de]),Ho=Qe.showManager??!0,Co=Qe.showActions??!0,Ht=Qe.showRequest??!0,Hn=Qe.confirmMode??"none",Bo=Qe.notice??!1,wt=Qe.bug??!1,Z=Qe.support??!1,z=Z||(Qe.centerManager??!1),Oe=Qe.trash??!1,Wt=u!=="none",Ve=cn(()=>Wt?zl(e,u,r,g,t,ne,{enabled:he,myAccountSeq:j},Ce):[],[Wt,e,u,r,g,t,ne,he,j,Ce]),$=cn(()=>D?e.filter(R=>!R.completed):e,[e,D]),X=cn(()=>$.filter(R=>R.completed||R.archived||R.is_support?!1:R.is_notice?!!K?.(R).canAck:!!re?.(R).canConfirm),[$,K,re]),fe=cn(()=>j>0?e.filter(R=>R.completed&&!R.archived&&!R.is_support&&!!R.review_pending&&(R.author_account_seq??0)===j):[],[e,j]),De=cn(()=>new Set([...X,...fe].map(R=>R.seq)),[X,fe]),rt=cn(()=>Ve.map(R=>({section:R,visibleTasks:R.tasks.filter(J=>!De.has(J.seq)&&(!D||!J.completed))})).filter(R=>R.visibleTasks.length>0),[Ve,D,De]),it=cn(()=>new Set(f),[f]),zt=cn(()=>{let R=[];if(Wt)for(let{section:J,visibleTasks:Me}of rt){let vo=it.has(J.key);if(R.push({kind:"header",section:J,visibleTasks:Me,collapsed:vo}),!vo)for(let rn of Me)R.push({kind:"task",task:rn,last:!1})}else for(let J of $)De.has(J.seq)||R.push({kind:"task",task:J,last:!1});for(let J=R.length-1;J>=0;J-=1){let Me=R[J];if(Me.kind==="task"){Me.last=!0;break}}return R},[Wt,rt,$,it,De]),Dt=Qe.showProject??(!Bo&&u!=="tab"),Vt=cn(()=>Ll({...Qe,showProject:Dt}),[Qe,Dt]),to=Vd({...Qe,showProject:Dt}),Et=Ud({...Qe,showProject:Dt}),{onReturnTask:Wn}=ue(),tn=xm(null),fr=xm(null),gr=Vt[Vt.length-1]?.align==="center",ui=cn(()=>{let R=new Map;for(let J of g)R.set(J.key,{label:J.archived?`${J.label} (\uBCF4\uAD00\uB428)`:J.label,icon:J.icon});return R},[g]),di=xm(null),[Ee,at]=wn(null);Ca(()=>{if(!Ee)return;let R=()=>{tn.current&&(tn.current.scrollLeft=Ee.scrollLeft),fr.current&&(fr.current.scrollLeft=Ee.scrollLeft)};return R(),Ee.addEventListener("scroll",R,{passive:!0}),()=>Ee.removeEventListener("scroll",R)},[Ee]);let Wo=$.length>0;Ca(()=>{if(!Wo){at(null);return}let R=window.requestAnimationFrame(()=>{at(di.current?.getScrollContainer()??null)});return()=>window.cancelAnimationFrame(R)},[Wo]);let ea=`${u}|${i}|${a}|${n}|${D?1:0}`;Ca(()=>{Ee&&(Ee.scrollTop=0)},[ea,Ee]);let[pi,fl]=wn(!1);Ca(()=>{if(!Ee)return;let R=()=>fl(Ee.scrollHeight-Ee.clientHeight>4),J=window.requestAnimationFrame(R),Me=new ResizeObserver(R);return Me.observe(Ee),Ee.firstElementChild&&Me.observe(Ee.firstElementChild),()=>{window.cancelAnimationFrame(J),Me.disconnect()}},[Ee,zt.length,f.length]),Ca(()=>{if(!Ee)return;let R=Ee.clientHeight,J=new ResizeObserver(()=>{let Me=Ee.clientHeight;Me!==R&&(R=Me,Ee.dispatchEvent(new Event("scroll")))});return J.observe(Ee),()=>J.disconnect()},[Ee]);let[Ke,Wr]=wn(null),[on,ta]=wn(null),[Vr,xr]=wn(null),[Mo,br]=wn(null),[gc,oa]=wn(!1),[nn,po]=wn(null),fo=nn?e.find(R=>R.seq===nn.taskSeq)??null:null,[hr,Ur]=wn(null),kr=hr?e.find(R=>R.seq===hr.taskSeq)??null:null,[Vn,Ut]=wn(null),Xt=Vn?e.find(R=>R.seq===Vn.taskSeq)??null:null,gl=_n((R,J)=>{Ut({anchorEl:J,taskSeq:R.seq})},[]),na=_n((R,J)=>{Ur({anchorEl:J,taskSeq:R.seq})},[]),xc=_n((R,J)=>{po({anchorEl:J,taskSeq:R.seq})},[]),bc=_n((R,J)=>{if(!J)return;l(R,i===R&&a==="asc"?"desc":"asc")},[l,i,a]),xl=_n((R,J,Me)=>{let vo=!!R.is_event,rn=String(R.event_time??"").trim(),fi=vo&&J==="due_date"&&/^\d{2}:\d{2}$/.test(rn)?`${String(R.due_date??"").slice(0,10)} ${rn}`:R[J];Wr({anchorEl:Me,taskSeq:R.seq,field:J,date:fi,isEvent:vo,reminders:vn(R),completed:R.completed})},[]),bl=_n((R,J)=>{br({anchorEl:J,task:R})},[]),ra=_n(R=>{if(Ke){if(Ke.isEvent&&Ke.field==="due_date"){let J=R.slice(0,10),Me=R.slice(11,16),vo=Ke.date.slice(0,10),rn=Ke.date.slice(11,16);J!==vo&&c(Ke.taskSeq,"due_date",J),Me!==rn&&d?.(Ke.taskSeq,Me)}else c(Ke.taskSeq,Ke.field,R);Wr(J=>J&&{...J,date:R})}},[Ke,c,d]),M=_n(R=>{Ke&&(p(Ke.taskSeq,R),Wr(J=>J&&{...J,reminders:R}))},[Ke,p]),At=_n((R,J)=>{xr({anchorEl:J,taskSeq:R.seq,title:R.title,kind:"claim"})},[]),yn=_n((R,J)=>{xr({anchorEl:J,taskSeq:R.seq,title:R.title,kind:"volunteer"})},[]),Gr=(R,J)=>Be(ap,{task:R,hideBottomBorder:J,gridTemplate:to,useTaskItem:$t,statusOptions:t,avatarSrcByName:o,searchText:n,myAccountSeq:j,todayStr:r,showProject:Dt,showManager:Ho,showActions:Co,showRequest:Ht,confirmMode:Hn,notice:Bo,bugMode:wt,supportMode:Z,managerCentered:z,trashMode:Oe,dimCompleted:S,readOnly:h,projectByKey:ui,getConfirmInfo:re,onConfirmTask:Te,onProjectClick:bl,onRequestReply:s,onRequestToggleCompleted:ta,onDateClick:xl,onChangeNote:x,onMemberClick:B,onClaimClick:w?At:void 0,onVolunteerClick:_e?yn:void 0,onStatusClick:xc,onOpenDetail:H,onTaskContextMenu:_,onPriorityClick:na,onIconClick:E?gl:void 0,lastColumnCentered:gr,getTargetSummary:ct,getTargetDisplay:Ge,getAckInfo:K,isTaskUnread:Ne,onArchiveTask:Pe,onAckConfirm:ae,onAckListClick:We},R.seq);return wo(bt,{sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0,border:`1px solid ${ie.table.borderColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden",bgcolor:ie.table.bg,color:ie.table.rowColor,...ie.table.sx},children:[Be(bt,{ref:tn,sx:{overflow:"hidden",flexShrink:0},children:Be(bt,{sx:{display:"grid",gridTemplateColumns:to,minWidth:Et,borderBottom:`1px solid ${ie.table.borderColor}`,flexShrink:0,bgcolor:ie.table.headerBg,"& > *":{borderRight:`1px solid ${ie.table.rowBorderColor}`},"& > *:first-of-type":{px:1.5},"& > *:last-child":{borderRight:"none",pr:2,...gr?{pl:2}:{}},...ie.table.headerSx},children:Vt.map(R=>{let J=i===R.id,Me=!!R.memberFilter,vo=Me&&G.includes(R.memberFilter),rn=Me||!!R.statusFilter||!!R.ackFilter||!!R.projectFilter||!!R.priorityFilter||!!R.valueFilter,fi=vo||!!R.valueFilter&&U.includes(R.valueFilter)||!!R.statusFilter&&se||!!R.ackFilter&&Y||!!R.projectFilter&&oe||!!R.priorityFilter&&W;return wo(bt,{onClick:gi=>{R.memberFilter?N(R.memberFilter,gi.currentTarget):R.statusFilter?Q(gi.currentTarget):R.ackFilter?me?.(gi.currentTarget):R.projectFilter?O?.(gi.currentTarget):R.priorityFilter?F?.(gi.currentTarget):R.valueFilter?V?.(R.valueFilter,gi.currentTarget):bc(R.id,R.sortable)},sx:{display:"flex",alignItems:"center",justifyContent:R.align==="center"?"center":"flex-start",gap:.5,px:1,...R.id==="title"?{pl:2}:{},py:1,minWidth:0,fontSize:ie.table.headerFontSize,color:R.sortable||rn?ie.table.headerActiveColor:ie.table.headerColor,whiteSpace:"nowrap",cursor:R.sortable||rn?"pointer":"default",userSelect:"none",...J?{color:ie.table.headerFilteredColor}:{},...fi?{color:ie.table.headerFilteredColor,fontWeight:600}:{}},children:[R.icon,R.label,fi?Be(_C,{sx:{fontSize:14}}):null,J?a==="asc"?Be(CC,{sx:{fontSize:13}}):Be(BC,{sx:{fontSize:13}}):null]},R.id)})})}),X.length>0||fe.length>0?Be(bt,{sx:{flexShrink:0,maxHeight:`${ie.table.groupHeader.minHeight+1+Tp*MC}px`,overflowY:"auto",overflowX:"hidden",borderBottom:"1px solid #000"},ref:fr,children:wo(bt,{sx:{minWidth:Et},children:[X.length>0?wo(yp,{children:[wo(bt,{sx:{position:"sticky",top:0,zIndex:1,display:"flex",alignItems:"center",gap:.5,px:1.5,minHeight:ie.table.groupHeader.minHeight,bgcolor:"#fdf3f2",borderBottom:"1px solid #f2d7d4"},children:[Be(bt,{component:"span",sx:{fontSize:ie.table.groupHeader.labelFontSize,fontWeight:ie.table.groupHeader.labelFontWeight,color:ie.table.groupHeader.labelColor},children:"\uBBF8\uD655\uC778"}),Be(bt,{sx:{ml:"auto",display:"flex",alignItems:"center",pr:.5},children:Be(bt,{component:"span",sx:{flexShrink:0,width:ie.table.groupHeader.badge.width,py:ie.table.groupHeader.badge.paddingY,borderRadius:`${ie.table.groupHeader.badge.borderRadius}px`,bgcolor:"#e5484d",color:"#fff",fontSize:ie.table.groupHeader.badge.fontSize,fontWeight:ie.table.groupHeader.badge.fontWeight,lineHeight:1.6,textAlign:"center",fontVariantNumeric:"tabular-nums"},children:X.length})})]}),X.map((R,J)=>Gr(R,fe.length===0&&J===X.length-1))]}):null,fe.length>0?wo(yp,{children:[wo(bt,{sx:{position:"sticky",top:0,zIndex:1,display:"flex",alignItems:"center",gap:.5,px:1.5,minHeight:ie.table.groupHeader.minHeight,bgcolor:"#f4f0fe",borderBottom:"1px solid #e2dbf9"},children:[Be(bt,{component:"span",sx:{fontSize:ie.table.groupHeader.labelFontSize,fontWeight:ie.table.groupHeader.labelFontWeight,color:ie.table.groupHeader.labelColor},children:"\uAC80\uC218 \uB300\uAE30"}),Be(bt,{sx:{ml:"auto",display:"flex",alignItems:"center",pr:.5},children:Be(bt,{component:"span",sx:{flexShrink:0,width:ie.table.groupHeader.badge.width,py:ie.table.groupHeader.badge.paddingY,borderRadius:`${ie.table.groupHeader.badge.borderRadius}px`,bgcolor:"#8b5cf6",color:"#fff",fontSize:ie.table.groupHeader.badge.fontSize,fontWeight:ie.table.groupHeader.badge.fontWeight,lineHeight:1.6,textAlign:"center",fontVariantNumeric:"tabular-nums"},children:fe.length})})]}),fe.map((R,J)=>Gr(R,J===fe.length-1))]}):null]})}):null,$.length===0&&b?Be(bt,{role:"status","aria-live":"polite","aria-label":"\uC5C5\uBB34 \uBAA9\uB85D\uC744 \uBD88\uB7EC\uC624\uB294 \uC911\uC785\uB2C8\uB2E4.",sx:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",py:8},children:Be(Bi,{})}):$.length===0?Be(bt,{role:"status","aria-live":"polite",sx:{py:8,textAlign:"center",color:ie.table.emptyColor,fontSize:14},children:e.length>0?`\uC644\uB8CC\uB41C \uC5C5\uBB34 ${e.length}\uAC74\uC774 "\uC644\uB8CC \uC228\uAE30\uAE30"\uB85C \uAC10\uCDB0\uC838 \uC788\uC2B5\uB2C8\uB2E4.`:wt?"\uB4F1\uB85D\uB41C \uC624\uB958\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.":Z?"\uC811\uC218\uB41C \uBB38\uC758\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.":Bo?"\uB4F1\uB85D\uB41C \uACF5\uC9C0\uC0AC\uD56D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4.":"\uD45C\uC2DC\uD560 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):Be(bt,{sx:{flex:1,minHeight:0},children:Be(EC,{ref:di,style:{height:"100%"},contentStyle:{minWidth:Et},thumb:{width:8},showHorizontalScrollbar:!0,scrollTopFab:!0,children:Ee?Be(DC,{customScrollParent:Ee,data:zt,computeItemKey:(R,J)=>J.kind==="header"?`group:${J.section.key}`:J.task.seq,endReached:Wt?void 0:$o,defaultItemHeight:Tp,increaseViewportBy:{top:600,bottom:600},itemContent:(R,J)=>{if(J.kind==="task")return Gr(J.task,J.last&&pi);let{section:Me,visibleTasks:vo,collapsed:rn}=J;return wo(bt,{onClick:()=>v(Me.key),sx:{display:"flex",alignItems:"center",gap:.5,px:1.5,minHeight:ie.table.groupHeader.minHeight,bgcolor:ie.table.groupHeader.bg,borderBottom:`1px solid ${ie.table.groupHeader.borderColor}`,cursor:"pointer",userSelect:"none","&:hover":{bgcolor:ie.table.groupHeader.hoverBg},...ie.table.groupHeader.sx},children:[rn?Be(IC,{sx:{fontSize:20,color:ie.colors.textMuted}}):Be(vC,{sx:{fontSize:20,color:ie.colors.textMuted}}),Be(bt,{component:"span",sx:{fontSize:ie.table.groupHeader.labelFontSize,fontWeight:ie.table.groupHeader.labelFontWeight,color:ie.table.groupHeader.labelColor},children:Me.label}),q?Be(bt,{sx:{flexShrink:0,display:"flex",alignItems:"center",ml:.5},children:q(Me.key,Me.tasks)}):null,T&&(!I||I(Me.key))?Be(yC,{size:"small","aria-label":"\uC774 \uADF8\uB8F9\uC5D0 \uC5C5\uBB34 \uB4F1\uB85D",onClick:fi=>{fi.stopPropagation(),T(Me.key,Me.tasks)},sx:{flexShrink:0,ml:.75,p:.25,color:ie.colors.textSecondary,"&:hover":{bgcolor:ie.colors.surfaceHover,color:ie.colors.accentOnSurface}},children:Be(kp,{sx:{fontSize:21}})}):null,wo(bt,{sx:{ml:"auto",minWidth:0,display:"flex",alignItems:"center",gap:1,pr:.5},children:[A?A(Me.key,Me.tasks):null,Be(bt,{component:"span",sx:{flexShrink:0,width:ie.table.groupHeader.badge.width,py:ie.table.groupHeader.badge.paddingY,borderRadius:`${ie.table.groupHeader.badge.borderRadius}px`,bgcolor:ie.table.groupHeader.badge.bg,border:ie.table.groupHeader.badge.border,color:ie.table.groupHeader.badge.color,fontSize:ie.table.groupHeader.badge.fontSize,fontWeight:ie.table.groupHeader.badge.fontWeight,lineHeight:1.6,textAlign:"center",fontVariantNumeric:"tabular-nums"},children:vo.length})]})]})}},ea):null})}),Be(hi,{anchorEl:nn?.anchorEl??null,value:fo?.status??"",options:fo?Ml(fo):ga,onSelect:R=>{fo&&P(fo.seq,R)},onComplete:fo&&!fo.completed&&!fo.is_notice&&!fo.is_event&&!fo.is_bug&&!Oe&&((fo.author_account_seq??0)===j||(fo.manager_account_seq??0)===j)?()=>m(fo,!0):void 0,onClose:()=>po(null)}),Be(hp,{transitionDuration:0,anchorEl:hr?.anchorEl??null,open:!!hr,onClose:()=>Ur(null),children:["high","medium","low"].map(R=>wo(ts,{selected:kr?.priority===R,onClick:()=>{kr&&Ft?.(kr.seq,R),Ur(null)},sx:{fontSize:14,minWidth:130,gap:1},children:[Be(oo,{priority:R,small:!0}),kr?.priority===R?Be(bm,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},R))}),wo(hp,{anchorEl:Mo?.anchorEl??null,open:!!Mo,onClose:()=>br(null),transitionDuration:0,children:[wo(ts,{selected:!Mo?.task.tab_key,onClick:()=>{Mo&&C(Mo.task.seq,""),br(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[Be(wC,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC5C6\uC74C",Mo?.task.tab_key?null:Be(bm,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}})]}),g.filter(R=>!R.archived).map(R=>{let J=ze(R.icon),Me=Mo?.task.tab_key===R.key;return wo(ts,{selected:Me,onClick:()=>{Mo&&C(Mo.task.seq,R.key),br(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[J?Be(J,{sx:{fontSize:17,color:"#1e3a8a"}}):null,R.label,Me?Be(bm,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},R.key)}),k?[Be(TC,{},"add-project-divider"),wo(ts,{onClick:()=>oa(!0),sx:{fontSize:14,color:"#787774"},children:[Be(SC,{children:Be(kp,{sx:{fontSize:18,color:"#787774"}})}),"\uD504\uB85C\uC81D\uD2B8 \uCD94\uAC00"]},"add-project")]:null]}),k?Be(Jl,{open:gc,onClose:()=>oa(!1),onSubmit:(R,J)=>{let Me=Mo?.task.seq??0;(async()=>{let vo=await k(R,J);vo&&Me&&C(Me,vo)})(),br(null)}}):null,Be(Ir,{anchorEl:Vn?.anchorEl??null,value:Xt?.icon??"",color:Xt?.icon_color??"",onSelect:R=>{Vn&&E?.(Vn.taskSeq,R),Ut(null)},onSelectColor:y?R=>{Vn&&y(Vn.taskSeq,R)}:void 0,onClose:()=>Ut(null)}),Be(Go,{anchorEl:Ke?.anchorEl??null,open:!!Ke&&Ke?.field==="start_date",date:Ke?.date??"",reminders:[],hideReminder:!0,showTime:!Ke?.isEvent,onClose:()=>Wr(null),onDateChange:ra,onReminderChange:()=>{}}),Be(Go,{anchorEl:Ke?.anchorEl??null,open:!!Ke&&Ke?.field==="due_date",date:Ke?.date??"",showTime:!Ke?.isEvent||!!d,autoFillTime:!Ke?.isEvent,reminders:Ke?.reminders??[],hideReminder:!!Ke?.completed,onClose:()=>Wr(null),onDateChange:ra,onReminderChange:M}),Be(RC,{open:!!Vr,anchorEl:Vr?.anchorEl??null,title:Vr?.kind==="claim"?"\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:()=>xr(null),onConfirm:()=>{Vr&&w?.(Vr.taskSeq),xr(null)}}),Be(_o,{open:!!on,anchorEl:on?.anchorEl??null,nextCompleted:on?.nextCompleted??!1,returnMode:!!Wn&&!!(on&&Qt(on.task,j)),onCancel:()=>ta(null),onConfirm:R=>{on&&(R&&Wn?Wn(on.task,R):m(on.task,on.nextCompleted)),ta(null)}})]})}import{useCallback as Rn,useMemo as Gn,useRef as r0,useState as un}from"react";import{Box as Ye,ButtonBase as Lp,Divider as wp,IconButton as Dp,Menu as Ep,MenuItem as wr}from"@mui/material";import Sm from"@mui/icons-material/Add";import Rp from"@mui/icons-material/MoreVert";import Mp from"@mui/icons-material/EditOutlined";import Pp from"@mui/icons-material/ArchiveOutlined";import Op from"@mui/icons-material/UnarchiveOutlined";import i0 from"@mui/icons-material/NotificationsOutlined";import a0 from"@mui/icons-material/PeopleAltOutlined";import{SvgIcon as PC}from"@mui/material";import{jsx as Cp}from"react/jsx-runtime";function Gt({sx:e,...t}){return Cp(PC,{viewBox:"0 0 24 24",...t,sx:{fill:"none",...e},children:Cp("path",{d:"M4 6H20M16 6L15.7294 5.18807C15.4671 4.40125 15.3359 4.00784 15.0927 3.71698C14.8779 3.46013 14.6021 3.26132 14.2905 3.13878C13.9376 3 13.523 3 12.6936 3H11.3064C10.477 3 10.0624 3 9.70951 3.13878C9.39792 3.26132 9.12208 3.46013 8.90729 3.71698C8.66405 4.00784 8.53292 4.40125 8.27064 5.18807L8 6M18 6V16.2C18 17.8802 18 18.7202 17.673 19.362C17.3854 19.9265 16.9265 20.3854 16.362 20.673C15.7202 21 14.8802 21 13.2 21H10.8C9.11984 21 8.27976 21 7.63803 20.673C7.07354 20.3854 6.6146 19.9265 6.32698 19.362C6 18.7202 6 17.8802 6 16.2V6M14 10V17M10 10V17",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})}import{DndContext as l0,DragOverlay as s0,PointerSensor as c0,pointerWithin as m0,rectIntersection as u0,useDroppable as d0,useSensor as p0,useSensors as f0}from"@dnd-kit/core";import{SortableContext as Np,arrayMove as qp,horizontalListSortingStrategy as g0,useSortable as x0,verticalListSortingStrategy as b0}from"@dnd-kit/sortable";import{CSS as h0}from"@dnd-kit/utilities";import Cm from"@ehfuse/overlay-scrollbar";import{ConfirmActionPopper as rs}from"@ehfuse/mui-confirm-action";import{useState as HC}from"react";import{Box as En,ButtonBase as WC,Checkbox as VC,Tooltip as Bp}from"@mui/material";import UC from"@mui/icons-material/AlarmOutlined";import GC from"@mui/icons-material/DragIndicator";import KC from"@mui/icons-material/RadioButtonUnchecked";import YC from"@mui/icons-material/CheckCircle";import jC from"@mui/icons-material/TimerOutlined";import{Box as mn,Button as zC,Popover as AC}from"@mui/material";import LC from"@mui/icons-material/CheckCircle";import{useMediaQuery as OC,useTheme as qC}from"@mui/material";function Ue(){let{isMobile:e}=ue(),t=qC(),o=OC(t.breakpoints.up("lg"));return e!==void 0?e:!o}import{Fragment as NC,jsx as Dn,jsxs as ei}from"react/jsx-runtime";function os({anchorEl:e,open:t,acks:o,total:n,avatarSrcByName:r,pendingNames:i=[],onRequestConfirm:a,onClose:l}){let s=Ue();return Dn(AC,{open:t&&(s||!!e),anchorEl:e,onClose:l,transitionDuration:0,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...s?{anchorReference:"none",slotProps:{paper:{sx:{position:"fixed",top:"50%",left:"50%",translate:"-50% -50%",maxWidth:"calc(100vw - 48px)",maxHeight:"70vh",borderRadius:3}}}}:{},children:ei(mn,{sx:{minWidth:240,maxWidth:320,py:1},children:[ei(mn,{sx:{px:2,pb:.75,fontSize:Ct(13.5),fontWeight:600,color:"#37352f",borderBottom:"1px solid #efefed"},children:["\uD655\uC778 ",o.length,"/",n]}),i.length>0&&o.length>0?ei(mn,{sx:{px:2,pt:1,pb:.5,fontSize:Ct(12.5),fontWeight:600,color:"#9a9a97"},children:["\uD655\uC778 ",o.length]}):null,o.length===0?i.length>0?null:Dn(mn,{sx:{px:2,py:1.5,fontSize:Ct(13.5),color:"#9a9a97"},children:"\uC544\uC9C1 \uD655\uC778\uD55C \uC0AC\uB78C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):o.map(m=>ei(mn,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:.75,minWidth:0},children:[Dn(go,{names:[m.name],size:22,avatarSrcByName:r}),Dn(mn,{component:"span",sx:{fontSize:Ct(14),color:"#37352f",whiteSpace:"nowrap"},children:m.name}),Dn(mn,{component:"span",sx:{ml:"auto",fontSize:Ct(12.5),color:"#9a9a97",whiteSpace:"nowrap"},children:Po(m.time)}),Dn(LC,{sx:{fontSize:16,color:"#2f80ed",flexShrink:0}})]},m.account_seq)),i.length>0?ei(NC,{children:[ei(mn,{sx:{mt:o.length>0?.75:0,px:2,pt:1,pb:.5,borderTop:o.length>0?"1px solid #efefed":"none",fontSize:Ct(12.5),fontWeight:600,color:"#9a9a97"},children:["\uBBF8\uD655\uC778 ",i.length]}),i.map(m=>ei(mn,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:.75,minWidth:0},children:[Dn(go,{names:[m],size:22,avatarSrcByName:r}),Dn(mn,{component:"span",sx:{fontSize:Ct(14),color:"#37352f",whiteSpace:"nowrap"},children:m})]},m))]}):null,a?Dn(mn,{sx:{borderTop:"1px solid #efefed",px:1.5,pt:1,pb:1},children:Dn(zC,{size:"small",fullWidth:!0,variant:"outlined",onClick:()=>{a(),l()},sx:{fontSize:Ct(14),py:.9},children:"\uD655\uC778 \uC694\uCCAD"})}):null]})})}function FC(e){let t=Number(e.author_account_seq??0);return[...new Set([Number(e.manager_account_seq??0),...e.receiver_account_seqs??[]].filter(o=>o>0&&o!==t))]}function $C(e){let t=new Map,o=Number(e.manager_account_seq??0);o>0&&t.set(o,String(e.manager_name??"").trim());let n=e.receiver_account_seqs??[],r=e.receiver_names??[];return n.forEach((i,a)=>{i>0&&!t.has(i)&&t.set(i,String(r[a]??"").trim())}),t}function _r(e,t){let o=FC(e),n=e.acks??[],r=t>0?n.find(l=>l.account_seq===t):void 0,i=new Set(n.map(l=>l.account_seq)),a=$C(e);return{myTime:r?.time??"",canConfirm:t>0&&o.includes(t)&&!r,count:n.filter(l=>o.includes(l.account_seq)).length,total:o.length,pendingNames:o.filter(l=>!i.has(l)).map(l=>a.get(l)??"").filter(l=>l.length>0)}}function BN(e){let t=String(e??"").trim();return t?t.slice(5,16).replaceAll("-","."):""}import{Fragment as ZC,jsx as vt,jsxs as vi}from"react/jsx-runtime";function ns(e){return{border:`1px solid ${e.borderColor}`,borderRadius:1,p:1,bgcolor:e.bg,display:"flex",flexDirection:"column",gap:.75,boxShadow:"0 1px 2px rgba(0,0,0,0.04)",...e.sx}}var XC=3;function QC(e){let t=e.trim();return t?t.slice(2,10).replaceAll("-","."):"-"}function vp(){let e=new Date,t=String(e.getMonth()+1).padStart(2,"0"),o=String(e.getDate()).padStart(2,"0");return`${e.getFullYear()}-${t}-${o}`}var hm="taskbox-card-drag-handle";function Ba({task:e,statusOptions:t,showDueDate:o=!1,onRequestArchiveToggle:n,onRequestReply:r,onDueDateClick:i,titleFontSize:a=13,dragHandleProps:l}){let s=xe(),m=ki(e,ue().resolveTask),c=!!e.due_date&&e.due_date.slice(0,10)<=vp(),d=!!e.is_event&&!!e.due_date&&e.due_date.slice(0,10)<vp()?s.colors.textSecondary:c?s.colors.danger:s.colors.textPrimary,u=_r(e,0),[f,g]=HC(null),v=bi(e,t),D=new Set(e.label_keys??[]),b=v.filter(h=>!D.has(h.key)),S=v.filter(h=>D.has(h.key));return vi(ZC,{children:[vi(En,{sx:{display:"flex",alignItems:"flex-start",gap:.5},children:[l?vt(En,{className:hm,...l,onClick:h=>h.stopPropagation(),sx:{display:"inline-flex",alignItems:"center",flexShrink:0,ml:-.5,mr:-.25,color:s.colors.textMuted,cursor:"grab",touchAction:"none","&:active":{cursor:"grabbing"}},children:vt(GC,{sx:{fontSize:18}})}):null,vt(VC,{size:"small",icon:vt(KC,{sx:{fontSize:20}}),checkedIcon:vt(YC,{sx:{fontSize:20}}),checked:e.completed,inputProps:{"aria-label":e.completed?`${e.title} \uC644\uB8CC \uD574\uC81C`:`${e.title} \uC644\uB8CC \uCC98\uB9AC`},onPointerDown:h=>h.stopPropagation(),onClick:h=>h.stopPropagation(),onChange:(h,E)=>n?.({anchorEl:h.currentTarget,taskSeq:e.seq,nextCompleted:E}),sx:{p:0}}),vt(Bp,{title:e.title,arrow:!0,enterDelay:300,children:vi(En,{sx:{flex:1,minWidth:0,pr:1,fontSize:a,fontWeight:s.mode==="dark"||e.completed?400:500,color:s.mode==="dark"?s.colors.textStrong:s.colors.textPrimary,lineHeight:1.35,overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:XC,overflowWrap:"anywhere",textDecoration:e.completed?"line-through":"none"},children:[e.is_event&&e.event_time?`${e.event_time} `:"",e.title,m?vt(En,{component:"span",sx:{ml:.75,fontSize:12.5,fontWeight:400,color:s.colors.textMuted,fontVariantNumeric:"tabular-nums",whiteSpace:"nowrap",textDecoration:"none"},children:m}):null,(e.comment_count??e.comments?.length??0)>0?vt(vr,{sx:{fontSize:15,ml:.5,verticalAlign:"-2px",color:s.colors.textMuted}}):null]})})]}),e.is_bug&&e.ticket_no?vt(En,{sx:{pl:3,mt:-.5,fontSize:12.5,color:s.colors.textSecondary,fontWeight:500,fontVariantNumeric:"tabular-nums"},children:e.ticket_no}):null,vi(En,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:.5},children:[vi(En,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5,minWidth:0},children:[b.map(h=>vt($e,{option:h,small:!0},h.key)),vt(oo,{priority:e.priority,small:!0}),S.map(h=>vt($e,{option:h,small:!0},h.key))]}),o?vt(Bp,{title:"\uB9C8\uAC10\uC608\uC815",arrow:!0,placement:"top",disableInteractive:!0,slotProps:{transition:{timeout:0}},children:vt(WC,{disabled:!i,onPointerDown:h=>h.stopPropagation(),onClick:h=>{h.stopPropagation(),i?.(e,h.currentTarget)},sx:{display:"inline-flex",alignItems:"center",px:.5,py:.1,borderRadius:.75,fontSize:13,fontWeight:500,color:d,whiteSpace:"nowrap","&:hover":i?{bgcolor:s.colors.border}:void 0},children:String(e.due_date??"").trim()?QC(e.due_date):vt(UC,{sx:{fontSize:15,color:s.colors.textMuted}})})}):null]}),o&&(e.due_date.slice(11,16)||e.estimated_time)?vi(En,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:.25,mt:-.5,fontSize:12,color:s.colors.textSecondary},children:[vt(jC,{sx:{fontSize:14}}),e.due_date.slice(11,16)||e.estimated_time]}):null,vt(go,{names:[...e.manager_name?[e.manager_name]:[],...e.receiver_names],size:20,ringFirst:!!e.manager_name}),u.total>0?vt(En,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:.5},children:vt(En,{sx:{flexShrink:0,width:64},onPointerDown:h=>h.stopPropagation(),onClick:h=>h.stopPropagation(),children:vt(yi,{canConfirm:!1,count:u.count,total:u.total,onConfirm:()=>{},onShowList:h=>g(h)})})}):null,vt(os,{anchorEl:f,open:!!f,acks:e.acks??[],total:u.total,pendingNames:u.pendingNames,onRequestConfirm:r&&u.count<u.total?()=>{r(e),g(null)}:void 0,onClose:()=>g(null)})]})}import{Box as JC}from"@mui/material";import{useSortable as e0}from"@dnd-kit/sortable";import{CSS as t0}from"@dnd-kit/utilities";import{jsx as Ip}from"react/jsx-runtime";function o0(e){return{px:1.25,py:1,display:"flex",flexDirection:"column",gap:.75,borderBottom:`1px solid ${e.borderColor}`,bgcolor:e.bg}}function _p({task:e,statusOptions:t,variant:o="card",showDueDate:n=!1,onRequestArchiveToggle:r,onRequestReply:i,onDueDateClick:a,onCardClick:l,onCardContextMenu:s,titleFontSize:m}){let c=xe(),{attributes:p,listeners:d,setNodeRef:u,transform:f,transition:g,isDragging:v}=e0({id:String(e.seq)}),D=o==="list";return Ip(JC,{ref:u,onClick:l?()=>l(e):void 0,onContextMenu:s?b=>s(e,b):void 0,sx:{...D?o0(c.card):ns(c.card),opacity:v?.35:e.completed?.55:1,transform:t0.Translate.toString(f),transition:g,position:"relative",cursor:"default","&:hover":D?{bgcolor:c.card.hoverBg}:{boxShadow:"0 3px 8px rgba(0,0,0,0.1)"}},children:Ip(Ba,{task:e,statusOptions:t,showDueDate:n,onRequestArchiveToggle:r,onRequestReply:i,onDueDateClick:a,titleFontSize:m,dragHandleProps:{...p,...d}})})}function n0(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):""}function Ko(e){if(e.status==="closed")return`${e.name} (\uC885\uB8CC)`;let t=n0(e.end_date);return t?`${e.name} (~${t})`:e.name}import{jsx as pe,jsxs as lt}from"react/jsx-runtime";var zp=2,Fp="taskbox-column-drag-handle",Bm=[hm,Fp],is="group-",Yo="colmove-",km="__default__",Tm=Qc,ym="__other__",as="sprint-",Ap=`${as}0`,k0={planning:"#9a9a97",active:"#2f80ed",closed:"#9a9a97"};function $p(e){return{flexShrink:0,width:e.width,py:e.paddingY,borderRadius:`${e.borderRadius}px`,bgcolor:e.bg,border:e.border,color:e.color,fontSize:e.fontSize,fontWeight:e.fontWeight,lineHeight:1.6,textAlign:"center",fontVariantNumeric:"tabular-nums",...e.sx}}function T0({column:e,tasks:t,statusOptions:o,onRequestArchiveToggle:n,onRequestReply:r,onDueDateClick:i,onAddTask:a,canAdd:l,onOpenMenu:s,onCardClick:m,onCardContextMenu:c,grow:p,summary:d,onOpenSprintMenu:u}){let f=xe(),{setNodeRef:g,isOver:v}=d0({id:`${is}${e.key}`}),{attributes:D,listeners:b,setNodeRef:S,transform:h,transition:E,isDragging:y}=x0({id:`${Yo}${e.key}`,disabled:e.isDefault||e.isArchived||!!e.locked});return lt(Ye,{ref:T=>{g(T),S(T)},sx:{flex:p?"1 0 270px":"0 0 270px",minWidth:270,contain:"inline-size",minHeight:0,maxHeight:"100%",display:"flex",flexDirection:"column",borderRadius:1.5,boxShadow:T=>T.shadows[1],bgcolor:v?f.colors.accentSoft:f.board.columnBg,transition:"background-color 0.15s",overflow:"hidden",transform:h0.Translate.toString(h),...E?{transition:`${E}, background-color 0.15s`}:{},opacity:y?.6:1},children:[lt(Ye,{className:Fp,...D,...b,sx:{display:"flex",alignItems:"center",gap:.75,pl:1.25,pr:.5,py:1.1,borderBottom:`1px solid ${f.card.borderColor}`,flexShrink:0,touchAction:"none",cursor:e.isDefault||e.isArchived||e.locked?"default":"grab",opacity:e.isArchived?.65:1},children:[e.dot?pe(Ye,{sx:{width:8,height:8,borderRadius:"50%",bgcolor:e.dot,flexShrink:0}}):e.isDefault?null:(()=>{let T=ze(e.icon);return T?pe(T,{sx:{fontSize:17,color:"#1e3a8a"}}):null})(),pe(Ye,{component:"span",sx:{fontSize:f.board.columnHeaderFontSize,fontWeight:700,color:f.board.columnHeaderColor,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.label}),pe(Ye,{component:"span",sx:{...$p(f.board.badge),ml:"auto"},children:t.length}),e.sprint&&u?pe(Dp,{size:"small","aria-label":"\uBAA9\uD45C \uBA54\uB274",onPointerDown:T=>T.stopPropagation(),onClick:T=>u(T.currentTarget,e.sprint),sx:{color:"#9a9a97"},children:pe(Rp,{sx:{fontSize:18}})}):e.locked?null:pe(Dp,{size:"small","aria-label":"\uD504\uB85C\uC81D\uD2B8 \uBA54\uB274",onPointerDown:T=>T.stopPropagation(),onClick:T=>s({anchorEl:T.currentTarget,column:e}),sx:{color:"#9a9a97"},children:pe(Rp,{sx:{fontSize:18}})})]}),d?pe(Ye,{sx:{px:1.25,py:1.25,borderBottom:`1px solid ${f.card.borderColor}`,flexShrink:0},children:d}):null,pe(Ye,{sx:{flex:"1 1 auto",minHeight:0,display:"flex",flexDirection:"column"},children:pe(Cm,{style:{height:"auto",flex:"1 1 auto",minHeight:0},contentStyle:{minWidth:0},thumb:{width:6},dragScroll:{excludeClasses:Bm},children:lt(Ye,{sx:{display:"flex",flexDirection:"column",flexGrow:1},children:[pe(Np,{items:t.map(T=>String(T.seq)),strategy:b0,children:t.map(T=>pe(_p,{task:T,statusOptions:o,variant:"list",showDueDate:!0,titleFontSize:15,onRequestArchiveToggle:n,onRequestReply:r,onDueDateClick:i,onCardClick:m,onCardContextMenu:c},T.seq))}),t.length===0&&!l?pe(Ye,{sx:{py:3,textAlign:"center",fontSize:13,color:"#9a9a97"},children:"\uCE74\uB4DC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null,t.length===0&&l?pe(Ye,{sx:{flexGrow:1,minHeight:56,display:"flex",flexDirection:"column","&:hover .taskbox-board-add":{opacity:1,pointerEvents:"auto"}},children:lt(Lp,{className:"taskbox-board-add",onClick:()=>a(e.isDefault?"":e.key),sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,px:1.25,py:1.75,borderBottom:`1px dashed ${f.card.borderColor}`,bgcolor:f.card.bg,color:f.colors.accentOnSurface,fontSize:13,fontWeight:500,opacity:0,pointerEvents:"none",transition:"opacity 0.15s","&:hover":{bgcolor:f.card.hoverBg}},children:[pe(Sm,{sx:{fontSize:16}}),"\uC5C5\uBB34 \uB4F1\uB85D"]})}):null]})})})]})}function vm({tasks:e,statusOptions:t,customTabs:o,mode:n="active",onToggleCompleted:r,onRequestReply:i,onChangeDueDate:a,onChangeReminder:l,onMoveTask:s,columnAxis:m="project",statusColumns:c=[],onMoveTaskStatus:p,sprintColumns:d=[],onMoveTaskSprint:u,onAddGroup:f,onAddTask:g,canAdd:v=!0,onRequestRename:D,onArchiveProject:b,onDeleteProject:S,onReorderProjects:h,onOpenDetail:E,onTaskContextMenu:y,hideCompleted:T=!1,renderColumnSummary:I,onEditSprint:A,onChangeSprintStatus:q,onRemoveSprint:C}){let k=xe(),{onReturnTask:x,myAccountSeq:B=0}=ue(),[w,P]=un(null),H=w?e.find($=>$.seq===w.taskSeq):void 0,[_,N]=un(null),[G,Q]=un(null),[se,me]=un(null),[Y,O]=un(null),[oe,F]=un(null),[W,V]=un(null),[U,de]=un(null),[re,Te]=un(null),[j,ne]=un(null),[he,Ce]=un(null),_e=r0(!1),Le=Gn(()=>new Map(e.map($=>[$.seq,$])),[e]),ct=Gn(()=>{let $=e.filter(X=>X.is_notice);return $.sort((X,fe)=>X.completed!==fe.completed?X.completed?1:-1:fe.seq-X.seq),$},[e]),Ge=Gn(()=>o.filter($=>!$.archived),[o]),Pe=Gn(()=>o.filter($=>$.archived),[o]),Ne=$=>({key:$.key,label:$.label,icon:$.icon,isDefault:!1,isArchived:$.archived}),K=Gn(()=>new Set(c.map($=>$.key)),[c]),ae=Gn(()=>new Set(d.map($=>$.seq)),[d]),We=Gn(()=>{if(m==="sprint")return[{key:Ap,label:"\uBBF8\uBC30\uC815",icon:"",isDefault:!0,isArchived:!1,dot:"#c9c8c5",locked:!0},...d.map($=>({key:`${as}${$.seq}`,label:Ko($),icon:"",isDefault:!1,isArchived:!1,dot:k0[$.status],locked:!0,sprint:$}))];if(m==="status"){let $=c.map(X=>({key:X.key,label:X.name,icon:"",isDefault:!1,isArchived:!1,dot:X.dot,locked:!0}));return $.some(X=>X.key===Tm)?$:[...$,{key:Tm,label:"\uC644\uB8CC",icon:"",isDefault:!1,isArchived:!1,dot:"#2f80ed",locked:!0}]}return n==="archived"?Pe.map(Ne):[{key:km,label:"\uAE30\uBCF8 \uC5C5\uBB34\uD568",icon:"",isDefault:!0,isArchived:!1},...Ge.map(Ne)]},[m,c,d,n,Ge,Pe]),Ft=f0(p0(c0,{activationConstraint:{distance:5}})),$o=Rn($=>{let X=String($.active.id).startsWith(Yo),fe=m0($),De=fe.length>0?fe:u0($);if(X)return De.filter(zt=>String(zt.id).startsWith(Yo));let rt=De.filter(zt=>!String(zt.id).startsWith(Yo)),it=rt.filter(zt=>!String(zt.id).startsWith(is));return it.length>0?it:rt},[]),$t=Gn(()=>{let $=new Map;for(let X of e){if(X.is_notice)continue;let fe;if(m==="sprint"){let rt=X.sprint_seq??0;fe=ae.has(rt)?`${as}${rt}`:Ap}else fe=m==="status"?X.completed?Tm:K.has(String(X.status??""))?String(X.status??""):ym:X.tab_key?.trim()||km;let De=$.get(fe);De?De.push(X):$.set(fe,[X])}for(let X of $.values())X.sort((fe,De)=>{if(fe.completed!==De.completed)return fe.completed?1:-1;let rt=(fe.group_sort_no??0)>0,it=(De.group_sort_no??0)>0;return rt&&it?(fe.group_sort_no??0)-(De.group_sort_no??0):rt!==it?rt?-1:1:fe.due_date!==De.due_date?fe.due_date<De.due_date?-1:1:fe.seq-De.seq});return $},[e,m,K,ae]),ie=Gn(()=>m!=="status"||($t.get(ym)??[]).length===0?We:[...We,{key:ym,label:"\uAE30\uD0C0",icon:"",isDefault:!1,isArchived:!1,dot:"#c9c8c5",locked:!0}],[m,We,$t]),Qe=Rn($=>re?(re.get($)??[]).map(X=>Le.get(X)).filter(X=>!!X):$t.get($)??[],[re,Le,$t]),Ho=Rn($=>{let X=Qe($);return T?X.filter(fe=>!fe.completed):X},[Qe,T]),Co=Rn($=>{let X=String($.active.id);if(X.startsWith(Yo)){Ce(X.slice(Yo.length));return}ne(Number(X)),Te(new Map(We.map(fe=>[fe.key,($t.get(fe.key)??[]).map(De=>De.seq)])))},[We,$t]),Ht=Rn(($,X)=>{if($.startsWith(is))return{key:$.slice(is.length),overSeq:null};let fe=Number($);for(let[De,rt]of X)if(rt.includes(fe))return{key:De,overSeq:fe};return null},[]),Hn=Rn($=>{let{active:X,over:fe}=$;!fe||String(X.id).startsWith(Yo)||Te(De=>{if(!De)return De;let rt=Number(X.id),it=Ht(String(fe.id),De);if(!it)return De;let zt=[...De.entries()].find(([,Et])=>Et.includes(rt))?.[0];if(!zt||zt===it.key)return De;let Dt=new Map(De);Dt.set(zt,(Dt.get(zt)??[]).filter(Et=>Et!==rt));let Vt=[...Dt.get(it.key)??[]],to=Vt.length;if(it.overSeq!==null){let Et=Vt.indexOf(it.overSeq);Et!==-1&&(to=Et)}return Vt.splice(to,0,rt),Dt.set(it.key,Vt),Dt})},[Ht]),Bo=Rn($=>{let X=String($.active.id);if(X.startsWith(Yo)){Ce(null);let to=String($.over?.id??"");if(!to.startsWith(Yo))return;let Et=X.slice(Yo.length),Wn=to.slice(Yo.length);if(Et===Wn)return;let tn=o.map(ui=>ui.key),fr=tn.indexOf(Et),gr=tn.indexOf(Wn);if(fr===-1||gr===-1)return;h(qp(tn,fr,gr));return}let fe=re;if(Te(null),ne(null),_e.current=!0,!fe||!$.over)return;let De=Number(X),rt=[...fe.entries()].find(([,to])=>to.includes(De));if(!rt)return;let[it,zt]=rt,Dt=[...zt],Vt=Ht(String($.over.id),fe);if(Vt&&Vt.key===it&&Vt.overSeq!==null&&Vt.overSeq!==De){let to=Dt.indexOf(De),Et=Dt.indexOf(Vt.overSeq);to!==-1&&Et!==-1&&(Dt=qp(Dt,to,Et))}if(m==="status"){p?.(De,it);return}if(m==="sprint"){u?.(De,Number(it.slice(as.length))||0);return}s(De,it===km?"":it,Dt)},[o,re,Ht,s,h,m,p,u]),wt=Rn(()=>{Te(null),ne(null),Ce(null),_e.current=!0},[]),Z=Rn($=>{if(_e.current){_e.current=!1;return}E($)},[E]),z=j!==null?Le.get(j)??null:null,Oe=he!==null?We.find($=>$.key===he)??null:null,Wt=Rn(($,X)=>{de({anchorEl:X,taskSeq:$.seq,date:$.due_date,reminders:vn($)})},[]),Ve=_?.column??null;return lt(Ye,{sx:{flex:1,minHeight:0,height:"100%",display:"flex",flexDirection:"column",border:`1px solid ${k.card.borderColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden",bgcolor:k.colors.surfaceSubtle},children:[lt(l0,{sensors:Ft,collisionDetection:$o,onDragStart:Co,onDragOver:Hn,onDragEnd:Bo,onDragCancel:wt,children:[pe(Ye,{sx:{flex:1,minHeight:0,minWidth:0,contain:"inline-size"},children:n==="archived"&&We.length===0?pe(Ye,{sx:{py:8,textAlign:"center",color:"#9a9a97",fontSize:14},children:"\uBCF4\uAD00\uB41C \uD504\uB85C\uC81D\uD2B8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):pe(Cm,{style:{height:"100%"},contentStyle:{width:"max-content",minWidth:"100%",height:"100%"},thumb:{width:8},showHorizontalScrollbar:!0,dragScroll:{excludeClasses:Bm},children:lt(Ye,{sx:{display:"flex",alignItems:"flex-start",gap:zp,height:"100%",minWidth:"min-content",p:zp,boxSizing:"border-box"},children:[n==="active"&&ct.length>0?lt(Ye,{sx:{flex:m!=="project"?"1 0 270px":"0 0 270px",minWidth:270,contain:"inline-size",minHeight:0,maxHeight:"100%",display:"flex",flexDirection:"column",borderRadius:1.5,boxShadow:$=>$.shadows[1],bgcolor:k.card.bg,overflow:"hidden"},children:[lt(Ye,{sx:{display:"flex",alignItems:"center",gap:.75,pl:1.25,pr:.5,py:1.1,borderBottom:`1px solid ${k.card.borderColor}`,flexShrink:0,minHeight:48},children:[pe(i0,{sx:{fontSize:17,color:"#e8763a"}}),pe(Ye,{component:"span",sx:{fontSize:14.5,fontWeight:700,color:k.board.columnHeaderColor},children:"\uACF5\uC9C0\uC0AC\uD56D"}),lt(Ye,{component:"span",sx:{fontSize:13,color:"#9a9a97",flexShrink:0},children:["(",ct.length,")"]})]}),pe(Ye,{sx:{flex:"1 1 auto",minHeight:0,display:"flex",flexDirection:"column"},children:pe(Cm,{style:{height:"auto",flex:"1 1 auto",minHeight:0},contentStyle:{minWidth:0},dragScroll:{excludeClasses:Bm},thumb:{width:6},children:pe(Ye,{sx:{display:"flex",flexDirection:"column"},children:ct.map($=>lt(Ye,{onClick:()=>Z($),onContextMenu:X=>y($,X),sx:{px:1.25,py:1,display:"flex",flexDirection:"column",gap:.75,borderBottom:`1px solid ${k.card.borderColor}`,bgcolor:k.card.bg,cursor:"pointer","&:hover":{bgcolor:k.card.hoverBg}},children:[pe(Ba,{task:$,statusOptions:t,showDueDate:!0,titleFontSize:15,onRequestArchiveToggle:P}),(()=>{let X=($.target_names??[]).filter(De=>De.trim());if(X.length===0)return null;let fe=X.length>2?`${X[0]}, ${X[1]} \uC678 ${X.length-2}`:X.join(", ");return lt(Ye,{sx:{display:"flex",alignItems:"center",gap:.5,fontSize:12.5,color:"#787774",overflow:"hidden",whiteSpace:"nowrap"},children:[pe(a0,{sx:{fontSize:14,flexShrink:0}}),pe(Ye,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis"},children:fe})]})})()]},$.seq))})})})]}):null,pe(Np,{items:Ge.map($=>`${Yo}${$.key}`),strategy:g0,children:ie.map($=>pe(T0,{column:$,tasks:Ho($.key),summary:I?.($.key,Qe($.key)),onOpenSprintMenu:A||q||C?(X,fe)=>Q({anchorEl:X,sprint:fe}):void 0,statusOptions:t,onRequestArchiveToggle:P,onRequestReply:i,onDueDateClick:Wt,onAddTask:g,canAdd:v&&m==="project",onOpenMenu:N,onCardClick:Z,onCardContextMenu:y,grow:m!=="project"},$.key))}),n==="active"&&m==="project"?lt(Lp,{onClick:f,sx:{flex:"0 0 270px",minWidth:270,display:"flex",alignItems:"center",justifyContent:"center",gap:.5,py:2,border:"1.5px dashed #cfcfcc",borderRadius:1.5,color:"#787774",fontSize:14,"&:hover":{bgcolor:"#eef2f6",borderColor:"#9a9a97"}},children:[pe(Sm,{sx:{fontSize:18}}),"\uC0C8 \uD504\uB85C\uC81D\uD2B8"]}):null,n==="active"&&ie.length===0&&ct.length===0?pe(Ye,{sx:{flex:1,minWidth:240,display:"flex",alignItems:"center",justifyContent:"center",color:"#9a9a97",fontSize:14,py:6},children:m==="project"?"\uD504\uB85C\uC81D\uD2B8\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. \uC0C8 \uD504\uB85C\uC81D\uD2B8\uB97C \uCD94\uAC00\uD574 \uC5C5\uBB34\uB97C \uC815\uB9AC\uD558\uC138\uC694.":"\uD45C\uC2DC\uD560 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]})})}),pe(s0,{children:z?pe(Ye,{sx:{...ns,width:250,boxShadow:"0 8px 20px rgba(0,0,0,0.18)",cursor:"grabbing"},children:pe(Ba,{task:z,statusOptions:t,showDueDate:!0,titleFontSize:15})}):Oe?lt(Ye,{sx:{display:"flex",alignItems:"center",gap:.75,width:270,px:1.25,py:1,bgcolor:k.card.bg,border:`1px solid ${k.card.borderColor}`,borderRadius:1.5,boxShadow:"0 8px 20px rgba(0,0,0,0.18)",opacity:.9,cursor:"grabbing"},children:[(()=>{let $=ze(Oe.icon);return $?pe($,{sx:{fontSize:17,color:"#1e3a8a"}}):null})(),pe(Ye,{component:"span",sx:{fontSize:13.5,fontWeight:700,color:k.board.columnHeaderColor},children:Oe.label}),pe(Ye,{component:"span",sx:$p(k.board.badge),children:($t.get(Oe.key)??[]).length})]}):null})]}),lt(Ep,{transitionDuration:0,anchorEl:_?.anchorEl??null,open:!!_,onClose:()=>N(null),children:[Ve&&!Ve.isArchived&&v?lt(wr,{onClick:()=>{Ve&&g(Ve.isDefault?"":Ve.key),N(null)},sx:{fontSize:14,gap:1},children:[pe(Sm,{sx:{fontSize:18,color:"#787774"}}),"\uC0C8 \uC5C5\uBB34 \uB4F1\uB85D"]}):null,Ve&&!Ve.isDefault&&!Ve.isArchived?lt(wr,{onClick:()=>{D(Ve.key,Ve.label,Ve.icon),N(null)},sx:{fontSize:14,gap:1},children:[pe(Mp,{sx:{fontSize:18,color:"#787774"}}),"\uC218\uC815"]}):null,Ve&&!Ve.isDefault&&!Ve.isArchived?lt(wr,{onClick:()=>{if(_){let $=($t.get(_.column.key)??[]).filter(X=>!X.completed&&!X.archived).length;$>0?F({anchorEl:_.anchorEl,count:$}):O(_)}N(null)},sx:{fontSize:14,gap:1},children:[pe(Pp,{sx:{fontSize:18,color:"#787774"}}),"\uBCF4\uAD00"]}):null,Ve&&Ve.isArchived?lt(wr,{onClick:()=>{b(Ve.key,!1),N(null)},sx:{fontSize:14,gap:1},children:[pe(Op,{sx:{fontSize:18,color:"#787774"}}),"\uBCF5\uC6D0"]}):null,Ve&&!Ve.isDefault?pe(wp,{}):null,Ve&&!Ve.isDefault?lt(wr,{onClick:()=>{_&&V(_),N(null)},sx:{fontSize:14,gap:1,color:"#e5484d"},children:[pe(Gt,{sx:{fontSize:18}}),"\uC0AD\uC81C"]}):null]}),lt(Ep,{transitionDuration:0,anchorEl:G?.anchorEl??null,open:!!G,onClose:()=>Q(null),children:[A?lt(wr,{onClick:()=>{G&&A(G.sprint.seq),Q(null)},sx:{fontSize:14,gap:1},children:[pe(Mp,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uC218\uC815"]}):null,q?lt(wr,{onClick:()=>{G&&q(G.sprint.seq,G.sprint.status==="closed"?"active":"closed"),Q(null)},sx:{fontSize:14,gap:1},children:[G?.sprint.status==="closed"?pe(Op,{sx:{fontSize:18,color:"#787774"}}):pe(Pp,{sx:{fontSize:18,color:"#787774"}}),G?.sprint.status==="closed"?"\uB2E4\uC2DC \uC2DC\uC791":"\uBAA9\uD45C \uC885\uB8CC"]}):null,C?pe(wp,{}):null,C?lt(wr,{onClick:()=>{G&&me(G),Q(null)},sx:{fontSize:14,gap:1,color:"#e5484d"},children:[pe(Gt,{sx:{fontSize:18}}),"\uBAA9\uD45C \uC0AD\uC81C"]}):null]}),pe(rs,{open:!!se,anchorEl:se?.anchorEl??null,title:`"${se?.sprint.name??""}" \uBAA9\uD45C\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`,confirmText:"\uC0AD\uC81C",onCancel:()=>me(null),onConfirm:()=>{se&&C?.(se.sprint.seq),me(null)}}),pe(Go,{anchorEl:U?.anchorEl??null,open:!!U,date:U?.date??"",reminders:U?.reminders??[],onClose:()=>de(null),onDateChange:$=>{U&&(a(U.taskSeq,$),de(X=>X&&{...X,date:$}))},onReminderChange:$=>{U&&(l(U.taskSeq,$),de(X=>X&&{...X,reminders:$}))}}),pe(rs,{open:!!oe,anchorEl:oe?.anchorEl??null,title:`\uBBF8\uC644\uB8CC \uC5C5\uBB34 ${oe?.count??0}\uAC74\uC774 \uC788\uC5B4 \uBCF4\uAD00\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.
|
|
4
4
|
\uC644\uB8CC\uD558\uAC70\uB098 \uB2E4\uB978 \uD504\uB85C\uC81D\uD2B8\uB85C \uC62E\uAE34 \uB4A4 \uBCF4\uAD00\uD558\uC138\uC694.`,confirmText:"\uD655\uC778",onCancel:()=>F(null),onConfirm:()=>F(null)}),pe(rs,{open:!!Y,anchorEl:Y?.anchorEl??null,title:`"${Y?.column.label??""}" \uD504\uB85C\uC81D\uD2B8\uB97C \uBCF4\uAD00\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?
|
|
5
5
|
\uBCF4\uAD00\uD568 \uD0ED\uC5D0\uC11C \uBCF5\uC6D0\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.`,confirmText:"\uBCF4\uAD00",onCancel:()=>O(null),onConfirm:()=>{Y&&b(Y.column.key,!0),O(null)}}),pe(rs,{open:!!W,anchorEl:W?.anchorEl??null,title:`"${W?.column.label??""}" \uD504\uB85C\uC81D\uD2B8\uB97C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?
|
|
6
|
-
\uC18C\uC18D \uC5C5\uBB34\uB294 \uAE30\uBCF8 \uC5C5\uBB34\uD568\uC73C\uB85C \uC774\uB3D9\uD569\uB2C8\uB2E4.`,confirmText:"\uC0AD\uC81C",onCancel:()=>V(null),onConfirm:()=>{W&&S(W.column.key),V(null)}}),pe(_o,{open:!!w,anchorEl:w?.anchorEl??null,nextCompleted:w?.nextCompleted??!1,returnMode:!!x&&!!(H&&Qt(H,B)),onCancel:()=>P(null),onConfirm:$=>{w&&($&&x&&H?x(H,$):r(w.taskSeq,w.nextCompleted)),P(null)}})]})}import{useCallback as Yn,useMemo as va,useRef as Vp,useState as Ia}from"react";import{Box as Lt,Button as E0,ButtonBase as Gp,IconButton as Up}from"@mui/material";import R0 from"@mui/icons-material/Add";import M0 from"@mui/icons-material/ChevronLeft";import P0 from"@mui/icons-material/ChevronRight";import O0 from"@mui/icons-material/KeyboardArrowDown";import{DatePicker as q0}from"@ehfuse/mui-datetime-picker";import{DndContext as z0,DragOverlay as A0,PointerSensor as L0,pointerWithin as N0,rectIntersection as F0,useDroppable as $0,useSensor as H0,useSensors as W0}from"@dnd-kit/core";import{SortableContext as V0,arrayMove as U0,useSortable as G0,verticalListSortingStrategy as K0}from"@dnd-kit/sortable";import{CSS as Y0}from"@dnd-kit/utilities";import j0 from"@ehfuse/overlay-scrollbar";function y0(e){let[t,o,n]=e.split("-").map(Number),r=new Date(Date.UTC(t,o-1,n+1)),i=a=>String(a).padStart(2,"0");return`${r.getUTCFullYear()}-${i(r.getUTCMonth()+1)}-${i(r.getUTCDate())}`}function Ii(e){let t=new Map;for(let o of e){let n=o.start_date;for(let r=0;r<62&&n<=o.end_date;r+=1){let i=t.get(n);i?i.push(o):t.set(n,[o]),n=y0(n)}}for(let o of t.values())o.sort((n,r)=>(n.time||"99:99").localeCompare(r.time||"99:99")||n.title.localeCompare(r.title));return t}function _i(e){let t=String((e.is_event?e.event_time:e.due_date.slice(11,16)||e.estimated_time)??"").trim();return/^\d{1,2}:\d{2}$/.test(t)?t:""}function wi(e,t){if(e.completed!==t.completed)return e.completed?1:-1;let o=_i(e),n=_i(t);if(!!o!=!!n)return o?-1:1;if(o&&n&&o!==n)return o<n?-1:1;let r=e.sort_no>0,i=t.sort_no>0;return r&&i?e.sort_no-t.sort_no:r!==i?r?-1:1:e.seq-t.seq}import{Box as Im,Tooltip as S0}from"@mui/material";import{jsx as _m,jsxs as C0}from"react/jsx-runtime";function Di({event:e,small:t=!1,onClick:o}){let n=e.time?`${e.time} ${e.title}`:e.title,r=e.calendar?`\uAD6C\uAE00 \xB7 ${e.calendar}`:"\uAD6C\uAE00 \uCE98\uB9B0\uB354",i=a=>{if(a.stopPropagation(),o){o(e);return}let[l,s,m]=e.start_date.split("-").map(Number);window.open(`https://calendar.google.com/calendar/r/day/${l}/${s}/${m}`,"_blank")};return _m(S0,{title:`(${r}) ${n}`,arrow:!0,enterDelay:300,children:C0(Im,{onClick:i,onPointerDown:a=>a.stopPropagation(),sx:{display:"flex",alignItems:"center",gap:.5,px:1,py:t?.6:.8,borderRadius:.75,bgcolor:"#f1f1ef",color:"#37352f",fontSize:15,fontWeight:500,overflow:"hidden",whiteSpace:"nowrap",flexShrink:0,minWidth:0,maxWidth:"100%",cursor:"pointer","&:hover":{bgcolor:"#ececea"}},children:[_m(Im,{component:"span",sx:{width:6,height:6,borderRadius:"50%",bgcolor:"#0f9d58",flexShrink:0}}),_m(Im,{component:"span",sx:{minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},children:n})]})})}import{useCallback as I0}from"react";import{Box as Dr,Checkbox as _0}from"@mui/material";import{useLayoutEffect as B0,useState as Hp}from"react";var Dm=new WeakMap,wm=null;function v0(){return typeof ResizeObserver>"u"?null:(wm||(wm=new ResizeObserver(e=>{for(let t of e){let o=Dm.get(t.target);if(!o)continue;let n=t.borderBoxSize?.[0]?.inlineSize??t.target.getBoundingClientRect().width;o(n)}})),wm)}function Wp(){let[e,t]=Hp(null),[o,n]=Hp(0);return B0(()=>{if(!e)return;n(e.getBoundingClientRect().width);let r=v0();if(r)return Dm.set(e,i=>n(a=>Math.abs(a-i)<1?a:i)),r.observe(e),()=>{r.unobserve(e),Dm.delete(e)}},[e]),{ref:t,width:o}}import{jsx as Kn,jsxs as Em}from"react/jsx-runtime";var Rm={high:"#e5484d",medium:"#2f80ed",low:"#d9a514"},Ei=14,w0=150,D0=3;function Er({task:e,statusOptions:t,onOpenDetail:o,onContextMenu:n,isPreview:r=!1,isDragging:i=!1,isMine:a=!1,avatarSrcByName:l,showManagerAvatar:s=!1,onOpenMembers:m,setNodeRef:c,dragProps:p,trailing:d,showCheckbox:u=!1,onRequestToggleCompleted:f,showTime:g=!0,wrapTitle:v=!1}){let D=xe(),b=D.mode==="dark",[S]=bi(e,t),h=String(e.manager_name??"").trim(),E=g?_i(e):"",y=ki(e,ue().resolveTask),T=e.is_notice||e.is_event?ze(e.icon||(e.is_notice?xt:Rt)):null,I=!e.completed&&!e.is_event&&!!e.due_date&&e.due_date.slice(0,10)<Fd(),{ref:A,width:q}=Wp(),C=q>0&&q<w0,k=C||v,x=I0(w=>{A(w),c?.(w)},[A,c]),B=s&&!a&&!C&&!!h;return Em(Dr,{ref:x,...p??{},onClick:w=>{w.stopPropagation(),o(e)},onContextMenu:n?w=>n(e,w):void 0,sx:{display:"flex",alignItems:k?"flex-start":"center",gap:.5,py:.6,px:1,flexShrink:0,borderRadius:.75,minWidth:0,maxWidth:"100%",bgcolor:S?b?xi(S.dot,D.chip.darkBgAlpha):S.bg:b?D.card.bg:D.colors.surfaceHover,color:S?b?D.chip.darkTextSource==="fg"?S.fg:S.dot:S.fg:D.colors.textPrimary,fontSize:Ei,fontWeight:b||e.completed?400:500,textDecoration:e.completed?"line-through":"none",opacity:r?.5:i?.35:e.completed?.6:1,border:r?`1px dashed ${D.colors.accent}`:"1px solid transparent",pointerEvents:r?"none":"auto",cursor:"pointer",touchAction:p?"none":"auto",overflow:"hidden","&:hover":{filter:"brightness(0.96)"},...I?{borderLeft:`3px solid ${D.colors.danger}`,pl:.75}:a?{borderLeft:"3px solid #2f80ed",pl:.75}:{}},children:[Kn(Dr,{component:"span",sx:{width:6,height:6,borderRadius:"50%",flexShrink:0,...k?{mt:"6px"}:{},bgcolor:Rm[e.priority]??D.colors.accentOnSurface}}),u&&!C&&f?Kn(_0,{size:"small",checked:e.completed,onPointerDown:w=>w.stopPropagation(),onClick:w=>w.stopPropagation(),onChange:(w,P)=>f({anchorEl:w.currentTarget,taskSeq:e.seq,nextCompleted:P}),sx:{p:0,flexShrink:0}}):null,T&&!C?Kn(T,{sx:{fontSize:15,flexShrink:0,opacity:.75,...k?{mt:"2px"}:{}}}):null,Em(Dr,{sx:{minWidth:0,overflow:"hidden",display:"flex",flexDirection:"column",color:b?D.colors.textStrong:D.colors.textPrimary},children:[C&&E?Kn(Dr,{component:"span",sx:{lineHeight:1.35,fontSize:Ei-1,color:e.completed?D.colors.textPrimary:D.colors.danger},children:E}):null,Em(Dr,{component:"span",sx:{minWidth:0,overflow:"hidden",...k?{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:D0,whiteSpace:"normal",overflowWrap:"anywhere",lineHeight:1.35}:{textOverflow:"ellipsis",whiteSpace:"nowrap"}},children:[!C&&E?Kn(Dr,{component:"span",sx:{mr:.5,fontSize:Ei-1,color:e.completed?D.colors.textPrimary:D.colors.danger},children:E}):null,e.title,!C&&y?Kn(Dr,{component:"span",sx:{ml:.5,fontSize:Ei-2,color:D.colors.textMuted,fontVariantNumeric:"tabular-nums"},children:y}):null,!C&&(e.comment_count??e.comments?.length??0)>0?Kn(vr,{sx:{fontSize:15,ml:.5,verticalAlign:"-2px",color:D.colors.textMuted}}):null]})]}),d??null,!d&&B?Kn(Dr,{component:"span",onClick:m?w=>{w.stopPropagation(),m(e)}:void 0,sx:{display:"inline-flex",flexShrink:0,ml:"auto",pl:.5},children:Kn(Vo,{src:l?.get(h)??"",name:h,avatarSx:{width:22,height:22,fontSize:11},iconFontSize:14})}):null]})}import{jsx as He,jsxs as jn}from"react/jsx-runtime";var Kp=36,X0=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"],ss="day-";function Mm(e){let t=new Date(e);return t.setHours(0,0,0,0),t.setDate(t.getDate()-t.getDay()),t}function ls(e,t){let o=new Date(e);return o.setDate(o.getDate()+t),o}function Q0(e){let t=e[0],o=e[e.length-1];return t.getMonth()===o.getMonth()?`${t.getFullYear()}\uB144 ${t.getMonth()+1}\uC6D4`:t.getFullYear()===o.getFullYear()?`${t.getFullYear()}\uB144 ${t.getMonth()+1}\uC6D4 - ${o.getMonth()+1}\uC6D4`:`${t.getFullYear()}\uB144 ${t.getMonth()+1}\uC6D4 - ${o.getFullYear()}\uB144 ${o.getMonth()+1}\uC6D4`}function Z0(e){return e.getDate()===1?`${e.getMonth()+1}\uC6D4 1\uC77C`:String(e.getDate())}function J0({task:e,statusOptions:t,isMine:o,avatarSrcByName:n,onCardClick:r,onCardContextMenu:i,onRequestArchiveToggle:a,dragDisabled:l=!1}){let{attributes:s,listeners:m,setNodeRef:c,transform:p,transition:d,isDragging:u}=G0({id:String(e.seq),disabled:l});return He(Er,{task:e,statusOptions:t,isMine:o,avatarSrcByName:n,showManagerAvatar:!0,wrapTitle:!0,onOpenDetail:f=>r?.(f),onContextMenu:i,showCheckbox:!0,onRequestToggleCompleted:a,isDragging:u,setNodeRef:c,dragProps:l?void 0:{...s,...m,style:{transform:Y0.Translate.toString(p),transition:d}}})}function eB({dayKey:e,isToday:t,dayLabel:o,holidayName:n,tasks:r,googleEvents:i,onGoogleEventClick:a,statusOptions:l,onRequestArchiveToggle:s,onRequestReply:m,onAddSchedule:c,canAdd:p,onCardClick:d,onCardContextMenu:u,summary:f,myAccountSeq:g,avatarSrcByName:v,dragDisabled:D=!1}){let b=xe(),{setNodeRef:S}=$0({id:`${ss}${e}`,disabled:D});return jn(Lt,{ref:S,sx:{minWidth:0,minHeight:0,height:"100%",display:"flex",flexDirection:"column",bgcolor:t?b.calendar.todayBg:b.calendar.cellBg},children:[jn(Lt,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:.5,px:1,height:Kp,bgcolor:t?b.calendar.todayBg:b.calendar.dateBandBg,borderBottom:`1px solid ${b.calendar.borderColor}`,flexShrink:0},children:[n?He(Lt,{component:"span",sx:{mr:"auto",fontSize:11.5,fontWeight:600,color:b.colors.danger,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n}):null,t?He(Lt,{component:"span",sx:{mr:.75,px:.6,py:.1,borderRadius:.5,fontSize:11,fontWeight:600,bgcolor:b.colors.danger,color:b.calendar.cellBg,lineHeight:1.6},children:"\uC624\uB298"}):null,He(Lt,{component:"span",sx:{fontSize:13.5,fontWeight:t?700:400,color:n?b.colors.danger:b.mode==="dark"?b.colors.textStrong:b.colors.textPrimary,flexShrink:0},children:o})]}),f?He(Lt,{sx:{px:1,py:1,borderBottom:`1px solid ${b.calendar.borderColor}`,flexShrink:0},children:f}):null,He(Lt,{sx:{flex:1,minHeight:0,bgcolor:t?b.calendar.todayBg:b.colors.surfaceSubtle},children:He(j0,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:jn(Lt,{sx:{display:"flex",flexDirection:"column",flexGrow:1},children:[i.length>0?He(Lt,{sx:{display:"flex",flexDirection:"column",gap:.5,px:1,pt:.75,pb:.25},children:i.map(h=>He(Di,{event:h,onClick:a},h.uid))}):null,He(V0,{items:r.map(h=>String(h.seq)),strategy:K0,children:He(Lt,{sx:{display:"flex",flexDirection:"column",gap:.5,px:1,pt:r.length>0?.75:0},children:r.map(h=>He(J0,{task:h,statusOptions:l,isMine:g>0&&Number(h.manager_account_seq??0)===g,avatarSrcByName:v,onCardClick:d,onCardContextMenu:u,onRequestArchiveToggle:s,dragDisabled:D},h.seq))})}),He(Lt,{sx:{flexGrow:1,minHeight:56,display:"flex",flexDirection:"column",pb:1,...p?{"&:hover .taskbox-add-schedule":{opacity:1,pointerEvents:"auto"}}:{}},children:jn(Gp,{className:"taskbox-add-schedule",onClick:()=>c(e),sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,px:1.25,py:1.75,borderBottom:`1px dashed ${b.calendar.borderColor}`,bgcolor:b.calendar.cellBg,color:b.colors.accentOnSurface,fontSize:13,fontWeight:500,opacity:0,pointerEvents:"none",transition:"opacity 0.15s","&:hover":{bgcolor:b.calendar.hoverBg}},children:[He(R0,{sx:{fontSize:16}}),"\uC5C5\uBB34 \uB4F1\uB85D"]})})]})})})]})}function Yp({tasks:e,googleEvents:t=[],onGoogleEventClick:o,statusOptions:n,fallbackToStartDate:r=!1,myAccountSeq:i=0,avatarSrcByName:a,todayStr:l,onToggleCompleted:s,onMoveTask:m,onRequestReply:c,onAddSchedule:p,canAdd:d=!0,disableDrag:u=!1,onOpenDetail:f,onTaskContextMenu:g,hideCompleted:v=!1,renderColumnSummary:D}){let b=xe(),[S,h]=Ia(()=>Mm(new Date)),[E,y]=Ia(null),{onReturnTask:T}=ue(),I=E?e.find(j=>j.seq===E.taskSeq):void 0,[A,q]=Ia(null),[C,k]=Ia(null),[x,B]=Ia(null),w=Vp(!1),P=va(()=>Array.from({length:7},(j,ne)=>ls(S,ne)),[S]),H=va(()=>new Map(e.map(j=>[j.seq,j])),[e]),_=va(()=>[...new Set(P.map(j=>j.getFullYear()))],[P]),N=Bn(_),G=W0(H0(L0,{activationConstraint:{distance:5}})),Q=Yn(j=>{let ne=N0(j),he=ne.length>0?ne:F0(j),Ce=he.filter(_e=>!String(_e.id).startsWith(ss));return Ce.length>0?Ce:he},[]),se=va(()=>Ii(t),[t]),me=va(()=>{let j=new Map;for(let ne of e){let he=ne.due_date.slice(0,10)||(r?ne.start_date.slice(0,10)||String(ne.created_time??"").slice(0,10):"");if(!he)continue;let Ce=j.get(he);Ce?Ce.push(ne):j.set(he,[ne])}for(let ne of j.values())ne.sort(wi);return j},[e,r]),Y=Yn(j=>C?(C.get(j)??[]).map(ne=>H.get(ne)).filter(ne=>!!ne):me.get(j)??[],[C,H,me]),O=Yn(j=>{let ne=Y(j);return v?ne.filter(he=>!he.completed):ne},[Y,v]),oe=Yn(j=>{B(Number(j.active.id)),k(new Map(P.map(ne=>{let he=Bt(ne);return[he,(me.get(he)??[]).map(Ce=>Ce.seq)]})))},[P,me]),F=Yn((j,ne)=>{if(j.startsWith(ss))return{day:j.slice(ss.length),overSeq:null};let he=Number(j);for(let[Ce,_e]of ne)if(_e.includes(he))return{day:Ce,overSeq:he};return null},[]),W=Yn(j=>{let{active:ne,over:he}=j;he&&k(Ce=>{if(!Ce)return Ce;let _e=Number(ne.id),Le=F(String(he.id),Ce);if(!Le)return Ce;let ct=[...Ce.entries()].find(([,K])=>K.includes(_e))?.[0];if(!ct||ct===Le.day)return Ce;let Ge=new Map(Ce);Ge.set(ct,(Ge.get(ct)??[]).filter(K=>K!==_e));let Pe=[...Ge.get(Le.day)??[]],Ne=Pe.length;if(Le.overSeq!==null){let K=Pe.indexOf(Le.overSeq);K!==-1&&(Ne=K)}return Pe.splice(Ne,0,_e),Ge.set(Le.day,Pe),Ge})},[F]),V=Yn(j=>{let{active:ne,over:he}=j,Ce=C;if(k(null),B(null),w.current=!0,!Ce||!he)return;let _e=Number(ne.id),Le=[...Ce.entries()].find(([,K])=>K.includes(_e));if(!Le)return;let[ct,Ge]=Le,Pe=[...Ge],Ne=F(String(he.id),Ce);if(Ne&&Ne.day===ct&&Ne.overSeq!==null&&Ne.overSeq!==_e){let K=Pe.indexOf(_e),ae=Pe.indexOf(Ne.overSeq);K!==-1&&ae!==-1&&(Pe=U0(Pe,K,ae))}m(_e,ct,Pe)},[C,m,F]),U=Yn(()=>{k(null),B(null),w.current=!0},[]),de=Yn(j=>{if(w.current){w.current=!1;return}f(j)},[f]),re=x!==null?H.get(x)??null:null,Te=Vp(null);return jn(Lt,{onTouchStart:j=>{let ne=j.touches[0];Te.current=ne?{x:ne.clientX,y:ne.clientY}:null},onTouchEnd:j=>{let ne=Te.current;Te.current=null;let he=j.changedTouches[0];if(!ne||!he||x!==null)return;let Ce=he.clientX-ne.x,_e=he.clientY-ne.y;Math.abs(Ce)<60||Math.abs(Ce)<=Math.abs(_e)||h(ls(S,Ce<0?7:-7))},sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0,border:`1px solid ${b.calendar.borderColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden"},children:[jn(Lt,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1,bgcolor:b.calendar.bg,borderBottom:`1px solid ${b.calendar.borderColor}`,flexShrink:0},children:[jn(Lt,{sx:{display:"flex",alignItems:"center",gap:.25},children:[He(Up,{size:"small","aria-label":"\uC774\uC804 \uC8FC",onClick:()=>h(ls(S,-7)),children:He(M0,{sx:{fontSize:24,color:b.colors.textSecondary}})}),He(E0,{size:"small",color:"inherit",onClick:()=>h(Mm(new Date)),sx:{minWidth:0,px:1,mx:1,fontSize:15.5,fontWeight:b.mode==="dark"?400:500,color:b.mode==="dark"?b.colors.textStrong:b.colors.textPrimary},children:"\uC624\uB298"}),He(Up,{size:"small","aria-label":"\uB2E4\uC74C \uC8FC",onClick:()=>h(ls(S,7)),children:He(P0,{sx:{fontSize:24,color:b.colors.textSecondary}})})]}),jn(Gp,{onClick:j=>q(j.currentTarget),sx:{ml:{xs:"auto",lg:0},display:"inline-flex",alignItems:"center",gap:.25,px:.75,py:.25,borderRadius:1,fontSize:15,fontWeight:b.mode==="dark"?400:700,color:b.mode==="dark"?b.colors.textStrong:b.colors.textPrimary,"&:hover":{bgcolor:b.colors.surfaceHover}},children:[Q0(P),He(O0,{sx:{fontSize:18,color:b.colors.textMuted}})]})]}),He(Lt,{sx:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",bgcolor:b.calendar.headerBg,borderBottom:`1px solid ${b.calendar.borderColor}`,flexShrink:0,"& > *":{borderRight:`1px solid ${b.calendar.borderColor}`},"& > *:last-child":{borderRight:"none"}},children:P.map(j=>{let ne=j.getDay(),he=N.has(Bt(j));return He(Lt,{sx:{height:Kp,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12.5,color:ne===0||he?b.colors.danger:ne===6?b.colors.accentOnSurface:b.colors.textSecondary},children:X0[ne]},Bt(j))})}),He(Lt,{sx:{flex:1,minHeight:0},children:jn(z0,{sensors:G,collisionDetection:Q,onDragStart:oe,onDragOver:W,onDragEnd:V,onDragCancel:U,children:[He(Lt,{sx:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",height:"100%",minHeight:0,"& > *":{borderRight:`1px solid ${b.calendar.borderColor}`},"& > *:last-child":{borderRight:"none"}},children:P.map(j=>{let ne=Bt(j);return He(eB,{dayKey:ne,isToday:ne===l,dayLabel:Z0(j),holidayName:N.get(ne)??"",summary:D?.(ne,Y(ne)),tasks:O(ne),googleEvents:se.get(ne)??[],onGoogleEventClick:o,statusOptions:n,onRequestArchiveToggle:y,onRequestReply:c,onAddSchedule:p,canAdd:d,onCardClick:de,onCardContextMenu:g,myAccountSeq:i,avatarSrcByName:a,dragDisabled:u},ne)})}),He(A0,{children:re?He(Lt,{sx:{boxShadow:"0 8px 20px rgba(0,0,0,0.18)",borderRadius:.75,cursor:"grabbing"},children:He(Er,{task:re,statusOptions:n,onOpenDetail:()=>{},isMine:i>0&&Number(re.manager_account_seq??0)===i})}):null})]})}),He(q0,{anchorEl:A,open:!!A,onClose:()=>q(null),selectedDate:S,onDateChange:j=>{h(Mm(j)),q(null)}}),He(_o,{open:!!E,anchorEl:E?.anchorEl??null,nextCompleted:E?.nextCompleted??!1,returnMode:!!T&&!!(I&&Qt(I,i)),onCancel:()=>y(null),onConfirm:j=>{E&&(j&&T&&I?T(I,j):s(E.taskSeq,E.nextCompleted)),y(null)}})]})}import{useCallback as _a,useMemo as ti,useRef as tB,useState as wa}from"react";import{Box as xo,Button as oB,ButtonBase as Xp,IconButton as jp,Tooltip as nB}from"@mui/material";import rB from"@mui/icons-material/Add";import iB from"@mui/icons-material/ChevronLeft";import aB from"@mui/icons-material/ChevronRight";import lB from"@mui/icons-material/KeyboardArrowDown";import{DatePicker as sB}from"@ehfuse/mui-datetime-picker";import{DndContext as cB,DragOverlay as mB,PointerSensor as uB,pointerWithin as dB,rectIntersection as pB,useDraggable as fB,useDroppable as Qp,useSensor as gB,useSensors as xB}from"@dnd-kit/core";import bB from"@ehfuse/overlay-scrollbar";import{ConfirmActionPopper as hB}from"@ehfuse/mui-confirm-action";import{jsx as et,jsxs as Xn}from"react/jsx-runtime";var kB=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"],cs="mday-",ms="mchip-",Zp=36;function TB(e){let t=new Date(e);return t.setHours(0,0,0,0),t.setDate(t.getDate()-t.getDay()),t}function us(e){let t=new Date(e);return t.setHours(0,0,0,0),t.setDate(1),t}function yB(e,t){let o=new Date(e);return o.setDate(o.getDate()+t),o}function Pm(e,t){let o=us(e);return o.setMonth(o.getMonth()+t),o}function SB({task:e,statusOptions:t,isPreview:o=!1,isMine:n=!1,avatarSrcByName:r,onOpenDetail:i,onContextMenu:a,onRequestToggleCompleted:l,dragDisabled:s=!1}){let{attributes:m,listeners:c,setNodeRef:p,isDragging:d}=fB({id:String(e.seq),disabled:o||s}),{setNodeRef:u}=Qp({id:`${ms}${e.seq}`,disabled:o||s});return et(nB,{title:e.title,arrow:!0,enterDelay:400,children:et(Er,{task:e,statusOptions:t,onOpenDetail:i,onContextMenu:a,showCheckbox:!!l,onRequestToggleCompleted:l,isPreview:o,isDragging:d,isMine:n,avatarSrcByName:r,showManagerAvatar:!0,wrapTitle:!0,setNodeRef:f=>{p(f),u(f)},dragProps:s?void 0:{...m,...c}})})}function CB({dayKey:e,dayNumber:t,isToday:o,isOtherMonth:n,weekday:r,holidayName:i,tasks:a,googleEvents:l,onGoogleEventClick:s,statusOptions:m,previewSeq:c,myAccountSeq:p,avatarSrcByName:d,onRequestToggleCompleted:u,onOpenDetail:f,onTaskContextMenu:g,onAddSchedule:v,canAdd:D,dragDisabled:b=!1}){let S=xe(),h=S.mode==="dark",{setNodeRef:E,isOver:y}=Qp({id:`${cs}${e}`,disabled:b}),T=a,I=!!i||r===0;return Xn(xo,{ref:E,sx:{minWidth:0,minHeight:0,display:"flex",flexDirection:"column",gap:.5,p:.5,bgcolor:y?S.colors.accentSoft:o?S.calendar.todayBg:n?S.calendar.otherMonthBg:S.calendar.cellBg,transition:"background-color 0.15s",overflow:"hidden",...D?{"&:hover .taskbox-month-add":{opacity:1,pointerEvents:"auto"}}:{}},children:[Xn(xo,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:.5,height:Zp,flexShrink:0,mx:-.5,mt:-.5,px:1,bgcolor:o?S.calendar.todayBg:S.calendar.dateBandBg,borderBottom:`1px solid ${S.calendar.borderColor}`},children:[i?et(xo,{component:"span",sx:{mr:.25,minWidth:0,fontSize:11,fontWeight:600,color:S.colors.danger,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:i}):null,o?et(xo,{component:"span",sx:{px:.5,borderRadius:.5,fontSize:10.5,fontWeight:600,bgcolor:S.colors.danger,color:S.calendar.cellBg,lineHeight:1.6},children:"\uC624\uB298"}):null,et(xo,{component:"span",sx:{fontSize:13.5,fontWeight:o?700:400,color:n?S.colors.textMuted:I?S.colors.danger:r===6?S.colors.accentOnSurface:h?S.colors.textStrong:S.colors.textPrimary,flexShrink:0},children:t})]}),l.map(A=>et(Di,{event:A,small:!0,onClick:s},A.uid)),T.map(A=>et(SB,{task:A,statusOptions:m,isPreview:A.seq===c,isMine:p>0&&Number(A.manager_account_seq??0)===p,avatarSrcByName:d,onRequestToggleCompleted:u,onOpenDetail:f,onContextMenu:g,dragDisabled:b},A.seq)),et(xo,{sx:{flexGrow:1,minHeight:0,display:"flex",alignItems:"flex-start"},children:Xn(Xp,{className:"taskbox-month-add",onClick:()=>v(e),sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,px:1.25,py:.75,borderBottom:`1px dashed ${S.calendar.borderColor}`,bgcolor:S.calendar.cellBg,color:S.colors.accentOnSurface,fontSize:13,fontWeight:500,opacity:0,pointerEvents:"none",transition:"opacity 0.15s","&:hover":{bgcolor:S.calendar.hoverBg}},children:[et(rB,{sx:{fontSize:16}}),"\uC5C5\uBB34 \uB4F1\uB85D"]})})]})}function Jp({tasks:e,googleEvents:t=[],onGoogleEventClick:o,statusOptions:n,fallbackToStartDate:r=!1,myAccountSeq:i=0,avatarSrcByName:a,onToggleCompleted:l,todayStr:s,onMoveTask:m,onAddSchedule:c,canAdd:p=!0,disableDrag:d=!1,onOpenDetail:u,onTaskContextMenu:f}){let g=xe(),v=g.mode==="dark",[D,b]=wa(()=>us(new Date)),[S,h]=wa(null),[E,y]=wa(null),[T,I]=wa(null),[A,q]=wa(null),C=ti(()=>{let V=TB(D);return Array.from({length:42},(U,de)=>yB(V,de))},[D]),k=ti(()=>new Map(e.map(V=>[V.seq,V])),[e]),x=ti(()=>Ii(t),[t]),B=ti(()=>[...new Set(C.map(V=>V.getFullYear()))],[C]),w=Bn(B),P=ti(()=>{let V=new Map;for(let U of e){let de=U.due_date.slice(0,10)||(r?U.start_date.slice(0,10)||String(U.created_time??"").slice(0,10):"");if(!de)continue;let re=V.get(de);re?re.push(U):V.set(de,[U])}for(let U of V.values())U.sort(wi);return V},[e,r]),H=xB(gB(uB,{activationConstraint:{distance:5}})),_=_a(V=>{let U=dB(V),de=U.length>0?U:pB(V),re=de.filter(Te=>String(Te.id).startsWith(ms));return re.length>0?re:de.filter(Te=>String(Te.id).startsWith(cs))},[]),N=_a(V=>{I(Number(V.active.id))},[]),G=_a(V=>{q(V.over?String(V.over.id):null)},[]),Q=ti(()=>{let V=new Map;for(let[U,de]of P)for(let re of de)V.set(re.seq,U);return V},[P]),se=T!==null?k.get(T)?.due_date.slice(0,10)??"":"",me=ti(()=>{if(T===null||!A)return null;if(A.startsWith(ms)){let V=Number(A.slice(ms.length)),U=Q.get(V);if(!U)return null;let de=(P.get(U)??[]).filter(Te=>Te.seq!==T),re=de.findIndex(Te=>Te.seq===V);return{day:U,index:re===-1?de.length:re}}if(A.startsWith(cs)){let V=A.slice(cs.length),U=(P.get(V)??[]).filter(de=>de.seq!==T);return{day:V,index:U.length}}return null},[T,Q,A,P]),Y=_a(V=>{let U=P.get(V)??[];if(T===null||!me)return U;let de=k.get(T);if(!de)return U;let re=U.filter(Te=>Te.seq!==T);return V===me.day?[...re.slice(0,me.index),de,...re.slice(me.index)]:V===se?re:U},[T,se,me,k,P]),O=_a(V=>{let U=T,de=me;if(I(null),q(null),U===null||!de)return;let re=(P.get(de.day)??[]).filter(j=>j.seq!==U),Te=[...re.slice(0,de.index).map(j=>j.seq),U,...re.slice(de.index).map(j=>j.seq)];m(U,de.day,Te)},[T,me,m,P]),oe=T!==null?k.get(T)??null:null,F=`${D.getFullYear()}\uB144 ${D.getMonth()+1}\uC6D4`,W=tB(null);return Xn(xo,{onTouchStart:V=>{let U=V.touches[0];W.current=U?{x:U.clientX,y:U.clientY}:null},onTouchEnd:V=>{let U=W.current;W.current=null;let de=V.changedTouches[0];if(!U||!de||T!==null)return;let re=de.clientX-U.x,Te=de.clientY-U.y;Math.abs(re)<60||Math.abs(re)<=Math.abs(Te)||b(Pm(D,re<0?1:-1))},sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0,border:`1px solid ${g.calendar.borderColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden"},children:[Xn(xo,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1,bgcolor:g.calendar.bg,borderBottom:`1px solid ${g.calendar.borderColor}`,flexShrink:0},children:[Xn(xo,{sx:{display:"flex",alignItems:"center",gap:.25},children:[et(jp,{size:"small","aria-label":"\uC774\uC804 \uB2EC",onClick:()=>b(Pm(D,-1)),children:et(iB,{sx:{fontSize:24,color:g.colors.textSecondary}})}),et(oB,{size:"small",color:"inherit",onClick:()=>b(us(new Date)),sx:{minWidth:0,px:1,mx:1,fontSize:15.5,fontWeight:g.mode==="dark"?400:500,color:g.mode==="dark"?g.colors.textStrong:g.colors.textPrimary},children:"\uC624\uB298"}),et(jp,{size:"small","aria-label":"\uB2E4\uC74C \uB2EC",onClick:()=>b(Pm(D,1)),children:et(aB,{sx:{fontSize:24,color:g.colors.textSecondary}})})]}),Xn(Xp,{onClick:V=>h(V.currentTarget),sx:{display:"inline-flex",alignItems:"center",gap:.25,ml:{xs:"auto",lg:0},px:.75,py:.25,borderRadius:1,fontSize:15,fontWeight:g.mode==="dark"?400:700,color:g.mode==="dark"?g.colors.textStrong:g.colors.textPrimary,"&:hover":{bgcolor:g.colors.surfaceHover}},children:[F,et(lB,{sx:{fontSize:18,color:g.colors.textMuted}})]})]}),et(xo,{sx:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",bgcolor:g.calendar.headerBg,borderBottom:`1px solid ${g.calendar.borderColor}`,flexShrink:0,"& > *":{borderRight:`1px solid ${g.calendar.borderColor}`},"& > *:last-child":{borderRight:"none"}},children:kB.map((V,U)=>et(xo,{sx:{height:Zp,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12.5,color:U===0?g.colors.danger:U===6?g.colors.accentOnSurface:g.colors.textSecondary},children:V},V))}),et(xo,{sx:{flex:1,minHeight:0},children:Xn(cB,{sensors:H,collisionDetection:_,onDragStart:N,onDragOver:G,onDragEnd:O,onDragCancel:()=>{I(null),q(null)},children:[et(bB,{style:{height:"100%"},thumb:{width:8},children:et(xo,{sx:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",gridTemplateRows:"repeat(6, minmax(112px, auto))",minHeight:"100%",flexShrink:0,"& > *":{borderRight:`1px solid ${g.calendar.borderColor}`,borderBottom:`1px solid ${g.calendar.borderColor}`},"& > *:nth-of-type(7n)":{borderRight:"none"},"& > *:nth-last-of-type(-n+7)":{borderBottom:"none"}},children:C.map(V=>{let U=Bt(V);return et(CB,{dayKey:U,dayNumber:V.getDate(),isToday:U===s,isOtherMonth:V.getMonth()!==D.getMonth(),weekday:V.getDay(),holidayName:w.get(U)??"",tasks:Y(U),googleEvents:x.get(U)??[],onGoogleEventClick:o,statusOptions:n,previewSeq:me?.day===U?T:null,myAccountSeq:i,avatarSrcByName:a,onRequestToggleCompleted:l?y:void 0,onOpenDetail:u,onTaskContextMenu:f,onAddSchedule:c,canAdd:p,dragDisabled:d},U)})})}),et(mB,{children:oe?Xn(xo,{sx:{display:"flex",alignItems:"center",gap:.5,py:.6,px:.75,borderRadius:.75,bgcolor:g.calendar.cellBg,border:`1px solid ${g.calendar.borderColor}`,boxShadow:"0 6px 16px rgba(0,0,0,0.18)",fontSize:Ei,fontWeight:500,color:g.colors.textPrimary,cursor:"grabbing",whiteSpace:"nowrap"},children:[et(xo,{component:"span",sx:{width:6,height:6,borderRadius:"50%",bgcolor:Rm[oe.priority]}}),oe.title]}):null})]})}),et(hB,{open:!!E,anchorEl:E?.anchorEl??null,title:E?.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:E?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>y(null),onConfirm:()=>{E&&l?.(E.taskSeq,E.nextCompleted),y(null)}}),et(sB,{anchorEl:S,open:!!S,onClose:()=>h(null),selectedDate:D,onDateChange:V=>{b(us(V)),h(null)}})]})}import{useEffect as wB,useMemo as Da,useRef as qm,useState as of}from"react";import{Box as ro,Button as DB,IconButton as nf,useMediaQuery as EB}from"@mui/material";import RB from"@mui/icons-material/ChevronLeft";import MB from"@mui/icons-material/ChevronRight";import PB from"@mui/icons-material/KeyboardArrowDown";import{DatePicker as OB}from"@ehfuse/mui-datetime-picker";import{Box as Qn,Button as BB,Dialog as vB}from"@mui/material";import{jsx as Zn,jsxs as Om}from"react/jsx-runtime";function ef({controller:e,avatarSrcByName:t}){let o=xe(),n=e.modals.members,r=e.ui.useValue("task"),i=r?[{label:"\uCC45\uC784\uC790",names:[String(r.manager_name??"").trim()]},{label:"\uCC38\uC870\uC790",names:r.receiver_names??[]},{label:"\uC791\uC131\uC790",names:[String(r.created_by??"").trim()]}]:[];return Zn(vB,{open:n.isOpen,onClose:n.close,maxWidth:"xs",fullWidth:!0,slotProps:{paper:{sx:{borderRadius:2,m:2}}},children:r?Om(Qn,{sx:{p:2,display:"flex",flexDirection:"column",gap:1.5,bgcolor:o.colors.surface},children:[Zn(Qn,{sx:{fontSize:15.5,fontWeight:600,color:o.colors.textStrong,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:r.title}),i.map(a=>{let l=a.names.filter(s=>!!s);return Om(Qn,{sx:{display:"flex",alignItems:"flex-start",gap:1.5},children:[Zn(Qn,{sx:{width:56,flexShrink:0,fontSize:13.5,color:o.colors.textSecondary,pt:.5},children:a.label}),Zn(Qn,{sx:{display:"flex",flexWrap:"wrap",gap:1,minWidth:0},children:l.length===0?Zn(Qn,{sx:{fontSize:14,color:o.colors.textMuted,pt:.5},children:"\uBE44\uC5B4 \uC788\uC74C"}):l.map(s=>Om(Qn,{sx:{display:"flex",alignItems:"center",gap:.75},children:[Zn(Vo,{src:t?.get(s)??"",name:s,avatarSx:{width:26,height:26,fontSize:12},iconFontSize:16}),Zn(Qn,{sx:{fontSize:14.5,color:o.colors.textPrimary},children:s})]},`${a.label}-${s}`))})]},a.label)}),Zn(Qn,{sx:{display:"flex",justifyContent:"flex-end",pt:.5},children:Zn(BB,{size:"small",color:"inherit",onClick:n.close,children:"\uB2EB\uAE30"})})]}):null})}import{useFormaState as IB,useModal as _B}from"@ehfuse/forma";function tf(){let e={members:_B({modalId:we("taskbox-task-members")})},t=IB({task:null});return{modals:e,ui:t,openDialog:n=>{t.setValue("task",n),e.members.open()}}}import{jsx as Kt,jsxs as Mn}from"react/jsx-runtime";var qB=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"];function rf(e){let t=e?.parentElement??null;for(;t;){let o=window.getComputedStyle(t);if(/(auto|scroll)/.test(o.overflowY)&&t.scrollHeight>t.clientHeight)return t;t=t.parentElement}return null}var zB="(min-width:600px)";function zm(e){let t=new Date(e);return t.setHours(0,0,0,0),t.setDate(1),t}function af(e){let t=o=>String(o).padStart(2,"0");return`${e.getFullYear()}-${t(e.getMonth()+1)}-${t(e.getDate())}`}function lf({tasks:e,googleEvents:t=[],onGoogleEventClick:o,statusOptions:n,todayStr:r,onOpenDetail:i,onAddSchedule:a,myAccountSeq:l=0,avatarSrcByName:s,fallbackToStartDate:m=!1}){let c=xe(),p=EB(zB),[d,u]=of(()=>zm(new Date)),[f,g]=of(!1),v=Da(()=>{let k=new Date(d.getFullYear(),d.getMonth()+1,0).getDate();return Array.from({length:k},(x,B)=>{let w=new Date(d.getFullYear(),d.getMonth(),B+1);return{ymd:af(w),dayNumber:B+1,weekday:w.getDay()}})},[d]),D=Da(()=>{let k=new Map;for(let x of e){let B=x.due_date.slice(0,10)||(m?x.start_date.slice(0,10)||String(x.created_time??"").slice(0,10):"");if(!B)continue;let w=k.get(B);w?w.push(x):k.set(B,[x])}for(let x of k.values())x.sort(wi);return k},[e,m]),b=Da(()=>m?e.filter(k=>!k.due_date.slice(0,10)&&!k.start_date.slice(0,10)&&!String(k.created_time??"").slice(0,10)).sort((k,x)=>k.completed!==x.completed?k.completed?1:-1:k.seq-x.seq):[],[e,m]),S=tf(),h=Da(()=>Ii(t),[t]),E=Da(()=>[d.getFullYear()],[d]),y=Bn(E),T=qm(null),I=r.slice(0,7)===af(d).slice(0,7);wB(()=>{if(!I)return;let k=()=>{let w=T.current,P=rf(w);if(!P||!w)return;let H=w.getBoundingClientRect().top-P.getBoundingClientRect().top+P.scrollTop;P.scrollTop=Math.max(0,H-P.clientHeight/2+w.clientHeight/2)},x=setTimeout(k,100),B=setTimeout(k,400);return()=>{clearTimeout(x),clearTimeout(B)}},[I,d]);let A=qm(null),q=qm(null),C=k=>{u(B=>new Date(B.getFullYear(),B.getMonth()+k,1));let x=rf(A.current);x&&x.scrollTo({top:0,behavior:"auto"})};return Mn(ro,{ref:A,onTouchStart:k=>{let x=k.touches[0];q.current=x?{x:x.clientX,y:x.clientY}:null},onTouchEnd:k=>{let x=q.current;q.current=null;let B=k.changedTouches[0];if(!x||!B)return;let w=B.clientX-x.x,P=B.clientY-x.y;Math.abs(w)<60||Math.abs(w)<=Math.abs(P)||C(w<0?1:-1)},sx:{minWidth:0,maxWidth:"100%",overflow:"hidden",bgcolor:c.colors.surface},children:[Mn(ro,{sx:{display:"flex",alignItems:"center",gap:.5,px:1.5,py:1,flexShrink:0},children:[Kt(nf,{size:"small","aria-label":"\uC774\uC804 \uB2EC",onClick:()=>C(-1),children:Kt(RB,{sx:{fontSize:24,color:c.colors.textSecondary}})}),Kt(DB,{size:"small",color:"inherit",onClick:()=>u(zm(new Date)),sx:{minWidth:0,px:1,fontSize:15.5,color:c.mode==="dark"?c.colors.textStrong:c.colors.textPrimary},children:"\uC624\uB298"}),Kt(nf,{size:"small","aria-label":"\uB2E4\uC74C \uB2EC",onClick:()=>C(1),children:Kt(MB,{sx:{fontSize:24,color:c.colors.textSecondary}})}),Mn(ro,{onClick:()=>g(!0),sx:{ml:"auto",pr:.5,display:"flex",alignItems:"center",gap:.25,fontSize:16.5,fontWeight:c.mode==="dark"?400:700,color:c.mode==="dark"?c.colors.textStrong:c.colors.textPrimary,cursor:"pointer"},children:[d.getFullYear(),"\uB144 ",d.getMonth()+1,"\uC6D4",Kt(PB,{sx:{fontSize:20,color:c.colors.textMuted}})]})]}),Mn(ro,{sx:{minWidth:0,overflowX:"hidden",borderTop:`1px solid ${c.calendar.borderColor}`},children:[b.length>0?Mn(ro,{sx:{display:"flex",alignItems:"center",gap:1,px:1,py:.75,minWidth:0,maxWidth:"100%",flexShrink:0,borderBottom:`1px solid ${c.calendar.borderColor}`},children:[Mn(ro,{sx:{width:52,flexShrink:0,fontSize:12.5,lineHeight:1.3,color:c.colors.textSecondary,textAlign:"center"},children:["\uB0A0\uC9DC",Kt("br",{}),"\uC5C6\uC74C"]}),Kt(ro,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:.5},children:b.map(k=>Kt(Er,{task:k,statusOptions:n,onOpenDetail:i,isMine:l>0&&Number(k.manager_account_seq??0)===l,avatarSrcByName:s,showManagerAvatar:!0,onOpenMembers:S.openDialog},k.seq))})]}):null,v.map(({ymd:k,dayNumber:x,weekday:B})=>{let w=y.get(k)??"",P=k===r,H=!!w||B===0,_=D.get(k)??[],N=h.get(k)??[],G=_.length>0||N.length>0;return Mn(ro,{ref:P?T:void 0,onClick:a?()=>a(k):void 0,sx:{display:"flex",alignItems:"center",gap:1,px:1,minWidth:0,maxWidth:"100%",py:G?.75:.5,minHeight:44,flexShrink:0,borderBottom:`1px solid ${c.calendar.borderColor}`,...a?{cursor:"pointer"}:{}},children:[Kt(ro,{sx:{width:52,flexShrink:0,display:"flex",flexDirection:"column",alignItems:"center",gap:.25},children:Mn(ro,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:.25,"@media (min-width:600px)":{flexDirection:"row",gap:.75}},children:[Kt(ro,{component:"span",sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:40,height:32,borderRadius:1,px:1.25,fontSize:22,fontWeight:500,color:P?c.colors.surface:H?c.colors.danger:B===6?c.colors.accentOnSurface:c.colors.textPrimary,bgcolor:P?c.colors.accentOnSurface:"transparent"},children:x}),Kt(ro,{component:"span",sx:{fontSize:13,color:H?c.colors.danger:B===6?c.colors.accentOnSurface:c.colors.textSecondary},children:qB[B]})]})}),Mn(ro,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:.5},children:[N.map(Q=>Kt(Di,{event:Q,onClick:o},Q.uid)),_.map(Q=>{let se=_i(Q),me=Kt(Er,{task:Q,statusOptions:n,onOpenDetail:i,isMine:l>0&&Number(Q.manager_account_seq??0)===l,avatarSrcByName:s,showManagerAvatar:!0,onOpenMembers:S.openDialog,showTime:!p,wrapTitle:!0},Q.seq);return p?Mn(ro,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[Kt(ro,{component:"span",sx:{width:44,flexShrink:0,textAlign:"right",fontSize:13.5,fontWeight:400,opacity:1,color:se?Q.completed?c.colors.textPrimary:c.colors.danger:"transparent"},children:se||"00:00"}),Kt(ro,{sx:{flex:1,minWidth:0},children:me})]},Q.seq):me})]})]},k)})]}),Kt(ef,{controller:S,avatarSrcByName:s}),Kt(OB,{open:f,centered:!0,monthOnly:!0,onClose:()=>g(!1),selectedDate:d,onDateChange:k=>{u(zm(k)),g(!1)}})]})}import{useCallback as sf,useEffect as cf,useMemo as Am,useRef as ps,useState as Ea}from"react";import{Box as It,Tooltip as df}from"@mui/material";import AB from"@ehfuse/overlay-scrollbar";import LB from"@mui/icons-material/CheckCircle";import NB from"@mui/icons-material/RadioButtonUnchecked";import{DndContext as FB,PointerSensor as $B,closestCenter as HB,useSensor as WB,useSensors as VB}from"@dnd-kit/core";import{SortableContext as UB,arrayMove as GB,useSortable as KB,verticalListSortingStrategy as YB}from"@dnd-kit/sortable";import{ConfirmActionPopper as jB}from"@ehfuse/mui-confirm-action";import XB from"@mui/icons-material/DragIndicator";import{jsx as mt,jsxs as Jn}from"react/jsx-runtime";var Lm=36,QB=48,mf=40,ZB=24,JB=4,ev=14,uf=36,tv=12.5,Ri=220,ov={high:{bg:"#f6c6c9",border:"#e5484d"},medium:{bg:"#c5d8f6",border:"#2f80ed"},low:{bg:"#f3e3b6",border:"#d9a514"}};function oi(e){let t=String(e??"").trim();if(!t)return null;let o=new Date(`${t}T00:00:00`);return Number.isNaN(o.getTime())?null:o}function ds(e,t){let o=new Date(e);return o.setDate(o.getDate()+t),o}function Nm(e,t){return Math.round((t.getTime()-e.getTime())/864e5)}function nv({task:e,dragHandle:t,onPointerDown:o,onClick:n}){let r=xe(),i=ps(null),[a,l]=Ea("");return mt(df,{title:a,arrow:!0,enterDelay:300,children:Jn(It,{onPointerDown:o,onClick:s=>n(e,s),onMouseEnter:()=>{let s=i.current;l(s&&s.scrollWidth>s.clientWidth?e.title:"")},sx:{width:Ri,flexShrink:0,position:"sticky",left:0,zIndex:2,bgcolor:r.timeline.bg,borderRight:`1px solid ${r.timeline.gridColor}`,display:"flex",alignItems:"center",gap:.5,pl:.5,pr:1.5,fontSize:15,fontWeight:r.mode==="dark"||e.completed?400:500,color:e.completed?r.colors.textMuted:r.mode==="dark"?r.colors.textStrong:r.colors.textPrimary,overflow:"hidden",whiteSpace:"nowrap",cursor:"pointer",textDecoration:e.completed?"line-through":"none","&:hover":{bgcolor:r.colors.surfaceHover}},children:[t,mt(It,{ref:i,component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.title})]})})}function rv({id:e,showIndicator:t,children:o}){let n=xe(),{attributes:r,listeners:i,setNodeRef:a}=KB({id:e});return Jn(It,{ref:a,sx:{position:"relative"},children:[t?mt(It,{sx:{position:"absolute",top:-1,left:0,right:0,height:2,bgcolor:n.colors.accentOnSurface,zIndex:5}}):null,o({...r,...i})]})}function pf({tasks:e,hideCompletedChecklist:t=!1,todayStr:o,onOpenDetail:n,onToggleChecklist:r,onReorderTasks:i,onTaskContextMenu:a}){let l=xe(),[s,m]=Ea(null),c=Am(()=>[...e].sort((P,H)=>{let _=(P.timeline_sort_no??0)>0,N=(H.timeline_sort_no??0)>0;if(_&&N)return(P.timeline_sort_no??0)-(H.timeline_sort_no??0);if(_!==N)return _?-1:1;let G=P.due_date||P.start_date,Q=H.due_date||H.start_date;return G!==Q?G<Q?-1:1:P.seq-H.seq}),[e]),[p,d]=Ea(null),[u,f]=Ea(null),g=VB(WB($B,{activationConstraint:{distance:4}})),v=sf(P=>{d(P.over?Number(P.over.id):null)},[]),D=sf(P=>{d(null),f(null);let{active:H,over:_}=P;if(!_||H.id===_.id)return;let N=c.map(se=>se.seq),G=N.indexOf(Number(H.id)),Q=N.indexOf(Number(_.id));G===-1||Q===-1||i(GB(N,G,Q))},[c,i]),b=Am(()=>{let P=oi(o)??new Date,H=P,_=ds(P,21);for(let Q of c){let se=oi(Q.start_date)??oi(Q.due_date),me=oi(Q.due_date)??se;se&&se<H&&(H=se),me&&me>_&&(_=me)}let N=ds(H,-3),G=Nm(N,ds(_,3))+1;return Array.from({length:G},(Q,se)=>ds(N,se))},[c,o]),S=b[0],h=b.findIndex(P=>Bt(P)===o),{dayWidths:E,dayOffsets:y,gridWidth:T}=Am(()=>{let P=b.map((N,G)=>N.getDate()===1||G===0?QB:Lm),H=[],_=0;for(let N of P)H.push(_),_+=N;return{dayWidths:P,dayOffsets:H,gridWidth:_}},[b]),I=Ri+T,A=ps(null),q=P=>{A.current={x:P.clientX,y:P.clientY}},C=(P,H)=>{let _=A.current;A.current=null,!(_&&(Math.abs(H.clientX-_.x)>5||Math.abs(H.clientY-_.y)>5))&&n(P)},k=ps(null),[x,B]=Ea(!1);cf(()=>{let P=k.current?.getScrollContainer();if(!P)return;let H=()=>B(P.scrollHeight>P.clientHeight);H();let _=new ResizeObserver(H);return _.observe(P),()=>_.disconnect()},[c.length]);let w=ps(!1);return cf(()=>{if(c.length===0||w.current)return;w.current=!0;let P=window.requestAnimationFrame(()=>{let H=k.current?.getScrollContainer();!H||h<0||(H.scrollLeft=Math.max(0,y[h]-Lm*3))});return()=>window.cancelAnimationFrame(P)},[c.length]),Jn(It,{sx:{flex:1,minHeight:0,minWidth:0,maxWidth:"100%",display:"flex",flexDirection:"column",border:`1px solid ${l.timeline.gridColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden",bgcolor:l.timeline.headerBg},children:[mt(It,{sx:{flex:1,minHeight:0,minWidth:0,contain:"inline-size"},children:mt(AB,{ref:k,style:{height:"100%"},contentStyle:{width:"max-content",minWidth:"100%"},thumb:{width:8},showHorizontalScrollbar:!0,dragScroll:{excludeClasses:["taskbox-timeline-handle"]},children:Jn(It,{sx:{width:I,position:"relative",bgcolor:l.timeline.bg},children:[Jn(It,{sx:{display:"flex",position:"sticky",top:0,zIndex:3,bgcolor:l.timeline.headerBg,borderBottom:`1px solid ${l.timeline.gridColor}`},children:[mt(It,{sx:{width:Ri,height:uf,flexShrink:0,position:"sticky",left:0,zIndex:4,bgcolor:l.timeline.headerBg,borderRight:`1px solid ${l.timeline.gridColor}`,display:"flex",alignItems:"center",px:1.5,fontSize:13,color:l.colors.textSecondary},children:"\uC81C\uBAA9"}),b.map((P,H)=>{let _=P.getDay(),N=H===h,G=P.getDate()===1||H===0;return mt(It,{sx:{width:E[H],height:uf,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",fontSize:tv,fontWeight:N&&l.mode!=="dark"?700:400,color:N?l.timeline.bg:_===0?l.colors.danger:_===6?l.colors.accentOnSurface:l.colors.textSecondary,bgcolor:N?l.colors.danger:"transparent",borderRight:`1px solid ${l.timeline.gridColor}`,whiteSpace:"nowrap"},children:G?`${P.getMonth()+1}/${P.getDate()}`:P.getDate()},Bt(P))})]}),mt(FB,{sensors:g,collisionDetection:HB,onDragStart:P=>f(Number(P.active.id)),onDragOver:v,onDragEnd:D,onDragCancel:()=>{d(null),f(null)},children:mt(UB,{items:c.map(P=>String(P.seq)),strategy:YB,children:Jn(It,{sx:{position:"relative"},children:[b.map((P,H)=>{let _=P.getDay(),N=H===h;return!N&&_!==0&&_!==6?null:mt(It,{sx:{position:"absolute",top:0,bottom:0,left:Ri+y[H],width:E[H],bgcolor:N?"rgba(229,72,77,0.07)":l.colors.surfaceSubtle,zIndex:0}},`stripe-${Bt(P)}`)}),c.map((P,H)=>{let _=oi(P.start_date)??oi(P.due_date),N=oi(P.due_date)??_,G=_?Math.min(b.length-1,Math.max(0,Nm(S,_))):0,Q=N?Math.min(b.length-1,Math.max(G,Nm(S,N))):G,se=ov[P.priority],me=Ri+y[G]+2,Y=y[Q]+E[Q]-y[G]-4,O=(P.checklist??[]).map((oe,F)=>({entry:oe,index:F})).filter(({entry:oe})=>!t||!oe.checked);return mt(rv,{id:String(P.seq),showIndicator:p===P.seq&&u!==P.seq,children:oe=>Jn(It,{sx:{borderBottom:H===c.length-1&&x?"none":`1px solid ${l.timeline.gridColor}`,position:"relative",zIndex:1,opacity:u===P.seq?.45:1},children:[Jn(It,{onContextMenu:F=>a(P,F),sx:{display:"flex",height:mf,position:"relative","&:hover":{bgcolor:"rgba(47,128,237,0.04)"}},children:[mt(nv,{task:P,dragHandle:mt(It,{component:"span",className:"taskbox-timeline-handle",...oe,onClick:F=>F.stopPropagation(),sx:{display:"inline-flex",alignItems:"center",flexShrink:0,color:l.colors.accentOnSurface,cursor:"grab",touchAction:"none","&:hover":{color:l.colors.accentOnSurface}},children:(()=>{let F=(P.is_notice||P.is_event?ze(P.icon||(P.is_notice?xt:Rt)):null)??XB;return mt(F,{sx:{fontSize:17}})})()}),onPointerDown:q,onClick:C}),mt(df,{title:`${P.title} (${P.start_date||"?"} ~ ${P.due_date||"?"})`,arrow:!0,enterDelay:300,children:mt(It,{onPointerDown:q,onClick:F=>C(P,F),sx:{position:"absolute",top:(mf-20)/2,left:me,width:Math.max(Lm-4,Y),height:20,borderRadius:1,bgcolor:se.bg,border:`1px solid ${se.border}`,opacity:P.completed?.45:1,cursor:"pointer","&:hover":{filter:"brightness(0.95)"}}})})]}),O.map(({entry:F,index:W},V)=>mt(It,{sx:{display:"flex",height:ZB,position:"relative",mt:V===0?`${JB}px`:0,mb:V===O.length-1?`${ev}px`:0},children:mt(It,{sx:{width:Ri,flexShrink:0,position:"sticky",left:0,zIndex:2,bgcolor:l.timeline.bg,borderRight:`1px solid ${l.timeline.gridColor}`,display:"flex",alignItems:"center",pl:4.25,pr:1.5,fontSize:13,color:F.checked?l.colors.textMuted:l.colors.textPrimary},children:Jn(It,{onClick:U=>m({anchorEl:U.currentTarget,taskSeq:P.seq,index:W,checked:!F.checked}),sx:{display:"inline-flex",alignItems:"center",gap:.75,minWidth:0,cursor:"pointer"},children:[F.checked?mt(LB,{sx:{fontSize:17,color:l.colors.accentOnSurface,flexShrink:0}}):mt(NB,{sx:{fontSize:17,color:l.colors.textMuted,flexShrink:0}}),mt(It,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",textDecoration:F.checked?"line-through":"none"},children:F.label})]})})},`${P.seq}-check-${W}`))]})},P.seq)}),c.length===0?mt(It,{sx:{py:8,textAlign:"center",color:l.colors.textMuted,fontSize:14},children:"\uD45C\uC2DC\uD560 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]})})})]})})}),mt(jB,{open:!!s,anchorEl:s?.anchorEl??null,title:s?.checked?"\uC774 \uD560\uC77C\uC744 \uC644\uB8CC \uCC98\uB9AC\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?":"\uC644\uB8CC\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:s?.checked?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>m(null),onConfirm:()=>{s&&r(s.taskSeq,s.index,s.checked),m(null)}})]})}import{jsx as ni}from"react/jsx-runtime";function w$(e){switch(e.view){case"card":case"kanban":{let{view:t,...o}=e;return ni(vm,{...o,columnAxis:t==="kanban"?"status":"project"})}case"sprint":{let{view:t,...o}=e;return ni(vm,{...o,columnAxis:"sprint"})}case"calendar":{let{view:t,...o}=e;return ni(Yp,{...o})}case"month":{let{view:t,...o}=e;return ni(Jp,{...o})}case"agenda":{let{view:t,...o}=e;return ni(lf,{...o})}case"timeline":{let{view:t,...o}=e;return ni(pf,{...o})}default:{let{view:t,...o}=e;return ni(Sp,{...o})}}}var D$=["list","card","kanban","calendar","month","timeline"];import{Box as qo}from"@mui/material";import{Fragment as iv,jsx as ri,jsxs as Pn}from"react/jsx-runtime";function ff(e,t){if(!/^\d{4}-\d{2}-\d{2}$/.test(e)||!/^\d{4}-\d{2}-\d{2}$/.test(t))return null;let o=new Date(`${e}T00:00:00`),n=new Date(`${t}T00:00:00`);return Math.round((o.getTime()-n.getTime())/864e5)}function gf({tasks:e,todayStr:t,showProgress:o=!0,dday:n=null,workdaysLeft:r=null,showPoints:i=!0,showHours:a=!0,showOverdue:l=!0,showInfo:s=!0,inline:m=!1}){let c=xe(),p=e.filter(T=>!T.archived),d=p.filter(T=>T.completed).length,u=p.length>0?Math.round(d/p.length*100):0,f=p.filter(T=>!T.completed&&!T.is_event&&!!T.due_date&&T.due_date.slice(0,10)<t).length,g=p.reduce((T,I)=>I.completed?T:T+(I.story_points??0),0),v=o?ri(qo,{sx:{flex:m?"0 0 110px":"1 1 auto",minWidth:0,height:c.summary.gaugeHeight,borderRadius:3,bgcolor:c.summary.gaugeTrackColor},children:ri(qo,{sx:{height:"100%",borderRadius:3,width:`${u}%`,bgcolor:u>=100?c.summary.gaugeCompleteColor:c.summary.gaugeBarColor,transition:"width 0.2s"}})}):null,D=o?Pn(qo,{component:"span",sx:{flexShrink:0,fontSize:m?14:13,color:c.summary.textColor},children:[u,"%"]}):null,b={color:c.summary.numberColor,fontWeight:700,fontSize:m?15:14},S=p.length-d,h=Pn(iv,{children:[m?null:Pn("span",{children:["\uB0A8\uC740 ",ri(qo,{component:"span",sx:b,children:S}),"\uAC74"]}),l&&f>0?Pn(qo,{component:"span",sx:{color:c.summary.overdueColor,fontWeight:600},children:["\uC9C0\uC5F0"," ",ri(qo,{component:"span",sx:{fontWeight:700,fontSize:m?15:14},children:f}),"\uAC74"]}):null,i&&g>0?Pn("span",{children:[ri(qo,{component:"span",sx:b,children:g}),"SP"]}):null]}),E=typeof r=="number"&&Number.isFinite(r)?Pn("span",{children:["\uADFC\uBB34\uC77C ",ri(qo,{component:"span",sx:b,children:r}),"\uC77C"]}):null,y=typeof n=="number"&&Number.isFinite(n)?ri(qo,{component:"span",sx:{ml:m?0:"auto",flexShrink:0,px:.6,py:.1,borderRadius:.5,fontSize:12,fontWeight:600,bgcolor:c.summary.overdueColor,color:c.colors.textInverse,lineHeight:1.6},children:n===0?"D-day":n>0?`D-${n}`:`D+${-n}`}):null;return m?Pn(qo,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0,fontSize:14.5,color:c.summary.textColor,whiteSpace:"nowrap",...c.summary.sx},children:[s?h:null,s?E:null,s?y:null,v,D]}):Pn(qo,{sx:{display:"flex",flexDirection:"column",gap:.5},children:[o?Pn(qo,{sx:{display:"flex",alignItems:"center",gap:1},children:[v,D]}):null,Pn(qo,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,fontSize:13.5,color:c.summary.textColor},children:[h,E,y]})]})}import{useMemo as lv}from"react";function av(e){let t=String(e??"").trim();if(!t)return 0;let o=0,n=!1;for(let r of t.matchAll(/(\d+(?:\.\d+)?)\s*(h|시간|m|분|d|일)/gi)){let i=parseFloat(r[1]),a=r[2].toLowerCase();n=!0,a==="m"||a==="\uBD84"?o+=i/60:a==="d"||a==="\uC77C"?o+=i*8:o+=i}if(!n){let r=parseFloat(t);Number.isFinite(r)&&(o+=r)}return o}function z$(e){let t=Math.round(e*10)/10;return`${t%1===0?t.toFixed(0):t.toFixed(1)}\uC2DC\uAC04`}function xf(e,t,o){if(!/^\d{4}-\d{2}-\d{2}$/.test(e)||!/^\d{4}-\d{2}-\d{2}$/.test(t))return 0;let n=new Date(`${e}T00:00:00`),r=new Date(`${t}T00:00:00`);if(r<n||r.getTime()-n.getTime()>3660*864e5)return 0;let i=0;for(let a=new Date(n);a<=r;a.setDate(a.getDate()+1)){let l=a.getDay();if(l===0||l===6)continue;let s=`${a.getFullYear()}-${String(a.getMonth()+1).padStart(2,"0")}-${String(a.getDate()).padStart(2,"0")}`;o.has(s)||(i+=1)}return i}function A$(e){return e.reduce((t,o)=>o.completed?t:t+av(o.estimated_time),0)}import{jsx as sv}from"react/jsx-runtime";function W$({sprint:e,tasks:t,todayStr:o,...n}){let r=e.status==="closed"?null:ff(e.end_date,o),i=r!==null&&r>=0,a=lv(()=>{if(!i)return[];let m=Number(o.slice(0,4)),c=Number(e.end_date.slice(0,4))||m,p=[];for(let d=m;d<=Math.max(m,c);d+=1)p.push(d);return p},[i,o,e.end_date]),l=Bn(a),s=i?xf(o,e.end_date,new Set(l.keys())):null;return sv(gf,{tasks:t,todayStr:o,dday:r,workdaysLeft:s,...n})}import{useEffect as Tv,useRef as yv,useState as Sv}from"react";import{Box as $m}from"@mui/material";import{Children as cv}from"react";import{Box as Fm,CircularProgress as mv}from"@mui/material";import{jsx as fs}from"react/jsx-runtime";var bf={xs:2,md:3};function hf(){return fs(Fm,{sx:{position:"fixed",top:"calc(50% + 30px)",left:"50%",transform:"translate(-50%, -50%)",zIndex:1},children:fs(mv,{size:44,thickness:4,sx:{color:"#94a3b8"}})})}function kf({children:e}){return fs(Fm,{sx:{minWidth:0,display:"flex",flexDirection:"column",gap:bf,pb:bf},children:cv.map(e,t=>t==null||t===!1?null:fs(Fm,{sx:{bgcolor:"background.paper",borderRadius:1.5,boxShadow:1,overflow:"hidden",minWidth:0},children:t}))})}import{useState as yf}from"react";import{Box as fn,Button as Sf,Checkbox as fv,IconButton as gv,Typography as On}from"@mui/material";import xv from"@mui/icons-material/ExpandMore";import bv from"@mui/icons-material/ExpandLess";import Cf from"@mui/icons-material/CheckCircle";import hv from"@mui/icons-material/CheckCircleOutlineOutlined";import{Fragment as pv,jsx as Tf}from"react/jsx-runtime";var uv="taskbox-search-highlight";function dv(e,t){let o=t?.keyPrefix??"hl";return e.map((n,r)=>Tf("span",{className:n.highlight?t?.highlightClassName??uv:t?.className,style:n.highlight?{fontWeight:700,color:"#2563eb"}:void 0,children:n.text},`${o}-${n.text}-${r}`))}function Ra({text:e,keyword:t,fallback:o="-",className:n,highlightClassName:r,keyPrefix:i}){let a=String(e??"").trim()||o,l=Ul(a,t);return Tf(pv,{children:dv(l,{className:n,highlightClassName:r,keyPrefix:i})})}import{jsx as ye,jsxs as er}from"react/jsx-runtime";var kv={flexShrink:0,minWidth:64,textAlign:"center",px:.75,py:.35,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:Ct(12.5),fontWeight:500,lineHeight:1.4},pn={fontSize:Ct(14.5),color:"#374151",minWidth:0,lineHeight:1.45};function dn({label:e,children:t}){return er(fn,{sx:{display:"flex",alignItems:"flex-start",gap:1,minWidth:0},children:[ye(fn,{sx:kv,children:e}),ye(fn,{sx:{...pn,flex:1,pt:.2},children:t})]})}function Bf({task:e,statusOptions:t,projectLabel:o,searchText:n,todayStr:r,dimCompleted:i=!0,onRequestToggleCompleted:a,onOpenDetail:l,onTaskContextMenu:s,targetSummary:m="",ackInfo:c,completeLocked:p=!1,unread:d=!1,noticeReadOnly:u=!1,onAckConfirm:f,onAckListClick:g,myManaged:v=!1,simple:D=!1}){let b=e.is_event?xa(e):Mt(e),S=String(e.due_date??"").slice(11,16),h=e.is_event?String(e.event_time??"").trim():/^\d{2}:\d{2}$/.test(S)?S:String(e.estimated_time??"").trim(),E=Uo(e.start_date),y=Uo(e.due_date),T=E&&h&&!y?`${E} ${h}`:E,I=y&&h?`${y} ${h}`:y,A=ue(),q=!e.is_notice&&e.completed&&!!e.review_pending&&!!A.onReviewDone&&(A.myAccountSeq??0)>0&&(e.author_account_seq??0)===(A.myAccountSeq??0),C=!!A.onReturnTask&&Qt(e,A.myAccountSeq??0),[k,x]=yf(null),B=e.is_event&&e.due_date?String(e.due_date).slice(0,10):"",w=!!B&&B===r,P=!!B&&B<r,H=!e.is_event&&!e.is_notice&&!e.completed&&!!e.due_date&&e.due_date<r,_=(e.receiver_names??[]).filter(Boolean),[N,G]=yf(!1),Q=D&&!N,se=P?"text.secondary":H||w?"#e5484d":pn.color,me=H||w?600:400;return er(fn,{role:"button",tabIndex:0,onClick:()=>l(e),onKeyDown:Y=>{(Y.key==="Enter"||Y.key===" ")&&(Y.preventDefault(),l(e))},onContextMenu:Y=>s(e,Y),sx:{display:"flex",flexDirection:"column",gap:.75,minWidth:0,p:1.25,cursor:"pointer",position:"relative"},children:[v?ye(fn,{sx:{position:"absolute",left:0,top:0,bottom:0,width:4,bgcolor:"primary.main"}}):null,er(fn,{sx:{display:"flex",alignItems:"flex-start",gap:.75,minWidth:0,mb:Q?0:1},children:[e.is_event?(()=>{let Y=ze(e.icon||Rt);return Y?ye(Y,{sx:{fontSize:21,flexShrink:0,mt:.2,color:e.icon_color||"#1e3a8a"}}):null})():!u&&!p?ye(fv,{checked:e.completed,icon:ye(hv,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:ye(Cf,{sx:{fontSize:22,color:"#2f80ed"}}),onClick:Y=>Y.stopPropagation(),onChange:(Y,O)=>a({anchorEl:Y.currentTarget,taskSeq:e.seq,nextCompleted:O}),sx:{p:0,mt:.1,flexShrink:0}}):null,(()=>{if(!e.is_notice)return null;let Y=ze(e.icon||xt);return Y?ye(Y,{sx:{fontSize:19,flexShrink:0,mt:"1px",color:e.icon_color||"#e5484d"}}):null})(),er(fn,{sx:{minWidth:0,flex:1,display:"flex",flexDirection:"column",gap:.5},children:[ye(On,{sx:{fontSize:Ct(16),fontWeight:e.completed&&i?500:600,lineHeight:1.35,minWidth:0,color:e.completed&&i?"#9a9a97":"#111827",textDecoration:e.completed&&i?"line-through":"none"},children:ye(Ra,{text:e.title,keyword:n})}),Q?er(fn,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",columnGap:1.25,rowGap:.25,minWidth:0},children:[ye(oo,{priority:e.priority,small:!0}),I?ye(On,{sx:{...pn,fontSize:Ct(14),whiteSpace:"nowrap",color:se,fontWeight:me},children:I}):null,!e.is_notice&&e.manager_name?ye(On,{sx:{...pn,fontSize:Ct(14),color:"text.secondary",whiteSpace:"nowrap"},children:ye(Ra,{text:e.manager_name,keyword:n})}):null]}):null]}),d&&!e.completed?ye(fn,{component:"span",sx:{flexShrink:0,px:.55,fontSize:Ct(10.5),fontWeight:700,lineHeight:1.6,color:"#fff",bgcolor:"#e5484d",borderRadius:"4px"},children:"N"}):null,D?ye(gv,{size:"small","aria-label":N?"\uC811\uAE30":"\uD3BC\uCE58\uAE30",onClick:Y=>{Y.stopPropagation(),G(O=>!O)},onKeyDown:Y=>Y.stopPropagation(),sx:{flexShrink:0,alignSelf:"center",my:-.5,mr:-.5,color:"#6b7280"},children:N?ye(bv,{}):ye(xv,{})}):null]}),!Q&&er(fn,{sx:{display:"flex",flexDirection:"column",gap:.6,minWidth:0},children:[ye(dn,{label:b?"\uC0C1\uD0DC":"\uC911\uC694\uB3C4",children:er(fn,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1.25},children:[b?ye($e,{option:b,small:!0}):null,ye(oo,{priority:e.priority,small:!0})]})}),(e.label_keys??[]).length>0?ye(dn,{label:"\uB77C\uBCA8",children:ye(yr,{labelKeys:e.label_keys,labelOptions:t})}):null,o?ye(dn,{label:"\uD504\uB85C\uC81D\uD2B8",children:ye(On,{sx:pn,children:o})}):null,T?ye(dn,{label:"\uC2DC\uC791",children:ye(On,{sx:pn,children:T})}):null,I?ye(dn,{label:"\uB9C8\uAC10",children:er(On,{sx:{...pn,color:se,fontWeight:me},children:[I,H?" \xB7 \uC9C0\uC5F0":""]})}):null,q||C?er(dn,{label:"\uAC80\uC218",children:[C?ye(Oo,{onClick:Y=>{Y.stopPropagation(),a({anchorEl:Y.currentTarget,taskSeq:e.seq,nextCompleted:!1})},sx:{py:0,mr:1,fontSize:Ct(13)},children:"\uB418\uB3CC\uB9AC\uAE30"}):null,q?ye(Sf,{size:"small",variant:"contained",disableElevation:!0,onClick:Y=>{Y.stopPropagation(),x(Y.currentTarget)},sx:{...Cr,py:0,fontSize:Ct(13)},children:"\uAC80\uC218\uC644\uB8CC"}):null,ye(Br,{anchorEl:k,onCancel:()=>x(null),onConfirm:()=>{A.onReviewDone?.(e),x(null)}})]}):null,e.is_notice?ye(dn,{label:"\uB300\uC0C1\uC790",children:ye(On,{sx:pn,children:m||"\uBAA8\uB4E0 \uC9C1\uC6D0"})}):null,c?ye(dn,{label:"\uD655\uC778",children:ye(Sf,{size:"small",variant:c.canAck?"contained":"outlined",color:"inherit",startIcon:c.acked?ye(Cf,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:Y=>{Y.stopPropagation(),c.canAck?f?.(e):g?.(e,Y.currentTarget)},sx:{py:0,px:1.25,minWidth:0,fontSize:Ct(13),...c.canAck?{color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}}:{bgcolor:"#fff",borderColor:"#d5d8dc"}},children:c.canAck?"\uD655\uC778":`${c.count}/${c.total}`})}):null,!e.is_notice&&e.manager_name?ye(dn,{label:"\uCC45\uC784\uC790",children:ye(On,{sx:pn,children:ye(Ra,{text:e.manager_name,keyword:n})})}):null,!e.is_notice&&_.length>0?ye(dn,{label:"\uCC38\uC870\uC790",children:ye(On,{sx:pn,children:_.join(", ")})}):null,e.note?ye(dn,{label:"\uBE44\uACE0",children:ye(On,{sx:pn,children:ye(Ra,{text:e.note,keyword:n})})}):null]})]})}import{jsx as Mi,jsxs as Bv}from"react/jsx-runtime";function Cv(e,t){if(e.completed||e.archived||t<=0)return;let o=_r(e,t);if(o.canConfirm)return{count:o.count,total:o.total,acked:!1,canAck:!0,pendingNames:o.pendingNames}}function v4({tasks:e,statusOptions:t,customTabs:o,loading:n,dimCompleted:r=!0,simple:i=!1,searchText:a,todayStr:l,onToggleCompleted:s,onOpenDetail:m,onTaskContextMenu:c,getTargetSummary:p,getAckInfo:d,getNoticeReadOnly:u,isTaskUnread:f,getCompleteLocked:g,onAckConfirm:v,onAckListClick:D,onEndReached:b,myAccountSeq:S=0}){let h=new Map(o.map(q=>[q.key,q.label])),[E,y]=Sv(null),{onReturnTask:T}=ue(),I=E?e.find(q=>q.seq===E.taskSeq):void 0,A=yv(null);return Tv(()=>{let q=A.current;if(!b||!q)return;let C=new IntersectionObserver(k=>{k[0]?.isIntersecting&&b()});return C.observe(q),()=>C.disconnect()},[b,e.length]),e.length===0?n?Mi(hf,{}):Mi($m,{sx:{py:6,textAlign:"center",color:"#94a3b8",fontSize:"0.9rem"},children:"\uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):Bv($m,{sx:{minWidth:0},children:[Mi(kf,{children:e.map(q=>Mi(Bf,{dimCompleted:r,simple:i,myManaged:S>0&&!q.is_notice&&!q.is_event&&(q.manager_account_seq??0)===S,task:q,statusOptions:t,projectLabel:q.tab_key?h.get(q.tab_key)??"":"",searchText:a,todayStr:l,onRequestToggleCompleted:y,onOpenDetail:m,onTaskContextMenu:c,targetSummary:q.is_notice?p?.(q):void 0,ackInfo:q.is_notice?d?.(q):Cv(q,S),noticeReadOnly:q.is_notice?u?.(q):!1,unread:f?.(q)??!1,completeLocked:g?.(q)??!1,onAckConfirm:v,onAckListClick:D},q.seq))}),b?Mi($m,{ref:A,sx:{height:"1px"}}):null,Mi(_o,{open:!!E,anchorEl:E?.anchorEl??null,nextCompleted:E?.nextCompleted??!1,returnMode:!!T&&!!(I&&Qt(I,S)),onCancel:()=>y(null),onConfirm:q=>{E&&(q&&T&&I?T(I,q):s(E.taskSeq,E.nextCompleted)),y(null)}})]})}import{useState as Ma}from"react";import{Box as ht,Checkbox as vv,Menu as Iv,MenuItem as vf,Tooltip as _v}from"@mui/material";import wv from"@mui/icons-material/CheckCircle";import Dv from"@mui/icons-material/CheckCircleOutlineOutlined";import Ev from"@mui/icons-material/NotesOutlined";import Rv from"@mui/icons-material/AutorenewOutlined";import Mv from"@mui/icons-material/CalendarTodayOutlined";import Pv from"@mui/icons-material/EventOutlined";import Ov from"@mui/icons-material/PersonOutlineOutlined";import qv from"@mui/icons-material/PeopleAltOutlined";import zv from"@mui/icons-material/StickyNote2Outlined";import{ConfirmActionPopper as Av}from"@ehfuse/mui-confirm-action";import{Fragment as Fv,jsx as Re,jsxs as Rr}from"react/jsx-runtime";var Hm={completed:{label:"\uC644\uB8CC",width:"44px",align:"center",icon:null},title:{label:"\uC81C\uBAA9",width:"1fr",align:"left",icon:Re(Ev,{sx:{fontSize:15}})},manager_name:{label:"\uCC45\uC784\uC790",width:"112px",align:"center",icon:Re(Ov,{sx:{fontSize:15}})},receiver_names:{label:"\uCC38\uC870\uC790",width:"120px",align:"center",icon:Re(qv,{sx:{fontSize:15}})},status:{label:"\uC0C1\uD0DC",width:"104px",align:"center",icon:Re(Rv,{sx:{fontSize:15}})},priority:{label:"\uC911\uC694\uB3C4",width:"88px",align:"center",icon:null},start_date:{label:"\uC2DC\uC791\uC77C\uC2DC",width:"110px",align:"center",icon:Re(Mv,{sx:{fontSize:15}})},due_date:{label:"\uB9C8\uAC10\uC608\uC815",width:"110px",align:"center",icon:Re(Pv,{sx:{fontSize:15}})},note:{label:"\uBE44\uACE0",width:"1fr",align:"left",icon:Re(zv,{sx:{fontSize:15}})}},Lv=[{id:"completed"},{id:"title"},{id:"manager_name"},{id:"due_date"},{id:"status"}],Nv=new Set(["manager_name","status","due_date"]);function If(e){let t=String(e??"").trim();return t?t.slice(2,10).replaceAll("-","."):""}function J4(e,t){return t>0?e.filter(o=>!o.is_notice&&!o.completed&&!o.archived&&ln(o)==="group"&&Number(o.visibility_group_seq??0)===t).sort((o,n)=>{let r=String(o.due_date??"").trim(),i=String(n.due_date??"").trim();return r!==i?r?i?r.localeCompare(i):-1:1:Number(o.seq)-Number(n.seq)}):[]}function eH({tasks:e,columns:t=Lv,loading:o=!1,emptyText:n="\uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",myAccountSeq:r=0,avatarSrcByName:i,managerCandidates:a=[],canAssignManager:l,onOpenDetail:s,onToggleCompleted:m,onChangeStatus:c,onChangeDueDate:p,onChangeReminder:d,onChangeManager:u,onClaimTask:f}){let g=xe(),[v,D]=Ma(null),[b,S]=Ma(null),[h,E]=Ma(null),[y,T]=Ma(null),{onReturnTask:I}=ue(),[A,q]=Ma(null),C=t.map(B=>B.width??Hm[B.id].width).join(" "),k=(B,w)=>Re(Vo,{src:i?.get(B)??"",name:B,avatarSx:{width:w,height:w,fontSize:Math.round(w/2),flexShrink:0,borderRadius:"50%"},iconFontSize:Math.round(w*.6)}),x=(B,w)=>{let H=Hm[B.id].align==="center";switch(B.id){case"completed":if(w.is_event){let _=ze(w.icon||Rt);return Re(ht,{className:"cell",sx:{justifyContent:"center"},children:_?Re(_,{sx:{fontSize:19,color:w.icon_color||"#1e3a8a"}}):null},B.id)}return Re(ht,{className:"cell",sx:{justifyContent:"center",...m?{"&:hover":{bgcolor:g.table.cellHoverBg}}:{}},children:Re(_v,{title:w.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC",arrow:!0,enterDelay:300,disableInteractive:!0,children:Re(vv,{checked:!!w.completed,icon:Re(Dv,{sx:{fontSize:20,color:"#9a9a97",opacity:.45}}),checkedIcon:Re(wv,{sx:{fontSize:20,color:"#2f80ed"}}),onChange:_=>T({anchorEl:_.currentTarget,task:w}),sx:{p:.5}})})},B.id);case"title":{let _=w.is_notice?ze(w.icon||xt):null,N=w.icon_color||"#e5484d";return Rr(ht,{className:"cell",onClick:()=>s(w),sx:{gap:1,cursor:"pointer","&:hover":{bgcolor:g.table.cellHoverBg}},children:[_?Re(_,{sx:{fontSize:18,flexShrink:0,color:N}}):null,Re(ht,{component:"span",sx:{fontSize:14.5,fontWeight:g.table.rowTitleFontWeight,color:g.table.rowTitleColor,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:w.title||"(\uC81C\uBAA9 \uC5C6\uC74C)"})]},B.id)}case"manager_name":{let _=l?l(w):!1,N=r>0&&Number(w.manager_account_seq??0)===r;return _&&u?Rr(ht,{className:"cell",onClick:G=>E({anchorEl:G.currentTarget,task:w}),sx:{gap:.75,justifyContent:"center",cursor:"pointer","&:hover":{bgcolor:g.table.cellHoverBg}},children:[w.manager_name?k(w.manager_name,22):null,Re(ht,{component:"span",sx:{fontSize:14,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:w.manager_name||""})]},B.id):Re(ht,{className:"cell",sx:{gap:.75,justifyContent:"center"},children:w.manager_name?Rr(Fv,{children:[k(w.manager_name,22),Re(ht,{component:"span",sx:{fontSize:14,fontWeight:N?600:400,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:w.manager_name})]}):f?Re(Oo,{onClick:G=>q({anchorEl:G.currentTarget,taskSeq:Number(w.seq)}),children:"\uAC00\uC838\uAC00\uAE30"}):null},B.id)}case"receiver_names":return Re(ht,{className:"cell",sx:{justifyContent:"center",fontSize:14,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:(w.receiver_names??[]).join(", ")},B.id);case"status":return Re(ht,{className:"cell",onClick:c?_=>D({anchorEl:_.currentTarget,task:w}):void 0,sx:{py:.5,justifyContent:"center",...c?{cursor:"pointer","&:hover":{bgcolor:g.table.cellHoverBg}}:{}},children:Re($e,{option:Mt(w)})},B.id);case"priority":return Re(ht,{className:"cell",sx:{justifyContent:"center"},children:Re(oo,{priority:w.priority,plain:!0})},B.id);case"start_date":return Re(ht,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",fontSize:14},children:If(w.start_date)},B.id);case"due_date":return Re(ht,{className:"cell",onClick:p?_=>S({anchorEl:_.currentTarget,taskSeq:Number(w.seq),date:String(w.due_date??"").slice(0,10),reminders:vn(w)}):void 0,sx:{justifyContent:"center",whiteSpace:"nowrap",fontSize:14,...p?{cursor:"pointer","&:hover":{bgcolor:g.table.cellHoverBg}}:{}},children:If(w.due_date)},B.id);case"note":return Re(ht,{className:"cell",sx:{justifyContent:H?"center":"flex-start",fontSize:14,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:w.note||""},B.id);default:return null}};return Rr(ht,{sx:{border:`1px solid ${g.table.borderColor}`,borderRadius:1,overflow:"hidden",bgcolor:g.table.bg,color:g.table.rowColor},children:[Re(ht,{sx:{display:"grid",gridTemplateColumns:C,borderBottom:`1px solid ${g.table.borderColor}`,bgcolor:g.table.headerBg,"& > *":{display:"flex",alignItems:"center",gap:.5,px:1,py:1,minWidth:0,fontSize:g.table.headerFontSize,whiteSpace:"nowrap",userSelect:"none",borderRight:`1px solid ${g.table.rowBorderColor}`},"& > *:first-of-type":{px:.5},"& > *:last-child":{borderRight:"none",pr:2}},children:t.map(B=>{let w=Hm[B.id];return Rr(ht,{sx:{justifyContent:w.align==="center"?"center":"flex-start",color:Nv.has(B.id)?g.table.headerActiveColor:g.table.headerColor},children:[w.icon,B.label??w.label]},B.id)})}),o?Re(ht,{sx:{py:3,textAlign:"center",color:g.table.emptyColor,fontSize:14},children:"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"}):e.length===0?Re(ht,{sx:{py:3,textAlign:"center",color:g.table.emptyColor,fontSize:14},children:n}):e.map((B,w)=>Re(ht,{sx:{display:"grid",gridTemplateColumns:C,minHeight:44,fontSize:15,bgcolor:g.table.rowBg,borderTop:w===0?"none":`1px solid ${g.table.rowBorderColor}`,"&:hover":{bgcolor:g.table.rowHoverBg},"& > .cell":{px:1,minWidth:0,display:"flex",alignItems:"center",borderRight:`1px solid ${g.table.rowBorderColor}`},"& > .cell:first-of-type":{px:.5},"& > .cell:last-child":{borderRight:"none",pr:2}},children:t.map(P=>x(P,B))},B.seq)),Re(hi,{anchorEl:v?.anchorEl??null,value:String(v?.task.status??""),options:v?Ml(v.task):void 0,onSelect:B=>{v&&c?.(Number(v.task.seq),B),D(null)},onComplete:m&&v&&!v.task.completed&&!v.task.is_notice&&!v.task.is_event&&!v.task.is_bug?()=>m(v.task,!0):void 0,onClose:()=>D(null)}),Rr(Iv,{anchorEl:h?.anchorEl??null,open:!!h,onClose:()=>E(null),transitionDuration:0,children:[Rr(vf,{onClick:()=>{h&&u?.(Number(h.task.seq),"",0),E(null)},sx:{fontSize:14,minWidth:170,gap:1,color:g.table.headerColor},children:[Re(ht,{sx:{width:24,flexShrink:0}}),"\uC9C0\uC815 \uC548 \uD568"]}),a.map(B=>Rr(vf,{selected:Number(h?.task.manager_account_seq??0)===Number(B.account_seq??0),onClick:()=>{h&&u?.(Number(h.task.seq),B.name,Number(B.account_seq??0)),E(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[k(B.name,24),B.name,B.role_name?Re(ht,{component:"span",sx:{color:g.table.headerColor,fontSize:13},children:B.role_name}):null]},B.seq))]}),Re(Go,{anchorEl:b?.anchorEl??null,open:!!b,date:b?.date??"",reminders:b?.reminders??[],hideReminder:!d,onClose:()=>S(null),onDateChange:B=>{b&&(p?.(b.taskSeq,B),S(w=>w?{...w,date:B}:null))},onReminderChange:B=>{b&&(d?.(b.taskSeq,B),S(w=>w?{...w,reminders:B}:null))}}),Re(_o,{open:!!y,anchorEl:y?.anchorEl??null,nextCompleted:!y?.task.completed,returnMode:!!I&&!!(y&&Qt(y.task,r)),onCancel:()=>T(null),onConfirm:B=>{y&&(B&&I?I(y.task,B):m?.(y.task,!y.task.completed)),T(null)}}),Re(Av,{open:!!A,anchorEl:A?.anchorEl??null,title:"\uC774 \uC5C5\uBB34\uB97C \uB9E1\uC744\uAE4C\uC694?",confirmText:"\uAC00\uC838\uAC00\uAE30",onCancel:()=>q(null),onConfirm:()=>{A&&f?.(A.taskSeq),q(null)}})]})}function $v(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)}function _f(e,t){let o=String(e??"").slice(0,10);if(!$v(o)||typeof t!="number"||!Number.isFinite(t))return"";let n=new Date(`${o}T12:00:00`);n.setDate(n.getDate()+Math.trunc(t));let r=n.getFullYear(),i=String(n.getMonth()+1).padStart(2,"0"),a=String(n.getDate()).padStart(2,"0");return`${r}-${i}-${a}`}function Hv(e,t,o){return{title:String(e.title??"").trim(),content:String(e.content??""),start_date:_f(t,e.start_offset_days),due_date:_f(t,e.due_offset_days),priority:e.priority??"medium",label_keys:[...e.label_keys??[]],manager_account_seq:Number(e.manager_account_seq)||0,manager_name:String(e.manager_name??""),checklist:(e.checklist??[]).map(n=>String(n??"").trim()).filter(n=>n.length>0).map(n=>({label:n,checked:!1})),group_seq:o}}function gs(e,t){let o=Number(e.group_seq)||0;return(e.items??[]).map(n=>Hv(n,t,o)).filter(n=>n.title.length>0)}function nH(e){return typeof e!="number"||!Number.isFinite(e)?"-":e===0?"\uAE30\uC900\uC77C":e>0?`\uAE30\uC900\uC77C +${Math.trunc(e)}\uC77C`:`\uAE30\uC900\uC77C ${Math.trunc(e)}\uC77C`}import{useEffect as h1,useRef as k1,useState as dg}from"react";import{Box as nr,Button as su,ButtonBase as T1,Divider as pg,Drawer as y1,IconButton as S1,Tooltip as C1}from"@mui/material";import B1 from"@mui/icons-material/Close";import v1 from"@ehfuse/overlay-scrollbar";import{FormDialog as I1}from"@ehfuse/mui-form-dialog";import{useState as qi}from"react";import i1 from"@mui/icons-material/ExpandLess";import a1 from"@mui/icons-material/ExpandMore";import{Box as Pr,ButtonBase as lg,Divider as $a,Menu as iu,MenuItem as au,Tooltip as l1}from"@mui/material";import s1 from"@mui/icons-material/SubjectOutlined";import c1 from"@mui/icons-material/StickyNote2Outlined";import m1 from"@mui/icons-material/LabelOutlined";import u1 from"@mui/icons-material/DirectionsRunOutlined";import sg from"@mui/icons-material/LockOutlined";import cg from"@mui/icons-material/PublicOutlined";import mg from"@mui/icons-material/Group";import d1 from"@mui/icons-material/Repeat";import p1 from"@mui/icons-material/EventOutlined";import f1 from"@mui/icons-material/SpeedOutlined";import{TextField as g1}from"@ehfuse/mui-form-controls";import{useState as ii}from"react";import{Box as qa,ButtonBase as lI,Divider as sI,ListItemIcon as cI,Menu as Um,MenuItem as Pa}from"@mui/material";import mI from"@mui/icons-material/Add";import bs from"@mui/icons-material/Check";import uI from"@mui/icons-material/ViewKanbanOutlined";import dI from"@mui/icons-material/CalendarTodayOutlined";import pI from"@mui/icons-material/EventOutlined";import fI from"@mui/icons-material/PersonOutlineOutlined";import Mf from"@mui/icons-material/PeopleAltOutlined";import gI from"@mui/icons-material/FlagOutlined";import xI from"@mui/icons-material/TimerOutlined";import bI from"@mui/icons-material/NotificationsNoneOutlined";import hI from"@mui/icons-material/InboxOutlined";import kI from"@mui/icons-material/PlaceOutlined";import TI from"@mui/icons-material/MapOutlined";import{TimePicker as yI}from"@ehfuse/mui-datetime-picker";import{InfoAlert as Pf}from"@ehfuse/alerts";var gn="@media (max-width: 719.95px)";function qn(e){return{[gn]:{order:e}}}import{useEffect as Wv,useState as Vv}from"react";import{Box as Uv}from"@mui/material";import{jsx as Gv}from"react/jsx-runtime";function tr({value:e,placeholder:t,readOnly:o,onCommit:n}){let r=xe(),[i,a]=Vv(e);return Wv(()=>a(e),[e]),Gv(Uv,{component:"input",spellCheck:!1,value:i,readOnly:o,placeholder:t,onChange:l=>a(l.target.value),onBlur:()=>{i.trim()!==e&&n(i.trim())},onKeyDown:l=>{l.key==="Enter"&&l.target.blur()},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:r.colors.textPrimary,caretColor:r.colors.textPrimary,bgcolor:"transparent",p:0,"&::placeholder":{color:"#9a9a97"}}})}import{Box as Wm}from"@mui/material";import{jsx as Kv,jsxs as wf}from"react/jsx-runtime";function ve({icon:e,label:t,onClick:o,sx:n,children:r}){return wf(Wm,{sx:[{display:"flex",alignItems:"center",minHeight:32},...Array.isArray(n)?n:[n]],children:[wf(Wm,{sx:{display:"flex",alignItems:"center",gap:1,width:104,flexShrink:0,fontSize:13.5,color:"#787774"},children:[e,t]}),Kv(Wm,{onClick:o?i=>o(i.currentTarget):void 0,sx:{flex:1,minWidth:0,display:"flex",alignItems:"center",gap:.5,px:1,py:.25,borderRadius:1,fontSize:14,cursor:o?"pointer":"default","&:hover":o?{bgcolor:"#f2f2f0"}:void 0,[gn]:{py:.25}},children:r})]})}import SI from"@mui/icons-material/StorefrontOutlined";import CI from"@mui/icons-material/SupportAgentOutlined";import{Suspense as Yv,lazy as jv,useEffect as Xv,useState as Df}from"react";import{Box as Vm,Dialog as Qv,DialogContent as Zv,DialogTitle as Jv,IconButton as Ef,Tooltip as eI}from"@mui/material";import tI from"@mui/icons-material/Close";import oI from"@mui/icons-material/Search";import{Fragment as aI,jsx as xn,jsxs as xs}from"react/jsx-runtime";function nI(e){return xn(Vm,{sx:{p:3,fontSize:14,color:"#9a9a97"},children:"\uC8FC\uC18C \uAC80\uC0C9 \uBAA8\uB4C8(react-daum-postcode)\uC744 \uBD88\uB7EC\uC62C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC8FC\uC18C\uB97C \uC9C1\uC811 \uC785\uB825\uD574 \uC8FC\uC138\uC694."})}var rI=jv(()=>import("react-daum-postcode").then(e=>({default:e.default})).catch(()=>({default:nI})));function iI(e){if(e.addressType!=="R")return e.address;let t="";return e.bname!==""&&/[동|로|가]$/g.test(e.bname)&&(t+=e.bname),e.buildingName!==""&&e.apartment==="Y"&&(t+=t!==""?`, ${e.buildingName}`:e.buildingName),t!==""?`${e.address} (${t})`:e.address}function Rf({value:e,placeholder:t="\uC8FC\uC18C \uC785\uB825",readOnly:o,onCommit:n}){let[r,i]=Df(e),[a,l]=Df(!1),s=ue().slots?.addressSearch;Xv(()=>i(e),[e]);let m=p=>{i(p),l(!1),p!==e&&n(p)};return xs(aI,{children:[xs(Vm,{sx:{display:"flex",alignItems:"center",gap:.5,flex:1,minWidth:0},children:[xn(Vm,{component:"input",spellCheck:!1,value:r,readOnly:o,placeholder:t,onChange:p=>i(p.target.value),onBlur:()=>{a||r.trim()!==e&&n(r.trim())},onKeyDown:p=>{p.key==="Enter"&&(p.preventDefault(),!o&&l(!0))},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",p:0,"&::placeholder":{color:"#9a9a97"}}}),o?null:xn(eI,{title:"\uC8FC\uC18C \uAC80\uC0C9",arrow:!0,children:xn(Ef,{tabIndex:-1,size:"small","aria-label":"\uC8FC\uC18C \uAC80\uC0C9",onClick:()=>l(!0),sx:{color:"#9a9a97",p:.25,flexShrink:0},children:xn(oI,{sx:{fontSize:17}})})})]}),s?xn(s,{open:a,onComplete:m,onClose:()=>l(!1)}):xs(Qv,{open:a,onClose:()=>l(!1),maxWidth:"sm",fullWidth:!0,slotProps:{paper:{sx:{height:550}}},children:[xs(Jv,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",pr:2},children:["\uC8FC\uC18C \uAC80\uC0C9",xn(Ef,{"aria-label":"\uC8FC\uC18C \uAC80\uC0C9 \uB2EB\uAE30",onClick:()=>l(!1),size:"small",children:xn(tI,{})})]}),xn(Zv,{style:{padding:0},dividers:!0,children:a?xn(Yv,{fallback:null,children:xn(rI,{onComplete:p=>{m(iI(p))},onClose:()=>l(!1),defaultQuery:r,style:{width:"100%",height:"100%"}})}):null})]})]})}import{Fragment as Oa,jsx as ce,jsxs as Do}from"react/jsx-runtime";function Of(e){return String(e??"").includes(" ")?Po(e):Uo(e)}function BI(e){let[t="00",o="00"]=String(e??"").split(":");return{hour:/^\d{2}$/.test(t)?t:"00",minute:/^\d{2}$/.test(o)?o:"00"}}function Mr({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return ce(qa,{component:"span",sx:{color:"#9a9a97"},children:e})}var kt=e=>({gridColumn:`${e}`,[gn]:{gridColumn:"auto"}});function hs({values:e,customTabs:t,avatarSrcByName:o,managerLocked:n=!1,notice:r=!1,event:i=!1,hideDueDate:a=!1,hideReminder:l=!1,beforeStart:s,pinColumns:m=!1,projectColumn:c=1,afterProject:p,readOnly:d=!1,coreLocked:u,targetSummary:f="",narrowCollapsedSx:g,reminderLocked:v=!1,managerAction:D,hideProject:b=!1,hideManager:S=!1,hideReceivers:h=!1,hideStartDate:E=!1,leading:y,supportOrigin:T,trailing:I,onChangeProject:A,onChangeStartDate:q,onClearStartDate:C,onChangeDueDate:k,onChangeReminder:x,onChangePriority:B,onChangeEventTime:w,onChangeEventPlace:P,onChangeEventAddress:H,onMemberEdit:_,onAddProject:N}){let[G,Q]=ii(null),[se,me]=ii(!1),Y=u??d,[O,oe]=ii(null),[F,W]=ii(null),[V,U]=ii(null),[de,re]=ii(null),[Te,j]=ii(null),ne=Ue(),he=Sn(),Ce=m&&!i,_e=(K,ae,We=!1)=>[qn(K),...We&&g?Array.isArray(g)?g:[g]:[],...Ce&&ae?[kt(ae)]:[]],Le=t.find(K=>K.key===e.tabKey),ct=t.filter(K=>!K.archived),Ge=!!C&&!r&&!Y,Pe=K=>{let ae=String(e.startDate??"").trim(),We=C?!!ae&&ql(ae).getTime()>Date.now():!!ae;if(q(K),We||i)return;let Ft=ql(K);if(!Number.isNaN(Ft.getTime())){if(r){if(Ft.getTime()<=Date.now())return;Pf("\uAC8C\uC2DC\uC77C\uC2DC\uAC00 \uB418\uBA74 \uB300\uC0C1\uC790\uC5D0\uAC8C \uACF5\uC9C0\uAC00 \uBCF4\uC774\uACE0 \uC54C\uB9BC\uC774 \uBC1C\uC1A1\uB429\uB2C8\uB2E4.");return}Ft.getTime()<=Date.now()||Pf("\uC2DC\uC791\uC77C\uC2DC\uAC00 \uB418\uBA74 \uCC45\uC784\uC790\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uBC1C\uC1A1\uB429\uB2C8\uB2E4.")}},Ne=ce(ve,{icon:ce(bI,{sx:{fontSize:17}}),label:"\uC0AC\uC804\uC54C\uB9BC",onClick:Y||v?void 0:K=>W(K),sx:_e(i?8:5,2,!0),children:e.reminders.length===0?ce(Mr,{label:"\uC5C6\uC74C"}):pm(e.reminders)});return Do(Oa,{children:[Do(qa,{sx:{display:"grid",gridTemplateColumns:"repeat(2, minmax(0, 1fr))",gridAutoFlow:"row dense",columnGap:3,rowGap:0,px:2,[gn]:{gridTemplateColumns:"minmax(0, 1fr)"}},children:[y,T?Do(Oa,{children:[Do(ve,{icon:ce(SI,{sx:{fontSize:17}}),label:"\uAC00\uB9F9\uC810",sx:_e(0,1),children:[T.licenseName||ce(Mr,{}),T.contactPhone?ce(qa,{component:"span",sx:{ml:1,color:"#6f6f6c",fontSize:"0.92em"},children:T.contactPhone}):null,T.contactEmail?ce(qa,{component:"span",sx:{ml:1,color:"#6f6f6c",fontSize:"0.92em"},children:T.contactEmail}):null]}),ce(ve,{icon:ce(CI,{sx:{fontSize:17}}),label:"\uC720\uD615",sx:_e(0,2),children:T.supportType||ce(Mr,{})})]}):null,b?null:ce(ve,{icon:ce(uI,{sx:{fontSize:17}}),label:"\uD504\uB85C\uC81D\uD2B8",onClick:Y?void 0:K=>Q(K),sx:Ce&&c==="full"?[_e(1,void 0,!0),{gridColumn:"1 / -1"}]:_e(1,c==="full"?1:c,!0),children:Le?(()=>{let K=ze(Le.icon);return Do(Oa,{children:[K?ce(K,{sx:{fontSize:16,color:"#1e3a8a"}}):null,Le.label]})})():"\uAE30\uBCF8"}),p,r?ce(ve,{icon:ce(Mf,{sx:{fontSize:17}}),label:"\uB300\uC0C1\uC790",onClick:Y?void 0:()=>_("targets"),sx:_e(7,1),children:f||"\uBAA8\uB4E0 \uC9C1\uC6D0"}):null,!r&&!i&&!S?ce(ve,{icon:ce(fI,{sx:{fontSize:17}}),label:"\uCC45\uC784\uC790",onClick:n||Y||!e.managerName&&D?void 0:()=>_("manager"),sx:_e(7,1),children:e.managerName?Do(Oa,{children:[ce(go,{names:[e.managerName],size:20,avatarSrcByName:o}),e.managerName]}):D??ce(Mr,{})}):null,s,!i&&!E?Do(ve,{icon:ce(dI,{sx:{fontSize:17}}),label:r?"\uAC8C\uC2DC\uC77C\uC2DC":"\uC2DC\uC791\uC77C\uC2DC",onClick:Y?void 0:K=>U(K),sx:_e(2,2),children:[e.startDate?Of(e.startDate):r?ce(qa,{component:"span",sx:{fontSize:13.5,color:"text.secondary"},children:"\uC791\uC131\uC911 \u2014 \uAC8C\uC2DC \uC548 \uB428"}):ce(Mr,{label:Ge?"\uBBF8\uC815":void 0}),Ge&&e.startDate?ce(lI,{onClick:K=>{K.stopPropagation(),C?.()},sx:{ml:"auto",flexShrink:0,px:1,py:.25,borderRadius:1,border:"1px solid #e6e6e3",fontSize:14,color:"#787774","&:hover":{bgcolor:"#ebebe9"}},children:"\uBBF8\uC815"}):null]}):null,!r&&!h?ce(ve,{icon:ce(Mf,{sx:{fontSize:17}}),label:i?"\uCC38\uC11D\uC790":"\uCC38\uC870\uC790",onClick:Y?void 0:()=>_("receivers"),sx:_e(i?7:8,1),children:e.receiverNames.length>0?Do(Oa,{children:[ce(go,{names:e.receiverNames,size:20,avatarSrcByName:o}),e.receiverNames.length===1?e.receiverNames[0]:null]}):ce(Mr,{})}):null,a?null:ce(ve,{icon:ce(pI,{sx:{fontSize:17}}),label:i?"\uB0A0\uC9DC":"\uB9C8\uAC10\uC608\uC815",onClick:Y?void 0:K=>re(K),sx:_e(3,2),children:e.dueDate?i?Uo(e.dueDate):Of(e.dueDate):ce(Mr,{label:r?"\uBB34\uAE30\uD55C":void 0})}),i?ce(ve,{icon:ce(xI,{sx:{fontSize:17}}),label:"\uC2DC\uAC01",onClick:Y?void 0:K=>j(K),sx:qn(4),children:e.eventTime?e.eventTime:ce(Mr,{label:"\uC885\uC77C"})}):null,i?ce(ve,{icon:ce(kI,{sx:{fontSize:17}}),label:"\uC7A5\uC18C",sx:qn(5),children:ce(tr,{value:e.eventPlace??"",placeholder:"\uC7A5\uC18C \uC785\uB825",readOnly:Y,onCommit:K=>P?.(K)})}):null,!l&&i?Ne:null,i?ce(ve,{icon:ce(TI,{sx:{fontSize:17}}),label:"\uC8FC\uC18C",sx:[{gridColumn:"1 / -1"},qn(6)],children:ce(Rf,{value:e.eventAddress??"",placeholder:"\uC8FC\uC18C \uC785\uB825",readOnly:Y,onCommit:K=>H?.(K)})}):null,i?null:ce(ve,{icon:ce(gI,{sx:{fontSize:17}}),label:"\uC911\uC694\uB3C4",onClick:d?void 0:K=>oe(K),sx:_e(6,1,!0),children:ce(oo,{priority:e.priority,small:!0})}),!l&&!i?Ne:null,I]}),Do(Um,{transitionDuration:0,anchorEl:G,open:!!G,onClose:()=>Q(null),...he,children:[Do(Pa,{selected:!e.tabKey,onClick:()=>{A(""),Q(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[ce(hI,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC5C6\uC74C",e.tabKey?null:ce(bs,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}})]}),ct.map(K=>{let ae=ze(K.icon),We=e.tabKey===K.key;return Do(Pa,{selected:We,onClick:()=>{A(K.key),Q(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[ae?ce(ae,{sx:{fontSize:17,color:"#1e3a8a"}}):null,K.label,We?ce(bs,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},K.key)}),N?[ce(sI,{},"add-project-divider"),Do(Pa,{onClick:()=>me(!0),sx:{fontSize:14,color:"#787774"},children:[ce(cI,{children:ce(mI,{sx:{fontSize:18,color:"#787774"}})}),"\uD504\uB85C\uC81D\uD2B8 \uCD94\uAC00"]},"add-project")]:null]}),N?ce(Jl,{open:se,onClose:()=>me(!1),onSubmit:(K,ae,We)=>{(async()=>{let Ft=await N(K,ae,We);Ft&&A(Ft)})(),Q(null)}}):null,ce(Um,{transitionDuration:0,anchorEl:O,open:!!O,onClose:()=>oe(null),...he,children:["high","medium","low"].map(K=>Do(Pa,{selected:e.priority===K,onClick:()=>{B(K),oe(null)},sx:{fontSize:14,minWidth:130,gap:1},children:[ce(oo,{priority:K,small:!0}),e.priority===K?ce(bs,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},K))}),ce(Um,{transitionDuration:0,anchorEl:F,open:!!F,onClose:()=>W(null),...he,children:dm(i?!!e.eventTime:String(e.dueDate??"").includes(" ")).map(K=>{let ae=K.value==="none"?e.reminders.length===0:e.reminders.includes(K.value);return Do(Pa,{selected:ae,onClick:()=>{x(Xl(e.reminders,K.value)),K.value==="none"&&W(null)},sx:{fontSize:14,minWidth:150,gap:1},children:[K.label,ae?ce(bs,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},K.value)})}),i?ce(yI,{anchorEl:Te,open:!!Te,onClose:()=>j(null),value:BI(e.eventTime),format:"HH:mm",minuteStep:10,autoApply:!0,centered:ne,locale:"ko",onChange:(K,ae)=>{w?.(`${K}:${ae}`),j(null)}}):null,ce(Go,{anchorEl:V,open:!!V,date:e.startDate,reminders:[],hideReminder:!0,showTime:!0,centered:ne,onClose:()=>U(null),onDateChange:Pe,onReminderChange:()=>{}}),ce(Go,{anchorEl:de,open:!!de,date:e.dueDate,reminders:e.reminders,hideReminder:v||l,showTime:!i,centered:ne,onClose:()=>re(null),onDateChange:k,onReminderChange:x})]})}import{useState as vI}from"react";import{Box as II,Menu as _I,MenuItem as wI}from"@mui/material";import DI from"@mui/icons-material/RepeatOutlined";import EI from"@mui/icons-material/DevicesOutlined";import RI from"@mui/icons-material/ScreenSearchDesktopOutlined";import MI from"@mui/icons-material/SellOutlined";import PI from"@mui/icons-material/TaskAltOutlined";import{Fragment as qf,jsx as Yt,jsxs as zf}from"react/jsx-runtime";function Gm({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return Yt(II,{component:"span",sx:{color:"#9a9a97"},children:e})}function ks({values:e,readOnly:t=!1,showResolution:o=!1,onChangeRepro:n,onChangeDevice:r,onChangeWhere:i,onChangeVersion:a,onChangeResolution:l}){let[s,m]=vI(null),c=s?.field==="repro"?Kc:s?.field==="device"?Yc:jc,p=d=>{s?.field==="repro"?n(d):s?.field==="device"?r(d):s?.field==="resolution"&&l?.(d),m(null)};return zf(qf,{children:[zf(qf,{children:[Yt(ve,{icon:Yt(DI,{sx:{fontSize:17}}),label:"\uC7AC\uD604\uBE48\uB3C4",onClick:t?void 0:d=>m({field:"repro",el:d}),children:Od(e.repro)||Yt(Gm,{label:"\uC120\uD0DD"})}),Yt(ve,{icon:Yt(EI,{sx:{fontSize:17}}),label:"\uB514\uBC14\uC774\uC2A4",onClick:t?void 0:d=>m({field:"device",el:d}),children:qd(e.device)||Yt(Gm,{label:"\uC120\uD0DD"})}),Yt(ve,{icon:Yt(RI,{sx:{fontSize:17}}),label:"\uBC1C\uC0DD\uD654\uBA74",children:Yt(tr,{value:e.where,placeholder:"\uC608: POS > \uC8FC\uBB38\uD604\uD669",readOnly:t,onCommit:i})}),Yt(ve,{icon:Yt(MI,{sx:{fontSize:17}}),label:"\uBC1C\uC0DD\uBC84\uC804",children:Yt(tr,{value:e.version,placeholder:"\uC608: 2026-08-06 \uBC30\uD3EC",readOnly:t,onCommit:a})}),o?Yt(ve,{icon:Yt(PI,{sx:{fontSize:17}}),label:"\uC885\uB8CC\uC0AC\uC720",onClick:t?void 0:d=>m({field:"resolution",el:d}),children:Dl(e.resolution)||Yt(Gm,{label:"\uC120\uD0DD"})}):null]}),Yt(_I,{open:!!s,anchorEl:s?.el??null,onClose:()=>m(null),transitionDuration:0,children:c.map(d=>Yt(wI,{onClick:()=>p(d.key),sx:{fontSize:14},children:d.name},d.key))})]})}import{Box as Af}from"@mui/material";import{jsxs as Lf}from"react/jsx-runtime";var Km=16;function jo({icon:e,title:t,titleExtra:o,children:n}){return Lf(Af,{sx:{px:2,display:"flex",flexDirection:"column",gap:.25},children:[Lf(Af,{sx:{display:"flex",alignItems:"center",gap:1,fontSize:Km,fontWeight:500,color:"#37352f"},children:[e,t,o]}),n]})}import{useState as Zm}from"react";import{Box as Jm,Button as $I,Divider as Wf,IconButton as Vf,Menu as HI,MenuItem as Cs,Tooltip as WI}from"@mui/material";import VI from"@mui/icons-material/MoreVert";import{ConfirmDialog as UI,ErrorAlert as GI,SuccessAlert as KI}from"@ehfuse/alerts";import{FormDialog as YI}from"@ehfuse/mui-form-dialog";import{ClearTextField as jI}from"@ehfuse/mui-form-controls";import{useEffect as Nf,useRef as Ts,useState as Ff}from"react";import{Box as za,Button as Ym,IconButton as jm,Tooltip as Xm,useMediaQuery as OI,useTheme as qI}from"@mui/material";import $f from"@mui/icons-material/EditOutlined";import zI from"@mui/icons-material/DoneOutlined";import Hf from"@mui/icons-material/Translate";import AI from"@mui/icons-material/ContentCopyOutlined";import{EhfuseEditor as LI,ImageResizePlugin as NI,minimalToolbarOptions as FI}from"@ehfuse/editor";import{jsx as Jt,jsxs as ys}from"react/jsx-runtime";function Qm(e){let t=e.trim();return t?t.startsWith("<")?e:`<p>${t}</p>`:"<p></p>"}function ai(e){let t=e.replace(/<br\s*\/?>/gi,`
|
|
6
|
+
\uC18C\uC18D \uC5C5\uBB34\uB294 \uAE30\uBCF8 \uC5C5\uBB34\uD568\uC73C\uB85C \uC774\uB3D9\uD569\uB2C8\uB2E4.`,confirmText:"\uC0AD\uC81C",onCancel:()=>V(null),onConfirm:()=>{W&&S(W.column.key),V(null)}}),pe(_o,{open:!!w,anchorEl:w?.anchorEl??null,nextCompleted:w?.nextCompleted??!1,returnMode:!!x&&!!(H&&Qt(H,B)),onCancel:()=>P(null),onConfirm:$=>{w&&($&&x&&H?x(H,$):r(w.taskSeq,w.nextCompleted)),P(null)}})]})}import{useCallback as Yn,useMemo as va,useRef as Vp,useState as Ia}from"react";import{Box as Lt,Button as E0,ButtonBase as Gp,IconButton as Up}from"@mui/material";import R0 from"@mui/icons-material/Add";import M0 from"@mui/icons-material/ChevronLeft";import P0 from"@mui/icons-material/ChevronRight";import O0 from"@mui/icons-material/KeyboardArrowDown";import{DatePicker as q0}from"@ehfuse/mui-datetime-picker";import{DndContext as z0,DragOverlay as A0,PointerSensor as L0,pointerWithin as N0,rectIntersection as F0,useDroppable as $0,useSensor as H0,useSensors as W0}from"@dnd-kit/core";import{SortableContext as V0,arrayMove as U0,useSortable as G0,verticalListSortingStrategy as K0}from"@dnd-kit/sortable";import{CSS as Y0}from"@dnd-kit/utilities";import j0 from"@ehfuse/overlay-scrollbar";function y0(e){let[t,o,n]=e.split("-").map(Number),r=new Date(Date.UTC(t,o-1,n+1)),i=a=>String(a).padStart(2,"0");return`${r.getUTCFullYear()}-${i(r.getUTCMonth()+1)}-${i(r.getUTCDate())}`}function Ii(e){let t=new Map;for(let o of e){let n=o.start_date;for(let r=0;r<62&&n<=o.end_date;r+=1){let i=t.get(n);i?i.push(o):t.set(n,[o]),n=y0(n)}}for(let o of t.values())o.sort((n,r)=>(n.time||"99:99").localeCompare(r.time||"99:99")||n.title.localeCompare(r.title));return t}function _i(e){let t=String((e.is_event?e.event_time:e.due_date.slice(11,16)||e.estimated_time)??"").trim();return/^\d{1,2}:\d{2}$/.test(t)?t:""}function wi(e,t){if(e.completed!==t.completed)return e.completed?1:-1;let o=_i(e),n=_i(t);if(!!o!=!!n)return o?-1:1;if(o&&n&&o!==n)return o<n?-1:1;let r=e.sort_no>0,i=t.sort_no>0;return r&&i?e.sort_no-t.sort_no:r!==i?r?-1:1:e.seq-t.seq}import{Box as Im,Tooltip as S0}from"@mui/material";import{jsx as _m,jsxs as C0}from"react/jsx-runtime";function Di({event:e,small:t=!1,onClick:o}){let n=e.time?`${e.time} ${e.title}`:e.title,r=e.calendar?`\uAD6C\uAE00 \xB7 ${e.calendar}`:"\uAD6C\uAE00 \uCE98\uB9B0\uB354",i=a=>{if(a.stopPropagation(),o){o(e);return}let[l,s,m]=e.start_date.split("-").map(Number);window.open(`https://calendar.google.com/calendar/r/day/${l}/${s}/${m}`,"_blank")};return _m(S0,{title:`(${r}) ${n}`,arrow:!0,enterDelay:300,children:C0(Im,{onClick:i,onPointerDown:a=>a.stopPropagation(),sx:{display:"flex",alignItems:"center",gap:.5,px:1,py:t?.6:.8,borderRadius:.75,bgcolor:"#f1f1ef",color:"#37352f",fontSize:15,fontWeight:500,overflow:"hidden",whiteSpace:"nowrap",flexShrink:0,minWidth:0,maxWidth:"100%",cursor:"pointer","&:hover":{bgcolor:"#ececea"}},children:[_m(Im,{component:"span",sx:{width:6,height:6,borderRadius:"50%",bgcolor:"#0f9d58",flexShrink:0}}),_m(Im,{component:"span",sx:{minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},children:n})]})})}import{useCallback as I0}from"react";import{Box as Dr,Checkbox as _0}from"@mui/material";import{useLayoutEffect as B0,useState as Hp}from"react";var Dm=new WeakMap,wm=null;function v0(){return typeof ResizeObserver>"u"?null:(wm||(wm=new ResizeObserver(e=>{for(let t of e){let o=Dm.get(t.target);if(!o)continue;let n=t.borderBoxSize?.[0]?.inlineSize??t.target.getBoundingClientRect().width;o(n)}})),wm)}function Wp(){let[e,t]=Hp(null),[o,n]=Hp(0);return B0(()=>{if(!e)return;n(e.getBoundingClientRect().width);let r=v0();if(r)return Dm.set(e,i=>n(a=>Math.abs(a-i)<1?a:i)),r.observe(e),()=>{r.unobserve(e),Dm.delete(e)}},[e]),{ref:t,width:o}}import{jsx as Kn,jsxs as Em}from"react/jsx-runtime";var Rm={high:"#e5484d",medium:"#2f80ed",low:"#d9a514"},Ei=14,w0=150,D0=3;function Er({task:e,statusOptions:t,onOpenDetail:o,onContextMenu:n,isPreview:r=!1,isDragging:i=!1,isMine:a=!1,avatarSrcByName:l,showManagerAvatar:s=!1,onOpenMembers:m,setNodeRef:c,dragProps:p,trailing:d,showCheckbox:u=!1,onRequestToggleCompleted:f,showTime:g=!0,wrapTitle:v=!1}){let D=xe(),b=D.mode==="dark",[S]=bi(e,t),h=String(e.manager_name??"").trim(),E=g?_i(e):"",y=ki(e,ue().resolveTask),T=e.is_notice||e.is_event?ze(e.icon||(e.is_notice?xt:Rt)):null,I=!e.completed&&!e.is_event&&!!e.due_date&&e.due_date.slice(0,10)<Fd(),{ref:A,width:q}=Wp(),C=q>0&&q<w0,k=C||v,x=I0(w=>{A(w),c?.(w)},[A,c]),B=s&&!a&&!C&&!!h;return Em(Dr,{ref:x,...p??{},onClick:w=>{w.stopPropagation(),o(e)},onContextMenu:n?w=>n(e,w):void 0,sx:{display:"flex",alignItems:k?"flex-start":"center",gap:.5,py:.6,px:1,flexShrink:0,borderRadius:.75,minWidth:0,maxWidth:"100%",bgcolor:S?b?xi(S.dot,D.chip.darkBgAlpha):S.bg:b?D.card.bg:D.colors.surfaceHover,color:S?b?D.chip.darkTextSource==="fg"?S.fg:S.dot:S.fg:D.colors.textPrimary,fontSize:Ei,fontWeight:b||e.completed?400:500,textDecoration:e.completed?"line-through":"none",opacity:r?.5:i?.35:e.completed?.6:1,border:r?`1px dashed ${D.colors.accent}`:"1px solid transparent",pointerEvents:r?"none":"auto",cursor:"pointer",touchAction:p?"none":"auto",overflow:"hidden","&:hover":{filter:"brightness(0.96)"},...I?{borderLeft:`3px solid ${D.colors.danger}`,pl:.75}:a?{borderLeft:"3px solid #2f80ed",pl:.75}:{}},children:[Kn(Dr,{component:"span",sx:{width:6,height:6,borderRadius:"50%",flexShrink:0,...k?{mt:"6px"}:{},bgcolor:Rm[e.priority]??D.colors.accentOnSurface}}),u&&!C&&f?Kn(_0,{size:"small",checked:e.completed,onPointerDown:w=>w.stopPropagation(),onClick:w=>w.stopPropagation(),onChange:(w,P)=>f({anchorEl:w.currentTarget,taskSeq:e.seq,nextCompleted:P}),sx:{p:0,flexShrink:0}}):null,T&&!C?Kn(T,{sx:{fontSize:15,flexShrink:0,opacity:.75,...k?{mt:"2px"}:{}}}):null,Em(Dr,{sx:{minWidth:0,overflow:"hidden",display:"flex",flexDirection:"column",color:b?D.colors.textStrong:D.colors.textPrimary},children:[C&&E?Kn(Dr,{component:"span",sx:{lineHeight:1.35,fontSize:Ei-1,color:e.completed?D.colors.textPrimary:D.colors.danger},children:E}):null,Em(Dr,{component:"span",sx:{minWidth:0,overflow:"hidden",...k?{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:D0,whiteSpace:"normal",overflowWrap:"anywhere",lineHeight:1.35}:{textOverflow:"ellipsis",whiteSpace:"nowrap"}},children:[!C&&E?Kn(Dr,{component:"span",sx:{mr:.5,fontSize:Ei-1,color:e.completed?D.colors.textPrimary:D.colors.danger},children:E}):null,e.title,!C&&y?Kn(Dr,{component:"span",sx:{ml:.5,fontSize:Ei-2,color:D.colors.textMuted,fontVariantNumeric:"tabular-nums"},children:y}):null,!C&&(e.comment_count??e.comments?.length??0)>0?Kn(vr,{sx:{fontSize:15,ml:.5,verticalAlign:"-2px",color:D.colors.textMuted}}):null]})]}),d??null,!d&&B?Kn(Dr,{component:"span",onClick:m?w=>{w.stopPropagation(),m(e)}:void 0,sx:{display:"inline-flex",flexShrink:0,ml:"auto",pl:.5},children:Kn(Vo,{src:l?.get(h)??"",name:h,avatarSx:{width:22,height:22,fontSize:11},iconFontSize:14})}):null]})}import{jsx as He,jsxs as jn}from"react/jsx-runtime";var Kp=36,X0=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"],ss="day-";function Mm(e){let t=new Date(e);return t.setHours(0,0,0,0),t.setDate(t.getDate()-t.getDay()),t}function ls(e,t){let o=new Date(e);return o.setDate(o.getDate()+t),o}function Q0(e){let t=e[0],o=e[e.length-1];return t.getMonth()===o.getMonth()?`${t.getFullYear()}\uB144 ${t.getMonth()+1}\uC6D4`:t.getFullYear()===o.getFullYear()?`${t.getFullYear()}\uB144 ${t.getMonth()+1}\uC6D4 - ${o.getMonth()+1}\uC6D4`:`${t.getFullYear()}\uB144 ${t.getMonth()+1}\uC6D4 - ${o.getFullYear()}\uB144 ${o.getMonth()+1}\uC6D4`}function Z0(e){return e.getDate()===1?`${e.getMonth()+1}\uC6D4 1\uC77C`:String(e.getDate())}function J0({task:e,statusOptions:t,isMine:o,avatarSrcByName:n,onCardClick:r,onCardContextMenu:i,onRequestArchiveToggle:a,dragDisabled:l=!1}){let{attributes:s,listeners:m,setNodeRef:c,transform:p,transition:d,isDragging:u}=G0({id:String(e.seq),disabled:l});return He(Er,{task:e,statusOptions:t,isMine:o,avatarSrcByName:n,showManagerAvatar:!0,wrapTitle:!0,onOpenDetail:f=>r?.(f),onContextMenu:i,showCheckbox:!0,onRequestToggleCompleted:a,isDragging:u,setNodeRef:c,dragProps:l?void 0:{...s,...m,style:{transform:Y0.Translate.toString(p),transition:d}}})}function eB({dayKey:e,isToday:t,dayLabel:o,holidayName:n,tasks:r,googleEvents:i,onGoogleEventClick:a,statusOptions:l,onRequestArchiveToggle:s,onRequestReply:m,onAddSchedule:c,canAdd:p,onCardClick:d,onCardContextMenu:u,summary:f,myAccountSeq:g,avatarSrcByName:v,dragDisabled:D=!1}){let b=xe(),{setNodeRef:S}=$0({id:`${ss}${e}`,disabled:D});return jn(Lt,{ref:S,sx:{minWidth:0,minHeight:0,height:"100%",display:"flex",flexDirection:"column",bgcolor:t?b.calendar.todayBg:b.calendar.cellBg},children:[jn(Lt,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center",gap:.5,px:1,height:Kp,bgcolor:t?b.calendar.todayBg:b.calendar.dateBandBg,borderBottom:`1px solid ${b.calendar.borderColor}`,flexShrink:0},children:[n?He(Lt,{component:"span",sx:{mr:"auto",fontSize:11.5,fontWeight:600,color:b.colors.danger,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:n}):null,t?He(Lt,{component:"span",sx:{mr:.75,px:.6,py:.1,borderRadius:.5,fontSize:11,fontWeight:600,bgcolor:b.colors.danger,color:b.calendar.cellBg,lineHeight:1.6},children:"\uC624\uB298"}):null,He(Lt,{component:"span",sx:{fontSize:13.5,fontWeight:t?700:400,color:n?b.colors.danger:b.mode==="dark"?b.colors.textStrong:b.colors.textPrimary,flexShrink:0},children:o})]}),f?He(Lt,{sx:{px:1,py:1,borderBottom:`1px solid ${b.calendar.borderColor}`,flexShrink:0},children:f}):null,He(Lt,{sx:{flex:1,minHeight:0,bgcolor:t?b.calendar.todayBg:b.colors.surfaceSubtle},children:He(j0,{style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:jn(Lt,{sx:{display:"flex",flexDirection:"column",flexGrow:1},children:[i.length>0?He(Lt,{sx:{display:"flex",flexDirection:"column",gap:.5,px:1,pt:.75,pb:.25},children:i.map(h=>He(Di,{event:h,onClick:a},h.uid))}):null,He(V0,{items:r.map(h=>String(h.seq)),strategy:K0,children:He(Lt,{sx:{display:"flex",flexDirection:"column",gap:.5,px:1,pt:r.length>0?.75:0},children:r.map(h=>He(J0,{task:h,statusOptions:l,isMine:g>0&&Number(h.manager_account_seq??0)===g,avatarSrcByName:v,onCardClick:d,onCardContextMenu:u,onRequestArchiveToggle:s,dragDisabled:D},h.seq))})}),He(Lt,{sx:{flexGrow:1,minHeight:56,display:"flex",flexDirection:"column",pb:1,...p?{"&:hover .taskbox-add-schedule":{opacity:1,pointerEvents:"auto"}}:{}},children:jn(Gp,{className:"taskbox-add-schedule",onClick:()=>c(e),sx:{display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,px:1.25,py:1.75,borderBottom:`1px dashed ${b.calendar.borderColor}`,bgcolor:b.calendar.cellBg,color:b.colors.accentOnSurface,fontSize:13,fontWeight:500,opacity:0,pointerEvents:"none",transition:"opacity 0.15s","&:hover":{bgcolor:b.calendar.hoverBg}},children:[He(R0,{sx:{fontSize:16}}),"\uC5C5\uBB34 \uB4F1\uB85D"]})})]})})})]})}function Yp({tasks:e,googleEvents:t=[],onGoogleEventClick:o,statusOptions:n,fallbackToStartDate:r=!1,myAccountSeq:i=0,avatarSrcByName:a,todayStr:l,onToggleCompleted:s,onMoveTask:m,onRequestReply:c,onAddSchedule:p,canAdd:d=!0,disableDrag:u=!1,onOpenDetail:f,onTaskContextMenu:g,hideCompleted:v=!1,renderColumnSummary:D}){let b=xe(),[S,h]=Ia(()=>Mm(new Date)),[E,y]=Ia(null),{onReturnTask:T}=ue(),I=E?e.find(j=>j.seq===E.taskSeq):void 0,[A,q]=Ia(null),[C,k]=Ia(null),[x,B]=Ia(null),w=Vp(!1),P=va(()=>Array.from({length:7},(j,ne)=>ls(S,ne)),[S]),H=va(()=>new Map(e.map(j=>[j.seq,j])),[e]),_=va(()=>[...new Set(P.map(j=>j.getFullYear()))],[P]),N=Bn(_),G=W0(H0(L0,{activationConstraint:{distance:5}})),Q=Yn(j=>{let ne=N0(j),he=ne.length>0?ne:F0(j),Ce=he.filter(_e=>!String(_e.id).startsWith(ss));return Ce.length>0?Ce:he},[]),se=va(()=>Ii(t),[t]),me=va(()=>{let j=new Map;for(let ne of e){let he=ne.due_date.slice(0,10)||(r?ne.start_date.slice(0,10)||String(ne.created_time??"").slice(0,10):"");if(!he)continue;let Ce=j.get(he);Ce?Ce.push(ne):j.set(he,[ne])}for(let ne of j.values())ne.sort(wi);return j},[e,r]),Y=Yn(j=>C?(C.get(j)??[]).map(ne=>H.get(ne)).filter(ne=>!!ne):me.get(j)??[],[C,H,me]),O=Yn(j=>{let ne=Y(j);return v?ne.filter(he=>!he.completed):ne},[Y,v]),oe=Yn(j=>{B(Number(j.active.id)),k(new Map(P.map(ne=>{let he=Bt(ne);return[he,(me.get(he)??[]).map(Ce=>Ce.seq)]})))},[P,me]),F=Yn((j,ne)=>{if(j.startsWith(ss))return{day:j.slice(ss.length),overSeq:null};let he=Number(j);for(let[Ce,_e]of ne)if(_e.includes(he))return{day:Ce,overSeq:he};return null},[]),W=Yn(j=>{let{active:ne,over:he}=j;he&&k(Ce=>{if(!Ce)return Ce;let _e=Number(ne.id),Le=F(String(he.id),Ce);if(!Le)return Ce;let ct=[...Ce.entries()].find(([,K])=>K.includes(_e))?.[0];if(!ct||ct===Le.day)return Ce;let Ge=new Map(Ce);Ge.set(ct,(Ge.get(ct)??[]).filter(K=>K!==_e));let Pe=[...Ge.get(Le.day)??[]],Ne=Pe.length;if(Le.overSeq!==null){let K=Pe.indexOf(Le.overSeq);K!==-1&&(Ne=K)}return Pe.splice(Ne,0,_e),Ge.set(Le.day,Pe),Ge})},[F]),V=Yn(j=>{let{active:ne,over:he}=j,Ce=C;if(k(null),B(null),w.current=!0,!Ce||!he)return;let _e=Number(ne.id),Le=[...Ce.entries()].find(([,K])=>K.includes(_e));if(!Le)return;let[ct,Ge]=Le,Pe=[...Ge],Ne=F(String(he.id),Ce);if(Ne&&Ne.day===ct&&Ne.overSeq!==null&&Ne.overSeq!==_e){let K=Pe.indexOf(_e),ae=Pe.indexOf(Ne.overSeq);K!==-1&&ae!==-1&&(Pe=U0(Pe,K,ae))}m(_e,ct,Pe)},[C,m,F]),U=Yn(()=>{k(null),B(null),w.current=!0},[]),de=Yn(j=>{if(w.current){w.current=!1;return}f(j)},[f]),re=x!==null?H.get(x)??null:null,Te=Vp(null);return jn(Lt,{onTouchStart:j=>{let ne=j.touches[0];Te.current=ne?{x:ne.clientX,y:ne.clientY}:null},onTouchEnd:j=>{let ne=Te.current;Te.current=null;let he=j.changedTouches[0];if(!ne||!he||x!==null)return;let Ce=he.clientX-ne.x,_e=he.clientY-ne.y;Math.abs(Ce)<60||Math.abs(Ce)<=Math.abs(_e)||h(ls(S,Ce<0?7:-7))},sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0,border:`1px solid ${b.calendar.borderColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden"},children:[jn(Lt,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1,bgcolor:b.calendar.bg,borderBottom:`1px solid ${b.calendar.borderColor}`,flexShrink:0},children:[jn(Lt,{sx:{display:"flex",alignItems:"center",gap:.25},children:[He(Up,{size:"small","aria-label":"\uC774\uC804 \uC8FC",onClick:()=>h(ls(S,-7)),children:He(M0,{sx:{fontSize:24,color:b.colors.textSecondary}})}),He(E0,{size:"small",color:"inherit",onClick:()=>h(Mm(new Date)),sx:{minWidth:0,px:1,mx:1,fontSize:15.5,fontWeight:b.mode==="dark"?400:500,color:b.mode==="dark"?b.colors.textStrong:b.colors.textPrimary},children:"\uC624\uB298"}),He(Up,{size:"small","aria-label":"\uB2E4\uC74C \uC8FC",onClick:()=>h(ls(S,7)),children:He(P0,{sx:{fontSize:24,color:b.colors.textSecondary}})})]}),jn(Gp,{onClick:j=>q(j.currentTarget),sx:{ml:{xs:"auto",lg:0},display:"inline-flex",alignItems:"center",gap:.25,px:.75,py:.25,borderRadius:1,fontSize:15,fontWeight:b.mode==="dark"?400:700,color:b.mode==="dark"?b.colors.textStrong:b.colors.textPrimary,"&:hover":{bgcolor:b.colors.surfaceHover}},children:[Q0(P),He(O0,{sx:{fontSize:18,color:b.colors.textMuted}})]})]}),He(Lt,{sx:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",bgcolor:b.calendar.headerBg,borderBottom:`1px solid ${b.calendar.borderColor}`,flexShrink:0,"& > *":{borderRight:`1px solid ${b.calendar.borderColor}`},"& > *:last-child":{borderRight:"none"}},children:P.map(j=>{let ne=j.getDay(),he=N.has(Bt(j));return He(Lt,{sx:{height:Kp,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12.5,color:ne===0||he?b.colors.danger:ne===6?b.colors.accentOnSurface:b.colors.textSecondary},children:X0[ne]},Bt(j))})}),He(Lt,{sx:{flex:1,minHeight:0},children:jn(z0,{sensors:G,collisionDetection:Q,onDragStart:oe,onDragOver:W,onDragEnd:V,onDragCancel:U,children:[He(Lt,{sx:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",height:"100%",minHeight:0,"& > *":{borderRight:`1px solid ${b.calendar.borderColor}`},"& > *:last-child":{borderRight:"none"}},children:P.map(j=>{let ne=Bt(j);return He(eB,{dayKey:ne,isToday:ne===l,dayLabel:Z0(j),holidayName:N.get(ne)??"",summary:D?.(ne,Y(ne)),tasks:O(ne),googleEvents:se.get(ne)??[],onGoogleEventClick:o,statusOptions:n,onRequestArchiveToggle:y,onRequestReply:c,onAddSchedule:p,canAdd:d,onCardClick:de,onCardContextMenu:g,myAccountSeq:i,avatarSrcByName:a,dragDisabled:u},ne)})}),He(A0,{children:re?He(Lt,{sx:{boxShadow:"0 8px 20px rgba(0,0,0,0.18)",borderRadius:.75,cursor:"grabbing"},children:He(Er,{task:re,statusOptions:n,onOpenDetail:()=>{},isMine:i>0&&Number(re.manager_account_seq??0)===i})}):null})]})}),He(q0,{anchorEl:A,open:!!A,onClose:()=>q(null),selectedDate:S,onDateChange:j=>{h(Mm(j)),q(null)}}),He(_o,{open:!!E,anchorEl:E?.anchorEl??null,nextCompleted:E?.nextCompleted??!1,returnMode:!!T&&!!(I&&Qt(I,i)),onCancel:()=>y(null),onConfirm:j=>{E&&(j&&T&&I?T(I,j):s(E.taskSeq,E.nextCompleted)),y(null)}})]})}import{useCallback as _a,useMemo as ti,useRef as tB,useState as wa}from"react";import{Box as xo,Button as oB,ButtonBase as Xp,IconButton as jp,Tooltip as nB}from"@mui/material";import rB from"@mui/icons-material/Add";import iB from"@mui/icons-material/ChevronLeft";import aB from"@mui/icons-material/ChevronRight";import lB from"@mui/icons-material/KeyboardArrowDown";import{DatePicker as sB}from"@ehfuse/mui-datetime-picker";import{DndContext as cB,DragOverlay as mB,PointerSensor as uB,pointerWithin as dB,rectIntersection as pB,useDraggable as fB,useDroppable as Qp,useSensor as gB,useSensors as xB}from"@dnd-kit/core";import bB from"@ehfuse/overlay-scrollbar";import{ConfirmActionPopper as hB}from"@ehfuse/mui-confirm-action";import{jsx as et,jsxs as Xn}from"react/jsx-runtime";var kB=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"],cs="mday-",ms="mchip-",Zp=36;function TB(e){let t=new Date(e);return t.setHours(0,0,0,0),t.setDate(t.getDate()-t.getDay()),t}function us(e){let t=new Date(e);return t.setHours(0,0,0,0),t.setDate(1),t}function yB(e,t){let o=new Date(e);return o.setDate(o.getDate()+t),o}function Pm(e,t){let o=us(e);return o.setMonth(o.getMonth()+t),o}function SB({task:e,statusOptions:t,isPreview:o=!1,isMine:n=!1,avatarSrcByName:r,onOpenDetail:i,onContextMenu:a,onRequestToggleCompleted:l,dragDisabled:s=!1}){let{attributes:m,listeners:c,setNodeRef:p,isDragging:d}=fB({id:String(e.seq),disabled:o||s}),{setNodeRef:u}=Qp({id:`${ms}${e.seq}`,disabled:o||s});return et(nB,{title:e.title,arrow:!0,enterDelay:400,children:et(Er,{task:e,statusOptions:t,onOpenDetail:i,onContextMenu:a,showCheckbox:!!l,onRequestToggleCompleted:l,isPreview:o,isDragging:d,isMine:n,avatarSrcByName:r,showManagerAvatar:!0,wrapTitle:!0,setNodeRef:f=>{p(f),u(f)},dragProps:s?void 0:{...m,...c}})})}function CB({dayKey:e,dayNumber:t,isToday:o,isOtherMonth:n,weekday:r,holidayName:i,tasks:a,googleEvents:l,onGoogleEventClick:s,statusOptions:m,previewSeq:c,myAccountSeq:p,avatarSrcByName:d,onRequestToggleCompleted:u,onOpenDetail:f,onTaskContextMenu:g,onAddSchedule:v,canAdd:D,dragDisabled:b=!1}){let S=xe(),h=S.mode==="dark",{setNodeRef:E,isOver:y}=Qp({id:`${cs}${e}`,disabled:b}),T=a,I=!!i||r===0;return Xn(xo,{ref:E,sx:{minWidth:0,minHeight:0,display:"flex",flexDirection:"column",gap:.5,p:.5,bgcolor:y?S.colors.accentSoft:o?S.calendar.todayBg:n?S.calendar.otherMonthBg:S.calendar.cellBg,transition:"background-color 0.15s",overflow:"hidden",...D?{"&:hover .taskbox-month-add":{opacity:1,pointerEvents:"auto"}}:{}},children:[Xn(xo,{sx:{display:"flex",alignItems:"center",justifyContent:"flex-end",gap:.5,height:Zp,flexShrink:0,mx:-.5,mt:-.5,px:1,bgcolor:o?S.calendar.todayBg:S.calendar.dateBandBg,borderBottom:`1px solid ${S.calendar.borderColor}`},children:[i?et(xo,{component:"span",sx:{mr:.25,minWidth:0,fontSize:11,fontWeight:600,color:S.colors.danger,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:i}):null,o?et(xo,{component:"span",sx:{px:.5,borderRadius:.5,fontSize:10.5,fontWeight:600,bgcolor:S.colors.danger,color:S.calendar.cellBg,lineHeight:1.6},children:"\uC624\uB298"}):null,et(xo,{component:"span",sx:{fontSize:13.5,fontWeight:o?700:400,color:n?S.colors.textMuted:I?S.colors.danger:r===6?S.colors.accentOnSurface:h?S.colors.textStrong:S.colors.textPrimary,flexShrink:0},children:t})]}),l.map(A=>et(Di,{event:A,small:!0,onClick:s},A.uid)),T.map(A=>et(SB,{task:A,statusOptions:m,isPreview:A.seq===c,isMine:p>0&&Number(A.manager_account_seq??0)===p,avatarSrcByName:d,onRequestToggleCompleted:u,onOpenDetail:f,onContextMenu:g,dragDisabled:b},A.seq)),et(xo,{sx:{flexGrow:1,minHeight:0,display:"flex",alignItems:"flex-start"},children:Xn(Xp,{className:"taskbox-month-add",onClick:()=>v(e),sx:{width:"100%",display:"flex",alignItems:"center",justifyContent:"flex-start",gap:.5,px:1.25,py:.75,borderBottom:`1px dashed ${S.calendar.borderColor}`,bgcolor:S.calendar.cellBg,color:S.colors.accentOnSurface,fontSize:13,fontWeight:500,opacity:0,pointerEvents:"none",transition:"opacity 0.15s","&:hover":{bgcolor:S.calendar.hoverBg}},children:[et(rB,{sx:{fontSize:16}}),"\uC5C5\uBB34 \uB4F1\uB85D"]})})]})}function Jp({tasks:e,googleEvents:t=[],onGoogleEventClick:o,statusOptions:n,fallbackToStartDate:r=!1,myAccountSeq:i=0,avatarSrcByName:a,onToggleCompleted:l,todayStr:s,onMoveTask:m,onAddSchedule:c,canAdd:p=!0,disableDrag:d=!1,onOpenDetail:u,onTaskContextMenu:f}){let g=xe(),v=g.mode==="dark",[D,b]=wa(()=>us(new Date)),[S,h]=wa(null),[E,y]=wa(null),[T,I]=wa(null),[A,q]=wa(null),C=ti(()=>{let V=TB(D);return Array.from({length:42},(U,de)=>yB(V,de))},[D]),k=ti(()=>new Map(e.map(V=>[V.seq,V])),[e]),x=ti(()=>Ii(t),[t]),B=ti(()=>[...new Set(C.map(V=>V.getFullYear()))],[C]),w=Bn(B),P=ti(()=>{let V=new Map;for(let U of e){let de=U.due_date.slice(0,10)||(r?U.start_date.slice(0,10)||String(U.created_time??"").slice(0,10):"");if(!de)continue;let re=V.get(de);re?re.push(U):V.set(de,[U])}for(let U of V.values())U.sort(wi);return V},[e,r]),H=xB(gB(uB,{activationConstraint:{distance:5}})),_=_a(V=>{let U=dB(V),de=U.length>0?U:pB(V),re=de.filter(Te=>String(Te.id).startsWith(ms));return re.length>0?re:de.filter(Te=>String(Te.id).startsWith(cs))},[]),N=_a(V=>{I(Number(V.active.id))},[]),G=_a(V=>{q(V.over?String(V.over.id):null)},[]),Q=ti(()=>{let V=new Map;for(let[U,de]of P)for(let re of de)V.set(re.seq,U);return V},[P]),se=T!==null?k.get(T)?.due_date.slice(0,10)??"":"",me=ti(()=>{if(T===null||!A)return null;if(A.startsWith(ms)){let V=Number(A.slice(ms.length)),U=Q.get(V);if(!U)return null;let de=(P.get(U)??[]).filter(Te=>Te.seq!==T),re=de.findIndex(Te=>Te.seq===V);return{day:U,index:re===-1?de.length:re}}if(A.startsWith(cs)){let V=A.slice(cs.length),U=(P.get(V)??[]).filter(de=>de.seq!==T);return{day:V,index:U.length}}return null},[T,Q,A,P]),Y=_a(V=>{let U=P.get(V)??[];if(T===null||!me)return U;let de=k.get(T);if(!de)return U;let re=U.filter(Te=>Te.seq!==T);return V===me.day?[...re.slice(0,me.index),de,...re.slice(me.index)]:V===se?re:U},[T,se,me,k,P]),O=_a(V=>{let U=T,de=me;if(I(null),q(null),U===null||!de)return;let re=(P.get(de.day)??[]).filter(j=>j.seq!==U),Te=[...re.slice(0,de.index).map(j=>j.seq),U,...re.slice(de.index).map(j=>j.seq)];m(U,de.day,Te)},[T,me,m,P]),oe=T!==null?k.get(T)??null:null,F=`${D.getFullYear()}\uB144 ${D.getMonth()+1}\uC6D4`,W=tB(null);return Xn(xo,{onTouchStart:V=>{let U=V.touches[0];W.current=U?{x:U.clientX,y:U.clientY}:null},onTouchEnd:V=>{let U=W.current;W.current=null;let de=V.changedTouches[0];if(!U||!de||T!==null)return;let re=de.clientX-U.x,Te=de.clientY-U.y;Math.abs(re)<60||Math.abs(re)<=Math.abs(Te)||b(Pm(D,re<0?1:-1))},sx:{display:"flex",flexDirection:"column",flex:1,minHeight:0,border:`1px solid ${g.calendar.borderColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden"},children:[Xn(xo,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1,bgcolor:g.calendar.bg,borderBottom:`1px solid ${g.calendar.borderColor}`,flexShrink:0},children:[Xn(xo,{sx:{display:"flex",alignItems:"center",gap:.25},children:[et(jp,{size:"small","aria-label":"\uC774\uC804 \uB2EC",onClick:()=>b(Pm(D,-1)),children:et(iB,{sx:{fontSize:24,color:g.colors.textSecondary}})}),et(oB,{size:"small",color:"inherit",onClick:()=>b(us(new Date)),sx:{minWidth:0,px:1,mx:1,fontSize:15.5,fontWeight:g.mode==="dark"?400:500,color:g.mode==="dark"?g.colors.textStrong:g.colors.textPrimary},children:"\uC624\uB298"}),et(jp,{size:"small","aria-label":"\uB2E4\uC74C \uB2EC",onClick:()=>b(Pm(D,1)),children:et(aB,{sx:{fontSize:24,color:g.colors.textSecondary}})})]}),Xn(Xp,{onClick:V=>h(V.currentTarget),sx:{display:"inline-flex",alignItems:"center",gap:.25,ml:{xs:"auto",lg:0},px:.75,py:.25,borderRadius:1,fontSize:15,fontWeight:g.mode==="dark"?400:700,color:g.mode==="dark"?g.colors.textStrong:g.colors.textPrimary,"&:hover":{bgcolor:g.colors.surfaceHover}},children:[F,et(lB,{sx:{fontSize:18,color:g.colors.textMuted}})]})]}),et(xo,{sx:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",bgcolor:g.calendar.headerBg,borderBottom:`1px solid ${g.calendar.borderColor}`,flexShrink:0,"& > *":{borderRight:`1px solid ${g.calendar.borderColor}`},"& > *:last-child":{borderRight:"none"}},children:kB.map((V,U)=>et(xo,{sx:{height:Zp,display:"flex",alignItems:"center",justifyContent:"center",fontSize:12.5,color:U===0?g.colors.danger:U===6?g.colors.accentOnSurface:g.colors.textSecondary},children:V},V))}),et(xo,{sx:{flex:1,minHeight:0},children:Xn(cB,{sensors:H,collisionDetection:_,onDragStart:N,onDragOver:G,onDragEnd:O,onDragCancel:()=>{I(null),q(null)},children:[et(bB,{style:{height:"100%"},thumb:{width:8},children:et(xo,{sx:{display:"grid",gridTemplateColumns:"repeat(7, minmax(0, 1fr))",gridTemplateRows:"repeat(6, minmax(112px, auto))",minHeight:"100%",flexShrink:0,"& > *":{borderRight:`1px solid ${g.calendar.borderColor}`,borderBottom:`1px solid ${g.calendar.borderColor}`},"& > *:nth-of-type(7n)":{borderRight:"none"},"& > *:nth-last-of-type(-n+7)":{borderBottom:"none"}},children:C.map(V=>{let U=Bt(V);return et(CB,{dayKey:U,dayNumber:V.getDate(),isToday:U===s,isOtherMonth:V.getMonth()!==D.getMonth(),weekday:V.getDay(),holidayName:w.get(U)??"",tasks:Y(U),googleEvents:x.get(U)??[],onGoogleEventClick:o,statusOptions:n,previewSeq:me?.day===U?T:null,myAccountSeq:i,avatarSrcByName:a,onRequestToggleCompleted:l?y:void 0,onOpenDetail:u,onTaskContextMenu:f,onAddSchedule:c,canAdd:p,dragDisabled:d},U)})})}),et(mB,{children:oe?Xn(xo,{sx:{display:"flex",alignItems:"center",gap:.5,py:.6,px:.75,borderRadius:.75,bgcolor:g.calendar.cellBg,border:`1px solid ${g.calendar.borderColor}`,boxShadow:"0 6px 16px rgba(0,0,0,0.18)",fontSize:Ei,fontWeight:500,color:g.colors.textPrimary,cursor:"grabbing",whiteSpace:"nowrap"},children:[et(xo,{component:"span",sx:{width:6,height:6,borderRadius:"50%",bgcolor:Rm[oe.priority]}}),oe.title]}):null})]})}),et(hB,{open:!!E,anchorEl:E?.anchorEl??null,title:E?.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:E?.nextCompleted?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>y(null),onConfirm:()=>{E&&l?.(E.taskSeq,E.nextCompleted),y(null)}}),et(sB,{anchorEl:S,open:!!S,onClose:()=>h(null),selectedDate:D,onDateChange:V=>{b(us(V)),h(null)}})]})}import{useEffect as wB,useMemo as Da,useRef as qm,useState as of}from"react";import{Box as ro,Button as DB,IconButton as nf,useMediaQuery as EB}from"@mui/material";import RB from"@mui/icons-material/ChevronLeft";import MB from"@mui/icons-material/ChevronRight";import PB from"@mui/icons-material/KeyboardArrowDown";import{DatePicker as OB}from"@ehfuse/mui-datetime-picker";import{Box as Qn,Button as BB,Dialog as vB}from"@mui/material";import{jsx as Zn,jsxs as Om}from"react/jsx-runtime";function ef({controller:e,avatarSrcByName:t}){let o=xe(),n=e.modals.members,r=e.ui.useValue("task"),i=r?[{label:"\uCC45\uC784\uC790",names:[String(r.manager_name??"").trim()]},{label:"\uCC38\uC870\uC790",names:r.receiver_names??[]},{label:"\uC791\uC131\uC790",names:[String(r.created_by??"").trim()]}]:[];return Zn(vB,{open:n.isOpen,onClose:n.close,maxWidth:"xs",fullWidth:!0,slotProps:{paper:{sx:{borderRadius:2,m:2}}},children:r?Om(Qn,{sx:{p:2,display:"flex",flexDirection:"column",gap:1.5,bgcolor:o.colors.surface},children:[Zn(Qn,{sx:{fontSize:15.5,fontWeight:600,color:o.colors.textStrong,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:r.title}),i.map(a=>{let l=a.names.filter(s=>!!s);return Om(Qn,{sx:{display:"flex",alignItems:"flex-start",gap:1.5},children:[Zn(Qn,{sx:{width:56,flexShrink:0,fontSize:13.5,color:o.colors.textSecondary,pt:.5},children:a.label}),Zn(Qn,{sx:{display:"flex",flexWrap:"wrap",gap:1,minWidth:0},children:l.length===0?Zn(Qn,{sx:{fontSize:14,color:o.colors.textMuted,pt:.5},children:"\uBE44\uC5B4 \uC788\uC74C"}):l.map(s=>Om(Qn,{sx:{display:"flex",alignItems:"center",gap:.75},children:[Zn(Vo,{src:t?.get(s)??"",name:s,avatarSx:{width:26,height:26,fontSize:12},iconFontSize:16}),Zn(Qn,{sx:{fontSize:14.5,color:o.colors.textPrimary},children:s})]},`${a.label}-${s}`))})]},a.label)}),Zn(Qn,{sx:{display:"flex",justifyContent:"flex-end",pt:.5},children:Zn(BB,{size:"small",color:"inherit",onClick:n.close,children:"\uB2EB\uAE30"})})]}):null})}import{useFormaState as IB,useModal as _B}from"@ehfuse/forma";function tf(){let e={members:_B({modalId:we("taskbox-task-members")})},t=IB({task:null});return{modals:e,ui:t,openDialog:n=>{t.setValue("task",n),e.members.open()}}}import{jsx as Kt,jsxs as Mn}from"react/jsx-runtime";var qB=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"];function rf(e){let t=e?.parentElement??null;for(;t;){let o=window.getComputedStyle(t);if(/(auto|scroll)/.test(o.overflowY)&&t.scrollHeight>t.clientHeight)return t;t=t.parentElement}return null}var zB="(min-width:600px)";function zm(e){let t=new Date(e);return t.setHours(0,0,0,0),t.setDate(1),t}function af(e){let t=o=>String(o).padStart(2,"0");return`${e.getFullYear()}-${t(e.getMonth()+1)}-${t(e.getDate())}`}function lf({tasks:e,googleEvents:t=[],onGoogleEventClick:o,statusOptions:n,todayStr:r,onOpenDetail:i,onAddSchedule:a,myAccountSeq:l=0,avatarSrcByName:s,fallbackToStartDate:m=!1}){let c=xe(),p=EB(zB),[d,u]=of(()=>zm(new Date)),[f,g]=of(!1),v=Da(()=>{let k=new Date(d.getFullYear(),d.getMonth()+1,0).getDate();return Array.from({length:k},(x,B)=>{let w=new Date(d.getFullYear(),d.getMonth(),B+1);return{ymd:af(w),dayNumber:B+1,weekday:w.getDay()}})},[d]),D=Da(()=>{let k=new Map;for(let x of e){let B=x.due_date.slice(0,10)||(m?x.start_date.slice(0,10)||String(x.created_time??"").slice(0,10):"");if(!B)continue;let w=k.get(B);w?w.push(x):k.set(B,[x])}for(let x of k.values())x.sort(wi);return k},[e,m]),b=Da(()=>m?e.filter(k=>!k.due_date.slice(0,10)&&!k.start_date.slice(0,10)&&!String(k.created_time??"").slice(0,10)).sort((k,x)=>k.completed!==x.completed?k.completed?1:-1:k.seq-x.seq):[],[e,m]),S=tf(),h=Da(()=>Ii(t),[t]),E=Da(()=>[d.getFullYear()],[d]),y=Bn(E),T=qm(null),I=r.slice(0,7)===af(d).slice(0,7);wB(()=>{if(!I)return;let k=()=>{let w=T.current,P=rf(w);if(!P||!w)return;let H=w.getBoundingClientRect().top-P.getBoundingClientRect().top+P.scrollTop;P.scrollTop=Math.max(0,H-P.clientHeight/2+w.clientHeight/2)},x=setTimeout(k,100),B=setTimeout(k,400);return()=>{clearTimeout(x),clearTimeout(B)}},[I,d]);let A=qm(null),q=qm(null),C=k=>{u(B=>new Date(B.getFullYear(),B.getMonth()+k,1));let x=rf(A.current);x&&x.scrollTo({top:0,behavior:"auto"})};return Mn(ro,{ref:A,onTouchStart:k=>{let x=k.touches[0];q.current=x?{x:x.clientX,y:x.clientY}:null},onTouchEnd:k=>{let x=q.current;q.current=null;let B=k.changedTouches[0];if(!x||!B)return;let w=B.clientX-x.x,P=B.clientY-x.y;Math.abs(w)<60||Math.abs(w)<=Math.abs(P)||C(w<0?1:-1)},sx:{minWidth:0,maxWidth:"100%",overflow:"hidden",bgcolor:c.colors.surface},children:[Mn(ro,{sx:{display:"flex",alignItems:"center",gap:.5,px:1.5,py:1,flexShrink:0},children:[Kt(nf,{size:"small","aria-label":"\uC774\uC804 \uB2EC",onClick:()=>C(-1),children:Kt(RB,{sx:{fontSize:24,color:c.colors.textSecondary}})}),Kt(DB,{size:"small",color:"inherit",onClick:()=>u(zm(new Date)),sx:{minWidth:0,px:1,fontSize:15.5,color:c.mode==="dark"?c.colors.textStrong:c.colors.textPrimary},children:"\uC624\uB298"}),Kt(nf,{size:"small","aria-label":"\uB2E4\uC74C \uB2EC",onClick:()=>C(1),children:Kt(MB,{sx:{fontSize:24,color:c.colors.textSecondary}})}),Mn(ro,{onClick:()=>g(!0),sx:{ml:"auto",pr:.5,display:"flex",alignItems:"center",gap:.25,fontSize:16.5,fontWeight:c.mode==="dark"?400:700,color:c.mode==="dark"?c.colors.textStrong:c.colors.textPrimary,cursor:"pointer"},children:[d.getFullYear(),"\uB144 ",d.getMonth()+1,"\uC6D4",Kt(PB,{sx:{fontSize:20,color:c.colors.textMuted}})]})]}),Mn(ro,{sx:{minWidth:0,overflowX:"hidden",borderTop:`1px solid ${c.calendar.borderColor}`},children:[b.length>0?Mn(ro,{sx:{display:"flex",alignItems:"center",gap:1,px:1,py:.75,minWidth:0,maxWidth:"100%",flexShrink:0,borderBottom:`1px solid ${c.calendar.borderColor}`},children:[Mn(ro,{sx:{width:52,flexShrink:0,fontSize:12.5,lineHeight:1.3,color:c.colors.textSecondary,textAlign:"center"},children:["\uB0A0\uC9DC",Kt("br",{}),"\uC5C6\uC74C"]}),Kt(ro,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:.5},children:b.map(k=>Kt(Er,{task:k,statusOptions:n,onOpenDetail:i,isMine:l>0&&Number(k.manager_account_seq??0)===l,avatarSrcByName:s,showManagerAvatar:!0,onOpenMembers:S.openDialog},k.seq))})]}):null,v.map(({ymd:k,dayNumber:x,weekday:B})=>{let w=y.get(k)??"",P=k===r,H=!!w||B===0,_=D.get(k)??[],N=h.get(k)??[],G=_.length>0||N.length>0;return Mn(ro,{ref:P?T:void 0,onClick:a?()=>a(k):void 0,sx:{display:"flex",alignItems:"center",gap:1,px:1,minWidth:0,maxWidth:"100%",py:G?.75:.5,minHeight:44,flexShrink:0,borderBottom:`1px solid ${c.calendar.borderColor}`,...a?{cursor:"pointer"}:{}},children:[Kt(ro,{sx:{width:52,flexShrink:0,display:"flex",flexDirection:"column",alignItems:"center",gap:.25},children:Mn(ro,{sx:{display:"flex",flexDirection:"column",alignItems:"center",gap:.25,"@media (min-width:600px)":{flexDirection:"row",gap:.75}},children:[Kt(ro,{component:"span",sx:{display:"inline-flex",alignItems:"center",justifyContent:"center",minWidth:40,height:32,borderRadius:1,px:1.25,fontSize:22,fontWeight:500,color:P?c.colors.surface:H?c.colors.danger:B===6?c.colors.accentOnSurface:c.colors.textPrimary,bgcolor:P?c.colors.accentOnSurface:"transparent"},children:x}),Kt(ro,{component:"span",sx:{fontSize:13,color:H?c.colors.danger:B===6?c.colors.accentOnSurface:c.colors.textSecondary},children:qB[B]})]})}),Mn(ro,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:"column",gap:.5},children:[N.map(Q=>Kt(Di,{event:Q,onClick:o},Q.uid)),_.map(Q=>{let se=_i(Q),me=Kt(Er,{task:Q,statusOptions:n,onOpenDetail:i,isMine:l>0&&Number(Q.manager_account_seq??0)===l,avatarSrcByName:s,showManagerAvatar:!0,onOpenMembers:S.openDialog,showTime:!p,wrapTitle:!0},Q.seq);return p?Mn(ro,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[Kt(ro,{component:"span",sx:{width:44,flexShrink:0,textAlign:"right",fontSize:13.5,fontWeight:400,opacity:1,color:se?Q.completed?c.colors.textPrimary:c.colors.danger:"transparent"},children:se||"00:00"}),Kt(ro,{sx:{flex:1,minWidth:0},children:me})]},Q.seq):me})]})]},k)})]}),Kt(ef,{controller:S,avatarSrcByName:s}),Kt(OB,{open:f,centered:!0,monthOnly:!0,onClose:()=>g(!1),selectedDate:d,onDateChange:k=>{u(zm(k)),g(!1)}})]})}import{useCallback as sf,useEffect as cf,useMemo as Am,useRef as ps,useState as Ea}from"react";import{Box as It,Tooltip as df}from"@mui/material";import AB from"@ehfuse/overlay-scrollbar";import LB from"@mui/icons-material/CheckCircle";import NB from"@mui/icons-material/RadioButtonUnchecked";import{DndContext as FB,PointerSensor as $B,closestCenter as HB,useSensor as WB,useSensors as VB}from"@dnd-kit/core";import{SortableContext as UB,arrayMove as GB,useSortable as KB,verticalListSortingStrategy as YB}from"@dnd-kit/sortable";import{ConfirmActionPopper as jB}from"@ehfuse/mui-confirm-action";import XB from"@mui/icons-material/DragIndicator";import{jsx as mt,jsxs as Jn}from"react/jsx-runtime";var Lm=36,QB=48,mf=40,ZB=24,JB=4,ev=14,uf=36,tv=12.5,Ri=220,ov={high:{bg:"#f6c6c9",border:"#e5484d"},medium:{bg:"#c5d8f6",border:"#2f80ed"},low:{bg:"#f3e3b6",border:"#d9a514"}};function oi(e){let t=String(e??"").trim();if(!t)return null;let o=new Date(`${t}T00:00:00`);return Number.isNaN(o.getTime())?null:o}function ds(e,t){let o=new Date(e);return o.setDate(o.getDate()+t),o}function Nm(e,t){return Math.round((t.getTime()-e.getTime())/864e5)}function nv({task:e,dragHandle:t,onPointerDown:o,onClick:n}){let r=xe(),i=ps(null),[a,l]=Ea("");return mt(df,{title:a,arrow:!0,enterDelay:300,children:Jn(It,{onPointerDown:o,onClick:s=>n(e,s),onMouseEnter:()=>{let s=i.current;l(s&&s.scrollWidth>s.clientWidth?e.title:"")},sx:{width:Ri,flexShrink:0,position:"sticky",left:0,zIndex:2,bgcolor:r.timeline.bg,borderRight:`1px solid ${r.timeline.gridColor}`,display:"flex",alignItems:"center",gap:.5,pl:.5,pr:1.5,fontSize:15,fontWeight:r.mode==="dark"||e.completed?400:500,color:e.completed?r.colors.textMuted:r.mode==="dark"?r.colors.textStrong:r.colors.textPrimary,overflow:"hidden",whiteSpace:"nowrap",cursor:"pointer",textDecoration:e.completed?"line-through":"none","&:hover":{bgcolor:r.colors.surfaceHover}},children:[t,mt(It,{ref:i,component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.title})]})})}function rv({id:e,showIndicator:t,children:o}){let n=xe(),{attributes:r,listeners:i,setNodeRef:a}=KB({id:e});return Jn(It,{ref:a,sx:{position:"relative"},children:[t?mt(It,{sx:{position:"absolute",top:-1,left:0,right:0,height:2,bgcolor:n.colors.accentOnSurface,zIndex:5}}):null,o({...r,...i})]})}function pf({tasks:e,hideCompletedChecklist:t=!1,todayStr:o,onOpenDetail:n,onToggleChecklist:r,onReorderTasks:i,onTaskContextMenu:a}){let l=xe(),[s,m]=Ea(null),c=Am(()=>[...e].sort((P,H)=>{let _=(P.timeline_sort_no??0)>0,N=(H.timeline_sort_no??0)>0;if(_&&N)return(P.timeline_sort_no??0)-(H.timeline_sort_no??0);if(_!==N)return _?-1:1;let G=P.due_date||P.start_date,Q=H.due_date||H.start_date;return G!==Q?G<Q?-1:1:P.seq-H.seq}),[e]),[p,d]=Ea(null),[u,f]=Ea(null),g=VB(WB($B,{activationConstraint:{distance:4}})),v=sf(P=>{d(P.over?Number(P.over.id):null)},[]),D=sf(P=>{d(null),f(null);let{active:H,over:_}=P;if(!_||H.id===_.id)return;let N=c.map(se=>se.seq),G=N.indexOf(Number(H.id)),Q=N.indexOf(Number(_.id));G===-1||Q===-1||i(GB(N,G,Q))},[c,i]),b=Am(()=>{let P=oi(o)??new Date,H=P,_=ds(P,21);for(let Q of c){let se=oi(Q.start_date)??oi(Q.due_date),me=oi(Q.due_date)??se;se&&se<H&&(H=se),me&&me>_&&(_=me)}let N=ds(H,-3),G=Nm(N,ds(_,3))+1;return Array.from({length:G},(Q,se)=>ds(N,se))},[c,o]),S=b[0],h=b.findIndex(P=>Bt(P)===o),{dayWidths:E,dayOffsets:y,gridWidth:T}=Am(()=>{let P=b.map((N,G)=>N.getDate()===1||G===0?QB:Lm),H=[],_=0;for(let N of P)H.push(_),_+=N;return{dayWidths:P,dayOffsets:H,gridWidth:_}},[b]),I=Ri+T,A=ps(null),q=P=>{A.current={x:P.clientX,y:P.clientY}},C=(P,H)=>{let _=A.current;A.current=null,!(_&&(Math.abs(H.clientX-_.x)>5||Math.abs(H.clientY-_.y)>5))&&n(P)},k=ps(null),[x,B]=Ea(!1);cf(()=>{let P=k.current?.getScrollContainer();if(!P)return;let H=()=>B(P.scrollHeight>P.clientHeight);H();let _=new ResizeObserver(H);return _.observe(P),()=>_.disconnect()},[c.length]);let w=ps(!1);return cf(()=>{if(c.length===0||w.current)return;w.current=!0;let P=window.requestAnimationFrame(()=>{let H=k.current?.getScrollContainer();!H||h<0||(H.scrollLeft=Math.max(0,y[h]-Lm*3))});return()=>window.cancelAnimationFrame(P)},[c.length]),Jn(It,{sx:{flex:1,minHeight:0,minWidth:0,maxWidth:"100%",display:"flex",flexDirection:"column",border:`1px solid ${l.timeline.gridColor}`,borderRadius:"0 0 4px 4px",overflow:"hidden",bgcolor:l.timeline.headerBg},children:[mt(It,{sx:{flex:1,minHeight:0,minWidth:0,contain:"inline-size"},children:mt(AB,{ref:k,style:{height:"100%"},contentStyle:{width:"max-content",minWidth:"100%"},thumb:{width:8},showHorizontalScrollbar:!0,dragScroll:{excludeClasses:["taskbox-timeline-handle"]},children:Jn(It,{sx:{width:I,position:"relative",bgcolor:l.timeline.bg},children:[Jn(It,{sx:{display:"flex",position:"sticky",top:0,zIndex:3,bgcolor:l.timeline.headerBg,borderBottom:`1px solid ${l.timeline.gridColor}`},children:[mt(It,{sx:{width:Ri,height:uf,flexShrink:0,position:"sticky",left:0,zIndex:4,bgcolor:l.timeline.headerBg,borderRight:`1px solid ${l.timeline.gridColor}`,display:"flex",alignItems:"center",px:1.5,fontSize:13,color:l.colors.textSecondary},children:"\uC81C\uBAA9"}),b.map((P,H)=>{let _=P.getDay(),N=H===h,G=P.getDate()===1||H===0;return mt(It,{sx:{width:E[H],height:uf,flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",fontSize:tv,fontWeight:N&&l.mode!=="dark"?700:400,color:N?l.timeline.bg:_===0?l.colors.danger:_===6?l.colors.accentOnSurface:l.colors.textSecondary,bgcolor:N?l.colors.danger:"transparent",borderRight:`1px solid ${l.timeline.gridColor}`,whiteSpace:"nowrap"},children:G?`${P.getMonth()+1}/${P.getDate()}`:P.getDate()},Bt(P))})]}),mt(FB,{sensors:g,collisionDetection:HB,onDragStart:P=>f(Number(P.active.id)),onDragOver:v,onDragEnd:D,onDragCancel:()=>{d(null),f(null)},children:mt(UB,{items:c.map(P=>String(P.seq)),strategy:YB,children:Jn(It,{sx:{position:"relative"},children:[b.map((P,H)=>{let _=P.getDay(),N=H===h;return!N&&_!==0&&_!==6?null:mt(It,{sx:{position:"absolute",top:0,bottom:0,left:Ri+y[H],width:E[H],bgcolor:N?"rgba(229,72,77,0.07)":l.colors.surfaceSubtle,zIndex:0}},`stripe-${Bt(P)}`)}),c.map((P,H)=>{let _=oi(P.start_date)??oi(P.due_date),N=oi(P.due_date)??_,G=_?Math.min(b.length-1,Math.max(0,Nm(S,_))):0,Q=N?Math.min(b.length-1,Math.max(G,Nm(S,N))):G,se=ov[P.priority],me=Ri+y[G]+2,Y=y[Q]+E[Q]-y[G]-4,O=(P.checklist??[]).map((oe,F)=>({entry:oe,index:F})).filter(({entry:oe})=>!t||!oe.checked);return mt(rv,{id:String(P.seq),showIndicator:p===P.seq&&u!==P.seq,children:oe=>Jn(It,{sx:{borderBottom:H===c.length-1&&x?"none":`1px solid ${l.timeline.gridColor}`,position:"relative",zIndex:1,opacity:u===P.seq?.45:1},children:[Jn(It,{onContextMenu:F=>a(P,F),sx:{display:"flex",height:mf,position:"relative","&:hover":{bgcolor:"rgba(47,128,237,0.04)"}},children:[mt(nv,{task:P,dragHandle:mt(It,{component:"span",className:"taskbox-timeline-handle",...oe,onClick:F=>F.stopPropagation(),sx:{display:"inline-flex",alignItems:"center",flexShrink:0,color:l.colors.accentOnSurface,cursor:"grab",touchAction:"none","&:hover":{color:l.colors.accentOnSurface}},children:(()=>{let F=(P.is_notice||P.is_event?ze(P.icon||(P.is_notice?xt:Rt)):null)??XB;return mt(F,{sx:{fontSize:17}})})()}),onPointerDown:q,onClick:C}),mt(df,{title:`${P.title} (${P.start_date||"?"} ~ ${P.due_date||"?"})`,arrow:!0,enterDelay:300,children:mt(It,{onPointerDown:q,onClick:F=>C(P,F),sx:{position:"absolute",top:(mf-20)/2,left:me,width:Math.max(Lm-4,Y),height:20,borderRadius:1,bgcolor:se.bg,border:`1px solid ${se.border}`,opacity:P.completed?.45:1,cursor:"pointer","&:hover":{filter:"brightness(0.95)"}}})})]}),O.map(({entry:F,index:W},V)=>mt(It,{sx:{display:"flex",height:ZB,position:"relative",mt:V===0?`${JB}px`:0,mb:V===O.length-1?`${ev}px`:0},children:mt(It,{sx:{width:Ri,flexShrink:0,position:"sticky",left:0,zIndex:2,bgcolor:l.timeline.bg,borderRight:`1px solid ${l.timeline.gridColor}`,display:"flex",alignItems:"center",pl:4.25,pr:1.5,fontSize:13,color:F.checked?l.colors.textMuted:l.colors.textPrimary},children:Jn(It,{onClick:U=>m({anchorEl:U.currentTarget,taskSeq:P.seq,index:W,checked:!F.checked}),sx:{display:"inline-flex",alignItems:"center",gap:.75,minWidth:0,cursor:"pointer"},children:[F.checked?mt(LB,{sx:{fontSize:17,color:l.colors.accentOnSurface,flexShrink:0}}):mt(NB,{sx:{fontSize:17,color:l.colors.textMuted,flexShrink:0}}),mt(It,{component:"span",sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",textDecoration:F.checked?"line-through":"none"},children:F.label})]})})},`${P.seq}-check-${W}`))]})},P.seq)}),c.length===0?mt(It,{sx:{py:8,textAlign:"center",color:l.colors.textMuted,fontSize:14},children:"\uD45C\uC2DC\uD560 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]})})})]})})}),mt(jB,{open:!!s,anchorEl:s?.anchorEl??null,title:s?.checked?"\uC774 \uD560\uC77C\uC744 \uC644\uB8CC \uCC98\uB9AC\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?":"\uC644\uB8CC\uB97C \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:s?.checked?"\uC644\uB8CC":"\uD574\uC81C",onCancel:()=>m(null),onConfirm:()=>{s&&r(s.taskSeq,s.index,s.checked),m(null)}})]})}import{jsx as ni}from"react/jsx-runtime";function w$(e){switch(e.view){case"card":case"kanban":{let{view:t,...o}=e;return ni(vm,{...o,columnAxis:t==="kanban"?"status":"project"})}case"sprint":{let{view:t,...o}=e;return ni(vm,{...o,columnAxis:"sprint"})}case"calendar":{let{view:t,...o}=e;return ni(Yp,{...o})}case"month":{let{view:t,...o}=e;return ni(Jp,{...o})}case"agenda":{let{view:t,...o}=e;return ni(lf,{...o})}case"timeline":{let{view:t,...o}=e;return ni(pf,{...o})}default:{let{view:t,...o}=e;return ni(Sp,{...o})}}}var D$=["list","card","kanban","calendar","month","timeline"];import{Box as qo}from"@mui/material";import{Fragment as iv,jsx as ri,jsxs as Pn}from"react/jsx-runtime";function ff(e,t){if(!/^\d{4}-\d{2}-\d{2}$/.test(e)||!/^\d{4}-\d{2}-\d{2}$/.test(t))return null;let o=new Date(`${e}T00:00:00`),n=new Date(`${t}T00:00:00`);return Math.round((o.getTime()-n.getTime())/864e5)}function gf({tasks:e,todayStr:t,showProgress:o=!0,dday:n=null,workdaysLeft:r=null,showPoints:i=!0,showHours:a=!0,showOverdue:l=!0,showInfo:s=!0,inline:m=!1}){let c=xe(),p=e.filter(T=>!T.archived),d=p.filter(T=>T.completed).length,u=p.length>0?Math.round(d/p.length*100):0,f=p.filter(T=>!T.completed&&!T.is_event&&!!T.due_date&&T.due_date.slice(0,10)<t).length,g=p.reduce((T,I)=>I.completed?T:T+(I.story_points??0),0),v=o?ri(qo,{sx:{flex:m?"0 0 110px":"1 1 auto",minWidth:0,height:c.summary.gaugeHeight,borderRadius:3,bgcolor:c.summary.gaugeTrackColor},children:ri(qo,{sx:{height:"100%",borderRadius:3,width:`${u}%`,bgcolor:u>=100?c.summary.gaugeCompleteColor:c.summary.gaugeBarColor,transition:"width 0.2s"}})}):null,D=o?Pn(qo,{component:"span",sx:{flexShrink:0,fontSize:m?14:13,color:c.summary.textColor},children:[u,"%"]}):null,b={color:c.summary.numberColor,fontWeight:700,fontSize:m?15:14},S=p.length-d,h=Pn(iv,{children:[m?null:Pn("span",{children:["\uB0A8\uC740 ",ri(qo,{component:"span",sx:b,children:S}),"\uAC74"]}),l&&f>0?Pn(qo,{component:"span",sx:{color:c.summary.overdueColor,fontWeight:600},children:["\uC9C0\uC5F0"," ",ri(qo,{component:"span",sx:{fontWeight:700,fontSize:m?15:14},children:f}),"\uAC74"]}):null,i&&g>0?Pn("span",{children:[ri(qo,{component:"span",sx:b,children:g}),"SP"]}):null]}),E=typeof r=="number"&&Number.isFinite(r)?Pn("span",{children:["\uADFC\uBB34\uC77C ",ri(qo,{component:"span",sx:b,children:r}),"\uC77C"]}):null,y=typeof n=="number"&&Number.isFinite(n)?ri(qo,{component:"span",sx:{ml:m?0:"auto",flexShrink:0,px:.6,py:.1,borderRadius:.5,fontSize:12,fontWeight:600,bgcolor:c.summary.overdueColor,color:c.colors.textInverse,lineHeight:1.6},children:n===0?"D-day":n>0?`D-${n}`:`D+${-n}`}):null;return m?Pn(qo,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0,fontSize:14.5,color:c.summary.textColor,whiteSpace:"nowrap",...c.summary.sx},children:[s?h:null,s?E:null,s?y:null,v,D]}):Pn(qo,{sx:{display:"flex",flexDirection:"column",gap:.5},children:[o?Pn(qo,{sx:{display:"flex",alignItems:"center",gap:1},children:[v,D]}):null,Pn(qo,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,fontSize:13.5,color:c.summary.textColor},children:[h,E,y]})]})}import{useMemo as lv}from"react";function av(e){let t=String(e??"").trim();if(!t)return 0;let o=0,n=!1;for(let r of t.matchAll(/(\d+(?:\.\d+)?)\s*(h|시간|m|분|d|일)/gi)){let i=parseFloat(r[1]),a=r[2].toLowerCase();n=!0,a==="m"||a==="\uBD84"?o+=i/60:a==="d"||a==="\uC77C"?o+=i*8:o+=i}if(!n){let r=parseFloat(t);Number.isFinite(r)&&(o+=r)}return o}function z$(e){let t=Math.round(e*10)/10;return`${t%1===0?t.toFixed(0):t.toFixed(1)}\uC2DC\uAC04`}function xf(e,t,o){if(!/^\d{4}-\d{2}-\d{2}$/.test(e)||!/^\d{4}-\d{2}-\d{2}$/.test(t))return 0;let n=new Date(`${e}T00:00:00`),r=new Date(`${t}T00:00:00`);if(r<n||r.getTime()-n.getTime()>3660*864e5)return 0;let i=0;for(let a=new Date(n);a<=r;a.setDate(a.getDate()+1)){let l=a.getDay();if(l===0||l===6)continue;let s=`${a.getFullYear()}-${String(a.getMonth()+1).padStart(2,"0")}-${String(a.getDate()).padStart(2,"0")}`;o.has(s)||(i+=1)}return i}function A$(e){return e.reduce((t,o)=>o.completed?t:t+av(o.estimated_time),0)}import{jsx as sv}from"react/jsx-runtime";function W$({sprint:e,tasks:t,todayStr:o,...n}){let r=e.status==="closed"?null:ff(e.end_date,o),i=r!==null&&r>=0,a=lv(()=>{if(!i)return[];let m=Number(o.slice(0,4)),c=Number(e.end_date.slice(0,4))||m,p=[];for(let d=m;d<=Math.max(m,c);d+=1)p.push(d);return p},[i,o,e.end_date]),l=Bn(a),s=i?xf(o,e.end_date,new Set(l.keys())):null;return sv(gf,{tasks:t,todayStr:o,dday:r,workdaysLeft:s,...n})}import{useEffect as Tv,useRef as yv,useState as Sv}from"react";import{Box as $m}from"@mui/material";import{Children as cv}from"react";import{Box as Fm,CircularProgress as mv}from"@mui/material";import{jsx as fs}from"react/jsx-runtime";var bf={xs:2,md:3};function hf(){return fs(Fm,{sx:{position:"fixed",top:"calc(50% + 30px)",left:"50%",transform:"translate(-50%, -50%)",zIndex:1},children:fs(mv,{size:44,thickness:4,sx:{color:"#94a3b8"}})})}function kf({children:e}){return fs(Fm,{sx:{minWidth:0,display:"flex",flexDirection:"column",gap:bf,pb:bf},children:cv.map(e,t=>t==null||t===!1?null:fs(Fm,{sx:{bgcolor:"background.paper",borderRadius:1,boxShadow:1,overflow:"hidden",minWidth:0},children:t}))})}import{useState as yf}from"react";import{Box as fn,Button as Sf,Checkbox as fv,IconButton as gv,Typography as On}from"@mui/material";import xv from"@mui/icons-material/ExpandMore";import bv from"@mui/icons-material/ExpandLess";import Cf from"@mui/icons-material/CheckCircle";import hv from"@mui/icons-material/CheckCircleOutlineOutlined";import{Fragment as pv,jsx as Tf}from"react/jsx-runtime";var uv="taskbox-search-highlight";function dv(e,t){let o=t?.keyPrefix??"hl";return e.map((n,r)=>Tf("span",{className:n.highlight?t?.highlightClassName??uv:t?.className,style:n.highlight?{fontWeight:700,color:"#2563eb"}:void 0,children:n.text},`${o}-${n.text}-${r}`))}function Ra({text:e,keyword:t,fallback:o="-",className:n,highlightClassName:r,keyPrefix:i}){let a=String(e??"").trim()||o,l=Ul(a,t);return Tf(pv,{children:dv(l,{className:n,highlightClassName:r,keyPrefix:i})})}import{jsx as ye,jsxs as er}from"react/jsx-runtime";var kv={flexShrink:0,minWidth:64,textAlign:"center",px:.75,py:.35,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:Ct(12.5),fontWeight:500,lineHeight:1.4},pn={fontSize:Ct(14.5),color:"#374151",minWidth:0,lineHeight:1.45};function dn({label:e,children:t}){return er(fn,{sx:{display:"flex",alignItems:"flex-start",gap:1,minWidth:0},children:[ye(fn,{sx:kv,children:e}),ye(fn,{sx:{...pn,flex:1,pt:.2},children:t})]})}function Bf({task:e,statusOptions:t,projectLabel:o,searchText:n,todayStr:r,dimCompleted:i=!0,onRequestToggleCompleted:a,onOpenDetail:l,onTaskContextMenu:s,targetSummary:m="",ackInfo:c,completeLocked:p=!1,unread:d=!1,noticeReadOnly:u=!1,onAckConfirm:f,onAckListClick:g,myManaged:v=!1,simple:D=!1}){let b=e.is_event?xa(e):Mt(e),S=String(e.due_date??"").slice(11,16),h=e.is_event?String(e.event_time??"").trim():/^\d{2}:\d{2}$/.test(S)?S:String(e.estimated_time??"").trim(),E=Uo(e.start_date),y=Uo(e.due_date),T=E&&h&&!y?`${E} ${h}`:E,I=y&&h?`${y} ${h}`:y,A=ue(),q=!e.is_notice&&e.completed&&!!e.review_pending&&!!A.onReviewDone&&(A.myAccountSeq??0)>0&&(e.author_account_seq??0)===(A.myAccountSeq??0),C=!!A.onReturnTask&&Qt(e,A.myAccountSeq??0),[k,x]=yf(null),B=e.is_event&&e.due_date?String(e.due_date).slice(0,10):"",w=!!B&&B===r,P=!!B&&B<r,H=!e.is_event&&!e.is_notice&&!e.completed&&!!e.due_date&&e.due_date<r,_=(e.receiver_names??[]).filter(Boolean),[N,G]=yf(!1),Q=D&&!N,se=P?"text.secondary":H||w?"#e5484d":pn.color,me=H||w?600:400;return er(fn,{role:"button",tabIndex:0,onClick:()=>l(e),onKeyDown:Y=>{(Y.key==="Enter"||Y.key===" ")&&(Y.preventDefault(),l(e))},onContextMenu:Y=>s(e,Y),sx:{display:"flex",flexDirection:"column",gap:.75,minWidth:0,p:1.25,cursor:"pointer",position:"relative"},children:[v?ye(fn,{sx:{position:"absolute",left:0,top:0,bottom:0,width:4,bgcolor:"primary.main"}}):null,er(fn,{sx:{display:"flex",alignItems:"flex-start",gap:.75,minWidth:0,mb:Q?0:1},children:[e.is_event?(()=>{let Y=ze(e.icon||Rt);return Y?ye(Y,{sx:{fontSize:21,flexShrink:0,mt:.2,color:e.icon_color||"#1e3a8a"}}):null})():!u&&!p?ye(fv,{checked:e.completed,icon:ye(hv,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:ye(Cf,{sx:{fontSize:22,color:"#2f80ed"}}),onClick:Y=>Y.stopPropagation(),onChange:(Y,O)=>a({anchorEl:Y.currentTarget,taskSeq:e.seq,nextCompleted:O}),sx:{p:0,mt:.1,flexShrink:0}}):null,(()=>{if(!e.is_notice)return null;let Y=ze(e.icon||xt);return Y?ye(Y,{sx:{fontSize:19,flexShrink:0,mt:"1px",color:e.icon_color||"#e5484d"}}):null})(),er(fn,{sx:{minWidth:0,flex:1,display:"flex",flexDirection:"column",gap:.5},children:[ye(On,{sx:{fontSize:Ct(16),fontWeight:e.completed&&i?500:600,lineHeight:1.35,minWidth:0,color:e.completed&&i?"#9a9a97":"#111827",textDecoration:e.completed&&i?"line-through":"none"},children:ye(Ra,{text:e.title,keyword:n})}),Q?er(fn,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",columnGap:1.25,rowGap:.25,minWidth:0},children:[ye(oo,{priority:e.priority,small:!0}),I?ye(On,{sx:{...pn,fontSize:Ct(14),whiteSpace:"nowrap",color:se,fontWeight:me},children:I}):null,!e.is_notice&&e.manager_name?ye(On,{sx:{...pn,fontSize:Ct(14),color:"text.secondary",whiteSpace:"nowrap"},children:ye(Ra,{text:e.manager_name,keyword:n})}):null]}):null]}),d&&!e.completed?ye(fn,{component:"span",sx:{flexShrink:0,px:.55,fontSize:Ct(10.5),fontWeight:700,lineHeight:1.6,color:"#fff",bgcolor:"#e5484d",borderRadius:"4px"},children:"N"}):null,D?ye(gv,{size:"small","aria-label":N?"\uC811\uAE30":"\uD3BC\uCE58\uAE30",onClick:Y=>{Y.stopPropagation(),G(O=>!O)},onKeyDown:Y=>Y.stopPropagation(),sx:{flexShrink:0,alignSelf:"center",my:-.5,mr:-.5,color:"#6b7280"},children:N?ye(bv,{}):ye(xv,{})}):null]}),!Q&&er(fn,{sx:{display:"flex",flexDirection:"column",gap:.6,minWidth:0},children:[ye(dn,{label:b?"\uC0C1\uD0DC":"\uC911\uC694\uB3C4",children:er(fn,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1.25},children:[b?ye($e,{option:b,small:!0}):null,ye(oo,{priority:e.priority,small:!0})]})}),(e.label_keys??[]).length>0?ye(dn,{label:"\uB77C\uBCA8",children:ye(yr,{labelKeys:e.label_keys,labelOptions:t})}):null,o?ye(dn,{label:"\uD504\uB85C\uC81D\uD2B8",children:ye(On,{sx:pn,children:o})}):null,T?ye(dn,{label:"\uC2DC\uC791",children:ye(On,{sx:pn,children:T})}):null,I?ye(dn,{label:"\uB9C8\uAC10",children:er(On,{sx:{...pn,color:se,fontWeight:me},children:[I,H?" \xB7 \uC9C0\uC5F0":""]})}):null,q||C?er(dn,{label:"\uAC80\uC218",children:[C?ye(Oo,{onClick:Y=>{Y.stopPropagation(),a({anchorEl:Y.currentTarget,taskSeq:e.seq,nextCompleted:!1})},sx:{py:0,mr:1,fontSize:Ct(13)},children:"\uB418\uB3CC\uB9AC\uAE30"}):null,q?ye(Sf,{size:"small",variant:"contained",disableElevation:!0,onClick:Y=>{Y.stopPropagation(),x(Y.currentTarget)},sx:{...Cr,py:0,fontSize:Ct(13)},children:"\uAC80\uC218\uC644\uB8CC"}):null,ye(Br,{anchorEl:k,onCancel:()=>x(null),onConfirm:()=>{A.onReviewDone?.(e),x(null)}})]}):null,e.is_notice?ye(dn,{label:"\uB300\uC0C1\uC790",children:ye(On,{sx:pn,children:m||"\uBAA8\uB4E0 \uC9C1\uC6D0"})}):null,c?ye(dn,{label:"\uD655\uC778",children:ye(Sf,{size:"small",variant:c.canAck?"contained":"outlined",color:"inherit",startIcon:c.acked?ye(Cf,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:Y=>{Y.stopPropagation(),c.canAck?f?.(e):g?.(e,Y.currentTarget)},sx:{py:0,px:1.25,minWidth:0,fontSize:Ct(13),...c.canAck?{color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}}:{bgcolor:"#fff",borderColor:"#d5d8dc"}},children:c.canAck?"\uD655\uC778":`${c.count}/${c.total}`})}):null,!e.is_notice&&e.manager_name?ye(dn,{label:"\uCC45\uC784\uC790",children:ye(On,{sx:pn,children:ye(Ra,{text:e.manager_name,keyword:n})})}):null,!e.is_notice&&_.length>0?ye(dn,{label:"\uCC38\uC870\uC790",children:ye(On,{sx:pn,children:_.join(", ")})}):null,e.note?ye(dn,{label:"\uBE44\uACE0",children:ye(On,{sx:pn,children:ye(Ra,{text:e.note,keyword:n})})}):null]})]})}import{jsx as Mi,jsxs as Bv}from"react/jsx-runtime";function Cv(e,t){if(e.completed||e.archived||t<=0)return;let o=_r(e,t);if(o.canConfirm)return{count:o.count,total:o.total,acked:!1,canAck:!0,pendingNames:o.pendingNames}}function v4({tasks:e,statusOptions:t,customTabs:o,loading:n,dimCompleted:r=!0,simple:i=!1,searchText:a,todayStr:l,onToggleCompleted:s,onOpenDetail:m,onTaskContextMenu:c,getTargetSummary:p,getAckInfo:d,getNoticeReadOnly:u,isTaskUnread:f,getCompleteLocked:g,onAckConfirm:v,onAckListClick:D,onEndReached:b,myAccountSeq:S=0}){let h=new Map(o.map(q=>[q.key,q.label])),[E,y]=Sv(null),{onReturnTask:T}=ue(),I=E?e.find(q=>q.seq===E.taskSeq):void 0,A=yv(null);return Tv(()=>{let q=A.current;if(!b||!q)return;let C=new IntersectionObserver(k=>{k[0]?.isIntersecting&&b()});return C.observe(q),()=>C.disconnect()},[b,e.length]),e.length===0?n?Mi(hf,{}):Mi($m,{sx:{py:6,textAlign:"center",color:"#94a3b8",fontSize:"0.9rem"},children:"\uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):Bv($m,{sx:{minWidth:0},children:[Mi(kf,{children:e.map(q=>Mi(Bf,{dimCompleted:r,simple:i,myManaged:S>0&&!q.is_notice&&!q.is_event&&(q.manager_account_seq??0)===S,task:q,statusOptions:t,projectLabel:q.tab_key?h.get(q.tab_key)??"":"",searchText:a,todayStr:l,onRequestToggleCompleted:y,onOpenDetail:m,onTaskContextMenu:c,targetSummary:q.is_notice?p?.(q):void 0,ackInfo:q.is_notice?d?.(q):Cv(q,S),noticeReadOnly:q.is_notice?u?.(q):!1,unread:f?.(q)??!1,completeLocked:g?.(q)??!1,onAckConfirm:v,onAckListClick:D},q.seq))}),b?Mi($m,{ref:A,sx:{height:"1px"}}):null,Mi(_o,{open:!!E,anchorEl:E?.anchorEl??null,nextCompleted:E?.nextCompleted??!1,returnMode:!!T&&!!(I&&Qt(I,S)),onCancel:()=>y(null),onConfirm:q=>{E&&(q&&T&&I?T(I,q):s(E.taskSeq,E.nextCompleted)),y(null)}})]})}import{useState as Ma}from"react";import{Box as ht,Checkbox as vv,Menu as Iv,MenuItem as vf,Tooltip as _v}from"@mui/material";import wv from"@mui/icons-material/CheckCircle";import Dv from"@mui/icons-material/CheckCircleOutlineOutlined";import Ev from"@mui/icons-material/NotesOutlined";import Rv from"@mui/icons-material/AutorenewOutlined";import Mv from"@mui/icons-material/CalendarTodayOutlined";import Pv from"@mui/icons-material/EventOutlined";import Ov from"@mui/icons-material/PersonOutlineOutlined";import qv from"@mui/icons-material/PeopleAltOutlined";import zv from"@mui/icons-material/StickyNote2Outlined";import{ConfirmActionPopper as Av}from"@ehfuse/mui-confirm-action";import{Fragment as Fv,jsx as Re,jsxs as Rr}from"react/jsx-runtime";var Hm={completed:{label:"\uC644\uB8CC",width:"44px",align:"center",icon:null},title:{label:"\uC81C\uBAA9",width:"1fr",align:"left",icon:Re(Ev,{sx:{fontSize:15}})},manager_name:{label:"\uCC45\uC784\uC790",width:"112px",align:"center",icon:Re(Ov,{sx:{fontSize:15}})},receiver_names:{label:"\uCC38\uC870\uC790",width:"120px",align:"center",icon:Re(qv,{sx:{fontSize:15}})},status:{label:"\uC0C1\uD0DC",width:"104px",align:"center",icon:Re(Rv,{sx:{fontSize:15}})},priority:{label:"\uC911\uC694\uB3C4",width:"88px",align:"center",icon:null},start_date:{label:"\uC2DC\uC791\uC77C\uC2DC",width:"110px",align:"center",icon:Re(Mv,{sx:{fontSize:15}})},due_date:{label:"\uB9C8\uAC10\uC608\uC815",width:"110px",align:"center",icon:Re(Pv,{sx:{fontSize:15}})},note:{label:"\uBE44\uACE0",width:"1fr",align:"left",icon:Re(zv,{sx:{fontSize:15}})}},Lv=[{id:"completed"},{id:"title"},{id:"manager_name"},{id:"due_date"},{id:"status"}],Nv=new Set(["manager_name","status","due_date"]);function If(e){let t=String(e??"").trim();return t?t.slice(2,10).replaceAll("-","."):""}function J4(e,t){return t>0?e.filter(o=>!o.is_notice&&!o.completed&&!o.archived&&ln(o)==="group"&&Number(o.visibility_group_seq??0)===t).sort((o,n)=>{let r=String(o.due_date??"").trim(),i=String(n.due_date??"").trim();return r!==i?r?i?r.localeCompare(i):-1:1:Number(o.seq)-Number(n.seq)}):[]}function eH({tasks:e,columns:t=Lv,loading:o=!1,emptyText:n="\uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",myAccountSeq:r=0,avatarSrcByName:i,managerCandidates:a=[],canAssignManager:l,onOpenDetail:s,onToggleCompleted:m,onChangeStatus:c,onChangeDueDate:p,onChangeReminder:d,onChangeManager:u,onClaimTask:f}){let g=xe(),[v,D]=Ma(null),[b,S]=Ma(null),[h,E]=Ma(null),[y,T]=Ma(null),{onReturnTask:I}=ue(),[A,q]=Ma(null),C=t.map(B=>B.width??Hm[B.id].width).join(" "),k=(B,w)=>Re(Vo,{src:i?.get(B)??"",name:B,avatarSx:{width:w,height:w,fontSize:Math.round(w/2),flexShrink:0,borderRadius:"50%"},iconFontSize:Math.round(w*.6)}),x=(B,w)=>{let H=Hm[B.id].align==="center";switch(B.id){case"completed":if(w.is_event){let _=ze(w.icon||Rt);return Re(ht,{className:"cell",sx:{justifyContent:"center"},children:_?Re(_,{sx:{fontSize:19,color:w.icon_color||"#1e3a8a"}}):null},B.id)}return Re(ht,{className:"cell",sx:{justifyContent:"center",...m?{"&:hover":{bgcolor:g.table.cellHoverBg}}:{}},children:Re(_v,{title:w.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC",arrow:!0,enterDelay:300,disableInteractive:!0,children:Re(vv,{checked:!!w.completed,icon:Re(Dv,{sx:{fontSize:20,color:"#9a9a97",opacity:.45}}),checkedIcon:Re(wv,{sx:{fontSize:20,color:"#2f80ed"}}),onChange:_=>T({anchorEl:_.currentTarget,task:w}),sx:{p:.5}})})},B.id);case"title":{let _=w.is_notice?ze(w.icon||xt):null,N=w.icon_color||"#e5484d";return Rr(ht,{className:"cell",onClick:()=>s(w),sx:{gap:1,cursor:"pointer","&:hover":{bgcolor:g.table.cellHoverBg}},children:[_?Re(_,{sx:{fontSize:18,flexShrink:0,color:N}}):null,Re(ht,{component:"span",sx:{fontSize:14.5,fontWeight:g.table.rowTitleFontWeight,color:g.table.rowTitleColor,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:w.title||"(\uC81C\uBAA9 \uC5C6\uC74C)"})]},B.id)}case"manager_name":{let _=l?l(w):!1,N=r>0&&Number(w.manager_account_seq??0)===r;return _&&u?Rr(ht,{className:"cell",onClick:G=>E({anchorEl:G.currentTarget,task:w}),sx:{gap:.75,justifyContent:"center",cursor:"pointer","&:hover":{bgcolor:g.table.cellHoverBg}},children:[w.manager_name?k(w.manager_name,22):null,Re(ht,{component:"span",sx:{fontSize:14,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:w.manager_name||""})]},B.id):Re(ht,{className:"cell",sx:{gap:.75,justifyContent:"center"},children:w.manager_name?Rr(Fv,{children:[k(w.manager_name,22),Re(ht,{component:"span",sx:{fontSize:14,fontWeight:N?600:400,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:w.manager_name})]}):f?Re(Oo,{onClick:G=>q({anchorEl:G.currentTarget,taskSeq:Number(w.seq)}),children:"\uAC00\uC838\uAC00\uAE30"}):null},B.id)}case"receiver_names":return Re(ht,{className:"cell",sx:{justifyContent:"center",fontSize:14,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:(w.receiver_names??[]).join(", ")},B.id);case"status":return Re(ht,{className:"cell",onClick:c?_=>D({anchorEl:_.currentTarget,task:w}):void 0,sx:{py:.5,justifyContent:"center",...c?{cursor:"pointer","&:hover":{bgcolor:g.table.cellHoverBg}}:{}},children:Re($e,{option:Mt(w)})},B.id);case"priority":return Re(ht,{className:"cell",sx:{justifyContent:"center"},children:Re(oo,{priority:w.priority,plain:!0})},B.id);case"start_date":return Re(ht,{className:"cell",sx:{justifyContent:"center",whiteSpace:"nowrap",fontSize:14},children:If(w.start_date)},B.id);case"due_date":return Re(ht,{className:"cell",onClick:p?_=>S({anchorEl:_.currentTarget,taskSeq:Number(w.seq),date:String(w.due_date??"").slice(0,10),reminders:vn(w)}):void 0,sx:{justifyContent:"center",whiteSpace:"nowrap",fontSize:14,...p?{cursor:"pointer","&:hover":{bgcolor:g.table.cellHoverBg}}:{}},children:If(w.due_date)},B.id);case"note":return Re(ht,{className:"cell",sx:{justifyContent:H?"center":"flex-start",fontSize:14,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:w.note||""},B.id);default:return null}};return Rr(ht,{sx:{border:`1px solid ${g.table.borderColor}`,borderRadius:1,overflow:"hidden",bgcolor:g.table.bg,color:g.table.rowColor},children:[Re(ht,{sx:{display:"grid",gridTemplateColumns:C,borderBottom:`1px solid ${g.table.borderColor}`,bgcolor:g.table.headerBg,"& > *":{display:"flex",alignItems:"center",gap:.5,px:1,py:1,minWidth:0,fontSize:g.table.headerFontSize,whiteSpace:"nowrap",userSelect:"none",borderRight:`1px solid ${g.table.rowBorderColor}`},"& > *:first-of-type":{px:.5},"& > *:last-child":{borderRight:"none",pr:2}},children:t.map(B=>{let w=Hm[B.id];return Rr(ht,{sx:{justifyContent:w.align==="center"?"center":"flex-start",color:Nv.has(B.id)?g.table.headerActiveColor:g.table.headerColor},children:[w.icon,B.label??w.label]},B.id)})}),o?Re(ht,{sx:{py:3,textAlign:"center",color:g.table.emptyColor,fontSize:14},children:"\uBD88\uB7EC\uC624\uB294 \uC911\u2026"}):e.length===0?Re(ht,{sx:{py:3,textAlign:"center",color:g.table.emptyColor,fontSize:14},children:n}):e.map((B,w)=>Re(ht,{sx:{display:"grid",gridTemplateColumns:C,minHeight:44,fontSize:15,bgcolor:g.table.rowBg,borderTop:w===0?"none":`1px solid ${g.table.rowBorderColor}`,"&:hover":{bgcolor:g.table.rowHoverBg},"& > .cell":{px:1,minWidth:0,display:"flex",alignItems:"center",borderRight:`1px solid ${g.table.rowBorderColor}`},"& > .cell:first-of-type":{px:.5},"& > .cell:last-child":{borderRight:"none",pr:2}},children:t.map(P=>x(P,B))},B.seq)),Re(hi,{anchorEl:v?.anchorEl??null,value:String(v?.task.status??""),options:v?Ml(v.task):void 0,onSelect:B=>{v&&c?.(Number(v.task.seq),B),D(null)},onComplete:m&&v&&!v.task.completed&&!v.task.is_notice&&!v.task.is_event&&!v.task.is_bug?()=>m(v.task,!0):void 0,onClose:()=>D(null)}),Rr(Iv,{anchorEl:h?.anchorEl??null,open:!!h,onClose:()=>E(null),transitionDuration:0,children:[Rr(vf,{onClick:()=>{h&&u?.(Number(h.task.seq),"",0),E(null)},sx:{fontSize:14,minWidth:170,gap:1,color:g.table.headerColor},children:[Re(ht,{sx:{width:24,flexShrink:0}}),"\uC9C0\uC815 \uC548 \uD568"]}),a.map(B=>Rr(vf,{selected:Number(h?.task.manager_account_seq??0)===Number(B.account_seq??0),onClick:()=>{h&&u?.(Number(h.task.seq),B.name,Number(B.account_seq??0)),E(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[k(B.name,24),B.name,B.role_name?Re(ht,{component:"span",sx:{color:g.table.headerColor,fontSize:13},children:B.role_name}):null]},B.seq))]}),Re(Go,{anchorEl:b?.anchorEl??null,open:!!b,date:b?.date??"",reminders:b?.reminders??[],hideReminder:!d,onClose:()=>S(null),onDateChange:B=>{b&&(p?.(b.taskSeq,B),S(w=>w?{...w,date:B}:null))},onReminderChange:B=>{b&&(d?.(b.taskSeq,B),S(w=>w?{...w,reminders:B}:null))}}),Re(_o,{open:!!y,anchorEl:y?.anchorEl??null,nextCompleted:!y?.task.completed,returnMode:!!I&&!!(y&&Qt(y.task,r)),onCancel:()=>T(null),onConfirm:B=>{y&&(B&&I?I(y.task,B):m?.(y.task,!y.task.completed)),T(null)}}),Re(Av,{open:!!A,anchorEl:A?.anchorEl??null,title:"\uC774 \uC5C5\uBB34\uB97C \uB9E1\uC744\uAE4C\uC694?",confirmText:"\uAC00\uC838\uAC00\uAE30",onCancel:()=>q(null),onConfirm:()=>{A&&f?.(A.taskSeq),q(null)}})]})}function $v(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)}function _f(e,t){let o=String(e??"").slice(0,10);if(!$v(o)||typeof t!="number"||!Number.isFinite(t))return"";let n=new Date(`${o}T12:00:00`);n.setDate(n.getDate()+Math.trunc(t));let r=n.getFullYear(),i=String(n.getMonth()+1).padStart(2,"0"),a=String(n.getDate()).padStart(2,"0");return`${r}-${i}-${a}`}function Hv(e,t,o){return{title:String(e.title??"").trim(),content:String(e.content??""),start_date:_f(t,e.start_offset_days),due_date:_f(t,e.due_offset_days),priority:e.priority??"medium",label_keys:[...e.label_keys??[]],manager_account_seq:Number(e.manager_account_seq)||0,manager_name:String(e.manager_name??""),checklist:(e.checklist??[]).map(n=>String(n??"").trim()).filter(n=>n.length>0).map(n=>({label:n,checked:!1})),group_seq:o}}function gs(e,t){let o=Number(e.group_seq)||0;return(e.items??[]).map(n=>Hv(n,t,o)).filter(n=>n.title.length>0)}function nH(e){return typeof e!="number"||!Number.isFinite(e)?"-":e===0?"\uAE30\uC900\uC77C":e>0?`\uAE30\uC900\uC77C +${Math.trunc(e)}\uC77C`:`\uAE30\uC900\uC77C ${Math.trunc(e)}\uC77C`}import{useEffect as h1,useRef as k1,useState as dg}from"react";import{Box as nr,Button as su,ButtonBase as T1,Divider as pg,Drawer as y1,IconButton as S1,Tooltip as C1}from"@mui/material";import B1 from"@mui/icons-material/Close";import v1 from"@ehfuse/overlay-scrollbar";import{FormDialog as I1}from"@ehfuse/mui-form-dialog";import{useState as qi}from"react";import i1 from"@mui/icons-material/ExpandLess";import a1 from"@mui/icons-material/ExpandMore";import{Box as Pr,ButtonBase as lg,Divider as $a,Menu as iu,MenuItem as au,Tooltip as l1}from"@mui/material";import s1 from"@mui/icons-material/SubjectOutlined";import c1 from"@mui/icons-material/StickyNote2Outlined";import m1 from"@mui/icons-material/LabelOutlined";import u1 from"@mui/icons-material/DirectionsRunOutlined";import sg from"@mui/icons-material/LockOutlined";import cg from"@mui/icons-material/PublicOutlined";import mg from"@mui/icons-material/Group";import d1 from"@mui/icons-material/Repeat";import p1 from"@mui/icons-material/EventOutlined";import f1 from"@mui/icons-material/SpeedOutlined";import{TextField as g1}from"@ehfuse/mui-form-controls";import{useState as ii}from"react";import{Box as qa,ButtonBase as lI,Divider as sI,ListItemIcon as cI,Menu as Um,MenuItem as Pa}from"@mui/material";import mI from"@mui/icons-material/Add";import bs from"@mui/icons-material/Check";import uI from"@mui/icons-material/ViewKanbanOutlined";import dI from"@mui/icons-material/CalendarTodayOutlined";import pI from"@mui/icons-material/EventOutlined";import fI from"@mui/icons-material/PersonOutlineOutlined";import Mf from"@mui/icons-material/PeopleAltOutlined";import gI from"@mui/icons-material/FlagOutlined";import xI from"@mui/icons-material/TimerOutlined";import bI from"@mui/icons-material/NotificationsNoneOutlined";import hI from"@mui/icons-material/InboxOutlined";import kI from"@mui/icons-material/PlaceOutlined";import TI from"@mui/icons-material/MapOutlined";import{TimePicker as yI}from"@ehfuse/mui-datetime-picker";import{InfoAlert as Pf}from"@ehfuse/alerts";var gn="@media (max-width: 719.95px)";function qn(e){return{[gn]:{order:e}}}import{useEffect as Wv,useState as Vv}from"react";import{Box as Uv}from"@mui/material";import{jsx as Gv}from"react/jsx-runtime";function tr({value:e,placeholder:t,readOnly:o,onCommit:n}){let r=xe(),[i,a]=Vv(e);return Wv(()=>a(e),[e]),Gv(Uv,{component:"input",spellCheck:!1,value:i,readOnly:o,placeholder:t,onChange:l=>a(l.target.value),onBlur:()=>{i.trim()!==e&&n(i.trim())},onKeyDown:l=>{l.key==="Enter"&&l.target.blur()},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:r.colors.textPrimary,caretColor:r.colors.textPrimary,bgcolor:"transparent",p:0,"&::placeholder":{color:"#9a9a97"}}})}import{Box as Wm}from"@mui/material";import{jsx as Kv,jsxs as wf}from"react/jsx-runtime";function ve({icon:e,label:t,onClick:o,sx:n,children:r}){return wf(Wm,{sx:[{display:"flex",alignItems:"center",minHeight:32},...Array.isArray(n)?n:[n]],children:[wf(Wm,{sx:{display:"flex",alignItems:"center",gap:1,width:104,flexShrink:0,fontSize:13.5,color:"#787774"},children:[e,t]}),Kv(Wm,{onClick:o?i=>o(i.currentTarget):void 0,sx:{flex:1,minWidth:0,display:"flex",alignItems:"center",gap:.5,px:1,py:.25,borderRadius:1,fontSize:14,cursor:o?"pointer":"default","&:hover":o?{bgcolor:"#f2f2f0"}:void 0,[gn]:{py:.25}},children:r})]})}import SI from"@mui/icons-material/StorefrontOutlined";import CI from"@mui/icons-material/SupportAgentOutlined";import{Suspense as Yv,lazy as jv,useEffect as Xv,useState as Df}from"react";import{Box as Vm,Dialog as Qv,DialogContent as Zv,DialogTitle as Jv,IconButton as Ef,Tooltip as eI}from"@mui/material";import tI from"@mui/icons-material/Close";import oI from"@mui/icons-material/Search";import{Fragment as aI,jsx as xn,jsxs as xs}from"react/jsx-runtime";function nI(e){return xn(Vm,{sx:{p:3,fontSize:14,color:"#9a9a97"},children:"\uC8FC\uC18C \uAC80\uC0C9 \uBAA8\uB4C8(react-daum-postcode)\uC744 \uBD88\uB7EC\uC62C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uC8FC\uC18C\uB97C \uC9C1\uC811 \uC785\uB825\uD574 \uC8FC\uC138\uC694."})}var rI=jv(()=>import("react-daum-postcode").then(e=>({default:e.default})).catch(()=>({default:nI})));function iI(e){if(e.addressType!=="R")return e.address;let t="";return e.bname!==""&&/[동|로|가]$/g.test(e.bname)&&(t+=e.bname),e.buildingName!==""&&e.apartment==="Y"&&(t+=t!==""?`, ${e.buildingName}`:e.buildingName),t!==""?`${e.address} (${t})`:e.address}function Rf({value:e,placeholder:t="\uC8FC\uC18C \uC785\uB825",readOnly:o,onCommit:n}){let[r,i]=Df(e),[a,l]=Df(!1),s=ue().slots?.addressSearch;Xv(()=>i(e),[e]);let m=p=>{i(p),l(!1),p!==e&&n(p)};return xs(aI,{children:[xs(Vm,{sx:{display:"flex",alignItems:"center",gap:.5,flex:1,minWidth:0},children:[xn(Vm,{component:"input",spellCheck:!1,value:r,readOnly:o,placeholder:t,onChange:p=>i(p.target.value),onBlur:()=>{a||r.trim()!==e&&n(r.trim())},onKeyDown:p=>{p.key==="Enter"&&(p.preventDefault(),!o&&l(!0))},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:14,color:"#37352f",bgcolor:"transparent",p:0,"&::placeholder":{color:"#9a9a97"}}}),o?null:xn(eI,{title:"\uC8FC\uC18C \uAC80\uC0C9",arrow:!0,children:xn(Ef,{tabIndex:-1,size:"small","aria-label":"\uC8FC\uC18C \uAC80\uC0C9",onClick:()=>l(!0),sx:{color:"#9a9a97",p:.25,flexShrink:0},children:xn(oI,{sx:{fontSize:17}})})})]}),s?xn(s,{open:a,onComplete:m,onClose:()=>l(!1)}):xs(Qv,{open:a,onClose:()=>l(!1),maxWidth:"sm",fullWidth:!0,slotProps:{paper:{sx:{height:550}}},children:[xs(Jv,{sx:{display:"flex",justifyContent:"space-between",alignItems:"center",pr:2},children:["\uC8FC\uC18C \uAC80\uC0C9",xn(Ef,{"aria-label":"\uC8FC\uC18C \uAC80\uC0C9 \uB2EB\uAE30",onClick:()=>l(!1),size:"small",children:xn(tI,{})})]}),xn(Zv,{style:{padding:0},dividers:!0,children:a?xn(Yv,{fallback:null,children:xn(rI,{onComplete:p=>{m(iI(p))},onClose:()=>l(!1),defaultQuery:r,style:{width:"100%",height:"100%"}})}):null})]})]})}import{Fragment as Oa,jsx as ce,jsxs as Do}from"react/jsx-runtime";function Of(e){return String(e??"").includes(" ")?Po(e):Uo(e)}function BI(e){let[t="00",o="00"]=String(e??"").split(":");return{hour:/^\d{2}$/.test(t)?t:"00",minute:/^\d{2}$/.test(o)?o:"00"}}function Mr({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return ce(qa,{component:"span",sx:{color:"#9a9a97"},children:e})}var kt=e=>({gridColumn:`${e}`,[gn]:{gridColumn:"auto"}});function hs({values:e,customTabs:t,avatarSrcByName:o,managerLocked:n=!1,notice:r=!1,event:i=!1,hideDueDate:a=!1,hideReminder:l=!1,beforeStart:s,pinColumns:m=!1,projectColumn:c=1,afterProject:p,readOnly:d=!1,coreLocked:u,targetSummary:f="",narrowCollapsedSx:g,reminderLocked:v=!1,managerAction:D,hideProject:b=!1,hideManager:S=!1,hideReceivers:h=!1,hideStartDate:E=!1,leading:y,supportOrigin:T,trailing:I,onChangeProject:A,onChangeStartDate:q,onClearStartDate:C,onChangeDueDate:k,onChangeReminder:x,onChangePriority:B,onChangeEventTime:w,onChangeEventPlace:P,onChangeEventAddress:H,onMemberEdit:_,onAddProject:N}){let[G,Q]=ii(null),[se,me]=ii(!1),Y=u??d,[O,oe]=ii(null),[F,W]=ii(null),[V,U]=ii(null),[de,re]=ii(null),[Te,j]=ii(null),ne=Ue(),he=Sn(),Ce=m&&!i,_e=(K,ae,We=!1)=>[qn(K),...We&&g?Array.isArray(g)?g:[g]:[],...Ce&&ae?[kt(ae)]:[]],Le=t.find(K=>K.key===e.tabKey),ct=t.filter(K=>!K.archived),Ge=!!C&&!r&&!Y,Pe=K=>{let ae=String(e.startDate??"").trim(),We=C?!!ae&&ql(ae).getTime()>Date.now():!!ae;if(q(K),We||i)return;let Ft=ql(K);if(!Number.isNaN(Ft.getTime())){if(r){if(Ft.getTime()<=Date.now())return;Pf("\uAC8C\uC2DC\uC77C\uC2DC\uAC00 \uB418\uBA74 \uB300\uC0C1\uC790\uC5D0\uAC8C \uACF5\uC9C0\uAC00 \uBCF4\uC774\uACE0 \uC54C\uB9BC\uC774 \uBC1C\uC1A1\uB429\uB2C8\uB2E4.");return}Ft.getTime()<=Date.now()||Pf("\uC2DC\uC791\uC77C\uC2DC\uAC00 \uB418\uBA74 \uCC45\uC784\uC790\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uBC1C\uC1A1\uB429\uB2C8\uB2E4.")}},Ne=ce(ve,{icon:ce(bI,{sx:{fontSize:17}}),label:"\uC0AC\uC804\uC54C\uB9BC",onClick:Y||v?void 0:K=>W(K),sx:_e(i?8:5,2,!0),children:e.reminders.length===0?ce(Mr,{label:"\uC5C6\uC74C"}):pm(e.reminders)});return Do(Oa,{children:[Do(qa,{sx:{display:"grid",gridTemplateColumns:"repeat(2, minmax(0, 1fr))",gridAutoFlow:"row dense",columnGap:3,rowGap:0,px:2,[gn]:{gridTemplateColumns:"minmax(0, 1fr)"}},children:[y,T?Do(Oa,{children:[Do(ve,{icon:ce(SI,{sx:{fontSize:17}}),label:"\uAC00\uB9F9\uC810",sx:_e(0,1),children:[T.licenseName||ce(Mr,{}),T.contactPhone?ce(qa,{component:"span",sx:{ml:1,color:"#6f6f6c",fontSize:"0.92em"},children:T.contactPhone}):null,T.contactEmail?ce(qa,{component:"span",sx:{ml:1,color:"#6f6f6c",fontSize:"0.92em"},children:T.contactEmail}):null]}),ce(ve,{icon:ce(CI,{sx:{fontSize:17}}),label:"\uC720\uD615",sx:_e(0,2),children:T.supportType||ce(Mr,{})})]}):null,b?null:ce(ve,{icon:ce(uI,{sx:{fontSize:17}}),label:"\uD504\uB85C\uC81D\uD2B8",onClick:Y?void 0:K=>Q(K),sx:Ce&&c==="full"?[_e(1,void 0,!0),{gridColumn:"1 / -1"}]:_e(1,c==="full"?1:c,!0),children:Le?(()=>{let K=ze(Le.icon);return Do(Oa,{children:[K?ce(K,{sx:{fontSize:16,color:"#1e3a8a"}}):null,Le.label]})})():"\uAE30\uBCF8"}),p,r?ce(ve,{icon:ce(Mf,{sx:{fontSize:17}}),label:"\uB300\uC0C1\uC790",onClick:Y?void 0:()=>_("targets"),sx:_e(7,1),children:f||"\uBAA8\uB4E0 \uC9C1\uC6D0"}):null,!r&&!i&&!S?ce(ve,{icon:ce(fI,{sx:{fontSize:17}}),label:"\uCC45\uC784\uC790",onClick:n||Y||!e.managerName&&D?void 0:()=>_("manager"),sx:_e(7,1),children:e.managerName?Do(Oa,{children:[ce(go,{names:[e.managerName],size:20,avatarSrcByName:o}),e.managerName]}):D??ce(Mr,{})}):null,s,!i&&!E?Do(ve,{icon:ce(dI,{sx:{fontSize:17}}),label:r?"\uAC8C\uC2DC\uC77C\uC2DC":"\uC2DC\uC791\uC77C\uC2DC",onClick:Y?void 0:K=>U(K),sx:_e(2,2),children:[e.startDate?Of(e.startDate):r?ce(qa,{component:"span",sx:{fontSize:13.5,color:"text.secondary"},children:"\uC791\uC131\uC911 \u2014 \uAC8C\uC2DC \uC548 \uB428"}):ce(Mr,{label:Ge?"\uBBF8\uC815":void 0}),Ge&&e.startDate?ce(lI,{onClick:K=>{K.stopPropagation(),C?.()},sx:{ml:"auto",flexShrink:0,px:1,py:.25,borderRadius:1,border:"1px solid #e6e6e3",fontSize:14,color:"#787774","&:hover":{bgcolor:"#ebebe9"}},children:"\uBBF8\uC815"}):null]}):null,!r&&!h?ce(ve,{icon:ce(Mf,{sx:{fontSize:17}}),label:i?"\uCC38\uC11D\uC790":"\uCC38\uC870\uC790",onClick:Y?void 0:()=>_("receivers"),sx:_e(i?7:8,1),children:e.receiverNames.length>0?Do(Oa,{children:[ce(go,{names:e.receiverNames,size:20,avatarSrcByName:o}),e.receiverNames.length===1?e.receiverNames[0]:null]}):ce(Mr,{})}):null,a?null:ce(ve,{icon:ce(pI,{sx:{fontSize:17}}),label:i?"\uB0A0\uC9DC":"\uB9C8\uAC10\uC608\uC815",onClick:Y?void 0:K=>re(K),sx:_e(3,2),children:e.dueDate?i?Uo(e.dueDate):Of(e.dueDate):ce(Mr,{label:r?"\uBB34\uAE30\uD55C":void 0})}),i?ce(ve,{icon:ce(xI,{sx:{fontSize:17}}),label:"\uC2DC\uAC01",onClick:Y?void 0:K=>j(K),sx:qn(4),children:e.eventTime?e.eventTime:ce(Mr,{label:"\uC885\uC77C"})}):null,i?ce(ve,{icon:ce(kI,{sx:{fontSize:17}}),label:"\uC7A5\uC18C",sx:qn(5),children:ce(tr,{value:e.eventPlace??"",placeholder:"\uC7A5\uC18C \uC785\uB825",readOnly:Y,onCommit:K=>P?.(K)})}):null,!l&&i?Ne:null,i?ce(ve,{icon:ce(TI,{sx:{fontSize:17}}),label:"\uC8FC\uC18C",sx:[{gridColumn:"1 / -1"},qn(6)],children:ce(Rf,{value:e.eventAddress??"",placeholder:"\uC8FC\uC18C \uC785\uB825",readOnly:Y,onCommit:K=>H?.(K)})}):null,i?null:ce(ve,{icon:ce(gI,{sx:{fontSize:17}}),label:"\uC911\uC694\uB3C4",onClick:d?void 0:K=>oe(K),sx:_e(6,1,!0),children:ce(oo,{priority:e.priority,small:!0})}),!l&&!i?Ne:null,I]}),Do(Um,{transitionDuration:0,anchorEl:G,open:!!G,onClose:()=>Q(null),...he,children:[Do(Pa,{selected:!e.tabKey,onClick:()=>{A(""),Q(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[ce(hI,{sx:{fontSize:17,color:"#9a9a97"}}),"\uC5C6\uC74C",e.tabKey?null:ce(bs,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}})]}),ct.map(K=>{let ae=ze(K.icon),We=e.tabKey===K.key;return Do(Pa,{selected:We,onClick:()=>{A(K.key),Q(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[ae?ce(ae,{sx:{fontSize:17,color:"#1e3a8a"}}):null,K.label,We?ce(bs,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},K.key)}),N?[ce(sI,{},"add-project-divider"),Do(Pa,{onClick:()=>me(!0),sx:{fontSize:14,color:"#787774"},children:[ce(cI,{children:ce(mI,{sx:{fontSize:18,color:"#787774"}})}),"\uD504\uB85C\uC81D\uD2B8 \uCD94\uAC00"]},"add-project")]:null]}),N?ce(Jl,{open:se,onClose:()=>me(!1),onSubmit:(K,ae,We)=>{(async()=>{let Ft=await N(K,ae,We);Ft&&A(Ft)})(),Q(null)}}):null,ce(Um,{transitionDuration:0,anchorEl:O,open:!!O,onClose:()=>oe(null),...he,children:["high","medium","low"].map(K=>Do(Pa,{selected:e.priority===K,onClick:()=>{B(K),oe(null)},sx:{fontSize:14,minWidth:130,gap:1},children:[ce(oo,{priority:K,small:!0}),e.priority===K?ce(bs,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},K))}),ce(Um,{transitionDuration:0,anchorEl:F,open:!!F,onClose:()=>W(null),...he,children:dm(i?!!e.eventTime:String(e.dueDate??"").includes(" ")).map(K=>{let ae=K.value==="none"?e.reminders.length===0:e.reminders.includes(K.value);return Do(Pa,{selected:ae,onClick:()=>{x(Xl(e.reminders,K.value)),K.value==="none"&&W(null)},sx:{fontSize:14,minWidth:150,gap:1},children:[K.label,ae?ce(bs,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},K.value)})}),i?ce(yI,{anchorEl:Te,open:!!Te,onClose:()=>j(null),value:BI(e.eventTime),format:"HH:mm",minuteStep:10,autoApply:!0,centered:ne,locale:"ko",onChange:(K,ae)=>{w?.(`${K}:${ae}`),j(null)}}):null,ce(Go,{anchorEl:V,open:!!V,date:e.startDate,reminders:[],hideReminder:!0,showTime:!0,centered:ne,onClose:()=>U(null),onDateChange:Pe,onReminderChange:()=>{}}),ce(Go,{anchorEl:de,open:!!de,date:e.dueDate,reminders:e.reminders,hideReminder:v||l,showTime:!i,centered:ne,onClose:()=>re(null),onDateChange:k,onReminderChange:x})]})}import{useState as vI}from"react";import{Box as II,Menu as _I,MenuItem as wI}from"@mui/material";import DI from"@mui/icons-material/RepeatOutlined";import EI from"@mui/icons-material/DevicesOutlined";import RI from"@mui/icons-material/ScreenSearchDesktopOutlined";import MI from"@mui/icons-material/SellOutlined";import PI from"@mui/icons-material/TaskAltOutlined";import{Fragment as qf,jsx as Yt,jsxs as zf}from"react/jsx-runtime";function Gm({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return Yt(II,{component:"span",sx:{color:"#9a9a97"},children:e})}function ks({values:e,readOnly:t=!1,showResolution:o=!1,onChangeRepro:n,onChangeDevice:r,onChangeWhere:i,onChangeVersion:a,onChangeResolution:l}){let[s,m]=vI(null),c=s?.field==="repro"?Kc:s?.field==="device"?Yc:jc,p=d=>{s?.field==="repro"?n(d):s?.field==="device"?r(d):s?.field==="resolution"&&l?.(d),m(null)};return zf(qf,{children:[zf(qf,{children:[Yt(ve,{icon:Yt(DI,{sx:{fontSize:17}}),label:"\uC7AC\uD604\uBE48\uB3C4",onClick:t?void 0:d=>m({field:"repro",el:d}),children:Od(e.repro)||Yt(Gm,{label:"\uC120\uD0DD"})}),Yt(ve,{icon:Yt(EI,{sx:{fontSize:17}}),label:"\uB514\uBC14\uC774\uC2A4",onClick:t?void 0:d=>m({field:"device",el:d}),children:qd(e.device)||Yt(Gm,{label:"\uC120\uD0DD"})}),Yt(ve,{icon:Yt(RI,{sx:{fontSize:17}}),label:"\uBC1C\uC0DD\uD654\uBA74",children:Yt(tr,{value:e.where,placeholder:"\uC608: POS > \uC8FC\uBB38\uD604\uD669",readOnly:t,onCommit:i})}),Yt(ve,{icon:Yt(MI,{sx:{fontSize:17}}),label:"\uBC1C\uC0DD\uBC84\uC804",children:Yt(tr,{value:e.version,placeholder:"\uC608: 2026-08-06 \uBC30\uD3EC",readOnly:t,onCommit:a})}),o?Yt(ve,{icon:Yt(PI,{sx:{fontSize:17}}),label:"\uC885\uB8CC\uC0AC\uC720",onClick:t?void 0:d=>m({field:"resolution",el:d}),children:Dl(e.resolution)||Yt(Gm,{label:"\uC120\uD0DD"})}):null]}),Yt(_I,{open:!!s,anchorEl:s?.el??null,onClose:()=>m(null),transitionDuration:0,children:c.map(d=>Yt(wI,{onClick:()=>p(d.key),sx:{fontSize:14},children:d.name},d.key))})]})}import{Box as Af}from"@mui/material";import{jsxs as Lf}from"react/jsx-runtime";var Km=16;function jo({icon:e,title:t,titleExtra:o,children:n}){return Lf(Af,{sx:{px:2,display:"flex",flexDirection:"column",gap:.25},children:[Lf(Af,{sx:{display:"flex",alignItems:"center",gap:1,fontSize:Km,fontWeight:500,color:"#37352f"},children:[e,t,o]}),n]})}import{useState as Zm}from"react";import{Box as Jm,Button as $I,Divider as Wf,IconButton as Vf,Menu as HI,MenuItem as Cs,Tooltip as WI}from"@mui/material";import VI from"@mui/icons-material/MoreVert";import{ConfirmDialog as UI,ErrorAlert as GI,SuccessAlert as KI}from"@ehfuse/alerts";import{FormDialog as YI}from"@ehfuse/mui-form-dialog";import{ClearTextField as jI}from"@ehfuse/mui-form-controls";import{useEffect as Nf,useRef as Ts,useState as Ff}from"react";import{Box as za,Button as Ym,IconButton as jm,Tooltip as Xm,useMediaQuery as OI,useTheme as qI}from"@mui/material";import $f from"@mui/icons-material/EditOutlined";import zI from"@mui/icons-material/DoneOutlined";import Hf from"@mui/icons-material/Translate";import AI from"@mui/icons-material/ContentCopyOutlined";import{EhfuseEditor as LI,ImageResizePlugin as NI,minimalToolbarOptions as FI}from"@ehfuse/editor";import{jsx as Jt,jsxs as ys}from"react/jsx-runtime";function Qm(e){let t=e.trim();return t?t.startsWith("<")?e:`<p>${t}</p>`:"<p></p>"}function ai(e){let t=e.replace(/<br\s*\/?>/gi,`
|
|
7
7
|
`).replace(/<\/(p|div|li|h[1-6]|blockquote)>/gi,`
|
|
8
8
|
`),o=document.createElement("div");return o.innerHTML=t,(o.textContent??"").replace(/\n{3,}/g,`
|
|
9
9
|
|
|
@@ -15,7 +15,7 @@ import{a as ia,b as ld,c as hc,d as GP,e as KP,f as YP,g as jP,h as XP}from"./ch
|
|
|
15
15
|
`).trim():"";function Z1(e){let t=[`[\uC5C5\uBB34] ${e.title}`],o=Uo(e.start_date),n=Uo(e.due_date);(o||n)&&t.push(`\uAE30\uAC04: ${o&&n?`${o} ~ ${n}`:o||n}`),e.manager_name&&t.push(`\uCC45\uC784\uC790: ${e.manager_name}`);let r=Mt(e).name;r&&t.push(`\uC0C1\uD0DC: ${r}`);let i=_g(e.content);i&&t.push("",i);let a=String(e.note??"").trim();return a&&t.push("",`\uBE44\uACE0: ${a}`),t.join(`
|
|
16
16
|
`)}function wg(e){navigator.clipboard.writeText(e).then(()=>Q1("\uC5C5\uBB34 \uB0B4\uC6A9\uC744 \uBCF5\uC0AC\uD588\uC2B5\uB2C8\uB2E4.")).catch(()=>X1("\uBCF5\uC0AC\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uB0B4\uC6A9\uC744 \uC9C1\uC811 \uC120\uD0DD\uD574 \uBCF5\uC0AC\uD574 \uC8FC\uC138\uC694."))}function Ai(e,t,o){let n=Z1(e);if(o){o(n);return}if(t&&typeof navigator.share=="function"){navigator.share({text:n}).catch(r=>{r?.name!=="AbortError"&&wg(n)});return}wg(n)}import{Fragment as sw,jsx as Ae,jsxs as uu}from"react/jsx-runtime";function Dg({task:e,myAccountSeq:t=0,onToggleCompleted:o,onChangeTitle:n,onChangeIcon:r,onChangeIconColor:i,onClose:a,appBarMode:l=!1,activityItems:s,activityLoading:m,onLoadActivity:c,onPrint:p,onDelete:d,canDelete:u}){let f=Ue(),g=Ua({taskSeq:e.seq,items:s,loading:m,onLoad:c}),[v,D]=Ga(null),[b,S]=Ga(null),[h,E]=Ga(null),[y,T]=Ga(null),[I,A]=Ga(null),q=!!e.is_notice,C=!!e.is_event,k=q?ze(e.icon||xt):C?ze(e.icon||Rt):null,x=q&&t>0&&(e.author_account_seq??0)===t,{onReturnTask:B,onReviewDone:w,editPolicy:P,shareText:H}=ue(),_=!!B&&Qt(e,t),N=_&&!!w,G=!Cn(e,t),Q=Sr(e,t,P),se=t>0&&(e.author_account_seq??0)===t,me=!!d&&(u??!jr(e,t,P,!se)),Y=!C&&(q?x:(e.author_account_seq??0)===t||(e.manager_account_seq??0)===t);return uu(sw,{children:[uu(Li,{sx:{display:"flex",alignItems:"center",gap:1,px:2,py:1.5,flexShrink:0},children:[l&&a?Ae(Ni,{"aria-label":"\uB4A4\uB85C",onClick:a,sx:{color:"#37352f",ml:-1},children:Ae(ow,{})}):null,Y&&!l?Ae(Fi,{title:e.completed&&e.completed_by?`${e.completed_by} \xB7 ${Po(e.completed_time)} \uC644\uB8CC`:"",arrow:!0,disableInteractive:!0,slotProps:{transition:{timeout:0}},children:uu(Li,{sx:{display:"flex",flexShrink:0,mr:1},children:[Ae(Oo,{onClick:O=>A({anchorEl:O.currentTarget,nextCompleted:!e.completed}),children:e.completed?_?"\uB418\uB3CC\uB9AC\uAE30":"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC\uD558\uAE30"}),N?Ae(J1,{variant:"contained",size:"small",disableElevation:!0,onClick:O=>T(O.currentTarget),sx:{ml:1,...Cr},children:"\uAC80\uC218\uC644\uB8CC"}):null]})}):null,l||!k?null:C&&!G?Ae(Fi,{title:"\uC544\uC774\uCF58 \uBCC0\uACBD",arrow:!0,enterDelay:400,disableInteractive:!0,children:Ae(ew,{onClick:O=>S(O.currentTarget),sx:{display:"flex",p:.5,borderRadius:1,color:e.icon_color||"#1e3a8a","&:hover":{bgcolor:"#f2f2f0"}},children:Ae(k,{sx:{fontSize:20}})})}):Ae(Li,{sx:{display:"flex",px:.5,color:e.icon_color||(q?"#e5484d":"#1e3a8a")},children:Ae(k,{sx:{fontSize:20}})}),v!==null?Ae(Li,{component:"input",autoFocus:!0,spellCheck:!1,value:v,onChange:O=>D(O.target.value),onBlur:()=>{v.trim()&&v.trim()!==e.title&&n(e.seq,v.trim()),D(null)},onKeyDown:O=>{O.key==="Enter"&&O.target.blur(),O.key==="Escape"&&D(null)},sx:{flex:1,minWidth:0,border:"none",outline:"none",font:"inherit",fontSize:18,fontWeight:500,color:"#37352f",p:0,m:0}}):l?Ae(Li,{sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:q?"\uACF5\uC9C0":C?"\uC77C\uC815":e.is_bug?"\uC624\uB958":"\uC5C5\uBB34"}):Ae(Li,{onClick:Q?void 0:()=>D(e.title),sx:{flex:1,minWidth:0,fontSize:18,fontWeight:500,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",cursor:Q?"default":"text",textDecoration:e.completed?"line-through":"none"},children:e.title}),c?Ae(Fi,{title:"\uD65C\uB3D9",arrow:!0,children:Ae(Ni,{"aria-label":"\uD65C\uB3D9",onClick:g.openDialog,sx:{color:"#6b7280"},children:Ae(iw,{sx:{fontSize:20}})})}):null,Ae(Fi,{title:f?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",arrow:!0,children:Ae(Ni,{"aria-label":f?"\uACF5\uC720\uD558\uAE30":"\uB0B4\uC6A9 \uBCF5\uC0AC",onClick:()=>Ai(e,f,H),sx:{color:"#6b7280"},children:f?Ae(rw,{sx:{fontSize:20}}):Ae(nw,{sx:{fontSize:20}})})}),p?Ae(Fi,{title:"\uC778\uC1C4",arrow:!0,children:Ae(Ni,{"aria-label":"\uC778\uC1C4",onClick:()=>p(e),sx:{color:"#6b7280"},children:Ae(aw,{sx:{fontSize:20}})})}):null,me?Ae(Fi,{title:"\uC0AD\uC81C",arrow:!0,children:Ae(Ni,{"aria-label":"\uC0AD\uC81C",onClick:O=>E(O.currentTarget),sx:{color:"#6b7280","&:hover":{color:"#e5484d"}},children:Ae(Gt,{sx:{fontSize:20}})})}):null,a&&!l?Ae(Ni,{"aria-label":"\uB2EB\uAE30",onClick:a,sx:{color:"#6b7280"},children:Ae(tw,{})}):null]}),Ae(Br,{anchorEl:y,onCancel:()=>T(null),onConfirm:()=>{w?.(e),T(null)}}),Ae(_o,{open:!!I,anchorEl:I?.anchorEl??null,nextCompleted:I?.nextCompleted??!1,returnMode:_,onCancel:()=>A(null),onConfirm:O=>{I&&(O&&B?B(e,O):o(e.seq,I.nextCompleted)),A(null)}}),Ae(Ir,{anchorEl:b,value:e.icon??"",color:e.icon_color??"",onSelect:O=>{r(e.seq,O),S(null)},onSelectColor:i?O=>i(e.seq,O):void 0,onClose:()=>S(null)}),Ae(lw,{open:!!h,anchorEl:h,title:"\uC774 \uC5C5\uBB34\uB97C \uD734\uC9C0\uD1B5\uC73C\uB85C \uBCF4\uB0B4\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uC0AD\uC81C",onCancel:()=>E(null),onConfirm:()=>{E(null),d?.(e)}}),Ae(Ns,{controller:g})]})}import{useRef as Nw,useState as Ao}from"react";import{useEffect as cw,useRef as mw,useState as uw}from"react";var dw=5e3,pw=15e3,fw=25;function Eg(e){let t=e.replace(/<[^>]*>/g," ").replace(/ /g," ").replace(/\s+/g," ").trim();return Math.min(pw,Math.max(dw,Math.round(t.length/fw*1e3)))}function gw(){return typeof document>"u"?!1:document.visibilityState==="visible"&&(typeof document.hasFocus!="function"||document.hasFocus())}function Rg(e,t,o,n){let[r,i]=uw(0),a=mw(n);return a.current=n,cw(()=>{if(i(0),!t||o<=0)return;let l=0,s=Date.now(),m=!1,p=setInterval(()=>{let d=Date.now(),u=Math.min(d-s,1e3);s=d,!(m||!gw())&&(l+=u,i(Math.min(1,l/o)),l>=o&&(m=!0,a.current()))},250);return()=>clearInterval(p)},[e,t,o]),t?r:0}import{Box as tt,Button as ci,ButtonBase as $g,Checkbox as Fw,Divider as mi,Menu as ku,MenuItem as Tu}from"@mui/material";import $w from"@mui/icons-material/ExpandLess";import Hw from"@mui/icons-material/ExpandMore";import Ww from"@mui/icons-material/ConfirmationNumberOutlined";import Vw from"@mui/icons-material/FactCheckOutlined";import Hg from"@mui/icons-material/Check";import Uw from"@mui/icons-material/DirectionsRunOutlined";import Gw from"@mui/icons-material/SpeedOutlined";import yu from"@mui/icons-material/CheckCircle";import Kw from"@mui/icons-material/CheckCircleOutlineOutlined";import Su from"@mui/icons-material/CheckCircleOutlined";import Wg from"@mui/icons-material/AccessTimeOutlined";import Yw from"@mui/icons-material/AutorenewOutlined";import jw from"@mui/icons-material/LabelOutlined";import Xw from"@mui/icons-material/PersonOutlineOutlined";import Qw from"@mui/icons-material/SubjectOutlined";import Zw from"@mui/icons-material/StickyNote2Outlined";import Jw from"@mui/icons-material/PanToolAltOutlined";import Vg from"@mui/icons-material/LockOutlined";import Ug from"@mui/icons-material/PublicOutlined";import Gg from"@mui/icons-material/Group";import eD from"@mui/icons-material/Repeat";import tD from"@mui/icons-material/EventOutlined";import{useEffect as Tw,useState as yw}from"react";import{Box as ho,Button as Mg,Chip as Sw,IconButton as Cw,Tooltip as Bw}from"@mui/material";import gu from"@mui/icons-material/Check";import{ConfirmActionPopper as vw}from"@ehfuse/mui-confirm-action";import{FormDialog as Iw}from"@ehfuse/mui-form-dialog";import _w from"@mui/icons-material/Translate";import Pg from"@mui/icons-material/ContentCopyOutlined";import{useEffect as xw,useRef as du}from"react";import{useFormaState as bw,useModal as hw}from"@ehfuse/forma";var pu=new Map,kw={target:"",doneTargets:[],result:null,loading:!1,error:"",copied:!1,summaryCopied:!1};function fu(e){let t=du(e);t.current=e;let{translateContent:o}=ue(),n=du(o);n.current=o;let r=du(0),i={translate:hw({modalId:we("taskbox-content-translate"),onClose:()=>{r.current+=1}})},a=bw(kw);xw(()=>{r.current+=1,a.setValue("target","")},[e.taskSeq]);let l=d=>(t.current.translatedTargets??[]).includes(d)||(a.getValue("doneTargets")??[]).includes(d)||pu.has(`${t.current.taskSeq}:${d}`),s=d=>{a.setValue("target",d);let u=++r.current,f=t.current.taskSeq,g=n.current;if(!g||!(f>0)||!d)return;let v=`${f}:${d}`,D=pu.get(v);if(D){a.setValues({result:D,error:""});return}a.setValues({loading:!0,error:"",result:null}),g({taskSeq:f,target:d}).then(b=>{if(u!==r.current)return;pu.set(v,b);let S=a.getValue("doneTargets")??[];S.includes(d)||a.setValue("doneTargets",[...S,d]),a.setValue("result",b)}).catch(b=>{u===r.current&&a.setValue("error",b instanceof Error?b.message:"AI \uBC88\uC5ED\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4.")}).finally(()=>{u===r.current&&a.setValue("loading",!1)})},m=()=>{a.setValue("target",""),i.translate.open()},c=()=>{let d=a.getValue("result");d?.summary&&navigator.clipboard.writeText(d.summary).then(()=>{a.setValue("summaryCopied",!0),window.setTimeout(()=>a.setValue("summaryCopied",!1),1500)})},p=()=>{let d=a.getValue("result");if(!d)return;let u=d.html?ai(d.html):d.text;navigator.clipboard.writeText(`${d.title}
|
|
17
17
|
|
|
18
|
-
${u}`.trim()).then(()=>{a.setValue("copied",!0),window.setTimeout(()=>a.setValue("copied",!1),1500)})};return{modals:i,ui:a,taskSeq:e.taskSeq,isStored:l,selectTarget:s,openDialog:m,copySummary:c,copyResult:p}}import{jsx as st,jsxs as Ka}from"react/jsx-runtime";var Og=[{code:"en",label:"\uC601\uC5B4"},{code:"ja",label:"\uC77C\uBCF8\uC5B4"},{code:"zh",label:"\uC911\uAD6D\uC5B4(\uAC04\uCCB4)"},{code:"zh-TW",label:"\uC911\uAD6D\uC5B4(\uBC88\uCCB4)"},{code:"vi",label:"\uBCA0\uD2B8\uB0A8\uC5B4"},{code:"th",label:"\uD0DC\uAD6D\uC5B4"},{code:"ko",label:"\uD55C\uAD6D\uC5B4"}];function qg({controller:e,title:t,html:o}){let n=e.modals.translate,{ui:r}=e,i=String(r.useValue("target")??"");r.useValue("doneTargets");let a=r.useValue("result"),l=!!r.useValue("loading"),s=String(r.useValue("error")??""),m=!!r.useValue("copied"),c=!!r.useValue("summaryCopied"),[p,d]=yw(null),u=(g,v)=>{if(g!==i){if(g===""||e.isStored(g)){e.selectTarget(g);return}d({code:g,anchor:v})}};Tw(()=>{n.isOpen&&d(null)},[n.isOpen,e.taskSeq]);let f=Ka(ho,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[st(ho,{sx:{display:"flex",flexWrap:"wrap",gap:.75},children:[{code:"",label:"\uC6D0\uBB38"},...Og].map(g=>st(Sw,{label:g.label,clickable:!0,icon:g.code&&e.isStored(g.code)?st(gu,{sx:{fontSize:16}}):void 0,onClick:v=>u(g.code,v.currentTarget),color:i===g.code?"primary":"default",variant:i===g.code?"filled":"outlined",sx:{fontSize:14,height:30}},g.code||"__source__"))}),st(vw,{open:!!p,anchorEl:p?.anchor??null,title:`${Og.find(g=>g.code===p?.code)?.label??""}\uB85C AI \uBC88\uC5ED\uC744 \uC2DC\uC791\uD560\uAE4C\uC694?`,confirmText:"\uC2DC\uC791",cancelText:"\uCDE8\uC18C",placement:"bottom-start",onCancel:()=>d(null),onConfirm:()=>{p&&e.selectTarget(p.code),d(null)}}),i?l?st(ho,{sx:{minHeight:200,display:"flex",alignItems:"center",justifyContent:"center"},children:st(Bi,{})}):s?st(ho,{sx:{fontSize:15,color:"#c62828",py:2},children:s}):a?Ka(ho,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[a.summary?Ka(ho,{sx:{position:"relative",display:"flex",alignItems:"center",gap:2,px:1.5,pr:5,py:1.25,bgcolor:"#eef4ff",border:"1px solid #c7d7fe",borderRadius:1},children:[st(Bw,{title:"\uC694\uC57D \uBCF5\uC0AC",arrow:!0,children:st(Cw,{size:"small","aria-label":"\uC694\uC57D \uBCF5\uC0AC",onClick:e.copySummary,sx:{position:"absolute",top:4,right:4,color:"#64748b"},children:c?st(gu,{sx:{fontSize:18,color:"#2f9e5b"}}):st(Pg,{sx:{fontSize:18}})})}),st(_w,{sx:{fontSize:30,color:"#2563eb",flexShrink:0,mx:1.5}}),Ka(ho,{sx:{flex:1,minWidth:0},children:[st(ho,{sx:{fontSize:16,fontWeight:600,color:"#1e3a8a"},children:"AI \uBC88\uC5ED (Gemini) \xB7 \uC6D0\uBB38\uACFC \uB2E4\uB97C \uC218 \uC788\uC2B5\uB2C8\uB2E4"}),st(ho,{sx:{fontSize:15,color:"#111",mt:.25,lineHeight:1.5,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:a.summary})]})]}):null,st(ho,{sx:{fontSize:18,fontWeight:700,color:"#111",wordBreak:"break-word"},children:a.title}),a.html?st(ho,{sx:{fontSize:16,lineHeight:1.6,color:"#37352f",wordBreak:"break-word","& > p:first-of-type":{mt:0},"& > p:last-of-type":{mb:0},"& a[href]":{color:"#2563eb",textDecoration:"underline"},"& img":{maxWidth:"100%"}},dangerouslySetInnerHTML:{__html:a.html}}):st(ho,{sx:{fontSize:16,lineHeight:1.6,color:"#37352f",whiteSpace:"pre-wrap"},children:a.text})]}):null:Ka(ho,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[st(ho,{sx:{fontSize:18,fontWeight:700,color:"#111",wordBreak:"break-word"},children:t}),st(ho,{sx:{fontSize:16,lineHeight:1.6,color:"#37352f",wordBreak:"break-word","& > p:first-of-type":{mt:0},"& > p:last-of-type":{mb:0},"& a[href]":{color:"#2563eb",textDecoration:"underline"},"& img":{maxWidth:"100%"}},dangerouslySetInnerHTML:{__html:o||"<p></p>"}})]})]});return st(Iw,{open:n.isOpen,onClose:n.close,width:760,title:"\uB0B4\uC6A9 \uBC88\uC5ED",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-content-translate",maxContentHeight:"80vh",sectionContentPaddingTop:0,sections:[{id:"translate",showTitle:!1,children:f}],actions:{showCancelButton:!1,left:i&&a?st(Mg,{variant:"outlined",color:"inherit",startIcon:m?st(gu,{sx:{fontSize:18,color:"#2f9e5b"}}):st(Pg,{sx:{fontSize:18}}),onClick:e.copyResult,sx:{minWidth:80,color:"#37352f",borderColor:"#d9d9d6"},children:"\uBCF5\uC0AC"}):void 0,right:st(Mg,{variant:"contained",onClick:n.close,sx:{minWidth:80},children:"\uB2EB\uAE30"})}})}import{ConfirmActionPopper as oD}from"@ehfuse/mui-confirm-action";import{DatePicker as nD}from"@ehfuse/mui-datetime-picker";import{useState as ww}from"react";import{TextField as Dw}from"@ehfuse/mui-form-controls";import{jsx as Ew}from"react/jsx-runtime";function zg({value:e,onCommit:t,onDraftChange:o,readOnly:n=!1}){let[r,i]=ww(null);return Ew(Dw,{value:r??e,placeholder:n?"":"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",slotProps:{input:{readOnly:n}},onChange:a=>{i(a.target.value),o?.(a.target.value)},onBlur:()=>{r!==null&&r.trim()!==e&&t(r),i(null)},onKeyDown:a=>{a.key==="Enter"&&a.target.blur(),a.key==="Escape"&&i(null)},sx:{mt:1}})}import{useMemo as hu,useState as Rw}from"react";import{Box as ao,Button as Ng,IconButton as Mw}from"@mui/material";import Pw from"@mui/icons-material/AccountTreeOutlined";import Ow from"@mui/icons-material/LinkOutlined";import qw from"@mui/icons-material/Close";import zw from"@mui/icons-material/RedoOutlined";function si(e){return e.relations??[]}function J8(e,t,o){return si(e).some(n=>n.type===o&&n.task_seq===t.seq)||si(t).some(n=>n.type===o&&n.task_seq===e.seq)}function Ag(e){return`${e.created_time??""}|${String(e.seq).padStart(12,"0")}`}function xu(e,t){let o=new Map(t.map(f=>[f.seq,f]));o.set(e.seq,e);let n=new Map,r=(f,g)=>{n.has(f)||n.set(f,new Set),n.has(g)||n.set(g,new Set),n.get(f).add(g),n.get(g).add(f)};for(let f of o.values())for(let g of si(f))g.type==="follow_up"&&o.has(g.task_seq)&&r(f.seq,g.task_seq);let i=new Set([e.seq]),a=[e.seq];for(;a.length>0;){let f=a.shift();for(let g of n.get(f)??[])i.has(g)||(i.add(g),a.push(g))}let l=[...i].map(f=>o.get(f)).filter(f=>!!f).sort((f,g)=>Ag(f).localeCompare(Ag(g))),s=new Set;for(let f of si(e))f.type==="related"&&s.add(f.task_seq);for(let f of o.values())f.seq!==e.seq&&si(f).some(g=>g.type==="related"&&g.task_seq===e.seq)&&s.add(f.seq);let m=[...s].map(f=>o.get(f)).filter(f=>f!==void 0&&f.seq!==e.seq),c=[...o.values()].filter(f=>f.seq!==e.seq&&si(f).some(g=>g.type==="duplicate_of"&&g.task_seq===e.seq)),p=si(e).find(f=>f.type==="duplicate_of")?.task_seq,d=p?o.get(p)??null:null,u=[...o.values()].filter(f=>f.seq!==e.seq&&(f.checklist??[]).some(g=>Number(g.task_seq??0)===e.seq));return{lineage:l,related:m,duplicates:c,duplicateOf:d,parents:u}}function bu(e,t){let o=xu(e,t);return(o.lineage.length>=2?o.lineage.length-1:0)+o.related.length+o.duplicates.length+(o.duplicateOf?1:0)+o.parents.length}function Lg(e,t){return bu(e,t)>0}import{ConfirmActionPopper as Aw}from"@ehfuse/mui-confirm-action";import{Fragment as Lw,jsx as pt,jsxs as bn}from"react/jsx-runtime";function Fs({item:e,caption:t,onOpen:o,onUnlink:n}){let r=e.is_notice||e.is_event?ze(e.icon||(e.is_notice?xt:Rt)):null;return bn(ao,{sx:{display:"flex",alignItems:"center",gap:.75,px:1.25,py:.5,borderRadius:1,"&:hover":{bgcolor:"#f7f7f5"},"&:hover .taskbox-relation-unlink":{opacity:1}},children:[t?pt(ao,{component:"span",sx:{flexShrink:0,px:.6,py:.1,borderRadius:.75,fontSize:11.5,fontWeight:500,color:"#8a6d1d",bgcolor:"#faf1d7"},children:t}):null,r?pt(r,{sx:{fontSize:16,flexShrink:0,color:e.icon_color||"#1e3a8a"}}):null,bn(ao,{component:"span",onClick:o,sx:{flex:1,minWidth:0,fontSize:14,color:e.completed?"#9a9a97":"#37352f",textDecoration:e.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...o?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[e.ticket_no?`${e.ticket_no} `:"",e.title]}),pt($e,{option:Mt(e),small:!0}),n?pt(Mw,{className:"taskbox-relation-unlink",size:"small","aria-label":"\uC5F0\uACB0 \uD574\uC81C",onClick:n,sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:pt(qw,{sx:{fontSize:15}})}):null]})}function Fg({task:e,tasks:t,readOnly:o=!1,onOpenTask:n,onLink:r,onUnlink:i,onCreateFollowUp:a}){let l=Aa({onSubmit:(g,v)=>r?.(e.seq,g,v)}),[s,m]=Rw(null),c=hu(()=>xu(e,t),[e,t]),p=c.lineage.length>=2,d=hu(()=>bu(e,t),[e,t]),u=hu(()=>{let g=new Set;for(let v of c.lineage)g.add(v.seq);for(let v of c.related)g.add(v.seq);for(let v of c.duplicates)g.add(v.seq);for(let v of c.parents)g.add(v.seq);return c.duplicateOf&&g.add(c.duplicateOf.seq),[...g]},[c]),f=(g,v,D)=>{m({anchorEl:g,targetSeq:v,type:D})};return bn(jo,{icon:pt(Pw,{sx:{fontSize:19,display:"block"}}),title:bn(Lw,{children:["\uAD00\uB828 \uC5C5\uBB34",d>0?pt(ao,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:d}):null]}),titleExtra:o?null:bn(ao,{sx:{ml:"auto",display:"flex",alignItems:"center",gap:.5},children:[a?pt(Ng,{size:"small",color:"inherit",startIcon:pt(zw,{sx:{fontSize:16}}),onClick:()=>a(e.seq),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uD6C4\uC18D \uC5C5\uBB34"}):null,r?pt(Ng,{size:"small",color:"inherit",startIcon:pt(Ow,{sx:{fontSize:16}}),onClick:l.openDialog,sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uC5F0\uACB0"}):null]}),children:[bn(ao,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:[p?pt(ao,{sx:{mb:c.related.length||c.duplicates.length||c.duplicateOf?1:0},children:c.lineage.map((g,v)=>{let D=g.seq===e.seq,b=v===c.lineage.length-1;return bn(ao,{sx:{display:"flex",gap:1},children:[bn(ao,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:14,flexShrink:0,pt:1.1},children:[pt(ao,{sx:{width:D?9:7,height:D?9:7,borderRadius:"50%",bgcolor:D?"#2f80ed":g.completed?"#9a9a97":"#c9c8c5",flexShrink:0}}),b?null:pt(ao,{sx:{width:"2px",flex:1,bgcolor:"#e6e6e3"}})]}),bn(ao,{sx:{flex:1,minWidth:0,pb:b?0:.5},children:[bn(ao,{sx:{display:"flex",alignItems:"center",gap:.75},children:[bn(ao,{component:"span",onClick:!D&&n?()=>n(g.seq):void 0,sx:{minWidth:0,fontSize:14,fontWeight:D?600:400,color:D?"#2f80ed":g.completed?"#9a9a97":"#37352f",textDecoration:g.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...!D&&n?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[g.ticket_no?`${g.ticket_no} `:"",g.title]}),pt($e,{option:Mt(g),small:!0})]}),pt(ao,{sx:{fontSize:12,color:"#9a9a97"},children:g.completed&&g.completed_time?`${g.completed_time} \uC644\uB8CC`:g.created_time??""})]})]},g.seq)})}):null,c.parents.map(g=>pt(Fs,{item:g,caption:"\uC0C1\uC704 \uC5C5\uBB34",onOpen:n?()=>n(g.seq):void 0},`parent-${g.seq}`)),c.duplicateOf?pt(Fs,{item:c.duplicateOf,caption:"\uC6D0\uBCF8",onOpen:n?()=>n(c.duplicateOf.seq):void 0,onUnlink:!o&&i?g=>f(g.currentTarget,c.duplicateOf.seq,"duplicate_of"):void 0}):null,c.duplicates.map(g=>pt(Fs,{item:g,caption:"\uC911\uBCF5",onOpen:n?()=>n(g.seq):void 0,onUnlink:!o&&i?v=>f(v.currentTarget,g.seq,"duplicate_of"):void 0},`dup-${g.seq}`)),c.related.map(g=>pt(Fs,{item:g,onOpen:n?()=>n(g.seq):void 0,onUnlink:!o&&i?v=>f(v.currentTarget,g.seq,"related"):void 0},`rel-${g.seq}`)),d===0?pt(ao,{sx:{px:1.25,py:.75,fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]}),r?pt(_s,{controller:l,task:e,tasks:t,excludeSeqs:u}):null,pt(Aw,{open:!!s,anchorEl:s?.anchorEl??null,title:"\uC774 \uC5C5\uBB34\uC640\uC758 \uC5F0\uACB0\uC744 \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uD574\uC81C",onCancel:()=>m(null),onConfirm:()=>{s&&i?.(e.seq,s.targetSeq,s.type),m(null)}})]})}import{Fragment as ko,jsx as L,jsxs as Ze}from"react/jsx-runtime";function Or({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return L(tt,{component:"span",sx:{color:"#9a9a97"},children:e})}function Kg({task:e,customTabs:t,statusOptions:o,avatarSrcByName:n,onChangeStatus:r,onChangeLabels:i,onAddLabelOption:a,onChangeProject:l,onAddProject:s,onChangeDate:m,onChangeReminder:c,onMemberEdit:p,onChangePriority:d,onChangeVisibility:u,onChangeRepeat:f,departments:g=[],onChangeEventTime:v,onChangeEventPlace:D,onChangeEventAddress:b,onChangeNote:S,onChangeNoteDraft:h,onChangeContent:E,contentTemplates:y,onSaveContentTemplate:T,onRemoveContentTemplate:I,contentLoading:A=!1,onAddChecklistItem:q,onToggleChecklistItem:C,onRemoveChecklistItem:k,onUpdateChecklistItem:x,onReorderChecklist:B,onConvertChecklistToTask:w,onOpenChecklistTask:P,onLinkChecklistTask:H,resolveChecklistTask:_,relatedTasksPool:N,onOpenRelatedTask:G,onLinkRelatedTask:Q,onUnlinkRelatedTask:se,onCreateFollowUpTask:me,onAddAttachments:Y,onRemoveAttachment:O,onPreview:oe,onDownload:F,onUpdateComment:W,onRemoveComment:V,onToggleCommentReaction:U,currentUserName:de="",myAccountSeq:re=0,headerless:Te=!1,noticeAdmin:j=!1,hideProject:ne=!1,hideLabel:he=!1,showTitle:Ce=!1,onChangeTitle:_e,onToggleCompleted:Le,onChangeIcon:ct,onChangeIconColor:Ge,employees:Pe=[],onAckConfirm:Ne,onRequestConfirm:K,onChangeBugField:ae,sprints:We=[],sprintProject:Ft=!1,hideSprint:$o=!1,onChangeSprint:$t,onChangeStoryPoints:ie,onChangeResolution:Qe,onClaimTask:Ho,onVerifyBug:Co}){let[Ht,Hn]=Ao(null),Bo=Nw(!1),[wt,Z]=Ao(null),[z,Oe]=Ao(null),[Wt,Ve]=Ao(null),[$,X]=Ao(!1),fe={[gn]:$?{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"}},[De,rt]=Ao(null),[it,zt]=Ao(null),[Dt,Vt]=Ao(null),[to,Et]=Ao(null),[Wn,tn]=Ao(null),[fr,gr]=Ao(null),[ui,di]=Ao(null),Ee=!!e.is_notice,at=!!e.is_event,Wo=!!e.is_bug,ea=!!Ho&&Fl(e,re),{onReturnTask:pi,onReviewDone:fl,editPolicy:Ke,translateContent:Wr,contentTranslate:on}=ue(),ta=Te&&!!fl&&!!pi&&Qt(e,re),[Vr,xr]=Ao(null),Mo=!!(Wr&&on),br=fu({taskSeq:e.seq,translatedTargets:e.translated_targets??[]}),gc=!!Ho&&$l(e,re),oa=!!Co&&Wo&&!!e.completed&&re>0&&(e.author_account_seq??0)===re&&!(e.acks??[]).some(M=>M.account_seq===re),nn=!Cn(e,re),po=Sr(e,re,Ke),fo=!e.is_event&&(e.is_notice?re>0&&(e.author_account_seq??0)===re:(e.author_account_seq??0)===re||(e.manager_account_seq??0)===re),hr=e.is_notice||e.is_event?ze(e.icon||(e.is_notice?xt:Rt)):null,Ur=Ee?!Nl(e,re):nn,kr=ea||gc?Ze(Oo,{onClick:M=>di(M.currentTarget),children:[L(Jw,{sx:{fontSize:16,mr:.5}}),"\uAC00\uC838\uAC00\uAE30"]}):null,Vn=Ee?qs(e,Pe):"",Ut=Ee?ag(e,Pe,re):null,Xt=Ee?null:_r(e,re),gl=Eg(e.content??""),na=Rg(e.seq,!!(Xt?.canConfirm&&Ne),gl,()=>Ne?.(e.seq)),xc=Math.max(1,Math.ceil((1-na)*gl/1e3)),bc=!!(Xt&&Xt.total>0||Ee&&Ut),xl=(e.origin_license_seq??0)>0,bl=!Ee&&!xl,ra=Ze(ko,{children:[L(ve,{icon:L(Xw,{sx:{fontSize:17}}),label:"\uC791\uC131\uC790",sx:[qn(9),fe??null,...at?[]:[kt(1)]],children:e.created_by?Ze(ko,{children:[L(go,{names:[e.created_by],size:20,avatarSrcByName:n}),e.created_by]}):L(Or,{})}),L(ve,{icon:L(Wg,{sx:{fontSize:17}}),label:"\uC791\uC131\uC77C\uC2DC",sx:[qn(11),fe??null,...at?[]:[kt(2)]],children:e.created_time?Po(e.created_time):L(Or,{})})]});return Ze(ko,{children:[Ce?Ze(tt,{sx:{px:2,pt:2,pb:.5,display:"flex",alignItems:"flex-start",gap:1},children:[fo?L(Fw,{checked:e.completed,icon:L(Kw,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:L(yu,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(M,At)=>{z||Oe({anchorEl:M.currentTarget,nextCompleted:At})},sx:{p:0,mt:.25}}):null,hr?at&&!nn?L($g,{onClick:M=>Z(M.currentTarget),sx:{display:"flex",p:.25,mt:.1,borderRadius:1,color:e.icon_color||"#1e3a8a","&:hover":{bgcolor:"#f2f2f0"}},children:L(hr,{sx:{fontSize:20}})}):L(tt,{sx:{display:"flex",p:0,mt:.25,color:e.icon_color||(Ee?"#e5484d":"#1e3a8a")},children:L(hr,{sx:{fontSize:20}})}):null,L(tt,{sx:{flex:1,minWidth:0},children:Ht!==null?L(tt,{component:"div",contentEditable:!0,suppressContentEditableWarning:!0,spellCheck:!1,ref:M=>{if(!M||M.dataset.focused)return;M.dataset.focused="1",M.focus();let At=document.createRange();At.selectNodeContents(M),At.collapse(!1);let yn=window.getSelection();yn?.removeAllRanges(),yn?.addRange(At)},onBlur:M=>{let At=(M.currentTarget.textContent??"").replace(/\n/g," ").trim();!Bo.current&&At&&At!==e.title&&_e(e.seq,At),Bo.current=!1,Hn(null)},onKeyDown:M=>{M.key==="Enter"&&(M.preventDefault(),M.target.blur()),M.key==="Escape"&&(Bo.current=!0,M.target.blur())},onPaste:M=>{M.preventDefault();let At=M.clipboardData.getData("text/plain").replace(/\n/g," ");document.execCommand("insertText",!1,At)},sx:{outline:"none",fontSize:19,fontWeight:600,color:"#37352f",lineHeight:"26px",cursor:"text",textDecoration:e.completed?"line-through":"none",userSelect:"text",wordBreak:"break-word"},children:Ht}):L(tt,{onClick:po?void 0:()=>Hn(e.title),sx:{fontSize:19,fontWeight:600,color:"#37352f",lineHeight:"26px",cursor:po?"default":"text",textDecoration:e.completed?"line-through":"none",userSelect:"text",wordBreak:"break-word"},children:e.title})}),L(_o,{open:!!z,anchorEl:z?.anchorEl??null,nextCompleted:z?.nextCompleted??!1,returnMode:!!pi&&Qt(e,re),onCancel:()=>Oe(null),onConfirm:M=>{z&&(M&&pi?pi(e,M):Le(e.seq,z.nextCompleted)),Oe(null)}})]}):null,Ze(tt,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:0,[gn]:{pb:0,"& > :last-child":{mb:0}}},children:[L(hs,{hideProject:ne,pinColumns:!0,projectColumn:!at&&!he?2:"full",values:{tabKey:e.tab_key??"",managerName:e.manager_name,receiverNames:e.receiver_names,startDate:e.start_date,dueDate:e.due_date,reminders:vn(e),priority:e.priority,eventTime:e.event_time??"",eventPlace:e.event_place??"",eventAddress:e.event_address??""},customTabs:t,avatarSrcByName:Wl(e,n),hideDueDate:!at&&!!e.repeat_rule,notice:Ee,event:at,readOnly:nn,coreLocked:po,targetSummary:Vn,onChangeProject:M=>l(e.seq,M),onAddProject:s,onChangeStartDate:M=>m(e.seq,"start_date",M),onChangeDueDate:M=>m(e.seq,"due_date",M),onChangeReminder:M=>c(e.seq,M),onChangePriority:M=>d(e.seq,M),onChangeEventTime:M=>v?.(e.seq,M),onChangeEventPlace:M=>D?.(e.seq,M),onChangeEventAddress:M=>b?.(e.seq,M),onMemberEdit:M=>p(e,M,null),narrowCollapsedSx:fe,reminderLocked:e.completed,managerAction:kr,supportOrigin:(e.origin_license_seq??0)>0?{licenseName:e.origin_license_name??"",authorName:e.origin_author_name||e.author_name||e.created_by||"",contactPhone:e.origin_contact_phone??"",contactEmail:e.origin_contact_email??"",supportType:jl(e.support_type??"")}:void 0,leading:Ze(ko,{children:[oa||kr&&(Ee||at)?Ze(tt,{sx:{gridColumn:"1 / -1",display:"flex",justifyContent:"flex-start",gap:2,px:2,py:1.5},children:[Ee||at?kr:null,oa?Ze(ko,{children:[L(ci,{variant:"contained",size:"large",onClick:()=>Co?.(e.seq,!0),sx:{bgcolor:"#2f80ed"},children:"\uAC80\uC99D\uC644\uB8CC"}),L(ci,{variant:"outlined",size:"large",color:"error",onClick:()=>Co?.(e.seq,!1),children:"\uC7AC\uC624\uD508"})]}):null]}):null,Wo&&e.ticket_no?L(ve,{icon:L(Ww,{sx:{fontSize:17}}),label:"\uD2F0\uCF13",sx:kt(1),children:L(tt,{component:"span",sx:{fontVariantNumeric:"tabular-nums"},children:e.ticket_no})}):null,at?null:L(tt,{sx:Wo&&e.ticket_no||bl||bc?kt(Wo&&e.ticket_no?2:1):{gridColumn:"1 / -1"},children:L(ve,{icon:L(Yw,{sx:{fontSize:17}}),label:"\uC0C1\uD0DC",onClick:nn||e.completed?void 0:M=>rt(M),children:L($e,{option:Mt(e)})})}),ta?Ze(ve,{icon:L(Vw,{sx:{fontSize:17}}),label:"\uAC80\uC218",sx:{gridColumn:"1 / -1"},children:[L(Oo,{onClick:M=>Oe({anchorEl:M.currentTarget,nextCompleted:!1}),children:"\uB418\uB3CC\uB9AC\uAE30"}),L(ci,{size:"small",variant:"contained",disableElevation:!0,onClick:M=>{M.stopPropagation(),xr(M.currentTarget)},sx:{ml:1,...Cr},children:"\uAC80\uC218\uC644\uB8CC"}),L(Br,{anchorEl:Vr,onCancel:()=>xr(null),onConfirm:()=>{fl?.(e),xr(null)}})]}):null,bl?(()=>{let M=ln(e),At=M==="all"?L(Ug,{sx:{fontSize:17,color:"#2f80ed"}}):M==="group"?L(Gg,{sx:{fontSize:17,color:"#d9730d"}}):L(Vg,{sx:{fontSize:17}}),yn=M==="all"?"\uC804\uCCB4\uACF5\uAC1C":M==="group"?`\uBD80\uC11C\uACF5\uAC1C \xB7 ${g.find(Gr=>Gr.seq===(e.visibility_group_seq??0))?.name??"\uBD80\uC11C"}`:"\uBE44\uACF5\uAC1C";return L(tt,{sx:at?void 0:kt(Wo?1:2),children:L(ve,{icon:At,label:"\uACF5\uAC1C",onClick:po||!u?void 0:Gr=>zt(Gr),children:yn})})})():null,!Wo&&!xl?L(tt,{sx:at?void 0:kt(1),children:L(ve,{icon:L(eD,{sx:{fontSize:17,...e.repeat_rule?{color:"#2f80ed"}:{}}}),label:"\uBC18\uBCF5",onClick:po||!f?void 0:M=>Vt(M),children:e.repeat_rule?Bl(e.repeat_rule):L(Or,{label:"\uC5C6\uC74C"})})}):null,!Wo&&e.repeat_rule?L(tt,{sx:at?void 0:kt(2),children:L(ve,{icon:L(tD,{sx:{fontSize:17}}),label:"\uBC18\uBCF5 \uC885\uB8CC",onClick:po||!f?void 0:M=>Et(M),children:e.repeat_until?`${e.repeat_until}\uAE4C\uC9C0`:L(Or,{})})}):null,Xt&&Xt.total>0?L(tt,{sx:at?void 0:kt(2),children:L(ve,{icon:L(Su,{sx:{fontSize:17}}),label:"\uD655\uC778",children:Xt.canConfirm?Ze(tt,{sx:{display:"inline-flex",alignItems:"center",gap:1,flexWrap:"wrap"},children:[L(ci,{size:"small",variant:"contained",onClick:()=>Ne?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",backgroundImage:`linear-gradient(to right, #1a5fc4 ${na*100}%, transparent ${na*100}%)`,boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}),Ze(tt,{component:"span",sx:{fontSize:14,color:"text.secondary",whiteSpace:"nowrap"},children:[xc,"\uCD08 \uB4A4 \uC790\uB3D9 \uD655\uC778"]})]}):Ze(ci,{size:"small",variant:"outlined",color:"inherit",startIcon:Xt.myTime?L(yu,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:M=>Ve({anchorEl:M.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:[Xt.count," / ",Xt.total]})})}):null,Ee&&Ut?L(tt,{sx:kt(2),children:L(ve,{icon:L(Su,{sx:{fontSize:17}}),label:"\uD655\uC778",children:L(tt,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,minWidth:0},children:Ut.canAck?L(ci,{size:"small",variant:"contained",onClick:()=>Ne?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):L(ci,{size:"small",variant:"outlined",color:"inherit",startIcon:Ut.acked?L(yu,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:M=>Ve({anchorEl:M.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:Ut.total>0&&Ut.count>=Ut.total?"\uC644\uB8CC":Ze(ko,{children:[Ut.count,L(tt,{component:"span",sx:{mx:.4},children:"/"}),Ut.total]})})})})}):null,Ft&&!$o&&!at&&!Ee?Ze(ko,{children:[L(ve,{icon:L(Uw,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:po?void 0:M=>tn(M),sx:kt(1),children:(e.sprint_seq??0)>0?We.find(M=>M.seq===e.sprint_seq)?.name??"\uC0AD\uC81C\uB41C \uC2A4\uD504\uB9B0\uD2B8":L(Or,{label:"\uBBF8\uBC30\uC815"})}),L(ve,{icon:L(Gw,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",sx:kt(2),children:L(tr,{value:(e.story_points??0)>0?String(e.story_points):"",placeholder:"\uBBF8\uCD94\uC815",readOnly:po,onCommit:M=>ie?.(e.seq,Number(M.replace(/[^0-9.]/g,""))||0)})})]}):null,at||he?null:L(tt,{sx:[ne?{gridColumn:"1 / -1"}:kt(1),fe??null],children:L(ve,{icon:L(jw,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:nn?void 0:M=>gr(M),children:(e.label_keys??[]).length>0?L(yr,{labelKeys:e.label_keys??[],labelOptions:o}):L(Or,{})})})]}),afterProject:at?null:ra,trailing:Ze(ko,{children:[Wo?L(ks,{values:{repro:e.bug_repro??"",device:e.bug_device??"",where:e.bug_where??"",version:e.bug_version??"",resolution:e.resolution??""},readOnly:po,showResolution:!!e.completed,onChangeRepro:M=>ae?.(e.seq,"bug_repro",M),onChangeDevice:M=>ae?.(e.seq,"bug_device",M),onChangeWhere:M=>ae?.(e.seq,"bug_where",M),onChangeVersion:M=>ae?.(e.seq,"bug_version",M),onChangeResolution:M=>Qe?.(e.seq,M)}):null,at?ra:null,e.completed?Ze(ko,{children:[L(ve,{icon:L(Su,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC790",sx:[qn(10),fe??null,...at?[]:[kt(1)]],children:e.completed_by?Ze(ko,{children:[L(go,{names:[e.completed_by],size:20,avatarSrcByName:n}),e.completed_by]}):L(Or,{})}),L(ve,{icon:L(Wg,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC77C\uC2DC",sx:[qn(12),fe??null,...at?[]:[kt(2)]],children:e.completed_time?Po(e.completed_time):L(Or,{})})]}):null]})}),Ze(tt,{sx:{display:"none",[gn]:{display:"block",mt:1.5,mb:0}},children:[L(mi,{sx:{borderColor:"#e6e6e3"}}),L($g,{onClick:()=>X(M=>!M),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:$?Ze(ko,{children:["\uC811\uAE30 ",L($w,{sx:{fontSize:18}})]}):Ze(ko,{children:["\uC815\uBCF4 \uB354\uBCF4\uAE30 ",L(Hw,{sx:{fontSize:18}})]})})]}),Ze(tt,{children:[L(mi,{sx:{my:1.5,borderColor:"#e6e6e3",[gn]:{mt:0,mb:1.25}}}),L(jo,{icon:L(Qw,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",titleExtra:L(vs,{content:e.content??"",templates:y??[],onApply:M=>E?.(e.seq,M),onSave:T,onRemove:I,readOnly:po||!y}),children:L(tt,{sx:{userSelect:"text"},children:A?L(tt,{sx:{minHeight:180,display:"flex",alignItems:"center",justifyContent:"center"},children:L(Bi,{})}):L(Ss,{syncKey:e.seq,value:e.content??"",readOnly:po,viewFirst:!0,onTranslate:Mo?br.openDialog:void 0,onChange:M=>E(e.seq,M)})})}),e.is_bug?null:Ze(ko,{children:[L(mi,{sx:{my:1.5,borderColor:"#e6e6e3"}}),L(jo,{icon:L(Zw,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:L(tt,{sx:{userSelect:"text"},children:L(zg,{value:e.note,readOnly:Ur,onCommit:M=>S(e.seq,M),onDraftChange:h?M=>h(e.seq,M):void 0})})})]}),at?null:Ze(ko,{children:[L(mi,{sx:{my:1.5,borderColor:"#e6e6e3"}}),L(ws,{taskSeq:e.seq,checklist:e.checklist??[],removeLocked:Ur,onAdd:q,onToggle:C,confirmOnToggle:!0,onRemove:k,onUpdate:x,onReorder:B,onConvertToTask:w,onOpenLinkedTask:P,resolveLinkedTask:_,myAccountSeq:re,linkCandidates:N,linkBaseTask:e,onLinkExistingTask:H})]}),N&&!at&&!Ee&&(!nn||Lg(e,N))?Ze(ko,{children:[L(mi,{sx:{my:1.5,borderColor:"#e6e6e3"}}),L(Fg,{task:e,tasks:N,readOnly:nn,onOpenTask:G,onLink:Q,onUnlink:se,onCreateFollowUp:me})]}):null,L(mi,{sx:{my:1.5,borderColor:"#e6e6e3"}}),L(Ms,{taskSeq:e.seq,attachments:e.attachments??[],removeLocked:Ee?Ur:po,onAdd:Y,onRemove:O,onPreview:oe?(M,At)=>oe({...M,taskSeq:e.seq},At?.map(yn=>({...yn,taskSeq:e.seq}))):void 0,onDownload:F?M=>F({...M,taskSeq:e.seq}):void 0})]}),L(mi,{sx:{my:1.5,borderColor:"#e6e6e3"}}),L(Bg,{taskSeq:e.seq,comments:e.comments??[],currentUserName:de,myAccountSeq:re,avatarSrcByName:n,onUpdate:W,onRemove:V,onToggleReaction:U,onPreview:oe?(M,At)=>oe({...M,taskSeq:e.seq},At?.map(yn=>({...yn,taskSeq:e.seq}))):void 0,onDownload:F?M=>F({...M,taskSeq:e.seq}):void 0})]}),Mo?L(qg,{controller:br,title:e.title,html:e.content??""}):null,L(hi,{anchorEl:De,value:e.status,options:Ee?fa:Wo?Yr:ga,onSelect:M=>r(e.seq,M),onClose:()=>rt(null)}),L(ku,{transitionDuration:0,anchorEl:Dt,open:!!Dt,onClose:()=>Vt(null),children:[{value:"",label:"\uC5C6\uC74C"},...ua].map(M=>L(Tu,{selected:(e.repeat_rule??"")===M.value,onClick:()=>{Vt(null),Hc(e,M.value,f)},sx:{fontSize:14,minWidth:140},children:M.label},M.value||"none"))}),L(nD,{anchorEl:to,open:!!to,onClose:()=>Et(null),selectedDate:e.repeat_until?new Date(`${e.repeat_until}T00:00:00`):new Date,onDateChange:M=>{Et(null),Wc(e,M,f)}}),L(ku,{transitionDuration:0,anchorEl:it,open:!!it,onClose:()=>zt(null),children:[{key:"involved",label:"\uBE44\uACF5\uAC1C",icon:L(Vg,{sx:{fontSize:17,color:"#57564f"}}),selected:ln(e)==="involved",onPick:()=>u?.(e.seq,"involved",0)},{key:"all",label:"\uC804\uCCB4\uACF5\uAC1C",icon:L(Ug,{sx:{fontSize:17,color:"#2f80ed"}}),selected:ln(e)==="all",onPick:()=>u?.(e.seq,"all",0)},...g.map(M=>({key:`group-${M.seq}`,label:`\uBD80\uC11C\uACF5\uAC1C \xB7 ${M.name}`,icon:L(Gg,{sx:{fontSize:17,color:"#d9730d"}}),selected:ln(e)==="group"&&(e.visibility_group_seq??0)===M.seq,onPick:()=>u?.(e.seq,"group",M.seq)}))].map(M=>Ze(Tu,{selected:M.selected,onClick:()=>{M.onPick(),zt(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[M.icon,M.label,M.selected?L(Hg,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},M.key))}),L(ku,{transitionDuration:0,anchorEl:Wn,open:!!Wn,onClose:()=>tn(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...We.filter(M=>`custom-${M.group_seq}`===String(e.tab_key??"")).map(M=>({seq:M.seq,label:Ko(M)}))].map(M=>Ze(Tu,{onClick:()=>{$t?.(e.seq,M.seq),tn(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[M.label,(e.sprint_seq??0)===M.seq?L(Hg,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},M.seq))}),L(os,{anchorEl:Wt?.anchorEl??null,open:!!Wt?.open,acks:e.acks??[],total:Ut?.total??Xt?.total??0,pendingNames:Ut?.pendingNames??Xt?.pendingNames??[],avatarSrcByName:n,onRequestConfirm:K&&(Ut?Ut.count<Ut.total:Xt&&Xt.count<Xt.total)?()=>{K(e.seq),Ve(M=>M?{...M,open:!1}:null)}:void 0,onClose:()=>Ve(M=>M?{...M,open:!1}:null)}),L(Os,{anchorEl:fr,selectedKeys:e.label_keys??[],labelOptions:o,onToggle:M=>i(e.seq,Pl(e.label_keys??[],M)),onAddLabel:a,onClose:()=>gr(null)}),L(Ir,{anchorEl:wt,value:e.icon??"",color:e.icon_color??"",onSelect:M=>{ct(e.seq,M),Z(null)},onSelectColor:Ge?M=>Ge(e.seq,M):void 0,onClose:()=>Z(null)}),L(oD,{open:!!ui,anchorEl:ui,title:ea?"\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:()=>di(null),onConfirm:()=>{Ho?.(e.seq),di(null)}})]})}import{ConfirmActionPopper as xD}from"@ehfuse/mui-confirm-action";import{Fragment as bD,jsx as ot,jsxs as $i}from"react/jsx-runtime";function YU(){let e=new Date,t=o=>String(o).padStart(2,"0");return`${e.getFullYear()}-${t(e.getMonth()+1)}-${t(e.getDate())} ${t(e.getHours())}:${t(e.getMinutes())}`}function jU({open:e,task:t,onClose:o,onAddComment:n,onSaveFields:r,presentation:i="auto",myAccountSeq:a=0,onToggleCompleted:l,onChangeTitle:s,onChangeIcon:m,onChangeIconColor:c,activityItems:p,activityLoading:d,onLoadActivity:u,onPrint:f,onDelete:g,canDelete:v,...D}){let b=Ue(),{form:S,baseTask:h,task:E,hasPendingChanges:y,stagedBodyProps:T,changeTitle:I,changeIcon:A,changeIconColor:q}=Vc({open:e,task:t,isMobile:b,bodyProps:D,onSaveFields:r,onChangeTitle:s,onChangeIcon:m,onChangeIconColor:c}),C=Ua({taskSeq:E?.seq??0,items:p,loading:d,onLoad:u}),[k,x]=Yg(null),[B,w]=Yg(null),{editPolicy:P,shareText:H}=ue(),_=!!g&&(v??(h?!jr(h,a,P,!(a>0&&(h.author_account_seq??0)===a)):!1)),N=iD(null);if(rD(()=>{N.current?.scrollTo({top:0})},[t?.seq]),!h||!E)return null;let G=E,Q=b||i==="dialog",se=ot(Kg,{...T,headerless:Q,task:G,myAccountSeq:a,onChangeTitle:I,onToggleCompleted:l,onChangeIcon:A,onChangeIconColor:q,showTitle:b||i==="dialog"}),me=ot(vg,{onSubmit:(Y,O)=>n(G.seq,Y,O)},G.seq);return Q?$i(bD,{children:[ot(gD,{open:e,onClose:o,backdropClick:!y,locale:"ko",collapsibleTitle:!0,fontScale:{enabled:!0,default:1.1,min:.6},title:G.is_notice?"\uACF5\uC9C0\uC0AC\uD56D":G.is_event?"\uC77C\uC815":G.is_bug?"\uC624\uB958":"\uC5C5\uBB34",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1},custom:[...b?[{raw:!0,icon:ot(aD,{variant:"contained",size:"small",disableElevation:!0,disabled:!y,onClick:y?()=>{S.submit()}:void 0,sx:{ml:1.5,height:32,minWidth:64,px:1.75,py:0,borderRadius:1,fontSize:14,fontWeight:600,bgcolor:"#2f80ed","&:hover":{bgcolor:"#2f80ed"},"&.Mui-disabled":{bgcolor:"#f2f2f0",color:"#c9c8c5"}},children:"\uC800\uC7A5\uD558\uAE30"})}]:[],{raw:!0,icon:ot(sD,{size:"small","aria-label":"\uB354\uBCF4\uAE30",onClick:Y=>x(Y.currentTarget),children:ot(mD,{sx:{color:"#6b7280"}})})}]},fullScreen:b,maxWidth:b?void 0:"md",width:b?void 0:720,mobilePresentation:b?"slide":void 0,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:me},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:ot($s,{sx:{userSelect:"none",width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:se})}]},h.seq),$i(cD,{open:!!k,anchorEl:k,onClose:()=>x(null),anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{zIndex:1500},children:[u?$i(vu,{onClick:()=>{x(null),C.openDialog()},children:[ot(Cu,{children:ot(pD,{fontSize:"small"})}),ot(Bu,{children:"\uD65C\uB3D9"})]}):null,$i(vu,{onClick:()=>{x(null),Ai(G,!0,H)},children:[ot(Cu,{children:ot(dD,{fontSize:"small"})}),ot(Bu,{children:"\uACF5\uC720\uD558\uAE30"})]}),_?$i(vu,{onClick:Y=>{let O=k??Y.currentTarget;x(null),w(O)},sx:{color:"#e5484d"},children:[ot(Cu,{children:ot(uD,{fontSize:"small",sx:{color:"#e5484d"}})}),ot(Bu,{children:"\uC0AD\uC81C"})]}):null]}),ot(xD,{open:!!B,anchorEl:B,title:"\uC774 \uC5C5\uBB34\uB97C \uD734\uC9C0\uD1B5\uC73C\uB85C \uBCF4\uB0B4\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uC0AD\uC81C",onCancel:()=>w(null),onConfirm:()=>{w(null),g?.(G)}}),ot(Ns,{controller:C})]}):ot(lD,{anchor:"right",open:e,onClose:o,"aria-label":"\uC5C5\uBB34 \uC0C1\uC138",disableAutoFocus:!0,disableEnforceFocus:!0,sx:{zIndex:Y=>Y.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:$i($s,{sx:{display:"flex",flexDirection:"column",height:"100%",userSelect:"none"},children:[ot(Dg,{task:G,myAccountSeq:a,onToggleCompleted:l,onChangeTitle:s,onChangeIcon:m,onChangeIconColor:c,onClose:o,activityItems:p,activityLoading:d,onLoadActivity:u,onPrint:f,onDelete:g,canDelete:v}),ot(jg,{sx:{borderColor:"#e6e6e3"}}),ot($s,{sx:{flex:1,minHeight:0},children:ot(fD,{ref:N,style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:se})}),ot(jg,{sx:{borderColor:"#37352f"}}),ot($s,{sx:{flexShrink:0},children:me})]})})}import{Box as To,Button as Du,IconButton as ex}from"@mui/material";import{FormDialog as tx}from"@ehfuse/mui-form-dialog";import DD from"@mui/icons-material/Add";import ED from"@mui/icons-material/DirectionsRunOutlined";import RD from"@mui/icons-material/EditOutlined";import{ClearTextField as ox,DateTextField as nx,LabelSelect as rx}from"@ehfuse/mui-form-controls";import{Box as ar,Button as kD,FormControlLabel as Iu,Radio as _u,RadioGroup as TD}from"@mui/material";import{FormDialog as yD}from"@ehfuse/mui-form-dialog";import{LabelSelect as SD}from"@ehfuse/mui-form-controls";import CD from"@ehfuse/overlay-scrollbar";import{useGlobalForm as hD}from"@ehfuse/forma";function Xg({open:e,sprint:t,remainingTasks:o,sprints:n,onClose:r,onConfirm:i}){let a=n.filter(c=>c.seq!==t?.seq&&c.group_seq===(t?.group_seq??0)&&c.status!=="closed"),l=o.length>0,s=hD({formId:we("taskbox-sprint-close-form"),initialValues:{mode:"backlog",moveToSeq:"0"},onValidate:c=>!(l&&c.mode==="move"&&!(Number(c.moveToSeq)>0)),onSubmit:c=>(i({mode:l?c.mode:"keep",moveToSprintSeq:c.mode==="move"&&Number(c.moveToSeq)||0,taskSeqs:o.map(p=>p.seq)}),!0)}),m={form:Zt({modalIdPrefix:"taskbox-sprint-close-dialog",open:e,onClose:r,onOpen:()=>s.setFormValues({mode:a.length>0?"move":"backlog",moveToSeq:String(a[0]?.seq??0)})})};return{form:s,modals:m,candidates:a,hasRemaining:l}}import{Fragment as BD,jsx as lo,jsxs as Hi}from"react/jsx-runtime";function Qg({open:e,sprint:t,remainingTasks:o,sprints:n,onClose:r,onConfirm:i}){let{form:a,modals:l,candidates:s,hasRemaining:m}=Xg({open:e,sprint:t,remainingTasks:o,sprints:n,onClose:r,onConfirm:i}),c=a.useFormValue("mode")??"backlog",p=Number(a.useFormValue("moveToSeq"))||0;return lo(yD,{open:l.form.isOpen,onClose:l.form.close,maxWidth:"sm",title:"\uBAA9\uD45C \uB9C8\uAC10",locale:"ko",backdropClick:!1,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-sprint-close",tabs:{visible:!1},actions:{showCancelButton:!0,right:lo(kD,{variant:"contained",onClick:()=>{a.submit()},disabled:m&&c==="move"&&!(p>0),children:"\uB9C8\uAC10"})},sections:[{id:"sprint-close",title:"",showTitle:!1,children:Hi(ar,{sx:{display:"flex",flexDirection:"column",gap:2},children:[Hi(ar,{sx:{fontSize:18,color:"#37352f"},children:[lo(ar,{component:"span",sx:{fontWeight:600},children:t?.name??""})," \uBAA9\uD45C\uB97C \uB9C8\uAC10\uD569\uB2C8\uB2E4."]}),m?Hi(BD,{children:[Hi(ar,{sx:{fontSize:15,color:"#6f6f6c"},children:["\uB05D\uB098\uC9C0 \uC54A\uC740 \uC5C5\uBB34\uAC00"," ",o.length,"\uAC74 \uC788\uC2B5\uB2C8\uB2E4. \uC5B4\uB5BB\uAC8C \uD560\uAE4C\uC694?"]}),lo(ar,{sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:lo(CD,{style:{maxHeight:220},thumb:{width:6},children:o.map(d=>Hi(ar,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1,borderBottom:"1px solid #f2f2f0","&:last-of-type":{borderBottom:"none"}},children:[lo(ar,{sx:{flex:1,minWidth:0,fontSize:16,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:d.title}),lo($e,{option:Mt(d)})]},d.seq))})}),Hi(TD,{value:c,onChange:(d,u)=>a.setFormValue("mode",u),children:[s.length>0?lo(Iu,{value:"move",control:lo(_u,{size:"small"}),label:"\uB2E4\uC74C \uBAA9\uD45C\uB85C \uC774\uC6D4",sx:{"& .MuiFormControlLabel-label":{fontSize:16}}}):null,c==="move"&&s.length>0?lo(ar,{sx:{pl:4,pb:1},children:lo(SD,{form:a,name:"moveToSeq",size:"small",label:"",fullWidth:!0,options:s.map(d=>({value:String(d.seq),label:d.name}))})}):null,lo(Iu,{value:"backlog",control:lo(_u,{size:"small"}),label:"\uBBF8\uBC30\uC815(\uBC31\uB85C\uADF8)\uC73C\uB85C \uBE7C\uAE30",sx:{"& .MuiFormControlLabel-label":{fontSize:16}}}),lo(Iu,{value:"keep",control:lo(_u,{size:"small"}),label:"\uC774 \uBAA9\uD45C\uC5D0 \uADF8\uB300\uB85C \uB450\uAE30",sx:{"& .MuiFormControlLabel-label":{fontSize:16}}})]})]}):lo(ar,{sx:{fontSize:15,color:"#6f6f6c"},children:"\uB0A8\uC740 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. \uC774\uB300\uB85C \uB9C8\uAC10\uD558\uBA74 \uBAA9\uD45C\uAC00 \uC885\uB8CC\uB429\uB2C8\uB2E4."})]})}]})}var wu="custom-";function vD(e){return e.startsWith(wu)}function mG(e){return e>0?`${wu}${e}`:""}function hn(e){if(!vD(e))return 0;let t=Number(e.slice(wu.length));return Number.isInteger(t)&&t>0?t:0}import{useState as ID}from"react";import{useGlobalForm as _D,useModal as wD}from"@ehfuse/forma";import{ErrorAlert as Zg}from"@ehfuse/alerts";var Hs={editingSeq:0,name:"",goal:"",start_date:"",end_date:""};function Jg({open:e,customTabs:t,onClose:o,onCreate:n,onUpdate:r,onChangeStatus:i,tasks:a=[],onCloseSprint:l,onRemove:s}){let m=t.filter(S=>S.useSprints&&!S.archived),[c,p]=ID(null),d=c?a.filter(S=>(S.sprint_seq??0)===c.seq&&!S.completed):[],u=_D({formId:we("taskbox-sprint-form"),initialValues:{groupKey:"",...Hs},onValidate:S=>hn(S.groupKey)?String(S.name??"").trim()?!0:(Zg("\uBAA9\uD45C \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694."),!1):(Zg("\uBAA9\uD45C\uB97C \uB9CC\uB4E4 \uD504\uB85C\uC81D\uD2B8\uB97C \uC120\uD0DD\uD558\uC138\uC694."),!1),onSubmit:async S=>{let h={name:String(S.name).trim(),goal:String(S.goal??"").trim(),start_date:S.start_date??"",end_date:S.end_date??""};if(S.editingSeq>0)return r(S.editingSeq,h),f.form.close(),!0;let E=await n({group_seq:hn(S.groupKey),...h});return E&&f.form.close(),E}}),f={manage:Zt({modalIdPrefix:"taskbox-sprint-manage-dialog",open:e,onClose:o,onOpen:()=>u.setFormValues({groupKey:m.length===1?m[0].key:"",...Hs})}),form:wD({modalId:we("taskbox-sprint-form-dialog"),onClose:()=>u.setFormValues(Hs)})};return{form:u,modals:f,sprintTabs:m,closingSprint:c,remainingTasks:d,openCreateForm:()=>{u.setFormValues(Hs),f.form.open()},openEditForm:S=>{u.setFormValues({editingSeq:S.seq,groupKey:`custom-${S.group_seq}`,name:S.name,goal:S.goal,start_date:S.start_date,end_date:S.end_date}),f.form.open()},changeStatus:(S,h)=>{if(h==="closed"&&l){p(S);return}i(S.seq,h)},cancelCloseSprint:()=>p(null),confirmCloseSprint:S=>{c&&l?.(c.seq,S),p(null)},removeSprint:s}}import{Fragment as ax,jsx as Je,jsxs as qr}from"react/jsx-runtime";var MD=[{value:"planning",label:"\uACC4\uD68D\uC911"},{value:"active",label:"\uC9C4\uD589\uC911"},{value:"closed",label:"\uC885\uB8CC"}];function ix(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):"-"}function wG({open:e,customTabs:t,sprints:o,onClose:n,onCreate:r,onUpdate:i,onChangeStatus:a,tasks:l=[],onCloseSprint:s,onRemove:m}){let c=Jg({open:e,customTabs:t,onClose:n,onCreate:r,onUpdate:i,onChangeStatus:a,tasks:l,onCloseSprint:s,onRemove:m}),{form:p,modals:d,sprintTabs:u,closingSprint:f,remainingTasks:g}=c,v=Number(p.useFormValue("editingSeq"))||0,D=p.isSubmitting,b=new Map(t.map(h=>[hn(h.key),h.label])),S=Je(To,{children:u.length===0?Je(To,{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.'}):Je(ax,{children:Je(To,{children:o.length===0?qr(To,{sx:{py:4,display:"flex",flexDirection:"column",alignItems:"center",gap:2,color:"#9a9a97"},children:[Je(ED,{sx:{fontSize:48,color:"#d9d9d6"}}),Je(To,{sx:{fontSize:13.5},children:"\uB4F1\uB85D\uB41C \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."})]}):o.map(h=>qr(To,{sx:{display:"flex",flexDirection:"column",gap:1,"&:not(:last-of-type)::after":{content:'""',display:"block",my:1.75,borderBottom:"1px solid #f0efed"}},children:[qr(To,{sx:{minWidth:0},children:[qr(To,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[Je(To,{component:"span",sx:{fontSize:18,fontWeight:600,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:h.name}),Je(To,{component:"span",sx:{flexShrink:0,px:1,py:.25,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:13,fontWeight:500},children:b.get(h.group_seq)??"\uC0AD\uC81C\uB41C \uD504\uB85C\uC81D\uD2B8"}),qr(To,{component:"span",sx:{flexShrink:0,fontSize:14,color:"#57564f"},children:[ix(h.start_date)," ~"," ",ix(h.end_date)]})]}),h.goal?Je(To,{sx:{mt:.5,fontSize:14,color:"#787774",lineHeight:1.5},children:h.goal}):null]}),qr(To,{sx:{display:"flex",alignItems:"center",gap:.5},children:[Je(rx,{label:"\uC0C1\uD0DC",showLabel:!1,size:"small",value:h.status,options:MD.map(E=>({value:E.value,label:E.label})),onChange:E=>c.changeStatus(h,String(E.target.value)),sx:{width:104,flexShrink:0}}),Je(ex,{"aria-label":"\uBAA9\uD45C \uC218\uC815",onClick:()=>c.openEditForm(h),sx:{color:"#9a9a97","&:hover":{color:"#2563eb"}},children:Je(RD,{sx:{fontSize:18}})}),Je(ex,{"aria-label":"\uBAA9\uD45C \uC0AD\uC81C",onClick:()=>c.removeSprint(h.seq),sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:Je(Gt,{style:{width:16,height:16}})})]})]},h.seq))})})});return qr(ax,{children:[Je(tx,{open:d.manage.isOpen,onClose:d.manage.close,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:S}],sectionContentPaddingTop:0,actions:{showCancelButton:!0,left:u.length>0?Je(Du,{startIcon:Je(DD,{}),onClick:c.openCreateForm,sx:{color:"#2563eb"},children:"\uC0C8 \uBAA9\uD45C"}):void 0,right:Je(Du,{variant:"contained",onClick:d.manage.close,children:"\uD655\uC778"})}}),Je(Qg,{open:f!==null,sprint:f,remainingTasks:g,sprints:o,onClose:c.cancelCloseSprint,onConfirm:c.confirmCloseSprint}),Je(tx,{open:d.form.isOpen,onClose:d.form.close,maxWidth:"sm",title:v>0?"\uBAA9\uD45C \uC218\uC815":"\uC0C8 \uBAA9\uD45C",locale:"ko",backdropClick:!1,tabs:{visible:!1},titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-sprint-form",sections:[{id:"sprint-form",title:"",showTitle:!1,children:Je(To,{sx:{pt:1},children:qr(To,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2.5,mt:1},children:[Je(rx,{form:p,name:"groupKey",label:"\uD504\uB85C\uC81D\uD2B8",size:"medium",options:u.map(h=>({value:h.key,label:h.label})),disabled:v>0}),Je(ox,{form:p,name:"name",label:"\uBAA9\uD45C \uC774\uB984",size:"medium",placeholder:"\uC608: 8\uC6D4 2\uC8FC\uCC28"}),Je(nx,{form:p,name:"start_date",size:"medium",label:"\uC2DC\uC791\uC77C"}),Je(nx,{form:p,name:"end_date",size:"medium",label:"\uC885\uB8CC\uC77C"}),Je(ox,{form:p,name:"goal",label:"\uC124\uBA85",size:"medium",placeholder:"\uC120\uD0DD \uC785\uB825",sx:{gridColumn:"1 / -1"}})]})})}],actions:{showCancelButton:!0,right:Je(Du,{variant:"contained",onClick:()=>{p.submit()},disabled:D,children:v>0?"\uC218\uC815":"\uBAA9\uD45C \uB9CC\uB4E4\uAE30"})}})]})}import{Box as Tt,Button as Vs,FormControlLabel as sx,Switch as cx}from"@mui/material";import{FormDialog as LD}from"@ehfuse/mui-form-dialog";import ND from"@mui/icons-material/LinkOutlined";import FD from"@mui/icons-material/LinkOffOutlined";import $D from"@mui/icons-material/SyncOutlined";import HD from"@mui/icons-material/ArrowForward";import{useRef as AD}from"react";import{useCallback as PD,useEffect as OD,useRef as Ya}from"react";import{useModal as qD}from"@ehfuse/forma";var Ws=[];function zD(){let e=Ws;if(Ws=[],e.length!==0){if(e.length===1){e[0].close();return}for(let t of e)window.dispatchEvent(new CustomEvent(`modal:close:${t.modalId}`));window.addEventListener("popstate",t=>t.stopImmediatePropagation(),{capture:!0,once:!0}),window.history.go(-e.length)}}function Xo({modalId:e,open:t,onClose:o,onOpen:n}){let r=Ya(n);r.current=n;let i=Ya(o);i.current=o;let a=Ya(t);a.current=t;let l=Ya(!1),s=qD({modalId:e,onClose:()=>{l.current=!1,a.current&&i.current()}}),m=Ya(s);m.current=s;let c=PD(()=>{l.current||!m.current.isOpen||(l.current=!0,m.current.close())},[]);return OD(()=>{if(t){r.current?.(),m.current.open();return}!m.current.isOpen||l.current||(l.current=!0,Ws.push({modalId:m.current.modalId,close:()=>m.current.close()}),Ws.length===1&&queueMicrotask(zD))},[t]),{...s,close:c}}function lx(e){let t=AD(e);t.current=e;let o={link:Xo({modalId:we("taskbox-calendar-link"),open:e.open,onClose:()=>t.current.onClose()})},{status:n}=e.googleApi,{calendarName:r}=ue(),i=n.linked&&n.calendar_name||r||"\uC5C5\uBB34\uD568",a={connect:()=>t.current.googleApi.onConnect(),disconnect:()=>t.current.googleApi.onDisconnect(),toggleExport:l=>t.current.googleApi.onToggleExport(l),toggleImport:l=>t.current.googleApi.onToggleImport(l),resync:()=>t.current.googleApi.onResync?.()};return{modals:o,status:n,busy:!!e.googleApi.busy,canResync:!!e.googleApi.onResync,calendarName:i,actions:a}}import{Fragment as VD,jsx as je,jsxs as jt}from"react/jsx-runtime";function mx({from:e,to:t}){return jt(Tt,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.5},children:[e,je(HD,{sx:{fontSize:16,color:"#787774"}}),t]})}function WD({size:e=28}){return jt(Tt,{component:"svg",viewBox:"0 0 48 48","aria-hidden":!0,sx:{width:e,height:e,flexShrink:0,mx:1},children:[je("path",{fill:"#EA4335",d:"M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z"}),je("path",{fill:"#4285F4",d:"M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z"}),je("path",{fill:"#FBBC05",d:"M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z"}),je("path",{fill:"#34A853",d:"M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z"})]})}function GG(e){let t=lx(e),{status:o,busy:n,calendarName:r,actions:i}=t,a=t.modals.link,l=jt(Tt,{sx:{display:"flex",flexDirection:"column",gap:"24px"},children:[jt(Tt,{sx:{bgcolor:"#f2f6fa",borderRadius:1,px:1.5,py:1.25,fontSize:15,lineHeight:1.8,color:"#37352f",display:"flex",flexDirection:"column",gap:.25,"& > div":{display:"flex",gap:1},"& > div::before":{content:'"\u2022"',flexShrink:0}},children:[je(Tt,{children:jt(Tt,{component:"span",children:[je("b",{children:"\uB0B4\uBCF4\uB0B4\uAE30"}),"\uB294 \uB0B4 \uC5C5\uBB34\uB97C \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC758"," ",jt("b",{children:['"',r,'"']})," \uCE98\uB9B0\uB354\uC5D0 \uBC14\uB85C \uBC18\uC601\uD569\uB2C8\uB2E4."]})}),je(Tt,{children:jt(Tt,{component:"span",children:[je("b",{children:"\uAC00\uC838\uC624\uAE30"}),"\uB294 \uAD6C\uAE00 \uAE30\uBCF8 \uCE98\uB9B0\uB354 \uC77C\uC815\uC744 \uC5C5\uBB34\uD568\uC5D0 \uBCF4\uC5EC\uC8FC\uACE0, \uC5C5\uBB34\uD568\uC5D0\uC11C \uADF8 \uC77C\uC815\uC744 \uACE0\uCE58\uAC70\uB098 \uC9C0\uC6B8 \uC218 \uC788\uC2B5\uB2C8\uB2E4."]})}),je(Tt,{children:jt(Tt,{component:"span",children:['"',r,'" \uCE98\uB9B0\uB354 \uC77C\uC815\uC740 \uC5C5\uBB34\uD568\uC5D0\uC11C \uC218\uC815\uD574\uC57C \uD569\uB2C8\uB2E4.']})})]}),o.configured?jt(Tt,{sx:{border:"1px solid #e6e6e3",borderRadius:1,pl:2,pr:3,py:1.75,display:"flex",flexDirection:"column",gap:1.25},children:[jt(Tt,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[je(WD,{}),jt(Tt,{sx:{flex:1,minWidth:0},children:[je(Tt,{sx:{fontSize:18,color:"#111",fontWeight:700},children:"\uAD6C\uAE00 \uACC4\uC815 \uC5F0\uACB0"}),je(Tt,{sx:{fontSize:15,color:"#111",mt:.5,lineHeight:1.6},children:o.linked?jt(VD,{children:[jt(Tt,{component:"span",sx:{display:"block",fontWeight:600},children:[o.google_email||"\uAD6C\uAE00 \uACC4\uC815"," ","\uC5D0 \uC5F0\uACB0\uB428"]}),jt(Tt,{component:"span",sx:{display:"block"},children:['\uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0 "',r,'" \uCE98\uB9B0\uB354\uAC00 \uB9CC\uB4E4\uC5B4\uC84C\uC2B5\uB2C8\uB2E4.']})]}):`\uAD6C\uAE00 \uACC4\uC815\uC744 \uC5F0\uACB0\uD558\uBA74 \uB0B4 \uC5C5\uBB34\uAC00 \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC758 "${r}" \uCE98\uB9B0\uB354\uC5D0 \uBC14\uB85C \uBC18\uC601\uB429\uB2C8\uB2E4.`}),o.last_error?jt(Tt,{sx:{fontSize:13,color:"#c62828",mt:.5},children:["\uCD5C\uADFC \uC624\uB958: ",o.last_error]}):null]}),o.linked?je(Vs,{size:"small",variant:"outlined",color:"inherit",disabled:n,startIcon:je(FD,{sx:{fontSize:18}}),onClick:i.disconnect,sx:{flexShrink:0,whiteSpace:"nowrap",ml:2},children:"\uC5F0\uACB0 \uD574\uC81C"}):je(Vs,{size:"small",variant:"contained",disableElevation:!0,disabled:n,startIcon:je(ND,{sx:{fontSize:18}}),onClick:i.connect,sx:{flexShrink:0,whiteSpace:"nowrap",bgcolor:"#2563eb",ml:2},children:"\uC5F0\uACB0\uD558\uAE30"})]}),o.linked?jt(Tt,{sx:{display:"flex",alignItems:"center",gap:2,flexWrap:"wrap",pl:4.5},children:[je(sx,{control:je(cx,{size:"small",checked:o.export_enabled,disabled:n,onChange:(s,m)=>i.toggleExport(m)}),label:jt(Tt,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.5},children:["\uB0B4\uBCF4\uB0B4\uAE30 (",je(mx,{from:"\uC5C5\uBB34\uD568",to:"\uAD6C\uAE00"}),")"]}),sx:{m:0,"& .MuiFormControlLabel-label":{fontSize:14,color:"#37352f"}}}),je(sx,{control:je(cx,{size:"small",checked:o.import_enabled,disabled:n,onChange:(s,m)=>i.toggleImport(m)}),label:jt(Tt,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.5},children:["\uAC00\uC838\uC624\uAE30 (",je(mx,{from:"\uAD6C\uAE00",to:"\uC5C5\uBB34\uD568"}),")"]}),sx:{m:0,"& .MuiFormControlLabel-label":{fontSize:14,color:"#37352f"}}}),t.canResync?je(Vs,{size:"small",color:"inherit",disabled:n||!o.export_enabled,startIcon:je($D,{sx:{fontSize:18}}),onClick:i.resync,sx:{ml:"auto",whiteSpace:"nowrap"},children:"\uC804\uCCB4 \uB2E4\uC2DC \uB0B4\uBCF4\uB0B4\uAE30"}):null]}):null]}):je(Tt,{sx:{fontSize:14,color:"#8a6d1d",lineHeight:1.7},children:"\uC11C\uBC84\uC5D0 \uAD6C\uAE00 \uC5F0\uB3D9 \uC124\uC815(\uD074\uB77C\uC774\uC5B8\uD2B8 ID/\uBE44\uBC00\uBC88\uD638)\uC774 \uC5C6\uC5B4 \uC5F0\uACB0\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uAD00\uB9AC\uC790\uC5D0\uAC8C \uBB38\uC758\uD558\uC138\uC694."})]});return je(LD,{open:a.isOpen,onClose:a.close,width:680,title:"\uCE98\uB9B0\uB354 \uC5F0\uB3D9",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-calendar-link",sectionContentPaddingTop:0,sections:[{id:"calendar-link",showTitle:!1,children:l}],actions:{showCancelButton:!1,right:je(Vs,{variant:"contained",onClick:a.close,sx:{minWidth:80},children:"\uB2EB\uAE30"})}})}import{useState as Gs}from"react";import YD from"@mui/icons-material/OpenInNewOutlined";import{Box as zr,Button as Eu,ButtonBase as jD,FormControlLabel as XD,Switch as QD}from"@mui/material";import{FormDialog as ZD}from"@ehfuse/mui-form-dialog";import{ClearTextField as Ru}from"@ehfuse/mui-form-controls";import{DatePicker as fx,TimePicker as gx}from"@ehfuse/mui-datetime-picker";import xx from"@mui/icons-material/CalendarMonthOutlined";import bx from"@mui/icons-material/AccessTimeOutlined";import{useEffect as UD,useRef as Us}from"react";import{useGlobalForm as GD}from"@ehfuse/forma";import{ErrorAlert as ux}from"@ehfuse/alerts";var KD={title:"",allDay:!0,startDate:"",endDate:"",startTime:"09:00",endTime:"10:00",location:"",description:""};function dx(e,t){let[o,n]=e.split(":").map(Number),r=((o*60+n+t)%1440+1440)%1440,i=a=>String(a).padStart(2,"0");return`${i(Math.floor(r/60))}:${i(r%60)}`}function px(e){let t=Us(e);t.current=e;let o=Us(null);e.event&&(o.current=e.event);let n=e.event??o.current,r=n?.editable===!1,i=Us(r);i.current=r;let a=Us(!!e.onDelete);e.open&&(a.current=!!e.onDelete);let l=GD({formId:we("taskbox-google-event-form"),initialValues:KD,onValidate:c=>t.current.busy||i.current?!1:c.title.trim()?c.startDate?!0:(ux("\uC2DC\uC791\uC77C\uC744 \uC120\uD0DD\uD558\uC138\uC694."),!1):(ux("\uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694."),!1),onSubmit:c=>{let p=c.endDate&&c.endDate>=c.startDate?c.endDate:c.startDate;return t.current.onSave({title:c.title.trim(),start_date:c.startDate,end_date:p,time:c.allDay?"":c.startTime,end_time:c.allDay?"":c.endTime,location:c.location.trim(),description:c.description.trim()}),!0}}),s={event:Xo({modalId:we("taskbox-google-event"),open:e.open,onClose:()=>t.current.onClose()})};UD(()=>{let c=e.event;if(!e.open||!c)return;let p=!!c.time;l.setFormValues({title:c.title==="(\uC81C\uBAA9 \uC5C6\uC74C)"?"":c.title,allDay:!p,startDate:c.start_date,endDate:c.end_date||c.start_date,startTime:p?c.time:"09:00",endTime:p?c.end_time||dx(c.time,60):"10:00",location:c.location??"",description:c.description??""})},[e.open,e.event]);let m={changeStartDate:c=>{let p=String(l.getFormValue("endDate")??"");l.setFormValue("startDate",c),(!p||p<c)&&l.setFormValue("endDate",c)},changeEndDate:c=>l.setFormValue("endDate",c),changeStartTime:c=>{let p=l.getFormValues();l.setFormValue("startTime",c),p.startDate===p.endDate&&p.endTime<=c&&l.setFormValue("endTime",dx(c,60))},changeEndTime:c=>l.setFormValue("endTime",c),changeAllDay:c=>l.setFormValue("allDay",c),remove:()=>t.current.onDelete?.()};return{form:l,modals:s,event:n,readOnly:r,busy:!!e.busy,canDelete:a.current,actions:m}}import{jsx as nt,jsxs as Wi}from"react/jsx-runtime";function hx(e){if(!/^\d{4}-\d{2}-\d{2}$/.test(e))return e||"\uB0A0\uC9DC \uC120\uD0DD";let[t,o,n]=e.split("-").map(Number),r=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"][new Date(t,o-1,n).getDay()];return`${t}.${String(o).padStart(2,"0")}.${String(n).padStart(2,"0")} (${r})`}function Mu(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?new Date(`${e}T00:00:00`):new Date}function kx(e){let t=o=>String(o).padStart(2,"0");return`${e.getFullYear()}-${t(e.getMonth()+1)}-${t(e.getDate())}`}function Tx(e){let t=/^(\d{2}):(\d{2})$/.exec(e);return t?{hour:t[1],minute:t[2]}:{hour:"09",minute:"00"}}function JD(e){switch(e){case"fromGmail":return"Gmail \uC5D0\uC11C \uC790\uB3D9 \uB4F1\uB85D\uB41C \uC77C\uC815(\uD56D\uACF5\uAD8C\xB7\uC608\uC57D \uB4F1)";case"birthday":return"\uC0DD\uC77C \uC77C\uC815";case"outOfOffice":return"\uBD80\uC7AC\uC911 \uC77C\uC815";case"focusTime":return"\uC9D1\uC911 \uC2DC\uAC04 \uC77C\uC815";case"workingLocation":return"\uADFC\uBB34 \uC704\uCE58 \uC77C\uC815";default:return"\uC774 \uC885\uB958\uC758 \uC77C\uC815"}}function eE(e){let[t,o,n]=e.split("-").map(Number);window.open(`https://calendar.google.com/calendar/r/day/${t}/${o}/${n}`,"_blank")}function Ks({icon:e,label:t,placeholder:o,disabled:n,onClick:r}){return Wi(jD,{disabled:n,onClick:i=>r(i.currentTarget),sx:{display:"flex",alignItems:"center",gap:.75,px:1.25,py:.9,borderRadius:1,border:"1px solid #d9d9d6",bgcolor:n?"#f7f7f5":"#fff",color:t?"#37352f":"#9b9a97",fontSize:15,fontWeight:500,minWidth:0,whiteSpace:"nowrap","&:hover":{bgcolor:"#f7f7f5"},"&.Mui-disabled":{color:"#b9b8b4"}},children:[e,t||o]})}function uK(e){let t=Ue(),o=px(e),{form:n,event:r,readOnly:i,busy:a,actions:l}=o,s=o.modals.event,m=!!n.useValue("allDay"),c=String(n.useValue("startDate")??""),p=String(n.useValue("endDate")??""),d=String(n.useValue("startTime")??""),u=String(n.useValue("endTime")??""),[f,g]=Gs(null),[v,D]=Gs(null),[b,S]=Gs(null),[h,E]=Gs(null),y=r?Wi(zr,{sx:{display:"flex",flexDirection:"column",gap:2.25,pt:.5},children:[nt(zr,{sx:{bgcolor:i?"#fff4e5":"#f2f6fa",borderRadius:1,px:1.5,py:1,fontSize:14.5,lineHeight:1.7,color:"#37352f"},children:i?`${JD(r.event_type)}\uC740 \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0\uC11C\uB9CC \uC218\uC815\xB7\uC0AD\uC81C\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.`:`${r.calendar||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"} \uC758 \uC77C\uC815\uC785\uB2C8\uB2E4. \uC800\uC7A5\uD558\uBA74 \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0 \uBC14\uB85C \uBC18\uC601\uB429\uB2C8\uB2E4.${r.recurring?" \uBC18\uBCF5 \uC77C\uC815\uC774\uB77C \uC774 \uD68C\uCC28\uB9CC \uBC14\uB01D\uB2C8\uB2E4.":""}`}),nt(Ru,{label:"\uC81C\uBAA9",name:"title",form:n,disabled:i,onKeyDown:T=>{T.key==="Enter"&&(T.preventDefault(),n.submit())},fullWidth:!0,autoFocus:!t&&!i}),nt(XD,{control:nt(QD,{checked:m,disabled:i,onChange:(T,I)=>l.changeAllDay(I),size:"small"}),label:"\uC885\uC77C",sx:{ml:0,"& .MuiFormControlLabel-label":{fontSize:15,color:"#37352f"}}}),Wi(zr,{sx:{display:"flex",flexDirection:"column",gap:1.25},children:[Wi(zr,{sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"wrap"},children:[nt(zr,{sx:{width:44,fontSize:14.5,color:"#57564f",flexShrink:0},children:"\uC2DC\uC791"}),nt(Ks,{icon:nt(xx,{sx:{fontSize:18,color:"#787774"}}),label:hx(c),placeholder:"\uB0A0\uC9DC \uC120\uD0DD",disabled:i,onClick:g}),m?null:nt(Ks,{icon:nt(bx,{sx:{fontSize:18,color:"#787774"}}),label:d,placeholder:"\uC2DC\uAC01",disabled:i,onClick:S})]}),Wi(zr,{sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"wrap"},children:[nt(zr,{sx:{width:44,fontSize:14.5,color:"#57564f",flexShrink:0},children:"\uC885\uB8CC"}),nt(Ks,{icon:nt(xx,{sx:{fontSize:18,color:"#787774"}}),label:hx(p),placeholder:"\uB0A0\uC9DC \uC120\uD0DD",disabled:i,onClick:D}),m?null:nt(Ks,{icon:nt(bx,{sx:{fontSize:18,color:"#787774"}}),label:u,placeholder:"\uC2DC\uAC01",disabled:i,onClick:E})]})]}),nt(Ru,{label:"\uC7A5\uC18C",name:"location",form:n,disabled:i,fullWidth:!0}),nt(Ru,{label:"\uC124\uBA85",name:"description",form:n,disabled:i,fullWidth:!0,multiline:!0,minRows:3,maxRows:8}),nt(fx,{anchorEl:f,open:!!f,onClose:()=>g(null),selectedDate:Mu(c),onDateChange:T=>{l.changeStartDate(kx(T)),g(null)},centered:t,locale:"ko"}),nt(fx,{anchorEl:v,open:!!v,onClose:()=>D(null),selectedDate:Mu(p||c),minDate:c?Mu(c):void 0,onDateChange:T=>{l.changeEndDate(kx(T)),D(null)},centered:t,locale:"ko"}),nt(gx,{anchorEl:b,open:!!b,onClose:()=>S(null),value:Tx(d),format:"HH:mm",minuteStep:5,autoApply:!0,centered:t,locale:"ko",onChange:(T,I)=>{l.changeStartTime(`${T}:${I}`),S(null)}}),nt(gx,{anchorEl:h,open:!!h,onClose:()=>E(null),value:Tx(u),format:"HH:mm",minuteStep:5,autoApply:!0,centered:t,locale:"ko",onChange:(T,I)=>{l.changeEndTime(`${T}:${I}`),E(null)}})]}):null;return nt(ZD,{open:s.isOpen,onClose:s.close,width:520,title:"\uAD6C\uAE00 \uC77C\uC815",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!i&&o.canDelete,confirmConfig:{title:r?.recurring?"\uC774 \uD68C\uCC28\uB97C \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0\uC11C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?":"\uC774 \uC77C\uC815\uC744 \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0\uC11C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uC0AD\uC81C"}}},onDelete:l.remove,fontScale:{enabled:!0},fontScaleKey:"taskbox-google-event",sectionContentPaddingTop:0,sections:[{id:"google-event",showTitle:!1,children:y}],actions:{showCancelButton:!i,right:i?Wi(zr,{sx:{display:"flex",gap:"1rem",alignItems:"center"},children:[nt(Eu,{variant:"outlined",startIcon:nt(YD,{}),onClick:()=>r&&eE(r.start_date),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0\uC11C \uC5F4\uAE30"}),nt(Eu,{variant:"contained",onClick:s.close,sx:{minWidth:72},children:"\uB2EB\uAE30"})]}):nt(Eu,{variant:"contained",onClick:()=>{n.submit()},disabled:a,children:"\uC800\uC7A5"})}})}import{useMemo as Cx,useState as iE}from"react";import{Box as ja,Button as aE,Typography as lE}from"@mui/material";import{FormDialog as sE}from"@ehfuse/mui-form-dialog";import{SearchTextField as cE}from"@ehfuse/mui-form-controls";import{TreeView as mE}from"@ehfuse/tree-view";import{useMemo as tE,useRef as yx}from"react";import{useFormaState as oE,useGlobalForm as nE}from"@ehfuse/forma";function rE(e){let t=[],o=n=>{for(let r of n.employees??[])t.push(r);for(let r of n.groups??[])o(r)};for(let n of e)o(n);return t}function Sx(e){let t=yx(e);t.current=e;let o=tE(()=>rE(e.groups),[e.groups]),n=yx(o);n.current=o;let r=oE({openCount:0}),i=nE({formId:we("taskbox-employee-select-form"),initialValues:{selectedSeqs:[]},onSubmit:s=>{let m=n.current.filter(c=>s.selectedSeqs.includes(c.seq));return t.current.onConfirm(t.current.multiple?m:m.slice(0,1)),t.current.onClose(),!0}}),a={select:Xo({modalId:we("taskbox-employee-select"),open:e.open,onClose:()=>t.current.onClose(),onOpen:()=>{i.setFormValues({selectedSeqs:t.current.selectedSeqs}),r.setValue("openCount",Number(r.getValue("openCount")??0)+1)}})};return{form:i,modals:a,ui:r,allEmployees:o,changeSelection:s=>i.setFormValue("selectedSeqs",s)}}import{Fragment as gE,jsx as kn,jsxs as xE}from"react/jsx-runtime";function Bx(e){return`${e.name}#${e.seq}`}function uE(e){return Number(e.slice(e.lastIndexOf("#")+1))||0}function dE(e,t){return t?[e.name,e.department,e.role_name,e.work_position].filter(Boolean).some(o=>String(o).toLowerCase().includes(t)):!0}function pE(e){let t=[[e.name,e.role_name].filter(Boolean).join(" "),e.department].filter(Boolean).join(" / ");return{id:`emp:${e.seq}`,label:Bx(e),renderLabel:kn(ja,{component:"span",sx:{display:"inline-flex",alignItems:"baseline",gap:.75},children:kn(ja,{component:"span",sx:{fontWeight:400,color:"text.primary"},children:t})})}}function vx(e,t){let o=(e.groups??[]).map(r=>vx(r,t)).filter(r=>r!==null),n=(e.employees??[]).filter(r=>dE(r,t)).map(pE);return o.length===0&&n.length===0?null:{id:`group:${e.key}`,label:e.name,children:[...o,...n]}}function fE({groups:e,allEmployees:t,initialSelectedSeqs:o,multiple:n,isMobile:r,onSelectionChange:i}){let[a,l]=iE(""),s=Cx(()=>e.map(c=>vx(c,a.trim().toLowerCase())).filter(c=>c!==null),[e,a]),m=Cx(()=>t.filter(c=>o.includes(c.seq)).map(Bx),[]);return xE(gE,{children:[kn(ja,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:kn(cE,{size:"small",fullWidth:!0,placeholder:"\uC774\uB984, \uBD80\uC11C \uAC80\uC0C9",onSearch:l,onClear:()=>l(""),sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),kn(ja,{sx:r?{display:"flex",flexDirection:"column"}:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:kn(mE,{items:s,checkbox:!0,multiSelect:n,selectionMode:"child",showSearch:!1,defaultExpanded:!0,initialSelections:m,onChange:c=>i(c.map(uE).filter(p=>p>0)),styles:{border:"none",borderRadius:"0"}})})]})}function IK({open:e,title:t="\uC9C1\uC6D0 \uC120\uD0DD",hint:o="",groups:n,multiple:r=!1,selectedSeqs:i,confirmText:a="\uD655\uC778",onConfirm:l,onClose:s}){let m=Ue(),c=i??[],p=Sx({open:e,groups:n,multiple:r,selectedSeqs:c,onConfirm:l,onClose:s}),{form:d,allEmployees:u}=p,f=p.modals.select,g=d.useValue("selectedSeqs")??[],v=Number(p.ui.useValue("openCount")??0);return kn(sE,{open:f.isOpen,onClose:f.close,title:`${t}${r&&g.length>0?` (${g.length}\uBA85)`:""}`,locale:"ko",fullScreen:m,mobilePresentation:m?"slide":"dialog",draggable:!0,width:"600px",tabs:{visible:!1},titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},scrollPastLastSection:!1,sectionContentPaddingTop:0,fontScale:{enabled:!0},fontScaleKey:"taskbox-employee-select",sections:[{id:"employee-select",title:"\uC9C1\uC6D0 \uC120\uD0DD",showTitle:!1,children:kn(ja,{sx:{...m?{}:{height:560},display:"flex",flexDirection:"column",border:"1px solid #cccccc",borderRadius:1,...m?{}:{overflow:"hidden"},userSelect:"none"},children:kn(fE,{groups:n,allEmployees:u,initialSelectedSeqs:c,multiple:r,isMobile:m,onSelectionChange:p.changeSelection},v)})}],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:o?kn(lE,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.35},children:o}):void 0,right:kn(aE,{variant:"contained",onClick:()=>{d.submit()},children:a})}})}import{useMemo as ZE}from"react";import{Box as sr,Button as Gx}from"@mui/material";import{FormDialog as JE}from"@ehfuse/mui-form-dialog";import{LabelSelect as zu}from"@ehfuse/mui-form-controls";import eR from"@mui/icons-material/SpeedOutlined";import{Box as Ro,Button as TE}from"@mui/material";import{FormDialog as yE}from"@ehfuse/mui-form-dialog";import{LabelSelect as SE,NumberField as CE}from"@ehfuse/mui-form-controls";import BE from"@ehfuse/overlay-scrollbar";import{useEffect as bE,useRef as hE}from"react";import{useGlobalForm as kE}from"@ehfuse/forma";function Ix(e){return`byAccount.a${e}`}function Xa(e){return Math.max(0,Math.floor(Number(e)||0))}function Pu(e){return{basis:e.basis,default_capacity:e.default_capacity,byAccount:Object.fromEntries(Object.entries(e.by_account??{}).map(([t,o])=>[`a${t}`,o]))}}function _x({open:e,capacity:t,onClose:o,onSave:n}){let r=kE({formId:we("taskbox-workload-capacity-form"),initialValues:Pu(t??Kr),onSubmit:async l=>{let s={};for(let[m,c]of Object.entries(l.byAccount??{})){let p=Xa(c),d=Number(m.slice(1));d>0&&p>0&&(s[d]=p)}return await n({...t??Kr,basis:l.basis,default_capacity:Xa(l.default_capacity),by_account:s}),!0}}),i={form:Zt({modalIdPrefix:"taskbox-workload-capacity-dialog",open:e,onClose:o,onOpen:()=>r.setFormValues(Pu(t??Kr))})},a=hE(!0);return bE(()=>{if(a.current){a.current=!1;return}e&&r.setFormValues(Pu(t??Kr))},[t]),{form:r,modals:i}}import{jsx as so,jsxs as Qa}from"react/jsx-runtime";var vE=[{value:"count",label:"\uBBF8\uC644\uB8CC \uAC74\uC218"},{value:"points",label:"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8"}];function wx({form:e,name:t,unit:o,size:n,clearWhenZero:r}){let i=Xa(e.useFormValue(t));return so(CE,{size:n,fullWidth:!0,min:0,max:999,thousandSeparator:!1,align:"right",suffix:o,clearWhenZero:r,value:i,onValueChange:a=>e.setFormValue(t,Xa(a))})}function Dx({open:e,capacity:t,employees:o,onClose:n,onSave:r}){let{form:i,modals:a}=_x({open:e,capacity:t,onClose:n,onSave:r}),l=i.useFormValue("basis")==="points"?"SP":"\uAC74";return so(yE,{open:a.form.isOpen,onClose:a.form.close,maxWidth:"sm",title:"\uC778\uC6D0 \uC6A9\uB7C9",locale:"ko",backdropClick:!1,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-workload-capacity",tabs:{visible:!1},actions:{showCancelButton:!0,right:so(TE,{variant:"contained",onClick:()=>{i.submit()},children:"\uC800\uC7A5"})},sectionContentPaddingTop:0,sections:[{id:"capacity",title:"",showTitle:!1,children:Qa(Ro,{sx:{display:"flex",flexDirection:"column",gap:2},children:[so(Ro,{sx:{fontSize:15,color:"#37352f"},children:"\uD55C \uC0AC\uB78C\uC774 \uB3D9\uC2DC\uC5D0 \uC548\uC744 \uC218 \uC788\uB294 \uC591\uC744 \uC815\uD569\uB2C8\uB2E4. \uC774 \uAC12\uC744 \uB118\uAE30\uBA74 \uC6CC\uD06C\uB85C\uB4DC \uCC28\uD2B8\uC5D0\uC11C \uBD89\uAC8C \uD45C\uC2DC\uB429\uB2C8\uB2E4. 0 \uC73C\uB85C \uB450\uBA74 \uC6A9\uB7C9\uC744 \uC4F0\uC9C0 \uC54A\uACE0 \uD300 \uD3C9\uADE0\uC744 \uAE30\uC900\uC73C\uB85C \uBD05\uB2C8\uB2E4."}),Qa(Ro,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[so(Ro,{sx:{width:104,flexShrink:0,fontSize:16,color:"#37352f"},children:"\uC138\uB294 \uB2E8\uC704"}),so(SE,{form:i,name:"basis",size:"medium",fullWidth:!0,label:"",options:vE})]}),Qa(Ro,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[so(Ro,{sx:{width:104,flexShrink:0,fontSize:16,color:"#37352f"},children:"\uAE30\uBCF8 \uC6A9\uB7C9"}),so(wx,{form:i,name:"default_capacity",size:"medium",unit:l})]}),so(Ro,{sx:{pl:"119px",mt:-1.25,fontSize:13.5,color:"#37352f"},children:`\uC804\uC6D0 \uACF5\uD1B5 \uAE30\uC900(${l}) \xB7 0 = \uC6A9\uB7C9 \uC548 \uC500`}),so(Ro,{sx:{fontSize:16,fontWeight:700,color:"#37352f"},children:"\uC0AC\uB78C\uBCC4 \uC608\uC678"}),o.length===0?so(Ro,{sx:{fontSize:15,color:"#787774"},children:"\uC9C1\uC6D0 \uBAA9\uB85D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. \uAE30\uBCF8 \uC6A9\uB7C9\uB9CC \uC801\uC6A9\uB429\uB2C8\uB2E4."}):so(Ro,{sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:so(BE,{style:{maxHeight:260},thumb:{width:6},children:o.filter(s=>Number(s.account_seq)>0).map(s=>Qa(Ro,{sx:{display:"flex",alignItems:"center",gap:1.5,px:2,py:1,borderBottom:"1px solid #f2f2f0","&:last-of-type":{borderBottom:"none"}},children:[Qa(Ro,{sx:{flex:1,minWidth:0,fontSize:16,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[s.name,s.department?so(Ro,{component:"span",sx:{ml:1,fontSize:14,color:"#787774"},children:s.department}):null]}),so(Ro,{sx:{width:132,flexShrink:0},children:so(wx,{form:i,name:Ix(Number(s.account_seq)),size:"small",unit:l,clearWhenZero:!0})})]},s.account_seq))})})]})}]})}import{lazy as IE,Suspense as _E}from"react";import{Box as wE}from"@mui/material";import{jsx as Ys}from"react/jsx-runtime";function DE({height:e}){return Ys(wE,{sx:typeof e=="number"?{height:e,minHeight:120}:{position:"absolute",inset:0}})}function Za(e,t){let o=IE(e);return function(r){return Ys(_E,{fallback:Ys(DE,{height:r.height??t}),children:Ys(o,{...r})})}}var Ex=Za(()=>import("./chunks/SprintVelocityChart-DMENH7QX.js").then(e=>({default:e.SprintVelocityChart})),200),Rx=Za(()=>import("./chunks/SprintBurndownChart-4GZ5RXBN.js").then(e=>({default:e.SprintBurndownChart})),200),Mx=Za(()=>import("./chunks/CumulativeFlowChart-BDDP3H2H.js").then(e=>({default:e.CumulativeFlowChart})),220),Px=Za(()=>import("./chunks/LeadTimeDistributionChart-45ETE64V.js").then(e=>({default:e.LeadTimeDistributionChart})),200),Ox=Za(()=>import("./chunks/WorkloadChart-PKXYKQYH.js").then(e=>({default:e.WorkloadChart})),200);import{Box as FE,Button as $E}from"@mui/material";import{FormDialog as HE}from"@ehfuse/mui-form-dialog";import{useState as EE}from"react";import{Box as qt,Button as RE,Menu as ME,MenuItem as PE}from"@mui/material";import OE from"@mui/icons-material/PersonOutlineOutlined";import qE from"@ehfuse/overlay-scrollbar";import{jsx as eo,jsxs as lr}from"react/jsx-runtime";var qx=56,zx=68,Ax=96;function zE(e){let t=String(e.due_date??"").slice(0,10);return t?t.slice(5).replace("-","/"):"-"}function Lx(e,t){let o=String(e.due_date??"").slice(0,10);return!!o&&o<t}function Nx({tasks:e,row:t,todayStr:o,employees:n,rows:r,height:i=200,hideSummary:a=!1,onChangeManager:l,onOpenTask:s}){let[m,c]=EE(null),p=kl(e,t.accountSeq),d=u=>r.find(f=>f.accountSeq===u)?.total??0;return lr(qt,{sx:{display:"flex",flexDirection:"column",minHeight:0,height:i},children:[a?null:lr(qt,{sx:{display:"flex",alignItems:"center",gap:1,px:.5,pb:.75,fontSize:14,color:"#37352f"},children:[eo(qt,{component:"span",sx:{fontWeight:700},children:t.name}),lr(qt,{component:"span",children:["\uBBF8\uC644\uB8CC ",p.length,"\uAC74"]}),t.capacity>0?lr(qt,{component:"span",sx:{color:t.load>t.capacity?"#e5484d":"#787774"},children:["\xB7 \uC6A9\uB7C9 ",t.capacity," \uC911 ",t.load]}):null]}),lr(qt,{sx:{flex:1,minHeight:0,display:"flex",flexDirection:"column",border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:[lr(qt,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1,flexShrink:0,bgcolor:"#fafaf9",borderBottom:"1px solid #e6e6e3",fontSize:13.5,fontWeight:600,color:"#37352f"},children:[eo(qt,{sx:{width:qx,flexShrink:0},children:"\uB9C8\uAC10"}),eo(qt,{sx:{flex:1,minWidth:0},children:"\uC5C5\uBB34"}),eo(qt,{sx:{width:zx,flexShrink:0,textAlign:"center"},children:"\uC911\uC694\uB3C4"}),l?eo(qt,{sx:{width:Ax,flexShrink:0,textAlign:"center"},children:"\uCC45\uC784\uC790"}):null]}),eo(qt,{sx:{flex:1,minHeight:0},children:eo(qE,{style:{height:"100%"},thumb:{width:6},children:p.length===0?eo(qt,{sx:{p:2,fontSize:14,color:"#9a9a97"},children:"\uBBF8\uC644\uB8CC \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):p.map(u=>lr(qt,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1.5,borderBottom:"1px solid #f2f2f0"},children:[eo(qt,{sx:{width:qx,flexShrink:0,fontSize:13.5,color:Lx(u,o)?"#e5484d":"#787774",fontWeight:Lx(u,o)?700:400},children:zE(u)}),eo(qt,{onClick:s?()=>s(u.seq):void 0,sx:{flex:1,minWidth:0,fontSize:14.5,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...s?{cursor:"pointer","&:hover":{textDecoration:"underline"}}:{}},children:u.title}),eo(qt,{sx:{width:zx,flexShrink:0,display:"flex",justifyContent:"center"},children:eo(oo,{priority:u.priority})}),l?eo(qt,{sx:{width:Ax,flexShrink:0,display:"flex",justifyContent:"center"},children:eo(RE,{size:"small",variant:"outlined",startIcon:eo(OE,{sx:{fontSize:17}}),onClick:f=>c({el:f.currentTarget,taskSeq:u.seq}),children:"\uC62E\uAE30\uAE30"})}):null]},u.seq))})})]}),eo(ME,{anchorEl:m?.el??null,open:!!m,onClose:()=>c(null),transitionDuration:0,children:n.filter(u=>Number(u.account_seq)>0&&Number(u.account_seq)!==t.accountSeq).map(u=>lr(PE,{onClick:()=>{m&&l&&l(m.taskSeq,Number(u.account_seq),u.name),c(null)},sx:{fontSize:14,minWidth:200},children:[eo(qt,{sx:{flex:1},children:u.name}),lr(qt,{component:"span",sx:{ml:2,fontSize:13,color:"#787774"},children:[d(Number(u.account_seq)),"\uAC74"]})]},u.account_seq))})]})}import{useEffect as AE,useRef as LE,useState as NE}from"react";function Fx({open:e,row:t,onClose:o,onOpenTask:n}){let[r,i]=NE(t);AE(()=>{t&&i(t)},[t]);let a=LE(0),l={dialog:Zt({modalIdPrefix:"taskbox-workload-person-dialog",open:e,onClose:()=>{o();let m=a.current;a.current=0,m>0&&n?.(m)}})};return{modals:l,shown:t??r,openTask:n?m=>{if(!l.dialog.isOpen){n(m);return}a.current=m,l.dialog.close()}:void 0}}import{jsx as js}from"react/jsx-runtime";function $x({open:e,row:t,rows:o,tasks:n,todayStr:r,employees:i,onClose:a,onChangeManager:l,onOpenTask:s}){let{modals:m,shown:c,openTask:p}=Fx({open:e,row:t,onClose:a,onOpenTask:s}),d=c?kl(n,c.accountSeq).length:0;return js(HE,{open:m.dialog.isOpen,onClose:m.dialog.close,maxWidth:"sm",title:c?`${c.name} \uC5C5\uBB34 (${d})`:"\uC5C5\uBB34",locale:"ko",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-workload-person",tabs:{visible:!1},actions:{showCancelButton:!1,right:js($E,{variant:"contained",onClick:m.dialog.close,children:"\uB2EB\uAE30"})},sections:[{id:"person-tasks",title:"",showTitle:!1,children:js(FE,{sx:{minHeight:0},children:c?js(Nx,{tasks:n,row:c,rows:o,todayStr:r,employees:i,height:"min(420px, 52vh)",hideSummary:!0,onChangeManager:l,onOpenTask:p}):null})}]})}import{useMemo as WE}from"react";import{Box as Lo,Tooltip as VE}from"@mui/material";import{OverlayScrollbar as UE}from"@ehfuse/overlay-scrollbar";import{jsx as yo,jsxs as Qs}from"react/jsx-runtime";var Hx="#e5484d",GE="#2f80ed",KE="#9a9a97",Ou=30,YE=96,Xs=56;function qu({count:e,max:t,color:o,title:n}){let r=e>0&&t>0?.18+e/t*.72:0;return yo(VE,{title:n,arrow:!0,disableInteractive:!0,placement:"top",children:yo(Lo,{sx:{display:"flex",alignItems:"center",justifyContent:"center",borderRight:"1px solid #ececea",borderBottom:"1px solid #ececea",bgcolor:r>0?`${o}${Math.round(r*255).toString(16).padStart(2,"0")}`:"transparent",color:r>.55?"#fff":"#37352f",fontSize:12.5,fontWeight:e>0?700:400,fontVariantNumeric:"tabular-nums"},children:e>0?e:""})})}function Wx({tasks:e,todayStr:t,weeks:o=6,height:n=200}){let r=WE(()=>cd(e,{todayStr:t,weeks:o}),[e,t,o]);if(r.rows.length===0)return yo(Lo,{sx:aa(n),children:yo(hl,{text:"\uB2F4\uB2F9\uC790\uAC00 \uC9C0\uC815\uB41C \uBBF8\uC644\uB8CC \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:n})});let i=`${YE}px ${Xs}px repeat(${r.weeks.length}, minmax(${Xs}px, 1fr)) ${Xs}px ${Xs}px`,a={height:Ou,display:"flex",alignItems:"center",justifyContent:"center",borderRight:"1px solid #ececea",borderBottom:"1px solid #dcdad6",fontSize:12,fontWeight:700,color:"#37352f",bgcolor:"#f8f8f7",whiteSpace:"nowrap"};return yo(Lo,{sx:aa(n),children:yo(UE,{style:{height:"100%"},thumb:{width:8},children:Qs(Lo,{sx:{display:"grid",gridTemplateColumns:i,minWidth:"fit-content",height:"100%",gridTemplateRows:`${Ou}px repeat(${r.rows.length}, minmax(${Ou}px, 1fr))`},children:[yo(Lo,{sx:{...a,justifyContent:"flex-start",pl:1},children:"\uB2F4\uB2F9\uC790"}),yo(Lo,{sx:{...a,color:Hx},children:"\uC9C0\uC5F0"}),r.weeks.map(l=>yo(Lo,{sx:{...a,...l.isCurrent?{borderBottom:"2px solid #2f80ed"}:{}},children:l.label},l.start)),yo(Lo,{sx:a,children:"\uB9C8\uAC10\uC5C6\uC74C"}),yo(Lo,{sx:a,children:"\uD569\uACC4"}),r.rows.map(l=>Qs(Lo,{sx:{display:"contents"},children:[yo(Lo,{sx:{display:"flex",alignItems:"center",pl:1,borderRight:"1px solid #ececea",borderBottom:"1px solid #ececea",fontSize:13,color:l.accountSeq>0?"#37352f":"#9a9a97",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:l.name}),yo(qu,{count:l.overdue,max:r.maxCell,color:Hx,title:`${l.name} \xB7 \uC9C0\uC5F0 ${l.overdue}\uAC74`}),l.byWeek.map((s,m)=>yo(qu,{count:s,max:r.maxCell,color:GE,title:`${l.name} \xB7 ${r.weeks[m].label} \uC8FC \uB9C8\uAC10 ${s}\uAC74`},r.weeks[m].start)),yo(qu,{count:l.noDue,max:r.maxCell,color:KE,title:`${l.name} \xB7 \uB9C8\uAC10 \uBBF8\uC815 ${l.noDue}\uAC74`}),Qs(Lo,{sx:{display:"flex",alignItems:"center",justifyContent:"center",borderBottom:"1px solid #ececea",fontSize:12.5,fontWeight:700,color:"#37352f",fontVariantNumeric:"tabular-nums"},children:[l.total,l.beyond>0?Qs(Lo,{component:"span",sx:{ml:.25,fontSize:10.5,color:"#9a9a97"},children:["(+",l.beyond,")"]}):null]})]},l.accountSeq))]})})})}import{useMemo as jE,useRef as XE,useState as Vx}from"react";import{useGlobalForm as QE}from"@ehfuse/forma";function Ux({open:e,sprints:t,tasks:o,todayStr:n,initialSprintSeq:r,capacity:i,onSaveCapacity:a,onOpenTask:l,onClose:s}){let m=QE({formId:we("taskbox-sprint-charts-form"),initialValues:{sprintSeq:"",flowDays:"30",workloadMode:"distribution"}}),[c,p]=Vx(0),[d,u]=Vx(!1),f=XE(0),g={charts:Zt({modalIdPrefix:"taskbox-sprint-charts-dialog",open:e,onClose:()=>{s();let h=f.current;f.current=0,h>0&&l?.(h)},onOpen:()=>{let h=t.find(y=>y.status==="active")??t[0],E=t.find(y=>y.seq===r)??h;m.setFormValue("sprintSeq",E?.seq?String(E.seq):"")}})},v=jE(()=>sd(o,{todayStr:n,capacity:i}),[o,n,i]),D=v.find(h=>h.accountSeq===c)??null;return{form:m,modals:g,workloadRows:v,pickedAccountSeq:c,pickedRow:D,pickPerson:p,closePersonTasks:()=>p(0),capacityOpen:d,openCapacity:()=>u(!0),closeCapacity:()=>u(!1),saveCapacity:a?async h=>{await a(h),u(!1)}:void 0,openTask:l?h=>{if(!g.charts.isOpen){l(h);return}f.current=h,g.charts.close()}:void 0}}import{Fragment as Kx,jsx as ft,jsxs as Zs}from"react/jsx-runtime";var Yx="min(560px, 62vh)",tR=`calc(${Yx} - 4px)`,oR=[{value:"30",label:"\uCD5C\uADFC 30\uC77C"},{value:"60",label:"\uCD5C\uADFC 60\uC77C"},{value:"90",label:"\uCD5C\uADFC 90\uC77C"}];function FY({open:e,sprints:t,tasks:o,todayStr:n,showSprintCharts:r,capacity:i=Kr,capacityEmployees:a=[],onSaveCapacity:l,onChangeTaskManager:s,onOpenTask:m,initialSprintSeq:c=0,onClose:p}){let d=Ux({open:e,sprints:t,tasks:o,todayStr:n,initialSprintSeq:c,capacity:i,onSaveCapacity:l,onOpenTask:m,onClose:p}),{form:u,modals:f,workloadRows:g,pickedAccountSeq:v,pickedRow:D}=d,b=Number(u.useFormValue("sprintSeq"))||0,S=Number(u.useFormValue("flowDays"))||30,h=u.useFormValue("workloadMode")==="timeline"?"timeline":"distribution",E=ZE(()=>t.find(k=>k.seq===b)??null,[t,b]),y={height:tR,boxSizing:"border-box",px:3,py:2.5,display:"flex",flexDirection:"column",minHeight:0,overflow:"hidden"},T=ft(zu,{form:u,name:"sprintSeq",label:"\uBAA9\uD45C",showLabel:!1,showEmptyOption:!1,options:t.map(k=>({value:String(k.seq),label:Ko(k)})),sx:{width:280,flexShrink:0}}),A=Zs(Kx,{children:[ft(zu,{form:u,name:"workloadMode",label:"\uBCF4\uAE30",showLabel:!1,showEmptyOption:!1,options:[{value:"distribution",label:"\uC9C0\uAE08 \uBD80\uD558(\uC9C0\uC5F0\xB7\uC784\uBC15\xB7\uC5EC\uC720)"},{value:"timeline",label:"\uC8FC\uBCC4 \uB9C8\uAC10 \uBC00\uC9D1"}],sx:{width:280,flexShrink:0}}),l?ft(Gx,{size:"small",variant:"outlined",startIcon:ft(eR,{sx:{fontSize:18}}),onClick:d.openCapacity,sx:{flexShrink:0},children:"\uC6A9\uB7C9"}):null]}),q=r??t.length>0,C=ft(zu,{form:u,name:"flowDays",label:"\uAE30\uAC04",showLabel:!1,showEmptyOption:!1,options:oR,sx:{width:280,flexShrink:0}});return Zs(Kx,{children:[ft(JE,{open:f.charts.isOpen,onClose:f.charts.close,maxWidth:"md",title:"\uC5C5\uBB34 \uCC28\uD2B8",locale:"ko",contentTopPadding:0,contentPaddingX:0,sectionsPaddingTop:0,sectionContentPaddingTop:0,sectionTitleGap:0,fixedHeight:Yx,contentBottomPadding:0,scrollPastLastSection:!1,tabs:{visible:!0,switchContent:!0,fullWidth:!0},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-sprint-charts",sections:[...q?[{id:"velocity",tabTitle:"\uBCA8\uB85C\uC2DC\uD2F0",showTitle:!1,children:ft(sr,{sx:y,children:ft(Ex,{sprints:t,tasks:o,height:"100%"})})},{id:"burndown",tabTitle:"\uBC88\uB2E4\uC6B4",showTitle:!1,children:ft(sr,{sx:y,children:E?ft(Rx,{sprint:E,tasks:o,todayStr:n,height:"100%",headerLeft:T}):Zs(sr,{sx:aa("100%"),children:[ft(sr,{sx:kc,children:T}),ft(hl,{text:"\uBC88\uB2E4\uC6B4\uC744 \uBCFC \uBAA9\uD45C\uB97C \uC120\uD0DD\uD558\uC138\uC694.",height:"100%"})]})})},{id:"cumulative-flow",tabTitle:"\uB204\uC801\uD750\uB984\uB3C4",showTitle:!1,children:ft(sr,{sx:y,children:ft(Mx,{tasks:o,todayStr:n,days:S,height:"100%",headerLeft:C})})}]:[],{id:"workload",tabTitle:"\uC6CC\uD06C\uB85C\uB4DC",showTitle:!1,children:ft(sr,{sx:y,children:h==="timeline"?Zs(sr,{sx:{display:"flex",flexDirection:"column",height:"100%",minHeight:0},children:[ft(sr,{sx:kc,children:A}),ft(Wx,{tasks:o,todayStr:n,height:"100%"})]}):ft(Ox,{tasks:o,todayStr:n,height:"100%",capacity:i,headerLeft:A,selectedAccountSeq:v,onSelectPerson:s?d.pickPerson:void 0})})},{id:"lead-time",tabTitle:"\uB9AC\uB4DC\uD0C0\uC784",showTitle:!1,children:ft(sr,{sx:y,children:ft(Px,{tasks:o,todayStr:n,days:S,height:"100%",headerLeft:C})})}],actions:{showCancelButton:!1,right:ft(Gx,{variant:"contained",onClick:f.charts.close,children:"\uB2EB\uAE30"})}}),ft($x,{open:v>0,row:D,rows:g,tasks:o,todayStr:n,employees:a,onClose:d.closePersonTasks,onChangeManager:s,onOpenTask:d.openTask}),d.saveCapacity?ft(Dx,{open:d.capacityOpen,capacity:i,employees:a,onClose:d.closeCapacity,onSave:d.saveCapacity}):null]})}import{Checkbox as nR,Divider as rR,Menu as iR,MenuItem as Au}from"@mui/material";import{jsx as Ja,jsxs as jx}from"react/jsx-runtime";function UY({anchorEl:e,candidates:t,selectedNames:o,avatarSrcByName:n,onToggle:r,onClear:i,onClose:a}){return jx(iR,{anchorEl:e,open:!!e,onClose:a,transitionDuration:0,children:[t.length===0?Ja(Au,{disabled:!0,sx:{fontSize:14},children:"\uBAA9\uB85D\uC5D0 \uC9C0\uC815\uB41C \uC0AC\uB78C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):t.map(l=>{let s=o.includes(l.name);return jx(Au,{onClick:()=>r(l),sx:{fontSize:14,minWidth:170,gap:1},children:[Ja(nR,{size:"small",checked:s,sx:{p:0}}),Ja(go,{names:[l.name],size:20,avatarSrcByName:n}),l.name]},`${l.accountSeq}-${l.name}`)}),Ja(rR,{}),Ja(Au,{disabled:o.length===0,onClick:i,sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{useState as aR}from"react";import{ButtonBase as lR,Menu as sR,MenuItem as cR}from"@mui/material";import mR from"@mui/icons-material/KeyboardArrowDown";import uR from"@mui/icons-material/Check";import{Fragment as dR,jsx as Lu,jsxs as Nu}from"react/jsx-runtime";function JY({value:e,onChange:t,options:o}){let[n,r]=aR(null),i=o??Zc,a=Zc.find(l=>l.value===e)?.label??"";return Nu(dR,{children:[Nu(lR,{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,Lu(mR,{sx:{fontSize:17,color:"#9a9a97"}})]}),Lu(sR,{transitionDuration:0,anchorEl:n,open:!!n,onClose:()=>r(null),children:i.map(l=>Nu(cR,{selected:l.value===e,onClick:()=>{t(l.value),r(null)},sx:{fontSize:14,minWidth:140,justifyContent:"space-between",gap:1},children:[l.label,l.value===e?Lu(uR,{sx:{fontSize:16,color:"#2f80ed"}}):null]},l.value))})]})}import{Box as Js,ButtonBase as pR}from"@mui/material";import{DateTextField as Xx}from"@ehfuse/mui-form-controls";import{jsx as el,jsxs as Qx}from"react/jsx-runtime";var fR=[{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 Zx({fromDate:e,toDate:t,onChange:o}){let n=i=>{if(i<=0){o("","");return}o(ia(hc(i)),ia(new Date))},r=i=>i<=0?!e&&!t:!e||!t?!1:e===ia(hc(i))&&t===ia(new Date);return Qx(Js,{sx:{display:"flex",alignItems:"center",gap:1.5,flexWrap:"wrap"},children:[el(Js,{sx:{display:"flex",alignItems:"center",gap:1.5},children:fR.map(i=>{let a=r(i.months);return el(pR,{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)})}),Qx(Js,{sx:{display:"flex",alignItems:"center",gap:.5},children:[el(Xx,{value:e,size:"small",placeholder:"\uC2DC\uC791\uC77C",onChange:i=>o(i.target.value,t),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}}),el(Js,{component:"span",sx:{fontSize:13,color:"#9a9a97"},children:"~"}),el(Xx,{value:t,size:"small",placeholder:"\uC885\uB8CC\uC77C",onChange:i=>o(e,i.target.value),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}})]})]})}import{Popover as gR}from"@mui/material";import{jsx as Jx}from"react/jsx-runtime";function cj({anchorEl:e,fromDate:t,toDate:o,onChange:n,onClose:r}){return Jx(gR,{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:Jx(Zx,{fromDate:t,toDate:o,onChange:n})})}import{Box as xR,ButtonBase as bR,Tab as hR,Tabs as kR}from"@mui/material";import TR from"@mui/icons-material/Checklist";import yR from"@mui/icons-material/Face";import SR from"@mui/icons-material/Publish";import CR from"@mui/icons-material/NotificationsOutlined";import BR from"@mui/icons-material/BugReportOutlined";import vR from"@mui/icons-material/SupportAgentOutlined";import IR from"@mui/icons-material/DescriptionOutlined";import _R from"@mui/icons-material/Inventory2Outlined";import{jsx as Qo}from"react/jsx-runtime";function eb(e,t){return t>0?`${e} (${t})`:e}var Cj=[{id:"my",label:"\uC804\uCCB4",icon:Qo(TR,{sx:{fontSize:18}})},{id:"mine",label:"\uB0B4 \uC5C5\uBB34",icon:Qo(yR,{sx:{fontSize:18}})},{id:"sent",label:"\uBCF4\uB0B8 \uC5C5\uBB34",icon:Qo(SR,{sx:{fontSize:18}})},{id:"support",label:"\uACE0\uAC1D\uC13C\uD130",icon:Qo(vR,{sx:{fontSize:18}})},{id:"bug",label:"\uC624\uB958",icon:Qo(BR,{sx:{fontSize:18}})},{id:"notice",label:"\uACF5\uC9C0\uC0AC\uD56D",icon:Qo(CR,{sx:{fontSize:18}})},{id:"archive",label:"\uBCF4\uAD00\uD568",icon:Qo(_R,{sx:{fontSize:18}}),hideCount:!0},{id:"report",label:"\uBCF4\uACE0\uC11C",icon:Qo(IR,{sx:{fontSize:18}}),hideCount:!0}];function wR(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 Bj({items:e,activeTab:t,counts:o,onChange:n,compact:r=!1}){let i=xe(),a=wR(i.tabs),l=e;return r?Qo(xR,{sx:{display:"flex",flexWrap:"wrap",gap:1.25},children:l.map(s=>{let m=t===s.id;return Qo(bR,{onClick:()=>n(s.id),sx:{px:1.5,py:.75,borderRadius:1,fontSize:Ct(13.5),fontWeight:500,whiteSpace:"nowrap",border:"1px solid",bgcolor:m?i.tabs.selectedBg:i.tabs.bg,color:m?i.tabs.selectedColor:i.tabs.color,borderColor:m?i.tabs.selectedBg:i.tabs.borderColor},children:eb(s.label,s.hideCount?0:o[s.id]??0)},s.id)})}):Qo(kR,{value:t,onChange:(s,m)=>n(m),sx:{minHeight:46,"& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:"12px",minHeight:46}},children:l.map(s=>Qo(hR,{value:s.id,label:eb(s.label,s.hideCount?0:o[s.id]??0),icon:s.icon,iconPosition:"start",sx:a},s.id))})}import{useEffect as DR,useMemo as ER,useState as Fu}from"react";import{Divider as ec,ListItemIcon as co,Menu as $u,MenuItem as Nt}from"@mui/material";import RR from"@mui/icons-material/OpenInNewOutlined";import MR from"@mui/icons-material/RestoreFromTrashOutlined";import PR from"@mui/icons-material/Check";import OR from"@mui/icons-material/CheckCircleOutlined";import qR from"@mui/icons-material/RadioButtonUnchecked";import zR from"@mui/icons-material/SendOutlined";import AR from"@mui/icons-material/EventOutlined";import LR from"@mui/icons-material/PersonOutlineOutlined";import NR from"@mui/icons-material/ViewKanbanOutlined";import FR from"@mui/icons-material/ContentCopyOutlined";import $R from"@mui/icons-material/PrintOutlined";import HR from"@mui/icons-material/NextPlanOutlined";import WR from"@mui/icons-material/ContentPasteOutlined";import VR from"@mui/icons-material/ShareOutlined";import UR from"@mui/icons-material/DirectionsRunOutlined";import tb from"@mui/icons-material/ChevronRight";import GR from"@mui/icons-material/ArchiveOutlined";import KR from"@mui/icons-material/UnarchiveOutlined";import{ConfirmDialog as ob}from"@ehfuse/alerts";import{Fragment as nb,jsx as ke,jsxs as _t}from"react/jsx-runtime";function iX({target:e,onClose:t,customTabs:o,sprints:n=[],myAccountSeq:r=0,onOpenDetail:i,onToggleCompleted:a,onRequestConfirm:l,onChangeDueDate:s,onChangeReminder:m,onMemberEdit:c,onMoveProject:p,onDuplicate:d,onPrint:u,onCreateFollowUp:f,onShare:g,onAssignSprint:v,onArchiveToggle:D,onDelete:b,onRestore:S,onPurge:h}){let E=Ue(),y=Sn(),[T,I]=Fu(null),[A,q]=Fu(null),[C,k]=Fu(null);DR(()=>{e||(I(null),q(null),k(null))},[e]);let x=e?.task??null,B=!!x?.is_notice,w=!!x?.is_event,P=x?!Cn(x,r):!1,{editPolicy:H,shareText:_}=ue(),N=x?Sr(x,r,H):!1,G=x?jr(x,r,H,P):!1,Q=x?jr(x,r,H,!1):!1,se=!!x?.deleted,me=(()=>{if(!x||x.completed)return!0;let W=_r(x,r);return W.total===0||W.count>=W.total})(),Y=ER(()=>new Set(o.filter(W=>W.useSprints).map(W=>W.key)),[o]),O=async(W="one")=>{let V=x;if(t(),!V)return;await ob({title:"\uC5C5\uBB34 \uC0AD\uC81C",message:W==="series"?`"${V.title}" \uC758 \uC774 \uD68C\uCC28\uC640 \uC774\uD6C4 \uBC18\uBCF5 \uD68C\uCC28\uB97C \uD734\uC9C0\uD1B5\uC73C\uB85C \uBCF4\uB0B4\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`:`"${V.title}" \uC5C5\uBB34\uB97C \uD734\uC9C0\uD1B5\uC73C\uB85C \uBCF4\uB0B4\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&b?.(V.seq,W)},oe=async()=>{let W=x;if(t(),!W)return;await ob({title:"\uC601\uAD6C \uC0AD\uC81C",message:`"${W.title}" \uC5C5\uBB34\uB97C \uC601\uAD6C\uD788 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C? \uB418\uB3CC\uB9B4 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.`})&&h?.(W.seq)},F=()=>{x&&D(x.seq,!x.archived),t()};return _t(nb,{children:[_t($u,{open:!!e,onClose:t,transitionDuration:0,anchorReference:E?"none":"anchorPosition",anchorPosition:!E&&e?{top:e.position.top,left:e.position.left}:void 0,slotProps:{paper:{sx:{minWidth:190,...E?{position:"fixed",top:"50%",left:"50%",translate:"-50% -50%",maxHeight:"70vh"}:{}}},list:E?{sx:{"& .MuiMenuItem-root":{py:1,minHeight:0}}}:void 0},children:[_t(Nt,{onClick:()=>{x&&i(x),t()},sx:{fontSize:14},children:[ke(co,{children:ke(RR,{sx:{fontSize:19}})}),"\uC0C1\uC138 \uC5F4\uAE30"]}),se?ke(ec,{}):null,se&&S?_t(Nt,{disabled:Q,onClick:()=>{x&&S(x.seq),t()},sx:{fontSize:14},children:[ke(co,{children:ke(MR,{sx:{fontSize:19}})}),"\uBCF5\uC6D0"]}):null,se&&h?_t(Nt,{disabled:Q,onClick:()=>{oe()},sx:{fontSize:14,color:"#e5484d"},children:[ke(co,{children:ke(Gt,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC601\uAD6C \uC0AD\uC81C"]}):null,se?null:_t(nb,{children:[_t(Nt,{disabled:B?(x?.author_account_seq??0)!==r:(x?.author_account_seq??0)!==r&&(x?.manager_account_seq??0)!==r,onClick:()=>{x&&a(x.seq,!x.completed),t()},sx:{fontSize:14},children:[ke(co,{children:x?.completed?ke(qR,{sx:{fontSize:19}}):ke(OR,{sx:{fontSize:19}})}),x?.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC"]}),!B&&l?_t(Nt,{disabled:me,onClick:()=>{x&&l(x),t()},sx:{fontSize:14},children:[ke(co,{children:ke(zR,{sx:{fontSize:19}})}),"\uD655\uC778 \uC694\uCCAD"]}):null,w?null:ke(ec,{}),w?null:_t(Nt,{disabled:N,onClick:W=>{x&&I({anchorEl:W.currentTarget,task:x})},sx:{fontSize:14},children:[ke(co,{children:ke(AR,{sx:{fontSize:19}})}),"\uB9C8\uAC10\uC608\uC815 \uBCC0\uACBD"]}),!B&&!w&&c?_t(Nt,{disabled:H==="coreAuthorManager"?N:!1,onClick:()=>{x&&c(x,"manager"),t()},sx:{fontSize:14},children:[ke(co,{children:ke(LR,{sx:{fontSize:19}})}),"\uCC45\uC784\uC790 \uBCC0\uACBD"]}):null,w?null:_t(Nt,{disabled:N,onClick:W=>{x&&q({anchorEl:W.currentTarget,task:x})},sx:{fontSize:14},children:[ke(co,{children:ke(NR,{sx:{fontSize:19}})}),"\uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9",ke(tb,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}),ke(ec,{}),d?_t(Nt,{disabled:P,onClick:()=>{x&&d(x.seq),t()},sx:{fontSize:14},children:[ke(co,{children:ke(FR,{sx:{fontSize:19}})}),"\uBCF5\uC81C"]}):null,u?_t(Nt,{onClick:()=>{x&&u(x),t()},sx:{fontSize:14},children:[ke(co,{children:ke($R,{sx:{fontSize:19}})}),"\uC778\uC1C4"]}):null,f&&x&&!x.is_event&&!x.is_notice?_t(Nt,{onClick:()=>{x&&f(x.seq),t()},sx:{fontSize:14},children:[ke(co,{children:ke(HR,{sx:{fontSize:19}})}),"\uD6C4\uC18D \uC5C5\uBB34 \uB9CC\uB4E4\uAE30"]}):null,_t(Nt,{onClick:()=>{x&&(g?g(x):Ai(x,E,_)),t()},sx:{fontSize:14},children:[ke(co,{children:E?ke(VR,{sx:{fontSize:19}}):ke(WR,{sx:{fontSize:19}})}),E?"\uACF5\uC720":"\uB0B4\uC6A9 \uBCF5\uC0AC"]}),x&&!x.is_notice&&!x.is_event&&Y.has(String(x.tab_key??""))&&v?_t(Nt,{onClick:W=>k(W.currentTarget),sx:{fontSize:14},children:[ke(co,{children:ke(UR,{sx:{fontSize:19}})}),"\uBAA9\uD45C\uC5D0 \uB123\uAE30",ke(tb,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}):null,_t(Nt,{onClick:F,disabled:P||!x?.archived&&!(x&&El(x)),sx:{fontSize:14},children:[ke(co,{children:x?.archived?ke(KR,{sx:{fontSize:19}}):ke(GR,{sx:{fontSize:19}})}),x?.archived?"\uBCF4\uAD00 \uD574\uC81C":"\uBCF4\uAD00"]}),b?ke(ec,{}):null,b?_t(Nt,{disabled:G,onClick:()=>{O("one")},sx:{fontSize:14,color:"#e5484d"},children:[ke(co,{children:ke(Gt,{sx:{fontSize:19,color:"#e5484d"}})}),(x?.repeat_group_key??0)>0?"\uC0AD\uC81C (\uC774 \uD68C\uCC28\uB9CC)":"\uC0AD\uC81C"]}):null,b&&(x?.repeat_group_key??0)>0?_t(Nt,{disabled:G,onClick:()=>{O("series")},sx:{fontSize:14,color:"#e5484d"},children:[ke(co,{children:ke(Gt,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC0AD\uC81C (\uC774\uD6C4 \uBC18\uBCF5 \uC804\uCCB4)"]}):null]})]}),ke(Go,{anchorEl:T?.anchorEl??null,open:!!T,date:T?.task.due_date??"",reminders:vn(T?.task),hideReminder:!!T?.task.completed,centered:E,onClose:()=>{I(null),t()},onDateChange:W=>{T&&s(T.task.seq,W)},onReminderChange:W=>{T&&m?.(T.task.seq,W)}}),_t($u,{transitionDuration:0,anchorEl:A?.anchorEl??null,open:!!A,onClose:()=>{q(null),t()},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...y,children:[ke(Nt,{selected:!A?.task.tab_key,onClick:()=>{A&&p(A.task.seq,""),q(null),t()},sx:{fontSize:14,minWidth:170},children:"\uC5C6\uC74C"}),o.filter(W=>!W.archived).map(W=>ke(Nt,{selected:A?.task.tab_key===W.key,onClick:()=>{A&&p(A.task.seq,W.key),q(null),t()},sx:{fontSize:14,minWidth:170},children:W.label},W.key))]}),ke($u,{transitionDuration:0,anchorEl:C,open:!!C,onClose:()=>k(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},children:[{seq:0,label:"\uBC31\uB85C\uADF8 (\uBBF8\uBC30\uC815)"},...n.filter(W=>`custom-${W.group_seq}`===String(x?.tab_key??"")).map(W=>({seq:W.seq,label:Ko(W)}))].map(W=>_t(Nt,{onClick:()=>{x&&v?.(x.seq,W.seq),k(null),t()},sx:{fontSize:14,minWidth:160,gap:1},children:[W.label,(x?.sprint_seq??0)===W.seq?ke(PR,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},W.seq))})]})}import{Checkbox as YR,Divider as jR,Menu as XR,MenuItem as rb}from"@mui/material";import{jsx as tc,jsxs as ib}from"react/jsx-runtime";function mX({anchorEl:e,labelOptions:t,selectedKeys:o,onToggle:n,onClear:r,onClose:i}){return ib(XR,{transitionDuration:0,anchorEl:e,open:!!e,onClose:i,children:[t.map(a=>{let l=o.includes(a.key);return ib(rb,{onClick:()=>n(a.key),sx:{fontSize:14,minWidth:190,gap:1},children:[tc(YR,{size:"small",checked:l,sx:{p:0}}),tc($e,{option:a})]},a.key)}),tc(jR,{}),tc(rb,{disabled:o.length===0,onClick:()=>{r(),i()},sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{Divider as QR,Menu as ZR,MenuItem as ab}from"@mui/material";import JR from"@mui/icons-material/Check";import eM from"@mui/icons-material/SettingsOutlined";import{jsx as Hu,jsxs as Wu}from"react/jsx-runtime";function bX(e){let{anchorEl:t,sprints:o,value:n,onSelect:r,onManage:i,onClose:a}=e;return Wu(ZR,{transitionDuration:0,anchorEl:t,open:!!t,onClose:a,children:[[{seq:0,label:"\uC804\uCCB4"},{seq:-1,label:"\uBBF8\uBC30\uC815 \uC5C5\uBB34"},...o.map(l=>({seq:l.seq,label:Ko(l)}))].map(l=>Wu(ab,{onClick:()=>{r(l.seq),a()},sx:{fontSize:14,minWidth:180,gap:1},children:[l.label,n===l.seq?Hu(JR,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},l.seq)),Hu(QR,{}),Wu(ab,{onClick:()=>{a(),i()},sx:{fontSize:14,gap:1},children:[Hu(eM,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uAD00\uB9AC\u2026"]})]})}var tM={my:"tasks",mine:"tasks",sent:"tasks",notice:"notice",support:"support",bug:"bug",archive:"archive",done:"done",report:"report"};function oM(e){return tM[e]??"tasks"}var sb={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"},lb=["list","calendar","month","card","kanban","sprint","timeline"],nM=["list","kanban"],rM=["list","card"];function TX(e){let t=oM(e);switch(t){case"notice":return{kind:t,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:t,viewOptions:lb,showCreate:!0,createLabel:"\uC624\uB958 \uB4F1\uB85D",showGroupBy:!0,showSprintFilter:!0,showDateRange:!1,showHideCompleted:!0,forceFlatList:!1,columns:{bug:!0}};case"support":return{kind:t,viewOptions:nM,showCreate:!1,createLabel:"",showGroupBy:!0,showSprintFilter:!1,showDateRange:!1,showHideCompleted:!0,forceFlatList:!1,columns:{support:!0,showProject:!1}};case"archive":return{kind:t,viewOptions:rM,showCreate:!1,createLabel:"",showGroupBy:!1,showSprintFilter:!1,showDateRange:!0,showHideCompleted:!1,forceFlatList:!0,columns:{showActions:!1}};case"done":return{kind:t,viewOptions:["list"],showCreate:!1,createLabel:"",showGroupBy:!1,showSprintFilter:!1,showDateRange:!0,showHideCompleted:!1,forceFlatList:!0,columns:{showActions:!1}};case"report":return{kind:t,viewOptions:[],showCreate:!1,createLabel:"",showGroupBy:!1,showSprintFilter:!1,showDateRange:!0,showHideCompleted:!1,forceFlatList:!0,columns:{}};default:return{kind:t,viewOptions:lb,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"}:{}}}}import{useMemo as iM}from"react";import{useKeyboardState as aM}from"@ehfuse/keyboard-state";var cb=[{key:"g l",view:"list"},{key:"g b",view:"card"},{key:"g k",view:"kanban"},{key:"g s",view:"sprint"},{key:"g c",view:"calendar"},{key:"g m",view:"month"},{key:"g t",view:"timeline"}];function vX(e,t={}){let{enabled:o=!0,views:n}=t,{onCreateTask:r,onFocusSearch:i,onToggleHelp:a,onChangeView:l,onRefresh:s,onEscape:m}=e,c=n?n.join(","):"",p=iM(()=>{let d=[];if(r&&d.push({key:"n",callback:r,options:{preventDefault:!0}}),i&&d.push({key:"/",callback:i,options:{preventDefault:!0}}),s&&d.push({key:"r",callback:s,options:{preventDefault:!0}}),a&&d.push({key:"shift+?",callback:a,options:{preventDefault:!0}}),m&&d.push({key:"escape",callback:m,options:{allowInEditable:!0}}),l)for(let u of mb(c?c.split(","):void 0))d.push({key:u.key,callback:()=>l(u.view),options:{preventDefault:!0}});return d},[r,i,a,l,s,m,c]);aM(o?p:[])}function mb(e){if(!e)return cb;let t=new Set(e);return cb.filter(o=>t.has(o.view))}function tl(e){return[{keys:"N",description:"\uC0C8 \uC5C5\uBB34 \uB4F1\uB85D"},{keys:"/",description:"\uAC80\uC0C9"},{keys:"R",description:"\uBAA9\uB85D \uC0C8\uB85C\uACE0\uCE68"},...mb(e).map(t=>({keys:t.key.split(" ").map(o=>o.toUpperCase()).join(" \u2192 "),description:`${sb[t.view]} \uBCF4\uAE30`})),{keys:"?",description:"\uB2E8\uCD95\uD0A4 \uB3C4\uC6C0\uB9D0"},{keys:"Esc",description:"\uB2EB\uAE30"}]}var IX=tl();import{Box as ol,Button as sM}from"@mui/material";import cM from"@mui/icons-material/ArrowRightAlt";import{FormDialog as mM}from"@ehfuse/mui-form-dialog";import{useState as lM}from"react";var ub={id:"concept",tabTitle:"\uAC1C\uB150",intro:"\uC5C5\uBB34\uD568\uC740 '\uB204\uAC00 \uBB34\uC5C7\uC744 \uC5B8\uC81C\uAE4C\uC9C0 \uD558\uB294\uC9C0'\uB97C \uD55C \uACF3\uC5D0 \uBAA8\uC73C\uB294 \uB3C4\uAD6C\uC785\uB2C8\uB2E4. \uBA54\uC2E0\uC800\uC5D0 \uD769\uC5B4\uC9C4 \uC9C0\uC2DC\uC640 \uC5D1\uC140\uC5D0 \uC801\uC5B4 \uB454 \uB9C8\uAC10\uC77C \uB300\uC2E0, \uC5C5\uBB34\uB97C \uBCF4\uB0B8 \uC0AC\uB78C\uACFC \uBC1B\uC740 \uC0AC\uB78C\uC774 \uAC19\uC740 \uD654\uBA74\uC744 \uBD05\uB2C8\uB2E4.",topics:[{title:"\uC138 \uAC78\uC74C\uC774\uBA74 \uB05D",lead:"\uC5C5\uBB34 \uD558\uB098\uC758 \uC0DD\uC560\uB294 \uC774 \uC138 \uAC78\uC74C\uC785\uB2C8\uB2E4. \uB098\uBA38\uC9C0 \uAE30\uB2A5\uC740 \uC804\uBD80 \uC774 \uD750\uB984\uC744 \uB3D5\uB294 \uAC83\uC774\uB77C, \uC774\uAC83\uB9CC \uC54C\uBA74 \uCCAB\uB0A0\uBD80\uD130 \uC501\uB2C8\uB2E4.",steps:[{title:"\uB4F1\uB85D",desc:"\uC81C\uBAA9 \xB7 \uCC45\uC784\uC790 \xB7 \uB9C8\uAC10\uC608\uC815\uB9CC \uC801\uC5B4 \uBCF4\uB0C5\uB2C8\uB2E4."},{title:"\uD655\uC778",desc:"\uBC1B\uC740 \uC0AC\uB78C\uC774 \uD655\uC778\uD558\uACE0 \uCC98\uB9AC\uD55C \uB4A4 \uC644\uB8CC\uD569\uB2C8\uB2E4."},{title:"\uBCF4\uAD00",desc:"\uB05D\uB09C \uC5C5\uBB34\uB294 \uBCF4\uAD00\uD568\uC5D0 \uB0A8\uC544 \uC5B8\uC81C\uB4E0 \uB2E4\uC2DC \uCC3E\uC2B5\uB2C8\uB2E4."}]},{title:"\uC5C5\uBB34\uB97C \uB458\uB7EC\uC2FC \uC138 \uC0AC\uB78C",lead:"\uC5C5\uBB34\uB9C8\uB2E4 \uBCF4\uB0B8 \uC0AC\uB78C \uD558\uB098, \uBC1B\uC740 \uC0AC\uB78C \uD558\uB098, \uD568\uAED8 \uC54C\uC544\uC57C \uD560 \uC0AC\uB78C\uB4E4\uC774 \uC788\uC2B5\uB2C8\uB2E4. \uC138 \uC5ED\uD560\uC774 \uBAA8\uB450 '\uAD00\uC5EC\uC790'\uC774\uACE0, \uACF5\uAC1C \uBC94\uC704\uAC00 **\uBE44\uACF5\uAC1C**\uC5EC\uB3C4 \uC11C\uB85C\uC5D0\uAC8C \uBCF4\uC785\uB2C8\uB2E4. \uB204\uAC00 \uBB34\uC5C7\uC744 \uB204\uB97C \uC218 \uC788\uB294\uC9C0\uB294 **\uC5ED\uD560** \uD0ED\uC5D0 \uBAA8\uC544 \uB450\uC5C8\uC2B5\uB2C8\uB2E4.",items:[{term:"\uC791\uC131\uC790",desc:"\uC5C5\uBB34\uB97C \uBCF4\uB0B8 \uC0AC\uB78C. \uC5C5\uBB34\uC758 \uC8FC\uC778\uC785\uB2C8\uB2E4."},{term:"\uCC45\uC784\uC790",desc:"\uC5C5\uBB34\uB97C \uBC1B\uC544 \uCC98\uB9AC\uD558\uB294 \uC0AC\uB78C(\uD55C \uBA85)."},{term:"\uCC38\uC870\uC790",desc:"\uD568\uAED8 \uC54C\uC544\uC57C \uD560 \uC0AC\uB78C\uB4E4(\uC5EC\uB7EC \uBA85)."}]},{title:"\uBC1B\uC740 \uC5C5\uBB34\uC640 \uBCF4\uB0B8 \uC5C5\uBB34",lead:"\uD0ED\uC740 '\uB0B4\uAC00 \uBC1B\uC740 \uAC83'\uACFC '\uB0B4\uAC00 \uBCF4\uB0B8 \uAC83'\uC744 \uAC00\uB974\uB294 \uCD95\uC785\uB2C8\uB2E4. \uB0A8\uC774 \uC2DC\uD0A8 \uC77C\uACFC \uB0B4\uAC00 \uC2DC\uD0A8 \uC77C\uC774 \uC11E\uC774\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",items:[{term:"\uB0B4 \uC5C5\uBB34",desc:"\uB0B4\uAC00 \uCC45\uC784\uC790\uC774\uAC70\uB098 \uCC38\uC870\uC790\uC778 \uC5C5\uBB34 \u2014 \uBC1B\uC740 \uC5C5\uBB34\uC785\uB2C8\uB2E4."},{term:"\uBCF4\uB0B8 \uC5C5\uBB34",desc:"\uB0B4\uAC00 \uB4F1\uB85D\uD574 \uB2E4\uB978 \uC0AC\uB78C\uC5D0\uAC8C \uB9E1\uAE34 \uC5C5\uBB34\uC785\uB2C8\uB2E4."},{term:"\uC804\uCCB4",desc:"\uB0B4\uAC00 \uBCFC \uC218 \uC788\uB294 \uBAA8\uB4E0 \uC5C5\uBB34. \uB0B4 \uC5C5\uBB34\xB7\uCC45\uC784\uC790\uBCC4\xB7\uC77C\uC815 \uADF8\uB8F9\uC73C\uB85C \uB098\uB258\uC5B4 \uBCF4\uC785\uB2C8\uB2E4."},{term:"\uACF5\uC9C0\uC0AC\uD56D",desc:"\uC804 \uC9C1\uC6D0 \uB610\uB294 \uC9C0\uC815 \uB300\uC0C1\uC790\uC5D0\uAC8C \uC54C\uB9AC\uB294 \uAE00. \uB300\uC0C1\uC790\uB294 \uD655\uC778 \uBC84\uD2BC\uC73C\uB85C \uC77D\uC74C\uC744 \uB0A8\uAE41\uB2C8\uB2E4."},{term:"\uBCF4\uAD00\uD568",desc:'\uB05D\uB098\uC11C \uBCF4\uAD00\uB41C \uC5C5\uBB34\xB7\uC77C\uC815\uACFC \uD734\uC9C0\uD1B5. "\uC5C5\uBB34 \xB7 \uC77C\uC815 \u25BE" \uBA54\uB274\uB85C \uAD6C\uBD84\uC744 \uBC14\uAFD4 \uBD05\uB2C8\uB2E4.'}]},{title:"\uD655\uC778 \xB7 \uC644\uB8CC \xB7 \uAC80\uC218",subtitle:"\uC138 \uAC00\uC9C0 \uB2E4\uB978 \uB9D0",lead:"\uB2E4\uC2DC \uBB3B\uC9C0 \uC54A\uC544\uB3C4 \uB418\uB294 \uC774\uC720\uAC00 \uC5EC\uAE30 \uC788\uC2B5\uB2C8\uB2E4. \uC77D\uC5C8\uB294\uC9C0, \uB05D\uB0AC\uB294\uC9C0, \uAC80\uC218\uD588\uB294\uC9C0\uAC00 \uAC01\uAC01 \uD45C\uC2DC\uB85C \uB0A8\uC2B5\uB2C8\uB2E4.",items:[{term:"\uD655\uC778",desc:'"\uC77D\uC5C8\uB2E4". \uBC1B\uC740 \uC0AC\uB78C\uC774 **\uD655\uC778** \uBC84\uD2BC\uC744 \uB20C\uB7EC \uB0A8\uAE41\uB2C8\uB2E4. \uC544\uC9C1 \uD655\uC778\uD558\uC9C0 \uC54A\uC740 \uC5C5\uBB34\uB294 \uBAA9\uB85D \uB9E8 \uC704 **\uBBF8\uD655\uC778** \uC601\uC5ED\uC5D0 \uBAA8\uC785\uB2C8\uB2E4.'},{term:"\uC644\uB8CC",desc:'"\uB05D\uB0AC\uB2E4". \uCC45\uC784\uC790\uB098 \uC791\uC131\uC790\uAC00 \uC644\uB8CC \uCCB4\uD06C(\u25CB)\uB97C \uB204\uB985\uB2C8\uB2E4.'},{term:"\uAC80\uC218\uC644\uB8CC",desc:'"\uBD24\uB2E4, \uAD1C\uCC2E\uB2E4". \uCC45\uC784\uC790\uAC00 \uC644\uB8CC\uD55C \uC5C5\uBB34\uB294 \uC791\uC131\uC790\uC5D0\uAC8C **\uAC80\uC218 \uB300\uAE30**\uB85C \uB0A8\uACE0, \uC791\uC131\uC790\uAC00 **\uAC80\uC218\uC644\uB8CC**\uB85C \uB0B4\uB9AC\uAC70\uB098 \uBBF8\uD761\uD558\uBA74 \uC0AC\uC720\uB97C \uC801\uC5B4 **\uB418\uB3CC\uB9BD\uB2C8\uB2E4**.'}]},{title:"\uB450 \uAC1C\uC758 \uB0A0\uC9DC",lead:"\uC5C5\uBB34\uC5D0\uB294 \uC2DC\uC791\uC77C\uC2DC\uC640 \uB9C8\uAC10\uC608\uC815 \uB450 \uB0A0\uC9DC\uAC00 \uC788\uACE0, \uC54C\uB9BC\uACFC \uCE98\uB9B0\uB354\uB294 \uC804\uBD80 \uC774 \uB458\uC744 \uAE30\uC900\uC73C\uB85C \uC6C0\uC9C1\uC785\uB2C8\uB2E4.",items:[{term:"\uC2DC\uC791\uC77C\uC2DC",desc:"\uC77C\uC744 \uC2DC\uC791\uD560 \uC2DC\uC810. \uCC45\uC784\uC790 \uC54C\uB9BC\uC740 \uC774\uB54C\uBD80\uD130 \uAC11\uB2C8\uB2E4. \uBE44\uC6CC \uB450\uBA74 \uBC14\uB85C \uC2DC\uC791\uC73C\uB85C \uBD05\uB2C8\uB2E4."},{term:"\uB9C8\uAC10\uC608\uC815",desc:"\uB05D\uB0B4\uAE30\uB85C \uD55C \uC2DC\uC810. \uC0AC\uC804\xB7\uB2F9\uC77C\xB7\uC9C0\uC5F0 \uC54C\uB9BC\uC758 \uAE30\uC900\uC774\uACE0, \uCE98\uB9B0\uB354\xB7\uD0C0\uC784\uB77C\uC778\uC5D0 \uB193\uC774\uB294 \uB0A0\uC9DC\uC785\uB2C8\uB2E4. \uC9C0\uB09C \uB9C8\uAC10\uB9CC \uBE68\uAC04\uC0C9\uC73C\uB85C \uD45C\uC2DC\uB429\uB2C8\uB2E4."}]}]};var db={id:"roles",tabTitle:"\uC5ED\uD560",intro:"\uC5C5\uBB34\uB9C8\uB2E4 \uBCF4\uB0B8 \uC0AC\uB78C(\uC791\uC131\uC790) \uD558\uB098, \uBC1B\uC544 \uCC98\uB9AC\uD558\uB294 \uC0AC\uB78C(\uCC45\uC784\uC790) \uD558\uB098, \uD568\uAED8 \uC54C\uC544\uC57C \uD560 \uC0AC\uB78C\uB4E4(\uCC38\uC870\uC790)\uC774 \uC788\uC2B5\uB2C8\uB2E4. \uC14B \uB2E4 '\uAD00\uC5EC\uC790'\uB77C\uC11C \uACF5\uAC1C \uBC94\uC704\uAC00 **\uBE44\uACF5\uAC1C**\uC5EC\uB3C4 \uC11C\uB85C\uC5D0\uAC8C \uBCF4\uC785\uB2C8\uB2E4. \uB204\uAC00 \uBB34\uC5C7\uC744 \uB204\uB97C \uC218 \uC788\uB294\uC9C0\uAC00 \uC774 \uD0ED\uC758 \uB0B4\uC6A9\uC785\uB2C8\uB2E4.",topics:[{title:"\uC791\uC131\uC790",subtitle:"\uC5C5\uBB34\uC758 \uC8FC\uC778",lead:"\uC5C5\uBB34\uB97C \uB4F1\uB85D\uD55C \uC0AC\uB78C\uC785\uB2C8\uB2E4. \uB0B4\uC6A9\uC744 \uC815\uD558\uACE0 \uACB0\uACFC\uB97C \uAC80\uC218\uD558\uB294 \uC790\uB9AC\uB77C, \uC5C5\uBB34\uB97C \uC5C6\uC568 \uC218 \uC788\uB294 \uC720\uC77C\uD55C \uC5ED\uD560\uC785\uB2C8\uB2E4.",items:[{term:"\uD558\uB294 \uC77C",desc:"\uBB34\uC5C7\uC744 \uC5B8\uC81C\uAE4C\uC9C0 \uD560\uC9C0 \uC801\uC5B4 \uCC45\uC784\uC790\uC5D0\uAC8C \uBCF4\uB0C5\uB2C8\uB2E4. \uB05D\uB09C \uB4A4 \uACB0\uACFC\uB97C \uBCF4\uACE0 **\uAC80\uC218\uC644\uB8CC**\uB85C \uB0B4\uB9AC\uAC70\uB098, \uBBF8\uD761\uD558\uBA74 \uC0AC\uC720\uB97C \uC801\uC5B4 **\uB418\uB3CC\uB9BD\uB2C8\uB2E4**."},{term:"\uC218\uC815",desc:"\uC81C\uBAA9\xB7\uB9C8\uAC10\uC608\uC815\xB7\uCC45\uC784\uC790\xB7\uCC38\uC870\uC790\xB7\uB0B4\uC6A9 \uC804\uBD80 \uACE0\uCE69\uB2C8\uB2E4. \uBC14\uAFBC \uB0B4\uC6A9\uC740 \uC7A0\uC2DC \uBAA8\uC544 \uD55C \uAC74\uC758 \uC218\uC815 \uC54C\uB9BC\uC73C\uB85C \uAC11\uB2C8\uB2E4."},{term:"\uC644\uB8CC",desc:"\uC9C1\uC811 \uC644\uB8CC \uCCB4\uD06C\uB97C \uB204\uB97C \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uBCF8\uC778\uC774 \uC644\uB8CC\uD558\uBA74 \uAC80\uC218 \uB2E8\uACC4\uAC00 \uC5C6\uC5B4 \uADF8\uB300\uB85C \uB05D\uC785\uB2C8\uB2E4."},{term:"\uB418\uB3CC\uB9AC\uAE30",desc:"\uCC45\uC784\uC790\uAC00 \uC644\uB8CC\uD55C \uC5C5\uBB34\uB97C **\uAC80\uC218 \uB300\uAE30\uC778 \uB3D9\uC548\uB9CC** \uC0AC\uC720\uC640 \uD568\uAED8 \uB418\uB3CC\uB9BD\uB2C8\uB2E4. \uC0AC\uC720\uB294 \uB313\uAE00\uB85C \uB0A8\uACE0 \uC644\uB8CC\uD55C \uC0AC\uB78C\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC11\uB2C8\uB2E4."},{term:"\uC0AD\uC81C",desc:"\uC791\uC131\uC790 \uBCF8\uC778\uB9CC \uC0AD\uC81C\uD569\uB2C8\uB2E4(\uAD00\uB9AC\uC790 \uAD8C\uD55C\uC740 \uC870\uC9C1 \uC124\uC815\uC5D0 \uB530\uB985\uB2C8\uB2E4). \uC0AD\uC81C\uD55C \uC5C5\uBB34\uB294 \uBCF4\uAD00\uD568\uC758 \uD734\uC9C0\uD1B5\uC5D0 \uB0A8\uC2B5\uB2C8\uB2E4."},{term:"\uD655\uC778",desc:"\uD655\uC778 \uB300\uC0C1\uC5D0\uC11C **\uBE60\uC9D1\uB2C8\uB2E4** \u2014 \uB0B4\uAC00 \uC4F4 \uAE00\uC744 \uB0B4\uAC00 \uC77D\uC5C8\uB2E4\uACE0 \uB0A8\uAE38 \uC77C\uC740 \uC5C6\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4."}]},{title:"\uCC45\uC784\uC790",subtitle:"\uBC1B\uC544\uC11C \uCC98\uB9AC\uD558\uB294 \uC0AC\uB78C",lead:"\uC5C5\uBB34\uB97C \uC2E4\uC81C\uB85C \uCC98\uB9AC\uD558\uB294 \uD55C \uC0AC\uB78C\uC785\uB2C8\uB2E4. \uC5C5\uBB34\uB97C \uBC1B\uC73C\uBA74 \uC2DC\uC791\uC77C\uC2DC\uBD80\uD130 \uC54C\uB9BC\uC774 \uC624\uACE0, \uBAA9\uB85D\uC5D0\uC11C\uB294 '\uB0B4 \uC5C5\uBB34'\uB85C \uBAA8\uC785\uB2C8\uB2E4.",items:[{term:"\uD558\uB294 \uC77C",desc:"\uB0B4\uC6A9\uC744 \uD655\uC778\uD558\uACE0 \uCC98\uB9AC\uD55C \uB4A4 \uC644\uB8CC \uCCB4\uD06C(\u25CB)\uB97C \uB204\uB985\uB2C8\uB2E4. \uC644\uB8CC\uD558\uBA74 \uC791\uC131\uC790\uC5D0\uAC8C **\uAC80\uC218 \uB300\uAE30**\uB85C \uB118\uC5B4\uAC11\uB2C8\uB2E4."},{term:"\uD655\uC778",desc:'**\uD655\uC778** \uBC84\uD2BC\uC73C\uB85C "\uC77D\uC5C8\uB2E4"\uB97C \uB0A8\uAE41\uB2C8\uB2E4. \uCC45\uC784\uC790\uAC00 \uD655\uC778\uD558\uBA74 \uC791\uC131\uC790\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC11\uB2C8\uB2E4.'},{term:"\uC218\uC815",desc:"\uACE0\uCE60 \uC218 \uC788\uC2B5\uB2C8\uB2E4 \u2014 \uC9C4\uD589\uD558\uB2E4 \uBCF4\uBA74 \uB9C8\uAC10\uC608\uC815\xB7\uB0B4\uC6A9\uC774 \uB2EC\uB77C\uC9C0\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4. \uC0C1\uD0DC\xB7\uBE44\uACE0\xB7\uD560\uC77C\uB3C4 \uBAA9\uB85D\uC5D0\uC11C \uBC14\uB85C \uACE0\uCE69\uB2C8\uB2E4."},{term:"\uD560\uC77C\uB85C \uB098\uB204\uAE30",desc:"\uD070 \uC5C5\uBB34\uB294 \uD560\uC77C(\uCCB4\uD06C\uB9AC\uC2A4\uD2B8)\uB85C \uCABC\uAC1C\uACE0, \uD544\uC694\uD558\uBA74 \uD560\uC77C\uC744 \uBCC4\uB3C4 \uC5C5\uBB34\uB85C \uC2B9\uACA9\uD574 \uB2E4\uB978 \uC0AC\uB78C\uC5D0\uAC8C \uB9E1\uAE41\uB2C8\uB2E4."},{term:"\uC0AD\uC81C",desc:"\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uB0A8\uC774 \uB9E1\uAE34 \uC77C\uC744 \uBC1B\uC740 \uCABD\uC774 \uC5C6\uC568 \uC218\uB294 \uC5C6\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4 \u2014 \uB418\uB3CC\uB9B4 \uC77C\uC774\uBA74 \uB313\uAE00\uB85C \uC54C\uB9BD\uB2C8\uB2E4."},{term:"\uD55C \uBA85\uBFD0",desc:"\uCC45\uC784\uC790\uB294 \uD55C \uC0AC\uB78C\uC785\uB2C8\uB2E4. \uC5EC\uB7FF\uC774 \uB098\uB220\uC57C \uD558\uB294 \uC77C\uC740 \uD560\uC77C\uB85C \uCABC\uAC1C\uAC70\uB098 \uC5C5\uBB34\uB97C \uB098\uB220 \uB4F1\uB85D\uD569\uB2C8\uB2E4."}]},{title:"\uCC38\uC870\uC790",subtitle:"\uD568\uAED8 \uC54C\uC544\uC57C \uD560 \uC0AC\uB78C\uB4E4",lead:"\uC9C1\uC811 \uCC98\uB9AC\uD558\uC9C0\uB294 \uC54A\uC9C0\uB9CC \uB0B4\uC6A9\uC744 \uC54C\uC544\uC57C \uD558\uB294 \uC0AC\uB78C\uB4E4\uC785\uB2C8\uB2E4. \uC5EC\uB7EC \uBA85\uC744 \uB458 \uC218 \uC788\uACE0, \uC77D\uC5C8\uB2E4\uB294 \uD45C\uC2DC\uB9CC \uB0A8\uAE41\uB2C8\uB2E4.",items:[{term:"\uD558\uB294 \uC77C",desc:"\uB0B4\uC6A9\uC744 \uC77D\uACE0 \uD544\uC694\uD558\uBA74 \uB313\uAE00\uB85C \uC758\uACAC\uC744 \uB2F5\uB2C8\uB2E4. **\uD655\uC778** \uBC84\uD2BC\uC73C\uB85C \uC77D\uC74C\uC744 \uB0A8\uAE41\uB2C8\uB2E4."},{term:"\uD655\uC778",desc:"\uD655\uC778 \uB300\uC0C1\uC785\uB2C8\uB2E4. \uCC38\uC870\uC790\uC758 \uD655\uC778\uC740 \uC54C\uB9BC\uC744 \uB9CC\uB4E4\uC9C0 \uC54A\uACE0 \uD655\uC778 \uD604\uD669(n/m)\uC5D0\uB9CC \uBC18\uC601\uB429\uB2C8\uB2E4 \u2014 \uC0AC\uB78C\uC774 \uB9CE\uC544 \uC54C\uB9BC\uC774 \uC2DC\uB044\uB7EC\uC6CC\uC9C0\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4."},{term:"\uC218\uC815",desc:"\uC0C1\uD0DC\xB7\uB77C\uBCA8\xB7\uBE44\uACE0\xB7\uD560\uC77C\xB7\uCCA8\uBD80\xB7\uB313\uAE00 \uAC19\uC740 **\uC9C4\uD589 \uD56D\uBAA9**\uC740 \uCC38\uC870\uC790\uB3C4 \uC501\uB2C8\uB2E4. \uC81C\uBAA9\xB7\uB0B4\uC6A9\xB7\uC77C\uC815\xB7\uCC45\uC784\uC790\xB7\uACF5\uAC1C\uBC94\uC704 \uAC19\uC740 **\uC57D\uC18D**\uC740 \uC870\uC9C1 \uC124\uC815\uC5D0 \uB530\uB77C \uC791\uC131\uC790\xB7\uCC45\uC784\uC790\uB9CC \uACE0\uCE60 \uC218 \uC788\uC2B5\uB2C8\uB2E4(\uAE30\uBCF8\uC740 \uCC38\uC870\uC790\uB3C4 \uAC00\uB2A5). \uC644\uB8CC \uCCB4\uD06C\uB294 \uC5B8\uC81C\uB098 \uC791\uC131\uC790\xB7\uCC45\uC784\uC790\uB9CC."},{term:"\uC644\uB8CC \xB7 \uC0AD\uC81C",desc:"\uB458 \uB2E4 \uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uCC38\uC870\uB294 '\uBCF4\uB294 \uC790\uB9AC'\uC785\uB2C8\uB2E4."},{term:"\uB9C8\uAC10 \uC54C\uB9BC",desc:"\uBC1B\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uB9C8\uAC10 \uACC4\uC5F4 \uC54C\uB9BC\uC740 \uCC45\uC784\uC790\xB7\uC791\uC131\uC790\uC5D0\uAC8C\uB9CC \uAC11\uB2C8\uB2E4(\uCC38\uC870\uC790\uAE4C\uC9C0 \uBCF4\uB0B4\uBA74 \uC18C\uC74C\uC774 \uB429\uB2C8\uB2E4)."}]},{title:"\uAD8C\uD55C \uD55C\uB208\uC5D0",lead:"\uAC19\uC740 \uC5C5\uBB34\uB97C \uBCF4\uACE0 \uC788\uC5B4\uB3C4 \uB204\uB97C \uC218 \uC788\uB294 \uBC84\uD2BC\uC774 \uB2E4\uB985\uB2C8\uB2E4. \uBC84\uD2BC\uC774 \uC548 \uBCF4\uC774\uBA74 \uAD8C\uD55C\uC774 \uC5C6\uB294 \uAC83\uC785\uB2C8\uB2E4(\uC7A0\uAE34 \uCC44\uB85C \uBCF4\uC774\uC9C0 \uC54A\uACE0 \uC544\uC608 \uC228\uC2B5\uB2C8\uB2E4).",items:[{term:"\uC218\uC815",desc:"\uC9C4\uD589 \uD56D\uBAA9(\uC0C1\uD0DC\xB7\uB77C\uBCA8\xB7\uBE44\uACE0\xB7\uD560\uC77C \uB4F1)\uC740 \uAD00\uC5EC\uC790 \uC804\uC6D0. **\uC57D\uC18D**(\uC81C\uBAA9\xB7\uB0B4\uC6A9\xB7\uC77C\uC815\xB7\uBC30\uC815\xB7\uACF5\uAC1C\uBC94\uC704)\uC740 \uC870\uC9C1 \uC124\uC815\uC5D0 \uB530\uB77C \uC791\uC131\uC790\xB7\uCC45\uC784\uC790\uB85C \uC81C\uD55C\uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uAD00\uC5EC\uC790\uAC00 \uC544\uB2C8\uBA74 \uC5F4\uB78C\uB9CC \uB429\uB2C8\uB2E4."},{term:"\uC644\uB8CC \xB7 \uC644\uB8CC \uD574\uC81C",desc:"\uC791\uC131\uC790 \xB7 \uCC45\uC784\uC790."},{term:"\uAC80\uC218\uC644\uB8CC \xB7 \uB418\uB3CC\uB9AC\uAE30",desc:"\uC791\uC131\uC790\uB9CC. \uB0A8\uC774 \uC644\uB8CC\uD55C \uC5C5\uBB34\uAC00 \uAC80\uC218 \uB300\uAE30\uC77C \uB54C\uB9CC \uB098\uC635\uB2C8\uB2E4."},{term:"\uC0AD\uC81C",desc:"\uC791\uC131\uC790\uB9CC."},{term:"\uD655\uC778",desc:"\uCC45\uC784\uC790 \xB7 \uCC38\uC870\uC790 \u2014 \uC791\uC131\uC790\uB294 \uC81C\uC678."},{term:"\uB313\uAE00",desc:"\uBCFC \uC218 \uC788\uB294 \uC0AC\uB78C \uB204\uAD6C\uB098."}]},{title:"\uACF5\uC9C0\uC0AC\uD56D\uC740 \uADDC\uCE59\uC774 \uB2E4\uB985\uB2C8\uB2E4",lead:"\uACF5\uC9C0\uB294 '\uB9E1\uAE30\uB294 \uC77C'\uC774 \uC544\uB2C8\uB77C '\uC54C\uB9AC\uB294 \uAE00'\uC774\uB77C \uCC45\uC784\uC790\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. \uB300\uC0C1\uC790\uAC00 \uACE7 \uC77D\uC5B4\uC57C \uD560 \uC0AC\uB78C\uB4E4\uC785\uB2C8\uB2E4.",items:[{term:"\uC791\uC131\uC790",desc:"\uACF5\uC9C0\uB97C \uC62C\uB9B0 \uC0AC\uB78C. \uC218\uC815\xB7\uAC8C\uC2DC\uC885\uB8CC\xB7\uC0AD\uC81C\uB97C \uD63C\uC790 \uB9E1\uC2B5\uB2C8\uB2E4(\uAD00\uB9AC\uC790\uB3C4 \uB0A8\uC758 \uACF5\uC9C0\uB294 \uACE0\uCE58\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4)."},{term:"\uB300\uC0C1\uC790",desc:"\uC804 \uC9C1\uC6D0 \uB610\uB294 \uC9C0\uC815\uD55C \uC0AC\uB78C\uB4E4. **\uD655\uC778** \uBC84\uD2BC\uC73C\uB85C \uC77D\uC74C\uC744 \uB0A8\uAE30\uACE0, \uC791\uC131\uC790\uB294 \uD655\uC778 \uD604\uD669(n/m)\uC73C\uB85C \uB204\uAC00 \uC548 \uC77D\uC5C8\uB294\uC9C0 \uBD05\uB2C8\uB2E4."},{term:"\uD655\uC778 \uC54C\uB9BC",desc:"\uB300\uC0C1\uC790\uAC00 \uD655\uC778\uD574\uB3C4 \uC791\uC131\uC790\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uC804 \uC9C1\uC6D0 \uACF5\uC9C0\uB77C\uBA74 \uC54C\uB9BC\uC774 \uC0AC\uB78C \uC218\uB9CC\uD07C \uC3DF\uC544\uC9C0\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4."},{term:"\uBC18\uBCF5 \uACF5\uC9C0",desc:"\uB9E4\uC8FC \uC548\uC804\uAD50\uC721\uCC98\uB7FC \uB418\uD480\uC774\uD558\uB294 \uC548\uB0B4\uB294 **\uBC18\uBCF5**\uC744 \uAC78 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uD68C\uCC28\uB9C8\uB2E4 \uC0C8 \uACF5\uC9C0\uAC00 \uB418\uC5B4 \uB300\uC0C1\uC790\uAC00 \uADF8\uB54C\uADF8\uB54C \uB2E4\uC2DC \uD655\uC778\uD558\uACE0, \uBAA9\uB85D\uC5D0\uB294 **\uC9C0\uAE08 \uAC8C\uC2DC\uD560 \uD68C\uCC28 1\uAC74\uB9CC** \uBCF4\uC785\uB2C8\uB2E4. \uB2E4\uC74C \uD68C\uCC28\uB294 **\uAC8C\uC2DC\uC77C\uC2DC**\uAC00 \uB418\uBA74 \uC2A4\uC2A4\uB85C \uC62C\uB77C\uC624\uBA74\uC11C \uB300\uC0C1\uC790\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC11\uB2C8\uB2E4(\uADF8 \uC804\uAE4C\uC9C0\uB294 \uAC8C\uC2DC\uC608\uC815)."}]},{title:"\uACE0\uAC1D\uC13C\uD130 \uC5C5\uBB34\uB294 \uC791\uC131\uC790\uAC00 \uC678\uBD80\uC785\uB2C8\uB2E4",feature:"support",lead:"\uAC00\uB9F9\uC810\xB7\uD648\uD398\uC774\uC9C0\uC5D0\uC11C \uB4E4\uC5B4\uC628 \uBB38\uC758\uB294 \uC791\uC131\uC790\uAC00 \uC6B0\uB9AC \uC9C1\uC6D0\uC774 \uC544\uB2C8\uB77C, \uAD00\uC5EC\uC790 \uADDC\uCE59\uC744 \uADF8\uB300\uB85C \uC4F8 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.",items:[{term:"\uC791\uC131\uC790",desc:"\uBB38\uC758\uB97C \uB0A8\uAE34 \uACE0\uAC1D(\uC9C1\uC6D0 \uBA85\uBD80\uC5D0 \uC5C6\uB294 \uC678\uBD80 \uACC4\uC815). \uC6B0\uB9AC \uCABD \uAD00\uC5EC\uC790 \uD310\uC815\uC5D0\uC11C\uB294 \uBE60\uC9D1\uB2C8\uB2E4."},{term:"\uC218\uC815",desc:"\uC5F4\uB78C\uD560 \uC218 \uC788\uB294 \uC9C1\uC6D0 \uB204\uAD6C\uB098 \uACE0\uCE69\uB2C8\uB2E4 \u2014 \uAD00\uC5EC\uC790\uAC00 \uC5C6\uC5B4 \uC544\uBB34\uB3C4 \uC190\uB300\uC9C0 \uBABB\uD558\uBA74 \uB2F5\uBCC0\uC744 \uB2EC \uC218 \uC5C6\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4."},{term:"\uCC45\uC784\uC790",desc:"**\uAC00\uC838\uAC00\uAE30**\uB85C \uC815\uD574\uC9D1\uB2C8\uB2E4. \uBA3C\uC800 \uC7A1\uC740 \uC0AC\uB78C\uC774 \uB2F5\uBCC0\uC744 \uB9E1\uC2B5\uB2C8\uB2E4."},{term:"\uB2F5\uBCC0",desc:"\uC9C1\uC6D0\uC774 \uB2E8 \uB313\uAE00\uC774 \uACE7 \uB2F5\uBCC0\uC785\uB2C8\uB2E4. \uACE0\uAC1D\uC5D0\uAC8C\uB294 \uB2F5\uBCC0 \uC54C\uB9BC\uB9CC \uAC00\uACE0, \uC5C5\uBB34\uD568\uC758 \uB2E4\uB978 \uC54C\uB9BC\uC740 \uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},{term:"\uD655\uC778 \xB7 \uAC80\uC218",desc:"\uC5C6\uC2B5\uB2C8\uB2E4 \u2014 \uACE0\uAC1D\uC774 \uD655\uC778 \uBC84\uD2BC\uC744 \uB204\uB97C \uD654\uBA74\uC774 \uC5C6\uC5B4 \uD655\uC778\xB7\uAC80\uC218 \uC6CC\uD06C\uD50C\uB85C\uB97C \uD0DC\uC6B0\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}]}]};var pb={id:"basics",tabTitle:"\uAE30\uBCF8 \uC0AC\uC6A9",intro:"\uB9E4\uC77C \uC4F0\uB294 \uC870\uC791\uB9CC \uBAA8\uC558\uC2B5\uB2C8\uB2E4. \uAC1C\uB150 \uD0ED\uC758 \uC138 \uAC78\uC74C \uC21C\uC11C \uADF8\uB300\uB85C\uC785\uB2C8\uB2E4.",topics:[{title:"1. \uB4F1\uB85D\uD558\uAE30",lines:["**\uC0C8\uB85C \uB9CC\uB4E4\uAE30** \uBC84\uD2BC(\uB2E8\uCD95\uD0A4 **N**) \u203A \uC81C\uBAA9 \xB7 \uCC45\uC784\uC790 \xB7 \uB9C8\uAC10\uC608\uC815\uC744 \uC801\uACE0 \uC800\uC7A5\uD569\uB2C8\uB2E4. \uB0B4\uC6A9\xB7\uCC38\uC870\uC790\xB7\uC2DC\uC791\uC77C\uC2DC\xB7\uC911\uC694\uB3C4\uB294 \uD544\uC694\uD560 \uB54C\uB9CC \uCC44\uC6C1\uB2C8\uB2E4.","**\uACF5\uAC1C \uBC94\uC704** : \uBE44\uACF5\uAC1C(\uAD00\uC5EC\uC790\uB9CC) / \uBD80\uC11C\uACF5\uAC1C / \uC804\uCCB4\uACF5\uAC1C. \uCC45\uC784\uC790\uAC00 \uC5C6\uB294 \uACF5\uAC1C \uC5C5\uBB34\uB294 \uC5F4\uB78C\uC790\uAC00 **\uAC00\uC838\uAC00\uAE30**\uB85C \uB9E1\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4.","**\uBC18\uBCF5** \uC5C5\uBB34\uB294 \uB9E4\uC77C\xB7\uB9E4\uC8FC\xB7\uB9E4\uC6D4 \uD68C\uCC28\uB85C \uB9CC\uB4E4\uC5B4\uC9C0\uACE0, **\uC77C\uC815**\uC740 \uC2DC\uAC01\uC774 \uC788\uB294 \uD589\uC0AC\uB77C \uC644\uB8CC \uB300\uC2E0 \uCE98\uB9B0\uB354\uC5D0 \uB193\uC785\uB2C8\uB2E4."]},{title:"2. \uD560\uC77C \uB098\uB204\uAE30",subtitle:"\uD63C\uC790 \uD558\uAE30 \uD070 \uC5C5\uBB34\uB77C\uBA74",lead:"\uC5C5\uBB34 \uD558\uB098\uB97C \uC798\uAC8C \uCABC\uAC1C \uC9C4\uD589\uC744 \uB208\uC5D0 \uBCF4\uC774\uAC8C \uD558\uACE0, \uD544\uC694\uD558\uBA74 \uC870\uAC01\uC744 \uD300\uC6D0\uC5D0\uAC8C \uB098\uB220 \uB9E1\uAE41\uB2C8\uB2E4. \uCABC\uAC24 \uC77C\uC774 \uC544\uB2C8\uBA74 \uAC74\uB108\uB6F0\uC5B4\uB3C4 \uB429\uB2C8\uB2E4.",lines:["\uC0C1\uC138\uC758 **\uD560\uC77C**\uC5D0 \uD56D\uBAA9\uC744 \uC801\uACE0 **Enter** \uB610\uB294 \uC624\uB978\uCABD **[+]** \uB85C \uCD94\uAC00\uD569\uB2C8\uB2E4. \uCD94\uAC00\uC640 \uCCB4\uD06C\uB294 **\uB204\uAD6C\uB098** \uD560 \uC218 \uC788\uACE0(\uD568\uAED8 \uC4F0\uB294 \uCE78), \uD56D\uBAA9 \uC0AD\uC81C\uB9CC \uC218\uC815 \uAD8C\uD55C\uC774 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4.",'\uC9C4\uD589\uC740 \uBAA9\uB85D\xB7\uCE74\uB4DC\uC5D0 **"1/3"** \uCC98\uB7FC \uBCF4\uC5EC\uC11C, \uBB3B\uC9C0 \uC54A\uC544\uB3C4 \uC5B4\uB514\uAE4C\uC9C0 \uB410\uB294\uC9C0 \uB4DC\uB7EC\uB0A9\uB2C8\uB2E4. \uB370\uC2A4\uD06C\uD1B1\uC5D0\uC11C\uB294 \uD578\uB4E4\uB85C \uB04C\uC5B4 \uC21C\uC11C\uB97C \uBC14\uAFC9\uB2C8\uB2E4.',"\uD56D\uBAA9\uC5D0 \uB9C8\uC6B0\uC2A4\uB97C \uC62C\uB824 **\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30**\uB97C \uB204\uB974\uBA74 \uADF8 \uD56D\uBAA9\uC774 **\uBCC4\uB3C4 \uC5C5\uBB34**\uAC00 \uB429\uB2C8\uB2E4 \u2014 \uCC45\uC784\uC790\uC640 \uB9C8\uAC10\uC608\uC815\uC744 \uB530\uB85C \uC815\uD574 \uB098\uB220 \uB9E1\uAE38 \uC218 \uC788\uC2B5\uB2C8\uB2E4.","\uC774\uBBF8 \uC788\uB294 \uC5C5\uBB34\uB97C \uD560\uC77C\uC5D0 **\uBD99\uC77C** \uC218\uB3C4 \uC788\uC2B5\uB2C8\uB2E4(\uC785\uB825\uCE78 \uC67C\uCABD \uB9C1\uD06C \uBC84\uD2BC).","\uC5F0\uACB0\uB41C \uD56D\uBAA9\uC758 \uCCB4\uD06C\uB294 \uACE7 **\uADF8 \uC5C5\uBB34\uC758 \uC644\uB8CC**\uC785\uB2C8\uB2E4. \uADF8\uB798\uC11C \uCCB4\uD06C\uB3C4 \uADF8 \uC5C5\uBB34\uC758 \uC644\uB8CC \uAD8C\uD55C\uC774 \uC788\uB294 \uC0AC\uB78C(\uC791\uC131\uC790\xB7\uCC45\uC784\uC790)\uB9CC \uB204\uB97C \uC218 \uC788\uACE0, \uD300\uC6D0\uC774 \uC790\uAE30 \uC5C5\uBB34\uB97C \uB05D\uB0B4\uBA74 \uC774\uCABD \uD560\uC77C\uB3C4 \uC800\uC808\uB85C \uCCB4\uD06C\uB429\uB2C8\uB2E4.","\uC5F0\uACB0 \uC5C5\uBB34\uB97C \uD734\uC9C0\uD1B5\uC5D0 \uBCF4\uB0B4\uBA74 \uD560\uC77C\uC5D0\uC11C\uB3C4 \uD568\uAED8 \uBE60\uC9D1\uB2C8\uB2E4."]},{title:"3. \uC5F4\uC5B4 \uBCF4\uACE0 \uB300\uD654\uD558\uAE30",lines:["\uD589\uC744 \uB204\uB974\uBA74 \uC624\uB978\uCABD\uC5D0 \uC0C1\uC138\uAC00 \uC5F4\uB9BD\uB2C8\uB2E4(\uBAA8\uBC14\uC77C\uC740 \uC804\uCCB4 \uD654\uBA74). \uC81C\uBAA9\uACFC \uC18D\uC131\uC740 \uADF8 \uC790\uB9AC\uC5D0\uC11C \uB20C\uB7EC \uACE0\uCE69\uB2C8\uB2E4.","\uC5C5\uBB34 \uB300\uD654\uB294 **\uB313\uAE00**\uB85C \uD569\uB2C8\uB2E4. \uD30C\uC77C\uC744 \uBD99\uC774\uACE0, **\uD655\uC778(\u2713)\xB7\uC88B\uC544\uC694** \uBC18\uC751\uC73C\uB85C \uC77D\uC5C8\uC74C\uC744 \uB0A8\uAE41\uB2C8\uB2E4. \uB313\uAE00\uC740 \uC791\uC131\uC790\uC640 \uC9C1\uC804 \uB313\uAE00 \uC791\uC131\uC790\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC00\uC11C \uB2F5\uAE00 \uD750\uB984\uC774 \uB04A\uAE30\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.","**\uD65C\uB3D9** \uC544\uC774\uCF58\uC5D0\uC11C \uB4F1\uB85D\xB7\uC218\uC815\xB7\uD655\uC778\xB7\uC644\uB8CC \uC774\uB825\uC744 \uBD05\uB2C8\uB2E4. \uBAA8\uBC14\uC77C \uC0C1\uC138\uB294 **\u22EE** \uC5D0 \uD65C\uB3D9\xB7\uACF5\uC720\xB7\uC0AD\uC81C\uAC00 \uC788\uACE0, \uACE0\uCE5C \uB0B4\uC6A9\uC740 **\uC800\uC7A5\uD558\uAE30**\uB85C \uD55C \uBC88\uC5D0 \uBCF4\uB0C5\uB2C8\uB2E4."]},{title:"4. \uD655\uC778\uD558\uAE30",lines:["\uBC1B\uC740 \uC5C5\uBB34\uB294 **\uD655\uC778** \uBC84\uD2BC\uC73C\uB85C \uC77D\uC74C\uC744 \uB0A8\uAE41\uB2C8\uB2E4. \uD655\uC778 \uC804 \uC5C5\uBB34\uB294 \uBAA9\uB85D \uB9E8 \uC704 **\uBBF8\uD655\uC778** \uC601\uC5ED(\uBAA8\uBC14\uC77C\uC740 \uBBF8\uD655\uC778 \uADF8\uB8F9)\uC5D0 \uBAA8\uC5EC \uC788\uC2B5\uB2C8\uB2E4.","\uD655\uC778 \uC5F4\uC758 **n/m** \uC744 \uB204\uB974\uBA74 \uB204\uAC00 \uD655\uC778\uD588\uB294\uC9C0 \uBCF4\uC774\uACE0, \uC791\uC131\uC790\uB294 \uBBF8\uD655\uC778\uC790\uC5D0\uAC8C **\uD655\uC778 \uC694\uCCAD**\uC744 \uB2E4\uC2DC \uBCF4\uB0BC \uC218 \uC788\uC2B5\uB2C8\uB2E4."]},{title:"5. \uC9C4\uD589\uD558\uACE0 \uC644\uB8CC\uD558\uAE30",lines:["\uC0C1\uD0DC \uCE69\uC744 \uB204\uB974\uBA74 \uC2DC\uC791\uC804 \u203A \uC9C4\uD589\uC911 \u203A \uBCF4\uB958\uB97C \uACE0\uB985\uB2C8\uB2E4.","\uC644\uB8CC \uCCB4\uD06C(\u25CB)\uB294 **\uC791\uC131\uC790\uC640 \uCC45\uC784\uC790\uB9CC** \uB204\uB97C \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uB9C8\uAC10\uC608\uC815\uC774 \uBE44\uC5B4 \uC788\uC73C\uBA74 \uC644\uB8CC \uC2DC\uAC01\uC73C\uB85C \uCC44\uC6CC\uC9D1\uB2C8\uB2E4."]},{title:"6. \uAC80\uC218\uD558\uAE30",subtitle:"\uAC80\uC218\uC644\uB8CC \xB7 \uB418\uB3CC\uB9AC\uAE30",lines:["\uCC45\uC784\uC790\uAC00 \uC644\uB8CC\uD558\uBA74 \uC791\uC131\uC790\uC758 \uBAA9\uB85D \uB9E8 \uC704\uC5D0 **\uAC80\uC218 \uB300\uAE30**\uB85C \uB0A8\uC2B5\uB2C8\uB2E4(\uC644\uB8CC \uC228\uAE30\uAE30\uC640 \uBB34\uAD00, \uBAA8\uBC14\uC77C\uC740 \uBBF8\uD655\uC778 \uADF8\uB8F9).","\uACB0\uACFC\uAC00 \uAD1C\uCC2E\uC73C\uBA74 **\uAC80\uC218\uC644\uB8CC** \uBC84\uD2BC\uC73C\uB85C \uB0B4\uB9BD\uB2C8\uB2E4. \uBBF8\uD761\uD558\uBA74 \uC644\uB8CC \uCCB4\uD06C\uB97C \uD574\uC81C(\uC0C1\uC138\uC758 **\uB418\uB3CC\uB9AC\uAE30**)\uD558\uBA70 \uC0AC\uC720\uB97C \uC801\uC2B5\uB2C8\uB2E4 \u2014 \uC0AC\uC720\uB294 \uB313\uAE00\uB85C \uB0A8\uACE0, \uC0C1\uD0DC\uB294 \uC9C4\uD589\uC911\uC73C\uB85C \uB3CC\uC544\uAC00\uACE0, \uC644\uB8CC\uD55C \uC0AC\uB78C\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC11\uB2C8\uB2E4.","**\uB418\uB3CC\uB9AC\uAE30\uB294 \uAC80\uC218 \uC804\uC5D0\uB9CC** \uB098\uC635\uB2C8\uB2E4 \u2014 \uAC80\uC218\uC644\uB8CC\uB97C \uB204\uB978 \uB4A4\uC5D0\uB294 \uC0AC\uC720 \uC5C6\uC774 \uB0B4\uB9AC\uB294 **\uC644\uB8CC \uD574\uC81C**\uB85C \uBC14\uB01D\uB2C8\uB2E4.","\uBCF8\uC778\uC774 \uC644\uB8CC\uD55C \uC5C5\uBB34\uB294 \uAC80\uC218 \uB300\uC0C1\uC774 \uC544\uB2C8\uB77C \uCC98\uC74C\uBD80\uD130 **\uC644\uB8CC \uD574\uC81C**\uC785\uB2C8\uB2E4."]},{title:"7. \uBCF4\uAD00\uD558\uAE30 \xB7 \uC0AD\uC81C\uD558\uAE30",lines:["\uC644\uB8CC\uD55C \uC5C5\uBB34\uB294 \uC124\uC815 \uAE30\uAC04(\uAE30\uBCF8 7\uC77C) \uB4A4 \uC0C8\uBCBD\uC5D0 \uC790\uB3D9\uC73C\uB85C **\uBCF4\uAD00\uD568**\uC73C\uB85C \uC62E\uACA8\uC9D1\uB2C8\uB2E4. \uC6B0\uD074\uB9AD \u203A **\uBCF4\uAD00**\uC73C\uB85C \uBC14\uB85C \uBCF4\uB0B4\uACE0, \uBCF4\uAD00\uD568\uC758 **\uBCF4\uAD00 \uD574\uC81C**\uB85C \uB418\uB3CC\uB9BD\uB2C8\uB2E4.","\uC0AD\uC81C\uB294 \uC791\uC131\uC790\uB9CC \uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4(\uC0C1\uC138\uC758 \uD734\uC9C0\uD1B5 \uC544\uC774\uCF58). \uC9C0\uC6B4 \uC5C5\uBB34\uB294 **\uD734\uC9C0\uD1B5**\uC5D0\uC11C \uB418\uC0B4\uB9B4 \uC218 \uC788\uACE0, \uC124\uC815 \uAE30\uAC04(\uAE30\uBCF8 90\uC77C) \uB4A4 \uC601\uAD6C \uC0AD\uC81C\uB429\uB2C8\uB2E4.",'\uBC18\uBCF5 \uC5C5\uBB34\uB294 \uC644\uB8CC\xB7\uC0AD\uC81C\uD560 \uB54C "\uC774 \uD68C\uCC28\uB9CC / \uC774\uD6C4 \uC804\uCCB4"\uB97C \uACE0\uB985\uB2C8\uB2E4.']}]};var fb={id:"notify",tabTitle:"\uC54C\uB9BC",intro:"\uC54C\uB9BC\uC740 \uBCA8(\uC5C5\uBB34\uD568 \uC548)\uACFC \uC571 \uD478\uC2DC \uB450 \uAC08\uB798\uB85C \uAC11\uB2C8\uB2E4. \uC544\uB798 \uD45C\uC758 '\uBC1B\uB294 \uC0AC\uB78C'\uC5D0 \uC5C6\uC73C\uBA74 \uADF8 \uC77C\uC774 \uC77C\uC5B4\uB098\uB3C4 \uC54C\uB9BC\uC774 \uC624\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uC54C\uB9BC\uC744 \uC904\uC774\uB294 \uCABD\uC73C\uB85C \uC815\uD55C \uADDC\uCE59\uC774 \uB9CE\uC544, \uAD00\uC5EC\uC790\uB77C\uACE0 \uC804\uBD80 \uBC1B\uB294 \uAC83\uC740 \uC544\uB2D9\uB2C8\uB2E4.",topics:[{title:"\uC5C5\uBB34\uB97C \uB9E1\uACE0 \uBC1B\uC744 \uB54C",items:[{term:"\uCC45\uC784\uC790\uB85C \uC9C0\uC815",desc:"\uC0C8 **\uCC45\uC784\uC790**\uC5D0\uAC8C. \uCC45\uC784\uC790\uB97C \uBC14\uAFB8\uBA74 \uC0C8 \uCC45\uC784\uC790\uB9CC \uBC1B\uC2B5\uB2C8\uB2E4."},{term:"\uCC38\uC870\uC790\uB85C \uCD94\uAC00",desc:"\uC0C8\uB85C \uCD94\uAC00\uB41C **\uCC38\uC870\uC790**\uC5D0\uAC8C\uB9CC. \uC6D0\uB798 \uC788\uB358 \uCC38\uC870\uC790\uB294 \uBC1B\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},{term:"\uC2DC\uC791\uC77C\uC2DC \uB3C4\uB2EC",desc:"**\uCC45\uC784\uC790**\uC5D0\uAC8C. \uC2DC\uC791\uC77C\uC2DC\uAC00 \uB418\uBA74 \uC790\uB3D9\uC73C\uB85C \uAC11\uB2C8\uB2E4."},{term:"\uC77C\uC815 \uCD08\uB300",desc:"\uC77C\uC815\uC758 **\uCC38\uC11D\uC790**\uC5D0\uAC8C."}]},{title:"\uD655\uC778 \xB7 \uC644\uB8CC \xB7 \uAC80\uC218",items:[{term:"\uCC45\uC784\uC790\uAC00 \uD655\uC778",desc:"**\uC791\uC131\uC790**\uC5D0\uAC8C. \uBC1B\uC740 \uC0AC\uB78C\uC774 \uC77D\uC5C8\uB2E4\uB294 \uC2E0\uD638\uC785\uB2C8\uB2E4."},{term:"\uCC38\uC870\uC790\uAC00 \uD655\uC778",desc:"\uC544\uBB34\uC5D0\uAC8C\uB3C4 \uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uCC38\uC870\uC790\uAC00 \uC5EC\uB7EC \uBA85\uC774\uB77C \uC0AC\uB78C \uC218\uB9CC\uD07C \uC54C\uB9BC\uC774 \uC3DF\uC544\uC9C0\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4. \uD655\uC778 \uD604\uD669(n/m)\uC73C\uB85C\uB9CC \uBD05\uB2C8\uB2E4."},{term:"\uD655\uC778 \uC694\uCCAD(\uB9AC\uB9C8\uC778\uB4DC)",desc:"\uC544\uC9C1 **\uD655\uC778\uD558\uC9C0 \uC54A\uC740 \uB300\uC0C1\uC790**\uC5D0\uAC8C\uB9CC. \uC774\uBBF8 \uD655\uC778\uD55C \uC0AC\uB78C\uC740 \uBC1B\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},{term:"\uC644\uB8CC \uCC98\uB9AC",desc:"**\uC791\uC131\uC790 + \uCC38\uC870\uC790**\uC5D0\uAC8C. \uC644\uB8CC\uB97C \uB204\uB978 \uC0AC\uB78C \uBCF8\uC778\uC740 \uC81C\uC678\uB429\uB2C8\uB2E4."},{term:"\uAC80\uC218\uC644\uB8CC",desc:"\uC544\uBB34\uC5D0\uAC8C\uB3C4 \uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uC2B9\uC778\uC774 \uC544\uB2C8\uB77C \uC791\uC131\uC790 \uD654\uBA74\uC758 \uD45C\uC2DC\uB97C \uB0B4\uB9AC\uB294 \uAC83\uC77C \uBFD0\uC785\uB2C8\uB2E4."},{term:"\uB418\uB3CC\uB9AC\uAE30",desc:"**\uC644\uB8CC\uB97C \uCC98\uB9AC\uD55C \uC0AC\uB78C**(\uBCF4\uD1B5 \uCC45\uC784\uC790)\uC5D0\uAC8C. \uC0AC\uC720\uAC00 \uD568\uAED8 \uC804\uB2EC\uB418\uACE0 \uB313\uAE00\uB85C\uB3C4 \uB0A8\uC2B5\uB2C8\uB2E4."}]},{title:"\uB9C8\uAC10 \uAD00\uB828",lead:"\uB9C8\uAC10 \uACC4\uC5F4\uC740 \uC804\uBD80 \uCC45\uC784\uC790\uC640 \uC791\uC131\uC790\uC5D0\uAC8C\uB9CC \uAC11\uB2C8\uB2E4. \uCC38\uC870\uC790\uB294 \uB9C8\uAC10 \uC54C\uB9BC\uC744 \uBC1B\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uCC38\uC870\uAE4C\uC9C0 \uBCF4\uB0B4\uBA74 \uC54C\uB9BC\uC774 \uC18C\uC74C\uC774 \uB429\uB2C8\uB2E4.",items:[{term:"\uB9C8\uAC10 \uC0AC\uC804\uC54C\uB9BC",desc:"**\uCC45\uC784\uC790 + \uC791\uC131\uC790**\uC5D0\uAC8C. \uC5C5\uBB34\uB9C8\uB2E4 \uACE0\uB978 \uC2DC\uC810(\uC608: 1\uC77C \uC804)\uC5D0 \uAC11\uB2C8\uB2E4."},{term:"\uB9C8\uAC10 \uB2F9\uC77C",desc:"**\uCC45\uC784\uC790 + \uC791\uC131\uC790**\uC5D0\uAC8C."},{term:"\uB9C8\uAC10 \uACBD\uACFC(\uC9C0\uC5F0)",desc:"**\uCC45\uC784\uC790 + \uC791\uC131\uC790**\uC5D0\uAC8C. \uB9C8\uAC10\uC774 \uC9C0\uB0AC\uB294\uB370 \uC644\uB8CC\uB418\uC9C0 \uC54A\uC740 \uC5C5\uBB34\uC785\uB2C8\uB2E4."},{term:"\uCC38\uC870\uC790",desc:"\uC704 \uC14B \uBAA8\uB450 \uBC1B\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}]},{title:"\uB313\uAE00 \xB7 \uBC18\uC751",lead:"\uB313\uAE00 \uC54C\uB9BC\uC740 \uAD00\uC5EC\uC790 \uC804\uC6D0\uC5D0\uAC8C \uBCF4\uB0B4\uB2E4\uAC00 \uC54C\uB9BC \uD3ED\uC8FC\uB85C \uC904\uC600\uC2B5\uB2C8\uB2E4. \uC9C0\uAE08\uC740 '\uB300\uD654\uC5D0 \uC9C1\uC811 \uC5BD\uD78C \uC0AC\uB78C'\uB9CC \uBC1B\uC2B5\uB2C8\uB2E4.",items:[{term:"\uC77C\uBC18 \uB313\uAE00",desc:"\uC5C5\uBB34 **\uC791\uC131\uC790 + \uC9C1\uC804 \uB313\uAE00 \uC791\uC131\uC790**\uC5D0\uAC8C."},{term:"\uC791\uC131\uC790\uAC00 \uC790\uAE30 \uC5C5\uBB34\uC5D0 \uB313\uAE00",desc:"**\uCC45\uC784\uC790 + \uC9C1\uC804 \uB313\uAE00 \uC791\uC131\uC790**\uC5D0\uAC8C."},{term:"\uCC45\uC784\uC790 \uC5C6\uB294 \uC5C5\uBB34\uC758 \uB313\uAE00",desc:"\uC704\uC5D0 \uB354\uD574 **\uCC38\uC870\uC790 \uC804\uC6D0**\uC5D0\uAC8C. \uB204\uAC00 \uB9E1\uC744\uC9C0 \uC815\uD558\uB294 \uB300\uD654\uB77C \uCC38\uC870\uC790\uB4E4\uC774 \uC54C\uC544\uC57C \uD558\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4. \uCC45\uC784\uC790\uAC00 \uC815\uD574\uC9C0\uBA74 \uB2E4\uC2DC \uBE60\uC9D1\uB2C8\uB2E4."},{term:"\uB313\uAE00 \uC88B\uC544\uC694 \xB7 \uD655\uC778",desc:"\uADF8 **\uB313\uAE00\uC744 \uC4F4 \uC0AC\uB78C**\uC5D0\uAC8C\uB9CC."},{term:"\uACF5\uC9C0 \uB313\uAE00",desc:"**\uC9C1\uC804 \uB313\uAE00 \uC791\uC131\uC790**\uC5D0\uAC8C\uB9CC \u2014 \uB300\uC0C1\uC790\uAC00 \uC804 \uC9C1\uC6D0\uC774\uB77C \uD655\uC7A5 \uADDC\uCE59\uC744 \uC801\uC6A9\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}]},{title:"\uB0B4\uC6A9\uC774 \uBC14\uB014 \uB54C",lead:"\uC218\uC815 \uC54C\uB9BC\uC740 \uACE7\uBC14\uB85C \uBCF4\uB0B4\uC9C0 \uC54A\uACE0, \uD3B8\uC9D1\uC774 \uB05D\uB098 \uC870\uC6A9\uD574\uC9C4 \uB4A4 \uD55C \uAC74\uC73C\uB85C \uBAA8\uC544 \uBCF4\uB0C5\uB2C8\uB2E4 \u2014 \uACE0\uCE58\uB294 \uB3C4\uC911\uC5D0 \uC54C\uB9BC\uC774 \uC5EC\uB7EC \uBC88 \uAC00\uC9C0 \uC54A\uAC8C \uD558\uB824\uB294 \uAC83\uC785\uB2C8\uB2E4.",items:[{term:"\uC77C\uBC18 \uC5C5\uBB34 \uC218\uC815",desc:"**\uCC45\uC784\uC790 + \uC791\uC131\uC790**\uC5D0\uAC8C. \uB204\uAC00 \uACE0\uCCE4\uB4E0 \uB098\uBA38\uC9C0 \uD55C\uCABD\uC774 \uBC1B\uC2B5\uB2C8\uB2E4(\uACE0\uCE5C \uC0AC\uB78C \uBCF8\uC778\uC740 \uC81C\uC678). \uCC38\uC870\uC790\uB294 \uC81C\uC678\uB429\uB2C8\uB2E4."},{term:"\uACF5\uC9C0 \uC218\uC815",desc:"**\uC791\uC131\uC790 + \uB300\uC0C1\uC790**\uC5D0\uAC8C."},{term:"\uD569\uC0B0 \uBC1C\uC1A1",desc:"\uC5EC\uB7EC \uD544\uB4DC\uB97C \uC5F0\uB2EC\uC544 \uACE0\uCCD0\uB3C4 \uD55C \uAC74\uC73C\uB85C \uBB36\uC5EC \uAC11\uB2C8\uB2E4. \uBB34\uC5C7\uC774 \uC5B4\uB5BB\uAC8C \uBC14\uB00C\uC5C8\uB294\uC9C0 \uC694\uC57D\uC774 \uB2F4\uAE41\uB2C8\uB2E4."},{term:"\uC54C\uB9BC\uC774 \uC548 \uAC00\uB294 \uBCC0\uACBD",desc:"\uC644\uB8CC \xB7 \uBCF4\uAD00 \xB7 \uC815\uB82C \uC21C\uC11C \xB7 \uCC45\uC784\uC790/\uCC38\uC870\uC790 \uBCC0\uACBD \u2014 \uAC01\uAC01 \uC804\uC6A9 \uC54C\uB9BC\uC774 \uB530\uB85C \uC788\uC5B4 \uC218\uC815 \uC54C\uB9BC\uC73C\uB85C\uB294 \uC138\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},{term:"\uD560\uC77C(\uCCB4\uD06C\uB9AC\uC2A4\uD2B8) \uBCC0\uACBD",desc:"\uC218\uC815 \uC54C\uB9BC\uACFC \uAC19\uC740 **\uCC45\uC784\uC790 + \uC791\uC131\uC790**\uC5D0\uAC8C. \uBB34\uC5C7\uC744 \uCD94\uAC00\xB7\uC0AD\uC81C\xB7\uC218\uC815\uD588\uB294\uC9C0 \uAD6C\uCCB4\uC801\uC73C\uB85C \uB2F4\uAE41\uB2C8\uB2E4. \uCCB4\uD06C\uB9CC \uCF1C\uACE0 \uB044\uAC70\uB098 \uC21C\uC11C\uB9CC \uBC14\uAFB8\uBA74 \uC54C\uB9BC\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}]},{title:"\uACF5\uC9C0\uC0AC\uD56D",items:[{term:"\uACF5\uC9C0 \uB4F1\uB85D",desc:"**\uB300\uC0C1\uC790 \uC804\uC6D0**\uC5D0\uAC8C(\uC804 \uC9C1\uC6D0 \uB610\uB294 \uC9C0\uC815\uD55C \uC0AC\uB78C\uB4E4)."},{term:"\uB300\uC0C1\uC790 \uCD94\uAC00",desc:"\uC0C8\uB85C \uCD94\uAC00\uB41C **\uB300\uC0C1\uC790**\uC5D0\uAC8C\uB9CC."},{term:"\uB300\uC0C1\uC790\uAC00 \uD655\uC778",desc:"\uC544\uBB34\uC5D0\uAC8C\uB3C4 \uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uC791\uC131\uC790\uB294 \uD655\uC778 \uD604\uD669(n/m)\uC73C\uB85C \uBD05\uB2C8\uB2E4."}]},{title:"\uC54C\uC544 \uB450\uBA74 \uC88B\uC740 \uAC83",items:[{term:"\uB0B4 \uD589\uB3D9\uC740 \uC81C\uC678",desc:"\uB0B4\uAC00 \uB204\uB978 \uC77C\uB85C\uB294 \uB098\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uC624\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uB0B4\uAC00 \uC644\uB8CC\uD588\uC73C\uBA74 \uB098\uB294 \uC644\uB8CC \uC54C\uB9BC\uC744 \uBC1B\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},{term:"\uC2DC\uC791 \uC804\uC5D0\uB294 \uBCA8\uB9CC",desc:"\uC2DC\uC791\uC77C\uC2DC\uAC00 \uC544\uC9C1 \uC548 \uB41C \uC5C5\uBB34\uC758 \uCC45\uC784\uC790 \uB300\uC0C1 \uC54C\uB9BC\uC740 \uBCA8\uC5D0\uB9CC \uC313\uC774\uACE0 \uC571 \uD478\uC2DC\uB294 \uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uC2DC\uC791\uC77C\uC2DC\uBD80\uD130 \uD478\uC2DC\uAC00 \uC624\uAE30 \uC2DC\uC791\uD569\uB2C8\uB2E4(\uC77C\uC815\xB7\uACF5\uC9C0\uB294 \uC608\uC678 \uC5C6\uC774 \uBC14\uB85C)."},{term:"\uC885\uB958\uBCC4\uB85C \uB044\uAE30",desc:"**\uB0B4 \uC815\uBCF4 \u203A \uC54C\uB9BC \uC124\uC815**\uC5D0\uC11C \uC885\uB958\uBCC4\uB85C \uC218\uC2E0\uC744 \uB055\uB2C8\uB2E4. \uB048 \uC885\uB958\uB294 \uBCA8\xB7\uD478\uC2DC \uBAA8\uB450 \uC624\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uB2E4\uB9CC \uD655\uC778 \uC694\uCCAD\uC740 \uB04C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},{term:"\uC54C\uB9BC\uD1A1\uC740 \uC5C6\uC74C",desc:"\uC5C5\uBB34\uD568 \uC54C\uB9BC\uC740 \uBCA8\uACFC \uC571 \uD478\uC2DC\uBFD0\uC785\uB2C8\uB2E4 \u2014 \uBB38\uC790\xB7\uC54C\uB9BC\uD1A1\uC73C\uB85C\uB294 \uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}]}]};var gb={id:"more",tabTitle:"\uB354 \uC54C\uC544\uBCF4\uAE30",intro:"\uC775\uC219\uD574\uC9C4 \uB4A4\uC5D0 \uC4F0\uBA74 \uC88B\uC740 \uAE30\uB2A5\uB4E4\uC785\uB2C8\uB2E4. \uC5C5\uBB34\uD568 \uC124\uC815\uC5D0\uC11C \uB048 \uAE30\uB2A5\uC740 \uC5EC\uAE30\uC5D0\uB3C4 \uBCF4\uC774\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",topics:[{title:"\uBCF4\uAE30 \uBC14\uAFB8\uAE30",lead:"\uAC19\uC740 \uC5C5\uBB34\uB97C \uBAA9\uB85D \xB7 \uD504\uB85C\uC81D\uD2B8 \xB7 \uC0C1\uD0DC \xB7 \uC8FC\uAC04 \xB7 \uC6D4\uAC04\uC73C\uB85C \uB2E4\uB974\uAC8C \uBD05\uB2C8\uB2E4. \uD5E4\uB354 \uC624\uB978\uCABD \uBC84\uD2BC\uC73C\uB85C \uBC14\uAFB8\uACE0 \uD0ED\uB9C8\uB2E4 \uB530\uB85C \uAE30\uC5B5\uB429\uB2C8\uB2E4(\uB2E8\uCD95\uD0A4 **G** \uB2E4\uC74C \uAE00\uC790\uD0A4).",lines:["**\uBAA9\uB85D** : \uC5F4 \uC81C\uBAA9\uC744 \uB204\uB974\uBA74 \uC815\uB82C(\uC81C\uBAA9\xB7\uB0A0\uC9DC) \uB610\uB294 \uD544\uD130(\uC0C1\uD0DC\xB7\uD655\uC778\xB7\uCC45\uC784\uC790\xB7\uD504\uB85C\uC81D\uD2B8\xB7\uC911\uC694\uB3C4)\uAC00 \uC5F4\uB9BD\uB2C8\uB2E4. **\uADF8\uB8F9** \uBA54\uB274\uB85C \uBB36\uB294 \uAE30\uC900\uC744 \uBC14\uAFB8\uACE0, \uADF8\uB8F9 \uBA38\uB9AC\uC904 **+** \uB85C \uADF8 \uADF8\uB8F9\uC5D0 \uBC14\uB85C \uB4F1\uB85D\uD569\uB2C8\uB2E4.","**\uD504\uB85C\uC81D\uD2B8 \xB7 \uC0C1\uD0DC \xB7 \uBAA9\uD45C** \uBCF4\uAE30\uB294 \uCE74\uB4DC\uB97C \uCEEC\uB7FC\uC5D0 \uC138\uC6C1\uB2C8\uB2E4 \u2014 \uC81C\uBAA9 \uC55E **\u22EE\u22EE \uD578\uB4E4**\uB85C \uB04C\uC5B4 \uB2E4\uB978 \uCEEC\uB7FC\uC73C\uB85C \uC62E\uAE30\uACE0, \uCEEC\uB7FC **\u22EE** \uBA54\uB274\uC5D0 \uB4F1\uB85D\xB7\uC218\uC815\xB7\uBCF4\uAD00\xB7\uC0AD\uC81C\uAC00 \uC788\uC2B5\uB2C8\uB2E4.","**\uC8FC\uAC04\xB7\uC6D4\uAC04** : \uB9C8\uAC10\uC608\uC815(\uC77C\uC815\uC740 \uC77C\uC2DC) \uAE30\uC900\uC73C\uB85C \uB193\uC774\uACE0, \uCE74\uB4DC\uB97C \uB2E4\uB978 \uB0A0\uB85C \uB04C\uBA74 \uB0A0\uC9DC\uAC00 \uBC14\uB01D\uB2C8\uB2E4. \uBE48 \uCE78\uC5D0 \uC62C\uB9AC\uBA74 \uADF8 \uB0A0\uC9DC\uB85C \uBC14\uB85C \uB4F1\uB85D\uD569\uB2C8\uB2E4. \uBC14\uAE65 \uCE98\uB9B0\uB354\uC640 \uC8FC\uACE0\uBC1B\uB294 \uBC29\uBC95\uC740 **\uC678\uBD80 \uCE98\uB9B0\uB354 \uC5F0\uB3D9** \uD0ED\uC5D0 \uC788\uC2B5\uB2C8\uB2E4."]},{title:"\uD0C0\uC784\uB77C\uC778",feature:"timeline",lines:["\uC2DC\uC791\uC77C\uC2DC~\uB9C8\uAC10\uC608\uC815\uC744 \uB9C9\uB300\uB85C \uBCF4\uC5EC \uAE30\uAC04 \uACB9\uCE68\uC744 \uBD05\uB2C8\uB2E4. \uC5C5\uBB34 \uC544\uB798 \uD560\uC77C \uC904\uC774 \uD3BC\uCCD0\uC9C0\uACE0, \uC67C\uCABD \uC5C5\uBB34\uBA85 \uC904\uC758 \uD578\uB4E4\uB85C \uC21C\uC11C\uB97C \uBC14\uAFC9\uB2C8\uB2E4."]},{title:"\uCC28\uD2B8",feature:"charts",lines:["**\uCC28\uD2B8** \uBC84\uD2BC\uC5D0\uC11C \uC6CC\uD06C\uB85C\uB4DC(\uC778\uC6D0\uBCC4 \uBD80\uD558)\xB7\uB204\uC801\uD750\uB984\uB3C4\xB7\uB9AC\uB4DC\uD0C0\uC784\uC744, \uBAA9\uD45C\uB97C \uC4F0\uBA74 \uBCA8\uB85C\uC2DC\uD2F0\xB7\uBC88\uB2E4\uC6B4\uC744 \uBD05\uB2C8\uB2E4. \uC778\uC6D0 \uC6A9\uB7C9\uC740 \uCC28\uD2B8 \uC548 \uC124\uC815 \uC544\uC774\uCF58\uC5D0\uC11C \uC815\uD569\uB2C8\uB2E4."]},{title:"\uAC80\uC0C9\uACFC \uD544\uD130",lines:["\uAC80\uC0C9\uCE78(\uB2E8\uCD95\uD0A4 **/**)\uC740 \uC81C\uBAA9\xB7\uBE44\uACE0\uB97C \uCC3E\uC2B5\uB2C8\uB2E4. \uBAA8\uBC14\uC77C\uC740 \uAC80\uC0C9 \uD654\uBA74\uC5D0\uC11C \uC0C1\uD0DC\xB7\uB77C\uBCA8 \uCE69\uC73C\uB85C \uD568\uAED8 \uAC70\uB985\uB2C8\uB2E4.","**\uD544\uD130 \xB7 \uCC45\uC784\uC790 \xB7 \uD504\uB85C\uC81D\uD2B8 \xB7 \uC911\uC694\uB3C4** \uBC84\uD2BC\uC740 \uCCB4\uD06C \uBA54\uB274\uAC00 \uC5F4\uB9AC\uACE0 \uAC78\uB9B0 \uAC1C\uC218\uAC00 \uBC84\uD2BC\uC5D0 \uD45C\uC2DC\uB429\uB2C8\uB2E4. \uC644\uB8CC\xB7\uBCF4\uAD00\uD568 \uD0ED\uC740 **\uAE30\uAC04** \uBC84\uD2BC\uC73C\uB85C \uC644\uB8CC\uC77C \uBC94\uC704\uB97C \uC815\uD569\uB2C8\uB2E4."]},{title:"\uB77C\uBCA8",feature:"label",lines:["**\uB77C\uBCA8** \uBC84\uD2BC\uC73C\uB85C \uAC70\uB974\uACE0, \uC0C1\uC138\uC758 \uB77C\uBCA8 \uD589\uC5D0\uC11C \uBD99\uC785\uB2C8\uB2E4. \uB77C\uBCA8 \uC0AC\uC804\uC740 \uC5C5\uBB34\uD568 \uC124\uC815\uC5D0\uC11C \uAD00\uB9AC\uD569\uB2C8\uB2E4."]},{title:"\uD5E4\uB354 \uC2A4\uC704\uCE58",lines:["**\uC644\uB8CC \uC228\uAE30\uAE30** : \uB05D\uB09C \uC5C5\uBB34\uB97C \uBAA8\uB4E0 \uBCF4\uAE30(\uD560\uC77C \uD3EC\uD568)\uC5D0\uC11C \uAC10\uCDA5\uB2C8\uB2E4.","**\uBAA8\uB4E0 \uC9C1\uC6D0** : (\uD5C8\uC6A9 \uACC4\uC815) \uAD00\uC5EC \uC5EC\uBD80\uC640 \uC0C1\uAD00\uC5C6\uC774 \uC804 \uC9C1\uC6D0\uC758 \uC5C5\uBB34\uB97C \uBD05\uB2C8\uB2E4. **\uC678\uBD80 \uCE98\uB9B0\uB354 \uC77C\uC815** : \uAC00\uC838\uC628 \uC77C\uC815\uC744 \uCE98\uB9B0\uB354\uC5D0 \uD568\uAED8 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4(**\uC678\uBD80 \uCE98\uB9B0\uB354 \uC5F0\uB3D9** \uD0ED \uCC38\uACE0).","\uD654\uBA74\uC774 \uC881\uC73C\uBA74 \uC2A4\uC704\uCE58\uB4E4\uC740 \uC624\uB978\uCABD **\u22EE \uBA54\uB274** \uC548\uC73C\uB85C \uB4E4\uC5B4\uAC11\uB2C8\uB2E4."]},{title:"\uAD00\uB828 \uC5C5\uBB34",lines:["\uC0C1\uC138\uC758 **\uAD00\uB828 \uC5C5\uBB34**\uC5D0\uC11C \uD6C4\uC18D \uC5C5\uBB34 \uB9CC\uB4E4\uAE30, \uAD00\uB828\xB7\uC911\uBCF5 \uC5C5\uBB34 \uC5F0\uACB0\uC744 \uD569\uB2C8\uB2E4. \uC6B0\uD074\uB9AD \uBA54\uB274\uC5D0\uC11C \uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9\xB7\uBAA9\uD45C\uC5D0 \uB123\uAE30\xB7\uBCF4\uAD00\xB7\uC0AD\uC81C\uB97C \uBC14\uB85C \uC2E4\uD589\uD569\uB2C8\uB2E4."]},{title:"\uD504\uB85C\uC81D\uD2B8",feature:"project",lines:["\uC5C5\uBB34\uB97C \uBB36\uB294 \uB2E8\uC704\uC785\uB2C8\uB2E4. **\uD504\uB85C\uC81D\uD2B8** \uBCF4\uAE30 \uB9E8 \uB05D \uC810\uC120 \uCE78\uC774\uB098 \uCEEC\uB7FC \u22EE \u203A \uC218\uC815\uC5D0\uC11C \uC774\uB984\xB7\uC544\uC774\uCF58\uC744 \uC815\uD558\uACE0, \uC5C5\uBB34\uB294 \uC0C1\uC138 \uC18D\uC131\uC774\uB098 \uC6B0\uD074\uB9AD \u203A \uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9\uC73C\uB85C \uC62E\uAE41\uB2C8\uB2E4.","\uBCF4\uAD00\uC740 \uC18C\uC18D \uC5C5\uBB34\uAC00 \uBAA8\uB450 \uC644\uB8CC\uB41C \uB4A4\uC5D0\uB9CC \uB429\uB2C8\uB2E4. \uC0AD\uC81C\uD558\uBA74 \uD504\uB85C\uC81D\uD2B8\uB9CC \uC5C6\uC5B4\uC9C0\uACE0 \uC18C\uC18D \uC5C5\uBB34\uB294 \uAE30\uBCF8 \uC5C5\uBB34\uD568\uC73C\uB85C \uC62E\uACA8\uC9D1\uB2C8\uB2E4."]},{title:"\uBAA9\uD45C(\uC2A4\uD504\uB9B0\uD2B8)",feature:"sprint",lines:["\uD504\uB85C\uC81D\uD2B8 \uC124\uC815\uC5D0\uC11C **\uBAA9\uD45C \uC0AC\uC6A9**\uC744 \uCF1C\uBA74 \uAE30\uAC04\uC774 \uC788\uB294 \uBAA9\uD45C\uB97C \uB9CC\uB4E4\uACE0 \uC5C5\uBB34\uB97C \uBC30\uC815\uD569\uB2C8\uB2E4(**\uBAA9\uD45C** \uBCF4\uAE30\uC5D0\uC11C \uCE74\uB4DC \uB04C\uAE30, \uC6B0\uD074\uB9AD \u203A \uBAA9\uD45C\uC5D0 \uB123\uAE30).","\uBAA9\uD45C \uC885\uB8CC \uC2DC \uB0A8\uC740 \uC5C5\uBB34\uB97C \uB2E4\uC74C \uBAA9\uD45C\uB85C \uB118\uAE38\uC9C0, \uBBF8\uBC30\uC815\uC73C\uB85C \uBE84\uC9C0 \uACE0\uB985\uB2C8\uB2E4. \uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8\uB294 \uC0C1\uC138 \uC18D\uC131\uC5D0\uC11C \uC801\uC2B5\uB2C8\uB2E4."]},{title:"\uC5C5\uBB34 \uD15C\uD50C\uB9BF \xB7 \uC790\uB3D9\uD654 \uADDC\uCE59 \xB7 \uBCF8\uBB38 \uC591\uC2DD",lines:["\u22EE \u203A **\uC5C5\uBB34 \uD15C\uD50C\uB9BF**\uC73C\uB85C \uC815\uD615 \uC808\uCC28(\uD560\uC77C \uD3EC\uD568)\uB97C \uD55C \uBC88\uC5D0 \uB9CC\uB4E4\uACE0, **\uC790\uB3D9\uD654 \uADDC\uCE59**\uC73C\uB85C \uB4F1\uB85D \uC2DC \uC870\uAC74\uBD80 \uBC30\uC815 \uB4F1\uC744 \uB9E1\uAE41\uB2C8\uB2E4.","**\uBCF8\uBB38 \uC591\uC2DD**(\uB0B4\uC6A9 \uC81C\uBAA9\uC758 \u22EE)\uC740 \uC790\uC8FC \uC4F0\uB294 \uBCF8\uBB38\uC744 \uC800\uC7A5\uD574 \uB450\uACE0 \uBD88\uB7EC\uC635\uB2C8\uB2E4."]},{title:"\uC624\uB958 \uD0ED",feature:"bug",lines:["\uD504\uB85C\uADF8\uB7A8 \uC624\uB958 \uC811\uC218 \uC804\uC6A9 \uD0ED\uC785\uB2C8\uB2E4. \uD2F0\uCF13\uBC88\uD638\uAC00 \uBD99\uACE0 \uC811\uC218 \u203A \uCC98\uB9AC \u203A \uC885\uB8CC\uB85C \uAD00\uB9AC\uD569\uB2C8\uB2E4.",'\uAC1C\uBC1C\uC0AC \uC804\uC6A9\uC774\uBA70, \uACE0\uAC1D\uC774 \uC811\uC218\uD55C \uC624\uB958 \uC81C\uBCF4\uB294 \uACE0\uAC1D\uC13C\uD130 \uD0ED\uC5D0 "\uC624\uB958" \uC885\uB958\uB85C \uC313\uC785\uB2C8\uB2E4.']},{title:"\uACE0\uAC1D\uC13C\uD130 \uD0ED",feature:"support",lines:["\uACE0\uAC1D\uC774 \uB0A8\uAE34 \uBB38\uC758\xB7\uAC74\uC758\xB7\uC624\uB958 \uC81C\uBCF4\uC640 \uD648\uD398\uC774\uC9C0 \uC0C1\uB2F4\uC2E0\uCCAD\uC774 \uC5C5\uBB34\uB85C \uC313\uC785\uB2C8\uB2E4.",'**\uAC00\uC838\uAC00\uAE30**\uB85C \uCC45\uC784\uC790\uAC00 \uB418\uACE0, \uB313\uAE00\uC774 \uACE7 \uB2F5\uBCC0\uC785\uB2C8\uB2E4(\uC791\uC131\uC790\uC5D0\uAC8C\uB294 \uB2F5\uBCC0 \uC54C\uB9BC\uB9CC \uAC11\uB2C8\uB2E4). \uC644\uB8CC 7\uC77C \uB4A4 \uBCF4\uAD00\uD568\uC758 "\uACE0\uAC1D\uC13C\uD130" \uAD6C\uBD84\uC73C\uB85C \uC62E\uACA8\uC9D1\uB2C8\uB2E4.']},{title:"\uBCF4\uACE0\uC11C",feature:"report",lines:["**\uBCF4\uACE0\uC11C** \uD0ED\uC5D0\uC11C \uC5C5\uBB34 \uBCF4\uACE0\uC11C\uB97C \uC791\uC131\uD574 \uC804\uC790\uACB0\uC7AC\uB85C \uC0C1\uC2E0\uD569\uB2C8\uB2E4."]}]};var xb={id:"calendar",tabTitle:"\uC678\uBD80 \uCE98\uB9B0\uB354 \uC5F0\uB3D9",intro:"\uC5C5\uBB34\uD568\uC744 \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC640 \uC787\uC2B5\uB2C8\uB2E4. \uC8FC\uAC04\xB7\uC6D4\uAC04 \uBCF4\uAE30 \uB610\uB294 \uD5E4\uB354 \u22EE \u203A **\uCE98\uB9B0\uB354 \uC5F0\uB3D9**\uC5D0\uC11C \uAD6C\uAE00 \uACC4\uC815\uC744 \uC5F0\uACB0\uD558\uBA74 \uC5C5\uBB34 \uBCC0\uACBD\uC774 \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0 **\uBC14\uB85C** \uBC18\uC601\uB429\uB2C8\uB2E4.",topics:[{title:"\uB450 \uBC29\uD5A5",lead:"\uC5F0\uB3D9\uC740 \uBC29\uD5A5\uC774 \uB458\uC774\uACE0 \uB530\uB85C \uCF1C\uACE0 \uB055\uB2C8\uB2E4.",items:[{term:"\uB0B4\uBCF4\uB0B4\uAE30 (\uC5C5\uBB34\uD568 \u2192 \uAD6C\uAE00)",desc:"\uB0B4\uAC00 \uAD00\uC5EC\uD55C \uC5C5\uBB34(\uB9C8\uAC10\uC608\uC815 \uB610\uB294 \uC2DC\uC791\uC77C\uC2DC\uAC00 \uC788\uB294 \uAC83)\uB97C \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0 \uC0C8\uB85C \uB9CC\uB4E0 **\uC804\uC6A9 \uCE98\uB9B0\uB354**(\uC774\uB984\uC740 \uC5F0\uB3D9 \uD654\uBA74\uC5D0 \uD45C\uC2DC \u2014 \uC608: \uCF54\uB4DC\uB9C8\uCF13)\uC5D0 \uB123\uC2B5\uB2C8\uB2E4. \uB4F1\uB85D\xB7\uC218\uC815\xB7\uC644\uB8CC\xB7\uC0AD\uC81C\uAC00 \uC989\uC2DC \uBC18\uC601\uB418\uACE0, \uC644\uB8CC\uD55C \uC5C5\uBB34\uB294 \uC81C\uBAA9 \uC55E\uC5D0 \u2713 \uAC00 \uBD99\uC2B5\uB2C8\uB2E4."},{term:"\uAC00\uC838\uC624\uAE30 (\uAD6C\uAE00 \u2192 \uC5C5\uBB34\uD568)",desc:"\uAD6C\uAE00 **\uAE30\uBCF8 \uCE98\uB9B0\uB354**\uC758 \uC77C\uC815\uC744 \uC5C5\uBB34\uD568 \uC8FC\uAC04\xB7\uC6D4\uAC04 \uBCF4\uAE30\uC5D0 \uACB9\uCCD0 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4. \uC77D\uAE30 \uC804\uC6A9\uC774\uB77C \uC5C5\uBB34\uB85C \uBC14\uB00C\uC9C0\uB3C4, \uC6D0\uBCF8\uC774 \uACE0\uCCD0\uC9C0\uC9C0\uB3C4 \uC54A\uC2B5\uB2C8\uB2E4."}]},{title:"\uC5F0\uACB0\uD558\uAE30",lines:["**\uCE98\uB9B0\uB354 \uC5F0\uB3D9** \u203A **\uAD6C\uAE00 \uACC4\uC815 \uC5F0\uACB0** \uBC84\uD2BC \u2192 \uAD6C\uAE00 \uB3D9\uC758 \uD654\uBA74\uC5D0\uC11C \uD5C8\uC6A9 \u2192 \uC5C5\uBB34\uD568\uC73C\uB85C \uB3CC\uC544\uC635\uB2C8\uB2E4(\uC5F0\uACB0 \uC644\uB8CC \uC54C\uB9BC).","\uC5F0\uACB0 \uC9C1\uD6C4 \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0 **\uC804\uC6A9 \uCE98\uB9B0\uB354**\uAC00 \uB9CC\uB4E4\uC5B4\uC9C0\uACE0 \uB0B4 \uC5C5\uBB34\uAC00 \uCC44\uC6CC\uC9D1\uB2C8\uB2E4(\uAC74\uC218\uAC00 \uB9CE\uC73C\uBA74 \uC7A0\uC2DC \uAC78\uB9BD\uB2C8\uB2E4).","\uAC00\uC838\uC624\uAE30\uB97C \uCF1C\uBA74 \uD5E4\uB354\uC758 **\uC678\uBD80 \uCE98\uB9B0\uB354 \uC77C\uC815** \uC2A4\uC704\uCE58\uB85C \uAD6C\uAE00 \uC77C\uC815 \uD45C\uC2DC\uB97C \uD55C \uBC88\uC5D0 \uCF1C\uACE0 \uB055\uB2C8\uB2E4(\uD654\uBA74\uC774 \uC881\uC73C\uBA74 \u22EE \uBA54\uB274 \uC548).",'\uAD6C\uAE00\uC774 "\uD655\uC778\uB418\uC9C0 \uC54A\uC740 \uC571" \uACBD\uACE0\uB97C \uBCF4\uC5EC\uC8FC\uBA74 **\uACE0\uAE09 \u203A \uACC4\uC18D**\uC73C\uB85C \uC9C4\uD589\uD569\uB2C8\uB2E4.']},{title:"\uC54C\uC544 \uB458 \uC810",lines:["\uC804\uC6A9 \uCE98\uB9B0\uB354 \uC548\uC758 \uC77C\uC815\uC740 \uC5C5\uBB34\uD568\uC774 \uAD00\uB9AC\uD569\uB2C8\uB2E4 \u2014 \uAD6C\uAE00\uC5D0\uC11C \uACE0\uCCD0\uB3C4 \uB2E4\uC74C \uBCC0\uACBD \uB54C \uC5C5\uBB34\uD568 \uB0B4\uC6A9\uC73C\uB85C \uB418\uB3CC\uC544\uAC11\uB2C8\uB2E4. \uC5C5\uBB34\uB294 \uC5C5\uBB34\uD568\uC5D0\uC11C \uACE0\uCE58\uC138\uC694.","\uD45C\uC2DC\uAC00 \uC5B4\uAE0B\uB09C \uAC83 \uAC19\uC73C\uBA74 **\uC804\uCCB4 \uB2E4\uC2DC \uB0B4\uBCF4\uB0B4\uAE30**\uB85C \uADF8 \uCE98\uB9B0\uB354\uB97C \uB0B4 \uC5C5\uBB34 \uAE30\uC900\uC73C\uB85C \uB2E4\uC2DC \uCC44\uC6C1\uB2C8\uB2E4.","**\uC5F0\uACB0 \uD574\uC81C**\uD558\uBA74 \uAD8C\uD55C\uC740 \uB04A\uAE30\uC9C0\uB9CC \uAD6C\uAE00 \uCABD \uC804\uC6A9 \uCE98\uB9B0\uB354\uB294 \uB0A8\uC2B5\uB2C8\uB2E4. \uD544\uC694\uD558\uBA74 \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0\uC11C \uC9C0\uC6B0\uC138\uC694.","\uD55C \uC0AC\uB78C\uC774 \uC5EC\uB7EC \uAE30\uAE30\uC5D0\uC11C \uC368\uB3C4 \uC5F0\uACB0\uC740 \uACC4\uC815\uB2F9 \uD55C \uBC88\uC774\uBA74 \uB429\uB2C8\uB2E4. \uC560\uD50C\xB7\uB124\uC774\uBC84 \uCE98\uB9B0\uB354 \uC5F0\uB3D9\uC740 \uC81C\uACF5\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."]}]};var bb={id:"shortcuts",tabTitle:"\uB2E8\uCD95\uD0A4",topics:[]};var oc=[ub,db,pb,fb,gb,xb,bb];function hb({open:e,onClose:t}){return{modals:{dialog:Zt({modalIdPrefix:"taskbox-shortcut-help-dialog",open:e,onClose:t})}}}function kb({open:e,onClose:t,features:o,initialTab:n}){let[r,i]=lM(0);return{modals:{dialog:Zt({modalIdPrefix:"taskbox-manual-dialog",open:e,onClose:t,onOpen:()=>{let s=oc.filter(m=>!m.feature||o[m.feature]!==!1).findIndex(m=>m.id===n);i(Math.max(0,s))}})},activeTabIndex:r,setActiveTabIndex:i}}import{jsx as Ar,jsxs as Tb}from"react/jsx-runtime";function uM({keys:e}){return Ar(ol,{sx:{display:"flex",alignItems:"center",gap:.5,justifyContent:"flex-end"},children:e.split(" \u2192 ").map((t,o)=>Tb(ol,{sx:{display:"flex",alignItems:"center",gap:.5},children:[o>0?Ar(cM,{sx:{fontSize:18,color:"#9a9a97"}}):null,Ar(ol,{component:"span",sx:{minWidth:32,height:32,px:.75,display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:13.5,fontWeight:700,color:"#37352f",bgcolor:"#f4f4f2",border:"1px solid #e0dfdb",borderRadius:1,fontVariantNumeric:"tabular-nums"},children:t})]},`${t}-${o}`))})}function ZX({open:e,onClose:t,views:o}){let{modals:n}=hb({open:e,onClose:t}),r=tl(o);return Ar(mM,{open:n.dialog.isOpen,onClose:n.dialog.close,maxWidth:"xs",title:"\uB2E8\uCD95\uD0A4",locale:"ko",titleIcons:{delete:{visible:!1}},tabs:{visible:!1},sectionContentPaddingTop:0,sections:[{id:"shortcuts",showTitle:!1,children:Ar(ol,{sx:{display:"grid",gridTemplateColumns:"auto 1fr",columnGap:2,rowGap:1.25,alignItems:"center",fontSize:14,color:"#37352f"},children:r.map(i=>Tb(ol,{sx:{display:"contents"},children:[Ar(uM,{keys:i.keys}),Ar("span",{children:i.description})]},i.keys))})}],actions:{showCancelButton:!1,right:Ar(sM,{variant:"contained",onClick:n.dialog.close,children:"\uB2EB\uAE30"})}})}import{Fragment as Vu}from"react";import{Box as yt,Button as dM}from"@mui/material";import pM from"@mui/icons-material/ArrowRightAlt";import fM from"@mui/icons-material/ChevronRightRounded";import gM from"@mui/icons-material/ArrowForward";import{FormDialog as xM}from"@ehfuse/mui-form-dialog";import{Fragment as BM,jsx as Xe,jsxs as cr}from"react/jsx-runtime";function nc(e){return e.split(/(\*\*[^*]+\*\*|\s*(?:→|->)\s*)/g).filter(o=>o.length>0).map((o,n)=>o.startsWith("**")&&o.endsWith("**")?Xe(yt,{component:"strong",sx:{fontWeight:700},children:o.slice(2,-2)},n):/^\s*(?:→|->)\s*$/.test(o)?Xe(gM,{sx:{fontSize:"1em",verticalAlign:"-0.15em",mx:.5,color:"text.secondary"}},n):Xe(Vu,{children:o},n))}function bM({keys:e}){let t=xe();return Xe(yt,{sx:{display:"flex",alignItems:"center",gap:.5,justifyContent:"flex-end"},children:e.split(" \u2192 ").map((o,n)=>cr(yt,{sx:{display:"flex",alignItems:"center",gap:.5},children:[n>0?Xe(pM,{sx:{fontSize:20,color:t.colors.textMuted}}):null,Xe(yt,{component:"span",sx:{minWidth:36,height:36,px:1,display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:15,fontWeight:600,color:t.colors.textPrimary,bgcolor:t.colors.surfaceSubtle,border:`1px solid ${t.colors.border}`,borderRadius:1,fontVariantNumeric:"tabular-nums"},children:o})]},`${o}-${n}`))})}function hM({steps:e}){let t=xe();return Xe(yt,{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",sm:"repeat(3, minmax(0, 1fr))"},gap:{xs:1,sm:2},mt:1.5},children:e.map((o,n)=>cr(yt,{sx:{position:"relative",minWidth:0,px:1.75,py:2.5,borderRadius:2,bgcolor:t.colors.surfaceSubtle,border:`1px solid ${t.colors.border}`,"&::before":{content:'""',position:"absolute",top:-1,left:12,right:12,height:3,borderRadius:"0 0 3px 3px",bgcolor:t.colors.accent,opacity:.85},"&::after":n<e.length-1?{content:'""',display:{xs:"none",sm:"block"},position:"absolute",top:"50%",right:-12,width:8,height:8,mt:"-4px",borderTop:`2px solid ${t.colors.borderStrong}`,borderRight:`2px solid ${t.colors.borderStrong}`,transform:"rotate(45deg)"}:void 0},children:[cr(yt,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[Xe(yt,{sx:{flexShrink:0,width:26,height:26,borderRadius:"50%",display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:13,fontWeight:500,lineHeight:1,bgcolor:t.colors.accent,color:t.colors.accentContrast,fontVariantNumeric:"tabular-nums"},children:n+1}),Xe(yt,{sx:{minWidth:0,fontSize:20,fontWeight:500,color:t.colors.textStrong,lineHeight:1.3,letterSpacing:"-0.01em"},children:o.title})]}),Xe(yt,{sx:{mt:1.5,fontSize:15,lineHeight:1.5,color:t.colors.textPrimary,wordBreak:"keep-all"},children:o.desc})]},o.title))})}var Sb="70vh",kM=24,TM=44,yb=`calc((${Sb} - ${kM*2+TM}px) / var(--mfd-font-scale, 1))`,yM=148;function SM({items:e}){let t=xe();return Xe(yt,{sx:{mt:1.5,display:"grid",gridTemplateColumns:{xs:"1fr",sm:`${yM}px minmax(0, 1fr)`},fontSize:15,lineHeight:1.6,color:t.colors.textPrimary,border:`1px solid ${t.colors.border}`,borderRadius:1.5,overflow:"hidden","& > *":{px:1.5,py:1.35,borderTop:`1px solid ${t.colors.border}`},"& > *:nth-of-type(even)":{borderLeft:{sm:`1px solid ${t.colors.border}`}},"& > *:nth-of-type(1)":{borderTop:0},"& > *:nth-of-type(2)":{borderTop:{xs:`1px solid ${t.colors.border}`,sm:0}}},children:e.map(o=>cr(Vu,{children:[Xe(yt,{sx:{fontWeight:500,color:t.colors.textStrong,wordBreak:"keep-all",bgcolor:t.colors.surfaceSubtle,display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center"},children:o.term}),Xe(yt,{sx:{wordBreak:"keep-all"},children:nc(o.desc)})]},o.term))})}function CM({topic:e}){let t=xe();return cr(yt,{component:"section",sx:{py:{xs:3,sm:4},borderBottom:`1px solid ${t.colors.border}`,"&:last-of-type":{pb:0,borderBottom:0}},children:[cr(yt,{component:"h3",sx:{m:0,mb:1.75,fontSize:24,fontWeight:500,letterSpacing:"-0.01em",lineHeight:1.3,color:t.colors.textStrong,wordBreak:"keep-all",display:"flex",alignItems:"center",flexWrap:"wrap"},children:[e.title,e.subtitle?cr(BM,{children:[Xe(fM,{sx:{fontSize:22,color:t.colors.textMuted,mx:1,flexShrink:0}}),Xe(yt,{component:"span",sx:{fontSize:18,fontWeight:400,color:t.colors.textPrimary},children:e.subtitle})]}):null]}),e.lead?Xe(yt,{sx:{fontSize:15.5,lineHeight:1.65,color:t.colors.textPrimary,wordBreak:"keep-all"},children:nc(e.lead)}):null,e.steps?.length?Xe(hM,{steps:e.steps}):null,e.items?.length?Xe(SM,{items:e.items}):null,e.lines?.length?Xe(yt,{component:"ul",sx:{m:0,mt:e.lead||e.steps||e.items?1.25:0,pl:2.5,display:"flex",flexDirection:"column",gap:.5,fontSize:15,lineHeight:1.6,color:t.colors.textPrimary,wordBreak:"keep-all"},children:e.lines.map((o,n)=>Xe("li",{children:nc(o)},n))}):null]})}function uQ({open:e,onClose:t,views:o,features:n={},initialTab:r}){let i=xe(),{modals:a,activeTabIndex:l,setActiveTabIndex:s}=kb({open:e,onClose:t,features:n,initialTab:r}),m=d=>!d||n[d]!==!1,c=tl(o),p=oc.filter(d=>m(d.feature)).map(d=>({id:d.id,tabTitle:d.tabTitle,showTitle:!1,children:d.id==="shortcuts"?Xe(yt,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:yb,maxHeight:yb,px:.5},children:Xe(yt,{sx:{display:"grid",gridTemplateColumns:"auto auto",columnGap:2.5,rowGap:1.75,alignItems:"center",fontSize:17,fontWeight:500,color:i.colors.textPrimary},children:c.map(u=>cr(Vu,{children:[Xe(bM,{keys:u.keys}),Xe("span",{children:u.description})]},u.keys))})}):cr(yt,{sx:{display:"flex",flexDirection:"column",px:.5},children:[d.intro?Xe(yt,{sx:{p:2,borderRadius:2,bgcolor:i.colors.accentSoft,color:i.colors.textStrong,fontSize:15.5,lineHeight:1.65,wordBreak:"keep-all"},children:nc(d.intro)}):null,d.topics.filter(u=>m(u.feature)).map(u=>Xe(CM,{topic:u},u.title))]})}));return Xe(xM,{open:a.dialog.isOpen,onClose:a.dialog.close,maxWidth:"md",title:"\uC5C5\uBB34\uD568 \uC124\uBA85\uC11C",locale:"ko",titleIcons:{delete:{visible:!1}},tabs:{visible:!0,switchContent:!0},activeTabValue:l,onTabChange:s,fixedHeight:"70vh",maxContentHeight:Sb,sectionContentPaddingTop:0,fontScale:{enabled:!0},fontScaleKey:"taskbox-manual",sections:p,actions:{showCancelButton:!1,right:Xe(dM,{variant:"contained",onClick:a.dialog.close,sx:{minWidth:80},children:"\uB2EB\uAE30"})}})}import{useEffect as wM,useRef as DM,useState as Ib}from"react";import{Box as St,Button as Tn,IconButton as Gu,Menu as _b,MenuItem as wb,Switch as EM,Tooltip as Db}from"@mui/material";import{FormDialog as Eb}from"@ehfuse/mui-form-dialog";import Ku from"@mui/icons-material/Add";import RM from"@mui/icons-material/ArrowRightAlt";import MM from"@mui/icons-material/BoltOutlined";import PM from"@mui/icons-material/Close";import OM from"@mui/icons-material/EditOutlined";import{ClearTextField as nl,LabelSelect as No}from"@ehfuse/mui-form-controls";import{useEffect as vM,useRef as Cb}from"react";import{useGlobalForm as IM,useModal as _M}from"@ehfuse/forma";import{ErrorAlert as Bb}from"@ehfuse/alerts";var Vi=[{value:"due_date",label:"\uB9C8\uAC10\uC608\uC815"},{value:"start_date",label:"\uC2DC\uC791\uC77C\uC2DC"},{value:"priority",label:"\uC911\uC694\uB3C4"},{value:"manager_account_seq",label:"\uCC45\uC784\uC790"},{value:"receiver_account_seqs",label:"\uCC38\uC870\uC790"},{value:"label_keys",label:"\uB77C\uBCA8"},{value:"group_seq",label:"\uD504\uB85C\uC81D\uD2B8"},{value:"sprint_seq",label:"\uBAA9\uD45C"},{value:"content",label:"\uB0B4\uC6A9"},{value:"note",label:"\uBE44\uACE0"}];function rc(){return{editSeq:0,name:"",trigger:"created",enabled:!0,sort_no:0,condition:{},action:{}}}function Uu(e){return e.filter(t=>!t.archived).map(t=>({value:String(hn(t.key)),label:t.label}))}function ic(e){return e.map(t=>({value:t.key,label:t.name}))}function vb(e){let t=Cb(e);t.current=e;let o=IM({formId:we("taskbox-rule-form"),initialValues:rc(),onValidate:y=>y.name.trim()?Object.keys(y.action??{}).length===0?(Bb({message:"\uB3D9\uC791\uC744 \uD558\uB098 \uC774\uC0C1 \uCD94\uAC00\uD558\uC138\uC694."}),!1):!0:(Bb({message:"\uADDC\uCE59 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694."}),!1),onSubmit:async y=>{let{editSeq:T,...I}=y,A=T>0?I.sort_no:t.current.rules.reduce((C,k)=>Math.max(C,k.sort_no),0)+1,q=T>0?await t.current.onUpdate(T,{...I,sort_no:A}):await t.current.onCreate({...I,sort_no:A});return q&&n.form.close(),q}}),n={list:Xo({modalId:we("taskbox-rule-manage"),open:e.open,onClose:()=>t.current.onClose()}),form:_M({modalId:we("taskbox-rule-edit"),onClose:()=>o.setFormValues(rc())})},r=Cb(n.form);r.current=n.form,vM(()=>{if(e.open)return;let y=window.setTimeout(()=>{r.current.isOpen&&r.current.close(),o.setFormValues(rc())},500);return()=>window.clearTimeout(y)},[e.open]);let i=()=>({...o.getFormValue("condition")??{}}),a=()=>({...o.getFormValue("action")??{}}),l=(y,T)=>{let I=i();T===""||T===void 0||T===null?delete I[y]:I[y]=T,o.setFormValue("condition",I)},s=(y,T)=>{let I=a();T===""||T===void 0||T===null?delete I[y]:I[y]=T,o.setFormValue("action",I)},m=()=>{o.setFormValues(rc()),n.form.open()},c=y=>{o.setFormValues({editSeq:y.seq,name:y.name,trigger:y.trigger,enabled:y.enabled,sort_no:y.sort_no,condition:{...y.condition,...y.trigger==="field_changed"&&y.condition.changed_field===void 0?{changed_field:Vi[0]?.value??""}:{}},action:{...y.action}}),n.form.open()},p=y=>{let T=i();y!=="status_changed"&&(delete T.from_status,delete T.to_status),y!=="overdue"&&delete T.overdue_days,y!=="field_changed"&&delete T.changed_field,y!=="commented"&&(delete T.comment_contains,delete T.comment_by_others),y==="field_changed"&&T.changed_field===void 0&&(T.changed_field=Vi[0]?.value??""),o.setFormValues({trigger:y,condition:T})},d=async y=>{let T=t.current.onPickAccount;if(!T)return;let I=i(),A=y==="manager_account"?I.manager_account_seq??0:I.receiver_account_seq??0,q=await T(A,y==="manager_account"?"\uCC45\uC784\uC790":"\uCC38\uC870\uC790");if(!q)return;let C=i();y==="manager_account"?(C.manager_account_seq=q.accountSeq,C.manager_name=q.name):(C.receiver_account_seq=q.accountSeq,C.receiver_name=q.name),o.setFormValue("condition",C)},u=y=>{let T=Uu(t.current.customTabs),I=ic(t.current.statusOptions);y==="group_seq"?l("group_seq",Number(T[0]?.value)||0):y==="kind"?l("is_bug",!0):y==="priority"?l("priority","high"):y==="label_key"?l("label_key",I[0]?.value??""):y==="title_contains"?o.setFormValue("condition",{...i(),title_contains:""}):y==="manager_empty"?l("manager_empty",!0):y==="manager_account"||y==="receiver_account"?d(y):y==="from_status"?l("from_status",Io[0]?.key??""):y==="to_status"?l("to_status",Io[0]?.key??""):y==="changed_field"?l("changed_field",Vi[0]?.value??""):y==="comment_contains"?o.setFormValue("condition",{...i(),comment_contains:""}):y==="comment_by_others"?l("comment_by_others",!0):y==="overdue_days"&&l("overdue_days",1)},f=y=>{if(y==="kind"){l("is_bug",""),l("is_event","");return}if(y==="manager_account"){l("manager_account_seq",""),l("manager_name","");return}if(y==="receiver_account"){l("receiver_account_seq",""),l("receiver_name","");return}l(y,"")},g=y=>{l("is_bug",y?!0:""),l("is_event",y?"":!0)},v=async y=>{let T=t.current.onPickAccount;if(!T)return;let I=a(),A=y==="assign_manager"?I.assign_manager_account_seq??0:y==="add_receiver"?I.add_receiver_account_seq??0:I.notify_account_seq??0,q=await T(A,y==="assign_manager"?"\uCC45\uC784\uC790":y==="add_receiver"?"\uCC38\uC870\uC790":"\uC54C\uB9BC \uBC1B\uC744 \uC0AC\uB78C");if(!q)return;let C=a();y==="assign_manager"?(C.assign_manager_account_seq=q.accountSeq,C.assign_manager_name=q.name):y==="add_receiver"?(C.add_receiver_account_seq=q.accountSeq,C.add_receiver_name=q.name):(C.notify_account_seq=q.accountSeq,C.notify_name=q.name),o.setFormValue("action",C)};return{form:o,modals:n,actions:{openCreate:m,openEdit:c,changeTrigger:p,setCondition:l,setAction:s,addCondition:u,removeCondition:f,changeKind:g,pickConditionAccount:d,addAction:y=>{let T=ic(t.current.statusOptions);if(y==="set_status")s("set_status",Io[0]?.key??"");else if(y==="set_priority")s("set_priority","high");else if(y==="add_label_key")s("add_label_key",T[0]?.value??"");else if(y==="apply_content_template"){let I=t.current.contentTemplates[0];o.setFormValue("action",{...a(),apply_content_template_seq:I?.seq??0,apply_content_template_name:I?.name??""})}else v(y)},removeAction:y=>{y==="assign_manager"?(s("assign_manager_account_seq",""),s("assign_manager_name","")):y==="add_receiver"?(s("add_receiver_account_seq",""),s("add_receiver_name","")):y==="apply_content_template"?(s("apply_content_template_seq",""),s("apply_content_template_name","")):y==="notify"?(s("notify_account_seq",""),s("notify_name",""),s("notify_message","")):s(y,"")},pickAccountFor:v,selectContentTemplate:y=>{let T=t.current.contentTemplates.find(I=>String(I.seq)===String(y));o.setFormValue("action",{...a(),apply_content_template_seq:T?.seq??0,apply_content_template_name:T?.name??""})},toggleRule:(y,T)=>t.current.onToggle(y,T),removeRule:y=>t.current.onRemove(y)}}}import{Fragment as Mb,jsx as le,jsxs as Zo}from"react/jsx-runtime";var Yu=[{value:"created",label:"\uC5C5\uBB34 \uB4F1\uB85D \uC2DC",hint:"\uC0C8 \uC5C5\uBB34\uAC00 \uB9CC\uB4E4\uC5B4\uC9C4 \uC9C1\uD6C4 \uD55C \uBC88 \uC2E4\uD589\uD569\uB2C8\uB2E4."},{value:"status_changed",label:"\uC0C1\uD0DC \uBCC0\uACBD \uC2DC",hint:"\uC0C1\uD0DC\uAC00 \uC2E4\uC81C\uB85C \uBC14\uB010 \uC9C1\uD6C4 \uC2E4\uD589\uD569\uB2C8\uB2E4."},{value:"commented",label:"\uB313\uAE00\uC774 \uB2EC\uB838\uC744 \uB54C",hint:"\uB313\uAE00\uC774 \uC0C8\uB85C \uB2EC\uB9AC\uAC70\uB098 \uC218\uC815\uB41C \uC9C1\uD6C4 \uC2E4\uD589\uD569\uB2C8\uB2E4(\uD68C\uC2E0\uC744 \uBC1B\uC740 \uC790\uB9AC)."},{value:"manager_assigned",label:"\uCC45\uC784\uC790\uAC00 \uC9C0\uC815\uB410\uC744 \uB54C",hint:"\uCC45\uC784\uC790\uAC00 \uC0C8\uB85C \uC9C0\uC815\uB418\uAC70\uB098 \uBC14\uB010 \uC9C1\uD6C4 \uC2E4\uD589\uD569\uB2C8\uB2E4."},{value:"attachment_added",label:"\uCCA8\uBD80\uAC00 \uC62C\uB77C\uC654\uC744 \uB54C",hint:"\uC5C5\uBB34\uC5D0 \uD30C\uC77C\uC774 \uCCA8\uBD80\uB41C \uC9C1\uD6C4 \uC2E4\uD589\uD569\uB2C8\uB2E4(\uC99D\uBE59 \uC811\uC218 \uC790\uB9AC)."},{value:"field_changed",label:"\uD544\uB4DC\uAC00 \uBC14\uB00C\uC5C8\uC744 \uB54C",hint:"\uC9C0\uC815\uD55C \uD544\uB4DC\uAC00 \uC2E4\uC81C\uB85C \uBC14\uB010 \uC9C1\uD6C4 \uC2E4\uD589\uD569\uB2C8\uB2E4(\uD544\uB4DC\uB97C \uC548 \uACE0\uB974\uBA74 \uC544\uBB34 \uC218\uC815\uC5D0\uB098 \uC2E4\uD589)."},{value:"overdue",label:"\uB9C8\uAC10 \uACBD\uACFC \uC2DC",hint:"\uB9C8\uAC10\uC774 \uC9C0\uB09C \uBBF8\uC644\uB8CC \uC5C5\uBB34\uB97C \uB9E4\uC77C \uC810\uAC80\uD574 \uC2E4\uD589\uD569\uB2C8\uB2E4."}],lc=[{value:"high",label:"\uB192\uC74C"},{value:"medium",label:"\uC911\uAC04"},{value:"low",label:"\uB0AE\uC74C"}];function ac(e){return Io.find(t=>t.key===e)?.name??e}function qM(e,t,o){let{condition:n,action:r}=e,i=[];if(n.group_seq){let s=t.find(m=>hn(m.key)===n.group_seq);i.push(`\uD504\uB85C\uC81D\uD2B8=${s?.label??`#${n.group_seq}`}`)}n.is_bug===!0&&i.push("\uC624\uB958\uB9CC"),n.is_event===!0&&i.push("\uC77C\uC815\uB9CC"),n.priority&&i.push(`\uC911\uC694\uB3C4=${lc.find(s=>s.value===n.priority)?.label}`),n.label_key&&i.push(`\uB77C\uBCA8=${o.find(s=>s.key===n.label_key)?.name??n.label_key}`),n.title_contains&&i.push(`\uC81C\uBAA9\uC5D0 "${n.title_contains}" \uD3EC\uD568`),n.status&&i.push(`\uC0C1\uD0DC=${ac(n.status)}`),n.from_status&&i.push(`${ac(n.from_status)}\uC5D0\uC11C`),n.to_status&&i.push(`${ac(n.to_status)}\uB85C`),n.manager_empty===!0&&i.push("\uCC45\uC784\uC790 \uC5C6\uC74C"),n.manager_empty===!1&&i.push("\uCC45\uC784\uC790 \uC788\uC74C"),n.manager_account_seq&&i.push(`\uCC45\uC784\uC790=${n.manager_name||`\uACC4\uC815 #${n.manager_account_seq}`}`),n.receiver_account_seq&&i.push(`\uCC38\uC870\uC790\uC5D0 ${n.receiver_name||`\uACC4\uC815 #${n.receiver_account_seq}`}`),n.changed_field&&i.push(`${Vi.find(s=>s.value===n.changed_field)?.label??n.changed_field} \uBCC0\uACBD`),n.comment_contains&&i.push(`\uB313\uAE00\uC5D0 "${n.comment_contains}" \uD3EC\uD568`),n.comment_by_others===!0&&i.push("\uB0A8\uC774 \uC4F4 \uB313\uAE00"),typeof n.overdue_days=="number"&&i.push(`${n.overdue_days}\uC77C \uACBD\uACFC`);let a=[];r.set_status&&a.push(`\uC0C1\uD0DC=${ac(r.set_status)}`),r.set_priority&&a.push(`\uC911\uC694\uB3C4=${lc.find(s=>s.value===r.set_priority)?.label}`),r.assign_manager_account_seq&&a.push(`\uCC45\uC784\uC790=${r.assign_manager_name||"\uC9C0\uC815"}`),r.add_receiver_account_seq&&a.push(`\uCC38\uC870\uC790 + ${r.add_receiver_name||"\uC9C0\uC815"}`),r.add_label_key&&a.push(`\uB77C\uBCA8 + ${o.find(s=>s.key===r.add_label_key)?.name??r.add_label_key}`),r.apply_content_template_seq&&a.push(`\uBCF8\uBB38 \uC591\uC2DD=${r.apply_content_template_name||"\uC9C0\uC815"}`),r.notify_account_seq&&a.push("\uC54C\uB9BC \uBC1C\uC1A1");let l=Yu.find(s=>s.value===e.trigger)?.label??e.trigger;return{left:i.length>0?`${l} \xB7 ${i.join(", ")}`:l,right:a.join(", ")||"\uB3D9\uC791 \uC5C6\uC74C"}}var Rb={fontSize:16,fontWeight:700,color:"#37352f"},zM={display:"flex",alignItems:"center",gap:1},AM={width:104,flexShrink:0,fontSize:16,color:"#37352f"};function qQ({open:e,rules:t,customTabs:o,statusOptions:n,contentTemplates:r=[],onPickAccount:i,onClose:a,onCreate:l,onUpdate:s,onToggle:m,onRemove:c}){let p=vb({open:e,rules:t,customTabs:o,statusOptions:n,contentTemplates:r,onPickAccount:i,onClose:a,onCreate:l,onUpdate:s,onToggle:m,onRemove:c}),{form:d,actions:u}=p,f=p.modals.list,g=p.modals.form,{setCondition:v,setAction:D,removeCondition:b,removeAction:S,pickConditionAccount:h,pickAccountFor:E,changeTrigger:y}=u,T=d.isSubmitting,I=DM(null),[A,q]=Ib(null),[C,k]=Ib(null);wM(()=>{if(!g.isOpen)return;let F=window.setTimeout(()=>I.current?.focus(),120);return()=>window.clearTimeout(F)},[g.isOpen]);let x=Number(d.useValue("editSeq")??0)>0,B=d.useValue("trigger")??"created",w=ic(n),P=Io.map(F=>({value:F.key,label:F.name})),H=Uu(o),_=d.useValue("condition")??{},N=d.useValue("action")??{},G=_.is_bug!==void 0||_.is_event!==void 0,Q=[..._.group_seq===void 0&&H.length>0?[{key:"group_seq",label:"\uD504\uB85C\uC81D\uD2B8\uAC00 ~\uC778 \uACBD\uC6B0"}]:[],...G?[]:[{key:"kind",label:"\uC885\uB958\uAC00 \uC624\uB958/\uC77C\uC815\uC778 \uACBD\uC6B0"}],..._.priority===void 0?[{key:"priority",label:"\uC911\uC694\uB3C4\uAC00 ~\uC778 \uACBD\uC6B0"}]:[],..._.label_key===void 0&&w.length>0?[{key:"label_key",label:"\uB77C\uBCA8\uC774 \uBD99\uC5B4 \uC788\uB294 \uACBD\uC6B0"}]:[],..._.title_contains===void 0?[{key:"title_contains",label:"\uC81C\uBAA9\uC5D0 ~ \uB2E8\uC5B4\uAC00 \uD3EC\uD568\uB41C \uACBD\uC6B0"}]:[],..._.manager_empty===void 0?[{key:"manager_empty",label:"\uCC45\uC784\uC790\uAC00 \uC5C6\uB294/\uC788\uB294 \uACBD\uC6B0"}]:[],...i&&_.manager_account_seq===void 0?[{key:"manager_account",label:"\uCC45\uC784\uC790\uAC00 ~\uC778 \uACBD\uC6B0"}]:[],...i&&_.receiver_account_seq===void 0?[{key:"receiver_account",label:"\uCC38\uC870\uC790\uC5D0 ~\uAC00 \uD3EC\uD568\uB41C \uACBD\uC6B0"}]:[],...B==="status_changed"&&_.from_status===void 0?[{key:"from_status",label:"\uC774 \uC0C1\uD0DC\uC5D0\uC11C \uBC14\uB010 \uACBD\uC6B0"}]:[],...B==="status_changed"&&_.to_status===void 0?[{key:"to_status",label:"\uC774 \uC0C1\uD0DC\uB85C \uBC14\uB010 \uACBD\uC6B0"}]:[],...B==="field_changed"&&_.changed_field===void 0?[{key:"changed_field",label:"~ \uD544\uB4DC\uAC00 \uBCC0\uACBD\uB41C \uACBD\uC6B0"}]:[],...B==="commented"&&_.comment_contains===void 0?[{key:"comment_contains",label:"\uB313\uAE00\uC5D0 ~ \uB2E8\uC5B4\uAC00 \uD3EC\uD568\uB41C \uACBD\uC6B0"}]:[],...B==="commented"&&_.comment_by_others===void 0?[{key:"comment_by_others",label:"\uCC45\uC784\uC790\uAC00 \uC544\uB2CC \uC0AC\uB78C\uC774 \uC4F4 \uACBD\uC6B0"}]:[],...B==="overdue"&&_.overdue_days===void 0?[{key:"overdue_days",label:"\uB9C8\uAC10 \uD6C4 \uBA70\uCE60 \uC9C0\uB09C \uACBD\uC6B0"}]:[]],se=F=>{q(null),u.addCondition(F)},me=[...N.set_status===void 0?[{key:"set_status",label:"\uC0C1\uD0DC \uBC14\uAFB8\uAE30"}]:[],...N.set_priority===void 0?[{key:"set_priority",label:"\uC911\uC694\uB3C4 \uBC14\uAFB8\uAE30"}]:[],...N.add_label_key===void 0&&w.length>0?[{key:"add_label_key",label:"\uB77C\uBCA8 \uBD99\uC774\uAE30"}]:[],...i&&N.assign_manager_account_seq===void 0?[{key:"assign_manager",label:"\uCC45\uC784\uC790 \uC9C0\uC815\uD558\uAE30"}]:[],...i&&N.add_receiver_account_seq===void 0?[{key:"add_receiver",label:"\uCC38\uC870\uC790 \uCD94\uAC00\uD558\uAE30"}]:[],...r.length>0&&N.apply_content_template_seq===void 0?[{key:"apply_content_template",label:"\uBCF8\uBB38 \uC591\uC2DD \uCC44\uC6B0\uAE30"}]:[],...i&&N.notify_account_seq===void 0?[{key:"notify",label:"\uC54C\uB9BC \uBCF4\uB0B4\uAE30"}]:[]],Y=F=>{k(null),u.addAction(F)},O=(F,W,V,U)=>Zo(St,{sx:zM,children:[le(St,{sx:AM,children:F}),Zo(St,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:U?"column":"row",alignItems:U?"stretch":"center",gap:U?.5:1},children:[W,U?le(St,{sx:{fontSize:13.5,color:"#37352f"},children:U}):null]}),le(Db,{title:"\uC774 \uC904 \uBE7C\uAE30",arrow:!0,disableInteractive:!0,children:le(Gu,{size:"small","aria-label":`${F} \uC904 \uBE7C\uAE30`,onClick:V,children:le(PM,{sx:{fontSize:16}})})})]}),oe=()=>Zo(St,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[le(nl,{size:"medium",label:"\uADDC\uCE59 \uC774\uB984",inputRef:I,placeholder:"\uC608: \uC811\uC218 \uC624\uB958 \uC790\uB3D9 \uBC30\uC815",name:"name",form:d}),le(St,{sx:{display:"flex",alignItems:"center",gap:2,flexWrap:"wrap"},children:Yu.map(F=>{let W=B===F.value;return le(Tn,{disableElevation:!0,variant:W?"contained":"outlined",color:W?"primary":"inherit",onClick:()=>y(F.value),sx:{borderRadius:99,px:1.75,...W?{}:{color:"#57564f",borderColor:"#d9d9d6"}},children:F.label},F.value)})}),le(St,{sx:{fontSize:13,color:"#787774",mt:-.5},children:Yu.find(F=>F.value===B)?.hint}),Zo(St,{sx:{display:"flex",alignItems:"center",gap:1,mt:.5},children:[le(St,{sx:Rb,children:"\uC5B4\uB5A4 \uC5C5\uBB34\uC77C \uB54C"}),Q.length>0?le(Tn,{size:"small",startIcon:le(Ku,{sx:{fontSize:16}}),onClick:F=>q(F.currentTarget),sx:{color:"#2563eb",minWidth:0},children:"\uC870\uAC74 \uCD94\uAC00"}):null]}),_.group_seq!==void 0?O("\uD504\uB85C\uC81D\uD2B8",le(No,{size:"medium",fullWidth:!0,label:"",value:String(_.group_seq),options:H,onChange:F=>v("group_seq",Number(F.target.value)||"")}),()=>b("group_seq")):null,G?O("\uC885\uB958",le(No,{size:"medium",fullWidth:!0,label:"",value:_.is_bug?"bug":"event",options:[{value:"bug",label:"\uC624\uB958\uB9CC"},{value:"event",label:"\uC77C\uC815\uB9CC"}],onChange:F=>{let W=F.target.value==="bug";v("is_bug",W?!0:""),v("is_event",W?"":!0)}}),()=>b("kind")):null,_.priority!==void 0?O("\uC911\uC694\uB3C4",le(No,{size:"medium",fullWidth:!0,label:"",name:"condition.priority",form:d,options:lc}),()=>b("priority")):null,_.label_key!==void 0?O("\uB77C\uBCA8",le(No,{size:"medium",fullWidth:!0,label:"",name:"condition.label_key",form:d,options:w}),()=>b("label_key")):null,_.title_contains!==void 0?O("\uC81C\uBAA9",le(nl,{size:"medium",fullWidth:!0,placeholder:"\uD3EC\uD568\uD560 \uB0B1\uB9D0 (\uC608: \uAE34\uAE09)",name:"condition.title_contains",form:d}),()=>b("title_contains")):null,_.manager_empty!==void 0?O("\uCC45\uC784\uC790",le(No,{size:"medium",fullWidth:!0,label:"",value:_.manager_empty?"empty":"assigned",options:[{value:"empty",label:"\uC5C6\uC74C"},{value:"assigned",label:"\uC788\uC74C"}],onChange:F=>v("manager_empty",F.target.value==="empty")}),()=>b("manager_empty")):null,_.manager_account_seq!==void 0?O("\uCC45\uC784\uC790",le(Tn,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{h("manager_account")},children:_.manager_name||`\uACC4\uC815 #${_.manager_account_seq}`}),()=>b("manager_account")):null,_.receiver_account_seq!==void 0?O("\uCC38\uC870\uC790",le(Tn,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{h("receiver_account")},children:_.receiver_name||`\uACC4\uC815 #${_.receiver_account_seq}`}),()=>b("receiver_account")):null,_.from_status!==void 0?O("\uC774 \uC0C1\uD0DC\uC5D0\uC11C",le(No,{size:"medium",fullWidth:!0,label:"",name:"condition.from_status",form:d,options:P}),()=>b("from_status")):null,_.to_status!==void 0?O("\uC774 \uC0C1\uD0DC\uB85C",le(No,{size:"medium",fullWidth:!0,label:"",name:"condition.to_status",form:d,options:P}),()=>b("to_status")):null,_.changed_field!==void 0?O("\uBCC0\uACBD \uD544\uB4DC",le(No,{size:"medium",fullWidth:!0,label:"",name:"condition.changed_field",form:d,options:Vi}),()=>b("changed_field")):null,_.comment_contains!==void 0?O("\uB313\uAE00 \uB0B1\uB9D0",le(nl,{size:"medium",fullWidth:!0,placeholder:"\uD3EC\uD568\uD560 \uB0B1\uB9D0 (\uC608: \uD68C\uC2E0)",name:"condition.comment_contains",form:d}),()=>b("comment_contains")):null,_.comment_by_others!==void 0?O("\uB313\uAE00 \uC791\uC131\uC790",le(No,{size:"medium",fullWidth:!0,label:"",value:_.comment_by_others?"others":"any",options:[{value:"others",label:"\uCC45\uC784\uC790\uAC00 \uC544\uB2CC \uC0AC\uB78C"},{value:"any",label:"\uB204\uAD6C\uB4E0"}],onChange:F=>v("comment_by_others",F.target.value==="others")}),()=>b("comment_by_others")):null,_.overdue_days!==void 0?O("\uACBD\uACFC\uC77C",le(nl,{size:"medium",fullWidth:!0,type:"number",value:String(_.overdue_days),onChange:F=>v("overdue_days",Math.max(0,Number(F.target.value)||0)),label:"\uB9C8\uAC10 \uD6C4 \uC9C0\uB09C \uC77C\uC218(\uC774\uC0C1)"}),()=>b("overdue_days")):null,Object.keys(_).length===0?le(St,{sx:{fontSize:13.5,color:"#9a9a97"},children:"\uC870\uAC74\uC774 \uC5C6\uC73C\uBA74 \uBAA8\uB4E0 \uC5C5\uBB34\uC5D0 \uC2E4\uD589\uB429\uB2C8\uB2E4."}):null,Zo(St,{sx:{display:"flex",alignItems:"center",gap:1,mt:.5},children:[le(St,{sx:Rb,children:"\uBB34\uC5C7\uC744 \uD560\uAE4C\uC694"}),me.length>0?le(Tn,{size:"small",startIcon:le(Ku,{sx:{fontSize:16}}),onClick:F=>k(F.currentTarget),sx:{color:"#2563eb",minWidth:0},children:"\uB3D9\uC791 \uCD94\uAC00"}):null]}),N.set_status!==void 0?O("\uC0C1\uD0DC",le(No,{size:"medium",fullWidth:!0,label:"",name:"action.set_status",form:d,options:P}),()=>S("set_status")):null,N.set_priority!==void 0?O("\uC911\uC694\uB3C4",le(No,{size:"medium",fullWidth:!0,label:"",name:"action.set_priority",form:d,options:lc}),()=>S("set_priority")):null,N.apply_content_template_seq!==void 0?O("\uBCF8\uBB38 \uC591\uC2DD",le(No,{size:"medium",fullWidth:!0,label:"",value:String(N.apply_content_template_seq),options:r.map(F=>({value:String(F.seq),label:F.name})),onChange:F=>u.selectContentTemplate(String(F.target.value))}),()=>S("apply_content_template"),"\uBCF8\uBB38\uC774 \uBE44\uC5B4 \uC788\uC744 \uB54C\uB9CC \uCC44\uC6C1\uB2C8\uB2E4(\uC4F4 \uB0B4\uC6A9\uC744 \uB36E\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4)"):null,N.add_label_key!==void 0?O("\uB77C\uBCA8",le(No,{size:"medium",fullWidth:!0,label:"",name:"action.add_label_key",form:d,options:w}),()=>S("add_label_key")):null,N.assign_manager_account_seq!==void 0?O("\uCC45\uC784\uC790",le(Tn,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{E("assign_manager")},children:N.assign_manager_name||`\uACC4\uC815 #${N.assign_manager_account_seq}`}),()=>S("assign_manager")):null,N.add_receiver_account_seq!==void 0?O("\uCC38\uC870\uC790",le(Tn,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{E("add_receiver")},children:N.add_receiver_name||`\uACC4\uC815 #${N.add_receiver_account_seq}`}),()=>S("add_receiver")):null,N.notify_account_seq!==void 0?O("\uC54C\uB9BC",Zo(Mb,{children:[le(Tn,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{E("notify")},sx:{flexShrink:0},children:N.notify_name||`\uACC4\uC815 #${N.notify_account_seq}`}),le(nl,{size:"medium",fullWidth:!0,placeholder:"\uC54C\uB9BC \uBB38\uAD6C(\uBE44\uC6B0\uBA74 \uAE30\uBCF8 \uBB38\uAD6C)",value:N.notify_message??"",onChange:F=>D("notify_message",F.target.value)})]}),()=>S("notify")):null,Object.keys(N).length===0?le(St,{sx:{fontSize:13.5,color:"#9a9a97"},children:'"+ \uB3D9\uC791 \uCD94\uAC00" \uB85C \uD560 \uC77C\uC744 \uD558\uB098 \uC774\uC0C1 \uACE8\uB77C \uC8FC\uC138\uC694.'}):null,le(_b,{transitionDuration:0,anchorEl:A,open:!!A,onClose:()=>q(null),children:Q.map(F=>le(wb,{dense:!0,onClick:()=>se(F.key),sx:{fontSize:14},children:F.label},F.key))}),le(_b,{transitionDuration:0,anchorEl:C,open:!!C,onClose:()=>k(null),children:me.map(F=>le(wb,{dense:!0,onClick:()=>Y(F.key),sx:{fontSize:14},children:F.label},F.key))})]});return Zo(Mb,{children:[le(Eb,{open:f.isOpen,onClose:f.close,maxWidth:"sm",title:"\uC790\uB3D9\uD654 \uADDC\uCE59",locale:"ko",titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-rule-manage",tabs:{visible:!1},contentPaddingX:0,contentTopPadding:0,contentBottomPadding:0,sectionContentPaddingTop:0,sections:[{id:"rules",title:"",showTitle:!1,children:Zo(St,{sx:{display:"flex",flexDirection:"column",px:2.5,py:2},children:[t.length===0?Zo(St,{sx:{py:4,display:"flex",flexDirection:"column",alignItems:"center",gap:2,color:"#9a9a97"},children:[le(MM,{sx:{fontSize:48,color:"#d9d9d6"}}),le(St,{sx:{fontSize:15},children:"\uB4F1\uB85D\uB41C \uADDC\uCE59\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."})]}):null,t.map(F=>Zo(St,{sx:{display:"flex",alignItems:"center",gap:2,py:1,"&:not(:last-of-type)":{borderBottom:"1px solid #ececea"},opacity:F.enabled?1:.5},children:[le(Db,{title:F.enabled?"\uC0AC\uC6A9 \uC911":"\uAEBC\uC9D0",arrow:!0,disableInteractive:!0,children:le(EM,{size:"small",inputProps:{"aria-label":`${F.name} \uADDC\uCE59 \uC0AC\uC6A9`},checked:F.enabled,onChange:(W,V)=>u.toggleRule(F.seq,V)})}),Zo(St,{sx:{flex:1,minWidth:0},children:[le(St,{sx:{fontSize:16,fontWeight:600,color:"#37352f"},children:F.name}),(()=>{let W=qM(F,o,n);return Zo(St,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5,fontSize:15,color:"#6f6f6c"},children:[le(St,{component:"span",children:W.left}),le(RM,{sx:{fontSize:18,color:"#9a9a97",flexShrink:0}}),le(St,{component:"span",children:W.right})]})})()]}),le(Gu,{size:"small","aria-label":`${F.name} \uADDC\uCE59 \uC218\uC815`,onClick:()=>u.openEdit(F),children:le(OM,{sx:{fontSize:18}})}),le(Gu,{size:"small","aria-label":`${F.name} \uADDC\uCE59 \uC0AD\uC81C`,onClick:()=>u.removeRule(F.seq),children:le(Gt,{sx:{fontSize:18}})})]},F.seq))]})}],actions:{showCancelButton:!1,left:le(Tn,{startIcon:le(Ku,{}),onClick:u.openCreate,sx:{color:"#2563eb"},children:"\uC0C8 \uADDC\uCE59"}),right:le(Tn,{variant:"contained",onClick:f.close,children:"\uB2EB\uAE30"})}}),le(Eb,{open:g.isOpen,onClose:g.close,maxWidth:"sm",title:x?"\uADDC\uCE59 \uC218\uC815":"\uC0C8 \uADDC\uCE59",locale:"ko",backdropClick:!1,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-rule-form",tabs:{visible:!1},sectionContentPaddingTop:0,sections:[{id:"rule-form",title:"",showTitle:!1,children:oe()}],actions:{showCancelButton:!0,right:le(Tn,{variant:"contained",onClick:()=>{d.submit()},disabled:T,children:x?"\uC218\uC815":"\uADDC\uCE59 \uCD94\uAC00"})}})]})}import{useEffect as HM,useRef as Fb,useState as WM}from"react";import{Box as gt,Button as Ui,IconButton as rl,Tooltip as il}from"@mui/material";import $b from"@mui/icons-material/Add";import VM from"@mui/icons-material/EditOutlined";import UM from"@mui/icons-material/ContentCopyOutlined";import GM from"@mui/icons-material/DragIndicator";import KM from"@mui/icons-material/Close";import YM from"@mui/icons-material/PlaylistAddCheckOutlined";import{DndContext as jM,PointerSensor as XM,closestCenter as QM,useSensor as ZM,useSensors as JM}from"@dnd-kit/core";import{restrictToParentElement as eP,restrictToVerticalAxis as tP}from"@dnd-kit/modifiers";import{SortableContext as oP,useSortable as nP,verticalListSortingStrategy as rP}from"@dnd-kit/sortable";import{CSS as iP}from"@dnd-kit/utilities";import{FormDialog as Hb}from"@ehfuse/mui-form-dialog";import{ClearTextField as Xu,LabelSelect as Gb,NumberField as Wb}from"@ehfuse/mui-form-controls";import aP from"@ehfuse/overlay-scrollbar";import{useEffect as LM,useRef as Pb}from"react";import{useGlobalForm as NM,useModal as FM}from"@ehfuse/forma";import{ConfirmDialog as $M,ErrorAlert as Ob}from"@ehfuse/alerts";var qb=0;function zb(){return qb+=1,`ti${qb}`}function ju(){return{editSeq:0,name:"",description:"",group_seq:0,itemIds:[],items:{}}}function Ab(){return{title:"",start_offset_days:0,due_offset_days:0,priority:"medium"}}function Nb(e){let t=Pb(e);t.current=e;let o=NM({formId:we("taskbox-template-form"),initialValues:ju(),onValidate:m=>m.name.trim()?Lb(m).length===0?(Ob({message:"\uC5C5\uBB34 \uD56D\uBAA9\uC744 \uD55C \uC904 \uC774\uC0C1 \uB123\uC73C\uC138\uC694."}),!1):!0:(Ob({message:"\uD15C\uD50C\uB9BF \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694."}),!1),onSubmit:async m=>{let c={name:m.name.trim(),description:m.description,group_seq:m.group_seq,items:Lb(m)},p=m.editSeq>0?await t.current.onUpdate(m.editSeq,c):await t.current.onCreate(c);return p&&(n.form.close(),o.setFormValues(ju())),p}}),n={list:Xo({modalId:we("taskbox-template-manage"),open:e.open,onClose:()=>t.current.onClose()}),form:FM({modalId:we("taskbox-template-edit")})},r=Pb(n.form);r.current=n.form,LM(()=>{if(e.open)return;let m=window.setTimeout(()=>{r.current.isOpen&&r.current.close(),o.setFormValues(ju())},500);return()=>window.clearTimeout(m)},[e.open]);let i=(m,c)=>{let p=c.items.map(()=>zb());o.setFormValues({editSeq:m,name:c.name,description:c.description??"",group_seq:c.group_seq??0,itemIds:p,items:Object.fromEntries(c.items.map((d,u)=>[p[u],{...d}]))}),n.form.open()},a=(m,c)=>({name:c,description:m.description??"",group_seq:m.group_seq??0,items:m.items.map(p=>({...p}))}),l=(m,c)=>{let p=o.getFormValue(`items.${m}`);o.setFormValue(`items.${m}`,{...p??Ab(),...c})};return{form:o,modals:n,actions:{openCreate:()=>i(0,{name:"",description:"",group_seq:0,items:[]}),openEdit:m=>i(m.seq,a(m,m.name)),openDuplicate:m=>i(0,a(m,`${m.name} \uC0AC\uBCF8`)),closeForm:()=>n.form.close(),setItem:l,addItem:()=>{let m=zb();o.setFormValue(`items.${m}`,Ab()),o.setFormValue("itemIds",[...o.getFormValue("itemIds")??[],m])},removeItem:m=>{let c=o.getFormValue("itemIds")??[];o.setFormValue("itemIds",c.filter(p=>p!==m))},moveItem:(m,c)=>{let p=[...o.getFormValue("itemIds")??[]],d=p.indexOf(m),u=p.indexOf(c);if(d<0||u<0||d===u)return;let[f]=p.splice(d,1);p.splice(u,0,f),o.setFormValue("itemIds",p)},pickItemManager:async m=>{let c=t.current.onPickAccount;if(!c)return;let p=o.getFormValue(`items.${m}`),d=await c(p?.manager_account_seq??0,"\uCC45\uC784\uC790");d&&l(m,{manager_account_seq:d.accountSeq,manager_name:d.name})},clearItemManager:m=>l(m,{manager_account_seq:0,manager_name:""}),removeTemplate:async m=>{await $M({title:"\uD15C\uD50C\uB9BF \uC0AD\uC81C",message:`"${m.name}" \uD15C\uD50C\uB9BF\uC744 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&t.current.onRemove(m.seq)},runTemplate:m=>t.current.onRun?.(m)}}}function Lb(e){return(e.itemIds??[]).map(t=>e.items?.[t]).filter(t=>!!t&&String(t.title??"").trim().length>0)}import{Fragment as uP,jsx as be,jsxs as Jo}from"react/jsx-runtime";var lP=[{value:"high",label:"\uB192\uC74C"},{value:"medium",label:"\uC911\uAC04"},{value:"low",label:"\uB0AE\uC74C"}],Kb="\uC5C5\uBB34 \uC81C\uBAA9",Qu=2,sc={flex:1,minWidth:0},Vb=56,Yb=20,sP=`${Yb+Qu*8}px`;function cP({id:e,children:t}){let{attributes:o,listeners:n,setNodeRef:r,transform:i,transition:a,isDragging:l}=nP({id:e});return be(gt,{ref:r,sx:{transform:iP.Transform.toString(i),transition:a,...l?{opacity:.6,position:"relative",zIndex:1}:{}},children:t({handleProps:{...o,...n},dragging:l})})}function Ub(e){return e===null?void 0:Math.trunc(Number(e))}function mP({id:e,index:t,isLast:o,form:n,actions:r,canPickAccount:i,handleProps:a}){let l=n.useValue(`items.${e}`)??{};return Jo(gt,{sx:{borderBottom:o?"none":"1px solid #f2f2f0",px:Qu,py:2,gap:2,display:"flex",flexDirection:"column"},children:[Jo(gt,{sx:{display:"flex",alignItems:"center",gap:Qu},children:[be(gt,{...a,"aria-label":`${t+1}\uBC88 \uD56D\uBAA9 \uC21C\uC11C \uC774\uB3D9`,sx:{display:"inline-flex",alignItems:"center",flexShrink:0,color:"#c9c8c5",cursor:"grab","&:active":{cursor:"grabbing"},touchAction:"none",userSelect:"none"},children:be(GM,{sx:{fontSize:Yb}})}),be(Xu,{size:"medium",fullWidth:!0,placeholder:Kb,slotProps:{htmlInput:{"data-template-title":t}},name:`items.${e}.title`,form:n})]}),Jo(gt,{sx:{display:"flex",alignItems:"center",gap:2,pl:sP},children:[be(gt,{sx:sc,children:be(Wb,{size:"medium",fullWidth:!0,label:"\uC2DC\uC791 D+",thousandSeparator:!1,align:"right",suffix:"\uC77C",value:l.start_offset_days??null,onValueChange:s=>r.setItem(e,{start_offset_days:Ub(s)})})}),be(gt,{sx:sc,children:be(Wb,{size:"medium",fullWidth:!0,label:"\uB9C8\uAC10 D+",thousandSeparator:!1,align:"right",suffix:"\uC77C",value:l.due_offset_days??null,onValueChange:s=>r.setItem(e,{due_offset_days:Ub(s)})})}),be(gt,{sx:sc,children:be(Gb,{size:"medium",fullWidth:!0,label:"\uC911\uC694\uB3C4",value:l.priority??"medium",options:lP,onChange:s=>r.setItem(e,{priority:s.target.value})})}),i?Jo(gt,{sx:{...sc,position:"relative"},children:[be(Ui,{variant:"outlined",fullWidth:!0,onClick:()=>{r.pickItemManager(e)},sx:{height:Vb,display:"block",textAlign:"left",textTransform:"none",fontSize:16,fontWeight:400,lineHeight:`${Vb-2}px`,py:0,px:1.75,pr:l.manager_account_seq?4.5:1.75,borderColor:"#c4c4c4",color:l.manager_name?"#37352f":"#9a9a97",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap","&:hover":{borderColor:"#37352f",bgcolor:"transparent"}},children:l.manager_name||"\uCC45\uC784\uC790"}),l.manager_account_seq?be(il,{title:"\uCC45\uC784\uC790 \uBE44\uC6B0\uAE30",arrow:!0,disableInteractive:!0,children:be(rl,{size:"small","aria-label":`${t+1}\uBC88 \uD56D\uBAA9 \uCC45\uC784\uC790 \uBE44\uC6B0\uAE30`,onClick:s=>{s.stopPropagation(),r.clearItemManager(e)},sx:{position:"absolute",right:6,top:"50%",transform:"translateY(-50%)"},children:be(KM,{sx:{fontSize:18}})})}):null]}):null,be(il,{title:"\uD56D\uBAA9 \uC0AD\uC81C",arrow:!0,disableInteractive:!0,children:be(rl,{size:"medium","aria-label":`${t+1}\uBC88 \uD56D\uBAA9 \uC0AD\uC81C`,onClick:()=>r.removeItem(e),children:be(Gt,{sx:{fontSize:18}})})})]})]})}function sZ({open:e,templates:t,customTabs:o,onPickAccount:n,onClose:r,onCreate:i,onUpdate:a,onRemove:l,onRun:s}){let m=Nb({open:e,templates:t,customTabs:o,onPickAccount:n,onClose:r,onCreate:i,onUpdate:a,onRemove:l,onRun:s}),{form:c,actions:p}=m,d=m.modals.list,u=m.modals.form,f=c.isSubmitting,g=Number(c.useValue("editSeq")??0),v=c.useValue("itemIds")??[],[D,b]=WM(0),S=Fb(null),h=Fb(null),E=()=>{let x=h.current?.getScrollContainer()??null;if(x){x.scrollTop=x.scrollHeight;return}let B=S.current?.querySelectorAll("*")??[];for(let w of Array.from(B))if(w.scrollHeight>w.clientHeight+1){w.scrollTop=w.scrollHeight;return}},y=()=>{let x=S.current;if(!x)return null;let B=x.querySelectorAll("input[data-template-title]"),w=B.length?B:x.querySelectorAll(`input[placeholder="${Kb}"]`);return w.length?w[w.length-1]:null};HM(()=>{if(D===0)return;let x=0,B=0,w=()=>{E();let H=y();H&&document.activeElement!==H&&H.focus(),x+=1,!(H&&document.activeElement===H)&&x<8&&(B=window.setTimeout(w,50))},P=window.requestAnimationFrame(w);return()=>{window.cancelAnimationFrame(P),window.clearTimeout(B)}},[D]);let T=o.filter(x=>!x.archived).map(x=>({value:String(hn(x.key)),label:x.label})),I=Number(c.useValue("group_seq")??0),A=JM(ZM(XM,{activationConstraint:{distance:5}})),q=x=>{let B=String(x.active?.id??""),w=String(x.over?.id??"");!B||!w||B===w||p.moveItem(B,w)},C=be(gt,{children:t.length===0?Jo(gt,{sx:{py:4,display:"flex",flexDirection:"column",alignItems:"center",gap:2,color:"#9a9a97"},children:[be(YM,{sx:{fontSize:48,color:"#d9d9d6"}}),be(gt,{sx:{fontSize:13.5},children:"\uB4F1\uB85D\uB41C \uD15C\uD50C\uB9BF\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."})]}):t.map(x=>Jo(gt,{sx:{display:"flex",alignItems:"center",gap:2.5,py:1.75,"&:not(:last-of-type)::after":{content:'""',display:"block",my:1.75,borderBottom:"1px solid #f0efed"}},children:[Jo(gt,{sx:{flex:1,minWidth:0},children:[be(gt,{sx:{fontSize:18,fontWeight:600,color:"#37352f"},children:x.name}),Jo(gt,{sx:{fontSize:14,color:"#787774",mt:.25},children:["\uC5C5\uBB34 ",x.items.length,"\uAC74",x.description?` \xB7 ${x.description}`:""]})]}),s?be(Ui,{size:"medium",variant:"outlined",onClick:()=>p.runTemplate(x),sx:{flexShrink:0},children:"\uC2E4\uD589"}):null,be(il,{title:"\uC218\uC815",arrow:!0,disableInteractive:!0,children:be(rl,{size:"medium","aria-label":`${x.name} \uD15C\uD50C\uB9BF \uC218\uC815`,onClick:()=>p.openEdit(x),children:be(VM,{sx:{fontSize:19}})})}),be(il,{title:"\uBCF5\uC81C",arrow:!0,disableInteractive:!0,children:be(rl,{size:"medium","aria-label":`${x.name} \uD15C\uD50C\uB9BF \uBCF5\uC81C`,onClick:()=>p.openDuplicate(x),children:be(UM,{sx:{fontSize:18}})})}),be(il,{title:"\uC0AD\uC81C",arrow:!0,disableInteractive:!0,children:be(rl,{size:"medium","aria-label":`${x.name} \uD15C\uD50C\uB9BF \uC0AD\uC81C`,onClick:()=>{p.removeTemplate(x)},children:be(Gt,{sx:{fontSize:18}})})})]},x.seq))}),k=Jo(gt,{sx:{display:"flex",flexDirection:"column",gap:3},children:[be(Xu,{size:"medium",label:"\uD15C\uD50C\uB9BF \uC774\uB984",placeholder:"\uC608: \uC2E0\uADDC \uC785\uC0AC\uC790 \uC628\uBCF4\uB529",fullWidth:!0,name:"name",form:c}),Jo(gt,{sx:{display:"grid",gridTemplateColumns:T.length>0?"1fr 1fr":"1fr",gap:2},children:[be(Xu,{size:"medium",label:"\uC124\uBA85",placeholder:"\uBAA9\uB85D\uC5D0\uC11C \uBB34\uC5C7\uC778\uC9C0 \uC54C\uC544\uBCFC \uD55C \uC904(\uC120\uD0DD)",fullWidth:!0,name:"description",form:c}),T.length>0?be(Gb,{size:"medium",fullWidth:!0,label:"\uB9CC\uB4E4 \uACF3(\uD504\uB85C\uC81D\uD2B8)",value:String(I),options:[{value:"0",label:"\uAE30\uBCF8 \uC5C5\uBB34\uD568"},...T],onChange:x=>c.setFormValue("group_seq",Number(x.target.value)||0)}):null]}),Jo(gt,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[be(gt,{sx:{fontSize:18,fontWeight:600,color:"#37352f"},children:"\uC5C5\uBB34 \uD56D\uBAA9"}),be(gt,{sx:{fontSize:14,color:"#37352f"},children:"\uB0A0\uC9DC\uB294 \uC2E4\uD589\uD560 \uB54C \uACE0\uB974\uB294 \uAE30\uC900\uC77C\uC5D0\uC11C \uACC4\uC0B0\uB429\uB2C8\uB2E4."})]}),v.length===0?be(gt,{sx:{fontSize:14,color:"#9a9a97",py:2},children:'\uC544\uC9C1 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. "\uD56D\uBAA9 \uCD94\uAC00" \uB85C \uC808\uCC28\uB97C \uC21C\uC11C\uB300\uB85C \uC801\uC73C\uC138\uC694.'}):be(gt,{ref:S,sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:be(aP,{ref:h,style:{maxHeight:"min(560px, 52vh)"},thumb:{width:6},children:be(jM,{sensors:A,collisionDetection:QM,modifiers:[tP,eP],onDragEnd:q,children:be(oP,{items:v,strategy:rP,children:v.map((x,B)=>be(cP,{id:x,children:({handleProps:w})=>be(mP,{id:x,index:B,isLast:B===v.length-1,form:c,actions:p,canPickAccount:!!n,handleProps:w})},x))})})})})]});return Jo(uP,{children:[be(Hb,{open:d.isOpen,onClose:d.close,maxWidth:"md",title:"\uC5C5\uBB34 \uD15C\uD50C\uB9BF",locale:"ko",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-task-template",tabs:{visible:!1},actions:{showCancelButton:!1,left:be(Ui,{startIcon:be($b,{sx:{fontSize:18}}),onClick:p.openCreate,children:"\uC0C8 \uD15C\uD50C\uB9BF"}),right:be(Ui,{variant:"contained",onClick:d.close,children:"\uB2EB\uAE30"})},sectionContentPaddingTop:0,sections:[{id:"templates",title:"",showTitle:!1,children:C}]}),be(Hb,{open:u.isOpen,onClose:u.close,maxWidth:"md",title:g>0?"\uD15C\uD50C\uB9BF \uC218\uC815":"\uC0C8 \uD15C\uD50C\uB9BF",locale:"ko",backdropClick:!1,fontScale:{enabled:!0},fontScaleKey:"taskbox-task-template-form",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},tabs:{visible:!1},actions:{showCancelButton:!0,left:be(Ui,{startIcon:be($b,{sx:{fontSize:18}}),onClick:()=>{p.addItem(),b(x=>x+1)},children:"\uD56D\uBAA9 \uCD94\uAC00"}),right:be(Ui,{variant:"contained",disabled:f,onClick:()=>{c.submit()},children:"\uC800\uC7A5"})},sectionContentPaddingTop:0,sections:[{id:"template-form",title:"",showTitle:!1,children:k}]})]})}import{Box as mo,Button as pP}from"@mui/material";import{FormDialog as fP}from"@ehfuse/mui-form-dialog";import{DateTextField as gP}from"@ehfuse/mui-form-controls";import xP from"@ehfuse/overlay-scrollbar";import{useRef as Zu}from"react";import{useGlobalForm as dP}from"@ehfuse/forma";function jb(e){let t=Zu(e);t.current=e;let o=Zu(e.template);e.template&&(o.current=e.template);let n=e.template??o.current,r=Zu(n);r.current=n;let i=dP({formId:we("taskbox-template-run-form"),initialValues:{baseDate:e.todayStr},onValidate:s=>t.current.running||!r.current?!1:gs(r.current,s.baseDate).length>0,onSubmit:s=>r.current?(t.current.onRun(gs(r.current,s.baseDate),s.baseDate),!0):!1}),a={run:Xo({modalId:we("taskbox-template-run"),open:e.open,onClose:()=>t.current.onClose(),onOpen:()=>i.setFormValues({baseDate:t.current.todayStr})})},l=s=>n?gs(n,s):[];return{form:i,modals:a,template:n,running:!!e.running,planTasks:l}}import{jsx as So,jsxs as al}from"react/jsx-runtime";function CZ(e){let t=jb(e),{form:o,running:n}=t,r=t.modals.run,i=t.template,a=String(o.useValue("baseDate")??""),l=t.planTasks(a);return So(fP,{open:r.isOpen,onClose:r.close,maxWidth:"md",title:i?`${i.name} \uC2E4\uD589`:"\uD15C\uD50C\uB9BF \uC2E4\uD589",locale:"ko",backdropClick:!1,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-template-run",tabs:{visible:!1},sectionContentPaddingTop:0,actions:{showCancelButton:!0,right:So(pP,{variant:"contained",disabled:n||l.length===0,onClick:()=>{o.submit()},children:n?"\uB9CC\uB4DC\uB294 \uC911\u2026":`\uC5C5\uBB34 ${l.length}\uAC74 \uB9CC\uB4E4\uAE30`})},sections:[{id:"template-run",title:"",showTitle:!1,children:al(mo,{sx:{display:"flex",flexDirection:"column",gap:2},children:[al(mo,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[So(mo,{sx:{width:72,flexShrink:0,fontSize:16,color:"#37352f"},children:"\uAE30\uC900\uC77C"}),So(gP,{size:"medium",fullWidth:!0,name:"baseDate",form:o})]}),So(mo,{sx:{fontSize:14.5,color:"#37352f"},children:"\uC544\uB798 \uC5C5\uBB34\uAC00 \uD55C\uAEBC\uBC88\uC5D0 \uB9CC\uB4E4\uC5B4\uC9D1\uB2C8\uB2E4. \uB0A0\uC9DC\uB294 \uAE30\uC900\uC77C\uC5D0\uC11C \uACC4\uC0B0\uB41C \uAC12\uC785\uB2C8\uB2E4."}),al(mo,{sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:[al(mo,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1,bgcolor:"#fafaf9",borderBottom:"1px solid #e6e6e3",fontSize:13.5,fontWeight:600,color:"#37352f"},children:[So(mo,{sx:{flex:1,minWidth:0},children:"\uC5C5\uBB34"}),So(mo,{sx:{width:88,flexShrink:0,textAlign:"center"},children:"\uC2DC\uC791"}),So(mo,{sx:{width:88,flexShrink:0,textAlign:"center"},children:"\uB9C8\uAC10"}),So(mo,{sx:{width:96,flexShrink:0,textAlign:"center"},children:"\uCC45\uC784\uC790"})]}),So(xP,{style:{maxHeight:520},thumb:{width:6},children:l.length===0?So(mo,{sx:{p:2,fontSize:14,color:"#9a9a97"},children:"\uB9CC\uB4E4 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):l.map((s,m)=>al(mo,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1.25,borderBottom:m===l.length-1?"none":"1px solid #f2f2f0",fontSize:16,fontWeight:500,color:"#111111"},children:[So(mo,{sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:s.title}),So(mo,{sx:{width:88,flexShrink:0,textAlign:"center",fontSize:13.5,color:s.start_date?"#37352f":"#9a9a97"},children:im(s.start_date)||"-"}),So(mo,{sx:{width:88,flexShrink:0,textAlign:"center",fontSize:13.5,color:s.due_date?"#37352f":"#9a9a97"},children:im(s.due_date)||"-"}),So(mo,{sx:{width:96,flexShrink:0,textAlign:"center",fontSize:13.5,color:s.manager_name?"#37352f":"#9a9a97",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:s.manager_name||"-"})]},m))})]})]})}]})}var bP={urgent:"\uAE34\uAE09",high:"\uB192\uC74C",normal:"\uC911\uAC04",low:"\uB0AE\uC74C"};function hP(e){return e.length===0?"":e.length<=2?e.join(", "):`${e[0]} \uC678 ${e.length-1}\uBA85`}function cc(e){let t=String(e??"").trim().slice(0,10);return/^\d{4}-\d{2}-\d{2}$/.test(t)?`${t.slice(2,4)}.${t.slice(5,7)}.${t.slice(8,10)}`:"-"}function Gi(e){let t=o=>String(o).padStart(2,"0");return`${e.getFullYear()}-${t(e.getMonth()+1)}-${t(e.getDate())} ${t(e.getHours())}:${t(e.getMinutes())}`}function Ju(e,t,o){let r=String(e.due_date??"").slice(11,16).trim()||String(e.estimated_time??"").trim(),i=cc(e.due_date),a=String(e.start_date??"").slice(11,16).trim(),l=cc(e.start_date),s=(e.receiver_names??[]).filter(Boolean).map(c=>String(c).trim()),m=(e.checklist??[]).length?`${(e.checklist??[]).filter(c=>c.checked).length}/${(e.checklist??[]).length}`:"";return{seq:Number(e.seq??0),title:String(e.title??"").trim(),statusName:Mt(e).name,projectLabel:e.tab_key?t.get(String(e.tab_key))??"":"",managerName:String(e.manager_name??"").trim(),receiverNames:hP(s),receiverNamesFull:s.join(", "),startDate:l!=="-"&&a?`${l} ${a}`:l,dueDate:i!=="-"&&r?`${i} ${r}`:i,priorityName:bP[String(e.priority??"")]??"",checklist:m,checklistItems:(e.checklist??[]).map(c=>{let p=c.task_seq&&o?o(Number(c.task_seq)):null,d=cc(p?.due_date),u=String(p?.due_date??"").slice(11,16).trim();return{label:String(c.label??"").trim(),checked:!!c.checked,managerName:String(p?.manager_name??"").trim(),dueDate:d!=="-"?u?`${d} ${u}`:d:""}}),note:String(e.note??"").trim(),completed:!!e.completed}}function Fe(e){return String(e??"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function kP(e,t){if(e===" ")return t*.3;let o=e.codePointAt(0)??0,n=o>=4352&&o<=4607||o>=12288&&o<=40959||o>=44032&&o<=55203||o>=63744&&o<=64255||o>=65280&&o<=65519;return t*(n?1:.55)}function mc(e,t){let o=0;for(let n of String(e??""))o+=kP(n,t);return o}function Ki(e,t){let o=String(e??"").trim();if(!o)return["-"];let n=[],r="";for(let i of o){if(i===`
|
|
18
|
+
${u}`.trim()).then(()=>{a.setValue("copied",!0),window.setTimeout(()=>a.setValue("copied",!1),1500)})};return{modals:i,ui:a,taskSeq:e.taskSeq,isStored:l,selectTarget:s,openDialog:m,copySummary:c,copyResult:p}}import{jsx as st,jsxs as Ka}from"react/jsx-runtime";var Og=[{code:"en",label:"\uC601\uC5B4"},{code:"ja",label:"\uC77C\uBCF8\uC5B4"},{code:"zh",label:"\uC911\uAD6D\uC5B4(\uAC04\uCCB4)"},{code:"zh-TW",label:"\uC911\uAD6D\uC5B4(\uBC88\uCCB4)"},{code:"vi",label:"\uBCA0\uD2B8\uB0A8\uC5B4"},{code:"th",label:"\uD0DC\uAD6D\uC5B4"},{code:"ko",label:"\uD55C\uAD6D\uC5B4"}];function qg({controller:e,title:t,html:o}){let n=e.modals.translate,{ui:r}=e,i=String(r.useValue("target")??"");r.useValue("doneTargets");let a=r.useValue("result"),l=!!r.useValue("loading"),s=String(r.useValue("error")??""),m=!!r.useValue("copied"),c=!!r.useValue("summaryCopied"),[p,d]=yw(null),u=(g,v)=>{if(g!==i){if(g===""||e.isStored(g)){e.selectTarget(g);return}d({code:g,anchor:v})}};Tw(()=>{n.isOpen&&d(null)},[n.isOpen,e.taskSeq]);let f=Ka(ho,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[st(ho,{sx:{display:"flex",flexWrap:"wrap",gap:.75},children:[{code:"",label:"\uC6D0\uBB38"},...Og].map(g=>st(Sw,{label:g.label,clickable:!0,icon:g.code&&e.isStored(g.code)?st(gu,{sx:{fontSize:16}}):void 0,onClick:v=>u(g.code,v.currentTarget),color:i===g.code?"primary":"default",variant:i===g.code?"filled":"outlined",sx:{fontSize:14,height:30}},g.code||"__source__"))}),st(vw,{open:!!p,anchorEl:p?.anchor??null,title:`${Og.find(g=>g.code===p?.code)?.label??""}\uB85C AI \uBC88\uC5ED\uC744 \uC2DC\uC791\uD560\uAE4C\uC694?`,confirmText:"\uC2DC\uC791",cancelText:"\uCDE8\uC18C",placement:"bottom-start",onCancel:()=>d(null),onConfirm:()=>{p&&e.selectTarget(p.code),d(null)}}),i?l?st(ho,{sx:{minHeight:200,display:"flex",alignItems:"center",justifyContent:"center"},children:st(Bi,{})}):s?st(ho,{sx:{fontSize:15,color:"#c62828",py:2},children:s}):a?Ka(ho,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[a.summary?Ka(ho,{sx:{position:"relative",display:"flex",alignItems:"center",gap:2,px:1.5,pr:5,py:1.25,bgcolor:"#eef4ff",border:"1px solid #c7d7fe",borderRadius:1},children:[st(Bw,{title:"\uC694\uC57D \uBCF5\uC0AC",arrow:!0,children:st(Cw,{size:"small","aria-label":"\uC694\uC57D \uBCF5\uC0AC",onClick:e.copySummary,sx:{position:"absolute",top:4,right:4,color:"#64748b"},children:c?st(gu,{sx:{fontSize:18,color:"#2f9e5b"}}):st(Pg,{sx:{fontSize:18}})})}),st(_w,{sx:{fontSize:30,color:"#2563eb",flexShrink:0,mx:1.5}}),Ka(ho,{sx:{flex:1,minWidth:0},children:[st(ho,{sx:{fontSize:16,fontWeight:600,color:"#1e3a8a"},children:"AI \uBC88\uC5ED (Gemini) \xB7 \uC6D0\uBB38\uACFC \uB2E4\uB97C \uC218 \uC788\uC2B5\uB2C8\uB2E4"}),st(ho,{sx:{fontSize:15,color:"#111",mt:.25,lineHeight:1.5,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:a.summary})]})]}):null,st(ho,{sx:{fontSize:18,fontWeight:700,color:"#111",wordBreak:"break-word"},children:a.title}),a.html?st(ho,{sx:{fontSize:16,lineHeight:1.6,color:"#37352f",wordBreak:"break-word","& > p:first-of-type":{mt:0},"& > p:last-of-type":{mb:0},"& a[href]":{color:"#2563eb",textDecoration:"underline"},"& img":{maxWidth:"100%"}},dangerouslySetInnerHTML:{__html:a.html}}):st(ho,{sx:{fontSize:16,lineHeight:1.6,color:"#37352f",whiteSpace:"pre-wrap"},children:a.text})]}):null:Ka(ho,{sx:{display:"flex",flexDirection:"column",gap:1.5},children:[st(ho,{sx:{fontSize:18,fontWeight:700,color:"#111",wordBreak:"break-word"},children:t}),st(ho,{sx:{fontSize:16,lineHeight:1.6,color:"#37352f",wordBreak:"break-word","& > p:first-of-type":{mt:0},"& > p:last-of-type":{mb:0},"& a[href]":{color:"#2563eb",textDecoration:"underline"},"& img":{maxWidth:"100%"}},dangerouslySetInnerHTML:{__html:o||"<p></p>"}})]})]});return st(Iw,{open:n.isOpen,onClose:n.close,width:760,title:"\uB0B4\uC6A9 \uBC88\uC5ED",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-content-translate",maxContentHeight:"80vh",sectionContentPaddingTop:0,sections:[{id:"translate",showTitle:!1,children:f}],actions:{showCancelButton:!1,left:i&&a?st(Mg,{variant:"outlined",color:"inherit",startIcon:m?st(gu,{sx:{fontSize:18,color:"#2f9e5b"}}):st(Pg,{sx:{fontSize:18}}),onClick:e.copyResult,sx:{minWidth:80,color:"#37352f",borderColor:"#d9d9d6"},children:"\uBCF5\uC0AC"}):void 0,right:st(Mg,{variant:"contained",onClick:n.close,sx:{minWidth:80},children:"\uB2EB\uAE30"})}})}import{ConfirmActionPopper as oD}from"@ehfuse/mui-confirm-action";import{DatePicker as nD}from"@ehfuse/mui-datetime-picker";import{useState as ww}from"react";import{TextField as Dw}from"@ehfuse/mui-form-controls";import{jsx as Ew}from"react/jsx-runtime";function zg({value:e,onCommit:t,onDraftChange:o,readOnly:n=!1}){let[r,i]=ww(null);return Ew(Dw,{value:r??e,placeholder:n?"":"\uBE44\uACE0 \uC785\uB825",fullWidth:!0,size:"medium",slotProps:{input:{readOnly:n}},onChange:a=>{i(a.target.value),o?.(a.target.value)},onBlur:()=>{r!==null&&r.trim()!==e&&t(r),i(null)},onKeyDown:a=>{a.key==="Enter"&&a.target.blur(),a.key==="Escape"&&i(null)},sx:{mt:1}})}import{useMemo as hu,useState as Rw}from"react";import{Box as ao,Button as Ng,IconButton as Mw}from"@mui/material";import Pw from"@mui/icons-material/AccountTreeOutlined";import Ow from"@mui/icons-material/LinkOutlined";import qw from"@mui/icons-material/Close";import zw from"@mui/icons-material/RedoOutlined";function si(e){return e.relations??[]}function J8(e,t,o){return si(e).some(n=>n.type===o&&n.task_seq===t.seq)||si(t).some(n=>n.type===o&&n.task_seq===e.seq)}function Ag(e){return`${e.created_time??""}|${String(e.seq).padStart(12,"0")}`}function xu(e,t){let o=new Map(t.map(f=>[f.seq,f]));o.set(e.seq,e);let n=new Map,r=(f,g)=>{n.has(f)||n.set(f,new Set),n.has(g)||n.set(g,new Set),n.get(f).add(g),n.get(g).add(f)};for(let f of o.values())for(let g of si(f))g.type==="follow_up"&&o.has(g.task_seq)&&r(f.seq,g.task_seq);let i=new Set([e.seq]),a=[e.seq];for(;a.length>0;){let f=a.shift();for(let g of n.get(f)??[])i.has(g)||(i.add(g),a.push(g))}let l=[...i].map(f=>o.get(f)).filter(f=>!!f).sort((f,g)=>Ag(f).localeCompare(Ag(g))),s=new Set;for(let f of si(e))f.type==="related"&&s.add(f.task_seq);for(let f of o.values())f.seq!==e.seq&&si(f).some(g=>g.type==="related"&&g.task_seq===e.seq)&&s.add(f.seq);let m=[...s].map(f=>o.get(f)).filter(f=>f!==void 0&&f.seq!==e.seq),c=[...o.values()].filter(f=>f.seq!==e.seq&&si(f).some(g=>g.type==="duplicate_of"&&g.task_seq===e.seq)),p=si(e).find(f=>f.type==="duplicate_of")?.task_seq,d=p?o.get(p)??null:null,u=[...o.values()].filter(f=>f.seq!==e.seq&&(f.checklist??[]).some(g=>Number(g.task_seq??0)===e.seq));return{lineage:l,related:m,duplicates:c,duplicateOf:d,parents:u}}function bu(e,t){let o=xu(e,t);return(o.lineage.length>=2?o.lineage.length-1:0)+o.related.length+o.duplicates.length+(o.duplicateOf?1:0)+o.parents.length}function Lg(e,t){return bu(e,t)>0}import{ConfirmActionPopper as Aw}from"@ehfuse/mui-confirm-action";import{Fragment as Lw,jsx as pt,jsxs as bn}from"react/jsx-runtime";function Fs({item:e,caption:t,onOpen:o,onUnlink:n}){let r=e.is_notice||e.is_event?ze(e.icon||(e.is_notice?xt:Rt)):null;return bn(ao,{sx:{display:"flex",alignItems:"center",gap:.75,px:1.25,py:.5,borderRadius:1,"&:hover":{bgcolor:"#f7f7f5"},"&:hover .taskbox-relation-unlink":{opacity:1}},children:[t?pt(ao,{component:"span",sx:{flexShrink:0,px:.6,py:.1,borderRadius:.75,fontSize:11.5,fontWeight:500,color:"#8a6d1d",bgcolor:"#faf1d7"},children:t}):null,r?pt(r,{sx:{fontSize:16,flexShrink:0,color:e.icon_color||"#1e3a8a"}}):null,bn(ao,{component:"span",onClick:o,sx:{flex:1,minWidth:0,fontSize:14,color:e.completed?"#9a9a97":"#37352f",textDecoration:e.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...o?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[e.ticket_no?`${e.ticket_no} `:"",e.title]}),pt($e,{option:Mt(e),small:!0}),n?pt(Mw,{className:"taskbox-relation-unlink",size:"small","aria-label":"\uC5F0\uACB0 \uD574\uC81C",onClick:n,sx:{opacity:0,transition:"opacity 0.15s",color:"#9a9a97"},children:pt(qw,{sx:{fontSize:15}})}):null]})}function Fg({task:e,tasks:t,readOnly:o=!1,onOpenTask:n,onLink:r,onUnlink:i,onCreateFollowUp:a}){let l=Aa({onSubmit:(g,v)=>r?.(e.seq,g,v)}),[s,m]=Rw(null),c=hu(()=>xu(e,t),[e,t]),p=c.lineage.length>=2,d=hu(()=>bu(e,t),[e,t]),u=hu(()=>{let g=new Set;for(let v of c.lineage)g.add(v.seq);for(let v of c.related)g.add(v.seq);for(let v of c.duplicates)g.add(v.seq);for(let v of c.parents)g.add(v.seq);return c.duplicateOf&&g.add(c.duplicateOf.seq),[...g]},[c]),f=(g,v,D)=>{m({anchorEl:g,targetSeq:v,type:D})};return bn(jo,{icon:pt(Pw,{sx:{fontSize:19,display:"block"}}),title:bn(Lw,{children:["\uAD00\uB828 \uC5C5\uBB34",d>0?pt(ao,{component:"span",sx:{fontSize:12.5,color:"#9a9a97"},children:d}):null]}),titleExtra:o?null:bn(ao,{sx:{ml:"auto",display:"flex",alignItems:"center",gap:.5},children:[a?pt(Ng,{size:"small",color:"inherit",startIcon:pt(zw,{sx:{fontSize:16}}),onClick:()=>a(e.seq),sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uD6C4\uC18D \uC5C5\uBB34"}):null,r?pt(Ng,{size:"small",color:"inherit",startIcon:pt(Ow,{sx:{fontSize:16}}),onClick:l.openDialog,sx:{minWidth:0,px:1,fontSize:12.5,color:"#787774"},children:"\uC5F0\uACB0"}):null]}),children:[bn(ao,{sx:{display:"flex",flexDirection:"column",mt:.5,pl:3.25},children:[p?pt(ao,{sx:{mb:c.related.length||c.duplicates.length||c.duplicateOf?1:0},children:c.lineage.map((g,v)=>{let D=g.seq===e.seq,b=v===c.lineage.length-1;return bn(ao,{sx:{display:"flex",gap:1},children:[bn(ao,{sx:{display:"flex",flexDirection:"column",alignItems:"center",width:14,flexShrink:0,pt:1.1},children:[pt(ao,{sx:{width:D?9:7,height:D?9:7,borderRadius:"50%",bgcolor:D?"#2f80ed":g.completed?"#9a9a97":"#c9c8c5",flexShrink:0}}),b?null:pt(ao,{sx:{width:"2px",flex:1,bgcolor:"#e6e6e3"}})]}),bn(ao,{sx:{flex:1,minWidth:0,pb:b?0:.5},children:[bn(ao,{sx:{display:"flex",alignItems:"center",gap:.75},children:[bn(ao,{component:"span",onClick:!D&&n?()=>n(g.seq):void 0,sx:{minWidth:0,fontSize:14,fontWeight:D?600:400,color:D?"#2f80ed":g.completed?"#9a9a97":"#37352f",textDecoration:g.completed?"line-through":"none",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...!D&&n?{cursor:"pointer","&:hover":{color:"#2f80ed"}}:{}},children:[g.ticket_no?`${g.ticket_no} `:"",g.title]}),pt($e,{option:Mt(g),small:!0})]}),pt(ao,{sx:{fontSize:12,color:"#9a9a97"},children:g.completed&&g.completed_time?`${g.completed_time} \uC644\uB8CC`:g.created_time??""})]})]},g.seq)})}):null,c.parents.map(g=>pt(Fs,{item:g,caption:"\uC0C1\uC704 \uC5C5\uBB34",onOpen:n?()=>n(g.seq):void 0},`parent-${g.seq}`)),c.duplicateOf?pt(Fs,{item:c.duplicateOf,caption:"\uC6D0\uBCF8",onOpen:n?()=>n(c.duplicateOf.seq):void 0,onUnlink:!o&&i?g=>f(g.currentTarget,c.duplicateOf.seq,"duplicate_of"):void 0}):null,c.duplicates.map(g=>pt(Fs,{item:g,caption:"\uC911\uBCF5",onOpen:n?()=>n(g.seq):void 0,onUnlink:!o&&i?v=>f(v.currentTarget,g.seq,"duplicate_of"):void 0},`dup-${g.seq}`)),c.related.map(g=>pt(Fs,{item:g,onOpen:n?()=>n(g.seq):void 0,onUnlink:!o&&i?v=>f(v.currentTarget,g.seq,"related"):void 0},`rel-${g.seq}`)),d===0?pt(ao,{sx:{px:1.25,py:.75,fontSize:13.5,color:"#9a9a97"},children:"\uC5F0\uACB0\uB41C \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):null]}),r?pt(_s,{controller:l,task:e,tasks:t,excludeSeqs:u}):null,pt(Aw,{open:!!s,anchorEl:s?.anchorEl??null,title:"\uC774 \uC5C5\uBB34\uC640\uC758 \uC5F0\uACB0\uC744 \uD574\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uD574\uC81C",onCancel:()=>m(null),onConfirm:()=>{s&&i?.(e.seq,s.targetSeq,s.type),m(null)}})]})}import{Fragment as ko,jsx as L,jsxs as Ze}from"react/jsx-runtime";function Or({label:e="\uBE44\uC5B4 \uC788\uC74C"}){return L(tt,{component:"span",sx:{color:"#9a9a97"},children:e})}function Kg({task:e,customTabs:t,statusOptions:o,avatarSrcByName:n,onChangeStatus:r,onChangeLabels:i,onAddLabelOption:a,onChangeProject:l,onAddProject:s,onChangeDate:m,onChangeReminder:c,onMemberEdit:p,onChangePriority:d,onChangeVisibility:u,onChangeRepeat:f,departments:g=[],onChangeEventTime:v,onChangeEventPlace:D,onChangeEventAddress:b,onChangeNote:S,onChangeNoteDraft:h,onChangeContent:E,contentTemplates:y,onSaveContentTemplate:T,onRemoveContentTemplate:I,contentLoading:A=!1,onAddChecklistItem:q,onToggleChecklistItem:C,onRemoveChecklistItem:k,onUpdateChecklistItem:x,onReorderChecklist:B,onConvertChecklistToTask:w,onOpenChecklistTask:P,onLinkChecklistTask:H,resolveChecklistTask:_,relatedTasksPool:N,onOpenRelatedTask:G,onLinkRelatedTask:Q,onUnlinkRelatedTask:se,onCreateFollowUpTask:me,onAddAttachments:Y,onRemoveAttachment:O,onPreview:oe,onDownload:F,onUpdateComment:W,onRemoveComment:V,onToggleCommentReaction:U,currentUserName:de="",myAccountSeq:re=0,headerless:Te=!1,noticeAdmin:j=!1,hideProject:ne=!1,hideLabel:he=!1,showTitle:Ce=!1,onChangeTitle:_e,onToggleCompleted:Le,onChangeIcon:ct,onChangeIconColor:Ge,employees:Pe=[],onAckConfirm:Ne,onRequestConfirm:K,onChangeBugField:ae,sprints:We=[],sprintProject:Ft=!1,hideSprint:$o=!1,onChangeSprint:$t,onChangeStoryPoints:ie,onChangeResolution:Qe,onClaimTask:Ho,onVerifyBug:Co}){let[Ht,Hn]=Ao(null),Bo=Nw(!1),[wt,Z]=Ao(null),[z,Oe]=Ao(null),[Wt,Ve]=Ao(null),[$,X]=Ao(!1),fe={[gn]:$?{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"}},[De,rt]=Ao(null),[it,zt]=Ao(null),[Dt,Vt]=Ao(null),[to,Et]=Ao(null),[Wn,tn]=Ao(null),[fr,gr]=Ao(null),[ui,di]=Ao(null),Ee=!!e.is_notice,at=!!e.is_event,Wo=!!e.is_bug,ea=!!Ho&&Fl(e,re),{onReturnTask:pi,onReviewDone:fl,editPolicy:Ke,translateContent:Wr,contentTranslate:on}=ue(),ta=Te&&!!fl&&!!pi&&Qt(e,re),[Vr,xr]=Ao(null),Mo=!!(Wr&&on),br=fu({taskSeq:e.seq,translatedTargets:e.translated_targets??[]}),gc=!!Ho&&$l(e,re),oa=!!Co&&Wo&&!!e.completed&&re>0&&(e.author_account_seq??0)===re&&!(e.acks??[]).some(M=>M.account_seq===re),nn=!Cn(e,re),po=Sr(e,re,Ke),fo=!e.is_event&&(e.is_notice?re>0&&(e.author_account_seq??0)===re:(e.author_account_seq??0)===re||(e.manager_account_seq??0)===re),hr=e.is_notice||e.is_event?ze(e.icon||(e.is_notice?xt:Rt)):null,Ur=Ee?!Nl(e,re):nn,kr=ea||gc?Ze(Oo,{onClick:M=>di(M.currentTarget),children:[L(Jw,{sx:{fontSize:16,mr:.5}}),"\uAC00\uC838\uAC00\uAE30"]}):null,Vn=Ee?qs(e,Pe):"",Ut=Ee?ag(e,Pe,re):null,Xt=Ee?null:_r(e,re),gl=Eg(e.content??""),na=Rg(e.seq,!!(Xt?.canConfirm&&Ne),gl,()=>Ne?.(e.seq)),xc=Math.max(1,Math.ceil((1-na)*gl/1e3)),bc=!!(Xt&&Xt.total>0||Ee&&Ut),xl=(e.origin_license_seq??0)>0,bl=!Ee&&!xl,ra=Ze(ko,{children:[L(ve,{icon:L(Xw,{sx:{fontSize:17}}),label:"\uC791\uC131\uC790",sx:[qn(9),fe??null,...at?[]:[kt(1)]],children:e.created_by?Ze(ko,{children:[L(go,{names:[e.created_by],size:20,avatarSrcByName:n}),e.created_by]}):L(Or,{})}),L(ve,{icon:L(Wg,{sx:{fontSize:17}}),label:"\uC791\uC131\uC77C\uC2DC",sx:[qn(11),fe??null,...at?[]:[kt(2)]],children:e.created_time?Po(e.created_time):L(Or,{})})]});return Ze(ko,{children:[Ce?Ze(tt,{sx:{px:2,pt:2,pb:.5,display:"flex",alignItems:"flex-start",gap:1},children:[fo?L(Fw,{checked:e.completed,icon:L(Kw,{sx:{fontSize:22,color:"#9a9a97",opacity:.45}}),checkedIcon:L(yu,{sx:{fontSize:22,color:"#2f80ed"}}),onChange:(M,At)=>{z||Oe({anchorEl:M.currentTarget,nextCompleted:At})},sx:{p:0,mt:.25}}):null,hr?at&&!nn?L($g,{onClick:M=>Z(M.currentTarget),sx:{display:"flex",p:.25,mt:.1,borderRadius:1,color:e.icon_color||"#1e3a8a","&:hover":{bgcolor:"#f2f2f0"}},children:L(hr,{sx:{fontSize:20}})}):L(tt,{sx:{display:"flex",p:0,mt:.25,color:e.icon_color||(Ee?"#e5484d":"#1e3a8a")},children:L(hr,{sx:{fontSize:20}})}):null,L(tt,{sx:{flex:1,minWidth:0},children:Ht!==null?L(tt,{component:"div",contentEditable:!0,suppressContentEditableWarning:!0,spellCheck:!1,ref:M=>{if(!M||M.dataset.focused)return;M.dataset.focused="1",M.focus();let At=document.createRange();At.selectNodeContents(M),At.collapse(!1);let yn=window.getSelection();yn?.removeAllRanges(),yn?.addRange(At)},onBlur:M=>{let At=(M.currentTarget.textContent??"").replace(/\n/g," ").trim();!Bo.current&&At&&At!==e.title&&_e(e.seq,At),Bo.current=!1,Hn(null)},onKeyDown:M=>{M.key==="Enter"&&(M.preventDefault(),M.target.blur()),M.key==="Escape"&&(Bo.current=!0,M.target.blur())},onPaste:M=>{M.preventDefault();let At=M.clipboardData.getData("text/plain").replace(/\n/g," ");document.execCommand("insertText",!1,At)},sx:{outline:"none",fontSize:19,fontWeight:600,color:"#37352f",lineHeight:"26px",cursor:"text",textDecoration:e.completed?"line-through":"none",userSelect:"text",wordBreak:"break-word"},children:Ht}):L(tt,{onClick:po?void 0:()=>Hn(e.title),sx:{fontSize:19,fontWeight:600,color:"#37352f",lineHeight:"26px",cursor:po?"default":"text",textDecoration:e.completed?"line-through":"none",userSelect:"text",wordBreak:"break-word"},children:e.title})}),L(_o,{open:!!z,anchorEl:z?.anchorEl??null,nextCompleted:z?.nextCompleted??!1,returnMode:!!pi&&Qt(e,re),onCancel:()=>Oe(null),onConfirm:M=>{z&&(M&&pi?pi(e,M):Le(e.seq,z.nextCompleted)),Oe(null)}})]}):null,Ze(tt,{sx:{py:1.5,display:"flex",flexDirection:"column",gap:0,[gn]:{pb:0,"& > :last-child":{mb:0}}},children:[L(hs,{hideProject:ne,pinColumns:!0,projectColumn:!at&&!he?2:"full",values:{tabKey:e.tab_key??"",managerName:e.manager_name,receiverNames:e.receiver_names,startDate:e.start_date,dueDate:e.due_date,reminders:vn(e),priority:e.priority,eventTime:e.event_time??"",eventPlace:e.event_place??"",eventAddress:e.event_address??""},customTabs:t,avatarSrcByName:Wl(e,n),hideDueDate:!at&&!!e.repeat_rule,notice:Ee,event:at,readOnly:nn,coreLocked:po,targetSummary:Vn,onChangeProject:M=>l(e.seq,M),onAddProject:s,onChangeStartDate:M=>m(e.seq,"start_date",M),onChangeDueDate:M=>m(e.seq,"due_date",M),onChangeReminder:M=>c(e.seq,M),onChangePriority:M=>d(e.seq,M),onChangeEventTime:M=>v?.(e.seq,M),onChangeEventPlace:M=>D?.(e.seq,M),onChangeEventAddress:M=>b?.(e.seq,M),onMemberEdit:M=>p(e,M,null),narrowCollapsedSx:fe,reminderLocked:e.completed,managerAction:kr,supportOrigin:(e.origin_license_seq??0)>0?{licenseName:e.origin_license_name??"",authorName:e.origin_author_name||e.author_name||e.created_by||"",contactPhone:e.origin_contact_phone??"",contactEmail:e.origin_contact_email??"",supportType:jl(e.support_type??"")}:void 0,leading:Ze(ko,{children:[oa||kr&&(Ee||at)?Ze(tt,{sx:{gridColumn:"1 / -1",display:"flex",justifyContent:"flex-start",gap:2,px:2,py:1.5},children:[Ee||at?kr:null,oa?Ze(ko,{children:[L(ci,{variant:"contained",size:"large",onClick:()=>Co?.(e.seq,!0),sx:{bgcolor:"#2f80ed"},children:"\uAC80\uC99D\uC644\uB8CC"}),L(ci,{variant:"outlined",size:"large",color:"error",onClick:()=>Co?.(e.seq,!1),children:"\uC7AC\uC624\uD508"})]}):null]}):null,Wo&&e.ticket_no?L(ve,{icon:L(Ww,{sx:{fontSize:17}}),label:"\uD2F0\uCF13",sx:kt(1),children:L(tt,{component:"span",sx:{fontVariantNumeric:"tabular-nums"},children:e.ticket_no})}):null,at?null:L(tt,{sx:Wo&&e.ticket_no||bl||bc?kt(Wo&&e.ticket_no?2:1):{gridColumn:"1 / -1"},children:L(ve,{icon:L(Yw,{sx:{fontSize:17}}),label:"\uC0C1\uD0DC",onClick:nn||e.completed?void 0:M=>rt(M),children:L($e,{option:Mt(e)})})}),ta?Ze(ve,{icon:L(Vw,{sx:{fontSize:17}}),label:"\uAC80\uC218",sx:{gridColumn:"1 / -1"},children:[L(Oo,{onClick:M=>Oe({anchorEl:M.currentTarget,nextCompleted:!1}),children:"\uB418\uB3CC\uB9AC\uAE30"}),L(ci,{size:"small",variant:"contained",disableElevation:!0,onClick:M=>{M.stopPropagation(),xr(M.currentTarget)},sx:{ml:1,...Cr},children:"\uAC80\uC218\uC644\uB8CC"}),L(Br,{anchorEl:Vr,onCancel:()=>xr(null),onConfirm:()=>{fl?.(e),xr(null)}})]}):null,bl?(()=>{let M=ln(e),At=M==="all"?L(Ug,{sx:{fontSize:17,color:"#2f80ed"}}):M==="group"?L(Gg,{sx:{fontSize:17,color:"#d9730d"}}):L(Vg,{sx:{fontSize:17}}),yn=M==="all"?"\uC804\uCCB4\uACF5\uAC1C":M==="group"?`\uBD80\uC11C\uACF5\uAC1C \xB7 ${g.find(Gr=>Gr.seq===(e.visibility_group_seq??0))?.name??"\uBD80\uC11C"}`:"\uBE44\uACF5\uAC1C";return L(tt,{sx:at?void 0:kt(Wo?1:2),children:L(ve,{icon:At,label:"\uACF5\uAC1C",onClick:po||!u?void 0:Gr=>zt(Gr),children:yn})})})():null,!Wo&&!xl?L(tt,{sx:at?void 0:kt(1),children:L(ve,{icon:L(eD,{sx:{fontSize:17,...e.repeat_rule?{color:"#2f80ed"}:{}}}),label:"\uBC18\uBCF5",onClick:po||!f?void 0:M=>Vt(M),children:e.repeat_rule?Bl(e.repeat_rule):L(Or,{label:"\uC5C6\uC74C"})})}):null,!Wo&&e.repeat_rule?L(tt,{sx:at?void 0:kt(2),children:L(ve,{icon:L(tD,{sx:{fontSize:17}}),label:"\uBC18\uBCF5 \uC885\uB8CC",onClick:po||!f?void 0:M=>Et(M),children:e.repeat_until?`${e.repeat_until}\uAE4C\uC9C0`:L(Or,{})})}):null,Xt&&Xt.total>0?L(tt,{sx:at?void 0:kt(2),children:L(ve,{icon:L(Su,{sx:{fontSize:17}}),label:"\uD655\uC778",children:Xt.canConfirm?Ze(tt,{sx:{display:"inline-flex",alignItems:"center",gap:1,flexWrap:"wrap"},children:[L(ci,{size:"small",variant:"contained",onClick:()=>Ne?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",backgroundImage:`linear-gradient(to right, #1a5fc4 ${na*100}%, transparent ${na*100}%)`,boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}),Ze(tt,{component:"span",sx:{fontSize:14,color:"text.secondary",whiteSpace:"nowrap"},children:[xc,"\uCD08 \uB4A4 \uC790\uB3D9 \uD655\uC778"]})]}):Ze(ci,{size:"small",variant:"outlined",color:"inherit",startIcon:Xt.myTime?L(yu,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:M=>Ve({anchorEl:M.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:[Xt.count," / ",Xt.total]})})}):null,Ee&&Ut?L(tt,{sx:kt(2),children:L(ve,{icon:L(Su,{sx:{fontSize:17}}),label:"\uD655\uC778",children:L(tt,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:1,minWidth:0},children:Ut.canAck?L(ci,{size:"small",variant:"contained",onClick:()=>Ne?.(e.seq),sx:{py:.1,px:1.25,minWidth:0,color:"#fff",bgcolor:"#2f80ed",boxShadow:"none","&:hover":{bgcolor:"#1e6fd9",boxShadow:"none"}},children:"\uD655\uC778"}):L(ci,{size:"small",variant:"outlined",color:"inherit",startIcon:Ut.acked?L(yu,{sx:{fontSize:"16px !important",color:"#2f80ed"}}):null,onClick:M=>Ve({anchorEl:M.currentTarget,open:!0}),sx:{py:.1,px:1.25,minWidth:0,fontSize:13,color:"text.primary",borderColor:"#d5d8dc",bgcolor:"#fff",whiteSpace:"nowrap"},children:Ut.total>0&&Ut.count>=Ut.total?"\uC644\uB8CC":Ze(ko,{children:[Ut.count,L(tt,{component:"span",sx:{mx:.4},children:"/"}),Ut.total]})})})})}):null,Ft&&!$o&&!at&&!Ee?Ze(ko,{children:[L(ve,{icon:L(Uw,{sx:{fontSize:17}}),label:"\uBAA9\uD45C",onClick:po?void 0:M=>tn(M),sx:kt(1),children:(e.sprint_seq??0)>0?We.find(M=>M.seq===e.sprint_seq)?.name??"\uC0AD\uC81C\uB41C \uC2A4\uD504\uB9B0\uD2B8":L(Or,{label:"\uBBF8\uBC30\uC815"})}),L(ve,{icon:L(Gw,{sx:{fontSize:17}}),label:"\uD3EC\uC778\uD2B8",sx:kt(2),children:L(tr,{value:(e.story_points??0)>0?String(e.story_points):"",placeholder:"\uBBF8\uCD94\uC815",readOnly:po,onCommit:M=>ie?.(e.seq,Number(M.replace(/[^0-9.]/g,""))||0)})})]}):null,at||he?null:L(tt,{sx:[ne?{gridColumn:"1 / -1"}:kt(1),fe??null],children:L(ve,{icon:L(jw,{sx:{fontSize:17}}),label:"\uB77C\uBCA8",onClick:nn?void 0:M=>gr(M),children:(e.label_keys??[]).length>0?L(yr,{labelKeys:e.label_keys??[],labelOptions:o}):L(Or,{})})})]}),afterProject:at?null:ra,trailing:Ze(ko,{children:[Wo?L(ks,{values:{repro:e.bug_repro??"",device:e.bug_device??"",where:e.bug_where??"",version:e.bug_version??"",resolution:e.resolution??""},readOnly:po,showResolution:!!e.completed,onChangeRepro:M=>ae?.(e.seq,"bug_repro",M),onChangeDevice:M=>ae?.(e.seq,"bug_device",M),onChangeWhere:M=>ae?.(e.seq,"bug_where",M),onChangeVersion:M=>ae?.(e.seq,"bug_version",M),onChangeResolution:M=>Qe?.(e.seq,M)}):null,at?ra:null,e.completed?Ze(ko,{children:[L(ve,{icon:L(Su,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC790",sx:[qn(10),fe??null,...at?[]:[kt(1)]],children:e.completed_by?Ze(ko,{children:[L(go,{names:[e.completed_by],size:20,avatarSrcByName:n}),e.completed_by]}):L(Or,{})}),L(ve,{icon:L(Wg,{sx:{fontSize:17}}),label:"\uC644\uB8CC\uC77C\uC2DC",sx:[qn(12),fe??null,...at?[]:[kt(2)]],children:e.completed_time?Po(e.completed_time):L(Or,{})})]}):null]})}),Ze(tt,{sx:{display:"none",[gn]:{display:"block",mt:1.5,mb:0}},children:[L(mi,{sx:{borderColor:"#e6e6e3"}}),L($g,{onClick:()=>X(M=>!M),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:$?Ze(ko,{children:["\uC811\uAE30 ",L($w,{sx:{fontSize:18}})]}):Ze(ko,{children:["\uC815\uBCF4 \uB354\uBCF4\uAE30 ",L(Hw,{sx:{fontSize:18}})]})})]}),Ze(tt,{children:[L(mi,{sx:{my:1.5,borderColor:"#e6e6e3",[gn]:{mt:0,mb:1.25}}}),L(jo,{icon:L(Qw,{sx:{fontSize:18,display:"block"}}),title:"\uB0B4\uC6A9",titleExtra:L(vs,{content:e.content??"",templates:y??[],onApply:M=>E?.(e.seq,M),onSave:T,onRemove:I,readOnly:po||!y}),children:L(tt,{sx:{userSelect:"text"},children:A?L(tt,{sx:{minHeight:180,display:"flex",alignItems:"center",justifyContent:"center"},children:L(Bi,{})}):L(Ss,{syncKey:e.seq,value:e.content??"",readOnly:po,viewFirst:!0,onTranslate:Mo?br.openDialog:void 0,onChange:M=>E(e.seq,M)})})}),e.is_bug?null:Ze(ko,{children:[L(mi,{sx:{my:1.5,borderColor:"#e6e6e3"}}),L(jo,{icon:L(Zw,{sx:{fontSize:18,display:"block"}}),title:"\uBE44\uACE0",children:L(tt,{sx:{userSelect:"text"},children:L(zg,{value:e.note,readOnly:Ur,onCommit:M=>S(e.seq,M),onDraftChange:h?M=>h(e.seq,M):void 0})})})]}),at?null:Ze(ko,{children:[L(mi,{sx:{my:1.5,borderColor:"#e6e6e3"}}),L(ws,{taskSeq:e.seq,checklist:e.checklist??[],removeLocked:Ur,onAdd:q,onToggle:C,confirmOnToggle:!0,onRemove:k,onUpdate:x,onReorder:B,onConvertToTask:w,onOpenLinkedTask:P,resolveLinkedTask:_,myAccountSeq:re,linkCandidates:N,linkBaseTask:e,onLinkExistingTask:H})]}),N&&!at&&!Ee&&(!nn||Lg(e,N))?Ze(ko,{children:[L(mi,{sx:{my:1.5,borderColor:"#e6e6e3"}}),L(Fg,{task:e,tasks:N,readOnly:nn,onOpenTask:G,onLink:Q,onUnlink:se,onCreateFollowUp:me})]}):null,L(mi,{sx:{my:1.5,borderColor:"#e6e6e3"}}),L(Ms,{taskSeq:e.seq,attachments:e.attachments??[],removeLocked:Ee?Ur:po,onAdd:Y,onRemove:O,onPreview:oe?(M,At)=>oe({...M,taskSeq:e.seq},At?.map(yn=>({...yn,taskSeq:e.seq}))):void 0,onDownload:F?M=>F({...M,taskSeq:e.seq}):void 0})]}),L(mi,{sx:{my:1.5,borderColor:"#e6e6e3"}}),L(Bg,{taskSeq:e.seq,comments:e.comments??[],currentUserName:de,myAccountSeq:re,avatarSrcByName:n,onUpdate:W,onRemove:V,onToggleReaction:U,onPreview:oe?(M,At)=>oe({...M,taskSeq:e.seq},At?.map(yn=>({...yn,taskSeq:e.seq}))):void 0,onDownload:F?M=>F({...M,taskSeq:e.seq}):void 0})]}),Mo?L(qg,{controller:br,title:e.title,html:e.content??""}):null,L(hi,{anchorEl:De,value:e.status,options:Ee?fa:Wo?Yr:ga,onSelect:M=>r(e.seq,M),onClose:()=>rt(null)}),L(ku,{transitionDuration:0,anchorEl:Dt,open:!!Dt,onClose:()=>Vt(null),children:[{value:"",label:"\uC5C6\uC74C"},...ua].map(M=>L(Tu,{selected:(e.repeat_rule??"")===M.value,onClick:()=>{Vt(null),Hc(e,M.value,f)},sx:{fontSize:14,minWidth:140},children:M.label},M.value||"none"))}),L(nD,{anchorEl:to,open:!!to,onClose:()=>Et(null),selectedDate:e.repeat_until?new Date(`${e.repeat_until}T00:00:00`):new Date,onDateChange:M=>{Et(null),Wc(e,M,f)}}),L(ku,{transitionDuration:0,anchorEl:it,open:!!it,onClose:()=>zt(null),children:[{key:"involved",label:"\uBE44\uACF5\uAC1C",icon:L(Vg,{sx:{fontSize:17,color:"#57564f"}}),selected:ln(e)==="involved",onPick:()=>u?.(e.seq,"involved",0)},{key:"all",label:"\uC804\uCCB4\uACF5\uAC1C",icon:L(Ug,{sx:{fontSize:17,color:"#2f80ed"}}),selected:ln(e)==="all",onPick:()=>u?.(e.seq,"all",0)},...g.map(M=>({key:`group-${M.seq}`,label:`\uBD80\uC11C\uACF5\uAC1C \xB7 ${M.name}`,icon:L(Gg,{sx:{fontSize:17,color:"#d9730d"}}),selected:ln(e)==="group"&&(e.visibility_group_seq??0)===M.seq,onPick:()=>u?.(e.seq,"group",M.seq)}))].map(M=>Ze(Tu,{selected:M.selected,onClick:()=>{M.onPick(),zt(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[M.icon,M.label,M.selected?L(Hg,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},M.key))}),L(ku,{transitionDuration:0,anchorEl:Wn,open:!!Wn,onClose:()=>tn(null),children:[{seq:0,label:"\uBBF8\uBC30\uC815"},...We.filter(M=>`custom-${M.group_seq}`===String(e.tab_key??"")).map(M=>({seq:M.seq,label:Ko(M)}))].map(M=>Ze(Tu,{onClick:()=>{$t?.(e.seq,M.seq),tn(null)},sx:{fontSize:14,minWidth:170,gap:1},children:[M.label,(e.sprint_seq??0)===M.seq?L(Hg,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},M.seq))}),L(os,{anchorEl:Wt?.anchorEl??null,open:!!Wt?.open,acks:e.acks??[],total:Ut?.total??Xt?.total??0,pendingNames:Ut?.pendingNames??Xt?.pendingNames??[],avatarSrcByName:n,onRequestConfirm:K&&(Ut?Ut.count<Ut.total:Xt&&Xt.count<Xt.total)?()=>{K(e.seq),Ve(M=>M?{...M,open:!1}:null)}:void 0,onClose:()=>Ve(M=>M?{...M,open:!1}:null)}),L(Os,{anchorEl:fr,selectedKeys:e.label_keys??[],labelOptions:o,onToggle:M=>i(e.seq,Pl(e.label_keys??[],M)),onAddLabel:a,onClose:()=>gr(null)}),L(Ir,{anchorEl:wt,value:e.icon??"",color:e.icon_color??"",onSelect:M=>{ct(e.seq,M),Z(null)},onSelectColor:Ge?M=>Ge(e.seq,M):void 0,onClose:()=>Z(null)}),L(oD,{open:!!ui,anchorEl:ui,title:ea?"\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:()=>di(null),onConfirm:()=>{Ho?.(e.seq),di(null)}})]})}import{ConfirmActionPopper as xD}from"@ehfuse/mui-confirm-action";import{Fragment as bD,jsx as ot,jsxs as $i}from"react/jsx-runtime";function YU(){let e=new Date,t=o=>String(o).padStart(2,"0");return`${e.getFullYear()}-${t(e.getMonth()+1)}-${t(e.getDate())} ${t(e.getHours())}:${t(e.getMinutes())}`}function jU({open:e,task:t,onClose:o,onAddComment:n,onSaveFields:r,presentation:i="auto",myAccountSeq:a=0,onToggleCompleted:l,onChangeTitle:s,onChangeIcon:m,onChangeIconColor:c,activityItems:p,activityLoading:d,onLoadActivity:u,onPrint:f,onDelete:g,canDelete:v,...D}){let b=Ue(),{form:S,baseTask:h,task:E,hasPendingChanges:y,stagedBodyProps:T,changeTitle:I,changeIcon:A,changeIconColor:q}=Vc({open:e,task:t,isMobile:b,bodyProps:D,onSaveFields:r,onChangeTitle:s,onChangeIcon:m,onChangeIconColor:c}),C=Ua({taskSeq:E?.seq??0,items:p,loading:d,onLoad:u}),[k,x]=Yg(null),[B,w]=Yg(null),{editPolicy:P,shareText:H}=ue(),_=!!g&&(v??(h?!jr(h,a,P,!(a>0&&(h.author_account_seq??0)===a)):!1)),N=iD(null);if(rD(()=>{N.current?.scrollTo({top:0})},[t?.seq]),!h||!E)return null;let G=E,Q=b||i==="dialog",se=ot(Kg,{...T,headerless:Q,task:G,myAccountSeq:a,onChangeTitle:I,onToggleCompleted:l,onChangeIcon:A,onChangeIconColor:q,showTitle:b||i==="dialog"}),me=ot(vg,{onSubmit:(Y,O)=>n(G.seq,Y,O)},G.seq);return Q?$i(bD,{children:[ot(gD,{open:e,onClose:o,backdropClick:!y,locale:"ko",collapsibleTitle:!0,fontScale:{enabled:!0,default:1.1,min:.6},title:G.is_notice?"\uACF5\uC9C0\uC0AC\uD56D":G.is_event?"\uC77C\uC815":G.is_bug?"\uC624\uB958":"\uC5C5\uBB34",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1},custom:[...b?[{raw:!0,icon:ot(aD,{variant:"contained",size:"small",disableElevation:!0,disabled:!y,onClick:y?()=>{S.submit()}:void 0,sx:{ml:1.5,height:32,minWidth:64,px:1.75,py:0,borderRadius:1,fontSize:14,fontWeight:600,bgcolor:"#2f80ed","&:hover":{bgcolor:"#2f80ed"},"&.Mui-disabled":{bgcolor:"#f2f2f0",color:"#c9c8c5"}},children:"\uC800\uC7A5\uD558\uAE30"})}]:[],{raw:!0,icon:ot(sD,{size:"small","aria-label":"\uB354\uBCF4\uAE30",onClick:Y=>x(Y.currentTarget),children:ot(mD,{sx:{color:"#6b7280"}})})}]},fullScreen:b,maxWidth:b?void 0:"md",width:b?void 0:720,mobilePresentation:b?"slide":void 0,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:me},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:ot($s,{sx:{userSelect:"none",width:"100%",minWidth:0,display:"flex",flexDirection:"column",gap:0},children:se})}]},h.seq),$i(cD,{open:!!k,anchorEl:k,onClose:()=>x(null),anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:{zIndex:1500},children:[u?$i(vu,{onClick:()=>{x(null),C.openDialog()},children:[ot(Cu,{children:ot(pD,{fontSize:"small"})}),ot(Bu,{children:"\uD65C\uB3D9"})]}):null,$i(vu,{onClick:()=>{x(null),Ai(G,!0,H)},children:[ot(Cu,{children:ot(dD,{fontSize:"small"})}),ot(Bu,{children:"\uACF5\uC720\uD558\uAE30"})]}),_?$i(vu,{onClick:Y=>{let O=k??Y.currentTarget;x(null),w(O)},sx:{color:"#e5484d"},children:[ot(Cu,{children:ot(uD,{fontSize:"small",sx:{color:"#e5484d"}})}),ot(Bu,{children:"\uC0AD\uC81C"})]}):null]}),ot(xD,{open:!!B,anchorEl:B,title:"\uC774 \uC5C5\uBB34\uB97C \uD734\uC9C0\uD1B5\uC73C\uB85C \uBCF4\uB0B4\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uC0AD\uC81C",onCancel:()=>w(null),onConfirm:()=>{w(null),g?.(G)}}),ot(Ns,{controller:C})]}):ot(lD,{anchor:"right",open:e,onClose:o,"aria-label":"\uC5C5\uBB34 \uC0C1\uC138",disableAutoFocus:!0,disableEnforceFocus:!0,sx:{zIndex:Y=>Y.zIndex.modal},slotProps:{paper:{sx:{width:720,maxWidth:"100vw"}}},children:$i($s,{sx:{display:"flex",flexDirection:"column",height:"100%",userSelect:"none"},children:[ot(Dg,{task:G,myAccountSeq:a,onToggleCompleted:l,onChangeTitle:s,onChangeIcon:m,onChangeIconColor:c,onClose:o,activityItems:p,activityLoading:d,onLoadActivity:u,onPrint:f,onDelete:g,canDelete:v}),ot(jg,{sx:{borderColor:"#e6e6e3"}}),ot($s,{sx:{flex:1,minHeight:0},children:ot(fD,{ref:N,style:{height:"100%"},contentStyle:{minWidth:0},thumb:{width:6},children:se})}),ot(jg,{sx:{borderColor:"#37352f"}}),ot($s,{sx:{flexShrink:0},children:me})]})})}import{Box as To,Button as Du,IconButton as ex}from"@mui/material";import{FormDialog as tx}from"@ehfuse/mui-form-dialog";import DD from"@mui/icons-material/Add";import ED from"@mui/icons-material/DirectionsRunOutlined";import RD from"@mui/icons-material/EditOutlined";import{ClearTextField as ox,DateTextField as nx,LabelSelect as rx}from"@ehfuse/mui-form-controls";import{Box as ar,Button as kD,FormControlLabel as Iu,Radio as _u,RadioGroup as TD}from"@mui/material";import{FormDialog as yD}from"@ehfuse/mui-form-dialog";import{LabelSelect as SD}from"@ehfuse/mui-form-controls";import CD from"@ehfuse/overlay-scrollbar";import{useGlobalForm as hD}from"@ehfuse/forma";function Xg({open:e,sprint:t,remainingTasks:o,sprints:n,onClose:r,onConfirm:i}){let a=n.filter(c=>c.seq!==t?.seq&&c.group_seq===(t?.group_seq??0)&&c.status!=="closed"),l=o.length>0,s=hD({formId:we("taskbox-sprint-close-form"),initialValues:{mode:"backlog",moveToSeq:"0"},onValidate:c=>!(l&&c.mode==="move"&&!(Number(c.moveToSeq)>0)),onSubmit:c=>(i({mode:l?c.mode:"keep",moveToSprintSeq:c.mode==="move"&&Number(c.moveToSeq)||0,taskSeqs:o.map(p=>p.seq)}),!0)}),m={form:Zt({modalIdPrefix:"taskbox-sprint-close-dialog",open:e,onClose:r,onOpen:()=>s.setFormValues({mode:a.length>0?"move":"backlog",moveToSeq:String(a[0]?.seq??0)})})};return{form:s,modals:m,candidates:a,hasRemaining:l}}import{Fragment as BD,jsx as lo,jsxs as Hi}from"react/jsx-runtime";function Qg({open:e,sprint:t,remainingTasks:o,sprints:n,onClose:r,onConfirm:i}){let{form:a,modals:l,candidates:s,hasRemaining:m}=Xg({open:e,sprint:t,remainingTasks:o,sprints:n,onClose:r,onConfirm:i}),c=a.useFormValue("mode")??"backlog",p=Number(a.useFormValue("moveToSeq"))||0;return lo(yD,{open:l.form.isOpen,onClose:l.form.close,maxWidth:"sm",title:"\uBAA9\uD45C \uB9C8\uAC10",locale:"ko",backdropClick:!1,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-sprint-close",tabs:{visible:!1},actions:{showCancelButton:!0,right:lo(kD,{variant:"contained",onClick:()=>{a.submit()},disabled:m&&c==="move"&&!(p>0),children:"\uB9C8\uAC10"})},sections:[{id:"sprint-close",title:"",showTitle:!1,children:Hi(ar,{sx:{display:"flex",flexDirection:"column",gap:2},children:[Hi(ar,{sx:{fontSize:18,color:"#37352f"},children:[lo(ar,{component:"span",sx:{fontWeight:600},children:t?.name??""})," \uBAA9\uD45C\uB97C \uB9C8\uAC10\uD569\uB2C8\uB2E4."]}),m?Hi(BD,{children:[Hi(ar,{sx:{fontSize:15,color:"#6f6f6c"},children:["\uB05D\uB098\uC9C0 \uC54A\uC740 \uC5C5\uBB34\uAC00"," ",o.length,"\uAC74 \uC788\uC2B5\uB2C8\uB2E4. \uC5B4\uB5BB\uAC8C \uD560\uAE4C\uC694?"]}),lo(ar,{sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:lo(CD,{style:{maxHeight:220},thumb:{width:6},children:o.map(d=>Hi(ar,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1,borderBottom:"1px solid #f2f2f0","&:last-of-type":{borderBottom:"none"}},children:[lo(ar,{sx:{flex:1,minWidth:0,fontSize:16,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:d.title}),lo($e,{option:Mt(d)})]},d.seq))})}),Hi(TD,{value:c,onChange:(d,u)=>a.setFormValue("mode",u),children:[s.length>0?lo(Iu,{value:"move",control:lo(_u,{size:"small"}),label:"\uB2E4\uC74C \uBAA9\uD45C\uB85C \uC774\uC6D4",sx:{"& .MuiFormControlLabel-label":{fontSize:16}}}):null,c==="move"&&s.length>0?lo(ar,{sx:{pl:4,pb:1},children:lo(SD,{form:a,name:"moveToSeq",size:"small",label:"",fullWidth:!0,options:s.map(d=>({value:String(d.seq),label:d.name}))})}):null,lo(Iu,{value:"backlog",control:lo(_u,{size:"small"}),label:"\uBBF8\uBC30\uC815(\uBC31\uB85C\uADF8)\uC73C\uB85C \uBE7C\uAE30",sx:{"& .MuiFormControlLabel-label":{fontSize:16}}}),lo(Iu,{value:"keep",control:lo(_u,{size:"small"}),label:"\uC774 \uBAA9\uD45C\uC5D0 \uADF8\uB300\uB85C \uB450\uAE30",sx:{"& .MuiFormControlLabel-label":{fontSize:16}}})]})]}):lo(ar,{sx:{fontSize:15,color:"#6f6f6c"},children:"\uB0A8\uC740 \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. \uC774\uB300\uB85C \uB9C8\uAC10\uD558\uBA74 \uBAA9\uD45C\uAC00 \uC885\uB8CC\uB429\uB2C8\uB2E4."})]})}]})}var wu="custom-";function vD(e){return e.startsWith(wu)}function mG(e){return e>0?`${wu}${e}`:""}function hn(e){if(!vD(e))return 0;let t=Number(e.slice(wu.length));return Number.isInteger(t)&&t>0?t:0}import{useState as ID}from"react";import{useGlobalForm as _D,useModal as wD}from"@ehfuse/forma";import{ErrorAlert as Zg}from"@ehfuse/alerts";var Hs={editingSeq:0,name:"",goal:"",start_date:"",end_date:""};function Jg({open:e,customTabs:t,onClose:o,onCreate:n,onUpdate:r,onChangeStatus:i,tasks:a=[],onCloseSprint:l,onRemove:s}){let m=t.filter(S=>S.useSprints&&!S.archived),[c,p]=ID(null),d=c?a.filter(S=>(S.sprint_seq??0)===c.seq&&!S.completed):[],u=_D({formId:we("taskbox-sprint-form"),initialValues:{groupKey:"",...Hs},onValidate:S=>hn(S.groupKey)?String(S.name??"").trim()?!0:(Zg("\uBAA9\uD45C \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694."),!1):(Zg("\uBAA9\uD45C\uB97C \uB9CC\uB4E4 \uD504\uB85C\uC81D\uD2B8\uB97C \uC120\uD0DD\uD558\uC138\uC694."),!1),onSubmit:async S=>{let h={name:String(S.name).trim(),goal:String(S.goal??"").trim(),start_date:S.start_date??"",end_date:S.end_date??""};if(S.editingSeq>0)return r(S.editingSeq,h),f.form.close(),!0;let E=await n({group_seq:hn(S.groupKey),...h});return E&&f.form.close(),E}}),f={manage:Zt({modalIdPrefix:"taskbox-sprint-manage-dialog",open:e,onClose:o,onOpen:()=>u.setFormValues({groupKey:m.length===1?m[0].key:"",...Hs})}),form:wD({modalId:we("taskbox-sprint-form-dialog"),onClose:()=>u.setFormValues(Hs)})};return{form:u,modals:f,sprintTabs:m,closingSprint:c,remainingTasks:d,openCreateForm:()=>{u.setFormValues(Hs),f.form.open()},openEditForm:S=>{u.setFormValues({editingSeq:S.seq,groupKey:`custom-${S.group_seq}`,name:S.name,goal:S.goal,start_date:S.start_date,end_date:S.end_date}),f.form.open()},changeStatus:(S,h)=>{if(h==="closed"&&l){p(S);return}i(S.seq,h)},cancelCloseSprint:()=>p(null),confirmCloseSprint:S=>{c&&l?.(c.seq,S),p(null)},removeSprint:s}}import{Fragment as ax,jsx as Je,jsxs as qr}from"react/jsx-runtime";var MD=[{value:"planning",label:"\uACC4\uD68D\uC911"},{value:"active",label:"\uC9C4\uD589\uC911"},{value:"closed",label:"\uC885\uB8CC"}];function ix(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?e.slice(5).replace("-","."):"-"}function wG({open:e,customTabs:t,sprints:o,onClose:n,onCreate:r,onUpdate:i,onChangeStatus:a,tasks:l=[],onCloseSprint:s,onRemove:m}){let c=Jg({open:e,customTabs:t,onClose:n,onCreate:r,onUpdate:i,onChangeStatus:a,tasks:l,onCloseSprint:s,onRemove:m}),{form:p,modals:d,sprintTabs:u,closingSprint:f,remainingTasks:g}=c,v=Number(p.useFormValue("editingSeq"))||0,D=p.isSubmitting,b=new Map(t.map(h=>[hn(h.key),h.label])),S=Je(To,{children:u.length===0?Je(To,{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.'}):Je(ax,{children:Je(To,{children:o.length===0?qr(To,{sx:{py:4,display:"flex",flexDirection:"column",alignItems:"center",gap:2,color:"#9a9a97"},children:[Je(ED,{sx:{fontSize:48,color:"#d9d9d6"}}),Je(To,{sx:{fontSize:13.5},children:"\uB4F1\uB85D\uB41C \uBAA9\uD45C\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."})]}):o.map(h=>qr(To,{sx:{display:"flex",flexDirection:"column",gap:1,"&:not(:last-of-type)::after":{content:'""',display:"block",my:1.75,borderBottom:"1px solid #f0efed"}},children:[qr(To,{sx:{minWidth:0},children:[qr(To,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[Je(To,{component:"span",sx:{fontSize:18,fontWeight:600,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:h.name}),Je(To,{component:"span",sx:{flexShrink:0,px:1,py:.25,borderRadius:.75,bgcolor:"#f1f5f9",color:"#64748b",fontSize:13,fontWeight:500},children:b.get(h.group_seq)??"\uC0AD\uC81C\uB41C \uD504\uB85C\uC81D\uD2B8"}),qr(To,{component:"span",sx:{flexShrink:0,fontSize:14,color:"#57564f"},children:[ix(h.start_date)," ~"," ",ix(h.end_date)]})]}),h.goal?Je(To,{sx:{mt:.5,fontSize:14,color:"#787774",lineHeight:1.5},children:h.goal}):null]}),qr(To,{sx:{display:"flex",alignItems:"center",gap:.5},children:[Je(rx,{label:"\uC0C1\uD0DC",showLabel:!1,size:"small",value:h.status,options:MD.map(E=>({value:E.value,label:E.label})),onChange:E=>c.changeStatus(h,String(E.target.value)),sx:{width:104,flexShrink:0}}),Je(ex,{"aria-label":"\uBAA9\uD45C \uC218\uC815",onClick:()=>c.openEditForm(h),sx:{color:"#9a9a97","&:hover":{color:"#2563eb"}},children:Je(RD,{sx:{fontSize:18}})}),Je(ex,{"aria-label":"\uBAA9\uD45C \uC0AD\uC81C",onClick:()=>c.removeSprint(h.seq),sx:{color:"#9a9a97","&:hover":{color:"#e5484d"}},children:Je(Gt,{style:{width:16,height:16}})})]})]},h.seq))})})});return qr(ax,{children:[Je(tx,{open:d.manage.isOpen,onClose:d.manage.close,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:S}],sectionContentPaddingTop:0,actions:{showCancelButton:!0,left:u.length>0?Je(Du,{startIcon:Je(DD,{}),onClick:c.openCreateForm,sx:{color:"#2563eb"},children:"\uC0C8 \uBAA9\uD45C"}):void 0,right:Je(Du,{variant:"contained",onClick:d.manage.close,children:"\uD655\uC778"})}}),Je(Qg,{open:f!==null,sprint:f,remainingTasks:g,sprints:o,onClose:c.cancelCloseSprint,onConfirm:c.confirmCloseSprint}),Je(tx,{open:d.form.isOpen,onClose:d.form.close,maxWidth:"sm",title:v>0?"\uBAA9\uD45C \uC218\uC815":"\uC0C8 \uBAA9\uD45C",locale:"ko",backdropClick:!1,tabs:{visible:!1},titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-sprint-form",sections:[{id:"sprint-form",title:"",showTitle:!1,children:Je(To,{sx:{pt:1},children:qr(To,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:2.5,mt:1},children:[Je(rx,{form:p,name:"groupKey",label:"\uD504\uB85C\uC81D\uD2B8",size:"medium",options:u.map(h=>({value:h.key,label:h.label})),disabled:v>0}),Je(ox,{form:p,name:"name",label:"\uBAA9\uD45C \uC774\uB984",size:"medium",placeholder:"\uC608: 8\uC6D4 2\uC8FC\uCC28"}),Je(nx,{form:p,name:"start_date",size:"medium",label:"\uC2DC\uC791\uC77C"}),Je(nx,{form:p,name:"end_date",size:"medium",label:"\uC885\uB8CC\uC77C"}),Je(ox,{form:p,name:"goal",label:"\uC124\uBA85",size:"medium",placeholder:"\uC120\uD0DD \uC785\uB825",sx:{gridColumn:"1 / -1"}})]})})}],actions:{showCancelButton:!0,right:Je(Du,{variant:"contained",onClick:()=>{p.submit()},disabled:D,children:v>0?"\uC218\uC815":"\uBAA9\uD45C \uB9CC\uB4E4\uAE30"})}})]})}import{Box as Tt,Button as Vs,FormControlLabel as sx,Switch as cx}from"@mui/material";import{FormDialog as LD}from"@ehfuse/mui-form-dialog";import ND from"@mui/icons-material/LinkOutlined";import FD from"@mui/icons-material/LinkOffOutlined";import $D from"@mui/icons-material/SyncOutlined";import HD from"@mui/icons-material/ArrowForward";import{useRef as AD}from"react";import{useCallback as PD,useEffect as OD,useRef as Ya}from"react";import{useModal as qD}from"@ehfuse/forma";var Ws=[];function zD(){let e=Ws;if(Ws=[],e.length!==0){if(e.length===1){e[0].close();return}for(let t of e)window.dispatchEvent(new CustomEvent(`modal:close:${t.modalId}`));window.addEventListener("popstate",t=>t.stopImmediatePropagation(),{capture:!0,once:!0}),window.history.go(-e.length)}}function Xo({modalId:e,open:t,onClose:o,onOpen:n}){let r=Ya(n);r.current=n;let i=Ya(o);i.current=o;let a=Ya(t);a.current=t;let l=Ya(!1),s=qD({modalId:e,onClose:()=>{l.current=!1,a.current&&i.current()}}),m=Ya(s);m.current=s;let c=PD(()=>{l.current||!m.current.isOpen||(l.current=!0,m.current.close())},[]);return OD(()=>{if(t){r.current?.(),m.current.open();return}!m.current.isOpen||l.current||(l.current=!0,Ws.push({modalId:m.current.modalId,close:()=>m.current.close()}),Ws.length===1&&queueMicrotask(zD))},[t]),{...s,close:c}}function lx(e){let t=AD(e);t.current=e;let o={link:Xo({modalId:we("taskbox-calendar-link"),open:e.open,onClose:()=>t.current.onClose()})},{status:n}=e.googleApi,{calendarName:r}=ue(),i=n.linked&&n.calendar_name||r||"\uC5C5\uBB34\uD568",a={connect:()=>t.current.googleApi.onConnect(),disconnect:()=>t.current.googleApi.onDisconnect(),toggleExport:l=>t.current.googleApi.onToggleExport(l),toggleImport:l=>t.current.googleApi.onToggleImport(l),resync:()=>t.current.googleApi.onResync?.()};return{modals:o,status:n,busy:!!e.googleApi.busy,canResync:!!e.googleApi.onResync,calendarName:i,actions:a}}import{Fragment as VD,jsx as je,jsxs as jt}from"react/jsx-runtime";function mx({from:e,to:t}){return jt(Tt,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.5},children:[e,je(HD,{sx:{fontSize:16,color:"#787774"}}),t]})}function WD({size:e=28}){return jt(Tt,{component:"svg",viewBox:"0 0 48 48","aria-hidden":!0,sx:{width:e,height:e,flexShrink:0,mx:1},children:[je("path",{fill:"#EA4335",d:"M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z"}),je("path",{fill:"#4285F4",d:"M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z"}),je("path",{fill:"#FBBC05",d:"M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z"}),je("path",{fill:"#34A853",d:"M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z"})]})}function GG(e){let t=lx(e),{status:o,busy:n,calendarName:r,actions:i}=t,a=t.modals.link,l=jt(Tt,{sx:{display:"flex",flexDirection:"column",gap:"24px"},children:[jt(Tt,{sx:{bgcolor:"#f2f6fa",borderRadius:1,px:1.5,py:1.25,fontSize:15,lineHeight:1.8,color:"#37352f",display:"flex",flexDirection:"column",gap:.25,"& > div":{display:"flex",gap:1},"& > div::before":{content:'"\u2022"',flexShrink:0}},children:[je(Tt,{children:jt(Tt,{component:"span",children:[je("b",{children:"\uB0B4\uBCF4\uB0B4\uAE30"}),"\uB294 \uB0B4 \uC5C5\uBB34\uB97C \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC758"," ",jt("b",{children:['"',r,'"']})," \uCE98\uB9B0\uB354\uC5D0 \uBC14\uB85C \uBC18\uC601\uD569\uB2C8\uB2E4."]})}),je(Tt,{children:jt(Tt,{component:"span",children:[je("b",{children:"\uAC00\uC838\uC624\uAE30"}),"\uB294 \uAD6C\uAE00 \uAE30\uBCF8 \uCE98\uB9B0\uB354 \uC77C\uC815\uC744 \uC5C5\uBB34\uD568\uC5D0 \uBCF4\uC5EC\uC8FC\uACE0, \uC5C5\uBB34\uD568\uC5D0\uC11C \uADF8 \uC77C\uC815\uC744 \uACE0\uCE58\uAC70\uB098 \uC9C0\uC6B8 \uC218 \uC788\uC2B5\uB2C8\uB2E4."]})}),je(Tt,{children:jt(Tt,{component:"span",children:['"',r,'" \uCE98\uB9B0\uB354 \uC77C\uC815\uC740 \uC5C5\uBB34\uD568\uC5D0\uC11C \uC218\uC815\uD574\uC57C \uD569\uB2C8\uB2E4.']})})]}),o.configured?jt(Tt,{sx:{border:"1px solid #e6e6e3",borderRadius:1,pl:2,pr:3,py:1.75,display:"flex",flexDirection:"column",gap:1.25},children:[jt(Tt,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[je(WD,{}),jt(Tt,{sx:{flex:1,minWidth:0},children:[je(Tt,{sx:{fontSize:18,color:"#111",fontWeight:700},children:"\uAD6C\uAE00 \uACC4\uC815 \uC5F0\uACB0"}),je(Tt,{sx:{fontSize:15,color:"#111",mt:.5,lineHeight:1.6},children:o.linked?jt(VD,{children:[jt(Tt,{component:"span",sx:{display:"block",fontWeight:600},children:[o.google_email||"\uAD6C\uAE00 \uACC4\uC815"," ","\uC5D0 \uC5F0\uACB0\uB428"]}),jt(Tt,{component:"span",sx:{display:"block"},children:['\uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0 "',r,'" \uCE98\uB9B0\uB354\uAC00 \uB9CC\uB4E4\uC5B4\uC84C\uC2B5\uB2C8\uB2E4.']})]}):`\uAD6C\uAE00 \uACC4\uC815\uC744 \uC5F0\uACB0\uD558\uBA74 \uB0B4 \uC5C5\uBB34\uAC00 \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC758 "${r}" \uCE98\uB9B0\uB354\uC5D0 \uBC14\uB85C \uBC18\uC601\uB429\uB2C8\uB2E4.`}),o.last_error?jt(Tt,{sx:{fontSize:13,color:"#c62828",mt:.5},children:["\uCD5C\uADFC \uC624\uB958: ",o.last_error]}):null]}),o.linked?je(Vs,{size:"small",variant:"outlined",color:"inherit",disabled:n,startIcon:je(FD,{sx:{fontSize:18}}),onClick:i.disconnect,sx:{flexShrink:0,whiteSpace:"nowrap",ml:2},children:"\uC5F0\uACB0 \uD574\uC81C"}):je(Vs,{size:"small",variant:"contained",disableElevation:!0,disabled:n,startIcon:je(ND,{sx:{fontSize:18}}),onClick:i.connect,sx:{flexShrink:0,whiteSpace:"nowrap",bgcolor:"#2563eb",ml:2},children:"\uC5F0\uACB0\uD558\uAE30"})]}),o.linked?jt(Tt,{sx:{display:"flex",alignItems:"center",gap:2,flexWrap:"wrap",pl:4.5},children:[je(sx,{control:je(cx,{size:"small",checked:o.export_enabled,disabled:n,onChange:(s,m)=>i.toggleExport(m)}),label:jt(Tt,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.5},children:["\uB0B4\uBCF4\uB0B4\uAE30 (",je(mx,{from:"\uC5C5\uBB34\uD568",to:"\uAD6C\uAE00"}),")"]}),sx:{m:0,"& .MuiFormControlLabel-label":{fontSize:14,color:"#37352f"}}}),je(sx,{control:je(cx,{size:"small",checked:o.import_enabled,disabled:n,onChange:(s,m)=>i.toggleImport(m)}),label:jt(Tt,{component:"span",sx:{display:"inline-flex",alignItems:"center",gap:.5},children:["\uAC00\uC838\uC624\uAE30 (",je(mx,{from:"\uAD6C\uAE00",to:"\uC5C5\uBB34\uD568"}),")"]}),sx:{m:0,"& .MuiFormControlLabel-label":{fontSize:14,color:"#37352f"}}}),t.canResync?je(Vs,{size:"small",color:"inherit",disabled:n||!o.export_enabled,startIcon:je($D,{sx:{fontSize:18}}),onClick:i.resync,sx:{ml:"auto",whiteSpace:"nowrap"},children:"\uC804\uCCB4 \uB2E4\uC2DC \uB0B4\uBCF4\uB0B4\uAE30"}):null]}):null]}):je(Tt,{sx:{fontSize:14,color:"#8a6d1d",lineHeight:1.7},children:"\uC11C\uBC84\uC5D0 \uAD6C\uAE00 \uC5F0\uB3D9 \uC124\uC815(\uD074\uB77C\uC774\uC5B8\uD2B8 ID/\uBE44\uBC00\uBC88\uD638)\uC774 \uC5C6\uC5B4 \uC5F0\uACB0\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uAD00\uB9AC\uC790\uC5D0\uAC8C \uBB38\uC758\uD558\uC138\uC694."})]});return je(LD,{open:a.isOpen,onClose:a.close,width:680,title:"\uCE98\uB9B0\uB354 \uC5F0\uB3D9",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-calendar-link",sectionContentPaddingTop:0,sections:[{id:"calendar-link",showTitle:!1,children:l}],actions:{showCancelButton:!1,right:je(Vs,{variant:"contained",onClick:a.close,sx:{minWidth:80},children:"\uB2EB\uAE30"})}})}import{useState as Gs}from"react";import YD from"@mui/icons-material/OpenInNewOutlined";import{Box as zr,Button as Eu,ButtonBase as jD,FormControlLabel as XD,Switch as QD}from"@mui/material";import{FormDialog as ZD}from"@ehfuse/mui-form-dialog";import{ClearTextField as Ru}from"@ehfuse/mui-form-controls";import{DatePicker as fx,TimePicker as gx}from"@ehfuse/mui-datetime-picker";import xx from"@mui/icons-material/CalendarMonthOutlined";import bx from"@mui/icons-material/AccessTimeOutlined";import{useEffect as UD,useRef as Us}from"react";import{useGlobalForm as GD}from"@ehfuse/forma";import{ErrorAlert as ux}from"@ehfuse/alerts";var KD={title:"",allDay:!0,startDate:"",endDate:"",startTime:"09:00",endTime:"10:00",location:"",description:""};function dx(e,t){let[o,n]=e.split(":").map(Number),r=((o*60+n+t)%1440+1440)%1440,i=a=>String(a).padStart(2,"0");return`${i(Math.floor(r/60))}:${i(r%60)}`}function px(e){let t=Us(e);t.current=e;let o=Us(null);e.event&&(o.current=e.event);let n=e.event??o.current,r=n?.editable===!1,i=Us(r);i.current=r;let a=Us(!!e.onDelete);e.open&&(a.current=!!e.onDelete);let l=GD({formId:we("taskbox-google-event-form"),initialValues:KD,onValidate:c=>t.current.busy||i.current?!1:c.title.trim()?c.startDate?!0:(ux("\uC2DC\uC791\uC77C\uC744 \uC120\uD0DD\uD558\uC138\uC694."),!1):(ux("\uC81C\uBAA9\uC744 \uC785\uB825\uD558\uC138\uC694."),!1),onSubmit:c=>{let p=c.endDate&&c.endDate>=c.startDate?c.endDate:c.startDate;return t.current.onSave({title:c.title.trim(),start_date:c.startDate,end_date:p,time:c.allDay?"":c.startTime,end_time:c.allDay?"":c.endTime,location:c.location.trim(),description:c.description.trim()}),!0}}),s={event:Xo({modalId:we("taskbox-google-event"),open:e.open,onClose:()=>t.current.onClose()})};UD(()=>{let c=e.event;if(!e.open||!c)return;let p=!!c.time;l.setFormValues({title:c.title==="(\uC81C\uBAA9 \uC5C6\uC74C)"?"":c.title,allDay:!p,startDate:c.start_date,endDate:c.end_date||c.start_date,startTime:p?c.time:"09:00",endTime:p?c.end_time||dx(c.time,60):"10:00",location:c.location??"",description:c.description??""})},[e.open,e.event]);let m={changeStartDate:c=>{let p=String(l.getFormValue("endDate")??"");l.setFormValue("startDate",c),(!p||p<c)&&l.setFormValue("endDate",c)},changeEndDate:c=>l.setFormValue("endDate",c),changeStartTime:c=>{let p=l.getFormValues();l.setFormValue("startTime",c),p.startDate===p.endDate&&p.endTime<=c&&l.setFormValue("endTime",dx(c,60))},changeEndTime:c=>l.setFormValue("endTime",c),changeAllDay:c=>l.setFormValue("allDay",c),remove:()=>t.current.onDelete?.()};return{form:l,modals:s,event:n,readOnly:r,busy:!!e.busy,canDelete:a.current,actions:m}}import{jsx as nt,jsxs as Wi}from"react/jsx-runtime";function hx(e){if(!/^\d{4}-\d{2}-\d{2}$/.test(e))return e||"\uB0A0\uC9DC \uC120\uD0DD";let[t,o,n]=e.split("-").map(Number),r=["\uC77C","\uC6D4","\uD654","\uC218","\uBAA9","\uAE08","\uD1A0"][new Date(t,o-1,n).getDay()];return`${t}.${String(o).padStart(2,"0")}.${String(n).padStart(2,"0")} (${r})`}function Mu(e){return/^\d{4}-\d{2}-\d{2}$/.test(e)?new Date(`${e}T00:00:00`):new Date}function kx(e){let t=o=>String(o).padStart(2,"0");return`${e.getFullYear()}-${t(e.getMonth()+1)}-${t(e.getDate())}`}function Tx(e){let t=/^(\d{2}):(\d{2})$/.exec(e);return t?{hour:t[1],minute:t[2]}:{hour:"09",minute:"00"}}function JD(e){switch(e){case"fromGmail":return"Gmail \uC5D0\uC11C \uC790\uB3D9 \uB4F1\uB85D\uB41C \uC77C\uC815(\uD56D\uACF5\uAD8C\xB7\uC608\uC57D \uB4F1)";case"birthday":return"\uC0DD\uC77C \uC77C\uC815";case"outOfOffice":return"\uBD80\uC7AC\uC911 \uC77C\uC815";case"focusTime":return"\uC9D1\uC911 \uC2DC\uAC04 \uC77C\uC815";case"workingLocation":return"\uADFC\uBB34 \uC704\uCE58 \uC77C\uC815";default:return"\uC774 \uC885\uB958\uC758 \uC77C\uC815"}}function eE(e){let[t,o,n]=e.split("-").map(Number);window.open(`https://calendar.google.com/calendar/r/day/${t}/${o}/${n}`,"_blank")}function Ks({icon:e,label:t,placeholder:o,disabled:n,onClick:r}){return Wi(jD,{disabled:n,onClick:i=>r(i.currentTarget),sx:{display:"flex",alignItems:"center",gap:.75,px:1.25,py:.9,borderRadius:1,border:"1px solid #d9d9d6",bgcolor:n?"#f7f7f5":"#fff",color:t?"#37352f":"#9b9a97",fontSize:15,fontWeight:500,minWidth:0,whiteSpace:"nowrap","&:hover":{bgcolor:"#f7f7f5"},"&.Mui-disabled":{color:"#b9b8b4"}},children:[e,t||o]})}function uK(e){let t=Ue(),o=px(e),{form:n,event:r,readOnly:i,busy:a,actions:l}=o,s=o.modals.event,m=!!n.useValue("allDay"),c=String(n.useValue("startDate")??""),p=String(n.useValue("endDate")??""),d=String(n.useValue("startTime")??""),u=String(n.useValue("endTime")??""),[f,g]=Gs(null),[v,D]=Gs(null),[b,S]=Gs(null),[h,E]=Gs(null),y=r?Wi(zr,{sx:{display:"flex",flexDirection:"column",gap:2.25,pt:.5},children:[nt(zr,{sx:{bgcolor:i?"#fff4e5":"#f2f6fa",borderRadius:1,px:1.5,py:1,fontSize:14.5,lineHeight:1.7,color:"#37352f"},children:i?`${JD(r.event_type)}\uC740 \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0\uC11C\uB9CC \uC218\uC815\xB7\uC0AD\uC81C\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4.`:`${r.calendar||"\uAD6C\uAE00 \uCE98\uB9B0\uB354"} \uC758 \uC77C\uC815\uC785\uB2C8\uB2E4. \uC800\uC7A5\uD558\uBA74 \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0 \uBC14\uB85C \uBC18\uC601\uB429\uB2C8\uB2E4.${r.recurring?" \uBC18\uBCF5 \uC77C\uC815\uC774\uB77C \uC774 \uD68C\uCC28\uB9CC \uBC14\uB01D\uB2C8\uB2E4.":""}`}),nt(Ru,{label:"\uC81C\uBAA9",name:"title",form:n,disabled:i,onKeyDown:T=>{T.key==="Enter"&&(T.preventDefault(),n.submit())},fullWidth:!0,autoFocus:!t&&!i}),nt(XD,{control:nt(QD,{checked:m,disabled:i,onChange:(T,I)=>l.changeAllDay(I),size:"small"}),label:"\uC885\uC77C",sx:{ml:0,"& .MuiFormControlLabel-label":{fontSize:15,color:"#37352f"}}}),Wi(zr,{sx:{display:"flex",flexDirection:"column",gap:1.25},children:[Wi(zr,{sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"wrap"},children:[nt(zr,{sx:{width:44,fontSize:14.5,color:"#57564f",flexShrink:0},children:"\uC2DC\uC791"}),nt(Ks,{icon:nt(xx,{sx:{fontSize:18,color:"#787774"}}),label:hx(c),placeholder:"\uB0A0\uC9DC \uC120\uD0DD",disabled:i,onClick:g}),m?null:nt(Ks,{icon:nt(bx,{sx:{fontSize:18,color:"#787774"}}),label:d,placeholder:"\uC2DC\uAC01",disabled:i,onClick:S})]}),Wi(zr,{sx:{display:"flex",alignItems:"center",gap:1,flexWrap:"wrap"},children:[nt(zr,{sx:{width:44,fontSize:14.5,color:"#57564f",flexShrink:0},children:"\uC885\uB8CC"}),nt(Ks,{icon:nt(xx,{sx:{fontSize:18,color:"#787774"}}),label:hx(p),placeholder:"\uB0A0\uC9DC \uC120\uD0DD",disabled:i,onClick:D}),m?null:nt(Ks,{icon:nt(bx,{sx:{fontSize:18,color:"#787774"}}),label:u,placeholder:"\uC2DC\uAC01",disabled:i,onClick:E})]})]}),nt(Ru,{label:"\uC7A5\uC18C",name:"location",form:n,disabled:i,fullWidth:!0}),nt(Ru,{label:"\uC124\uBA85",name:"description",form:n,disabled:i,fullWidth:!0,multiline:!0,minRows:3,maxRows:8}),nt(fx,{anchorEl:f,open:!!f,onClose:()=>g(null),selectedDate:Mu(c),onDateChange:T=>{l.changeStartDate(kx(T)),g(null)},centered:t,locale:"ko"}),nt(fx,{anchorEl:v,open:!!v,onClose:()=>D(null),selectedDate:Mu(p||c),minDate:c?Mu(c):void 0,onDateChange:T=>{l.changeEndDate(kx(T)),D(null)},centered:t,locale:"ko"}),nt(gx,{anchorEl:b,open:!!b,onClose:()=>S(null),value:Tx(d),format:"HH:mm",minuteStep:5,autoApply:!0,centered:t,locale:"ko",onChange:(T,I)=>{l.changeStartTime(`${T}:${I}`),S(null)}}),nt(gx,{anchorEl:h,open:!!h,onClose:()=>E(null),value:Tx(u),format:"HH:mm",minuteStep:5,autoApply:!0,centered:t,locale:"ko",onChange:(T,I)=>{l.changeEndTime(`${T}:${I}`),E(null)}})]}):null;return nt(ZD,{open:s.isOpen,onClose:s.close,width:520,title:"\uAD6C\uAE00 \uC77C\uC815",locale:"ko",tabs:{visible:!1},titleIcons:{delete:{visible:!i&&o.canDelete,confirmConfig:{title:r?.recurring?"\uC774 \uD68C\uCC28\uB97C \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0\uC11C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?":"\uC774 \uC77C\uC815\uC744 \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0\uC11C \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?",confirmText:"\uC0AD\uC81C"}}},onDelete:l.remove,fontScale:{enabled:!0},fontScaleKey:"taskbox-google-event",sectionContentPaddingTop:0,sections:[{id:"google-event",showTitle:!1,children:y}],actions:{showCancelButton:!i,right:i?Wi(zr,{sx:{display:"flex",gap:"1rem",alignItems:"center"},children:[nt(Eu,{variant:"outlined",startIcon:nt(YD,{}),onClick:()=>r&&eE(r.start_date),children:"\uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0\uC11C \uC5F4\uAE30"}),nt(Eu,{variant:"contained",onClick:s.close,sx:{minWidth:72},children:"\uB2EB\uAE30"})]}):nt(Eu,{variant:"contained",onClick:()=>{n.submit()},disabled:a,children:"\uC800\uC7A5"})}})}import{useMemo as Cx,useState as iE}from"react";import{Box as ja,Button as aE,Typography as lE}from"@mui/material";import{FormDialog as sE}from"@ehfuse/mui-form-dialog";import{SearchTextField as cE}from"@ehfuse/mui-form-controls";import{TreeView as mE}from"@ehfuse/tree-view";import{useMemo as tE,useRef as yx}from"react";import{useFormaState as oE,useGlobalForm as nE}from"@ehfuse/forma";function rE(e){let t=[],o=n=>{for(let r of n.employees??[])t.push(r);for(let r of n.groups??[])o(r)};for(let n of e)o(n);return t}function Sx(e){let t=yx(e);t.current=e;let o=tE(()=>rE(e.groups),[e.groups]),n=yx(o);n.current=o;let r=oE({openCount:0}),i=nE({formId:we("taskbox-employee-select-form"),initialValues:{selectedSeqs:[]},onSubmit:s=>{let m=n.current.filter(c=>s.selectedSeqs.includes(c.seq));return t.current.onConfirm(t.current.multiple?m:m.slice(0,1)),t.current.onClose(),!0}}),a={select:Xo({modalId:we("taskbox-employee-select"),open:e.open,onClose:()=>t.current.onClose(),onOpen:()=>{i.setFormValues({selectedSeqs:t.current.selectedSeqs}),r.setValue("openCount",Number(r.getValue("openCount")??0)+1)}})};return{form:i,modals:a,ui:r,allEmployees:o,changeSelection:s=>i.setFormValue("selectedSeqs",s)}}import{Fragment as gE,jsx as kn,jsxs as xE}from"react/jsx-runtime";function Bx(e){return`${e.name}#${e.seq}`}function uE(e){return Number(e.slice(e.lastIndexOf("#")+1))||0}function dE(e,t){return t?[e.name,e.department,e.role_name,e.work_position].filter(Boolean).some(o=>String(o).toLowerCase().includes(t)):!0}function pE(e){let t=[[e.name,e.role_name].filter(Boolean).join(" "),e.department].filter(Boolean).join(" / ");return{id:`emp:${e.seq}`,label:Bx(e),renderLabel:kn(ja,{component:"span",sx:{display:"inline-flex",alignItems:"baseline",gap:.75},children:kn(ja,{component:"span",sx:{fontWeight:400,color:"text.primary"},children:t})})}}function vx(e,t){let o=(e.groups??[]).map(r=>vx(r,t)).filter(r=>r!==null),n=(e.employees??[]).filter(r=>dE(r,t)).map(pE);return o.length===0&&n.length===0?null:{id:`group:${e.key}`,label:e.name,children:[...o,...n]}}function fE({groups:e,allEmployees:t,initialSelectedSeqs:o,multiple:n,isMobile:r,onSelectionChange:i}){let[a,l]=iE(""),s=Cx(()=>e.map(c=>vx(c,a.trim().toLowerCase())).filter(c=>c!==null),[e,a]),m=Cx(()=>t.filter(c=>o.includes(c.seq)).map(Bx),[]);return xE(gE,{children:[kn(ja,{sx:{px:1.5,py:1,borderBottom:"1px solid #cccccc",flexShrink:0},children:kn(cE,{size:"small",fullWidth:!0,placeholder:"\uC774\uB984, \uBD80\uC11C \uAC80\uC0C9",onSearch:l,onClear:()=>l(""),sx:{"& .MuiOutlinedInput-notchedOutline":{border:"none"},"& .MuiInputBase-root":{px:0}}})}),kn(ja,{sx:r?{display:"flex",flexDirection:"column"}:{flex:1,minHeight:0,overflow:"hidden",display:"flex",flexDirection:"column"},children:kn(mE,{items:s,checkbox:!0,multiSelect:n,selectionMode:"child",showSearch:!1,defaultExpanded:!0,initialSelections:m,onChange:c=>i(c.map(uE).filter(p=>p>0)),styles:{border:"none",borderRadius:"0"}})})]})}function IK({open:e,title:t="\uC9C1\uC6D0 \uC120\uD0DD",hint:o="",groups:n,multiple:r=!1,selectedSeqs:i,confirmText:a="\uD655\uC778",onConfirm:l,onClose:s}){let m=Ue(),c=i??[],p=Sx({open:e,groups:n,multiple:r,selectedSeqs:c,onConfirm:l,onClose:s}),{form:d,allEmployees:u}=p,f=p.modals.select,g=d.useValue("selectedSeqs")??[],v=Number(p.ui.useValue("openCount")??0);return kn(sE,{open:f.isOpen,onClose:f.close,title:`${t}${r&&g.length>0?` (${g.length}\uBA85)`:""}`,locale:"ko",fullScreen:m,mobilePresentation:m?"slide":"dialog",draggable:!0,width:"600px",tabs:{visible:!1},titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},scrollPastLastSection:!1,sectionContentPaddingTop:0,fontScale:{enabled:!0},fontScaleKey:"taskbox-employee-select",sections:[{id:"employee-select",title:"\uC9C1\uC6D0 \uC120\uD0DD",showTitle:!1,children:kn(ja,{sx:{...m?{}:{height:560},display:"flex",flexDirection:"column",border:"1px solid #cccccc",borderRadius:1,...m?{}:{overflow:"hidden"},userSelect:"none"},children:kn(fE,{groups:n,allEmployees:u,initialSelectedSeqs:c,multiple:r,isMobile:m,onSelectionChange:p.changeSelection},v)})}],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:o?kn(lE,{variant:"body2",color:"text.secondary",sx:{whiteSpace:"pre-line",lineHeight:1.35},children:o}):void 0,right:kn(aE,{variant:"contained",onClick:()=>{d.submit()},children:a})}})}import{useMemo as ZE}from"react";import{Box as sr,Button as Gx}from"@mui/material";import{FormDialog as JE}from"@ehfuse/mui-form-dialog";import{LabelSelect as zu}from"@ehfuse/mui-form-controls";import eR from"@mui/icons-material/SpeedOutlined";import{Box as Ro,Button as TE}from"@mui/material";import{FormDialog as yE}from"@ehfuse/mui-form-dialog";import{LabelSelect as SE,NumberField as CE}from"@ehfuse/mui-form-controls";import BE from"@ehfuse/overlay-scrollbar";import{useEffect as bE,useRef as hE}from"react";import{useGlobalForm as kE}from"@ehfuse/forma";function Ix(e){return`byAccount.a${e}`}function Xa(e){return Math.max(0,Math.floor(Number(e)||0))}function Pu(e){return{basis:e.basis,default_capacity:e.default_capacity,byAccount:Object.fromEntries(Object.entries(e.by_account??{}).map(([t,o])=>[`a${t}`,o]))}}function _x({open:e,capacity:t,onClose:o,onSave:n}){let r=kE({formId:we("taskbox-workload-capacity-form"),initialValues:Pu(t??Kr),onSubmit:async l=>{let s={};for(let[m,c]of Object.entries(l.byAccount??{})){let p=Xa(c),d=Number(m.slice(1));d>0&&p>0&&(s[d]=p)}return await n({...t??Kr,basis:l.basis,default_capacity:Xa(l.default_capacity),by_account:s}),!0}}),i={form:Zt({modalIdPrefix:"taskbox-workload-capacity-dialog",open:e,onClose:o,onOpen:()=>r.setFormValues(Pu(t??Kr))})},a=hE(!0);return bE(()=>{if(a.current){a.current=!1;return}e&&r.setFormValues(Pu(t??Kr))},[t]),{form:r,modals:i}}import{jsx as so,jsxs as Qa}from"react/jsx-runtime";var vE=[{value:"count",label:"\uBBF8\uC644\uB8CC \uAC74\uC218"},{value:"points",label:"\uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8"}];function wx({form:e,name:t,unit:o,size:n,clearWhenZero:r}){let i=Xa(e.useFormValue(t));return so(CE,{size:n,fullWidth:!0,min:0,max:999,thousandSeparator:!1,align:"right",suffix:o,clearWhenZero:r,value:i,onValueChange:a=>e.setFormValue(t,Xa(a))})}function Dx({open:e,capacity:t,employees:o,onClose:n,onSave:r}){let{form:i,modals:a}=_x({open:e,capacity:t,onClose:n,onSave:r}),l=i.useFormValue("basis")==="points"?"SP":"\uAC74";return so(yE,{open:a.form.isOpen,onClose:a.form.close,maxWidth:"sm",title:"\uC778\uC6D0 \uC6A9\uB7C9",locale:"ko",backdropClick:!1,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-workload-capacity",tabs:{visible:!1},actions:{showCancelButton:!0,right:so(TE,{variant:"contained",onClick:()=>{i.submit()},children:"\uC800\uC7A5"})},sectionContentPaddingTop:0,sections:[{id:"capacity",title:"",showTitle:!1,children:Qa(Ro,{sx:{display:"flex",flexDirection:"column",gap:2},children:[so(Ro,{sx:{fontSize:15,color:"#37352f"},children:"\uD55C \uC0AC\uB78C\uC774 \uB3D9\uC2DC\uC5D0 \uC548\uC744 \uC218 \uC788\uB294 \uC591\uC744 \uC815\uD569\uB2C8\uB2E4. \uC774 \uAC12\uC744 \uB118\uAE30\uBA74 \uC6CC\uD06C\uB85C\uB4DC \uCC28\uD2B8\uC5D0\uC11C \uBD89\uAC8C \uD45C\uC2DC\uB429\uB2C8\uB2E4. 0 \uC73C\uB85C \uB450\uBA74 \uC6A9\uB7C9\uC744 \uC4F0\uC9C0 \uC54A\uACE0 \uD300 \uD3C9\uADE0\uC744 \uAE30\uC900\uC73C\uB85C \uBD05\uB2C8\uB2E4."}),Qa(Ro,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[so(Ro,{sx:{width:104,flexShrink:0,fontSize:16,color:"#37352f"},children:"\uC138\uB294 \uB2E8\uC704"}),so(SE,{form:i,name:"basis",size:"medium",fullWidth:!0,label:"",options:vE})]}),Qa(Ro,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[so(Ro,{sx:{width:104,flexShrink:0,fontSize:16,color:"#37352f"},children:"\uAE30\uBCF8 \uC6A9\uB7C9"}),so(wx,{form:i,name:"default_capacity",size:"medium",unit:l})]}),so(Ro,{sx:{pl:"119px",mt:-1.25,fontSize:13.5,color:"#37352f"},children:`\uC804\uC6D0 \uACF5\uD1B5 \uAE30\uC900(${l}) \xB7 0 = \uC6A9\uB7C9 \uC548 \uC500`}),so(Ro,{sx:{fontSize:16,fontWeight:700,color:"#37352f"},children:"\uC0AC\uB78C\uBCC4 \uC608\uC678"}),o.length===0?so(Ro,{sx:{fontSize:15,color:"#787774"},children:"\uC9C1\uC6D0 \uBAA9\uB85D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. \uAE30\uBCF8 \uC6A9\uB7C9\uB9CC \uC801\uC6A9\uB429\uB2C8\uB2E4."}):so(Ro,{sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:so(BE,{style:{maxHeight:260},thumb:{width:6},children:o.filter(s=>Number(s.account_seq)>0).map(s=>Qa(Ro,{sx:{display:"flex",alignItems:"center",gap:1.5,px:2,py:1,borderBottom:"1px solid #f2f2f0","&:last-of-type":{borderBottom:"none"}},children:[Qa(Ro,{sx:{flex:1,minWidth:0,fontSize:16,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[s.name,s.department?so(Ro,{component:"span",sx:{ml:1,fontSize:14,color:"#787774"},children:s.department}):null]}),so(Ro,{sx:{width:132,flexShrink:0},children:so(wx,{form:i,name:Ix(Number(s.account_seq)),size:"small",unit:l,clearWhenZero:!0})})]},s.account_seq))})})]})}]})}import{lazy as IE,Suspense as _E}from"react";import{Box as wE}from"@mui/material";import{jsx as Ys}from"react/jsx-runtime";function DE({height:e}){return Ys(wE,{sx:typeof e=="number"?{height:e,minHeight:120}:{position:"absolute",inset:0}})}function Za(e,t){let o=IE(e);return function(r){return Ys(_E,{fallback:Ys(DE,{height:r.height??t}),children:Ys(o,{...r})})}}var Ex=Za(()=>import("./chunks/SprintVelocityChart-DMENH7QX.js").then(e=>({default:e.SprintVelocityChart})),200),Rx=Za(()=>import("./chunks/SprintBurndownChart-4GZ5RXBN.js").then(e=>({default:e.SprintBurndownChart})),200),Mx=Za(()=>import("./chunks/CumulativeFlowChart-BDDP3H2H.js").then(e=>({default:e.CumulativeFlowChart})),220),Px=Za(()=>import("./chunks/LeadTimeDistributionChart-45ETE64V.js").then(e=>({default:e.LeadTimeDistributionChart})),200),Ox=Za(()=>import("./chunks/WorkloadChart-PKXYKQYH.js").then(e=>({default:e.WorkloadChart})),200);import{Box as FE,Button as $E}from"@mui/material";import{FormDialog as HE}from"@ehfuse/mui-form-dialog";import{useState as EE}from"react";import{Box as qt,Button as RE,Menu as ME,MenuItem as PE}from"@mui/material";import OE from"@mui/icons-material/PersonOutlineOutlined";import qE from"@ehfuse/overlay-scrollbar";import{jsx as eo,jsxs as lr}from"react/jsx-runtime";var qx=56,zx=68,Ax=96;function zE(e){let t=String(e.due_date??"").slice(0,10);return t?t.slice(5).replace("-","/"):"-"}function Lx(e,t){let o=String(e.due_date??"").slice(0,10);return!!o&&o<t}function Nx({tasks:e,row:t,todayStr:o,employees:n,rows:r,height:i=200,hideSummary:a=!1,onChangeManager:l,onOpenTask:s}){let[m,c]=EE(null),p=kl(e,t.accountSeq),d=u=>r.find(f=>f.accountSeq===u)?.total??0;return lr(qt,{sx:{display:"flex",flexDirection:"column",minHeight:0,height:i},children:[a?null:lr(qt,{sx:{display:"flex",alignItems:"center",gap:1,px:.5,pb:.75,fontSize:14,color:"#37352f"},children:[eo(qt,{component:"span",sx:{fontWeight:700},children:t.name}),lr(qt,{component:"span",children:["\uBBF8\uC644\uB8CC ",p.length,"\uAC74"]}),t.capacity>0?lr(qt,{component:"span",sx:{color:t.load>t.capacity?"#e5484d":"#787774"},children:["\xB7 \uC6A9\uB7C9 ",t.capacity," \uC911 ",t.load]}):null]}),lr(qt,{sx:{flex:1,minHeight:0,display:"flex",flexDirection:"column",border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:[lr(qt,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1,flexShrink:0,bgcolor:"#fafaf9",borderBottom:"1px solid #e6e6e3",fontSize:13.5,fontWeight:600,color:"#37352f"},children:[eo(qt,{sx:{width:qx,flexShrink:0},children:"\uB9C8\uAC10"}),eo(qt,{sx:{flex:1,minWidth:0},children:"\uC5C5\uBB34"}),eo(qt,{sx:{width:zx,flexShrink:0,textAlign:"center"},children:"\uC911\uC694\uB3C4"}),l?eo(qt,{sx:{width:Ax,flexShrink:0,textAlign:"center"},children:"\uCC45\uC784\uC790"}):null]}),eo(qt,{sx:{flex:1,minHeight:0},children:eo(qE,{style:{height:"100%"},thumb:{width:6},children:p.length===0?eo(qt,{sx:{p:2,fontSize:14,color:"#9a9a97"},children:"\uBBF8\uC644\uB8CC \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4."}):p.map(u=>lr(qt,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1.5,borderBottom:"1px solid #f2f2f0"},children:[eo(qt,{sx:{width:qx,flexShrink:0,fontSize:13.5,color:Lx(u,o)?"#e5484d":"#787774",fontWeight:Lx(u,o)?700:400},children:zE(u)}),eo(qt,{onClick:s?()=>s(u.seq):void 0,sx:{flex:1,minWidth:0,fontSize:14.5,color:"#37352f",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",...s?{cursor:"pointer","&:hover":{textDecoration:"underline"}}:{}},children:u.title}),eo(qt,{sx:{width:zx,flexShrink:0,display:"flex",justifyContent:"center"},children:eo(oo,{priority:u.priority})}),l?eo(qt,{sx:{width:Ax,flexShrink:0,display:"flex",justifyContent:"center"},children:eo(RE,{size:"small",variant:"outlined",startIcon:eo(OE,{sx:{fontSize:17}}),onClick:f=>c({el:f.currentTarget,taskSeq:u.seq}),children:"\uC62E\uAE30\uAE30"})}):null]},u.seq))})})]}),eo(ME,{anchorEl:m?.el??null,open:!!m,onClose:()=>c(null),transitionDuration:0,children:n.filter(u=>Number(u.account_seq)>0&&Number(u.account_seq)!==t.accountSeq).map(u=>lr(PE,{onClick:()=>{m&&l&&l(m.taskSeq,Number(u.account_seq),u.name),c(null)},sx:{fontSize:14,minWidth:200},children:[eo(qt,{sx:{flex:1},children:u.name}),lr(qt,{component:"span",sx:{ml:2,fontSize:13,color:"#787774"},children:[d(Number(u.account_seq)),"\uAC74"]})]},u.account_seq))})]})}import{useEffect as AE,useRef as LE,useState as NE}from"react";function Fx({open:e,row:t,onClose:o,onOpenTask:n}){let[r,i]=NE(t);AE(()=>{t&&i(t)},[t]);let a=LE(0),l={dialog:Zt({modalIdPrefix:"taskbox-workload-person-dialog",open:e,onClose:()=>{o();let m=a.current;a.current=0,m>0&&n?.(m)}})};return{modals:l,shown:t??r,openTask:n?m=>{if(!l.dialog.isOpen){n(m);return}a.current=m,l.dialog.close()}:void 0}}import{jsx as js}from"react/jsx-runtime";function $x({open:e,row:t,rows:o,tasks:n,todayStr:r,employees:i,onClose:a,onChangeManager:l,onOpenTask:s}){let{modals:m,shown:c,openTask:p}=Fx({open:e,row:t,onClose:a,onOpenTask:s}),d=c?kl(n,c.accountSeq).length:0;return js(HE,{open:m.dialog.isOpen,onClose:m.dialog.close,maxWidth:"sm",title:c?`${c.name} \uC5C5\uBB34 (${d})`:"\uC5C5\uBB34",locale:"ko",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-workload-person",tabs:{visible:!1},actions:{showCancelButton:!1,right:js($E,{variant:"contained",onClick:m.dialog.close,children:"\uB2EB\uAE30"})},sections:[{id:"person-tasks",title:"",showTitle:!1,children:js(FE,{sx:{minHeight:0},children:c?js(Nx,{tasks:n,row:c,rows:o,todayStr:r,employees:i,height:"min(420px, 52vh)",hideSummary:!0,onChangeManager:l,onOpenTask:p}):null})}]})}import{useMemo as WE}from"react";import{Box as Lo,Tooltip as VE}from"@mui/material";import{OverlayScrollbar as UE}from"@ehfuse/overlay-scrollbar";import{jsx as yo,jsxs as Qs}from"react/jsx-runtime";var Hx="#e5484d",GE="#2f80ed",KE="#9a9a97",Ou=30,YE=96,Xs=56;function qu({count:e,max:t,color:o,title:n}){let r=e>0&&t>0?.18+e/t*.72:0;return yo(VE,{title:n,arrow:!0,disableInteractive:!0,placement:"top",children:yo(Lo,{sx:{display:"flex",alignItems:"center",justifyContent:"center",borderRight:"1px solid #ececea",borderBottom:"1px solid #ececea",bgcolor:r>0?`${o}${Math.round(r*255).toString(16).padStart(2,"0")}`:"transparent",color:r>.55?"#fff":"#37352f",fontSize:12.5,fontWeight:e>0?700:400,fontVariantNumeric:"tabular-nums"},children:e>0?e:""})})}function Wx({tasks:e,todayStr:t,weeks:o=6,height:n=200}){let r=WE(()=>cd(e,{todayStr:t,weeks:o}),[e,t,o]);if(r.rows.length===0)return yo(Lo,{sx:aa(n),children:yo(hl,{text:"\uB2F4\uB2F9\uC790\uAC00 \uC9C0\uC815\uB41C \uBBF8\uC644\uB8CC \uC5C5\uBB34\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4.",height:n})});let i=`${YE}px ${Xs}px repeat(${r.weeks.length}, minmax(${Xs}px, 1fr)) ${Xs}px ${Xs}px`,a={height:Ou,display:"flex",alignItems:"center",justifyContent:"center",borderRight:"1px solid #ececea",borderBottom:"1px solid #dcdad6",fontSize:12,fontWeight:700,color:"#37352f",bgcolor:"#f8f8f7",whiteSpace:"nowrap"};return yo(Lo,{sx:aa(n),children:yo(UE,{style:{height:"100%"},thumb:{width:8},children:Qs(Lo,{sx:{display:"grid",gridTemplateColumns:i,minWidth:"fit-content",height:"100%",gridTemplateRows:`${Ou}px repeat(${r.rows.length}, minmax(${Ou}px, 1fr))`},children:[yo(Lo,{sx:{...a,justifyContent:"flex-start",pl:1},children:"\uB2F4\uB2F9\uC790"}),yo(Lo,{sx:{...a,color:Hx},children:"\uC9C0\uC5F0"}),r.weeks.map(l=>yo(Lo,{sx:{...a,...l.isCurrent?{borderBottom:"2px solid #2f80ed"}:{}},children:l.label},l.start)),yo(Lo,{sx:a,children:"\uB9C8\uAC10\uC5C6\uC74C"}),yo(Lo,{sx:a,children:"\uD569\uACC4"}),r.rows.map(l=>Qs(Lo,{sx:{display:"contents"},children:[yo(Lo,{sx:{display:"flex",alignItems:"center",pl:1,borderRight:"1px solid #ececea",borderBottom:"1px solid #ececea",fontSize:13,color:l.accountSeq>0?"#37352f":"#9a9a97",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:l.name}),yo(qu,{count:l.overdue,max:r.maxCell,color:Hx,title:`${l.name} \xB7 \uC9C0\uC5F0 ${l.overdue}\uAC74`}),l.byWeek.map((s,m)=>yo(qu,{count:s,max:r.maxCell,color:GE,title:`${l.name} \xB7 ${r.weeks[m].label} \uC8FC \uB9C8\uAC10 ${s}\uAC74`},r.weeks[m].start)),yo(qu,{count:l.noDue,max:r.maxCell,color:KE,title:`${l.name} \xB7 \uB9C8\uAC10 \uBBF8\uC815 ${l.noDue}\uAC74`}),Qs(Lo,{sx:{display:"flex",alignItems:"center",justifyContent:"center",borderBottom:"1px solid #ececea",fontSize:12.5,fontWeight:700,color:"#37352f",fontVariantNumeric:"tabular-nums"},children:[l.total,l.beyond>0?Qs(Lo,{component:"span",sx:{ml:.25,fontSize:10.5,color:"#9a9a97"},children:["(+",l.beyond,")"]}):null]})]},l.accountSeq))]})})})}import{useMemo as jE,useRef as XE,useState as Vx}from"react";import{useGlobalForm as QE}from"@ehfuse/forma";function Ux({open:e,sprints:t,tasks:o,todayStr:n,initialSprintSeq:r,capacity:i,onSaveCapacity:a,onOpenTask:l,onClose:s}){let m=QE({formId:we("taskbox-sprint-charts-form"),initialValues:{sprintSeq:"",flowDays:"30",workloadMode:"distribution"}}),[c,p]=Vx(0),[d,u]=Vx(!1),f=XE(0),g={charts:Zt({modalIdPrefix:"taskbox-sprint-charts-dialog",open:e,onClose:()=>{s();let h=f.current;f.current=0,h>0&&l?.(h)},onOpen:()=>{let h=t.find(y=>y.status==="active")??t[0],E=t.find(y=>y.seq===r)??h;m.setFormValue("sprintSeq",E?.seq?String(E.seq):"")}})},v=jE(()=>sd(o,{todayStr:n,capacity:i}),[o,n,i]),D=v.find(h=>h.accountSeq===c)??null;return{form:m,modals:g,workloadRows:v,pickedAccountSeq:c,pickedRow:D,pickPerson:p,closePersonTasks:()=>p(0),capacityOpen:d,openCapacity:()=>u(!0),closeCapacity:()=>u(!1),saveCapacity:a?async h=>{await a(h),u(!1)}:void 0,openTask:l?h=>{if(!g.charts.isOpen){l(h);return}f.current=h,g.charts.close()}:void 0}}import{Fragment as Kx,jsx as ft,jsxs as Zs}from"react/jsx-runtime";var Yx="min(560px, 62vh)",tR=`calc(${Yx} - 4px)`,oR=[{value:"30",label:"\uCD5C\uADFC 30\uC77C"},{value:"60",label:"\uCD5C\uADFC 60\uC77C"},{value:"90",label:"\uCD5C\uADFC 90\uC77C"}];function FY({open:e,sprints:t,tasks:o,todayStr:n,showSprintCharts:r,capacity:i=Kr,capacityEmployees:a=[],onSaveCapacity:l,onChangeTaskManager:s,onOpenTask:m,initialSprintSeq:c=0,onClose:p}){let d=Ux({open:e,sprints:t,tasks:o,todayStr:n,initialSprintSeq:c,capacity:i,onSaveCapacity:l,onOpenTask:m,onClose:p}),{form:u,modals:f,workloadRows:g,pickedAccountSeq:v,pickedRow:D}=d,b=Number(u.useFormValue("sprintSeq"))||0,S=Number(u.useFormValue("flowDays"))||30,h=u.useFormValue("workloadMode")==="timeline"?"timeline":"distribution",E=ZE(()=>t.find(k=>k.seq===b)??null,[t,b]),y={height:tR,boxSizing:"border-box",px:3,py:2.5,display:"flex",flexDirection:"column",minHeight:0,overflow:"hidden"},T=ft(zu,{form:u,name:"sprintSeq",label:"\uBAA9\uD45C",showLabel:!1,showEmptyOption:!1,options:t.map(k=>({value:String(k.seq),label:Ko(k)})),sx:{width:280,flexShrink:0}}),A=Zs(Kx,{children:[ft(zu,{form:u,name:"workloadMode",label:"\uBCF4\uAE30",showLabel:!1,showEmptyOption:!1,options:[{value:"distribution",label:"\uC9C0\uAE08 \uBD80\uD558(\uC9C0\uC5F0\xB7\uC784\uBC15\xB7\uC5EC\uC720)"},{value:"timeline",label:"\uC8FC\uBCC4 \uB9C8\uAC10 \uBC00\uC9D1"}],sx:{width:280,flexShrink:0}}),l?ft(Gx,{size:"small",variant:"outlined",startIcon:ft(eR,{sx:{fontSize:18}}),onClick:d.openCapacity,sx:{flexShrink:0},children:"\uC6A9\uB7C9"}):null]}),q=r??t.length>0,C=ft(zu,{form:u,name:"flowDays",label:"\uAE30\uAC04",showLabel:!1,showEmptyOption:!1,options:oR,sx:{width:280,flexShrink:0}});return Zs(Kx,{children:[ft(JE,{open:f.charts.isOpen,onClose:f.charts.close,maxWidth:"md",title:"\uC5C5\uBB34 \uCC28\uD2B8",locale:"ko",contentTopPadding:0,contentPaddingX:0,sectionsPaddingTop:0,sectionContentPaddingTop:0,sectionTitleGap:0,fixedHeight:Yx,contentBottomPadding:0,scrollPastLastSection:!1,tabs:{visible:!0,switchContent:!0,fullWidth:!0},titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-sprint-charts",sections:[...q?[{id:"velocity",tabTitle:"\uBCA8\uB85C\uC2DC\uD2F0",showTitle:!1,children:ft(sr,{sx:y,children:ft(Ex,{sprints:t,tasks:o,height:"100%"})})},{id:"burndown",tabTitle:"\uBC88\uB2E4\uC6B4",showTitle:!1,children:ft(sr,{sx:y,children:E?ft(Rx,{sprint:E,tasks:o,todayStr:n,height:"100%",headerLeft:T}):Zs(sr,{sx:aa("100%"),children:[ft(sr,{sx:kc,children:T}),ft(hl,{text:"\uBC88\uB2E4\uC6B4\uC744 \uBCFC \uBAA9\uD45C\uB97C \uC120\uD0DD\uD558\uC138\uC694.",height:"100%"})]})})},{id:"cumulative-flow",tabTitle:"\uB204\uC801\uD750\uB984\uB3C4",showTitle:!1,children:ft(sr,{sx:y,children:ft(Mx,{tasks:o,todayStr:n,days:S,height:"100%",headerLeft:C})})}]:[],{id:"workload",tabTitle:"\uC6CC\uD06C\uB85C\uB4DC",showTitle:!1,children:ft(sr,{sx:y,children:h==="timeline"?Zs(sr,{sx:{display:"flex",flexDirection:"column",height:"100%",minHeight:0},children:[ft(sr,{sx:kc,children:A}),ft(Wx,{tasks:o,todayStr:n,height:"100%"})]}):ft(Ox,{tasks:o,todayStr:n,height:"100%",capacity:i,headerLeft:A,selectedAccountSeq:v,onSelectPerson:s?d.pickPerson:void 0})})},{id:"lead-time",tabTitle:"\uB9AC\uB4DC\uD0C0\uC784",showTitle:!1,children:ft(sr,{sx:y,children:ft(Px,{tasks:o,todayStr:n,days:S,height:"100%",headerLeft:C})})}],actions:{showCancelButton:!1,right:ft(Gx,{variant:"contained",onClick:f.charts.close,children:"\uB2EB\uAE30"})}}),ft($x,{open:v>0,row:D,rows:g,tasks:o,todayStr:n,employees:a,onClose:d.closePersonTasks,onChangeManager:s,onOpenTask:d.openTask}),d.saveCapacity?ft(Dx,{open:d.capacityOpen,capacity:i,employees:a,onClose:d.closeCapacity,onSave:d.saveCapacity}):null]})}import{Checkbox as nR,Divider as rR,Menu as iR,MenuItem as Au}from"@mui/material";import{jsx as Ja,jsxs as jx}from"react/jsx-runtime";function UY({anchorEl:e,candidates:t,selectedNames:o,avatarSrcByName:n,onToggle:r,onClear:i,onClose:a}){return jx(iR,{anchorEl:e,open:!!e,onClose:a,transitionDuration:0,children:[t.length===0?Ja(Au,{disabled:!0,sx:{fontSize:14},children:"\uBAA9\uB85D\uC5D0 \uC9C0\uC815\uB41C \uC0AC\uB78C\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):t.map(l=>{let s=o.includes(l.name);return jx(Au,{onClick:()=>r(l),sx:{fontSize:14,minWidth:170,gap:1},children:[Ja(nR,{size:"small",checked:s,sx:{p:0}}),Ja(go,{names:[l.name],size:20,avatarSrcByName:n}),l.name]},`${l.accountSeq}-${l.name}`)}),Ja(rR,{}),Ja(Au,{disabled:o.length===0,onClick:i,sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{useState as aR}from"react";import{ButtonBase as lR,Menu as sR,MenuItem as cR}from"@mui/material";import mR from"@mui/icons-material/KeyboardArrowDown";import uR from"@mui/icons-material/Check";import{Fragment as dR,jsx as Lu,jsxs as Nu}from"react/jsx-runtime";function JY({value:e,onChange:t,options:o}){let[n,r]=aR(null),i=o??Zc,a=Zc.find(l=>l.value===e)?.label??"";return Nu(dR,{children:[Nu(lR,{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,Lu(mR,{sx:{fontSize:17,color:"#9a9a97"}})]}),Lu(sR,{transitionDuration:0,anchorEl:n,open:!!n,onClose:()=>r(null),children:i.map(l=>Nu(cR,{selected:l.value===e,onClick:()=>{t(l.value),r(null)},sx:{fontSize:14,minWidth:140,justifyContent:"space-between",gap:1},children:[l.label,l.value===e?Lu(uR,{sx:{fontSize:16,color:"#2f80ed"}}):null]},l.value))})]})}import{Box as Js,ButtonBase as pR}from"@mui/material";import{DateTextField as Xx}from"@ehfuse/mui-form-controls";import{jsx as el,jsxs as Qx}from"react/jsx-runtime";var fR=[{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 Zx({fromDate:e,toDate:t,onChange:o}){let n=i=>{if(i<=0){o("","");return}o(ia(hc(i)),ia(new Date))},r=i=>i<=0?!e&&!t:!e||!t?!1:e===ia(hc(i))&&t===ia(new Date);return Qx(Js,{sx:{display:"flex",alignItems:"center",gap:1.5,flexWrap:"wrap"},children:[el(Js,{sx:{display:"flex",alignItems:"center",gap:1.5},children:fR.map(i=>{let a=r(i.months);return el(pR,{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)})}),Qx(Js,{sx:{display:"flex",alignItems:"center",gap:.5},children:[el(Xx,{value:e,size:"small",placeholder:"\uC2DC\uC791\uC77C",onChange:i=>o(i.target.value,t),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}}),el(Js,{component:"span",sx:{fontSize:13,color:"#9a9a97"},children:"~"}),el(Xx,{value:t,size:"small",placeholder:"\uC885\uB8CC\uC77C",onChange:i=>o(e,i.target.value),sx:{width:140,"& .MuiInputBase-input":{fontSize:13}}})]})]})}import{Popover as gR}from"@mui/material";import{jsx as Jx}from"react/jsx-runtime";function cj({anchorEl:e,fromDate:t,toDate:o,onChange:n,onClose:r}){return Jx(gR,{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:Jx(Zx,{fromDate:t,toDate:o,onChange:n})})}import{Box as xR,ButtonBase as bR,Tab as hR,Tabs as kR}from"@mui/material";import TR from"@mui/icons-material/Checklist";import yR from"@mui/icons-material/Face";import SR from"@mui/icons-material/Publish";import CR from"@mui/icons-material/NotificationsOutlined";import BR from"@mui/icons-material/BugReportOutlined";import vR from"@mui/icons-material/SupportAgentOutlined";import IR from"@mui/icons-material/DescriptionOutlined";import _R from"@mui/icons-material/Inventory2Outlined";import{jsx as Qo}from"react/jsx-runtime";function eb(e,t){return t>0?`${e} (${t})`:e}var Cj=[{id:"my",label:"\uC804\uCCB4",icon:Qo(TR,{sx:{fontSize:18}})},{id:"mine",label:"\uB0B4 \uC5C5\uBB34",icon:Qo(yR,{sx:{fontSize:18}})},{id:"sent",label:"\uBCF4\uB0B8 \uC5C5\uBB34",icon:Qo(SR,{sx:{fontSize:18}})},{id:"support",label:"\uACE0\uAC1D\uC13C\uD130",icon:Qo(vR,{sx:{fontSize:18}})},{id:"bug",label:"\uC624\uB958",icon:Qo(BR,{sx:{fontSize:18}})},{id:"notice",label:"\uACF5\uC9C0\uC0AC\uD56D",icon:Qo(CR,{sx:{fontSize:18}})},{id:"archive",label:"\uBCF4\uAD00\uD568",icon:Qo(_R,{sx:{fontSize:18}}),hideCount:!0},{id:"report",label:"\uBCF4\uACE0\uC11C",icon:Qo(IR,{sx:{fontSize:18}}),hideCount:!0}];function wR(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 Bj({items:e,activeTab:t,counts:o,onChange:n,compact:r=!1}){let i=xe(),a=wR(i.tabs),l=e;return r?Qo(xR,{sx:{display:"grid",gridTemplateColumns:"repeat(3, minmax(0, 1fr))",gap:1},children:l.map(s=>{let m=t===s.id;return Qo(bR,{onClick:()=>n(s.id),sx:{height:40,minWidth:0,px:.5,borderRadius:1,fontSize:Ct(13.5),fontWeight:500,whiteSpace:"nowrap",overflow:"hidden",border:"1px solid",bgcolor:m?i.tabs.selectedBg:i.tabs.bg,color:m?i.tabs.selectedColor:i.tabs.color,borderColor:m?i.tabs.selectedBg:i.tabs.borderColor},children:eb(s.label,s.hideCount?0:o[s.id]??0)},s.id)})}):Qo(kR,{value:t,onChange:(s,m)=>n(m),sx:{minHeight:46,"& .MuiTabs-indicator":{display:"none"},"& .MuiTabs-flexContainer":{gap:"12px",minHeight:46}},children:l.map(s=>Qo(hR,{value:s.id,label:eb(s.label,s.hideCount?0:o[s.id]??0),icon:s.icon,iconPosition:"start",sx:a},s.id))})}import{useEffect as DR,useMemo as ER,useState as Fu}from"react";import{Divider as ec,ListItemIcon as co,Menu as $u,MenuItem as Nt}from"@mui/material";import RR from"@mui/icons-material/OpenInNewOutlined";import MR from"@mui/icons-material/RestoreFromTrashOutlined";import PR from"@mui/icons-material/Check";import OR from"@mui/icons-material/CheckCircleOutlined";import qR from"@mui/icons-material/RadioButtonUnchecked";import zR from"@mui/icons-material/SendOutlined";import AR from"@mui/icons-material/EventOutlined";import LR from"@mui/icons-material/PersonOutlineOutlined";import NR from"@mui/icons-material/ViewKanbanOutlined";import FR from"@mui/icons-material/ContentCopyOutlined";import $R from"@mui/icons-material/PrintOutlined";import HR from"@mui/icons-material/NextPlanOutlined";import WR from"@mui/icons-material/ContentPasteOutlined";import VR from"@mui/icons-material/ShareOutlined";import UR from"@mui/icons-material/DirectionsRunOutlined";import tb from"@mui/icons-material/ChevronRight";import GR from"@mui/icons-material/ArchiveOutlined";import KR from"@mui/icons-material/UnarchiveOutlined";import{ConfirmDialog as ob}from"@ehfuse/alerts";import{Fragment as nb,jsx as ke,jsxs as _t}from"react/jsx-runtime";function iX({target:e,onClose:t,customTabs:o,sprints:n=[],myAccountSeq:r=0,onOpenDetail:i,onToggleCompleted:a,onRequestConfirm:l,onChangeDueDate:s,onChangeReminder:m,onMemberEdit:c,onMoveProject:p,onDuplicate:d,onPrint:u,onCreateFollowUp:f,onShare:g,onAssignSprint:v,onArchiveToggle:D,onDelete:b,onRestore:S,onPurge:h}){let E=Ue(),y=Sn(),[T,I]=Fu(null),[A,q]=Fu(null),[C,k]=Fu(null);DR(()=>{e||(I(null),q(null),k(null))},[e]);let x=e?.task??null,B=!!x?.is_notice,w=!!x?.is_event,P=x?!Cn(x,r):!1,{editPolicy:H,shareText:_}=ue(),N=x?Sr(x,r,H):!1,G=x?jr(x,r,H,P):!1,Q=x?jr(x,r,H,!1):!1,se=!!x?.deleted,me=(()=>{if(!x||x.completed)return!0;let W=_r(x,r);return W.total===0||W.count>=W.total})(),Y=ER(()=>new Set(o.filter(W=>W.useSprints).map(W=>W.key)),[o]),O=async(W="one")=>{let V=x;if(t(),!V)return;await ob({title:"\uC5C5\uBB34 \uC0AD\uC81C",message:W==="series"?`"${V.title}" \uC758 \uC774 \uD68C\uCC28\uC640 \uC774\uD6C4 \uBC18\uBCF5 \uD68C\uCC28\uB97C \uD734\uC9C0\uD1B5\uC73C\uB85C \uBCF4\uB0B4\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`:`"${V.title}" \uC5C5\uBB34\uB97C \uD734\uC9C0\uD1B5\uC73C\uB85C \uBCF4\uB0B4\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&b?.(V.seq,W)},oe=async()=>{let W=x;if(t(),!W)return;await ob({title:"\uC601\uAD6C \uC0AD\uC81C",message:`"${W.title}" \uC5C5\uBB34\uB97C \uC601\uAD6C\uD788 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C? \uB418\uB3CC\uB9B4 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.`})&&h?.(W.seq)},F=()=>{x&&D(x.seq,!x.archived),t()};return _t(nb,{children:[_t($u,{open:!!e,onClose:t,transitionDuration:0,anchorReference:E?"none":"anchorPosition",anchorPosition:!E&&e?{top:e.position.top,left:e.position.left}:void 0,slotProps:{paper:{sx:{minWidth:190,...E?{position:"fixed",top:"50%",left:"50%",translate:"-50% -50%",maxHeight:"70vh"}:{}}},list:E?{sx:{"& .MuiMenuItem-root":{py:1,minHeight:0}}}:void 0},children:[_t(Nt,{onClick:()=>{x&&i(x),t()},sx:{fontSize:14},children:[ke(co,{children:ke(RR,{sx:{fontSize:19}})}),"\uC0C1\uC138 \uC5F4\uAE30"]}),se?ke(ec,{}):null,se&&S?_t(Nt,{disabled:Q,onClick:()=>{x&&S(x.seq),t()},sx:{fontSize:14},children:[ke(co,{children:ke(MR,{sx:{fontSize:19}})}),"\uBCF5\uC6D0"]}):null,se&&h?_t(Nt,{disabled:Q,onClick:()=>{oe()},sx:{fontSize:14,color:"#e5484d"},children:[ke(co,{children:ke(Gt,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC601\uAD6C \uC0AD\uC81C"]}):null,se?null:_t(nb,{children:[_t(Nt,{disabled:B?(x?.author_account_seq??0)!==r:(x?.author_account_seq??0)!==r&&(x?.manager_account_seq??0)!==r,onClick:()=>{x&&a(x.seq,!x.completed),t()},sx:{fontSize:14},children:[ke(co,{children:x?.completed?ke(qR,{sx:{fontSize:19}}):ke(OR,{sx:{fontSize:19}})}),x?.completed?"\uC644\uB8CC \uD574\uC81C":"\uC644\uB8CC \uCC98\uB9AC"]}),!B&&l?_t(Nt,{disabled:me,onClick:()=>{x&&l(x),t()},sx:{fontSize:14},children:[ke(co,{children:ke(zR,{sx:{fontSize:19}})}),"\uD655\uC778 \uC694\uCCAD"]}):null,w?null:ke(ec,{}),w?null:_t(Nt,{disabled:N,onClick:W=>{x&&I({anchorEl:W.currentTarget,task:x})},sx:{fontSize:14},children:[ke(co,{children:ke(AR,{sx:{fontSize:19}})}),"\uB9C8\uAC10\uC608\uC815 \uBCC0\uACBD"]}),!B&&!w&&c?_t(Nt,{disabled:H==="coreAuthorManager"?N:!1,onClick:()=>{x&&c(x,"manager"),t()},sx:{fontSize:14},children:[ke(co,{children:ke(LR,{sx:{fontSize:19}})}),"\uCC45\uC784\uC790 \uBCC0\uACBD"]}):null,w?null:_t(Nt,{disabled:N,onClick:W=>{x&&q({anchorEl:W.currentTarget,task:x})},sx:{fontSize:14},children:[ke(co,{children:ke(NR,{sx:{fontSize:19}})}),"\uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9",ke(tb,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}),ke(ec,{}),d?_t(Nt,{disabled:P,onClick:()=>{x&&d(x.seq),t()},sx:{fontSize:14},children:[ke(co,{children:ke(FR,{sx:{fontSize:19}})}),"\uBCF5\uC81C"]}):null,u?_t(Nt,{onClick:()=>{x&&u(x),t()},sx:{fontSize:14},children:[ke(co,{children:ke($R,{sx:{fontSize:19}})}),"\uC778\uC1C4"]}):null,f&&x&&!x.is_event&&!x.is_notice?_t(Nt,{onClick:()=>{x&&f(x.seq),t()},sx:{fontSize:14},children:[ke(co,{children:ke(HR,{sx:{fontSize:19}})}),"\uD6C4\uC18D \uC5C5\uBB34 \uB9CC\uB4E4\uAE30"]}):null,_t(Nt,{onClick:()=>{x&&(g?g(x):Ai(x,E,_)),t()},sx:{fontSize:14},children:[ke(co,{children:E?ke(VR,{sx:{fontSize:19}}):ke(WR,{sx:{fontSize:19}})}),E?"\uACF5\uC720":"\uB0B4\uC6A9 \uBCF5\uC0AC"]}),x&&!x.is_notice&&!x.is_event&&Y.has(String(x.tab_key??""))&&v?_t(Nt,{onClick:W=>k(W.currentTarget),sx:{fontSize:14},children:[ke(co,{children:ke(UR,{sx:{fontSize:19}})}),"\uBAA9\uD45C\uC5D0 \uB123\uAE30",ke(tb,{sx:{fontSize:18,ml:"auto",color:"#9a9a97"}})]}):null,_t(Nt,{onClick:F,disabled:P||!x?.archived&&!(x&&El(x)),sx:{fontSize:14},children:[ke(co,{children:x?.archived?ke(KR,{sx:{fontSize:19}}):ke(GR,{sx:{fontSize:19}})}),x?.archived?"\uBCF4\uAD00 \uD574\uC81C":"\uBCF4\uAD00"]}),b?ke(ec,{}):null,b?_t(Nt,{disabled:G,onClick:()=>{O("one")},sx:{fontSize:14,color:"#e5484d"},children:[ke(co,{children:ke(Gt,{sx:{fontSize:19,color:"#e5484d"}})}),(x?.repeat_group_key??0)>0?"\uC0AD\uC81C (\uC774 \uD68C\uCC28\uB9CC)":"\uC0AD\uC81C"]}):null,b&&(x?.repeat_group_key??0)>0?_t(Nt,{disabled:G,onClick:()=>{O("series")},sx:{fontSize:14,color:"#e5484d"},children:[ke(co,{children:ke(Gt,{sx:{fontSize:19,color:"#e5484d"}})}),"\uC0AD\uC81C (\uC774\uD6C4 \uBC18\uBCF5 \uC804\uCCB4)"]}):null]})]}),ke(Go,{anchorEl:T?.anchorEl??null,open:!!T,date:T?.task.due_date??"",reminders:vn(T?.task),hideReminder:!!T?.task.completed,centered:E,onClose:()=>{I(null),t()},onDateChange:W=>{T&&s(T.task.seq,W)},onReminderChange:W=>{T&&m?.(T.task.seq,W)}}),_t($u,{transitionDuration:0,anchorEl:A?.anchorEl??null,open:!!A,onClose:()=>{q(null),t()},anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},...y,children:[ke(Nt,{selected:!A?.task.tab_key,onClick:()=>{A&&p(A.task.seq,""),q(null),t()},sx:{fontSize:14,minWidth:170},children:"\uC5C6\uC74C"}),o.filter(W=>!W.archived).map(W=>ke(Nt,{selected:A?.task.tab_key===W.key,onClick:()=>{A&&p(A.task.seq,W.key),q(null),t()},sx:{fontSize:14,minWidth:170},children:W.label},W.key))]}),ke($u,{transitionDuration:0,anchorEl:C,open:!!C,onClose:()=>k(null),anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},children:[{seq:0,label:"\uBC31\uB85C\uADF8 (\uBBF8\uBC30\uC815)"},...n.filter(W=>`custom-${W.group_seq}`===String(x?.tab_key??"")).map(W=>({seq:W.seq,label:Ko(W)}))].map(W=>_t(Nt,{onClick:()=>{x&&v?.(x.seq,W.seq),k(null),t()},sx:{fontSize:14,minWidth:160,gap:1},children:[W.label,(x?.sprint_seq??0)===W.seq?ke(PR,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},W.seq))})]})}import{Checkbox as YR,Divider as jR,Menu as XR,MenuItem as rb}from"@mui/material";import{jsx as tc,jsxs as ib}from"react/jsx-runtime";function mX({anchorEl:e,labelOptions:t,selectedKeys:o,onToggle:n,onClear:r,onClose:i}){return ib(XR,{transitionDuration:0,anchorEl:e,open:!!e,onClose:i,children:[t.map(a=>{let l=o.includes(a.key);return ib(rb,{onClick:()=>n(a.key),sx:{fontSize:14,minWidth:190,gap:1},children:[tc(YR,{size:"small",checked:l,sx:{p:0}}),tc($e,{option:a})]},a.key)}),tc(jR,{}),tc(rb,{disabled:o.length===0,onClick:()=>{r(),i()},sx:{fontSize:14,color:"#787774"},children:"\uD544\uD130 \uD574\uC81C"})]})}import{Divider as QR,Menu as ZR,MenuItem as ab}from"@mui/material";import JR from"@mui/icons-material/Check";import eM from"@mui/icons-material/SettingsOutlined";import{jsx as Hu,jsxs as Wu}from"react/jsx-runtime";function bX(e){let{anchorEl:t,sprints:o,value:n,onSelect:r,onManage:i,onClose:a}=e;return Wu(ZR,{transitionDuration:0,anchorEl:t,open:!!t,onClose:a,children:[[{seq:0,label:"\uC804\uCCB4"},{seq:-1,label:"\uBBF8\uBC30\uC815 \uC5C5\uBB34"},...o.map(l=>({seq:l.seq,label:Ko(l)}))].map(l=>Wu(ab,{onClick:()=>{r(l.seq),a()},sx:{fontSize:14,minWidth:180,gap:1},children:[l.label,n===l.seq?Hu(JR,{sx:{fontSize:16,color:"#2f80ed",ml:"auto"}}):null]},l.seq)),Hu(QR,{}),Wu(ab,{onClick:()=>{a(),i()},sx:{fontSize:14,gap:1},children:[Hu(eM,{sx:{fontSize:18,color:"#787774"}}),"\uBAA9\uD45C \uAD00\uB9AC\u2026"]})]})}var tM={my:"tasks",mine:"tasks",sent:"tasks",notice:"notice",support:"support",bug:"bug",archive:"archive",done:"done",report:"report"};function oM(e){return tM[e]??"tasks"}var sb={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"},lb=["list","calendar","month","card","kanban","sprint","timeline"],nM=["list","kanban"],rM=["list","card"];function TX(e){let t=oM(e);switch(t){case"notice":return{kind:t,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:t,viewOptions:lb,showCreate:!0,createLabel:"\uC624\uB958 \uB4F1\uB85D",showGroupBy:!0,showSprintFilter:!0,showDateRange:!1,showHideCompleted:!0,forceFlatList:!1,columns:{bug:!0}};case"support":return{kind:t,viewOptions:nM,showCreate:!1,createLabel:"",showGroupBy:!0,showSprintFilter:!1,showDateRange:!1,showHideCompleted:!0,forceFlatList:!1,columns:{support:!0,showProject:!1}};case"archive":return{kind:t,viewOptions:rM,showCreate:!1,createLabel:"",showGroupBy:!1,showSprintFilter:!1,showDateRange:!0,showHideCompleted:!1,forceFlatList:!0,columns:{showActions:!1}};case"done":return{kind:t,viewOptions:["list"],showCreate:!1,createLabel:"",showGroupBy:!1,showSprintFilter:!1,showDateRange:!0,showHideCompleted:!1,forceFlatList:!0,columns:{showActions:!1}};case"report":return{kind:t,viewOptions:[],showCreate:!1,createLabel:"",showGroupBy:!1,showSprintFilter:!1,showDateRange:!0,showHideCompleted:!1,forceFlatList:!0,columns:{}};default:return{kind:t,viewOptions:lb,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"}:{}}}}import{useMemo as iM}from"react";import{useKeyboardState as aM}from"@ehfuse/keyboard-state";var cb=[{key:"g l",view:"list"},{key:"g b",view:"card"},{key:"g k",view:"kanban"},{key:"g s",view:"sprint"},{key:"g c",view:"calendar"},{key:"g m",view:"month"},{key:"g t",view:"timeline"}];function vX(e,t={}){let{enabled:o=!0,views:n}=t,{onCreateTask:r,onFocusSearch:i,onToggleHelp:a,onChangeView:l,onRefresh:s,onEscape:m}=e,c=n?n.join(","):"",p=iM(()=>{let d=[];if(r&&d.push({key:"n",callback:r,options:{preventDefault:!0}}),i&&d.push({key:"/",callback:i,options:{preventDefault:!0}}),s&&d.push({key:"r",callback:s,options:{preventDefault:!0}}),a&&d.push({key:"shift+?",callback:a,options:{preventDefault:!0}}),m&&d.push({key:"escape",callback:m,options:{allowInEditable:!0}}),l)for(let u of mb(c?c.split(","):void 0))d.push({key:u.key,callback:()=>l(u.view),options:{preventDefault:!0}});return d},[r,i,a,l,s,m,c]);aM(o?p:[])}function mb(e){if(!e)return cb;let t=new Set(e);return cb.filter(o=>t.has(o.view))}function tl(e){return[{keys:"N",description:"\uC0C8 \uC5C5\uBB34 \uB4F1\uB85D"},{keys:"/",description:"\uAC80\uC0C9"},{keys:"R",description:"\uBAA9\uB85D \uC0C8\uB85C\uACE0\uCE68"},...mb(e).map(t=>({keys:t.key.split(" ").map(o=>o.toUpperCase()).join(" \u2192 "),description:`${sb[t.view]} \uBCF4\uAE30`})),{keys:"?",description:"\uB2E8\uCD95\uD0A4 \uB3C4\uC6C0\uB9D0"},{keys:"Esc",description:"\uB2EB\uAE30"}]}var IX=tl();import{Box as ol,Button as sM}from"@mui/material";import cM from"@mui/icons-material/ArrowRightAlt";import{FormDialog as mM}from"@ehfuse/mui-form-dialog";import{useState as lM}from"react";var ub={id:"concept",tabTitle:"\uAC1C\uB150",intro:"\uC5C5\uBB34\uD568\uC740 '\uB204\uAC00 \uBB34\uC5C7\uC744 \uC5B8\uC81C\uAE4C\uC9C0 \uD558\uB294\uC9C0'\uB97C \uD55C \uACF3\uC5D0 \uBAA8\uC73C\uB294 \uB3C4\uAD6C\uC785\uB2C8\uB2E4. \uBA54\uC2E0\uC800\uC5D0 \uD769\uC5B4\uC9C4 \uC9C0\uC2DC\uC640 \uC5D1\uC140\uC5D0 \uC801\uC5B4 \uB454 \uB9C8\uAC10\uC77C \uB300\uC2E0, \uC5C5\uBB34\uB97C \uBCF4\uB0B8 \uC0AC\uB78C\uACFC \uBC1B\uC740 \uC0AC\uB78C\uC774 \uAC19\uC740 \uD654\uBA74\uC744 \uBD05\uB2C8\uB2E4.",topics:[{title:"\uC138 \uAC78\uC74C\uC774\uBA74 \uB05D",lead:"\uC5C5\uBB34 \uD558\uB098\uC758 \uC0DD\uC560\uB294 \uC774 \uC138 \uAC78\uC74C\uC785\uB2C8\uB2E4. \uB098\uBA38\uC9C0 \uAE30\uB2A5\uC740 \uC804\uBD80 \uC774 \uD750\uB984\uC744 \uB3D5\uB294 \uAC83\uC774\uB77C, \uC774\uAC83\uB9CC \uC54C\uBA74 \uCCAB\uB0A0\uBD80\uD130 \uC501\uB2C8\uB2E4.",steps:[{title:"\uB4F1\uB85D",desc:"\uC81C\uBAA9 \xB7 \uCC45\uC784\uC790 \xB7 \uB9C8\uAC10\uC608\uC815\uB9CC \uC801\uC5B4 \uBCF4\uB0C5\uB2C8\uB2E4."},{title:"\uD655\uC778",desc:"\uBC1B\uC740 \uC0AC\uB78C\uC774 \uD655\uC778\uD558\uACE0 \uCC98\uB9AC\uD55C \uB4A4 \uC644\uB8CC\uD569\uB2C8\uB2E4."},{title:"\uBCF4\uAD00",desc:"\uB05D\uB09C \uC5C5\uBB34\uB294 \uBCF4\uAD00\uD568\uC5D0 \uB0A8\uC544 \uC5B8\uC81C\uB4E0 \uB2E4\uC2DC \uCC3E\uC2B5\uB2C8\uB2E4."}]},{title:"\uC5C5\uBB34\uB97C \uB458\uB7EC\uC2FC \uC138 \uC0AC\uB78C",lead:"\uC5C5\uBB34\uB9C8\uB2E4 \uBCF4\uB0B8 \uC0AC\uB78C \uD558\uB098, \uBC1B\uC740 \uC0AC\uB78C \uD558\uB098, \uD568\uAED8 \uC54C\uC544\uC57C \uD560 \uC0AC\uB78C\uB4E4\uC774 \uC788\uC2B5\uB2C8\uB2E4. \uC138 \uC5ED\uD560\uC774 \uBAA8\uB450 '\uAD00\uC5EC\uC790'\uC774\uACE0, \uACF5\uAC1C \uBC94\uC704\uAC00 **\uBE44\uACF5\uAC1C**\uC5EC\uB3C4 \uC11C\uB85C\uC5D0\uAC8C \uBCF4\uC785\uB2C8\uB2E4. \uB204\uAC00 \uBB34\uC5C7\uC744 \uB204\uB97C \uC218 \uC788\uB294\uC9C0\uB294 **\uC5ED\uD560** \uD0ED\uC5D0 \uBAA8\uC544 \uB450\uC5C8\uC2B5\uB2C8\uB2E4.",items:[{term:"\uC791\uC131\uC790",desc:"\uC5C5\uBB34\uB97C \uBCF4\uB0B8 \uC0AC\uB78C. \uC5C5\uBB34\uC758 \uC8FC\uC778\uC785\uB2C8\uB2E4."},{term:"\uCC45\uC784\uC790",desc:"\uC5C5\uBB34\uB97C \uBC1B\uC544 \uCC98\uB9AC\uD558\uB294 \uC0AC\uB78C(\uD55C \uBA85)."},{term:"\uCC38\uC870\uC790",desc:"\uD568\uAED8 \uC54C\uC544\uC57C \uD560 \uC0AC\uB78C\uB4E4(\uC5EC\uB7EC \uBA85)."}]},{title:"\uBC1B\uC740 \uC5C5\uBB34\uC640 \uBCF4\uB0B8 \uC5C5\uBB34",lead:"\uD0ED\uC740 '\uB0B4\uAC00 \uBC1B\uC740 \uAC83'\uACFC '\uB0B4\uAC00 \uBCF4\uB0B8 \uAC83'\uC744 \uAC00\uB974\uB294 \uCD95\uC785\uB2C8\uB2E4. \uB0A8\uC774 \uC2DC\uD0A8 \uC77C\uACFC \uB0B4\uAC00 \uC2DC\uD0A8 \uC77C\uC774 \uC11E\uC774\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",items:[{term:"\uB0B4 \uC5C5\uBB34",desc:"\uB0B4\uAC00 \uCC45\uC784\uC790\uC774\uAC70\uB098 \uCC38\uC870\uC790\uC778 \uC5C5\uBB34 \u2014 \uBC1B\uC740 \uC5C5\uBB34\uC785\uB2C8\uB2E4."},{term:"\uBCF4\uB0B8 \uC5C5\uBB34",desc:"\uB0B4\uAC00 \uB4F1\uB85D\uD574 \uB2E4\uB978 \uC0AC\uB78C\uC5D0\uAC8C \uB9E1\uAE34 \uC5C5\uBB34\uC785\uB2C8\uB2E4."},{term:"\uC804\uCCB4",desc:"\uB0B4\uAC00 \uBCFC \uC218 \uC788\uB294 \uBAA8\uB4E0 \uC5C5\uBB34. \uB0B4 \uC5C5\uBB34\xB7\uCC45\uC784\uC790\uBCC4\xB7\uC77C\uC815 \uADF8\uB8F9\uC73C\uB85C \uB098\uB258\uC5B4 \uBCF4\uC785\uB2C8\uB2E4."},{term:"\uACF5\uC9C0\uC0AC\uD56D",desc:"\uC804 \uC9C1\uC6D0 \uB610\uB294 \uC9C0\uC815 \uB300\uC0C1\uC790\uC5D0\uAC8C \uC54C\uB9AC\uB294 \uAE00. \uB300\uC0C1\uC790\uB294 \uD655\uC778 \uBC84\uD2BC\uC73C\uB85C \uC77D\uC74C\uC744 \uB0A8\uAE41\uB2C8\uB2E4."},{term:"\uBCF4\uAD00\uD568",desc:'\uB05D\uB098\uC11C \uBCF4\uAD00\uB41C \uC5C5\uBB34\xB7\uC77C\uC815\uACFC \uD734\uC9C0\uD1B5. "\uC5C5\uBB34 \xB7 \uC77C\uC815 \u25BE" \uBA54\uB274\uB85C \uAD6C\uBD84\uC744 \uBC14\uAFD4 \uBD05\uB2C8\uB2E4.'}]},{title:"\uD655\uC778 \xB7 \uC644\uB8CC \xB7 \uAC80\uC218",subtitle:"\uC138 \uAC00\uC9C0 \uB2E4\uB978 \uB9D0",lead:"\uB2E4\uC2DC \uBB3B\uC9C0 \uC54A\uC544\uB3C4 \uB418\uB294 \uC774\uC720\uAC00 \uC5EC\uAE30 \uC788\uC2B5\uB2C8\uB2E4. \uC77D\uC5C8\uB294\uC9C0, \uB05D\uB0AC\uB294\uC9C0, \uAC80\uC218\uD588\uB294\uC9C0\uAC00 \uAC01\uAC01 \uD45C\uC2DC\uB85C \uB0A8\uC2B5\uB2C8\uB2E4.",items:[{term:"\uD655\uC778",desc:'"\uC77D\uC5C8\uB2E4". \uBC1B\uC740 \uC0AC\uB78C\uC774 **\uD655\uC778** \uBC84\uD2BC\uC744 \uB20C\uB7EC \uB0A8\uAE41\uB2C8\uB2E4. \uC544\uC9C1 \uD655\uC778\uD558\uC9C0 \uC54A\uC740 \uC5C5\uBB34\uB294 \uBAA9\uB85D \uB9E8 \uC704 **\uBBF8\uD655\uC778** \uC601\uC5ED\uC5D0 \uBAA8\uC785\uB2C8\uB2E4.'},{term:"\uC644\uB8CC",desc:'"\uB05D\uB0AC\uB2E4". \uCC45\uC784\uC790\uB098 \uC791\uC131\uC790\uAC00 \uC644\uB8CC \uCCB4\uD06C(\u25CB)\uB97C \uB204\uB985\uB2C8\uB2E4.'},{term:"\uAC80\uC218\uC644\uB8CC",desc:'"\uBD24\uB2E4, \uAD1C\uCC2E\uB2E4". \uCC45\uC784\uC790\uAC00 \uC644\uB8CC\uD55C \uC5C5\uBB34\uB294 \uC791\uC131\uC790\uC5D0\uAC8C **\uAC80\uC218 \uB300\uAE30**\uB85C \uB0A8\uACE0, \uC791\uC131\uC790\uAC00 **\uAC80\uC218\uC644\uB8CC**\uB85C \uB0B4\uB9AC\uAC70\uB098 \uBBF8\uD761\uD558\uBA74 \uC0AC\uC720\uB97C \uC801\uC5B4 **\uB418\uB3CC\uB9BD\uB2C8\uB2E4**.'}]},{title:"\uB450 \uAC1C\uC758 \uB0A0\uC9DC",lead:"\uC5C5\uBB34\uC5D0\uB294 \uC2DC\uC791\uC77C\uC2DC\uC640 \uB9C8\uAC10\uC608\uC815 \uB450 \uB0A0\uC9DC\uAC00 \uC788\uACE0, \uC54C\uB9BC\uACFC \uCE98\uB9B0\uB354\uB294 \uC804\uBD80 \uC774 \uB458\uC744 \uAE30\uC900\uC73C\uB85C \uC6C0\uC9C1\uC785\uB2C8\uB2E4.",items:[{term:"\uC2DC\uC791\uC77C\uC2DC",desc:"\uC77C\uC744 \uC2DC\uC791\uD560 \uC2DC\uC810. \uCC45\uC784\uC790 \uC54C\uB9BC\uC740 \uC774\uB54C\uBD80\uD130 \uAC11\uB2C8\uB2E4. \uBE44\uC6CC \uB450\uBA74 \uBC14\uB85C \uC2DC\uC791\uC73C\uB85C \uBD05\uB2C8\uB2E4."},{term:"\uB9C8\uAC10\uC608\uC815",desc:"\uB05D\uB0B4\uAE30\uB85C \uD55C \uC2DC\uC810. \uC0AC\uC804\xB7\uB2F9\uC77C\xB7\uC9C0\uC5F0 \uC54C\uB9BC\uC758 \uAE30\uC900\uC774\uACE0, \uCE98\uB9B0\uB354\xB7\uD0C0\uC784\uB77C\uC778\uC5D0 \uB193\uC774\uB294 \uB0A0\uC9DC\uC785\uB2C8\uB2E4. \uC9C0\uB09C \uB9C8\uAC10\uB9CC \uBE68\uAC04\uC0C9\uC73C\uB85C \uD45C\uC2DC\uB429\uB2C8\uB2E4."}]}]};var db={id:"roles",tabTitle:"\uC5ED\uD560",intro:"\uC5C5\uBB34\uB9C8\uB2E4 \uBCF4\uB0B8 \uC0AC\uB78C(\uC791\uC131\uC790) \uD558\uB098, \uBC1B\uC544 \uCC98\uB9AC\uD558\uB294 \uC0AC\uB78C(\uCC45\uC784\uC790) \uD558\uB098, \uD568\uAED8 \uC54C\uC544\uC57C \uD560 \uC0AC\uB78C\uB4E4(\uCC38\uC870\uC790)\uC774 \uC788\uC2B5\uB2C8\uB2E4. \uC14B \uB2E4 '\uAD00\uC5EC\uC790'\uB77C\uC11C \uACF5\uAC1C \uBC94\uC704\uAC00 **\uBE44\uACF5\uAC1C**\uC5EC\uB3C4 \uC11C\uB85C\uC5D0\uAC8C \uBCF4\uC785\uB2C8\uB2E4. \uB204\uAC00 \uBB34\uC5C7\uC744 \uB204\uB97C \uC218 \uC788\uB294\uC9C0\uAC00 \uC774 \uD0ED\uC758 \uB0B4\uC6A9\uC785\uB2C8\uB2E4.",topics:[{title:"\uC791\uC131\uC790",subtitle:"\uC5C5\uBB34\uC758 \uC8FC\uC778",lead:"\uC5C5\uBB34\uB97C \uB4F1\uB85D\uD55C \uC0AC\uB78C\uC785\uB2C8\uB2E4. \uB0B4\uC6A9\uC744 \uC815\uD558\uACE0 \uACB0\uACFC\uB97C \uAC80\uC218\uD558\uB294 \uC790\uB9AC\uB77C, \uC5C5\uBB34\uB97C \uC5C6\uC568 \uC218 \uC788\uB294 \uC720\uC77C\uD55C \uC5ED\uD560\uC785\uB2C8\uB2E4.",items:[{term:"\uD558\uB294 \uC77C",desc:"\uBB34\uC5C7\uC744 \uC5B8\uC81C\uAE4C\uC9C0 \uD560\uC9C0 \uC801\uC5B4 \uCC45\uC784\uC790\uC5D0\uAC8C \uBCF4\uB0C5\uB2C8\uB2E4. \uB05D\uB09C \uB4A4 \uACB0\uACFC\uB97C \uBCF4\uACE0 **\uAC80\uC218\uC644\uB8CC**\uB85C \uB0B4\uB9AC\uAC70\uB098, \uBBF8\uD761\uD558\uBA74 \uC0AC\uC720\uB97C \uC801\uC5B4 **\uB418\uB3CC\uB9BD\uB2C8\uB2E4**."},{term:"\uC218\uC815",desc:"\uC81C\uBAA9\xB7\uB9C8\uAC10\uC608\uC815\xB7\uCC45\uC784\uC790\xB7\uCC38\uC870\uC790\xB7\uB0B4\uC6A9 \uC804\uBD80 \uACE0\uCE69\uB2C8\uB2E4. \uBC14\uAFBC \uB0B4\uC6A9\uC740 \uC7A0\uC2DC \uBAA8\uC544 \uD55C \uAC74\uC758 \uC218\uC815 \uC54C\uB9BC\uC73C\uB85C \uAC11\uB2C8\uB2E4."},{term:"\uC644\uB8CC",desc:"\uC9C1\uC811 \uC644\uB8CC \uCCB4\uD06C\uB97C \uB204\uB97C \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uBCF8\uC778\uC774 \uC644\uB8CC\uD558\uBA74 \uAC80\uC218 \uB2E8\uACC4\uAC00 \uC5C6\uC5B4 \uADF8\uB300\uB85C \uB05D\uC785\uB2C8\uB2E4."},{term:"\uB418\uB3CC\uB9AC\uAE30",desc:"\uCC45\uC784\uC790\uAC00 \uC644\uB8CC\uD55C \uC5C5\uBB34\uB97C **\uAC80\uC218 \uB300\uAE30\uC778 \uB3D9\uC548\uB9CC** \uC0AC\uC720\uC640 \uD568\uAED8 \uB418\uB3CC\uB9BD\uB2C8\uB2E4. \uC0AC\uC720\uB294 \uB313\uAE00\uB85C \uB0A8\uACE0 \uC644\uB8CC\uD55C \uC0AC\uB78C\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC11\uB2C8\uB2E4."},{term:"\uC0AD\uC81C",desc:"\uC791\uC131\uC790 \uBCF8\uC778\uB9CC \uC0AD\uC81C\uD569\uB2C8\uB2E4(\uAD00\uB9AC\uC790 \uAD8C\uD55C\uC740 \uC870\uC9C1 \uC124\uC815\uC5D0 \uB530\uB985\uB2C8\uB2E4). \uC0AD\uC81C\uD55C \uC5C5\uBB34\uB294 \uBCF4\uAD00\uD568\uC758 \uD734\uC9C0\uD1B5\uC5D0 \uB0A8\uC2B5\uB2C8\uB2E4."},{term:"\uD655\uC778",desc:"\uD655\uC778 \uB300\uC0C1\uC5D0\uC11C **\uBE60\uC9D1\uB2C8\uB2E4** \u2014 \uB0B4\uAC00 \uC4F4 \uAE00\uC744 \uB0B4\uAC00 \uC77D\uC5C8\uB2E4\uACE0 \uB0A8\uAE38 \uC77C\uC740 \uC5C6\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4."}]},{title:"\uCC45\uC784\uC790",subtitle:"\uBC1B\uC544\uC11C \uCC98\uB9AC\uD558\uB294 \uC0AC\uB78C",lead:"\uC5C5\uBB34\uB97C \uC2E4\uC81C\uB85C \uCC98\uB9AC\uD558\uB294 \uD55C \uC0AC\uB78C\uC785\uB2C8\uB2E4. \uC5C5\uBB34\uB97C \uBC1B\uC73C\uBA74 \uC2DC\uC791\uC77C\uC2DC\uBD80\uD130 \uC54C\uB9BC\uC774 \uC624\uACE0, \uBAA9\uB85D\uC5D0\uC11C\uB294 '\uB0B4 \uC5C5\uBB34'\uB85C \uBAA8\uC785\uB2C8\uB2E4.",items:[{term:"\uD558\uB294 \uC77C",desc:"\uB0B4\uC6A9\uC744 \uD655\uC778\uD558\uACE0 \uCC98\uB9AC\uD55C \uB4A4 \uC644\uB8CC \uCCB4\uD06C(\u25CB)\uB97C \uB204\uB985\uB2C8\uB2E4. \uC644\uB8CC\uD558\uBA74 \uC791\uC131\uC790\uC5D0\uAC8C **\uAC80\uC218 \uB300\uAE30**\uB85C \uB118\uC5B4\uAC11\uB2C8\uB2E4."},{term:"\uD655\uC778",desc:'**\uD655\uC778** \uBC84\uD2BC\uC73C\uB85C "\uC77D\uC5C8\uB2E4"\uB97C \uB0A8\uAE41\uB2C8\uB2E4. \uCC45\uC784\uC790\uAC00 \uD655\uC778\uD558\uBA74 \uC791\uC131\uC790\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC11\uB2C8\uB2E4.'},{term:"\uC218\uC815",desc:"\uACE0\uCE60 \uC218 \uC788\uC2B5\uB2C8\uB2E4 \u2014 \uC9C4\uD589\uD558\uB2E4 \uBCF4\uBA74 \uB9C8\uAC10\uC608\uC815\xB7\uB0B4\uC6A9\uC774 \uB2EC\uB77C\uC9C0\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4. \uC0C1\uD0DC\xB7\uBE44\uACE0\xB7\uD560\uC77C\uB3C4 \uBAA9\uB85D\uC5D0\uC11C \uBC14\uB85C \uACE0\uCE69\uB2C8\uB2E4."},{term:"\uD560\uC77C\uB85C \uB098\uB204\uAE30",desc:"\uD070 \uC5C5\uBB34\uB294 \uD560\uC77C(\uCCB4\uD06C\uB9AC\uC2A4\uD2B8)\uB85C \uCABC\uAC1C\uACE0, \uD544\uC694\uD558\uBA74 \uD560\uC77C\uC744 \uBCC4\uB3C4 \uC5C5\uBB34\uB85C \uC2B9\uACA9\uD574 \uB2E4\uB978 \uC0AC\uB78C\uC5D0\uAC8C \uB9E1\uAE41\uB2C8\uB2E4."},{term:"\uC0AD\uC81C",desc:"\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uB0A8\uC774 \uB9E1\uAE34 \uC77C\uC744 \uBC1B\uC740 \uCABD\uC774 \uC5C6\uC568 \uC218\uB294 \uC5C6\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4 \u2014 \uB418\uB3CC\uB9B4 \uC77C\uC774\uBA74 \uB313\uAE00\uB85C \uC54C\uB9BD\uB2C8\uB2E4."},{term:"\uD55C \uBA85\uBFD0",desc:"\uCC45\uC784\uC790\uB294 \uD55C \uC0AC\uB78C\uC785\uB2C8\uB2E4. \uC5EC\uB7FF\uC774 \uB098\uB220\uC57C \uD558\uB294 \uC77C\uC740 \uD560\uC77C\uB85C \uCABC\uAC1C\uAC70\uB098 \uC5C5\uBB34\uB97C \uB098\uB220 \uB4F1\uB85D\uD569\uB2C8\uB2E4."}]},{title:"\uCC38\uC870\uC790",subtitle:"\uD568\uAED8 \uC54C\uC544\uC57C \uD560 \uC0AC\uB78C\uB4E4",lead:"\uC9C1\uC811 \uCC98\uB9AC\uD558\uC9C0\uB294 \uC54A\uC9C0\uB9CC \uB0B4\uC6A9\uC744 \uC54C\uC544\uC57C \uD558\uB294 \uC0AC\uB78C\uB4E4\uC785\uB2C8\uB2E4. \uC5EC\uB7EC \uBA85\uC744 \uB458 \uC218 \uC788\uACE0, \uC77D\uC5C8\uB2E4\uB294 \uD45C\uC2DC\uB9CC \uB0A8\uAE41\uB2C8\uB2E4.",items:[{term:"\uD558\uB294 \uC77C",desc:"\uB0B4\uC6A9\uC744 \uC77D\uACE0 \uD544\uC694\uD558\uBA74 \uB313\uAE00\uB85C \uC758\uACAC\uC744 \uB2F5\uB2C8\uB2E4. **\uD655\uC778** \uBC84\uD2BC\uC73C\uB85C \uC77D\uC74C\uC744 \uB0A8\uAE41\uB2C8\uB2E4."},{term:"\uD655\uC778",desc:"\uD655\uC778 \uB300\uC0C1\uC785\uB2C8\uB2E4. \uCC38\uC870\uC790\uC758 \uD655\uC778\uC740 \uC54C\uB9BC\uC744 \uB9CC\uB4E4\uC9C0 \uC54A\uACE0 \uD655\uC778 \uD604\uD669(n/m)\uC5D0\uB9CC \uBC18\uC601\uB429\uB2C8\uB2E4 \u2014 \uC0AC\uB78C\uC774 \uB9CE\uC544 \uC54C\uB9BC\uC774 \uC2DC\uB044\uB7EC\uC6CC\uC9C0\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4."},{term:"\uC218\uC815",desc:"\uC0C1\uD0DC\xB7\uB77C\uBCA8\xB7\uBE44\uACE0\xB7\uD560\uC77C\xB7\uCCA8\uBD80\xB7\uB313\uAE00 \uAC19\uC740 **\uC9C4\uD589 \uD56D\uBAA9**\uC740 \uCC38\uC870\uC790\uB3C4 \uC501\uB2C8\uB2E4. \uC81C\uBAA9\xB7\uB0B4\uC6A9\xB7\uC77C\uC815\xB7\uCC45\uC784\uC790\xB7\uACF5\uAC1C\uBC94\uC704 \uAC19\uC740 **\uC57D\uC18D**\uC740 \uC870\uC9C1 \uC124\uC815\uC5D0 \uB530\uB77C \uC791\uC131\uC790\xB7\uCC45\uC784\uC790\uB9CC \uACE0\uCE60 \uC218 \uC788\uC2B5\uB2C8\uB2E4(\uAE30\uBCF8\uC740 \uCC38\uC870\uC790\uB3C4 \uAC00\uB2A5). \uC644\uB8CC \uCCB4\uD06C\uB294 \uC5B8\uC81C\uB098 \uC791\uC131\uC790\xB7\uCC45\uC784\uC790\uB9CC."},{term:"\uC644\uB8CC \xB7 \uC0AD\uC81C",desc:"\uB458 \uB2E4 \uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uCC38\uC870\uB294 '\uBCF4\uB294 \uC790\uB9AC'\uC785\uB2C8\uB2E4."},{term:"\uB9C8\uAC10 \uC54C\uB9BC",desc:"\uBC1B\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uB9C8\uAC10 \uACC4\uC5F4 \uC54C\uB9BC\uC740 \uCC45\uC784\uC790\xB7\uC791\uC131\uC790\uC5D0\uAC8C\uB9CC \uAC11\uB2C8\uB2E4(\uCC38\uC870\uC790\uAE4C\uC9C0 \uBCF4\uB0B4\uBA74 \uC18C\uC74C\uC774 \uB429\uB2C8\uB2E4)."}]},{title:"\uAD8C\uD55C \uD55C\uB208\uC5D0",lead:"\uAC19\uC740 \uC5C5\uBB34\uB97C \uBCF4\uACE0 \uC788\uC5B4\uB3C4 \uB204\uB97C \uC218 \uC788\uB294 \uBC84\uD2BC\uC774 \uB2E4\uB985\uB2C8\uB2E4. \uBC84\uD2BC\uC774 \uC548 \uBCF4\uC774\uBA74 \uAD8C\uD55C\uC774 \uC5C6\uB294 \uAC83\uC785\uB2C8\uB2E4(\uC7A0\uAE34 \uCC44\uB85C \uBCF4\uC774\uC9C0 \uC54A\uACE0 \uC544\uC608 \uC228\uC2B5\uB2C8\uB2E4).",items:[{term:"\uC218\uC815",desc:"\uC9C4\uD589 \uD56D\uBAA9(\uC0C1\uD0DC\xB7\uB77C\uBCA8\xB7\uBE44\uACE0\xB7\uD560\uC77C \uB4F1)\uC740 \uAD00\uC5EC\uC790 \uC804\uC6D0. **\uC57D\uC18D**(\uC81C\uBAA9\xB7\uB0B4\uC6A9\xB7\uC77C\uC815\xB7\uBC30\uC815\xB7\uACF5\uAC1C\uBC94\uC704)\uC740 \uC870\uC9C1 \uC124\uC815\uC5D0 \uB530\uB77C \uC791\uC131\uC790\xB7\uCC45\uC784\uC790\uB85C \uC81C\uD55C\uB420 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uAD00\uC5EC\uC790\uAC00 \uC544\uB2C8\uBA74 \uC5F4\uB78C\uB9CC \uB429\uB2C8\uB2E4."},{term:"\uC644\uB8CC \xB7 \uC644\uB8CC \uD574\uC81C",desc:"\uC791\uC131\uC790 \xB7 \uCC45\uC784\uC790."},{term:"\uAC80\uC218\uC644\uB8CC \xB7 \uB418\uB3CC\uB9AC\uAE30",desc:"\uC791\uC131\uC790\uB9CC. \uB0A8\uC774 \uC644\uB8CC\uD55C \uC5C5\uBB34\uAC00 \uAC80\uC218 \uB300\uAE30\uC77C \uB54C\uB9CC \uB098\uC635\uB2C8\uB2E4."},{term:"\uC0AD\uC81C",desc:"\uC791\uC131\uC790\uB9CC."},{term:"\uD655\uC778",desc:"\uCC45\uC784\uC790 \xB7 \uCC38\uC870\uC790 \u2014 \uC791\uC131\uC790\uB294 \uC81C\uC678."},{term:"\uB313\uAE00",desc:"\uBCFC \uC218 \uC788\uB294 \uC0AC\uB78C \uB204\uAD6C\uB098."}]},{title:"\uACF5\uC9C0\uC0AC\uD56D\uC740 \uADDC\uCE59\uC774 \uB2E4\uB985\uB2C8\uB2E4",lead:"\uACF5\uC9C0\uB294 '\uB9E1\uAE30\uB294 \uC77C'\uC774 \uC544\uB2C8\uB77C '\uC54C\uB9AC\uB294 \uAE00'\uC774\uB77C \uCC45\uC784\uC790\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4. \uB300\uC0C1\uC790\uAC00 \uACE7 \uC77D\uC5B4\uC57C \uD560 \uC0AC\uB78C\uB4E4\uC785\uB2C8\uB2E4.",items:[{term:"\uC791\uC131\uC790",desc:"\uACF5\uC9C0\uB97C \uC62C\uB9B0 \uC0AC\uB78C. \uC218\uC815\xB7\uAC8C\uC2DC\uC885\uB8CC\xB7\uC0AD\uC81C\uB97C \uD63C\uC790 \uB9E1\uC2B5\uB2C8\uB2E4(\uAD00\uB9AC\uC790\uB3C4 \uB0A8\uC758 \uACF5\uC9C0\uB294 \uACE0\uCE58\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4)."},{term:"\uB300\uC0C1\uC790",desc:"\uC804 \uC9C1\uC6D0 \uB610\uB294 \uC9C0\uC815\uD55C \uC0AC\uB78C\uB4E4. **\uD655\uC778** \uBC84\uD2BC\uC73C\uB85C \uC77D\uC74C\uC744 \uB0A8\uAE30\uACE0, \uC791\uC131\uC790\uB294 \uD655\uC778 \uD604\uD669(n/m)\uC73C\uB85C \uB204\uAC00 \uC548 \uC77D\uC5C8\uB294\uC9C0 \uBD05\uB2C8\uB2E4."},{term:"\uD655\uC778 \uC54C\uB9BC",desc:"\uB300\uC0C1\uC790\uAC00 \uD655\uC778\uD574\uB3C4 \uC791\uC131\uC790\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uC804 \uC9C1\uC6D0 \uACF5\uC9C0\uB77C\uBA74 \uC54C\uB9BC\uC774 \uC0AC\uB78C \uC218\uB9CC\uD07C \uC3DF\uC544\uC9C0\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4."},{term:"\uBC18\uBCF5 \uACF5\uC9C0",desc:"\uB9E4\uC8FC \uC548\uC804\uAD50\uC721\uCC98\uB7FC \uB418\uD480\uC774\uD558\uB294 \uC548\uB0B4\uB294 **\uBC18\uBCF5**\uC744 \uAC78 \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uD68C\uCC28\uB9C8\uB2E4 \uC0C8 \uACF5\uC9C0\uAC00 \uB418\uC5B4 \uB300\uC0C1\uC790\uAC00 \uADF8\uB54C\uADF8\uB54C \uB2E4\uC2DC \uD655\uC778\uD558\uACE0, \uBAA9\uB85D\uC5D0\uB294 **\uC9C0\uAE08 \uAC8C\uC2DC\uD560 \uD68C\uCC28 1\uAC74\uB9CC** \uBCF4\uC785\uB2C8\uB2E4. \uB2E4\uC74C \uD68C\uCC28\uB294 **\uAC8C\uC2DC\uC77C\uC2DC**\uAC00 \uB418\uBA74 \uC2A4\uC2A4\uB85C \uC62C\uB77C\uC624\uBA74\uC11C \uB300\uC0C1\uC790\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC11\uB2C8\uB2E4(\uADF8 \uC804\uAE4C\uC9C0\uB294 \uAC8C\uC2DC\uC608\uC815)."}]},{title:"\uACE0\uAC1D\uC13C\uD130 \uC5C5\uBB34\uB294 \uC791\uC131\uC790\uAC00 \uC678\uBD80\uC785\uB2C8\uB2E4",feature:"support",lead:"\uAC00\uB9F9\uC810\xB7\uD648\uD398\uC774\uC9C0\uC5D0\uC11C \uB4E4\uC5B4\uC628 \uBB38\uC758\uB294 \uC791\uC131\uC790\uAC00 \uC6B0\uB9AC \uC9C1\uC6D0\uC774 \uC544\uB2C8\uB77C, \uAD00\uC5EC\uC790 \uADDC\uCE59\uC744 \uADF8\uB300\uB85C \uC4F8 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.",items:[{term:"\uC791\uC131\uC790",desc:"\uBB38\uC758\uB97C \uB0A8\uAE34 \uACE0\uAC1D(\uC9C1\uC6D0 \uBA85\uBD80\uC5D0 \uC5C6\uB294 \uC678\uBD80 \uACC4\uC815). \uC6B0\uB9AC \uCABD \uAD00\uC5EC\uC790 \uD310\uC815\uC5D0\uC11C\uB294 \uBE60\uC9D1\uB2C8\uB2E4."},{term:"\uC218\uC815",desc:"\uC5F4\uB78C\uD560 \uC218 \uC788\uB294 \uC9C1\uC6D0 \uB204\uAD6C\uB098 \uACE0\uCE69\uB2C8\uB2E4 \u2014 \uAD00\uC5EC\uC790\uAC00 \uC5C6\uC5B4 \uC544\uBB34\uB3C4 \uC190\uB300\uC9C0 \uBABB\uD558\uBA74 \uB2F5\uBCC0\uC744 \uB2EC \uC218 \uC5C6\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4."},{term:"\uCC45\uC784\uC790",desc:"**\uAC00\uC838\uAC00\uAE30**\uB85C \uC815\uD574\uC9D1\uB2C8\uB2E4. \uBA3C\uC800 \uC7A1\uC740 \uC0AC\uB78C\uC774 \uB2F5\uBCC0\uC744 \uB9E1\uC2B5\uB2C8\uB2E4."},{term:"\uB2F5\uBCC0",desc:"\uC9C1\uC6D0\uC774 \uB2E8 \uB313\uAE00\uC774 \uACE7 \uB2F5\uBCC0\uC785\uB2C8\uB2E4. \uACE0\uAC1D\uC5D0\uAC8C\uB294 \uB2F5\uBCC0 \uC54C\uB9BC\uB9CC \uAC00\uACE0, \uC5C5\uBB34\uD568\uC758 \uB2E4\uB978 \uC54C\uB9BC\uC740 \uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},{term:"\uD655\uC778 \xB7 \uAC80\uC218",desc:"\uC5C6\uC2B5\uB2C8\uB2E4 \u2014 \uACE0\uAC1D\uC774 \uD655\uC778 \uBC84\uD2BC\uC744 \uB204\uB97C \uD654\uBA74\uC774 \uC5C6\uC5B4 \uD655\uC778\xB7\uAC80\uC218 \uC6CC\uD06C\uD50C\uB85C\uB97C \uD0DC\uC6B0\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}]}]};var pb={id:"basics",tabTitle:"\uAE30\uBCF8 \uC0AC\uC6A9",intro:"\uB9E4\uC77C \uC4F0\uB294 \uC870\uC791\uB9CC \uBAA8\uC558\uC2B5\uB2C8\uB2E4. \uAC1C\uB150 \uD0ED\uC758 \uC138 \uAC78\uC74C \uC21C\uC11C \uADF8\uB300\uB85C\uC785\uB2C8\uB2E4.",topics:[{title:"1. \uB4F1\uB85D\uD558\uAE30",lines:["**\uC0C8\uB85C \uB9CC\uB4E4\uAE30** \uBC84\uD2BC(\uB2E8\uCD95\uD0A4 **N**) \u203A \uC81C\uBAA9 \xB7 \uCC45\uC784\uC790 \xB7 \uB9C8\uAC10\uC608\uC815\uC744 \uC801\uACE0 \uC800\uC7A5\uD569\uB2C8\uB2E4. \uB0B4\uC6A9\xB7\uCC38\uC870\uC790\xB7\uC2DC\uC791\uC77C\uC2DC\xB7\uC911\uC694\uB3C4\uB294 \uD544\uC694\uD560 \uB54C\uB9CC \uCC44\uC6C1\uB2C8\uB2E4.","**\uACF5\uAC1C \uBC94\uC704** : \uBE44\uACF5\uAC1C(\uAD00\uC5EC\uC790\uB9CC) / \uBD80\uC11C\uACF5\uAC1C / \uC804\uCCB4\uACF5\uAC1C. \uCC45\uC784\uC790\uAC00 \uC5C6\uB294 \uACF5\uAC1C \uC5C5\uBB34\uB294 \uC5F4\uB78C\uC790\uAC00 **\uAC00\uC838\uAC00\uAE30**\uB85C \uB9E1\uC744 \uC218 \uC788\uC2B5\uB2C8\uB2E4.","**\uBC18\uBCF5** \uC5C5\uBB34\uB294 \uB9E4\uC77C\xB7\uB9E4\uC8FC\xB7\uB9E4\uC6D4 \uD68C\uCC28\uB85C \uB9CC\uB4E4\uC5B4\uC9C0\uACE0, **\uC77C\uC815**\uC740 \uC2DC\uAC01\uC774 \uC788\uB294 \uD589\uC0AC\uB77C \uC644\uB8CC \uB300\uC2E0 \uCE98\uB9B0\uB354\uC5D0 \uB193\uC785\uB2C8\uB2E4."]},{title:"2. \uD560\uC77C \uB098\uB204\uAE30",subtitle:"\uD63C\uC790 \uD558\uAE30 \uD070 \uC5C5\uBB34\uB77C\uBA74",lead:"\uC5C5\uBB34 \uD558\uB098\uB97C \uC798\uAC8C \uCABC\uAC1C \uC9C4\uD589\uC744 \uB208\uC5D0 \uBCF4\uC774\uAC8C \uD558\uACE0, \uD544\uC694\uD558\uBA74 \uC870\uAC01\uC744 \uD300\uC6D0\uC5D0\uAC8C \uB098\uB220 \uB9E1\uAE41\uB2C8\uB2E4. \uCABC\uAC24 \uC77C\uC774 \uC544\uB2C8\uBA74 \uAC74\uB108\uB6F0\uC5B4\uB3C4 \uB429\uB2C8\uB2E4.",lines:["\uC0C1\uC138\uC758 **\uD560\uC77C**\uC5D0 \uD56D\uBAA9\uC744 \uC801\uACE0 **Enter** \uB610\uB294 \uC624\uB978\uCABD **[+]** \uB85C \uCD94\uAC00\uD569\uB2C8\uB2E4. \uCD94\uAC00\uC640 \uCCB4\uD06C\uB294 **\uB204\uAD6C\uB098** \uD560 \uC218 \uC788\uACE0(\uD568\uAED8 \uC4F0\uB294 \uCE78), \uD56D\uBAA9 \uC0AD\uC81C\uB9CC \uC218\uC815 \uAD8C\uD55C\uC774 \uC788\uC5B4\uC57C \uD569\uB2C8\uB2E4.",'\uC9C4\uD589\uC740 \uBAA9\uB85D\xB7\uCE74\uB4DC\uC5D0 **"1/3"** \uCC98\uB7FC \uBCF4\uC5EC\uC11C, \uBB3B\uC9C0 \uC54A\uC544\uB3C4 \uC5B4\uB514\uAE4C\uC9C0 \uB410\uB294\uC9C0 \uB4DC\uB7EC\uB0A9\uB2C8\uB2E4. \uB370\uC2A4\uD06C\uD1B1\uC5D0\uC11C\uB294 \uD578\uB4E4\uB85C \uB04C\uC5B4 \uC21C\uC11C\uB97C \uBC14\uAFC9\uB2C8\uB2E4.',"\uD56D\uBAA9\uC5D0 \uB9C8\uC6B0\uC2A4\uB97C \uC62C\uB824 **\uC5C5\uBB34\uB85C \uB9CC\uB4E4\uAE30**\uB97C \uB204\uB974\uBA74 \uADF8 \uD56D\uBAA9\uC774 **\uBCC4\uB3C4 \uC5C5\uBB34**\uAC00 \uB429\uB2C8\uB2E4 \u2014 \uCC45\uC784\uC790\uC640 \uB9C8\uAC10\uC608\uC815\uC744 \uB530\uB85C \uC815\uD574 \uB098\uB220 \uB9E1\uAE38 \uC218 \uC788\uC2B5\uB2C8\uB2E4.","\uC774\uBBF8 \uC788\uB294 \uC5C5\uBB34\uB97C \uD560\uC77C\uC5D0 **\uBD99\uC77C** \uC218\uB3C4 \uC788\uC2B5\uB2C8\uB2E4(\uC785\uB825\uCE78 \uC67C\uCABD \uB9C1\uD06C \uBC84\uD2BC).","\uC5F0\uACB0\uB41C \uD56D\uBAA9\uC758 \uCCB4\uD06C\uB294 \uACE7 **\uADF8 \uC5C5\uBB34\uC758 \uC644\uB8CC**\uC785\uB2C8\uB2E4. \uADF8\uB798\uC11C \uCCB4\uD06C\uB3C4 \uADF8 \uC5C5\uBB34\uC758 \uC644\uB8CC \uAD8C\uD55C\uC774 \uC788\uB294 \uC0AC\uB78C(\uC791\uC131\uC790\xB7\uCC45\uC784\uC790)\uB9CC \uB204\uB97C \uC218 \uC788\uACE0, \uD300\uC6D0\uC774 \uC790\uAE30 \uC5C5\uBB34\uB97C \uB05D\uB0B4\uBA74 \uC774\uCABD \uD560\uC77C\uB3C4 \uC800\uC808\uB85C \uCCB4\uD06C\uB429\uB2C8\uB2E4.","\uC5F0\uACB0 \uC5C5\uBB34\uB97C \uD734\uC9C0\uD1B5\uC5D0 \uBCF4\uB0B4\uBA74 \uD560\uC77C\uC5D0\uC11C\uB3C4 \uD568\uAED8 \uBE60\uC9D1\uB2C8\uB2E4."]},{title:"3. \uC5F4\uC5B4 \uBCF4\uACE0 \uB300\uD654\uD558\uAE30",lines:["\uD589\uC744 \uB204\uB974\uBA74 \uC624\uB978\uCABD\uC5D0 \uC0C1\uC138\uAC00 \uC5F4\uB9BD\uB2C8\uB2E4(\uBAA8\uBC14\uC77C\uC740 \uC804\uCCB4 \uD654\uBA74). \uC81C\uBAA9\uACFC \uC18D\uC131\uC740 \uADF8 \uC790\uB9AC\uC5D0\uC11C \uB20C\uB7EC \uACE0\uCE69\uB2C8\uB2E4.","\uC5C5\uBB34 \uB300\uD654\uB294 **\uB313\uAE00**\uB85C \uD569\uB2C8\uB2E4. \uD30C\uC77C\uC744 \uBD99\uC774\uACE0, **\uD655\uC778(\u2713)\xB7\uC88B\uC544\uC694** \uBC18\uC751\uC73C\uB85C \uC77D\uC5C8\uC74C\uC744 \uB0A8\uAE41\uB2C8\uB2E4. \uB313\uAE00\uC740 \uC791\uC131\uC790\uC640 \uC9C1\uC804 \uB313\uAE00 \uC791\uC131\uC790\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC00\uC11C \uB2F5\uAE00 \uD750\uB984\uC774 \uB04A\uAE30\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.","**\uD65C\uB3D9** \uC544\uC774\uCF58\uC5D0\uC11C \uB4F1\uB85D\xB7\uC218\uC815\xB7\uD655\uC778\xB7\uC644\uB8CC \uC774\uB825\uC744 \uBD05\uB2C8\uB2E4. \uBAA8\uBC14\uC77C \uC0C1\uC138\uB294 **\u22EE** \uC5D0 \uD65C\uB3D9\xB7\uACF5\uC720\xB7\uC0AD\uC81C\uAC00 \uC788\uACE0, \uACE0\uCE5C \uB0B4\uC6A9\uC740 **\uC800\uC7A5\uD558\uAE30**\uB85C \uD55C \uBC88\uC5D0 \uBCF4\uB0C5\uB2C8\uB2E4."]},{title:"4. \uD655\uC778\uD558\uAE30",lines:["\uBC1B\uC740 \uC5C5\uBB34\uB294 **\uD655\uC778** \uBC84\uD2BC\uC73C\uB85C \uC77D\uC74C\uC744 \uB0A8\uAE41\uB2C8\uB2E4. \uD655\uC778 \uC804 \uC5C5\uBB34\uB294 \uBAA9\uB85D \uB9E8 \uC704 **\uBBF8\uD655\uC778** \uC601\uC5ED(\uBAA8\uBC14\uC77C\uC740 \uBBF8\uD655\uC778 \uADF8\uB8F9)\uC5D0 \uBAA8\uC5EC \uC788\uC2B5\uB2C8\uB2E4.","\uD655\uC778 \uC5F4\uC758 **n/m** \uC744 \uB204\uB974\uBA74 \uB204\uAC00 \uD655\uC778\uD588\uB294\uC9C0 \uBCF4\uC774\uACE0, \uC791\uC131\uC790\uB294 \uBBF8\uD655\uC778\uC790\uC5D0\uAC8C **\uD655\uC778 \uC694\uCCAD**\uC744 \uB2E4\uC2DC \uBCF4\uB0BC \uC218 \uC788\uC2B5\uB2C8\uB2E4."]},{title:"5. \uC9C4\uD589\uD558\uACE0 \uC644\uB8CC\uD558\uAE30",lines:["\uC0C1\uD0DC \uCE69\uC744 \uB204\uB974\uBA74 \uC2DC\uC791\uC804 \u203A \uC9C4\uD589\uC911 \u203A \uBCF4\uB958\uB97C \uACE0\uB985\uB2C8\uB2E4.","\uC644\uB8CC \uCCB4\uD06C(\u25CB)\uB294 **\uC791\uC131\uC790\uC640 \uCC45\uC784\uC790\uB9CC** \uB204\uB97C \uC218 \uC788\uC2B5\uB2C8\uB2E4. \uB9C8\uAC10\uC608\uC815\uC774 \uBE44\uC5B4 \uC788\uC73C\uBA74 \uC644\uB8CC \uC2DC\uAC01\uC73C\uB85C \uCC44\uC6CC\uC9D1\uB2C8\uB2E4."]},{title:"6. \uAC80\uC218\uD558\uAE30",subtitle:"\uAC80\uC218\uC644\uB8CC \xB7 \uB418\uB3CC\uB9AC\uAE30",lines:["\uCC45\uC784\uC790\uAC00 \uC644\uB8CC\uD558\uBA74 \uC791\uC131\uC790\uC758 \uBAA9\uB85D \uB9E8 \uC704\uC5D0 **\uAC80\uC218 \uB300\uAE30**\uB85C \uB0A8\uC2B5\uB2C8\uB2E4(\uC644\uB8CC \uC228\uAE30\uAE30\uC640 \uBB34\uAD00, \uBAA8\uBC14\uC77C\uC740 \uBBF8\uD655\uC778 \uADF8\uB8F9).","\uACB0\uACFC\uAC00 \uAD1C\uCC2E\uC73C\uBA74 **\uAC80\uC218\uC644\uB8CC** \uBC84\uD2BC\uC73C\uB85C \uB0B4\uB9BD\uB2C8\uB2E4. \uBBF8\uD761\uD558\uBA74 \uC644\uB8CC \uCCB4\uD06C\uB97C \uD574\uC81C(\uC0C1\uC138\uC758 **\uB418\uB3CC\uB9AC\uAE30**)\uD558\uBA70 \uC0AC\uC720\uB97C \uC801\uC2B5\uB2C8\uB2E4 \u2014 \uC0AC\uC720\uB294 \uB313\uAE00\uB85C \uB0A8\uACE0, \uC0C1\uD0DC\uB294 \uC9C4\uD589\uC911\uC73C\uB85C \uB3CC\uC544\uAC00\uACE0, \uC644\uB8CC\uD55C \uC0AC\uB78C\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uAC11\uB2C8\uB2E4.","**\uB418\uB3CC\uB9AC\uAE30\uB294 \uAC80\uC218 \uC804\uC5D0\uB9CC** \uB098\uC635\uB2C8\uB2E4 \u2014 \uAC80\uC218\uC644\uB8CC\uB97C \uB204\uB978 \uB4A4\uC5D0\uB294 \uC0AC\uC720 \uC5C6\uC774 \uB0B4\uB9AC\uB294 **\uC644\uB8CC \uD574\uC81C**\uB85C \uBC14\uB01D\uB2C8\uB2E4.","\uBCF8\uC778\uC774 \uC644\uB8CC\uD55C \uC5C5\uBB34\uB294 \uAC80\uC218 \uB300\uC0C1\uC774 \uC544\uB2C8\uB77C \uCC98\uC74C\uBD80\uD130 **\uC644\uB8CC \uD574\uC81C**\uC785\uB2C8\uB2E4."]},{title:"7. \uBCF4\uAD00\uD558\uAE30 \xB7 \uC0AD\uC81C\uD558\uAE30",lines:["\uC644\uB8CC\uD55C \uC5C5\uBB34\uB294 \uC124\uC815 \uAE30\uAC04(\uAE30\uBCF8 7\uC77C) \uB4A4 \uC0C8\uBCBD\uC5D0 \uC790\uB3D9\uC73C\uB85C **\uBCF4\uAD00\uD568**\uC73C\uB85C \uC62E\uACA8\uC9D1\uB2C8\uB2E4. \uC6B0\uD074\uB9AD \u203A **\uBCF4\uAD00**\uC73C\uB85C \uBC14\uB85C \uBCF4\uB0B4\uACE0, \uBCF4\uAD00\uD568\uC758 **\uBCF4\uAD00 \uD574\uC81C**\uB85C \uB418\uB3CC\uB9BD\uB2C8\uB2E4.","\uC0AD\uC81C\uB294 \uC791\uC131\uC790\uB9CC \uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4(\uC0C1\uC138\uC758 \uD734\uC9C0\uD1B5 \uC544\uC774\uCF58). \uC9C0\uC6B4 \uC5C5\uBB34\uB294 **\uD734\uC9C0\uD1B5**\uC5D0\uC11C \uB418\uC0B4\uB9B4 \uC218 \uC788\uACE0, \uC124\uC815 \uAE30\uAC04(\uAE30\uBCF8 90\uC77C) \uB4A4 \uC601\uAD6C \uC0AD\uC81C\uB429\uB2C8\uB2E4.",'\uBC18\uBCF5 \uC5C5\uBB34\uB294 \uC644\uB8CC\xB7\uC0AD\uC81C\uD560 \uB54C "\uC774 \uD68C\uCC28\uB9CC / \uC774\uD6C4 \uC804\uCCB4"\uB97C \uACE0\uB985\uB2C8\uB2E4.']}]};var fb={id:"notify",tabTitle:"\uC54C\uB9BC",intro:"\uC54C\uB9BC\uC740 \uBCA8(\uC5C5\uBB34\uD568 \uC548)\uACFC \uC571 \uD478\uC2DC \uB450 \uAC08\uB798\uB85C \uAC11\uB2C8\uB2E4. \uC544\uB798 \uD45C\uC758 '\uBC1B\uB294 \uC0AC\uB78C'\uC5D0 \uC5C6\uC73C\uBA74 \uADF8 \uC77C\uC774 \uC77C\uC5B4\uB098\uB3C4 \uC54C\uB9BC\uC774 \uC624\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uC54C\uB9BC\uC744 \uC904\uC774\uB294 \uCABD\uC73C\uB85C \uC815\uD55C \uADDC\uCE59\uC774 \uB9CE\uC544, \uAD00\uC5EC\uC790\uB77C\uACE0 \uC804\uBD80 \uBC1B\uB294 \uAC83\uC740 \uC544\uB2D9\uB2C8\uB2E4.",topics:[{title:"\uC5C5\uBB34\uB97C \uB9E1\uACE0 \uBC1B\uC744 \uB54C",items:[{term:"\uCC45\uC784\uC790\uB85C \uC9C0\uC815",desc:"\uC0C8 **\uCC45\uC784\uC790**\uC5D0\uAC8C. \uCC45\uC784\uC790\uB97C \uBC14\uAFB8\uBA74 \uC0C8 \uCC45\uC784\uC790\uB9CC \uBC1B\uC2B5\uB2C8\uB2E4."},{term:"\uCC38\uC870\uC790\uB85C \uCD94\uAC00",desc:"\uC0C8\uB85C \uCD94\uAC00\uB41C **\uCC38\uC870\uC790**\uC5D0\uAC8C\uB9CC. \uC6D0\uB798 \uC788\uB358 \uCC38\uC870\uC790\uB294 \uBC1B\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},{term:"\uC2DC\uC791\uC77C\uC2DC \uB3C4\uB2EC",desc:"**\uCC45\uC784\uC790**\uC5D0\uAC8C. \uC2DC\uC791\uC77C\uC2DC\uAC00 \uB418\uBA74 \uC790\uB3D9\uC73C\uB85C \uAC11\uB2C8\uB2E4."},{term:"\uC77C\uC815 \uCD08\uB300",desc:"\uC77C\uC815\uC758 **\uCC38\uC11D\uC790**\uC5D0\uAC8C."}]},{title:"\uD655\uC778 \xB7 \uC644\uB8CC \xB7 \uAC80\uC218",items:[{term:"\uCC45\uC784\uC790\uAC00 \uD655\uC778",desc:"**\uC791\uC131\uC790**\uC5D0\uAC8C. \uBC1B\uC740 \uC0AC\uB78C\uC774 \uC77D\uC5C8\uB2E4\uB294 \uC2E0\uD638\uC785\uB2C8\uB2E4."},{term:"\uCC38\uC870\uC790\uAC00 \uD655\uC778",desc:"\uC544\uBB34\uC5D0\uAC8C\uB3C4 \uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uCC38\uC870\uC790\uAC00 \uC5EC\uB7EC \uBA85\uC774\uB77C \uC0AC\uB78C \uC218\uB9CC\uD07C \uC54C\uB9BC\uC774 \uC3DF\uC544\uC9C0\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4. \uD655\uC778 \uD604\uD669(n/m)\uC73C\uB85C\uB9CC \uBD05\uB2C8\uB2E4."},{term:"\uD655\uC778 \uC694\uCCAD(\uB9AC\uB9C8\uC778\uB4DC)",desc:"\uC544\uC9C1 **\uD655\uC778\uD558\uC9C0 \uC54A\uC740 \uB300\uC0C1\uC790**\uC5D0\uAC8C\uB9CC. \uC774\uBBF8 \uD655\uC778\uD55C \uC0AC\uB78C\uC740 \uBC1B\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},{term:"\uC644\uB8CC \uCC98\uB9AC",desc:"**\uC791\uC131\uC790 + \uCC38\uC870\uC790**\uC5D0\uAC8C. \uC644\uB8CC\uB97C \uB204\uB978 \uC0AC\uB78C \uBCF8\uC778\uC740 \uC81C\uC678\uB429\uB2C8\uB2E4."},{term:"\uAC80\uC218\uC644\uB8CC",desc:"\uC544\uBB34\uC5D0\uAC8C\uB3C4 \uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uC2B9\uC778\uC774 \uC544\uB2C8\uB77C \uC791\uC131\uC790 \uD654\uBA74\uC758 \uD45C\uC2DC\uB97C \uB0B4\uB9AC\uB294 \uAC83\uC77C \uBFD0\uC785\uB2C8\uB2E4."},{term:"\uB418\uB3CC\uB9AC\uAE30",desc:"**\uC644\uB8CC\uB97C \uCC98\uB9AC\uD55C \uC0AC\uB78C**(\uBCF4\uD1B5 \uCC45\uC784\uC790)\uC5D0\uAC8C. \uC0AC\uC720\uAC00 \uD568\uAED8 \uC804\uB2EC\uB418\uACE0 \uB313\uAE00\uB85C\uB3C4 \uB0A8\uC2B5\uB2C8\uB2E4."}]},{title:"\uB9C8\uAC10 \uAD00\uB828",lead:"\uB9C8\uAC10 \uACC4\uC5F4\uC740 \uC804\uBD80 \uCC45\uC784\uC790\uC640 \uC791\uC131\uC790\uC5D0\uAC8C\uB9CC \uAC11\uB2C8\uB2E4. \uCC38\uC870\uC790\uB294 \uB9C8\uAC10 \uC54C\uB9BC\uC744 \uBC1B\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uCC38\uC870\uAE4C\uC9C0 \uBCF4\uB0B4\uBA74 \uC54C\uB9BC\uC774 \uC18C\uC74C\uC774 \uB429\uB2C8\uB2E4.",items:[{term:"\uB9C8\uAC10 \uC0AC\uC804\uC54C\uB9BC",desc:"**\uCC45\uC784\uC790 + \uC791\uC131\uC790**\uC5D0\uAC8C. \uC5C5\uBB34\uB9C8\uB2E4 \uACE0\uB978 \uC2DC\uC810(\uC608: 1\uC77C \uC804)\uC5D0 \uAC11\uB2C8\uB2E4."},{term:"\uB9C8\uAC10 \uB2F9\uC77C",desc:"**\uCC45\uC784\uC790 + \uC791\uC131\uC790**\uC5D0\uAC8C."},{term:"\uB9C8\uAC10 \uACBD\uACFC(\uC9C0\uC5F0)",desc:"**\uCC45\uC784\uC790 + \uC791\uC131\uC790**\uC5D0\uAC8C. \uB9C8\uAC10\uC774 \uC9C0\uB0AC\uB294\uB370 \uC644\uB8CC\uB418\uC9C0 \uC54A\uC740 \uC5C5\uBB34\uC785\uB2C8\uB2E4."},{term:"\uCC38\uC870\uC790",desc:"\uC704 \uC14B \uBAA8\uB450 \uBC1B\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}]},{title:"\uB313\uAE00 \xB7 \uBC18\uC751",lead:"\uB313\uAE00 \uC54C\uB9BC\uC740 \uAD00\uC5EC\uC790 \uC804\uC6D0\uC5D0\uAC8C \uBCF4\uB0B4\uB2E4\uAC00 \uC54C\uB9BC \uD3ED\uC8FC\uB85C \uC904\uC600\uC2B5\uB2C8\uB2E4. \uC9C0\uAE08\uC740 '\uB300\uD654\uC5D0 \uC9C1\uC811 \uC5BD\uD78C \uC0AC\uB78C'\uB9CC \uBC1B\uC2B5\uB2C8\uB2E4.",items:[{term:"\uC77C\uBC18 \uB313\uAE00",desc:"\uC5C5\uBB34 **\uC791\uC131\uC790 + \uC9C1\uC804 \uB313\uAE00 \uC791\uC131\uC790**\uC5D0\uAC8C."},{term:"\uC791\uC131\uC790\uAC00 \uC790\uAE30 \uC5C5\uBB34\uC5D0 \uB313\uAE00",desc:"**\uCC45\uC784\uC790 + \uC9C1\uC804 \uB313\uAE00 \uC791\uC131\uC790**\uC5D0\uAC8C."},{term:"\uCC45\uC784\uC790 \uC5C6\uB294 \uC5C5\uBB34\uC758 \uB313\uAE00",desc:"\uC704\uC5D0 \uB354\uD574 **\uCC38\uC870\uC790 \uC804\uC6D0**\uC5D0\uAC8C. \uB204\uAC00 \uB9E1\uC744\uC9C0 \uC815\uD558\uB294 \uB300\uD654\uB77C \uCC38\uC870\uC790\uB4E4\uC774 \uC54C\uC544\uC57C \uD558\uAE30 \uB54C\uBB38\uC785\uB2C8\uB2E4. \uCC45\uC784\uC790\uAC00 \uC815\uD574\uC9C0\uBA74 \uB2E4\uC2DC \uBE60\uC9D1\uB2C8\uB2E4."},{term:"\uB313\uAE00 \uC88B\uC544\uC694 \xB7 \uD655\uC778",desc:"\uADF8 **\uB313\uAE00\uC744 \uC4F4 \uC0AC\uB78C**\uC5D0\uAC8C\uB9CC."},{term:"\uACF5\uC9C0 \uB313\uAE00",desc:"**\uC9C1\uC804 \uB313\uAE00 \uC791\uC131\uC790**\uC5D0\uAC8C\uB9CC \u2014 \uB300\uC0C1\uC790\uAC00 \uC804 \uC9C1\uC6D0\uC774\uB77C \uD655\uC7A5 \uADDC\uCE59\uC744 \uC801\uC6A9\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}]},{title:"\uB0B4\uC6A9\uC774 \uBC14\uB014 \uB54C",lead:"\uC218\uC815 \uC54C\uB9BC\uC740 \uACE7\uBC14\uB85C \uBCF4\uB0B4\uC9C0 \uC54A\uACE0, \uD3B8\uC9D1\uC774 \uB05D\uB098 \uC870\uC6A9\uD574\uC9C4 \uB4A4 \uD55C \uAC74\uC73C\uB85C \uBAA8\uC544 \uBCF4\uB0C5\uB2C8\uB2E4 \u2014 \uACE0\uCE58\uB294 \uB3C4\uC911\uC5D0 \uC54C\uB9BC\uC774 \uC5EC\uB7EC \uBC88 \uAC00\uC9C0 \uC54A\uAC8C \uD558\uB824\uB294 \uAC83\uC785\uB2C8\uB2E4.",items:[{term:"\uC77C\uBC18 \uC5C5\uBB34 \uC218\uC815",desc:"**\uCC45\uC784\uC790 + \uC791\uC131\uC790**\uC5D0\uAC8C. \uB204\uAC00 \uACE0\uCCE4\uB4E0 \uB098\uBA38\uC9C0 \uD55C\uCABD\uC774 \uBC1B\uC2B5\uB2C8\uB2E4(\uACE0\uCE5C \uC0AC\uB78C \uBCF8\uC778\uC740 \uC81C\uC678). \uCC38\uC870\uC790\uB294 \uC81C\uC678\uB429\uB2C8\uB2E4."},{term:"\uACF5\uC9C0 \uC218\uC815",desc:"**\uC791\uC131\uC790 + \uB300\uC0C1\uC790**\uC5D0\uAC8C."},{term:"\uD569\uC0B0 \uBC1C\uC1A1",desc:"\uC5EC\uB7EC \uD544\uB4DC\uB97C \uC5F0\uB2EC\uC544 \uACE0\uCCD0\uB3C4 \uD55C \uAC74\uC73C\uB85C \uBB36\uC5EC \uAC11\uB2C8\uB2E4. \uBB34\uC5C7\uC774 \uC5B4\uB5BB\uAC8C \uBC14\uB00C\uC5C8\uB294\uC9C0 \uC694\uC57D\uC774 \uB2F4\uAE41\uB2C8\uB2E4."},{term:"\uC54C\uB9BC\uC774 \uC548 \uAC00\uB294 \uBCC0\uACBD",desc:"\uC644\uB8CC \xB7 \uBCF4\uAD00 \xB7 \uC815\uB82C \uC21C\uC11C \xB7 \uCC45\uC784\uC790/\uCC38\uC870\uC790 \uBCC0\uACBD \u2014 \uAC01\uAC01 \uC804\uC6A9 \uC54C\uB9BC\uC774 \uB530\uB85C \uC788\uC5B4 \uC218\uC815 \uC54C\uB9BC\uC73C\uB85C\uB294 \uC138\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},{term:"\uD560\uC77C(\uCCB4\uD06C\uB9AC\uC2A4\uD2B8) \uBCC0\uACBD",desc:"\uC218\uC815 \uC54C\uB9BC\uACFC \uAC19\uC740 **\uCC45\uC784\uC790 + \uC791\uC131\uC790**\uC5D0\uAC8C. \uBB34\uC5C7\uC744 \uCD94\uAC00\xB7\uC0AD\uC81C\xB7\uC218\uC815\uD588\uB294\uC9C0 \uAD6C\uCCB4\uC801\uC73C\uB85C \uB2F4\uAE41\uB2C8\uB2E4. \uCCB4\uD06C\uB9CC \uCF1C\uACE0 \uB044\uAC70\uB098 \uC21C\uC11C\uB9CC \uBC14\uAFB8\uBA74 \uC54C\uB9BC\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}]},{title:"\uACF5\uC9C0\uC0AC\uD56D",items:[{term:"\uACF5\uC9C0 \uB4F1\uB85D",desc:"**\uB300\uC0C1\uC790 \uC804\uC6D0**\uC5D0\uAC8C(\uC804 \uC9C1\uC6D0 \uB610\uB294 \uC9C0\uC815\uD55C \uC0AC\uB78C\uB4E4)."},{term:"\uB300\uC0C1\uC790 \uCD94\uAC00",desc:"\uC0C8\uB85C \uCD94\uAC00\uB41C **\uB300\uC0C1\uC790**\uC5D0\uAC8C\uB9CC."},{term:"\uB300\uC0C1\uC790\uAC00 \uD655\uC778",desc:"\uC544\uBB34\uC5D0\uAC8C\uB3C4 \uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uC791\uC131\uC790\uB294 \uD655\uC778 \uD604\uD669(n/m)\uC73C\uB85C \uBD05\uB2C8\uB2E4."}]},{title:"\uC54C\uC544 \uB450\uBA74 \uC88B\uC740 \uAC83",items:[{term:"\uB0B4 \uD589\uB3D9\uC740 \uC81C\uC678",desc:"\uB0B4\uAC00 \uB204\uB978 \uC77C\uB85C\uB294 \uB098\uC5D0\uAC8C \uC54C\uB9BC\uC774 \uC624\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uB0B4\uAC00 \uC644\uB8CC\uD588\uC73C\uBA74 \uB098\uB294 \uC644\uB8CC \uC54C\uB9BC\uC744 \uBC1B\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."},{term:"\uC2DC\uC791 \uC804\uC5D0\uB294 \uBCA8\uB9CC",desc:"\uC2DC\uC791\uC77C\uC2DC\uAC00 \uC544\uC9C1 \uC548 \uB41C \uC5C5\uBB34\uC758 \uCC45\uC784\uC790 \uB300\uC0C1 \uC54C\uB9BC\uC740 \uBCA8\uC5D0\uB9CC \uC313\uC774\uACE0 \uC571 \uD478\uC2DC\uB294 \uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uC2DC\uC791\uC77C\uC2DC\uBD80\uD130 \uD478\uC2DC\uAC00 \uC624\uAE30 \uC2DC\uC791\uD569\uB2C8\uB2E4(\uC77C\uC815\xB7\uACF5\uC9C0\uB294 \uC608\uC678 \uC5C6\uC774 \uBC14\uB85C)."},{term:"\uC885\uB958\uBCC4\uB85C \uB044\uAE30",desc:"**\uB0B4 \uC815\uBCF4 \u203A \uC54C\uB9BC \uC124\uC815**\uC5D0\uC11C \uC885\uB958\uBCC4\uB85C \uC218\uC2E0\uC744 \uB055\uB2C8\uB2E4. \uB048 \uC885\uB958\uB294 \uBCA8\xB7\uD478\uC2DC \uBAA8\uB450 \uC624\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4 \u2014 \uB2E4\uB9CC \uD655\uC778 \uC694\uCCAD\uC740 \uB04C \uC218 \uC5C6\uC2B5\uB2C8\uB2E4."},{term:"\uC54C\uB9BC\uD1A1\uC740 \uC5C6\uC74C",desc:"\uC5C5\uBB34\uD568 \uC54C\uB9BC\uC740 \uBCA8\uACFC \uC571 \uD478\uC2DC\uBFD0\uC785\uB2C8\uB2E4 \u2014 \uBB38\uC790\xB7\uC54C\uB9BC\uD1A1\uC73C\uB85C\uB294 \uAC00\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."}]}]};var gb={id:"more",tabTitle:"\uB354 \uC54C\uC544\uBCF4\uAE30",intro:"\uC775\uC219\uD574\uC9C4 \uB4A4\uC5D0 \uC4F0\uBA74 \uC88B\uC740 \uAE30\uB2A5\uB4E4\uC785\uB2C8\uB2E4. \uC5C5\uBB34\uD568 \uC124\uC815\uC5D0\uC11C \uB048 \uAE30\uB2A5\uC740 \uC5EC\uAE30\uC5D0\uB3C4 \uBCF4\uC774\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4.",topics:[{title:"\uBCF4\uAE30 \uBC14\uAFB8\uAE30",lead:"\uAC19\uC740 \uC5C5\uBB34\uB97C \uBAA9\uB85D \xB7 \uD504\uB85C\uC81D\uD2B8 \xB7 \uC0C1\uD0DC \xB7 \uC8FC\uAC04 \xB7 \uC6D4\uAC04\uC73C\uB85C \uB2E4\uB974\uAC8C \uBD05\uB2C8\uB2E4. \uD5E4\uB354 \uC624\uB978\uCABD \uBC84\uD2BC\uC73C\uB85C \uBC14\uAFB8\uACE0 \uD0ED\uB9C8\uB2E4 \uB530\uB85C \uAE30\uC5B5\uB429\uB2C8\uB2E4(\uB2E8\uCD95\uD0A4 **G** \uB2E4\uC74C \uAE00\uC790\uD0A4).",lines:["**\uBAA9\uB85D** : \uC5F4 \uC81C\uBAA9\uC744 \uB204\uB974\uBA74 \uC815\uB82C(\uC81C\uBAA9\xB7\uB0A0\uC9DC) \uB610\uB294 \uD544\uD130(\uC0C1\uD0DC\xB7\uD655\uC778\xB7\uCC45\uC784\uC790\xB7\uD504\uB85C\uC81D\uD2B8\xB7\uC911\uC694\uB3C4)\uAC00 \uC5F4\uB9BD\uB2C8\uB2E4. **\uADF8\uB8F9** \uBA54\uB274\uB85C \uBB36\uB294 \uAE30\uC900\uC744 \uBC14\uAFB8\uACE0, \uADF8\uB8F9 \uBA38\uB9AC\uC904 **+** \uB85C \uADF8 \uADF8\uB8F9\uC5D0 \uBC14\uB85C \uB4F1\uB85D\uD569\uB2C8\uB2E4.","**\uD504\uB85C\uC81D\uD2B8 \xB7 \uC0C1\uD0DC \xB7 \uBAA9\uD45C** \uBCF4\uAE30\uB294 \uCE74\uB4DC\uB97C \uCEEC\uB7FC\uC5D0 \uC138\uC6C1\uB2C8\uB2E4 \u2014 \uC81C\uBAA9 \uC55E **\u22EE\u22EE \uD578\uB4E4**\uB85C \uB04C\uC5B4 \uB2E4\uB978 \uCEEC\uB7FC\uC73C\uB85C \uC62E\uAE30\uACE0, \uCEEC\uB7FC **\u22EE** \uBA54\uB274\uC5D0 \uB4F1\uB85D\xB7\uC218\uC815\xB7\uBCF4\uAD00\xB7\uC0AD\uC81C\uAC00 \uC788\uC2B5\uB2C8\uB2E4.","**\uC8FC\uAC04\xB7\uC6D4\uAC04** : \uB9C8\uAC10\uC608\uC815(\uC77C\uC815\uC740 \uC77C\uC2DC) \uAE30\uC900\uC73C\uB85C \uB193\uC774\uACE0, \uCE74\uB4DC\uB97C \uB2E4\uB978 \uB0A0\uB85C \uB04C\uBA74 \uB0A0\uC9DC\uAC00 \uBC14\uB01D\uB2C8\uB2E4. \uBE48 \uCE78\uC5D0 \uC62C\uB9AC\uBA74 \uADF8 \uB0A0\uC9DC\uB85C \uBC14\uB85C \uB4F1\uB85D\uD569\uB2C8\uB2E4. \uBC14\uAE65 \uCE98\uB9B0\uB354\uC640 \uC8FC\uACE0\uBC1B\uB294 \uBC29\uBC95\uC740 **\uC678\uBD80 \uCE98\uB9B0\uB354 \uC5F0\uB3D9** \uD0ED\uC5D0 \uC788\uC2B5\uB2C8\uB2E4."]},{title:"\uD0C0\uC784\uB77C\uC778",feature:"timeline",lines:["\uC2DC\uC791\uC77C\uC2DC~\uB9C8\uAC10\uC608\uC815\uC744 \uB9C9\uB300\uB85C \uBCF4\uC5EC \uAE30\uAC04 \uACB9\uCE68\uC744 \uBD05\uB2C8\uB2E4. \uC5C5\uBB34 \uC544\uB798 \uD560\uC77C \uC904\uC774 \uD3BC\uCCD0\uC9C0\uACE0, \uC67C\uCABD \uC5C5\uBB34\uBA85 \uC904\uC758 \uD578\uB4E4\uB85C \uC21C\uC11C\uB97C \uBC14\uAFC9\uB2C8\uB2E4."]},{title:"\uCC28\uD2B8",feature:"charts",lines:["**\uCC28\uD2B8** \uBC84\uD2BC\uC5D0\uC11C \uC6CC\uD06C\uB85C\uB4DC(\uC778\uC6D0\uBCC4 \uBD80\uD558)\xB7\uB204\uC801\uD750\uB984\uB3C4\xB7\uB9AC\uB4DC\uD0C0\uC784\uC744, \uBAA9\uD45C\uB97C \uC4F0\uBA74 \uBCA8\uB85C\uC2DC\uD2F0\xB7\uBC88\uB2E4\uC6B4\uC744 \uBD05\uB2C8\uB2E4. \uC778\uC6D0 \uC6A9\uB7C9\uC740 \uCC28\uD2B8 \uC548 \uC124\uC815 \uC544\uC774\uCF58\uC5D0\uC11C \uC815\uD569\uB2C8\uB2E4."]},{title:"\uAC80\uC0C9\uACFC \uD544\uD130",lines:["\uAC80\uC0C9\uCE78(\uB2E8\uCD95\uD0A4 **/**)\uC740 \uC81C\uBAA9\xB7\uBE44\uACE0\uB97C \uCC3E\uC2B5\uB2C8\uB2E4. \uBAA8\uBC14\uC77C\uC740 \uAC80\uC0C9 \uD654\uBA74\uC5D0\uC11C \uC0C1\uD0DC\xB7\uB77C\uBCA8 \uCE69\uC73C\uB85C \uD568\uAED8 \uAC70\uB985\uB2C8\uB2E4.","**\uD544\uD130 \xB7 \uCC45\uC784\uC790 \xB7 \uD504\uB85C\uC81D\uD2B8 \xB7 \uC911\uC694\uB3C4** \uBC84\uD2BC\uC740 \uCCB4\uD06C \uBA54\uB274\uAC00 \uC5F4\uB9AC\uACE0 \uAC78\uB9B0 \uAC1C\uC218\uAC00 \uBC84\uD2BC\uC5D0 \uD45C\uC2DC\uB429\uB2C8\uB2E4. \uC644\uB8CC\xB7\uBCF4\uAD00\uD568 \uD0ED\uC740 **\uAE30\uAC04** \uBC84\uD2BC\uC73C\uB85C \uC644\uB8CC\uC77C \uBC94\uC704\uB97C \uC815\uD569\uB2C8\uB2E4."]},{title:"\uB77C\uBCA8",feature:"label",lines:["**\uB77C\uBCA8** \uBC84\uD2BC\uC73C\uB85C \uAC70\uB974\uACE0, \uC0C1\uC138\uC758 \uB77C\uBCA8 \uD589\uC5D0\uC11C \uBD99\uC785\uB2C8\uB2E4. \uB77C\uBCA8 \uC0AC\uC804\uC740 \uC5C5\uBB34\uD568 \uC124\uC815\uC5D0\uC11C \uAD00\uB9AC\uD569\uB2C8\uB2E4."]},{title:"\uD5E4\uB354 \uC2A4\uC704\uCE58",lines:["**\uC644\uB8CC \uC228\uAE30\uAE30** : \uB05D\uB09C \uC5C5\uBB34\uB97C \uBAA8\uB4E0 \uBCF4\uAE30(\uD560\uC77C \uD3EC\uD568)\uC5D0\uC11C \uAC10\uCDA5\uB2C8\uB2E4.","**\uBAA8\uB4E0 \uC9C1\uC6D0** : (\uD5C8\uC6A9 \uACC4\uC815) \uAD00\uC5EC \uC5EC\uBD80\uC640 \uC0C1\uAD00\uC5C6\uC774 \uC804 \uC9C1\uC6D0\uC758 \uC5C5\uBB34\uB97C \uBD05\uB2C8\uB2E4. **\uC678\uBD80 \uCE98\uB9B0\uB354 \uC77C\uC815** : \uAC00\uC838\uC628 \uC77C\uC815\uC744 \uCE98\uB9B0\uB354\uC5D0 \uD568\uAED8 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4(**\uC678\uBD80 \uCE98\uB9B0\uB354 \uC5F0\uB3D9** \uD0ED \uCC38\uACE0).","\uD654\uBA74\uC774 \uC881\uC73C\uBA74 \uC2A4\uC704\uCE58\uB4E4\uC740 \uC624\uB978\uCABD **\u22EE \uBA54\uB274** \uC548\uC73C\uB85C \uB4E4\uC5B4\uAC11\uB2C8\uB2E4."]},{title:"\uAD00\uB828 \uC5C5\uBB34",lines:["\uC0C1\uC138\uC758 **\uAD00\uB828 \uC5C5\uBB34**\uC5D0\uC11C \uD6C4\uC18D \uC5C5\uBB34 \uB9CC\uB4E4\uAE30, \uAD00\uB828\xB7\uC911\uBCF5 \uC5C5\uBB34 \uC5F0\uACB0\uC744 \uD569\uB2C8\uB2E4. \uC6B0\uD074\uB9AD \uBA54\uB274\uC5D0\uC11C \uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9\xB7\uBAA9\uD45C\uC5D0 \uB123\uAE30\xB7\uBCF4\uAD00\xB7\uC0AD\uC81C\uB97C \uBC14\uB85C \uC2E4\uD589\uD569\uB2C8\uB2E4."]},{title:"\uD504\uB85C\uC81D\uD2B8",feature:"project",lines:["\uC5C5\uBB34\uB97C \uBB36\uB294 \uB2E8\uC704\uC785\uB2C8\uB2E4. **\uD504\uB85C\uC81D\uD2B8** \uBCF4\uAE30 \uB9E8 \uB05D \uC810\uC120 \uCE78\uC774\uB098 \uCEEC\uB7FC \u22EE \u203A \uC218\uC815\uC5D0\uC11C \uC774\uB984\xB7\uC544\uC774\uCF58\uC744 \uC815\uD558\uACE0, \uC5C5\uBB34\uB294 \uC0C1\uC138 \uC18D\uC131\uC774\uB098 \uC6B0\uD074\uB9AD \u203A \uD504\uB85C\uC81D\uD2B8 \uC774\uB3D9\uC73C\uB85C \uC62E\uAE41\uB2C8\uB2E4.","\uBCF4\uAD00\uC740 \uC18C\uC18D \uC5C5\uBB34\uAC00 \uBAA8\uB450 \uC644\uB8CC\uB41C \uB4A4\uC5D0\uB9CC \uB429\uB2C8\uB2E4. \uC0AD\uC81C\uD558\uBA74 \uD504\uB85C\uC81D\uD2B8\uB9CC \uC5C6\uC5B4\uC9C0\uACE0 \uC18C\uC18D \uC5C5\uBB34\uB294 \uAE30\uBCF8 \uC5C5\uBB34\uD568\uC73C\uB85C \uC62E\uACA8\uC9D1\uB2C8\uB2E4."]},{title:"\uBAA9\uD45C(\uC2A4\uD504\uB9B0\uD2B8)",feature:"sprint",lines:["\uD504\uB85C\uC81D\uD2B8 \uC124\uC815\uC5D0\uC11C **\uBAA9\uD45C \uC0AC\uC6A9**\uC744 \uCF1C\uBA74 \uAE30\uAC04\uC774 \uC788\uB294 \uBAA9\uD45C\uB97C \uB9CC\uB4E4\uACE0 \uC5C5\uBB34\uB97C \uBC30\uC815\uD569\uB2C8\uB2E4(**\uBAA9\uD45C** \uBCF4\uAE30\uC5D0\uC11C \uCE74\uB4DC \uB04C\uAE30, \uC6B0\uD074\uB9AD \u203A \uBAA9\uD45C\uC5D0 \uB123\uAE30).","\uBAA9\uD45C \uC885\uB8CC \uC2DC \uB0A8\uC740 \uC5C5\uBB34\uB97C \uB2E4\uC74C \uBAA9\uD45C\uB85C \uB118\uAE38\uC9C0, \uBBF8\uBC30\uC815\uC73C\uB85C \uBE84\uC9C0 \uACE0\uB985\uB2C8\uB2E4. \uC2A4\uD1A0\uB9AC \uD3EC\uC778\uD2B8\uB294 \uC0C1\uC138 \uC18D\uC131\uC5D0\uC11C \uC801\uC2B5\uB2C8\uB2E4."]},{title:"\uC5C5\uBB34 \uD15C\uD50C\uB9BF \xB7 \uC790\uB3D9\uD654 \uADDC\uCE59 \xB7 \uBCF8\uBB38 \uC591\uC2DD",lines:["\u22EE \u203A **\uC5C5\uBB34 \uD15C\uD50C\uB9BF**\uC73C\uB85C \uC815\uD615 \uC808\uCC28(\uD560\uC77C \uD3EC\uD568)\uB97C \uD55C \uBC88\uC5D0 \uB9CC\uB4E4\uACE0, **\uC790\uB3D9\uD654 \uADDC\uCE59**\uC73C\uB85C \uB4F1\uB85D \uC2DC \uC870\uAC74\uBD80 \uBC30\uC815 \uB4F1\uC744 \uB9E1\uAE41\uB2C8\uB2E4.","**\uBCF8\uBB38 \uC591\uC2DD**(\uB0B4\uC6A9 \uC81C\uBAA9\uC758 \u22EE)\uC740 \uC790\uC8FC \uC4F0\uB294 \uBCF8\uBB38\uC744 \uC800\uC7A5\uD574 \uB450\uACE0 \uBD88\uB7EC\uC635\uB2C8\uB2E4."]},{title:"\uC624\uB958 \uD0ED",feature:"bug",lines:["\uD504\uB85C\uADF8\uB7A8 \uC624\uB958 \uC811\uC218 \uC804\uC6A9 \uD0ED\uC785\uB2C8\uB2E4. \uD2F0\uCF13\uBC88\uD638\uAC00 \uBD99\uACE0 \uC811\uC218 \u203A \uCC98\uB9AC \u203A \uC885\uB8CC\uB85C \uAD00\uB9AC\uD569\uB2C8\uB2E4.",'\uAC1C\uBC1C\uC0AC \uC804\uC6A9\uC774\uBA70, \uACE0\uAC1D\uC774 \uC811\uC218\uD55C \uC624\uB958 \uC81C\uBCF4\uB294 \uACE0\uAC1D\uC13C\uD130 \uD0ED\uC5D0 "\uC624\uB958" \uC885\uB958\uB85C \uC313\uC785\uB2C8\uB2E4.']},{title:"\uACE0\uAC1D\uC13C\uD130 \uD0ED",feature:"support",lines:["\uACE0\uAC1D\uC774 \uB0A8\uAE34 \uBB38\uC758\xB7\uAC74\uC758\xB7\uC624\uB958 \uC81C\uBCF4\uC640 \uD648\uD398\uC774\uC9C0 \uC0C1\uB2F4\uC2E0\uCCAD\uC774 \uC5C5\uBB34\uB85C \uC313\uC785\uB2C8\uB2E4.",'**\uAC00\uC838\uAC00\uAE30**\uB85C \uCC45\uC784\uC790\uAC00 \uB418\uACE0, \uB313\uAE00\uC774 \uACE7 \uB2F5\uBCC0\uC785\uB2C8\uB2E4(\uC791\uC131\uC790\uC5D0\uAC8C\uB294 \uB2F5\uBCC0 \uC54C\uB9BC\uB9CC \uAC11\uB2C8\uB2E4). \uC644\uB8CC 7\uC77C \uB4A4 \uBCF4\uAD00\uD568\uC758 "\uACE0\uAC1D\uC13C\uD130" \uAD6C\uBD84\uC73C\uB85C \uC62E\uACA8\uC9D1\uB2C8\uB2E4.']},{title:"\uBCF4\uACE0\uC11C",feature:"report",lines:["**\uBCF4\uACE0\uC11C** \uD0ED\uC5D0\uC11C \uC5C5\uBB34 \uBCF4\uACE0\uC11C\uB97C \uC791\uC131\uD574 \uC804\uC790\uACB0\uC7AC\uB85C \uC0C1\uC2E0\uD569\uB2C8\uB2E4."]}]};var xb={id:"calendar",tabTitle:"\uC678\uBD80 \uCE98\uB9B0\uB354 \uC5F0\uB3D9",intro:"\uC5C5\uBB34\uD568\uC744 \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC640 \uC787\uC2B5\uB2C8\uB2E4. \uC8FC\uAC04\xB7\uC6D4\uAC04 \uBCF4\uAE30 \uB610\uB294 \uD5E4\uB354 \u22EE \u203A **\uCE98\uB9B0\uB354 \uC5F0\uB3D9**\uC5D0\uC11C \uAD6C\uAE00 \uACC4\uC815\uC744 \uC5F0\uACB0\uD558\uBA74 \uC5C5\uBB34 \uBCC0\uACBD\uC774 \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0 **\uBC14\uB85C** \uBC18\uC601\uB429\uB2C8\uB2E4.",topics:[{title:"\uB450 \uBC29\uD5A5",lead:"\uC5F0\uB3D9\uC740 \uBC29\uD5A5\uC774 \uB458\uC774\uACE0 \uB530\uB85C \uCF1C\uACE0 \uB055\uB2C8\uB2E4.",items:[{term:"\uB0B4\uBCF4\uB0B4\uAE30 (\uC5C5\uBB34\uD568 \u2192 \uAD6C\uAE00)",desc:"\uB0B4\uAC00 \uAD00\uC5EC\uD55C \uC5C5\uBB34(\uB9C8\uAC10\uC608\uC815 \uB610\uB294 \uC2DC\uC791\uC77C\uC2DC\uAC00 \uC788\uB294 \uAC83)\uB97C \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0 \uC0C8\uB85C \uB9CC\uB4E0 **\uC804\uC6A9 \uCE98\uB9B0\uB354**(\uC774\uB984\uC740 \uC5F0\uB3D9 \uD654\uBA74\uC5D0 \uD45C\uC2DC \u2014 \uC608: \uCF54\uB4DC\uB9C8\uCF13)\uC5D0 \uB123\uC2B5\uB2C8\uB2E4. \uB4F1\uB85D\xB7\uC218\uC815\xB7\uC644\uB8CC\xB7\uC0AD\uC81C\uAC00 \uC989\uC2DC \uBC18\uC601\uB418\uACE0, \uC644\uB8CC\uD55C \uC5C5\uBB34\uB294 \uC81C\uBAA9 \uC55E\uC5D0 \u2713 \uAC00 \uBD99\uC2B5\uB2C8\uB2E4."},{term:"\uAC00\uC838\uC624\uAE30 (\uAD6C\uAE00 \u2192 \uC5C5\uBB34\uD568)",desc:"\uAD6C\uAE00 **\uAE30\uBCF8 \uCE98\uB9B0\uB354**\uC758 \uC77C\uC815\uC744 \uC5C5\uBB34\uD568 \uC8FC\uAC04\xB7\uC6D4\uAC04 \uBCF4\uAE30\uC5D0 \uACB9\uCCD0 \uBCF4\uC5EC\uC90D\uB2C8\uB2E4. \uC77D\uAE30 \uC804\uC6A9\uC774\uB77C \uC5C5\uBB34\uB85C \uBC14\uB00C\uC9C0\uB3C4, \uC6D0\uBCF8\uC774 \uACE0\uCCD0\uC9C0\uC9C0\uB3C4 \uC54A\uC2B5\uB2C8\uB2E4."}]},{title:"\uC5F0\uACB0\uD558\uAE30",lines:["**\uCE98\uB9B0\uB354 \uC5F0\uB3D9** \u203A **\uAD6C\uAE00 \uACC4\uC815 \uC5F0\uACB0** \uBC84\uD2BC \u2192 \uAD6C\uAE00 \uB3D9\uC758 \uD654\uBA74\uC5D0\uC11C \uD5C8\uC6A9 \u2192 \uC5C5\uBB34\uD568\uC73C\uB85C \uB3CC\uC544\uC635\uB2C8\uB2E4(\uC5F0\uACB0 \uC644\uB8CC \uC54C\uB9BC).","\uC5F0\uACB0 \uC9C1\uD6C4 \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0 **\uC804\uC6A9 \uCE98\uB9B0\uB354**\uAC00 \uB9CC\uB4E4\uC5B4\uC9C0\uACE0 \uB0B4 \uC5C5\uBB34\uAC00 \uCC44\uC6CC\uC9D1\uB2C8\uB2E4(\uAC74\uC218\uAC00 \uB9CE\uC73C\uBA74 \uC7A0\uC2DC \uAC78\uB9BD\uB2C8\uB2E4).","\uAC00\uC838\uC624\uAE30\uB97C \uCF1C\uBA74 \uD5E4\uB354\uC758 **\uC678\uBD80 \uCE98\uB9B0\uB354 \uC77C\uC815** \uC2A4\uC704\uCE58\uB85C \uAD6C\uAE00 \uC77C\uC815 \uD45C\uC2DC\uB97C \uD55C \uBC88\uC5D0 \uCF1C\uACE0 \uB055\uB2C8\uB2E4(\uD654\uBA74\uC774 \uC881\uC73C\uBA74 \u22EE \uBA54\uB274 \uC548).",'\uAD6C\uAE00\uC774 "\uD655\uC778\uB418\uC9C0 \uC54A\uC740 \uC571" \uACBD\uACE0\uB97C \uBCF4\uC5EC\uC8FC\uBA74 **\uACE0\uAE09 \u203A \uACC4\uC18D**\uC73C\uB85C \uC9C4\uD589\uD569\uB2C8\uB2E4.']},{title:"\uC54C\uC544 \uB458 \uC810",lines:["\uC804\uC6A9 \uCE98\uB9B0\uB354 \uC548\uC758 \uC77C\uC815\uC740 \uC5C5\uBB34\uD568\uC774 \uAD00\uB9AC\uD569\uB2C8\uB2E4 \u2014 \uAD6C\uAE00\uC5D0\uC11C \uACE0\uCCD0\uB3C4 \uB2E4\uC74C \uBCC0\uACBD \uB54C \uC5C5\uBB34\uD568 \uB0B4\uC6A9\uC73C\uB85C \uB418\uB3CC\uC544\uAC11\uB2C8\uB2E4. \uC5C5\uBB34\uB294 \uC5C5\uBB34\uD568\uC5D0\uC11C \uACE0\uCE58\uC138\uC694.","\uD45C\uC2DC\uAC00 \uC5B4\uAE0B\uB09C \uAC83 \uAC19\uC73C\uBA74 **\uC804\uCCB4 \uB2E4\uC2DC \uB0B4\uBCF4\uB0B4\uAE30**\uB85C \uADF8 \uCE98\uB9B0\uB354\uB97C \uB0B4 \uC5C5\uBB34 \uAE30\uC900\uC73C\uB85C \uB2E4\uC2DC \uCC44\uC6C1\uB2C8\uB2E4.","**\uC5F0\uACB0 \uD574\uC81C**\uD558\uBA74 \uAD8C\uD55C\uC740 \uB04A\uAE30\uC9C0\uB9CC \uAD6C\uAE00 \uCABD \uC804\uC6A9 \uCE98\uB9B0\uB354\uB294 \uB0A8\uC2B5\uB2C8\uB2E4. \uD544\uC694\uD558\uBA74 \uAD6C\uAE00 \uCE98\uB9B0\uB354\uC5D0\uC11C \uC9C0\uC6B0\uC138\uC694.","\uD55C \uC0AC\uB78C\uC774 \uC5EC\uB7EC \uAE30\uAE30\uC5D0\uC11C \uC368\uB3C4 \uC5F0\uACB0\uC740 \uACC4\uC815\uB2F9 \uD55C \uBC88\uC774\uBA74 \uB429\uB2C8\uB2E4. \uC560\uD50C\xB7\uB124\uC774\uBC84 \uCE98\uB9B0\uB354 \uC5F0\uB3D9\uC740 \uC81C\uACF5\uD558\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4."]}]};var bb={id:"shortcuts",tabTitle:"\uB2E8\uCD95\uD0A4",topics:[]};var oc=[ub,db,pb,fb,gb,xb,bb];function hb({open:e,onClose:t}){return{modals:{dialog:Zt({modalIdPrefix:"taskbox-shortcut-help-dialog",open:e,onClose:t})}}}function kb({open:e,onClose:t,features:o,initialTab:n}){let[r,i]=lM(0);return{modals:{dialog:Zt({modalIdPrefix:"taskbox-manual-dialog",open:e,onClose:t,onOpen:()=>{let s=oc.filter(m=>!m.feature||o[m.feature]!==!1).findIndex(m=>m.id===n);i(Math.max(0,s))}})},activeTabIndex:r,setActiveTabIndex:i}}import{jsx as Ar,jsxs as Tb}from"react/jsx-runtime";function uM({keys:e}){return Ar(ol,{sx:{display:"flex",alignItems:"center",gap:.5,justifyContent:"flex-end"},children:e.split(" \u2192 ").map((t,o)=>Tb(ol,{sx:{display:"flex",alignItems:"center",gap:.5},children:[o>0?Ar(cM,{sx:{fontSize:18,color:"#9a9a97"}}):null,Ar(ol,{component:"span",sx:{minWidth:32,height:32,px:.75,display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:13.5,fontWeight:700,color:"#37352f",bgcolor:"#f4f4f2",border:"1px solid #e0dfdb",borderRadius:1,fontVariantNumeric:"tabular-nums"},children:t})]},`${t}-${o}`))})}function ZX({open:e,onClose:t,views:o}){let{modals:n}=hb({open:e,onClose:t}),r=tl(o);return Ar(mM,{open:n.dialog.isOpen,onClose:n.dialog.close,maxWidth:"xs",title:"\uB2E8\uCD95\uD0A4",locale:"ko",titleIcons:{delete:{visible:!1}},tabs:{visible:!1},sectionContentPaddingTop:0,sections:[{id:"shortcuts",showTitle:!1,children:Ar(ol,{sx:{display:"grid",gridTemplateColumns:"auto 1fr",columnGap:2,rowGap:1.25,alignItems:"center",fontSize:14,color:"#37352f"},children:r.map(i=>Tb(ol,{sx:{display:"contents"},children:[Ar(uM,{keys:i.keys}),Ar("span",{children:i.description})]},i.keys))})}],actions:{showCancelButton:!1,right:Ar(sM,{variant:"contained",onClick:n.dialog.close,children:"\uB2EB\uAE30"})}})}import{Fragment as Vu}from"react";import{Box as yt,Button as dM}from"@mui/material";import pM from"@mui/icons-material/ArrowRightAlt";import fM from"@mui/icons-material/ChevronRightRounded";import gM from"@mui/icons-material/ArrowForward";import{FormDialog as xM}from"@ehfuse/mui-form-dialog";import{Fragment as BM,jsx as Xe,jsxs as cr}from"react/jsx-runtime";function nc(e){return e.split(/(\*\*[^*]+\*\*|\s*(?:→|->)\s*)/g).filter(o=>o.length>0).map((o,n)=>o.startsWith("**")&&o.endsWith("**")?Xe(yt,{component:"strong",sx:{fontWeight:700},children:o.slice(2,-2)},n):/^\s*(?:→|->)\s*$/.test(o)?Xe(gM,{sx:{fontSize:"1em",verticalAlign:"-0.15em",mx:.5,color:"text.secondary"}},n):Xe(Vu,{children:o},n))}function bM({keys:e}){let t=xe();return Xe(yt,{sx:{display:"flex",alignItems:"center",gap:.5,justifyContent:"flex-end"},children:e.split(" \u2192 ").map((o,n)=>cr(yt,{sx:{display:"flex",alignItems:"center",gap:.5},children:[n>0?Xe(pM,{sx:{fontSize:20,color:t.colors.textMuted}}):null,Xe(yt,{component:"span",sx:{minWidth:36,height:36,px:1,display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:15,fontWeight:600,color:t.colors.textPrimary,bgcolor:t.colors.surfaceSubtle,border:`1px solid ${t.colors.border}`,borderRadius:1,fontVariantNumeric:"tabular-nums"},children:o})]},`${o}-${n}`))})}function hM({steps:e}){let t=xe();return Xe(yt,{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",sm:"repeat(3, minmax(0, 1fr))"},gap:{xs:1,sm:2},mt:1.5},children:e.map((o,n)=>cr(yt,{sx:{position:"relative",minWidth:0,px:1.75,py:2.5,borderRadius:2,bgcolor:t.colors.surfaceSubtle,border:`1px solid ${t.colors.border}`,"&::before":{content:'""',position:"absolute",top:-1,left:12,right:12,height:3,borderRadius:"0 0 3px 3px",bgcolor:t.colors.accent,opacity:.85},"&::after":n<e.length-1?{content:'""',display:{xs:"none",sm:"block"},position:"absolute",top:"50%",right:-12,width:8,height:8,mt:"-4px",borderTop:`2px solid ${t.colors.borderStrong}`,borderRight:`2px solid ${t.colors.borderStrong}`,transform:"rotate(45deg)"}:void 0},children:[cr(yt,{sx:{display:"flex",alignItems:"center",gap:1,minWidth:0},children:[Xe(yt,{sx:{flexShrink:0,width:26,height:26,borderRadius:"50%",display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:13,fontWeight:500,lineHeight:1,bgcolor:t.colors.accent,color:t.colors.accentContrast,fontVariantNumeric:"tabular-nums"},children:n+1}),Xe(yt,{sx:{minWidth:0,fontSize:20,fontWeight:500,color:t.colors.textStrong,lineHeight:1.3,letterSpacing:"-0.01em"},children:o.title})]}),Xe(yt,{sx:{mt:1.5,fontSize:15,lineHeight:1.5,color:t.colors.textPrimary,wordBreak:"keep-all"},children:o.desc})]},o.title))})}var Sb="70vh",kM=24,TM=44,yb=`calc((${Sb} - ${kM*2+TM}px) / var(--mfd-font-scale, 1))`,yM=148;function SM({items:e}){let t=xe();return Xe(yt,{sx:{mt:1.5,display:"grid",gridTemplateColumns:{xs:"1fr",sm:`${yM}px minmax(0, 1fr)`},fontSize:15,lineHeight:1.6,color:t.colors.textPrimary,border:`1px solid ${t.colors.border}`,borderRadius:1.5,overflow:"hidden","& > *":{px:1.5,py:1.35,borderTop:`1px solid ${t.colors.border}`},"& > *:nth-of-type(even)":{borderLeft:{sm:`1px solid ${t.colors.border}`}},"& > *:nth-of-type(1)":{borderTop:0},"& > *:nth-of-type(2)":{borderTop:{xs:`1px solid ${t.colors.border}`,sm:0}}},children:e.map(o=>cr(Vu,{children:[Xe(yt,{sx:{fontWeight:500,color:t.colors.textStrong,wordBreak:"keep-all",bgcolor:t.colors.surfaceSubtle,display:"flex",alignItems:"center",justifyContent:"center",textAlign:"center"},children:o.term}),Xe(yt,{sx:{wordBreak:"keep-all"},children:nc(o.desc)})]},o.term))})}function CM({topic:e}){let t=xe();return cr(yt,{component:"section",sx:{py:{xs:3,sm:4},borderBottom:`1px solid ${t.colors.border}`,"&:last-of-type":{pb:0,borderBottom:0}},children:[cr(yt,{component:"h3",sx:{m:0,mb:1.75,fontSize:24,fontWeight:500,letterSpacing:"-0.01em",lineHeight:1.3,color:t.colors.textStrong,wordBreak:"keep-all",display:"flex",alignItems:"center",flexWrap:"wrap"},children:[e.title,e.subtitle?cr(BM,{children:[Xe(fM,{sx:{fontSize:22,color:t.colors.textMuted,mx:1,flexShrink:0}}),Xe(yt,{component:"span",sx:{fontSize:18,fontWeight:400,color:t.colors.textPrimary},children:e.subtitle})]}):null]}),e.lead?Xe(yt,{sx:{fontSize:15.5,lineHeight:1.65,color:t.colors.textPrimary,wordBreak:"keep-all"},children:nc(e.lead)}):null,e.steps?.length?Xe(hM,{steps:e.steps}):null,e.items?.length?Xe(SM,{items:e.items}):null,e.lines?.length?Xe(yt,{component:"ul",sx:{m:0,mt:e.lead||e.steps||e.items?1.25:0,pl:2.5,display:"flex",flexDirection:"column",gap:.5,fontSize:15,lineHeight:1.6,color:t.colors.textPrimary,wordBreak:"keep-all"},children:e.lines.map((o,n)=>Xe("li",{children:nc(o)},n))}):null]})}function uQ({open:e,onClose:t,views:o,features:n={},initialTab:r}){let i=xe(),{modals:a,activeTabIndex:l,setActiveTabIndex:s}=kb({open:e,onClose:t,features:n,initialTab:r}),m=d=>!d||n[d]!==!1,c=tl(o),p=oc.filter(d=>m(d.feature)).map(d=>({id:d.id,tabTitle:d.tabTitle,showTitle:!1,children:d.id==="shortcuts"?Xe(yt,{sx:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:yb,maxHeight:yb,px:.5},children:Xe(yt,{sx:{display:"grid",gridTemplateColumns:"auto auto",columnGap:2.5,rowGap:1.75,alignItems:"center",fontSize:17,fontWeight:500,color:i.colors.textPrimary},children:c.map(u=>cr(Vu,{children:[Xe(bM,{keys:u.keys}),Xe("span",{children:u.description})]},u.keys))})}):cr(yt,{sx:{display:"flex",flexDirection:"column",px:.5},children:[d.intro?Xe(yt,{sx:{p:2,borderRadius:2,bgcolor:i.colors.accentSoft,color:i.colors.textStrong,fontSize:15.5,lineHeight:1.65,wordBreak:"keep-all"},children:nc(d.intro)}):null,d.topics.filter(u=>m(u.feature)).map(u=>Xe(CM,{topic:u},u.title))]})}));return Xe(xM,{open:a.dialog.isOpen,onClose:a.dialog.close,maxWidth:"md",title:"\uC5C5\uBB34\uD568 \uC124\uBA85\uC11C",locale:"ko",titleIcons:{delete:{visible:!1}},tabs:{visible:!0,switchContent:!0},activeTabValue:l,onTabChange:s,fixedHeight:"70vh",maxContentHeight:Sb,sectionContentPaddingTop:0,fontScale:{enabled:!0},fontScaleKey:"taskbox-manual",sections:p,actions:{showCancelButton:!1,right:Xe(dM,{variant:"contained",onClick:a.dialog.close,sx:{minWidth:80},children:"\uB2EB\uAE30"})}})}import{useEffect as wM,useRef as DM,useState as Ib}from"react";import{Box as St,Button as Tn,IconButton as Gu,Menu as _b,MenuItem as wb,Switch as EM,Tooltip as Db}from"@mui/material";import{FormDialog as Eb}from"@ehfuse/mui-form-dialog";import Ku from"@mui/icons-material/Add";import RM from"@mui/icons-material/ArrowRightAlt";import MM from"@mui/icons-material/BoltOutlined";import PM from"@mui/icons-material/Close";import OM from"@mui/icons-material/EditOutlined";import{ClearTextField as nl,LabelSelect as No}from"@ehfuse/mui-form-controls";import{useEffect as vM,useRef as Cb}from"react";import{useGlobalForm as IM,useModal as _M}from"@ehfuse/forma";import{ErrorAlert as Bb}from"@ehfuse/alerts";var Vi=[{value:"due_date",label:"\uB9C8\uAC10\uC608\uC815"},{value:"start_date",label:"\uC2DC\uC791\uC77C\uC2DC"},{value:"priority",label:"\uC911\uC694\uB3C4"},{value:"manager_account_seq",label:"\uCC45\uC784\uC790"},{value:"receiver_account_seqs",label:"\uCC38\uC870\uC790"},{value:"label_keys",label:"\uB77C\uBCA8"},{value:"group_seq",label:"\uD504\uB85C\uC81D\uD2B8"},{value:"sprint_seq",label:"\uBAA9\uD45C"},{value:"content",label:"\uB0B4\uC6A9"},{value:"note",label:"\uBE44\uACE0"}];function rc(){return{editSeq:0,name:"",trigger:"created",enabled:!0,sort_no:0,condition:{},action:{}}}function Uu(e){return e.filter(t=>!t.archived).map(t=>({value:String(hn(t.key)),label:t.label}))}function ic(e){return e.map(t=>({value:t.key,label:t.name}))}function vb(e){let t=Cb(e);t.current=e;let o=IM({formId:we("taskbox-rule-form"),initialValues:rc(),onValidate:y=>y.name.trim()?Object.keys(y.action??{}).length===0?(Bb({message:"\uB3D9\uC791\uC744 \uD558\uB098 \uC774\uC0C1 \uCD94\uAC00\uD558\uC138\uC694."}),!1):!0:(Bb({message:"\uADDC\uCE59 \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694."}),!1),onSubmit:async y=>{let{editSeq:T,...I}=y,A=T>0?I.sort_no:t.current.rules.reduce((C,k)=>Math.max(C,k.sort_no),0)+1,q=T>0?await t.current.onUpdate(T,{...I,sort_no:A}):await t.current.onCreate({...I,sort_no:A});return q&&n.form.close(),q}}),n={list:Xo({modalId:we("taskbox-rule-manage"),open:e.open,onClose:()=>t.current.onClose()}),form:_M({modalId:we("taskbox-rule-edit"),onClose:()=>o.setFormValues(rc())})},r=Cb(n.form);r.current=n.form,vM(()=>{if(e.open)return;let y=window.setTimeout(()=>{r.current.isOpen&&r.current.close(),o.setFormValues(rc())},500);return()=>window.clearTimeout(y)},[e.open]);let i=()=>({...o.getFormValue("condition")??{}}),a=()=>({...o.getFormValue("action")??{}}),l=(y,T)=>{let I=i();T===""||T===void 0||T===null?delete I[y]:I[y]=T,o.setFormValue("condition",I)},s=(y,T)=>{let I=a();T===""||T===void 0||T===null?delete I[y]:I[y]=T,o.setFormValue("action",I)},m=()=>{o.setFormValues(rc()),n.form.open()},c=y=>{o.setFormValues({editSeq:y.seq,name:y.name,trigger:y.trigger,enabled:y.enabled,sort_no:y.sort_no,condition:{...y.condition,...y.trigger==="field_changed"&&y.condition.changed_field===void 0?{changed_field:Vi[0]?.value??""}:{}},action:{...y.action}}),n.form.open()},p=y=>{let T=i();y!=="status_changed"&&(delete T.from_status,delete T.to_status),y!=="overdue"&&delete T.overdue_days,y!=="field_changed"&&delete T.changed_field,y!=="commented"&&(delete T.comment_contains,delete T.comment_by_others),y==="field_changed"&&T.changed_field===void 0&&(T.changed_field=Vi[0]?.value??""),o.setFormValues({trigger:y,condition:T})},d=async y=>{let T=t.current.onPickAccount;if(!T)return;let I=i(),A=y==="manager_account"?I.manager_account_seq??0:I.receiver_account_seq??0,q=await T(A,y==="manager_account"?"\uCC45\uC784\uC790":"\uCC38\uC870\uC790");if(!q)return;let C=i();y==="manager_account"?(C.manager_account_seq=q.accountSeq,C.manager_name=q.name):(C.receiver_account_seq=q.accountSeq,C.receiver_name=q.name),o.setFormValue("condition",C)},u=y=>{let T=Uu(t.current.customTabs),I=ic(t.current.statusOptions);y==="group_seq"?l("group_seq",Number(T[0]?.value)||0):y==="kind"?l("is_bug",!0):y==="priority"?l("priority","high"):y==="label_key"?l("label_key",I[0]?.value??""):y==="title_contains"?o.setFormValue("condition",{...i(),title_contains:""}):y==="manager_empty"?l("manager_empty",!0):y==="manager_account"||y==="receiver_account"?d(y):y==="from_status"?l("from_status",Io[0]?.key??""):y==="to_status"?l("to_status",Io[0]?.key??""):y==="changed_field"?l("changed_field",Vi[0]?.value??""):y==="comment_contains"?o.setFormValue("condition",{...i(),comment_contains:""}):y==="comment_by_others"?l("comment_by_others",!0):y==="overdue_days"&&l("overdue_days",1)},f=y=>{if(y==="kind"){l("is_bug",""),l("is_event","");return}if(y==="manager_account"){l("manager_account_seq",""),l("manager_name","");return}if(y==="receiver_account"){l("receiver_account_seq",""),l("receiver_name","");return}l(y,"")},g=y=>{l("is_bug",y?!0:""),l("is_event",y?"":!0)},v=async y=>{let T=t.current.onPickAccount;if(!T)return;let I=a(),A=y==="assign_manager"?I.assign_manager_account_seq??0:y==="add_receiver"?I.add_receiver_account_seq??0:I.notify_account_seq??0,q=await T(A,y==="assign_manager"?"\uCC45\uC784\uC790":y==="add_receiver"?"\uCC38\uC870\uC790":"\uC54C\uB9BC \uBC1B\uC744 \uC0AC\uB78C");if(!q)return;let C=a();y==="assign_manager"?(C.assign_manager_account_seq=q.accountSeq,C.assign_manager_name=q.name):y==="add_receiver"?(C.add_receiver_account_seq=q.accountSeq,C.add_receiver_name=q.name):(C.notify_account_seq=q.accountSeq,C.notify_name=q.name),o.setFormValue("action",C)};return{form:o,modals:n,actions:{openCreate:m,openEdit:c,changeTrigger:p,setCondition:l,setAction:s,addCondition:u,removeCondition:f,changeKind:g,pickConditionAccount:d,addAction:y=>{let T=ic(t.current.statusOptions);if(y==="set_status")s("set_status",Io[0]?.key??"");else if(y==="set_priority")s("set_priority","high");else if(y==="add_label_key")s("add_label_key",T[0]?.value??"");else if(y==="apply_content_template"){let I=t.current.contentTemplates[0];o.setFormValue("action",{...a(),apply_content_template_seq:I?.seq??0,apply_content_template_name:I?.name??""})}else v(y)},removeAction:y=>{y==="assign_manager"?(s("assign_manager_account_seq",""),s("assign_manager_name","")):y==="add_receiver"?(s("add_receiver_account_seq",""),s("add_receiver_name","")):y==="apply_content_template"?(s("apply_content_template_seq",""),s("apply_content_template_name","")):y==="notify"?(s("notify_account_seq",""),s("notify_name",""),s("notify_message","")):s(y,"")},pickAccountFor:v,selectContentTemplate:y=>{let T=t.current.contentTemplates.find(I=>String(I.seq)===String(y));o.setFormValue("action",{...a(),apply_content_template_seq:T?.seq??0,apply_content_template_name:T?.name??""})},toggleRule:(y,T)=>t.current.onToggle(y,T),removeRule:y=>t.current.onRemove(y)}}}import{Fragment as Mb,jsx as le,jsxs as Zo}from"react/jsx-runtime";var Yu=[{value:"created",label:"\uC5C5\uBB34 \uB4F1\uB85D \uC2DC",hint:"\uC0C8 \uC5C5\uBB34\uAC00 \uB9CC\uB4E4\uC5B4\uC9C4 \uC9C1\uD6C4 \uD55C \uBC88 \uC2E4\uD589\uD569\uB2C8\uB2E4."},{value:"status_changed",label:"\uC0C1\uD0DC \uBCC0\uACBD \uC2DC",hint:"\uC0C1\uD0DC\uAC00 \uC2E4\uC81C\uB85C \uBC14\uB010 \uC9C1\uD6C4 \uC2E4\uD589\uD569\uB2C8\uB2E4."},{value:"commented",label:"\uB313\uAE00\uC774 \uB2EC\uB838\uC744 \uB54C",hint:"\uB313\uAE00\uC774 \uC0C8\uB85C \uB2EC\uB9AC\uAC70\uB098 \uC218\uC815\uB41C \uC9C1\uD6C4 \uC2E4\uD589\uD569\uB2C8\uB2E4(\uD68C\uC2E0\uC744 \uBC1B\uC740 \uC790\uB9AC)."},{value:"manager_assigned",label:"\uCC45\uC784\uC790\uAC00 \uC9C0\uC815\uB410\uC744 \uB54C",hint:"\uCC45\uC784\uC790\uAC00 \uC0C8\uB85C \uC9C0\uC815\uB418\uAC70\uB098 \uBC14\uB010 \uC9C1\uD6C4 \uC2E4\uD589\uD569\uB2C8\uB2E4."},{value:"attachment_added",label:"\uCCA8\uBD80\uAC00 \uC62C\uB77C\uC654\uC744 \uB54C",hint:"\uC5C5\uBB34\uC5D0 \uD30C\uC77C\uC774 \uCCA8\uBD80\uB41C \uC9C1\uD6C4 \uC2E4\uD589\uD569\uB2C8\uB2E4(\uC99D\uBE59 \uC811\uC218 \uC790\uB9AC)."},{value:"field_changed",label:"\uD544\uB4DC\uAC00 \uBC14\uB00C\uC5C8\uC744 \uB54C",hint:"\uC9C0\uC815\uD55C \uD544\uB4DC\uAC00 \uC2E4\uC81C\uB85C \uBC14\uB010 \uC9C1\uD6C4 \uC2E4\uD589\uD569\uB2C8\uB2E4(\uD544\uB4DC\uB97C \uC548 \uACE0\uB974\uBA74 \uC544\uBB34 \uC218\uC815\uC5D0\uB098 \uC2E4\uD589)."},{value:"overdue",label:"\uB9C8\uAC10 \uACBD\uACFC \uC2DC",hint:"\uB9C8\uAC10\uC774 \uC9C0\uB09C \uBBF8\uC644\uB8CC \uC5C5\uBB34\uB97C \uB9E4\uC77C \uC810\uAC80\uD574 \uC2E4\uD589\uD569\uB2C8\uB2E4."}],lc=[{value:"high",label:"\uB192\uC74C"},{value:"medium",label:"\uC911\uAC04"},{value:"low",label:"\uB0AE\uC74C"}];function ac(e){return Io.find(t=>t.key===e)?.name??e}function qM(e,t,o){let{condition:n,action:r}=e,i=[];if(n.group_seq){let s=t.find(m=>hn(m.key)===n.group_seq);i.push(`\uD504\uB85C\uC81D\uD2B8=${s?.label??`#${n.group_seq}`}`)}n.is_bug===!0&&i.push("\uC624\uB958\uB9CC"),n.is_event===!0&&i.push("\uC77C\uC815\uB9CC"),n.priority&&i.push(`\uC911\uC694\uB3C4=${lc.find(s=>s.value===n.priority)?.label}`),n.label_key&&i.push(`\uB77C\uBCA8=${o.find(s=>s.key===n.label_key)?.name??n.label_key}`),n.title_contains&&i.push(`\uC81C\uBAA9\uC5D0 "${n.title_contains}" \uD3EC\uD568`),n.status&&i.push(`\uC0C1\uD0DC=${ac(n.status)}`),n.from_status&&i.push(`${ac(n.from_status)}\uC5D0\uC11C`),n.to_status&&i.push(`${ac(n.to_status)}\uB85C`),n.manager_empty===!0&&i.push("\uCC45\uC784\uC790 \uC5C6\uC74C"),n.manager_empty===!1&&i.push("\uCC45\uC784\uC790 \uC788\uC74C"),n.manager_account_seq&&i.push(`\uCC45\uC784\uC790=${n.manager_name||`\uACC4\uC815 #${n.manager_account_seq}`}`),n.receiver_account_seq&&i.push(`\uCC38\uC870\uC790\uC5D0 ${n.receiver_name||`\uACC4\uC815 #${n.receiver_account_seq}`}`),n.changed_field&&i.push(`${Vi.find(s=>s.value===n.changed_field)?.label??n.changed_field} \uBCC0\uACBD`),n.comment_contains&&i.push(`\uB313\uAE00\uC5D0 "${n.comment_contains}" \uD3EC\uD568`),n.comment_by_others===!0&&i.push("\uB0A8\uC774 \uC4F4 \uB313\uAE00"),typeof n.overdue_days=="number"&&i.push(`${n.overdue_days}\uC77C \uACBD\uACFC`);let a=[];r.set_status&&a.push(`\uC0C1\uD0DC=${ac(r.set_status)}`),r.set_priority&&a.push(`\uC911\uC694\uB3C4=${lc.find(s=>s.value===r.set_priority)?.label}`),r.assign_manager_account_seq&&a.push(`\uCC45\uC784\uC790=${r.assign_manager_name||"\uC9C0\uC815"}`),r.add_receiver_account_seq&&a.push(`\uCC38\uC870\uC790 + ${r.add_receiver_name||"\uC9C0\uC815"}`),r.add_label_key&&a.push(`\uB77C\uBCA8 + ${o.find(s=>s.key===r.add_label_key)?.name??r.add_label_key}`),r.apply_content_template_seq&&a.push(`\uBCF8\uBB38 \uC591\uC2DD=${r.apply_content_template_name||"\uC9C0\uC815"}`),r.notify_account_seq&&a.push("\uC54C\uB9BC \uBC1C\uC1A1");let l=Yu.find(s=>s.value===e.trigger)?.label??e.trigger;return{left:i.length>0?`${l} \xB7 ${i.join(", ")}`:l,right:a.join(", ")||"\uB3D9\uC791 \uC5C6\uC74C"}}var Rb={fontSize:16,fontWeight:700,color:"#37352f"},zM={display:"flex",alignItems:"center",gap:1},AM={width:104,flexShrink:0,fontSize:16,color:"#37352f"};function qQ({open:e,rules:t,customTabs:o,statusOptions:n,contentTemplates:r=[],onPickAccount:i,onClose:a,onCreate:l,onUpdate:s,onToggle:m,onRemove:c}){let p=vb({open:e,rules:t,customTabs:o,statusOptions:n,contentTemplates:r,onPickAccount:i,onClose:a,onCreate:l,onUpdate:s,onToggle:m,onRemove:c}),{form:d,actions:u}=p,f=p.modals.list,g=p.modals.form,{setCondition:v,setAction:D,removeCondition:b,removeAction:S,pickConditionAccount:h,pickAccountFor:E,changeTrigger:y}=u,T=d.isSubmitting,I=DM(null),[A,q]=Ib(null),[C,k]=Ib(null);wM(()=>{if(!g.isOpen)return;let F=window.setTimeout(()=>I.current?.focus(),120);return()=>window.clearTimeout(F)},[g.isOpen]);let x=Number(d.useValue("editSeq")??0)>0,B=d.useValue("trigger")??"created",w=ic(n),P=Io.map(F=>({value:F.key,label:F.name})),H=Uu(o),_=d.useValue("condition")??{},N=d.useValue("action")??{},G=_.is_bug!==void 0||_.is_event!==void 0,Q=[..._.group_seq===void 0&&H.length>0?[{key:"group_seq",label:"\uD504\uB85C\uC81D\uD2B8\uAC00 ~\uC778 \uACBD\uC6B0"}]:[],...G?[]:[{key:"kind",label:"\uC885\uB958\uAC00 \uC624\uB958/\uC77C\uC815\uC778 \uACBD\uC6B0"}],..._.priority===void 0?[{key:"priority",label:"\uC911\uC694\uB3C4\uAC00 ~\uC778 \uACBD\uC6B0"}]:[],..._.label_key===void 0&&w.length>0?[{key:"label_key",label:"\uB77C\uBCA8\uC774 \uBD99\uC5B4 \uC788\uB294 \uACBD\uC6B0"}]:[],..._.title_contains===void 0?[{key:"title_contains",label:"\uC81C\uBAA9\uC5D0 ~ \uB2E8\uC5B4\uAC00 \uD3EC\uD568\uB41C \uACBD\uC6B0"}]:[],..._.manager_empty===void 0?[{key:"manager_empty",label:"\uCC45\uC784\uC790\uAC00 \uC5C6\uB294/\uC788\uB294 \uACBD\uC6B0"}]:[],...i&&_.manager_account_seq===void 0?[{key:"manager_account",label:"\uCC45\uC784\uC790\uAC00 ~\uC778 \uACBD\uC6B0"}]:[],...i&&_.receiver_account_seq===void 0?[{key:"receiver_account",label:"\uCC38\uC870\uC790\uC5D0 ~\uAC00 \uD3EC\uD568\uB41C \uACBD\uC6B0"}]:[],...B==="status_changed"&&_.from_status===void 0?[{key:"from_status",label:"\uC774 \uC0C1\uD0DC\uC5D0\uC11C \uBC14\uB010 \uACBD\uC6B0"}]:[],...B==="status_changed"&&_.to_status===void 0?[{key:"to_status",label:"\uC774 \uC0C1\uD0DC\uB85C \uBC14\uB010 \uACBD\uC6B0"}]:[],...B==="field_changed"&&_.changed_field===void 0?[{key:"changed_field",label:"~ \uD544\uB4DC\uAC00 \uBCC0\uACBD\uB41C \uACBD\uC6B0"}]:[],...B==="commented"&&_.comment_contains===void 0?[{key:"comment_contains",label:"\uB313\uAE00\uC5D0 ~ \uB2E8\uC5B4\uAC00 \uD3EC\uD568\uB41C \uACBD\uC6B0"}]:[],...B==="commented"&&_.comment_by_others===void 0?[{key:"comment_by_others",label:"\uCC45\uC784\uC790\uAC00 \uC544\uB2CC \uC0AC\uB78C\uC774 \uC4F4 \uACBD\uC6B0"}]:[],...B==="overdue"&&_.overdue_days===void 0?[{key:"overdue_days",label:"\uB9C8\uAC10 \uD6C4 \uBA70\uCE60 \uC9C0\uB09C \uACBD\uC6B0"}]:[]],se=F=>{q(null),u.addCondition(F)},me=[...N.set_status===void 0?[{key:"set_status",label:"\uC0C1\uD0DC \uBC14\uAFB8\uAE30"}]:[],...N.set_priority===void 0?[{key:"set_priority",label:"\uC911\uC694\uB3C4 \uBC14\uAFB8\uAE30"}]:[],...N.add_label_key===void 0&&w.length>0?[{key:"add_label_key",label:"\uB77C\uBCA8 \uBD99\uC774\uAE30"}]:[],...i&&N.assign_manager_account_seq===void 0?[{key:"assign_manager",label:"\uCC45\uC784\uC790 \uC9C0\uC815\uD558\uAE30"}]:[],...i&&N.add_receiver_account_seq===void 0?[{key:"add_receiver",label:"\uCC38\uC870\uC790 \uCD94\uAC00\uD558\uAE30"}]:[],...r.length>0&&N.apply_content_template_seq===void 0?[{key:"apply_content_template",label:"\uBCF8\uBB38 \uC591\uC2DD \uCC44\uC6B0\uAE30"}]:[],...i&&N.notify_account_seq===void 0?[{key:"notify",label:"\uC54C\uB9BC \uBCF4\uB0B4\uAE30"}]:[]],Y=F=>{k(null),u.addAction(F)},O=(F,W,V,U)=>Zo(St,{sx:zM,children:[le(St,{sx:AM,children:F}),Zo(St,{sx:{flex:1,minWidth:0,display:"flex",flexDirection:U?"column":"row",alignItems:U?"stretch":"center",gap:U?.5:1},children:[W,U?le(St,{sx:{fontSize:13.5,color:"#37352f"},children:U}):null]}),le(Db,{title:"\uC774 \uC904 \uBE7C\uAE30",arrow:!0,disableInteractive:!0,children:le(Gu,{size:"small","aria-label":`${F} \uC904 \uBE7C\uAE30`,onClick:V,children:le(PM,{sx:{fontSize:16}})})})]}),oe=()=>Zo(St,{sx:{display:"flex",flexDirection:"column",gap:2.5},children:[le(nl,{size:"medium",label:"\uADDC\uCE59 \uC774\uB984",inputRef:I,placeholder:"\uC608: \uC811\uC218 \uC624\uB958 \uC790\uB3D9 \uBC30\uC815",name:"name",form:d}),le(St,{sx:{display:"flex",alignItems:"center",gap:2,flexWrap:"wrap"},children:Yu.map(F=>{let W=B===F.value;return le(Tn,{disableElevation:!0,variant:W?"contained":"outlined",color:W?"primary":"inherit",onClick:()=>y(F.value),sx:{borderRadius:99,px:1.75,...W?{}:{color:"#57564f",borderColor:"#d9d9d6"}},children:F.label},F.value)})}),le(St,{sx:{fontSize:13,color:"#787774",mt:-.5},children:Yu.find(F=>F.value===B)?.hint}),Zo(St,{sx:{display:"flex",alignItems:"center",gap:1,mt:.5},children:[le(St,{sx:Rb,children:"\uC5B4\uB5A4 \uC5C5\uBB34\uC77C \uB54C"}),Q.length>0?le(Tn,{size:"small",startIcon:le(Ku,{sx:{fontSize:16}}),onClick:F=>q(F.currentTarget),sx:{color:"#2563eb",minWidth:0},children:"\uC870\uAC74 \uCD94\uAC00"}):null]}),_.group_seq!==void 0?O("\uD504\uB85C\uC81D\uD2B8",le(No,{size:"medium",fullWidth:!0,label:"",value:String(_.group_seq),options:H,onChange:F=>v("group_seq",Number(F.target.value)||"")}),()=>b("group_seq")):null,G?O("\uC885\uB958",le(No,{size:"medium",fullWidth:!0,label:"",value:_.is_bug?"bug":"event",options:[{value:"bug",label:"\uC624\uB958\uB9CC"},{value:"event",label:"\uC77C\uC815\uB9CC"}],onChange:F=>{let W=F.target.value==="bug";v("is_bug",W?!0:""),v("is_event",W?"":!0)}}),()=>b("kind")):null,_.priority!==void 0?O("\uC911\uC694\uB3C4",le(No,{size:"medium",fullWidth:!0,label:"",name:"condition.priority",form:d,options:lc}),()=>b("priority")):null,_.label_key!==void 0?O("\uB77C\uBCA8",le(No,{size:"medium",fullWidth:!0,label:"",name:"condition.label_key",form:d,options:w}),()=>b("label_key")):null,_.title_contains!==void 0?O("\uC81C\uBAA9",le(nl,{size:"medium",fullWidth:!0,placeholder:"\uD3EC\uD568\uD560 \uB0B1\uB9D0 (\uC608: \uAE34\uAE09)",name:"condition.title_contains",form:d}),()=>b("title_contains")):null,_.manager_empty!==void 0?O("\uCC45\uC784\uC790",le(No,{size:"medium",fullWidth:!0,label:"",value:_.manager_empty?"empty":"assigned",options:[{value:"empty",label:"\uC5C6\uC74C"},{value:"assigned",label:"\uC788\uC74C"}],onChange:F=>v("manager_empty",F.target.value==="empty")}),()=>b("manager_empty")):null,_.manager_account_seq!==void 0?O("\uCC45\uC784\uC790",le(Tn,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{h("manager_account")},children:_.manager_name||`\uACC4\uC815 #${_.manager_account_seq}`}),()=>b("manager_account")):null,_.receiver_account_seq!==void 0?O("\uCC38\uC870\uC790",le(Tn,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{h("receiver_account")},children:_.receiver_name||`\uACC4\uC815 #${_.receiver_account_seq}`}),()=>b("receiver_account")):null,_.from_status!==void 0?O("\uC774 \uC0C1\uD0DC\uC5D0\uC11C",le(No,{size:"medium",fullWidth:!0,label:"",name:"condition.from_status",form:d,options:P}),()=>b("from_status")):null,_.to_status!==void 0?O("\uC774 \uC0C1\uD0DC\uB85C",le(No,{size:"medium",fullWidth:!0,label:"",name:"condition.to_status",form:d,options:P}),()=>b("to_status")):null,_.changed_field!==void 0?O("\uBCC0\uACBD \uD544\uB4DC",le(No,{size:"medium",fullWidth:!0,label:"",name:"condition.changed_field",form:d,options:Vi}),()=>b("changed_field")):null,_.comment_contains!==void 0?O("\uB313\uAE00 \uB0B1\uB9D0",le(nl,{size:"medium",fullWidth:!0,placeholder:"\uD3EC\uD568\uD560 \uB0B1\uB9D0 (\uC608: \uD68C\uC2E0)",name:"condition.comment_contains",form:d}),()=>b("comment_contains")):null,_.comment_by_others!==void 0?O("\uB313\uAE00 \uC791\uC131\uC790",le(No,{size:"medium",fullWidth:!0,label:"",value:_.comment_by_others?"others":"any",options:[{value:"others",label:"\uCC45\uC784\uC790\uAC00 \uC544\uB2CC \uC0AC\uB78C"},{value:"any",label:"\uB204\uAD6C\uB4E0"}],onChange:F=>v("comment_by_others",F.target.value==="others")}),()=>b("comment_by_others")):null,_.overdue_days!==void 0?O("\uACBD\uACFC\uC77C",le(nl,{size:"medium",fullWidth:!0,type:"number",value:String(_.overdue_days),onChange:F=>v("overdue_days",Math.max(0,Number(F.target.value)||0)),label:"\uB9C8\uAC10 \uD6C4 \uC9C0\uB09C \uC77C\uC218(\uC774\uC0C1)"}),()=>b("overdue_days")):null,Object.keys(_).length===0?le(St,{sx:{fontSize:13.5,color:"#9a9a97"},children:"\uC870\uAC74\uC774 \uC5C6\uC73C\uBA74 \uBAA8\uB4E0 \uC5C5\uBB34\uC5D0 \uC2E4\uD589\uB429\uB2C8\uB2E4."}):null,Zo(St,{sx:{display:"flex",alignItems:"center",gap:1,mt:.5},children:[le(St,{sx:Rb,children:"\uBB34\uC5C7\uC744 \uD560\uAE4C\uC694"}),me.length>0?le(Tn,{size:"small",startIcon:le(Ku,{sx:{fontSize:16}}),onClick:F=>k(F.currentTarget),sx:{color:"#2563eb",minWidth:0},children:"\uB3D9\uC791 \uCD94\uAC00"}):null]}),N.set_status!==void 0?O("\uC0C1\uD0DC",le(No,{size:"medium",fullWidth:!0,label:"",name:"action.set_status",form:d,options:P}),()=>S("set_status")):null,N.set_priority!==void 0?O("\uC911\uC694\uB3C4",le(No,{size:"medium",fullWidth:!0,label:"",name:"action.set_priority",form:d,options:lc}),()=>S("set_priority")):null,N.apply_content_template_seq!==void 0?O("\uBCF8\uBB38 \uC591\uC2DD",le(No,{size:"medium",fullWidth:!0,label:"",value:String(N.apply_content_template_seq),options:r.map(F=>({value:String(F.seq),label:F.name})),onChange:F=>u.selectContentTemplate(String(F.target.value))}),()=>S("apply_content_template"),"\uBCF8\uBB38\uC774 \uBE44\uC5B4 \uC788\uC744 \uB54C\uB9CC \uCC44\uC6C1\uB2C8\uB2E4(\uC4F4 \uB0B4\uC6A9\uC744 \uB36E\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4)"):null,N.add_label_key!==void 0?O("\uB77C\uBCA8",le(No,{size:"medium",fullWidth:!0,label:"",name:"action.add_label_key",form:d,options:w}),()=>S("add_label_key")):null,N.assign_manager_account_seq!==void 0?O("\uCC45\uC784\uC790",le(Tn,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{E("assign_manager")},children:N.assign_manager_name||`\uACC4\uC815 #${N.assign_manager_account_seq}`}),()=>S("assign_manager")):null,N.add_receiver_account_seq!==void 0?O("\uCC38\uC870\uC790",le(Tn,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{E("add_receiver")},children:N.add_receiver_name||`\uACC4\uC815 #${N.add_receiver_account_seq}`}),()=>S("add_receiver")):null,N.notify_account_seq!==void 0?O("\uC54C\uB9BC",Zo(Mb,{children:[le(Tn,{size:"medium",variant:"outlined",color:"inherit",onClick:()=>{E("notify")},sx:{flexShrink:0},children:N.notify_name||`\uACC4\uC815 #${N.notify_account_seq}`}),le(nl,{size:"medium",fullWidth:!0,placeholder:"\uC54C\uB9BC \uBB38\uAD6C(\uBE44\uC6B0\uBA74 \uAE30\uBCF8 \uBB38\uAD6C)",value:N.notify_message??"",onChange:F=>D("notify_message",F.target.value)})]}),()=>S("notify")):null,Object.keys(N).length===0?le(St,{sx:{fontSize:13.5,color:"#9a9a97"},children:'"+ \uB3D9\uC791 \uCD94\uAC00" \uB85C \uD560 \uC77C\uC744 \uD558\uB098 \uC774\uC0C1 \uACE8\uB77C \uC8FC\uC138\uC694.'}):null,le(_b,{transitionDuration:0,anchorEl:A,open:!!A,onClose:()=>q(null),children:Q.map(F=>le(wb,{dense:!0,onClick:()=>se(F.key),sx:{fontSize:14},children:F.label},F.key))}),le(_b,{transitionDuration:0,anchorEl:C,open:!!C,onClose:()=>k(null),children:me.map(F=>le(wb,{dense:!0,onClick:()=>Y(F.key),sx:{fontSize:14},children:F.label},F.key))})]});return Zo(Mb,{children:[le(Eb,{open:f.isOpen,onClose:f.close,maxWidth:"sm",title:"\uC790\uB3D9\uD654 \uADDC\uCE59",locale:"ko",titleIcons:{delete:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-rule-manage",tabs:{visible:!1},contentPaddingX:0,contentTopPadding:0,contentBottomPadding:0,sectionContentPaddingTop:0,sections:[{id:"rules",title:"",showTitle:!1,children:Zo(St,{sx:{display:"flex",flexDirection:"column",px:2.5,py:2},children:[t.length===0?Zo(St,{sx:{py:4,display:"flex",flexDirection:"column",alignItems:"center",gap:2,color:"#9a9a97"},children:[le(MM,{sx:{fontSize:48,color:"#d9d9d6"}}),le(St,{sx:{fontSize:15},children:"\uB4F1\uB85D\uB41C \uADDC\uCE59\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."})]}):null,t.map(F=>Zo(St,{sx:{display:"flex",alignItems:"center",gap:2,py:1,"&:not(:last-of-type)":{borderBottom:"1px solid #ececea"},opacity:F.enabled?1:.5},children:[le(Db,{title:F.enabled?"\uC0AC\uC6A9 \uC911":"\uAEBC\uC9D0",arrow:!0,disableInteractive:!0,children:le(EM,{size:"small",inputProps:{"aria-label":`${F.name} \uADDC\uCE59 \uC0AC\uC6A9`},checked:F.enabled,onChange:(W,V)=>u.toggleRule(F.seq,V)})}),Zo(St,{sx:{flex:1,minWidth:0},children:[le(St,{sx:{fontSize:16,fontWeight:600,color:"#37352f"},children:F.name}),(()=>{let W=qM(F,o,n);return Zo(St,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:.5,fontSize:15,color:"#6f6f6c"},children:[le(St,{component:"span",children:W.left}),le(RM,{sx:{fontSize:18,color:"#9a9a97",flexShrink:0}}),le(St,{component:"span",children:W.right})]})})()]}),le(Gu,{size:"small","aria-label":`${F.name} \uADDC\uCE59 \uC218\uC815`,onClick:()=>u.openEdit(F),children:le(OM,{sx:{fontSize:18}})}),le(Gu,{size:"small","aria-label":`${F.name} \uADDC\uCE59 \uC0AD\uC81C`,onClick:()=>u.removeRule(F.seq),children:le(Gt,{sx:{fontSize:18}})})]},F.seq))]})}],actions:{showCancelButton:!1,left:le(Tn,{startIcon:le(Ku,{}),onClick:u.openCreate,sx:{color:"#2563eb"},children:"\uC0C8 \uADDC\uCE59"}),right:le(Tn,{variant:"contained",onClick:f.close,children:"\uB2EB\uAE30"})}}),le(Eb,{open:g.isOpen,onClose:g.close,maxWidth:"sm",title:x?"\uADDC\uCE59 \uC218\uC815":"\uC0C8 \uADDC\uCE59",locale:"ko",backdropClick:!1,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-rule-form",tabs:{visible:!1},sectionContentPaddingTop:0,sections:[{id:"rule-form",title:"",showTitle:!1,children:oe()}],actions:{showCancelButton:!0,right:le(Tn,{variant:"contained",onClick:()=>{d.submit()},disabled:T,children:x?"\uC218\uC815":"\uADDC\uCE59 \uCD94\uAC00"})}})]})}import{useEffect as HM,useRef as Fb,useState as WM}from"react";import{Box as gt,Button as Ui,IconButton as rl,Tooltip as il}from"@mui/material";import $b from"@mui/icons-material/Add";import VM from"@mui/icons-material/EditOutlined";import UM from"@mui/icons-material/ContentCopyOutlined";import GM from"@mui/icons-material/DragIndicator";import KM from"@mui/icons-material/Close";import YM from"@mui/icons-material/PlaylistAddCheckOutlined";import{DndContext as jM,PointerSensor as XM,closestCenter as QM,useSensor as ZM,useSensors as JM}from"@dnd-kit/core";import{restrictToParentElement as eP,restrictToVerticalAxis as tP}from"@dnd-kit/modifiers";import{SortableContext as oP,useSortable as nP,verticalListSortingStrategy as rP}from"@dnd-kit/sortable";import{CSS as iP}from"@dnd-kit/utilities";import{FormDialog as Hb}from"@ehfuse/mui-form-dialog";import{ClearTextField as Xu,LabelSelect as Gb,NumberField as Wb}from"@ehfuse/mui-form-controls";import aP from"@ehfuse/overlay-scrollbar";import{useEffect as LM,useRef as Pb}from"react";import{useGlobalForm as NM,useModal as FM}from"@ehfuse/forma";import{ConfirmDialog as $M,ErrorAlert as Ob}from"@ehfuse/alerts";var qb=0;function zb(){return qb+=1,`ti${qb}`}function ju(){return{editSeq:0,name:"",description:"",group_seq:0,itemIds:[],items:{}}}function Ab(){return{title:"",start_offset_days:0,due_offset_days:0,priority:"medium"}}function Nb(e){let t=Pb(e);t.current=e;let o=NM({formId:we("taskbox-template-form"),initialValues:ju(),onValidate:m=>m.name.trim()?Lb(m).length===0?(Ob({message:"\uC5C5\uBB34 \uD56D\uBAA9\uC744 \uD55C \uC904 \uC774\uC0C1 \uB123\uC73C\uC138\uC694."}),!1):!0:(Ob({message:"\uD15C\uD50C\uB9BF \uC774\uB984\uC744 \uC785\uB825\uD558\uC138\uC694."}),!1),onSubmit:async m=>{let c={name:m.name.trim(),description:m.description,group_seq:m.group_seq,items:Lb(m)},p=m.editSeq>0?await t.current.onUpdate(m.editSeq,c):await t.current.onCreate(c);return p&&(n.form.close(),o.setFormValues(ju())),p}}),n={list:Xo({modalId:we("taskbox-template-manage"),open:e.open,onClose:()=>t.current.onClose()}),form:FM({modalId:we("taskbox-template-edit")})},r=Pb(n.form);r.current=n.form,LM(()=>{if(e.open)return;let m=window.setTimeout(()=>{r.current.isOpen&&r.current.close(),o.setFormValues(ju())},500);return()=>window.clearTimeout(m)},[e.open]);let i=(m,c)=>{let p=c.items.map(()=>zb());o.setFormValues({editSeq:m,name:c.name,description:c.description??"",group_seq:c.group_seq??0,itemIds:p,items:Object.fromEntries(c.items.map((d,u)=>[p[u],{...d}]))}),n.form.open()},a=(m,c)=>({name:c,description:m.description??"",group_seq:m.group_seq??0,items:m.items.map(p=>({...p}))}),l=(m,c)=>{let p=o.getFormValue(`items.${m}`);o.setFormValue(`items.${m}`,{...p??Ab(),...c})};return{form:o,modals:n,actions:{openCreate:()=>i(0,{name:"",description:"",group_seq:0,items:[]}),openEdit:m=>i(m.seq,a(m,m.name)),openDuplicate:m=>i(0,a(m,`${m.name} \uC0AC\uBCF8`)),closeForm:()=>n.form.close(),setItem:l,addItem:()=>{let m=zb();o.setFormValue(`items.${m}`,Ab()),o.setFormValue("itemIds",[...o.getFormValue("itemIds")??[],m])},removeItem:m=>{let c=o.getFormValue("itemIds")??[];o.setFormValue("itemIds",c.filter(p=>p!==m))},moveItem:(m,c)=>{let p=[...o.getFormValue("itemIds")??[]],d=p.indexOf(m),u=p.indexOf(c);if(d<0||u<0||d===u)return;let[f]=p.splice(d,1);p.splice(u,0,f),o.setFormValue("itemIds",p)},pickItemManager:async m=>{let c=t.current.onPickAccount;if(!c)return;let p=o.getFormValue(`items.${m}`),d=await c(p?.manager_account_seq??0,"\uCC45\uC784\uC790");d&&l(m,{manager_account_seq:d.accountSeq,manager_name:d.name})},clearItemManager:m=>l(m,{manager_account_seq:0,manager_name:""}),removeTemplate:async m=>{await $M({title:"\uD15C\uD50C\uB9BF \uC0AD\uC81C",message:`"${m.name}" \uD15C\uD50C\uB9BF\uC744 \uC0AD\uC81C\uD558\uC2DC\uACA0\uC2B5\uB2C8\uAE4C?`})&&t.current.onRemove(m.seq)},runTemplate:m=>t.current.onRun?.(m)}}}function Lb(e){return(e.itemIds??[]).map(t=>e.items?.[t]).filter(t=>!!t&&String(t.title??"").trim().length>0)}import{Fragment as uP,jsx as be,jsxs as Jo}from"react/jsx-runtime";var lP=[{value:"high",label:"\uB192\uC74C"},{value:"medium",label:"\uC911\uAC04"},{value:"low",label:"\uB0AE\uC74C"}],Kb="\uC5C5\uBB34 \uC81C\uBAA9",Qu=2,sc={flex:1,minWidth:0},Vb=56,Yb=20,sP=`${Yb+Qu*8}px`;function cP({id:e,children:t}){let{attributes:o,listeners:n,setNodeRef:r,transform:i,transition:a,isDragging:l}=nP({id:e});return be(gt,{ref:r,sx:{transform:iP.Transform.toString(i),transition:a,...l?{opacity:.6,position:"relative",zIndex:1}:{}},children:t({handleProps:{...o,...n},dragging:l})})}function Ub(e){return e===null?void 0:Math.trunc(Number(e))}function mP({id:e,index:t,isLast:o,form:n,actions:r,canPickAccount:i,handleProps:a}){let l=n.useValue(`items.${e}`)??{};return Jo(gt,{sx:{borderBottom:o?"none":"1px solid #f2f2f0",px:Qu,py:2,gap:2,display:"flex",flexDirection:"column"},children:[Jo(gt,{sx:{display:"flex",alignItems:"center",gap:Qu},children:[be(gt,{...a,"aria-label":`${t+1}\uBC88 \uD56D\uBAA9 \uC21C\uC11C \uC774\uB3D9`,sx:{display:"inline-flex",alignItems:"center",flexShrink:0,color:"#c9c8c5",cursor:"grab","&:active":{cursor:"grabbing"},touchAction:"none",userSelect:"none"},children:be(GM,{sx:{fontSize:Yb}})}),be(Xu,{size:"medium",fullWidth:!0,placeholder:Kb,slotProps:{htmlInput:{"data-template-title":t}},name:`items.${e}.title`,form:n})]}),Jo(gt,{sx:{display:"flex",alignItems:"center",gap:2,pl:sP},children:[be(gt,{sx:sc,children:be(Wb,{size:"medium",fullWidth:!0,label:"\uC2DC\uC791 D+",thousandSeparator:!1,align:"right",suffix:"\uC77C",value:l.start_offset_days??null,onValueChange:s=>r.setItem(e,{start_offset_days:Ub(s)})})}),be(gt,{sx:sc,children:be(Wb,{size:"medium",fullWidth:!0,label:"\uB9C8\uAC10 D+",thousandSeparator:!1,align:"right",suffix:"\uC77C",value:l.due_offset_days??null,onValueChange:s=>r.setItem(e,{due_offset_days:Ub(s)})})}),be(gt,{sx:sc,children:be(Gb,{size:"medium",fullWidth:!0,label:"\uC911\uC694\uB3C4",value:l.priority??"medium",options:lP,onChange:s=>r.setItem(e,{priority:s.target.value})})}),i?Jo(gt,{sx:{...sc,position:"relative"},children:[be(Ui,{variant:"outlined",fullWidth:!0,onClick:()=>{r.pickItemManager(e)},sx:{height:Vb,display:"block",textAlign:"left",textTransform:"none",fontSize:16,fontWeight:400,lineHeight:`${Vb-2}px`,py:0,px:1.75,pr:l.manager_account_seq?4.5:1.75,borderColor:"#c4c4c4",color:l.manager_name?"#37352f":"#9a9a97",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap","&:hover":{borderColor:"#37352f",bgcolor:"transparent"}},children:l.manager_name||"\uCC45\uC784\uC790"}),l.manager_account_seq?be(il,{title:"\uCC45\uC784\uC790 \uBE44\uC6B0\uAE30",arrow:!0,disableInteractive:!0,children:be(rl,{size:"small","aria-label":`${t+1}\uBC88 \uD56D\uBAA9 \uCC45\uC784\uC790 \uBE44\uC6B0\uAE30`,onClick:s=>{s.stopPropagation(),r.clearItemManager(e)},sx:{position:"absolute",right:6,top:"50%",transform:"translateY(-50%)"},children:be(KM,{sx:{fontSize:18}})})}):null]}):null,be(il,{title:"\uD56D\uBAA9 \uC0AD\uC81C",arrow:!0,disableInteractive:!0,children:be(rl,{size:"medium","aria-label":`${t+1}\uBC88 \uD56D\uBAA9 \uC0AD\uC81C`,onClick:()=>r.removeItem(e),children:be(Gt,{sx:{fontSize:18}})})})]})]})}function sZ({open:e,templates:t,customTabs:o,onPickAccount:n,onClose:r,onCreate:i,onUpdate:a,onRemove:l,onRun:s}){let m=Nb({open:e,templates:t,customTabs:o,onPickAccount:n,onClose:r,onCreate:i,onUpdate:a,onRemove:l,onRun:s}),{form:c,actions:p}=m,d=m.modals.list,u=m.modals.form,f=c.isSubmitting,g=Number(c.useValue("editSeq")??0),v=c.useValue("itemIds")??[],[D,b]=WM(0),S=Fb(null),h=Fb(null),E=()=>{let x=h.current?.getScrollContainer()??null;if(x){x.scrollTop=x.scrollHeight;return}let B=S.current?.querySelectorAll("*")??[];for(let w of Array.from(B))if(w.scrollHeight>w.clientHeight+1){w.scrollTop=w.scrollHeight;return}},y=()=>{let x=S.current;if(!x)return null;let B=x.querySelectorAll("input[data-template-title]"),w=B.length?B:x.querySelectorAll(`input[placeholder="${Kb}"]`);return w.length?w[w.length-1]:null};HM(()=>{if(D===0)return;let x=0,B=0,w=()=>{E();let H=y();H&&document.activeElement!==H&&H.focus(),x+=1,!(H&&document.activeElement===H)&&x<8&&(B=window.setTimeout(w,50))},P=window.requestAnimationFrame(w);return()=>{window.cancelAnimationFrame(P),window.clearTimeout(B)}},[D]);let T=o.filter(x=>!x.archived).map(x=>({value:String(hn(x.key)),label:x.label})),I=Number(c.useValue("group_seq")??0),A=JM(ZM(XM,{activationConstraint:{distance:5}})),q=x=>{let B=String(x.active?.id??""),w=String(x.over?.id??"");!B||!w||B===w||p.moveItem(B,w)},C=be(gt,{children:t.length===0?Jo(gt,{sx:{py:4,display:"flex",flexDirection:"column",alignItems:"center",gap:2,color:"#9a9a97"},children:[be(YM,{sx:{fontSize:48,color:"#d9d9d6"}}),be(gt,{sx:{fontSize:13.5},children:"\uB4F1\uB85D\uB41C \uD15C\uD50C\uB9BF\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."})]}):t.map(x=>Jo(gt,{sx:{display:"flex",alignItems:"center",gap:2.5,py:1.75,"&:not(:last-of-type)::after":{content:'""',display:"block",my:1.75,borderBottom:"1px solid #f0efed"}},children:[Jo(gt,{sx:{flex:1,minWidth:0},children:[be(gt,{sx:{fontSize:18,fontWeight:600,color:"#37352f"},children:x.name}),Jo(gt,{sx:{fontSize:14,color:"#787774",mt:.25},children:["\uC5C5\uBB34 ",x.items.length,"\uAC74",x.description?` \xB7 ${x.description}`:""]})]}),s?be(Ui,{size:"medium",variant:"outlined",onClick:()=>p.runTemplate(x),sx:{flexShrink:0},children:"\uC2E4\uD589"}):null,be(il,{title:"\uC218\uC815",arrow:!0,disableInteractive:!0,children:be(rl,{size:"medium","aria-label":`${x.name} \uD15C\uD50C\uB9BF \uC218\uC815`,onClick:()=>p.openEdit(x),children:be(VM,{sx:{fontSize:19}})})}),be(il,{title:"\uBCF5\uC81C",arrow:!0,disableInteractive:!0,children:be(rl,{size:"medium","aria-label":`${x.name} \uD15C\uD50C\uB9BF \uBCF5\uC81C`,onClick:()=>p.openDuplicate(x),children:be(UM,{sx:{fontSize:18}})})}),be(il,{title:"\uC0AD\uC81C",arrow:!0,disableInteractive:!0,children:be(rl,{size:"medium","aria-label":`${x.name} \uD15C\uD50C\uB9BF \uC0AD\uC81C`,onClick:()=>{p.removeTemplate(x)},children:be(Gt,{sx:{fontSize:18}})})})]},x.seq))}),k=Jo(gt,{sx:{display:"flex",flexDirection:"column",gap:3},children:[be(Xu,{size:"medium",label:"\uD15C\uD50C\uB9BF \uC774\uB984",placeholder:"\uC608: \uC2E0\uADDC \uC785\uC0AC\uC790 \uC628\uBCF4\uB529",fullWidth:!0,name:"name",form:c}),Jo(gt,{sx:{display:"grid",gridTemplateColumns:T.length>0?"1fr 1fr":"1fr",gap:2},children:[be(Xu,{size:"medium",label:"\uC124\uBA85",placeholder:"\uBAA9\uB85D\uC5D0\uC11C \uBB34\uC5C7\uC778\uC9C0 \uC54C\uC544\uBCFC \uD55C \uC904(\uC120\uD0DD)",fullWidth:!0,name:"description",form:c}),T.length>0?be(Gb,{size:"medium",fullWidth:!0,label:"\uB9CC\uB4E4 \uACF3(\uD504\uB85C\uC81D\uD2B8)",value:String(I),options:[{value:"0",label:"\uAE30\uBCF8 \uC5C5\uBB34\uD568"},...T],onChange:x=>c.setFormValue("group_seq",Number(x.target.value)||0)}):null]}),Jo(gt,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[be(gt,{sx:{fontSize:18,fontWeight:600,color:"#37352f"},children:"\uC5C5\uBB34 \uD56D\uBAA9"}),be(gt,{sx:{fontSize:14,color:"#37352f"},children:"\uB0A0\uC9DC\uB294 \uC2E4\uD589\uD560 \uB54C \uACE0\uB974\uB294 \uAE30\uC900\uC77C\uC5D0\uC11C \uACC4\uC0B0\uB429\uB2C8\uB2E4."})]}),v.length===0?be(gt,{sx:{fontSize:14,color:"#9a9a97",py:2},children:'\uC544\uC9C1 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4. "\uD56D\uBAA9 \uCD94\uAC00" \uB85C \uC808\uCC28\uB97C \uC21C\uC11C\uB300\uB85C \uC801\uC73C\uC138\uC694.'}):be(gt,{ref:S,sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:be(aP,{ref:h,style:{maxHeight:"min(560px, 52vh)"},thumb:{width:6},children:be(jM,{sensors:A,collisionDetection:QM,modifiers:[tP,eP],onDragEnd:q,children:be(oP,{items:v,strategy:rP,children:v.map((x,B)=>be(cP,{id:x,children:({handleProps:w})=>be(mP,{id:x,index:B,isLast:B===v.length-1,form:c,actions:p,canPickAccount:!!n,handleProps:w})},x))})})})})]});return Jo(uP,{children:[be(Hb,{open:d.isOpen,onClose:d.close,maxWidth:"md",title:"\uC5C5\uBB34 \uD15C\uD50C\uB9BF",locale:"ko",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-task-template",tabs:{visible:!1},actions:{showCancelButton:!1,left:be(Ui,{startIcon:be($b,{sx:{fontSize:18}}),onClick:p.openCreate,children:"\uC0C8 \uD15C\uD50C\uB9BF"}),right:be(Ui,{variant:"contained",onClick:d.close,children:"\uB2EB\uAE30"})},sectionContentPaddingTop:0,sections:[{id:"templates",title:"",showTitle:!1,children:C}]}),be(Hb,{open:u.isOpen,onClose:u.close,maxWidth:"md",title:g>0?"\uD15C\uD50C\uB9BF \uC218\uC815":"\uC0C8 \uD15C\uD50C\uB9BF",locale:"ko",backdropClick:!1,fontScale:{enabled:!0},fontScaleKey:"taskbox-task-template-form",titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},tabs:{visible:!1},actions:{showCancelButton:!0,left:be(Ui,{startIcon:be($b,{sx:{fontSize:18}}),onClick:()=>{p.addItem(),b(x=>x+1)},children:"\uD56D\uBAA9 \uCD94\uAC00"}),right:be(Ui,{variant:"contained",disabled:f,onClick:()=>{c.submit()},children:"\uC800\uC7A5"})},sectionContentPaddingTop:0,sections:[{id:"template-form",title:"",showTitle:!1,children:k}]})]})}import{Box as mo,Button as pP}from"@mui/material";import{FormDialog as fP}from"@ehfuse/mui-form-dialog";import{DateTextField as gP}from"@ehfuse/mui-form-controls";import xP from"@ehfuse/overlay-scrollbar";import{useRef as Zu}from"react";import{useGlobalForm as dP}from"@ehfuse/forma";function jb(e){let t=Zu(e);t.current=e;let o=Zu(e.template);e.template&&(o.current=e.template);let n=e.template??o.current,r=Zu(n);r.current=n;let i=dP({formId:we("taskbox-template-run-form"),initialValues:{baseDate:e.todayStr},onValidate:s=>t.current.running||!r.current?!1:gs(r.current,s.baseDate).length>0,onSubmit:s=>r.current?(t.current.onRun(gs(r.current,s.baseDate),s.baseDate),!0):!1}),a={run:Xo({modalId:we("taskbox-template-run"),open:e.open,onClose:()=>t.current.onClose(),onOpen:()=>i.setFormValues({baseDate:t.current.todayStr})})},l=s=>n?gs(n,s):[];return{form:i,modals:a,template:n,running:!!e.running,planTasks:l}}import{jsx as So,jsxs as al}from"react/jsx-runtime";function CZ(e){let t=jb(e),{form:o,running:n}=t,r=t.modals.run,i=t.template,a=String(o.useValue("baseDate")??""),l=t.planTasks(a);return So(fP,{open:r.isOpen,onClose:r.close,maxWidth:"md",title:i?`${i.name} \uC2E4\uD589`:"\uD15C\uD50C\uB9BF \uC2E4\uD589",locale:"ko",backdropClick:!1,titleIcons:{delete:{visible:!1},print:{visible:!1},share:{visible:!1}},fontScale:{enabled:!0},fontScaleKey:"taskbox-template-run",tabs:{visible:!1},sectionContentPaddingTop:0,actions:{showCancelButton:!0,right:So(pP,{variant:"contained",disabled:n||l.length===0,onClick:()=>{o.submit()},children:n?"\uB9CC\uB4DC\uB294 \uC911\u2026":`\uC5C5\uBB34 ${l.length}\uAC74 \uB9CC\uB4E4\uAE30`})},sections:[{id:"template-run",title:"",showTitle:!1,children:al(mo,{sx:{display:"flex",flexDirection:"column",gap:2},children:[al(mo,{sx:{display:"flex",alignItems:"center",gap:1.5},children:[So(mo,{sx:{width:72,flexShrink:0,fontSize:16,color:"#37352f"},children:"\uAE30\uC900\uC77C"}),So(gP,{size:"medium",fullWidth:!0,name:"baseDate",form:o})]}),So(mo,{sx:{fontSize:14.5,color:"#37352f"},children:"\uC544\uB798 \uC5C5\uBB34\uAC00 \uD55C\uAEBC\uBC88\uC5D0 \uB9CC\uB4E4\uC5B4\uC9D1\uB2C8\uB2E4. \uB0A0\uC9DC\uB294 \uAE30\uC900\uC77C\uC5D0\uC11C \uACC4\uC0B0\uB41C \uAC12\uC785\uB2C8\uB2E4."}),al(mo,{sx:{border:"1px solid #e6e6e3",borderRadius:1,overflow:"hidden"},children:[al(mo,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1,bgcolor:"#fafaf9",borderBottom:"1px solid #e6e6e3",fontSize:13.5,fontWeight:600,color:"#37352f"},children:[So(mo,{sx:{flex:1,minWidth:0},children:"\uC5C5\uBB34"}),So(mo,{sx:{width:88,flexShrink:0,textAlign:"center"},children:"\uC2DC\uC791"}),So(mo,{sx:{width:88,flexShrink:0,textAlign:"center"},children:"\uB9C8\uAC10"}),So(mo,{sx:{width:96,flexShrink:0,textAlign:"center"},children:"\uCC45\uC784\uC790"})]}),So(xP,{style:{maxHeight:520},thumb:{width:6},children:l.length===0?So(mo,{sx:{p:2,fontSize:14,color:"#9a9a97"},children:"\uB9CC\uB4E4 \uD56D\uBAA9\uC774 \uC5C6\uC2B5\uB2C8\uB2E4."}):l.map((s,m)=>al(mo,{sx:{display:"flex",alignItems:"center",gap:1,px:1.5,py:1.25,borderBottom:m===l.length-1?"none":"1px solid #f2f2f0",fontSize:16,fontWeight:500,color:"#111111"},children:[So(mo,{sx:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:s.title}),So(mo,{sx:{width:88,flexShrink:0,textAlign:"center",fontSize:13.5,color:s.start_date?"#37352f":"#9a9a97"},children:im(s.start_date)||"-"}),So(mo,{sx:{width:88,flexShrink:0,textAlign:"center",fontSize:13.5,color:s.due_date?"#37352f":"#9a9a97"},children:im(s.due_date)||"-"}),So(mo,{sx:{width:96,flexShrink:0,textAlign:"center",fontSize:13.5,color:s.manager_name?"#37352f":"#9a9a97",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:s.manager_name||"-"})]},m))})]})]})}]})}var bP={urgent:"\uAE34\uAE09",high:"\uB192\uC74C",normal:"\uC911\uAC04",low:"\uB0AE\uC74C"};function hP(e){return e.length===0?"":e.length<=2?e.join(", "):`${e[0]} \uC678 ${e.length-1}\uBA85`}function cc(e){let t=String(e??"").trim().slice(0,10);return/^\d{4}-\d{2}-\d{2}$/.test(t)?`${t.slice(2,4)}.${t.slice(5,7)}.${t.slice(8,10)}`:"-"}function Gi(e){let t=o=>String(o).padStart(2,"0");return`${e.getFullYear()}-${t(e.getMonth()+1)}-${t(e.getDate())} ${t(e.getHours())}:${t(e.getMinutes())}`}function Ju(e,t,o){let r=String(e.due_date??"").slice(11,16).trim()||String(e.estimated_time??"").trim(),i=cc(e.due_date),a=String(e.start_date??"").slice(11,16).trim(),l=cc(e.start_date),s=(e.receiver_names??[]).filter(Boolean).map(c=>String(c).trim()),m=(e.checklist??[]).length?`${(e.checklist??[]).filter(c=>c.checked).length}/${(e.checklist??[]).length}`:"";return{seq:Number(e.seq??0),title:String(e.title??"").trim(),statusName:Mt(e).name,projectLabel:e.tab_key?t.get(String(e.tab_key))??"":"",managerName:String(e.manager_name??"").trim(),receiverNames:hP(s),receiverNamesFull:s.join(", "),startDate:l!=="-"&&a?`${l} ${a}`:l,dueDate:i!=="-"&&r?`${i} ${r}`:i,priorityName:bP[String(e.priority??"")]??"",checklist:m,checklistItems:(e.checklist??[]).map(c=>{let p=c.task_seq&&o?o(Number(c.task_seq)):null,d=cc(p?.due_date),u=String(p?.due_date??"").slice(11,16).trim();return{label:String(c.label??"").trim(),checked:!!c.checked,managerName:String(p?.manager_name??"").trim(),dueDate:d!=="-"?u?`${d} ${u}`:d:""}}),note:String(e.note??"").trim(),completed:!!e.completed}}function Fe(e){return String(e??"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function kP(e,t){if(e===" ")return t*.3;let o=e.codePointAt(0)??0,n=o>=4352&&o<=4607||o>=12288&&o<=40959||o>=44032&&o<=55203||o>=63744&&o<=64255||o>=65280&&o<=65519;return t*(n?1:.55)}function mc(e,t){let o=0;for(let n of String(e??""))o+=kP(n,t);return o}function Ki(e,t){let o=String(e??"").trim();if(!o)return["-"];let n=[],r="";for(let i of o){if(i===`
|
|
19
19
|
`){r&&n.push(r),r="";continue}let a=`${r}${i}`;if(a.length>t&&r){n.push(r),r=i;continue}r=a}return r&&n.push(r),n.length>0?n:["-"]}function Nn(e,t,o){let n=String(e??"").replace(/\s+/g," ").trim();if(!n)return"";if(mc(n,o)<=t)return n;let r=mc("\u2026",o),i="",a=0;for(let l of n){let s=mc(l,o);if(a+s+r>t)break;i+=l,a+=s}return`${i}\u2026`}var sl=595.28,cl=841.89,ml=841.89,ul=595.28,uo=28,en=96,Fo=44,TP="'Malgun Gothic','\uB9D1\uC740 \uACE0\uB515','Apple SD Gothic Neo','Noto Sans KR',sans-serif",yP="'Batang','\uBC14\uD0D5','AppleMyungjo','Noto Serif KR',serif",ll="#cbd5e1",SP=[`text { font-family: ${TP}; fill: #000000; }`,`.doc-title { font-family: ${yP}; font-size: 20px; font-weight: 700; }`,".doc-sub { font-size: 10.5px; fill: #333333; }",".doc-meta { font-size: 9.5px; fill: #333333; }",".th { font-size: 9.5px; font-weight: 700; fill: #000000; }",`.td { font-size: 9px; }
|
|
20
20
|
.ck{font-size:9px;fill:#475569;}
|
|
21
21
|
.ck.done{fill:#94a3b8;}`,".td.done { fill: #555555; }",".gt { font-size: 10px; font-weight: 700; fill: #000000; }",".label { font-size: 9px; fill: #333333; }",".value { font-size: 10px; }",".section { font-size: 11.5px; font-weight: 700; fill: #000000; }",".pageno { font-size: 9px; fill: #333333; }",`.head { fill: #eef2f7; stroke: ${ll}; stroke-width: 0.5; }`,`.group { fill: #f8fafc; stroke: ${ll}; stroke-width: 0.5; }`,`.frame { fill: none; stroke: ${ll}; stroke-width: 0.5; }`,`.hline { stroke: ${ll}; stroke-width: 0.5; }`,`.vline { stroke: ${ll}; stroke-width: 0.5; }`,".bar { fill: #bfdbfe; stroke: #60a5fa; stroke-width: 0.6; }",".bar.done { fill: #e5e7eb; stroke: #cbd5e1; }",".bar.overdue { fill: #fecaca; stroke: #f87171; }"].join("");function mr(e,t,o){let n=o-uo;return[`<text x="${uo}" y="46" class="doc-title">${Fe(e.documentTitle)}</text>`,`<text x="${uo}" y="66" class="doc-sub">${Fe(e.subtitle)}</text>`,`<text x="${n}" y="42" class="doc-meta" text-anchor="end">${Fe(e.facilityName)}</text>`,`<text x="${n}" y="58" class="doc-meta" text-anchor="end">\uCD9C\uB825 ${Fe(Gi(e.printedAt))}${e.printedBy?` \xB7 ${Fe(e.printedBy)}`:""}</text>`,t?`<text x="${n}" y="74" class="doc-meta" text-anchor="end">${Fe(t)}</text>`:""].join("")}function ur(e){let{width:t,height:o,body:n,pageIndex:r,pageCount:i}=e;return[`<svg xmlns="http://www.w3.org/2000/svg" width="${t}" height="${o}" viewBox="0 0 ${t} ${o}">`,`<style>${SP}</style>`,`<rect x="0" y="0" width="${t}" height="${o}" fill="#ffffff" />`,n,`<text x="${t/2}" y="${o-22}" class="pageno" text-anchor="middle">${r+1} / ${i}</text>`,"</svg>"].join("")}var td=ml,Xb=ul,Fn=uo,dl=td-uo,Yi=22,Fr=20,ji=22,dr=18,Lr=5,Qb=en,Zb=Fo,ed=Xb-46,pr=[{key:"no",label:"\uBC88\uD638",width:30,align:"middle"},{key:"title",label:"\uC81C\uBAA9",width:300,align:"start"},{key:"status",label:"\uC0C1\uD0DC",width:60,align:"middle"},{key:"start",label:"\uC2DC\uC791",width:78,align:"middle"},{key:"due",label:"\uB9C8\uAC10",width:78,align:"middle"},{key:"manager",label:"\uCC45\uC784\uC790",width:80,align:"middle"},{key:"priority",label:"\uC911\uC694\uB3C4",width:60,align:"middle"},{key:"project",label:"\uD504\uB85C\uC81D\uD2B8",width:100,align:"middle"}],Nr=pr.reduce((e,t,o)=>(e.push(o===0?Fn:e[o-1]+pr[o-1].width),e),[]);function CP(e){let t=[],o=[],n=Qb+Yi,r=0,i=(a,l)=>{t.push(o),o=[],n=Zb+Yi,a&&(o.push({kind:"group",label:a,count:l,continued:!0}),n+=ji)};for(let a of e){a.label&&(n+ji+Fr>ed&&i("",0),o.push({kind:"group",label:a.label,count:a.rows.length,continued:!1}),n+=ji);for(let l of a.rows){n+Fr>ed&&i(a.label,a.rows.length),r+=1,o.push({kind:"row",completed:l.completed,values:pr.map(s=>{switch(s.key){case"no":return String(r);case"title":return l.title;case"status":return l.statusName;case"project":return l.projectLabel||"\uAE30\uBCF8";case"manager":return l.managerName||"-";case"start":return l.startDate;case"due":return l.dueDate;default:return l.priorityName||"-"}})}),n+=Fr;for(let s of l.checklistItems)s.label&&(n+dr>ed&&i(a.label,a.rows.length),o.push({kind:"check",label:s.label,checked:s.checked,managerName:s.managerName,dueDate:s.dueDate}),n+=dr)}}return t.push(o),t.filter((a,l)=>l===0||a.length>0)}function BP(e,t){let o=[],n=[],r=(a,l,s)=>{Nr.slice(1).forEach((m,c)=>{let p=c+1;s(p)||n.push(`<line x1="${m}" y1="${a}" x2="${m}" y2="${a+l}" class="vline" />`)})};o.push(`<rect x="${Fn}" y="${t}" width="${dl-Fn}" height="${Yi}" class="head" />`),pr.forEach((a,l)=>{let s=Nr[l],m=a.align==="middle"?s+a.width/2:s+Lr;o.push(`<text x="${m}" y="${t+Yi-7}" class="th" text-anchor="${a.align}">${Fe(a.label)}</text>`)}),r(t,Yi,()=>!1);let i=t+Yi;for(let a of e){if(a.kind==="group"){o.push(`<rect x="${Fn}" y="${i}" width="${dl-Fn}" height="${ji}" class="group" />`,`<text x="${Fn+Lr}" y="${i+ji-7}" class="gt">${Fe(`${a.continued?`${a.label} (\uC774\uC5B4\uC11C)`:a.label} (${a.count})`)}</text>`),i+=ji;continue}if(a.kind==="check"){let l=Nr[1]+Lr+10,s=Nr[4]-Nr[1],m=a.checked?"ck done":"ck";o.push(`<text x="${l}" y="${i+dr-5}" class="${m}">${Fe(`${a.checked?"\u2713":"\u25CB"} ${Nn(a.label,s-Lr*2-22,9)}`)}</text>`),a.dueDate&&o.push(`<text x="${Nr[4]+pr[4].width/2}" y="${i+dr-5}" class="${m}" text-anchor="middle">${Fe(Nn(a.dueDate,pr[4].width-Lr*2,9))}</text>`),a.managerName&&o.push(`<text x="${Nr[5]+pr[5].width/2}" y="${i+dr-5}" class="${m}" text-anchor="middle">${Fe(Nn(a.managerName,pr[5].width-Lr*2,9))}</text>`),o.push(`<line x1="${Fn}" y1="${i+dr}" x2="${dl}" y2="${i+dr}" class="hline" />`),r(i,dr,c=>c>=2&&c<=3),i+=dr;continue}pr.forEach((l,s)=>{let m=Nr[s],c=l.align==="middle"?m+l.width/2:m+Lr;o.push(`<text x="${c}" y="${i+Fr-6}" class="${a.completed?"td done":"td"}" text-anchor="${l.align}">${Fe(Nn(a.values[s]??"",l.width-Lr*2,9))}</text>`)}),o.push(`<line x1="${Fn}" y1="${i+Fr}" x2="${dl}" y2="${i+Fr}" class="hline" />`),r(i,Fr,()=>!1),i+=Fr}return o.push(...n),o.push(`<rect x="${Fn}" y="${t}" width="${dl-Fn}" height="${i-t}" class="frame" />`),o.join("")}async function vP(e,t){let o=CP(t),n=t.reduce((r,i)=>r+i.rows.length,0);return o.map((r,i)=>{let a=i===0?Qb:Zb,l=[i===0?mr(e,`\uC804\uCCB4 ${n}\uAC74`,td):"",BP(r,a)].join("");return ur({width:td,height:Xb,body:l,pageIndex:i,pageCount:o.length})})}var nd=sl,Jb=cl,$n=uo,uc=nd-uo,IP=Jb-46,eh=22,_P=68,wP=(uc-$n)/2,DP=14,od=58;function Xi(e){switch(e.kind){case"title":return 34;case"props":return Math.ceil(e.pairs.length/2)*eh+10;case"section":return 26;default:return DP}}function EP(e){let t=[{kind:"title",text:e.title,ticket:e.ticketNo}];return t.push({kind:"props",pairs:e.properties}),t.push({kind:"section",text:"\uB0B4\uC6A9"}),(e.content.trim()?e.content.split(`
|