1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[14602,63821],{127:(e,t,i)=>{i.d(t,{A:()=>a});let a=(0,i(78340).A)("target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]])},484:(e,t,i)=>{i.d(t,{A:()=>a});let a=(0,i(78340).A)("list-checks",[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]])},1933:(e,t,i)=>{i.d(t,{jH:()=>s});var a=i(12115);i(95155);var l=a.createContext(void 0);function s(e){let t=a.useContext(l);return e||t||"ltr"}},18349:(e,t,i)=>{i.d(t,{T:()=>s});var a=i(95155);i(12115);var l=i(40980);function s({className:e,...t}){return(0,a.jsx)("textarea",{"data-slot":"textarea",className:(0,l.cn)("border-input placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),...t})}},18837:(e,t,i)=>{i.d(t,{A:()=>a});let a=(0,i(78340).A)("table-2",[["path",{d:"M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18",key:"gugj83"}]])},35942:(e,t,i)=>{i.d(t,{F:()=>r});var a=i(95155);i(12115);var l=i(89349),s=i(40980);function r({className:e,children:t,...i}){return(0,a.jsxs)(l.Root,{"data-slot":"scroll-area",className:(0,s.cn)("relative",e),...i,children:[(0,a.jsx)(l.Viewport,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:t}),(0,a.jsx)(n,{}),(0,a.jsx)(l.Corner,{})]})}function n({className:e,orientation:t="vertical",...i}){return(0,a.jsx)(l.ScrollAreaScrollbar,{"data-slot":"scroll-area-scrollbar",orientation:t,className:(0,s.cn)("flex touch-none p-px transition-colors select-none","vertical"===t&&"h-full w-2.5 border-l border-l-transparent","horizontal"===t&&"h-2.5 flex-col border-t border-t-transparent",e),...i,children:(0,a.jsx)(l.ScrollAreaThumb,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}},49374:(e,t,i)=>{i.d(t,{Nv:()=>l,O4:()=>a,XL:()=>n,Yy:()=>r,eA:()=>s});let a=[".png",".jpg",".jpeg",".webp"],l=[".pdf",".docx",".txt",".md",".hwp",".hwpx",...a],s=l.join(","),r="PDF, DOCX, HWP, HWPX, TXT, MD, ì´ë¯¸ì§",n=e=>{let t=e.toLowerCase();return l.some(e=>t.endsWith(e))}},56558:(e,t,i)=>{i.d(t,{A:()=>a});let a=(0,i(78340).A)("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]])},63821:(e,t,i)=>{i.r(t),i.d(t,{captureInfographicAsPng:()=>s,copyInfographicAsPng:()=>n,downloadInfographicAsPng:()=>r});var a=i(91992),l=i(6253);async function s(e){let t=(await i.e(69691).then(i.bind(i,55678))).default,l=document.createElement("div");l.style.cssText="position:fixed;top:0;left:0;width:640px;z-index:-9999;opacity:0;pointer-events:none;background:#ffffff;",l.innerHTML=a.default.sanitize(e,{ADD_TAGS:["img"],ADD_ATTR:["style","data-field-type","data-infographic-type","data-infographic-config","src"]}),document.body.appendChild(l),await new Promise(e=>setTimeout(e,120));try{let e=l.firstElementChild;return(await t(e,{scale:2,useCORS:!0,logging:!1,backgroundColor:"#ffffff"})).toDataURL("image/png")}finally{document.body.removeChild(l)}}async function r(e,t){let i=await s(e);(0,l.P)(i,t)}async function n(e){let t=await s(e),i=await fetch(t),a=await i.blob();await navigator.clipboard.write([new ClipboardItem({"image/png":a})])}},66088:(e,t,i)=>{i.d(t,{A:()=>a});let a=(0,i(78340).A)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]])},77074:(e,t,i)=>{i.r(t),i.d(t,{AIChatSidebar:()=>eo});var a=i(95155),l=i(37206),s=i(12115),r=i(33210),n=i(56558),o=i(127),d=i(6296),c=i(48368),u=i(53961),m=i(66088),p=i(89123),h=i(14780),g=i(18837),f=i(484),b=i(94514),x=i(67635),y=i(34220),v=i(6962),w=i(56204),j=i(89239),k=i(18349),N=i(35942),$=i(70872),I=i(80642),_=i(82293),C=i(28713),A=i(92506),S=i(97444),D=i(13159),M=i(30926),q=i(94719),P=i(34193);let T=[/^budget/i,/^schedule/i,/기ê°$/,/ì¼ì /,/ê¸ì¡$/,/ë¹ì©$/,/ìì°/,/^retry-.*count/,/ì§ì.*ë¶ì¼/,/ë¶ì¼.*í/,/í´ë¹ì¬ë¶/],O=e=>T.some(t=>t.test(e)),K=e=>e.replace(/<[^>]*>/g,"").replace(/\s+/g," ").trim();async function L(e,t,i,a,l,s,r,n,o){let d,c,u,m=e.map(e=>e.fieldHint).filter(e=>!!e);if(m.length>0){let e=new Set(m);for(let t of m){let i=t.split("-")[0],a=`${i}-content`;l.includes(a)&&e.add(a)}d=l.filter(t=>e.has(t)),c=s.filter(t=>e.has(t.fieldId)),u=Object.fromEntries(Object.entries(r).filter(([t])=>e.has(t))),0===d.length&&(d=l,c=s,u=r)}else d=l,c=s,u=r;let p=function(e,t,i,a){let l="functional"===t?3e3:1500,s="functional"===t?2:3,r=new Set(e.map(e=>e.fieldHint).filter(e=>!!e)),n=e.map((e,i)=>{let a="enhancement"===t&&"functional"===e.subtype,l=a?"[â¡ ë¨ì ìì ]":"functional"===t?"":"[⨠ë´ì© ë³´ê°]",s=`${i+1}. ${l?l+" ":""}${e.issue}`;return e.fieldHint&&(s+=` 2 â ëì íë: ${e.fieldHint}`),e.snippet&&(s+=` 3 â ì문ìì ì°¾ì í ì¤í¸: "${e.snippet}"`),a&&(s+=` 4 â ï¸ ì´ ì´ìë ë¨ì ìì ì ëë¤: í´ë¹ í ì¤í¸ë¥¼ ìì /êµì ë§ íì¸ì. ì ë´ì© ì¶ê°ë íì´ì°ê¸° ê¸ì§.`),s}),o=i.filter(e=>e.strengths&&e.strengths.length>0).map(e=>`### ${e.sectionName} 5${e.strengths?.map(e=>`- ${e}`).join("\n")||""}`).join("\n\n"),d="",c="";if(r.size>0){let i=Object.entries(a).filter(([e])=>r.has(e)),n=i.filter(([e])=>!e.endsWith("-content"));n.length>0&&(d=n.map(([t,i])=>{let l=i&&i.trim().length>0?i.trim():"(íì¬ ë¹ì´ìì)",s=e.find(e=>e.fieldHint===t),r=s?.snippet?` 6 ì문 ì¤ëí«: "${s.snippet}"`:"",n=t.split("-"),o="";if(n.length>=3){let e=n.slice(0,-1).join("-"),i=Object.entries(a).filter(([i,a])=>i!==t&&i.startsWith(e)&&!i.endsWith("-content")&&a&&a.trim().length>0).slice(0,5);i.length>0&&(o="\n \uD83D\uDCCE ê°ì íì 참조 ë°ì´í°:\n"+i.map(([e,t])=>` - ${e}: "${t.trim()}"`).join("\n"))}return`- **${t}**: "${l}"${r}${o}`}).join("\n")),c="functional"===t?i.filter(([e,t])=>e.endsWith("-content")&&t&&t.trim().length>0).slice(0,s).map(([t,i])=>{let a=e.filter(e=>e.fieldHint===t&&e.snippet).map(e=>e.snippet);if(a.length>0){let e=a.map(e=>{let t=i.indexOf(e);if(-1===t)return`(ì¤ëí« ìì¹ ë¶ëª ) 7ì ì²´ ì문 (ì²ì 2000ì): 8${i.slice(0,2e3)}`;let a=Math.max(0,t-150),l=Math.min(i.length,t+e.length+150);return`...${i.slice(a,l)}...`});return`### ${t} 9ì문 ì¤ëí« ì£¼ë³ ì»¨í ì¤í¸: 10${e.join("\n---\n")}`}return`### ${t} 11${i.slice(0,2e3)}${i.length>2e3?"\n...(ì´í ìëµ)":""}`}).join("\n\n"):i.filter(([e,t])=>e.endsWith("-content")&&t&&t.trim().length>0).slice(0,s).map(([e,t])=>`### ${e} 12${t.slice(0,l)}${t.length>l?"\n...(ì´í ìëµ)":""}`).join("\n\n")}else c=Object.entries(a).filter(([e,t])=>t&&t.trim().length>0&&e.endsWith("-content")).slice(0,2).map(([e,t])=>`### ${e} 13${t.slice(0,l)}${t.length>l?"\n...(ì´í ìëµ)":""}`).join("\n\n");return[`## â ìì 모ë: ${"functional"===t?"기ë¥ì ìì (ë¨ì ìì /êµì ë§)":"ë´ì© ë³´ê° (í ì¤í¸ íì§ í¥ì)"}`,"",...o?[`## â íì¬ ë¬¸ìì ê°ì (ì ë ìì /ì½í ê¸ì§!)`,`ìëë íì¬ ë¬¸ììì **ì ìì ê¸ì ì ì¼ë¡ 기ì¬í 구체ì ìì**ì ëë¤.`,`â **ê°ì ê³¼ì ìì ì´ ê°ì ë¤ì ì ë ìììí¤ì§ ë§ì¸ì.**`,`â ê°ì ì ëª ìë ìì(구체ì ìì¹, ì¶ì², 근거 ë±)를 ìì íê±°ë ì½íìí¤ë©´ ì ë©ëë¤.`,"",o,""]:[],...n.length>0?[`## â ì´ë²ì ìì í´ì¼ í ì§ì ì¬í (ì´ê²ë§ ìì íì¸ì!)`,...o?[`ì ê°ì ì ì ì§íë©´ì, ìë ì§ì ì¬íë§ ìì íì¸ì.`]:[`ìë ëì´ë ì§ì ì¬íë§ ìì íì¸ì. ì´ ëª©ë¡ì ìë 문ì ë ì ë ìì íì§ ë§ì¸ì.`],...r.size>0?[`ê° ì§ì ì¬íì "ëì íë"ì "ì문ìì ì°¾ì í ì¤í¸"ê° ëª ìëì´ ìì¼ë í´ë¹ ìì¹ë§ ì íí ìì íì¸ì.`]:[],n.join("\n"),""]:[],...d?[`## â í(table) íë ìì ëì (ê°ë³ ì ê°)`,`ìëë í(table) ìì ê°ë³ ì ê°ì ëë¤. ê° íë IDì íì¬ ê°ì´ íìëì´ ììµëë¤.`,..."functional"===t?[`â ï¸ ì§ì ì¬íì í´ë¹íë ê°ë§ ìì íì¸ì. ì못ë ê°ì ì¬ë°ë¥¸ ê°
13ì¼ë¡ êµì²´íê±°ë ë¶ì ì í ê°ì ìì íì¸ì.`,`â ì§ì ì¬íê³¼ 무ê´í ì
ì ì ë ë³ê²½íì§ ë§ì¸ì.`,`â 기존 ê°ì íì´ì°ê±°ë ì¤ëª
ì ì¶ê°íê±°ë íì¥íë©´ ì ë©ëë¤. êµì²´/ìì ë§ íì©ë©ëë¤.`]:[`â ï¸ ì§ì ì¬íì í´ë¹íë ê°ë§ ë³´ê°íì¸ì. 기존 ë´ì©ì ìµëí ì ì§í©ëë¤.`],d,""]:[],...c?[`## â
본문(richtext) íë ìì ëì`,..."functional"===t?[`ìëë ìì ëì 본문 íëì **ì¤ëí« ì£¼ë³ ì»¨í
ì¤í¸**ì
ëë¤.`,`â ï¸ richtext íëë "_functional_ops"ë¡ find/replace ì§ì를 ì¶ë ¥íì¸ì. ì ì²´ í
ì¤í¸ë¥¼ ë³µì¬íì§ ë§ì¸ì.`,`â ï¸ "find"ìë ìë ì문ìì ì íí ì¼ì¹íë í
ì¤í¸ë¥¼ ì¬ì©íì¸ì.`]:[`ìëë ìì í´ì¼ í 본문 íëì **íì¬ ì문**ì
ëë¤.`,`â ï¸ ê° ì§ì ì¬íì´ 'ì¶ê°/ë³´ì¶©(A)', 'ì¬ìì±(B)', 'ë¶ë¶ ìì (C)' ì¤ ì´ë ì íì¸ì§ 먼ì íë¨íì¸ì.`,`ð ì¶ê°/ë³´ì¶©(A): 기존 ì문 ì ì²´ ì ì§ + ê´ë ¨ ìì¹ì ì ë´ì© ì½ì
. 기존 ëê³ì¸µ(â¡) ìì ê¸ì§.`,`ð ì¬ìì±(B): í´ë¹ ëê³ì¸µ(â¡)/ì¤ê³ì¸µ(ã
) ë²ìë§ ì¬ìì±. ë¤ë¥¸ ëê³ì¸µì ì문 ì ì§.`,`ð ë¶ë¶ ìì (C): í´ë¹ 문ì¥/문ë¨ë§ ìì . ëë¨¸ì§ ì문 ì ì§.`],c,""]:[]].join("\n")}(e,t,i,a),h=await o.buildAuthHeaders(),g=await fetch("/api/quick-fill",{method:"POST",headers:h,body:JSON.stringify({programId:o.programId,programName:o.programName,sectionKey:n.join("+"),sectionLabel:"functional"===t?"기ë¥ì ìì ":"ë´ì© ë³´ê°",variants:["A"],fieldIds:d,fieldDefs:c,checkboxOptionsByFieldId:u,existingContent:"",selectedPreview:"",improvementContext:p,improvementMode:t})}),f=await g.json().catch(()=>({}));if(!g.ok)return 401===g.status?{ok:!1,fieldMap:{},changeReasons:{},error:{type:"auth_error"}}:429===g.status?{ok:!1,fieldMap:{},changeReasons:{},error:{type:"quota_error",data:{day:f.day??null,generationLimitPerDay:Number(f.generationLimitPerDay||1),chatLimitPerDay:Number(f.chatLimitPerDay||3),interviewCount:Number(f.interviewCount||0),quickCount:Number(f.quickCount||0),chatCount:Number(f.chatCount||0),exceeded:"generation"===f.exceeded?"generation":"chat",canRedeemFeedback:!!f.canRedeemFeedback}}}:{ok:!1,fieldMap:{},changeReasons:{},error:{type:"error",message:"string"==typeof f?.error?f.error:"ì¤ë¥ê° ë°ìíìµëë¤."}};let b=f?.fieldMapByVariant?.A||f?.fieldMap||{},x=f?.functionalOps&&"object"==typeof f.functionalOps?f.functionalOps:{};if("functional"===t&&Object.keys(x).length>0)for(let[e,t]of Object.entries(x)){if(!Array.isArray(t)||0===t.length)continue;let i=a[e];if(!i||0===i.trim().length)continue;let l=i;for(let e of t)if("string"==typeof e.find&&"string"==typeof e.replace&&0!==e.find.length)if(l.includes(e.find))l=l.replace(e.find,e.replace);else{let t=e.find.replace(/\s+/g,"\\s+");try{let i=RegExp(t,"g");l=l.replace(i,e.replace)}catch{}}K(l=l.replace(/\n{3,}/g,"\n\n").replace(/ {2,}/g," ").trim())!==K(i)&&(b[e]=l)}let y=Object.keys(b).filter(e=>d.includes(e)&&"string"==typeof b[e]),v=f?.changeReasons&&"object"==typeof f.changeReasons?f.changeReasons:{},w=Object.keys(v).length>0,j=new Set(e.map(e=>e.fieldHint).filter(e=>!!e)),k=new Set(Object.keys(x)),N={},$={};for(let t of y){if(O(t)&&!j.has(t))continue;let i=K(a[t]||""),l=K(b[t]||"");if((0!==i.length||!(l.length>0)||j.has(t))&&i!==l&&0!==l.length&&(!w||v[t]||k.has(t))&&(N[t]=b[t],v[t]&&($[t]=v[t]),!v[t]&&k.has(t))){let i=e.filter(e=>e.fieldHint===t).map(e=>e.issue).join("; ");$[t]=`[ì íA] 기ë¥ì ìì : ${i.slice(0,100)}`}}return{ok:!0,fieldMap:N,changeReasons:$}}async function z(e,t){let i,a=e.issues.filter(e=>"improve"===e.type),l=new Set(a.filter(e=>"functional"!==e.subtype).map(e=>e.fieldHint).filter(e=>!!e)),s=[],r=[];for(let e of a.filter(e=>"functional"===e.subtype))e.fieldHint&&l.has(e.fieldHint)?r.push(e):s.push(e);let n=[...a.filter(e=>"functional"!==e.subtype),...r],o=function(e,t,i){let a=new Set(e.map(e=>e.sectionId).filter(e=>!!e));for(let t of e)if(t.fieldHint){let e=t.fieldHint.split("-")[0];e&&a.add(e)}let l=a.size>0?t.filter(e=>a.has(e.sectionId)):t.filter(e=>e.score/e.maxScore<.8),s=i.quickActions.length>0?i.quickActions:[],r=new Set(l.map(e=>e.sectionId)),n=s.filter(e=>e.sectionKeys.some(e=>r.has(e))),o=n.length>0?n:s,d=Array.from(new Set(o.flatMap(e=>e.sectionKeys))),c=Array.from(new Set(o.flatMap(e=>
13e.fieldIds||[]))),u={id:"improvement_merged",label:"í©ê²© ê°ë¥ì± ê°ì ",prompt:o.map(e=>e.prompt).join(" "),sectionKeys:d,fieldIds:c},{fieldIds:m,fieldDefs:p,labelMap:h,checkboxOptionsByFieldId:g}=i.collectFieldsForAction(u),f=i.extractBeforeMap(m,p);return{sectionsToImprove:l,mergedSectionKeys:d,baseFieldIds:m,fieldDefs:p,labelMap:h,checkboxOptionsByFieldId:g,beforeMap:f}}(a,e.allSections,t);if(!o.baseFieldIds||0===o.baseFieldIds.length)return{type:"no_fields"};let d={},c={},u={};if(s.length>0){let e=await L(s,"functional",o.sectionsToImprove,o.beforeMap,o.baseFieldIds,o.fieldDefs,o.checkboxOptionsByFieldId,o.mergedSectionKeys,t);if(!e.ok&&e.error)return e.error;for(let t of(Object.assign(d,e.fieldMap),Object.assign(c,e.changeReasons),Object.keys(e.fieldMap)))u[t]="functional"}if(n.length>0){let e=await L(n,"enhancement",o.sectionsToImprove,o.beforeMap,o.baseFieldIds,o.fieldDefs,o.checkboxOptionsByFieldId,o.mergedSectionKeys,t);if(!e.ok&&e.error)return e.error;for(let t of(Object.assign(d,e.fieldMap),Object.assign(c,e.changeReasons),Object.keys(e.fieldMap)))u[t]="enhancement"}let m=Object.keys(d),p=Math.max(5*a.length,10);if(m.length>p)return{type:"success",fieldMap:{},beforeMap:{},labelMap:{},changeReasons:{},fieldDefs:[],sections:o.sectionsToImprove.map(e=>({sectionId:e.sectionId,sectionName:e.sectionName,score:e.score,maxScore:e.maxScore,isImproveTarget:!0})),summary:`ì§ì ì¬í(${a.length}ê°) ëë¹ ë³ê²½ ë²ìê° ë무 ëì´(${m.length}ê°) ìë ì ì©íì§ ìììµëë¤.`};let h={},g={};for(let e of m)h[e]=o.beforeMap[e]||"",g[e]=o.labelMap[e]||t.deriveLabelFromFieldId(e);let f=m.slice(0,10).map(e=>{let t=c[e];return t?`- ${g[e]}: ${t}`:`- ${g[e]}: ${(d[e]||"").slice(0,80)}`}).join("\n");if(m.length>0){let e=a.filter(e=>"functional"===e.subtype).length,t=a.filter(e=>"functional"!==e.subtype).length,l=e>0&&t>0?` (ë¨ì ìì ${e}ê±´ + ë´ì© ë³´ê° ${t}ê±´)`:e>0?` (ë¨ì ìì ${e}ê±´)`:` (ë´ì© ë³´ê° ${t}ê±´)`;i=`${m.length}ê° íëê° ê°ì ëììµëë¤.${l} 14${f}`}else i="ê°ì í ì ìë íëª©ì´ ììµëë¤. 문ì ë´ì©ì íì¸í í ë¤ì ìëí´ì£¼ì¸ì.";return{type:"success",fieldMap:d,beforeMap:h,labelMap:g,changeReasons:c,fieldModes:u,fieldDefs:o.fieldDefs.filter(e=>m.includes(e.fieldId)),sections:o.sectionsToImprove.map(e=>({sectionId:e.sectionId,sectionName:e.sectionName,score:e.score,maxScore:e.maxScore,isImproveTarget:!0})),summary:i}}async function E(e,t){let i=t.quickActions.length>0?t.quickActions:[],a=Array.from(new Set(i.flatMap(e=>e.sectionKeys))),l=Array.from(new Set(i.flatMap(e=>e.fieldIds||[]))),s={id:"data_supplement",label:"ì¶ê° ì ë³´ ë°ì",prompt:i.map(e=>e.prompt).join(" "),sectionKeys:a,fieldIds:l},{fieldIds:r,fieldDefs:n,labelMap:o,checkboxOptionsByFieldId:d}=t.collectFieldsForAction(s),c=t.extractBeforeMap(r,n);if(!r||0===r.length)return{type:"no_fields"};let u=Object.entries(c).filter(([,e])=>e&&e.trim().length>0).slice(0,40).map(([e,t])=>`- ${e}: ${t.slice(0,300)}`).join("\n"),m=[`## ì¬ì©ì ëµë³`,e.userAnswersText,"",...u?[`## íì¬ íë ê° (ë³ê²½íì§ ë§ì¸ì â ëµë³ ê´ë ¨ íëë§ ìì )`,u]:[]].join("\n"),p=await t.buildAuthHeaders(),h=await fetch("/api/quick-fill",{method:"POST",headers:p,body:JSON.stringify({programId:t.programId,programName:t.programName,sectionKey:a.join("+"),sectionLabel:"ì¶ê° ì ë³´ ë°ì",variants:["A"],fieldIds:r,fieldDefs:n,checkboxOptionsByFieldId:d,existingContent:t.buildMeaningfulContext([]),selectedPreview:"",dataSupplementContext:m})}),g=await h.json().catch(()=>({}));if(!h.ok)return 401===h.status?{type:"auth_error"}:429===h.status?{type:"quota_error",data:{day:g.day??null,generationLimitPerDay:Number(g.generationLimitPerDay||1),chatLimitPerDay:Number(g.chatLimitPerDay||3),interviewCount:Number(g.interviewCount||0),quickCount:Number(g.quickCount||0),chatCount:Number(g.chatCount||0),exceeded:"generation"===g.exceeded?"generation":"chat",canRedeemFeedback:!!g.canRedeemFeedback}}:{type:"error",message:"string"==typeof g?.error?g.error:"ì¤ë¥ê° ë°ìíìµëë¤. ë¤ì ìëí´ì£¼ì¸ì."};let f=g?.fieldMapByVariant?.A||g?.fieldMap||{},b=Object.keys(f).filter(e=>r.includes(e)&&"string"==typeof f[e]),x=e=>e.replace(/<[^>]*>/g,"").replace(/\s+/g," ").trim(),y=b.filter(e=>{let t=x(c[e]||""),i=x(f[e]||"");return t!==i&&i.length>0}),v={},w={},j={};for(let e of y)v[e]=f[e],w[e]=c[e]||"",j[e]=o[e]||t.deriveLabelFromFieldId(e);let k=y.slice(0,10).map(e=>`- ${j[e]}: ${(f[e]||"").slice(0,80)}`).join("\n"),N=`${y.length}ê° íëê° ë³´ìëììµëë¤. 15${k||"(ë³ê²½ ìì)"}`;return{type:"success",fieldMap:v,beforeMap:w,labelMap:j,fieldDefs:n.filter(e=>y.includes(e.fieldId)),summary:N,changedCount:y.length,questions:e.questions}}var F=i(91992),B=i(66609),H=i(41242),R=i(59120),W=i(63821),V=i(63310),X=i(49374);let G=(0,l.default)(()=>Promise.all([i.e(64831),i.e(42695),i.e(88613),i.e(74133)]).then(i.bind(i,74133)).then(e=>
15e.BusinessAssetInsertPanel),{loadableGenerated:{webpack:()=>[74133]},ssr:!1}),U={"tam-sam-som":"ìì¥ ê·ëª¨","competitive-matrix":"ê²½ì í¬ì§ì ë",roadmap:"ì¤í ë¡ëë§µ","tech-architecture":"기ì 구ì±"},J={ADD_TAGS:["img"],ADD_ATTR:["alt","aria-label","class","data-field-type","data-infographic-caption","data-infographic-config","data-infographic-editable","data-infographic-type","role","src","style"]},Z={"tam-sam-som":{type:"tam-sam-som",version:1,layout:"horizontal",theme:"blue",tam:{label:"ì ì²´ ìì¥",value:"12ì¡°",description:"ì§ìíë ¤ë ì°ì ì ì ì²´ ìì"},sam:{label:"ì§ì ê°ë¥ ìì¥",value:"1.8ì¡°",description:"ì´ê¸° íê¹ ê³ ê°ê³¼ ì±ë 기ì¤"},som:{label:"첫 목í ìì¥",value:"120ìµ",description:"1ì°¨ ì¬ì í ê¸°ê° ë´ íë³´ 목í"}},"competitive-matrix":{type:"competitive-matrix",version:1,layout:"quadrant",theme:"blue",xAxis:{label:"ì¤í ê°ë¥ì±",lowLabel:"ë®ì",highLabel:"ëì"},yAxis:{label:"ì°¨ë³ì±",lowLabel:"ë®ì",highLabel:"ëì"},competitors:[{id:"legacy",name:"기존 ëì",x:62,y:48,isUs:!1},{id:"offline",name:"ì¤íë¼ì¸ ë°©ì",x:35,y:38,isUs:!1},{id:"us",name:"ì°ë¦¬ ìì´í ",x:78,y:76,isUs:!0}]},roadmap:{type:"roadmap",version:1,layout:"compact",theme:"blue",milestones:[{id:"mvp",period:"1ê°ì",title:"MVP ì 리",description:"íµì¬ 기ë¥ê³¼ ê³ ê° ê²ì¦ ë²ì를 íì ",status:"planned"},{id:"pilot",period:"2ê°ì",title:"íì¼ë¿ ê²ì¦",description:"ì´ê¸° ê³ ê° ë°ìê³¼ ì í ì§í ìì§",status:"planned"},{id:"scale",period:"3ê°ì",title:"ì¬ì í íì¥",description:"ì í´/ë§ì¼í ì±ëì íµí ë°ë³µ í매 구조 ê²ì¦",status:"planned"}]},"tech-architecture":{type:"tech-architecture",version:1,layout:"grid",theme:"blue",components:[{id:"user",componentType:"user",name:"ì¬ì©ì",description:"ê³ ê° ì ë ¥ê³¼ í¼ëë°±"},{id:"service",componentType:"service",name:"ìë¹ì¤",description:"íµì¬ ê¸°ë¥ ì ê³µ"},{id:"data",componentType:"data",name:"ë°ì´í°",description:"ì´ì ì§íì íìµ ë°ì´í°"}]}};function Q(e){if("welcome"===e.id)return null;let t="";switch(e.kind){case"text":t=e.content;break;case"blocks":t=[e.title,...e.blocks.map(e=>`${e.label}: ${e.content}`)].join("\n");break;case"quick_options":{let i=e.options.filter(t=>t.applied||t.id===e.appliedOptionId),a=Array.from(new Map((i.length>0?i:e.options).map(e=>[e.id,e])).values());t=[e.title,...a.map(e=>`${e.title}: ${e.content}`)].join("\n");break}case"data_questions":t=e.questions.map(e=>`${e.issue}: ${e.question}`).join("\n");break;case"cell_results":t=e.cells.map(e=>`í ${e.row+1}í ${e.col+1}ì´: ${e.content}`).join("\n");break;case"table_structure":t=e.rows.map(e=>e.map(e=>e.content).join(" | ")).join("\n");break;case"infographic":{let i=e.html.match(/data-infographic-type=["']([^"']+)["']/i)?.[1],a=i&&i in U?U[i]:"ì¬ì ìê°í",l=e.html.replace(/<(script|style|template|noscript)\b[^>]*>[\s\S]*?<\/\1\s*>/gi," ").replace(/<br\s*\/?>/gi,"\n").replace(/<\/p>|<\/div>|<\/li>|<\/tr>/gi,"\n").replace(/<[^>]+>/g," ").replace(/ | /gi," ").replace(/&|&/gi,"&").replace(/<|</gi,"<").replace(/>|>/gi,">").replace(/"|"/gi,'"').replace(/\r\n?/g,"\n").replace(/[ \t]+/g," ").replace(/\n{3,}/g,"\n\n").trim();t=l?`${a} 16${l}`:a}}let i=t.trim();return i?{role:e.role,content:i}:null}let Y=[{id:"pre_general",label:"ì¼ë°íí©",sectionKeys:["general-info"],fieldIds:["item-name","deliverables","occupation","company-name","team-1-position","team-1-role","team-1-capability","team-1-status","team-2-position","team-2-role","team-2-capability","team-2-status","team-3-position","team-3-role","team-3-capability","team-3-status"],prompt:"ìë¹ì°½ì í¨í¤ì§ 'ì¼ë°íí©'ì ì±ì주ì¸ì. ì°½ì ìì´í ëª /ì°ì¶ë¬¼/기ì (ìì )ëª /ì§ì /í 구ì±(ìí \xb7ìë\xb7구ì±ìí)ì ìì°ì¤ë½ê³ ì¤ëë ¥ ìê² ìì±í´ì£¼ì¸ì."},{id:"pre_overview",label:"ìì´í ê°ì(ìì½)",sectionKeys:["item-overview"],fieldIds:["item-title","item-category","item-description","overview-problem","overview-solution","overview-scaleup","overview-team"],prompt:"ìë¹ì°½ì í¨í¤ì§ 'ì°½ì ìì´í ê°ì(ìì½)'ì ìì±í´ì£¼ì¸ì. Problem/Solution/Scale-up/Teamì´ ìë¡ ë ¼ë¦¬ì ì¼ë¡ ì´ì´ì§ê² í´ì£¼ì¸ì."},{id:"pre_problem",label:"문ì ì¸ì(ì ë°)",sectionKeys:["problem"],prompt:"ìë¹ì°½ì í¨í¤ì§ '문ì ì¸ì(Problem)' ì¹ì ì ìì±í´ì£¼ì¸ì. ìì¥ íí©/문ì ì ê³¼ ì°½ì ìì´í íìì±ì 근거 ì¤ì¬ì¼ë¡ ì 리í´ì£¼ì¸ì."},{id:"pre_solution",label:"ì¤í ê°ë¥ì±(ì ë°)",sectionKeys:["solution"],fieldIds:["solution-content","schedule-1-task","schedule-1-period","schedule-1-detail","schedule-2-task","schedule-2-period","schedule-2-detail","schedule-3-task","schedule-3-period","schedule-3-detail","schedule-4-task","schedule-4-period","schedule-4-detail","budget1-row-1-item","budget1-row-1-basis","budget1-row-1-amount","budget1-row-2-item","budget1-row-2-basis","budget1-row-2-amount","budget1-row-3-item","budget1-row-3-basis","budget1-row-3-amount","budget1-row-4-item","budget1-row-4-basis","budget1-row-4-amount","budget1-total","budget2-row-1-item","budget2-row-1-basis","budget2-row-1-amount","budget2-row-2-item","budget2-row-2-basis","budget2-row-2-amount","budget2-row-3-item","budget2-row-3-basis","budget2-row-3-amount","budget2-row-4-item","budget2-row-4-basis","budget2-row-4-amount","budget2-total"],prompt:"ìë¹ì°½ì í¨í¤ì§ 'ì¤í ê°ë¥ì±(Solution)' ì¹ì ì ìì±í´ì£¼ì¸ì. ê°ë° ê³í/ì°¨ë³ì±/íì½ê¸°ê° ì¼ì /ì ë¶ì§ìê¸ ì§í 근거를 í¬í¨í´ì£¼ì¸ì."},{id:"pre_scaleup",label:"ì±ì¥ì ëµ(ì ë°)",sectionKeys:["scaleup"],fieldIds:["scaleup-content","schedule-full-1-task","schedule-full-1-period","schedule-full-1-detail","schedule-full-2-task","schedule-full-2-period","schedule-full-2-detail","schedule-full-3-task","schedule-full-3-period","schedule-full-3-detail","schedule-full-4-task","schedule-full-4-period","schedule-full-4-detail"],prompt:"ìë¹ì°½ì í¨í¤ì§ 'ì±ì¥ì ëµ(Scale-up)' ì¹ì ì ìì±í´ì£¼ì¸ì. ê²½ìì¬ ë¹êµ, GTM, ììµëª¨ë¸, ë¡ëë§µ(ì ì²´ ì¬ì ë¨ê³ ì¼ì í¬í¨), ìê¸íë³´ ì ëµì í íë¦ì¼ë¡ ìì±í´ì£¼ì¸ì."},{id:"pre_team",label:"í 구ì±(ì ë°)",sectionKeys:["team"],fieldIds:["team-content","team-full-1-position","team-full-1-role","team-full-1-capability","team-full-1-status","team-full-2-position","team-full-2-role","team-full-2-capability","team-full-2-status","team-full-3-position","team-full-3-role","team-full-3-capability","team-full-3-status","partner-1-name","partner-1-capability","partner-1-collaboration","partner-1-timing","partner-2-name","partner-2-capability","partner-2-collaboration","partner-2-timing","partner-3-name","partner-3-capability","partner-3-collaboration","partner-3-timing"],prompt:"ìë¹ì°½ì í¨í¤ì§ 'í 구ì±(Team)' ì¹ì ì ìì±í´ì£¼ì¸ì. ëí/íìì ìëì´ ë¦¬ì¤í¬ë¥¼ ì´ë»ê² ì¤ì´ëì§ ì¤ì¬ì¼ë¡ ìì±íê³ , í 구ì±(ì)ê³¼ íë ¥ê¸°ê´ íí©/íì ë°©ì íë í¨ê» ìì°ì¤ë½ê² ì±ì주ì¸ì."}],ee=[{id:"modoo_basic",label:"ìì´ëì´ëª ",sectionKeys:["basic"],fieldIds:["idea-name"],prompt:"모ëì ì°½ì ê¶ìë³ì¤ëì 'ìì´ëì´ëª 'ë§ ì 리í´ì£¼ì¸ì. ëíìëª /ëë¤ìì ìì±íì§ ë§ê³ , ìì´ëì´ëª ì ì§§ê³ ê¸°ìµí기 ì½ê² ì ìí´ì£¼ì¸ì."},{id:"modoo_problem",label:"문ì ì¸ì",sectionKeys:["problem"],fieldIds:["problem-content"],prompt:"모ëì ì°½ì ê¶ìë³ì¤ëì '문ì ì¸ì(Problem)' ì¹ì ì â 주ì¥í ìì 목과 근거 문ë¨ì¼ë¡ ìì±í´ì£¼ì¸ì. ê°ë° ë기, ê³ ê° ë¬¸ì , 기존 ëìì íê³, ìì´ëì´ì 목ì ê³¼ ì°¨ë³ì±ì ì°ê²°íê³ ê·¼ê±°ê° ìì¼ë©´ ë³´ê° íìë¡ íìí´ì£¼ì¸ì."},{id:"modoo_solution",label:"ì¤íê°ë¥ì±",sectionKeys:["solution"],fieldIds:["solution-content"],prompt:"모ëì ì°½ì ê¶ìë³ì¤ëì 'ì¤íê°ë¥ì±(Solution)' ì¹ì ì ìì±í´ì£¼ì¸ì. ì
16捛
ì°ì¶ë¬¼, ê°ë° ë°©ë², ì¤ë¹ ë¨ê³, ìì¥ë¶ì, ì¬ì
í ì ëµì 구체ì ì¼ë¡ ì 리íë 기존 ìì¥/ê²½ì ì¸í¬ê·¸ëí½ì ë³ê²½íì§ ë§ì¸ì."},{id:"modoo_scaleup",label:"ì±ì¥ì ëµ",sectionKeys:["scaleup"],fieldIds:["scaleup-content","capital-plan-content","budget-row-1-category","budget-row-1-item","budget-row-1-basis","budget-row-1-amount","budget-row-2-category","budget-row-2-item","budget-row-2-basis","budget-row-2-amount","budget-row-3-category","budget-row-3-item","budget-row-3-basis","budget-row-3-amount","budget-row-4-category","budget-row-4-item","budget-row-4-basis","budget-row-4-amount","budget-total"],prompt:"모ëì ì°½ì
ê¶ìë³ì¤ëì
'ì±ì¥ì ëµ(Scale-up)' ì¹ì
ì ìì±í´ì£¼ì¸ì. ì°½ì
ìê¸ ììì ì¡°ë¬ê³í, ì¬ì
ë¹ ì°ì¶ê·¼ê±°, 기í ì본 ì¡°ë¬ ê³íì ë§ì¼ì¤í¤ê³¼ ì°ê²°íë, ì¬ì©ì ê·¼ê±°ê° ìë ê¸ì¡ë§ ì¬ì©íê³ ë¶ì¡±í ë¨ê°\xb7ìëì ì
ë ¥ íìë¡ íìí´ì£¼ì¸ì."},{id:"modoo_team",label:"í",sectionKeys:["team"],fieldIds:["team-content","team-1-role","team-1-task","team-1-capability","team-1-status","team-2-role","team-2-task","team-2-capability","team-2-status","team-3-role","team-3-task","team-3-capability","team-3-status"],prompt:"모ëì ì°½ì
ê¶ìë³ì¤ëì
'í(Team)' ì¹ì
ì ìì±í´ì£¼ì¸ì. ëíìì íìì ìí , ë´ë¹ ì
무, ë³´ì ìë, êµ¬ì± ìí를 ê³¼ì¥ ìì´ êµ¬ì²´ì ì¼ë¡ íì ë§ê² ì 리í´ì£¼ì¸ì."}],et=[{id:"modoo_general_problem",label:"문ì ì¸ì",sectionKeys:["problem"],fieldIds:["problem-content"],prompt:"모ëì ì°½ì
ì¼ë°í¸ë '문ì ì¸ì(Problem)' ì¹ì
ì â 주ì¥í ìì 목과 근거 문ë¨ì¼ë¡ ìì±í´ì£¼ì¸ì. ìì´ëì´ì ê°ë° ë기, í´ê²°íë ¤ë ê³ ê° ë¬¸ì , 기존 ëìì íê³, 목í ìì¥ì íëì ë
¼ë¦¬ë¡ ì°ê²°íê³ íì¸ëì§ ìì ì¬ì¤ì´ë ì±ê³¼ë ë§ë¤ì§ ë§ì¸ì. 문ì¥ì ê°ì¡°ì(~í¨/~ì)ì´ ìëë¼ '~í©ëë¤/ì
ëë¤'ë¡ ëëë ìì°ì¤ë¬ì´ ìì ì²´ë¡ ìì±í´ì£¼ì¸ì."},{id:"modoo_general_solution",label:"ì¤íê°ë¥ì±",sectionKeys:["solution"],fieldIds:["solution-content"],prompt:"모ëì ì°½ì
ì¼ë°í¸ë 'ì¤íê°ë¥ì±(Solution)' ì¹ì
ì ìì±í´ì£¼ì¸ì. ìì´ëì´ì ê°ë° ë°©ì, íì¬ ì¤ë¹ ì ë, ê²ì¦ ê³í, ê²½ì ëìê³¼ì ì°¨ë³í ë°©ìì 구체ì ì¼ë¡ ì°ê²°íë 기존 ìì¥\xb7ë¡ëë§µ ì¸í¬ê·¸ëí½ì ë³ê²½íì§ ë§ì¸ì. 문ì¥ì ê°ì¡°ì(~í¨/~ì)ì´ ìëë¼ '~í©ëë¤/ì
ëë¤'ë¡ ëëë ìì°ì¤ë¬ì´ ìì ì²´ë¡ ìì±í´ì£¼ì¸ì."},{id:"modoo_general_scaleup",label:"ì±ì¥ì ëµ",sectionKeys:["scaleup"],fieldIds:["scaleup-content"],prompt:"모ëì ì°½ì
ì¼ë°í¸ë 'ì±ì¥ì ëµ(Scale-up)' ì¹ì
ì ìì±í´ì£¼ì¸ì. ì¬ì
í ê³í, ë¨ê³ë³ ì¶ì§ ì¼ì , ê³ ê° íë³´ì ììµ êµ¬ì¡°, ìê¸ ìì ë° ì¡°ë¬ ë°©í¥ì ì¤í ììì ê²ì¦ ì§í ì¤ì¬ì¼ë¡ ì 리íê³ ê·¼ê±° ìë ê¸ì¡\xb7ê³ì½\xb7매ì¶ì ë§ë¤ì§ ë§ì¸ì. 문ì¥ì ê°ì¡°ì(~í¨/~ì)ì´ ìëë¼ '~í©ëë¤/ì
ëë¤'ë¡ ëëë ìì°ì¤ë¬ì´ ìì ì²´ë¡ ìì±í´ì£¼ì¸ì."},{id:"modoo_general_development",label:"í¥í ë°ì ë°©ì",sectionKeys:["development"],fieldIds:["development-content"],prompt:"모ëì ì°½ì
ì¼ë°í¸ë 'í¥í ë°ì ë°©ì(Development)' ì¹ì
ì ìì±í´ì£¼ì¸ì. ë©í ë§ìì ì ê²í íµì¬ ê°ì¤, ë°ìí 주ì ê°ì ì , ë¨ê¸°\xb7ì¤ê¸° ê°ë° ë°©í¥ê³¼ ë¤ì ê²ì¦ ê³íì PSSD íë¦ì ë§ì¶° 구체ì ì¼ë¡ ì 리í´ì£¼ì¸ì. í êµ¬ì± ì¹ì
ì¼ë¡ ë°ê¾¸ì§ ë§ì¸ì. 문ì¥ì ê°ì¡°ì(~í¨/~ì)ì´ ìëë¼ '~í©ëë¤/ì
ëë¤'ë¡ ëëë ìì°ì¤ë¬ì´ ìì ì²´ë¡ ìì±í´ì£¼ì¸ì."}],ei=[{id:"in_general",label:"ì¼ë°íí©(기ì
ì ë³´)",sectionKeys:["general-info"],fieldIds:["company-name","establishment-date","business-type","ceo-type","business-registration-number","business-address","item-name","deliverables","team-1-position","team-1-role","team-1-capability","team-1-status","team-2-position","team-2-role","team-2-capability","team-2-status","team-3-position","team-3-role","team-3-capability","team-3-status","team-4-position","team-4-role","team-4-capability","team-4-status"],prompt:"ì´ê¸°ì°½ì
í¨í¤ì§ 'ì¼ë°íí©'ì ìì±í´ì£¼ì¸ì. 기ì
기본ì ë³´(기ì
ëª
/ê°ì
ì°ìì¼/ì¬ì
ì구ë¶/ëíìì í/ë±ë¡ë²í¸/주ì)ì ì°½ì
ìì´í
/ì°ì¶ë¬¼/í 구ì±ì ìì°ì¤ë½ê² ì 리í´ì£¼ì¸ì."},{id:"in_overview",label:"ìì´í
ê°ì(ìì½)",sectionKeys:["item-overview"],fieldIds:["item-title","item-category","item-description","overview-problem","overview-solution","overview-scaleup","overview-team"],prompt:"ì´ê¸°ì°½ì
í¨í¤ì§ 'ì°½ì
ìì´í
ê°ì(ìì½)'ì ìì±í´ì£¼ì¸ì. íì¬ê¹ì§ì ì§í/ê²ì¦(ìë¤ë©´)ì ë°ìí´ ìì½ì ì¤ëë ¥ì ëì¬ì£¼ì¸ì."},{id:"in_problem",label:"문ì ì¸ì(ì ë°)",sectionKeys:["problem"],prompt:"ì´ê¸°ì°½ì
í¨í¤ì§ '문ì ì¸ì(Problem)' ì¹ì
ì ìì±í´ì£¼ì¸ì. ìì¥/ê³ ê° ë¬¸ì ì ì°ë¦¬ê° íì¸í ì í¸(ì¸í°ë·°/PoC/ì§í ë±)를 ì®ì´ì£¼ì¸ì."},{id:"in_solution",label:"ì¤í ê°ë¥ì±(ì ë°)",sectionKeys:["solution"],fieldIds:["solution-content","budget-gov","budget-self-cash","budget-self-kind","budget-total","schedule-1-task","schedule-1-period","schedule-1-detail","schedule-2-task","schedule-2-period","schedule-2-detail","schedule-3-task","schedule-3-period","schedule-3-detail","schedule-4-task","schedule-4-period","schedule-4-detail","schedule-5-task","schedule-5-period","schedule-5-detail","schedule-6-task","schedule-6-period","schedule-6-detail","budget-labor","budget-labor-gov","budget-labor-cash","budget-labor-inkind","budget-labor-total","budget-outsourcing","budget-outsourcing-gov","budget-outsourcing-cash","budget-outsourcing-inkind","budget-outsourcing-total","budget-advertising","budget-advertising-gov","budget-advertising-cash","budget-advertising-inkind","budget-advertising-total","budget-material","budget-material-gov","budget-material-cash","budget-material-inkind","budget-material-total","budget-fee","budget-fee-gov","budget-fee-cash","budget-fee-inkind","budget-fee-total","schedule-full-1-task","schedule-full-1-period","schedule-full-1-detail","schedule-full-2-task","schedule-full-2-period","schedule-full-2-detail","schedule-full-3-task","schedule-full-3-period","schedule-full-3-detail","schedule-full-4-task","schedule-full-4-period","schedule-full-4-detail","schedule-full-5-task","schedule-full-5-period","schedule-full-5-detail","schedule-full-6-task","schedule-full-6-period","schedule-full-6-detail"],prompt:"ì´ê¸°ì°½ì
í¨í¤ì§ 'ì¤í ê°ë¥ì±(Solution)' ì¹ì
ì ìì±í´ì£¼ì¸ì. 기존 ì§ì² + íì½ê¸°ê° ë´ ê³ ëí ê³í + ì°¨ë³ì± + ì¼ì + ì¬ì
ë¹(ì ë¶+ì기ë¶ë´) 근거를 í¬í¨í´ì£¼ì¸ì."},{id:"in_scaleup",label:"ì±ì¥ì ëµ(ì ë°)",sectionKeys:["scaleup"],fieldIds:["scaleup-content"],prompt:"ì´ê¸°ì°½ì
í¨í¤ì§ 'ì±ì¥ì ëµ(Scale-up)' ì¹ì
ì ìì±í´ì£¼ì¸ì. ì¸ì¼ì¦ íì´íë¼ì¸, ì íµ/ì±ë, ê°ê²©/í¨í¤ì§, KPI ì¤ì¬ì¼ë¡ ìì±í´ì£¼ì¸ì."},{id:"in_team",label:"í 구ì±(ì ë°)",sectionKeys:["team"],fieldIds:["team-content","team-full-1-position","team-full-1-role","team-full-1-capability","team-full-1-status","team-full-2-position","team-full-2-role","team-full-2-capability","team-full-2-status","team-full-3-position","team-full-3-role","team-full-3-capability","team-full-3-status","team-full-4-position","team-full-4-role","team-full-4-capability","team-full-4-status"],prompt:"ì´ê¸°ì°½ì
í¨í¤ì§ 'í 구ì±(Team)' ì¹ì
ì ìì±í´ì£¼ì¸ì. ì´ì/ì±ì© ê³íê³¼ ì¤ì¼ì¼ì
ê°ë¥í ì¡°ì§ êµ¬ì± ê´ì ì¼ë¡ ìì±í´ì£¼ì¸ì."}],ea=[{id:"gr_general",label:"ì¼ë°íí©(기ì
ì ë³´)",sectionKeys:["general-info"],prompt:"ì°½ì
ëì½í¨í¤ì§ 'ì¼ë°íí©'ì ìì±í´ì£¼ì¸ì. 기ì
기본ì ë³´(기ì
ëª
/ì¤ë¦½ì¼/ì¬ì
ì구ë¶/ëíìì í/ë±ë¡ë²í¸/ìì¬ì§)ì
16 ì°½ì
ìì´í
ëª
, ì§ìë¶ì¼/기ì ë¶ì¼, ì¬ì
ë¹(ì ë¶+ìë¶ë´) ê°ì를 ëª
íí ì 리í´ì£¼ì¸ì. ì§ìë¶ì¼/기ì ë¶ì¼ë ì íí í목ì´ë¼ë©´ ì¤ë³µ ìì´ ê°ì¥ ì í©í ì¡°í©ì¼ë¡ ì±ì주ì¸ì."},{id:"gr_overview",label:"ìì´í
ê°ì/ë¡ëë§µ",sectionKeys:["item-overview"],prompt:"ì°½ì
ëì½í¨í¤ì§ 'ì°½ì
ìì´í
ê°ì'를 ìì±í´ì£¼ì¸ì. ìì´í
ê°ì/ì í ì´ë¯¸ì§ ì¤ëª
ì 구체ì ì¼ë¡ ìì±íê³ , ì¥ê¸° ë¡ë맵과 íì½ê¸°ê° ë´ ë¡ëë§µì ë¨ê³ì ì¼ë¡ ì°ê²°í´ 주ì¸ì. íì½ê¸°ê° ì°ì¶ë¬¼ì ë¡ëë§µ ë¨ê³ì 1:1ë¡ ë§¤ì¹ëê² ì 리í´ì£¼ì¸ì."},{id:"gr_problem",label:"문ì ì¸ì(ìì¥\xb7ê³ ê°)",sectionKeys:["problem"],prompt:"ì°½ì
ëì½í¨í¤ì§ '문ì ì¸ì' ì¹ì
ì ìì±í´ì£¼ì¸ì. ìì¥ ê·ëª¨/í¸ë ë, ê³ ê° pain point, 기존 ì루ì
íê³ë¥¼ 근거 ì¤ì¬ì¼ë¡ ì 리í´ì£¼ì¸ì. ê° ìí목ì ìì¹ ëë ì¶ì²(기ê´ëª
/ë³´ê³ ì/ì°ë)를 í¬í¨í´ ì 뢰ì±ì ëì¬ì£¼ì¸ì."},{id:"gr_solution",label:"ì¤íê°ë¥ì±(ìì´í
\xb7ìì¥\xb7ì±ê³¼)",sectionKeys:["solution"],prompt:"ì°½ì
ëì½í¨í¤ì§ 'ì¤íê°ë¥ì±(2ì¥)' ì¹ì
ì ìì±í´ì£¼ì¸ì. 2-1-1 ì°½ì
ìì´í
ìê° ë° ê°ì ê³¼ì , 2-1-2 목íìì¥(ê³ ê°) ë¶ì, 2-2 ì°½ì
ìì´í
ì¬ì
í ì¶ì§ ì±ê³¼ ììë¡ ìì±íê³ , ìì¹/근거를 í¬í¨í´ ê° íì íëª©ì´ ìë¡ ì°ê²°ëëë¡ ì 리í´ì£¼ì¸ì."},{id:"gr_scaleup",label:"ì±ì¥ì ëµ(ì¤ì¼ì¼ì
)",sectionKeys:["scaleup"],prompt:"ì°½ì
ëì½í¨í¤ì§ 'ì±ì¥ì ëµ' ì¹ì
ì ìì±í´ì£¼ì¸ì. ì±ì¥ ì ëµì 먼ì ìì½íê³ , ë§¤ì¶ ê³í(ìì¥/ì í/기ê°/ìë/ë¨ê°/매ì¶)ì í í목ì ë§ê² ì±ì주ì¸ì. ì¶ì ë§¤ì¶ ê³íì ë³´ì/기ì¤/공격 ìë리ì¤ì²ë¼ ê°ë¨í ê°ì 근거를 í¬í¨í´ ìì±í´ì£¼ì¸ì. íì½ê¸°ê° ì¼ì ê³¼ ì§í ê³íì 매ì¶\xb7ì±ì¥ ì ëµê³¼ ì ë ¬ëê² êµ¬ì±í´ì£¼ì¸ì."},{id:"gr_team",label:"í 구ì±(ìë\xb7íì
)",sectionKeys:["team"],prompt:"ì°½ì
ëì½í¨í¤ì§ 'í 구ì±' ì¹ì
ì ìì±í´ì£¼ì¸ì. ëí/íì ìëê³¼ ìí , ì¸ë ¥ ê³í, ì¸ë¶ íì
/íí¸ëìì í¬í¨í´ ì¤íë ¥ì ê°ì¡°í´ì£¼ì¸ì. ì¸ë ¥ 구ì±ì ìí -ì±ê³¼ ì°ê²°(무ìì í´ê²°íëì§)ê¹ì§ ëë¬ëê² ìì±í´ì£¼ì¸ì."}],el=[{id:"gtv_general",label:"ì¼ë°íí©(기ì
ì ë³´)",sectionKeys:["general-info"],fieldIds:["gtv-ceo-name","gtv-ceo-birth","gtv-ceo-gender","gtv-co-ceo-name","gtv-co-ceo-birth","gtv-co-ceo-gender","gtv-company-name","gtv-hq-location","gtv-biz-number","gtv-corp-number","gtv-open-date","gtv-corp-establish-date","gtv-application-type","gtv-investment-stage","gtv-fasttrack-history","gtv-fasttrack-year-1","gtv-fasttrack-year-2","gtv-business-name","gtv-one-liner","gtv-kpi","gtv-target-revenue","gtv-target-investment","gtv-target-employment","gtv-past-revenue-2023","gtv-past-revenue-2024","gtv-past-revenue-2025","gtv-past-invest-2023","gtv-past-invest-2024","gtv-past-invest-2025","gtv-past-employ-2023","gtv-past-employ-2024","gtv-past-employ-2025"],prompt:"ì±ì¥ê´ê´ë²¤ì² 'ì¼ë°íí©'ì ìì±í´ì£¼ì¸ì. ëíì ì ë³´(ì±ëª
/ìë
ìì¼/ì±ë³), 기ì
ì ë³´(기ì
ëª
/ìì¬ì§/ì¬ì
ìë²í¸), ì ì²ì í, í¬ìë¨ê³, í¨ì¤í¸í¸ë ì´ë ¥, ì¬ì
ëª
, íì¤ì¤ëª
, ì±ê³¼ì§í(KPI), íì½ëª©í(매ì¶/í¬ìì ì¹/ì ê·ê³ ì©), 3ê°ë
주ìì±ê³¼(매ì¶/í¬ìì ì¹/ì ê·ê³ ì©)를 ì 리í´ì£¼ì¸ì."},{id:"gtv_overview",label:"ì¬ì
ê°ì ë° í¹ì§(2ì¥)",sectionKeys:["section1"],prompt:"ì±ì¥ê´ê´ë²¤ì² '1. ì¬ì
ê°ì ë° í¹ì§' ì¹ì
ì ìì±í´ì£¼ì¸ì. 1-1 ì¬ì
ê°ë° ë기 ë° ë°°ê²½ììë ê´ê´ì°ì
ë´ ë¬¸ì ì¸ìê³¼ í´ê²°íê³ ì íë ìì¥ê°ì¹ë¥¼, 1-2 ì¬ì
ì í¹ì¥ì ììë ì°¨ë³ì±\xb7ìµí©ì±\xb7íì ì± ê´ì ìì 기존 ê´ê´ ìë¹ì¤ ëë¹ íµì¬ ê²½ìë ¥ê³¼ ë³´ì 기ì /í¹ë³ê¸°ë¥ì 구체ì ì¼ë¡ ìì í´ì£¼ì¸ì."},{id:"gtv_market",label:"ìì¥ ë° ì¬ì
모ë¸(4ì¥)",sectionKeys:["section2"],prompt:"ì±ì¥ê´ê´ë²¤ì² '2. ìì¥ ë° ì¬ì
모ë¸' ì¹ì
ì ìì±í´ì£¼ì¸ì. 2-1 ìì¥íí© ë° ëª©íê³ ê°ììë ê´ê´ìì¥ ê·ëª¨\xb7í¸ë ëì íê² ê³ ê°ì¸µì, 2-2 ì¬ì
모ë¸ììë ììµì°½ì¶ 구조를 ëìí ê´ì ì¼ë¡, 2-3 ìì¥ì±ììë íì¬ê¹ì§ ì ëì ì±ê³¼(í매ë/ê³ ê°ì ë±)를, 2-4 ì ì¬ë¦¬ì¤í¬ììë ê´ê´ì°ì
í¹ì ì 리ì¤í¬(ê³ì ì±/ê·ì /경기ë³ë ë±)ì ë
16ìë°©ìì ìì í´ì£¼ì¸ì."},{id:"gtv_strategy",label:"ì¬ì
ì ëµ(6ì¥)",sectionKeys:["section3"],prompt:"ì±ì¥ê´ê´ë²¤ì² '3. ì¬ì
ì ëµ' ì¹ì
ì ìì±í´ì£¼ì¸ì. 3-1 ìí\xb7ìë¹ì¤\xb7ì¸íë¼ ê°ë° ë° ê³ ëí ê³í, 3-2 íë³´ ë° íë¡ê°ì²(ë°ëí/B2B ë± ê´ê´ì
ì±ë í¬í¨), 3-3 ìê¸ì¡°ë¬ ë° ì§íê³í(ì ë¶ì§ìê¸ 1ìµì íë í¬í¨ í1), 3-4 ì¬ì
ì¶ì§ ì¼ì ê³í(ì ì²´+íì½ê¸°ê° ë´), 3-5 ììµì±\xb7ì±ì¥ì± ì ë§ ë° ì¬ë¬´ìí(ìµê·¼ 3ë
ì¤ì +í¥í 5ë
ìì 매ì¶)를 구체ì ì¼ë¡ ìì±í´ì£¼ì¸ì."},{id:"gtv_tourism",label:"ê´ê´ì°ì
ì°ê³\xb7íì¥(3ì¥)",sectionKeys:["section4"],prompt:"ì±ì¥ê´ê´ë²¤ì² '4. ê´ê´ì°ì
ì°ê³\xb7íì¥ ê°ë¥ì±' ì¹ì
ì ìì±í´ì£¼ì¸ì. 4-1 ê´ê´ì°ì
ë° ìì¥ì ëí ì´í´ììë K-ê´ê´\xb7ì§ìê´ê´\xb7ì¸ë°ì´ë/ììë°ì´ë í¸ë ë를, 4-2 ì¬ì
ê³¼ ê´ê´ì°ì
ê° ì°ê³ ë° íì¥ ê°ë¥ì±ììë ì¤ì ì ì©\xb7íì© ìë리ì¤ë¥¼, 4-3 ê´ê´ì°ì
ë´ ì±ê³¼ë°ì ê°ë¥ì± ë° ê¸°ëí¨ê³¼ììë ê³ëì /ë¹ê³ëì ì±ê³¼ì ê´ê´ì°ì
ë°ì 기ì¬ë를 구체ì ì¼ë¡ ìì í´ì£¼ì¸ì."},{id:"gtv_team",label:"í ìë(3ì¥)",sectionKeys:["section5"],prompt:"ì±ì¥ê´ê´ë²¤ì² '5. í ìë' ì¹ì
ì ìì±í´ì£¼ì¸ì. 5-1 ì¬ì
ìì ì 문ì±ììë ëíìì ê´ê´/ì¬í ë¶ì¼ ê²½í\xb7ê²½ë ¥\xb7ììì¤ì ì, 5-2 ì¬ì
ì´ì ë¥ë ¥ììë ì¬ì
í ìì§\xb7ëì ì ì \xb7ë³´ì ìì(ì¥ë¹/ìì¤/í¹í/íí¸ëì)ì, 5-3 ì´ìì¡°ì§ ë° ì¼ì리 ì°½ì¶ê³íììë íì¬ í 구ì±ê³¼ ì ê· ì±ì© ê³í\xb7ëë´ì¸ íë ¥ ë¤í¸ìí¬ë¥¼ 구체ì ì¼ë¡ ìì±í´ì£¼ì¸ì."}],es=[{id:"yo_general",label:"ì¼ë°íí©(기ì
ì ë³´)",sectionKeys:["business-plan-general"],fieldIds:["youth-task-title","youth-applicant-name","youth-applicant-name-2","youth-gender","youth-company-name","youth-biz-reg-no","youth-corp-reg-no","youth-open-date","youth-biz-type","youth-rep-type","youth-budget-gov","youth-budget-cash","youth-budget-inkind","youth-budget-total","youth-kpi-employment-last","youth-kpi-employment-this","youth-kpi-sales-last","youth-kpi-sales-this","youth-kpi-export-last","youth-kpi-export-this","youth-kpi-invest-last","youth-kpi-invest-this"],prompt:"ì²ë
ì°½ì
ì¬ê´íêµ 'ì¼ë°íí©'ì ìì±í´ì£¼ì¸ì. ì¬ì
í ê³¼ì ëª
/ì ì²ì¸ ì ë³´/기ì
ëª
/ì¬ì
ìë±ë¡ë²í¸/ì¬ì
ë¹ êµ¬ì±/ì±ê³¼ì§í를 ìì°ì¤ë½ê² ì 리í´ì£¼ì¸ì. ì±ê³¼ì§íë í©ë¦¬ì ì¸ ì ë
/ê¸ë
ìì¹ë¥¼ ì ìí´ì£¼ì¸ì."},{id:"yo_overview",label:"ì¬ì
í ê³¼ì ê°ì(ìì½)",sectionKeys:["business-plan-summary"],fieldIds:["youth-summary-intro","youth-summary-diff","youth-summary-market","youth-summary-goals"],prompt:"ì²ë
ì°½ì
ì¬ê´íêµ 'ì¬ì
í ê³¼ì ê°ì(ìì½)'ì ê°ê²°í ì¤ê¸ ííë¡ ìì±í´ì£¼ì¸ì. ê° íëª©ë¹ 2~3문ì¥ì¼ë¡ íµì¬ë§ ìì½í©ëë¤. ë¶ë¦¿í¬ì¸í¸ë ë³µì¡í 구조 ìì´ ëª
ì¬í 문ì¥ì¼ë¡ ê°ë¨í ìì±í´ì£¼ì¸ì."},{id:"yo_problem",label:"문ì ì¸ì(Problem)",sectionKeys:["problem"],fieldIds:["youth-problem-1-1","youth-problem-1-2"],prompt:"ì²ë
ì°½ì
ì¬ê´íêµ '문ì ì¸ì(Problem)' ì¹ì
ì ìì±í´ì£¼ì¸ì. 1-1 ì°½ì
ìì´í
ì ê°ë°ë기 ë° íìì±, 1-2 ì°½ì
ìì´í
ì ì¬ì
ì± ë° ê¸°ì ê°ë° íìì±ì ìì¥ ê·¼ê±°/ìì¹ì í¨ê» ìì±í´ì£¼ì¸ì."},{id:"yo_solution",label:"ì¤íê°ë¥ì±(Solution)",sectionKeys:["solution"],fieldIds:["youth-solution-2-1","youth-solution-2-2","youth-schedule-1-content","youth-schedule-1-period","youth-schedule-1-detail","youth-schedule-2-content","youth-schedule-2-period","youth-schedule-2-detail","youth-schedule-3-content","youth-schedule-3-period","youth-schedule-3-detail","youth-schedule-4-content","youth-schedule-4-period","youth-schedule-4-detail","youth-schedule-5-content","youth-schedule-5-period","youth-schedule-5-detail"],prompt:"ì²ë
ì°½ì
ì¬ê´íêµ 'ì¤íê°ë¥ì±(Solution)' ì¹ì
ì ìì±í´ì£¼ì¸ì. 2-1 ì°½ì
ìì´í
ì¤í ë° ì¬ì
í ìë, 2-2 ì°½ì
ìì´í
ì°¨ë³ì± ë° ê²½ìë ¥ íë³´ ë°©ì, ì¬ì
ì¶ì§ì¼ì ì 구체ì ì¼ë¡ ìì±í´ì£¼ì¸ì."},{id:"yo_scaleup",label:"ì±ì¥ì ëµ(Scale-up)",sectionKeys:["scale-up"],fieldIds:["youth-scale-3-1","youth-scale-3-2-1","youth-scale-3-2-2","youth-scale-3-2-3","youth-budget-item1-name","youth-budget-item1-desc","youth-budget-item1-gov","youth-budget-item1-cash","youth-budget-item1-inkind","youth-budget-item2-name","youth-budget-item2-desc","youth-budget-item2-gov","youth-budget-item2-cash","youth-budget-item2-inkind","youth-budget-item3-name","youth-budget-item3-desc","youth-budget-item3-gov","youth-budget-item3-cash","youth-budget-item3-inkind","youth-budget-item4-name","youth-budget-item4-desc","youth-budget-item4-gov","youth-budget-item4-cash","youth-budget-item4-inkind"],prompt:"ì²ë
ì°½ì
ì¬ê´íêµ 'ì±ì¥ì ëµ(Scale-up)' ì¹ì
ì ìì±í´ì£¼ì¸ì. 3-1 ìê¸ìì ë° ì¡°ë¬ê³í, 3-2 ì¬ì
í ì¶ì§ì ëµ(ë´ììì¥/í´ì¸ìì¥/íì½ê¸°ê° ë´ ëª©í), ì¬ì
ë¹ ì¸ë¶ë´ìì 구체ì ì¼ë¡ ìì±í´ì£¼ì¸ì."},{id:"yo_team",label:"í 구ì±(Team)",sectionKeys:["team"],fieldIds:["youth-team-ceo","youth-team-employment-plan","youth-tech-protection","youth-social-value","youth-regional","youth-employee-1-name","youth-employee-1-position","youth-employee-1-duty","youth-employee-1-career","youth-employee-2-name","youth-employee-2-position","youth-employee-2-duty","youth-employee-2-career","youth-employee-3-name","youth-employee-3-position","youth-employee-3-duty","youth-employee-3-career","youth-
16hire-1-position","youth-hire-1-duty","youth-hire-1-method","youth-hire-1-career","youth-hire-2-position","youth-hire-2-duty","youth-hire-2-method","youth-hire-2-career"],prompt:"ì²ë
ì°½ì
ì¬ê´íêµ 'í 구ì±(Team)' ì¹ì
ì ìì±í´ì£¼ì¸ì. ëíì íí© ë° ìë, íì¬ ì¬ì§ì¸ì ë° ê³ ì©ê³í, 기ì ë³´í¸ ë
¸ë ¥, ì¬íì ê°ì¹ ì¤ì²ê³í, ì§ìí¹í ì°ì
ê¸°ë° ì¬ì
ì¶ì§ê³í, ì§ì íí©/ì¶ê° ê³ ì©ê³í í를 구체ì ì¼ë¡ ì±ì주ì¸ì."}],er=[{id:"rt_application",label:"ì ì²íí©",sectionKeys:["application-status"],prompt:"ì¬ëì ì±ê³µí¨í¤ì§ 'ì ì²íí©'ì ìì±í´ì£¼ì¸ì. ì ì² ì£¼ê´ê¸°ê´ëª
, ì ì² êµ¬ë¶(ìë¹ì¬ì°½ì
ì/ì¬ì°½ì
기ì
), ì¬ì
ë¶ì¼/기ì ë¶ì¼ ì²´í¬ë°ì¤ë¥¼ ì í©íê² ì ííê³ , ì¬ì
ë¹ êµ¬ì±(ì ë¶/íê¸/í물/í©ê³)ì ë°±ë§ì ë¨ìë¡ íì¤ì ì¸ ê¸ì¡ì¼ë¡ ì±ì주ì¸ì."},{id:"rt_general",label:"ì¼ë°íí©",sectionKeys:["general-info"],prompt:"ì¬ëì ì±ê³µí¨í¤ì§ 'ì¼ë°íí©'ì ìì±í´ì£¼ì¸ì. ì°½ì
ìì´í
ëª
, ì°ì¶ë¬¼(íì½ê¸°ê° ë´ ëª©í 2~3ì¤), 기ì
ëª
, ê°ì
ì°ìì¼, ì¬ì
ì 구ë¶, ìì¬ì§, ì¬ì
ìë±ë¡/ë²ì¸ë±ë¡ë²í¸, 기ì
구ì±(ì§ì/ë´ë¹ì
무/ë³´ì ìë)ì ìì°ì¤ë½ê³ 구체ì ì¼ë¡ ì±ì주ì¸ì."},{id:"rt_item_overview",label:"ìì´í
ê°ì(ìì½)",sectionKeys:["item-overview"],prompt:"ì¬ëì ì±ê³µí¨í¤ì§ 'ì ì²ê³¼ì ìì´í
ê°ì(ìì½)'ì ìì±í´ì£¼ì¸ì. ìì´í
ê°ì/ë°°ê²½ ë° íìì±/íí© ë° êµ¬ì²´í ë°©ì/목íìì¥ ë° ì¬ì
í ì ëµì ê°ê° 2~3문ì¥ì¼ë¡ 구체ííê³ , ì´ë¯¸ì§ 캡ì
2ê°ë í¨ê» ì±ì주ì¸ì."},{id:"rt_closed_detail",label:"íì
기ì
ì¸ë¶ë´ì©",sectionKeys:["closed-company-detail"],prompt:"ì¬ëì ì±ê³µí¨í¤ì§ 'íì
기ì
ì¸ë¶ë´ì©'ì ìì±í´ì£¼ì¸ì. 기ì
ëª
/ìì¬ì§/ê°ì
ì°ìì¼/기ì
구ë¶/ì´ì기ê°/ìì´í
ëª
/ìì´í
ê°ì를 구체ì ì¼ë¡ ìì±íê³ , ì¬ì
ë¶ì¼/기ì ë¶ì¼ ì²´í¬ë°ì¤ë¥¼ ì í©íê² ì íí ë¤ íì
ìì¸ ë° ì¬ì ë ìì¹ì 근거를 í¬í¨í´ ì¤ëë ¥ ìê² ìì±í´ì£¼ì¸ì."},{id:"rt_problem",label:"문ì ì¸ì(Problem)",sectionKeys:["problem"],prompt:"ì¬ëì ì±ê³µí¨í¤ì§ '문ì ì¸ì(Problem)' ì¹ì
ì ìì±í´ì£¼ì¸ì. íì
기ì
ì¬ì
ê°ì, íì
ìì¸ ë¶ì(ì¸ì /ë´ì ), ê°ì ë°©ì, ì°½ì
ìì´í
ë°°ê²½ ë° íìì±, 목íìì¥ íí© ë¶ìì ë¶ë¦¿ 구조(â¡/ã
/-)ë¡ ìì±íê³ , ê° ìí목ì ìì¹/기ê´ëª
/ì°ë를 í¬í¨í´ì£¼ì¸ì."},{id:"rt_solution",label:"ì¤í ë° êµ¬ì²´í",sectionKeys:["solution"],prompt:"ì¬ëì ì±ê³µí¨í¤ì§ 'ì¤í ë° êµ¬ì²´í ë°©ì' ì¹ì
ì ìì±í´ì£¼ì¸ì. ì°½ì
ìì´í
íí©(ì¤ë¹ ì ë)ê³¼ ì¤í/구체í ë°©ìì ë¶ë¦¿ êµ¬ì¡°ë¡ ì 리íê³ , íì½ê¸°ê° ì¼ì ë° ì¬ì
ë¹ ì§íê³í í í목ë ë
¼ë¦¬ì ì¼ë¡ ì±ì주ì¸ì."},{id:"rt_scaleup",label:"ì±ì¥ì ëµ(Scale-up)",sectionKeys:["scaleup"],prompt:"ì¬ëì ì±ê³µí¨í¤ì§ 'ì±ì¥ì ëµ(Scale-up)' ì¹ì
ì ìì±í´ì£¼ì¸ì. ë¹ì¦ëì¤ ëª¨ë¸ ë° ì¶ì§ì±ê³¼, ì¬ì
í ì¶ì§ ì ëµ, ì¬ì
ì ì²´ ë¡ëë§µ, íì½ê¸°ê° ë´ ëª©í/ë¬ì± ë°©ì, ì¬ì
ë¹ ì§íê³í, ìê¸ ì¡°ë¬ê³íì ë¶ë¦¿ êµ¬ì¡°ë¡ ì 리íê³ , 매ì¶/ì¶ì ë§¤ì¶ íë ìì¥/ì í/기ê°/ìë/ë¨ê°/ë§¤ì¶ í목ì ë§ê² 구체ì ì¼ë¡ ì±ì주ì¸ì."},{id:"rt_team",label:"í 구ì±(Team)",sectionKeys:["team"],prompt:"ì¬ëì ì±ê³µí¨í¤ì§ '기ì
구ì±(Team)' ì¹ì
ì ìì±í´ì£¼ì¸ì. ëíì ë° ê¸°ì
íí©, ì¸ë ¥ ê³ ì© ë° íì© ê³í, ì¸ë¶ íë ¥ íí©, ESG ê²½ìì ë¶ë¦¿ êµ¬ì¡°ë¡ ìì±íê³ , ì¬ì§ ì¸ì/ì¶ê° ê³ ì©/íë ¥ ê¸°ê´ íë 구체ì ì¼ë¡ ì±ì주ì¸ì."}],en=[{id:"rt26_task_overview",label:"ê³¼ì ê°ì",sectionKeys:["task-overview"],prompt:"ì¬ëì ì±ê³µí¨í¤ì§ 2026 'ê³¼ì ê°ì' ì¹ì
ì ìì±í´ì£¼ì¸ì. ê³¼ì ëª
(ìì´í
ëª
)ì íµì¬ 기ì \xb7ì°¨ë³ì ì´ ëë¬ëë ëª
ì¹ì¼ë¡, ìì´í
(ìë¹ì¤) ê°ìë ì¬ì°½ì
ê²½íì ë°íì¼ë¡ í 문ì í´ê²° ë°©í¥ê³¼ íµì¬ ê°ì¹ë¥¼ 2~4문ì¥ì¼ë¡ 구체ì ì¼ë¡ ìì±í´ì£¼ì¸ì."},{id:"rt26_closed_history",label:"íì
ì´ë ¥",sectionKeys:["closed-history"],prompt:"ì¬ëì ì±ê³µí¨í¤ì§ 2026 'íì
ì´ë ¥' ì¹ì
ì ìì±í´ì£¼ì¸ì. íì
기ì
1ì 기ì
ëª
\xb7기ì
구ë¶(ê°ì¸/ë²ì¸)\xb7ì¬ì
기ê°\xb7ìì´í
ê°ì\xb7íì
ìì¸ì ìì¹ì 구체ì 근거를 í¬í¨í´ ìì
16±íê³ , íì 기ì 2\xb73ì í´ë¹ ìì¼ë©´ '-'ë¡ ì²ë¦¬í´ì£¼ì¸ì."},{id:"rt26_problem",label:"문ì ì¸ì",sectionKeys:["problem"],prompt:"ì¬ëì ì±ê³µí¨í¤ì§ 2026 '문ì ì¸ì' ì¹ì ì ìì±í´ì£¼ì¸ì. â íì ìì¸ ë¶ì ë° ê°ì ë°©ì: ì¸ì \xb7ë´ì íì ìì¸ê³¼ 구체ì ê°ì ë°©ìì, ⡠목íìì¥(ê³ ê°) íí© ë° íìì±: ìì¥ ê·ëª¨\xb7ì±ì¥ë¥ \xb7목í ê³ ê°êµ°ì ë¶ë¦¿ 구조(â¡/ã /-)ë¡ ê° 3ì¸í¸ ì´ì ìì±íê³ , ê° ìí목ì ìì¹\xb7기ê´ëª \xb7ì ì± ëª ì í¬í¨í´ì£¼ì¸ì."},{id:"rt26_solution",label:"ì¤í ë° êµ¬ì²´í",sectionKeys:["solution"],prompt:"ì¬ëì ì±ê³µí¨í¤ì§ 2026 'ì¤í ë° êµ¬ì²´í' ì¹ì ì ìì±í´ì£¼ì¸ì. â ì¬ì°½ì ìì´í ì¤ë¹ íí©: ê°ë° ë¨ê³\xb7ê²ì¦ ê²°ê³¼\xb7ë³´ì ìëì, â¡ ì¤í ë° êµ¬ì²´í ë°©ì: 기ì ê³ ëí\xb7ì¬ì í ì¶ì§ ê³íì ë¶ë¦¿ 구조(â¡/ã /-)ë¡ ê° 3ì¸í¸ ì´ì ìì±í´ì£¼ì¸ì. íì½ê¸°ê° ì¼ì í(4í)ì ì¬ì ë¹ í(ì ë¶ì§ìê¸/íê¸/í물/í©ê³)ë íì¤ì ì¸ ê¸ì¡ì¼ë¡ ì±ì주ì¸ì."},{id:"rt26_scaleup",label:"ì±ì¥ì ëµ(Scale-up)",sectionKeys:["scaleup"],prompt:"ì¬ëì ì±ê³µí¨í¤ì§ 2026 'ì±ì¥ì ëµ(Scale-up)' ì¹ì ì ìì±í´ì£¼ì¸ì. â ë¹ì¦ëì¤ ëª¨ë¸: ììµ êµ¬ì¡°\xb7íµì¬ KPI\xb7ì¤ì¥ê¸° ë§¤ì¶ ëª©í를, â¡ ì¬ì í ì¶ì§ ì ëµ: ìì¥ ì§ì ì ëµ\xb7ë§ì¼í ë°©ë²ì ë¶ë¦¿ 구조(â¡/ã /-)ë¡ ê° 3ì¸í¸ ì´ì ìì±íê³ , ê° ìí목ì 구체ì ìì¹ì ì ëµì í¬í¨í´ì£¼ì¸ì."},{id:"rt26_team",label:"í 구ì±(Team)",sectionKeys:["team"],prompt:"ì¬ëì ì±ê³µí¨í¤ì§ 2026 'í 구ì±(Team)' ì¹ì ì ìì±í´ì£¼ì¸ì. â ëíì ìë: ëë©ì¸ ê²½í\xb7ì¬ì ìí ìë\xb7ì¬ì°½ì ì¤ë¹ íí©ì, â¡ ì¡°ì§ êµ¬ì± ê³í: íµì¬ ì¸ë ¥ ì±ì© ê³í\xb7ì¤ì¥ê¸° ì¡°ì§ ë°ì ë°©í¥ì ë¶ë¦¿ 구조(â¡/ã /-)ë¡ ê° 3ì¸í¸ ì´ì ìì±íê³ , ì¬ì§ ì¸ì\xb7ì¶ê° ê³ ì© ê³í\xb7ì§ì ìë íë 구체ì ì¼ë¡ ì±ì주ì¸ì."}],eo=(0,s.memo)(function({isOpen:e,onClose:t,onApplyContent:i,onApplyFieldMap:l,programId:T,programName:O="ì¬ì ê³íì",documentId:K=null,currentContent:L="",currentSection:eo,interviewData:ed,onGenerateSection:ec,variant:eu="drawer",hideHeader:em=!1,selectedContext:ep=null,onClearSelectedContext:eh,improvementRequest:eg=null,onImprovementConsumed:ef,onScrollToField:eb,onApplyCells:ex,onReplaceTable:ey,referenceFiles:ev=[],onReferenceFilesChange:ew,onReferenceFilesConsumed:ej,onTextTranscriptChange:ek,externalDraft:eN=null}){let e$=(0,s.useMemo)(()=>(0,C.createClient)(),[]),eI=(0,s.useRef)(ev.find(e=>e.requestId)?.requestId??null),e_=(0,s.useRef)(!1),eC=(0,s.useRef)(ev),eA=(0,s.useRef)(ev.length);eC.current=ev,(0,s.useEffect)(()=>{let e=ev.find(e=>e.requestId)?.requestId;e&&(eI.current=e),eA.current>0&&0===ev.length&&(eI.current=null),eA.current=ev.length},[ev]);let eS=(0,s.useMemo)(()=>0===ev.length?null:1===ev.length?ev[0].text:ev.map(e=>`[${e.filename}] 17${e.text}`).join("\n\n---\n\n"),[ev]),eD=(0,s.useCallback)(async()=>{try{let{data:e}=await e$.auth.getSession();return e.session?.access_token||""}catch{return""}},[e$]),eM=async()=>{let e=await eD(),t={"Content-Type":"application/json"};return e&&(t.Authorization=`Bearer ${e}`),t},eq=(0,s.useCallback)(async e=>{if(e_.current)return;let t=eC.current;if(t.length>=3)return void B.o.error(`ì°¸ê³ ìë£ë ìµë 3ê°ê¹ì§ 첨ë¶í ì ììµëë¤.`);if(t.some(t=>t.filename===e.name))return void B.o.error("ì´ë¯¸ ê°ì ì´ë¦ì íì¼ì´ 첨ë¶ëì´ ììµëë¤.");if(e.size>4194304)return void B.o.error(`íì¼ í¬ê¸°ê° ë무 í½ëë¤ (ìµë 4MB). íì¬: ${(e.size/1024/1024).toFixed(1)}MB`);if(!(0,X.XL)(e.name))return void B.o.error(`ì§ìíì§ ìë íì¼ íìì ëë¤. ì§ì íì: ${X.Nv.join(", ")}`);e_.current=!0,tA(!0);try{let t=await eD(),i=new FormData;i.append("file",e),T&&i.append("programId",T),eI.current||(eI.current=crypto.randomUUID()),i.append("requestId",eI.current),i.append("requestType","chat");let a={};t&&(a.Authorization=`Bearer ${t}`);let l=await fetch("/api/extract-text",{method:"POST",headers:a,body:i}),s=await l.json();if(!l.ok||!s.success)return void B.o.error(s.error||"í ì¤í¸ ì¶ì¶ì ì¤í¨íìµëë¤.");let r=eC.current;if(r.reduce((e,t)=>
17e+t.text.length,0)+s.charCount>1e5)return void B.o.error("ì°¸ê³ ìë£ ì´ ì©ëì ì´ê³¼íìµëë¤. íì¼ì ì¤ì¬ì£¼ì¸ì.");let n=[...r,{text:s.text,filename:s.filename,requestId:"string"==typeof s.requestId?s.requestId:eI.current??void 0,attachmentId:"string"==typeof s.attachmentId?s.attachmentId:null,archiveStatus:"stored"===s.archiveStatus?"stored":"unavailable"}];eC.current=n,ew?.(n),B.o.success(`ì°¸ê³ ìë£ ë¡ë ìë£: ${s.filename}`)}catch{B.o.error("íì¼ ì
ë¡ëì ì¤í¨íìµëë¤.")}finally{e_.current=!1,tA(!1)}},[eD,ew,T]),eP=(0,s.useCallback)(async e=>{let t=e.target.files?.[0];t&&(e.target.value="",await eq(t))},[eq]),[eT,eO]=(0,s.useState)(!1),eK=(0,s.useRef)(0),eL=(0,s.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),eK.current+=1,e.dataTransfer.types.includes("Files")&&eO(!0)},[]),ez=(0,s.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),eK.current-=1,0===eK.current&&eO(!1)},[]),eE=(0,s.useCallback)(e=>{e.preventDefault(),e.stopPropagation()},[]),eF=(0,s.useCallback)(async e=>{e.preventDefault(),e.stopPropagation(),eO(!1),eK.current=0;let t=e.dataTransfer.files?.[0];t&&await eq(t)}
17,[eq]),[eB,eH]=(0,s.useState)([{kind:"text",id:"welcome",role:"assistant",content:`ìë íì¸ì! ${O} ìì±ì ëìë릴 AI ëì°ë¯¸ì ëë¤. 18 19ë¹ ë¥¸ ìì± ëì°ë¯¸ë¥¼ ì¬ì©íê±°ë, ìíìë ë´ì©ì ì§ì ì ë ¥í´ì£¼ì¸ì. 20 21**ð¡ Tip**: ë¹ ë¥¸ ìì±ì AI ì¸í°ë·°ë ë¹ ë¥¸ ìì±ì¼ë¡ ì´ìì ìì±í í ì¬ì©íë©´ ëì± í¨ê³¼ì ì ëë¤.`,timestamp:new Date}]),eR=(0,s.useRef)(ek);(0,s.useEffect)(()=>{eR.current=ek},[ek]),(0,s.useEffect)(()=>{eR.current?.(function(e){let t=e.map(Q).filter(e=>!!e).slice(-12),i=[],a=12e3;for(let e=t.length-1;e>=0&&a>0;e-=1){let l=t[e],s=l.content.trim().slice(0,a);s&&(i.unshift({role:l.role,content:s}),a-=s.length)}return i}(eB))},[eB]);let[eW,eV]=(0,s.useState)(""),[eX,eG]=(0,s.useState)(!1),[eU,eJ]=(0,s.useState)(null),[eZ,eQ]=(0,s.useState)(!0),[eY,e0]=(0,s.useState)(!1),[e1,e2]=(0,s.useState)(!0),[e3,e5]=(0,s.useState)(null),[e4,e6]=(0,s.useState)(!1),[e8,e9]=(0,s.useState)(!1),[e7,te]=(0,s.useState)(!1),[tt,ti]=(0,s.useState)(!1),ta=(0,s.useRef)(null),[tl,ts]=(0,s.useState)({}),[tr,tn]=(0,s.useState)({}
21),[to,td]=(0,s.useState)(new Set),[tc,tu]=(0,s.useState)(null),[tm,tp]=(0,s.useState)(!1),[th,tg]=(0,s.useState)(new Set),[tf,tb]=(0,s.useState)(null),[tx,ty]=(0,s.useState)(null),[tv,tw]=(0,s.useState)(null),tj=(0,s.useCallback)(e=>{tw(e??"gallery")},[]),[tk,tN]=(0,s.useState)({}),t$=(0,s.useRef)(null),tI=(0,s.useRef)(null),t_=(0,s.useRef)(null),[tC,tA]=(0,s.useState)(!1),tS=(0,s.useRef)({messageCount:1,hadLoading:!1}),tD=(0,s.useMemo)(()=>tc?(0,H.t1)(Z[tc]):null,[tc]);(0,s.useEffect)(()=>{eN&&(eV(eN.text.slice(0,500)),eQ(!1),window.requestAnimationFrame(()=>tI.current?.focus()))},[eN]);let tM=(0,s.useCallback)((e,t="chat",i="chat",a)=>{if(e?.code==="owner_quota_exceeded")return e9(!0===e.ownerNotified),e6(!0),null;let l=(0,q._)(e,{programId:T??null,programName:O??null,source:"ai_chat",mode:i,retryLabel:a?"ë¤ì ìì²í기":void 0},t);return ta.current=a??null,ti(!!a),e5(l),l},[T,O]),tq=async()=>{if(K&&!e7&&!e8){te(!0);try{let e=await eM();(await fetch(`/api/collab/documents/${encodeURIComponent(K)}/ai-quota-alert`,{method:"POST",headers:e})).ok&&e9(!0)}catch{}finally{te(!1)}}},tP=(0,s.useCallback)(()=>{e6(!1)},[]),tT=(0,s.useCallback)(()=>{let e=ta.current;ta.current=null,ti(!1),e?.()},[]),tO=e=>{let t="number"==typeof e?.generationLimitPerDay?e.generationLimitPerDay:1,i="number"==typeof e?.chatLimitPerDay?e.chatLimitPerDay:3,a="number"==typeof e?.interviewCount?e.interviewCount:0,l="number"==typeof e?.quickCount?e.quickCount:0,s="number"==typeof e?.chatCount?e.chatCount:0,r=` 22(ìì±: ${a+l}/${t}, AI ëì°ë¯¸: ${s}/${i})`;eH(e=>[...e,{kind:"text",id:tz(),role:"assistant",content:`ì¼ì¼íë ì íì¼ë¡ ìì±ì´ ì¤ë¨ëììµëë¤.${r}`,timestamp:new Date}])},tK=()=>{let e=t$.current;return e?e.querySelector("[data-radix-scroll-area-viewport]"):null},tL=async()=>{if(eo&&ec){e0(!0);try{let e=await eM(),t=await fetch("/api/generate-section",{method:"POST",headers:e,body:JSON.stringify({programId:T,programName:O,...K?{documentId:K}:{},sectionId:eo.id,sectionTitle:eo.title,subsectionId:eo.subsectionId,subsectionTitle:eo.subsectionTitle,interviewData:ed||{},existingContent:tF()})});if(!t.ok){let e=await t.json().catch(()=>null);if(401===t.status)return void eH(e=>[...e,{kind:"text",id:tz(),role:"assistant",content:"ë¡ê·¸ì¸ì´ íìí©ëë¤.",timestamp:new Date}]);if(429===t.status){let t=tM(e,"chat","chat",()=>{tL()});t&&tO({generationLimitPerDay:t.generationLimitPerDay,chatLimitPerDay:t.chatLimitPerDay,interviewCount:t.interviewCount,quickCount:t.quickCount,chatCount:t.chatCount});return}throw Error("Generation failed")}let i=await t.json();ec(eo.id,i.content);let a={kind:"text",id:tz(),role:"assistant",content:`"${eo.title}" ì¹ì ë´ì©ì ìì±íìµëë¤: 23 24${i.content}`,timestamp:new Date};eH(e=>[...e,a])}catch(t){console.error(t);let e={kind:"text",id:tz(),role:"assistant",content:"ì¹ì ìì± ì¤ ì¤ë¥ê° ë°ìíìµëë¤. ë¤ì ìëí´ì£¼ì¸ì.",timestamp:new Date};eH(t=>[...t,e])}finally{e0(!1)}}};(0,s.useEffect)(()=>{if(!e1)return;let e=tS.current,t=eB.length,i=t>e.messageCount;requestAnimationFrame(()=>((e="auto")=>{let t=tK();if(!t)return;let i=t.scrollHeight;try{t.scrollTo({top:i,behavior:e})}catch{t.scrollTop=i}})(i?"smooth":"auto")),tS.current={messageCount:t,hadLoading:eX}},[eB.length,eX,e1]),(0,s.useEffect)(()=>{if(!e)return;let t=tK();if(!t)return;let i=()=>{e2(t.scrollHeight-t.scrollTop-t.clientHeight<=48)};return t.addEventListener("scroll",i,{passive:!0}),i(),()=>{t.removeEventListener("scroll",i)}},[e]),(0,s.useEffect)(()=>{e&&tI.current&&tI.current.focus()},[e]);let tz=()=>Math.random().toString(36).substr(2,9),tE="modoo-general-track-2026"===T?et:"modoo-regional-audition-2026"===T?ee:"growth-tourism-venture"===T?el:"initial"===T?ei:"growth"===T?ea:"retry"===T?er:"retry-2026"===T?en:"youth-2026"===T||"youth-2025"===T?es:Y,tF=(e=[])=>{let t=L||"";if(!t)return"";try{let i=new DOMParser().parseFromString(t,"text/html"),a=new Set(e),l=Array.from(i.querySelectorAll("[data-field]")),s=new Set,r=[];return l.forEach(e=>{let t,i,l,n=e.getAttribute("data-field")||"";if(!n||a.has(n)||s.has(n))return;s.add(n);let o=(e.closest("tr")?.querySelector("th")?.textContent||"").replace(/\s+/g," ").trim()||tB(n),d=(t=(e.getAttribute("data-field-type")||"").toLowerCase(),i=(e.textContent||"").replace(/\u00A0/g," ").replace(/\s+\n/g,"\n").trim(),"richtext"===t?i.slice(0,800).trim():i);if(!(l=d.trim())||l.length<=2||l.includes("â»")||l.includes("ì:")||/(^|\s)OO+(\s|$)/.test(l)||/â|â |\*{2,}/.test(l)||/OO\.OO\.OO|00\.00\.00|00\.0|00ë |00ì|00ì¼/.test(l)||/^(â¡|ã |-)\s*$/.test(l))return;let c=d.length>220?`${d.slice(0,220)}â¦`:d;r.push(`- ${o}: ${c}`)}),r.join("\n").slice(0,2200)}catch(e){return console.error("buildMeaningfulContext failed:",e),""}},tB=e=>{let t=e.match(/^schedule-(\d+)-(.+)$/);if(t){let e=t[1],i=t[2];return`ì¬ì ì¶ì§ ì¼ì ${e}
24 - ${"task"===i?"ì¶ì§ë´ì©":"period"===i?"기ê°":"detail"===i?"ì¸ë¶ ë´ì©":i}`}let i=e.match(/^schedule-full-(\d+)-(.+)$/);if(i){let e=i[1],t=i[2];return`ì ì²´ ì¼ì ${e} - ${"task"===t?"ì¶ì§ë´ì©":"period"===t?"기ê°":"detail"===t?"ì¸ë¶ ë´ì©":t}`}let a=e.match(/^budget(\d)-row-(\d+)-(.+)$/);if(a){let e=a[1],t=a[2],i=a[3];return`ìì°(ë¨ê³${e}) ${t}í - ${"item"===i?"ë¹ëª©":"basis"===i?"ì°ì¶ê·¼ê±°":"amount"===i?"ê¸ì¡":i}`}let l=e.match(/^team-(\d+)-(.+)$/);if(l){let e=l[1],t=l[2];return`í êµ¬ì± ${e} - ${"position"===t?"ì§ì":"role"===t?"ë´ë¹ ì
무":"capability"===t?"ë³´ì ìë":"status"===t?"êµ¬ì± ìí":t}`}return e.endsWith("-content")?"본문":e},tH=e=>{let t=(e||"").trim();if(!t)return"";if(!(t.startsWith("<")&&t.endsWith(">")))return t;try{return(new DOMParser().parseFromString(t,"text/html").body.textContent||"").replace(/\u00A0/g," ").replace(/\s+/g," ").trim()}catch{return t}},tR=e=>{let t=[],i={},a={},l=new Set;return e.sectionKeys.forEach(e=>{let s=(e=>{let t=L||"";if(!t)return{fieldIds:[],fieldDefs:[],labelMap:{},checkboxOptionsByFieldId:{}};try{let i=new DOMParser().parseFromString(t,"text/html").querySelector(`div[data-section="${e}"]`);if(!i)return{fieldIds:[],fieldDefs:[],labelMap:{},checkboxOptionsByFieldId:{}};let a=new Set,l=[],s={},r={};return Array.from(i.querySelectorAll("[data-field]")).forEach(e=>{let t,i=e.getAttribute("data-field")||"";if(!i||a.has(i))return;a.add(i);let n=(t=(e.getAttribute("data-field-type")||"").toLowerCase(),"richtext"===t?"richtext":"select"===t?"select":"image"===t?"image":"table-row"===t?"table-row":"textarea"===t?"textarea":"text");l.push({fieldId:i,fieldType:n});let o=(e=>{let t=e.closest("td,th"),i=t?.closest("tr");if(!t||!i)return"";let a=Array.from(i.children),l=a.indexOf(t);if(l<=0)return"";for(let e=l-1;e>=0;e--){let t=a[e];if("TH"===t.tagName){let e=(t.textContent||"").replace(/\s+/g," ").trim();if(e)return e}}return""})(e);s[i]=o||tB(i);let d=(e=>{let t=e.replace(/\u00A0/g," ").replace(/\s+/g," ").trim();if(!t.includes("â")&&!t.includes("â"))return[];let i=/[ââ]\s*([^ââ]+)/g,a=[],l=null;for(;l=i.exec(t);){let e=(l[1]||"").replace(/\s+/g," ").trim();if(!e)continue;let t=e.replace(/( |·|\||,)+$/g,"").trim();t&&!a.includes(t)&&a.push(t)}return a})(e.textContent||"");d.length>=2&&(r[i]=d)}),{fieldIds:l.map(e=>e.fieldId),fieldDefs:l,labelMap:s,checkboxOptionsByFieldId:r}}catch(e){return console.error("collectSectionFields failed:",e),{fieldIds:[],fieldDefs:[],labelMap:{},checkboxOptionsByFieldId:{}}}})(e);s.fieldDefs.forEach(e=>{l.has(e.fieldId)||(l.add(e.fieldId),t.push(e))}),Object.entries(s.labelMap).forEach(([e,t])=>{i[e]||(i[e]=t)}),Object.entries(s.checkboxOptionsByFieldId).forEach(([e,t])=>{!a[e]&&Array.isArray(t)&&t.length>0&&(a[e]=t)})}),(Array.isArray(e.fieldIds)?e.fieldIds:[]).forEach(e=>{e&&!l.has(e)&&(l.add(e),t.push({fieldId:e,fieldType:e.endsWith("-content")?"richtext":e.startsWith("image-")?"image":"text"}),i[e]||(i[e]=tB(e)))}),{fieldIds:t.map(e=>e.fieldId),fieldDefs:t,labelMap:i,checkboxOptionsByFieldId:a}},tW=(e,t)=>{let i=L||"";if(!i)return{};try{let a=new DOMParser().parseFromString(i,"text/html"),l=new Map;t.forEach(e=>l.set(e.fieldId,e.fieldType));let s=e=>e.replace(/\u00A0/g," ").replace(/[ \t]+\n/g,"\n").trim(),r={};return e.forEach(e=>{r[e]=(e=>{let t=a.querySelector(`[data-field="${e}"]`);if(!t)return"";let i=String(l.get(e)||"");if("richtext"===i){let e=[];return t.querySelectorAll("p").forEach(t=>{let i=t.getAttribute("class")||"",a=(t.textContent||"").replace(/\s+/g," ").trim();a&&(i.includes("bullet-top")?e.push(`â¡ ${a.replace(/^â¡\s*/,"")}`):i.includes("bullet-mid")?e.push(`ã
${a.replace(/^ã
\s*/,"")}`):i.includes("bullet-sub")?e.push(`- ${a.replace(/^-?\s*/,"")}`):e.push(a))}),s(e.join("\n"))}return s(t.textContent||"")})(e)}),r}catch(e){return console.error("extractBeforeMap failed:",e),{}}},tV=async e=>{let t=e||eW,i=t.trim();if(!i)return;if(i.length>500)return void eV(i.slice(0,500));e2(!0);let a=eB.filter(e=>"text"===e.kind).slice(-6).map(e=>({role:e.role,content:e.content})),l={kind:"text",id:tz(),role:"user",content:t,timestamp:new Date};eH(e=>[...e,l]),eV(""),eG(!0),eQ(!1);let s=ev.find(e=>e.requestId)?.requestId;ev.length>0&&(ej?.(ev),ew?.([]),eI.current=null);try{let e=await eM(),i=!!(ep?.preview&&ep.preview.trim().length>0);T&&(0,P.dA)(T,t.length,i);let l=await fetch("/api/chat",{method:"POST",headers:e,body:JSON.stringify({programName:O,programId:T,...K?{documentId:K}:{},message:t,context:tF(),history:a,mode:i?"selection":"plain",selectionContext:i?ep:null,...eS?{referenceText:eS}:{},...s?{requestId:s}:{}})});if(!l.ok){let e=await l.json().catch(()=>null);if(401===l.status)return void eH(e=>[...e,{kind:"text",id:tz(),role:"assistant",content:"ë¡ê·¸ì¸ì´ íìí©ëë¤.",timestamp:new Date}]);if(429===l.status){let t=tM(e,"chat");t&&tO({generationLimitPerDay:t.generationLimitPerDay,chatLimitPerDay:t.chatLimitPerDay,interviewCount:t.interviewCount,quickCount:t.quickCount,chatCount:t.chatCount});return}throw Error("Failed")}let r=await l.json();if(r?.mode==="table_structure"){let e="string"==typeof r.html&&r.html.trim().length>0,t=Array.isArray(r.rows)&&r.rows.length>0;if(e||t)return void eH(t=>[...t,{kind:"table_structure",id:tz(),role:"assistant",rows:r.rows??[],html:e?r.html.trim():void 0,timestamp:new Date}])}if(r?.mode==="table_cells"&&Array.isArray(r.cells)&&r.cells.length>0)return void eH(e=>[...e,{kind:"cell_results",id:tz(),role:"assistant",cells:r.cells,timestamp:new Date}]);if(Array.isArray(r?.blocks)&&r.blocks.length>0){let e=r.blocks.filter(e=>!!e&&"object"==typeof e).map(e=>({id:"string"==typeof e.id?e.id:tz(),label:"string"==typeof e.label?e.label:"ë¸ë¡",content:"string"==typeof e.content?e.content:""})).filter(e=>e.content.trim().length>0),t={kind:"blocks",id:tz(),role:"assistant",title:i?"ì í ìì ìì ì ì":"ì¶ì² ê²°ê³¼",blocks:e,timestamp:new Date};eH(e=>[...e,t])}else if(r?.mode==="infographic"&&"string"==typeof r.html){let e={kind:"infographic",id:tz(),role:"assistant",html:r.html,timestamp:new Date};eH(t=>[...t,e])}else{let e={kind:"text",id:tz(),role:"assistant",content:String(r?.content||""),timestamp:new Date};eH(t=>[...t,e])}}catch(t){console.error(t);let e={kind:"text",id:tz(),role:"assistant",content:"ì£ì¡í©ëë¤. ì¤ë¥ê° ë°ìíìµëë¤. ë¤ì ìëí´ì£¼ì¸ì.",timestamp:new Date};eH(t=>[...t,e])}finally{eG(!1)}};function tX(e,t){let i=function(e){try{let t=document.createElement("div");t.innerHTML=e;let i=t.querySelector("[data-infographic-config]");if(!i)return null;let a=i.getAttribute("data-infographic-config");if(!a)return null;return(0,R.Mb)(a)}catch{return null}}(e.html);
24if(!i)return;let a=t.currentTarget.getBoundingClientRect();tb(e.id),ty({config:i,rect:a,availableWidth:Math.max(560,Math.round(a.width||560)),from:0,to:0})}let tG=(0,s.useCallback)(e=>{tf&&eH(t=>t.map(t=>t.id===tf&&"infographic"===t.kind?{...t,html:e}:t))},[tf]),tU=async e=>{let t=U[e];tu(null),tp(!1);let i={kind:"text",id:tz(),role:"user",content:`${t} ìê°í ìë£ë¥¼ ìì±í´ì£¼ì¸ì.`,timestamp:new Date};eH(e=>[...e,i]),eG(!0),eQ(!1);try{let i=await eM(),a=await fetch("/api/chat",{method:"POST",headers:i,body:JSON.stringify({programName:O,programId:T,...K?{documentId:K}:{},message:`${t} ìê°í`,context:tF(),history:[],infographicType:e,...eS?{referenceText:eS}:{},...ev.find(e=>e.requestId)?.requestId?{requestId:ev.find(e=>e.requestId)?.requestId}:{}})});if(!a.ok){if(401===a.status)return void eH(e=>[...e,{kind:"text",id:tz(),role:"assistant",content:"ë¡ê·¸ì¸ì´ íìí©ëë¤.",timestamp:new Date}]);if(429===a.status){let t=await a.json().catch(()=>null);tM(t?.quotaData??t,"chat","chat",()=>{tU(e)});return}throw Error("API ì¤ë¥")}let l=await a.json();if(l?.mode==="infographic"&&"string"==typeof l.html)eH(e=>[...e,{kind:"infographic",id:tz(),role:"assistant",html:l.html,timestamp:new Date}]);else throw Error("ì¸í¬ê·¸ëí½ ìì± ì¤í¨")}catch{eH(e=>[...e,{kind:"text",id:tz(),role:"assistant",content:"ìê°í ìë£ ìì± ì¤ ì¤ë¥ê° ë°ìíìµëë¤. ë¤ì ìëí´ì£¼ì¸ì.",timestamp:new Date}])}finally{eG(!1)}},tJ=async(e,t)=>{await navigator.clipboard.writeText(e),eJ(t),setTimeout(()=>eJ(null),2e3)},tZ=(0,s.useMemo)(()=>{if(!ep||"table"!==ep.kind||!ep.cells?.length)return null;let e=new Map;ep.cells.forEach(t=>{let i=e.get(t.row)||[];i.push({col:t.col,text:t.text,isHeader:t.isHeader}),e.set(t.row,i)});let t=Array.from(e.keys()).sort((e,t)=>e-t).map(t=>(e.get(t)||[]).sort((e,t)=>e.col-t.col)),i=Math.min(...ep.cells.map(e=>e.col)),a=t.map(e=>e.map(e=>e.text||"").join(" ").trimEnd()).join("\n").trim(),l=t.flatMap(e=>e.map(e=>e.text||"").filter(Boolean)).join("\n").trim(),s=t.map(e=>{let t=e[0],a=e[1];return t&&a&&t.text&&a.text&&(t.isHeader||t.col===i)?`${t.text}: ${a.text}`:null}).filter(Boolean);return{tsv:a,values:l,pairs:s.join("\n").trim(),isPairable:s.length>0&&s.length===t.length,hasValues:!!l,hasTable:!!a}},[ep]),tQ=async e=>{if(eX)return;e2(!0);let{fieldIds:t,fieldDefs:i,labelMap:a,checkboxOptionsByFieldId:l}=tR(e),s=tW(t,i);if(!t||0===t.length)return void eH(e=>[...e,{kind:"text",id:tz(),role:"assistant",content:"í´ë¹ ì¹ì ìì ì±ì¸ íë를 ì°¾ì§ ëª»íìµëë¤. (data-section/data-field íì¸ íì)",timestamp:new Date}]);let r=`quick_${tz()}`,n=`optA_${tz()}`,o=`optB_${tz()}`,d={kind:"quick_options",id:r,role:"assistant",title:`${e.label} (2ê°ì§ ìµì )`,options:[{id:n,title:"ìµì A",content:"ìì± ì¤...",applied:!1},{id:o,title:"ìµì B",content:"ìì± ì¤...",applied:!1}],timestamp:new Date};eH(t=>[...t,{kind:"text",id:tz(),role:"user",content:`ë¹ ë¥¸ ìì±: ${e.label}`,timestamp:new Date},d]),eG(!0),eQ(!1);try{let d=await eM(),c=await fetch("/api/quick-fill",{method:"POST",headers:d,body:JSON.stringify({programId:T,programName:O,...K?{documentId:K}:{},sectionKey:e.sectionKeys.join("+"),sectionLabel:e.label,variants:["A","B"],fieldIds:t,fieldDefs:i,checkboxOptionsByFieldId:l,existingContent:tF(t),selectedPreview:ep?.preview||"",...eS?{referenceText:eS}:{}})}),u=await c.json().catch(()=>({}));if(!c.ok){if(401===c.status){eH(e=>e.map(e=>"quick_options"!==e.kind||e.id!==r?e:{...e,options:[{id:n,title:"ìµì A",content:"ë¡ê·¸ì¸ì´ íìí©ëë¤.",applied:!1},{id:o,title:"ìµì B",content:"ë¡ê·¸ì¸ì´ íìí©ëë¤.",applied:!1}]})),eH(e=>[...e,{kind:"text",id:tz(),role:"assistant",content:"ë¡ê·¸ì¸ì´ íìí©ëë¤.",timestamp:new Date}]);return}if(429===c.status){let t=tM(u,"chat","chat",()=>{tQ(e)});eH(e=>e.map(e=>"quick_options"!==e.kind||e.id!==r?e:{...e,options:[{id:n,title:"ìµì A",content:"ì¼ì¼íë ì íì¼ë¡ ìì±ì´ ì¤ë¨ëììµëë¤.",applied:!1},{id:o,title:"ìµì B",content:"ì¼ì¼íë ì íì¼ë¡ ìì±ì´ ì¤ë¨ëììµëë¤.",applied:!1}]})),t&&tO({generationLimitPerDay:t.generationLimitPerDay,chatLimitPerDay:t.chatLimitPerDay,interviewCount:t.interviewCount,quickCount:t.quickCount,chatCount:t.chatCount});return}if(500===c.status&&"string"==typeof u.hint){let e=u.hint;eH(t=>t.map(t=>"quick_options"!==t.kind||t.id!==r?t:{...t,options:[{id:n,title:"ìµì A",content:e,applied:!1},{id:o,title:"ìµì B",content:e,applied:!1}]})),eH(t=>[...t,{kind:"text",id:tz(),role:"assistant",content:e,timestamp:new Date}]);return}let t="string"==typeof u?.error?u.error:"ì¤ë¥ê° ë°ìíìµëë¤. ë¤ì ìëí´ì£¼ì¸ì.";throw Error(t)}let m=u?.fieldMapByVariant?.A||u?.fieldMap||{},p=u?.fieldMapByVariant?.B||{},h=e=>{let i=t.filter(t=>"string"==typeof e[t]&&e[t].trim().length>0),l=i.map(t=>({id:t,v:e[t]})).slice(0,10).map(e=>`- ${a[e.id]||tB(e.id)}: ${e.v.slice(0,80)}`).join("\n"),s=`ì´ ${t.length}ê° ì¤ ${i.length}ê° ì±ì`;return`${s} 25${l||"(ìì±ë ë´ì©ì´ ë¹ì´ ììµëë¤)"}`},g=h(m),f=h(p);eH(e=>e.map(e=>"quick_options"!==e.kind||e.id!==r?e:{...e,options:[{id:n,title:"ìµì A",content:g||"(ë´ì© ìì)",fieldMap:m,fieldDefs:i,labelMap:a,beforeMap:s,applied:!1},{id:o,title:"ìµì B",content:f||"(ë´ì© ìì)",fieldMap:p,fieldDefs:i,labelMap:a,beforeMap:s,applied:!1}]}))}catch(t){console.error(t);let e=t instanceof Error&&t.message?t.message:"ì¤ë¥ê° ë°ìíìµëë¤. ë¤ì ìëí´ì£¼ì¸ì.";eH(t=>t.map(t=>"quick_options"!==t.kind||t.id!==r?t:{...t,options:[{id:n,title:"ìµì A",content:e,applied:!1},{id:o,title:"ìµì B",content:e,applied:!1}]}))}finally{eG(!1)}},tY=(0,s.useMemo)(()=>({programName:O||"",programId:T,quickActions:tE,collectFieldsForAction:tR,extractBeforeMap:tW,buildAuthHeaders:eM,buildMeaningfulContext:tF,deriveLabelFromFieldId:tB}),[O,T,tE,L]),t0=(e,t,i,a)=>{eH(l=>l.map(l=>"quick_options"!==l.kind||l.id!==e?l:{...l,options:[{id:t,title:i,content:a,applied:!1},{id:`${t}_placeholder`,title:"ì°¸ê³ ",content:a,applied:!1}]}))},t1=async e=>{var t;let i;if(eX)return;e2(!0);let a=e.issues.filter(e=>"data_needed"===e.type),l=e.issues.filter(e=>"improve"===e.type);if(a.length>0){let t={kind:"data_questions",id:`dq_${tz()}`,role:"assistant",questions:a.map(e=>({issue:e.issue,question:e.question||e.issue})),_pendingImproveIssues:l,_allSections:e.allSections,answered:!1,timestamp:new Date};eH(i=>[...i,{kind:"text",id:tz(),role:"user",content:`[í©ê²© ê°ë¥ì± ë¶ì > ì ë³´ ë³´ì ìì²] 26ì´ì: ${e.issues.map(e=>e.issue).join(", ")}`,timestamp:new Date},t]);return}let s=`improve_${tz()}`,r=`imp_${tz()}`,n=(t=e.allSections,i=new Set((e.issues||[]).map(e=>e.sectionId).filter(e=>!!e)),t.filter(e=>e.score/e.maxScore<.8||i.has(e.sectionId)).map(e=>e.sectionName).join(", "));eH(t=>[...t,{kind:"text",id:tz(),role:"user",content:[`[í©ê²© ê°ë¥ì± ë¶ì > ê°ì ìì²]`,`ê°ì ëì: ${n||"ì ì²´"}`,"",...e.issues.filter(e=>"improve"===e.type).map((e,t)=>{let i="functional"===e.subtype?"\uD83D\uDD27 ë¨ì ìì ":"⨠ë´ì© ë³´ê°",a=[`${t+1}. [${i}] ${e.issue}`];return e.fieldHint&&a.push(` ð ëì íë: ${e.fieldHint}`),e.snippet&&a.push(` ð ì문: "${e.snippet}"`),a.join("\n")}),...e.issues.some(e=>"data_needed"===e.type)?["",`ð ì ë³´ ë³´ì íì:`,...e.issues.filter(e=>"data_needed"===e.type).map((e,t)=>`${t+1}. ${e.issue}`)]:[]].join("\n"),timestamp:new Date},{kind:"quick_options",id:s,role:"assistant",title:"í©ê²© ê°ë¥ì± ê°ì ì",options:[{id:r,title:"ê°ì ì",content:"ìì± ì¤...",applied:!1},{id:`${r}_placeholder`,title:"ì°¸ê³ ",content:"í©ê²© ê°ë¥ì± ë¶ì 결과를 ë°íì¼ë¡ ê°ì ìì ìì±í©ëë¤.",applied:!1}],timestamp:new Date}]),eG(!0),eQ(!1);try{let t=await z(e,tY);if("no_fields"===t.type)return void eH(e=>e.filter(e=>e.id!==s).concat({kind:"text",id:tz(),role:"assistant",content:"ê°ì ìì²ì í´ë¹íë íë를 ì°¾ì§ ëª»íìµëë¤. ë¤ë¥¸ ì¹ì ì 먼ì ìì±í´ì£¼ì¸ì.",timestamp:new Date}));if("auth_error"===t.type)return void t0(s,r,"ê°ì ì","ë¡ê·¸ì¸ì´ íìí©ëë¤.");if("quota_error"===t.type){let i=tM(t.data,t.data.exceeded,"chat",()=>{t1(e)});t0(s,r,"ê°ì ì","ì¼ì¼íë ì íì¼ë¡ ìì±ì´ ì¤ë¨ëììµëë¤."),i&&tO({generationLimitPerDay:i.generationLimitPerDay,chatLimitPerDay:i.chatLimitPerDay,interviewCount:i.interviewCount,quickCount:i.quickCount,chatCount:i.chatCount});return}if("error"===t.type)throw Error(t.message);Object.keys(t.fieldMap).length>0?eH(i=>i.map(i=>"quick_options"!==i.kind||i.id!==s?i:{...i,options:[{id:r,title:"ê°ì ì",content:t.summary||"(ë´ì© ìì)",fieldMap:t.fieldMap,fieldDefs:t.fieldDefs,labelMap:t.labelMap,beforeMap:t.beforeMap,changeReasons:t.changeReasons,fieldModes:t.fieldModes,applied:!1,improvementMeta:{sections:t.sections}},{id:`${r}_placeholder`,title:"ê°ì ìì½",content:`ê°ì ëì: ${n||"ì ì²´"} 27ì´ì: ${e.issues.map(e=>e.issue).join(", ")}`,applied:!1}]})):eH(e=>[...e.filter(e=>"quick_options"!==e.kind||e.id!==s),{kind:"text",id:tz(),role:"assistant",content:t.summary||"ê°ì í ì ìë íëª©ì´ ììµëë¤. 문ì ë´ì©ì íì¸í í ë¤ì ìëí´ì£¼ì¸ì.",timestamp:new Date}])}catch(e){console.error(e),t0(s,r,"ê°ì ì",e instanceof Error&&e.message?e.message:"ì¤ë¥ê° ë°ìíìµëë¤. ë¤ì ìëí´ì£¼ì¸ì.")}finally{eG(!1)}},t2=async(e,t)=>{if(eX)return;e2(!0);let i=`datasup_${tz()}`,a=`ds_${tz()}`;eH(e=>[...e,{kind:"text",id:tz(),role:"user",content:`[ì¶ê° ì ë³´ ë°ì] 28 29${t}`,timestamp:new Date},{kind:"quick_options",id:i,role:"assistant",title:"ì¶ê° ì ë³´ ë°ì ê²°ê³¼",options:[{id:a,title:"ë³´ìì",content:"ìì± ì¤...",applied:!1},{id:`${a}_placeholder`,title:"ì°¸ê³ ",content:"ëµë³ ë´ì©ì ë°íì¼ë¡ ê´ë ¨ íëë§ ë³´ìí©ëë¤.",applied:!1}],timestamp:new Date}]),eG(!0),eQ(!1);try{let l=await E({questions:e,userAnswersText:t},tY);if("no_fields"===l.type)return void eH(e=>e.filter(e=>e.id!==i).concat({kind:"text",id:tz(),role:"assistant",content:"ë³´ìì í´ë¹íë íë를 ì°¾ì§ ëª»íìµëë¤.",timestamp:new Date}));if("auth_error"===l.type)return void t0(i,a,"ë³´ìì","ë¡ê·¸ì¸ì´ íìí©ëë¤.");if("quota_error"===l.type){let s=tM(l.data,l.data.exceeded,"chat",()=>{t2(e,t)});t0(i,a,"ë³´ìì","ì¼ì¼íë ì íì¼ë¡ ìì±ì´ ì¤ë¨ëììµëë¤."),s&&tO({generationLimitPerDay:s.generationLimitPerDay,chatLimitPerDay:s.chatLimitPerDay,interviewCount:s.interviewCount,quickCount:s.quickCount,chatCount:s.chatCount});return}if("error"===l.type)throw Error(l.message);eH(e=>e.map(e=>"quick_options"!==e.kind||e.id!==i?e:{...e,options:[{id:a,title:"ë³´ìì",content:l.summary||"(ë³ê²½ ìì)",fieldMap:l.fieldMap,fieldDefs:l.fieldDefs,labelMap:l.labelMap,beforeMap:l.beforeMap,applied:!1},{id:`${a}_placeholder`,title:"ë³´ì ìì½",content:`ëµë³ ê¸°ë° ${l.changedCount}ê° íë ë³´ì 30${l.questions.map(e=>`⢠${e.issue}`).join("\n")}`,applied:!1}]}))}catch(e){console.error(e),t0(i,a,"ë³´ìì",e instanceof Error&&e.message?e.message:"ì¤ë¥ê° ë°ìíìµëë¤. ë¤ì ìëí´ì£¼ì¸ì.")}finally{eG(!1)}};(0,s.useEffect)(()=>{eg&&!eX&&(t1(eg),ef?.())},[eg]);let t3="dock"===eu;return e?(0,a.jsx)(I.N,{children:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(A.X,{data:e3,onClose:()=>{e5(null),eH(e=>e.map(e=>{if("quick_options"!==e.kind||!e.options.some(e=>"ìì± ì¤..."===e.content))return e;let t=e.options.map(e=>"ìì± ì¤..."===e.content?{...e,content:"ì¼ì¼íë ì íì¼ë¡ ìì±ì´ ì¤ë¨ëììµëë¤.",applied:!1}:e);return{...e,options:t}}))},onRetry:tt?tT:void 0}),(0,a.jsx)(S.c,{open:e4,onClose:tP,context:"owner_quota",programId:T??null,programName:O,onNotifyOwner:K?()=>void tq():void 0,ownerNotified:e8,notifyOwnerPending:e7}),tx&&(0,a.jsx)(V.H,{active:tx,onClose:()=>{ty(null),tb(null)},onChange:tG},`${tf??"chat"}-${tx.availableWidth??"auto"}`),null!==tv&&(0,a.jsx)(G,{onClose:()=>tw(null),onInsertHtml:i,initialType:"gallery"===tv?void 0:tv}),tm&&tc&&tD&&(0,a.jsx)("div",{className:"fixed inset-0 z-[70] flex items-center justify-center bg-black/40 px-4 py-6",children:(0,a.jsxs)("div",{className:"flex max-h-[calc(100vh-48px)] w-[min(960px,calc(100vw-32px))] flex-col overflow-hidden rounded-3xl bg-white shadow-2xl",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-4 border-b border-gray-100 px-5 py-4",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("p",{className:"text-base font-semibold text-gray-900",children:[U[tc]," 미리보기"]}),(0,a.jsx)("p",{className:"mt-1 text-xs text-gray-500",children:"ì¤ì ë´ì©ì íì¬ ë¬¸ìì ìì²ì ë§ì¶° ë°ëëë¤."})]}),(0,a.jsx)("button",{type:"button",onClick:()=>tp(!1),className:"rounded-full p-1 text-gray-400 transition-colors hover:bg-gray-100 hover:text-gray-700","aria-label":"미리보기 ë«ê¸°",children:(0,a.jsx)(r.A,{className:"h-5 w-5"})})]}),(0,a.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto overflow-x-hidden bg-gray-50 p-5",children:(0,a.jsx)("div",{className:"mx-auto w-full max-w-[680px] rounded-2xl bg-white p-4 shadow-sm",children:(0,a.jsx)("div",{className:"infographic-chat-preview-surface w-full overflow-hidden",dangerouslySetInnerHTML:{__html:F.default.sanitize(tD,J)}})})}),(0,a.jsxs)("div",{className:"flex items-center justify-end gap-2 border-t border-gray-100 px-5 py-4",children:[(0,a.jsx)(j.$,{type:"button",variant:"outline",onClick:()=>tp(!1),children:"ë«ê¸°"}),(0,a.jsx)(j.$,{type:"button",disabled:eX,onClick:()=>void tU(tc),className:"bg-indigo-600 text-white hover:bg-indigo-700",children:"ì´ íìì¼ë¡ ìì±"})]})]})}),t3?null:(0,a.jsx)(_.P.div,{initial:{opacity:0}
30,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 bg-black/20 z-40 lg:hidden",onClick:t}),(0,a.jsxs)(_.P.div,{initial:t3?{x:0,opacity:1}:{x:"100%",opacity:0},animate:{x:0,opacity:1},exit:t3?{x:0,opacity:0}:{x:"100%",opacity:0},transition:{type:"spring",damping:25,stiffness:200},className:t3?"relative h-full w-full bg-white flex flex-col min-h-0 border-l border-gray-100":"relative fixed top-0 right-0 h-full w-full sm:w-[520px] bg-white shadow-xl z-50 flex flex-col min-h-0 border-l border-gray-200",onDragEnter:eL,onDragLeave:ez,onDragOver:eE,onDrop:eF,children:[eT&&(0,a.jsx)("div",{className:"absolute inset-0 z-50 flex items-center justify-center bg-blue-50/90 border-2 border-dashed border-blue-400 rounded-lg pointer-events-none",children:(0,a.jsxs)("div",{className:"flex flex-col items-center gap-2 text-blue-600",children:[(0,a.jsx)(n.A,{className:"w-8 h-8"}),(0,a.jsx)("p",{className:"text-sm font-medium",children:"ì°¸ê³ ìë£ íì¼ì ëì¼ì¸ì"}),(0,a.jsx)("p",{className:"text-xs text-blue-400",children:"PDF, TXT, DOCX, MD (ìµë 4MB)"})]})}),em?null:(0,a.jsxs)("div",{className:"px-5 py-4 flex items-center justify-between bg-blue-600 sticky top-0 z-10",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"w-11 h-11 rounded-full overflow-hidden ring-2 ring-white/30 shadow-lg",children:(0,a.jsx)("img",{src:"/logo.svg",alt:"AI ëì°ë¯¸",className:"w-full h-full object-cover bg-white"})}),(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("span",{className:"font-semibold text-white text-base leading-tight",children:"AI ëì°ë¯¸"}),(0,a.jsxs)("span",{className:"text-xs text-blue-100 mt-0.5 flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"w-2 h-2 rounded-full bg-green-400 animate-pulse"}),"Online"]})]})]}),(0,a.jsx)(j.$,{variant:"ghost",size:"icon",onClick:t,className:"text-white/80 hover:text-white hover:bg-white/10 rounded-full h-9 w-9 transition-colors","aria-label":"ë«ê¸°",children:(0,a.jsx)(r.A,{className:"w-5 h-5"})})]}),(0,a.jsx)(N.F,{className:"flex-1 min-h-0 bg-gray-50",ref:t$,children:(0,a.jsxs)("div",{className:"p-5 pb-8 space-y-5",children:[eo?(0,a.jsx)("div",{className:"rounded-2xl bg-white p-4 border border-gray-100 shadow-sm",children:(0,a.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,a.jsxs)("div",{className:"min-w-0",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-1.5",children:[(0,a.jsx)(o.A,{className:"w-4 h-4 text-blue-600"}),(0,a.jsx)("span",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wide",children:"íì¬ ìì± ì¤"})]}),(0,a.jsx)("p",{className:"text-[15px] font-semibold text-gray-900 truncate leading-snug",children:eo.title}),eo.subsectionTitle?(0,a.jsx)("p",{className:"text-sm text-gray-500 truncate mt-0.5",children:eo.subsectionTitle}):null]}),(0,a.jsxs)(j.$,{size:"sm",onClick:tL,disabled:eY,className:"bg-blue-600 hover:bg-blue-700 text-white text-sm h-9 px-4 rounded-full font-semibold shadow-md transition-all active:scale-95 shrink-0",children:[eY?(0,a.jsx)(d.A,{className:"w-4 h-4 animate-spin mr-1.5"}):(0,a.jsx)(c.A,{className:"w-4 h-4 mr-1.5"}),"ìë ìì±"]})]})}):null,(0,a.jsxs)("div",{className:"space-y-3 bg-white rounded-2xl p-4 border border-gray-100 shadow-sm",children:[(0,a.jsxs)("button",{onClick:()=>eQ(!eZ),className:"w-full flex items-center justify-between text-sm group",type:"button",children:[(0,a.jsxs)("span",{className:"flex items-center gap-2 font-semibold text-gray-900",children:[(0,a.jsx)(u.A,{className:"w-4 h-4 text-blue-600"}),"ë¹ ë¥¸ ìì± ëì°ë¯¸"]}),(0,a.jsx)(m.A,{className:`w-4 h-4 text-gray-400 transition-transform duration-200 group-hover:text-blue-600 ${eZ?"rotate-180":""}`})]}),(0,a.jsx)(I.N,{initial:!1,children:eZ?(0,a.jsx)(_.P.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},className:"overflow-hidden",children:(0,a.jsx)("div",{className:"grid grid-cols-2 gap-2 pt-2",children:tE.map(e=>(0,a.jsx)("button",{onClick:()=>void tQ(e),disabled:eX,className:"px-3.5 py-2.5 text-sm font-medium bg-gray-50 border border-gray-100 rounded-xl hover:border-blue-500 hover:bg-blue-50 hover:text-blue-600 transition-all disabled:opacity-50 disabled:cursor-not-allowed text-left text-gray-700",type:"button",children:e.label},e.id))})}):null})]}),(0,a.jsxs)("div",{className:"bg-white rounded-2xl p-4 border border-gray-100 shadow-sm",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 mb-3",children:[(0,a.jsx)(p.A,{className:"w-4 h-4 text-indigo-500 shrink-0"}),(0,a.jsx)("span",{className:"text-sm font-semibold text-gray-900",children:"ì¸í¬ê·¸ëí½ ìì±"})]}),(0,a.jsx)("div",{className:"grid grid-cols-2 gap-2",children:["tam-sam-som","competitive-matrix","roadmap","tech-architecture"].map(e=>(0,a.jsx)("button",{type:"button",disabled:eX,onClick:()=>{tu(e),tp(!0)},className:`px-3.5 py-2.5 text-sm font-medium rounded-xl border transition-all disabled:opacity-50 disabled:cursor-not-allowed text-left ${tc===e?"border-indigo-400 bg-indigo-50 text-indigo-700":"border-gray-100 bg-gray-50 text-gray-700 hover:border-indigo-400 hover:bg-indigo-50 hover:text-indigo-700"}`,children:U[e]},e))}),(0,a.jsx)(I.N,{initial:!1,children:tc&&tD?(0,a.jsx)(_.P.div,{initial:{opacity:0,height:0}
30,animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"overflow-hidden",children:(0,a.jsxs)("div",{className:"mt-3 rounded-2xl border border-indigo-100 bg-indigo-50/40 p-3",children:[(0,a.jsxs)("p",{className:"text-xs font-semibold text-indigo-700",children:[U[tc]," ì íë¨"]}),(0,a.jsx)("p",{className:"mt-0.5 text-[11px] text-gray-500",children:"ì¤ì ë´ì©ì íì¬ ë¬¸ìì ìì²ì ë§ì¶° ë°ëëë¤."}),(0,a.jsxs)("div",{className:"mt-3 grid grid-cols-2 gap-2",children:[(0,a.jsx)(j.$,{type:"button",size:"sm",variant:"outline",disabled:eX,onClick:()=>tp(!0),className:"border-indigo-100 bg-white text-indigo-700 hover:bg-indigo-50",children:"미리보기"}),(0,a.jsx)(j.$,{type:"button",size:"sm",disabled:eX,onClick:()=>void tU(tc),className:"bg-indigo-600 text-white hover:bg-indigo-700",children:"ìì±"})]}),(0,a.jsx)(j.$,{type:"button",size:"sm",variant:"ghost",onClick:()=>tu(null),className:"mt-2 h-7 w-full text-xs text-gray-400 hover:bg-transparent hover:text-gray-700",children:"ì í ì·¨ì"})]})}):null}),(0,a.jsxs)("div",{className:"mt-3 border-t border-gray-100 pt-3",children:[(0,a.jsxs)("p",{className:"flex items-center gap-1.5 px-1 text-xs font-semibold text-gray-500",children:[(0,a.jsx)(h.A,{className:"h-3.5 w-3.5"}),D.CA.sectionName]}),(0,a.jsxs)("div",{className:"mt-2 rounded-xl border border-gray-100 bg-gray-50 p-2.5",children:[(0,a.jsx)("button",{type:"button",disabled:eX,onClick:()=>tj(),"aria-describedby":"business-asset-entry-note",className:"flex w-full items-start gap-3 rounded-lg px-1 py-1 text-left transition-colors hover:bg-white disabled:cursor-not-allowed disabled:opacity-50",children:(0,a.jsxs)("span",{className:"min-w-0",children:[(0,a.jsx)("span",{className:"block text-sm font-semibold text-gray-900",children:D.CA.entryTitle}),(0,a.jsx)("span",{className:"mt-0.5 block text-xs leading-5 text-gray-500",children:D.CA.entryDescription})]})}),(0,a.jsx)("div",{className:"mt-2 grid gap-1.5 sm:grid-cols-2",children:D.gX.map(e=>{let t=(0,M.S)(e);return t?(0,a.jsxs)("button",{type:"button",disabled:eX,onClick:()=>tj(e),title:t.bestFor,className:"flex items-center gap-2 rounded-lg border border-gray-200 bg-white px-2.5 py-2 text-left text-xs font-medium text-gray-800 transition-colors hover:border-emerald-300 hover:bg-emerald-50 focus-visible:border-emerald-500 focus-visible:ring-2 focus-visible:ring-emerald-200 focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50",children:["comparison-table"===e?(0,a.jsx)(g.A,{className:"h-3.5 w-3.5 shrink-0 text-emerald-600"}):(0,a.jsx)(f.A,{className:"h-3.5 w-3.5 shrink-0 text-emerald-600"}),(0,a.jsx)("span",{className:"min-w-0 truncate",children:(0,D.wf)(e)})]},e):null})}),(0,a.jsx)("p",{id:"business-asset-entry-note",className:"mt-2 px-1 text-[11px] text-gray-400",children:D.CA.entryNote})]})]})]}),(0,a.jsxs)("div",{className:"space-y-6 pt-2",children:[eB.map(e=>{let t,s,r;return(0,a.jsxs)("div",{className:`flex flex-col ${"user"===e.role?"items-end":"items-start"}`,children:["assistant"===e.role&&(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-2.5",children:[(0,a.jsx)("div",{className:"w-10 h-10 rounded-full overflow-hidden shrink-0 shadow-md ring-2 ring-white",children:(0,a.jsx)("img",{src:"/ai-helper-profile.png",alt:"AI ëì°ë¯¸",className:"w-full h-full object-cover"})}),(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsx)("span",{className:"text-[15px] font-semibold text-gray-900",children:"AI ëì°ë¯¸"}),(0,a.jsx)("span",{className:"text-xs text-gray-400",children:e.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]})]}),"text"===e.kind?(0,a.jsxs)("div",{className:`relative max-w-[85%] px-4 py-3 text-[15px] leading-relaxed ${"user"===e.role?"bg-blue-600 text-white rounded-[20px] rounded-tr-[4px] shadow-md":"bg-white text-gray-900 rounded-[20px] rounded-tl-[4px] shadow-sm border border-gray-100"}`,children:[(s=(t=String(e.content||"")).startsWith("ì¼ì¼íë ì íì¼ë¡ ìì±ì´ ì¤ë¨ëììµëë¤.")?t.replace(" (","\n("):t,(0,a.jsx)("div",{className:"whitespace-pre-wrap",children:s.split(/(\*\*[^*]+\*\*)/g).map((e,t)=>e.startsWith("**")&&e.endsWith("**")&&e.length>4?(0,a.jsx)("strong",{children:e.slice(2,-2)},t):e)})),"assistant"===e.role&&"welcome"!==e.id&&!String(e.content||"").startsWith("ì¼ì¼íë ì íì¼ë¡ ìì±ì´ ì¤ë¨ëììµëë¤.")&&(0,a.jsx)("div",{className:"mt-4 pt-3 border-t border-gray-200 flex gap-2",children:(0,a.jsxs)(j.$,{variant:"ghost",size:"sm",className:"h-7 text-xs text-gray-500 hover:text-gray-900 hover:bg-gray-200 px-2.5 rounded-full transition-colors",onClick:()=>tJ(e.content,`copy_text:${e.id}`),children:[eU===`copy_text:${e.id}`?(0,a.jsx)(b.A,{className:"w-3 h-3 mr-1 text-green-500"}):(0,a.jsx)(x.A,{className:"w-3 h-3 mr-1"}),eU===`copy_text:${e.id}`?"ë³µì¬ë¨":"ë³µì¬"]})})]}):"blocks"===e.kind?(0,a.jsxs)("div",{className:"max-w-[90%] w-full rounded-2xl rounded-tl-sm bg-gray-100 p-1 shadow-sm",children:[(0,a.jsx)("div",{className:"px-4 py-3 text-sm font-bold text-gray-800 border-b border-gray-200/50 bg-white/50 rounded-t-[12px]",children:e.title}),(0,a.jsx)("div",{className:"p-3 space-y-3",children:e.blocks.map(t=>{let l=`copy_block:${e.id}:${t.id}`;return(0,a.jsxs)("div",{className:"rounded-xl border border-gray-100 bg-white p-4 shadow-sm hover:shadow-md transition-shadow",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsx)("div",{className:"text-xs font-medium text-gray-700",children:t.label}),(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)(j.$,{size:"sm",variant:"outline",className:"h-8 border-blue-200 text-blue-700 hover:bg-blue-50",onClick:()=>i(t.content),"aria-label":`${t.label} ì ì©`,children:"ì ì©"}),(0,a.jsxs)(j.$,{variant:"ghost",size:"sm",className:"h-7 text-xs text-gray-500 hover:text-gray-700 hover:bg-gray-100 px-2",onClick:()=>tJ(t.content,l),"aria-label":`${t.label}
30 ë³µì¬`,children:[eU===l?(0,a.jsx)(b.A,{className:"w-3 h-3 mr-1 text-emerald-500"}):(0,a.jsx)(x.A,{className:"w-3 h-3 mr-1"}),eU===l?"ë³µì¬ë¨":"ë³µì¬"]})]})]}),(0,a.jsx)("div",{className:"mt-2 whitespace-pre-wrap text-sm text-gray-700",children:t.content})]},t.id)})})]}):"cell_results"===e.kind?(0,a.jsxs)("div",{className:"rounded-xl border border-blue-200 bg-white overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 border-b border-blue-100 bg-blue-50 px-4 py-3",children:[(0,a.jsx)(y.A,{className:"h-4 w-4 text-blue-600"}),(0,a.jsxs)("span",{className:"text-sm font-semibold text-blue-900",children:["ì
ë³ êµì²´ ê²°ê³¼ (",e.cells.length,"ì
)"]})]}),(0,a.jsxs)("div",{className:"p-4 space-y-3",children:[e.cells.map(e=>(0,a.jsxs)("div",{className:"rounded-lg border border-gray-200 bg-gray-50 p-3",children:[(0,a.jsxs)("div",{className:"text-xs font-semibold text-blue-700 mb-1",children:["í",e.row+1," / ì´",e.col+1]}),(0,a.jsx)("div",{className:"text-sm text-gray-700 whitespace-pre-wrap break-words line-clamp-3",children:e.content})]},`${e.row}-${e.col}`)),(0,a.jsx)(j.$,{type:"button",size:"sm",variant:"outline",disabled:to.has(e.id),onClick:()=>{!to.has(e.id)&&(td(t=>new Set(t).add(e.id)),ex&&ex(e.cells))},className:"w-full h-8 border-blue-200 text-blue-700 hover:bg-blue-50 disabled:opacity-50 disabled:cursor-not-allowed",children:to.has(e.id)?"ì ì©ë¨":"ì ì²´ ì
ì ì ì©"})]})]},e.id):"table_structure"===e.kind?(0,a.jsxs)("div",{className:"rounded-xl border border-indigo-200 bg-white overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 border-b border-indigo-100 bg-indigo-50 px-4 py-3",children:[(0,a.jsx)(y.A,{className:"h-4 w-4 text-indigo-600"}),(0,a.jsxs)("span",{className:"text-sm font-semibold text-indigo-900",children:["í
ì´ë¸ 구조 ë³ê²½",e.html?"":` (${e.rows.length}í)`]})]}),(0,a.jsxs)("div",{className:"p-4 space-y-2",children:[e.html?(0,a.jsx)("div",{className:"table-preview overflow-auto text-[11px] leading-snug",style:{maxHeight:320},dangerouslySetInnerHTML:{__html:F.default.sanitize(e.html,{ALLOWED_TAGS:["table","thead","tbody","tfoot","tr","th","td","colgroup","col","p","br","span","strong","em"],ALLOWED_ATTR:["class","style","colspan","rowspan","data-colwidth","data-background-color"]})}}):(0,a.jsx)("div",{className:"overflow-auto rounded-lg border border-gray-200",style:{maxHeight:320},children:(0,a.jsx)("table",{className:"min-w-full text-xs",children:(0,a.jsx)("tbody",{children:e.rows.map((e,t)=>(0,a.jsx)("tr",{className:t%2==0?"bg-gray-50":"bg-white",children:e.map((e,t)=>{let i=e.isHeader?"th":"td";return(0,a.jsx)(i,{className:"border border-gray-200 px-2 py-1 text-left font-normal break-words",children:e.content},t)})},t))})})}),(0,a.jsx)(j.$,{type:"button",size:"sm",variant:"outline",disabled:to.has(e.id),onClick:()=>{!to.has(e.id)&&(td(t=>new Set(t).add(e.id)),ey&&ey(e.rows,e.html))},className:"w-full h-8 border-indigo-200 text-indigo-700 hover:bg-indigo-50 disabled:opacity-50 disabled:cursor-not-allowed",children:to.has(e.id)?"ì ì©ë¨":"í
ì´ë¸ êµì²´"})]})]},e.id):"data_questions"===e.kind?(0,a.jsxs)("div",{className:"max-w-[90%] w-full rounded-2xl rounded-tl-sm bg-amber-50 border border-amber-200 px-4 py-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,a.jsx)("span",{className:"inline-flex items-center justify-center w-5 h-5 rounded-full bg-amber-100 text-amber-600 text-xs font-bold",children:"?"}),(0,a.jsx)("span",{className:"text-sm font-semibold text-amber-800",children:"ì¶ê° ì ë³´ê° íìí©ëë¤"})]}),(0,a.jsx)("p",{className:"text-xs text-amber-700 mb-4",children:"ìë ì§ë¬¸ì ëµë³í´ì£¼ìë©´, ëµë³ ë´ì©ì ë°íì¼ë¡ ì¬ì
ê³íì를 ë³´ìí©ëë¤."}),e.answered?(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsx)("div",{className:"space-y-2",children:e.questions.map((t,i)=>{let l=tk[e.id]||{},s=l[String(i)]?.trim();return s?(0,a.jsxs)("div",{className:"rounded-lg border border-gray-200 bg-white p-3",children:[(0,a.jsxs)("p",{className:"text-xs text-gray-600 font-medium mb-1",children:["Q: ",t.question]}),(0,a.jsxs)("p",{className:"text-sm text-gray-700",children:["A: ",s]})]},i):null})}),(0,a.jsx)("div",{className:"rounded-lg bg-white border border-gray-200 p-3 text-center",children:(0,a.jsx)("span",{className:"text-sm font-medium text-gray-700",children:"ëµë³ì´ ë°ìëììµëë¤. ê°ì ìì ìì± ì¤ì
ëë¤..."})})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"space-y-3",children:e.questions.map((t,i)=>{let l=(tk[e.id]||{})[String(i)]??"";return(0,a.jsxs)("div",{className:"rounded-xl border border-amber-200 bg-white p-3 shadow-sm",children:[(0,a.jsx)("p",{className:"text-xs text-amber-600 mb-1",children:t.issue}),(0,a.jsx)("p",{className:"text-sm font-medium text-gray-800 mb
30-2",children:t.question}),(0,a.jsx)("textarea",{className:"w-full rounded-lg border border-gray-200 bg-gray-50 px-3 py-2 text-sm text-gray-800 focus:outline-none focus:ring-2 focus:ring-amber-400 resize-none",rows:2,placeholder:"ì¬ê¸°ì ëµë³ì ì ë ¥íì¸ì...",value:l,onChange:t=>{let a=t.target.value;tN(t=>({...t,[e.id]:{...t[e.id]||{},[String(i)]:a}}))},"aria-label":t.question})]},i)})}),(0,a.jsxs)("div",{className:"mt-4 flex gap-2",children:[(0,a.jsxs)(j.$,{size:"sm",className:"flex-1 h-9 text-sm bg-amber-500 hover:bg-amber-600 text-white rounded-lg",onClick:()=>(e=>{let t=eB.find(t=>t.id===e);if(!t)return;let i=tk[e]||{};eH(t=>t.map(t=>t.id===e?{...t,answered:!0}:t));let a=t.questions.map((e,t)=>{let a=i[String(t)]?.trim();return a?`Q: ${e.question} 31A: ${a}`:null}).filter(Boolean).join("\n\n");a?t2(t.questions,a):t._pendingImproveIssues.length>0&&t1({issues:t._pendingImproveIssues,allSections:t._allSections})})(e.id),disabled:eX,children:[(0,a.jsx)(y.A,{className:"w-3.5 h-3.5 mr-1.5"}),"ëµë³ ìë£ â ê°ì ìì"]}),(0,a.jsx)(j.$,{variant:"ghost",size:"sm",className:"h-9 text-sm text-gray-500 hover:text-gray-700",onClick:()=>{eH(t=>t.map(t=>t.id===e.id?{...t,answered:!0}:t)),e._pendingImproveIssues.length>0&&t1({issues:e._pendingImproveIssues,allSections:e._allSections})},disabled:eX,children:"ê±´ëë°ê¸°"})]})]})]}):"quick_options"===e.kind?(r=(e,t,i)=>{if(!l||!t.fieldMap||!t.fieldDefs)return;l({[i]:t.fieldMap[i]},t.fieldDefs.filter(e=>e.fieldId===i));let a=`${e.id}:${t.id}`;tn(e=>{let t=e[a]||new Set;return{...e,[a]:new Set([...t,i])}})},(0,a.jsxs)("div",{className:"max-w-[90%] w-full rounded-2xl rounded-tl-sm bg-gray-100 px-4 py-3",children:[(0,a.jsx)("div",{className:"text-sm font-medium text-gray-800",children:e.title}),(0,a.jsx)("div",{className:"mt-3 grid grid-cols-1 gap-2",children:e.options.filter(t=>!e.appliedOptionId||t.id===e.appliedOptionId).map(t=>{let i,s,n=e.appliedOptionId===t.id,o=e.options[0],c=t.fieldMap||o?.fieldMap,u=t.fieldDefs||o?.fieldDefs,m=!!(l&&c&&u&&u.length),p=t.fieldMap?t:{...t,fieldMap:c,fieldDefs:u};return(0,a.jsxs)("div",{className:"rounded-lg bg-white p-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsx)("div",{className:"text-xs font-medium text-gray-700",children:t.title}),n?(0,a.jsx)("span",{className:"text-xs font-medium text-emerald-600 bg-emerald-50 border border-emerald-200 rounded-full px-2 py-0.5",children:"ì ì©ìë£"}):(0,a.jsx)(j.$,{size:"sm",className:"h-7 text-xs bg-blue-500 hover:bg-blue-600 text-white rounded-lg",disabled:!m,onClick:()=>{m&&((e,t)=>{if(!l||!t.fieldMap||!t.fieldDefs)return;l(t.fieldMap,t.fieldDefs),eH(i=>i.map(i=>"quick_options"!==i.kind||i.id!==e.id?i:{...i,appliedOptionId:t.id}));let i=`${e.id}:${t.id}`,a=t.fieldDefs.map(e=>e.fieldId);tn(e=>({...e,[i]:new Set(a)}))})(e,p)},"aria-label":`${t.title} ì ì²´ ì ì©`,children:"ì ì²´ ì ì©"})]}),"ìì± ì¤..."===t.content?(0,a.jsxs)("div",{className:"mt-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs font-medium text-blue-500",children:[(0,a.jsx)(d.A,{className:"w-3.5 h-3.5 animate-spin"}),(s=(i=e.title.replace(" (2ê°ì§ ìµì )","")).charAt(i.length-1).charCodeAt(0),`${i}${s>=44032&&s<=55203&&(s-44032)%28!=0?"ì":"를"} ìì± ì¤...`)]}),(0,a.jsxs)("div",{className:"mt-4 space-y-2.5 animate-pulse",children:[(0,a.jsx)("div",{className:"h-3 rounded-full bg-gray-200 w-11/12"}),(0,a.jsx)("div",{className:"h-3 rounded-full bg-gray-200 w-10/12"}),(0,a.jsx)("div",{className:"h-3 rounded-full bg-gray-200 w-9/12"}),(0,a.jsx)("div",{className:"h-3 rounded-full bg-gray-200 w-8/12"})]}),(0,a.jsxs)("div",{className:"mt-4 grid grid-cols-2 gap-2 animate-pulse",children:[(0,a.jsx)("div",{className:"h-9 rounded-xl bg-gray-200"}),(0,a.jsx)("div",{className:"h-9 rounded-xl bg-gray-200"})]})]}):(0,a.jsx)("div",{className:"mt-3 whitespace-pre-wrap text-sm text-gray-700 leading-relaxed",children:t.content}),t.beforeMap&&t.fieldDefs&&t.fieldMap?(()=>{let i=`${e.id}:${t.id}`,l=!!tl[i],s=t.labelMap||{},o=t.fieldDefs.map(e=>e.fieldId).map(e=>{let i=tH((t.beforeMap?.[e]||"").trim()),a=tH((t.fieldMap?.[e]||"").trim());return{id:e,before:i,after:a}}).filter(e=>e.before!==e.after&&e.after.length>0);if(0===o.length)return null;let d=t.improvementMeta?.sections||[],c=d.map(e=>e.sectionId),u=e=>{for(let t of c){let i=t.replace(/_/g,"-");if(e.startsWith(i+"-"))return t}if(e.startsWith("overview-")){let t=e.slice(9);for(let e of c){let i=e.replace(/_/g,"-");if(t.startsWith(i))return e}}return null},m=new Map;for(let e of o){let t=u(e.id)||"_etc";m.has(t)||m.set(t,[]),m.get(t).push(e)}let p=[...d.filter(e=>e.isImproveTarget).map(e=>e.sectionId),...d.filter(e=>!e.isImproveTarget).map(e=>e.sectionId),"_etc"].filter(e=>m.has(e)).flatMap(e=>m.get(e));return l?p.length:p.length,(0,a.jsxs)("div",{className:"mt-4 space-y-3",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2 px-1",children:[(0,a.jsxs)("div",{className:"text-sm font-semibold text-gray-700",children:["ë³ê²½ì¬í"," ",(0,a.jsxs)("span",{className:"text-blue-600",children:["(",o.length,"ê°)"]})]}),p.length>6?(0,a.jsx)("button",{type:"button",onClick:()=>ts(e=>({...e,[i]:!l})),className:"text-sm font-medium text-blue-600 hover:text-blue-700 transition-colors","aria-label":l?"ë³ê²½ 미리보기 ì 기":"ë³ê²½ 미리보기 ë보기",children:l?"ì 기":"ë보기"}):null]}),(l?o:o.slice(0,6)).map(i=>{let l=s[i.id]||tB(i.id),o=tH(i.before)||"(ë¹ì´ ìì)",d=tH(i.after)||"(ìì± ê²°ê³¼ ìì)",c=(tr[`${e.id}:${t.id}`]||new Set).has(i.id);return(0,a.jsxs)("div",{className:"rounded-xl border border-gray-200 bg-white p-4 shadow-sm",children:[(0,a.jsx)("div",{className:"flex items-center justify-between mb-3",children:(0,a.jsxs)("div",{className:"text-sm font-semibold text-gray-800 flex items-center gap-1.5",children:[l,c&&(0,a.jsx)("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-semibold bg-emerald-100 text-emerald-700",children:"ì ì©ìë£"})]})}),(0,a.jsxs)("div",{className:"space-y-3",children:[(0,a.jsxs)("div",{className:"rounded-lg border border-gray-200 bg-gray-50 p-3",children:[(0,a.jsx)("div",{className:"text-xs font-medium text-gray-500 mb-1.5 uppercase tracking-wide",children:"Before"}),(0,a.jsx)("div",{className:"whitespace-pre-wrap text-sm text-gray-600 leading-relaxed",children:o})]}),(0,a.jsxs)("div",{className:"rounded-lg border border-blue-200 bg-blue-50 p-3",children:[(0,a.jsx)("div",{className:"text-xs font-medium text-blue-600 mb-1.5 uppercase tracking-wide",children:"After"}),(0,a.jsx)("div",{className:"whitespace-pre-wrap text-sm text-gray-800 leading-relaxed",children:d})]})]}),!n&&!c&&(0,a.jsx)("div",{className:"mt-3 flex justify-end",children:(0,a.jsx)(j.$,{size:"sm",variant:"outline",className:"h-7 text-xs bg-white hover:bg-blue-50 text-blue-600 border-blue-300",onClick:()=>r(e,t,i.id),children:"ì ì©"})})]},i.id)})]})})():null,n?null:(0,a.jsx)("div",{className:"mt-4 flex gap-2",children:(0,a.jsxs)(j.$,{variant:"ghost",size:"sm",className:"h-8 text-xs text-gray-400 hover:text-gray-700 hover:bg-gray-50 px-3 rounded-full",onClick:()=>tJ(t.content,`${e.id}_${t.id}`),children:[(0,a.jsx)(x.A,{className:"w-3.5 h-3.5 mr-1.5"}),"ë³µì¬"]})})]},t.id)})})]})):"infographic"===e.kind?(0,a.jsxs)("div",{className:"w-full max-w-full rounded-2xl border border-gray-100 bg-white shadow-sm overflow-hidden",children:[(0,a.jsx)("div",{role:"button",tabIndex:0,className:"relative h-[260px] overflow-hidden bg-gray-50 p-3 cursor-pointer hover:opacity-90 transition-opacity",title:"í´ë¦íì¬ ìì ",onClick:t=>tX(e,t),onKeyDown:t=>{("Enter"===t.key||" "===t.key)&&tX(e,t)},children:(0,a.jsx)("div",{className:"pointer-events-none absolute left-3 top-3 w-[560px] max-w-none origin-top-left scale-[0.55] sm:scale-[0.6]",dangerouslySetInnerHTML:{__html:F.default.sanitize(e.html,J)}
31})}),(0,a.jsxs)("div",{className:"px-3 py-2.5 border-t border-gray-100 flex items-center justify-between gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-gray-400",children:"í´ë¦íì¬ ìì "}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsxs)($.Bc,{children:[(0,a.jsxs)($.m_,{children:[(0,a.jsx)($.k$,{asChild:!0,children:(0,a.jsx)("button",{type:"button",onClick:async()=>{try{await (0,W.copyInfographicAsPng)(e.html),B.o.success("ë³µì¬ë¨")}catch{B.o.error("ë³µì¬ ì¤í¨")}},className:"h-7 w-7 flex items-center justify-center rounded border border-gray-200 text-gray-500 hover:bg-gray-50 hover:text-gray-700 transition-colors",children:(0,a.jsx)(x.A,{className:"w-3.5 h-3.5"})})}),(0,a.jsx)($.ZI,{side:"top",children:"ì´ë¯¸ì§ ë³µì¬"})]}),(0,a.jsxs)($.m_,{children:[(0,a.jsx)($.k$,{asChild:!0,children:(0,a.jsx)("button",{type:"button",disabled:th.has(e.id),onClick:async()=>{if(!th.has(e.id)){tg(t=>new Set(t).add(e.id));try{await (0,W.downloadInfographicAsPng)(e.html,"infographic.png")}catch{B.o.error("ë¤ì´ë¡ë ì¤í¨")}finally{tg(t=>{let i=new Set(t);return i.delete(e.id),i})}}},className:"h-7 w-7 flex items-center justify-center rounded border border-gray-200 text-gray-500 hover:bg-gray-50 hover:text-gray-700 transition-colors disabled:opacity-40",children:th.has(e.id)?(0,a.jsx)(d.A,{className:"w-3.5 h-3.5 animate-spin"}):(0,a.jsx)(v.A,{className:"w-3.5 h-3.5"})})}),(0,a.jsx)($.ZI,{side:"top",children:"ì´ë¯¸ì§ ë¤ì´ë¡ë"})]})]}),(0,a.jsx)(j.$,{type:"button",size:"sm",disabled:to.has(e.id),onClick:()=>{if(to.has(e.id))return;let t=F.default.sanitize(e.html,J);td(t=>new Set(t).add(e.id)),i(t)},className:"h-7 px-3 text-xs bg-indigo-600 hover:bg-indigo-700 text-white",children:to.has(e.id)?"ì½ì
ë¨":"ìëí°ì ì½ì
"})]})]})]}):null]},e.id)}),eX&&eB[eB.length-1]?.role==="user"&&(0,a.jsx)("div",{className:"flex justify-start",children:(0,a.jsxs)("div",{className:"max-w-[85%] w-full rounded-2xl px-5 py-4 bg-gray-100 rounded-tl-sm shadow-sm",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-xs font-semibold text-blue-600 mb-3",children:[(0,a.jsx)(d.A,{className:"w-3.5 h-3.5 animate-spin"}),"AIê° ëµë³ì ìì±íê³ ìì´ìâ¦"]}),(0,a.jsxs)("div",{className:"space-y-2.5 animate-pulse",children:[(0,a.jsx)("div",{className:"h-3 rounded-full bg-gray-200 w-full"}),(0,a.jsx)("div",{className:"h-3 rounded-full bg-gray-200 w-[92%]"}),(0,a.jsx)("div",{className:"h-3 rounded-full bg-gray-200 w-[85%]"}),(0,a.jsx)("div",{className:"h-3 rounded-full bg-gray-200 w-[70%]"})]})]})})]}),!eX&&eB.length>1&&(0,a.jsx)(_.P.div,{initial:{opacity:0}
31,animate:{opacity:1},className:"mt-4 text-center px-4",children:(0,a.jsx)("p",{className:"text-[11px] text-gray-400",children:"AIë ì¤ì를 í ì ììµëë¤. íµì¬ ì ë³´ë ë³ëë¡ íì¸í´ 주ì¸ì."})})]})}),ep?(0,a.jsx)("div",{className:"border-t border-gray-100 bg-white px-4 py-3 max-h-[600px] overflow-y-auto",children:(0,a.jsx)("div",{className:"rounded-xl bg-gradient-to-r from-blue-50 to-indigo-50 border border-blue-100 p-3",children:(0,a.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-1.5",children:[(0,a.jsx)("div",{className:"flex items-center justify-center w-5 h-5 rounded-md bg-blue-600",children:(0,a.jsx)(o.A,{className:"w-3 h-3 text-white"})}),(0,a.jsx)("span",{className:"text-xs font-semibold text-blue-700",children:"ìëí°ìì ì íë¨"})]}),(0,a.jsx)("p",{className:"text-sm font-medium text-gray-900 leading-snug",children:ep.label}),"table"!==ep.kind?(0,a.jsx)("p",{className:"mt-1.5 text-xs text-gray-600 whitespace-pre-wrap line-clamp-2 leading-relaxed",children:ep.preview}):null,tZ?(0,a.jsx)("div",{className:"mt-2",children:(0,a.jsx)("pre",{className:"whitespace-pre-wrap rounded-lg border border-blue-200 bg-white/80 px-3 py-2 text-xs text-gray-700 font-mono max-h-[240px] overflow-y-auto",children:tZ.isPairable?tZ.pairs:tZ.hasTable?tZ.tsv:tZ.values})}):null]}),eh?(0,a.jsx)("button",{type:"button",onClick:eh,"aria-label":"ì í í´ì ",className:"shrink-0 rounded-full p-1 text-gray-400 hover:bg-white hover:text-gray-600 hover:shadow-sm transition-all",children:(0,a.jsx)(r.A,{className:"w-4 h-4"})}):null]})})}):null,(0,a.jsxs)("div",{className:"p-4 border-t border-gray-100 bg-white",children:[ev.length>0&&(0,a.jsx)("div",{className:"mb-2 flex flex-wrap items-center gap-1.5 px-1",children:ev.map(e=>(0,a.jsxs)("div",{className:"flex items-center gap-1.5 rounded-full bg-blue-50 border border-blue-200 px-3 py-1 text-xs text-blue-700",children:[(0,a.jsx)(n.A,{className:"w-3 h-3"}),(0,a.jsx)("span",{className:"max-w-[140px] truncate",children:e.filename}),(0,a.jsx)("button",{type:"button",onClick:()=>ew?.(ev.filter(t=>t.filename!==e.filename)),className:"ml-0.5 rounded-full p-0.5 hover:bg-blue-100 transition-colors","aria-label":"ì°¸ê³ ìë£ ì ê±°",children:(0,a.jsx)(r.A,{className:"w-3 h-3"})})]},e.filename))}),(0,a.jsxs)("div",{className:"relative flex items-end bg-white rounded-2xl border border-gray-200",children:[(0,a.jsx)(k.T,{ref:tI,value:eW,onChange:e=>eV(e.target.value.slice(0,500)),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),tV())},placeholder:"ë©ìì§ë¥¼ ì
ë ¥íì¸ì...",className:"min-h-[48px] max-h-[120px] flex-1 resize-none border-0 bg-transparent rounded-2xl text-[15px] text-gray-900 placeholder:text-gray-400 py-3 px-4 ring-0! outline-none! shadow-none! focus:ring-0! focus:outline-none! focus-visible:ring-0! focus-visible:border-0!",disabled:eX,maxLength:500}),(0,a.jsxs)("div",{className:"flex items-center gap-1 pr-2 pb-2",children:[(0,a.jsx)("input",{ref:t_,type:"file",accept:X.eA,className:"hidden",onChange:eP}),(0,a.jsx)($.Bc,{children:(0,a.jsxs)($.m_,{children:[(0,a.jsx)($.k$,{asChild:!0,children:(0,a.jsx)(j.$,{size:"icon",variant:"ghost","aria-label":"ì°¸ê³ ìë£ ì
ë¡ë (PDF, TXT, DOCX, MD)",className:`h-8 w-8 rounded-full transition-colors ${eS?"text-blue-600 bg-blue-50":"text-gray-400 hover:text-blue-600 hover:bg-blue-50"}`,disabled:eX||tC||ev.length>=3,onClick:()=>t_.current?.click(),children:tC?(0,a.jsx)(d.A,{className:"w-4 h-4 animate-spin"}):(0,a.jsx)(n.A,{className:"w-4 h-4"})})}),(0,a.jsx)($.ZI,{side:"top",children:(0,a.jsx)("p",{children:ev.length>0?`ì°¸ê³ ìë£ ${ev.length}/3ê° ì²¨ë¶ë¨`:`ì°¸ê³ ìë£ ì²¨ë¶ (ìµë 3ê°)`})})]})}),(0,a.jsx)(j.$,{size:"icon",variant:"ghost",className:"h-8 w-8 rounded-full text-gray-400 hover:text-blue-600 hover:bg-blue-50 transition-colors",disabled:eX||!eW.trim(),onClick:()=>tV(),children:(0,a.jsx)(w.A,{className:"w-4 h-4"})})]})]}),(0,a.jsx)("div",{className:"mt-2 flex justify-end text-xs text-gray-400 px-1",children:(0,a.jsxs)("span",{children:[eW.length,"/",500]})})]})]})]})}):null})},89123:(e,t,i)=>{i.d(t,{A:()=>a});let a=(0,i(78340).A)("chart-column",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]])}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.