@impakers/debug 1.5.2 → 1.5.3
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 +16 -16
- package/dist/react.mjs +19 -19
- package/package.json +1 -1
package/dist/react.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";"use client";var Wo=Object.create;var
|
|
2
|
+
"use strict";"use client";var Wo=Object.create;var Dn=Object.defineProperty;var Oo=Object.getOwnPropertyDescriptor;var Vo=Object.getOwnPropertyNames;var Uo=Object.getPrototypeOf,Ko=Object.prototype.hasOwnProperty;var Zo=(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 Vo(n))!Ko.call(e,s)&&s!==o&&Dn(e,s,{get:()=>n[s],enumerable:!(t=Oo(n,s))||t.enumerable});return e};var ot=(e,n,o)=>(o=e!=null?Wo(Uo(e)):{},Tt(n||!e||!e.__esModule?Dn(o,"default",{value:e,enumerable:!0}):o,e)),Xo=e=>Tt(Dn({},"__esModule",{value:!0}),e);var Br={};Zo(Br,{ImpakersDebug:()=>Xe,ImpakersDebugProvider:()=>$r});module.exports=Xo(Br);var He=require("react");var It="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 Et(){if(typeof window>"u")return null;try{let e=localStorage.getItem(jn);return e?JSON.parse(e).serviceName:null}catch{return null}}function Yo(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(It,e.token)}catch{}}function st(){if(!(typeof window>"u"))try{localStorage.removeItem(jn),localStorage.removeItem(It)}catch{}}async function Rt(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 Yo(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"),Io=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
|
-
}`,qo={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 V=qo;var jn=require("react/jsx-runtime");var Mt=({size:e=24})=>(0,jn.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,jn.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 Go=["data-feedback-toolbar","data-annotation-popup","data-annotation-marker"],Ur=Go.flatMap(e=>[`:not([${e}])`,`:not([${e}] *)`]).join("");var st="__agentation_freeze";function Jo(){if(typeof window>"u")return{frozen:!1,installed:!0,origSetTimeout:setTimeout,origSetInterval:setInterval,origRAF:n=>0,pausedAnimations:[],frozenTimeoutQueue:[],frozenRAFQueue:[]};let e=window;return e[st]||(e[st]={frozen:!1,installed:!1,origSetTimeout:null,origSetInterval:null,origRAF:null,pausedAnimations:[],frozenTimeoutQueue:[],frozenRAFQueue:[]}),e[st]}var ve=Jo();typeof window<"u"&&!ve.installed&&(ve.origSetTimeout=window.setTimeout.bind(window),ve.origSetInterval=window.setInterval.bind(window),ve.origRAF=window.requestAnimationFrame.bind(window),window.setTimeout=(e,n,...o)=>typeof e=="string"?ve.origSetTimeout(e,n):ve.origSetTimeout((...t)=>{ve.frozen?ve.frozenTimeoutQueue.push(()=>e(...t)):e(...t)},n,...o),window.setInterval=(e,n,...o)=>typeof e=="string"?ve.origSetInterval(e,n):ve.origSetInterval((...t)=>{ve.frozen||e(...t)},n,...o),window.requestAnimationFrame=e=>ve.origRAF(n=>{ve.frozen?ve.frozenRAFQueue.push(e):e(n)}),ve.installed=!0);var Ee=ve.origSetTimeout,Kr=ve.origSetInterval,Zr=ve.origRAF;var ne=require("react/jsx-runtime");function rt(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 At=(0,oe.forwardRef)(function({element:n,timestamp:o,selectedText:t,placeholder:s="What should change?",initialValue:r="",submitLabel:i="Add",onSubmit:a,onCancel:p,onDelete:C,style:w,accentColor:S="#3c82f7",isExiting:N=!1,lightMode:B=!1,computedStyles:A},j){let[U,fe]=(0,oe.useState)(r),[ge,de]=(0,oe.useState)(!1),[$,P]=(0,oe.useState)("initial"),[Y,b]=(0,oe.useState)(!1),[z,R]=(0,oe.useState)(!1),he=(0,oe.useRef)(null),M=(0,oe.useRef)(null),ee=(0,oe.useRef)(null),re=(0,oe.useRef)(null);(0,oe.useEffect)(()=>{N&&$!=="exit"&&P("exit")},[N,$]),(0,oe.useEffect)(()=>{Ee(()=>{P("enter")},0);let v=Ee(()=>{P("entered")},200),f=Ee(()=>{let L=he.current;L&&(rt(L),L.selectionStart=L.selectionEnd=L.value.length,L.scrollTop=L.scrollHeight)},50);return()=>{clearTimeout(v),clearTimeout(f),ee.current&&clearTimeout(ee.current),re.current&&clearTimeout(re.current)}},[]);let Te=(0,oe.useCallback)(()=>{re.current&&clearTimeout(re.current),de(!0),re.current=Ee(()=>{de(!1),rt(he.current)},250)},[]);(0,oe.useImperativeHandle)(j,()=>({shake:Te}),[Te]);let Fe=(0,oe.useCallback)(()=>{P("exit"),ee.current=Ee(()=>{p()},150)},[p]),Ie=(0,oe.useCallback)(()=>{U.trim()&&a(U.trim())},[U,a]),ie=(0,oe.useCallback)(v=>{v.stopPropagation(),!v.nativeEvent.isComposing&&(v.key==="Enter"&&(v.metaKey||v.ctrlKey)&&(v.preventDefault(),Ie()),v.key==="Escape"&&Fe())},[Ie,Fe]),k=[V.popup,B?V.light:"",$==="enter"?V.enter:"",$==="entered"?V.entered:"",$==="exit"?V.exit:"",ge?V.shake:""].filter(Boolean).join(" ");return(0,ne.jsxs)("div",{ref:M,className:k,"data-annotation-popup":!0,style:w,onClick:v=>v.stopPropagation(),children:[(0,ne.jsxs)("div",{className:V.header,children:[A&&Object.keys(A).length>0?(0,ne.jsxs)("button",{className:V.headerToggle,onClick:()=>{let v=z;R(!z),v&&Ee(()=>rt(he.current),0)},type:"button",children:[(0,ne.jsx)("svg",{className:`${V.chevron} ${z?V.expanded:""}`,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,ne.jsx)("path",{d:"M5.5 10.25L9 7.25L5.75 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),(0,ne.jsx)("span",{className:V.element,children:n})]}):(0,ne.jsx)("span",{className:V.element,children:n}),o&&(0,ne.jsx)("span",{className:V.timestamp,children:o})]}),A&&Object.keys(A).length>0&&(0,ne.jsx)("div",{className:`${V.stylesWrapper} ${z?V.expanded:""}`,children:(0,ne.jsx)("div",{className:V.stylesInner,children:(0,ne.jsx)("div",{className:V.stylesBlock,children:Object.entries(A).map(([v,f])=>(0,ne.jsxs)("div",{className:V.styleLine,children:[(0,ne.jsx)("span",{className:V.styleProperty,children:v.replace(/([A-Z])/g,"-$1").toLowerCase()}),": ",(0,ne.jsx)("span",{className:V.styleValue,children:f}),";"]},v))})})}),t&&(0,ne.jsxs)("div",{className:V.quote,children:["\u201C",t.slice(0,80),t.length>80?"...":"","\u201D"]}),(0,ne.jsx)("textarea",{ref:he,className:V.textarea,style:{borderColor:Y?S:void 0},placeholder:s,value:U,onChange:v=>{fe(v.target.value);let f=v.target;f.style.height="auto",f.style.height=`${Math.min(f.scrollHeight,200)}px`},onFocus:()=>b(!0),onBlur:()=>b(!1),rows:4,onKeyDown:ie}),(0,ne.jsxs)("div",{className:V.actions,children:[C&&(0,ne.jsx)("div",{className:V.deleteWrapper,children:(0,ne.jsx)("button",{className:V.deleteButton,onClick:C,type:"button",children:(0,ne.jsx)(Mt,{size:22})})}),(0,ne.jsx)("button",{className:V.cancel,onClick:Fe,children:"Cancel"}),(0,ne.jsx)("button",{className:V.submit,style:{backgroundColor:S,opacity:U.trim()?1:.4},onClick:Ie,disabled:!U.trim(),children:i})]}),(0,ne.jsxs)("div",{className:V.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 es(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 p=t.className.split(/\s+/).find(C=>C.length>2&&!C.match(/^[a-z]{1,2}$/)&&!C.match(/[A-Z0-9]{5,}/));p&&(i=`.${p.split("_")[0]}`)}let a=kn(t);!t.parentElement&&a&&(i=`\u27E8shadow\u27E9 ${i}`),o.unshift(i),t=a,s++}return o.join(" > ")}function it(e){let n=es(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 ${it(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 Ft(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 $t=new Set(["none","normal","auto","0px","rgba(0, 0, 0, 0)","transparent","static","visible"]),ns=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"]),ts=new Set(["input","textarea","select"]),os=new Set(["img","video","canvas","svg"]),ss=new Set(["div","section","article","nav","header","footer","aside","main","ul","ol","form","fieldset"]);function Bt(e){if(typeof window>"u")return{};let n=window.getComputedStyle(e),o={},t=e.tagName.toLowerCase(),s;ns.has(t)?s=["color","fontSize","fontWeight","fontFamily","lineHeight"]:t==="button"||t==="a"&&e.getAttribute("role")==="button"?s=["backgroundColor","color","padding","borderRadius","fontSize"]:ts.has(t)?s=["backgroundColor","color","padding","borderRadius","fontSize"]:os.has(t)?s=["width","height","objectFit","borderRadius"]:ss.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&&!$t.has(a)&&(o[r]=a)}return o}var rs=["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 Ht(e){if(typeof window>"u")return"";let n=window.getComputedStyle(e),o=[];for(let t of rs){let s=t.replace(/([A-Z])/g,"-$1").toLowerCase(),r=n.getPropertyValue(s);r&&!$t.has(r)&&o.push(`${s}: ${r}`)}return o.join("; ")}function zt(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 Dt(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 W={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},jt=new Set(["Component","PureComponent","Fragment","Suspense","Profiler","StrictMode","Routes","Route","Outlet","Root","ErrorBoundaryHandler","HotReload","Hot"]),Wt=[/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$/],is=[/Page$/,/View$/,/Screen$/,/Section$/,/Card$/,/List$/,/Item$/,/Form$/,/Modal$/,/Dialog$/,/Button$/,/Nav$/,/Header$/,/Footer$/,/Layout$/,/Panel$/,/Tab$/,/Menu$/];function as(e){let n=e?.mode??"filtered",o=jt;if(e?.skipExact){let t=e.skipExact instanceof Set?e.skipExact:new Set(e.skipExact);o=new Set([...jt,...t])}return{maxComponents:e?.maxComponents??6,maxDepth:e?.maxDepth??30,mode:n,skipExact:o,skipPatterns:e?.skipPatterns?[...Wt,...e.skipPatterns]:Wt,userPatterns:e?.userPatterns??is,filter:e?.filter}}function ls(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([A-Z])([A-Z][a-z])/g,"$1-$2").toLowerCase()}function ds(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 cs(e,n){let o=ls(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 us(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&&cs(e,t)||o.userPatterns.some(s=>s.test(e)));default:return!0}}var an=null,_s=new WeakMap;function at(e){return Object.keys(e).some(n=>n.startsWith("__reactFiber$")||n.startsWith("__reactInternalInstance$")||n.startsWith("__reactProps$"))}function ms(){if(an!==null)return an;if(typeof document>"u")return!1;if(document.body&&at(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&&at(o))return an=!0,!0}if(document.body){for(let n of document.body.children)if(at(n))return an=!0,!0}return an=!1,!1}var vn={map:_s};function ps(e){return Object.keys(e).find(o=>o.startsWith("__reactFiber$")||o.startsWith("__reactInternalInstance$"))||null}function fs(e){let n=ps(e);return n?e[n]:null}function en(e){return e?e.displayName?e.displayName:e.name?e.name:null:null}function gs(e){let{tag:n,type:o,elementType:t}=e;if(n===W.HostComponent||n===W.HostText||n===W.HostHoistable||n===W.HostSingleton||n===W.Fragment||n===W.Mode||n===W.Profiler||n===W.DehydratedFragment||n===W.HostRoot||n===W.HostPortal||n===W.ScopeComponent||n===W.OffscreenComponent||n===W.LegacyHiddenComponent||n===W.CacheComponent||n===W.TracingMarkerComponent||n===W.Throw||n===W.ViewTransitionComponent||n===W.ActivityComponent)return null;if(n===W.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===W.MemoComponent||n===W.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===W.ContextProvider){let s=o;return s?._context?.displayName?`${s._context.displayName}.Provider`:null}if(n===W.ContextConsumer){let s=o;return s?.displayName?`${s.displayName}.Consumer`:null}if(n===W.LazyComponent){let s=t;return s?._status===1&&s._result?en(s._result):null}return n===W.SuspenseComponent||n===W.SuspenseListComponent?null:n===W.IncompleteClassComponent||n===W.IncompleteFunctionComponent||n===W.FunctionComponent||n===W.ClassComponent||n===W.IndeterminateComponent?en(o):null}function hs(e){return e.length<=2||e.length<=3&&e===e.toLowerCase()}function Ot(e,n){let o=as(n),t=o.mode==="all";if(t){let p=vn.map.get(e);if(p!==void 0)return p}if(!ms()){let p={path:null,components:[]};return t&&vn.map.set(e,p),p}let s=o.mode==="smart"?ds(e):void 0,r=[];try{let p=fs(e),C=0;for(;p&&C<o.maxDepth&&r.length<o.maxComponents;){let w=gs(p);w&&!hs(w)&&us(w,C,o,s)&&r.push(w),p=p.return,C++}}catch{let p={path:null,components:[]};return t&&vn.map.set(e,p),p}if(r.length===0){let p={path:null,components:[]};return t&&vn.map.set(e,p),p}let a={path:r.slice().reverse().map(p=>`<${p}>`).join(" "),components:r};return t&&vn.map.set(e,a),a}var Vt=tt(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 ys(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 bs(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 xs(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 Wn=new Map;function ks(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 vs(){let e=Vt.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(C=>C.test(a)))continue;let p=t.exec(a)||s.exec(a);if(p&&(r++,r>=3))return{fileName:p[1],line:parseInt(p[2],10),column:parseInt(p[3],10)}}return null}function ws(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 Ss(e){let n=ks(e);if(!n)return null;if(
|
|
332
|
+
}`,qo={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=qo;var Wn=require("react/jsx-runtime");var Mt=({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 Go=["data-feedback-toolbar","data-annotation-popup","data-annotation-marker"],Ur=Go.flatMap(e=>[`:not([${e}])`,`:not([${e}] *)`]).join("");var rt="__agentation_freeze";function Jo(){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=Jo();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,Kr=ke.origSetInterval,Zr=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 At=(0,ie.forwardRef)(function({element:n,timestamp:o,selectedText:t,placeholder:s="What should change?",initialValue:r="",submitLabel:i="Add",onSubmit:a,onCancel:p,onDelete:C,style:w,accentColor:S="#3c82f7",isExiting:N=!1,lightMode:B=!1,computedStyles:M},j){let[K,fe]=(0,ie.useState)(r),[ge,ce]=(0,ie.useState)(!1),[P,A]=(0,ie.useState)("initial"),[Q,b]=(0,ie.useState)(!1),[D,E]=(0,ie.useState)(!1),he=(0,ie.useRef)(null),R=(0,ie.useRef)(null),te=(0,ie.useRef)(null),le=(0,ie.useRef)(null);(0,ie.useEffect)(()=>{N&&P!=="exit"&&A("exit")},[N,P]),(0,ie.useEffect)(()=>{Ee(()=>{A("enter")},0);let v=Ee(()=>{A("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 Fe=(0,ie.useCallback)(()=>{A("exit"),te.current=Ee(()=>{p()},150)},[p]),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"&&Fe())},[Te,Fe]),x=[U.popup,B?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:R,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;E(!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?S: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)(Mt,{size:22})})}),(0,se.jsx)("button",{className:U.cancel,onClick:Fe,children:"Cancel"}),(0,se.jsx)("button",{className:U.submit,style:{backgroundColor:S,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 es(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 p=t.className.split(/\s+/).find(C=>C.length>2&&!C.match(/^[a-z]{1,2}$/)&&!C.match(/[A-Z0-9]{5,}/));p&&(i=`.${p.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=es(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 Ft(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 $t=new Set(["none","normal","auto","0px","rgba(0, 0, 0, 0)","transparent","static","visible"]),ns=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"]),ts=new Set(["input","textarea","select"]),os=new Set(["img","video","canvas","svg"]),ss=new Set(["div","section","article","nav","header","footer","aside","main","ul","ol","form","fieldset"]);function Bt(e){if(typeof window>"u")return{};let n=window.getComputedStyle(e),o={},t=e.tagName.toLowerCase(),s;ns.has(t)?s=["color","fontSize","fontWeight","fontFamily","lineHeight"]:t==="button"||t==="a"&&e.getAttribute("role")==="button"?s=["backgroundColor","color","padding","borderRadius","fontSize"]:ts.has(t)?s=["backgroundColor","color","padding","borderRadius","fontSize"]:os.has(t)?s=["width","height","objectFit","borderRadius"]:ss.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&&!$t.has(a)&&(o[r]=a)}return o}var rs=["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 Ht(e){if(typeof window>"u")return"";let n=window.getComputedStyle(e),o=[];for(let t of rs){let s=t.replace(/([A-Z])/g,"-$1").toLowerCase(),r=n.getPropertyValue(s);r&&!$t.has(r)&&o.push(`${s}: ${r}`)}return o.join("; ")}function zt(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 Dt(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},jt=new Set(["Component","PureComponent","Fragment","Suspense","Profiler","StrictMode","Routes","Route","Outlet","Root","ErrorBoundaryHandler","HotReload","Hot"]),Wt=[/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$/],is=[/Page$/,/View$/,/Screen$/,/Section$/,/Card$/,/List$/,/Item$/,/Form$/,/Modal$/,/Dialog$/,/Button$/,/Nav$/,/Header$/,/Footer$/,/Layout$/,/Panel$/,/Tab$/,/Menu$/];function as(e){let n=e?.mode??"filtered",o=jt;if(e?.skipExact){let t=e.skipExact instanceof Set?e.skipExact:new Set(e.skipExact);o=new Set([...jt,...t])}return{maxComponents:e?.maxComponents??6,maxDepth:e?.maxDepth??30,mode:n,skipExact:o,skipPatterns:e?.skipPatterns?[...Wt,...e.skipPatterns]:Wt,userPatterns:e?.userPatterns??is,filter:e?.filter}}function ls(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([A-Z])([A-Z][a-z])/g,"$1-$2").toLowerCase()}function ds(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 cs(e,n){let o=ls(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 us(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&&cs(e,t)||o.userPatterns.some(s=>s.test(e)));default:return!0}}var an=null,_s=new WeakMap;function lt(e){return Object.keys(e).some(n=>n.startsWith("__reactFiber$")||n.startsWith("__reactInternalInstance$")||n.startsWith("__reactProps$"))}function ms(){if(an!==null)return an;if(typeof document>"u")return!1;if(document.body&<(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&<(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:_s};function ps(e){return Object.keys(e).find(o=>o.startsWith("__reactFiber$")||o.startsWith("__reactInternalInstance$"))||null}function fs(e){let n=ps(e);return n?e[n]:null}function en(e){return e?e.displayName?e.displayName:e.name?e.name:null:null}function gs(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 hs(e){return e.length<=2||e.length<=3&&e===e.toLowerCase()}function Ot(e,n){let o=as(n),t=o.mode==="all";if(t){let p=vn.map.get(e);if(p!==void 0)return p}if(!ms()){let p={path:null,components:[]};return t&&vn.map.set(e,p),p}let s=o.mode==="smart"?ds(e):void 0,r=[];try{let p=fs(e),C=0;for(;p&&C<o.maxDepth&&r.length<o.maxComponents;){let w=gs(p);w&&!hs(w)&&us(w,C,o,s)&&r.push(w),p=p.return,C++}}catch{let p={path:null,components:[]};return t&&vn.map.set(e,p),p}if(r.length===0){let p={path:null,components:[]};return t&&vn.map.set(e,p),p}let a={path:r.slice().reverse().map(p=>`<${p}>`).join(" "),components:r};return t&&vn.map.set(e,a),a}var Vt=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 ys(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 bs(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 xs(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 ks(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 vs(){let e=Vt.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(C=>C.test(a)))continue;let p=t.exec(a)||s.exec(a);if(p&&(r++,r>=3))return{fileName:p[1],line:parseInt(p[2],10),column:parseInt(p[3],10)}}return null}function ws(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 Ss(e){let n=ks(e);if(!n)return null;if(On.has(n))return On.get(n);let o=vs();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:ws(a.fileName),lineNumber:a.line,columnNumber:a.column,componentName:wn(e)||void 0})}}}finally{o.set(t)}return On.set(n,s),s}function Ns(e,n=15){let o=[],t=new Set,s=e,r=0;for(;s&&r<n;){let i=Ss(s);i&&!t.has(i.fileName)&&(t.add(i.fileName),o.push(i)),s=s.return,r++}return o}function Sn(e){let n=ys(e);if(!n)return{found:!1,reason:"no-fiber",isReactApp:!1,isProduction:!1};let o=bs(n);if(o||(o=xs(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=Ns(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 Ut(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(p=>p.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=[],Kt=!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 Ls(){if(Kt||typeof window>"u")return;Kt=!0;let e=console.error,n=console.warn,o=console.log;console.error=(...t)=>{let s=dt(t);Me.push(s.slice(0,500)),Me.length>20&&Me.shift(),Nn("error",s),e.apply(console,t)},console.warn=(...t)=>{let s=dt(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",dt(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)})}Ls();function Ts(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 Is=[/session/i,/csrf/i,/xsrf/i,/secret/i,/password/i,/key/i];function Es(){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=Is.some(i=>i.test(s));e[s]=r?"[masked]":decodeURIComponent(t.join("=")).slice(0,200)})}catch{}return e}function Zt(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 Rs(){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=Zt(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=Zt(s);if(r&&r.sub){let i={},a=["sub","email","name","role","roles","org","iat","exp"];for(let p of a)p in r&&(i[p]=r[p]);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 Ms(){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 Xt(e){let n={url:window.location.href,timestamp:new Date().toISOString(),browser:Ts(navigator.userAgent),userAgent:navigator.userAgent,viewport:`${window.innerWidth}x${window.innerHeight}`,pixelRatio:window.devicePixelRatio,language:navigator.language,referrer:document.referrer,cookies:Es(),jwtClaims:Rs()??void 0,consoleErrors:Me.length>0?[...Me]:void 0,consoleLogs:Ln.length>0?[...Ln]:void 0,performance:Ms()};if(e)try{let o=e();o&&(n.user={...o,id:String(o.id),name:String(o.name||"")})}catch{}return n}var As="/_next/static/chunks/impakers-debug-route-manifest.json",Un=null,Kn=!1;function Yt(e){return!e||e==="/"?"/":e.endsWith("/")?e.slice(0,-1)||"/":e}function Ps(e){let n=Yt(e);return n==="/"?[]:n.slice(1).split("/").map(o=>decodeURIComponent(o)).filter(Boolean)}function Fs(e){return/^\[[^\]]+\]$/.test(e)}function $s(e){return/^\[\.\.\.[^\]]+\]$/.test(e)}function Bs(e){return/^\[\[\.\.\.[^\]]+\]\]$/.test(e)}function Hs(e,n){let o=0,t=0,s=0;for(;o<e.length;){let r=e[o];if(Bs(r)){s+=1,t=n.length,o+=1;break}if($s(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(Fs(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 zs(){return Kn?null:Un||(Un=(async()=>{try{let e=await fetch(As,{cache:"force-cache"});if(!e.ok)return Kn=!0,null;let n=await e.json();return!n||typeof n!="object"||!Array.isArray(n.entries)?(Kn=!0,null):n}catch{return Kn=!0,null}})(),Un)}function Ds(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 zs();if(!o)return null;let t=Ps(n),s=null,r=-1;for(let i of o.entries){let a=Hs(i.segments,t);a!==null&&a>r&&(r=a,s=i)}return s?{targets:Ds(s),context:{pathname:Yt(n),matchedRoute:s.route,source:"next-route-manifest"}}:null}function qt(...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 Gt(){let e=Ge();if(!e)throw new Error("\uC778\uC99D\uC774 \uD544\uC694\uD569\uB2C8\uB2E4");return e}async function Ve(e,n={}){let o=Gt(),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 Zn=new Map,ct=new Map,Tn=new Map,js=3e4;function Ze(e){return`feedbacks:${e}`}function dn(){return"feedbacks:__all__"}function Ye(e){return`comments:${e}`}function We(e,n){Zn.set(e,{data:n,timestamp:Date.now()});let o=Tn.get(e);o&&o.forEach(t=>t(n))}function Xe(e){return Zn.get(e)?.data??null}function Ws(e){let n=Zn.get(e);return n?Date.now()-n.timestamp<=js:!1}function _t(e){return Array.from(Zn.keys()).filter(n=>n.includes(e))}function Os(e){let n=new Map;for(let o of _t(e)){let t=Xe(o);t!==null&&n.set(o,t)}return n}function Vs(e){e.forEach((n,o)=>We(o,n))}function ut(e,n){let o=n(Xe(e));return We(e,o),o}function Us(e,n){for(let o of _t(e)){let t=Xe(o);t!==null&&We(o,n(t))}}async function In(e,n){let o=ct.get(e);if(o)return o;let t=(async()=>{try{let s=await n();return We(e,s),s}finally{ct.delete(e)}})();return ct.set(e,t),t}async function mt(e,n,o={}){let t=Xe(e);return t!==null&&!o.force?((o.staleWhileRevalidate||!Ws(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 Xe(e)}async function Jt(e,n){let o=`temp-task-${Date.now()}`,t=n.feedbackUrl,s=n.feedbackMarker,r=t?Xe(Ze(t))||[]:null,i=Xe(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&&(We(Ze(t),[a,...r]),i&&We(dn(),[a,...i]));try{let C=await(await Ve(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};ut(Ze(t),S=>(S||[]).map(N=>N.id===o?w:N)),i&&ut(dn(),S=>(S||[]).map(N=>N.id===o?w:N)),to(e,t).catch(()=>{}),i&&oo(e).catch(()=>{})}return C}catch(p){throw t&&r&&We(Ze(t),r),i&&We(dn(),i),p}}async function eo(e,n,o={}){let t=Ze(n);return mt(t,async()=>(await(await Ve(`${e}?url=${encodeURIComponent(n)}`)).json()).tasks||[],o)}async function no(e,n={}){let o=dn();return mt(o,async()=>(await(await Ve(`${e}?url=__all__`)).json()).tasks||[],n)}async function to(e,n){let o=Ze(n);return In(o,async()=>(await(await Ve(`${e}?url=${encodeURIComponent(n)}`)).json()).tasks||[])}async function oo(e){let n=dn();return In(n,async()=>(await(await Ve(`${e}?url=__all__`)).json()).tasks||[])}async function Xn(e,n,o={}){let t=Ye(n);return mt(t,async()=>(await(await Ve(`${e}/${n}/comments`)).json()).comments||[],o)}async function Ks(e,n){let o=Ye(n);return In(o,async()=>(await(await Ve(`${e}/${n}/comments`)).json()).comments||[])}function Zs(e,n){Us("feedbacks:",o=>o.map(t=>t.id===e?{...t,commentCount:Math.max(0,(t.commentCount||0)+n)}:t))}function Xs(e){_t("feedbacks:").forEach(o=>{let t=o.replace("feedbacks:","");t==="__all__"?oo(e).catch(()=>{}):to(e,t).catch(()=>{})})}async function Yn(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()},p=Ye(n),C=Xe(p)||[],w=Os("feedbacks:");We(p,[...C,a]),Zs(n,1);try{let B=(await(await Ve(`${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 ut(p,A=>(A||[]).map(j=>j.id===a.id?B:j)),Ks(e,n),Xs(e),B}catch(S){throw We(p,C),Vs(w),S}}var Ys=4.5*1024*1024;async function Qn(e,n,o,t){if(n.size>Ys)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=Gt(),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 qn(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 Ve(s)).json()).events||[]}var Mn=require("@jridgewell/trace-mapping"),Rn=new Map,so=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 qs(e){if(Rn.has(e))return Rn.get(e)??null;if(so.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 so.add(e),Rn.set(e,null),null}async function Gs(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 qs(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 pt(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:Gs(o,r,i)}var Js=`@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 Nn(e,n){Ln.push({level:e,message:n.slice(0,500),timestamp:Date.now()}),Ln.length>50&&Ln.shift()}function Ls(){if(Kt||typeof window>"u")return;Kt=!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)})}Ls();function Ts(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 Is=[/session/i,/csrf/i,/xsrf/i,/secret/i,/password/i,/key/i];function Es(){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=Is.some(i=>i.test(s));e[s]=r?"[masked]":decodeURIComponent(t.join("=")).slice(0,200)})}catch{}return e}function Zt(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 Rs(){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=Zt(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=Zt(s);if(r&&r.sub){let i={},a=["sub","email","name","role","roles","org","iat","exp"];for(let p of a)p in r&&(i[p]=r[p]);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 Ms(){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 Xt(e){let n={url:window.location.href,timestamp:new Date().toISOString(),browser:Ts(navigator.userAgent),userAgent:navigator.userAgent,viewport:`${window.innerWidth}x${window.innerHeight}`,pixelRatio:window.devicePixelRatio,language:navigator.language,referrer:document.referrer,cookies:Es(),jwtClaims:Rs()??void 0,consoleErrors:Me.length>0?[...Me]:void 0,consoleLogs:Ln.length>0?[...Ln]:void 0,performance:Ms()};if(e)try{let o=e();o&&(n.user={...o,id:String(o.id),name:String(o.name||"")})}catch{}return n}var As="/_next/static/chunks/impakers-debug-route-manifest.json",Kn=null,Zn=!1;function Yt(e){return!e||e==="/"?"/":e.endsWith("/")?e.slice(0,-1)||"/":e}function Ps(e){let n=Yt(e);return n==="/"?[]:n.slice(1).split("/").map(o=>decodeURIComponent(o)).filter(Boolean)}function Fs(e){return/^\[[^\]]+\]$/.test(e)}function $s(e){return/^\[\.\.\.[^\]]+\]$/.test(e)}function Bs(e){return/^\[\[\.\.\.[^\]]+\]\]$/.test(e)}function Hs(e,n){let o=0,t=0,s=0;for(;o<e.length;){let r=e[o];if(Bs(r)){s+=1,t=n.length,o+=1;break}if($s(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(Fs(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 zs(){return Zn?null:Kn||(Kn=(async()=>{try{let e=await fetch(As,{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 Ds(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 zs();if(!o)return null;let t=Ps(n),s=null,r=-1;for(let i of o.entries){let a=Hs(i.segments,t);a!==null&&a>r&&(r=a,s=i)}return s?{targets:Ds(s),context:{pathname:Yt(n),matchedRoute:s.route,source:"next-route-manifest"}}:null}function qt(...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 Gt(){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=Gt(),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,js=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 Ws(e){let n=Xn.get(e);return n?Date.now()-n.timestamp<=js:!1}function mt(e){return Array.from(Xn.keys()).filter(n=>n.includes(e))}function Os(e){let n=new Map;for(let o of mt(e)){let t=Qe(o);t!==null&&n.set(o,t)}return n}function Vs(e){e.forEach((n,o)=>Oe(o,n))}function _t(e,n){let o=n(Qe(e));return Oe(e,o),o}function Us(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||!Ws(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 Jt(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),S=>(S||[]).map(N=>N.id===o?w:N)),i&&_t(dn(),S=>(S||[]).map(N=>N.id===o?w:N)),to(e,t).catch(()=>{}),i&&oo(e).catch(()=>{})}return C}catch(p){throw t&&r&&Oe(Ye(t),r),i&&Oe(dn(),i),p}}async function eo(e,n,o={}){let t=Ye(n);return pt(t,async()=>(await(await Ue(`${e}?url=${encodeURIComponent(n)}`)).json()).tasks||[],o)}async function no(e,n={}){let o=dn();return pt(o,async()=>(await(await Ue(`${e}?url=__all__`)).json()).tasks||[],n)}async function to(e,n){let o=Ye(n);return In(o,async()=>(await(await Ue(`${e}?url=${encodeURIComponent(n)}`)).json()).tasks||[])}async function oo(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 Ks(e,n){let o=qe(n);return In(o,async()=>(await(await Ue(`${e}/${n}/comments`)).json()).comments||[])}function Zs(e,n){Us("feedbacks:",o=>o.map(t=>t.id===e?{...t,commentCount:Math.max(0,(t.commentCount||0)+n)}:t))}function Xs(e){mt("feedbacks:").forEach(o=>{let t=o.replace("feedbacks:","");t==="__all__"?oo(e).catch(()=>{}):to(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()},p=qe(n),C=Qe(p)||[],w=Os("feedbacks:");Oe(p,[...C,a]),Zs(n,1);try{let B=(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(p,M=>(M||[]).map(j=>j.id===a.id?B:j)),Ks(e,n),Xs(e),B}catch(S){throw Oe(p,C),Vs(w),S}}var Ys=4.5*1024*1024;async function qn(e,n,o,t){if(n.size>Ys)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=Gt(),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,so=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 qs(e){if(Rn.has(e))return Rn.get(e)??null;if(so.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 so.add(e),Rn.set(e,null),null}async function Gs(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 qs(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:Gs(o,r,i)}var Js=`@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
|
-
}`,er={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=Js}var
|
|
443
|
+
}`,er={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=Js}var De=er;var je=require("react/jsx-runtime"),nr="#3b82f6",tr="#9ca3af";function gt({annotation:e,layerIndex:n,isAnimated:o,isHovered:t,accentColor:s,onHover:r,onHoverEnd:i,onClick:a}){let p=o?"":De.enter,C=e.status==="done"||e.status==="resolved",w=e.status==="in_progress",S=C?tr:w?nr:s;return(0,je.jsxs)("div",{className:`${De.marker} ${p} ${t?De.hovered:""} ${C?De.done:""}`,"data-annotation-marker":!0,style:{left:`${e.x}%`,top:e.y,backgroundColor:S,animationDelay:`${n*20}ms`},onMouseEnter:r,onMouseLeave:i,onClick:N=>{N.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 ro({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 or=`@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
|
-
}`,sr={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=or}var
|
|
469
|
+
}`,sr={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=or}var Jn=sr;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 rr=`@keyframes styles-module__threadIn___pBTFZ {
|
|
470
470
|
from {
|
|
471
471
|
opacity: 0;
|
|
472
472
|
transform: scale(0.96) translateY(4px);
|
|
@@ -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
|
-
}`,ir={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=rr}var I=ir;var h=require("react/jsx-runtime");function io(e){let n=new Date(e),o=Date.now()-n.getTime(),t=p=>String(p).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 ao(e){return e.slice(0,1).toUpperCase()}function lo(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(0)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function co(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 uo({task:e,currentUserName:n,currentUserId:o,left:t,top:s,bottom:r,loading:i,onClose:a,onReply:p}){let[C,w]=(0,se.useState)(""),[S,N]=(0,se.useState)(!1),[B,A]=(0,se.useState)(null),[j,U]=(0,se.useState)(null),[fe,ge]=(0,se.useState)(!1),de=(0,se.useRef)(null),$=(0,se.useRef)(null),[P,Y]=(0,se.useState)(null),b=(0,se.useRef)(null);(0,se.useEffect)(()=>{$.current&&($.current.scrollTop=$.current.scrollHeight),de.current?.focus()},[e.comments.length]),(0,se.useEffect)(()=>{if(fe)return;let k=v=>{let f=v.target;f.closest(`.${I.thread}`)||f.closest("[data-annotation-marker]")||f.closest("[data-impakers-debug]")||z()};return document.addEventListener("mousedown",k),()=>document.removeEventListener("mousedown",k)},[fe]);let z=(0,se.useCallback)(()=>{N(!0),setTimeout(()=>a(),120)},[a]),R=(0,se.useCallback)(()=>{!C.trim()&&!B&&!j||(p(e.id,C.trim(),B||void 0,j||void 0),w(""),A(null),U(null))},[C,B,j,e.id,p]),he=(0,se.useCallback)(k=>{k.stopPropagation(),!k.nativeEvent.isComposing&&(k.key==="Enter"&&!k.shiftKey&&(k.preventDefault(),R()),k.key==="Escape"&&z())},[z,R]),M=(0,se.useCallback)(()=>{ge(!0);let k=document.querySelectorAll("[data-impakers-debug], [data-annotation-marker]");k.forEach(F=>F.style.visibility="hidden"),document.documentElement.classList.add("impakers-selecting");let v=null,f=F=>{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=`${F.left}px`,v.style.top=`${F.top}px`,v.style.width=`${F.width}px`,v.style.height=`${F.height}px`},L=()=>{document.removeEventListener("mousemove",D),document.removeEventListener("click",ce,!0),document.removeEventListener("keydown",ae),document.documentElement.classList.remove("impakers-selecting"),v?.remove(),k.forEach(F=>F.style.visibility=""),ge(!1)},D=F=>{let ye=document.elementFromPoint(F.clientX,F.clientY);!ye||ye===v||f(ye.getBoundingClientRect())},ae=F=>{F.key==="Escape"&&L()},ce=async F=>{F.preventDefault(),F.stopPropagation(),F.stopImmediatePropagation();let ye=document.elementFromPoint(F.clientX,F.clientY);if(L(),!!ye){try{let ue=await Vn(ye);A(ue)}catch(ue){console.error("[@impakers/debug] DOM \uC2A4\uD06C\uB9B0\uC0F7 \uC2E4\uD328:",ue)}de.current?.focus()}};document.addEventListener("mousemove",D),document.addEventListener("click",ce,!0),document.addEventListener("keydown",ae)},[]),ee=(0,se.useCallback)(()=>{M()},[M]),re=(0,se.useCallback)(()=>{b.current?.click()},[]),Te=(0,se.useCallback)(k=>{let v=k.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."),k.target.value="";return}if(v.type.startsWith("image/")){U(null);let f=new FileReader;f.onload=()=>{A(f.result)},f.readAsDataURL(v)}else A(null),U(v);k.target.value=""}},[]),Fe=e.title.replace(/^\[피드백\]\s*/,""),ie={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:`${I.thread} ${S?I.exiting:""}`,style:ie,"data-impakers-debug":"",onClick:k=>k.stopPropagation(),children:[(0,h.jsxs)("div",{className:I.header,children:[(0,h.jsx)("div",{className:I.avatar,children:ao(e.authorName||n)}),(0,h.jsxs)("div",{className:I.headerInfo,children:[(0,h.jsxs)("div",{className:I.headerTop,children:[(0,h.jsx)("span",{className:I.authorName,children:e.authorName||n}),(0,h.jsx)("span",{className:I.timestamp,children:io(e.createdAt)})]}),(0,h.jsx)("div",{className:I.title,children:Fe})]}),(0,h.jsx)("div",{className:I.headerActions,children:(0,h.jsx)("button",{className:I.headerAction,onClick:z,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:I.divider}),(0,h.jsx)(Jn,{message:"\uB313\uAE00 \uB85C\uB529 \uC911..."})]}),e.comments.length>0&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("div",{className:I.divider}),(0,h.jsx)("div",{className:I.commentsList,ref:$,children:e.comments.map(k=>(0,h.jsxs)("div",{className:I.comment,children:[(0,h.jsx)("div",{className:I.avatar,style:{width:22,height:22,fontSize:10},children:ao(k.authorName)}),(0,h.jsxs)("div",{className:I.commentContent,children:[(0,h.jsxs)("div",{className:I.commentTop,children:[(0,h.jsx)("span",{className:I.commentAuthor,children:k.authorName}),(0,h.jsx)("span",{className:I.commentTime,children:io(k.createdAt)})]}),k.content&&(0,h.jsx)("div",{className:I.commentText,children:k.content}),k.imageUrl&&k.imageUrl!=="loading..."&&(0,h.jsx)("div",{className:I.screenshot,onClick:()=>Y(k.imageUrl),style:{cursor:"pointer"},children:(0,h.jsx)("img",{src:k.imageUrl,alt:"screenshot"})}),k.fileUrl&&(0,h.jsxs)("a",{className:I.fileCard,href:k.fileUrl,target:"_blank",rel:"noopener noreferrer",onClick:v=>v.stopPropagation(),children:[(0,h.jsx)("span",{className:I.fileIcon,children:co(k.fileType||"")}),(0,h.jsxs)("span",{className:I.fileInfo,children:[(0,h.jsx)("span",{className:I.fileCardName,children:k.fileName||"\uD30C\uC77C"}),k.fileSize!=null&&(0,h.jsx)("span",{className:I.fileCardSize,children:lo(k.fileSize)})]})]})]})]},k.id))})]}),B&&(0,h.jsxs)("div",{className:I.pendingImage,children:[(0,h.jsx)("img",{src:B,alt:"pending"}),(0,h.jsx)("button",{className:I.pendingRemove,onClick:()=>A(null),type:"button",children:"\xD7"})]}),j&&(0,h.jsxs)("div",{className:I.pendingFile,children:[(0,h.jsx)("span",{className:I.fileIcon,children:co(j.type)}),(0,h.jsxs)("span",{className:I.fileInfo,children:[(0,h.jsx)("span",{className:I.fileCardName,children:j.name}),(0,h.jsx)("span",{className:I.fileCardSize,children:lo(j.size)})]}),(0,h.jsx)("button",{className:I.pendingRemove,onClick:()=>U(null),type:"button",children:"\xD7"})]}),(0,h.jsx)("div",{className:I.replyArea,children:(0,h.jsx)("textarea",{ref:de,className:I.replyInput,placeholder:"Reply...",value:C,onChange:k=>{w(k.target.value);let v=k.target;v.style.height="auto",v.style.height=`${Math.min(v.scrollHeight,120)}px`},onKeyDown:he,rows:2})}),(0,h.jsxs)("div",{className:I.replyToolbar,children:[(0,h.jsx)("button",{className:I.replyTool,onClick:re,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:I.replyTool,onClick:ee,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:`${I.replySend} ${C.trim()||B||j?I.active:""}`,onClick:R,disabled:!C.trim()&&!B&&!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:Te}),P&&(0,h.jsxs)("div",{className:I.lightbox,onClick:()=>Y(null),"data-impakers-debug":"",children:[(0,h.jsx)("img",{src:P,alt:"enlarged",onClick:k=>k.stopPropagation()}),(0,h.jsx)("button",{className:I.lightboxClose,onClick:()=>Y(null),type:"button",children:"\xD7"})]})]})}var _e=require("react");var ar=`@keyframes styles-module__fabEnter___DMJoo {
|
|
953
|
+
}`,ir={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=rr}var T=ir;var h=require("react/jsx-runtime");function io(e){let n=new Date(e),o=Date.now()-n.getTime(),t=p=>String(p).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 ao(e){return e.slice(0,1).toUpperCase()}function lo(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(0)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function co(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 uo({task:e,currentUserName:n,currentUserId:o,left:t,top:s,bottom:r,loading:i,onClose:a,onReply:p}){let[C,w]=(0,ae.useState)(""),[S,N]=(0,ae.useState)(!1),[B,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),[A,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(`.${T.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)(()=>{N(!0),setTimeout(()=>a(),120)},[a]),E=(0,ae.useCallback)(()=>{!C.trim()&&!B&&!j||(p(e.id,C.trim(),B||void 0,j||void 0),w(""),M(null),K(null))},[C,B,j,e.id,p]),he=(0,ae.useCallback)(x=>{x.stopPropagation(),!x.nativeEvent.isComposing&&(x.key==="Enter"&&!x.shiftKey&&(x.preventDefault(),E()),x.key==="Escape"&&D())},[D,E]),R=(0,ae.useCallback)(()=>{ge(!0);let x=document.querySelectorAll("[data-impakers-debug], [data-annotation-marker]");x.forEach($=>$.style.visibility="hidden"),document.documentElement.classList.add("impakers-selecting");let v=null,oe=$=>{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=`${$.left}px`,v.style.top=`${$.top}px`,v.style.width=`${$.width}px`,v.style.height=`${$.height}px`},f=()=>{document.removeEventListener("mousemove",F),document.removeEventListener("click",ue,!0),document.removeEventListener("keydown",z),document.documentElement.classList.remove("impakers-selecting"),v?.remove(),x.forEach($=>$.style.visibility=""),ge(!1)},F=$=>{let Z=document.elementFromPoint($.clientX,$.clientY);!Z||Z===v||oe(Z.getBoundingClientRect())},z=$=>{$.key==="Escape"&&f()},ue=async $=>{$.preventDefault(),$.stopPropagation(),$.stopImmediatePropagation();let Z=document.elementFromPoint($.clientX,$.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",F),document.addEventListener("click",ue,!0),document.addEventListener("keydown",z)},[]),te=(0,ae.useCallback)(()=>{R()},[R]),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=""}},[]),Fe=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:`${T.thread} ${S?T.exiting:""}`,style:be,"data-impakers-debug":"",onClick:x=>x.stopPropagation(),children:[(0,h.jsxs)("div",{className:T.header,children:[(0,h.jsx)("div",{className:T.avatar,children:ao(e.authorName||n)}),(0,h.jsxs)("div",{className:T.headerInfo,children:[(0,h.jsxs)("div",{className:T.headerTop,children:[(0,h.jsx)("span",{className:T.authorName,children:e.authorName||n}),(0,h.jsx)("span",{className:T.timestamp,children:io(e.createdAt)})]}),(0,h.jsx)("div",{className:T.title,children:Fe})]}),(0,h.jsx)("div",{className:T.headerActions,children:(0,h.jsx)("button",{className:T.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:T.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:T.divider}),(0,h.jsx)("div",{className:T.commentsList,ref:P,children:e.comments.map(x=>(0,h.jsxs)("div",{className:T.comment,children:[(0,h.jsx)("div",{className:T.avatar,style:{width:22,height:22,fontSize:10},children:ao(x.authorName)}),(0,h.jsxs)("div",{className:T.commentContent,children:[(0,h.jsxs)("div",{className:T.commentTop,children:[(0,h.jsx)("span",{className:T.commentAuthor,children:x.authorName}),(0,h.jsx)("span",{className:T.commentTime,children:io(x.createdAt)})]}),x.content&&(0,h.jsx)("div",{className:T.commentText,children:x.content}),x.imageUrl&&x.imageUrl!=="loading..."&&(0,h.jsx)("div",{className:T.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:T.fileCard,href:x.fileUrl,target:"_blank",rel:"noopener noreferrer",onClick:v=>v.stopPropagation(),children:[(0,h.jsx)("span",{className:T.fileIcon,children:co(x.fileType||"")}),(0,h.jsxs)("span",{className:T.fileInfo,children:[(0,h.jsx)("span",{className:T.fileCardName,children:x.fileName||"\uD30C\uC77C"}),x.fileSize!=null&&(0,h.jsx)("span",{className:T.fileCardSize,children:lo(x.fileSize)})]})]})]})]},x.id))})]}),B&&(0,h.jsxs)("div",{className:T.pendingImage,children:[(0,h.jsx)("img",{src:B,alt:"pending"}),(0,h.jsx)("button",{className:T.pendingRemove,onClick:()=>M(null),type:"button",children:"\xD7"})]}),j&&(0,h.jsxs)("div",{className:T.pendingFile,children:[(0,h.jsx)("span",{className:T.fileIcon,children:co(j.type)}),(0,h.jsxs)("span",{className:T.fileInfo,children:[(0,h.jsx)("span",{className:T.fileCardName,children:j.name}),(0,h.jsx)("span",{className:T.fileCardSize,children:lo(j.size)})]}),(0,h.jsx)("button",{className:T.pendingRemove,onClick:()=>K(null),type:"button",children:"\xD7"})]}),(0,h.jsx)("div",{className:T.replyArea,children:(0,h.jsx)("textarea",{ref:ce,className:T.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:T.replyToolbar,children:[(0,h.jsx)("button",{className:T.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:T.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:`${T.replySend} ${C.trim()||B||j?T.active:""}`,onClick:E,disabled:!C.trim()&&!B&&!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}),A&&(0,h.jsxs)("div",{className:T.lightbox,onClick:()=>Q(null),"data-impakers-debug":"",children:[(0,h.jsx)("img",{src:A,alt:"enlarged",onClick:x=>x.stopPropagation()}),(0,h.jsx)("button",{className:T.lightboxClose,onClick:()=>Q(null),type:"button",children:"\xD7"})]})]})}var _e=require("react");var ar=`@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
|
-
}`,lr={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=ar}var
|
|
1146
|
+
}`,lr={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=ar}var We=lr;var Le=require("react/jsx-runtime");function _o({items:e,onSelect:n,onHide:o,onDoubleTap:t}){let[s,r]=(0,_e.useState)(!1),[i,a]=(0,_e.useState)(!1),[p,C]=(0,_e.useState)({right:24,bottom:24}),[w,S]=(0,_e.useState)(null),N=(0,_e.useRef)(null),B=(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;B.current=!0,K.current=!1;let D=N.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=>{B.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(B.current&&(N.current?.releasePointerCapture(b.pointerId),B.current=!1,!K.current)){let D=Date.now(),E=D-fe.current<350;if(fe.current=D,E&&t){s&&A(),t();return}s?A():r(!0)}},[s,t]),A=(0,_e.useCallback)(()=>{a(!0),setTimeout(()=>{r(!1),a(!1)},150)},[]),Q=(0,_e.useCallback)(b=>{b.preventDefault(),b.stopPropagation(),S({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){S(null);return}s&&A()}};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[s,w,A]),(0,Le.jsxs)(Le.Fragment,{children:[(s||i)&&(0,Le.jsx)("div",{className:We.menuItems,style:{position:"fixed",right:p.right+4/2,bottom:p.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:E=>{E.stopPropagation(),n(b.id),A()},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:N,className:`${We.fab} ${s?We.expanded:""}`,style:{position:"fixed",right:p.right,bottom:p.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:()=>S(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(),S(null),o?.()},type:"button",children:"\uC704\uC82F \uC228\uAE30\uAE30"})})})]})}var q=require("react"),po=require("react-dom");var Ae=require("react");var dr=`.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
|
-
}`,cr={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=dr}var Ce=cr;var
|
|
1315
|
+
}`,cr={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=dr}var Ce=cr;var Y=require("react/jsx-runtime");function ur(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(0)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function _r(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 mo({onSend:e,onEscape:n,placeholder:o="Reply...",autoFocus:t=!1}){let[s,r]=(0,Ae.useState)(""),[i,a]=(0,Ae.useState)(null),[p,C]=(0,Ae.useState)(null),[w,S]=(0,Ae.useState)(!1),N=(0,Ae.useRef)(null),B=(0,Ae.useRef)(null),M=s.trim()||i||p,j=(0,Ae.useCallback)(()=>{M&&(e(s.trim(),i||void 0,p||void 0),r(""),a(null),C(null),N.current&&(N.current.style.height="auto"))},[s,i,p,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)(()=>{S(!0);let P=document.querySelectorAll("[data-impakers-debug], [data-annotation-marker]");P.forEach(R=>R.style.visibility="hidden"),document.documentElement.classList.add("impakers-selecting");let A=null,Q=R=>{A||(A=document.createElement("div"),A.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(A)),A.style.left=`${R.left}px`,A.style.top=`${R.top}px`,A.style.width=`${R.width}px`,A.style.height=`${R.height}px`},b=()=>{document.removeEventListener("mousemove",D),document.removeEventListener("click",he,!0),document.removeEventListener("keydown",E),document.documentElement.classList.remove("impakers-selecting"),A?.remove(),P.forEach(R=>R.style.visibility=""),S(!1)},D=R=>{let te=document.elementFromPoint(R.clientX,R.clientY);!te||te===A||Q(te.getBoundingClientRect())},E=R=>{R.key==="Escape"&&b()},he=async R=>{R.preventDefault(),R.stopPropagation(),R.stopImmediatePropagation();let te=document.elementFromPoint(R.clientX,R.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)}N.current?.focus()}};document.addEventListener("mousemove",D),document.addEventListener("click",he,!0),document.addEventListener("keydown",E)},[]),ge=(0,Ae.useCallback)(()=>{B.current?.click()},[]),ce=(0,Ae.useCallback)(P=>{let A=P.target.files?.[0];if(A){if(A.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(A.type.startsWith("image/")){C(null);let Q=new FileReader;Q.onload=()=>a(Q.result),Q.readAsDataURL(A)}else a(null),C(A);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"})]}),p&&(0,Y.jsxs)("div",{className:Ce.pendingFile,children:[(0,Y.jsx)("span",{className:Ce.fileIcon,children:_r(p.type)}),(0,Y.jsxs)("span",{className:Ce.fileInfo,children:[(0,Y.jsx)("span",{className:Ce.fileCardName,children:p.name}),(0,Y.jsx)("span",{className:Ce.fileCardSize,children:ur(p.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:N,className:Ce.replyInput,placeholder:o,value:s,onChange:P=>{r(P.target.value);let A=P.target;A.style.height="auto",A.style.height=`${Math.min(A.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:B,type:"file",accept:"*/*",style:{display:"none"},onChange:ce})]})}var mr=`@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
|
-
}`,pr={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=mr}var d=pr;var l=require("react/jsx-runtime");function fr({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 gr(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(0)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function fo(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 hr(e){let n=e.match(/\/d\/([^/]+)/);return n?n[1]:null}function yr(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=hr(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 br({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=yr(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:fo(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=p=>String(p).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 gt(e){return e.slice(0,1).toUpperCase()}function go({pageItems:e,allItems:n,currentPath:o,serviceName:t,endpoint:s,currentUserName:r,currentUserId:i,onClose:a,onHistoryViewed:p,newNotiCount:C}){let[w,S]=(0,Q.useState)("page"),[N,B]=(0,Q.useState)("todo"),[A,j]=(0,Q.useState)(""),[U,fe]=(0,Q.useState)(!1),ge=(0,Q.useRef)(null),[de,$]=(0,Q.useState)([]),[P,Y]=(0,Q.useState)(!1),[b,z]=(0,Q.useState)(!1),[R,he]=(0,Q.useState)(null),[M,ee]=(0,Q.useState)([]),[re,Te]=(0,Q.useState)(!1),[Fe,Ie]=(0,Q.useState)(null),[ie,k]=(0,Q.useState)(null),v=(0,Q.useRef)(null),f=(0,Q.useCallback)(()=>{if(R){he(null),ee([]);return}z(!0),setTimeout(()=>a(),150)},[a,R]),L=(0,Q.useCallback)(async m=>{he(m);let K=cn(Ye(m.id));ee(K||[]),Te(!K)},[s]);(0,Q.useEffect)(()=>{if(!R)return;let m=Ye(R.id),K=cn(m);K&&(ee(K),Te(!1));let $e=En(m,be=>{ee(be),Te(!1)});return Xn(s,R.id,{staleWhileRevalidate:!0}).then(be=>{ee(be),Te(!1)}).catch(()=>{Te(!1)}),$e},[R,s]),(0,Q.useEffect)(()=>{v.current?.scrollIntoView({behavior:"smooth"})},[M.length]),(0,Q.useEffect)(()=>{if(!U)return;let m=K=>{ge.current&&!ge.current.contains(K.target)&&fe(!1)};return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[U]);let D=(0,Q.useCallback)(async(m,K,$e)=>{if(R)try{let be;if($e)try{be=await Qn(s,$e,"comment",R.id)}catch(Qe){console.error("[@impakers/debug] \uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328:",Qe)}await Yn(s,R.id,m,r,i,K,be)}catch(be){console.error("[@impakers/debug] \uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328:",be)}},[R,s,r,i]),ae=w==="page"?e:w==="all"?n:[],ce=ae.filter(m=>m.status===N),F=ae.filter(m=>m.status==="todo").length,ye=ae.filter(m=>m.status==="in_progress").length,ue=ae.filter(m=>m.status==="done").length;return(0,Q.useEffect)(()=>{w==="history"&&(Y(!0),qn(s,{date:A||void 0,limit:200}).then($).catch(()=>$([])).finally(()=>Y(!1)))},[w,A,s]),typeof document>"u"?null:(0,po.createPortal)((0,l.jsxs)("div",{"data-impakers-debug":"",children:[(0,l.jsx)("div",{className:d.backdrop,onClick:f}),(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:f,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:()=>{z(!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:gt(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:[re&&(0,l.jsx)(Jn,{message:"\uB313\uAE00 \uB85C\uB529 \uC911..."}),!re&&M.length===0&&(0,l.jsx)("div",{className:d.noComments,children:"\uC544\uC9C1 \uB313\uAE00\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"}),M.map(m=>(0,l.jsxs)("div",{className:d.commentItem,children:[(0,l.jsx)("div",{className:d.commentAvatar,style:{width:22,height:22,fontSize:10},children:gt(m.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:m.authorName}),(0,l.jsx)("span",{className:d.commentTime,children:un(m.createdAt)})]}),m.content&&(0,l.jsx)("div",{className:d.commentContent,children:m.content}),m.imageUrl&&(0,l.jsx)("div",{className:d.commentImage,onClick:K=>{K.stopPropagation(),Ie(m.imageUrl)},children:(0,l.jsx)("img",{src:m.imageUrl,alt:"attachment"})}),m.fileUrl&&(0,l.jsxs)("div",{className:d.commentFileCard,onClick:K=>{K.stopPropagation(),k({url:m.fileUrl,name:m.fileName||"\uD30C\uC77C",type:m.fileType||"",source:m.fileSource})},children:[(0,l.jsx)("span",{className:d.commentFileIcon,children:fo(m.fileType||"")}),(0,l.jsxs)("span",{className:d.commentFileInfo,children:[(0,l.jsx)("span",{className:d.commentFileName,children:m.fileName||"\uD30C\uC77C"}),m.fileSize!=null&&(0,l.jsx)("span",{className:d.commentFileSize,children:gr(m.fileSize)})]})]})]})]},m.id)),(0,l.jsx)("div",{ref:v})]}),(0,l.jsx)(mo,{onSend:D,onEscape:f,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:()=>S("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:()=>S("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:()=>{S("history"),p?.()},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} ${A?d.active:""}`,onClick:()=>fe(m=>!m),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"})]}),A?`${new Date(A).getMonth()+1}/${new Date(A).getDate()}`:"\uB0A0\uC9DC"]}),U&&(0,l.jsx)("div",{className:d.datePopover,children:(0,l.jsx)("input",{type:"date",value:A,onChange:m=>{j(m.target.value),fe(!1)},className:d.dateInput,autoFocus:!0})})]}),A&&(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:P?(0,l.jsx)("div",{className:d.empty,children:"\uB85C\uB529 \uC911..."}):de.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"]}):de.map((m,K)=>(0,l.jsxs)("div",{className:d.historyItem,children:[(0,l.jsx)("div",{className:`${d.historyDot} ${d[`historyDot_${m.action}`]}`}),(0,l.jsxs)("div",{className:d.historyBody,children:[m.action==="status_changed"&&(0,l.jsxs)("div",{className:d.historyStatusChange,children:[(0,l.jsx)("span",{className:`${d.historyStatusBadge} ${d[`status_${m.fromStatus}`]}`,children:m.fromStatus==="todo"?"\uB300\uAE30":m.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_${m.toStatus}`]}`,children:m.toStatus==="todo"?"\uB300\uAE30":m.toStatus==="in_progress"?"\uC9C4\uD589\uC911":"\uC644\uB8CC"})]}),m.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"})]}),m.action==="comment_added"&&(0,l.jsxs)("div",{className:d.historyComment,children:[(0,l.jsx)("span",{className:d.historyCommentAuthor,children:m.actorName||"\uC775\uBA85"}),m.metadata?.content&&(0,l.jsx)("span",{className:d.historyCommentContent,children:String(m.metadata.content).slice(0,100)})]}),(0,l.jsxs)("div",{className:d.historyFooter,children:[(0,l.jsx)("span",{className:d.historyTime,children:un(m.createdAt)}),(0,l.jsx)("span",{className:d.historyRef,children:(m.taskTitle||"").replace(/^\[피드백\]\s*/,"")})]})]})]},`${m.id}-${m.action}-${K}`))})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:d.statusFilter,children:[(0,l.jsxs)("button",{className:`${d.filterChip} ${N==="todo"?d.active:""}`,onClick:()=>B("todo"),type:"button",children:["\uC9C4\uD589\uC804",F>0&&(0,l.jsx)("span",{className:d.filterCount,children:F})]}),(0,l.jsxs)("button",{className:`${d.filterChip} ${N==="in_progress"?d.active:""}`,onClick:()=>B("in_progress"),type:"button",children:["\uC9C4\uD589\uC911",ye>0&&(0,l.jsx)("span",{className:d.filterCount,children:ye})]}),(0,l.jsxs)("button",{className:`${d.filterChip} ${N==="done"?d.active:""}`,onClick:()=>B("done"),type:"button",children:["\uC644\uB8CC",ue>0&&(0,l.jsx)("span",{className:d.filterCount,children:ue})]})]}),(0,l.jsx)("div",{className:d.content,children:ce.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"]}):ce.map(m=>(0,l.jsxs)("div",{className:`${d.card} ${m.status==="done"?d.cardDone:""}`,onClick:()=>L(m),children:[(0,l.jsxs)("div",{className:d.cardHeader,children:[(0,l.jsx)("div",{className:d.cardAvatar,children:gt(m.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:m.authorName}),(0,l.jsx)("span",{className:d.cardTime,children:un(m.createdAt)})]})})]}),(0,l.jsx)("div",{className:d.cardTitle,children:m.title.replace(/^\[피드백\]\s*/,"")}),m.screenshot&&(0,l.jsx)("div",{className:d.cardScreenshot,children:(0,l.jsx)("img",{src:m.screenshot,alt:"screenshot"})}),w==="all"&&m.feedbackUrl&&(0,l.jsxs)("div",{className:d.cardRoute,onClick:K=>{K.stopPropagation(),window.location.href=m.feedbackUrl},title:"\uD398\uC774\uC9C0\uB85C \uC774\uB3D9",children:[(0,l.jsx)("span",{className:d.cardRoutePath,children:m.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"})]})]}),(m.startedAt||m.completedAt)&&(0,l.jsxs)("div",{className:d.cardStatusTime,children:[m.startedAt&&m.status!=="todo"&&(0,l.jsxs)("span",{children:["\uC9C4\uD589 \uC2DC\uC791: ",un(m.startedAt)]}),m.completedAt&&m.status==="done"&&(0,l.jsxs)("span",{children:["\uC644\uB8CC: ",un(m.completedAt)]})]}),(0,l.jsxs)("div",{className:d.cardFooter,children:[(0,l.jsx)("span",{className:d.cardReplyDot}),(0,l.jsxs)("span",{className:d.cardReplyCount,children:[m.commentCount," ",m.commentCount===1?"Reply":"Replies"]})]})]},m.id))})]})]})]}),Fe&&(0,l.jsx)(fr,{src:Fe,onClose:()=>Ie(null)}),ie&&(0,l.jsx)(br,{fileUrl:ie.url,fileName:ie.name,fileType:ie.type,fileSource:ie.source,onClose:()=>k(null)})]}),document.body)}var H=require("react"),yo=require("react-dom");var xr=`@keyframes styles-module__slideIn___Wx-kZ {
|
|
2383
|
+
}`,pr={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=mr}var d=pr;var l=require("react/jsx-runtime");function fr({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 gr(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(0)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function fo(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 hr(e){let n=e.match(/\/d\/([^/]+)/);return n?n[1]:null}function yr(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=hr(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 br({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=yr(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:fo(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=p=>String(p).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 go({pageItems:e,allItems:n,currentPath:o,serviceName:t,endpoint:s,currentUserName:r,currentUserId:i,onClose:a,onHistoryViewed:p,newNotiCount:C}){let[w,S]=(0,q.useState)("page"),[N,B]=(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)([]),[A,Q]=(0,q.useState)(!1),[b,D]=(0,q.useState)(!1),[E,he]=(0,q.useState)(null),[R,te]=(0,q.useState)([]),[le,ye]=(0,q.useState)(!1),[Fe,Te]=(0,q.useState)(null),[be,x]=(0,q.useState)(null),v=(0,q.useRef)(null),oe=(0,q.useCallback)(()=>{if(E){he(null),te([]);return}D(!0),setTimeout(()=>a(),150)},[a,E]),f=(0,q.useCallback)(async m=>{he(m);let W=cn(qe(m.id));te(W||[]),ye(!W)},[s]);(0,q.useEffect)(()=>{if(!E)return;let m=qe(E.id),W=cn(m);W&&(te(W),ye(!1));let $e=En(m,ve=>{te(ve),ye(!1)});return Yn(s,E.id,{staleWhileRevalidate:!0}).then(ve=>{te(ve),ye(!1)}).catch(()=>{ye(!1)}),$e},[E,s]),(0,q.useEffect)(()=>{v.current?.scrollIntoView({behavior:"smooth"})},[R.length]),(0,q.useEffect)(()=>{if(!K)return;let m=W=>{ge.current&&!ge.current.contains(W.target)&&fe(!1)};return document.addEventListener("mousedown",m),()=>document.removeEventListener("mousedown",m)},[K]);let F=(0,q.useCallback)(async(m,W,$e)=>{if(E)try{let ve;if($e)try{ve=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,m,r,i,W,ve)}catch(ve){console.error("[@impakers/debug] \uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328:",ve)}},[E,s,r,i]),z=w==="page"?e:w==="all"?n:[],ue=z.filter(m=>m.status===N),$=z.filter(m=>m.status==="todo").length,Z=z.filter(m=>m.status==="in_progress").length,re=z.filter(m=>m.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,po.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:un(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&&R.length===0&&(0,l.jsx)("div",{className:d.noComments,children:"\uC544\uC9C1 \uB313\uAE00\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"}),R.map(m=>(0,l.jsxs)("div",{className:d.commentItem,children:[(0,l.jsx)("div",{className:d.commentAvatar,style:{width:22,height:22,fontSize:10},children:ht(m.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:m.authorName}),(0,l.jsx)("span",{className:d.commentTime,children:un(m.createdAt)})]}),m.content&&(0,l.jsx)("div",{className:d.commentContent,children:m.content}),m.imageUrl&&(0,l.jsx)("div",{className:d.commentImage,onClick:W=>{W.stopPropagation(),Te(m.imageUrl)},children:(0,l.jsx)("img",{src:m.imageUrl,alt:"attachment"})}),m.fileUrl&&(0,l.jsxs)("div",{className:d.commentFileCard,onClick:W=>{W.stopPropagation(),x({url:m.fileUrl,name:m.fileName||"\uD30C\uC77C",type:m.fileType||"",source:m.fileSource})},children:[(0,l.jsx)("span",{className:d.commentFileIcon,children:fo(m.fileType||"")}),(0,l.jsxs)("span",{className:d.commentFileInfo,children:[(0,l.jsx)("span",{className:d.commentFileName,children:m.fileName||"\uD30C\uC77C"}),m.fileSize!=null&&(0,l.jsx)("span",{className:d.commentFileSize,children:gr(m.fileSize)})]})]})]})]},m.id)),(0,l.jsx)("div",{ref:v})]}),(0,l.jsx)(mo,{onSend:F,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:()=>S("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:()=>S("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:()=>{S("history"),p?.()},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(m=>!m),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:m=>{j(m.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:A?(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((m,W)=>(0,l.jsxs)("div",{className:d.historyItem,children:[(0,l.jsx)("div",{className:`${d.historyDot} ${d[`historyDot_${m.action}`]}`}),(0,l.jsxs)("div",{className:d.historyBody,children:[m.action==="status_changed"&&(0,l.jsxs)("div",{className:d.historyStatusChange,children:[(0,l.jsx)("span",{className:`${d.historyStatusBadge} ${d[`status_${m.fromStatus}`]}`,children:m.fromStatus==="todo"?"\uB300\uAE30":m.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_${m.toStatus}`]}`,children:m.toStatus==="todo"?"\uB300\uAE30":m.toStatus==="in_progress"?"\uC9C4\uD589\uC911":"\uC644\uB8CC"})]}),m.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"})]}),m.action==="comment_added"&&(0,l.jsxs)("div",{className:d.historyComment,children:[(0,l.jsx)("span",{className:d.historyCommentAuthor,children:m.actorName||"\uC775\uBA85"}),m.metadata?.content&&(0,l.jsx)("span",{className:d.historyCommentContent,children:String(m.metadata.content).slice(0,100)})]}),(0,l.jsxs)("div",{className:d.historyFooter,children:[(0,l.jsx)("span",{className:d.historyTime,children:un(m.createdAt)}),(0,l.jsx)("span",{className:d.historyRef,children:(m.taskTitle||"").replace(/^\[피드백\]\s*/,"")})]})]})]},`${m.id}-${m.action}-${W}`))})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("div",{className:d.statusFilter,children:[(0,l.jsxs)("button",{className:`${d.filterChip} ${N==="todo"?d.active:""}`,onClick:()=>B("todo"),type:"button",children:["\uC9C4\uD589\uC804",$>0&&(0,l.jsx)("span",{className:d.filterCount,children:$})]}),(0,l.jsxs)("button",{className:`${d.filterChip} ${N==="in_progress"?d.active:""}`,onClick:()=>B("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} ${N==="done"?d.active:""}`,onClick:()=>B("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(m=>(0,l.jsxs)("div",{className:`${d.card} ${m.status==="done"?d.cardDone:""}`,onClick:()=>f(m),children:[(0,l.jsxs)("div",{className:d.cardHeader,children:[(0,l.jsx)("div",{className:d.cardAvatar,children:ht(m.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:m.authorName}),(0,l.jsx)("span",{className:d.cardTime,children:un(m.createdAt)})]})})]}),(0,l.jsx)("div",{className:d.cardTitle,children:m.title.replace(/^\[피드백\]\s*/,"")}),m.screenshot&&(0,l.jsx)("div",{className:d.cardScreenshot,children:(0,l.jsx)("img",{src:m.screenshot,alt:"screenshot"})}),w==="all"&&m.feedbackUrl&&(0,l.jsxs)("div",{className:d.cardRoute,onClick:W=>{W.stopPropagation(),window.location.href=m.feedbackUrl},title:"\uD398\uC774\uC9C0\uB85C \uC774\uB3D9",children:[(0,l.jsx)("span",{className:d.cardRoutePath,children:m.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"})]})]}),(m.startedAt||m.completedAt)&&(0,l.jsxs)("div",{className:d.cardStatusTime,children:[m.startedAt&&m.status!=="todo"&&(0,l.jsxs)("span",{children:["\uC9C4\uD589 \uC2DC\uC791: ",un(m.startedAt)]}),m.completedAt&&m.status==="done"&&(0,l.jsxs)("span",{children:["\uC644\uB8CC: ",un(m.completedAt)]})]}),(0,l.jsxs)("div",{className:d.cardFooter,children:[(0,l.jsx)("span",{className:d.cardReplyDot}),(0,l.jsxs)("span",{className:d.cardReplyCount,children:[m.commentCount," ",m.commentCount===1?"Reply":"Replies"]})]})]},m.id))})]})]})]}),Fe&&(0,l.jsx)(fr,{src:Fe,onClose:()=>Te(null)}),be&&(0,l.jsx)(br,{fileUrl:be.url,fileName:be.name,fileType:be.type,fileSource:be.source,onClose:()=>x(null)})]}),document.body)}var H=require("react"),yo=require("react-dom");var xr=`@keyframes styles-module__slideIn___Wx-kZ {
|
|
2384
2384
|
from {
|
|
2385
2385
|
transform: translateX(100%);
|
|
2386
2386
|
}
|
|
@@ -3105,10 +3105,10 @@ ${n.stack?.split(`
|
|
|
3105
3105
|
`)})}),(0,u.jsx)("button",{className:g.codeCopy,onClick:()=>navigator.clipboard?.writeText(i.join(`
|
|
3106
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:ho(i)},`h-${t}`)),t++;continue}if(!s.trim()){t++;continue}n.push((0,u.jsx)("p",{className:g.paragraph,children:ho(s)},`p-${t}`)),t++}return n}function ho(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 wr({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 Sr({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:bo(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 xo({endpoint:e,onClose:n}){let[o,t]=(0,H.useState)([]),[s,r]=(0,H.useState)(""),[i,a]=(0,H.useState)(!1),[p,C]=(0,H.useState)(()=>{try{return localStorage.getItem("impakers-agent-session")||null}catch{return null}}),[w,S]=(0,H.useState)(!1),[N,B]=(0,H.useState)(!1),[
|
|
3109
|
-
`);tn=
|
|
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 wr({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 Sr({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:bo(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 xo({endpoint:e,onClose:n}){let[o,t]=(0,H.useState)([]),[s,r]=(0,H.useState)(""),[i,a]=(0,H.useState)(!1),[p,C]=(0,H.useState)(()=>{try{return localStorage.getItem("impakers-agent-session")||null}catch{return null}}),[w,S]=(0,H.useState)(!1),[N,B]=(0,H.useState)(!1),[M,j]=(0,H.useState)([]),[K,fe]=(0,H.useState)(420),[ge,ce]=(0,H.useState)(!1),[P,A]=(0,H.useState)([]),[Q,b]=(0,H.useState)([]),D=(0,H.useRef)(null),E=(0,H.useRef)(null),he=(0,H.useRef)(null),R=(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=Ge();if(!f)return;let F=e.replace(/\/api\/external\/feedback\/?$/,"");fetch(`${F}/api/agent/sessions?agentId=cs-assistant`,{headers:{Authorization:`Bearer ${f}`}}).then(z=>z.json()).then(z=>A(z.sessions||[])).catch(()=>{})},[e]);(0,H.useEffect)(()=>{le()},[le]);let ye=(0,H.useCallback)(()=>{S(!0),setTimeout(()=>n(),150)},[n]),Fe=(0,H.useCallback)(f=>{f.preventDefault(),te.current=!0;let F=f.clientX,z=K,ue=Z=>{if(!te.current)return;let re=F-Z.clientX;fe(Math.max(360,Math.min(z+re,window.innerWidth-40)))},$=()=>{te.current=!1,document.removeEventListener("mousemove",ue),document.removeEventListener("mouseup",$)};document.addEventListener("mousemove",ue),document.addEventListener("mouseup",$)},[K]),Te=(0,H.useCallback)(f=>{let F=f.target.files;F&&(Array.from(F).forEach(z=>{if(!z.type.startsWith("image/")||z.size>5*1024*1024)return;let ue=new FileReader;ue.onload=()=>{let $=ue.result.split(",")[1];j(Z=>[...Z,{base64:$,mediaType:z.type}])},ue.readAsDataURL(z)}),f.target.value="")},[]),be=(0,H.useCallback)(async f=>{let F=Ge();if(!F)return;let z=e.replace(/\/api\/external\/feedback\/?$/,"");try{let $=await(await fetch(`${z}/api/agent/sessions?sessionId=${f}`,{headers:{Authorization:`Bearer ${F}`}})).json();if($.messages){t($.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=f||s.trim(),z=M;if(!F&&z.length===0||i)return;let ue=Ge();if(!ue)return;let $={id:`user-${Date.now()}`,role:"user",content:F||"\uC774\uBBF8\uC9C0\uB97C \uBD84\uC11D\uD574\uC8FC\uC138\uC694.",images:z.length>0?z:void 0,createdAt:Date.now()};t(W=>[...W,$]),r(""),j([]),a(!0),B(!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 m=!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:F||"\uC774\uBBF8\uC9C0\uB97C \uBD84\uC11D\uD574\uC8FC\uC138\uC694.",agentId:"cs-assistant",sessionId:p||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(),Fn=new TextDecoder,tn="";for(;;){let{done:Ke,value:Ze}=await Be.read();if(Ke)break;tn+=Fn.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+`
|
|
3110
3110
|
|
|
3111
|
-
\uC624\uB958: ${
|
|
3111
|
+
\uC624\uB958: ${ee.error}`}:V));break;case"done":m=!0;break}}catch{}}}m||B(!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"))&&B(!0)}}finally{a(!1),b([]),he.current=null,le()}},[s,M,i,p,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),B(!1),b([]);try{localStorage.removeItem("impakers-agent-session")}catch{}},[]);return typeof document>"u"?null:(0,yo.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:Fe}),(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===p?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((F,z)=>(0,u.jsx)("img",{src:`data:${F.mediaType};base64,${F.base64}`,alt:"",className:g.msgImage},z))}),f.toolCalls&&f.toolCalls.length>0&&!i&&(0,u.jsx)(Sr,{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((F,z)=>(0,u.jsxs)("div",{className:`${g.toolCall} ${g[`tool_${F.status}`]}`,children:[(0,u.jsx)("span",{className:g.toolIcon,children:F.status==="running"?"\u23F3":F.status==="success"?"\u2713":"\u2717"}),(0,u.jsx)("span",{className:g.toolName,children:bo(F.name)}),F.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:vr(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)(wr,{text:f.content})]})]},f.id)),N&&!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:()=>{B(!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,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,$)=>$!==F)),type:"button",children:"\xD7"})]},F))}),(0,u.jsxs)("div",{className:g.inputArea,children:[(0,u.jsx)("button",{className:g.attachBtn,onClick:()=>R.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=f.target;F.style.height="auto",F.style.height=`${Math.min(F.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:R,type:"file",accept:"image/jpeg,image/png,image/gif,image/webp",multiple:!0,style:{display:"none"},onChange:Te})]})]}),document.body)}var Pn=require("react"),So=require("react-dom");var ko="impakers-debug-settings",yt={markerColor:"#6366f1",markersVisible:!0,hideDoneMarkers:!1,showOnlyMine:!1};function vo(){try{let e=localStorage.getItem(ko);return e?{...yt,...JSON.parse(e)}:{...yt}}catch{return{...yt}}}function Co(e){try{localStorage.setItem(ko,JSON.stringify(e))}catch{}}var wo=[{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 Nr=`@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
|
-
}`,Lr={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=Nr}var
|
|
3240
|
+
}`,Lr={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=Nr}var G=Lr;var J=require("react/jsx-runtime");function No({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,So.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:wo.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 Tr=`.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
|
-
}`,Ir={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=Tr}var me=Ir;var x=require("react/jsx-runtime");function yt(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 Er(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 Lo(e){let{name:n,path:o}=it(e),t=Ot(e,{mode:"filtered"});return{name:t.path?`${t.path} ${n}`:n,elementName:n,path:o,reactComponents:t.path}}function Rr(e){let n=Sn(e),o=n.found?n:lt(e);if(o.found&&o.source)return On(o.source,"path")}function Mr(e){let n=Sn(e),o=n.found?n:lt(e);return o.found&&o.sourceCandidates&&o.sourceCandidates.length>0?o.sourceCandidates.map(t=>On(t,"path")):o.found&&o.source?[On(o.source,"path")]:[]}function Ar(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 xt(){return Pr+window.location.pathname}function bt(){try{let e=localStorage.getItem(xt());return e?JSON.parse(e):[]}catch{return[]}}function To(e){try{e.length===0?localStorage.removeItem(xt()):localStorage.setItem(xt(),JSON.stringify(e))}catch{}}function Fr(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 Eo({endpoint:e,getUser:n,onHide:o}){let[t,s]=(0,y.useState)(!1),[r,i]=(0,y.useState)(()=>bt()),[a,p]=(0,y.useState)(null),[C,w]=(0,y.useState)(!1),[S,N]=(0,y.useState)(null),[B,A]=(0,y.useState)({x:0,y:0}),[j,U]=(0,y.useState)(new Set),[fe,ge]=(0,y.useState)(!1),[de,$]=(0,y.useState)(null),[P,Y]=(0,y.useState)(null),[b,z]=(0,y.useState)(!1),[R,he]=(0,y.useState)(null),[M,ee]=(0,y.useState)(null),[re,Te]=(0,y.useState)({}),[Fe,Ie]=(0,y.useState)(!1),[ie,k]=(0,y.useState)([]),[v,f]=(0,y.useState)([]),[L,D]=(0,y.useState)(!1),[ae,ce]=(0,y.useState)(!1),[F,ye]=(0,y.useState)(!1),[ue,m]=(0,y.useState)(()=>vo()),[K,$e]=(0,y.useState)(()=>window.location.pathname),[be,Qe]=(0,y.useState)(!1),[tn,Ue]=(0,y.useState)(0),[on,He]=(0,y.useState)(null),qe=(0,y.useRef)(null),mn=(0,y.useRef)(null),te=(0,y.useRef)(null),xe=(0,y.useRef)(!1),O=(0,y.useCallback)(()=>{He(3);let c=3,_=()=>{c-=1,c<=0?(He(null),s(!0),document.documentElement.classList.add("impakers-selecting")):(He(c),qe.current=setTimeout(_,1e3))};qe.current=setTimeout(_,1e3)},[]),Se=(0,y.useCallback)(c=>{c==="comment"?fn():c==="delay-capture"?O():c==="agent"?ce(!0):c==="inbox"?(D(!0),no(e,{staleWhileRevalidate:!0}).then(f).catch(()=>{}),t&&(s(!1),document.documentElement.classList.remove("impakers-selecting"),N(null),p(null))):c==="settings"&&ye(!0)},[t,O]),pn=(0,y.useCallback)(c=>{m(c),Co(c)},[]),fn=(0,y.useCallback)(()=>{s(c=>{let _=!c;return _?document.documentElement.classList.add("impakers-selecting"):(document.documentElement.classList.remove("impakers-selecting"),N(null),p(null)),_})},[]);(0,y.useEffect)(()=>()=>{document.documentElement.classList.remove("impakers-selecting")},[]),(0,y.useEffect)(()=>{i(bt());let c=()=>{$e(window.location.pathname),i(bt()),p(null),N(null)};window.addEventListener("popstate",c);let _=history.pushState.bind(history);return history.pushState=(...Z)=>{_(...Z),setTimeout(c,50)},()=>{window.removeEventListener("popstate",c),history.pushState=_}},[]),(0,y.useEffect)(()=>{let c=Ze(K),_=cn(c);_&&(k(_),Qe(!0));let Z=En(c,E=>{k(E),Qe(!0)});return eo(e,K,{staleWhileRevalidate:!0}).then(E=>{k(E),Qe(!0)}).catch(()=>{}),Z},[e,K]);let kt="impakers-debug-history-last-seen";(0,y.useEffect)(()=>{let c=localStorage.getItem(kt)||new Date(0).toISOString();qn(e,{since:c,limit:100}).then(_=>Ue(_.length)).catch(()=>{})},[e]);let Ao=(0,y.useCallback)(()=>{localStorage.setItem(kt,new Date().toISOString()),Ue(0)},[]);(0,y.useEffect)(()=>{if(!be)return;let c=ie.map(Fr).filter(_=>_!==null);i(c),To(c)},[ie,be]);let vt=(0,y.useRef)(!0);(0,y.useEffect)(()=>{if(vt.current){vt.current=!1;return}To(r)},[r]),(0,y.useEffect)(()=>{let c=_=>{if(_.key==="Escape"){if(L){D(!1);return}if(a){_.preventDefault(),w(!0),Ee(()=>{p(null),w(!1)},150);return}t&&(_.preventDefault(),s(!1),document.documentElement.classList.remove("impakers-selecting"),N(null))}};return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[L,a,t]),(0,y.useEffect)(()=>{if(!t||a)return;let c=_=>{let Z=_.composedPath()[0]||_.target;if(Je(Z,"[data-impakers-debug]")){N(null);return}let E=yt(_.clientX,_.clientY);if(!E||Je(E,"[data-impakers-debug]")){N(null);return}let{name:ke,elementName:Re,path:Ne,reactComponents:le}=Lo(E),T=E.getBoundingClientRect();N({element:ke,elementName:Re,elementPath:Ne,rect:T,reactComponents:le}),A({x:_.clientX,y:_.clientY})};return document.addEventListener("mousemove",c),()=>document.removeEventListener("mousemove",c)},[t,a]),(0,y.useEffect)(()=>{if(!t)return;let c=_=>{if(xe.current)return;let Z=_.composedPath()[0]||_.target;if(Je(Z,"[data-impakers-debug]")||Je(Z,"[data-annotation-popup]")||Je(Z,"[data-annotation-marker]"))return;if(a){_.preventDefault(),_.stopPropagation(),mn.current?.shake();return}_.preventDefault(),_.stopPropagation();let E=yt(_.clientX,_.clientY);if(!E)return;let{name:ke,path:Re,reactComponents:Ne}=Lo(E),le=E.getBoundingClientRect(),T=_.clientX/window.innerWidth*100,pe=Er(E),$n=pe?_.clientY:_.clientY+window.scrollY,bn=window.getSelection(),sn;bn&&bn.toString().trim().length>0&&(sn=bn.toString().trim().slice(0,500));let J=Bt(E),Pe=Ht(E);p({x:T,y:$n,clientY:_.clientY,element:ke,elementPath:Re,selectedText:sn,boundingBox:{x:le.left,y:pe?le.top:le.top+window.scrollY,width:le.width,height:le.height},nearbyText:Pt(E),cssClasses:Ft(E),isFixed:pe,fullPath:Dt(E),accessibility:zt(E),computedStyles:Pe,computedStylesObj:J,reactComponents:Ne??void 0,sourceFile:Rr(E),targetElement:E}),N(null);let Bn=Mr(E).filter(xn=>xn.includes("/chunks/"));Bn.length>0&&(async()=>{for(let xn of Bn)try{let Hn=await pt(xn);if(Hn){p(nt=>nt&&{...nt,resolvedSource:`${Hn.source}:${Hn.line}`,resolvedName:Hn.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 _=Xt(n),Z=await Ut(),E=a.resolvedSource||a.sourceFile||"",ke=a.resolvedName||null;if(!a.resolvedSource&&a.sourceFile?.includes("/chunks/"))try{let J=await pt(a.sourceFile);J&&(E=`${J.source}:${J.line}:${J.column}`,ke=J.name)}catch{}let Re=await Qt(window.location.pathname),Ne=E&&!E.includes("/chunks/")?Ar(E,ke):null,le=qt(Ne?[Ne]:void 0,Re?.targets);le.length>0&&(_.debugTargets=le),Re?.context&&(_.routeDebug=Re.context);let T=[];T.push(`## \uD53C\uB4DC\uBC31 ${c}`),le.length>0&&(T.push(""),T.push("---"),T.push(""),T.push("**\uB514\uBC84\uAE45 \uD0C0\uAC9F \uD30C\uC77C**:"),le.forEach(J=>{let Pe=J.line?`:${J.line}${typeof J.column=="number"?`:${J.column}`:""}`:"";T.push(`- [${J.kind}] \`${J.file}${Pe}\` (${J.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}`):ke&&pe.push(`**\uCEF4\uD3EC\uB10C\uD2B8/\uD568\uC218**: ${ke}`),E&&!E.includes("/chunks/")&&pe.push(`**\uC18C\uC2A4 \uD30C\uC77C**: \`${E}\``),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&&(T.push(""),T.push("---"),T.push(""),pe.forEach(J=>T.push(J))),_.consoleErrors?.length&&(T.push(""),T.push("---"),T.push(""),T.push("**\uCD5C\uADFC \uCF58\uC194 \uC5D0\uB7EC**:"),_.consoleErrors.slice(-10).forEach(J=>T.push(`- \`${J.slice(0,200)}\``))),_.consoleLogs?.length){let J=_.consoleLogs.filter(Pe=>Pe.level==="error"||Pe.level==="warn").slice(-10);J.length>0&&(T.push(""),T.push("**\uCD5C\uADFC \uCF58\uC194 \uB85C\uADF8**:"),J.forEach(Pe=>T.push(`- [${Pe.level}] \`${Pe.message.slice(0,200)}\``)))}if(T.push(""),T.push("---"),T.push(""),T.push("## \uD658\uACBD \uC815\uBCF4"),T.push(""),T.push(`- **URL**: ${_.url}`),T.push(`- **\uC2DC\uC810**: ${new Date(_.timestamp).toLocaleString("ko-KR")}`),T.push(`- **\uBE0C\uB77C\uC6B0\uC800**: ${_.browser}`),T.push(`- **\uD654\uBA74**: ${_.viewport} (@${_.pixelRatio}x)`),T.push(`- **\uC5B8\uC5B4**: ${_.language}`),_.user?.name&&T.push(`- **\uC0AC\uC6A9\uC790**: ${_.user.name}`),_.performance&&Object.keys(_.performance).length>0){T.push(""),T.push("---"),T.push(""),T.push("## \uC131\uB2A5"),T.push(""),T.push("| \uD56D\uBAA9 | \uAC12 |"),T.push("|------|-----|");let J={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[Pe,Lt]of Object.entries(_.performance)){let Bn=J[Pe]||Pe,xn=Pe.includes("Heap")?"MB":"ms";T.push(`| ${Bn} | ${Lt}${xn} |`)}}let $n=T.join(`
|
|
3566
|
-
`),bn=await Jt(e,{title:c.slice(0,100),description:"",priority:"medium",metadata:_,debugInfo:$n,debug_info:$n,screenshot:Z,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});z(!0),Ee(()=>z(!1),3e3);let sn=bn.taskId||null;te.current=sn,Ee(()=>{te.current=null},300),Ee(()=>{sn&&U(J=>new Set(J).add(sn))},250),w(!0),Ee(()=>{p(null),w(!1),s(!1),document.documentElement.classList.remove("impakers-selecting"),xe.current=!0,setTimeout(()=>{xe.current=!1},300)},150),window.getSelection()?.removeAllRanges()}catch(_){let Z=_?.message||"\uD53C\uB4DC\uBC31 \uC804\uC1A1 \uC2E4\uD328";gn(Z),console.error("[@impakers/debug] \uD53C\uB4DC\uBC31 \uC804\uC1A1 \uC2E4\uD328:",_)}finally{ge(!1)}}},[a,fe,e,n,gn]),Fo=(0,y.useCallback)(()=>{w(!0),Ee(()=>{p(null),w(!1),s(!1),document.documentElement.classList.remove("impakers-selecting"),xe.current=!0,setTimeout(()=>{xe.current=!1},300)},150)},[]),Ct=(0,y.useCallback)(c=>{let _=c.id;ee(Z=>Z===_?null:_)},[]);(0,y.useEffect)(()=>{if(!M)return;let c=Ye(M),_=cn(c);_?(Te(E=>({...E,[M]:_})),Ie(!1)):Ie(!0);let Z=En(c,E=>{Te(ke=>({...ke,[M]:E})),Ie(!1)});return Xn(e,M,{staleWhileRevalidate:!0}).then(()=>Ie(!1)).catch(()=>Ie(!1)),Z},[M,e]);let $o=(0,y.useCallback)(async(c,_,Z,E)=>{let ke=n?.()?.name?String(n().name):"\uC775\uBA85",Re=n?.()?.id?String(n().id):void 0;try{let Ne;if(E)try{Ne=await Qn(e,E,"comment",c)}catch(le){let T=le?.message||"\uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328";gn(T),console.error("[@impakers/debug] \uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328:",le)}await Yn(e,c,_,ke,Re,Z,Ne)}catch(Ne){let le=Ne?.message||"\uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328";gn(le),console.error("[@impakers/debug] \uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328:",Ne)}},[n,e,gn]),Bo=(0,y.useCallback)(()=>{ee(null)},[]),Fn=(0,y.useCallback)(c=>{if(!c){$(null),Y(null);return}if($(c.id),c.boundingBox){let _=c.boundingBox,Z=_.x+_.width/2,E=c.isFixed?_.y+_.height/2:_.y+_.height/2-window.scrollY,ke=yt(Z,E);if(ke){let Re=ke.getBoundingClientRect(),Ne=Re.width/_.width,le=Re.height/_.height;if(Ne>=.5&&le>=.5){Y(ke);return}}}Y(null)},[]),Ho=(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,Z=Math.max(160,Math.min(window.innerWidth-160,c));return _>window.innerHeight-290?{left:Z,bottom:window.innerHeight-_+20}:{left:Z,top:_+20}},[a]);if(typeof document>"u")return null;let hn=Ho(),yn=P?.getBoundingClientRect(),zo=[{id:"comment",label:"\uD53C\uB4DC\uBC31",active:t,icon:(0,x.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,x.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,x.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,x.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,x.jsx)("polyline",{points:"12 6 12 12 16 14"})]})},{id:"agent",label:"\uC5D0\uC774\uC804\uD2B8",icon:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,x.jsx)("path",{d:"M12 2L2 7l10 5 10-5-10-5z"}),(0,x.jsx)("path",{d:"M2 17l10 5 10-5"}),(0,x.jsx)("path",{d:"M2 12l10 5 10-5"})]})},{id:"inbox",label:"Inbox",badge:tn||void 0,icon:(0,x.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,x.jsx)("polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12"}),(0,x.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,x.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,x.jsx)("circle",{cx:"12",cy:"12",r:"3"}),(0,x.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=K,et=n?.()?.name?String(n().name):null,St=(0,y.useMemo)(()=>r.filter(c=>{let _=ie.find(Z=>Z.id===c.id);return!(ue.hideDoneMarkers&&(c.status==="done"||c.status==="resolved")||ue.showOnlyMine&&_?.authorName&&et&&_.authorName!==et)}),[r,ie,ue.hideDoneMarkers,ue.showOnlyMine,et]),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}),Do=ie.map(c=>Nt(c,wt)),jo=v.map(c=>Nt(c,""));return(0,Io.createPortal)((0,x.jsxs)("div",{"data-impakers-debug":"",children:[(0,x.jsx)(_o,{items:zo,onSelect:Se,onHide:o,onDoubleTap:fn}),L&&(0,x.jsx)(go,{pageItems:Do,allItems:jo,currentPath:wt,serviceName:Et()||void 0,endpoint:e,currentUserName:n?.()?.name?String(n().name):"\uC775\uBA85",currentUserId:n?.()?.id?String(n().id):void 0,onClose:()=>D(!1),onHistoryViewed:Ao,newNotiCount:tn}),ae&&(0,x.jsx)(xo,{endpoint:e,onClose:()=>ce(!1)}),F&&(0,x.jsx)(No,{settings:ue,onChange:pn,onClose:()=>ye(!1)}),t&&(0,x.jsxs)(x.Fragment,{children:[S?.rect&&!a&&(0,x.jsx)("div",{className:`${me.hoverHighlight} ${me.enter}`,style:{left:S.rect.left,top:S.rect.top,width:S.rect.width,height:S.rect.height}}),S&&!a&&(0,x.jsxs)("div",{className:`${me.hoverTooltip} ${me.enter}`,style:{left:Math.min(B.x+14,window.innerWidth-200),top:B.y+14},children:[S.reactComponents&&(0,x.jsx)("div",{className:me.hoverReactPath,children:S.reactComponents}),(0,x.jsx)("div",{className:me.hoverElementName,children:S.elementName})]}),yn&&de&&(0,x.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,x.jsx)("div",{className:`${me.singleSelectOutline} ${me.enter}`,style:{left:c.left,top:c.top,width:c.width,height:c.height}})})()]}),(0,x.jsx)("div",{className:me.markersLayer,"data-impakers-debug":"",style:{display:ue.markersVisible?void 0:"none"},children:St.filter(c=>!c.isFixed).map((c,_)=>(0,x.jsx)(ft,{annotation:c,layerIndex:_,isAnimated:j.has(c.id),isHovered:de===c.id,isDeleting:!1,markerClickBehavior:"edit",accentColor:ue.markerColor,onHover:()=>Fn(c),onHoverEnd:()=>Fn(null),onClick:()=>Ct(c),onContextMenu:()=>{}},c.id))}),(0,x.jsxs)("div",{className:me.fixedMarkersLayer,"data-impakers-debug":"",style:{display:ue.markersVisible?void 0:"none"},children:[St.filter(c=>c.isFixed).map((c,_)=>(0,x.jsx)(ft,{annotation:c,layerIndex:_,isAnimated:j.has(c.id),isHovered:de===c.id,isDeleting:!1,markerClickBehavior:"edit",accentColor:ue.markerColor,onHover:()=>Fn(c),onHoverEnd:()=>Fn(null),onClick:()=>Ct(c),onContextMenu:()=>{}},c.id)),a&&(0,x.jsx)(ro,{x:a.x,y:a.clientY,isMultiSelect:!1,accentColor:ue.markerColor})]}),a&&(0,x.jsx)(At,{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:Fo}),M&&(()=>{let c=r.find(pe=>pe.id===M),_=ie.find(pe=>pe.id===M);if(!c)return null;let Z=c.x/100*window.innerWidth,E=c.isFixed?c.y:c.y-window.scrollY,ke=Math.max(10,Math.min(Z+20,window.innerWidth-360)),Re=window.innerHeight-E,Ne=E,le=Re>=300?Math.min(E,window.innerHeight-60):Math.max(10,E-Math.min(480,Ne-10)),T={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:re[c.id]||[]};return(0,x.jsx)(uo,{task:T,currentUserName:n?.()?.name?String(n().name):"\uC775\uBA85",currentUserId:n?.()?.id?String(n().id):void 0,left:ke,top:le,loading:Fe,onClose:Bo,onReply:$o})})(),on!==null&&(0,x.jsxs)("div",{className:me.countdownOverlay,"data-impakers-debug":"",children:[(0,x.jsx)("div",{className:me.countdownNumber,children:on}),(0,x.jsx)("div",{className:me.countdownLabel,children:"\uD53C\uB4DC\uBC31 \uBAA8\uB4DC \uD65C\uC131\uD654\uAE4C\uC9C0..."}),(0,x.jsx)("button",{className:me.countdownCancel,onClick:()=>{qe.current&&clearTimeout(qe.current),He(null)},type:"button",children:"\uCDE8\uC18C"})]}),b&&(0,x.jsxs)("div",{className:me.toast,"data-impakers-debug":"",children:[(0,x.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#16a34a",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,x.jsx)("polyline",{points:"20 6 9 17 4 12"})}),(0,x.jsx)("span",{children:"\uD0DC\uC2A4\uD06C \uC0DD\uC131\uC774 \uC644\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4"})]}),R&&(0,x.jsxs)("div",{className:`${me.toast} ${me.toastError}`,"data-impakers-debug":"",children:[(0,x.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#ef4444",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,x.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,x.jsx)("line",{x1:"15",y1:"9",x2:"9",y2:"15"}),(0,x.jsx)("line",{x1:"9",y1:"9",x2:"15",y2:"15"})]}),(0,x.jsx)("span",{children:R})]})]}),document.body)}var _n=require("react"),Ro=require("react-dom");var we=require("react/jsx-runtime");function Mo({endpoint:e,onSuccess:n,onClose:o}){let[t,s]=(0,_n.useState)(""),[r,i]=(0,_n.useState)(!1),[a,p]=(0,_n.useState)(null),C=(0,_n.useCallback)(async w=>{if(w.preventDefault(),!(!t.trim()||r)){i(!0),p(null);try{let S=await Rt(e,t.trim().toUpperCase());n(S.serviceName)}catch(S){p(S instanceof Error?S.message:"\uC778\uC99D \uC2E4\uD328")}finally{i(!1)}}},[t,e,r,n]);return typeof document>"u"?null:(0,Ro.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 $r({endpoint:e,getUser:n}){let[o,t]=(0,Be.useState)(!1),[s,r]=(0,Be.useState)(!1),[i,a]=(0,Be.useState)(()=>{try{return localStorage.getItem("impakers-debug-hidden")==="1"}catch{return!1}});(0,Be.useEffect)(()=>{t(rn())},[]),(0,Be.useEffect)(()=>{let S=[Ke._on("impakers-debug:show-auth",()=>{r(!0),a(!1);try{localStorage.removeItem("impakers-debug-hidden")}catch{}}),Ke._on("impakers-debug:open",()=>{a(!1);try{localStorage.removeItem("impakers-debug-hidden")}catch{}}),Ke._on("impakers-debug:deactivate",()=>{t(!1),r(!1)})];return()=>S.forEach(N=>N())},[]),(0,Be.useEffect)(()=>{function S(N){if((N.ctrlKey||N.metaKey)&&N.shiftKey&&(N.key==="."||N.key===">"||N.code==="Period")){if(N.preventDefault(),i){a(!1);try{localStorage.removeItem("impakers-debug-hidden")}catch{}return}rn()?t(!0):r(B=>!B)}}return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[i]);let p=(0,Be.useCallback)(S=>{t(!0),r(!1)},[]),C=(0,Be.useCallback)(()=>{r(!1)},[]),w=(0,Be.useCallback)(()=>{a(!0);try{localStorage.setItem("impakers-debug-hidden","1")}catch{}},[]);return(0,nn.jsxs)(nn.Fragment,{children:[o&&!i&&(0,nn.jsx)(Eo,{endpoint:e,getUser:n,onHide:w}),s&&!o&&(0,nn.jsx)(Mo,{endpoint:e,onSuccess:p,onClose:C})]})}0&&(module.exports={ImpakersDebug,ImpakersDebugProvider});
|
|
3565
|
+
}`,Ir={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=Tr}var me=Ir;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 Er(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 Lo(e){let{name:n,path:o}=at(e),t=Ot(e,{mode:"filtered"});return{name:t.path?`${t.path} ${n}`:n,elementName:n,path:o,reactComponents:t.path}}function Rr(e){let n=Sn(e),o=n.found?n:dt(e);if(o.found&&o.source)return Vn(o.source,"path")}function Mr(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 Ar(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 To(e){try{e.length===0?localStorage.removeItem(kt()):localStorage.setItem(kt(),JSON.stringify(e))}catch{}}function Fr(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 Eo({endpoint:e,getUser:n,onHide:o}){let[t,s]=(0,y.useState)(!1),[r,i]=(0,y.useState)(()=>xt()),[a,p]=(0,y.useState)(null),[C,w]=(0,y.useState)(!1),[S,N]=(0,y.useState)(null),[B,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),[A,Q]=(0,y.useState)(null),[b,D]=(0,y.useState)(!1),[E,he]=(0,y.useState)(null),[R,te]=(0,y.useState)(null),[le,ye]=(0,y.useState)({}),[Fe,Te]=(0,y.useState)(!1),[be,x]=(0,y.useState)([]),[v,oe]=(0,y.useState)([]),[f,F]=(0,y.useState)(!1),[z,ue]=(0,y.useState)(!1),[$,Z]=(0,y.useState)(!1),[re,m]=(0,y.useState)(()=>vo()),[W,$e]=(0,y.useState)(()=>window.location.pathname),[ve,Be]=(0,y.useState)(!1),[Fn,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"?(F(!0),no(e,{staleWhileRevalidate:!0}).then(oe).catch(()=>{}),t&&(s(!1),document.documentElement.classList.remove("impakers-selecting"),N(null),p(null))):c==="settings"&&Z(!0)},[t,Ie]),Se=(0,y.useCallback)(c=>{m(c),Co(c)},[]),on=(0,y.useCallback)(()=>{s(c=>{let _=!c;return _?document.documentElement.classList.add("impakers-selecting"):(document.documentElement.classList.remove("impakers-selecting"),N(null),p(null)),_})},[]);(0,y.useEffect)(()=>()=>{document.documentElement.classList.remove("impakers-selecting")},[]),(0,y.useEffect)(()=>{i(xt());let c=()=>{$e(window.location.pathname),i(xt()),p(null),N(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 eo(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 Ao=(0,y.useCallback)(()=>{localStorage.setItem(fn,new Date().toISOString()),tn(0)},[]);(0,y.useEffect)(()=>{if(!ve)return;let c=be.map(Fr).filter(_=>_!==null);i(c),To(c)},[be,ve]);let vt=(0,y.useRef)(!0);(0,y.useEffect)(()=>{if(vt.current){vt.current=!1;return}To(r)},[r]),(0,y.useEffect)(()=>{let c=_=>{if(_.key==="Escape"){if(f){F(!1);return}if(a){_.preventDefault(),w(!0),Ee(()=>{p(null),w(!1)},150);return}t&&(_.preventDefault(),s(!1),document.documentElement.classList.remove("impakers-selecting"),N(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]")){N(null);return}let I=bt(_.clientX,_.clientY);if(!I||Je(I,"[data-impakers-debug]")){N(null);return}let{name:xe,elementName:Re,path:Ne,reactComponents:de}=Lo(I),L=I.getBoundingClientRect();N({element:xe,elementName:Re,elementPath:Ne,rect:L,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}=Lo(I),de=I.getBoundingClientRect(),L=_.clientX/window.innerWidth*100,pe=Er(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=Bt(I),Pe=Ht(I);p({x:L,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:Ft(I),isFixed:pe,fullPath:Dt(I),accessibility:zt(I),computedStyles:Pe,computedStylesObj:ne,reactComponents:Ne??void 0,sourceFile:Rr(I),targetElement:I}),N(null);let Hn=Mr(I).filter(xn=>xn.includes("/chunks/"));Hn.length>0&&(async()=>{for(let xn of Hn)try{let zn=await ft(xn);if(zn){p(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 _=Xt(n),X=await Ut(),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/")?Ar(I,xe):null,de=qt(Ne?[Ne]:void 0,Re?.targets);de.length>0&&(_.debugTargets=de),Re?.context&&(_.routeDebug=Re.context);let L=[];L.push(`## \uD53C\uB4DC\uBC31 ${c}`),de.length>0&&(L.push(""),L.push("---"),L.push(""),L.push("**\uB514\uBC84\uAE45 \uD0C0\uAC9F \uD30C\uC77C**:"),de.forEach(ne=>{let Pe=ne.line?`:${ne.line}${typeof ne.column=="number"?`:${ne.column}`:""}`:"";L.push(`- [${ne.kind}] \`${ne.file}${Pe}\` (${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&&(L.push(""),L.push("---"),L.push(""),pe.forEach(ne=>L.push(ne))),_.consoleErrors?.length&&(L.push(""),L.push("---"),L.push(""),L.push("**\uCD5C\uADFC \uCF58\uC194 \uC5D0\uB7EC**:"),_.consoleErrors.slice(-10).forEach(ne=>L.push(`- \`${ne.slice(0,200)}\``))),_.consoleLogs?.length){let ne=_.consoleLogs.filter(Pe=>Pe.level==="error"||Pe.level==="warn").slice(-10);ne.length>0&&(L.push(""),L.push("**\uCD5C\uADFC \uCF58\uC194 \uB85C\uADF8**:"),ne.forEach(Pe=>L.push(`- [${Pe.level}] \`${Pe.message.slice(0,200)}\``)))}if(L.push(""),L.push("---"),L.push(""),L.push("## \uD658\uACBD \uC815\uBCF4"),L.push(""),L.push(`- **URL**: ${_.url}`),L.push(`- **\uC2DC\uC810**: ${new Date(_.timestamp).toLocaleString("ko-KR")}`),L.push(`- **\uBE0C\uB77C\uC6B0\uC800**: ${_.browser}`),L.push(`- **\uD654\uBA74**: ${_.viewport} (@${_.pixelRatio}x)`),L.push(`- **\uC5B8\uC5B4**: ${_.language}`),_.user?.name&&L.push(`- **\uC0AC\uC6A9\uC790**: ${_.user.name}`),_.performance&&Object.keys(_.performance).length>0){L.push(""),L.push("---"),L.push(""),L.push("## \uC131\uB2A5"),L.push(""),L.push("| \uD56D\uBAA9 | \uAC12 |"),L.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[Pe,Lt]of Object.entries(_.performance)){let Hn=ne[Pe]||Pe,xn=Pe.includes("Heap")?"MB":"ms";L.push(`| ${Hn} | ${Lt}${xn} |`)}}let Bn=L.join(`
|
|
3566
|
+
`),bn=await Jt(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(()=>{p(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]),Fo=(0,y.useCallback)(()=>{w(!0),Ee(()=>{p(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(!R)return;let c=qe(R),_=cn(c);_?(ye(I=>({...I,[R]:_})),Te(!1)):Te(!0);let X=En(c,I=>{ye(xe=>({...xe,[R]:I})),Te(!1)});return Yn(e,R,{staleWhileRevalidate:!0}).then(()=>Te(!1)).catch(()=>Te(!1)),X},[R,e]);let $o=(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 L=de?.message||"\uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328";gn(L),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]),Bo=(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)},[]),Ho=(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=Ho(),yn=A?.getBoundingClientRect(),zo=[{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:Fn||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}),Do=be.map(c=>Nt(c,wt)),jo=v.map(c=>Nt(c,""));return(0,Io.createPortal)((0,k.jsxs)("div",{"data-impakers-debug":"",children:[(0,k.jsx)(_o,{items:zo,onSelect:V,onHide:o,onDoubleTap:on}),f&&(0,k.jsx)(go,{pageItems:Do,allItems:jo,currentPath:wt,serviceName:Et()||void 0,endpoint:e,currentUserName:n?.()?.name?String(n().name):"\uC775\uBA85",currentUserId:n?.()?.id?String(n().id):void 0,onClose:()=>F(!1),onHistoryViewed:Ao,newNotiCount:Fn}),z&&(0,k.jsx)(xo,{endpoint:e,onClose:()=>ue(!1)}),$&&(0,k.jsx)(No,{settings:re,onChange:Se,onClose:()=>Z(!1)}),t&&(0,k.jsxs)(k.Fragment,{children:[S?.rect&&!a&&(0,k.jsx)("div",{className:`${me.hoverHighlight} ${me.enter}`,style:{left:S.rect.left,top:S.rect.top,width:S.rect.width,height:S.rect.height}}),S&&!a&&(0,k.jsxs)("div",{className:`${me.hoverTooltip} ${me.enter}`,style:{left:Math.min(B.x+14,window.innerWidth-200),top:B.y+14},children:[S.reactComponents&&(0,k.jsx)("div",{className:me.hoverReactPath,children:S.reactComponents}),(0,k.jsx)("div",{className:me.hoverElementName,children:S.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)(ro,{x:a.x,y:a.clientY,isMultiSelect:!1,accentColor:re.markerColor})]}),a&&(0,k.jsx)(At,{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:Fo}),R&&(()=>{let c=r.find(pe=>pe.id===R),_=be.find(pe=>pe.id===R);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)),L={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)(uo,{task:L,currentUserName:n?.()?.name?String(n().name):"\uC775\uBA85",currentUserId:n?.()?.id?String(n().id):void 0,left:xe,top:de,loading:Fe,onClose:Bo,onReply:$o})})(),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 _n=require("react"),Ro=require("react-dom");var we=require("react/jsx-runtime");function Mo({endpoint:e,onSuccess:n,onClose:o}){let[t,s]=(0,_n.useState)(""),[r,i]=(0,_n.useState)(!1),[a,p]=(0,_n.useState)(null),C=(0,_n.useCallback)(async w=>{if(w.preventDefault(),!(!t.trim()||r)){i(!0),p(null);try{let S=await Rt(e,t.trim().toUpperCase());n(S.serviceName)}catch(S){p(S instanceof Error?S.message:"\uC778\uC99D \uC2E4\uD328")}finally{i(!1)}}},[t,e,r,n]);return typeof document>"u"?null:(0,Ro.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 $r({endpoint:e,getUser:n}){let[o,t]=(0,He.useState)(!1),[s,r]=(0,He.useState)(!1),[i,a]=(0,He.useState)(()=>{try{return localStorage.getItem("impakers-debug-hidden")==="1"}catch{return!1}});(0,He.useEffect)(()=>{t(rn())},[]),(0,He.useEffect)(()=>{let S=[Xe._on("impakers-debug:show-auth",()=>{r(!0),a(!1);try{localStorage.removeItem("impakers-debug-hidden")}catch{}}),Xe._on("impakers-debug:open",()=>{a(!1);try{localStorage.removeItem("impakers-debug-hidden")}catch{}}),Xe._on("impakers-debug:deactivate",()=>{t(!1),r(!1)})];return()=>S.forEach(N=>N())},[]),(0,He.useEffect)(()=>{function S(N){if((N.ctrlKey||N.metaKey)&&N.shiftKey&&(N.key==="."||N.key===">"||N.code==="Period")){if(N.preventDefault(),i){a(!1);try{localStorage.removeItem("impakers-debug-hidden")}catch{}return}rn()?t(!0):r(B=>!B)}}return document.addEventListener("keydown",S),()=>document.removeEventListener("keydown",S)},[i]);let p=(0,He.useCallback)(S=>{t(!0),r(!1)},[]),C=(0,He.useCallback)(()=>{r(!1)},[]),w=(0,He.useCallback)(()=>{a(!0);try{localStorage.setItem("impakers-debug-hidden","1")}catch{}},[]);return(0,nn.jsxs)(nn.Fragment,{children:[o&&!i&&(0,nn.jsx)(Eo,{endpoint:e,getUser:n,onHide:w}),s&&!o&&(0,nn.jsx)(Mo,{endpoint:e,onSuccess:p,onClose:C})]})}0&&(module.exports={ImpakersDebug,ImpakersDebugProvider});
|