"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3841],{95805:function(e,t,o){o.d(t,{Z:function(){return p}});var n=o(57437),i=o(2265),r=o(33145),d=o(99376),l=o(43618),a=o(88862),s=o(50194),c=o(32905),u={src:"/_next/static/media/plugin-logo.994d536d.png",height:447,width:447,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAKlBMVEUAUJAAUI8KP5AAUJAAT44AUJEAUI4AUI8AT44AUpAAUJEAUZEAT4sAT4zGyT1UAAAADnRSTlO7rQLGaNagd1Ap6oQgOtbsV1AAAAAJcEhZcwAACxMAAAsTAQCanBgAAAA2SURBVHicBcGJAcAwCAOxs4FAnu6/biXskcbG6wj0yOAgLm9pSTS+ESo1HwTU4Kyg0ti7c9s/IiEA9v5EpDEAAAAASUVORK5CYII=",blurWidth:8,blurHeight:8},p=()=>{var e;let t=(0,d.useRouter)(),o=null!==(e=(0,d.usePathname)())&&void 0!==e?e:"",[,a]=(0,l.FV)(s.Z),p=(0,i.useMemo)(()=>"/"===o?"home":o.startsWith("/home/sketchup")?"sketchup":o.startsWith("/quote")?"support":o.startsWith("/home")?"sample":null,[o]),m=e=>{a(!1),t.push(e)};return(0,n.jsxs)(h,{role:"navigation","aria-label":"모바일 하단 메뉴",children:[(0,n.jsx)(x,{onClick:()=>{if("/"===o){a(!1);let e=document.getElementById("rootScroll")||document.querySelector("[data-scroll-grid]");e&&"function"==typeof e.scrollTo?e.scrollTo({top:0,behavior:"smooth"}):window.scrollTo({top:0,behavior:"smooth"})}else m("/")},$active:"home"===p,"aria-label":"마코디",children:(0,n.jsx)(f,{$active:"home"===p,children:(0,n.jsx)(r.default,{src:c.Z,alt:"마코디",width:32,height:32})})}),(0,n.jsx)(x,{onClick:()=>{m("/home/sketchup")},$active:"sketchup"===p,"aria-label":"스케치업 플러그인",children:(0,n.jsx)(f,{$active:"sketchup"===p,children:(0,n.jsx)(r.default,{src:u,alt:"스케치업",width:30,height:30})})}),(0,n.jsx)(x,{onClick:()=>{m("/home")},$active:"sample"===p,"aria-label":"샘플실",children:(0,n.jsx)(f,{$active:"sample"===p,children:(0,n.jsxs)("svg",{width:"29",height:"29",viewBox:"2 2 20 20",fill:"none",stroke:"currentColor",strokeWidth:"0.9",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("path",{d:"M3 11l9-8 9 8"}),(0,n.jsx)("path",{d:"M5 10v10h14V10"}),(0,n.jsx)("line",{x1:"9",x2:"15",y1:"13.5",y2:"13.5",stroke:"sample"===p?"#413d7d":"#888381",strokeWidth:"1.6"}),(0,n.jsx)("line",{x1:"9",x2:"15",y1:"15.5",y2:"15.5",stroke:"sample"===p?"#413d7d":"#888381",strokeWidth:"1.6"}),(0,n.jsx)("line",{x1:"9",x2:"15",y1:"17.5",y2:"17.5",stroke:"sample"===p?"#413d7d":"#888381",strokeWidth:"1.6"})]})})})]})};let h=a.ZP.nav.withConfig({componentId:"sc-4f99d699-0"})(["display:none;@media (max-width:500px){display:flex;}html.su-plugin &{display:none !important;}position:fixed;left:0;right:0;bottom:0;background:#ffffff;border-top:1px solid #e5e2dc;z-index:14000;isolation:isolate;align-items:center;justify-content:space-around;padding:5px 0 max(5px,env(safe-area-inset-bottom));"]),x=a.ZP.button.withConfig({componentId:"sc-4f99d699-1"})(["display:inline-flex;flex-direction:column;align-items:center;justify-content:center;flex:1;min-width:0;height:100%;border:0;background:transparent;cursor:pointer;color:",";transition:color 0.18s ease;font-family:inherit;padding:0 2px;&:hover{color:#111111;}"],e=>{let{$active:t}=e;return t?"#111111":"#888381"}),f=a.ZP.span.withConfig({componentId:"sc-4f99d699-2"})(["position:relative;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;filter:",";transition:filter 0.18s ease;"],e=>{let{$active:t}=e;return t?"none":"grayscale(1) opacity(0.55)"})},34015:function(e,t,o){var n=o(57437);o(2265);var i=o(88862),r=o(2735),d=o(67028);t.Z=()=>{let{searchKeyword:e,setSearchKeyword:t,filters:o}=(0,d.s)();return(0,n.jsx)(l,{children:(0,n.jsx)(r.Z,{isModal:!1,searchKeyword:e,setSearchKeyword:t,filters:o,onClickAi:()=>{}})})};let l=i.ZP.div.withConfig({componentId:"sc-ea34e662-0"})(["display:none;@media (max-width:500px){display:flex;flex:1 1 auto;min-width:0;margin:0 12px;align-items:center;& > *{width:100%;}}html.su-plugin &{display:none !important;}"])},37686:function(e,t,o){o.d(t,{S:function(){return a},X:function(){return l}});var n=o(2265),i=o(86484),r=o(29918);let d="board-comment-newcount";function l(e,t){var o;let l=(0,n.useMemo)(()=>[...e].sort((e,t)=>e-t).join(","),[e]);return(0,i.useQuery)([d,l],async()=>{var e;let{data:t}=await r.et.get("/board-projects/comments/new-count",{params:{boardIds:l}});return Number(null!==(e=null==t?void 0:t.newCount)&&void 0!==e?e:0)},{enabled:!!l&&(null===(o=null==t?void 0:t.enabled)||void 0===o||o),retry:!1,staleTime:0,refetchInterval:8e3,refetchOnWindowFocus:!0,keepPreviousData:!0})}function a(){let e=(0,i.useQueryClient)();return(0,i.useMutation)(e=>r.et.post("/board-projects/comments/viewed",{boardIds:e}),{onSuccess:()=>e.invalidateQueries(d)})}},64037:function(e,t,o){o.d(t,{T:function(){return l},g:function(){return a}});var n=o(2265),i=o(86484),r=o(29918);let d="board-comments";function l(e,t){var o;let l=(0,n.useMemo)(()=>[...e].sort((e,t)=>e-t).join(","),[e]),a=(0,n.useMemo)(()=>{var e;return[...null!==(e=null==t?void 0:t.projectIds)&&void 0!==e?e:[]].sort((e,t)=>e-t).join(",")},[null==t?void 0:t.projectIds]),s=(0,i.useQuery)([d,l,a],async()=>{let{data:e}=await r.et.get("/board-projects/comments",{params:{boardIds:l,projectIds:a}});return Array.isArray(e)?e:[]},{enabled:(!!l||!!a)&&(null===(o=null==t?void 0:t.enabled)||void 0===o||o),retry:!1,staleTime:0,refetchInterval:8e3,refetchOnWindowFocus:!0,keepPreviousData:!0}),c=(0,n.useMemo)(()=>{var e;return null!==(e=s.data)&&void 0!==e?e:[]},[s.data]),u=(0,n.useMemo)(()=>{var e,t,o,n,i,r,d;let l=new Map;for(let d of c)null==d.parentId&&l.set(d.id,{key:String(d.id),rootId:d.id,boardId:d.boardId,projectId:null!==(e=d.projectId)&&void 0!==e?e:null,boardName:d.boardName,productId:d.productId,posX:null!==(t=d.posX)&&void 0!==t?t:.5,posY:null!==(o=d.posY)&&void 0!==o?o:.5,columnKey:null!==(n=d.columnKey)&&void 0!==n?n:null,sceneId:null!==(i=d.sceneId)&&void 0!==i?i:null,seq:0,resolved:null!=d.resolvedAt,resolvedBy:null!==(r=d.resolvedBy)&&void 0!==r?r:null,unread:!!d.unread,comments:[d]});for(let e of c)null!=e.parentId&&(null===(d=l.get(e.parentId))||void 0===d||d.comments.push(e));let a=Array.from(l.values()).sort((e,t)=>e.rootId-t.rootId);return a.forEach((e,t)=>{e.seq=t+1}),a},[c]);return{...s,rows:c,threads:u,total:c.length}}function a(){let e=(0,i.useQueryClient)(),t=()=>e.invalidateQueries(d),o=(0,i.useMutation)(e=>{var t,o,n,i;return r.et.post("/board-projects/comments",{boardId:e.boardId,projectId:null!==(t=e.projectId)&&void 0!==t?t:void 0,productId:null!==(o=e.productId)&&void 0!==o?o:null,body:e.body,posX:e.posX,posY:e.posY,columnKey:null!==(n=e.columnKey)&&void 0!==n?n:void 0,sceneId:null!==(i=e.sceneId)&&void 0!==i?i:void 0,parentId:e.parentId})},{onSuccess:t}),n=(0,i.useMutation)(e=>r.et.delete("/board-projects/comments/".concat(e)),{onSuccess:t}),l=(0,i.useMutation)(e=>r.et.patch("/board-projects/comments/".concat(e.commentId),{body:e.body}),{onSuccess:t});return{addComment:o,deleteComment:n,updateComment:l,toggleReaction:(0,i.useMutation)(e=>r.et.post("/board-projects/comments/".concat(e.commentId,"/reactions"),{emoji:e.emoji}),{onSuccess:t}),resolveComment:(0,i.useMutation)(e=>r.et.patch("/board-projects/comments/".concat(e.commentId,"/resolve"),{resolved:e.resolved}),{onSuccess:t}),markThread:(0,i.useMutation)(e=>r.et.post("/board-projects/comments/".concat(e.commentId,"/").concat(e.seen?"read":"unread")),{onSuccess:t})}}},67936:function(e,t,o){o.d(t,{Z:function(){return h}});var n=o(57437),i=o(2265),r=o(88862);let d=["✅","\uD83D\uDC4D","\uD83D\uDC40","❤️","\uD83C\uDF89","\uD83D\uDE02","\uD83D\uDD25","\uD83D\uDE4F"],l=[{id:"smileys",label:"스마일 & 감정",items:[{e:"\uD83D\uDE00",k:"smile grin 웃음 미소"},{e:"\uD83D\uDE04",k:"smile happy 웃음 기쁨"},{e:"\uD83D\uDE01",k:"grin beam 활짝"},{e:"\uD83D\uDE06",k:"laugh 크게웃음"},{e:"\uD83D\uDE05",k:"sweat smile 식은땀 웃음"},{e:"\uD83D\uDE02",k:"joy laugh cry 눈물 웃음"},{e:"\uD83E\uDD23",k:"rofl laugh 뒹굴 웃음"},{e:"\uD83D\uDE42",k:"slight smile 살짝 미소"},{e:"\uD83D\uDE43",k:"upside 뒤집힌"},{e:"\uD83D\uDE09",k:"wink 윙크"},{e:"\uD83D\uDE0A",k:"blush smile 홍조 미소"},{e:"\uD83D\uDE0D",k:"heart eyes love 하트눈 사랑"},{e:"\uD83E\uDD70",k:"love hearts 사랑 애정"},{e:"\uD83D\uDE18",k:"kiss 뽀뽀 키스"},{e:"\uD83D\uDE0E",k:"cool sunglasses 멋짐 선글라스"},{e:"\uD83E\uDD29",k:"star struck 반짝 감탄"},{e:"\uD83E\uDD14",k:"thinking 생각 고민"},{e:"\uD83E\uDD28",k:"raised brow 의심 갸웃"},{e:"\uD83D\uDE10",k:"neutral 무표정"},{e:"\uD83D\uDE11",k:"expressionless 무심"},{e:"\uD83D\uDE44",k:"roll eyes 눈굴림"},{e:"\uD83D\uDE0F",k:"smirk 능글"},{e:"\uD83D\uDE2E",k:"wow surprised 놀람 오"},{e:"\uD83D\uDE2F",k:"hushed 헉"},{e:"\uD83D\uDE34",k:"sleep 졸림 잠"},{e:"\uD83D\uDE0C",k:"relieved 안도 편안"},{e:"\uD83D\uDE14",k:"pensive sad 시무룩"},{e:"\uD83D\uDE15",k:"confused 혼란"},{e:"\uD83D\uDE41",k:"frown 아쉬움"},{e:"\uD83D\uDE23",k:"persevere 끙"},{e:"\uD83D\uDE22",k:"cry sad 슬픔 눈물"},{e:"\uD83D\uDE2D",k:"sob cry 펑펑 울음"},{e:"\uD83D\uDE24",k:"huff 씩씩 분함"},{e:"\uD83D\uDE20",k:"angry 화남"},{e:"\uD83D\uDE21",k:"rage 분노 빡침"},{e:"\uD83E\uDD2F",k:"mind blown 충격 멘붕"},{e:"\uD83D\uDE33",k:"flushed 당황"},{e:"\uD83E\uDD75",k:"hot 더위 헉"},{e:"\uD83E\uDD17",k:"hug 포옹 환영"},{e:"\uD83E\uDD1D",k:"handshake deal 악수 합의"},{e:"\uD83E\uDD73",k:"party 파티 축하"},{e:"\uD83D\uDE07",k:"angel 천사"},{e:"\uD83E\uDD2A",k:"zany 익살"},{e:"\uD83D\uDE05",k:"phew 휴 다행"}]},{id:"gestures",label:"제스처 & 손",items:[{e:"\uD83D\uDC4D",k:"thumbs up good 좋아요 최고"},{e:"\uD83D\uDC4E",k:"thumbs down bad 싫어요"},{e:"\uD83D\uDC4C",k:"ok perfect 오케이 완벽"},{e:"✌️",k:"victory peace 브이 평화"},{e:"\uD83E\uDD1E",k:"fingers crossed 행운"},{e:"\uD83D\uDE4F",k:"pray thanks please 부탁 감사 기도"},{e:"\uD83D\uDC4F",k:"clap applause 박수"},{e:"\uD83D\uDE4C",k:"raise hands 만세 환호"},{e:"\uD83D\uDC4B",k:"wave hi bye 인사 안녕"},{e:"\uD83E\uDD19",k:"call me 콜"},{e:"\uD83D\uDCAA",k:"muscle strong 화이팅 근육"},{e:"\uD83D\uDC49",k:"point right 오른쪽"},{e:"\uD83D\uDC47",k:"point down 아래"},{e:"☝️",k:"point up 위 하나"},{e:"✍️",k:"writing 작성 메모"},{e:"\uD83E\uDD1A",k:"stop hand 손 정지"}]},{id:"hearts",label:"하트 & 표시",items:[{e:"❤️",k:"red heart love 빨강 하트 사랑"},{e:"\uD83E\uDDE1",k:"orange heart 주황 하트"},{e:"\uD83D\uDC9B",k:"yellow heart 노랑 하트"},{e:"\uD83D\uDC9A",k:"green heart 초록 하트"},{e:"\uD83D\uDC99",k:"blue heart 파랑 하트"},{e:"\uD83D\uDC9C",k:"purple heart 보라 하트"},{e:"\uD83D\uDDA4",k:"black heart 검정 하트"},{e:"\uD83E\uDD0D",k:"white heart 흰 하트"},{e:"\uD83D\uDCAF",k:"hundred perfect 백점 완벽"},{e:"✨",k:"sparkles 반짝 좋음"},{e:"⭐",k:"star 별 즐겨찾기"},{e:"\uD83C\uDF1F",k:"glowing star 빛나는 별"},{e:"\uD83D\uDD25",k:"fire hot 불 대박"},{e:"\uD83C\uDF89",k:"party tada 축하 파티"},{e:"\uD83C\uDF8A",k:"confetti 축하 폭죽"},{e:"\uD83D\uDCA5",k:"boom 강조 팡"}]},{id:"objects",label:"사물 & 작업",items:[{e:"✅",k:"check done ok 확인 완료 체크"},{e:"☑️",k:"checkbox 체크박스 확인"},{e:"❌",k:"cross no 아니오 삭제 엑스"},{e:"⚠️",k:"warning caution 경고 주의"},{e:"❓",k:"question 질문 물음표"},{e:"❗",k:"exclamation 강조 느낌표"},{e:"\uD83D\uDCCC",k:"pin 고정 핀"},{e:"\uD83D\uDCCE",k:"clip attach 첨부 클립"},{e:"\uD83D\uDD16",k:"bookmark 북마크"},{e:"\uD83D\uDCA1",k:"idea bulb 아이디어 전구"},{e:"\uD83D\uDCDD",k:"memo note 메모 작성"},{e:"\uD83D\uDCC4",k:"document page 문서"},{e:"\uD83D\uDDBC️",k:"image picture 이미지 그림"},{e:"\uD83C\uDFA8",k:"art palette 디자인 색"},{e:"\uD83D\uDE80",k:"rocket launch 출시 빠름"},{e:"⏰",k:"alarm time 시간 마감"},{e:"\uD83D\uDCC5",k:"calendar 일정 날짜"},{e:"\uD83D\uDD0D",k:"search zoom 검색 확대"},{e:"\uD83D\uDD27",k:"wrench fix 수정 도구"},{e:"\uD83D\uDCB0",k:"money 비용 돈"},{e:"\uD83D\uDCC8",k:"chart up 상승 그래프"},{e:"\uD83D\uDC40",k:"eyes look 확인 봄"},{e:"\uD83E\uDDE9",k:"puzzle 조각 연결"},{e:"\uD83C\uDFC1",k:"finish 완료 결승"}]}],a=r.ZP.div.withConfig({componentId:"sc-d3bcae13-0"})(["width:264px;background:#fff;border:1px solid #d3d7e6;border-radius:12px;box-shadow:0 14px 36px rgba(18,19,26,0.22);overflow:hidden;display:flex;flex-direction:column;"]),s=r.ZP.div.withConfig({componentId:"sc-d3bcae13-1"})(["padding:9px 10px 7px;.box{display:flex;align-items:center;gap:7px;background:#f6f7fb;border:1px solid #ebecf0;border-radius:8px;padding:6px 9px;}input{border:none;background:none;outline:none;font:inherit;font-size:12.5px;width:100%;color:#1a1b21;}svg{color:#a4a6b3;flex:none;}"]),c=r.ZP.div.withConfig({componentId:"sc-d3bcae13-2"})(["overflow-y:auto;max-height:244px;padding:0 8px 8px;"]),u=r.ZP.div.withConfig({componentId:"sc-d3bcae13-3"})([".lbl{font-size:11px;font-weight:700;color:#8a8b94;padding:8px 4px 4px;position:sticky;top:0;background:#fff;}.grid{display:grid;grid-template-columns:repeat(8,1fr);gap:1px;}button{border:0;background:none;font-size:19px;line-height:1;padding:5px 0;border-radius:7px;cursor:pointer;&:hover{background:#f2f1fb;}}"]),p=r.ZP.div.withConfig({componentId:"sc-d3bcae13-4"})(["font-size:12px;color:#a4a6b3;text-align:center;padding:20px 0;"]);function h(e){let{onPick:t,className:o,style:r}=e,[h,x]=(0,i.useState)(""),f=(0,i.useMemo)(()=>{let e=h.trim().toLowerCase();if(!e)return null;let t=[],o=new Set;for(let n of l)for(let i of n.items)i.k.includes(e)&&!o.has(i.e)&&(o.add(i.e),t.push(i.e));return t},[h]),m=e=>t(e);return(0,n.jsxs)(a,{className:o,style:r,"data-emoji-picker":"",onClick:e=>e.stopPropagation(),onMouseDown:e=>e.stopPropagation(),role:"dialog","aria-label":"이모지 선택",children:[(0,n.jsx)(s,{children:(0,n.jsxs)("div",{className:"box",children:[(0,n.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,n.jsx)("circle",{cx:"11",cy:"11",r:"7"}),(0,n.jsx)("path",{d:"M21 21l-4-4"})]}),(0,n.jsx)("input",{autoFocus:!0,value:h,placeholder:"이모지 검색",onChange:e=>x(e.target.value),"aria-label":"이모지 검색"})]})}),(0,n.jsx)(c,{children:f?f.length?(0,n.jsx)(u,{children:(0,n.jsx)("div",{className:"grid",children:f.map((e,t)=>(0,n.jsx)("button",{type:"button",onClick:()=>m(e),title:e,children:e},"".concat(e,"-").concat(t)))})}):(0,n.jsx)(p,{children:"검색 결과가 없어요"}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(u,{children:[(0,n.jsx)("div",{className:"lbl",children:"자주 쓰는"}),(0,n.jsx)("div",{className:"grid",children:d.map((e,t)=>(0,n.jsx)("button",{type:"button",onClick:()=>m(e),title:e,children:e},"f-".concat(e,"-").concat(t)))})]}),l.map(e=>(0,n.jsxs)(u,{children:[(0,n.jsx)("div",{className:"lbl",children:e.label}),(0,n.jsx)("div",{className:"grid",children:e.items.map((t,o)=>(0,n.jsx)("button",{type:"button",onClick:()=>m(t.e),title:t.e,children:t.e},"".concat(e.id,"-").concat(t.e,"-").concat(o)))})]},e.id))]})})]})}},40609:function(e,t,o){o.d(t,{Z:function(){return e$}});var n=o(57437),i=o(2265),r=o(99376),d=o(99655),l=o(54887),a=o(43618),s=o(88862),c=o(87530);let u=(0,a.cn)({key:"boardGuideStep",default:0});var p=o(88454),h=o(64037),x=o(3169),f=o(51256),m=o(67936);let g=s.ZP.aside.withConfig({componentId:"sc-9e84c8ad-0"})(["display:flex;flex-direction:column;height:100%;min-height:0;background:#fff;"]),b=s.ZP.div.withConfig({componentId:"sc-9e84c8ad-1"})(["display:flex;align-items:center;gap:7px;padding:12px 12px 10px;b{font-size:14px;}.n{font-size:11px;color:#7a7b85;background:#f2f3f7;padding:1px 8px;border-radius:999px;font-variant-numeric:tabular-nums;}.sp{flex:1;}"]),v=s.ZP.button.withConfig({componentId:"sc-9e84c8ad-2"})(["width:28px;height:28px;border-radius:7px;border:1px solid transparent;display:grid;place-items:center;cursor:pointer;color:",";background:",";position:relative;&:hover{background:",";color:",";}"],e=>{let{$on:t}=e;return t?"#0d99ff":"#7a7b85"},e=>{let{$on:t}=e;return t?"#e6f4ff":"transparent"},e=>{let{$on:t}=e;return t?"#e6f4ff":"#f2f3f7"},e=>{let{$on:t}=e;return t?"#0d99ff":"#3d3e47"}),w=s.ZP.div.withConfig({componentId:"sc-9e84c8ad-3"})(["padding:0 12px 10px;.box{display:flex;align-items:center;gap:8px;background:#f6f7fb;border:1px solid #ebecf0;border-radius:9px;padding:7px 10px;}input{border:none;background:none;outline:none;font:inherit;font-size:13px;color:#1a1b21;width:100%;}svg{color:#a4a6b3;flex:none;}"]),k=s.ZP.div.withConfig({componentId:"sc-9e84c8ad-4"})(["display:flex;gap:6px;padding:0 12px 12px;flex-wrap:wrap;html.su-plugin &{flex-wrap:nowrap;gap:4px;padding:0 10px 12px;}"]),D=s.ZP.button.withConfig({componentId:"sc-9e84c8ad-5"})(["font-size:11.5px;padding:4px 10px;border-radius:999px;cursor:pointer;font-family:inherit;border:1px solid #d3d7e6;background:#fff;color:",";font-weight:",";.c{opacity:0.8;font-variant-numeric:tabular-nums;margin-left:3px;}html.su-plugin &{font-size:10px;padding:3px 6px;white-space:nowrap;.c{margin-left:2px;}}"],e=>{let{$on:t}=e;return t?"#2b2c33":"#7a7b85"},e=>{let{$on:t}=e;return t?700:500}),y=s.ZP.div.withConfig({componentId:"sc-9e84c8ad-6"})(["position:absolute;right:0;top:calc(100% + 4px);z-index:20;background:#fff;border:1px solid #d3d7e6;border-radius:9px;box-shadow:0 10px 28px rgba(18,19,26,0.16);padding:5px;min-width:128px;button{display:flex;align-items:center;gap:8px;width:100%;border:0;background:none;border-radius:7px;padding:7px 9px;font-size:12.5px;color:#3d3e47;text-align:left;cursor:pointer;font-family:inherit;&:hover{background:#f6f7fb;}&.on{color:#0d99ff;font-weight:600;}}"]),j=s.ZP.div.withConfig({componentId:"sc-9e84c8ad-7"})(["overflow-y:auto;flex:1;min-height:120px;border-top:1px solid #ebecf0;"]),I=s.ZP.div.withConfig({componentId:"sc-9e84c8ad-8"})(["font-size:12.5px;color:#7a7b85;line-height:1.75;padding:30px 14px;text-align:center;white-space:pre-line;"]),C=s.ZP.div.withConfig({componentId:"sc-9e84c8ad-9"})(["display:flex;flex-direction:column;align-items:center;gap:8px;padding:40px 22px;text-align:center;"]),E=s.ZP.div.withConfig({componentId:"sc-9e84c8ad-10"})(["width:48px;height:48px;border-radius:50%;display:grid;place-items:center;background:#efedfa;font-size:24px;line-height:1;"]),P=s.ZP.div.withConfig({componentId:"sc-9e84c8ad-11"})(["margin-top:4px;font-size:14.5px;font-weight:700;color:#2b2c33;"]),A=s.ZP.p.withConfig({componentId:"sc-9e84c8ad-12"})(["margin:0;font-size:12.5px;line-height:1.6;color:#7a7b85;"]),z=s.ZP.button.withConfig({componentId:"sc-9e84c8ad-13"})(["margin-top:8px;border:0;border-radius:999px;padding:10px 18px;background:#413d7d;color:#fff;font-family:inherit;font-size:13px;font-weight:700;cursor:pointer;box-shadow:0 4px 14px rgba(65,61,125,0.28);transition:background 0.12s ease,box-shadow 0.12s ease,transform 0.05s ease;&:hover{background:#4b4690;box-shadow:0 6px 18px rgba(65,61,125,0.36);}&:active{transform:translateY(1px);}"]),M=s.ZP.div.withConfig({componentId:"sc-9e84c8ad-14"})(["position:relative;display:flex;gap:11px;padding:14px 14px 14px 20px;border-bottom:1px solid #f0f1f4;cursor:pointer;background:",";opacity:",";&:hover{background:",";}&::before{content:'';position:absolute;left:8px;top:20px;width:7px;height:7px;border-radius:50%;background:#0d99ff;opacity:",";}"],e=>{let{$sel:t}=e;return t?"#e6f4ff":"#fff"},e=>{let{$resolved:t,$sel:o}=e;return t&&!o?.62:1},e=>{let{$sel:t}=e;return t?"#e6f4ff":"#f9fafc"},e=>{let{$unread:t}=e;return t?1:0}),Z=s.ZP.div.withConfig({componentId:"sc-9e84c8ad-15"})(["min-width:0;flex:1;.meta{display:flex;align-items:center;gap:6px;margin-bottom:2px;flex-wrap:wrap;}.seq{font-family:ui-monospace,monospace;font-size:11px;color:#a4a6b3;font-variant-numeric:tabular-nums;}.loc-line{margin:1px 0 3px;}.loc{display:inline-block;font-size:10.5px;color:#7a7b85;background:#f2f3f7;border:1px solid #ebecf0;border-radius:5px;padding:0 6px;line-height:16px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:bottom;}.who{font-size:12.5px;font-weight:700;color:#1a1b21;}.ago{font-size:11px;color:#a4a6b3;}.text{font-size:13px;color:#1a1b21;line-height:1.5;white-space:pre-line;word-break:break-word;}.text.clip{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;}"]),N=s.ZP.div.withConfig({componentId:"sc-9e84c8ad-16"})(["display:flex;align-items:center;gap:8px;margin-top:8px;flex-wrap:wrap;"]),S=s.ZP.div.withConfig({componentId:"sc-9e84c8ad-17"})(["display:flex;gap:5px;flex-wrap:wrap;align-items:center;"]),L=s.ZP.button.withConfig({componentId:"sc-9e84c8ad-18"})(["font-size:11.5px;border-radius:999px;padding:1px 7px;display:inline-flex;align-items:center;gap:3px;cursor:pointer;font-family:inherit;line-height:1.5;border:1px solid ",";background:",";color:",";"],e=>{let{$mine:t}=e;return t?"#0d99ff":"#d3d7e6"},e=>{let{$mine:t}=e;return t?"#e6f4ff":"#fff"},e=>{let{$mine:t}=e;return t?"#0d99ff":"#7a7b85"}),F=s.ZP.span.withConfig({componentId:"sc-9e84c8ad-19"})(["font-size:11.5px;color:#0d99ff;font-weight:600;"]),B=s.ZP.div.withConfig({componentId:"sc-9e84c8ad-20"})(["position:absolute;right:10px;top:10px;display:flex;gap:2px;opacity:0;transition:opacity 0.12s;",":hover &{opacity:1;}button{width:24px;height:24px;border-radius:6px;display:grid;place-items:center;border:1px solid transparent;background:#fff;color:#a4a6b3;cursor:pointer;&:hover{background:#f2f3f7;color:#3d3e47;}&.resolve:hover{color:#12b886;background:#e6f7f0;}&.on{color:#0d99ff;background:#e6f4ff;border-color:#b3e0ff;}}"],M),T=s.ZP.span.withConfig({componentId:"sc-9e84c8ad-21"})(["display:inline-flex;align-items:center;gap:3px;font-size:10.5px;color:#12b886;font-weight:700;"]),W=s.ZP.div.withConfig({componentId:"sc-9e84c8ad-22"})(["margin-top:10px;padding-top:9px;border-top:1px solid #f0f1f4;.reply-row{position:relative;display:flex;gap:8px;margin-bottom:9px;}.reply-row .racts{position:absolute;top:-2px;right:0;display:flex;gap:2px;opacity:0;transition:opacity 0.12s;}.reply-row:hover .racts{opacity:1;}.reply-row .racts button{width:22px;height:22px;border-radius:6px;border:1px solid #ebecf0;background:#fff;color:#8a8b94;display:grid;place-items:center;cursor:pointer;}.reply-row .racts button:hover{background:#f2f3f7;color:#3d3e47;}.reply-row .racts button.on{color:#0d99ff;background:#e6f4ff;border-color:#b3e0ff;}.reply-row .rreacts{display:flex;flex-wrap:wrap;gap:4px;margin-top:5px;}.reply-row .rreacts button{font-size:11px;line-height:1.5;border:1px solid #d3d7e6;background:#fff;color:#7a7b85;border-radius:999px;padding:0 7px;cursor:pointer;}.reply-row .rreacts button.mine{border-color:#0d99ff;background:#e6f4ff;color:#0d99ff;}.reply-row .rt{padding-right:4px;}.reply-row .ra{width:22px;height:22px;border-radius:50%;color:#fff;font-size:10px;font-weight:700;display:grid;place-items:center;flex-shrink:0;}.reply-row .rt{font-size:12px;line-height:1.5;min-width:0;word-break:break-word;}.reply-row .rt b{font-size:11px;}.reply-row .rt time{font-size:10px;color:#a4a6b3;margin-left:5px;}"]),$=s.ZP.div.withConfig({componentId:"sc-9e84c8ad-23"})(["display:flex;align-items:center;gap:8px;border:1px solid #d3d7e6;border-radius:999px;padding:5px 6px 5px 12px;input{flex:1;min-width:0;border:none;outline:none;font:inherit;font-size:12.5px;background:none;}button{width:26px;height:26px;border-radius:50%;background:#0d99ff;color:#fff;border:none;display:grid;place-items:center;cursor:pointer;flex-shrink:0;transition:background 0.12s ease,color 0.12s ease;&:disabled{background:#eceef3;color:#b4b6c1;cursor:default;}}"]),U=s.ZP.textarea.withConfig({componentId:"sc-9e84c8ad-24"})(["width:100%;margin-top:3px;border:1px solid #0d99ff;border-radius:8px;padding:6px 8px;font-size:12.5px;font-family:inherit;resize:vertical;min-height:52px;"]),K=s.ZP.div.withConfig({componentId:"sc-9e84c8ad-25"})(["position:fixed;z-index:2147483646;background:#fff;border:1px solid #d3d7e6;border-radius:10px;box-shadow:0 12px 32px rgba(18,19,26,0.2);padding:5px;min-width:168px;button{display:flex;align-items:center;gap:9px;width:100%;border:0;background:none;border-radius:7px;padding:8px 10px;font-size:12.5px;color:#3d3e47;text-align:left;cursor:pointer;font-family:inherit;&:hover{background:#f6f7fb;}&.danger{color:#c4554d;}}.sep{height:1px;background:#ebecf0;margin:4px 2px;}"]),R=e=>{let{s:t=15}=e;return(0,n.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",children:(0,n.jsx)("path",{d:"M20 6L9 17l-5-5"})})};function O(e){var t,o;let{boardIds:d,projectIds:s,onGoTarget:O,hideHeader:V}=e,{threads:_}=(0,h.T)(d,{projectIds:s}),{addComment:q,deleteComment:G,updateComment:Y,toggleReaction:X,resolveComment:H,markThread:Q}=(0,h.g)(),[J,ee]=(0,a.FV)(c.p_),et=(0,r.useRouter)(),eo=(0,a.Zl)(u),en=(0,a.Zl)(c.Sh),ei=(0,a.Zl)(c.bo),[er,ed]=(0,i.useState)({}),el=(0,i.useRef)(null),{data:ea}=(0,x.pg)(),{createProject:es}=(0,x.S)(),ec=(0,i.useMemo)(()=>{var e;return new Set((null!==(e=null==ea?void 0:ea.projects)&&void 0!==e?e:[]).filter(e=>e.isOwner).map(e=>e.id))},[ea]),[eu,ep]=(0,i.useState)(!1);(0,i.useEffect)(()=>ep(!0),[]);let[eh,ex]=(0,i.useState)(""),[ef,em]=(0,i.useState)("active"),[eg,eb]=(0,i.useState)("recent"),[ev,ew]=(0,i.useState)(!1),[ek,eD]=(0,i.useState)(null),[ey,ej]=(0,i.useState)(null),[eI,eC]=(0,i.useState)(null),[eE,eP]=(0,i.useState)(null),eA=J?String(J.rootId):"";(0,i.useEffect)(()=>{eA&&el.current&&el.current.scrollIntoView({block:"nearest"})},[eA]),(0,i.useEffect)(()=>{if(!ek)return;let e=()=>eD(null);return document.addEventListener("click",e),document.addEventListener("scroll",e,!0),()=>{document.removeEventListener("click",e),document.removeEventListener("scroll",e,!0)}},[ek]),(0,i.useEffect)(()=>{if(!ey)return;let e=()=>ej(null);return document.addEventListener("click",e),document.addEventListener("scroll",e,!0),()=>{document.removeEventListener("click",e),document.removeEventListener("scroll",e,!0)}},[ey]),(0,i.useEffect)(()=>{if(!eE)return;let e=e=>{var t,o;null!==(o=e.target)&&void 0!==o&&null!==(t=o.closest)&&void 0!==t&&t.call(o,"[data-emoji-picker]")||eP(null)};return document.addEventListener("click",e),document.addEventListener("scroll",e,!0),()=>{document.removeEventListener("click",e),document.removeEventListener("scroll",e,!0)}},[eE]);let ez=(e,t)=>{let o=t.currentTarget.getBoundingClientRect(),n=Math.max(12,Math.min(o.right-264,window.innerWidth-264-12)),i=o.bottom+6;i+300>window.innerHeight-12&&(i=Math.max(12,o.top-300-6)),eP(t=>(null==t?void 0:t.rootId)===e?null:{rootId:e,x:n,y:i})},eM=(0,i.useMemo)(()=>{let e=0,t=0,o=0,n=0;for(let r of _){var i;if(r.resolved){n+=1;continue}e+=1,r.unread&&(t+=1),(null===(i=r.comments[0])||void 0===i?void 0:i.isMine)&&(o+=1)}return{active:e,unread:t,mine:o,resolved:n}},[_]),eZ=(0,i.useMemo)(()=>{let e=eh.trim().toLowerCase(),t=_.filter(e=>{var t;return"resolved"===ef?e.resolved:!e.resolved&&("unread"===ef?e.unread:"mine"!==ef||!!(null===(t=e.comments[0])||void 0===t?void 0:t.isMine))});e&&(t=t.filter(t=>t.comments.some(t=>t.body.toLowerCase().includes(e)||t.authorName.toLowerCase().includes(e))));let o=[...t];return"oldest"===eg?o.sort((e,t)=>e.rootId-t.rootId):"unread"===eg?o.sort((e,t)=>Number(t.unread)-Number(e.unread)||t.rootId-e.rootId):o.sort((e,t)=>t.rootId-e.rootId),o},[_,eh,ef,eg]),eN=(e,t,o)=>{let n=(null!=t?t:"").trim();n&&n!==o&&Y.mutate({commentId:e,body:n}),eC(null)},eS=e=>{var t,o;let n=0===e.boardId?"project=".concat(null!==(o=e.projectId)&&void 0!==o?o:""):"board=".concat(e.boardId),i="".concat(window.location.origin,"/board?").concat(n,"&comment=").concat(e.rootId);null===(t=navigator.clipboard)||void 0===t||t.writeText(i)},eL=e=>{var t,o;return!!(null===(t=e.comments[0])||void 0===t?void 0:t.isMine)||(null===(o=e.comments[0])||void 0===o?void 0:o.projectId)!=null&&ec.has(e.comments[0].projectId)},eF={recent:"최신순",oldest:"오래된순",unread:"안읽음 먼저"};return(0,n.jsxs)(g,{children:[!V&&(0,n.jsxs)(b,{children:[(0,n.jsx)("b",{children:"협업 피드백"}),(0,n.jsx)("span",{className:"n",children:eM.active}),(0,n.jsx)("span",{className:"sp"}),(0,n.jsxs)("div",{style:{position:"relative"},children:[(0,n.jsx)(v,{$on:ev,title:"정렬: ".concat(eF[eg]),"aria-label":"정렬",onClick:e=>{e.stopPropagation(),ew(e=>!e)},children:(0,n.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,n.jsx)("path",{d:"M7 4v16M7 20l-3-3M7 4l3 3M17 4v16M17 4l-3 3M17 20l3-3"})})}),ev&&(0,n.jsx)(y,{onClick:e=>e.stopPropagation(),children:["recent","oldest","unread"].map(e=>(0,n.jsx)("button",{type:"button",className:eg===e?"on":"",onClick:()=>{eb(e),ew(!1)},children:eF[e]},e))})]})]}),(0,n.jsx)(w,{children:(0,n.jsxs)("div",{className:"box",children:[(0,n.jsxs)("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,n.jsx)("circle",{cx:"11",cy:"11",r:"7"}),(0,n.jsx)("path",{d:"M21 21l-4-4"})]}),(0,n.jsx)("input",{placeholder:"피드백\xb7작성자 검색",value:eh,onChange:e=>ex(e.target.value),"aria-label":"피드백 검색"})]})}),(0,n.jsxs)(k,{children:[(0,n.jsxs)(D,{$on:"active"===ef,onClick:()=>em("active"),children:["전체",(0,n.jsx)("span",{className:"c",children:eM.active})]}),(0,n.jsxs)(D,{$on:"unread"===ef,onClick:()=>em("unread"),children:["안읽음",(0,n.jsx)("span",{className:"c",children:eM.unread})]}),(0,n.jsxs)(D,{$on:"mine"===ef,onClick:()=>em("mine"),children:["내 피드백",(0,n.jsx)("span",{className:"c",children:eM.mine})]}),(0,n.jsxs)(D,{$on:"resolved"===ef,onClick:()=>em("resolved"),children:["해결됨",(0,n.jsx)("span",{className:"c",children:eM.resolved})]})]}),(0,n.jsx)(j,{children:0===eZ.length?eh||"active"!==ef?(0,n.jsx)(I,{children:"조건에 맞는 피드백이 없습니다."}):(0,n.jsxs)(C,{children:[(0,n.jsx)(E,{"aria-hidden":!0,children:"\uD83D\uDCAC"}),(0,n.jsx)(P,{children:"아직 주고받은 피드백이 없어요"}),(0,n.jsx)(A,{children:"팀원을 초대하면 일람표에서 서로 검토 의견을 주고받을 수 있어요. 딱 두 단계면 시작해요."}),(0,n.jsx)(z,{type:"button",onClick:()=>{var e,t,o,n;if(en(!1),!localStorage.getItem("TOKEN")){et.push("/login?returnTo=".concat(encodeURIComponent("/board")));return}if("undefined"!=typeof document&&document.querySelector('[data-guide="share"]')){eo(1);return}let i=null==ea?void 0:null===(t=ea.projects)||void 0===t?void 0:null===(e=t[0])||void 0===e?void 0:e.id;if(null!=i){eo(1),et.push("/board?project=".concat(i));return}let r=null==ea?void 0:null===(n=ea.rootBoards)||void 0===n?void 0:null===(o=n[0])||void 0===o?void 0:o.id;if(null!=r){eo(1),et.push("/board?board=".concat(r));return}es.isLoading||es.mutate("보드",{onSuccess:e=>{var t;let o=null==e?void 0:null===(t=e.data)||void 0===t?void 0:t.id;null!=o&&(eo(1),et.push("/board?project=".concat(o)))}})},children:"팀 초대하고 시작하기 →"})]}):eZ.map(e=>{var t,o,i,r;let d=eA===e.key,l=e.comments[0],a=e.comments.slice(1);return(0,n.jsxs)(M,{ref:d?el:void 0,$sel:d,$unread:e.unread,$resolved:e.resolved,onClick:()=>{ee({boardId:e.boardId,productId:e.productId,rootId:e.rootId}),e.unread&&Q.mutate({commentId:e.rootId,seen:!0}),O(e.boardId,e.productId,e.rootId,e.projectId,e.columnKey,e.sceneId),en(!1),ei(e.rootId)},children:[(0,n.jsx)(p.ZP,{name:l.authorName,seed:l.authorId,size:30}),(0,n.jsxs)(Z,{children:[(0,n.jsxs)("div",{className:"meta",children:[(0,n.jsxs)("span",{className:"seq",children:["#",e.seq]}),(0,n.jsx)("span",{className:"who",children:l.authorName}),(0,n.jsxs)("span",{className:"ago",title:(0,f.w)(l.createdAt),children:["\xb7 ",(0,f.G)(l.createdAt)]}),e.resolved&&(0,n.jsxs)(T,{children:[(0,n.jsx)(R,{s:12})," 해결됨"]})]}),e.boardName?(0,n.jsx)("div",{className:"loc-line",children:(0,n.jsx)("span",{className:"loc",children:e.boardName})}):null,eI===l.id?(0,n.jsx)(U,{autoFocus:!0,defaultValue:l.body,onClick:e=>e.stopPropagation(),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),eN(l.id,e.target.value,l.body)),"Escape"===e.key&&eC(null)},onBlur:e=>eN(l.id,e.target.value,l.body)}):(0,n.jsx)("div",{className:"text".concat(d?"":" clip"),children:l.body}),((null!==(t=l.reactions)&&void 0!==t?t:[]).length>0||!d&&a.length>0)&&(0,n.jsxs)(N,{onClick:e=>e.stopPropagation(),children:[(0,n.jsx)(S,{children:(null!==(o=l.reactions)&&void 0!==o?o:[]).map(e=>(0,n.jsxs)(L,{type:"button",$mine:e.mine,title:e.mine?"반응 취소":"나도 반응",onClick:()=>X.mutate({commentId:l.id,emoji:e.emoji}),children:[(0,n.jsx)("span",{children:e.emoji}),(0,n.jsx)("em",{style:{fontStyle:"normal",fontWeight:700},children:e.count})]},e.emoji))}),!d&&a.length>0&&(0,n.jsxs)(F,{children:["답글 ",a.length]})]}),d&&(0,n.jsxs)(W,{onClick:e=>e.stopPropagation(),children:[a.map(e=>{var t,o;return(0,n.jsxs)("div",{className:"reply-row",children:[(0,n.jsx)(p.ZP,{name:e.authorName,seed:e.authorId,size:20}),(0,n.jsxs)("div",{className:"rt",children:[(0,n.jsx)("b",{children:e.authorName}),(0,n.jsx)("time",{title:(0,f.w)(e.createdAt),children:(0,f.G)(e.createdAt)}),eI===e.id?(0,n.jsx)(U,{autoFocus:!0,defaultValue:e.body,onClick:e=>e.stopPropagation(),onKeyDown:t=>{"Enter"!==t.key||t.shiftKey||(t.preventDefault(),eN(e.id,t.target.value,e.body)),"Escape"===t.key&&eC(null)},onBlur:t=>eN(e.id,t.target.value,e.body)}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("br",{}),e.body]}),(null!==(t=e.reactions)&&void 0!==t?t:[]).length>0&&(0,n.jsx)("div",{className:"rreacts",children:(null!==(o=e.reactions)&&void 0!==o?o:[]).map(t=>(0,n.jsxs)("button",{type:"button",className:t.mine?"mine":"",onClick:()=>X.mutate({commentId:e.id,emoji:t.emoji}),children:[t.emoji," ",t.count]},t.emoji))})]}),(0,n.jsxs)("div",{className:"racts",children:[(0,n.jsx)("button",{type:"button",className:(null==eE?void 0:eE.rootId)===e.id?"on":"",title:"이모지 반응",onClick:t=>ez(e.id,t),children:(0,n.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:[(0,n.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,n.jsx)("path",{d:"M8 14s1.5 2 4 2 4-2 4-2M9 9.5h.01M15 9.5h.01"})]})}),(e.isMine||null!=e.projectId&&ec.has(e.projectId))&&(0,n.jsx)("button",{type:"button",className:(null==ey?void 0:ey.id)===e.id?"on":"",title:"더보기",onClick:t=>{let o=t.currentTarget.getBoundingClientRect();ej(t=>{var n;return(null==t?void 0:t.id)===e.id?null:{id:e.id,isMine:e.isMine,projectId:null!==(n=e.projectId)&&void 0!==n?n:null,x:o.right-140,y:o.bottom+4}})},children:(0,n.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,n.jsx)("circle",{cx:"5",cy:"12",r:"1.6"}),(0,n.jsx)("circle",{cx:"12",cy:"12",r:"1.6"}),(0,n.jsx)("circle",{cx:"19",cy:"12",r:"1.6"})]})})]})]},e.id)}),(0,n.jsxs)($,{children:[(0,n.jsx)("input",{placeholder:"답글 달기",value:null!==(i=er[e.key])&&void 0!==i?i:"",onChange:t=>ed(o=>({...o,[e.key]:t.target.value})),onKeyDown:t=>{var o;if("Enter"!==t.key)return;let n=(null!==(o=er[e.key])&&void 0!==o?o:"").trim();n&&(q.mutate({boardId:e.boardId,projectId:e.projectId,productId:e.productId,parentId:e.rootId,body:n}),ed(t=>({...t,[e.key]:""})))}}),(0,n.jsx)("button",{type:"button","aria-label":"답글 등록",disabled:!(null!==(r=er[e.key])&&void 0!==r?r:"").trim(),onClick:()=>{var t;let o=(null!==(t=er[e.key])&&void 0!==t?t:"").trim();o&&(q.mutate({boardId:e.boardId,projectId:e.projectId,productId:e.productId,parentId:e.rootId,body:o}),ed(t=>({...t,[e.key]:""})))},children:(0,n.jsx)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,n.jsx)("path",{d:"M12 19V5M6 11l6-6 6 6"})})})]})]})]}),(0,n.jsxs)(B,{onClick:e=>e.stopPropagation(),style:(null==eE?void 0:eE.rootId)===e.rootId?{opacity:1}:void 0,children:[(0,n.jsx)("button",{type:"button",className:(null==eE?void 0:eE.rootId)===e.rootId?"on":"",title:"이모지 반응","aria-label":"이모지 반응",onClick:t=>ez(e.rootId,t),children:(0,n.jsxs)("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:[(0,n.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,n.jsx)("path",{d:"M8 14s1.5 2 4 2 4-2 4-2M9 9.5h.01M15 9.5h.01"})]})}),eL(e)&&(0,n.jsx)("button",{type:"button",className:"resolve",title:e.resolved?"다시 열기":"해결로 표시",onClick:()=>H.mutate({commentId:e.rootId,resolved:!e.resolved}),children:(0,n.jsx)(R,{})}),(0,n.jsx)("button",{type:"button",title:"더보기","aria-label":"더보기",onClick:t=>eD({t:e,x:t.clientX,y:t.clientY}),children:(0,n.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,n.jsx)("circle",{cx:"5",cy:"12",r:"1.6"}),(0,n.jsx)("circle",{cx:"12",cy:"12",r:"1.6"}),(0,n.jsx)("circle",{cx:"19",cy:"12",r:"1.6"})]})})]})]},e.key)})}),eu&&ek&&(0,l.createPortal)((0,n.jsxs)(K,{style:{left:Math.min(ek.x,window.innerWidth-180),top:Math.min(ek.y,window.innerHeight-220)},onClick:e=>e.stopPropagation(),onContextMenu:e=>e.preventDefault(),children:[(null===(t=ek.t.comments[0])||void 0===t?void 0:t.isMine)&&(0,n.jsxs)("button",{type:"button",onClick:()=>{ee({boardId:ek.t.boardId,productId:ek.t.productId,rootId:ek.t.rootId}),eC(ek.t.rootId),eD(null)},children:[(0,n.jsx)("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,n.jsx)("path",{d:"M12 20h9M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4z"})}),"편집"]}),eL(ek.t)&&(0,n.jsxs)("button",{type:"button",onClick:()=>{H.mutate({commentId:ek.t.rootId,resolved:!ek.t.resolved}),eD(null)},children:[(0,n.jsx)(R,{}),ek.t.resolved?"다시 열기":"해결로 표시"]}),(0,n.jsxs)("button",{type:"button",onClick:()=>{Q.mutate({commentId:ek.t.rootId,seen:!1}),eD(null)},children:[(0,n.jsxs)("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,n.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,n.jsx)("path",{d:"M12 8v4M12 16h.01"})]}),"안읽음으로 표시"]}),(0,n.jsxs)("button",{type:"button",onClick:()=>{eS(ek.t),eD(null)},children:[(0,n.jsx)("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,n.jsx)("path",{d:"M10 13a5 5 0 0 0 7 0l2-2a5 5 0 0 0-7-7l-1 1M14 11a5 5 0 0 0-7 0l-2 2a5 5 0 0 0 7 7l1-1"})}),"링크 복사"]}),((null===(o=ek.t.comments[0])||void 0===o?void 0:o.isMine)||eL(ek.t))&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"sep"}),(0,n.jsxs)("button",{type:"button",className:"danger",onClick:()=>{G.mutate(ek.t.rootId),eD(null)},children:[(0,n.jsx)("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,n.jsx)("path",{d:"M3 6h18M8 6V4h8v2M6 6l1 14h10l1-14"})}),"스레드 삭제"]})]})]}),document.body),eu&&eE&&(0,l.createPortal)((0,n.jsx)(m.Z,{style:{position:"fixed",left:eE.x,top:eE.y,zIndex:2147483647},onPick:e=>{X.mutate({commentId:eE.rootId,emoji:e}),eP(null)}}),document.body),eu&&ey&&(0,l.createPortal)((0,n.jsxs)(K,{style:{left:Math.max(12,Math.min(ey.x,window.innerWidth-150)),top:Math.min(ey.y,window.innerHeight-110)},onClick:e=>e.stopPropagation(),onContextMenu:e=>e.preventDefault(),children:[ey.isMine&&(0,n.jsxs)("button",{type:"button",onClick:()=>{eC(ey.id),ej(null)},children:[(0,n.jsx)("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,n.jsx)("path",{d:"M12 20h9M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4z"})}),"편집"]}),(0,n.jsxs)("button",{type:"button",className:"danger",onClick:()=>{G.mutate(ey.id),ej(null)},children:[(0,n.jsx)("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,n.jsx)("path",{d:"M3 6h18M8 6V4h8v2M6 6l1 14h10l1-14"})}),"삭제"]})]}),document.body)]})}var V=o(50194),_=o(72513),q=o(37686),G=o(62758),Y=o(59711);let X=s.ZP.div.withConfig({componentId:"sc-18fc9c5d-0"})(["position:fixed;inset:0;z-index:",";background:transparent;cursor:default;"],2147483642),H=(0,s.F4)(["0%{box-shadow:0 0 0 0 rgba(65,61,125,0.55);}70%{box-shadow:0 0 0 8px rgba(65,61,125,0);}100%{box-shadow:0 0 0 0 rgba(65,61,125,0);}"]),Q=s.ZP.div.withConfig({componentId:"sc-18fc9c5d-1"})(["position:fixed;top:",";transform:none;right:",";width:35px;height:","px;background:",";"," transition:right 0.3s ease-in-out,background 0.15s ease;cursor:pointer;z-index:",";display:flex;align-items:center;justify-content:center;border-top-left-radius:8px;border-bottom-left-radius:8px;"," span{display:inline-block;color:#fff;font-size:14px;font-weight:700;white-space:nowrap;}@media (max-width:768px){width:28px;right:0;span{font-size:12px;}}@media (min-width:769px) and (max-width:1440px){width:28px;right:",";span{font-size:12px;}}html.su-plugin &{width:28px;right:","px;transform:translateX(",");transition:transform 0.3s ease-in-out;span{font-size:12px;}}"],(0,Y.dO)("top"),e=>{let{$open:t}=e;return t?"".concat(G.a,"px"):"0"},Y.Me,e=>{let{$dim:t}=e;return t?Y.BQ:Y.gW},e=>{let{$off:t}=e;return t?"opacity: 0.4; cursor: not-allowed; background: #b9bac2;":""},2147483645,e=>{let{$open:t,$dim:o,$off:n}=e;return t||o||n?"":(0,s.iv)(["animation:"," 1.8s ease-out infinite;@media (prefers-reduced-motion:reduce){animation:none;}"],H)},e=>{let{$open:t}=e;return t?"".concat(280,"px"):"0"},280,e=>{let{$open:t}=e;return t?"0":"".concat(280,"px")}),J=s.ZP.div.withConfig({componentId:"sc-18fc9c5d-2"})(["transform:rotate(-90deg);display:inline-flex;align-items:center;gap:6px;white-space:nowrap;svg{display:block;flex:0 0 auto;}@media (max-width:768px){gap:5px;svg{width:14px;height:14px;}}@media (min-width:769px) and (max-width:1440px){gap:5px;svg{width:14px;height:14px;}}html.su-plugin &{gap:5px;svg{width:14px;height:14px;}}"]),ee=(0,s.F4)(["0%{transform:scale(1);box-shadow:0 0 0 0 rgba(251,89,55,0.5);}70%{transform:scale(1.15);box-shadow:0 0 0 6px rgba(251,89,55,0);}100%{transform:scale(1);box-shadow:0 0 0 0 rgba(251,89,55,0);}"]),et=s.ZP.div.withConfig({componentId:"sc-18fc9c5d-3"})(["position:absolute;display:flex;align-items:center;justify-content:center;background-color:#fb5937;color:#fff;font-size:15px;font-weight:bold;width:27px;height:27px;border-radius:50%;top:-10px;left:-8px;animation:"," 1.6s ease-in-out infinite;@media (max-width:768px){width:25px;height:25px;font-size:14px;top:-11px;left:-8px;}html.su-plugin &{width:24px;height:24px;font-size:13px;top:-10px;left:-6px;}@media (min-width:769px) and (max-width:1440px){width:24px;height:24px;font-size:13px;top:-9px;left:-6px;}"],ee),eo=s.ZP.div.withConfig({componentId:"sc-18fc9c5d-4"})(["position:fixed;top:0;right:0;width:","px;height:100vh;background:#fff;box-shadow:-2px 0 8px rgba(0,0,0,0.1);transform:translateX(",");transition:",";z-index:",";display:flex;flex-direction:column;min-height:0;@media (max-width:500px){left:0;width:100vw;}@media (min-width:769px) and (max-width:1440px){width:","px;}html.su-plugin &{width:","px;}"],G.a,e=>{let{$open:t}=e;return t?"0":"100%"},e=>{let{$noAnim:t}=e;return t?"none":"transform 0.3s ease-in-out"},2147483643,280,280),en=s.ZP.div.withConfig({componentId:"sc-18fc9c5d-5"})(["position:relative;height:48px;flex:0 0 auto;"]),ei=s.ZP.button.withConfig({componentId:"sc-18fc9c5d-6"})(["position:absolute;top:16px;left:16px;background:none;border:none;font-size:16px;cursor:pointer;z-index:3;padding:0;color:#0d0d0d;font-family:inherit;"]),er=s.ZP.div.withConfig({componentId:"sc-18fc9c5d-7"})(["position:absolute;top:16px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:8px;font-size:16px;font-weight:400;color:#0d0d0d;white-space:nowrap;z-index:3;.n{font-size:11px;font-weight:800;color:#413d7d;background:#efedfa;padding:2px 8px;border-radius:20px;}"]),ed=s.ZP.div.withConfig({componentId:"sc-18fc9c5d-8"})(["flex:1;min-height:0;display:flex;flex-direction:column;"]);function el(e){let{boardIds:t,projectIds:o,active:r,persistHandle:d,resolveProduct:s,onGoTarget:u}=e,[p,x]=(0,a.FV)(c.Sh),[f,m]=(0,a.FV)(V.Z),g=(0,a.FV)(_.Z)[0],[b,v]=(0,a.FV)(c.sd),w=(0,a.Zl)(c.DX),{total:k,threads:D}=(0,h.T)(t,{projectIds:o}),y=D.filter(e=>e.unread).length,j=(0,q.S)(),[I,C]=(0,i.useState)(!1),E=(0,i.useRef)(null);(0,i.useEffect)(()=>C(!0),[]);let P=t.join(",");(0,i.useEffect)(()=>{p&&r&&0!==t.length&&j.mutate(t)},[p,r,P,k]),(0,i.useEffect)(()=>{t.length||d||x(!1)},[t.length,d,x]),(0,i.useEffect)(()=>{r||x(!1)},[r,x]),(0,i.useEffect)(()=>(w(t.length>0||!!d),()=>w(!1)),[t.length,d,w]),(0,i.useEffect)(()=>{f&&p&&x(!1)},[f,p,x]),(0,i.useEffect)(()=>{if(!p)return;let e=e=>{"Escape"===e.key&&x(!1)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[p,x]);let A=(0,i.useCallback)(()=>{r&&(p||(f&&v(!0),x(!0),m(!1)))},[r,p,f,x,m,v]);(0,i.useEffect)(()=>{if(!b)return;let e=window.setTimeout(()=>v(!1),120);return()=>window.clearTimeout(e)},[b,v]);let z=(0,i.useCallback)(e=>{e.stopPropagation(),e.preventDefault(),x(!1)},[x]);return I&&(t.length||d)&&!g?(0,l.createPortal)((0,n.jsxs)(n.Fragment,{children:[p&&(0,n.jsx)(X,{onMouseDown:z,onClick:z,onTouchStart:e=>{e.stopPropagation(),x(!1)}}),(0,n.jsxs)(Q,{className:"ignore-sample-close",$open:p||f,$dim:f&&!p,$off:!r,role:"button",tabIndex:0,"aria-label":"협업 피드백 보기","aria-disabled":!r,title:r?"협업 피드백":"볼 수 있는 보드가 없습니다",onClick:A,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&A()},children:[(0,n.jsxs)(J,{children:[(0,n.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"#fff","aria-hidden":!0,children:(0,n.jsx)("path",{d:"M12 3.2c-5.1 0-9 3.05-9 6.9 0 2 1.03 3.78 2.72 5.03-.14 1.2-.63 2.25-1.35 3.02-.26.28-.08.73.3.68 1.72-.25 3.24-.85 4.4-1.7.9.26 1.9.4 2.93.4 5.1 0 9-3.06 9-6.93S17.1 3.2 12 3.2z"})}),(0,n.jsx)("span",{children:"협업 피드백"})]}),r&&y>0&&(0,n.jsx)(et,{children:y>99?"99+":y})]}),(0,n.jsxs)(eo,{ref:E,$open:p,$noAnim:b||f&&!p,"aria-hidden":!p,children:[(0,n.jsxs)(en,{children:[(0,n.jsx)(ei,{type:"button",onClick:()=>x(!1),"aria-label":"닫기",children:"→"}),(0,n.jsxs)(er,{children:["협업 피드백",(0,n.jsx)("span",{className:"n",children:k})]})]}),(0,n.jsx)(ed,{children:(0,n.jsx)(O,{boardIds:t,projectIds:o,resolveProduct:s,onGoTarget:u,hideHeader:!0})})]})]}),document.body):null}var ea=o(7261),es=o(64779),ec=o(92385);let eu=s.ZP.div.withConfig({componentId:"sc-a0354d3b-0"})(["position:fixed;inset:0;background:rgba(18,19,26,0.45);z-index:2147483600;display:flex;align-items:center;justify-content:center;padding:20px;"]),ep=s.ZP.div.withConfig({componentId:"sc-a0354d3b-1"})(["width:min(480px,96vw);background:#fff;border-radius:15px;box-shadow:0 20px 60px rgba(0,0,0,0.3);overflow:hidden;"]),eh=s.ZP.div.withConfig({componentId:"sc-a0354d3b-2"})(["display:flex;align-items:center;gap:9px;padding:16px 18px;border-bottom:1px solid #ebecf0;b{font-size:15px;}.sub{font-size:15px;color:#7a7b85;}button{margin-left:auto;border:0;background:none;font-size:17px;color:#a0a1aa;cursor:pointer;}"]),ex=s.ZP.div.withConfig({componentId:"sc-a0354d3b-3"})(["padding:16px 18px;"]),ef=(0,s.F4)(["0%{box-shadow:0 0 0 0 rgba(65,61,125,0.45);}70%{box-shadow:0 0 0 7px rgba(65,61,125,0);}100%{box-shadow:0 0 0 0 rgba(65,61,125,0);}"]),em=s.ZP.div.withConfig({componentId:"sc-a0354d3b-4"})(["display:flex;gap:8px;position:relative;input{flex:1;min-width:0;border:1px solid #dcdde3;border-radius:9px;padding:10px 12px;font-size:13px;font-family:inherit;&:focus{outline:2px solid #efedfa;border-color:#413d7d;}}",""],e=>{let{$guide:t}=e;return t?(0,s.iv)(["input{border-color:#413d7d;animation:"," 1.5s ease-in-out infinite;}"],ef):""}),eg=s.ZP.div.withConfig({componentId:"sc-a0354d3b-5"})(["margin-bottom:10px;padding:9px 12px;border-radius:10px;background:#efedfa;color:#413d7d;font-size:12.5px;line-height:1.5;b{font-weight:800;}.step{display:inline-block;margin-right:6px;padding:1px 7px;border-radius:999px;background:#413d7d;color:#fff;font-size:10.5px;font-weight:800;vertical-align:1px;}"]),eb=s.ZP.button.withConfig({componentId:"sc-a0354d3b-6"})(["position:",";overflow:",";border:1px solid ",";background:",";color:",";border-radius:8px;padding:7px 14px;font-size:12.5px;font-weight:700;font-family:inherit;cursor:pointer;white-space:nowrap;&:disabled{opacity:0.55;cursor:default;}"],e=>{let{$corner:t}=e;return t?"relative":"static"},e=>{let{$corner:t}=e;return"visible"},e=>{let{$primary:t}=e;return t?"#413d7d":"#dcdde3"},e=>{let{$primary:t}=e;return t?"#413d7d":"#fff"},e=>{let{$primary:t}=e;return t?"#fff":"#3d3e47"}),ev=s.ZP.div.withConfig({componentId:"sc-a0354d3b-7"})(["font-size:13px;color:#7a7b85;margin-top:10px;line-height:1.6;"]),ew=s.ZP.div.withConfig({componentId:"sc-a0354d3b-8"})(["display:flex;align-items:center;gap:10px;padding:10px 2px;border-bottom:1px solid #ebecf0;&:last-of-type{border-bottom:0;}"]),ek=s.ZP.div.withConfig({componentId:"sc-a0354d3b-9"})(["font-size:13px;font-weight:600;"]),eD=s.ZP.div.withConfig({componentId:"sc-a0354d3b-10"})(["font-size:11px;color:#7a7b85;"]),ey=s.ZP.select.withConfig({componentId:"sc-a0354d3b-11"})(["flex-shrink:0;border:1px solid #dcdde3;border-radius:9px;padding:0 8px;font-family:inherit;font-size:12.5px;font-weight:600;color:#43444d;background:#fff;cursor:pointer;&:hover{border-color:#4c6ef5;}&:focus{outline:2px solid #efedfa;border-color:#413d7d;}"]),ej=s.ZP.select.withConfig({componentId:"sc-a0354d3b-12"})(["margin-left:auto;flex-shrink:0;padding:3px 6px;border:1px solid #dcdde3;border-radius:6px;background:#ffffff;font-family:inherit;font-size:12px;color:#43444d;cursor:pointer;&:hover{border-color:#4c6ef5;}"]),eI=s.ZP.span.withConfig({componentId:"sc-a0354d3b-13"})(["margin-left:auto;font-size:11.5px;font-weight:",";color:",";"],e=>{let{$own:t}=e;return t?700:600},e=>{let{$own:t,$pending:o}=e;return t?"#1b1c22":o?"#c98a2e":"#7a7b85"}),eC=s.ZP.button.withConfig({componentId:"sc-a0354d3b-14"})(["border:0;background:none;color:#b9bac2;font-size:15px;padding:2px 4px;cursor:pointer;&:hover{color:#c4554d;}"]);s.ZP.div.withConfig({componentId:"sc-a0354d3b-15"})(["display:flex;align-items:center;gap:9px;padding:13px 18px;border-top:1px solid #ebecf0;background:#f7f8fa;.note{font-size:10.5px;color:#7a7b85;line-height:1.5;}"]);let eE=s.ZP.button.withConfig({componentId:"sc-a0354d3b-16"})(["padding:0;border:0;background:none;font-family:inherit;font-size:inherit;font-weight:700;color:#4c6ef5;cursor:pointer;text-decoration:underline;"]),eP=s.ZP.ul.withConfig({componentId:"sc-a0354d3b-17"})(["position:absolute;top:calc(100% + 6px);left:0;right:64px;z-index:5;margin:0;padding:4px;list-style:none;max-height:240px;overflow-y:auto;border:1px solid #e3e4e8;border-radius:10px;background:#ffffff;box-shadow:0 10px 28px rgba(18,19,26,0.16);button{display:flex;align-items:center;gap:8px;width:100%;padding:6px 8px;border:0;border-radius:7px;background:none;font-family:inherit;text-align:left;cursor:pointer;&.on{background:#f2f4f7;}}.tx{min-width:0;b{display:block;font-size:13px;font-weight:600;color:#1b1c22;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}em{display:block;font-style:normal;font-size:12px;color:#8b9098;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}}"]);async function eA(e){try{return await navigator.clipboard.writeText(e),!0}catch(t){try{let t=document.createElement("textarea");return t.value=e,t.style.position="fixed",t.style.opacity="0",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(t),!0}catch(e){return!1}}}function ez(){var e,t,o;let[d,s]=(0,a.FV)(c.WL),{data:h}=(0,ec.HD)(d),{setMemberRole:x,invite:f,cancelInvite:m,removeMember:g,getLink:b}=(0,ec.fw)(d),[v,w]=(0,i.useState)(""),[k,D]=(0,i.useState)(""),[y,j]=(0,i.useState)("editor"),I=2===(0,a.sJ)(u),{data:C}=(0,ec.qr)(d,v),[E,P]=(0,i.useState)(-1),[A,z]=(0,i.useState)(!0),M=A&&null!=C?C:[];(0,i.useEffect)(()=>P(-1),[v]);let[Z,N]=(0,i.useState)(!1),S=!!h&&!h.canInvite,L=(0,r.useRouter)(),F=()=>{s(null),L.push("/premium")};if((0,i.useEffect)(()=>N(!0),[]),(0,i.useEffect)(()=>{d||(w(""),D(""),P(-1),z(!0))},[d]),(0,i.useEffect)(()=>{let e=e=>{"Escape"===e.key&&s(null)};return d&&document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[d,s]),!Z||!d)return null;let B=()=>{let e=v.trim();e&&f.mutate({email:e,role:y},{onSuccess:e=>{var t;w(""),D(null!==(t=null==e?void 0:e.link)&&void 0!==t?t:""),ea.Am.success((null==e?void 0:e.isExistingMember)?"초대를 보냈습니다 \xb7 상대 화면에 승인 카드가 뜹니다":"초대를 보냈습니다 \xb7 승인 대기 중")},onError:e=>{var t,o,n;ea.Am.error(null!==(n=null==e?void 0:null===(o=e.response)||void 0===o?void 0:null===(t=o.data)||void 0===t?void 0:t.message)&&void 0!==n?n:"초대를 보내지 못했습니다.")}})};return(0,l.createPortal)((0,n.jsx)(eu,{onClick:e=>e.target===e.currentTarget&&s(null),children:(0,n.jsxs)(ep,{role:"dialog","aria-label":"프로젝트 공유",children:[(0,n.jsxs)(eh,{children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("b",{children:"공유"})," ",(0,n.jsxs)("span",{className:"sub",children:["\xb7 ",null!==(e=null==h?void 0:h.projectName)&&void 0!==e?e:""]})]}),(0,n.jsx)("button",{type:"button",onClick:()=>s(null),children:"✕"})]}),(0,n.jsxs)(ex,{children:[I&&(0,n.jsxs)(eg,{children:[(0,n.jsx)("span",{className:"step",children:"2 / 2 단계"}),"함께 볼 팀원의 ",(0,n.jsx)("b",{children:"이메일"}),"을 입력하고 ",(0,n.jsx)("b",{children:"초대"}),"를 보내면 끝이에요."]}),(0,n.jsxs)(em,{$guide:I,children:[(0,n.jsx)("input",{value:v,onChange:e=>{w(e.target.value),z(!0)},onKeyDown:e=>{if("ArrowDown"===e.key&&M.length){e.preventDefault(),P(e=>(e+1)%M.length);return}if("ArrowUp"===e.key&&M.length){e.preventDefault(),P(e=>e<=0?M.length-1:e-1);return}if("Escape"===e.key&&M.length){e.preventDefault(),z(!1);return}if("Enter"===e.key){if(E>=0&&M[E]){e.preventDefault(),w(M[E].email),z(!1);return}B()}},placeholder:"아이디(이메일)로 초대…",autoComplete:"off",autoFocus:!0}),(0,n.jsxs)(ey,{value:y,"aria-label":"초대 권한",onChange:e=>j("viewer"===e.target.value?"viewer":"editor"),children:[(0,n.jsx)("option",{value:"editor",children:"편집"}),(0,n.jsx)("option",{value:"viewer",children:"열람"})]}),S?(0,n.jsxs)(eb,{type:"button",$primary:!0,$corner:!0,onClick:F,title:"일반 회원 인원을 다 썼습니다 — 제휴 신청하고 팀 전체 공유하기",children:["초대",(0,n.jsx)(es.OE,{})]}):(0,n.jsx)(eb,{type:"button",$primary:!0,onClick:B,disabled:f.isLoading,children:f.isLoading?"전송 중…":"초대"}),M.length>0&&(0,n.jsx)(eP,{children:M.map((e,t)=>(0,n.jsx)("li",{children:(0,n.jsxs)("button",{type:"button",className:t===E?"on":"",onMouseEnter:()=>P(t),onMouseDown:t=>{t.preventDefault(),w(e.email),z(!1)},children:[(0,n.jsx)(p.ZP,{name:e.name,seed:e.companyId,size:32}),(0,n.jsxs)("span",{className:"tx",children:[(0,n.jsx)("b",{children:e.name}),(0,n.jsx)("em",{children:e.email})]})]})},e.companyId))})]}),(0,n.jsx)(ev,{children:(null==h?void 0:h.seatsUnlimited)?(0,n.jsx)(n.Fragment,{children:"팀원을 초대해서 함께 프로젝트를 완성해 보세요. 초대받은 분은 링크에서 로그인(또는 간편 가입) 후 바로 참여할 수 있어요."}):(0,n.jsxs)(n.Fragment,{children:["팀원을 초대해서 함께 프로젝트를 완성해 보세요. 일반 회원은 2명까지 초대가 가능합니다."," ",(0,n.jsx)(eE,{type:"button",onClick:F,children:"제휴 신청하고 팀 전체 공유하기 ›"})]})}),(0,n.jsxs)("div",{style:{marginTop:14},children:[(null!==(t=null==h?void 0:h.members)&&void 0!==t?t:[]).map(e=>{var t;return(0,n.jsxs)(ew,{children:[(0,n.jsx)(p.ZP,{name:e.name,seed:e.companyId,size:32}),(0,n.jsxs)("div",{children:[(0,n.jsxs)(ek,{children:[e.name,e.isMe?" (나)":""]}),(0,n.jsx)(eD,{children:null!==(t=e.email)&&void 0!==t?t:""})]}),"owner"===e.role?(0,n.jsx)(eI,{$own:!0,children:"소유자"}):(null==h?void 0:h.isOwner)?(0,n.jsxs)(ej,{value:e.role,"aria-label":"".concat(e.name," 권한"),onChange:t=>x.mutate({companyId:e.companyId,role:"viewer"===t.target.value?"viewer":"editor"}),children:[(0,n.jsx)("option",{value:"editor",children:"편집 가능"}),(0,n.jsx)("option",{value:"viewer",children:"보기\xb7피드백"})]}):(0,n.jsx)(eI,{children:"viewer"===e.role?"보기\xb7피드백":"편집 가능"}),(null==h?void 0:h.isOwner)&&"owner"!==e.role&&(0,n.jsx)(eC,{type:"button",title:"내보내기",onClick:()=>g.mutate(e.companyId),children:"✕"})]},"m".concat(e.companyId))}),(null!==(o=null==h?void 0:h.pending)&&void 0!==o?o:[]).map(e=>(0,n.jsxs)(ew,{children:[(0,n.jsx)(p.ZP,{name:e.name,seed:e.email,size:32,pending:!0}),(0,n.jsxs)("div",{children:[(0,n.jsx)(ek,{children:e.name}),(0,n.jsx)(eD,{children:e.email})]}),(0,n.jsx)(eI,{$pending:!0,children:"승인 대기"}),(0,n.jsx)(eC,{type:"button",title:"초대 링크 복사",onClick:async()=>{let t=await b(e.inviteId);t&&await eA(t)?ea.Am.success("초대 링크를 복사했습니다 (7일 후 만료)"):ea.Am.error("링크를 가져오지 못했습니다.")},children:"\uD83D\uDD17"}),(null==h?void 0:h.isOwner)&&(0,n.jsx)(eC,{type:"button",title:"초대 취소",onClick:()=>m.mutate(e.inviteId),children:"✕"})]},"p".concat(e.inviteId)))]})]})]})}),document.body)}let eM='[data-guide="share"]';function eZ(){let[e,t]=(0,a.FV)(u),o=(0,a.sJ)(c.WL),[r,d]=(0,i.useState)(null),[s,p]=(0,i.useState)(!1);(0,i.useEffect)(()=>p(!0),[]),(0,i.useEffect)(()=>{if(1===e&&null!=o)t(2);else if(2===e&&null==o){t(0);try{localStorage.setItem("mcd_collab_guide_done","1")}catch(e){}}},[o,e,t]);let h=(0,i.useCallback)(()=>{let e=document.querySelector(eM);d(e?e.getBoundingClientRect():null)},[]);(0,i.useEffect)(()=>{if(1!==e)return;h();let o=window.setInterval(h,250);window.addEventListener("scroll",h,!0),window.addEventListener("resize",h);let n=window.setTimeout(()=>{document.querySelector(eM)||t(0)},5e3);return()=>{window.clearInterval(o),window.clearTimeout(n),window.removeEventListener("scroll",h,!0),window.removeEventListener("resize",h)}},[e,h,t]);let x=(0,i.useCallback)(()=>t(0),[t]);return s&&1===e&&r?(0,l.createPortal)((0,n.jsxs)(eN,{children:[(0,n.jsx)(eL,{style:{left:r.left-8,top:r.top-8,width:r.width+16,height:r.height+16}}),(0,n.jsxs)(eB,{style:{left:Math.max(12,r.left-16),top:r.bottom+18},children:[(0,n.jsx)("span",{className:"step",children:"1 / 2 단계"}),(0,n.jsx)("b",{children:"여기 + 공유를 눌러보세요"}),(0,n.jsx)("p",{children:"이 내보드가 팀 프로젝트로 만들어지고, 팀원을 초대하는 창이 바로 열려요. 초대한 팀원과 파일 위에서 서로 피드백을 주고받을 수 있어요."}),(0,n.jsx)(eT,{type:"button",onClick:x,children:"다음에 할게요"})]})]}),document.body):null}let eN=s.ZP.div.withConfig({componentId:"sc-a8f9d8e6-0"})(["position:fixed;inset:0;z-index:",";pointer-events:none;"],2147483e3),eS=(0,s.F4)(["0%{box-shadow:0 0 0 0 rgba(65,61,125,0.55);}70%{box-shadow:0 0 0 10px rgba(65,61,125,0);}100%{box-shadow:0 0 0 0 rgba(65,61,125,0);}"]),eL=s.ZP.div.withConfig({componentId:"sc-a8f9d8e6-1"})(["position:fixed;border-radius:10px;box-shadow:0 0 0 9999px rgba(15,16,24,0.58),0 0 0 2px #413d7d inset;animation:"," 1.6s ease-in-out infinite;pointer-events:none;"],eS),eF=(0,s.F4)(["from{opacity:0;transform:translateY(6px);}to{opacity:1;transform:translateY(0);}"]),eB=s.ZP.div.withConfig({componentId:"sc-a8f9d8e6-2"})(["position:fixed;width:288px;max-width:calc(100vw - 24px);background:#fff;border-radius:14px;padding:14px 16px 12px;box-shadow:0 16px 40px rgba(18,19,26,0.28);pointer-events:auto;animation:"," 0.18s ease;.step{display:inline-block;margin-bottom:6px;padding:2px 8px;border-radius:999px;background:#efedfa;color:#413d7d;font-size:11px;font-weight:800;}b{display:block;font-size:15px;font-weight:700;color:#1a1b21;}p{margin:6px 0 10px;font-size:12.5px;line-height:1.55;color:#5b6b73;}&::before{content:'';position:absolute;top:-7px;left:26px;width:14px;height:14px;background:#fff;transform:rotate(45deg);box-shadow:-3px -3px 8px rgba(18,19,26,0.06);}"],eF),eT=s.ZP.button.withConfig({componentId:"sc-a8f9d8e6-3"})(["border:0;background:none;padding:4px 2px;color:#8b9098;font-family:inherit;font-size:12.5px;font-weight:600;cursor:pointer;&:hover{color:#5b6b73;text-decoration:underline;}"]);var eW=o(35775);function e$(e){var t;let{board:o,isPoint:l}=e;(0,i.useEffect)(()=>{let e=document.documentElement,t=()=>{let t=document.querySelector("[data-product-card],[data-board-card],[data-overview-card]");if(!t)return!1;let o=t.getBoundingClientRect().top;return o>=120&&e.style.setProperty(Y.YW,"".concat(Math.round(o),"px")),!0},o=0,n=0;t()||(n=window.setInterval(()=>{(t()||++o>25)&&window.clearInterval(n)},150));let i=0,r=()=>{i||(i=requestAnimationFrame(()=>{i=0,t()}))};return window.addEventListener("resize",r),()=>{window.clearInterval(n),window.removeEventListener("resize",r),i&&cancelAnimationFrame(i),e.style.removeProperty(Y.YW)}},[]);let a=(0,eW.Z)(),s=!!(null==a?void 0:a.id),{data:c}=(0,x.pg)({enabled:s&&!o}),u=(0,r.useRouter)(),p=(0,i.useMemo)(()=>{var e,t;if(o)return[];let n=new Set,i=e=>{let t=Number(null==e?void 0:e.id);Number.isInteger(t)&&t>0&&n.add(t)};return(null!==(e=null==c?void 0:c.projects)&&void 0!==e?e:[]).forEach(e=>{var t;return(null!==(t=null==e?void 0:e.boards)&&void 0!==t?t:[]).forEach(i)}),(null!==(t=null==c?void 0:c.rootBoards)&&void 0!==t?t:[]).forEach(i),Array.from(n)},[c,o]),h=(0,i.useMemo)(()=>{var e;return o?[]:(null!==(e=null==c?void 0:c.projects)&&void 0!==e?e:[]).map(e=>Number(null==e?void 0:e.id)).filter(e=>Number.isInteger(e)&&e>0)},[c,o]),f=(0,i.useCallback)((e,t,o,n,i,r)=>{var d;let l=null!==(d=null==c?void 0:c.projects)&&void 0!==d?d:[],a=e=>{let t=null,o=n=>{for(let r of n){var i;if((null!==(i=r.boards)&&void 0!==i?i:[]).some(t=>Number(t.id)===e))return t=Number(r.id),!0;if(r.children&&o(r.children))return!0}return!1};return o(l),t},s=new URLSearchParams;if(0===e){let e=(e=>{let t=null,o=(n,i)=>{for(let r of n){if(Number(r.id)===e)return t=i,!0;if(r.children&&o(r.children,Number(r.id)))return!0}return!1};return o(l,null),t})(Number(n));null!=e&&s.set("project",String(e))}else if(null==t&&null==i&&null==r){let t=a(e);null!=t&&s.set("project",String(t))}else{let t=a(e);null!=t&&s.set("project",String(t)),s.set("board",String(e)),null!=r?(s.set("view","scene"),s.set("scene",String(r))):null!=i&&s.set("view","table")}s.set("comment",String(o)),u.push("/board?".concat(s.toString()))},[c,u]),m=(0,i.useCallback)(()=>null,[]),g=o?o.boardIds:p,b=o?o.projectIds:h,v=!o||null===(t=o.active)||void 0===t||t,w=o?o.resolveProduct:m,k=o?o.onGoTarget:f;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(d.Z,{alignTop:!0,paired:g.length>0||v,isPoint:l}),(0,n.jsx)(el,{boardIds:g,projectIds:b,active:v,persistHandle:0===g.length&&v,resolveProduct:w,onGoTarget:k}),(0,n.jsx)(ez,{}),(0,n.jsx)(eZ,{})]})}},51256:function(e,t,o){function n(e){let t=new Date(e).getTime();if(Number.isNaN(t))return"";let o=Date.now()-t;if(o<0)return"방금";let n=Math.floor(o/1e3);if(n<60)return"방금";let i=Math.floor(n/60);if(i<60)return"".concat(i,"분 전");let r=Math.floor(i/60);if(r<24)return"".concat(r,"시간 전");let d=Math.floor(r/24);if(1===d)return"어제";if(d<7)return"".concat(d,"일 전");let l=Math.floor(d/7);if(l<5)return"".concat(l,"주 전");let a=Math.floor(d/30);return a<12?"".concat(a,"개월 전"):"".concat(Math.floor(d/365),"년 전")}function i(e){let t=new Date(e);if(Number.isNaN(t.getTime()))return"";let o=e=>String(e).padStart(2,"0");return"".concat(t.getFullYear(),".").concat(o(t.getMonth()+1),".").concat(o(t.getDate())," ").concat(o(t.getHours()),":").concat(o(t.getMinutes()))}o.d(t,{G:function(){return n},w:function(){return i}})},78242:function(e,t,o){let n=(0,o(43618).cn)({key:"isEntireItemLoadingAtom",default:!1});t.Z=n},74338:function(e,t,o){o.d(t,{Z:function(){return n}});function n(e,t){if(!t)return!1;let o=e;try{o=new URL(e).pathname}catch(t){o=e}let n=e=>("/"!==e&&e.endsWith("/")?e.slice(0,-1):e)||"/",i=n(o),r=n(t);return"/"===i?"/"===r:r===i||r.startsWith(i+"/")}},8927:function(e,t,o){o.d(t,{db:function(){return i},ik:function(){return d},nZ:function(){return r}});var n=o(29918);let i=async e=>{try{var t;let o=localStorage.getItem("TOKEN");if(!o)return e;let i=await n.et.post("/user/oauth/handoff",{},{headers:{Authorization:"Bearer ".concat(o)}}),r=null==i?void 0:null===(t=i.data)||void 0===t?void 0:t.id;if(!r)return e;let d=new URL(e,window.location.origin);return d.searchParams.set("handoff",String(r)),d.toString()}catch(t){return e}},r=e=>{let t=window;if(t.sketchup||"undefined"!=typeof document&&document.documentElement.classList.contains("su-plugin"))try{var o;if("function"==typeof(null===(o=t.sketchup)||void 0===o?void 0:o.openExternal)){t.sketchup.openExternal(e);return}if("function"==typeof t.__mcdOpenExternal){t.__mcdOpenExternal(e);return}}catch(e){}try{window.open(e,"_blank","noopener,noreferrer,width=1100,height=720,menubar=no,toolbar=no")}catch(e){}},d=async()=>{let e="";try{e=new URLSearchParams(window.location.search).get("handoff")||""}catch(e){return!1}if(!e)return!1;let t=/^[A-Za-z0-9_-]{8,64}$/.test(e);try{let e=new URL(window.location.href);e.searchParams.delete("handoff"),window.history.replaceState(null,"",e.toString())}catch(e){}if(!t)return!1;try{if(localStorage.getItem("TOKEN"))return!1}catch(e){}try{var o;let t=await n.et.get("/user/oauth/handoff/".concat(e)),i=null==t?void 0:null===(o=t.data)||void 0===o?void 0:o.token;if(!i)return!1;return localStorage.setItem("TOKEN",i),n.et.defaults.headers.common.Authorization="Bearer ".concat(i),!0}catch(e){return!1}}}}]);