@impakers/debug 1.5.4 → 1.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/react.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- "use strict";"use client";var Oo=Object.create;var Dn=Object.defineProperty;var Vo=Object.getOwnPropertyDescriptor;var Uo=Object.getOwnPropertyNames;var Ko=Object.getPrototypeOf,Zo=Object.prototype.hasOwnProperty;var Xo=(e,n)=>{for(var o in n)Dn(e,o,{get:n[o],enumerable:!0})},Tt=(e,n,o,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let s of Uo(n))!Zo.call(e,s)&&s!==o&&Dn(e,s,{get:()=>n[s],enumerable:!(t=Vo(n,s))||t.enumerable});return e};var ot=(e,n,o)=>(o=e!=null?Oo(Ko(e)):{},Tt(n||!e||!e.__esModule?Dn(o,"default",{value:e,enumerable:!0}):o,e)),Yo=e=>Tt(Dn({},"__esModule",{value:!0}),e);var Hr={};Xo(Hr,{ImpakersDebug:()=>Xe,ImpakersDebugProvider:()=>Br});module.exports=Yo(Hr);var He=require("react");var It="https://os.impakers.club/api/external/feedback";var Et="impakers-debug-token",jn="impakers-debug-token-data";function Ge(){if(typeof window>"u")return null;try{let e=localStorage.getItem(jn);if(!e)return null;let n=JSON.parse(e);return new Date(n.expiresAt)<new Date?(st(),null):n.token}catch{return null}}function rn(){return Ge()!==null}function Rt(){if(typeof window>"u")return null;try{let e=localStorage.getItem(jn);return e?JSON.parse(e).serviceName:null}catch{return null}}function Qo(e){if(!(typeof window>"u"))try{let n={token:e.token,serviceName:e.serviceName,expiresAt:e.expiresAt};localStorage.setItem(jn,JSON.stringify(n)),localStorage.setItem(Et,e.token)}catch{}}function st(){if(!(typeof window>"u"))try{localStorage.removeItem(jn),localStorage.removeItem(Et)}catch{}}async function Mt(e,n){let o=window.location.hostname,t=await fetch(`${e}/auth`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:n,domain:o})});if(!t.ok){let r=await t.json().catch(()=>({message:"\uC778\uC99D \uC2E4\uD328"}));throw new Error(r.message||"\uC778\uC99D \uC2E4\uD328")}let s=await t.json();return Qo(s),s}var Ve=class Ve{static showAuth(){Ve._eventTarget?.dispatchEvent(new CustomEvent("impakers-debug:show-auth"))}static isActive(){return rn()}static deactivate(){st(),Ve._eventTarget?.dispatchEvent(new CustomEvent("impakers-debug:deactivate"))}static open(){if(!rn()){Ve.showAuth();return}Ve._eventTarget?.dispatchEvent(new CustomEvent("impakers-debug:open"))}static _on(n,o){return Ve._eventTarget?.addEventListener(n,o),()=>Ve._eventTarget?.removeEventListener(n,o)}};Ve._eventTarget=typeof EventTarget<"u"?new EventTarget:null;var Xe=Ve;var y=require("react"),Eo=require("react-dom");var ie=require("react");var qo=`.styles-module__popup___IhzrD svg[fill=none] {
2
+ "use strict";"use client";var Oo=Object.create;var Dn=Object.defineProperty;var Vo=Object.getOwnPropertyDescriptor;var Uo=Object.getOwnPropertyNames;var Ko=Object.getPrototypeOf,Zo=Object.prototype.hasOwnProperty;var Xo=(e,n)=>{for(var o in n)Dn(e,o,{get:n[o],enumerable:!0})},Tt=(e,n,o,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let s of Uo(n))!Zo.call(e,s)&&s!==o&&Dn(e,s,{get:()=>n[s],enumerable:!(t=Vo(n,s))||t.enumerable});return e};var ot=(e,n,o)=>(o=e!=null?Oo(Ko(e)):{},Tt(n||!e||!e.__esModule?Dn(o,"default",{value:e,enumerable:!0}):o,e)),Yo=e=>Tt(Dn({},"__esModule",{value:!0}),e);var Hr={};Xo(Hr,{ImpakersDebug:()=>Ye,ImpakersDebugProvider:()=>Br});module.exports=Yo(Hr);var He=require("react");var It="https://os.impakers.club/api/external/feedback";var Et="impakers-debug-token",jn="impakers-debug-token-data";function Je(){if(typeof window>"u")return null;try{let e=localStorage.getItem(jn);if(!e)return null;let n=JSON.parse(e);return new Date(n.expiresAt)<new Date?(st(),null):n.token}catch{return null}}function an(){return Je()!==null}function Rt(){if(typeof window>"u")return null;try{let e=localStorage.getItem(jn);return e?JSON.parse(e).serviceName:null}catch{return null}}function Qo(e){if(!(typeof window>"u"))try{let n={token:e.token,serviceName:e.serviceName,expiresAt:e.expiresAt};localStorage.setItem(jn,JSON.stringify(n)),localStorage.setItem(Et,e.token)}catch{}}function st(){if(!(typeof window>"u"))try{localStorage.removeItem(jn),localStorage.removeItem(Et)}catch{}}async function Mt(e,n){let o=window.location.hostname,t=await fetch(`${e}/auth`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({code:n,domain:o})});if(!t.ok){let r=await t.json().catch(()=>({message:"\uC778\uC99D \uC2E4\uD328"}));throw new Error(r.message||"\uC778\uC99D \uC2E4\uD328")}let s=await t.json();return Qo(s),s}var Ve=class Ve{static showAuth(){Ve._eventTarget?.dispatchEvent(new CustomEvent("impakers-debug:show-auth"))}static isActive(){return an()}static deactivate(){st(),Ve._eventTarget?.dispatchEvent(new CustomEvent("impakers-debug:deactivate"))}static open(){if(!an()){Ve.showAuth();return}Ve._eventTarget?.dispatchEvent(new CustomEvent("impakers-debug:open"))}static _on(n,o){return Ve._eventTarget?.addEventListener(n,o),()=>Ve._eventTarget?.removeEventListener(n,o)}};Ve._eventTarget=typeof EventTarget<"u"?new EventTarget:null;var Ye=Ve;var y=require("react"),Eo=require("react-dom");var ie=require("react");var qo=`.styles-module__popup___IhzrD svg[fill=none] {
3
3
  fill: none !important;
4
4
  }
5
5
  .styles-module__popup___IhzrD svg[fill=none] :not([fill]) {
@@ -329,11 +329,11 @@
329
329
  .styles-module__light___6AaSQ .styles-module__deleteButton___4VuAE:hover {
330
330
  background-color: color-mix(in srgb, var(--agentation-color-red) 25%, transparent);
331
331
  color: var(--agentation-color-red);
332
- }`,Go={popup:"styles-module__popup___IhzrD",enter:"styles-module__enter___L7U7N",popupEnter:"styles-module__popupEnter___AuQDN",entered:"styles-module__entered___COX-w",exit:"styles-module__exit___5eGjE",popupExit:"styles-module__popupExit___JJKQX",shake:"styles-module__shake___jdbWe",header:"styles-module__header___wWsSi",element:"styles-module__element___fTV2z",headerToggle:"styles-module__headerToggle___WpW0b",chevron:"styles-module__chevron___ZZJlR",expanded:"styles-module__expanded___2Hxgv",stylesWrapper:"styles-module__stylesWrapper___pnHgy",stylesInner:"styles-module__stylesInner___YYZe2",stylesBlock:"styles-module__stylesBlock___VfQKn",styleLine:"styles-module__styleLine___1YQiD",styleProperty:"styles-module__styleProperty___84L1i",styleValue:"styles-module__styleValue___q51-h",timestamp:"styles-module__timestamp___Dtpsv",quote:"styles-module__quote___mcMmQ",textarea:"styles-module__textarea___jrSae",green:"styles-module__green___99l3h",actions:"styles-module__actions___D6x3f",cancel:"styles-module__cancel___hRjnL",submit:"styles-module__submit___K-mIR",shortcutHint:"styles-module__shortcutHint___ihsrd",deleteWrapper:"styles-module__deleteWrapper___oSjdo",deleteButton:"styles-module__deleteButton___4VuAE",light:"styles-module__light___6AaSQ"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-annotation-popup-css-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-annotation-popup-css-styles",document.head.appendChild(e)),e.textContent=qo}var U=Go;var Wn=require("react/jsx-runtime");var At=({size:e=24})=>(0,Wn.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Wn.jsx)("path",{d:"M13.5 4C14.7426 4 15.75 5.00736 15.75 6.25V7H18.5C18.9142 7 19.25 7.33579 19.25 7.75C19.25 8.16421 18.9142 8.5 18.5 8.5H17.9678L17.6328 16.2217C17.61 16.7475 17.5912 17.1861 17.5469 17.543C17.5015 17.9087 17.4225 18.2506 17.2461 18.5723C16.9747 19.0671 16.5579 19.4671 16.0518 19.7168C15.7227 19.8791 15.3772 19.9422 15.0098 19.9717C14.6514 20.0004 14.2126 20 13.6865 20H10.3135C9.78735 20 9.34856 20.0004 8.99023 19.9717C8.62278 19.9422 8.27729 19.8791 7.94824 19.7168C7.44205 19.4671 7.02532 19.0671 6.75391 18.5723C6.57751 18.2506 6.49853 17.9087 6.45312 17.543C6.40883 17.1861 6.39005 16.7475 6.36719 16.2217L6.03223 8.5H5.5C5.08579 8.5 4.75 8.16421 4.75 7.75C4.75 7.33579 5.08579 7 5.5 7H8.25V6.25C8.25 5.00736 9.25736 4 10.5 4H13.5ZM7.86621 16.1562C7.89013 16.7063 7.90624 17.0751 7.94141 17.3584C7.97545 17.6326 8.02151 17.7644 8.06934 17.8516C8.19271 18.0763 8.38239 18.2577 8.6123 18.3711C8.70153 18.4151 8.83504 18.4545 9.11035 18.4766C9.39482 18.4994 9.76335 18.5 10.3135 18.5H13.6865C14.2367 18.5 14.6052 18.4994 14.8896 18.4766C15.165 18.4545 15.2985 18.4151 15.3877 18.3711C15.6176 18.2577 15.8073 18.0763 15.9307 17.8516C15.9785 17.7644 16.0245 17.6326 16.0586 17.3584C16.0938 17.0751 16.1099 16.7063 16.1338 16.1562L16.4668 8.5H7.5332L7.86621 16.1562ZM9.97656 10.75C10.3906 10.7371 10.7371 11.0626 10.75 11.4766L10.875 15.4766C10.8879 15.8906 10.5624 16.2371 10.1484 16.25C9.73443 16.2629 9.38794 15.9374 9.375 15.5234L9.25 11.5234C9.23706 11.1094 9.56255 10.7629 9.97656 10.75ZM14.0244 10.75C14.4383 10.7635 14.7635 11.1105 14.75 11.5244L14.6201 15.5244C14.6066 15.9384 14.2596 16.2634 13.8457 16.25C13.4317 16.2365 13.1067 15.8896 13.1201 15.4756L13.251 11.4756C13.2645 11.0617 13.6105 10.7366 14.0244 10.75ZM10.5 5.5C10.0858 5.5 9.75 5.83579 9.75 6.25V7H14.25V6.25C14.25 5.83579 13.9142 5.5 13.5 5.5H10.5Z",fill:"currentColor"})});var Jo=["data-feedback-toolbar","data-annotation-popup","data-annotation-marker"],Zr=Jo.flatMap(e=>[`:not([${e}])`,`:not([${e}] *)`]).join("");var rt="__agentation_freeze";function es(){if(typeof window>"u")return{frozen:!1,installed:!0,origSetTimeout:setTimeout,origSetInterval:setInterval,origRAF:n=>0,pausedAnimations:[],frozenTimeoutQueue:[],frozenRAFQueue:[]};let e=window;return e[rt]||(e[rt]={frozen:!1,installed:!1,origSetTimeout:null,origSetInterval:null,origRAF:null,pausedAnimations:[],frozenTimeoutQueue:[],frozenRAFQueue:[]}),e[rt]}var ke=es();typeof window<"u"&&!ke.installed&&(ke.origSetTimeout=window.setTimeout.bind(window),ke.origSetInterval=window.setInterval.bind(window),ke.origRAF=window.requestAnimationFrame.bind(window),window.setTimeout=(e,n,...o)=>typeof e=="string"?ke.origSetTimeout(e,n):ke.origSetTimeout((...t)=>{ke.frozen?ke.frozenTimeoutQueue.push(()=>e(...t)):e(...t)},n,...o),window.setInterval=(e,n,...o)=>typeof e=="string"?ke.origSetInterval(e,n):ke.origSetInterval((...t)=>{ke.frozen||e(...t)},n,...o),window.requestAnimationFrame=e=>ke.origRAF(n=>{ke.frozen?ke.frozenRAFQueue.push(e):e(n)}),ke.installed=!0);var Ee=ke.origSetTimeout,Xr=ke.origSetInterval,Yr=ke.origRAF;var se=require("react/jsx-runtime");function it(e){if(!e)return;let n=o=>o.stopImmediatePropagation();document.addEventListener("focusin",n,!0),document.addEventListener("focusout",n,!0);try{e.focus()}finally{document.removeEventListener("focusin",n,!0),document.removeEventListener("focusout",n,!0)}}var Ft=(0,ie.forwardRef)(function({element:n,timestamp:o,selectedText:t,placeholder:s="What should change?",initialValue:r="",submitLabel:i="Add",onSubmit:a,onCancel:m,onDelete:C,style:w,accentColor:L="#3c82f7",isExiting:T=!1,lightMode:E=!1,computedStyles:M},j){let[K,fe]=(0,ie.useState)(r),[ge,ce]=(0,ie.useState)(!1),[P,F]=(0,ie.useState)("initial"),[Q,b]=(0,ie.useState)(!1),[D,R]=(0,ie.useState)(!1),he=(0,ie.useRef)(null),A=(0,ie.useRef)(null),te=(0,ie.useRef)(null),le=(0,ie.useRef)(null);(0,ie.useEffect)(()=>{T&&P!=="exit"&&F("exit")},[T,P]),(0,ie.useEffect)(()=>{Ee(()=>{F("enter")},0);let v=Ee(()=>{F("entered")},200),oe=Ee(()=>{let f=he.current;f&&(it(f),f.selectionStart=f.selectionEnd=f.value.length,f.scrollTop=f.scrollHeight)},50);return()=>{clearTimeout(v),clearTimeout(oe),te.current&&clearTimeout(te.current),le.current&&clearTimeout(le.current)}},[]);let ye=(0,ie.useCallback)(()=>{le.current&&clearTimeout(le.current),ce(!0),le.current=Ee(()=>{ce(!1),it(he.current)},250)},[]);(0,ie.useImperativeHandle)(j,()=>({shake:ye}),[ye]);let Pe=(0,ie.useCallback)(()=>{F("exit"),te.current=Ee(()=>{m()},150)},[m]),Te=(0,ie.useCallback)(()=>{K.trim()&&a(K.trim())},[K,a]),be=(0,ie.useCallback)(v=>{v.stopPropagation(),!v.nativeEvent.isComposing&&(v.key==="Enter"&&(v.metaKey||v.ctrlKey)&&(v.preventDefault(),Te()),v.key==="Escape"&&Pe())},[Te,Pe]),x=[U.popup,E?U.light:"",P==="enter"?U.enter:"",P==="entered"?U.entered:"",P==="exit"?U.exit:"",ge?U.shake:""].filter(Boolean).join(" ");return(0,se.jsxs)("div",{ref:A,className:x,"data-annotation-popup":!0,style:w,onClick:v=>v.stopPropagation(),children:[(0,se.jsxs)("div",{className:U.header,children:[M&&Object.keys(M).length>0?(0,se.jsxs)("button",{className:U.headerToggle,onClick:()=>{let v=D;R(!D),v&&Ee(()=>it(he.current),0)},type:"button",children:[(0,se.jsx)("svg",{className:`${U.chevron} ${D?U.expanded:""}`,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,se.jsx)("path",{d:"M5.5 10.25L9 7.25L5.75 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,se.jsx)("span",{className:U.element,children:n})]}):(0,se.jsx)("span",{className:U.element,children:n}),o&&(0,se.jsx)("span",{className:U.timestamp,children:o})]}),M&&Object.keys(M).length>0&&(0,se.jsx)("div",{className:`${U.stylesWrapper} ${D?U.expanded:""}`,children:(0,se.jsx)("div",{className:U.stylesInner,children:(0,se.jsx)("div",{className:U.stylesBlock,children:Object.entries(M).map(([v,oe])=>(0,se.jsxs)("div",{className:U.styleLine,children:[(0,se.jsx)("span",{className:U.styleProperty,children:v.replace(/([A-Z])/g,"-$1").toLowerCase()}),": ",(0,se.jsx)("span",{className:U.styleValue,children:oe}),";"]},v))})})}),t&&(0,se.jsxs)("div",{className:U.quote,children:["\u201C",t.slice(0,80),t.length>80?"...":"","\u201D"]}),(0,se.jsx)("textarea",{ref:he,className:U.textarea,style:{borderColor:Q?L:void 0},placeholder:s,value:K,onChange:v=>{fe(v.target.value);let oe=v.target;oe.style.height="auto",oe.style.height=`${Math.min(oe.scrollHeight,200)}px`},onFocus:()=>b(!0),onBlur:()=>b(!1),rows:4,onKeyDown:be}),(0,se.jsxs)("div",{className:U.actions,children:[C&&(0,se.jsx)("div",{className:U.deleteWrapper,children:(0,se.jsx)("button",{className:U.deleteButton,onClick:C,type:"button",children:(0,se.jsx)(At,{size:22})})}),(0,se.jsx)("button",{className:U.cancel,onClick:Pe,children:"Cancel"}),(0,se.jsx)("button",{className:U.submit,style:{backgroundColor:L,opacity:K.trim()?1:.4},onClick:Te,disabled:!K.trim(),children:i})]}),(0,se.jsxs)("div",{className:U.shortcutHint,children:[navigator?.platform?.includes("Mac")?"\u2318":"Ctrl","+Enter to submit"]})]})});function kn(e){if(e.parentElement)return e.parentElement;let n=e.getRootNode();return n instanceof ShadowRoot?n.host:null}function Je(e,n){let o=e;for(;o;){if(o.matches(n))return o;o=kn(o)}return null}function ns(e,n=4){let o=[],t=e,s=0;for(;t&&s<n;){let r=t.tagName.toLowerCase();if(r==="html"||r==="body")break;let i=r;if(t.id)i=`#${t.id}`;else if(t.className&&typeof t.className=="string"){let m=t.className.split(/\s+/).find(C=>C.length>2&&!C.match(/^[a-z]{1,2}$/)&&!C.match(/[A-Z0-9]{5,}/));m&&(i=`.${m.split("_")[0]}`)}let a=kn(t);!t.parentElement&&a&&(i=`\u27E8shadow\u27E9 ${i}`),o.unshift(i),t=a,s++}return o.join(" > ")}function at(e){let n=ns(e);if(e.dataset.element)return{name:e.dataset.element,path:n};let o=e.tagName.toLowerCase();if(["path","circle","rect","line","g"].includes(o)){let t=Je(e,"svg");if(t){let s=kn(t);if(s instanceof HTMLElement)return{name:`graphic in ${at(s).name}`,path:n}}return{name:"graphic element",path:n}}if(o==="svg"){let t=kn(e);if(t?.tagName.toLowerCase()==="button"){let s=t.textContent?.trim();return{name:s?`icon in "${s}" button`:"button icon",path:n}}return{name:"icon",path:n}}if(o==="button"){let t=e.textContent?.trim(),s=e.getAttribute("aria-label");return s?{name:`button [${s}]`,path:n}:{name:t?`button "${t.slice(0,25)}"`:"button",path:n}}if(o==="a"){let t=e.textContent?.trim(),s=e.getAttribute("href");return t?{name:`link "${t.slice(0,25)}"`,path:n}:s?{name:`link to ${s.slice(0,30)}`,path:n}:{name:"link",path:n}}if(o==="input"){let t=e.getAttribute("type")||"text",s=e.getAttribute("placeholder"),r=e.getAttribute("name");return s?{name:`input "${s}"`,path:n}:r?{name:`input [${r}]`,path:n}:{name:`${t} input`,path:n}}if(["h1","h2","h3","h4","h5","h6"].includes(o)){let t=e.textContent?.trim();return{name:t?`${o} "${t.slice(0,35)}"`:o,path:n}}if(o==="p"){let t=e.textContent?.trim();return t?{name:`paragraph: "${t.slice(0,40)}${t.length>40?"...":""}"`,path:n}:{name:"paragraph",path:n}}if(o==="span"||o==="label"){let t=e.textContent?.trim();return t&&t.length<40?{name:`"${t}"`,path:n}:{name:o,path:n}}if(o==="li"){let t=e.textContent?.trim();return t&&t.length<40?{name:`list item: "${t.slice(0,35)}"`,path:n}:{name:"list item",path:n}}if(o==="blockquote")return{name:"blockquote",path:n};if(o==="code"){let t=e.textContent?.trim();return t&&t.length<30?{name:`code: \`${t}\``,path:n}:{name:"code",path:n}}if(o==="pre")return{name:"code block",path:n};if(o==="img"){let t=e.getAttribute("alt");return{name:t?`image "${t.slice(0,30)}"`:"image",path:n}}if(o==="video")return{name:"video",path:n};if(["div","section","article","nav","header","footer","aside","main"].includes(o)){let t=e.className,s=e.getAttribute("role"),r=e.getAttribute("aria-label");if(r)return{name:`${o} [${r}]`,path:n};if(s)return{name:`${s}`,path:n};if(typeof t=="string"&&t){let i=t.split(/[\s_-]+/).map(a=>a.replace(/[A-Z0-9]{5,}.*$/,"")).filter(a=>a.length>2&&!/^[a-z]{1,2}$/.test(a)).slice(0,2);if(i.length>0)return{name:i.join(" "),path:n}}return{name:o==="div"?"container":o,path:n}}return{name:o,path:n}}function Pt(e){let n=[],o=e.textContent?.trim();o&&o.length<100&&n.push(o);let t=e.previousElementSibling;if(t){let r=t.textContent?.trim();r&&r.length<50&&n.unshift(`[before: "${r.slice(0,40)}"]`)}let s=e.nextElementSibling;if(s){let r=s.textContent?.trim();r&&r.length<50&&n.push(`[after: "${r.slice(0,40)}"]`)}return n.join(" ")}function $t(e){let n=e.className;return typeof n!="string"||!n?"":n.split(/\s+/).filter(t=>t.length>0).map(t=>{let s=t.match(/^([a-zA-Z][a-zA-Z0-9_-]*?)(?:_[a-zA-Z0-9]{5,})?$/);return s?s[1]:t}).filter((t,s,r)=>r.indexOf(t)===s).join(", ")}var Bt=new Set(["none","normal","auto","0px","rgba(0, 0, 0, 0)","transparent","static","visible"]),ts=new Set(["p","span","h1","h2","h3","h4","h5","h6","label","li","td","th","blockquote","figcaption","caption","legend","dt","dd","pre","code","em","strong","b","i","a","time","cite","q"]),os=new Set(["input","textarea","select"]),ss=new Set(["img","video","canvas","svg"]),rs=new Set(["div","section","article","nav","header","footer","aside","main","ul","ol","form","fieldset"]);function Ht(e){if(typeof window>"u")return{};let n=window.getComputedStyle(e),o={},t=e.tagName.toLowerCase(),s;ts.has(t)?s=["color","fontSize","fontWeight","fontFamily","lineHeight"]:t==="button"||t==="a"&&e.getAttribute("role")==="button"?s=["backgroundColor","color","padding","borderRadius","fontSize"]:os.has(t)?s=["backgroundColor","color","padding","borderRadius","fontSize"]:ss.has(t)?s=["width","height","objectFit","borderRadius"]:rs.has(t)?s=["display","padding","margin","gap","backgroundColor"]:s=["color","fontSize","margin","padding","backgroundColor"];for(let r of s){let i=r.replace(/([A-Z])/g,"-$1").toLowerCase(),a=n.getPropertyValue(i);a&&!Bt.has(a)&&(o[r]=a)}return o}var is=["color","backgroundColor","borderColor","fontSize","fontWeight","fontFamily","lineHeight","letterSpacing","textAlign","width","height","padding","margin","border","borderRadius","display","position","top","right","bottom","left","zIndex","flexDirection","justifyContent","alignItems","gap","opacity","visibility","overflow","boxShadow","transform"];function zt(e){if(typeof window>"u")return"";let n=window.getComputedStyle(e),o=[];for(let t of is){let s=t.replace(/([A-Z])/g,"-$1").toLowerCase(),r=n.getPropertyValue(s);r&&!Bt.has(r)&&o.push(`${s}: ${r}`)}return o.join("; ")}function Dt(e){let n=[],o=e.getAttribute("role"),t=e.getAttribute("aria-label"),s=e.getAttribute("aria-describedby"),r=e.getAttribute("tabindex"),i=e.getAttribute("aria-hidden");return o&&n.push(`role="${o}"`),t&&n.push(`aria-label="${t}"`),s&&n.push(`aria-describedby="${s}"`),r&&n.push(`tabindex=${r}`),i==="true"&&n.push("aria-hidden"),e.matches("a, button, input, select, textarea, [tabindex]")&&n.push("focusable"),n.join(", ")}function jt(e){let n=[],o=e;for(;o&&o.tagName.toLowerCase()!=="html";){let t=o.tagName.toLowerCase(),s=t;if(o.id)s=`${t}#${o.id}`;else if(o.className&&typeof o.className=="string"){let i=o.className.split(/\s+/).map(a=>a.replace(/[_][a-zA-Z0-9]{5,}.*$/,"")).find(a=>a.length>2);i&&(s=`${t}.${i}`)}let r=kn(o);!o.parentElement&&r&&(s=`\u27E8shadow\u27E9 ${s}`),n.unshift(s),o=r}return n.join(" > ")}var O={FunctionComponent:0,ClassComponent:1,IndeterminateComponent:2,HostRoot:3,HostPortal:4,HostComponent:5,HostText:6,Fragment:7,Mode:8,ContextConsumer:9,ContextProvider:10,ForwardRef:11,Profiler:12,SuspenseComponent:13,MemoComponent:14,SimpleMemoComponent:15,LazyComponent:16,IncompleteClassComponent:17,DehydratedFragment:18,SuspenseListComponent:19,ScopeComponent:21,OffscreenComponent:22,LegacyHiddenComponent:23,CacheComponent:24,TracingMarkerComponent:25,HostHoistable:26,HostSingleton:27,IncompleteFunctionComponent:28,Throw:29,ViewTransitionComponent:30,ActivityComponent:31},Wt=new Set(["Component","PureComponent","Fragment","Suspense","Profiler","StrictMode","Routes","Route","Outlet","Root","ErrorBoundaryHandler","HotReload","Hot"]),Ot=[/Boundary$/,/BoundaryHandler$/,/Provider$/,/Consumer$/,/^(Inner|Outer)/,/Router$/,/^Client(Page|Segment|Root)/,/^Segment(ViewNode|Node)$/,/^LayoutSegment/,/^Server(Root|Component|Render)/,/^RSC/,/Context$/,/^Hot(Reload)?$/,/^(Dev|React)(Overlay|Tools|Root)/,/Overlay$/,/Handler$/,/^With[A-Z]/,/Wrapper$/,/^Root$/],as=[/Page$/,/View$/,/Screen$/,/Section$/,/Card$/,/List$/,/Item$/,/Form$/,/Modal$/,/Dialog$/,/Button$/,/Nav$/,/Header$/,/Footer$/,/Layout$/,/Panel$/,/Tab$/,/Menu$/];function ls(e){let n=e?.mode??"filtered",o=Wt;if(e?.skipExact){let t=e.skipExact instanceof Set?e.skipExact:new Set(e.skipExact);o=new Set([...Wt,...t])}return{maxComponents:e?.maxComponents??6,maxDepth:e?.maxDepth??30,mode:n,skipExact:o,skipPatterns:e?.skipPatterns?[...Ot,...e.skipPatterns]:Ot,userPatterns:e?.userPatterns??as,filter:e?.filter}}function ds(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([A-Z])([A-Z][a-z])/g,"$1-$2").toLowerCase()}function cs(e,n=10){let o=new Set,t=e,s=0;for(;t&&s<n;)t.className&&typeof t.className=="string"&&t.className.split(/\s+/).forEach(r=>{if(r.length>1){let i=r.replace(/[_][a-zA-Z0-9]{5,}.*$/,"").toLowerCase();i.length>1&&o.add(i)}}),t=t.parentElement,s++;return o}function us(e,n){let o=ds(e);for(let t of n){if(t===o)return!0;let s=o.split("-").filter(i=>i.length>2),r=t.split("-").filter(i=>i.length>2);for(let i of s)for(let a of r)if(i===a||i.includes(a)||a.includes(i))return!0}return!1}function _s(e,n,o,t){if(o.filter)return o.filter(e,n);switch(o.mode){case"all":return!0;case"filtered":return!(o.skipExact.has(e)||o.skipPatterns.some(s=>s.test(e)));case"smart":return o.skipExact.has(e)||o.skipPatterns.some(s=>s.test(e))?!1:!!(t&&us(e,t)||o.userPatterns.some(s=>s.test(e)));default:return!0}}var an=null,ms=new WeakMap;function lt(e){return Object.keys(e).some(n=>n.startsWith("__reactFiber$")||n.startsWith("__reactInternalInstance$")||n.startsWith("__reactProps$"))}function ps(){if(an!==null)return an;if(typeof document>"u")return!1;if(document.body&&lt(document.body))return an=!0,!0;let e=["#root","#app","#__next","[data-reactroot]"];for(let n of e){let o=document.querySelector(n);if(o&&lt(o))return an=!0,!0}if(document.body){for(let n of document.body.children)if(lt(n))return an=!0,!0}return an=!1,!1}var vn={map:ms};function fs(e){return Object.keys(e).find(o=>o.startsWith("__reactFiber$")||o.startsWith("__reactInternalInstance$"))||null}function gs(e){let n=fs(e);return n?e[n]:null}function en(e){return e?e.displayName?e.displayName:e.name?e.name:null:null}function hs(e){let{tag:n,type:o,elementType:t}=e;if(n===O.HostComponent||n===O.HostText||n===O.HostHoistable||n===O.HostSingleton||n===O.Fragment||n===O.Mode||n===O.Profiler||n===O.DehydratedFragment||n===O.HostRoot||n===O.HostPortal||n===O.ScopeComponent||n===O.OffscreenComponent||n===O.LegacyHiddenComponent||n===O.CacheComponent||n===O.TracingMarkerComponent||n===O.Throw||n===O.ViewTransitionComponent||n===O.ActivityComponent)return null;if(n===O.ForwardRef){let s=t;if(s?.render){let r=en(s.render);if(r)return r}return s?.displayName?s.displayName:en(o)}if(n===O.MemoComponent||n===O.SimpleMemoComponent){let s=t;if(s?.type){let r=en(s.type);if(r)return r}return s?.displayName?s.displayName:en(o)}if(n===O.ContextProvider){let s=o;return s?._context?.displayName?`${s._context.displayName}.Provider`:null}if(n===O.ContextConsumer){let s=o;return s?.displayName?`${s.displayName}.Consumer`:null}if(n===O.LazyComponent){let s=t;return s?._status===1&&s._result?en(s._result):null}return n===O.SuspenseComponent||n===O.SuspenseListComponent?null:n===O.IncompleteClassComponent||n===O.IncompleteFunctionComponent||n===O.FunctionComponent||n===O.ClassComponent||n===O.IndeterminateComponent?en(o):null}function ys(e){return e.length<=2||e.length<=3&&e===e.toLowerCase()}function Vt(e,n){let o=ls(n),t=o.mode==="all";if(t){let m=vn.map.get(e);if(m!==void 0)return m}if(!ps()){let m={path:null,components:[]};return t&&vn.map.set(e,m),m}let s=o.mode==="smart"?cs(e):void 0,r=[];try{let m=gs(e),C=0;for(;m&&C<o.maxDepth&&r.length<o.maxComponents;){let w=hs(m);w&&!ys(w)&&_s(w,C,o,s)&&r.push(w),m=m.return,C++}}catch{let m={path:null,components:[]};return t&&vn.map.set(e,m),m}if(r.length===0){let m={path:null,components:[]};return t&&vn.map.set(e,m),m}let a={path:r.slice().reverse().map(m=>`<${m}>`).join(" "),components:r};return t&&vn.map.set(e,a),a}var Ut=ot(require("react")),Cn={FunctionComponent:0,ClassComponent:1,IndeterminateComponent:2,HostRoot:3,HostPortal:4,HostComponent:5,HostText:6,Fragment:7,Mode:8,ContextConsumer:9,ContextProvider:10,ForwardRef:11,Profiler:12,SuspenseComponent:13,MemoComponent:14,SimpleMemoComponent:15,LazyComponent:16};function bs(e){if(!e||typeof e!="object")return null;let n=Object.keys(e),o=n.find(r=>r.startsWith("__reactFiber$"));if(o)return e[o]||null;let t=n.find(r=>r.startsWith("__reactInternalInstance$"));if(t)return e[t]||null;let s=n.find(r=>{if(!r.startsWith("__react"))return!1;let i=e[r];return i&&typeof i=="object"&&"_debugSource"in i});return s&&e[s]||null}function wn(e){if(!e.type||typeof e.type=="string")return null;if(typeof e.type=="object"||typeof e.type=="function"){let n=e.type;if(n.displayName)return n.displayName;if(n.name)return n.name}return null}function xs(e,n=50){let o=e,t=0;for(;o&&t<n;){if(o._debugSource)return{source:o._debugSource,componentName:wn(o)};if(o._debugOwner?._debugSource)return{source:o._debugOwner._debugSource,componentName:wn(o._debugOwner)};o=o.return,t++}return null}function ks(e){let n=e,o=0,t=50;for(;n&&o<t;){let s=n,r=["_debugSource","__source","_source","debugSource"];for(let i of r){let a=s[i];if(a&&typeof a=="object"&&"fileName"in a)return{source:a,componentName:wn(n)}}if(n.memoizedProps){let i=n.memoizedProps;if(i.__source&&typeof i.__source=="object"){let a=i.__source;if(a.fileName&&a.lineNumber)return{source:{fileName:a.fileName,lineNumber:a.lineNumber,columnNumber:a.columnNumber},componentName:wn(n)}}}n=n.return,o++}return null}var On=new Map;function vs(e){let n=e.tag,o=e.type,t=e.elementType;if(typeof o=="string"||o==null||typeof o=="function"&&o.prototype?.isReactComponent)return null;if((n===Cn.FunctionComponent||n===Cn.IndeterminateComponent)&&typeof o=="function")return o;if(n===Cn.ForwardRef&&t){let s=t.render;if(typeof s=="function")return s}if((n===Cn.MemoComponent||n===Cn.SimpleMemoComponent)&&t){let s=t.type;if(typeof s=="function")return s}return typeof o=="function"?o:null}function Cs(){let e=Ut.default,n=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;if(n&&"H"in n)return{get:()=>n.H,set:t=>{n.H=t}};let o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;if(o){let t=o.ReactCurrentDispatcher;if(t&&"current"in t)return{get:()=>t.current,set:s=>{t.current=s}}}return null}function ws(e){let n=e.split(`
333
- `),o=[/source-location/,/\/dist\/index\./,/\/dist\/react\./,/node_modules\//,/react-dom/,/react\.development/,/react\.production/,/chunk-[A-Z0-9]+/i,/react-stack-bottom-frame/,/react-reconciler/,/scheduler/,/at <anonymous>:/],t=/^\s*at\s+(?:.*?\s+\()?(.+?):(\d+):(\d+)\)?$/,s=/^[^@]*@(.+?):(\d+):(\d+)$/,r=0;for(let i of n){let a=i.trim();if(!a||o.some(C=>C.test(a)))continue;let m=t.exec(a)||s.exec(a);if(m&&(r++,r>=3))return{fileName:m[1],line:parseInt(m[2],10),column:parseInt(m[3],10)}}return null}function Ss(e){let n=e;return n=n.replace(/[?#].*$/,""),n=n.replace(/^turbopack:\/\/\/\[project\]\//,""),n=n.replace(/^webpack-internal:\/\/\/\.\//,""),n=n.replace(/^webpack-internal:\/\/\//,""),n=n.replace(/^webpack:\/\/\/\.\//,""),n=n.replace(/^webpack:\/\/\//,""),n=n.replace(/^turbopack:\/\/\//,""),n=n.replace(/^https?:\/\/[^/]+\//,""),n=n.replace(/^file:\/\/\//,"/"),n=n.replace(/^\([^)]+\)\/\.\//,""),n=n.replace(/^\.\//,""),n}function Ns(e){let n=vs(e);if(!n)return null;if(On.has(n))return On.get(n);let o=Cs();if(!o)return On.set(n,null),null;let t=o.get(),s=null;try{let r=new Proxy({},{get(){throw new Error("probe")}});o.set(r);try{n({})}catch(i){if(i instanceof Error&&i.stack){let a=ws(i.stack);a&&(s={fileName:Ss(a.fileName),lineNumber:a.line,columnNumber:a.column,componentName:wn(e)||void 0})}}}finally{o.set(t)}return On.set(n,s),s}function Ls(e,n=15){let o=[],t=new Set,s=e,r=0;for(;s&&r<n;){let i=Ns(s);i&&!t.has(i.fileName)&&(t.add(i.fileName),o.push(i)),s=s.return,r++}return o}function Sn(e){let n=bs(e);if(!n)return{found:!1,reason:"no-fiber",isReactApp:!1,isProduction:!1};let o=xs(n);if(o||(o=ks(n)),o?.source)return{found:!0,source:{fileName:o.source.fileName,lineNumber:o.source.lineNumber,columnNumber:o.source.columnNumber,componentName:o.componentName||void 0},isReactApp:!0,isProduction:!1};let t=Ls(n);return t.length>0?{found:!0,source:t[0],sourceCandidates:t,isReactApp:!0,isProduction:!1}:{found:!1,reason:"no-debug-source",isReactApp:!0,isProduction:!1}}function Vn(e,n="path"){let{fileName:o,lineNumber:t,columnNumber:s}=e,r=`${o}:${t}`;return s!==void 0&&(r+=`:${s}`),n==="vscode"?`vscode://file${o.startsWith("/")?"":"/"}${r}`:r}function dt(e,n=10){let o=e,t=0;for(;o&&t<n;){let s=Sn(o);if(s.found)return s;o=o.parentElement,t++}return Sn(e)}async function Un(e,n={}){let{quality:o=.7,maxScale:t=2}=n,s=(await import("html2canvas-pro")).default;return(await s(e,{useCORS:!0,allowTaint:!0,scale:Math.min(window.devicePixelRatio,t),logging:!1})).toDataURL("image/jpeg",o)}async function Kt(e={}){let{quality:n=.5,hideSelectors:o=[]}=e,s=[...["[data-impakers-debug]","[data-annotation-popup]","[data-annotation-marker]"],...o],r=document.querySelectorAll(s.join(", "));try{r.forEach(m=>m.style.visibility="hidden");let i=(await import("html2canvas-pro")).default;return(await i(document.body,{useCORS:!0,allowTaint:!0,scale:1,logging:!1,width:window.innerWidth,height:window.innerHeight})).toDataURL("image/jpeg",n)}catch{return}finally{r.forEach(i=>i.style.visibility="")}}var Me=[],Ln=[],Zt=!1;function ct(e){return e.map(n=>{if(n instanceof Error)return`${n.message}
332
+ }`,Go={popup:"styles-module__popup___IhzrD",enter:"styles-module__enter___L7U7N",popupEnter:"styles-module__popupEnter___AuQDN",entered:"styles-module__entered___COX-w",exit:"styles-module__exit___5eGjE",popupExit:"styles-module__popupExit___JJKQX",shake:"styles-module__shake___jdbWe",header:"styles-module__header___wWsSi",element:"styles-module__element___fTV2z",headerToggle:"styles-module__headerToggle___WpW0b",chevron:"styles-module__chevron___ZZJlR",expanded:"styles-module__expanded___2Hxgv",stylesWrapper:"styles-module__stylesWrapper___pnHgy",stylesInner:"styles-module__stylesInner___YYZe2",stylesBlock:"styles-module__stylesBlock___VfQKn",styleLine:"styles-module__styleLine___1YQiD",styleProperty:"styles-module__styleProperty___84L1i",styleValue:"styles-module__styleValue___q51-h",timestamp:"styles-module__timestamp___Dtpsv",quote:"styles-module__quote___mcMmQ",textarea:"styles-module__textarea___jrSae",green:"styles-module__green___99l3h",actions:"styles-module__actions___D6x3f",cancel:"styles-module__cancel___hRjnL",submit:"styles-module__submit___K-mIR",shortcutHint:"styles-module__shortcutHint___ihsrd",deleteWrapper:"styles-module__deleteWrapper___oSjdo",deleteButton:"styles-module__deleteButton___4VuAE",light:"styles-module__light___6AaSQ"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-annotation-popup-css-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-annotation-popup-css-styles",document.head.appendChild(e)),e.textContent=qo}var U=Go;var Wn=require("react/jsx-runtime");var At=({size:e=24})=>(0,Wn.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Wn.jsx)("path",{d:"M13.5 4C14.7426 4 15.75 5.00736 15.75 6.25V7H18.5C18.9142 7 19.25 7.33579 19.25 7.75C19.25 8.16421 18.9142 8.5 18.5 8.5H17.9678L17.6328 16.2217C17.61 16.7475 17.5912 17.1861 17.5469 17.543C17.5015 17.9087 17.4225 18.2506 17.2461 18.5723C16.9747 19.0671 16.5579 19.4671 16.0518 19.7168C15.7227 19.8791 15.3772 19.9422 15.0098 19.9717C14.6514 20.0004 14.2126 20 13.6865 20H10.3135C9.78735 20 9.34856 20.0004 8.99023 19.9717C8.62278 19.9422 8.27729 19.8791 7.94824 19.7168C7.44205 19.4671 7.02532 19.0671 6.75391 18.5723C6.57751 18.2506 6.49853 17.9087 6.45312 17.543C6.40883 17.1861 6.39005 16.7475 6.36719 16.2217L6.03223 8.5H5.5C5.08579 8.5 4.75 8.16421 4.75 7.75C4.75 7.33579 5.08579 7 5.5 7H8.25V6.25C8.25 5.00736 9.25736 4 10.5 4H13.5ZM7.86621 16.1562C7.89013 16.7063 7.90624 17.0751 7.94141 17.3584C7.97545 17.6326 8.02151 17.7644 8.06934 17.8516C8.19271 18.0763 8.38239 18.2577 8.6123 18.3711C8.70153 18.4151 8.83504 18.4545 9.11035 18.4766C9.39482 18.4994 9.76335 18.5 10.3135 18.5H13.6865C14.2367 18.5 14.6052 18.4994 14.8896 18.4766C15.165 18.4545 15.2985 18.4151 15.3877 18.3711C15.6176 18.2577 15.8073 18.0763 15.9307 17.8516C15.9785 17.7644 16.0245 17.6326 16.0586 17.3584C16.0938 17.0751 16.1099 16.7063 16.1338 16.1562L16.4668 8.5H7.5332L7.86621 16.1562ZM9.97656 10.75C10.3906 10.7371 10.7371 11.0626 10.75 11.4766L10.875 15.4766C10.8879 15.8906 10.5624 16.2371 10.1484 16.25C9.73443 16.2629 9.38794 15.9374 9.375 15.5234L9.25 11.5234C9.23706 11.1094 9.56255 10.7629 9.97656 10.75ZM14.0244 10.75C14.4383 10.7635 14.7635 11.1105 14.75 11.5244L14.6201 15.5244C14.6066 15.9384 14.2596 16.2634 13.8457 16.25C13.4317 16.2365 13.1067 15.8896 13.1201 15.4756L13.251 11.4756C13.2645 11.0617 13.6105 10.7366 14.0244 10.75ZM10.5 5.5C10.0858 5.5 9.75 5.83579 9.75 6.25V7H14.25V6.25C14.25 5.83579 13.9142 5.5 13.5 5.5H10.5Z",fill:"currentColor"})});var Jo=["data-feedback-toolbar","data-annotation-popup","data-annotation-marker"],Zr=Jo.flatMap(e=>[`:not([${e}])`,`:not([${e}] *)`]).join("");var rt="__agentation_freeze";function es(){if(typeof window>"u")return{frozen:!1,installed:!0,origSetTimeout:setTimeout,origSetInterval:setInterval,origRAF:n=>0,pausedAnimations:[],frozenTimeoutQueue:[],frozenRAFQueue:[]};let e=window;return e[rt]||(e[rt]={frozen:!1,installed:!1,origSetTimeout:null,origSetInterval:null,origRAF:null,pausedAnimations:[],frozenTimeoutQueue:[],frozenRAFQueue:[]}),e[rt]}var xe=es();typeof window<"u"&&!xe.installed&&(xe.origSetTimeout=window.setTimeout.bind(window),xe.origSetInterval=window.setInterval.bind(window),xe.origRAF=window.requestAnimationFrame.bind(window),window.setTimeout=(e,n,...o)=>typeof e=="string"?xe.origSetTimeout(e,n):xe.origSetTimeout((...t)=>{xe.frozen?xe.frozenTimeoutQueue.push(()=>e(...t)):e(...t)},n,...o),window.setInterval=(e,n,...o)=>typeof e=="string"?xe.origSetInterval(e,n):xe.origSetInterval((...t)=>{xe.frozen||e(...t)},n,...o),window.requestAnimationFrame=e=>xe.origRAF(n=>{xe.frozen?xe.frozenRAFQueue.push(e):e(n)}),xe.installed=!0);var Ee=xe.origSetTimeout,Xr=xe.origSetInterval,Yr=xe.origRAF;var se=require("react/jsx-runtime");function it(e){if(!e)return;let n=o=>o.stopImmediatePropagation();document.addEventListener("focusin",n,!0),document.addEventListener("focusout",n,!0);try{e.focus()}finally{document.removeEventListener("focusin",n,!0),document.removeEventListener("focusout",n,!0)}}var Ft=(0,ie.forwardRef)(function({element:n,timestamp:o,selectedText:t,placeholder:s="What should change?",initialValue:r="",submitLabel:i="Add",onSubmit:a,onCancel:m,onDelete:w,style:C,accentColor:L="#3c82f7",isExiting:T=!1,lightMode:I=!1,computedStyles:M},j){let[K,pe]=(0,ie.useState)(r),[fe,ce]=(0,ie.useState)(!1),[P,F]=(0,ie.useState)("initial"),[Q,b]=(0,ie.useState)(!1),[D,E]=(0,ie.useState)(!1),ge=(0,ie.useRef)(null),A=(0,ie.useRef)(null),te=(0,ie.useRef)(null),le=(0,ie.useRef)(null);(0,ie.useEffect)(()=>{T&&P!=="exit"&&F("exit")},[T,P]),(0,ie.useEffect)(()=>{Ee(()=>{F("enter")},0);let v=Ee(()=>{F("entered")},200),oe=Ee(()=>{let f=ge.current;f&&(it(f),f.selectionStart=f.selectionEnd=f.value.length,f.scrollTop=f.scrollHeight)},50);return()=>{clearTimeout(v),clearTimeout(oe),te.current&&clearTimeout(te.current),le.current&&clearTimeout(le.current)}},[]);let he=(0,ie.useCallback)(()=>{le.current&&clearTimeout(le.current),ce(!0),le.current=Ee(()=>{ce(!1),it(ge.current)},250)},[]);(0,ie.useImperativeHandle)(j,()=>({shake:he}),[he]);let Pe=(0,ie.useCallback)(()=>{F("exit"),te.current=Ee(()=>{m()},150)},[m]),Ne=(0,ie.useCallback)(()=>{K.trim()&&a(K.trim())},[K,a]),ye=(0,ie.useCallback)(v=>{v.stopPropagation(),!v.nativeEvent.isComposing&&(v.key==="Enter"&&(v.metaKey||v.ctrlKey)&&(v.preventDefault(),Ne()),v.key==="Escape"&&Pe())},[Ne,Pe]),x=[U.popup,I?U.light:"",P==="enter"?U.enter:"",P==="entered"?U.entered:"",P==="exit"?U.exit:"",fe?U.shake:""].filter(Boolean).join(" ");return(0,se.jsxs)("div",{ref:A,className:x,"data-annotation-popup":!0,style:C,onClick:v=>v.stopPropagation(),children:[(0,se.jsxs)("div",{className:U.header,children:[M&&Object.keys(M).length>0?(0,se.jsxs)("button",{className:U.headerToggle,onClick:()=>{let v=D;E(!D),v&&Ee(()=>it(ge.current),0)},type:"button",children:[(0,se.jsx)("svg",{className:`${U.chevron} ${D?U.expanded:""}`,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,se.jsx)("path",{d:"M5.5 10.25L9 7.25L5.75 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,se.jsx)("span",{className:U.element,children:n})]}):(0,se.jsx)("span",{className:U.element,children:n}),o&&(0,se.jsx)("span",{className:U.timestamp,children:o})]}),M&&Object.keys(M).length>0&&(0,se.jsx)("div",{className:`${U.stylesWrapper} ${D?U.expanded:""}`,children:(0,se.jsx)("div",{className:U.stylesInner,children:(0,se.jsx)("div",{className:U.stylesBlock,children:Object.entries(M).map(([v,oe])=>(0,se.jsxs)("div",{className:U.styleLine,children:[(0,se.jsx)("span",{className:U.styleProperty,children:v.replace(/([A-Z])/g,"-$1").toLowerCase()}),": ",(0,se.jsx)("span",{className:U.styleValue,children:oe}),";"]},v))})})}),t&&(0,se.jsxs)("div",{className:U.quote,children:["\u201C",t.slice(0,80),t.length>80?"...":"","\u201D"]}),(0,se.jsx)("textarea",{ref:ge,className:U.textarea,style:{borderColor:Q?L:void 0},placeholder:s,value:K,onChange:v=>{pe(v.target.value);let oe=v.target;oe.style.height="auto",oe.style.height=`${Math.min(oe.scrollHeight,200)}px`},onFocus:()=>b(!0),onBlur:()=>b(!1),rows:4,onKeyDown:ye}),(0,se.jsxs)("div",{className:U.actions,children:[w&&(0,se.jsx)("div",{className:U.deleteWrapper,children:(0,se.jsx)("button",{className:U.deleteButton,onClick:w,type:"button",children:(0,se.jsx)(At,{size:22})})}),(0,se.jsx)("button",{className:U.cancel,onClick:Pe,children:"Cancel"}),(0,se.jsx)("button",{className:U.submit,style:{backgroundColor:L,opacity:K.trim()?1:.4},onClick:Ne,disabled:!K.trim(),children:i})]}),(0,se.jsxs)("div",{className:U.shortcutHint,children:[navigator?.platform?.includes("Mac")?"\u2318":"Ctrl","+Enter to submit"]})]})});function vn(e){if(e.parentElement)return e.parentElement;let n=e.getRootNode();return n instanceof ShadowRoot?n.host:null}function en(e,n){let o=e;for(;o;){if(o.matches(n))return o;o=vn(o)}return null}function ns(e,n=4){let o=[],t=e,s=0;for(;t&&s<n;){let r=t.tagName.toLowerCase();if(r==="html"||r==="body")break;let i=r;if(t.id)i=`#${t.id}`;else if(t.className&&typeof t.className=="string"){let m=t.className.split(/\s+/).find(w=>w.length>2&&!w.match(/^[a-z]{1,2}$/)&&!w.match(/[A-Z0-9]{5,}/));m&&(i=`.${m.split("_")[0]}`)}let a=vn(t);!t.parentElement&&a&&(i=`\u27E8shadow\u27E9 ${i}`),o.unshift(i),t=a,s++}return o.join(" > ")}function at(e){let n=ns(e);if(e.dataset.element)return{name:e.dataset.element,path:n};let o=e.tagName.toLowerCase();if(["path","circle","rect","line","g"].includes(o)){let t=en(e,"svg");if(t){let s=vn(t);if(s instanceof HTMLElement)return{name:`graphic in ${at(s).name}`,path:n}}return{name:"graphic element",path:n}}if(o==="svg"){let t=vn(e);if(t?.tagName.toLowerCase()==="button"){let s=t.textContent?.trim();return{name:s?`icon in "${s}" button`:"button icon",path:n}}return{name:"icon",path:n}}if(o==="button"){let t=e.textContent?.trim(),s=e.getAttribute("aria-label");return s?{name:`button [${s}]`,path:n}:{name:t?`button "${t.slice(0,25)}"`:"button",path:n}}if(o==="a"){let t=e.textContent?.trim(),s=e.getAttribute("href");return t?{name:`link "${t.slice(0,25)}"`,path:n}:s?{name:`link to ${s.slice(0,30)}`,path:n}:{name:"link",path:n}}if(o==="input"){let t=e.getAttribute("type")||"text",s=e.getAttribute("placeholder"),r=e.getAttribute("name");return s?{name:`input "${s}"`,path:n}:r?{name:`input [${r}]`,path:n}:{name:`${t} input`,path:n}}if(["h1","h2","h3","h4","h5","h6"].includes(o)){let t=e.textContent?.trim();return{name:t?`${o} "${t.slice(0,35)}"`:o,path:n}}if(o==="p"){let t=e.textContent?.trim();return t?{name:`paragraph: "${t.slice(0,40)}${t.length>40?"...":""}"`,path:n}:{name:"paragraph",path:n}}if(o==="span"||o==="label"){let t=e.textContent?.trim();return t&&t.length<40?{name:`"${t}"`,path:n}:{name:o,path:n}}if(o==="li"){let t=e.textContent?.trim();return t&&t.length<40?{name:`list item: "${t.slice(0,35)}"`,path:n}:{name:"list item",path:n}}if(o==="blockquote")return{name:"blockquote",path:n};if(o==="code"){let t=e.textContent?.trim();return t&&t.length<30?{name:`code: \`${t}\``,path:n}:{name:"code",path:n}}if(o==="pre")return{name:"code block",path:n};if(o==="img"){let t=e.getAttribute("alt");return{name:t?`image "${t.slice(0,30)}"`:"image",path:n}}if(o==="video")return{name:"video",path:n};if(["div","section","article","nav","header","footer","aside","main"].includes(o)){let t=e.className,s=e.getAttribute("role"),r=e.getAttribute("aria-label");if(r)return{name:`${o} [${r}]`,path:n};if(s)return{name:`${s}`,path:n};if(typeof t=="string"&&t){let i=t.split(/[\s_-]+/).map(a=>a.replace(/[A-Z0-9]{5,}.*$/,"")).filter(a=>a.length>2&&!/^[a-z]{1,2}$/.test(a)).slice(0,2);if(i.length>0)return{name:i.join(" "),path:n}}return{name:o==="div"?"container":o,path:n}}return{name:o,path:n}}function Pt(e){let n=[],o=e.textContent?.trim();o&&o.length<100&&n.push(o);let t=e.previousElementSibling;if(t){let r=t.textContent?.trim();r&&r.length<50&&n.unshift(`[before: "${r.slice(0,40)}"]`)}let s=e.nextElementSibling;if(s){let r=s.textContent?.trim();r&&r.length<50&&n.push(`[after: "${r.slice(0,40)}"]`)}return n.join(" ")}function $t(e){let n=e.className;return typeof n!="string"||!n?"":n.split(/\s+/).filter(t=>t.length>0).map(t=>{let s=t.match(/^([a-zA-Z][a-zA-Z0-9_-]*?)(?:_[a-zA-Z0-9]{5,})?$/);return s?s[1]:t}).filter((t,s,r)=>r.indexOf(t)===s).join(", ")}var Bt=new Set(["none","normal","auto","0px","rgba(0, 0, 0, 0)","transparent","static","visible"]),ts=new Set(["p","span","h1","h2","h3","h4","h5","h6","label","li","td","th","blockquote","figcaption","caption","legend","dt","dd","pre","code","em","strong","b","i","a","time","cite","q"]),os=new Set(["input","textarea","select"]),ss=new Set(["img","video","canvas","svg"]),rs=new Set(["div","section","article","nav","header","footer","aside","main","ul","ol","form","fieldset"]);function Ht(e){if(typeof window>"u")return{};let n=window.getComputedStyle(e),o={},t=e.tagName.toLowerCase(),s;ts.has(t)?s=["color","fontSize","fontWeight","fontFamily","lineHeight"]:t==="button"||t==="a"&&e.getAttribute("role")==="button"?s=["backgroundColor","color","padding","borderRadius","fontSize"]:os.has(t)?s=["backgroundColor","color","padding","borderRadius","fontSize"]:ss.has(t)?s=["width","height","objectFit","borderRadius"]:rs.has(t)?s=["display","padding","margin","gap","backgroundColor"]:s=["color","fontSize","margin","padding","backgroundColor"];for(let r of s){let i=r.replace(/([A-Z])/g,"-$1").toLowerCase(),a=n.getPropertyValue(i);a&&!Bt.has(a)&&(o[r]=a)}return o}var is=["color","backgroundColor","borderColor","fontSize","fontWeight","fontFamily","lineHeight","letterSpacing","textAlign","width","height","padding","margin","border","borderRadius","display","position","top","right","bottom","left","zIndex","flexDirection","justifyContent","alignItems","gap","opacity","visibility","overflow","boxShadow","transform"];function zt(e){if(typeof window>"u")return"";let n=window.getComputedStyle(e),o=[];for(let t of is){let s=t.replace(/([A-Z])/g,"-$1").toLowerCase(),r=n.getPropertyValue(s);r&&!Bt.has(r)&&o.push(`${s}: ${r}`)}return o.join("; ")}function Dt(e){let n=[],o=e.getAttribute("role"),t=e.getAttribute("aria-label"),s=e.getAttribute("aria-describedby"),r=e.getAttribute("tabindex"),i=e.getAttribute("aria-hidden");return o&&n.push(`role="${o}"`),t&&n.push(`aria-label="${t}"`),s&&n.push(`aria-describedby="${s}"`),r&&n.push(`tabindex=${r}`),i==="true"&&n.push("aria-hidden"),e.matches("a, button, input, select, textarea, [tabindex]")&&n.push("focusable"),n.join(", ")}function jt(e){let n=[],o=e;for(;o&&o.tagName.toLowerCase()!=="html";){let t=o.tagName.toLowerCase(),s=t;if(o.id)s=`${t}#${o.id}`;else if(o.className&&typeof o.className=="string"){let i=o.className.split(/\s+/).map(a=>a.replace(/[_][a-zA-Z0-9]{5,}.*$/,"")).find(a=>a.length>2);i&&(s=`${t}.${i}`)}let r=vn(o);!o.parentElement&&r&&(s=`\u27E8shadow\u27E9 ${s}`),n.unshift(s),o=r}return n.join(" > ")}var O={FunctionComponent:0,ClassComponent:1,IndeterminateComponent:2,HostRoot:3,HostPortal:4,HostComponent:5,HostText:6,Fragment:7,Mode:8,ContextConsumer:9,ContextProvider:10,ForwardRef:11,Profiler:12,SuspenseComponent:13,MemoComponent:14,SimpleMemoComponent:15,LazyComponent:16,IncompleteClassComponent:17,DehydratedFragment:18,SuspenseListComponent:19,ScopeComponent:21,OffscreenComponent:22,LegacyHiddenComponent:23,CacheComponent:24,TracingMarkerComponent:25,HostHoistable:26,HostSingleton:27,IncompleteFunctionComponent:28,Throw:29,ViewTransitionComponent:30,ActivityComponent:31},Wt=new Set(["Component","PureComponent","Fragment","Suspense","Profiler","StrictMode","Routes","Route","Outlet","Root","ErrorBoundaryHandler","HotReload","Hot"]),Ot=[/Boundary$/,/BoundaryHandler$/,/Provider$/,/Consumer$/,/^(Inner|Outer)/,/Router$/,/^Client(Page|Segment|Root)/,/^Segment(ViewNode|Node)$/,/^LayoutSegment/,/^Server(Root|Component|Render)/,/^RSC/,/Context$/,/^Hot(Reload)?$/,/^(Dev|React)(Overlay|Tools|Root)/,/Overlay$/,/Handler$/,/^With[A-Z]/,/Wrapper$/,/^Root$/],as=[/Page$/,/View$/,/Screen$/,/Section$/,/Card$/,/List$/,/Item$/,/Form$/,/Modal$/,/Dialog$/,/Button$/,/Nav$/,/Header$/,/Footer$/,/Layout$/,/Panel$/,/Tab$/,/Menu$/];function ls(e){let n=e?.mode??"filtered",o=Wt;if(e?.skipExact){let t=e.skipExact instanceof Set?e.skipExact:new Set(e.skipExact);o=new Set([...Wt,...t])}return{maxComponents:e?.maxComponents??6,maxDepth:e?.maxDepth??30,mode:n,skipExact:o,skipPatterns:e?.skipPatterns?[...Ot,...e.skipPatterns]:Ot,userPatterns:e?.userPatterns??as,filter:e?.filter}}function ds(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([A-Z])([A-Z][a-z])/g,"$1-$2").toLowerCase()}function cs(e,n=10){let o=new Set,t=e,s=0;for(;t&&s<n;)t.className&&typeof t.className=="string"&&t.className.split(/\s+/).forEach(r=>{if(r.length>1){let i=r.replace(/[_][a-zA-Z0-9]{5,}.*$/,"").toLowerCase();i.length>1&&o.add(i)}}),t=t.parentElement,s++;return o}function us(e,n){let o=ds(e);for(let t of n){if(t===o)return!0;let s=o.split("-").filter(i=>i.length>2),r=t.split("-").filter(i=>i.length>2);for(let i of s)for(let a of r)if(i===a||i.includes(a)||a.includes(i))return!0}return!1}function _s(e,n,o,t){if(o.filter)return o.filter(e,n);switch(o.mode){case"all":return!0;case"filtered":return!(o.skipExact.has(e)||o.skipPatterns.some(s=>s.test(e)));case"smart":return o.skipExact.has(e)||o.skipPatterns.some(s=>s.test(e))?!1:!!(t&&us(e,t)||o.userPatterns.some(s=>s.test(e)));default:return!0}}var ln=null,ms=new WeakMap;function lt(e){return Object.keys(e).some(n=>n.startsWith("__reactFiber$")||n.startsWith("__reactInternalInstance$")||n.startsWith("__reactProps$"))}function ps(){if(ln!==null)return ln;if(typeof document>"u")return!1;if(document.body&&lt(document.body))return ln=!0,!0;let e=["#root","#app","#__next","[data-reactroot]"];for(let n of e){let o=document.querySelector(n);if(o&&lt(o))return ln=!0,!0}if(document.body){for(let n of document.body.children)if(lt(n))return ln=!0,!0}return ln=!1,!1}var wn={map:ms};function fs(e){return Object.keys(e).find(o=>o.startsWith("__reactFiber$")||o.startsWith("__reactInternalInstance$"))||null}function gs(e){let n=fs(e);return n?e[n]:null}function nn(e){return e?e.displayName?e.displayName:e.name?e.name:null:null}function hs(e){let{tag:n,type:o,elementType:t}=e;if(n===O.HostComponent||n===O.HostText||n===O.HostHoistable||n===O.HostSingleton||n===O.Fragment||n===O.Mode||n===O.Profiler||n===O.DehydratedFragment||n===O.HostRoot||n===O.HostPortal||n===O.ScopeComponent||n===O.OffscreenComponent||n===O.LegacyHiddenComponent||n===O.CacheComponent||n===O.TracingMarkerComponent||n===O.Throw||n===O.ViewTransitionComponent||n===O.ActivityComponent)return null;if(n===O.ForwardRef){let s=t;if(s?.render){let r=nn(s.render);if(r)return r}return s?.displayName?s.displayName:nn(o)}if(n===O.MemoComponent||n===O.SimpleMemoComponent){let s=t;if(s?.type){let r=nn(s.type);if(r)return r}return s?.displayName?s.displayName:nn(o)}if(n===O.ContextProvider){let s=o;return s?._context?.displayName?`${s._context.displayName}.Provider`:null}if(n===O.ContextConsumer){let s=o;return s?.displayName?`${s.displayName}.Consumer`:null}if(n===O.LazyComponent){let s=t;return s?._status===1&&s._result?nn(s._result):null}return n===O.SuspenseComponent||n===O.SuspenseListComponent?null:n===O.IncompleteClassComponent||n===O.IncompleteFunctionComponent||n===O.FunctionComponent||n===O.ClassComponent||n===O.IndeterminateComponent?nn(o):null}function ys(e){return e.length<=2||e.length<=3&&e===e.toLowerCase()}function Vt(e,n){let o=ls(n),t=o.mode==="all";if(t){let m=wn.map.get(e);if(m!==void 0)return m}if(!ps()){let m={path:null,components:[]};return t&&wn.map.set(e,m),m}let s=o.mode==="smart"?cs(e):void 0,r=[];try{let m=gs(e),w=0;for(;m&&w<o.maxDepth&&r.length<o.maxComponents;){let C=hs(m);C&&!ys(C)&&_s(C,w,o,s)&&r.push(C),m=m.return,w++}}catch{let m={path:null,components:[]};return t&&wn.map.set(e,m),m}if(r.length===0){let m={path:null,components:[]};return t&&wn.map.set(e,m),m}let a={path:r.slice().reverse().map(m=>`<${m}>`).join(" "),components:r};return t&&wn.map.set(e,a),a}var Ut=ot(require("react")),Cn={FunctionComponent:0,ClassComponent:1,IndeterminateComponent:2,HostRoot:3,HostPortal:4,HostComponent:5,HostText:6,Fragment:7,Mode:8,ContextConsumer:9,ContextProvider:10,ForwardRef:11,Profiler:12,SuspenseComponent:13,MemoComponent:14,SimpleMemoComponent:15,LazyComponent:16};function bs(e){if(!e||typeof e!="object")return null;let n=Object.keys(e),o=n.find(r=>r.startsWith("__reactFiber$"));if(o)return e[o]||null;let t=n.find(r=>r.startsWith("__reactInternalInstance$"));if(t)return e[t]||null;let s=n.find(r=>{if(!r.startsWith("__react"))return!1;let i=e[r];return i&&typeof i=="object"&&"_debugSource"in i});return s&&e[s]||null}function Sn(e){if(!e.type||typeof e.type=="string")return null;if(typeof e.type=="object"||typeof e.type=="function"){let n=e.type;if(n.displayName)return n.displayName;if(n.name)return n.name}return null}function xs(e,n=50){let o=e,t=0;for(;o&&t<n;){if(o._debugSource)return{source:o._debugSource,componentName:Sn(o)};if(o._debugOwner?._debugSource)return{source:o._debugOwner._debugSource,componentName:Sn(o._debugOwner)};o=o.return,t++}return null}function ks(e){let n=e,o=0,t=50;for(;n&&o<t;){let s=n,r=["_debugSource","__source","_source","debugSource"];for(let i of r){let a=s[i];if(a&&typeof a=="object"&&"fileName"in a)return{source:a,componentName:Sn(n)}}if(n.memoizedProps){let i=n.memoizedProps;if(i.__source&&typeof i.__source=="object"){let a=i.__source;if(a.fileName&&a.lineNumber)return{source:{fileName:a.fileName,lineNumber:a.lineNumber,columnNumber:a.columnNumber},componentName:Sn(n)}}}n=n.return,o++}return null}var On=new Map;function vs(e){let n=e.tag,o=e.type,t=e.elementType;if(typeof o=="string"||o==null||typeof o=="function"&&o.prototype?.isReactComponent)return null;if((n===Cn.FunctionComponent||n===Cn.IndeterminateComponent)&&typeof o=="function")return o;if(n===Cn.ForwardRef&&t){let s=t.render;if(typeof s=="function")return s}if((n===Cn.MemoComponent||n===Cn.SimpleMemoComponent)&&t){let s=t.type;if(typeof s=="function")return s}return typeof o=="function"?o:null}function ws(){let e=Ut.default,n=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;if(n&&"H"in n)return{get:()=>n.H,set:t=>{n.H=t}};let o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;if(o){let t=o.ReactCurrentDispatcher;if(t&&"current"in t)return{get:()=>t.current,set:s=>{t.current=s}}}return null}function Cs(e){let n=e.split(`
333
+ `),o=[/source-location/,/\/dist\/index\./,/\/dist\/react\./,/node_modules\//,/react-dom/,/react\.development/,/react\.production/,/chunk-[A-Z0-9]+/i,/react-stack-bottom-frame/,/react-reconciler/,/scheduler/,/at <anonymous>:/],t=/^\s*at\s+(?:.*?\s+\()?(.+?):(\d+):(\d+)\)?$/,s=/^[^@]*@(.+?):(\d+):(\d+)$/,r=0;for(let i of n){let a=i.trim();if(!a||o.some(w=>w.test(a)))continue;let m=t.exec(a)||s.exec(a);if(m&&(r++,r>=3))return{fileName:m[1],line:parseInt(m[2],10),column:parseInt(m[3],10)}}return null}function Ss(e){let n=e;return n=n.replace(/[?#].*$/,""),n=n.replace(/^turbopack:\/\/\/\[project\]\//,""),n=n.replace(/^webpack-internal:\/\/\/\.\//,""),n=n.replace(/^webpack-internal:\/\/\//,""),n=n.replace(/^webpack:\/\/\/\.\//,""),n=n.replace(/^webpack:\/\/\//,""),n=n.replace(/^turbopack:\/\/\//,""),n=n.replace(/^https?:\/\/[^/]+\//,""),n=n.replace(/^file:\/\/\//,"/"),n=n.replace(/^\([^)]+\)\/\.\//,""),n=n.replace(/^\.\//,""),n}function Ns(e){let n=vs(e);if(!n)return null;if(On.has(n))return On.get(n);let o=ws();if(!o)return On.set(n,null),null;let t=o.get(),s=null;try{let r=new Proxy({},{get(){throw new Error("probe")}});o.set(r);try{n({})}catch(i){if(i instanceof Error&&i.stack){let a=Cs(i.stack);a&&(s={fileName:Ss(a.fileName),lineNumber:a.line,columnNumber:a.column,componentName:Sn(e)||void 0})}}}finally{o.set(t)}return On.set(n,s),s}function Ls(e,n=15){let o=[],t=new Set,s=e,r=0;for(;s&&r<n;){let i=Ns(s);i&&!t.has(i.fileName)&&(t.add(i.fileName),o.push(i)),s=s.return,r++}return o}function Nn(e){let n=bs(e);if(!n)return{found:!1,reason:"no-fiber",isReactApp:!1,isProduction:!1};let o=xs(n);if(o||(o=ks(n)),o?.source)return{found:!0,source:{fileName:o.source.fileName,lineNumber:o.source.lineNumber,columnNumber:o.source.columnNumber,componentName:o.componentName||void 0},isReactApp:!0,isProduction:!1};let t=Ls(n);return t.length>0?{found:!0,source:t[0],sourceCandidates:t,isReactApp:!0,isProduction:!1}:{found:!1,reason:"no-debug-source",isReactApp:!0,isProduction:!1}}function Vn(e,n="path"){let{fileName:o,lineNumber:t,columnNumber:s}=e,r=`${o}:${t}`;return s!==void 0&&(r+=`:${s}`),n==="vscode"?`vscode://file${o.startsWith("/")?"":"/"}${r}`:r}function dt(e,n=10){let o=e,t=0;for(;o&&t<n;){let s=Nn(o);if(s.found)return s;o=o.parentElement,t++}return Nn(e)}async function Un(e,n={}){let{quality:o=.7,maxScale:t=2}=n,s=(await import("html2canvas-pro")).default;return(await s(e,{useCORS:!0,allowTaint:!0,scale:Math.min(window.devicePixelRatio,t),logging:!1})).toDataURL("image/jpeg",o)}async function Kt(e={}){let{quality:n=.5,hideSelectors:o=[]}=e,s=[...["[data-impakers-debug]","[data-annotation-popup]","[data-annotation-marker]"],...o],r=document.querySelectorAll(s.join(", "));try{r.forEach(m=>m.style.visibility="hidden");let i=(await import("html2canvas-pro")).default;return(await i(document.body,{useCORS:!0,allowTaint:!0,scale:1,logging:!1,width:window.innerWidth,height:window.innerHeight})).toDataURL("image/jpeg",n)}catch{return}finally{r.forEach(i=>i.style.visibility="")}}var Re=[],Tn=[],Zt=!1;function ct(e){return e.map(n=>{if(n instanceof Error)return`${n.message}
334
334
  ${n.stack?.split(`
335
335
  `).slice(0,3).join(`
336
- `)}`;if(typeof n=="object"&&n!==null)try{return JSON.stringify(n).slice(0,300)}catch{return String(n)}return String(n)}).join(" ")}function Nn(e,n){Ln.push({level:e,message:n.slice(0,500),timestamp:Date.now()}),Ln.length>50&&Ln.shift()}function Ts(){if(Zt||typeof window>"u")return;Zt=!0;let e=console.error,n=console.warn,o=console.log;console.error=(...t)=>{let s=ct(t);Me.push(s.slice(0,500)),Me.length>20&&Me.shift(),Nn("error",s),e.apply(console,t)},console.warn=(...t)=>{let s=ct(t);Me.push(`[warn] ${s}`.slice(0,500)),Me.length>20&&Me.shift(),Nn("warn",s),n.apply(console,t)},console.log=(...t)=>{Nn("log",ct(t)),o.apply(console,t)},window.addEventListener("error",t=>{let s=`${t.message} (${t.filename}:${t.lineno})`;Me.push(s.slice(0,500)),Me.length>20&&Me.shift(),Nn("error",s)}),window.addEventListener("unhandledrejection",t=>{let s=`Unhandled Promise: ${t.reason}`;Me.push(s.slice(0,500)),Me.length>20&&Me.shift(),Nn("error",s)})}Ts();function Is(e){let n=e.match(/Edg\/(\d+[\d.]*)/);if(n)return`Edge ${n[1]}`;let o=e.match(/Chrome\/(\d+[\d.]*)/);if(o&&!e.includes("Edg/")&&!e.includes("OPR/"))return`Chrome ${o[1]}`;let t=e.match(/Firefox\/(\d+[\d.]*)/);if(t)return`Firefox ${t[1]}`;let s=e.match(/Version\/(\d+[\d.]*).*Safari/);if(s)return`Safari ${s[1]}`;let r=e.match(/OPR\/(\d+[\d.]*)/);return r?`Opera ${r[1]}`:e}var Es=[/session/i,/csrf/i,/xsrf/i,/secret/i,/password/i,/key/i];function Rs(){if(typeof document>"u")return{};let e={};try{document.cookie.split(";").forEach(n=>{let[o,...t]=n.trim().split("=");if(!o)return;let s=o.trim(),r=Es.some(i=>i.test(s));e[s]=r?"[masked]":decodeURIComponent(t.join("=")).slice(0,200)})}catch{}return e}function Xt(e){try{let n=e.split(".");if(n.length!==3)return null;let o=n[1].replace(/-/g,"+").replace(/_/g,"/"),t=o+"==".slice(0,(4-o.length%4)%4);return JSON.parse(atob(t))}catch{return null}}function Ms(){if(typeof window>"u")return null;let e=["token","access_token","accessToken","auth_token","authToken","jwt","id_token","idToken"];for(let n of e)try{let o=localStorage.getItem(n);if(o){let t=o.startsWith('"')?JSON.parse(o):o,s=Xt(t);if(s){let r={},i=["sub","email","name","role","roles","org","iat","exp","aud","iss","user_id","user_role"];for(let a of i)a in s&&(r[a]=s[a]);return Object.keys(r).length>0?r:null}}}catch{continue}try{let n=document.cookie.split(";");for(let o of n){let[,...t]=o.trim().split("="),s=t.join("="),r=Xt(s);if(r&&r.sub){let i={},a=["sub","email","name","role","roles","org","iat","exp"];for(let m of a)m in r&&(i[m]=r[m]);return Object.keys(i).length>0?i:null}}}catch{}return null}function ln(e){let n=Math.round(e);return isNaN(n)||!isFinite(n)?void 0:n}function As(){if(typeof performance>"u")return{};let e={};try{let n=performance.getEntriesByType("navigation")[0];if(n){let s=ln(n.loadEventEnd-n.startTime),r=ln(n.domContentLoadedEventEnd-n.startTime),i=ln(n.responseStart-n.requestStart);s&&(e.pageLoadTime=s),r&&(e.domContentLoaded=r),i&&(e.ttfb=i)}let o=performance.getEntriesByName("first-contentful-paint")[0];if(o){let s=ln(o.startTime);s&&(e.firstContentfulPaint=s)}let t=performance.memory;if(t){let s=ln(t.usedJSHeapSize/1024/1024),r=ln(t.totalJSHeapSize/1024/1024);s&&(e.usedJSHeapMB=s),r&&(e.totalJSHeapMB=r)}}catch{}return e}function Yt(e){let n={url:window.location.href,timestamp:new Date().toISOString(),browser:Is(navigator.userAgent),userAgent:navigator.userAgent,viewport:`${window.innerWidth}x${window.innerHeight}`,pixelRatio:window.devicePixelRatio,language:navigator.language,referrer:document.referrer,cookies:Rs(),jwtClaims:Ms()??void 0,consoleErrors:Me.length>0?[...Me]:void 0,consoleLogs:Ln.length>0?[...Ln]:void 0,performance:As()};if(e)try{let o=e();o&&(n.user={...o,id:String(o.id),name:String(o.name||"")})}catch{}return n}var Fs="/_next/static/chunks/impakers-debug-route-manifest.json",Kn=null,Zn=!1;function Qt(e){return!e||e==="/"?"/":e.endsWith("/")?e.slice(0,-1)||"/":e}function Ps(e){let n=Qt(e);return n==="/"?[]:n.slice(1).split("/").map(o=>decodeURIComponent(o)).filter(Boolean)}function $s(e){return/^\[[^\]]+\]$/.test(e)}function Bs(e){return/^\[\.\.\.[^\]]+\]$/.test(e)}function Hs(e){return/^\[\[\.\.\.[^\]]+\]\]$/.test(e)}function zs(e,n){let o=0,t=0,s=0;for(;o<e.length;){let r=e[o];if(Hs(r)){s+=1,t=n.length,o+=1;break}if(Bs(r)){if(t>=n.length)return null;s+=2,t=n.length,o+=1;break}let i=n[t];if(i===void 0)return null;if($s(r)){s+=5,o+=1,t+=1;continue}if(r!==i)return null;s+=20,o+=1,t+=1}return o!==e.length||t!==n.length?null:s}async function Ds(){return Zn?null:Kn||(Kn=(async()=>{try{let e=await fetch(Fs,{cache:"force-cache"});if(!e.ok)return Zn=!0,null;let n=await e.json();return!n||typeof n!="object"||!Array.isArray(n.entries)?(Zn=!0,null):n}catch{return Zn=!0,null}})(),Kn)}function js(e){let n=e.files.find(s=>s.kind==="page"),o=e.files.filter(s=>s.kind==="layout"),t=[];return n&&t.push({kind:"route-page",file:n.file,label:"Current page route",confidence:1,reason:"matched-current-url"}),o.forEach((s,r)=>{t.push({kind:"route-layout",file:s.file,label:r===o.length-1?"Nearest layout":"Ancestor layout",confidence:Math.max(.7,.95-r*.08),reason:"matched-layout-chain"})}),t}async function qt(e){if(typeof window>"u")return null;let n=e??window.location.pathname,o=await Ds();if(!o)return null;let t=Ps(n),s=null,r=-1;for(let i of o.entries){let a=zs(i.segments,t);a!==null&&a>r&&(r=a,s=i)}return s?{targets:js(s),context:{pathname:Qt(n),matchedRoute:s.route,source:"next-route-manifest"}}:null}function Gt(...e){let n=[],o=new Set;return e.forEach(t=>{t?.forEach(s=>{let r=`${s.kind}:${s.file}:${s.line??""}:${s.column??""}`;o.has(r)||(o.add(r),n.push(s))})}),n.sort((t,s)=>s.confidence-t.confidence)}function Jt(){let e=Ge();if(!e)throw new Error("\uC778\uC99D\uC774 \uD544\uC694\uD569\uB2C8\uB2E4");return e}async function Ue(e,n={}){let o=Jt(),t=await fetch(e,{...n,headers:{"Content-Type":"application/json",Authorization:`Bearer ${o}`,...n.headers}});if(!t.ok){if(t.status===401)throw new Error("\uC778\uC99D\uC774 \uB9CC\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.");let s=await t.json().catch(()=>({error:"\uC694\uCCAD \uC2E4\uD328"}));throw new Error(s.error||s.message||"\uC694\uCCAD \uC2E4\uD328")}return t}var Xn=new Map,ut=new Map,Tn=new Map,Ws=3e4;function Ye(e){return`feedbacks:${e}`}function dn(){return"feedbacks:__all__"}function qe(e){return`comments:${e}`}function Oe(e,n){Xn.set(e,{data:n,timestamp:Date.now()});let o=Tn.get(e);o&&o.forEach(t=>t(n))}function Qe(e){return Xn.get(e)?.data??null}function Os(e){let n=Xn.get(e);return n?Date.now()-n.timestamp<=Ws:!1}function mt(e){return Array.from(Xn.keys()).filter(n=>n.includes(e))}function Vs(e){let n=new Map;for(let o of mt(e)){let t=Qe(o);t!==null&&n.set(o,t)}return n}function Us(e){e.forEach((n,o)=>Oe(o,n))}function _t(e,n){let o=n(Qe(e));return Oe(e,o),o}function Ks(e,n){for(let o of mt(e)){let t=Qe(o);t!==null&&Oe(o,n(t))}}async function In(e,n){let o=ut.get(e);if(o)return o;let t=(async()=>{try{let s=await n();return Oe(e,s),s}finally{ut.delete(e)}})();return ut.set(e,t),t}async function pt(e,n,o={}){let t=Qe(e);return t!==null&&!o.force?((o.staleWhileRevalidate||!Os(e))&&In(e,n),t):In(e,n)}function En(e,n){let o=Tn.get(e)||new Set;return o.add(n),Tn.set(e,o),()=>{let t=Tn.get(e);t&&(t.delete(n),t.size===0&&Tn.delete(e))}}function cn(e){return Qe(e)}async function eo(e,n){let o=`temp-task-${Date.now()}`,t=n.feedbackUrl,s=n.feedbackMarker,r=t?Qe(Ye(t))||[]:null,i=Qe(dn()),a=t?{id:o,taskNumber:0,title:n.title,status:"todo",priority:n.priority,feedbackUrl:t,feedbackMarker:s||null,createdAt:new Date().toISOString(),commentCount:0,_optimistic:!0}:null;t&&a&&(Oe(Ye(t),[a,...r]),i&&Oe(dn(),[a,...i]));try{let C=await(await Ue(e,{method:"POST",body:JSON.stringify(n)})).json().catch(()=>({}));if(t&&a){let w={...a,id:C.taskId||o,taskNumber:C.taskNumber||0,_optimistic:!1};_t(Ye(t),L=>(L||[]).map(T=>T.id===o?w:T)),i&&_t(dn(),L=>(L||[]).map(T=>T.id===o?w:T)),oo(e,t).catch(()=>{}),i&&so(e).catch(()=>{})}return C}catch(m){throw t&&r&&Oe(Ye(t),r),i&&Oe(dn(),i),m}}async function no(e,n,o={}){let t=Ye(n);return pt(t,async()=>(await(await Ue(`${e}?url=${encodeURIComponent(n)}`)).json()).tasks||[],o)}async function to(e,n={}){let o=dn();return pt(o,async()=>(await(await Ue(`${e}?url=__all__`)).json()).tasks||[],n)}async function oo(e,n){let o=Ye(n);return In(o,async()=>(await(await Ue(`${e}?url=${encodeURIComponent(n)}`)).json()).tasks||[])}async function so(e){let n=dn();return In(n,async()=>(await(await Ue(`${e}?url=__all__`)).json()).tasks||[])}async function Yn(e,n,o={}){let t=qe(n);return pt(t,async()=>(await(await Ue(`${e}/${n}/comments`)).json()).comments||[],o)}async function Zs(e,n){let o=qe(n);return In(o,async()=>(await(await Ue(`${e}/${n}/comments`)).json()).comments||[])}function Xs(e,n){Ks("feedbacks:",o=>o.map(t=>t.id===e?{...t,commentCount:Math.max(0,(t.commentCount||0)+n)}:t))}function Ys(e){mt("feedbacks:").forEach(o=>{let t=o.replace("feedbacks:","");t==="__all__"?so(e).catch(()=>{}):oo(e,t).catch(()=>{})})}async function Qn(e,n,o,t,s,r,i){let a={id:`temp-${Date.now()}`,content:o,authorName:t,authorId:s,imageUrl:r||void 0,fileUrl:i?.url,fileName:i?.fileName,fileType:i?.fileType,fileSize:i?.fileSize,fileSource:i?.fileSource,createdAt:new Date().toISOString()},m=qe(n),C=Qe(m)||[],w=Vs("feedbacks:");Oe(m,[...C,a]),Xs(n,1);try{let E=(await(await Ue(`${e}/${n}/comments`,{method:"POST",body:JSON.stringify({content:o,authorName:t,authorId:s,screenshot:r,...i&&{fileUrl:i.url,fileName:i.fileName,fileType:i.fileType,fileSize:i.fileSize,fileSource:i.fileSource}})})).json()).comment;return _t(m,M=>(M||[]).map(j=>j.id===a.id?E:j)),Zs(e,n),Ys(e),E}catch(L){throw Oe(m,C),Us(w),L}}var Qs=4.5*1024*1024;async function qn(e,n,o,t){if(n.size>Qs)throw new Error(`\uD30C\uC77C \uD06C\uAE30\uAC00 4.5MB\uB97C \uCD08\uACFC\uD569\uB2C8\uB2E4. (${(n.size/1024/1024).toFixed(1)}MB)`);let s=Jt(),r=new FormData;r.append("file",n),r.append("context",o),t&&r.append("taskId",t);let i=await fetch(`${e}/upload`,{method:"POST",headers:{Authorization:`Bearer ${s}`},body:r});if(!i.ok){if(i.status===401)throw new Error("\uC778\uC99D\uC774 \uB9CC\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.");if(i.status===413)throw new Error("\uD30C\uC77C \uD06C\uAE30\uAC00 4.5MB\uB97C \uCD08\uACFC\uD569\uB2C8\uB2E4.");let a=await i.json().catch(()=>({error:"\uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328"}));throw new Error(a.error||"\uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328")}return i.json()}async function Gn(e,n={}){let o=new URLSearchParams;n.since&&o.set("since",n.since),n.date&&o.set("date",n.date),n.limit&&o.set("limit",String(n.limit));let t=o.toString(),s=`${e}/history${t?`?${t}`:""}`;return(await(await Ue(s)).json()).events||[]}var Mn=require("@jridgewell/trace-mapping"),Rn=new Map,ro=new Set;async function qs(e){try{let n=await fetch(e,{cache:"force-cache"});if(!n.ok)return null;let t=(await n.text()).match(/\/\/[#@]\s*sourceMappingURL\s*=\s*(\S+)\s*$/m);if(!t)return null;let s=t[1];return s.startsWith("http")?s:e.substring(0,e.lastIndexOf("/")+1)+s}catch{return null}}async function Gs(e){if(Rn.has(e))return Rn.get(e)??null;if(ro.has(e))return null;let n=e.endsWith(".map")?e:`${e}.map`;try{let t=await fetch(n,{cache:"force-cache"});if(t.ok){let s=await t.json(),r=new Mn.AnyMap(s);return Rn.set(e,r),r}}catch{}let o=await qs(e);if(o)try{let t=await fetch(o,{cache:"force-cache"});if(t.ok){let s=await t.json(),r=new Mn.AnyMap(s);return Rn.set(e,r),r}}catch{}return ro.add(e),Rn.set(e,null),null}async function Js(e,n,o){let t;try{e.startsWith("http")?t=e:t=new URL(e,window.location.origin).href}catch{return null}let s=await Gs(t);if(!s)return null;try{let r=(0,Mn.originalPositionFor)(s,{line:n,column:o});if(!r.source)return null;let i=r.source;return i=i.replace(/^webpack:\/\/\//,""),i=i.replace(/^turbopack:\/\/\//,""),i=i.replace(/^\[project\]\//,""),i=i.replace(/^\.\//,""),i.includes("node_modules/")?null:{source:i,line:r.line??0,column:r.column??0,name:r.name??null}}catch{return null}}async function ft(e){if(!e)return null;let n=e.match(/^(.+):(\d+):(\d+)$/);if(!n)return null;let[,o,t,s]=n,r=parseInt(t,10),i=parseInt(s,10);return isNaN(r)||isNaN(i)?null:Js(o,r,i)}var er=`@keyframes styles-module__markerIn___7B1j9 {
336
+ `)}`;if(typeof n=="object"&&n!==null)try{return JSON.stringify(n).slice(0,300)}catch{return String(n)}return String(n)}).join(" ")}function Ln(e,n){Tn.push({level:e,message:n.slice(0,500),timestamp:Date.now()}),Tn.length>50&&Tn.shift()}function Ts(){if(Zt||typeof window>"u")return;Zt=!0;let e=console.error,n=console.warn,o=console.log;console.error=(...t)=>{let s=ct(t);Re.push(s.slice(0,500)),Re.length>20&&Re.shift(),Ln("error",s),e.apply(console,t)},console.warn=(...t)=>{let s=ct(t);Re.push(`[warn] ${s}`.slice(0,500)),Re.length>20&&Re.shift(),Ln("warn",s),n.apply(console,t)},console.log=(...t)=>{Ln("log",ct(t)),o.apply(console,t)},window.addEventListener("error",t=>{let s=`${t.message} (${t.filename}:${t.lineno})`;Re.push(s.slice(0,500)),Re.length>20&&Re.shift(),Ln("error",s)}),window.addEventListener("unhandledrejection",t=>{let s=`Unhandled Promise: ${t.reason}`;Re.push(s.slice(0,500)),Re.length>20&&Re.shift(),Ln("error",s)})}Ts();function Is(e){let n=e.match(/Edg\/(\d+[\d.]*)/);if(n)return`Edge ${n[1]}`;let o=e.match(/Chrome\/(\d+[\d.]*)/);if(o&&!e.includes("Edg/")&&!e.includes("OPR/"))return`Chrome ${o[1]}`;let t=e.match(/Firefox\/(\d+[\d.]*)/);if(t)return`Firefox ${t[1]}`;let s=e.match(/Version\/(\d+[\d.]*).*Safari/);if(s)return`Safari ${s[1]}`;let r=e.match(/OPR\/(\d+[\d.]*)/);return r?`Opera ${r[1]}`:e}var Es=[/session/i,/csrf/i,/xsrf/i,/secret/i,/password/i,/key/i];function Rs(){if(typeof document>"u")return{};let e={};try{document.cookie.split(";").forEach(n=>{let[o,...t]=n.trim().split("=");if(!o)return;let s=o.trim(),r=Es.some(i=>i.test(s));e[s]=r?"[masked]":decodeURIComponent(t.join("=")).slice(0,200)})}catch{}return e}function Xt(e){try{let n=e.split(".");if(n.length!==3)return null;let o=n[1].replace(/-/g,"+").replace(/_/g,"/"),t=o+"==".slice(0,(4-o.length%4)%4);return JSON.parse(atob(t))}catch{return null}}function Ms(){if(typeof window>"u")return null;let e=["token","access_token","accessToken","auth_token","authToken","jwt","id_token","idToken"];for(let n of e)try{let o=localStorage.getItem(n);if(o){let t=o.startsWith('"')?JSON.parse(o):o,s=Xt(t);if(s){let r={},i=["sub","email","name","role","roles","org","iat","exp","aud","iss","user_id","user_role"];for(let a of i)a in s&&(r[a]=s[a]);return Object.keys(r).length>0?r:null}}}catch{continue}try{let n=document.cookie.split(";");for(let o of n){let[,...t]=o.trim().split("="),s=t.join("="),r=Xt(s);if(r&&r.sub){let i={},a=["sub","email","name","role","roles","org","iat","exp"];for(let m of a)m in r&&(i[m]=r[m]);return Object.keys(i).length>0?i:null}}}catch{}return null}function dn(e){let n=Math.round(e);return isNaN(n)||!isFinite(n)?void 0:n}function As(){if(typeof performance>"u")return{};let e={};try{let n=performance.getEntriesByType("navigation")[0];if(n){let s=dn(n.loadEventEnd-n.startTime),r=dn(n.domContentLoadedEventEnd-n.startTime),i=dn(n.responseStart-n.requestStart);s&&(e.pageLoadTime=s),r&&(e.domContentLoaded=r),i&&(e.ttfb=i)}let o=performance.getEntriesByName("first-contentful-paint")[0];if(o){let s=dn(o.startTime);s&&(e.firstContentfulPaint=s)}let t=performance.memory;if(t){let s=dn(t.usedJSHeapSize/1024/1024),r=dn(t.totalJSHeapSize/1024/1024);s&&(e.usedJSHeapMB=s),r&&(e.totalJSHeapMB=r)}}catch{}return e}function Yt(e){let n={url:window.location.href,timestamp:new Date().toISOString(),browser:Is(navigator.userAgent),userAgent:navigator.userAgent,viewport:`${window.innerWidth}x${window.innerHeight}`,pixelRatio:window.devicePixelRatio,language:navigator.language,referrer:document.referrer,cookies:Rs(),jwtClaims:Ms()??void 0,consoleErrors:Re.length>0?[...Re]:void 0,consoleLogs:Tn.length>0?[...Tn]:void 0,performance:As()};if(e)try{let o=e();o&&(n.user={...o,id:String(o.id),name:String(o.name||"")})}catch{}return n}var Fs="/_next/static/chunks/impakers-debug-route-manifest.json",Kn=null,Zn=!1;function Qt(e){return!e||e==="/"?"/":e.endsWith("/")?e.slice(0,-1)||"/":e}function Ps(e){let n=Qt(e);return n==="/"?[]:n.slice(1).split("/").map(o=>decodeURIComponent(o)).filter(Boolean)}function $s(e){return/^\[[^\]]+\]$/.test(e)}function Bs(e){return/^\[\.\.\.[^\]]+\]$/.test(e)}function Hs(e){return/^\[\[\.\.\.[^\]]+\]\]$/.test(e)}function zs(e,n){let o=0,t=0,s=0;for(;o<e.length;){let r=e[o];if(Hs(r)){s+=1,t=n.length,o+=1;break}if(Bs(r)){if(t>=n.length)return null;s+=2,t=n.length,o+=1;break}let i=n[t];if(i===void 0)return null;if($s(r)){s+=5,o+=1,t+=1;continue}if(r!==i)return null;s+=20,o+=1,t+=1}return o!==e.length||t!==n.length?null:s}async function Ds(){return Zn?null:Kn||(Kn=(async()=>{try{let e=await fetch(Fs,{cache:"force-cache"});if(!e.ok)return Zn=!0,null;let n=await e.json();return!n||typeof n!="object"||!Array.isArray(n.entries)?(Zn=!0,null):n}catch{return Zn=!0,null}})(),Kn)}function js(e){let n=e.files.find(s=>s.kind==="page"),o=e.files.filter(s=>s.kind==="layout"),t=[];return n&&t.push({kind:"route-page",file:n.file,label:"Current page route",confidence:1,reason:"matched-current-url"}),o.forEach((s,r)=>{t.push({kind:"route-layout",file:s.file,label:r===o.length-1?"Nearest layout":"Ancestor layout",confidence:Math.max(.7,.95-r*.08),reason:"matched-layout-chain"})}),t}async function qt(e){if(typeof window>"u")return null;let n=e??window.location.pathname,o=await Ds();if(!o)return null;let t=Ps(n),s=null,r=-1;for(let i of o.entries){let a=zs(i.segments,t);a!==null&&a>r&&(r=a,s=i)}return s?{targets:js(s),context:{pathname:Qt(n),matchedRoute:s.route,source:"next-route-manifest"}}:null}function Gt(...e){let n=[],o=new Set;return e.forEach(t=>{t?.forEach(s=>{let r=`${s.kind}:${s.file}:${s.line??""}:${s.column??""}`;o.has(r)||(o.add(r),n.push(s))})}),n.sort((t,s)=>s.confidence-t.confidence)}function Jt(){let e=Je();if(!e)throw new Error("\uC778\uC99D\uC774 \uD544\uC694\uD569\uB2C8\uB2E4");return e}async function Ue(e,n={}){let o=Jt(),t=await fetch(e,{...n,headers:{"Content-Type":"application/json",Authorization:`Bearer ${o}`,...n.headers}});if(!t.ok){if(t.status===401)throw new Error("\uC778\uC99D\uC774 \uB9CC\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.");let s=await t.json().catch(()=>({error:"\uC694\uCCAD \uC2E4\uD328"}));throw new Error(s.error||s.message||"\uC694\uCCAD \uC2E4\uD328")}return t}var Xn=new Map,ut=new Map,In=new Map,Ws=3e4;function Qe(e){return`feedbacks:${e}`}function cn(){return"feedbacks:__all__"}function Ge(e){return`comments:${e}`}function Oe(e,n){Xn.set(e,{data:n,timestamp:Date.now()});let o=In.get(e);o&&o.forEach(t=>t(n))}function qe(e){return Xn.get(e)?.data??null}function Os(e){let n=Xn.get(e);return n?Date.now()-n.timestamp<=Ws:!1}function mt(e){return Array.from(Xn.keys()).filter(n=>n.includes(e))}function Vs(e){let n=new Map;for(let o of mt(e)){let t=qe(o);t!==null&&n.set(o,t)}return n}function Us(e){e.forEach((n,o)=>Oe(o,n))}function _t(e,n){let o=n(qe(e));return Oe(e,o),o}function Ks(e,n){for(let o of mt(e)){let t=qe(o);t!==null&&Oe(o,n(t))}}async function En(e,n){let o=ut.get(e);if(o)return o;let t=(async()=>{try{let s=await n();return Oe(e,s),s}finally{ut.delete(e)}})();return ut.set(e,t),t}async function pt(e,n,o={}){let t=qe(e);return t!==null&&!o.force?((o.staleWhileRevalidate||!Os(e))&&En(e,n),t):En(e,n)}function Rn(e,n){let o=In.get(e)||new Set;return o.add(n),In.set(e,o),()=>{let t=In.get(e);t&&(t.delete(n),t.size===0&&In.delete(e))}}function un(e){return qe(e)}async function eo(e,n){let o=`temp-task-${Date.now()}`,t=n.feedbackUrl,s=n.feedbackMarker,r=t?qe(Qe(t))||[]:null,i=qe(cn()),a=t?{id:o,taskNumber:0,title:n.title,status:"todo",priority:n.priority,feedbackUrl:t,feedbackMarker:s||null,createdAt:new Date().toISOString(),commentCount:0,_optimistic:!0}:null;t&&a&&(Oe(Qe(t),[a,...r]),i&&Oe(cn(),[a,...i]));try{let w=await(await Ue(e,{method:"POST",body:JSON.stringify(n)})).json().catch(()=>({}));if(t&&a){let C={...a,id:w.taskId||o,taskNumber:w.taskNumber||0,_optimistic:!1};_t(Qe(t),L=>(L||[]).map(T=>T.id===o?C:T)),i&&_t(cn(),L=>(L||[]).map(T=>T.id===o?C:T)),oo(e,t).catch(()=>{}),i&&so(e).catch(()=>{})}return w}catch(m){throw t&&r&&Oe(Qe(t),r),i&&Oe(cn(),i),m}}async function no(e,n,o={}){let t=Qe(n);return pt(t,async()=>(await(await Ue(`${e}?url=${encodeURIComponent(n)}`)).json()).tasks||[],o)}async function to(e,n={}){let o=cn();return pt(o,async()=>(await(await Ue(`${e}?url=__all__`)).json()).tasks||[],n)}async function oo(e,n){let o=Qe(n);return En(o,async()=>(await(await Ue(`${e}?url=${encodeURIComponent(n)}`)).json()).tasks||[])}async function so(e){let n=cn();return En(n,async()=>(await(await Ue(`${e}?url=__all__`)).json()).tasks||[])}async function Yn(e,n,o={}){let t=Ge(n);return pt(t,async()=>(await(await Ue(`${e}/${n}/comments`)).json()).comments||[],o)}async function Zs(e,n){let o=Ge(n);return En(o,async()=>(await(await Ue(`${e}/${n}/comments`)).json()).comments||[])}function Xs(e,n){Ks("feedbacks:",o=>o.map(t=>t.id===e?{...t,commentCount:Math.max(0,(t.commentCount||0)+n)}:t))}function Ys(e){mt("feedbacks:").forEach(o=>{let t=o.replace("feedbacks:","");t==="__all__"?so(e).catch(()=>{}):oo(e,t).catch(()=>{})})}async function Qn(e,n,o,t,s,r,i){let a={id:`temp-${Date.now()}`,content:o,authorName:t,authorId:s,imageUrl:r||void 0,fileUrl:i?.url,fileName:i?.fileName,fileType:i?.fileType,fileSize:i?.fileSize,fileSource:i?.fileSource,createdAt:new Date().toISOString()},m=Ge(n),w=qe(m)||[],C=Vs("feedbacks:");Oe(m,[...w,a]),Xs(n,1);try{let I=(await(await Ue(`${e}/${n}/comments`,{method:"POST",body:JSON.stringify({content:o,authorName:t,authorId:s,screenshot:r,...i&&{fileUrl:i.url,fileName:i.fileName,fileType:i.fileType,fileSize:i.fileSize,fileSource:i.fileSource}})})).json()).comment;return _t(m,M=>(M||[]).map(j=>j.id===a.id?I:j)),Zs(e,n),Ys(e),I}catch(L){throw Oe(m,w),Us(C),L}}var Qs=4.5*1024*1024;async function qn(e,n,o,t){if(n.size>Qs)throw new Error(`\uD30C\uC77C \uD06C\uAE30\uAC00 4.5MB\uB97C \uCD08\uACFC\uD569\uB2C8\uB2E4. (${(n.size/1024/1024).toFixed(1)}MB)`);let s=Jt(),r=new FormData;r.append("file",n),r.append("context",o),t&&r.append("taskId",t);let i=await fetch(`${e}/upload`,{method:"POST",headers:{Authorization:`Bearer ${s}`},body:r});if(!i.ok){if(i.status===401)throw new Error("\uC778\uC99D\uC774 \uB9CC\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4.");if(i.status===413)throw new Error("\uD30C\uC77C \uD06C\uAE30\uAC00 4.5MB\uB97C \uCD08\uACFC\uD569\uB2C8\uB2E4.");let a=await i.json().catch(()=>({error:"\uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328"}));throw new Error(a.error||"\uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328")}return i.json()}async function Gn(e,n={}){let o=new URLSearchParams;n.since&&o.set("since",n.since),n.date&&o.set("date",n.date),n.limit&&o.set("limit",String(n.limit));let t=o.toString(),s=`${e}/history${t?`?${t}`:""}`;return(await(await Ue(s)).json()).events||[]}var An=require("@jridgewell/trace-mapping"),Mn=new Map,ro=new Set;async function qs(e){try{let n=await fetch(e,{cache:"force-cache"});if(!n.ok)return null;let t=(await n.text()).match(/\/\/[#@]\s*sourceMappingURL\s*=\s*(\S+)\s*$/m);if(!t)return null;let s=t[1];return s.startsWith("http")?s:e.substring(0,e.lastIndexOf("/")+1)+s}catch{return null}}async function Gs(e){if(Mn.has(e))return Mn.get(e)??null;if(ro.has(e))return null;let n=e.endsWith(".map")?e:`${e}.map`;try{let t=await fetch(n,{cache:"force-cache"});if(t.ok){let s=await t.json(),r=new An.AnyMap(s);return Mn.set(e,r),r}}catch{}let o=await qs(e);if(o)try{let t=await fetch(o,{cache:"force-cache"});if(t.ok){let s=await t.json(),r=new An.AnyMap(s);return Mn.set(e,r),r}}catch{}return ro.add(e),Mn.set(e,null),null}async function Js(e,n,o){let t;try{e.startsWith("http")?t=e:t=new URL(e,window.location.origin).href}catch{return null}let s=await Gs(t);if(!s)return null;try{let r=(0,An.originalPositionFor)(s,{line:n,column:o});if(!r.source)return null;let i=r.source;return i=i.replace(/^webpack:\/\/\//,""),i=i.replace(/^turbopack:\/\/\//,""),i=i.replace(/^\[project\]\//,""),i=i.replace(/^\.\//,""),i.includes("node_modules/")?null:{source:i,line:r.line??0,column:r.column??0,name:r.name??null}}catch{return null}}async function ft(e){if(!e)return null;let n=e.match(/^(.+):(\d+):(\d+)$/);if(!n)return null;let[,o,t,s]=n,r=parseInt(t,10),i=parseInt(s,10);return isNaN(r)||isNaN(i)?null:Js(o,r,i)}var er=`@keyframes styles-module__markerIn___7B1j9 {
337
337
  from {
338
338
  opacity: 0;
339
339
  transform: translate(-50%, -50%) scale(0.3);
@@ -440,7 +440,7 @@ ${n.stack?.split(`
440
440
  margin-top: 2px;
441
441
  overflow: hidden;
442
442
  text-overflow: ellipsis;
443
- }`,nr={marker:"styles-module__marker___7PVX9",enter:"styles-module__enter___V7KfW",markerIn:"styles-module__markerIn___7B1j9",hovered:"styles-module__hovered___ojzb7",done:"styles-module__done___J6WOE",pending:"styles-module__pending___qQbOR",markerTooltip:"styles-module__markerTooltip___ns-gQ",tooltipIn:"styles-module__tooltipIn___3o7t0",markerQuote:"styles-module__markerQuote___1bRQp",markerNote:"styles-module__markerNote___3iWm4"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-annotation-marker-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-annotation-marker-styles",document.head.appendChild(e)),e.textContent=er}var De=nr;var je=require("react/jsx-runtime"),tr="#3b82f6",or="#9ca3af";function gt({annotation:e,layerIndex:n,isAnimated:o,isHovered:t,accentColor:s,onHover:r,onHoverEnd:i,onClick:a}){let m=o?"":De.enter,C=e.status==="done"||e.status==="resolved",w=e.status==="in_progress",L=C?or:w?tr:s;return(0,je.jsxs)("div",{className:`${De.marker} ${m} ${t?De.hovered:""} ${C?De.done:""}`,"data-annotation-marker":!0,style:{left:`${e.x}%`,top:e.y,backgroundColor:L,animationDelay:`${n*20}ms`},onMouseEnter:r,onMouseLeave:i,onClick:T=>{T.stopPropagation(),a()},children:[(0,je.jsx)("span",{children:n+1}),t&&(0,je.jsxs)("div",{className:`${De.markerTooltip} ${De.enter}`,children:[(0,je.jsx)("span",{className:De.markerQuote,children:e.element}),e.comment&&(0,je.jsx)("span",{className:De.markerNote,children:e.comment})]})]})}function io({x:e,y:n,accentColor:o}){return(0,je.jsx)("div",{className:`${De.pending} ${De.enter}`,"data-annotation-marker":!0,style:{left:`${e}%`,top:n,backgroundColor:o},children:(0,je.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",children:[(0,je.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,je.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})})}var ae=require("react");var sr=`@keyframes styles-module__spin___h0C6p {
443
+ }`,nr={marker:"styles-module__marker___7PVX9",enter:"styles-module__enter___V7KfW",markerIn:"styles-module__markerIn___7B1j9",hovered:"styles-module__hovered___ojzb7",done:"styles-module__done___J6WOE",pending:"styles-module__pending___qQbOR",markerTooltip:"styles-module__markerTooltip___ns-gQ",tooltipIn:"styles-module__tooltipIn___3o7t0",markerQuote:"styles-module__markerQuote___1bRQp",markerNote:"styles-module__markerNote___3iWm4"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-annotation-marker-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-annotation-marker-styles",document.head.appendChild(e)),e.textContent=er}var De=nr;var je=require("react/jsx-runtime"),tr="#3b82f6",or="#9ca3af";function gt({annotation:e,layerIndex:n,isAnimated:o,isHovered:t,accentColor:s,onHover:r,onHoverEnd:i,onClick:a}){let m=o?"":De.enter,w=e.status==="done"||e.status==="resolved",C=e.status==="in_progress",L=w?or:C?tr:s;return(0,je.jsxs)("div",{className:`${De.marker} ${m} ${t?De.hovered:""} ${w?De.done:""}`,"data-annotation-marker":!0,style:{left:`${e.x}%`,top:e.y,backgroundColor:L,animationDelay:`${n*20}ms`},onMouseEnter:r,onMouseLeave:i,onClick:T=>{T.stopPropagation(),a()},children:[(0,je.jsx)("span",{children:n+1}),t&&(0,je.jsxs)("div",{className:`${De.markerTooltip} ${De.enter}`,children:[(0,je.jsx)("span",{className:De.markerQuote,children:e.element}),e.comment&&(0,je.jsx)("span",{className:De.markerNote,children:e.comment})]})]})}function io({x:e,y:n,accentColor:o}){return(0,je.jsx)("div",{className:`${De.pending} ${De.enter}`,"data-annotation-marker":!0,style:{left:`${e}%`,top:n,backgroundColor:o},children:(0,je.jsxs)("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",children:[(0,je.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,je.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})})}var ae=require("react");var sr=`@keyframes styles-module__spin___h0C6p {
444
444
  to {
445
445
  transform: rotate(360deg);
446
446
  }
@@ -466,7 +466,7 @@ ${n.stack?.split(`
466
466
  .styles-module__message___70Ayy {
467
467
  font-size: 12px;
468
468
  color: #9ca3af;
469
- }`,rr={container:"styles-module__container___YKn1h",spinner:"styles-module__spinner___4ELZK",spin:"styles-module__spin___h0C6p",message:"styles-module__message___70Ayy"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-loading-spinner-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-loading-spinner-styles",document.head.appendChild(e)),e.textContent=sr}var Jn=rr;var An=require("react/jsx-runtime");function et({message:e="\uB85C\uB529 \uC911..."}){return(0,An.jsxs)("div",{className:Jn.container,children:[(0,An.jsx)("div",{className:Jn.spinner}),(0,An.jsx)("span",{className:Jn.message,children:e})]})}var ir=`@keyframes styles-module__threadIn___pBTFZ {
469
+ }`,rr={container:"styles-module__container___YKn1h",spinner:"styles-module__spinner___4ELZK",spin:"styles-module__spin___h0C6p",message:"styles-module__message___70Ayy"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-loading-spinner-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-loading-spinner-styles",document.head.appendChild(e)),e.textContent=sr}var Jn=rr;var Fn=require("react/jsx-runtime");function et({message:e="\uB85C\uB529 \uC911..."}){return(0,Fn.jsxs)("div",{className:Jn.container,children:[(0,Fn.jsx)("div",{className:Jn.spinner}),(0,Fn.jsx)("span",{className:Jn.message,children:e})]})}var ir=`@keyframes styles-module__threadIn___pBTFZ {
470
470
  from {
471
471
  opacity: 0;
472
472
  transform: scale(0.96) translateY(4px);
@@ -489,7 +489,7 @@ ${n.stack?.split(`
489
489
  .styles-module__thread___ua2EO {
490
490
  position: fixed;
491
491
  width: 340px;
492
- max-height: min(480px, 100vh - var(--thread-top, 40px) - 20px);
492
+ max-height: min(480px, var(--thread-max-height, calc(100vh - 40px)));
493
493
  background: #fff;
494
494
  border-radius: 12px;
495
495
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
@@ -950,7 +950,7 @@ ${n.stack?.split(`
950
950
  }
951
951
  .styles-module__lightboxClose___tGZlm:hover {
952
952
  background: rgba(255, 255, 255, 0.25);
953
- }`,ar={thread:"styles-module__thread___ua2EO",threadIn:"styles-module__threadIn___pBTFZ",exiting:"styles-module__exiting___RIPeX",threadOut:"styles-module__threadOut___-ccKh",header:"styles-module__header___GiEBq",avatar:"styles-module__avatar___JElAd",headerInfo:"styles-module__headerInfo___E8809",headerTop:"styles-module__headerTop___eDiCd",authorName:"styles-module__authorName___T1BfB",timestamp:"styles-module__timestamp___WusBf",headerActions:"styles-module__headerActions___8FsMY",headerAction:"styles-module__headerAction___Tinmq",title:"styles-module__title___qkfqY",commentsList:"styles-module__commentsList___kYqAR",comment:"styles-module__comment___pW3IO",commentActions:"styles-module__commentActions___wO0fs",commentHighlight:"styles-module__commentHighlight___EiTmx",commentContent:"styles-module__commentContent___RObGr",commentTop:"styles-module__commentTop___BbTF3",commentAuthor:"styles-module__commentAuthor___tBjpl",commentTime:"styles-module__commentTime___0OLrz",commentText:"styles-module__commentText___ldy2V",screenshot:"styles-module__screenshot___jUqau",screenshotBadge:"styles-module__screenshotBadge___roEqY",fileCard:"styles-module__fileCard___-iOro",fileIcon:"styles-module__fileIcon___dNJMT",fileInfo:"styles-module__fileInfo___dVrLV",fileCardName:"styles-module__fileCardName___SHOj-",fileCardSize:"styles-module__fileCardSize___W53JL",pendingFile:"styles-module__pendingFile___-OSRs",divider:"styles-module__divider___kDjxN",pendingImage:"styles-module__pendingImage___gHaF3",pendingRemove:"styles-module__pendingRemove___FRL4h",replyArea:"styles-module__replyArea___VQn9b",replyInput:"styles-module__replyInput___uZNBW",replyToolbar:"styles-module__replyToolbar___fTFJU",replyTool:"styles-module__replyTool___Ho-Rx",replySend:"styles-module__replySend___e0VSb",active:"styles-module__active___R--Jj",empty:"styles-module__empty___XXGiw",statusBadge:"styles-module__statusBadge___el8ml",todo:"styles-module__todo___rUWBr",inProgress:"styles-module__inProgress___HEWgU",done:"styles-module__done___zC12n",lightbox:"styles-module__lightbox___KoWEF",lightboxClose:"styles-module__lightboxClose___tGZlm"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-comment-thread-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-comment-thread-styles",document.head.appendChild(e)),e.textContent=ir}var N=ar;var h=require("react/jsx-runtime");function ao(e){let n=new Date(e),o=Date.now()-n.getTime(),t=m=>String(m).padStart(2,"0"),s=`${n.getMonth()+1}/${n.getDate()} ${t(n.getHours())}:${t(n.getMinutes())}`,r=Math.floor(o/6e4);if(r<1)return`${s} (\uBC29\uAE08)`;if(r<60)return`${s} (${r}\uBD84 \uC804)`;let i=Math.floor(r/60);if(i<24)return`${s} (${i}\uC2DC\uAC04 \uC804)`;let a=Math.floor(i/24);return`${s} (${a}\uC77C \uC804)`}function lo(e){return e.slice(0,1).toUpperCase()}function co(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(0)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function uo(e){return e.includes("pdf")?"PDF":e.includes("spreadsheet")||e.includes("excel")||e.includes("csv")?"XLS":e.includes("presentation")||e.includes("powerpoint")?"PPT":e.includes("document")||e.includes("word")?"DOC":e.includes("zip")||e.includes("compressed")||e.includes("archive")?"ZIP":e.includes("video")?"VID":e.includes("audio")?"AUD":"FILE"}function _o({task:e,currentUserName:n,currentUserId:o,left:t,top:s,bottom:r,loading:i,onClose:a,onReply:m}){let[C,w]=(0,ae.useState)(""),[L,T]=(0,ae.useState)(!1),[E,M]=(0,ae.useState)(null),[j,K]=(0,ae.useState)(null),[fe,ge]=(0,ae.useState)(!1),ce=(0,ae.useRef)(null),P=(0,ae.useRef)(null),[F,Q]=(0,ae.useState)(null),b=(0,ae.useRef)(null);(0,ae.useEffect)(()=>{P.current&&(P.current.scrollTop=P.current.scrollHeight),ce.current?.focus()},[e.comments.length]),(0,ae.useEffect)(()=>{if(fe)return;let x=v=>{let oe=v.target;oe.closest(`.${N.thread}`)||oe.closest("[data-annotation-marker]")||oe.closest("[data-impakers-debug]")||D()};return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[fe]);let D=(0,ae.useCallback)(()=>{T(!0),setTimeout(()=>a(),120)},[a]),R=(0,ae.useCallback)(()=>{!C.trim()&&!E&&!j||(m(e.id,C.trim(),E||void 0,j||void 0),w(""),M(null),K(null))},[C,E,j,e.id,m]),he=(0,ae.useCallback)(x=>{x.stopPropagation(),!x.nativeEvent.isComposing&&(x.key==="Enter"&&!x.shiftKey&&(x.preventDefault(),R()),x.key==="Escape"&&D())},[D,R]),A=(0,ae.useCallback)(()=>{ge(!0);let x=document.querySelectorAll("[data-impakers-debug], [data-annotation-marker]");x.forEach(B=>B.style.visibility="hidden"),document.documentElement.classList.add("impakers-selecting");let v=null,oe=B=>{v||(v=document.createElement("div"),v.style.cssText="position:fixed;border:2px solid #3b82f6;background:rgba(59,130,246,0.05);border-radius:4px;pointer-events:none;z-index:999999;transition:all 0.08s ease",document.body.appendChild(v)),v.style.left=`${B.left}px`,v.style.top=`${B.top}px`,v.style.width=`${B.width}px`,v.style.height=`${B.height}px`},f=()=>{document.removeEventListener("mousemove",$),document.removeEventListener("click",ue,!0),document.removeEventListener("keydown",z),document.documentElement.classList.remove("impakers-selecting"),v?.remove(),x.forEach(B=>B.style.visibility=""),ge(!1)},$=B=>{let Z=document.elementFromPoint(B.clientX,B.clientY);!Z||Z===v||oe(Z.getBoundingClientRect())},z=B=>{B.key==="Escape"&&f()},ue=async B=>{B.preventDefault(),B.stopPropagation(),B.stopImmediatePropagation();let Z=document.elementFromPoint(B.clientX,B.clientY);if(f(),!!Z){try{let re=await Un(Z);M(re)}catch(re){console.error("[@impakers/debug] DOM \uC2A4\uD06C\uB9B0\uC0F7 \uC2E4\uD328:",re)}ce.current?.focus()}};document.addEventListener("mousemove",$),document.addEventListener("click",ue,!0),document.addEventListener("keydown",z)},[]),te=(0,ae.useCallback)(()=>{A()},[A]),le=(0,ae.useCallback)(()=>{b.current?.click()},[]),ye=(0,ae.useCallback)(x=>{let v=x.target.files?.[0];if(v){if(v.size>4.5*1024*1024){console.warn("[@impakers/debug] \uD30C\uC77C \uD06C\uAE30\uAC00 4.5MB\uB97C \uCD08\uACFC\uD569\uB2C8\uB2E4."),x.target.value="";return}if(v.type.startsWith("image/")){K(null);let oe=new FileReader;oe.onload=()=>{M(oe.result)},oe.readAsDataURL(v)}else M(null),K(v);x.target.value=""}},[]),Pe=e.title.replace(/^\[피드백\]\s*/,""),be={left:t,...s!==void 0?{top:s}:{},...r!==void 0?{bottom:r}:{},"--thread-top":`${s!==void 0?s:40}px`};return(0,h.jsxs)("div",{className:`${N.thread} ${L?N.exiting:""}`,style:be,"data-impakers-debug":"",onClick:x=>x.stopPropagation(),children:[(0,h.jsxs)("div",{className:N.header,children:[(0,h.jsx)("div",{className:N.avatar,children:lo(e.authorName||n)}),(0,h.jsxs)("div",{className:N.headerInfo,children:[(0,h.jsxs)("div",{className:N.headerTop,children:[(0,h.jsx)("span",{className:N.authorName,children:e.authorName||n}),(0,h.jsx)("span",{className:N.timestamp,children:ao(e.createdAt)})]}),(0,h.jsx)("div",{className:N.title,children:Pe})]}),(0,h.jsx)("div",{className:N.headerActions,children:(0,h.jsx)("button",{className:N.headerAction,onClick:D,title:"\uB2EB\uAE30",type:"button",children:(0,h.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,h.jsx)("path",{d:"M18 6L6 18M6 6l12 12"})})})})]}),i&&e.comments.length===0&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("div",{className:N.divider}),(0,h.jsx)(et,{message:"\uB313\uAE00 \uB85C\uB529 \uC911..."})]}),e.comments.length>0&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("div",{className:N.divider}),(0,h.jsx)("div",{className:N.commentsList,ref:P,children:e.comments.map(x=>(0,h.jsxs)("div",{className:N.comment,children:[(0,h.jsx)("div",{className:N.avatar,style:{width:22,height:22,fontSize:10},children:lo(x.authorName)}),(0,h.jsxs)("div",{className:N.commentContent,children:[(0,h.jsxs)("div",{className:N.commentTop,children:[(0,h.jsx)("span",{className:N.commentAuthor,children:x.authorName}),(0,h.jsx)("span",{className:N.commentTime,children:ao(x.createdAt)})]}),x.content&&(0,h.jsx)("div",{className:N.commentText,children:x.content}),x.imageUrl&&x.imageUrl!=="loading..."&&(0,h.jsx)("div",{className:N.screenshot,onClick:()=>Q(x.imageUrl),style:{cursor:"pointer"},children:(0,h.jsx)("img",{src:x.imageUrl,alt:"screenshot"})}),x.fileUrl&&(0,h.jsxs)("a",{className:N.fileCard,href:x.fileUrl,target:"_blank",rel:"noopener noreferrer",onClick:v=>v.stopPropagation(),children:[(0,h.jsx)("span",{className:N.fileIcon,children:uo(x.fileType||"")}),(0,h.jsxs)("span",{className:N.fileInfo,children:[(0,h.jsx)("span",{className:N.fileCardName,children:x.fileName||"\uD30C\uC77C"}),x.fileSize!=null&&(0,h.jsx)("span",{className:N.fileCardSize,children:co(x.fileSize)})]})]})]})]},x.id))})]}),E&&(0,h.jsxs)("div",{className:N.pendingImage,children:[(0,h.jsx)("img",{src:E,alt:"pending"}),(0,h.jsx)("button",{className:N.pendingRemove,onClick:()=>M(null),type:"button",children:"\xD7"})]}),j&&(0,h.jsxs)("div",{className:N.pendingFile,children:[(0,h.jsx)("span",{className:N.fileIcon,children:uo(j.type)}),(0,h.jsxs)("span",{className:N.fileInfo,children:[(0,h.jsx)("span",{className:N.fileCardName,children:j.name}),(0,h.jsx)("span",{className:N.fileCardSize,children:co(j.size)})]}),(0,h.jsx)("button",{className:N.pendingRemove,onClick:()=>K(null),type:"button",children:"\xD7"})]}),(0,h.jsx)("div",{className:N.replyArea,children:(0,h.jsx)("textarea",{ref:ce,className:N.replyInput,placeholder:"Reply...",value:C,onChange:x=>{w(x.target.value);let v=x.target;v.style.height="auto",v.style.height=`${Math.min(v.scrollHeight,120)}px`},onKeyDown:he,rows:2})}),(0,h.jsxs)("div",{className:N.replyToolbar,children:[(0,h.jsx)("button",{className:N.replyTool,onClick:le,type:"button",title:"\uD30C\uC77C \uCCA8\uBD80",children:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,h.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,h.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),(0,h.jsx)("button",{className:N.replyTool,onClick:te,type:"button",title:"\uC694\uC18C \uC2A4\uD06C\uB9B0\uC0F7",children:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,h.jsx)("path",{d:"M14.5 4h-5L7 7H4a2 2 0 00-2 2v9a2 2 0 002 2h16a2 2 0 002-2V9a2 2 0 00-2-2h-3l-2.5-3z"}),(0,h.jsx)("circle",{cx:"12",cy:"13",r:"3"})]})}),(0,h.jsx)("button",{className:`${N.replySend} ${C.trim()||E||j?N.active:""}`,onClick:R,disabled:!C.trim()&&!E&&!j,type:"button",title:"\uC804\uC1A1",children:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,h.jsx)("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),(0,h.jsx)("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]}),(0,h.jsx)("input",{ref:b,type:"file",accept:"*/*",style:{display:"none"},onChange:ye}),F&&(0,h.jsxs)("div",{className:N.lightbox,onClick:()=>Q(null),"data-impakers-debug":"",children:[(0,h.jsx)("img",{src:F,alt:"enlarged",onClick:x=>x.stopPropagation()}),(0,h.jsx)("button",{className:N.lightboxClose,onClick:()=>Q(null),type:"button",children:"\xD7"})]})]})}var _e=require("react");var lr=`@keyframes styles-module__fabEnter___DMJoo {
953
+ }`,ar={thread:"styles-module__thread___ua2EO",threadIn:"styles-module__threadIn___pBTFZ",exiting:"styles-module__exiting___RIPeX",threadOut:"styles-module__threadOut___-ccKh",header:"styles-module__header___GiEBq",avatar:"styles-module__avatar___JElAd",headerInfo:"styles-module__headerInfo___E8809",headerTop:"styles-module__headerTop___eDiCd",authorName:"styles-module__authorName___T1BfB",timestamp:"styles-module__timestamp___WusBf",headerActions:"styles-module__headerActions___8FsMY",headerAction:"styles-module__headerAction___Tinmq",title:"styles-module__title___qkfqY",commentsList:"styles-module__commentsList___kYqAR",comment:"styles-module__comment___pW3IO",commentActions:"styles-module__commentActions___wO0fs",commentHighlight:"styles-module__commentHighlight___EiTmx",commentContent:"styles-module__commentContent___RObGr",commentTop:"styles-module__commentTop___BbTF3",commentAuthor:"styles-module__commentAuthor___tBjpl",commentTime:"styles-module__commentTime___0OLrz",commentText:"styles-module__commentText___ldy2V",screenshot:"styles-module__screenshot___jUqau",screenshotBadge:"styles-module__screenshotBadge___roEqY",fileCard:"styles-module__fileCard___-iOro",fileIcon:"styles-module__fileIcon___dNJMT",fileInfo:"styles-module__fileInfo___dVrLV",fileCardName:"styles-module__fileCardName___SHOj-",fileCardSize:"styles-module__fileCardSize___W53JL",pendingFile:"styles-module__pendingFile___-OSRs",divider:"styles-module__divider___kDjxN",pendingImage:"styles-module__pendingImage___gHaF3",pendingRemove:"styles-module__pendingRemove___FRL4h",replyArea:"styles-module__replyArea___VQn9b",replyInput:"styles-module__replyInput___uZNBW",replyToolbar:"styles-module__replyToolbar___fTFJU",replyTool:"styles-module__replyTool___Ho-Rx",replySend:"styles-module__replySend___e0VSb",active:"styles-module__active___R--Jj",empty:"styles-module__empty___XXGiw",statusBadge:"styles-module__statusBadge___el8ml",todo:"styles-module__todo___rUWBr",inProgress:"styles-module__inProgress___HEWgU",done:"styles-module__done___zC12n",lightbox:"styles-module__lightbox___KoWEF",lightboxClose:"styles-module__lightboxClose___tGZlm"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-comment-thread-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-comment-thread-styles",document.head.appendChild(e)),e.textContent=ir}var N=ar;var h=require("react/jsx-runtime");function ao(e){let n=new Date(e),o=Date.now()-n.getTime(),t=m=>String(m).padStart(2,"0"),s=`${n.getMonth()+1}/${n.getDate()} ${t(n.getHours())}:${t(n.getMinutes())}`,r=Math.floor(o/6e4);if(r<1)return`${s} (\uBC29\uAE08)`;if(r<60)return`${s} (${r}\uBD84 \uC804)`;let i=Math.floor(r/60);if(i<24)return`${s} (${i}\uC2DC\uAC04 \uC804)`;let a=Math.floor(i/24);return`${s} (${a}\uC77C \uC804)`}function lo(e){return e.slice(0,1).toUpperCase()}function co(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(0)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function uo(e){return e.includes("pdf")?"PDF":e.includes("spreadsheet")||e.includes("excel")||e.includes("csv")?"XLS":e.includes("presentation")||e.includes("powerpoint")?"PPT":e.includes("document")||e.includes("word")?"DOC":e.includes("zip")||e.includes("compressed")||e.includes("archive")?"ZIP":e.includes("video")?"VID":e.includes("audio")?"AUD":"FILE"}function _o({task:e,currentUserName:n,currentUserId:o,left:t,top:s,bottom:r,loading:i,onClose:a,onReply:m}){let[w,C]=(0,ae.useState)(""),[L,T]=(0,ae.useState)(!1),[I,M]=(0,ae.useState)(null),[j,K]=(0,ae.useState)(null),[pe,fe]=(0,ae.useState)(!1),ce=(0,ae.useRef)(null),P=(0,ae.useRef)(null),[F,Q]=(0,ae.useState)(null),b=(0,ae.useRef)(null);(0,ae.useEffect)(()=>{P.current&&(P.current.scrollTop=P.current.scrollHeight),ce.current?.focus()},[e.comments.length]),(0,ae.useEffect)(()=>{if(pe)return;let x=v=>{let oe=v.target;oe.closest(`.${N.thread}`)||oe.closest("[data-annotation-marker]")||oe.closest("[data-impakers-debug]")||D()};return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[pe]);let D=(0,ae.useCallback)(()=>{T(!0),setTimeout(()=>a(),120)},[a]),E=(0,ae.useCallback)(()=>{!w.trim()&&!I&&!j||(m(e.id,w.trim(),I||void 0,j||void 0),C(""),M(null),K(null))},[w,I,j,e.id,m]),ge=(0,ae.useCallback)(x=>{x.stopPropagation(),!x.nativeEvent.isComposing&&(x.key==="Enter"&&!x.shiftKey&&(x.preventDefault(),E()),x.key==="Escape"&&D())},[D,E]),A=(0,ae.useCallback)(()=>{fe(!0);let x=document.querySelectorAll("[data-impakers-debug], [data-annotation-marker]");x.forEach(B=>B.style.visibility="hidden"),document.documentElement.classList.add("impakers-selecting");let v=null,oe=B=>{v||(v=document.createElement("div"),v.style.cssText="position:fixed;border:2px solid #3b82f6;background:rgba(59,130,246,0.05);border-radius:4px;pointer-events:none;z-index:999999;transition:all 0.08s ease",document.body.appendChild(v)),v.style.left=`${B.left}px`,v.style.top=`${B.top}px`,v.style.width=`${B.width}px`,v.style.height=`${B.height}px`},f=()=>{document.removeEventListener("mousemove",$),document.removeEventListener("click",ue,!0),document.removeEventListener("keydown",z),document.documentElement.classList.remove("impakers-selecting"),v?.remove(),x.forEach(B=>B.style.visibility=""),fe(!1)},$=B=>{let Z=document.elementFromPoint(B.clientX,B.clientY);!Z||Z===v||oe(Z.getBoundingClientRect())},z=B=>{B.key==="Escape"&&f()},ue=async B=>{B.preventDefault(),B.stopPropagation(),B.stopImmediatePropagation();let Z=document.elementFromPoint(B.clientX,B.clientY);if(f(),!!Z){try{let re=await Un(Z);M(re)}catch(re){console.error("[@impakers/debug] DOM \uC2A4\uD06C\uB9B0\uC0F7 \uC2E4\uD328:",re)}ce.current?.focus()}};document.addEventListener("mousemove",$),document.addEventListener("click",ue,!0),document.addEventListener("keydown",z)},[]),te=(0,ae.useCallback)(()=>{A()},[A]),le=(0,ae.useCallback)(()=>{b.current?.click()},[]),he=(0,ae.useCallback)(x=>{let v=x.target.files?.[0];if(v){if(v.size>4.5*1024*1024){console.warn("[@impakers/debug] \uD30C\uC77C \uD06C\uAE30\uAC00 4.5MB\uB97C \uCD08\uACFC\uD569\uB2C8\uB2E4."),x.target.value="";return}if(v.type.startsWith("image/")){K(null);let oe=new FileReader;oe.onload=()=>{M(oe.result)},oe.readAsDataURL(v)}else M(null),K(v);x.target.value=""}},[]),Pe=e.title.replace(/^\[피드백\]\s*/,""),Ne=s!==void 0?window.innerHeight-s-20:r!==void 0?window.innerHeight-r-20:window.innerHeight-40,ye={left:t,...s!==void 0?{top:s}:{},...r!==void 0?{bottom:r}:{},"--thread-max-height":`${Math.max(200,Ne)}px`};return(0,h.jsxs)("div",{className:`${N.thread} ${L?N.exiting:""}`,style:ye,"data-impakers-debug":"",onClick:x=>x.stopPropagation(),children:[(0,h.jsxs)("div",{className:N.header,children:[(0,h.jsx)("div",{className:N.avatar,children:lo(e.authorName||n)}),(0,h.jsxs)("div",{className:N.headerInfo,children:[(0,h.jsxs)("div",{className:N.headerTop,children:[(0,h.jsx)("span",{className:N.authorName,children:e.authorName||n}),(0,h.jsx)("span",{className:N.timestamp,children:ao(e.createdAt)})]}),(0,h.jsx)("div",{className:N.title,children:Pe})]}),(0,h.jsx)("div",{className:N.headerActions,children:(0,h.jsx)("button",{className:N.headerAction,onClick:D,title:"\uB2EB\uAE30",type:"button",children:(0,h.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,h.jsx)("path",{d:"M18 6L6 18M6 6l12 12"})})})})]}),i&&e.comments.length===0&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("div",{className:N.divider}),(0,h.jsx)(et,{message:"\uB313\uAE00 \uB85C\uB529 \uC911..."})]}),e.comments.length>0&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("div",{className:N.divider}),(0,h.jsx)("div",{className:N.commentsList,ref:P,children:e.comments.map(x=>(0,h.jsxs)("div",{className:N.comment,children:[(0,h.jsx)("div",{className:N.avatar,style:{width:22,height:22,fontSize:10},children:lo(x.authorName)}),(0,h.jsxs)("div",{className:N.commentContent,children:[(0,h.jsxs)("div",{className:N.commentTop,children:[(0,h.jsx)("span",{className:N.commentAuthor,children:x.authorName}),(0,h.jsx)("span",{className:N.commentTime,children:ao(x.createdAt)})]}),x.content&&(0,h.jsx)("div",{className:N.commentText,children:x.content}),x.imageUrl&&x.imageUrl!=="loading..."&&(0,h.jsx)("div",{className:N.screenshot,onClick:()=>Q(x.imageUrl),style:{cursor:"pointer"},children:(0,h.jsx)("img",{src:x.imageUrl,alt:"screenshot"})}),x.fileUrl&&(0,h.jsxs)("a",{className:N.fileCard,href:x.fileUrl,target:"_blank",rel:"noopener noreferrer",onClick:v=>v.stopPropagation(),children:[(0,h.jsx)("span",{className:N.fileIcon,children:uo(x.fileType||"")}),(0,h.jsxs)("span",{className:N.fileInfo,children:[(0,h.jsx)("span",{className:N.fileCardName,children:x.fileName||"\uD30C\uC77C"}),x.fileSize!=null&&(0,h.jsx)("span",{className:N.fileCardSize,children:co(x.fileSize)})]})]})]})]},x.id))})]}),I&&(0,h.jsxs)("div",{className:N.pendingImage,children:[(0,h.jsx)("img",{src:I,alt:"pending"}),(0,h.jsx)("button",{className:N.pendingRemove,onClick:()=>M(null),type:"button",children:"\xD7"})]}),j&&(0,h.jsxs)("div",{className:N.pendingFile,children:[(0,h.jsx)("span",{className:N.fileIcon,children:uo(j.type)}),(0,h.jsxs)("span",{className:N.fileInfo,children:[(0,h.jsx)("span",{className:N.fileCardName,children:j.name}),(0,h.jsx)("span",{className:N.fileCardSize,children:co(j.size)})]}),(0,h.jsx)("button",{className:N.pendingRemove,onClick:()=>K(null),type:"button",children:"\xD7"})]}),(0,h.jsx)("div",{className:N.replyArea,children:(0,h.jsx)("textarea",{ref:ce,className:N.replyInput,placeholder:"Reply...",value:w,onChange:x=>{C(x.target.value);let v=x.target;v.style.height="auto",v.style.height=`${Math.min(v.scrollHeight,120)}px`},onKeyDown:ge,rows:2})}),(0,h.jsxs)("div",{className:N.replyToolbar,children:[(0,h.jsx)("button",{className:N.replyTool,onClick:le,type:"button",title:"\uD30C\uC77C \uCCA8\uBD80",children:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,h.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,h.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),(0,h.jsx)("button",{className:N.replyTool,onClick:te,type:"button",title:"\uC694\uC18C \uC2A4\uD06C\uB9B0\uC0F7",children:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,h.jsx)("path",{d:"M14.5 4h-5L7 7H4a2 2 0 00-2 2v9a2 2 0 002 2h16a2 2 0 002-2V9a2 2 0 00-2-2h-3l-2.5-3z"}),(0,h.jsx)("circle",{cx:"12",cy:"13",r:"3"})]})}),(0,h.jsx)("button",{className:`${N.replySend} ${w.trim()||I||j?N.active:""}`,onClick:E,disabled:!w.trim()&&!I&&!j,type:"button",title:"\uC804\uC1A1",children:(0,h.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,h.jsx)("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),(0,h.jsx)("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]}),(0,h.jsx)("input",{ref:b,type:"file",accept:"*/*",style:{display:"none"},onChange:he}),F&&(0,h.jsxs)("div",{className:N.lightbox,onClick:()=>Q(null),"data-impakers-debug":"",children:[(0,h.jsx)("img",{src:F,alt:"enlarged",onClick:x=>x.stopPropagation()}),(0,h.jsx)("button",{className:N.lightboxClose,onClick:()=>Q(null),type:"button",children:"\xD7"})]})]})}var _e=require("react");var lr=`@keyframes styles-module__fabEnter___DMJoo {
954
954
  from {
955
955
  opacity: 0;
956
956
  transform: scale(0.5);
@@ -1143,7 +1143,7 @@ ${n.stack?.split(`
1143
1143
  justify-content: center;
1144
1144
  padding: 0 4px;
1145
1145
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
1146
- }`,dr={fab:"styles-module__fab___wShP-",fabEnter:"styles-module__fabEnter___DMJoo",expanded:"styles-module__expanded___qyto6",menuItems:"styles-module__menuItems___1qNsE",menuItem:"styles-module__menuItem___pB75H",active:"styles-module__active___7ktmc",menuItemIn:"styles-module__menuItemIn___GfmJ3",menuItemClosing:"styles-module__menuItemClosing___m4o-a",menuItemOut:"styles-module__menuItemOut___s0nQD",tooltip:"styles-module__tooltip___Cy6kg",contextMenu:"styles-module__contextMenu___A8fQt",contextMenuItem:"styles-module__contextMenuItem___1u9io",badge:"styles-module__badge___zmiZx"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-fab-menu-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-fab-menu-styles",document.head.appendChild(e)),e.textContent=lr}var We=dr;var Le=require("react/jsx-runtime");function mo({items:e,onSelect:n,onHide:o,onDoubleTap:t}){let[s,r]=(0,_e.useState)(!1),[i,a]=(0,_e.useState)(!1),[m,C]=(0,_e.useState)({right:24,bottom:24}),[w,L]=(0,_e.useState)(null),T=(0,_e.useRef)(null),E=(0,_e.useRef)(!1),M=(0,_e.useRef)({x:0,y:0}),j=(0,_e.useRef)({x:0,y:0}),K=(0,_e.useRef)(!1),fe=(0,_e.useRef)(0),ge=(0,_e.useCallback)(b=>{if(b.button===2)return;E.current=!0,K.current=!1;let D=T.current;if(!D)return;D.setPointerCapture(b.pointerId);let R=D.getBoundingClientRect();M.current={x:b.clientX,y:b.clientY},j.current={x:b.clientX-R.left,y:b.clientY-R.top}},[]),ce=(0,_e.useCallback)(b=>{E.current&&((Math.abs(b.clientX-M.current.x)>3||Math.abs(b.clientY-M.current.y)>3)&&(K.current=!0),K.current&&C({right:Math.max(8,Math.min(window.innerWidth-b.clientX-(44-j.current.x),window.innerWidth-52)),bottom:Math.max(8,Math.min(window.innerHeight-b.clientY-(44-j.current.y),window.innerHeight-52))}))},[]),P=(0,_e.useCallback)(b=>{if(E.current&&(T.current?.releasePointerCapture(b.pointerId),E.current=!1,!K.current)){let D=Date.now(),R=D-fe.current<350;if(fe.current=D,R&&t){s&&F(),t();return}s?F():r(!0)}},[s,t]),F=(0,_e.useCallback)(()=>{a(!0),setTimeout(()=>{r(!1),a(!1)},150)},[]),Q=(0,_e.useCallback)(b=>{b.preventDefault(),b.stopPropagation(),L({x:b.clientX,y:b.clientY})},[]);return(0,_e.useEffect)(()=>{if(!s&&!w)return;let b=D=>{if(!D.target.closest("[data-impakers-fab]")){if(w){L(null);return}s&&F()}};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[s,w,F]),(0,Le.jsxs)(Le.Fragment,{children:[(s||i)&&(0,Le.jsx)("div",{className:We.menuItems,style:{position:"fixed",right:m.right+4/2,bottom:m.bottom+44+8},"data-impakers-debug":"","data-impakers-fab":"",children:[...e].reverse().map((b,D)=>(0,Le.jsxs)("button",{className:`${We.menuItem} ${b.active?We.active:""} ${i?We.menuItemClosing:""}`,style:{animationDelay:i?`${D*30}ms`:`${(e.length-1-D)*40}ms`},onClick:R=>{R.stopPropagation(),n(b.id),F()},type:"button","data-impakers-fab":"","data-impakers-debug":"",children:[b.icon,(0,Le.jsx)("span",{className:We.tooltip,children:b.label}),b.badge&&b.badge>0?(0,Le.jsx)("span",{className:We.badge,children:b.badge>99?"99+":b.badge}):null]},b.id))}),(0,Le.jsx)("button",{ref:T,className:`${We.fab} ${s?We.expanded:""}`,style:{position:"fixed",right:m.right,bottom:m.bottom},onPointerDown:ge,onPointerMove:ce,onPointerUp:P,onContextMenu:Q,type:"button","aria-label":"\uD53C\uB4DC\uBC31 \uBA54\uB274","data-impakers-debug":"","data-impakers-fab":"",children:(0,Le.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Le.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,Le.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),w&&(0,Le.jsx)("div",{style:{position:"fixed",inset:0,zIndex:2147483647},onMouseDown:()=>L(null),"data-impakers-debug":"","data-impakers-fab":"",children:(0,Le.jsx)("div",{className:We.contextMenu,style:{position:"fixed",left:w.x,top:w.y,zIndex:2147483647},onMouseDown:b=>b.stopPropagation(),"data-impakers-fab":"",children:(0,Le.jsx)("button",{className:We.contextMenuItem,onMouseDown:b=>{b.stopPropagation(),L(null),o?.()},type:"button",children:"\uC704\uC82F \uC228\uAE30\uAE30"})})})]})}var q=require("react"),fo=require("react-dom");var Ae=require("react");var cr=`.styles-module__replyWrapper___wuGqO {
1146
+ }`,dr={fab:"styles-module__fab___wShP-",fabEnter:"styles-module__fabEnter___DMJoo",expanded:"styles-module__expanded___qyto6",menuItems:"styles-module__menuItems___1qNsE",menuItem:"styles-module__menuItem___pB75H",active:"styles-module__active___7ktmc",menuItemIn:"styles-module__menuItemIn___GfmJ3",menuItemClosing:"styles-module__menuItemClosing___m4o-a",menuItemOut:"styles-module__menuItemOut___s0nQD",tooltip:"styles-module__tooltip___Cy6kg",contextMenu:"styles-module__contextMenu___A8fQt",contextMenuItem:"styles-module__contextMenuItem___1u9io",badge:"styles-module__badge___zmiZx"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-fab-menu-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-fab-menu-styles",document.head.appendChild(e)),e.textContent=lr}var We=dr;var Te=require("react/jsx-runtime");function mo({items:e,onSelect:n,onHide:o,onDoubleTap:t}){let[s,r]=(0,_e.useState)(!1),[i,a]=(0,_e.useState)(!1),[m,w]=(0,_e.useState)({right:24,bottom:24}),[C,L]=(0,_e.useState)(null),T=(0,_e.useRef)(null),I=(0,_e.useRef)(!1),M=(0,_e.useRef)({x:0,y:0}),j=(0,_e.useRef)({x:0,y:0}),K=(0,_e.useRef)(!1),pe=(0,_e.useRef)(0),fe=(0,_e.useCallback)(b=>{if(b.button===2)return;I.current=!0,K.current=!1;let D=T.current;if(!D)return;D.setPointerCapture(b.pointerId);let E=D.getBoundingClientRect();M.current={x:b.clientX,y:b.clientY},j.current={x:b.clientX-E.left,y:b.clientY-E.top}},[]),ce=(0,_e.useCallback)(b=>{I.current&&((Math.abs(b.clientX-M.current.x)>3||Math.abs(b.clientY-M.current.y)>3)&&(K.current=!0),K.current&&w({right:Math.max(8,Math.min(window.innerWidth-b.clientX-(44-j.current.x),window.innerWidth-52)),bottom:Math.max(8,Math.min(window.innerHeight-b.clientY-(44-j.current.y),window.innerHeight-52))}))},[]),P=(0,_e.useCallback)(b=>{if(I.current&&(T.current?.releasePointerCapture(b.pointerId),I.current=!1,!K.current)){let D=Date.now(),E=D-pe.current<350;if(pe.current=D,E&&t){s&&F(),t();return}s?F():r(!0)}},[s,t]),F=(0,_e.useCallback)(()=>{a(!0),setTimeout(()=>{r(!1),a(!1)},150)},[]),Q=(0,_e.useCallback)(b=>{b.preventDefault(),b.stopPropagation(),L({x:b.clientX,y:b.clientY})},[]);return(0,_e.useEffect)(()=>{if(!s&&!C)return;let b=D=>{if(!D.target.closest("[data-impakers-fab]")){if(C){L(null);return}s&&F()}};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[s,C,F]),(0,Te.jsxs)(Te.Fragment,{children:[(s||i)&&(0,Te.jsx)("div",{className:We.menuItems,style:{position:"fixed",right:m.right+4/2,bottom:m.bottom+44+8},"data-impakers-debug":"","data-impakers-fab":"",children:[...e].reverse().map((b,D)=>(0,Te.jsxs)("button",{className:`${We.menuItem} ${b.active?We.active:""} ${i?We.menuItemClosing:""}`,style:{animationDelay:i?`${D*30}ms`:`${(e.length-1-D)*40}ms`},onClick:E=>{E.stopPropagation(),n(b.id),F()},type:"button","data-impakers-fab":"","data-impakers-debug":"",children:[b.icon,(0,Te.jsx)("span",{className:We.tooltip,children:b.label}),b.badge&&b.badge>0?(0,Te.jsx)("span",{className:We.badge,children:b.badge>99?"99+":b.badge}):null]},b.id))}),(0,Te.jsx)("button",{ref:T,className:`${We.fab} ${s?We.expanded:""}`,style:{position:"fixed",right:m.right,bottom:m.bottom},onPointerDown:fe,onPointerMove:ce,onPointerUp:P,onContextMenu:Q,type:"button","aria-label":"\uD53C\uB4DC\uBC31 \uBA54\uB274","data-impakers-debug":"","data-impakers-fab":"",children:(0,Te.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Te.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,Te.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),C&&(0,Te.jsx)("div",{style:{position:"fixed",inset:0,zIndex:2147483647},onMouseDown:()=>L(null),"data-impakers-debug":"","data-impakers-fab":"",children:(0,Te.jsx)("div",{className:We.contextMenu,style:{position:"fixed",left:C.x,top:C.y,zIndex:2147483647},onMouseDown:b=>b.stopPropagation(),"data-impakers-fab":"",children:(0,Te.jsx)("button",{className:We.contextMenuItem,onMouseDown:b=>{b.stopPropagation(),L(null),o?.()},type:"button",children:"\uC704\uC82F \uC228\uAE30\uAE30"})})})]})}var q=require("react"),fo=require("react-dom");var Me=require("react");var cr=`.styles-module__replyWrapper___wuGqO {
1147
1147
  flex-shrink: 0;
1148
1148
  }
1149
1149
 
@@ -1312,7 +1312,7 @@ ${n.stack?.split(`
1312
1312
  .styles-module__replySend___eTc6O svg {
1313
1313
  width: 16px;
1314
1314
  height: 16px;
1315
- }`,ur={replyWrapper:"styles-module__replyWrapper___wuGqO",pendingImage:"styles-module__pendingImage___Sc3K4",pendingRemove:"styles-module__pendingRemove___ftBrZ",pendingFile:"styles-module__pendingFile___ss0Dp",fileIcon:"styles-module__fileIcon___lCxGN",fileInfo:"styles-module__fileInfo___WpCET",fileCardName:"styles-module__fileCardName___0idJU",fileCardSize:"styles-module__fileCardSize___b9sJT",replyArea:"styles-module__replyArea___tmywT",replyInput:"styles-module__replyInput___UAMsE",replyToolbar:"styles-module__replyToolbar___c6TcW",replyTool:"styles-module__replyTool___RBxLW",replySend:"styles-module__replySend___eTc6O",active:"styles-module__active___-Ce1c"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-reply-input-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-reply-input-styles",document.head.appendChild(e)),e.textContent=cr}var Ce=ur;var Y=require("react/jsx-runtime");function _r(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(0)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function mr(e){return e.includes("pdf")?"PDF":e.includes("spreadsheet")||e.includes("excel")||e.includes("csv")?"XLS":e.includes("presentation")||e.includes("powerpoint")?"PPT":e.includes("document")||e.includes("word")?"DOC":e.includes("zip")||e.includes("compressed")||e.includes("archive")?"ZIP":e.includes("video")?"VID":e.includes("audio")?"AUD":"FILE"}function po({onSend:e,onEscape:n,placeholder:o="Reply...",autoFocus:t=!1}){let[s,r]=(0,Ae.useState)(""),[i,a]=(0,Ae.useState)(null),[m,C]=(0,Ae.useState)(null),[w,L]=(0,Ae.useState)(!1),T=(0,Ae.useRef)(null),E=(0,Ae.useRef)(null),M=s.trim()||i||m,j=(0,Ae.useCallback)(()=>{M&&(e(s.trim(),i||void 0,m||void 0),r(""),a(null),C(null),T.current&&(T.current.style.height="auto"))},[s,i,m,M,e]),K=(0,Ae.useCallback)(P=>{P.stopPropagation(),!P.nativeEvent.isComposing&&(P.key==="Enter"&&!P.shiftKey&&(P.preventDefault(),j()),P.key==="Escape"&&n?.())},[j,n]),fe=(0,Ae.useCallback)(()=>{L(!0);let P=document.querySelectorAll("[data-impakers-debug], [data-annotation-marker]");P.forEach(A=>A.style.visibility="hidden"),document.documentElement.classList.add("impakers-selecting");let F=null,Q=A=>{F||(F=document.createElement("div"),F.style.cssText="position:fixed;border:2px solid #3b82f6;background:rgba(59,130,246,0.05);border-radius:4px;pointer-events:none;z-index:999999;transition:all 0.08s ease",document.body.appendChild(F)),F.style.left=`${A.left}px`,F.style.top=`${A.top}px`,F.style.width=`${A.width}px`,F.style.height=`${A.height}px`},b=()=>{document.removeEventListener("mousemove",D),document.removeEventListener("click",he,!0),document.removeEventListener("keydown",R),document.documentElement.classList.remove("impakers-selecting"),F?.remove(),P.forEach(A=>A.style.visibility=""),L(!1)},D=A=>{let te=document.elementFromPoint(A.clientX,A.clientY);!te||te===F||Q(te.getBoundingClientRect())},R=A=>{A.key==="Escape"&&b()},he=async A=>{A.preventDefault(),A.stopPropagation(),A.stopImmediatePropagation();let te=document.elementFromPoint(A.clientX,A.clientY);if(b(),!!te){try{let le=await Un(te);a(le)}catch(le){console.error("[@impakers/debug] DOM \uC2A4\uD06C\uB9B0\uC0F7 \uC2E4\uD328:",le)}T.current?.focus()}};document.addEventListener("mousemove",D),document.addEventListener("click",he,!0),document.addEventListener("keydown",R)},[]),ge=(0,Ae.useCallback)(()=>{E.current?.click()},[]),ce=(0,Ae.useCallback)(P=>{let F=P.target.files?.[0];if(F){if(F.size>4.5*1024*1024){console.warn("[@impakers/debug] \uD30C\uC77C \uD06C\uAE30\uAC00 4.5MB\uB97C \uCD08\uACFC\uD569\uB2C8\uB2E4."),P.target.value="";return}if(F.type.startsWith("image/")){C(null);let Q=new FileReader;Q.onload=()=>a(Q.result),Q.readAsDataURL(F)}else a(null),C(F);P.target.value=""}},[]);return(0,Y.jsxs)("div",{className:Ce.replyWrapper,"data-impakers-debug":"",children:[i&&(0,Y.jsxs)("div",{className:Ce.pendingImage,children:[(0,Y.jsx)("img",{src:i,alt:"pending"}),(0,Y.jsx)("button",{className:Ce.pendingRemove,onClick:()=>a(null),type:"button",children:"\xD7"})]}),m&&(0,Y.jsxs)("div",{className:Ce.pendingFile,children:[(0,Y.jsx)("span",{className:Ce.fileIcon,children:mr(m.type)}),(0,Y.jsxs)("span",{className:Ce.fileInfo,children:[(0,Y.jsx)("span",{className:Ce.fileCardName,children:m.name}),(0,Y.jsx)("span",{className:Ce.fileCardSize,children:_r(m.size)})]}),(0,Y.jsx)("button",{className:Ce.pendingRemove,onClick:()=>C(null),type:"button",children:"\xD7"})]}),(0,Y.jsx)("div",{className:Ce.replyArea,children:(0,Y.jsx)("textarea",{ref:T,className:Ce.replyInput,placeholder:o,value:s,onChange:P=>{r(P.target.value);let F=P.target;F.style.height="auto",F.style.height=`${Math.min(F.scrollHeight,120)}px`},onKeyDown:K,rows:2,autoFocus:t})}),(0,Y.jsxs)("div",{className:Ce.replyToolbar,children:[(0,Y.jsx)("button",{className:Ce.replyTool,onClick:ge,type:"button",title:"\uD30C\uC77C \uCCA8\uBD80",children:(0,Y.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Y.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,Y.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),(0,Y.jsx)("button",{className:Ce.replyTool,onClick:fe,type:"button",title:"\uC694\uC18C \uC2A4\uD06C\uB9B0\uC0F7",children:(0,Y.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Y.jsx)("path",{d:"M14.5 4h-5L7 7H4a2 2 0 00-2 2v9a2 2 0 002 2h16a2 2 0 002-2V9a2 2 0 00-2-2h-3l-2.5-3z"}),(0,Y.jsx)("circle",{cx:"12",cy:"13",r:"3"})]})}),(0,Y.jsx)("button",{className:`${Ce.replySend} ${M?Ce.active:""}`,onClick:j,disabled:!M,type:"button",title:"\uC804\uC1A1",children:(0,Y.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Y.jsx)("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),(0,Y.jsx)("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]}),(0,Y.jsx)("input",{ref:E,type:"file",accept:"*/*",style:{display:"none"},onChange:ce})]})}var pr=`@keyframes styles-module__slideIn___0o0s- {
1315
+ }`,ur={replyWrapper:"styles-module__replyWrapper___wuGqO",pendingImage:"styles-module__pendingImage___Sc3K4",pendingRemove:"styles-module__pendingRemove___ftBrZ",pendingFile:"styles-module__pendingFile___ss0Dp",fileIcon:"styles-module__fileIcon___lCxGN",fileInfo:"styles-module__fileInfo___WpCET",fileCardName:"styles-module__fileCardName___0idJU",fileCardSize:"styles-module__fileCardSize___b9sJT",replyArea:"styles-module__replyArea___tmywT",replyInput:"styles-module__replyInput___UAMsE",replyToolbar:"styles-module__replyToolbar___c6TcW",replyTool:"styles-module__replyTool___RBxLW",replySend:"styles-module__replySend___eTc6O",active:"styles-module__active___-Ce1c"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-reply-input-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-reply-input-styles",document.head.appendChild(e)),e.textContent=cr}var Ce=ur;var Y=require("react/jsx-runtime");function _r(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(0)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function mr(e){return e.includes("pdf")?"PDF":e.includes("spreadsheet")||e.includes("excel")||e.includes("csv")?"XLS":e.includes("presentation")||e.includes("powerpoint")?"PPT":e.includes("document")||e.includes("word")?"DOC":e.includes("zip")||e.includes("compressed")||e.includes("archive")?"ZIP":e.includes("video")?"VID":e.includes("audio")?"AUD":"FILE"}function po({onSend:e,onEscape:n,placeholder:o="Reply...",autoFocus:t=!1}){let[s,r]=(0,Me.useState)(""),[i,a]=(0,Me.useState)(null),[m,w]=(0,Me.useState)(null),[C,L]=(0,Me.useState)(!1),T=(0,Me.useRef)(null),I=(0,Me.useRef)(null),M=s.trim()||i||m,j=(0,Me.useCallback)(()=>{M&&(e(s.trim(),i||void 0,m||void 0),r(""),a(null),w(null),T.current&&(T.current.style.height="auto"))},[s,i,m,M,e]),K=(0,Me.useCallback)(P=>{P.stopPropagation(),!P.nativeEvent.isComposing&&(P.key==="Enter"&&!P.shiftKey&&(P.preventDefault(),j()),P.key==="Escape"&&n?.())},[j,n]),pe=(0,Me.useCallback)(()=>{L(!0);let P=document.querySelectorAll("[data-impakers-debug], [data-annotation-marker]");P.forEach(A=>A.style.visibility="hidden"),document.documentElement.classList.add("impakers-selecting");let F=null,Q=A=>{F||(F=document.createElement("div"),F.style.cssText="position:fixed;border:2px solid #3b82f6;background:rgba(59,130,246,0.05);border-radius:4px;pointer-events:none;z-index:999999;transition:all 0.08s ease",document.body.appendChild(F)),F.style.left=`${A.left}px`,F.style.top=`${A.top}px`,F.style.width=`${A.width}px`,F.style.height=`${A.height}px`},b=()=>{document.removeEventListener("mousemove",D),document.removeEventListener("click",ge,!0),document.removeEventListener("keydown",E),document.documentElement.classList.remove("impakers-selecting"),F?.remove(),P.forEach(A=>A.style.visibility=""),L(!1)},D=A=>{let te=document.elementFromPoint(A.clientX,A.clientY);!te||te===F||Q(te.getBoundingClientRect())},E=A=>{A.key==="Escape"&&b()},ge=async A=>{A.preventDefault(),A.stopPropagation(),A.stopImmediatePropagation();let te=document.elementFromPoint(A.clientX,A.clientY);if(b(),!!te){try{let le=await Un(te);a(le)}catch(le){console.error("[@impakers/debug] DOM \uC2A4\uD06C\uB9B0\uC0F7 \uC2E4\uD328:",le)}T.current?.focus()}};document.addEventListener("mousemove",D),document.addEventListener("click",ge,!0),document.addEventListener("keydown",E)},[]),fe=(0,Me.useCallback)(()=>{I.current?.click()},[]),ce=(0,Me.useCallback)(P=>{let F=P.target.files?.[0];if(F){if(F.size>4.5*1024*1024){console.warn("[@impakers/debug] \uD30C\uC77C \uD06C\uAE30\uAC00 4.5MB\uB97C \uCD08\uACFC\uD569\uB2C8\uB2E4."),P.target.value="";return}if(F.type.startsWith("image/")){w(null);let Q=new FileReader;Q.onload=()=>a(Q.result),Q.readAsDataURL(F)}else a(null),w(F);P.target.value=""}},[]);return(0,Y.jsxs)("div",{className:Ce.replyWrapper,"data-impakers-debug":"",children:[i&&(0,Y.jsxs)("div",{className:Ce.pendingImage,children:[(0,Y.jsx)("img",{src:i,alt:"pending"}),(0,Y.jsx)("button",{className:Ce.pendingRemove,onClick:()=>a(null),type:"button",children:"\xD7"})]}),m&&(0,Y.jsxs)("div",{className:Ce.pendingFile,children:[(0,Y.jsx)("span",{className:Ce.fileIcon,children:mr(m.type)}),(0,Y.jsxs)("span",{className:Ce.fileInfo,children:[(0,Y.jsx)("span",{className:Ce.fileCardName,children:m.name}),(0,Y.jsx)("span",{className:Ce.fileCardSize,children:_r(m.size)})]}),(0,Y.jsx)("button",{className:Ce.pendingRemove,onClick:()=>w(null),type:"button",children:"\xD7"})]}),(0,Y.jsx)("div",{className:Ce.replyArea,children:(0,Y.jsx)("textarea",{ref:T,className:Ce.replyInput,placeholder:o,value:s,onChange:P=>{r(P.target.value);let F=P.target;F.style.height="auto",F.style.height=`${Math.min(F.scrollHeight,120)}px`},onKeyDown:K,rows:2,autoFocus:t})}),(0,Y.jsxs)("div",{className:Ce.replyToolbar,children:[(0,Y.jsx)("button",{className:Ce.replyTool,onClick:fe,type:"button",title:"\uD30C\uC77C \uCCA8\uBD80",children:(0,Y.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Y.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,Y.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),(0,Y.jsx)("button",{className:Ce.replyTool,onClick:pe,type:"button",title:"\uC694\uC18C \uC2A4\uD06C\uB9B0\uC0F7",children:(0,Y.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Y.jsx)("path",{d:"M14.5 4h-5L7 7H4a2 2 0 00-2 2v9a2 2 0 002 2h16a2 2 0 002-2V9a2 2 0 00-2-2h-3l-2.5-3z"}),(0,Y.jsx)("circle",{cx:"12",cy:"13",r:"3"})]})}),(0,Y.jsx)("button",{className:`${Ce.replySend} ${M?Ce.active:""}`,onClick:j,disabled:!M,type:"button",title:"\uC804\uC1A1",children:(0,Y.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,Y.jsx)("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),(0,Y.jsx)("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]}),(0,Y.jsx)("input",{ref:I,type:"file",accept:"*/*",style:{display:"none"},onChange:ce})]})}var pr=`@keyframes styles-module__slideIn___0o0s- {
1316
1316
  from {
1317
1317
  transform: translateX(100%);
1318
1318
  }
@@ -2380,7 +2380,7 @@ ${n.stack?.split(`
2380
2380
  white-space: nowrap;
2381
2381
  overflow: hidden;
2382
2382
  text-overflow: ellipsis;
2383
- }`,fr={backdrop:"styles-module__backdrop___zYhcU",fadeIn:"styles-module__fadeIn___j09Ts",panel:"styles-module__panel___6YS8k",slideIn:"styles-module__slideIn___0o0s-",exiting:"styles-module__exiting___6A-Ag",slideOut:"styles-module__slideOut___nKrBX",header:"styles-module__header___fBbGz",headerLeft:"styles-module__headerLeft___e0YLf",headerTitle:"styles-module__headerTitle___oEPJa",closeBtn:"styles-module__closeBtn___-H8ra",tabs:"styles-module__tabs___nfuX7",tab:"styles-module__tab___Hc-jn",active:"styles-module__active___ZQzA5",tabBadge:"styles-module__tabBadge___IdFDQ",statusFilter:"styles-module__statusFilter___qtBXs",filterChip:"styles-module__filterChip___l2s74",filterCount:"styles-module__filterCount___KukiQ",content:"styles-module__content___L2lRw",card:"styles-module__card___F8qwd",cardHeader:"styles-module__cardHeader___QOVGR",cardAvatar:"styles-module__cardAvatar___FfKmW",cardInfo:"styles-module__cardInfo___BmrdF",cardMeta:"styles-module__cardMeta___7p9KD",cardAuthor:"styles-module__cardAuthor___YvnuR",cardTime:"styles-module__cardTime___N1Png",cardActions:"styles-module__cardActions___7QF72",cardAction:"styles-module__cardAction___t4b3V",cardTitle:"styles-module__cardTitle___xJxDN",cardScreenshot:"styles-module__cardScreenshot___I5-QL",cardRoute:"styles-module__cardRoute___U4gB6",cardRoutePath:"styles-module__cardRoutePath___zP-fh",cardRouteIcon:"styles-module__cardRouteIcon___SBqGj",cardRouteName:"styles-module__cardRouteName___BDH75",cardStatusTime:"styles-module__cardStatusTime___S62W1",cardFooter:"styles-module__cardFooter___wfPa4",cardReplyDot:"styles-module__cardReplyDot___YnqzI",cardReplyCount:"styles-module__cardReplyCount___O1khL",statusDot:"styles-module__statusDot___l4IHG",todo:"styles-module__todo___894P6",inProgress:"styles-module__inProgress___IZ1mJ",done:"styles-module__done___n4cWP",empty:"styles-module__empty___IADrw",emptyIcon:"styles-module__emptyIcon___1x5wT",checkBtn:"styles-module__checkBtn___KjHxm",checked:"styles-module__checked___8pype",cardDone:"styles-module__cardDone___-m4w-",backBtn:"styles-module__backBtn___PTIAl",detailView:"styles-module__detailView___36cvH",detailHeader:"styles-module__detailHeader___Hepgq",detailTitle:"styles-module__detailTitle___7TvrX",detailScreenshot:"styles-module__detailScreenshot___UPF0f",commentsList:"styles-module__commentsList___5Uigg",commentItem:"styles-module__commentItem___5u78u",commentAvatar:"styles-module__commentAvatar___OatKg",commentBody:"styles-module__commentBody___gmv1J",commentMeta:"styles-module__commentMeta___JNJa3",commentAuthorName:"styles-module__commentAuthorName___XNVRk",commentTime:"styles-module__commentTime___CokGf",commentContent:"styles-module__commentContent___yMiLR",loadingComments:"styles-module__loadingComments___zpATD",noComments:"styles-module__noComments___kvl90",replyBox:"styles-module__replyBox___FO-XS",replyInput:"styles-module__replyInput___k8C9e",sendBtn:"styles-module__sendBtn___pBzWa",commentImage:"styles-module__commentImage___LuH8X",commentFileCard:"styles-module__commentFileCard___XE44y",commentFileIcon:"styles-module__commentFileIcon___G58-y",commentFileInfo:"styles-module__commentFileInfo___OFIhR",commentFileName:"styles-module__commentFileName___NUoII",commentFileSize:"styles-module__commentFileSize___sokU8",filePreviewOverlay:"styles-module__filePreviewOverlay___5RxYd",filePreviewModal:"styles-module__filePreviewModal___MGJLW",filePreviewHeader:"styles-module__filePreviewHeader___E9SWJ",filePreviewName:"styles-module__filePreviewName___z8t-L",filePreviewActions:"styles-module__filePreviewActions___weizo",filePreviewOpen:"styles-module__filePreviewOpen___JpaEs",filePreviewClose:"styles-module__filePreviewClose___TFcbr",filePreviewBody:"styles-module__filePreviewBody___gwg1S",filePreviewIframe:"styles-module__filePreviewIframe___OQ3Oo",filePreviewFallback:"styles-module__filePreviewFallback___U1rB2",filePreviewFallbackIcon:"styles-module__filePreviewFallbackIcon___0--41",lightbox:"styles-module__lightbox___8CDdt",lightboxClose:"styles-module__lightboxClose___VGfjh",historyFilter:"styles-module__historyFilter___IoWL4",historyDateWrap:"styles-module__historyDateWrap___reBzb",filterChipClear:"styles-module__filterChipClear___Sx4c3",datePopover:"styles-module__datePopover___AYzLr",dateInput:"styles-module__dateInput___Ofr3Y",historyItem:"styles-module__historyItem___G4kbt",historyDot:"styles-module__historyDot___0z439",historyDot_created:"styles-module__historyDot_created___G-qjM",historyDot_status_changed:"styles-module__historyDot_status_changed___jsanw",historyDot_comment_added:"styles-module__historyDot_comment_added___5-lrl",historyBody:"styles-module__historyBody___i-k1p",historyStatusChange:"styles-module__historyStatusChange___1l8GK",historyStatusBadge:"styles-module__historyStatusBadge___H72NB",status_todo:"styles-module__status_todo___CsneX",status_in_progress:"styles-module__status_in_progress___7-R87",status_done:"styles-module__status_done___0cBE-",historyArrow:"styles-module__historyArrow___gcXso",historyLabel:"styles-module__historyLabel___rfxYN",historyComment:"styles-module__historyComment___U6jkL",historyCommentAuthor:"styles-module__historyCommentAuthor___waQnr",historyCommentContent:"styles-module__historyCommentContent___7hQJ7",historyFooter:"styles-module__historyFooter___RnBO3",historyTime:"styles-module__historyTime___bWpM4",historyRef:"styles-module__historyRef___X8lNJ"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-inbox-panel-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-inbox-panel-styles",document.head.appendChild(e)),e.textContent=pr}var d=fr;var l=require("react/jsx-runtime");function gr({src:e,onClose:n}){return(0,q.useEffect)(()=>{let o=t=>{t.key==="Escape"&&n()};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[n]),(0,l.jsxs)("div",{className:d.lightbox,onClick:n,"data-impakers-debug":"",children:[(0,l.jsx)("img",{src:e,alt:"enlarged",onClick:o=>o.stopPropagation()}),(0,l.jsx)("button",{className:d.lightboxClose,onClick:n,type:"button",children:"\xD7"})]})}function hr(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(0)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function go(e){return e.includes("pdf")?"PDF":e.includes("spreadsheet")||e.includes("excel")||e.includes("csv")?"XLS":e.includes("presentation")||e.includes("powerpoint")?"PPT":e.includes("document")||e.includes("word")?"DOC":e.includes("zip")||e.includes("compressed")||e.includes("archive")?"ZIP":e.includes("video")?"VID":e.includes("audio")?"AUD":"FILE"}function yr(e){let n=e.match(/\/d\/([^/]+)/);return n?n[1]:null}function br(e,n,o){let t=/\.(pptx?|xlsx?|docx?)$/i.test(e)||n.includes("presentation")||n.includes("powerpoint")||n.includes("spreadsheet")||n.includes("excel")||n.includes("document")||n.includes("word")||n.includes("msword");if(o==="google_drive"){let s=yr(e);if(s)return`https://drive.google.com/file/d/${s}/preview`}return t&&o!=="google_drive"?`https://view.officeapps.live.com/op/embed.aspx?src=${encodeURIComponent(e)}`:n.includes("pdf")?e:null}function xr({fileUrl:e,fileName:n,fileType:o,fileSource:t,onClose:s}){(0,q.useEffect)(()=>{let i=a=>{a.key==="Escape"&&s()};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[s]);let r=br(e,o,t);return(0,l.jsx)("div",{className:d.filePreviewOverlay,onClick:s,"data-impakers-debug":"",children:(0,l.jsxs)("div",{className:d.filePreviewModal,onClick:i=>i.stopPropagation(),children:[(0,l.jsxs)("div",{className:d.filePreviewHeader,children:[(0,l.jsx)("span",{className:d.filePreviewName,children:n}),(0,l.jsxs)("div",{className:d.filePreviewActions,children:[(0,l.jsxs)("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:d.filePreviewOpen,children:[(0,l.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"14",height:"14",children:[(0,l.jsx)("path",{d:"M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6"}),(0,l.jsx)("polyline",{points:"15 3 21 3 21 9"}),(0,l.jsx)("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]}),"\uC5F4\uAE30"]}),(0,l.jsx)("button",{className:d.filePreviewClose,onClick:s,type:"button",children:"\xD7"})]})]}),(0,l.jsx)("div",{className:d.filePreviewBody,children:r?(0,l.jsx)("iframe",{src:r,className:d.filePreviewIframe,title:n}):(0,l.jsxs)("div",{className:d.filePreviewFallback,children:[(0,l.jsx)("span",{className:d.filePreviewFallbackIcon,children:go(o)}),(0,l.jsx)("span",{children:"\uBBF8\uB9AC\uBCF4\uAE30\uB97C \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 \uD30C\uC77C \uD615\uC2DD\uC785\uB2C8\uB2E4"}),(0,l.jsx)("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:"\uD30C\uC77C \uC5F4\uAE30"})]})})]})})}function un(e){let n=new Date(e),o=Date.now()-n.getTime(),t=m=>String(m).padStart(2,"0"),s=`${n.getMonth()+1}/${n.getDate()} ${t(n.getHours())}:${t(n.getMinutes())}`,r=Math.floor(o/6e4);if(r<1)return`${s} (\uBC29\uAE08)`;if(r<60)return`${s} (${r}\uBD84 \uC804)`;let i=Math.floor(r/60);if(i<24)return`${s} (${i}\uC2DC\uAC04 \uC804)`;let a=Math.floor(i/24);return`${s} (${a}\uC77C \uC804)`}function ht(e){return e.slice(0,1).toUpperCase()}function ho({pageItems:e,allItems:n,currentPath:o,serviceName:t,endpoint:s,currentUserName:r,currentUserId:i,onClose:a,onHistoryViewed:m,newNotiCount:C}){let[w,L]=(0,q.useState)("page"),[T,E]=(0,q.useState)("todo"),[M,j]=(0,q.useState)(""),[K,fe]=(0,q.useState)(!1),ge=(0,q.useRef)(null),[ce,P]=(0,q.useState)([]),[F,Q]=(0,q.useState)(!1),[b,D]=(0,q.useState)(!1),[R,he]=(0,q.useState)(null),[A,te]=(0,q.useState)([]),[le,ye]=(0,q.useState)(!1),[Pe,Te]=(0,q.useState)(null),[be,x]=(0,q.useState)(null),v=(0,q.useRef)(null),oe=(0,q.useCallback)(()=>{if(R){he(null),te([]);return}D(!0),setTimeout(()=>a(),150)},[a,R]),f=(0,q.useCallback)(async p=>{he(p);let W=cn(qe(p.id));te(W||[]),ye(!W)},[s]);(0,q.useEffect)(()=>{if(!R)return;let p=qe(R.id),W=cn(p);W&&(te(W),ye(!1));let $e=En(p,ve=>{te(ve),ye(!1)});return Yn(s,R.id,{staleWhileRevalidate:!0}).then(ve=>{te(ve),ye(!1)}).catch(()=>{ye(!1)}),$e},[R,s]),(0,q.useEffect)(()=>{v.current?.scrollIntoView({behavior:"smooth"})},[A.length]),(0,q.useEffect)(()=>{if(!K)return;let p=W=>{ge.current&&!ge.current.contains(W.target)&&fe(!1)};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[K]);let $=(0,q.useCallback)(async(p,W,$e)=>{if(R)try{let ve;if($e)try{ve=await qn(s,$e,"comment",R.id)}catch(Be){console.error("[@impakers/debug] \uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328:",Be)}await Qn(s,R.id,p,r,i,W,ve)}catch(ve){console.error("[@impakers/debug] \uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328:",ve)}},[R,s,r,i]),z=w==="page"?e:w==="all"?n:[],ue=z.filter(p=>p.status===T),B=z.filter(p=>p.status==="todo").length,Z=z.filter(p=>p.status==="in_progress").length,re=z.filter(p=>p.status==="done").length;return(0,q.useEffect)(()=>{w==="history"&&(Q(!0),Gn(s,{date:M||void 0,limit:200}).then(P).catch(()=>P([])).finally(()=>Q(!1)))},[w,M,s]),typeof document>"u"?null:(0,fo.createPortal)((0,l.jsxs)("div",{"data-impakers-debug":"",children:[(0,l.jsx)("div",{className:d.backdrop,onClick:oe}),(0,l.jsxs)("div",{className:`${d.panel} ${b?d.exiting:""}`,"data-impakers-debug":"",children:[(0,l.jsxs)("div",{className:d.header,children:[(0,l.jsxs)("div",{className:d.headerLeft,children:[R&&(0,l.jsx)("button",{className:d.backBtn,onClick:oe,type:"button",children:(0,l.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"16",height:"16",children:(0,l.jsx)("polyline",{points:"15 18 9 12 15 6"})})}),(0,l.jsx)("span",{className:d.headerTitle,children:R?"\uD53C\uB4DC\uBC31 \uC0C1\uC138":t||"Feedback"})]}),(0,l.jsx)("button",{className:d.closeBtn,onClick:()=>{D(!0),setTimeout(()=>a(),150)},type:"button",children:(0,l.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,l.jsx)("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),R?(0,l.jsxs)("div",{className:d.detailView,children:[(0,l.jsxs)("div",{className:d.detailHeader,children:[(0,l.jsx)("div",{className:d.cardAvatar,children:ht(R.authorName)}),(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:d.cardMeta,children:[(0,l.jsx)("span",{className:d.cardAuthor,children:R.authorName}),(0,l.jsx)("span",{className:d.cardTime,children:un(R.createdAt)})]}),(0,l.jsx)("div",{className:d.detailTitle,children:R.title.replace(/^\[피드백\]\s*/,"")})]})]}),R.screenshot&&(0,l.jsx)("div",{className:d.detailScreenshot,children:(0,l.jsx)("img",{src:R.screenshot,alt:"screenshot"})}),(0,l.jsxs)("div",{className:d.commentsList,children:[le&&(0,l.jsx)(et,{message:"\uB313\uAE00 \uB85C\uB529 \uC911..."}),!le&&A.length===0&&(0,l.jsx)("div",{className:d.noComments,children:"\uC544\uC9C1 \uB313\uAE00\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"}),A.map(p=>(0,l.jsxs)("div",{className:d.commentItem,children:[(0,l.jsx)("div",{className:d.commentAvatar,style:{width:22,height:22,fontSize:10},children:ht(p.authorName)}),(0,l.jsxs)("div",{className:d.commentBody,children:[(0,l.jsxs)("div",{className:d.commentMeta,children:[(0,l.jsx)("span",{className:d.commentAuthorName,children:p.authorName}),(0,l.jsx)("span",{className:d.commentTime,children:un(p.createdAt)})]}),p.content&&(0,l.jsx)("div",{className:d.commentContent,children:p.content}),p.imageUrl&&(0,l.jsx)("div",{className:d.commentImage,onClick:W=>{W.stopPropagation(),Te(p.imageUrl)},children:(0,l.jsx)("img",{src:p.imageUrl,alt:"attachment"})}),p.fileUrl&&(0,l.jsxs)("div",{className:d.commentFileCard,onClick:W=>{W.stopPropagation(),x({url:p.fileUrl,name:p.fileName||"\uD30C\uC77C",type:p.fileType||"",source:p.fileSource})},children:[(0,l.jsx)("span",{className:d.commentFileIcon,children:go(p.fileType||"")}),(0,l.jsxs)("span",{className:d.commentFileInfo,children:[(0,l.jsx)("span",{className:d.commentFileName,children:p.fileName||"\uD30C\uC77C"}),p.fileSize!=null&&(0,l.jsx)("span",{className:d.commentFileSize,children:hr(p.fileSize)})]})]})]})]},p.id)),(0,l.jsx)("div",{ref:v})]}),(0,l.jsx)(po,{onSend:$,onEscape:oe,autoFocus:!0})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:d.tabs,children:[(0,l.jsxs)("button",{className:`${d.tab} ${w==="page"?d.active:""}`,onClick:()=>L("page"),type:"button",children:["This Page",e.length>0&&(0,l.jsx)("span",{className:d.tabBadge,children:e.length})]}),(0,l.jsxs)("button",{className:`${d.tab} ${w==="all"?d.active:""}`,onClick:()=>L("all"),type:"button",children:["All",n.length>0&&(0,l.jsx)("span",{className:d.tabBadge,children:n.length})]}),(0,l.jsxs)("button",{className:`${d.tab} ${w==="history"?d.active:""}`,onClick:()=>{L("history"),m?.()},type:"button",children:["History",C&&C>0?(0,l.jsx)("span",{className:d.tabBadge,children:C}):null]})]}),w==="history"?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:d.historyFilter,children:[(0,l.jsxs)("div",{className:d.historyDateWrap,ref:ge,children:[(0,l.jsxs)("button",{className:`${d.filterChip} ${M?d.active:""}`,onClick:()=>fe(p=>!p),type:"button",children:[(0,l.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"13",height:"13",children:[(0,l.jsx)("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",ry:"2"}),(0,l.jsx)("line",{x1:"16",y1:"2",x2:"16",y2:"6"}),(0,l.jsx)("line",{x1:"8",y1:"2",x2:"8",y2:"6"}),(0,l.jsx)("line",{x1:"3",y1:"10",x2:"21",y2:"10"})]}),M?`${new Date(M).getMonth()+1}/${new Date(M).getDate()}`:"\uB0A0\uC9DC"]}),K&&(0,l.jsx)("div",{className:d.datePopover,children:(0,l.jsx)("input",{type:"date",value:M,onChange:p=>{j(p.target.value),fe(!1)},className:d.dateInput,autoFocus:!0})})]}),M&&(0,l.jsx)("button",{className:d.filterChipClear,onClick:()=>j(""),type:"button",title:"\uD544\uD130 \uCD08\uAE30\uD654",children:"\xD7"})]}),(0,l.jsx)("div",{className:d.content,children:F?(0,l.jsx)("div",{className:d.empty,children:"\uB85C\uB529 \uC911..."}):ce.length===0?(0,l.jsxs)("div",{className:d.empty,children:[(0,l.jsx)("div",{className:d.emptyIcon,children:(0,l.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,l.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,l.jsx)("polyline",{points:"12 6 12 12 16 14"})]})}),"\uD788\uC2A4\uD1A0\uB9AC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4"]}):ce.map((p,W)=>(0,l.jsxs)("div",{className:d.historyItem,children:[(0,l.jsx)("div",{className:`${d.historyDot} ${d[`historyDot_${p.action}`]}`}),(0,l.jsxs)("div",{className:d.historyBody,children:[p.action==="status_changed"&&(0,l.jsxs)("div",{className:d.historyStatusChange,children:[(0,l.jsx)("span",{className:`${d.historyStatusBadge} ${d[`status_${p.fromStatus}`]}`,children:p.fromStatus==="todo"?"\uB300\uAE30":p.fromStatus==="in_progress"?"\uC9C4\uD589\uC911":"\uC644\uB8CC"}),(0,l.jsx)("span",{className:d.historyArrow,children:"\u2192"}),(0,l.jsx)("span",{className:`${d.historyStatusBadge} ${d[`status_${p.toStatus}`]}`,children:p.toStatus==="todo"?"\uB300\uAE30":p.toStatus==="in_progress"?"\uC9C4\uD589\uC911":"\uC644\uB8CC"})]}),p.action==="created"&&(0,l.jsxs)("div",{className:d.historyStatusChange,children:[(0,l.jsx)("span",{className:d.historyLabel,children:"\uC0DD\uC131"}),(0,l.jsx)("span",{className:`${d.historyStatusBadge} ${d.status_todo}`,children:"\uB300\uAE30"})]}),p.action==="comment_added"&&(0,l.jsxs)("div",{className:d.historyComment,children:[(0,l.jsx)("span",{className:d.historyCommentAuthor,children:p.actorName||"\uC775\uBA85"}),p.metadata?.content&&(0,l.jsx)("span",{className:d.historyCommentContent,children:String(p.metadata.content).slice(0,100)})]}),(0,l.jsxs)("div",{className:d.historyFooter,children:[(0,l.jsx)("span",{className:d.historyTime,children:un(p.createdAt)}),(0,l.jsx)("span",{className:d.historyRef,children:(p.taskTitle||"").replace(/^\[피드백\]\s*/,"")})]})]})]},`${p.id}-${p.action}-${W}`))})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:d.statusFilter,children:[(0,l.jsxs)("button",{className:`${d.filterChip} ${T==="todo"?d.active:""}`,onClick:()=>E("todo"),type:"button",children:["\uC9C4\uD589\uC804",B>0&&(0,l.jsx)("span",{className:d.filterCount,children:B})]}),(0,l.jsxs)("button",{className:`${d.filterChip} ${T==="in_progress"?d.active:""}`,onClick:()=>E("in_progress"),type:"button",children:["\uC9C4\uD589\uC911",Z>0&&(0,l.jsx)("span",{className:d.filterCount,children:Z})]}),(0,l.jsxs)("button",{className:`${d.filterChip} ${T==="done"?d.active:""}`,onClick:()=>E("done"),type:"button",children:["\uC644\uB8CC",re>0&&(0,l.jsx)("span",{className:d.filterCount,children:re})]})]}),(0,l.jsx)("div",{className:d.content,children:ue.length===0?(0,l.jsxs)("div",{className:d.empty,children:[(0,l.jsx)("div",{className:d.emptyIcon,children:(0,l.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:(0,l.jsx)("path",{d:"M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z"})})}),w==="page"?"\uC774 \uD398\uC774\uC9C0\uC5D0 \uD53C\uB4DC\uBC31\uC774 \uC5C6\uC2B5\uB2C8\uB2E4":"\uD53C\uB4DC\uBC31\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"]}):ue.map(p=>(0,l.jsxs)("div",{className:`${d.card} ${p.status==="done"?d.cardDone:""}`,onClick:()=>f(p),children:[(0,l.jsxs)("div",{className:d.cardHeader,children:[(0,l.jsx)("div",{className:d.cardAvatar,children:ht(p.authorName)}),(0,l.jsx)("div",{className:d.cardInfo,children:(0,l.jsxs)("div",{className:d.cardMeta,children:[(0,l.jsx)("span",{className:d.cardAuthor,children:p.authorName}),(0,l.jsx)("span",{className:d.cardTime,children:un(p.createdAt)})]})})]}),(0,l.jsx)("div",{className:d.cardTitle,children:p.title.replace(/^\[피드백\]\s*/,"")}),p.screenshot&&(0,l.jsx)("div",{className:d.cardScreenshot,children:(0,l.jsx)("img",{src:p.screenshot,alt:"screenshot"})}),w==="all"&&p.feedbackUrl&&(0,l.jsxs)("div",{className:d.cardRoute,onClick:W=>{W.stopPropagation(),window.location.href=p.feedbackUrl},title:"\uD398\uC774\uC9C0\uB85C \uC774\uB3D9",children:[(0,l.jsx)("span",{className:d.cardRoutePath,children:p.feedbackUrl}),(0,l.jsxs)("svg",{className:d.cardRouteIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"12",height:"12",children:[(0,l.jsx)("path",{d:"M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6"}),(0,l.jsx)("polyline",{points:"15 3 21 3 21 9"}),(0,l.jsx)("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]})]}),(p.startedAt||p.completedAt)&&(0,l.jsxs)("div",{className:d.cardStatusTime,children:[p.startedAt&&p.status!=="todo"&&(0,l.jsxs)("span",{children:["\uC9C4\uD589 \uC2DC\uC791: ",un(p.startedAt)]}),p.completedAt&&p.status==="done"&&(0,l.jsxs)("span",{children:["\uC644\uB8CC: ",un(p.completedAt)]})]}),(0,l.jsxs)("div",{className:d.cardFooter,children:[(0,l.jsx)("span",{className:d.cardReplyDot}),(0,l.jsxs)("span",{className:d.cardReplyCount,children:[p.commentCount," ",p.commentCount===1?"Reply":"Replies"]})]})]},p.id))})]})]})]}),Pe&&(0,l.jsx)(gr,{src:Pe,onClose:()=>Te(null)}),be&&(0,l.jsx)(xr,{fileUrl:be.url,fileName:be.name,fileType:be.type,fileSource:be.source,onClose:()=>x(null)})]}),document.body)}var H=require("react"),bo=require("react-dom");var kr=`@keyframes styles-module__slideIn___Wx-kZ {
2383
+ }`,fr={backdrop:"styles-module__backdrop___zYhcU",fadeIn:"styles-module__fadeIn___j09Ts",panel:"styles-module__panel___6YS8k",slideIn:"styles-module__slideIn___0o0s-",exiting:"styles-module__exiting___6A-Ag",slideOut:"styles-module__slideOut___nKrBX",header:"styles-module__header___fBbGz",headerLeft:"styles-module__headerLeft___e0YLf",headerTitle:"styles-module__headerTitle___oEPJa",closeBtn:"styles-module__closeBtn___-H8ra",tabs:"styles-module__tabs___nfuX7",tab:"styles-module__tab___Hc-jn",active:"styles-module__active___ZQzA5",tabBadge:"styles-module__tabBadge___IdFDQ",statusFilter:"styles-module__statusFilter___qtBXs",filterChip:"styles-module__filterChip___l2s74",filterCount:"styles-module__filterCount___KukiQ",content:"styles-module__content___L2lRw",card:"styles-module__card___F8qwd",cardHeader:"styles-module__cardHeader___QOVGR",cardAvatar:"styles-module__cardAvatar___FfKmW",cardInfo:"styles-module__cardInfo___BmrdF",cardMeta:"styles-module__cardMeta___7p9KD",cardAuthor:"styles-module__cardAuthor___YvnuR",cardTime:"styles-module__cardTime___N1Png",cardActions:"styles-module__cardActions___7QF72",cardAction:"styles-module__cardAction___t4b3V",cardTitle:"styles-module__cardTitle___xJxDN",cardScreenshot:"styles-module__cardScreenshot___I5-QL",cardRoute:"styles-module__cardRoute___U4gB6",cardRoutePath:"styles-module__cardRoutePath___zP-fh",cardRouteIcon:"styles-module__cardRouteIcon___SBqGj",cardRouteName:"styles-module__cardRouteName___BDH75",cardStatusTime:"styles-module__cardStatusTime___S62W1",cardFooter:"styles-module__cardFooter___wfPa4",cardReplyDot:"styles-module__cardReplyDot___YnqzI",cardReplyCount:"styles-module__cardReplyCount___O1khL",statusDot:"styles-module__statusDot___l4IHG",todo:"styles-module__todo___894P6",inProgress:"styles-module__inProgress___IZ1mJ",done:"styles-module__done___n4cWP",empty:"styles-module__empty___IADrw",emptyIcon:"styles-module__emptyIcon___1x5wT",checkBtn:"styles-module__checkBtn___KjHxm",checked:"styles-module__checked___8pype",cardDone:"styles-module__cardDone___-m4w-",backBtn:"styles-module__backBtn___PTIAl",detailView:"styles-module__detailView___36cvH",detailHeader:"styles-module__detailHeader___Hepgq",detailTitle:"styles-module__detailTitle___7TvrX",detailScreenshot:"styles-module__detailScreenshot___UPF0f",commentsList:"styles-module__commentsList___5Uigg",commentItem:"styles-module__commentItem___5u78u",commentAvatar:"styles-module__commentAvatar___OatKg",commentBody:"styles-module__commentBody___gmv1J",commentMeta:"styles-module__commentMeta___JNJa3",commentAuthorName:"styles-module__commentAuthorName___XNVRk",commentTime:"styles-module__commentTime___CokGf",commentContent:"styles-module__commentContent___yMiLR",loadingComments:"styles-module__loadingComments___zpATD",noComments:"styles-module__noComments___kvl90",replyBox:"styles-module__replyBox___FO-XS",replyInput:"styles-module__replyInput___k8C9e",sendBtn:"styles-module__sendBtn___pBzWa",commentImage:"styles-module__commentImage___LuH8X",commentFileCard:"styles-module__commentFileCard___XE44y",commentFileIcon:"styles-module__commentFileIcon___G58-y",commentFileInfo:"styles-module__commentFileInfo___OFIhR",commentFileName:"styles-module__commentFileName___NUoII",commentFileSize:"styles-module__commentFileSize___sokU8",filePreviewOverlay:"styles-module__filePreviewOverlay___5RxYd",filePreviewModal:"styles-module__filePreviewModal___MGJLW",filePreviewHeader:"styles-module__filePreviewHeader___E9SWJ",filePreviewName:"styles-module__filePreviewName___z8t-L",filePreviewActions:"styles-module__filePreviewActions___weizo",filePreviewOpen:"styles-module__filePreviewOpen___JpaEs",filePreviewClose:"styles-module__filePreviewClose___TFcbr",filePreviewBody:"styles-module__filePreviewBody___gwg1S",filePreviewIframe:"styles-module__filePreviewIframe___OQ3Oo",filePreviewFallback:"styles-module__filePreviewFallback___U1rB2",filePreviewFallbackIcon:"styles-module__filePreviewFallbackIcon___0--41",lightbox:"styles-module__lightbox___8CDdt",lightboxClose:"styles-module__lightboxClose___VGfjh",historyFilter:"styles-module__historyFilter___IoWL4",historyDateWrap:"styles-module__historyDateWrap___reBzb",filterChipClear:"styles-module__filterChipClear___Sx4c3",datePopover:"styles-module__datePopover___AYzLr",dateInput:"styles-module__dateInput___Ofr3Y",historyItem:"styles-module__historyItem___G4kbt",historyDot:"styles-module__historyDot___0z439",historyDot_created:"styles-module__historyDot_created___G-qjM",historyDot_status_changed:"styles-module__historyDot_status_changed___jsanw",historyDot_comment_added:"styles-module__historyDot_comment_added___5-lrl",historyBody:"styles-module__historyBody___i-k1p",historyStatusChange:"styles-module__historyStatusChange___1l8GK",historyStatusBadge:"styles-module__historyStatusBadge___H72NB",status_todo:"styles-module__status_todo___CsneX",status_in_progress:"styles-module__status_in_progress___7-R87",status_done:"styles-module__status_done___0cBE-",historyArrow:"styles-module__historyArrow___gcXso",historyLabel:"styles-module__historyLabel___rfxYN",historyComment:"styles-module__historyComment___U6jkL",historyCommentAuthor:"styles-module__historyCommentAuthor___waQnr",historyCommentContent:"styles-module__historyCommentContent___7hQJ7",historyFooter:"styles-module__historyFooter___RnBO3",historyTime:"styles-module__historyTime___bWpM4",historyRef:"styles-module__historyRef___X8lNJ"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-inbox-panel-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-inbox-panel-styles",document.head.appendChild(e)),e.textContent=pr}var d=fr;var l=require("react/jsx-runtime");function gr({src:e,onClose:n}){return(0,q.useEffect)(()=>{let o=t=>{t.key==="Escape"&&n()};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[n]),(0,l.jsxs)("div",{className:d.lightbox,onClick:n,"data-impakers-debug":"",children:[(0,l.jsx)("img",{src:e,alt:"enlarged",onClick:o=>o.stopPropagation()}),(0,l.jsx)("button",{className:d.lightboxClose,onClick:n,type:"button",children:"\xD7"})]})}function hr(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(0)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function go(e){return e.includes("pdf")?"PDF":e.includes("spreadsheet")||e.includes("excel")||e.includes("csv")?"XLS":e.includes("presentation")||e.includes("powerpoint")?"PPT":e.includes("document")||e.includes("word")?"DOC":e.includes("zip")||e.includes("compressed")||e.includes("archive")?"ZIP":e.includes("video")?"VID":e.includes("audio")?"AUD":"FILE"}function yr(e){let n=e.match(/\/d\/([^/]+)/);return n?n[1]:null}function br(e,n,o){let t=/\.(pptx?|xlsx?|docx?)$/i.test(e)||n.includes("presentation")||n.includes("powerpoint")||n.includes("spreadsheet")||n.includes("excel")||n.includes("document")||n.includes("word")||n.includes("msword");if(o==="google_drive"){let s=yr(e);if(s)return`https://drive.google.com/file/d/${s}/preview`}return t&&o!=="google_drive"?`https://view.officeapps.live.com/op/embed.aspx?src=${encodeURIComponent(e)}`:n.includes("pdf")?e:null}function xr({fileUrl:e,fileName:n,fileType:o,fileSource:t,onClose:s}){(0,q.useEffect)(()=>{let i=a=>{a.key==="Escape"&&s()};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[s]);let r=br(e,o,t);return(0,l.jsx)("div",{className:d.filePreviewOverlay,onClick:s,"data-impakers-debug":"",children:(0,l.jsxs)("div",{className:d.filePreviewModal,onClick:i=>i.stopPropagation(),children:[(0,l.jsxs)("div",{className:d.filePreviewHeader,children:[(0,l.jsx)("span",{className:d.filePreviewName,children:n}),(0,l.jsxs)("div",{className:d.filePreviewActions,children:[(0,l.jsxs)("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:d.filePreviewOpen,children:[(0,l.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"14",height:"14",children:[(0,l.jsx)("path",{d:"M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6"}),(0,l.jsx)("polyline",{points:"15 3 21 3 21 9"}),(0,l.jsx)("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]}),"\uC5F4\uAE30"]}),(0,l.jsx)("button",{className:d.filePreviewClose,onClick:s,type:"button",children:"\xD7"})]})]}),(0,l.jsx)("div",{className:d.filePreviewBody,children:r?(0,l.jsx)("iframe",{src:r,className:d.filePreviewIframe,title:n}):(0,l.jsxs)("div",{className:d.filePreviewFallback,children:[(0,l.jsx)("span",{className:d.filePreviewFallbackIcon,children:go(o)}),(0,l.jsx)("span",{children:"\uBBF8\uB9AC\uBCF4\uAE30\uB97C \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 \uD30C\uC77C \uD615\uC2DD\uC785\uB2C8\uB2E4"}),(0,l.jsx)("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:"\uD30C\uC77C \uC5F4\uAE30"})]})})]})})}function _n(e){let n=new Date(e),o=Date.now()-n.getTime(),t=m=>String(m).padStart(2,"0"),s=`${n.getMonth()+1}/${n.getDate()} ${t(n.getHours())}:${t(n.getMinutes())}`,r=Math.floor(o/6e4);if(r<1)return`${s} (\uBC29\uAE08)`;if(r<60)return`${s} (${r}\uBD84 \uC804)`;let i=Math.floor(r/60);if(i<24)return`${s} (${i}\uC2DC\uAC04 \uC804)`;let a=Math.floor(i/24);return`${s} (${a}\uC77C \uC804)`}function ht(e){return e.slice(0,1).toUpperCase()}function ho({pageItems:e,allItems:n,currentPath:o,serviceName:t,endpoint:s,currentUserName:r,currentUserId:i,onClose:a,onHistoryViewed:m,newNotiCount:w}){let[C,L]=(0,q.useState)("page"),[T,I]=(0,q.useState)("todo"),[M,j]=(0,q.useState)(""),[K,pe]=(0,q.useState)(!1),fe=(0,q.useRef)(null),[ce,P]=(0,q.useState)([]),[F,Q]=(0,q.useState)(!1),[b,D]=(0,q.useState)(!1),[E,ge]=(0,q.useState)(null),[A,te]=(0,q.useState)([]),[le,he]=(0,q.useState)(!1),[Pe,Ne]=(0,q.useState)(null),[ye,x]=(0,q.useState)(null),v=(0,q.useRef)(null),oe=(0,q.useCallback)(()=>{if(E){ge(null),te([]);return}D(!0),setTimeout(()=>a(),150)},[a,E]),f=(0,q.useCallback)(async p=>{ge(p);let W=un(Ge(p.id));te(W||[]),he(!W)},[s]);(0,q.useEffect)(()=>{if(!E)return;let p=Ge(E.id),W=un(p);W&&(te(W),he(!1));let $e=Rn(p,ke=>{te(ke),he(!1)});return Yn(s,E.id,{staleWhileRevalidate:!0}).then(ke=>{te(ke),he(!1)}).catch(()=>{he(!1)}),$e},[E,s]),(0,q.useEffect)(()=>{v.current?.scrollIntoView({behavior:"smooth"})},[A.length]),(0,q.useEffect)(()=>{if(!K)return;let p=W=>{fe.current&&!fe.current.contains(W.target)&&pe(!1)};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[K]);let $=(0,q.useCallback)(async(p,W,$e)=>{if(E)try{let ke;if($e)try{ke=await qn(s,$e,"comment",E.id)}catch(Be){console.error("[@impakers/debug] \uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328:",Be)}await Qn(s,E.id,p,r,i,W,ke)}catch(ke){console.error("[@impakers/debug] \uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328:",ke)}},[E,s,r,i]),z=C==="page"?e:C==="all"?n:[],ue=z.filter(p=>p.status===T),B=z.filter(p=>p.status==="todo").length,Z=z.filter(p=>p.status==="in_progress").length,re=z.filter(p=>p.status==="done").length;return(0,q.useEffect)(()=>{C==="history"&&(Q(!0),Gn(s,{date:M||void 0,limit:200}).then(P).catch(()=>P([])).finally(()=>Q(!1)))},[C,M,s]),typeof document>"u"?null:(0,fo.createPortal)((0,l.jsxs)("div",{"data-impakers-debug":"",children:[(0,l.jsx)("div",{className:d.backdrop,onClick:oe}),(0,l.jsxs)("div",{className:`${d.panel} ${b?d.exiting:""}`,"data-impakers-debug":"",children:[(0,l.jsxs)("div",{className:d.header,children:[(0,l.jsxs)("div",{className:d.headerLeft,children:[E&&(0,l.jsx)("button",{className:d.backBtn,onClick:oe,type:"button",children:(0,l.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"16",height:"16",children:(0,l.jsx)("polyline",{points:"15 18 9 12 15 6"})})}),(0,l.jsx)("span",{className:d.headerTitle,children:E?"\uD53C\uB4DC\uBC31 \uC0C1\uC138":t||"Feedback"})]}),(0,l.jsx)("button",{className:d.closeBtn,onClick:()=>{D(!0),setTimeout(()=>a(),150)},type:"button",children:(0,l.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,l.jsx)("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),E?(0,l.jsxs)("div",{className:d.detailView,children:[(0,l.jsxs)("div",{className:d.detailHeader,children:[(0,l.jsx)("div",{className:d.cardAvatar,children:ht(E.authorName)}),(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:d.cardMeta,children:[(0,l.jsx)("span",{className:d.cardAuthor,children:E.authorName}),(0,l.jsx)("span",{className:d.cardTime,children:_n(E.createdAt)})]}),(0,l.jsx)("div",{className:d.detailTitle,children:E.title.replace(/^\[피드백\]\s*/,"")})]})]}),E.screenshot&&(0,l.jsx)("div",{className:d.detailScreenshot,children:(0,l.jsx)("img",{src:E.screenshot,alt:"screenshot"})}),(0,l.jsxs)("div",{className:d.commentsList,children:[le&&(0,l.jsx)(et,{message:"\uB313\uAE00 \uB85C\uB529 \uC911..."}),!le&&A.length===0&&(0,l.jsx)("div",{className:d.noComments,children:"\uC544\uC9C1 \uB313\uAE00\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"}),A.map(p=>(0,l.jsxs)("div",{className:d.commentItem,children:[(0,l.jsx)("div",{className:d.commentAvatar,style:{width:22,height:22,fontSize:10},children:ht(p.authorName)}),(0,l.jsxs)("div",{className:d.commentBody,children:[(0,l.jsxs)("div",{className:d.commentMeta,children:[(0,l.jsx)("span",{className:d.commentAuthorName,children:p.authorName}),(0,l.jsx)("span",{className:d.commentTime,children:_n(p.createdAt)})]}),p.content&&(0,l.jsx)("div",{className:d.commentContent,children:p.content}),p.imageUrl&&(0,l.jsx)("div",{className:d.commentImage,onClick:W=>{W.stopPropagation(),Ne(p.imageUrl)},children:(0,l.jsx)("img",{src:p.imageUrl,alt:"attachment"})}),p.fileUrl&&(0,l.jsxs)("div",{className:d.commentFileCard,onClick:W=>{W.stopPropagation(),x({url:p.fileUrl,name:p.fileName||"\uD30C\uC77C",type:p.fileType||"",source:p.fileSource})},children:[(0,l.jsx)("span",{className:d.commentFileIcon,children:go(p.fileType||"")}),(0,l.jsxs)("span",{className:d.commentFileInfo,children:[(0,l.jsx)("span",{className:d.commentFileName,children:p.fileName||"\uD30C\uC77C"}),p.fileSize!=null&&(0,l.jsx)("span",{className:d.commentFileSize,children:hr(p.fileSize)})]})]})]})]},p.id)),(0,l.jsx)("div",{ref:v})]}),(0,l.jsx)(po,{onSend:$,onEscape:oe,autoFocus:!0})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:d.tabs,children:[(0,l.jsxs)("button",{className:`${d.tab} ${C==="page"?d.active:""}`,onClick:()=>L("page"),type:"button",children:["This Page",e.length>0&&(0,l.jsx)("span",{className:d.tabBadge,children:e.length})]}),(0,l.jsxs)("button",{className:`${d.tab} ${C==="all"?d.active:""}`,onClick:()=>L("all"),type:"button",children:["All",n.length>0&&(0,l.jsx)("span",{className:d.tabBadge,children:n.length})]}),(0,l.jsxs)("button",{className:`${d.tab} ${C==="history"?d.active:""}`,onClick:()=>{L("history"),m?.()},type:"button",children:["History",w&&w>0?(0,l.jsx)("span",{className:d.tabBadge,children:w}):null]})]}),C==="history"?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:d.historyFilter,children:[(0,l.jsxs)("div",{className:d.historyDateWrap,ref:fe,children:[(0,l.jsxs)("button",{className:`${d.filterChip} ${M?d.active:""}`,onClick:()=>pe(p=>!p),type:"button",children:[(0,l.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"13",height:"13",children:[(0,l.jsx)("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",ry:"2"}),(0,l.jsx)("line",{x1:"16",y1:"2",x2:"16",y2:"6"}),(0,l.jsx)("line",{x1:"8",y1:"2",x2:"8",y2:"6"}),(0,l.jsx)("line",{x1:"3",y1:"10",x2:"21",y2:"10"})]}),M?`${new Date(M).getMonth()+1}/${new Date(M).getDate()}`:"\uB0A0\uC9DC"]}),K&&(0,l.jsx)("div",{className:d.datePopover,children:(0,l.jsx)("input",{type:"date",value:M,onChange:p=>{j(p.target.value),pe(!1)},className:d.dateInput,autoFocus:!0})})]}),M&&(0,l.jsx)("button",{className:d.filterChipClear,onClick:()=>j(""),type:"button",title:"\uD544\uD130 \uCD08\uAE30\uD654",children:"\xD7"})]}),(0,l.jsx)("div",{className:d.content,children:F?(0,l.jsx)("div",{className:d.empty,children:"\uB85C\uB529 \uC911..."}):ce.length===0?(0,l.jsxs)("div",{className:d.empty,children:[(0,l.jsx)("div",{className:d.emptyIcon,children:(0,l.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,l.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,l.jsx)("polyline",{points:"12 6 12 12 16 14"})]})}),"\uD788\uC2A4\uD1A0\uB9AC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4"]}):ce.map((p,W)=>(0,l.jsxs)("div",{className:d.historyItem,children:[(0,l.jsx)("div",{className:`${d.historyDot} ${d[`historyDot_${p.action}`]}`}),(0,l.jsxs)("div",{className:d.historyBody,children:[p.action==="status_changed"&&(0,l.jsxs)("div",{className:d.historyStatusChange,children:[(0,l.jsx)("span",{className:`${d.historyStatusBadge} ${d[`status_${p.fromStatus}`]}`,children:p.fromStatus==="todo"?"\uB300\uAE30":p.fromStatus==="in_progress"?"\uC9C4\uD589\uC911":"\uC644\uB8CC"}),(0,l.jsx)("span",{className:d.historyArrow,children:"\u2192"}),(0,l.jsx)("span",{className:`${d.historyStatusBadge} ${d[`status_${p.toStatus}`]}`,children:p.toStatus==="todo"?"\uB300\uAE30":p.toStatus==="in_progress"?"\uC9C4\uD589\uC911":"\uC644\uB8CC"})]}),p.action==="created"&&(0,l.jsxs)("div",{className:d.historyStatusChange,children:[(0,l.jsx)("span",{className:d.historyLabel,children:"\uC0DD\uC131"}),(0,l.jsx)("span",{className:`${d.historyStatusBadge} ${d.status_todo}`,children:"\uB300\uAE30"})]}),p.action==="comment_added"&&(0,l.jsxs)("div",{className:d.historyComment,children:[(0,l.jsx)("span",{className:d.historyCommentAuthor,children:p.actorName||"\uC775\uBA85"}),p.metadata?.content&&(0,l.jsx)("span",{className:d.historyCommentContent,children:String(p.metadata.content).slice(0,100)})]}),(0,l.jsxs)("div",{className:d.historyFooter,children:[(0,l.jsx)("span",{className:d.historyTime,children:_n(p.createdAt)}),(0,l.jsx)("span",{className:d.historyRef,children:(p.taskTitle||"").replace(/^\[피드백\]\s*/,"")})]})]})]},`${p.id}-${p.action}-${W}`))})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:d.statusFilter,children:[(0,l.jsxs)("button",{className:`${d.filterChip} ${T==="todo"?d.active:""}`,onClick:()=>I("todo"),type:"button",children:["\uC9C4\uD589\uC804",B>0&&(0,l.jsx)("span",{className:d.filterCount,children:B})]}),(0,l.jsxs)("button",{className:`${d.filterChip} ${T==="in_progress"?d.active:""}`,onClick:()=>I("in_progress"),type:"button",children:["\uC9C4\uD589\uC911",Z>0&&(0,l.jsx)("span",{className:d.filterCount,children:Z})]}),(0,l.jsxs)("button",{className:`${d.filterChip} ${T==="done"?d.active:""}`,onClick:()=>I("done"),type:"button",children:["\uC644\uB8CC",re>0&&(0,l.jsx)("span",{className:d.filterCount,children:re})]})]}),(0,l.jsx)("div",{className:d.content,children:ue.length===0?(0,l.jsxs)("div",{className:d.empty,children:[(0,l.jsx)("div",{className:d.emptyIcon,children:(0,l.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:(0,l.jsx)("path",{d:"M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z"})})}),C==="page"?"\uC774 \uD398\uC774\uC9C0\uC5D0 \uD53C\uB4DC\uBC31\uC774 \uC5C6\uC2B5\uB2C8\uB2E4":"\uD53C\uB4DC\uBC31\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"]}):ue.map(p=>(0,l.jsxs)("div",{className:`${d.card} ${p.status==="done"?d.cardDone:""}`,onClick:()=>f(p),children:[(0,l.jsxs)("div",{className:d.cardHeader,children:[(0,l.jsx)("div",{className:d.cardAvatar,children:ht(p.authorName)}),(0,l.jsx)("div",{className:d.cardInfo,children:(0,l.jsxs)("div",{className:d.cardMeta,children:[(0,l.jsx)("span",{className:d.cardAuthor,children:p.authorName}),(0,l.jsx)("span",{className:d.cardTime,children:_n(p.createdAt)})]})})]}),(0,l.jsx)("div",{className:d.cardTitle,children:p.title.replace(/^\[피드백\]\s*/,"")}),p.screenshot&&(0,l.jsx)("div",{className:d.cardScreenshot,children:(0,l.jsx)("img",{src:p.screenshot,alt:"screenshot"})}),C==="all"&&p.feedbackUrl&&(0,l.jsxs)("div",{className:d.cardRoute,onClick:W=>{W.stopPropagation(),window.location.href=p.feedbackUrl},title:"\uD398\uC774\uC9C0\uB85C \uC774\uB3D9",children:[(0,l.jsx)("span",{className:d.cardRoutePath,children:p.feedbackUrl}),(0,l.jsxs)("svg",{className:d.cardRouteIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"12",height:"12",children:[(0,l.jsx)("path",{d:"M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6"}),(0,l.jsx)("polyline",{points:"15 3 21 3 21 9"}),(0,l.jsx)("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]})]}),(p.startedAt||p.completedAt)&&(0,l.jsxs)("div",{className:d.cardStatusTime,children:[p.startedAt&&p.status!=="todo"&&(0,l.jsxs)("span",{children:["\uC9C4\uD589 \uC2DC\uC791: ",_n(p.startedAt)]}),p.completedAt&&p.status==="done"&&(0,l.jsxs)("span",{children:["\uC644\uB8CC: ",_n(p.completedAt)]})]}),(0,l.jsxs)("div",{className:d.cardFooter,children:[(0,l.jsx)("span",{className:d.cardReplyDot}),(0,l.jsxs)("span",{className:d.cardReplyCount,children:[p.commentCount," ",p.commentCount===1?"Reply":"Replies"]})]})]},p.id))})]})]})]}),Pe&&(0,l.jsx)(gr,{src:Pe,onClose:()=>Ne(null)}),ye&&(0,l.jsx)(xr,{fileUrl:ye.url,fileName:ye.name,fileType:ye.type,fileSource:ye.source,onClose:()=>x(null)})]}),document.body)}var H=require("react"),bo=require("react-dom");var kr=`@keyframes styles-module__slideIn___Wx-kZ {
2384
2384
  from {
2385
2385
  transform: translateX(100%);
2386
2386
  }
@@ -3100,15 +3100,15 @@ ${n.stack?.split(`
3100
3100
  }
3101
3101
  .styles-module__sendBtn___WLa8O:disabled {
3102
3102
  cursor: not-allowed;
3103
- }`,vr={backdrop:"styles-module__backdrop___qExl6",fadeIn:"styles-module__fadeIn___lF-be",panel:"styles-module__panel___ri2CN",slideIn:"styles-module__slideIn___Wx-kZ",exiting:"styles-module__exiting___iE6TS",slideOut:"styles-module__slideOut___1n8cb",resizeHandle:"styles-module__resizeHandle___VGNx4",header:"styles-module__header___gmriy",headerLeft:"styles-module__headerLeft___M17Y1",headerIcon:"styles-module__headerIcon___PsSMZ",headerTitle:"styles-module__headerTitle___Y96x8",headerActions:"styles-module__headerActions___-rG09",headerBtn:"styles-module__headerBtn___eSTQN",body:"styles-module__body___bXbbW",sidebar:"styles-module__sidebar___1NIqu",sidebarHeader:"styles-module__sidebarHeader___aMgpo",sidebarList:"styles-module__sidebarList___Ob-c6",sidebarEmpty:"styles-module__sidebarEmpty___QNq3K",sidebarItem:"styles-module__sidebarItem___T8-S5",sidebarActive:"styles-module__sidebarActive___WVtxJ",sidebarTitle:"styles-module__sidebarTitle___bkPQz",sidebarDate:"styles-module__sidebarDate___QNxsK",messages:"styles-module__messages___Al0UY",welcome:"styles-module__welcome___7MKNO",welcomeIcon:"styles-module__welcomeIcon___gd4O6",welcomeText:"styles-module__welcomeText___-aHqH",welcomeHint:"styles-module__welcomeHint___zUsgp",message:"styles-module__message___-0C3Z",user:"styles-module__user___V0NWN",msgBody:"styles-module__msgBody___YMLmR",msgContent:"styles-module__msgContent___ur5dX",assistant:"styles-module__assistant___sS3g4",msgAvatar:"styles-module__msgAvatar___AAtdS",msgImages:"styles-module__msgImages___xdjr7",msgImage:"styles-module__msgImage___g9UKr",msgMarkdown:"styles-module__msgMarkdown___2bE27",paragraph:"styles-module__paragraph___0db50",heading1:"styles-module__heading1___ObrLl",heading2:"styles-module__heading2___2GDnb",heading3:"styles-module__heading3___dJGMW",inlineCode:"styles-module__inlineCode___fXbsw",codeBlock:"styles-module__codeBlock___77Vmy",codeLang:"styles-module__codeLang___ANUgp",codeCopy:"styles-module__codeCopy___UKHGh",expandBtn:"styles-module__expandBtn___9EdJu",copyBtn:"styles-module__copyBtn___gMgrH",toolCalls:"styles-module__toolCalls___YDi5U",toolCall:"styles-module__toolCall___YG3jW",tool_success:"styles-module__tool_success___-qmku",tool_error:"styles-module__tool_error___tmRla",toolIcon:"styles-module__toolIcon___w-g-Z",toolName:"styles-module__toolName___yBXu6",toolMore:"styles-module__toolMore___MSrrk",subBadge:"styles-module__subBadge___bvbxD",toolCompact:"styles-module__toolCompact___i-o7k",toolCompactToggle:"styles-module__toolCompactToggle___uOgG4",toolCompactIcon:"styles-module__toolCompactIcon___onQV5",toolCompactError:"styles-module__toolCompactError___qcqEZ",toolCompactSub:"styles-module__toolCompactSub___awUyk",toolCompactList:"styles-module__toolCompactList___pumTz",toolCompactItem:"styles-module__toolCompactItem___GN7IT",toolSummary:"styles-module__toolSummary___-ultc",typing:"styles-module__typing___SxFST",typingDot:"styles-module__typingDot___-XQcu",continueBar:"styles-module__continueBar___Ox1ee",imagePreview:"styles-module__imagePreview___69vle",imageThumb:"styles-module__imageThumb___5-tAx",imageRemove:"styles-module__imageRemove___U8lFv",inputArea:"styles-module__inputArea___ySM3W",attachBtn:"styles-module__attachBtn___uvYvg",input:"styles-module__input___UnN4A",sendBtn:"styles-module__sendBtn___WLa8O",active:"styles-module__active___SooZB"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-agent-chat-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-agent-chat-styles",document.head.appendChild(e)),e.textContent=kr}var g=vr;var u=require("react/jsx-runtime");function xo(e){return{github_read_file:"\uD30C\uC77C \uC77D\uAE30",github_search_code:"\uCF54\uB4DC \uAC80\uC0C9",github_grep_code:"\uCF54\uB4DC \uB0B4\uC6A9 \uAC80\uC0C9",github_get_tree:"\uB514\uB809\uD1A0\uB9AC \uAD6C\uC870",github_get_commits:"\uCEE4\uBC0B \uC774\uB825",supabase_query_db:"DB \uC870\uD68C",supabase_list_tables:"\uD14C\uC774\uBE14 \uBAA9\uB85D",supabase_get_api_logs:"API \uB85C\uADF8",vercel_get_runtime_logs:"\uB7F0\uD0C0\uC784 \uB85C\uADF8",vercel_get_deployments:"\uBC30\uD3EC \uC774\uB825",spawn_agent:"\uC11C\uBE0C \uC5D0\uC774\uC804\uD2B8",create_task:"\uD53C\uB4DC\uBC31 \uC0DD\uC131"}[e]||e}function Cr(e){let n=[],o=e.split(`
3103
+ }`,vr={backdrop:"styles-module__backdrop___qExl6",fadeIn:"styles-module__fadeIn___lF-be",panel:"styles-module__panel___ri2CN",slideIn:"styles-module__slideIn___Wx-kZ",exiting:"styles-module__exiting___iE6TS",slideOut:"styles-module__slideOut___1n8cb",resizeHandle:"styles-module__resizeHandle___VGNx4",header:"styles-module__header___gmriy",headerLeft:"styles-module__headerLeft___M17Y1",headerIcon:"styles-module__headerIcon___PsSMZ",headerTitle:"styles-module__headerTitle___Y96x8",headerActions:"styles-module__headerActions___-rG09",headerBtn:"styles-module__headerBtn___eSTQN",body:"styles-module__body___bXbbW",sidebar:"styles-module__sidebar___1NIqu",sidebarHeader:"styles-module__sidebarHeader___aMgpo",sidebarList:"styles-module__sidebarList___Ob-c6",sidebarEmpty:"styles-module__sidebarEmpty___QNq3K",sidebarItem:"styles-module__sidebarItem___T8-S5",sidebarActive:"styles-module__sidebarActive___WVtxJ",sidebarTitle:"styles-module__sidebarTitle___bkPQz",sidebarDate:"styles-module__sidebarDate___QNxsK",messages:"styles-module__messages___Al0UY",welcome:"styles-module__welcome___7MKNO",welcomeIcon:"styles-module__welcomeIcon___gd4O6",welcomeText:"styles-module__welcomeText___-aHqH",welcomeHint:"styles-module__welcomeHint___zUsgp",message:"styles-module__message___-0C3Z",user:"styles-module__user___V0NWN",msgBody:"styles-module__msgBody___YMLmR",msgContent:"styles-module__msgContent___ur5dX",assistant:"styles-module__assistant___sS3g4",msgAvatar:"styles-module__msgAvatar___AAtdS",msgImages:"styles-module__msgImages___xdjr7",msgImage:"styles-module__msgImage___g9UKr",msgMarkdown:"styles-module__msgMarkdown___2bE27",paragraph:"styles-module__paragraph___0db50",heading1:"styles-module__heading1___ObrLl",heading2:"styles-module__heading2___2GDnb",heading3:"styles-module__heading3___dJGMW",inlineCode:"styles-module__inlineCode___fXbsw",codeBlock:"styles-module__codeBlock___77Vmy",codeLang:"styles-module__codeLang___ANUgp",codeCopy:"styles-module__codeCopy___UKHGh",expandBtn:"styles-module__expandBtn___9EdJu",copyBtn:"styles-module__copyBtn___gMgrH",toolCalls:"styles-module__toolCalls___YDi5U",toolCall:"styles-module__toolCall___YG3jW",tool_success:"styles-module__tool_success___-qmku",tool_error:"styles-module__tool_error___tmRla",toolIcon:"styles-module__toolIcon___w-g-Z",toolName:"styles-module__toolName___yBXu6",toolMore:"styles-module__toolMore___MSrrk",subBadge:"styles-module__subBadge___bvbxD",toolCompact:"styles-module__toolCompact___i-o7k",toolCompactToggle:"styles-module__toolCompactToggle___uOgG4",toolCompactIcon:"styles-module__toolCompactIcon___onQV5",toolCompactError:"styles-module__toolCompactError___qcqEZ",toolCompactSub:"styles-module__toolCompactSub___awUyk",toolCompactList:"styles-module__toolCompactList___pumTz",toolCompactItem:"styles-module__toolCompactItem___GN7IT",toolSummary:"styles-module__toolSummary___-ultc",typing:"styles-module__typing___SxFST",typingDot:"styles-module__typingDot___-XQcu",continueBar:"styles-module__continueBar___Ox1ee",imagePreview:"styles-module__imagePreview___69vle",imageThumb:"styles-module__imageThumb___5-tAx",imageRemove:"styles-module__imageRemove___U8lFv",inputArea:"styles-module__inputArea___ySM3W",attachBtn:"styles-module__attachBtn___uvYvg",input:"styles-module__input___UnN4A",sendBtn:"styles-module__sendBtn___WLa8O",active:"styles-module__active___SooZB"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-agent-chat-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-agent-chat-styles",document.head.appendChild(e)),e.textContent=kr}var g=vr;var u=require("react/jsx-runtime");function xo(e){return{github_read_file:"\uD30C\uC77C \uC77D\uAE30",github_search_code:"\uCF54\uB4DC \uAC80\uC0C9",github_grep_code:"\uCF54\uB4DC \uB0B4\uC6A9 \uAC80\uC0C9",github_get_tree:"\uB514\uB809\uD1A0\uB9AC \uAD6C\uC870",github_get_commits:"\uCEE4\uBC0B \uC774\uB825",supabase_query_db:"DB \uC870\uD68C",supabase_list_tables:"\uD14C\uC774\uBE14 \uBAA9\uB85D",supabase_get_api_logs:"API \uB85C\uADF8",vercel_get_runtime_logs:"\uB7F0\uD0C0\uC784 \uB85C\uADF8",vercel_get_deployments:"\uBC30\uD3EC \uC774\uB825",spawn_agent:"\uC11C\uBE0C \uC5D0\uC774\uC804\uD2B8",create_task:"\uD53C\uB4DC\uBC31 \uC0DD\uC131"}[e]||e}function wr(e){let n=[],o=e.split(`
3104
3104
  `),t=0;for(;t<o.length;){let s=o[t];if(s.startsWith("```")){let r=s.slice(3).trim(),i=[];for(t++;t<o.length&&!o[t].startsWith("```");)i.push(o[t]),t++;t++,n.push((0,u.jsxs)("div",{className:g.codeBlock,children:[r&&(0,u.jsx)("div",{className:g.codeLang,children:r}),(0,u.jsx)("pre",{children:(0,u.jsx)("code",{children:i.join(`
3105
3105
  `)})}),(0,u.jsx)("button",{className:g.codeCopy,onClick:()=>navigator.clipboard?.writeText(i.join(`
3106
- `)),type:"button",children:"\uBCF5\uC0AC"})]},`code-${t}`));continue}if(/^#{1,3}\s/.test(s)){let r=s.match(/^(#{1,3})/)?.[1].length||1,i=s.replace(/^#{1,3}\s/,"");n.push((0,u.jsx)("div",{className:g[`heading${r}`],children:yo(i)},`h-${t}`)),t++;continue}if(!s.trim()){t++;continue}n.push((0,u.jsx)("p",{className:g.paragraph,children:yo(s)},`p-${t}`)),t++}return n}function yo(e){let n=[],o=/(\*\*(.+?)\*\*|`([^`]+)`)/g,t=0,s,r=0;for(;(s=o.exec(e))!==null;)s.index>t&&n.push(e.slice(t,s.index)),s[2]?n.push((0,u.jsx)("strong",{children:s[2]},r++)):s[3]&&n.push((0,u.jsx)("code",{className:g.inlineCode,children:s[3]},r++)),t=s.index+s[0].length;return t<e.length&&n.push(e.slice(t)),n.length===1&&typeof n[0]=="string"?n[0]:(0,u.jsx)(u.Fragment,{children:n})}function wr({content:e}){let[n,o]=(0,H.useState)(!1),t=e.split(`
3106
+ `)),type:"button",children:"\uBCF5\uC0AC"})]},`code-${t}`));continue}if(/^#{1,3}\s/.test(s)){let r=s.match(/^(#{1,3})/)?.[1].length||1,i=s.replace(/^#{1,3}\s/,"");n.push((0,u.jsx)("div",{className:g[`heading${r}`],children:yo(i)},`h-${t}`)),t++;continue}if(!s.trim()){t++;continue}n.push((0,u.jsx)("p",{className:g.paragraph,children:yo(s)},`p-${t}`)),t++}return n}function yo(e){let n=[],o=/(\*\*(.+?)\*\*|`([^`]+)`)/g,t=0,s,r=0;for(;(s=o.exec(e))!==null;)s.index>t&&n.push(e.slice(t,s.index)),s[2]?n.push((0,u.jsx)("strong",{children:s[2]},r++)):s[3]&&n.push((0,u.jsx)("code",{className:g.inlineCode,children:s[3]},r++)),t=s.index+s[0].length;return t<e.length&&n.push(e.slice(t)),n.length===1&&typeof n[0]=="string"?n[0]:(0,u.jsx)(u.Fragment,{children:n})}function Cr({content:e}){let[n,o]=(0,H.useState)(!1),t=e.split(`
3107
3107
  `);return t.length>8?(0,u.jsxs)("div",{className:g.msgContent,children:[n?e:t.slice(0,6).join(`
3108
- `)+"...",(0,u.jsx)("button",{className:g.expandBtn,onClick:()=>o(!n),type:"button",children:n?"\uC811\uAE30":"\uB354\uBCF4\uAE30"})]}):(0,u.jsx)("div",{className:g.msgContent,children:e})}function Sr({text:e}){let[n,o]=(0,H.useState)(!1),t=(0,H.useCallback)(()=>{navigator.clipboard?.writeText(e),o(!0),setTimeout(()=>o(!1),1500)},[e]);return(0,u.jsx)("button",{className:g.copyBtn,onClick:t,type:"button",children:n?"\u2713 \uBCF5\uC0AC\uB428":"\uBCF5\uC0AC"})}function Nr({calls:e}){let[n,o]=(0,H.useState)(!1);if(!e.length)return null;let t=e.filter(r=>r.status==="error").length,s=e.filter(r=>r.isSubAgent).length;return(0,u.jsxs)("div",{className:g.toolCompact,children:[(0,u.jsxs)("button",{className:g.toolCompactToggle,onClick:()=>o(!n),type:"button",children:[(0,u.jsx)("span",{className:g.toolCompactIcon,children:n?"\u25BE":"\u25B8"}),"\uB3C4\uAD6C ",e.length,"\uAC1C \uC0AC\uC6A9",t>0&&(0,u.jsxs)("span",{className:g.toolCompactError,children:[" (",t," \uC2E4\uD328)"]}),s>0&&(0,u.jsxs)("span",{className:g.toolCompactSub,children:[" \xB7 \uC11C\uBE0C ",s]})]}),n&&(0,u.jsx)("div",{className:g.toolCompactList,children:e.map((r,i)=>(0,u.jsxs)("div",{className:`${g.toolCompactItem} ${g[`tool_${r.status}`]}`,children:[(0,u.jsx)("span",{children:r.status==="success"?"\u2713":r.status==="error"?"\u2717":"\u23F3"}),(0,u.jsx)("span",{children:xo(r.name)}),r.isSubAgent&&(0,u.jsx)("span",{className:g.subBadge,children:"sub"}),r.summary&&(0,u.jsx)("span",{className:g.toolSummary,children:r.summary})]},i))})]})}function ko({endpoint:e,onClose:n}){let[o,t]=(0,H.useState)([]),[s,r]=(0,H.useState)(""),[i,a]=(0,H.useState)(!1),[m,C]=(0,H.useState)(()=>{try{return localStorage.getItem("impakers-agent-session")||null}catch{return null}}),[w,L]=(0,H.useState)(!1),[T,E]=(0,H.useState)(!1),[M,j]=(0,H.useState)([]),[K,fe]=(0,H.useState)(420),[ge,ce]=(0,H.useState)(!1),[P,F]=(0,H.useState)([]),[Q,b]=(0,H.useState)([]),D=(0,H.useRef)(null),R=(0,H.useRef)(null),he=(0,H.useRef)(null),A=(0,H.useRef)(null),te=(0,H.useRef)(!1);(0,H.useEffect)(()=>{D.current?.scrollIntoView({behavior:"smooth"})},[o,Q]),(0,H.useEffect)(()=>{R.current?.focus()},[]);let le=(0,H.useCallback)(()=>{let f=Ge();if(!f)return;let $=e.replace(/\/api\/external\/feedback\/?$/,"");fetch(`${$}/api/agent/sessions?agentId=cs-assistant`,{headers:{Authorization:`Bearer ${f}`}}).then(z=>z.json()).then(z=>F(z.sessions||[])).catch(()=>{})},[e]);(0,H.useEffect)(()=>{le()},[le]);let ye=(0,H.useCallback)(()=>{L(!0),setTimeout(()=>n(),150)},[n]),Pe=(0,H.useCallback)(f=>{f.preventDefault(),te.current=!0;let $=f.clientX,z=K,ue=Z=>{if(!te.current)return;let re=$-Z.clientX;fe(Math.max(360,Math.min(z+re,window.innerWidth-40)))},B=()=>{te.current=!1,document.removeEventListener("mousemove",ue),document.removeEventListener("mouseup",B)};document.addEventListener("mousemove",ue),document.addEventListener("mouseup",B)},[K]),Te=(0,H.useCallback)(f=>{let $=f.target.files;$&&(Array.from($).forEach(z=>{if(!z.type.startsWith("image/")||z.size>5*1024*1024)return;let ue=new FileReader;ue.onload=()=>{let B=ue.result.split(",")[1];j(Z=>[...Z,{base64:B,mediaType:z.type}])},ue.readAsDataURL(z)}),f.target.value="")},[]),be=(0,H.useCallback)(async f=>{let $=Ge();if(!$)return;let z=e.replace(/\/api\/external\/feedback\/?$/,"");try{let B=await(await fetch(`${z}/api/agent/sessions?sessionId=${f}`,{headers:{Authorization:`Bearer ${$}`}})).json();if(B.messages){t(B.messages.map((Z,re)=>({id:`loaded-${re}`,role:Z.role,content:Z.content,createdAt:new Date(Z.createdAt||Date.now()).getTime()}))),C(f);try{localStorage.setItem("impakers-agent-session",f)}catch{}ce(!1)}}catch{}},[e]),x=(0,H.useCallback)(async f=>{let $=f||s.trim(),z=M;if(!$&&z.length===0||i)return;let ue=Ge();if(!ue)return;let B={id:`user-${Date.now()}`,role:"user",content:$||"\uC774\uBBF8\uC9C0\uB97C \uBD84\uC11D\uD574\uC8FC\uC138\uC694.",images:z.length>0?z:void 0,createdAt:Date.now()};t(W=>[...W,B]),r(""),j([]),a(!0),E(!1),b([]),R.current&&(R.current.style.height="auto");let Z=`assistant-${Date.now()}`,re={id:Z,role:"assistant",content:"",toolCalls:[],createdAt:Date.now()};t(W=>[...W,re]);let p=!1;try{let W=new AbortController;he.current=W;let $e=e.replace(/\/api\/external\/feedback\/?$/,""),ve=await fetch(`${$e}/api/agent`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${ue}`},body:JSON.stringify({message:$||"\uC774\uBBF8\uC9C0\uB97C \uBD84\uC11D\uD574\uC8FC\uC138\uC694.",agentId:"cs-assistant",sessionId:m||void 0,images:z.length>0?z.map(Ke=>({type:"image",...Ke})):void 0}),signal:W.signal});if(!ve.ok){let Ke=await ve.json().catch(()=>({error:"\uC694\uCCAD \uC2E4\uD328"}));t(Ze=>Ze.map(ze=>ze.id===Z?{...ze,content:`\uC624\uB958: ${Ke.error||"\uC694\uCCAD \uC2E4\uD328"}`}:ze)),a(!1);return}let Be=ve.body.getReader(),Pn=new TextDecoder,tn="";for(;;){let{done:Ke,value:Ze}=await Be.read();if(Ke)break;tn+=Pn.decode(Ze,{stream:!0});let ze=tn.split(`
3109
- `);tn=ze.pop()||"";for(let mn of ze){if(!mn.startsWith("data: "))continue;let pn=mn.slice(6).trim();if(pn)try{let ee=JSON.parse(pn);switch(ee.type){case"meta":if(ee.conversationId){C(ee.conversationId);try{localStorage.setItem("impakers-agent-session",ee.conversationId)}catch{}}break;case"content":t(Ie=>Ie.map(V=>V.id===Z?{...V,content:V.content+(ee.content||"")}:V));break;case"tool_call":{let Ie={name:ee.name||"",input:ee.input||{},status:"running"};b(V=>[...V,Ie]),t(V=>V.map(Se=>Se.id===Z?{...Se,toolCalls:[...Se.toolCalls||[],Ie]}:Se));break}case"tool_result":b(Ie=>Ie.map(V=>V.name===ee.name&&V.status==="running"?{...V,status:ee.result?.success?"success":"error",summary:ee.result?.summary}:V)),t(Ie=>Ie.map(V=>{if(V.id!==Z)return V;let Se=[...V.toolCalls||[]],on=Se.findLastIndex(fn=>fn.name===ee.name&&fn.status==="running");return on>=0&&(Se[on]={...Se[on],status:ee.result?.success?"success":"error",summary:ee.result?.summary}),{...V,toolCalls:Se}}));break;case"sub_agent_tool":{let Ie={name:ee.toolName||ee.agentName||"sub-agent",input:{},status:ee.status==="done"?"success":"running",isSubAgent:!0,summary:ee.summary};ee.status==="running"?b(V=>[...V,Ie]):b(V=>V.map(Se=>Se.isSubAgent&&Se.status==="running"?{...Se,status:"success",summary:ee.summary}:Se));break}case"error":t(Ie=>Ie.map(V=>V.id===Z?{...V,content:V.content+`
3108
+ `)+"...",(0,u.jsx)("button",{className:g.expandBtn,onClick:()=>o(!n),type:"button",children:n?"\uC811\uAE30":"\uB354\uBCF4\uAE30"})]}):(0,u.jsx)("div",{className:g.msgContent,children:e})}function Sr({text:e}){let[n,o]=(0,H.useState)(!1),t=(0,H.useCallback)(()=>{navigator.clipboard?.writeText(e),o(!0),setTimeout(()=>o(!1),1500)},[e]);return(0,u.jsx)("button",{className:g.copyBtn,onClick:t,type:"button",children:n?"\u2713 \uBCF5\uC0AC\uB428":"\uBCF5\uC0AC"})}function Nr({calls:e}){let[n,o]=(0,H.useState)(!1);if(!e.length)return null;let t=e.filter(r=>r.status==="error").length,s=e.filter(r=>r.isSubAgent).length;return(0,u.jsxs)("div",{className:g.toolCompact,children:[(0,u.jsxs)("button",{className:g.toolCompactToggle,onClick:()=>o(!n),type:"button",children:[(0,u.jsx)("span",{className:g.toolCompactIcon,children:n?"\u25BE":"\u25B8"}),"\uB3C4\uAD6C ",e.length,"\uAC1C \uC0AC\uC6A9",t>0&&(0,u.jsxs)("span",{className:g.toolCompactError,children:[" (",t," \uC2E4\uD328)"]}),s>0&&(0,u.jsxs)("span",{className:g.toolCompactSub,children:[" \xB7 \uC11C\uBE0C ",s]})]}),n&&(0,u.jsx)("div",{className:g.toolCompactList,children:e.map((r,i)=>(0,u.jsxs)("div",{className:`${g.toolCompactItem} ${g[`tool_${r.status}`]}`,children:[(0,u.jsx)("span",{children:r.status==="success"?"\u2713":r.status==="error"?"\u2717":"\u23F3"}),(0,u.jsx)("span",{children:xo(r.name)}),r.isSubAgent&&(0,u.jsx)("span",{className:g.subBadge,children:"sub"}),r.summary&&(0,u.jsx)("span",{className:g.toolSummary,children:r.summary})]},i))})]})}function ko({endpoint:e,onClose:n}){let[o,t]=(0,H.useState)([]),[s,r]=(0,H.useState)(""),[i,a]=(0,H.useState)(!1),[m,w]=(0,H.useState)(()=>{try{return localStorage.getItem("impakers-agent-session")||null}catch{return null}}),[C,L]=(0,H.useState)(!1),[T,I]=(0,H.useState)(!1),[M,j]=(0,H.useState)([]),[K,pe]=(0,H.useState)(420),[fe,ce]=(0,H.useState)(!1),[P,F]=(0,H.useState)([]),[Q,b]=(0,H.useState)([]),D=(0,H.useRef)(null),E=(0,H.useRef)(null),ge=(0,H.useRef)(null),A=(0,H.useRef)(null),te=(0,H.useRef)(!1);(0,H.useEffect)(()=>{D.current?.scrollIntoView({behavior:"smooth"})},[o,Q]),(0,H.useEffect)(()=>{E.current?.focus()},[]);let le=(0,H.useCallback)(()=>{let f=Je();if(!f)return;let $=e.replace(/\/api\/external\/feedback\/?$/,"");fetch(`${$}/api/agent/sessions?agentId=cs-assistant`,{headers:{Authorization:`Bearer ${f}`}}).then(z=>z.json()).then(z=>F(z.sessions||[])).catch(()=>{})},[e]);(0,H.useEffect)(()=>{le()},[le]);let he=(0,H.useCallback)(()=>{L(!0),setTimeout(()=>n(),150)},[n]),Pe=(0,H.useCallback)(f=>{f.preventDefault(),te.current=!0;let $=f.clientX,z=K,ue=Z=>{if(!te.current)return;let re=$-Z.clientX;pe(Math.max(360,Math.min(z+re,window.innerWidth-40)))},B=()=>{te.current=!1,document.removeEventListener("mousemove",ue),document.removeEventListener("mouseup",B)};document.addEventListener("mousemove",ue),document.addEventListener("mouseup",B)},[K]),Ne=(0,H.useCallback)(f=>{let $=f.target.files;$&&(Array.from($).forEach(z=>{if(!z.type.startsWith("image/")||z.size>5*1024*1024)return;let ue=new FileReader;ue.onload=()=>{let B=ue.result.split(",")[1];j(Z=>[...Z,{base64:B,mediaType:z.type}])},ue.readAsDataURL(z)}),f.target.value="")},[]),ye=(0,H.useCallback)(async f=>{let $=Je();if(!$)return;let z=e.replace(/\/api\/external\/feedback\/?$/,"");try{let B=await(await fetch(`${z}/api/agent/sessions?sessionId=${f}`,{headers:{Authorization:`Bearer ${$}`}})).json();if(B.messages){t(B.messages.map((Z,re)=>({id:`loaded-${re}`,role:Z.role,content:Z.content,createdAt:new Date(Z.createdAt||Date.now()).getTime()}))),w(f);try{localStorage.setItem("impakers-agent-session",f)}catch{}ce(!1)}}catch{}},[e]),x=(0,H.useCallback)(async f=>{let $=f||s.trim(),z=M;if(!$&&z.length===0||i)return;let ue=Je();if(!ue)return;let B={id:`user-${Date.now()}`,role:"user",content:$||"\uC774\uBBF8\uC9C0\uB97C \uBD84\uC11D\uD574\uC8FC\uC138\uC694.",images:z.length>0?z:void 0,createdAt:Date.now()};t(W=>[...W,B]),r(""),j([]),a(!0),I(!1),b([]),E.current&&(E.current.style.height="auto");let Z=`assistant-${Date.now()}`,re={id:Z,role:"assistant",content:"",toolCalls:[],createdAt:Date.now()};t(W=>[...W,re]);let p=!1;try{let W=new AbortController;ge.current=W;let $e=e.replace(/\/api\/external\/feedback\/?$/,""),ke=await fetch(`${$e}/api/agent`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${ue}`},body:JSON.stringify({message:$||"\uC774\uBBF8\uC9C0\uB97C \uBD84\uC11D\uD574\uC8FC\uC138\uC694.",agentId:"cs-assistant",sessionId:m||void 0,images:z.length>0?z.map(Ke=>({type:"image",...Ke})):void 0}),signal:W.signal});if(!ke.ok){let Ke=await ke.json().catch(()=>({error:"\uC694\uCCAD \uC2E4\uD328"}));t(Ze=>Ze.map(ze=>ze.id===Z?{...ze,content:`\uC624\uB958: ${Ke.error||"\uC694\uCCAD \uC2E4\uD328"}`}:ze)),a(!1);return}let Be=ke.body.getReader(),$n=new TextDecoder,on="";for(;;){let{done:Ke,value:Ze}=await Be.read();if(Ke)break;on+=$n.decode(Ze,{stream:!0});let ze=on.split(`
3109
+ `);on=ze.pop()||"";for(let pn of ze){if(!pn.startsWith("data: "))continue;let fn=pn.slice(6).trim();if(fn)try{let ee=JSON.parse(fn);switch(ee.type){case"meta":if(ee.conversationId){w(ee.conversationId);try{localStorage.setItem("impakers-agent-session",ee.conversationId)}catch{}}break;case"content":t(Ie=>Ie.map(V=>V.id===Z?{...V,content:V.content+(ee.content||"")}:V));break;case"tool_call":{let Ie={name:ee.name||"",input:ee.input||{},status:"running"};b(V=>[...V,Ie]),t(V=>V.map(Le=>Le.id===Z?{...Le,toolCalls:[...Le.toolCalls||[],Ie]}:Le));break}case"tool_result":b(Ie=>Ie.map(V=>V.name===ee.name&&V.status==="running"?{...V,status:ee.result?.success?"success":"error",summary:ee.result?.summary}:V)),t(Ie=>Ie.map(V=>{if(V.id!==Z)return V;let Le=[...V.toolCalls||[]],sn=Le.findLastIndex(gn=>gn.name===ee.name&&gn.status==="running");return sn>=0&&(Le[sn]={...Le[sn],status:ee.result?.success?"success":"error",summary:ee.result?.summary}),{...V,toolCalls:Le}}));break;case"sub_agent_tool":{let Ie={name:ee.toolName||ee.agentName||"sub-agent",input:{},status:ee.status==="done"?"success":"running",isSubAgent:!0,summary:ee.summary};ee.status==="running"?b(V=>[...V,Ie]):b(V=>V.map(Le=>Le.isSubAgent&&Le.status==="running"?{...Le,status:"success",summary:ee.summary}:Le));break}case"error":t(Ie=>Ie.map(V=>V.id===Z?{...V,content:V.content+`
3110
3110
 
3111
- \uC624\uB958: ${ee.error}`}:V));break;case"done":p=!0;break}}catch{}}}p||E(!0)}catch(W){if(W?.name!=="AbortError"){t(ve=>ve.map(Be=>Be.id===Z?{...Be,content:Be.content||"\uC5F0\uACB0\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4."}:Be));let $e=W?.message||"";($e.includes("timeout")||$e.includes("aborted")||$e.includes("network"))&&E(!0)}}finally{a(!1),b([]),he.current=null,le()}},[s,M,i,m,e,le]),v=(0,H.useCallback)(f=>{f.stopPropagation(),!f.nativeEvent.isComposing&&(f.key==="Enter"&&!f.shiftKey&&(f.preventDefault(),x()),f.key==="Escape"&&ye())},[x,ye]),oe=(0,H.useCallback)(()=>{t([]),C(null),E(!1),b([]);try{localStorage.removeItem("impakers-agent-session")}catch{}},[]);return typeof document>"u"?null:(0,bo.createPortal)((0,u.jsxs)("div",{"data-impakers-debug":"",children:[(0,u.jsx)("div",{className:g.backdrop,onClick:ye}),(0,u.jsxs)("div",{className:`${g.panel} ${w?g.exiting:""}`,style:{width:K},"data-impakers-debug":"",children:[(0,u.jsx)("div",{className:g.resizeHandle,onMouseDown:Pe}),(0,u.jsxs)("div",{className:g.header,children:[(0,u.jsxs)("div",{className:g.headerLeft,children:[(0,u.jsx)("button",{className:g.headerBtn,onClick:()=>ce(!ge),type:"button",title:"\uB300\uD654 \uAE30\uB85D",children:(0,u.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"15",height:"15",children:[(0,u.jsx)("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),(0,u.jsx)("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),(0,u.jsx)("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]})}),(0,u.jsx)("span",{className:g.headerIcon,children:"\u2726"}),(0,u.jsx)("span",{className:g.headerTitle,children:"AI \uC5D0\uC774\uC804\uD2B8"})]}),(0,u.jsxs)("div",{className:g.headerActions,children:[(0,u.jsx)("button",{className:g.headerBtn,onClick:oe,type:"button",title:"\uC0C8 \uB300\uD654",children:(0,u.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"15",height:"15",children:[(0,u.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,u.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),(0,u.jsx)("button",{className:g.headerBtn,onClick:ye,type:"button",title:"\uB2EB\uAE30",children:(0,u.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"15",height:"15",children:(0,u.jsx)("path",{d:"M18 6L6 18M6 6l12 12"})})})]})]}),(0,u.jsxs)("div",{className:g.body,children:[ge&&(0,u.jsxs)("div",{className:g.sidebar,children:[(0,u.jsx)("div",{className:g.sidebarHeader,children:"\uB300\uD654 \uAE30\uB85D"}),(0,u.jsxs)("div",{className:g.sidebarList,children:[P.length===0&&(0,u.jsx)("div",{className:g.sidebarEmpty,children:"\uAE30\uB85D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"}),P.map(f=>(0,u.jsxs)("button",{className:`${g.sidebarItem} ${f.id===m?g.sidebarActive:""}`,onClick:()=>be(f.id),type:"button",children:[(0,u.jsx)("div",{className:g.sidebarTitle,children:f.title||"\uC0C8 \uB300\uD654"}),(0,u.jsx)("div",{className:g.sidebarDate,children:new Date(f.createdAt).toLocaleDateString("ko-KR",{month:"short",day:"numeric"})})]},f.id))]})]}),(0,u.jsxs)("div",{className:g.messages,children:[o.length===0&&(0,u.jsxs)("div",{className:g.welcome,children:[(0,u.jsx)("div",{className:g.welcomeIcon,children:"\u2726"}),(0,u.jsx)("div",{className:g.welcomeText,children:"\uBB34\uC5C7\uC744 \uB3C4\uC640\uB4DC\uB9B4\uAE4C\uC694?"}),(0,u.jsx)("div",{className:g.welcomeHint,children:"\uC0AC\uC6A9 \uC911 \uAD81\uAE08\uD55C \uC810\uC774\uB098 \uBB38\uC81C\uB97C \uBB3C\uC5B4\uBCF4\uC138\uC694"})]}),o.map(f=>(0,u.jsxs)("div",{className:`${g.message} ${g[f.role]}`,children:[f.role==="assistant"&&(0,u.jsx)("div",{className:g.msgAvatar,children:"\u2726"}),(0,u.jsxs)("div",{className:g.msgBody,children:[f.images&&f.images.length>0&&(0,u.jsx)("div",{className:g.msgImages,children:f.images.map(($,z)=>(0,u.jsx)("img",{src:`data:${$.mediaType};base64,${$.base64}`,alt:"",className:g.msgImage},z))}),f.toolCalls&&f.toolCalls.length>0&&!i&&(0,u.jsx)(Nr,{calls:f.toolCalls}),i&&f.id===o[o.length-1]?.id&&Q.length>0&&(0,u.jsxs)("div",{className:g.toolCalls,children:[Q.slice(-3).map(($,z)=>(0,u.jsxs)("div",{className:`${g.toolCall} ${g[`tool_${$.status}`]}`,children:[(0,u.jsx)("span",{className:g.toolIcon,children:$.status==="running"?"\u23F3":$.status==="success"?"\u2713":"\u2717"}),(0,u.jsx)("span",{className:g.toolName,children:xo($.name)}),$.isSubAgent&&(0,u.jsx)("span",{className:g.subBadge,children:"sub"})]},z)),Q.length>3&&(0,u.jsxs)("div",{className:g.toolMore,children:["+",Q.length-3,"\uAC1C \uC644\uB8CC"]})]}),f.content&&f.role==="assistant"&&(0,u.jsx)("div",{className:g.msgMarkdown,children:Cr(f.content)}),f.content&&f.role==="user"&&(0,u.jsx)(wr,{content:f.content}),f.role==="assistant"&&i&&f.id===o[o.length-1]?.id&&!f.content&&Q.length===0&&(0,u.jsxs)("div",{className:g.typing,children:[(0,u.jsx)("span",{}),(0,u.jsx)("span",{}),(0,u.jsx)("span",{})]}),f.role==="assistant"&&f.content&&!i&&(0,u.jsx)(Sr,{text:f.content})]})]},f.id)),T&&!i&&(0,u.jsxs)("div",{className:g.continueBar,children:[(0,u.jsx)("span",{children:"\uD0C0\uC784\uC544\uC6C3\uC73C\uB85C \uBA48\uCDC4\uC2B5\uB2C8\uB2E4."}),(0,u.jsx)("button",{onClick:()=>{E(!1),x("\uC774\uC5B4\uC11C \uACC4\uC18D \uBD84\uC11D\uD574\uC918")},type:"button",children:"\uACC4\uC18D\uD558\uAE30 \u2192"})]}),(0,u.jsx)("div",{ref:D})]})]}),M.length>0&&(0,u.jsx)("div",{className:g.imagePreview,children:M.map((f,$)=>(0,u.jsxs)("div",{className:g.imageThumb,children:[(0,u.jsx)("img",{src:`data:${f.mediaType};base64,${f.base64}`,alt:""}),(0,u.jsx)("button",{className:g.imageRemove,onClick:()=>j(z=>z.filter((ue,B)=>B!==$)),type:"button",children:"\xD7"})]},$))}),(0,u.jsxs)("div",{className:g.inputArea,children:[(0,u.jsx)("button",{className:g.attachBtn,onClick:()=>A.current?.click(),type:"button",title:"\uC774\uBBF8\uC9C0 \uCCA8\uBD80",children:(0,u.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"16",height:"16",children:[(0,u.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),(0,u.jsx)("circle",{cx:"8.5",cy:"8.5",r:"1.5"}),(0,u.jsx)("polyline",{points:"21 15 16 10 5 21"})]})}),(0,u.jsx)("textarea",{ref:R,className:g.input,placeholder:"\uBA54\uC2DC\uC9C0\uB97C \uC785\uB825\uD558\uC138\uC694...",value:s,onChange:f=>{r(f.target.value);let $=f.target;$.style.height="auto",$.style.height=`${Math.min($.scrollHeight,120)}px`},onKeyDown:v,rows:1,disabled:i}),(0,u.jsx)("button",{className:`${g.sendBtn} ${(s.trim()||M.length>0)&&!i?g.active:""}`,onClick:()=>x(),disabled:!s.trim()&&M.length===0||i,type:"button",children:(0,u.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"16",height:"16",children:[(0,u.jsx)("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),(0,u.jsx)("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]}),(0,u.jsx)("input",{ref:A,type:"file",accept:"image/jpeg,image/png,image/gif,image/webp",multiple:!0,style:{display:"none"},onChange:Te})]})]}),document.body)}var Fn=require("react"),No=require("react-dom");var vo="impakers-debug-settings",yt={markerColor:"#6366f1",markersVisible:!0,hideDoneMarkers:!1,showOnlyMine:!1};function Co(){try{let e=localStorage.getItem(vo);return e?{...yt,...JSON.parse(e)}:{...yt}}catch{return{...yt}}}function wo(e){try{localStorage.setItem(vo,JSON.stringify(e))}catch{}}var So=[{id:"indigo",label:"\uC778\uB514\uACE0",value:"#6366f1"},{id:"blue",label:"\uBE14\uB8E8",value:"#3b82f6"},{id:"red",label:"\uB808\uB4DC",value:"#ef4444"},{id:"green",label:"\uADF8\uB9B0",value:"#16a34a"},{id:"orange",label:"\uC624\uB80C\uC9C0",value:"#f97316"},{id:"pink",label:"\uD551\uD06C",value:"#ec4899"}];var Lr=`@keyframes styles-module__panelIn___SmRh6 {
3111
+ \uC624\uB958: ${ee.error}`}:V));break;case"done":p=!0;break}}catch{}}}p||I(!0)}catch(W){if(W?.name!=="AbortError"){t(ke=>ke.map(Be=>Be.id===Z?{...Be,content:Be.content||"\uC5F0\uACB0\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4."}:Be));let $e=W?.message||"";($e.includes("timeout")||$e.includes("aborted")||$e.includes("network"))&&I(!0)}}finally{a(!1),b([]),ge.current=null,le()}},[s,M,i,m,e,le]),v=(0,H.useCallback)(f=>{f.stopPropagation(),!f.nativeEvent.isComposing&&(f.key==="Enter"&&!f.shiftKey&&(f.preventDefault(),x()),f.key==="Escape"&&he())},[x,he]),oe=(0,H.useCallback)(()=>{t([]),w(null),I(!1),b([]);try{localStorage.removeItem("impakers-agent-session")}catch{}},[]);return typeof document>"u"?null:(0,bo.createPortal)((0,u.jsxs)("div",{"data-impakers-debug":"",children:[(0,u.jsx)("div",{className:g.backdrop,onClick:he}),(0,u.jsxs)("div",{className:`${g.panel} ${C?g.exiting:""}`,style:{width:K},"data-impakers-debug":"",children:[(0,u.jsx)("div",{className:g.resizeHandle,onMouseDown:Pe}),(0,u.jsxs)("div",{className:g.header,children:[(0,u.jsxs)("div",{className:g.headerLeft,children:[(0,u.jsx)("button",{className:g.headerBtn,onClick:()=>ce(!fe),type:"button",title:"\uB300\uD654 \uAE30\uB85D",children:(0,u.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"15",height:"15",children:[(0,u.jsx)("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),(0,u.jsx)("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),(0,u.jsx)("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]})}),(0,u.jsx)("span",{className:g.headerIcon,children:"\u2726"}),(0,u.jsx)("span",{className:g.headerTitle,children:"AI \uC5D0\uC774\uC804\uD2B8"})]}),(0,u.jsxs)("div",{className:g.headerActions,children:[(0,u.jsx)("button",{className:g.headerBtn,onClick:oe,type:"button",title:"\uC0C8 \uB300\uD654",children:(0,u.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"15",height:"15",children:[(0,u.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,u.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),(0,u.jsx)("button",{className:g.headerBtn,onClick:he,type:"button",title:"\uB2EB\uAE30",children:(0,u.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"15",height:"15",children:(0,u.jsx)("path",{d:"M18 6L6 18M6 6l12 12"})})})]})]}),(0,u.jsxs)("div",{className:g.body,children:[fe&&(0,u.jsxs)("div",{className:g.sidebar,children:[(0,u.jsx)("div",{className:g.sidebarHeader,children:"\uB300\uD654 \uAE30\uB85D"}),(0,u.jsxs)("div",{className:g.sidebarList,children:[P.length===0&&(0,u.jsx)("div",{className:g.sidebarEmpty,children:"\uAE30\uB85D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"}),P.map(f=>(0,u.jsxs)("button",{className:`${g.sidebarItem} ${f.id===m?g.sidebarActive:""}`,onClick:()=>ye(f.id),type:"button",children:[(0,u.jsx)("div",{className:g.sidebarTitle,children:f.title||"\uC0C8 \uB300\uD654"}),(0,u.jsx)("div",{className:g.sidebarDate,children:new Date(f.createdAt).toLocaleDateString("ko-KR",{month:"short",day:"numeric"})})]},f.id))]})]}),(0,u.jsxs)("div",{className:g.messages,children:[o.length===0&&(0,u.jsxs)("div",{className:g.welcome,children:[(0,u.jsx)("div",{className:g.welcomeIcon,children:"\u2726"}),(0,u.jsx)("div",{className:g.welcomeText,children:"\uBB34\uC5C7\uC744 \uB3C4\uC640\uB4DC\uB9B4\uAE4C\uC694?"}),(0,u.jsx)("div",{className:g.welcomeHint,children:"\uC0AC\uC6A9 \uC911 \uAD81\uAE08\uD55C \uC810\uC774\uB098 \uBB38\uC81C\uB97C \uBB3C\uC5B4\uBCF4\uC138\uC694"})]}),o.map(f=>(0,u.jsxs)("div",{className:`${g.message} ${g[f.role]}`,children:[f.role==="assistant"&&(0,u.jsx)("div",{className:g.msgAvatar,children:"\u2726"}),(0,u.jsxs)("div",{className:g.msgBody,children:[f.images&&f.images.length>0&&(0,u.jsx)("div",{className:g.msgImages,children:f.images.map(($,z)=>(0,u.jsx)("img",{src:`data:${$.mediaType};base64,${$.base64}`,alt:"",className:g.msgImage},z))}),f.toolCalls&&f.toolCalls.length>0&&!i&&(0,u.jsx)(Nr,{calls:f.toolCalls}),i&&f.id===o[o.length-1]?.id&&Q.length>0&&(0,u.jsxs)("div",{className:g.toolCalls,children:[Q.slice(-3).map(($,z)=>(0,u.jsxs)("div",{className:`${g.toolCall} ${g[`tool_${$.status}`]}`,children:[(0,u.jsx)("span",{className:g.toolIcon,children:$.status==="running"?"\u23F3":$.status==="success"?"\u2713":"\u2717"}),(0,u.jsx)("span",{className:g.toolName,children:xo($.name)}),$.isSubAgent&&(0,u.jsx)("span",{className:g.subBadge,children:"sub"})]},z)),Q.length>3&&(0,u.jsxs)("div",{className:g.toolMore,children:["+",Q.length-3,"\uAC1C \uC644\uB8CC"]})]}),f.content&&f.role==="assistant"&&(0,u.jsx)("div",{className:g.msgMarkdown,children:wr(f.content)}),f.content&&f.role==="user"&&(0,u.jsx)(Cr,{content:f.content}),f.role==="assistant"&&i&&f.id===o[o.length-1]?.id&&!f.content&&Q.length===0&&(0,u.jsxs)("div",{className:g.typing,children:[(0,u.jsx)("span",{}),(0,u.jsx)("span",{}),(0,u.jsx)("span",{})]}),f.role==="assistant"&&f.content&&!i&&(0,u.jsx)(Sr,{text:f.content})]})]},f.id)),T&&!i&&(0,u.jsxs)("div",{className:g.continueBar,children:[(0,u.jsx)("span",{children:"\uD0C0\uC784\uC544\uC6C3\uC73C\uB85C \uBA48\uCDC4\uC2B5\uB2C8\uB2E4."}),(0,u.jsx)("button",{onClick:()=>{I(!1),x("\uC774\uC5B4\uC11C \uACC4\uC18D \uBD84\uC11D\uD574\uC918")},type:"button",children:"\uACC4\uC18D\uD558\uAE30 \u2192"})]}),(0,u.jsx)("div",{ref:D})]})]}),M.length>0&&(0,u.jsx)("div",{className:g.imagePreview,children:M.map((f,$)=>(0,u.jsxs)("div",{className:g.imageThumb,children:[(0,u.jsx)("img",{src:`data:${f.mediaType};base64,${f.base64}`,alt:""}),(0,u.jsx)("button",{className:g.imageRemove,onClick:()=>j(z=>z.filter((ue,B)=>B!==$)),type:"button",children:"\xD7"})]},$))}),(0,u.jsxs)("div",{className:g.inputArea,children:[(0,u.jsx)("button",{className:g.attachBtn,onClick:()=>A.current?.click(),type:"button",title:"\uC774\uBBF8\uC9C0 \uCCA8\uBD80",children:(0,u.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"16",height:"16",children:[(0,u.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),(0,u.jsx)("circle",{cx:"8.5",cy:"8.5",r:"1.5"}),(0,u.jsx)("polyline",{points:"21 15 16 10 5 21"})]})}),(0,u.jsx)("textarea",{ref:E,className:g.input,placeholder:"\uBA54\uC2DC\uC9C0\uB97C \uC785\uB825\uD558\uC138\uC694...",value:s,onChange:f=>{r(f.target.value);let $=f.target;$.style.height="auto",$.style.height=`${Math.min($.scrollHeight,120)}px`},onKeyDown:v,rows:1,disabled:i}),(0,u.jsx)("button",{className:`${g.sendBtn} ${(s.trim()||M.length>0)&&!i?g.active:""}`,onClick:()=>x(),disabled:!s.trim()&&M.length===0||i,type:"button",children:(0,u.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"16",height:"16",children:[(0,u.jsx)("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),(0,u.jsx)("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]}),(0,u.jsx)("input",{ref:A,type:"file",accept:"image/jpeg,image/png,image/gif,image/webp",multiple:!0,style:{display:"none"},onChange:Ne})]})]}),document.body)}var Pn=require("react"),No=require("react-dom");var vo="impakers-debug-settings",yt={markerColor:"#6366f1",markersVisible:!0,hideDoneMarkers:!1,showOnlyMine:!1};function wo(){try{let e=localStorage.getItem(vo);return e?{...yt,...JSON.parse(e)}:{...yt}}catch{return{...yt}}}function Co(e){try{localStorage.setItem(vo,JSON.stringify(e))}catch{}}var So=[{id:"indigo",label:"\uC778\uB514\uACE0",value:"#6366f1"},{id:"blue",label:"\uBE14\uB8E8",value:"#3b82f6"},{id:"red",label:"\uB808\uB4DC",value:"#ef4444"},{id:"green",label:"\uADF8\uB9B0",value:"#16a34a"},{id:"orange",label:"\uC624\uB80C\uC9C0",value:"#f97316"},{id:"pink",label:"\uD551\uD06C",value:"#ec4899"}];var Lr=`@keyframes styles-module__panelIn___SmRh6 {
3112
3112
  from {
3113
3113
  opacity: 0;
3114
3114
  transform: translateY(8px) scale(0.96);
@@ -3237,7 +3237,7 @@ ${n.stack?.split(`
3237
3237
  .styles-module__colorBtn___N7dGu.styles-module__selected___0tVDH {
3238
3238
  border-color: #18181b;
3239
3239
  transform: scale(1.15);
3240
- }`,Tr={backdrop:"styles-module__backdrop___--cMp",panel:"styles-module__panel___z6xiJ",panelIn:"styles-module__panelIn___SmRh6",header:"styles-module__header___NkOur",title:"styles-module__title___tsKZw",closeBtn:"styles-module__closeBtn___-OQ4Y",body:"styles-module__body___9pyCP",field:"styles-module__field___vnQMl",fieldLabel:"styles-module__fieldLabel___2WUKB",toggle:"styles-module__toggle___uWsqC",on:"styles-module__on___W27kf",toggleThumb:"styles-module__toggleThumb___wyckC",colors:"styles-module__colors___vgFGZ",colorBtn:"styles-module__colorBtn___N7dGu",selected:"styles-module__selected___0tVDH"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-settings-panel-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-settings-panel-styles",document.head.appendChild(e)),e.textContent=Lr}var G=Tr;var J=require("react/jsx-runtime");function Lo({settings:e,onChange:n,onClose:o}){let t=(0,Fn.useCallback)(()=>{n({...e,markersVisible:!e.markersVisible})},[e,n]),s=(0,Fn.useCallback)(()=>{n({...e,hideDoneMarkers:!e.hideDoneMarkers})},[e,n]),r=(0,Fn.useCallback)(()=>{n({...e,showOnlyMine:!e.showOnlyMine})},[e,n]),i=(0,Fn.useCallback)(a=>{n({...e,markerColor:a})},[e,n]);return typeof document>"u"?null:(0,No.createPortal)((0,J.jsxs)("div",{"data-impakers-debug":"",children:[(0,J.jsx)("div",{className:G.backdrop,onClick:o}),(0,J.jsxs)("div",{className:G.panel,"data-impakers-debug":"",children:[(0,J.jsxs)("div",{className:G.header,children:[(0,J.jsx)("span",{className:G.title,children:"\uC124\uC815"}),(0,J.jsx)("button",{className:G.closeBtn,onClick:o,type:"button",children:(0,J.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,J.jsx)("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),(0,J.jsxs)("div",{className:G.body,children:[(0,J.jsxs)("div",{className:G.field,children:[(0,J.jsx)("div",{className:G.fieldLabel,children:"\uB9C8\uCEE4 \uD45C\uC2DC"}),(0,J.jsx)("button",{className:`${G.toggle} ${e.markersVisible?G.on:""}`,onClick:t,type:"button",children:(0,J.jsx)("span",{className:G.toggleThumb})})]}),(0,J.jsxs)("div",{className:G.field,children:[(0,J.jsx)("div",{className:G.fieldLabel,children:"\uC644\uB8CC \uD540 \uC228\uAE30\uAE30"}),(0,J.jsx)("button",{className:`${G.toggle} ${e.hideDoneMarkers?G.on:""}`,onClick:s,type:"button",children:(0,J.jsx)("span",{className:G.toggleThumb})})]}),(0,J.jsxs)("div",{className:G.field,children:[(0,J.jsx)("div",{className:G.fieldLabel,children:"\uB0B4\uAC00 \uCD94\uAC00\uD55C \uAC83\uB9CC"}),(0,J.jsx)("button",{className:`${G.toggle} ${e.showOnlyMine?G.on:""}`,onClick:r,type:"button",children:(0,J.jsx)("span",{className:G.toggleThumb})})]}),(0,J.jsxs)("div",{className:G.field,children:[(0,J.jsx)("div",{className:G.fieldLabel,children:"\uB9C8\uCEE4 \uC0C9\uC0C1"}),(0,J.jsx)("div",{className:G.colors,children:So.map(a=>(0,J.jsx)("button",{className:`${G.colorBtn} ${e.markerColor===a.value?G.selected:""}`,style:{background:a.value},onClick:()=>i(a.value),title:a.label,type:"button"},a.id))})]})]})]})]}),document.body)}var Ir=`.styles-module__markersLayer___VR1cD svg[fill=none],
3240
+ }`,Tr={backdrop:"styles-module__backdrop___--cMp",panel:"styles-module__panel___z6xiJ",panelIn:"styles-module__panelIn___SmRh6",header:"styles-module__header___NkOur",title:"styles-module__title___tsKZw",closeBtn:"styles-module__closeBtn___-OQ4Y",body:"styles-module__body___9pyCP",field:"styles-module__field___vnQMl",fieldLabel:"styles-module__fieldLabel___2WUKB",toggle:"styles-module__toggle___uWsqC",on:"styles-module__on___W27kf",toggleThumb:"styles-module__toggleThumb___wyckC",colors:"styles-module__colors___vgFGZ",colorBtn:"styles-module__colorBtn___N7dGu",selected:"styles-module__selected___0tVDH"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-settings-panel-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-settings-panel-styles",document.head.appendChild(e)),e.textContent=Lr}var G=Tr;var J=require("react/jsx-runtime");function Lo({settings:e,onChange:n,onClose:o}){let t=(0,Pn.useCallback)(()=>{n({...e,markersVisible:!e.markersVisible})},[e,n]),s=(0,Pn.useCallback)(()=>{n({...e,hideDoneMarkers:!e.hideDoneMarkers})},[e,n]),r=(0,Pn.useCallback)(()=>{n({...e,showOnlyMine:!e.showOnlyMine})},[e,n]),i=(0,Pn.useCallback)(a=>{n({...e,markerColor:a})},[e,n]);return typeof document>"u"?null:(0,No.createPortal)((0,J.jsxs)("div",{"data-impakers-debug":"",children:[(0,J.jsx)("div",{className:G.backdrop,onClick:o}),(0,J.jsxs)("div",{className:G.panel,"data-impakers-debug":"",children:[(0,J.jsxs)("div",{className:G.header,children:[(0,J.jsx)("span",{className:G.title,children:"\uC124\uC815"}),(0,J.jsx)("button",{className:G.closeBtn,onClick:o,type:"button",children:(0,J.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,J.jsx)("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),(0,J.jsxs)("div",{className:G.body,children:[(0,J.jsxs)("div",{className:G.field,children:[(0,J.jsx)("div",{className:G.fieldLabel,children:"\uB9C8\uCEE4 \uD45C\uC2DC"}),(0,J.jsx)("button",{className:`${G.toggle} ${e.markersVisible?G.on:""}`,onClick:t,type:"button",children:(0,J.jsx)("span",{className:G.toggleThumb})})]}),(0,J.jsxs)("div",{className:G.field,children:[(0,J.jsx)("div",{className:G.fieldLabel,children:"\uC644\uB8CC \uD540 \uC228\uAE30\uAE30"}),(0,J.jsx)("button",{className:`${G.toggle} ${e.hideDoneMarkers?G.on:""}`,onClick:s,type:"button",children:(0,J.jsx)("span",{className:G.toggleThumb})})]}),(0,J.jsxs)("div",{className:G.field,children:[(0,J.jsx)("div",{className:G.fieldLabel,children:"\uB0B4\uAC00 \uCD94\uAC00\uD55C \uAC83\uB9CC"}),(0,J.jsx)("button",{className:`${G.toggle} ${e.showOnlyMine?G.on:""}`,onClick:r,type:"button",children:(0,J.jsx)("span",{className:G.toggleThumb})})]}),(0,J.jsxs)("div",{className:G.field,children:[(0,J.jsx)("div",{className:G.fieldLabel,children:"\uB9C8\uCEE4 \uC0C9\uC0C1"}),(0,J.jsx)("div",{className:G.colors,children:So.map(a=>(0,J.jsx)("button",{className:`${G.colorBtn} ${e.markerColor===a.value?G.selected:""}`,style:{background:a.value},onClick:()=>i(a.value),title:a.label,type:"button"},a.id))})]})]})]})]}),document.body)}var Ir=`.styles-module__markersLayer___VR1cD svg[fill=none],
3241
3241
  .styles-module__fixedMarkersLayer___wBuxm svg[fill=none] {
3242
3242
  fill: none !important;
3243
3243
  }
@@ -3562,5 +3562,5 @@ html.impakers-selecting {
3562
3562
  }
3563
3563
  html.impakers-selecting * {
3564
3564
  cursor: crosshair !important;
3565
- }`,Er={markersLayer:"styles-module__markersLayer___VR1cD",fixedMarkersLayer:"styles-module__fixedMarkersLayer___wBuxm",fab:"styles-module__fab___6FrCF",fabEnter:"styles-module__fabEnter___9koyT",active:"styles-module__active___X5PRD",hoverHighlight:"styles-module__hoverHighlight___9kGLL",enter:"styles-module__enter___jAi-c",hoverHighlightIn:"styles-module__hoverHighlightIn___ljC4F",singleSelectOutline:"styles-module__singleSelectOutline___2meUm",fadeIn:"styles-module__fadeIn___PpRqy",hoverTooltip:"styles-module__hoverTooltip___JE1Bs",hoverTooltipIn:"styles-module__hoverTooltipIn___tncNM",hoverReactPath:"styles-module__hoverReactPath___wPGYi",hoverElementName:"styles-module__hoverElementName___lNqTP",contextMenu:"styles-module__contextMenu___nDXft",contextMenuItem:"styles-module__contextMenuItem___69GKu",toast:"styles-module__toast___gV3Sa",toastIn:"styles-module__toastIn___V382h",toastOut:"styles-module__toastOut___zlqxG",toastError:"styles-module__toastError___Q-8dn",countdownOverlay:"styles-module__countdownOverlay___GruQJ",countdownNumber:"styles-module__countdownNumber___VAmkI",countdownPulse:"styles-module__countdownPulse___ngZrL",countdownLabel:"styles-module__countdownLabel___px-ao",countdownCancel:"styles-module__countdownCancel___8cRgZ",fadeOut:"styles-module__fadeOut___tZb9S"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-debug-widget-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-debug-widget-styles",document.head.appendChild(e)),e.textContent=Ir}var me=Er;var k=require("react/jsx-runtime");function bt(e,n){let o=document.elementFromPoint(e,n);if(!o)return null;for(;o?.shadowRoot;){let t=o.shadowRoot.elementFromPoint(e,n);if(!t||t===o)break;o=t}return o}function Rr(e){let n=e;for(;n&&n!==document.body;){let o=window.getComputedStyle(n);if(o.position==="fixed"||o.position==="sticky")return!0;n=n.parentElement}return!1}function To(e){let{name:n,path:o}=at(e),t=Vt(e,{mode:"filtered"});return{name:t.path?`${t.path} ${n}`:n,elementName:n,path:o,reactComponents:t.path}}function Mr(e){let n=Sn(e),o=n.found?n:dt(e);if(o.found&&o.source)return Vn(o.source,"path")}function Ar(e){let n=Sn(e),o=n.found?n:dt(e);return o.found&&o.sourceCandidates&&o.sourceCandidates.length>0?o.sourceCandidates.map(t=>Vn(t,"path")):o.found&&o.source?[Vn(o.source,"path")]:[]}function Fr(e,n){let o=e.match(/^(.+):(\d+)(?::(\d+))?$/);if(!o)return null;let[,t,s,r]=o,i=Number.parseInt(s,10),a=r?Number.parseInt(r,10):void 0;return!t||Number.isNaN(i)?null:{kind:"component",file:t,line:i,column:a,label:n||"Resolved component source",confidence:.98,reason:"resolved-from-source-map"}}var Pr="impakers-debug-markers-";function kt(){return Pr+window.location.pathname}function xt(){try{let e=localStorage.getItem(kt());return e?JSON.parse(e):[]}catch{return[]}}function Io(e){try{e.length===0?localStorage.removeItem(kt()):localStorage.setItem(kt(),JSON.stringify(e))}catch{}}function $r(e){return e.feedbackMarker?{id:e.id,x:e.feedbackMarker.x,y:e.feedbackMarker.y,comment:e.title.replace(/^\[피드백\]\s*/,""),element:e.feedbackMarker.element||"",elementPath:"",timestamp:new Date(e.createdAt).getTime(),isFixed:e.feedbackMarker.isFixed,boundingBox:e.feedbackMarker.boundingBox,status:e.status}:null}function Ro({endpoint:e,getUser:n,onHide:o}){let[t,s]=(0,y.useState)(!1),[r,i]=(0,y.useState)(()=>xt()),[a,m]=(0,y.useState)(null),[C,w]=(0,y.useState)(!1),[L,T]=(0,y.useState)(null),[E,M]=(0,y.useState)({x:0,y:0}),[j,K]=(0,y.useState)(new Set),[fe,ge]=(0,y.useState)(!1),[ce,P]=(0,y.useState)(null),[F,Q]=(0,y.useState)(null),[b,D]=(0,y.useState)(!1),[R,he]=(0,y.useState)(null),[A,te]=(0,y.useState)(null),[le,ye]=(0,y.useState)({}),[Pe,Te]=(0,y.useState)(!1),[be,x]=(0,y.useState)([]),[v,oe]=(0,y.useState)([]),[f,$]=(0,y.useState)(!1),[z,ue]=(0,y.useState)(!1),[B,Z]=(0,y.useState)(!1),[re,p]=(0,y.useState)(()=>Co()),[W,$e]=(0,y.useState)(()=>window.location.pathname),[ve,Be]=(0,y.useState)(!1),[Pn,tn]=(0,y.useState)(0),[Ke,Ze]=(0,y.useState)(null),ze=(0,y.useRef)(null),mn=(0,y.useRef)(null),pn=(0,y.useRef)(null),ee=(0,y.useRef)(!1),Ie=(0,y.useCallback)(()=>{Ze(3);let c=3,_=()=>{c-=1,c<=0?(Ze(null),s(!0),document.documentElement.classList.add("impakers-selecting")):(Ze(c),ze.current=setTimeout(_,1e3))};ze.current=setTimeout(_,1e3)},[]),V=(0,y.useCallback)(c=>{c==="comment"?on():c==="delay-capture"?Ie():c==="agent"?ue(!0):c==="inbox"?($(!0),to(e,{staleWhileRevalidate:!0}).then(oe).catch(()=>{}),t&&(s(!1),document.documentElement.classList.remove("impakers-selecting"),T(null),m(null))):c==="settings"&&Z(!0)},[t,Ie]),Se=(0,y.useCallback)(c=>{p(c),wo(c)},[]),on=(0,y.useCallback)(()=>{s(c=>{let _=!c;return _?document.documentElement.classList.add("impakers-selecting"):(document.documentElement.classList.remove("impakers-selecting"),T(null),m(null)),_})},[]);(0,y.useEffect)(()=>()=>{document.documentElement.classList.remove("impakers-selecting")},[]),(0,y.useEffect)(()=>{i(xt());let c=()=>{$e(window.location.pathname),i(xt()),m(null),T(null)};window.addEventListener("popstate",c);let _=history.pushState.bind(history);return history.pushState=(...X)=>{_(...X),setTimeout(c,50)},()=>{window.removeEventListener("popstate",c),history.pushState=_}},[]),(0,y.useEffect)(()=>{let c=Ye(W),_=cn(c);_&&(x(_),Be(!0));let X=En(c,I=>{x(I),Be(!0)});return no(e,W,{staleWhileRevalidate:!0}).then(I=>{x(I),Be(!0)}).catch(()=>{}),X},[e,W]);let fn="impakers-debug-history-last-seen";(0,y.useEffect)(()=>{let c=localStorage.getItem(fn)||new Date(0).toISOString();Gn(e,{since:c,limit:100}).then(_=>tn(_.length)).catch(()=>{})},[e]);let Fo=(0,y.useCallback)(()=>{localStorage.setItem(fn,new Date().toISOString()),tn(0)},[]);(0,y.useEffect)(()=>{if(!ve)return;let c=be.map($r).filter(_=>_!==null);i(c),Io(c)},[be,ve]);let vt=(0,y.useRef)(!0);(0,y.useEffect)(()=>{if(vt.current){vt.current=!1;return}Io(r)},[r]),(0,y.useEffect)(()=>{let c=_=>{if(_.key==="Escape"){if(f){$(!1);return}if(a){_.preventDefault(),w(!0),Ee(()=>{m(null),w(!1)},150);return}t&&(_.preventDefault(),s(!1),document.documentElement.classList.remove("impakers-selecting"),T(null))}};return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[f,a,t]),(0,y.useEffect)(()=>{if(!t||a)return;let c=_=>{let X=_.composedPath()[0]||_.target;if(Je(X,"[data-impakers-debug]")){T(null);return}let I=bt(_.clientX,_.clientY);if(!I||Je(I,"[data-impakers-debug]")){T(null);return}let{name:xe,elementName:Re,path:Ne,reactComponents:de}=To(I),S=I.getBoundingClientRect();T({element:xe,elementName:Re,elementPath:Ne,rect:S,reactComponents:de}),M({x:_.clientX,y:_.clientY})};return document.addEventListener("mousemove",c),()=>document.removeEventListener("mousemove",c)},[t,a]),(0,y.useEffect)(()=>{if(!t)return;let c=_=>{if(ee.current)return;let X=_.composedPath()[0]||_.target;if(Je(X,"[data-impakers-debug]")||Je(X,"[data-annotation-popup]")||Je(X,"[data-annotation-marker]"))return;if(a){_.preventDefault(),_.stopPropagation(),mn.current?.shake();return}_.preventDefault(),_.stopPropagation();let I=bt(_.clientX,_.clientY);if(!I)return;let{name:xe,path:Re,reactComponents:Ne}=To(I),de=I.getBoundingClientRect(),S=_.clientX/window.innerWidth*100,pe=Rr(I),Bn=pe?_.clientY:_.clientY+window.scrollY,bn=window.getSelection(),sn;bn&&bn.toString().trim().length>0&&(sn=bn.toString().trim().slice(0,500));let ne=Ht(I),Fe=zt(I);m({x:S,y:Bn,clientY:_.clientY,element:xe,elementPath:Re,selectedText:sn,boundingBox:{x:de.left,y:pe?de.top:de.top+window.scrollY,width:de.width,height:de.height},nearbyText:Pt(I),cssClasses:$t(I),isFixed:pe,fullPath:jt(I),accessibility:Dt(I),computedStyles:Fe,computedStylesObj:ne,reactComponents:Ne??void 0,sourceFile:Mr(I),targetElement:I}),T(null);let Hn=Ar(I).filter(xn=>xn.includes("/chunks/"));Hn.length>0&&(async()=>{for(let xn of Hn)try{let zn=await ft(xn);if(zn){m(tt=>tt&&{...tt,resolvedSource:`${zn.source}:${zn.line}`,resolvedName:zn.name??void 0});break}}catch{}})()};return document.addEventListener("click",c,!0),()=>document.removeEventListener("click",c,!0)},[t,a]);let gn=(0,y.useCallback)(c=>{he(c),Ee(()=>he(null),4e3)},[]),Po=(0,y.useCallback)(async c=>{if(!(!a||fe)){ge(!0);try{let _=Yt(n),X=await Kt(),I=a.resolvedSource||a.sourceFile||"",xe=a.resolvedName||null;if(!a.resolvedSource&&a.sourceFile?.includes("/chunks/"))try{let ne=await ft(a.sourceFile);ne&&(I=`${ne.source}:${ne.line}:${ne.column}`,xe=ne.name)}catch{}let Re=await qt(window.location.pathname),Ne=I&&!I.includes("/chunks/")?Fr(I,xe):null,de=Gt(Ne?[Ne]:void 0,Re?.targets);de.length>0&&(_.debugTargets=de),Re?.context&&(_.routeDebug=Re.context);let S=[];S.push(`## \uD53C\uB4DC\uBC31 ${c}`),de.length>0&&(S.push(""),S.push("---"),S.push(""),S.push("**\uB514\uBC84\uAE45 \uD0C0\uAC9F \uD30C\uC77C**:"),de.forEach(ne=>{let Fe=ne.line?`:${ne.line}${typeof ne.column=="number"?`:${ne.column}`:""}`:"";S.push(`- [${ne.kind}] \`${ne.file}${Fe}\` (${ne.reason})`)}));let pe=[];if(a.element&&pe.push(`**\uC120\uD0DD\uB41C \uC694\uC18C**: ${a.element}`),a.elementPath&&pe.push(`**DOM \uACBD\uB85C**: \`${a.elementPath}\``),a.selectedText&&pe.push(`**\uC120\uD0DD\uB41C \uD14D\uC2A4\uD2B8**: "${a.selectedText}"`),a.reactComponents?.trim()?pe.push(`**React \uCEF4\uD3EC\uB10C\uD2B8**: ${a.reactComponents}`):xe&&pe.push(`**\uCEF4\uD3EC\uB10C\uD2B8/\uD568\uC218**: ${xe}`),I&&!I.includes("/chunks/")&&pe.push(`**\uC18C\uC2A4 \uD30C\uC77C**: \`${I}\``),a.cssClasses&&pe.push(`**CSS \uD074\uB798\uC2A4**: \`${a.cssClasses}\``),a.nearbyText&&pe.push(`**\uC8FC\uBCC0 \uD14D\uC2A4\uD2B8**: ${a.nearbyText}`),a.accessibility&&pe.push(`**\uC811\uADFC\uC131**: ${a.accessibility}`),pe.length>0&&(S.push(""),S.push("---"),S.push(""),pe.forEach(ne=>S.push(ne))),_.consoleErrors?.length&&(S.push(""),S.push("---"),S.push(""),S.push("**\uCD5C\uADFC \uCF58\uC194 \uC5D0\uB7EC**:"),_.consoleErrors.slice(-10).forEach(ne=>S.push(`- \`${ne.slice(0,200)}\``))),_.consoleLogs?.length){let ne=_.consoleLogs.filter(Fe=>Fe.level==="error"||Fe.level==="warn").slice(-10);ne.length>0&&(S.push(""),S.push("**\uCD5C\uADFC \uCF58\uC194 \uB85C\uADF8**:"),ne.forEach(Fe=>S.push(`- [${Fe.level}] \`${Fe.message.slice(0,200)}\``)))}if(S.push(""),S.push("---"),S.push(""),S.push("## \uD658\uACBD \uC815\uBCF4"),S.push(""),S.push(`- **URL**: ${_.url}`),S.push(`- **\uC2DC\uC810**: ${new Date(_.timestamp).toLocaleString("ko-KR")}`),S.push(`- **\uBE0C\uB77C\uC6B0\uC800**: ${_.browser}`),S.push(`- **\uD654\uBA74**: ${_.viewport} (@${_.pixelRatio}x)`),S.push(`- **\uC5B8\uC5B4**: ${_.language}`),_.user?.name&&S.push(`- **\uC0AC\uC6A9\uC790**: ${_.user.name}`),_.performance&&Object.keys(_.performance).length>0){S.push(""),S.push("---"),S.push(""),S.push("## \uC131\uB2A5"),S.push(""),S.push("| \uD56D\uBAA9 | \uAC12 |"),S.push("|------|-----|");let ne={pageLoadTime:"\uD398\uC774\uC9C0 \uB85C\uB529",domContentLoaded:"DOM \uB85C\uB4DC",ttfb:"TTFB",firstContentfulPaint:"FCP",usedJSHeapMB:"\uBA54\uBAA8\uB9AC \uC0AC\uC6A9",totalJSHeapMB:"\uBA54\uBAA8\uB9AC \uC804\uCCB4"};for(let[Fe,Lt]of Object.entries(_.performance)){let Hn=ne[Fe]||Fe,xn=Fe.includes("Heap")?"MB":"ms";S.push(`| ${Hn} | ${Lt}${xn} |`)}}let Bn=S.join(`
3566
- `),bn=await eo(e,{title:c.slice(0,100),description:"",priority:"medium",metadata:_,debugInfo:Bn,debug_info:Bn,screenshot:X,feedbackUrl:window.location.pathname,feedbackMarker:{x:a.x,y:a.y,isFixed:a.isFixed||!1,element:a.element,boundingBox:a.boundingBox},authorName:n?.()?.name?String(n().name):void 0});D(!0),Ee(()=>D(!1),3e3);let sn=bn.taskId||null;pn.current=sn,Ee(()=>{pn.current=null},300),Ee(()=>{sn&&K(ne=>new Set(ne).add(sn))},250),w(!0),Ee(()=>{m(null),w(!1),s(!1),document.documentElement.classList.remove("impakers-selecting"),ee.current=!0,setTimeout(()=>{ee.current=!1},300)},150),window.getSelection()?.removeAllRanges()}catch(_){let X=_?.message||"\uD53C\uB4DC\uBC31 \uC804\uC1A1 \uC2E4\uD328";gn(X),console.error("[@impakers/debug] \uD53C\uB4DC\uBC31 \uC804\uC1A1 \uC2E4\uD328:",_)}finally{ge(!1)}}},[a,fe,e,n,gn]),$o=(0,y.useCallback)(()=>{w(!0),Ee(()=>{m(null),w(!1),s(!1),document.documentElement.classList.remove("impakers-selecting"),ee.current=!0,setTimeout(()=>{ee.current=!1},300)},150)},[]),Ct=(0,y.useCallback)(c=>{let _=c.id;te(X=>X===_?null:_)},[]);(0,y.useEffect)(()=>{if(!A)return;let c=qe(A),_=cn(c);_?(ye(I=>({...I,[A]:_})),Te(!1)):Te(!0);let X=En(c,I=>{ye(xe=>({...xe,[A]:I})),Te(!1)});return Yn(e,A,{staleWhileRevalidate:!0}).then(()=>Te(!1)).catch(()=>Te(!1)),X},[A,e]);let Bo=(0,y.useCallback)(async(c,_,X,I)=>{let xe=n?.()?.name?String(n().name):"\uC775\uBA85",Re=n?.()?.id?String(n().id):void 0;try{let Ne;if(I)try{Ne=await qn(e,I,"comment",c)}catch(de){let S=de?.message||"\uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328";gn(S),console.error("[@impakers/debug] \uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328:",de)}await Qn(e,c,_,xe,Re,X,Ne)}catch(Ne){let de=Ne?.message||"\uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328";gn(de),console.error("[@impakers/debug] \uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328:",Ne)}},[n,e,gn]),Ho=(0,y.useCallback)(()=>{te(null)},[]),$n=(0,y.useCallback)(c=>{if(!c){P(null),Q(null);return}if(P(c.id),c.boundingBox){let _=c.boundingBox,X=_.x+_.width/2,I=c.isFixed?_.y+_.height/2:_.y+_.height/2-window.scrollY,xe=bt(X,I);if(xe){let Re=xe.getBoundingClientRect(),Ne=Re.width/_.width,de=Re.height/_.height;if(Ne>=.5&&de>=.5){Q(xe);return}}}Q(null)},[]),zo=(0,y.useCallback)(()=>{if(!a)return{left:0,top:0};let c=a.x/100*window.innerWidth,_=a.isFixed?a.y:a.y-window.scrollY,X=Math.max(160,Math.min(window.innerWidth-160,c));return _>window.innerHeight-290?{left:X,bottom:window.innerHeight-_+20}:{left:X,top:_+20}},[a]);if(typeof document>"u")return null;let hn=zo(),yn=F?.getBoundingClientRect(),Do=[{id:"comment",label:"\uD53C\uB4DC\uBC31",active:t,icon:(0,k.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,k.jsx)("path",{d:"M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z"})})},{id:"delay-capture",label:"\uB51C\uB808\uC774 \uCEA1\uCC98",icon:(0,k.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,k.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,k.jsx)("polyline",{points:"12 6 12 12 16 14"})]})},{id:"agent",label:"\uC5D0\uC774\uC804\uD2B8",icon:(0,k.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,k.jsx)("path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z"}),(0,k.jsx)("path",{d:"M20 3v4"}),(0,k.jsx)("path",{d:"M22 5h-4"})]})},{id:"inbox",label:"Inbox",badge:Pn||void 0,icon:(0,k.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,k.jsx)("polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12"}),(0,k.jsx)("path",{d:"M5.45 5.11L2 12v6a2 2 0 002 2h16a2 2 0 002-2v-6l-3.45-6.89A2 2 0 0016.76 4H7.24a2 2 0 00-1.79 1.11z"})]})},{id:"settings",label:"\uC124\uC815",icon:(0,k.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,k.jsx)("circle",{cx:"12",cy:"12",r:"3"}),(0,k.jsx)("path",{d:"M19.4 15a1.65 1.65 0 00.33 1.82l.06.06a2 2 0 010 2.83 2 2 0 01-2.83 0l-.06-.06a1.65 1.65 0 00-1.82-.33 1.65 1.65 0 00-1 1.51V21a2 2 0 01-4 0v-.09A1.65 1.65 0 009 19.4a1.65 1.65 0 00-1.82.33l-.06.06a2 2 0 01-2.83-2.83l.06-.06A1.65 1.65 0 004.68 15a1.65 1.65 0 00-1.51-1H3a2 2 0 010-4h.09A1.65 1.65 0 004.6 9a1.65 1.65 0 00-.33-1.82l-.06-.06a2 2 0 012.83-2.83l.06.06A1.65 1.65 0 009 4.68a1.65 1.65 0 001-1.51V3a2 2 0 014 0v.09a1.65 1.65 0 001 1.51 1.65 1.65 0 001.82-.33l.06-.06a2 2 0 012.83 2.83l-.06.06A1.65 1.65 0 0019.4 9a1.65 1.65 0 001.51 1H21a2 2 0 010 4h-.09a1.65 1.65 0 00-1.51 1z"})]})}],wt=W,nt=n?.()?.name?String(n().name):null,St=(0,y.useMemo)(()=>r.filter(c=>{let _=be.find(X=>X.id===c.id);return!(re.hideDoneMarkers&&(c.status==="done"||c.status==="resolved")||re.showOnlyMine&&_?.authorName&&nt&&_.authorName!==nt)}),[r,be,re.hideDoneMarkers,re.showOnlyMine,nt]),Nt=(c,_)=>({id:c.id,title:c.title||"\uD53C\uB4DC\uBC31",status:c.status,priority:c.priority,authorName:c.authorName||"\uC775\uBA85",feedbackUrl:c.feedbackUrl||_,createdAt:c.createdAt,startedAt:c.startedAt,completedAt:c.completedAt,commentCount:c.commentCount||0}),jo=be.map(c=>Nt(c,wt)),Wo=v.map(c=>Nt(c,""));return(0,Eo.createPortal)((0,k.jsxs)("div",{"data-impakers-debug":"",children:[(0,k.jsx)(mo,{items:Do,onSelect:V,onHide:o,onDoubleTap:on}),f&&(0,k.jsx)(ho,{pageItems:jo,allItems:Wo,currentPath:wt,serviceName:Rt()||void 0,endpoint:e,currentUserName:n?.()?.name?String(n().name):"\uC775\uBA85",currentUserId:n?.()?.id?String(n().id):void 0,onClose:()=>$(!1),onHistoryViewed:Fo,newNotiCount:Pn}),z&&(0,k.jsx)(ko,{endpoint:e,onClose:()=>ue(!1)}),B&&(0,k.jsx)(Lo,{settings:re,onChange:Se,onClose:()=>Z(!1)}),t&&(0,k.jsxs)(k.Fragment,{children:[L?.rect&&!a&&(0,k.jsx)("div",{className:`${me.hoverHighlight} ${me.enter}`,style:{left:L.rect.left,top:L.rect.top,width:L.rect.width,height:L.rect.height}}),L&&!a&&(0,k.jsxs)("div",{className:`${me.hoverTooltip} ${me.enter}`,style:{left:Math.min(E.x+14,window.innerWidth-200),top:E.y+14},children:[L.reactComponents&&(0,k.jsx)("div",{className:me.hoverReactPath,children:L.reactComponents}),(0,k.jsx)("div",{className:me.hoverElementName,children:L.elementName})]}),yn&&ce&&(0,k.jsx)("div",{className:`${me.singleSelectOutline} ${me.enter}`,style:{left:yn.left,top:yn.top,width:yn.width,height:yn.height}}),a?.targetElement&&(()=>{let c=a.targetElement.getBoundingClientRect();return(0,k.jsx)("div",{className:`${me.singleSelectOutline} ${me.enter}`,style:{left:c.left,top:c.top,width:c.width,height:c.height}})})()]}),(0,k.jsx)("div",{className:me.markersLayer,"data-impakers-debug":"",style:{display:re.markersVisible?void 0:"none"},children:St.filter(c=>!c.isFixed).map((c,_)=>(0,k.jsx)(gt,{annotation:c,layerIndex:_,isAnimated:j.has(c.id),isHovered:ce===c.id,isDeleting:!1,markerClickBehavior:"edit",accentColor:re.markerColor,onHover:()=>$n(c),onHoverEnd:()=>$n(null),onClick:()=>Ct(c),onContextMenu:()=>{}},c.id))}),(0,k.jsxs)("div",{className:me.fixedMarkersLayer,"data-impakers-debug":"",style:{display:re.markersVisible?void 0:"none"},children:[St.filter(c=>c.isFixed).map((c,_)=>(0,k.jsx)(gt,{annotation:c,layerIndex:_,isAnimated:j.has(c.id),isHovered:ce===c.id,isDeleting:!1,markerClickBehavior:"edit",accentColor:re.markerColor,onHover:()=>$n(c),onHoverEnd:()=>$n(null),onClick:()=>Ct(c),onContextMenu:()=>{}},c.id)),a&&(0,k.jsx)(io,{x:a.x,y:a.clientY,isMultiSelect:!1,accentColor:re.markerColor})]}),a&&(0,k.jsx)(Ft,{ref:mn,element:a.resolvedSource||a.resolvedName||a.element,selectedText:a.selectedText,isExiting:C,style:{position:"fixed",left:hn.left,..."top"in hn?{top:hn.top}:{},..."bottom"in hn?{bottom:hn.bottom}:{},transform:"translateX(-50%)",zIndex:100001},onSubmit:Po,onCancel:$o}),A&&(()=>{let c=r.find(pe=>pe.id===A),_=be.find(pe=>pe.id===A);if(!c)return null;let X=c.x/100*window.innerWidth,I=c.isFixed?c.y:c.y-window.scrollY,xe=Math.max(10,Math.min(X+20,window.innerWidth-360)),Re=window.innerHeight-I,Ne=I,de=Re>=300?Math.min(I,window.innerHeight-60):Math.max(10,I-Math.min(480,Ne-10)),S={id:c.id,title:_?.title||c.comment||"\uD53C\uB4DC\uBC31",status:_?.status||"todo",authorName:_?.authorName||void 0,createdAt:_?.createdAt||new Date(c.timestamp).toISOString(),comments:le[c.id]||[]};return(0,k.jsx)(_o,{task:S,currentUserName:n?.()?.name?String(n().name):"\uC775\uBA85",currentUserId:n?.()?.id?String(n().id):void 0,left:xe,top:de,loading:Pe,onClose:Ho,onReply:Bo})})(),Ke!==null&&(0,k.jsxs)("div",{className:me.countdownOverlay,"data-impakers-debug":"",children:[(0,k.jsx)("div",{className:me.countdownNumber,children:Ke}),(0,k.jsx)("div",{className:me.countdownLabel,children:"\uD53C\uB4DC\uBC31 \uBAA8\uB4DC \uD65C\uC131\uD654\uAE4C\uC9C0..."}),(0,k.jsx)("button",{className:me.countdownCancel,onClick:()=>{ze.current&&clearTimeout(ze.current),Ze(null)},type:"button",children:"\uCDE8\uC18C"})]}),b&&(0,k.jsxs)("div",{className:me.toast,"data-impakers-debug":"",children:[(0,k.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#16a34a",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,k.jsx)("polyline",{points:"20 6 9 17 4 12"})}),(0,k.jsx)("span",{children:"\uD0DC\uC2A4\uD06C \uC0DD\uC131\uC774 \uC644\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4"})]}),R&&(0,k.jsxs)("div",{className:`${me.toast} ${me.toastError}`,"data-impakers-debug":"",children:[(0,k.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#ef4444",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,k.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,k.jsx)("line",{x1:"15",y1:"9",x2:"9",y2:"15"}),(0,k.jsx)("line",{x1:"9",y1:"9",x2:"15",y2:"15"})]}),(0,k.jsx)("span",{children:R})]})]}),document.body)}var _n=require("react"),Mo=require("react-dom");var we=require("react/jsx-runtime");function Ao({endpoint:e,onSuccess:n,onClose:o}){let[t,s]=(0,_n.useState)(""),[r,i]=(0,_n.useState)(!1),[a,m]=(0,_n.useState)(null),C=(0,_n.useCallback)(async w=>{if(w.preventDefault(),!(!t.trim()||r)){i(!0),m(null);try{let L=await Mt(e,t.trim().toUpperCase());n(L.serviceName)}catch(L){m(L instanceof Error?L.message:"\uC778\uC99D \uC2E4\uD328")}finally{i(!1)}}},[t,e,r,n]);return typeof document>"u"?null:(0,Mo.createPortal)((0,we.jsxs)("div",{"data-impakers-debug":"",style:{position:"fixed",inset:0,zIndex:2147483647,display:"flex",alignItems:"center",justifyContent:"center",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif"},children:[(0,we.jsx)("div",{onClick:o,style:{position:"absolute",inset:0,background:"rgba(0, 0, 0, 0.4)"}}),(0,we.jsxs)("div",{style:{position:"relative",width:360,background:"white",borderRadius:12,boxShadow:"0 16px 48px rgba(0,0,0,0.16)",overflow:"hidden"},children:[(0,we.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px 20px",borderBottom:"1px solid #e5e5e5"},children:[(0,we.jsx)("h3",{style:{fontSize:15,fontWeight:600,color:"#18181b",margin:0},children:"\uD53C\uB4DC\uBC31 \uC704\uC82F \uC778\uC99D"}),(0,we.jsx)("button",{onClick:o,type:"button",style:{width:28,height:28,border:"none",background:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:6,color:"#71717a"},children:(0,we.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,we.jsx)("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),(0,we.jsxs)("div",{style:{padding:20},children:[(0,we.jsxs)("p",{style:{fontSize:13,color:"#71717a",textAlign:"center",marginBottom:16,lineHeight:1.5},children:["\uC11C\uBE44\uC2A4 \uC2DC\uD06C\uB9BF \uCF54\uB4DC\uB97C \uC785\uB825\uD574\uC8FC\uC138\uC694.",(0,we.jsx)("br",{}),"\uCF54\uB4DC\uB294 \uC784\uD328\uCEE4\uC2A4 OS\uC5D0\uC11C \uD655\uC778\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."]}),a&&(0,we.jsx)("div",{style:{background:"#fef2f2",border:"1px solid #fecaca",color:"#dc2626",padding:"8px 12px",borderRadius:8,fontSize:13,marginBottom:12},children:a}),(0,we.jsxs)("form",{onSubmit:C,children:[(0,we.jsx)("input",{type:"text",maxLength:6,placeholder:"A3F9K2",value:t,onChange:w=>s(w.target.value.toUpperCase()),autoFocus:!0,autoComplete:"off",style:{width:"100%",padding:"12px 16px",border:"1px solid #d4d4d8",borderRadius:8,fontSize:24,fontWeight:600,textAlign:"center",letterSpacing:8,textTransform:"uppercase",outline:"none",boxSizing:"border-box",fontFamily:"inherit",color:"#18181b"}}),(0,we.jsx)("button",{type:"submit",disabled:t.trim().length<6||r,style:{width:"100%",marginTop:16,padding:"10px 16px",border:"none",borderRadius:8,fontSize:14,fontWeight:500,cursor:t.trim().length<6||r?"not-allowed":"pointer",background:t.trim().length<6||r?"#a1a1aa":"#18181b",color:"white",fontFamily:"inherit"},children:r?"\uC778\uC99D \uC911...":"\uC778\uC99D\uD558\uAE30"})]})]})]})]}),document.body)}var nn=require("react/jsx-runtime");function Br({endpoint:e,getUser:n}){let o=e||It,[t,s]=(0,He.useState)(!1),[r,i]=(0,He.useState)(!1),[a,m]=(0,He.useState)(()=>{try{return localStorage.getItem("impakers-debug-hidden")==="1"}catch{return!1}});(0,He.useEffect)(()=>{s(rn())},[]),(0,He.useEffect)(()=>{let T=[Xe._on("impakers-debug:show-auth",()=>{i(!0),m(!1);try{localStorage.removeItem("impakers-debug-hidden")}catch{}}),Xe._on("impakers-debug:open",()=>{m(!1);try{localStorage.removeItem("impakers-debug-hidden")}catch{}}),Xe._on("impakers-debug:deactivate",()=>{s(!1),i(!1)})];return()=>T.forEach(E=>E())},[]),(0,He.useEffect)(()=>{function T(E){if((E.ctrlKey||E.metaKey)&&E.shiftKey&&(E.key==="."||E.key===">"||E.code==="Period")){if(E.preventDefault(),a){m(!1);try{localStorage.removeItem("impakers-debug-hidden")}catch{}return}rn()?s(!0):i(M=>!M)}}return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[a]);let C=(0,He.useCallback)(T=>{s(!0),i(!1)},[]),w=(0,He.useCallback)(()=>{i(!1)},[]),L=(0,He.useCallback)(()=>{m(!0);try{localStorage.setItem("impakers-debug-hidden","1")}catch{}},[]);return(0,nn.jsxs)(nn.Fragment,{children:[t&&!a&&(0,nn.jsx)(Ro,{endpoint:o,getUser:n,onHide:L}),r&&!t&&(0,nn.jsx)(Ao,{endpoint:o,onSuccess:C,onClose:w})]})}0&&(module.exports={ImpakersDebug,ImpakersDebugProvider});
3565
+ }`,Er={markersLayer:"styles-module__markersLayer___VR1cD",fixedMarkersLayer:"styles-module__fixedMarkersLayer___wBuxm",fab:"styles-module__fab___6FrCF",fabEnter:"styles-module__fabEnter___9koyT",active:"styles-module__active___X5PRD",hoverHighlight:"styles-module__hoverHighlight___9kGLL",enter:"styles-module__enter___jAi-c",hoverHighlightIn:"styles-module__hoverHighlightIn___ljC4F",singleSelectOutline:"styles-module__singleSelectOutline___2meUm",fadeIn:"styles-module__fadeIn___PpRqy",hoverTooltip:"styles-module__hoverTooltip___JE1Bs",hoverTooltipIn:"styles-module__hoverTooltipIn___tncNM",hoverReactPath:"styles-module__hoverReactPath___wPGYi",hoverElementName:"styles-module__hoverElementName___lNqTP",contextMenu:"styles-module__contextMenu___nDXft",contextMenuItem:"styles-module__contextMenuItem___69GKu",toast:"styles-module__toast___gV3Sa",toastIn:"styles-module__toastIn___V382h",toastOut:"styles-module__toastOut___zlqxG",toastError:"styles-module__toastError___Q-8dn",countdownOverlay:"styles-module__countdownOverlay___GruQJ",countdownNumber:"styles-module__countdownNumber___VAmkI",countdownPulse:"styles-module__countdownPulse___ngZrL",countdownLabel:"styles-module__countdownLabel___px-ao",countdownCancel:"styles-module__countdownCancel___8cRgZ",fadeOut:"styles-module__fadeOut___tZb9S"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-debug-widget-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-debug-widget-styles",document.head.appendChild(e)),e.textContent=Ir}var me=Er;var k=require("react/jsx-runtime");function bt(e,n){let o=document.elementFromPoint(e,n);if(!o)return null;for(;o?.shadowRoot;){let t=o.shadowRoot.elementFromPoint(e,n);if(!t||t===o)break;o=t}return o}function Rr(e){let n=e;for(;n&&n!==document.body;){let o=window.getComputedStyle(n);if(o.position==="fixed"||o.position==="sticky")return!0;n=n.parentElement}return!1}function To(e){let{name:n,path:o}=at(e),t=Vt(e,{mode:"filtered"});return{name:t.path?`${t.path} ${n}`:n,elementName:n,path:o,reactComponents:t.path}}function Mr(e){let n=Nn(e),o=n.found?n:dt(e);if(o.found&&o.source)return Vn(o.source,"path")}function Ar(e){let n=Nn(e),o=n.found?n:dt(e);return o.found&&o.sourceCandidates&&o.sourceCandidates.length>0?o.sourceCandidates.map(t=>Vn(t,"path")):o.found&&o.source?[Vn(o.source,"path")]:[]}function Fr(e,n){let o=e.match(/^(.+):(\d+)(?::(\d+))?$/);if(!o)return null;let[,t,s,r]=o,i=Number.parseInt(s,10),a=r?Number.parseInt(r,10):void 0;return!t||Number.isNaN(i)?null:{kind:"component",file:t,line:i,column:a,label:n||"Resolved component source",confidence:.98,reason:"resolved-from-source-map"}}var Pr="impakers-debug-markers-";function kt(){return Pr+window.location.pathname}function xt(){try{let e=localStorage.getItem(kt());return e?JSON.parse(e):[]}catch{return[]}}function Io(e){try{e.length===0?localStorage.removeItem(kt()):localStorage.setItem(kt(),JSON.stringify(e))}catch{}}function $r(e){return e.feedbackMarker?{id:e.id,x:e.feedbackMarker.x,y:e.feedbackMarker.y,comment:e.title.replace(/^\[피드백\]\s*/,""),element:e.feedbackMarker.element||"",elementPath:"",timestamp:new Date(e.createdAt).getTime(),isFixed:e.feedbackMarker.isFixed,boundingBox:e.feedbackMarker.boundingBox,status:e.status}:null}function Ro({endpoint:e,getUser:n,onHide:o}){let[t,s]=(0,y.useState)(!1),[r,i]=(0,y.useState)(()=>xt()),[a,m]=(0,y.useState)(null),[w,C]=(0,y.useState)(!1),[L,T]=(0,y.useState)(null),[I,M]=(0,y.useState)({x:0,y:0}),[j,K]=(0,y.useState)(new Set),[pe,fe]=(0,y.useState)(!1),[ce,P]=(0,y.useState)(null),[F,Q]=(0,y.useState)(null),[b,D]=(0,y.useState)(!1),[E,ge]=(0,y.useState)(null),[A,te]=(0,y.useState)(null),[le,he]=(0,y.useState)({}),[Pe,Ne]=(0,y.useState)(!1),[ye,x]=(0,y.useState)([]),[v,oe]=(0,y.useState)([]),[f,$]=(0,y.useState)(!1),[z,ue]=(0,y.useState)(!1),[B,Z]=(0,y.useState)(!1),[re,p]=(0,y.useState)(()=>wo()),[W,$e]=(0,y.useState)(()=>window.location.pathname),[ke,Be]=(0,y.useState)(!1),[$n,on]=(0,y.useState)(0),[Ke,Ze]=(0,y.useState)(null),ze=(0,y.useRef)(null),pn=(0,y.useRef)(null),fn=(0,y.useRef)(null),ee=(0,y.useRef)(!1),Ie=(0,y.useCallback)(()=>{Ze(3);let c=3,_=()=>{c-=1,c<=0?(Ze(null),s(!0),document.documentElement.classList.add("impakers-selecting")):(Ze(c),ze.current=setTimeout(_,1e3))};ze.current=setTimeout(_,1e3)},[]),V=(0,y.useCallback)(c=>{c==="comment"?sn():c==="delay-capture"?Ie():c==="agent"?ue(!0):c==="inbox"?($(!0),to(e,{staleWhileRevalidate:!0}).then(oe).catch(()=>{}),t&&(s(!1),document.documentElement.classList.remove("impakers-selecting"),T(null),m(null))):c==="settings"&&Z(!0)},[t,Ie]),Le=(0,y.useCallback)(c=>{p(c),Co(c)},[]),sn=(0,y.useCallback)(()=>{s(c=>{let _=!c;return _?document.documentElement.classList.add("impakers-selecting"):(document.documentElement.classList.remove("impakers-selecting"),T(null),m(null)),_})},[]);(0,y.useEffect)(()=>()=>{document.documentElement.classList.remove("impakers-selecting")},[]),(0,y.useEffect)(()=>{i(xt());let c=()=>{$e(window.location.pathname),i(xt()),m(null),T(null)};window.addEventListener("popstate",c);let _=history.pushState.bind(history);return history.pushState=(...X)=>{_(...X),setTimeout(c,50)},()=>{window.removeEventListener("popstate",c),history.pushState=_}},[]),(0,y.useEffect)(()=>{let c=Qe(W),_=un(c);_&&(x(_),Be(!0));let X=Rn(c,R=>{x(R),Be(!0)});return no(e,W,{staleWhileRevalidate:!0}).then(R=>{x(R),Be(!0)}).catch(()=>{}),X},[e,W]);let gn="impakers-debug-history-last-seen";(0,y.useEffect)(()=>{let c=localStorage.getItem(gn)||new Date(0).toISOString();Gn(e,{since:c,limit:100}).then(_=>on(_.length)).catch(()=>{})},[e]);let Fo=(0,y.useCallback)(()=>{localStorage.setItem(gn,new Date().toISOString()),on(0)},[]);(0,y.useEffect)(()=>{if(!ke)return;let c=ye.map($r).filter(_=>_!==null);i(c),Io(c)},[ye,ke]);let vt=(0,y.useRef)(!0);(0,y.useEffect)(()=>{if(vt.current){vt.current=!1;return}Io(r)},[r]),(0,y.useEffect)(()=>{let c=_=>{if(_.key==="Escape"){if(f){$(!1);return}if(a){_.preventDefault(),C(!0),Ee(()=>{m(null),C(!1)},150);return}t&&(_.preventDefault(),s(!1),document.documentElement.classList.remove("impakers-selecting"),T(null))}};return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[f,a,t]),(0,y.useEffect)(()=>{if(!t||a)return;let c=_=>{let X=_.composedPath()[0]||_.target;if(en(X,"[data-impakers-debug]")){T(null);return}let R=bt(_.clientX,_.clientY);if(!R||en(R,"[data-impakers-debug]")){T(null);return}let{name:be,elementName:Ae,path:ve,reactComponents:de}=To(R),S=R.getBoundingClientRect();T({element:be,elementName:Ae,elementPath:ve,rect:S,reactComponents:de}),M({x:_.clientX,y:_.clientY})};return document.addEventListener("mousemove",c),()=>document.removeEventListener("mousemove",c)},[t,a]),(0,y.useEffect)(()=>{if(!t)return;let c=_=>{if(ee.current)return;let X=_.composedPath()[0]||_.target;if(en(X,"[data-impakers-debug]")||en(X,"[data-annotation-popup]")||en(X,"[data-annotation-marker]"))return;if(a){_.preventDefault(),_.stopPropagation(),pn.current?.shake();return}_.preventDefault(),_.stopPropagation();let R=bt(_.clientX,_.clientY);if(!R)return;let{name:be,path:Ae,reactComponents:ve}=To(R),de=R.getBoundingClientRect(),S=_.clientX/window.innerWidth*100,we=Rr(R),Xe=we?_.clientY:_.clientY+window.scrollY,xn=window.getSelection(),rn;xn&&xn.toString().trim().length>0&&(rn=xn.toString().trim().slice(0,500));let ne=Ht(R),Fe=zt(R);m({x:S,y:Xe,clientY:_.clientY,element:be,elementPath:Ae,selectedText:rn,boundingBox:{x:de.left,y:we?de.top:de.top+window.scrollY,width:de.width,height:de.height},nearbyText:Pt(R),cssClasses:$t(R),isFixed:we,fullPath:jt(R),accessibility:Dt(R),computedStyles:Fe,computedStylesObj:ne,reactComponents:ve??void 0,sourceFile:Mr(R),targetElement:R}),T(null);let Hn=Ar(R).filter(kn=>kn.includes("/chunks/"));Hn.length>0&&(async()=>{for(let kn of Hn)try{let zn=await ft(kn);if(zn){m(tt=>tt&&{...tt,resolvedSource:`${zn.source}:${zn.line}`,resolvedName:zn.name??void 0});break}}catch{}})()};return document.addEventListener("click",c,!0),()=>document.removeEventListener("click",c,!0)},[t,a]);let hn=(0,y.useCallback)(c=>{ge(c),Ee(()=>ge(null),4e3)},[]),Po=(0,y.useCallback)(async c=>{if(!(!a||pe)){fe(!0);try{let _=Yt(n),X=await Kt(),R=a.resolvedSource||a.sourceFile||"",be=a.resolvedName||null;if(!a.resolvedSource&&a.sourceFile?.includes("/chunks/"))try{let ne=await ft(a.sourceFile);ne&&(R=`${ne.source}:${ne.line}:${ne.column}`,be=ne.name)}catch{}let Ae=await qt(window.location.pathname),ve=R&&!R.includes("/chunks/")?Fr(R,be):null,de=Gt(ve?[ve]:void 0,Ae?.targets);de.length>0&&(_.debugTargets=de),Ae?.context&&(_.routeDebug=Ae.context);let S=[];S.push(`## \uD53C\uB4DC\uBC31 ${c}`),de.length>0&&(S.push(""),S.push("---"),S.push(""),S.push("**\uB514\uBC84\uAE45 \uD0C0\uAC9F \uD30C\uC77C**:"),de.forEach(ne=>{let Fe=ne.line?`:${ne.line}${typeof ne.column=="number"?`:${ne.column}`:""}`:"";S.push(`- [${ne.kind}] \`${ne.file}${Fe}\` (${ne.reason})`)}));let we=[];if(a.element&&we.push(`**\uC120\uD0DD\uB41C \uC694\uC18C**: ${a.element}`),a.elementPath&&we.push(`**DOM \uACBD\uB85C**: \`${a.elementPath}\``),a.selectedText&&we.push(`**\uC120\uD0DD\uB41C \uD14D\uC2A4\uD2B8**: "${a.selectedText}"`),a.reactComponents?.trim()?we.push(`**React \uCEF4\uD3EC\uB10C\uD2B8**: ${a.reactComponents}`):be&&we.push(`**\uCEF4\uD3EC\uB10C\uD2B8/\uD568\uC218**: ${be}`),R&&!R.includes("/chunks/")&&we.push(`**\uC18C\uC2A4 \uD30C\uC77C**: \`${R}\``),a.cssClasses&&we.push(`**CSS \uD074\uB798\uC2A4**: \`${a.cssClasses}\``),a.nearbyText&&we.push(`**\uC8FC\uBCC0 \uD14D\uC2A4\uD2B8**: ${a.nearbyText}`),a.accessibility&&we.push(`**\uC811\uADFC\uC131**: ${a.accessibility}`),we.length>0&&(S.push(""),S.push("---"),S.push(""),we.forEach(ne=>S.push(ne))),_.consoleErrors?.length&&(S.push(""),S.push("---"),S.push(""),S.push("**\uCD5C\uADFC \uCF58\uC194 \uC5D0\uB7EC**:"),_.consoleErrors.slice(-10).forEach(ne=>S.push(`- \`${ne.slice(0,200)}\``))),_.consoleLogs?.length){let ne=_.consoleLogs.filter(Fe=>Fe.level==="error"||Fe.level==="warn").slice(-10);ne.length>0&&(S.push(""),S.push("**\uCD5C\uADFC \uCF58\uC194 \uB85C\uADF8**:"),ne.forEach(Fe=>S.push(`- [${Fe.level}] \`${Fe.message.slice(0,200)}\``)))}if(S.push(""),S.push("---"),S.push(""),S.push("## \uD658\uACBD \uC815\uBCF4"),S.push(""),S.push(`- **URL**: ${_.url}`),S.push(`- **\uC2DC\uC810**: ${new Date(_.timestamp).toLocaleString("ko-KR")}`),S.push(`- **\uBE0C\uB77C\uC6B0\uC800**: ${_.browser}`),S.push(`- **\uD654\uBA74**: ${_.viewport} (@${_.pixelRatio}x)`),S.push(`- **\uC5B8\uC5B4**: ${_.language}`),_.user?.name&&S.push(`- **\uC0AC\uC6A9\uC790**: ${_.user.name}`),_.performance&&Object.keys(_.performance).length>0){S.push(""),S.push("---"),S.push(""),S.push("## \uC131\uB2A5"),S.push(""),S.push("| \uD56D\uBAA9 | \uAC12 |"),S.push("|------|-----|");let ne={pageLoadTime:"\uD398\uC774\uC9C0 \uB85C\uB529",domContentLoaded:"DOM \uB85C\uB4DC",ttfb:"TTFB",firstContentfulPaint:"FCP",usedJSHeapMB:"\uBA54\uBAA8\uB9AC \uC0AC\uC6A9",totalJSHeapMB:"\uBA54\uBAA8\uB9AC \uC804\uCCB4"};for(let[Fe,Lt]of Object.entries(_.performance)){let Hn=ne[Fe]||Fe,kn=Fe.includes("Heap")?"MB":"ms";S.push(`| ${Hn} | ${Lt}${kn} |`)}}let Xe=S.join(`
3566
+ `),xn=await eo(e,{title:c.slice(0,100),description:"",priority:"medium",metadata:_,debugInfo:Xe,debug_info:Xe,screenshot:X,feedbackUrl:window.location.pathname,feedbackMarker:{x:a.x,y:a.y,isFixed:a.isFixed||!1,element:a.element,boundingBox:a.boundingBox},authorName:n?.()?.name?String(n().name):void 0});D(!0),Ee(()=>D(!1),3e3);let rn=xn.taskId||null;fn.current=rn,Ee(()=>{fn.current=null},300),Ee(()=>{rn&&K(ne=>new Set(ne).add(rn))},250),C(!0),Ee(()=>{m(null),C(!1),s(!1),document.documentElement.classList.remove("impakers-selecting"),ee.current=!0,setTimeout(()=>{ee.current=!1},300)},150),window.getSelection()?.removeAllRanges()}catch(_){let X=_?.message||"\uD53C\uB4DC\uBC31 \uC804\uC1A1 \uC2E4\uD328";hn(X),console.error("[@impakers/debug] \uD53C\uB4DC\uBC31 \uC804\uC1A1 \uC2E4\uD328:",_)}finally{fe(!1)}}},[a,pe,e,n,hn]),$o=(0,y.useCallback)(()=>{C(!0),Ee(()=>{m(null),C(!1),s(!1),document.documentElement.classList.remove("impakers-selecting"),ee.current=!0,setTimeout(()=>{ee.current=!1},300)},150)},[]),wt=(0,y.useCallback)(c=>{let _=c.id;te(X=>X===_?null:_)},[]);(0,y.useEffect)(()=>{if(!A)return;let c=Ge(A),_=un(c);_?(he(R=>({...R,[A]:_})),Ne(!1)):Ne(!0);let X=Rn(c,R=>{he(be=>({...be,[A]:R})),Ne(!1)});return Yn(e,A,{staleWhileRevalidate:!0}).then(()=>Ne(!1)).catch(()=>Ne(!1)),X},[A,e]);let Bo=(0,y.useCallback)(async(c,_,X,R)=>{let be=n?.()?.name?String(n().name):"\uC775\uBA85",Ae=n?.()?.id?String(n().id):void 0;try{let ve;if(R)try{ve=await qn(e,R,"comment",c)}catch(de){let S=de?.message||"\uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328";hn(S),console.error("[@impakers/debug] \uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328:",de)}await Qn(e,c,_,be,Ae,X,ve)}catch(ve){let de=ve?.message||"\uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328";hn(de),console.error("[@impakers/debug] \uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328:",ve)}},[n,e,hn]),Ho=(0,y.useCallback)(()=>{te(null)},[]),Bn=(0,y.useCallback)(c=>{if(!c){P(null),Q(null);return}if(P(c.id),c.boundingBox){let _=c.boundingBox,X=_.x+_.width/2,R=c.isFixed?_.y+_.height/2:_.y+_.height/2-window.scrollY,be=bt(X,R);if(be){let Ae=be.getBoundingClientRect(),ve=Ae.width/_.width,de=Ae.height/_.height;if(ve>=.5&&de>=.5){Q(be);return}}}Q(null)},[]),zo=(0,y.useCallback)(()=>{if(!a)return{left:0,top:0};let c=a.x/100*window.innerWidth,_=a.isFixed?a.y:a.y-window.scrollY,X=Math.max(160,Math.min(window.innerWidth-160,c));return _>window.innerHeight-290?{left:X,bottom:window.innerHeight-_+20}:{left:X,top:_+20}},[a]);if(typeof document>"u")return null;let yn=zo(),bn=F?.getBoundingClientRect(),Do=[{id:"comment",label:"\uD53C\uB4DC\uBC31",active:t,icon:(0,k.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,k.jsx)("path",{d:"M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z"})})},{id:"delay-capture",label:"\uB51C\uB808\uC774 \uCEA1\uCC98",icon:(0,k.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,k.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,k.jsx)("polyline",{points:"12 6 12 12 16 14"})]})},{id:"agent",label:"\uC5D0\uC774\uC804\uD2B8",icon:(0,k.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,k.jsx)("path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z"}),(0,k.jsx)("path",{d:"M20 3v4"}),(0,k.jsx)("path",{d:"M22 5h-4"})]})},{id:"inbox",label:"Inbox",badge:$n||void 0,icon:(0,k.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,k.jsx)("polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12"}),(0,k.jsx)("path",{d:"M5.45 5.11L2 12v6a2 2 0 002 2h16a2 2 0 002-2v-6l-3.45-6.89A2 2 0 0016.76 4H7.24a2 2 0 00-1.79 1.11z"})]})},{id:"settings",label:"\uC124\uC815",icon:(0,k.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,k.jsx)("circle",{cx:"12",cy:"12",r:"3"}),(0,k.jsx)("path",{d:"M19.4 15a1.65 1.65 0 00.33 1.82l.06.06a2 2 0 010 2.83 2 2 0 01-2.83 0l-.06-.06a1.65 1.65 0 00-1.82-.33 1.65 1.65 0 00-1 1.51V21a2 2 0 01-4 0v-.09A1.65 1.65 0 009 19.4a1.65 1.65 0 00-1.82.33l-.06.06a2 2 0 01-2.83-2.83l.06-.06A1.65 1.65 0 004.68 15a1.65 1.65 0 00-1.51-1H3a2 2 0 010-4h.09A1.65 1.65 0 004.6 9a1.65 1.65 0 00-.33-1.82l-.06-.06a2 2 0 012.83-2.83l.06.06A1.65 1.65 0 009 4.68a1.65 1.65 0 001-1.51V3a2 2 0 014 0v.09a1.65 1.65 0 001 1.51 1.65 1.65 0 001.82-.33l.06-.06a2 2 0 012.83 2.83l-.06.06A1.65 1.65 0 0019.4 9a1.65 1.65 0 001.51 1H21a2 2 0 010 4h-.09a1.65 1.65 0 00-1.51 1z"})]})}],Ct=W,nt=n?.()?.name?String(n().name):null,St=(0,y.useMemo)(()=>r.filter(c=>{let _=ye.find(X=>X.id===c.id);return!(re.hideDoneMarkers&&(c.status==="done"||c.status==="resolved")||re.showOnlyMine&&_?.authorName&&nt&&_.authorName!==nt)}),[r,ye,re.hideDoneMarkers,re.showOnlyMine,nt]),Nt=(c,_)=>({id:c.id,title:c.title||"\uD53C\uB4DC\uBC31",status:c.status,priority:c.priority,authorName:c.authorName||"\uC775\uBA85",feedbackUrl:c.feedbackUrl||_,createdAt:c.createdAt,startedAt:c.startedAt,completedAt:c.completedAt,commentCount:c.commentCount||0}),jo=ye.map(c=>Nt(c,Ct)),Wo=v.map(c=>Nt(c,""));return(0,Eo.createPortal)((0,k.jsxs)("div",{"data-impakers-debug":"",children:[(0,k.jsx)(mo,{items:Do,onSelect:V,onHide:o,onDoubleTap:sn}),f&&(0,k.jsx)(ho,{pageItems:jo,allItems:Wo,currentPath:Ct,serviceName:Rt()||void 0,endpoint:e,currentUserName:n?.()?.name?String(n().name):"\uC775\uBA85",currentUserId:n?.()?.id?String(n().id):void 0,onClose:()=>$(!1),onHistoryViewed:Fo,newNotiCount:$n}),z&&(0,k.jsx)(ko,{endpoint:e,onClose:()=>ue(!1)}),B&&(0,k.jsx)(Lo,{settings:re,onChange:Le,onClose:()=>Z(!1)}),t&&(0,k.jsxs)(k.Fragment,{children:[L?.rect&&!a&&(0,k.jsx)("div",{className:`${me.hoverHighlight} ${me.enter}`,style:{left:L.rect.left,top:L.rect.top,width:L.rect.width,height:L.rect.height}}),L&&!a&&(0,k.jsxs)("div",{className:`${me.hoverTooltip} ${me.enter}`,style:{left:Math.min(I.x+14,window.innerWidth-200),top:I.y+14},children:[L.reactComponents&&(0,k.jsx)("div",{className:me.hoverReactPath,children:L.reactComponents}),(0,k.jsx)("div",{className:me.hoverElementName,children:L.elementName})]}),bn&&ce&&(0,k.jsx)("div",{className:`${me.singleSelectOutline} ${me.enter}`,style:{left:bn.left,top:bn.top,width:bn.width,height:bn.height}}),a?.targetElement&&(()=>{let c=a.targetElement.getBoundingClientRect();return(0,k.jsx)("div",{className:`${me.singleSelectOutline} ${me.enter}`,style:{left:c.left,top:c.top,width:c.width,height:c.height}})})()]}),(0,k.jsx)("div",{className:me.markersLayer,"data-impakers-debug":"",style:{display:re.markersVisible?void 0:"none"},children:St.filter(c=>!c.isFixed).map((c,_)=>(0,k.jsx)(gt,{annotation:c,layerIndex:_,isAnimated:j.has(c.id),isHovered:ce===c.id,isDeleting:!1,markerClickBehavior:"edit",accentColor:re.markerColor,onHover:()=>Bn(c),onHoverEnd:()=>Bn(null),onClick:()=>wt(c),onContextMenu:()=>{}},c.id))}),(0,k.jsxs)("div",{className:me.fixedMarkersLayer,"data-impakers-debug":"",style:{display:re.markersVisible?void 0:"none"},children:[St.filter(c=>c.isFixed).map((c,_)=>(0,k.jsx)(gt,{annotation:c,layerIndex:_,isAnimated:j.has(c.id),isHovered:ce===c.id,isDeleting:!1,markerClickBehavior:"edit",accentColor:re.markerColor,onHover:()=>Bn(c),onHoverEnd:()=>Bn(null),onClick:()=>wt(c),onContextMenu:()=>{}},c.id)),a&&(0,k.jsx)(io,{x:a.x,y:a.clientY,isMultiSelect:!1,accentColor:re.markerColor})]}),a&&(0,k.jsx)(Ft,{ref:pn,element:a.resolvedSource||a.resolvedName||a.element,selectedText:a.selectedText,isExiting:w,style:{position:"fixed",left:yn.left,..."top"in yn?{top:yn.top}:{},..."bottom"in yn?{bottom:yn.bottom}:{},transform:"translateX(-50%)",zIndex:100001},onSubmit:Po,onCancel:$o}),A&&(()=>{let c=r.find(Xe=>Xe.id===A),_=ye.find(Xe=>Xe.id===A);if(!c)return null;let X=c.x/100*window.innerWidth,R=c.isFixed?c.y:c.y-window.scrollY,be=Math.max(10,Math.min(X+20,window.innerWidth-360)),ve=window.innerHeight-R>=300,de=ve?Math.max(10,R):void 0,S=ve?void 0:Math.max(10,window.innerHeight-R),we={id:c.id,title:_?.title||c.comment||"\uD53C\uB4DC\uBC31",status:_?.status||"todo",authorName:_?.authorName||void 0,createdAt:_?.createdAt||new Date(c.timestamp).toISOString(),comments:le[c.id]||[]};return(0,k.jsx)(_o,{task:we,currentUserName:n?.()?.name?String(n().name):"\uC775\uBA85",currentUserId:n?.()?.id?String(n().id):void 0,left:be,top:de,bottom:S,loading:Pe,onClose:Ho,onReply:Bo})})(),Ke!==null&&(0,k.jsxs)("div",{className:me.countdownOverlay,"data-impakers-debug":"",children:[(0,k.jsx)("div",{className:me.countdownNumber,children:Ke}),(0,k.jsx)("div",{className:me.countdownLabel,children:"\uD53C\uB4DC\uBC31 \uBAA8\uB4DC \uD65C\uC131\uD654\uAE4C\uC9C0..."}),(0,k.jsx)("button",{className:me.countdownCancel,onClick:()=>{ze.current&&clearTimeout(ze.current),Ze(null)},type:"button",children:"\uCDE8\uC18C"})]}),b&&(0,k.jsxs)("div",{className:me.toast,"data-impakers-debug":"",children:[(0,k.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#16a34a",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,k.jsx)("polyline",{points:"20 6 9 17 4 12"})}),(0,k.jsx)("span",{children:"\uD0DC\uC2A4\uD06C \uC0DD\uC131\uC774 \uC644\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4"})]}),E&&(0,k.jsxs)("div",{className:`${me.toast} ${me.toastError}`,"data-impakers-debug":"",children:[(0,k.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#ef4444",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,k.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,k.jsx)("line",{x1:"15",y1:"9",x2:"9",y2:"15"}),(0,k.jsx)("line",{x1:"9",y1:"9",x2:"15",y2:"15"})]}),(0,k.jsx)("span",{children:E})]})]}),document.body)}var mn=require("react"),Mo=require("react-dom");var Se=require("react/jsx-runtime");function Ao({endpoint:e,onSuccess:n,onClose:o}){let[t,s]=(0,mn.useState)(""),[r,i]=(0,mn.useState)(!1),[a,m]=(0,mn.useState)(null),w=(0,mn.useCallback)(async C=>{if(C.preventDefault(),!(!t.trim()||r)){i(!0),m(null);try{let L=await Mt(e,t.trim().toUpperCase());n(L.serviceName)}catch(L){m(L instanceof Error?L.message:"\uC778\uC99D \uC2E4\uD328")}finally{i(!1)}}},[t,e,r,n]);return typeof document>"u"?null:(0,Mo.createPortal)((0,Se.jsxs)("div",{"data-impakers-debug":"",style:{position:"fixed",inset:0,zIndex:2147483647,display:"flex",alignItems:"center",justifyContent:"center",fontFamily:"-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif"},children:[(0,Se.jsx)("div",{onClick:o,style:{position:"absolute",inset:0,background:"rgba(0, 0, 0, 0.4)"}}),(0,Se.jsxs)("div",{style:{position:"relative",width:360,background:"white",borderRadius:12,boxShadow:"0 16px 48px rgba(0,0,0,0.16)",overflow:"hidden"},children:[(0,Se.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px 20px",borderBottom:"1px solid #e5e5e5"},children:[(0,Se.jsx)("h3",{style:{fontSize:15,fontWeight:600,color:"#18181b",margin:0},children:"\uD53C\uB4DC\uBC31 \uC704\uC82F \uC778\uC99D"}),(0,Se.jsx)("button",{onClick:o,type:"button",style:{width:28,height:28,border:"none",background:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:6,color:"#71717a"},children:(0,Se.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,Se.jsx)("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),(0,Se.jsxs)("div",{style:{padding:20},children:[(0,Se.jsxs)("p",{style:{fontSize:13,color:"#71717a",textAlign:"center",marginBottom:16,lineHeight:1.5},children:["\uC11C\uBE44\uC2A4 \uC2DC\uD06C\uB9BF \uCF54\uB4DC\uB97C \uC785\uB825\uD574\uC8FC\uC138\uC694.",(0,Se.jsx)("br",{}),"\uCF54\uB4DC\uB294 \uC784\uD328\uCEE4\uC2A4 OS\uC5D0\uC11C \uD655\uC778\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."]}),a&&(0,Se.jsx)("div",{style:{background:"#fef2f2",border:"1px solid #fecaca",color:"#dc2626",padding:"8px 12px",borderRadius:8,fontSize:13,marginBottom:12},children:a}),(0,Se.jsxs)("form",{onSubmit:w,children:[(0,Se.jsx)("input",{type:"text",maxLength:6,placeholder:"A3F9K2",value:t,onChange:C=>s(C.target.value.toUpperCase()),autoFocus:!0,autoComplete:"off",style:{width:"100%",padding:"12px 16px",border:"1px solid #d4d4d8",borderRadius:8,fontSize:24,fontWeight:600,textAlign:"center",letterSpacing:8,textTransform:"uppercase",outline:"none",boxSizing:"border-box",fontFamily:"inherit",color:"#18181b"}}),(0,Se.jsx)("button",{type:"submit",disabled:t.trim().length<6||r,style:{width:"100%",marginTop:16,padding:"10px 16px",border:"none",borderRadius:8,fontSize:14,fontWeight:500,cursor:t.trim().length<6||r?"not-allowed":"pointer",background:t.trim().length<6||r?"#a1a1aa":"#18181b",color:"white",fontFamily:"inherit"},children:r?"\uC778\uC99D \uC911...":"\uC778\uC99D\uD558\uAE30"})]})]})]})]}),document.body)}var tn=require("react/jsx-runtime");function Br({endpoint:e,getUser:n}){let o=e||It,[t,s]=(0,He.useState)(!1),[r,i]=(0,He.useState)(!1),[a,m]=(0,He.useState)(()=>{try{return localStorage.getItem("impakers-debug-hidden")==="1"}catch{return!1}});(0,He.useEffect)(()=>{s(an())},[]),(0,He.useEffect)(()=>{let T=[Ye._on("impakers-debug:show-auth",()=>{i(!0),m(!1);try{localStorage.removeItem("impakers-debug-hidden")}catch{}}),Ye._on("impakers-debug:open",()=>{m(!1);try{localStorage.removeItem("impakers-debug-hidden")}catch{}}),Ye._on("impakers-debug:deactivate",()=>{s(!1),i(!1)})];return()=>T.forEach(I=>I())},[]),(0,He.useEffect)(()=>{function T(I){if((I.ctrlKey||I.metaKey)&&I.shiftKey&&(I.key==="."||I.key===">"||I.code==="Period")){if(I.preventDefault(),a){m(!1);try{localStorage.removeItem("impakers-debug-hidden")}catch{}return}an()?s(!0):i(M=>!M)}}return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[a]);let w=(0,He.useCallback)(T=>{s(!0),i(!1)},[]),C=(0,He.useCallback)(()=>{i(!1)},[]),L=(0,He.useCallback)(()=>{m(!0);try{localStorage.setItem("impakers-debug-hidden","1")}catch{}},[]);return(0,tn.jsxs)(tn.Fragment,{children:[t&&!a&&(0,tn.jsx)(Ro,{endpoint:o,getUser:n,onHide:L}),r&&!t&&(0,tn.jsx)(Ao,{endpoint:o,onSuccess:w,onClose:C})]})}0&&(module.exports={ImpakersDebug,ImpakersDebugProvider});