@impakers/debug 1.5.3 → 1.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/react.d.mts +3 -3
- package/dist/react.d.ts +3 -3
- package/dist/react.js +19 -19
- package/dist/react.mjs +19 -19
- package/package.json +1 -1
package/dist/react.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use client";import{useEffect as jt,useState as Wt,useCallback as Ot}from"react";var Qt="impakers-debug-token",Qn="impakers-debug-token-data";function
|
|
2
|
+
"use client";import{useEffect as jt,useState as Wt,useCallback as Ot}from"react";var Qt="https://os.impakers.club/api/external/feedback";var qt="impakers-debug-token",Qn="impakers-debug-token-data";function nn(){if(typeof window>"u")return null;try{let e=localStorage.getItem(Qn);if(!e)return null;let n=JSON.parse(e);return new Date(n.expiresAt)<new Date?(gt(),null):n.token}catch{return null}}function un(){return nn()!==null}function Gt(){if(typeof window>"u")return null;try{let e=localStorage.getItem(Qn);return e?JSON.parse(e).serviceName:null}catch{return null}}function ms(e){if(!(typeof window>"u"))try{let n={token:e.token,serviceName:e.serviceName,expiresAt:e.expiresAt};localStorage.setItem(Qn,JSON.stringify(n)),localStorage.setItem(qt,e.token)}catch{}}function gt(){if(!(typeof window>"u"))try{localStorage.removeItem(Qn),localStorage.removeItem(qt)}catch{}}async function Jt(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 ms(s),s}var We=class We{static showAuth(){We._eventTarget?.dispatchEvent(new CustomEvent("impakers-debug:show-auth"))}static isActive(){return un()}static deactivate(){gt(),We._eventTarget?.dispatchEvent(new CustomEvent("impakers-debug:deactivate"))}static open(){if(!un()){We.showAuth();return}We._eventTarget?.dispatchEvent(new CustomEvent("impakers-debug:open"))}static _on(n,o){return We._eventTarget?.addEventListener(n,o),()=>We._eventTarget?.removeEventListener(n,o)}};We._eventTarget=typeof EventTarget<"u"?new EventTarget:null;var tn=We;import{useState as ne,useCallback as Re,useEffect as je,useRef as Un,useMemo as ri}from"react";import{createPortal as ii}from"react-dom";import{useState as En,useRef as qn,useEffect as to,useCallback as Gn,forwardRef as ys,useImperativeHandle as bs}from"react";var ps=`.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
|
-
}`,ps={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=ms}var U=ps;import{jsx as Jt,jsxs as Ci}from"react/jsx-runtime";var eo=({size:e=24})=>Jt("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Jt("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 fs=["data-feedback-toolbar","data-annotation-popup","data-annotation-marker"],Si=fs.flatMap(e=>[`:not([${e}])`,`:not([${e}] *)`]).join("");var ht="__agentation_freeze";function gs(){if(typeof window>"u")return{frozen:!1,installed:!0,origSetTimeout:setTimeout,origSetInterval:setInterval,origRAF:n=>0,pausedAnimations:[],frozenTimeoutQueue:[],frozenRAFQueue:[]};let e=window;return e[ht]||(e[ht]={frozen:!1,installed:!1,origSetTimeout:null,origSetInterval:null,origRAF:null,pausedAnimations:[],frozenTimeoutQueue:[],frozenRAFQueue:[]}),e[ht]}var ge=gs();typeof window<"u"&&!ge.installed&&(ge.origSetTimeout=window.setTimeout.bind(window),ge.origSetInterval=window.setInterval.bind(window),ge.origRAF=window.requestAnimationFrame.bind(window),window.setTimeout=(e,n,...o)=>typeof e=="string"?ge.origSetTimeout(e,n):ge.origSetTimeout((...t)=>{ge.frozen?ge.frozenTimeoutQueue.push(()=>e(...t)):e(...t)},n,...o),window.setInterval=(e,n,...o)=>typeof e=="string"?ge.origSetInterval(e,n):ge.origSetInterval((...t)=>{ge.frozen||e(...t)},n,...o),window.requestAnimationFrame=e=>ge.origRAF(n=>{ge.frozen?ge.frozenRAFQueue.push(e):e(n)}),ge.installed=!0);var Ne=ge.origSetTimeout,Ni=ge.origSetInterval,Li=ge.origRAF;import{jsx as Ce,jsxs as tn}from"react/jsx-runtime";function yt(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 to=hs(function({element:n,timestamp:o,selectedText:t,placeholder:s="What should change?",initialValue:r="",submitLabel:i="Add",onSubmit:a,onCancel:_,onDelete:k,style:v,accentColor:C="#3c82f7",isExiting:w=!1,lightMode:B=!1,computedStyles:R},D){let[K,ce]=In(r),[ue,re]=In(!1),[A,M]=In("initial"),[Y,h]=In(!1),[z,T]=In(!1),_e=qn(null),I=qn(null),J=qn(null),oe=qn(null);no(()=>{w&&A!=="exit"&&M("exit")},[w,A]),no(()=>{Ne(()=>{M("enter")},0);let x=Ne(()=>{M("entered")},200),ee=Ne(()=>{let p=_e.current;p&&(yt(p),p.selectionStart=p.selectionEnd=p.value.length,p.scrollTop=p.scrollHeight)},50);return()=>{clearTimeout(x),clearTimeout(ee),J.current&&clearTimeout(J.current),oe.current&&clearTimeout(oe.current)}},[]);let me=Gn(()=>{oe.current&&clearTimeout(oe.current),re(!0),oe.current=Ne(()=>{re(!1),yt(_e.current)},250)},[]);ys(D,()=>({shake:me}),[me]);let Me=Gn(()=>{M("exit"),J.current=Ne(()=>{_()},150)},[_]),we=Gn(()=>{K.trim()&&a(K.trim())},[K,a]),pe=Gn(x=>{x.stopPropagation(),!x.nativeEvent.isComposing&&(x.key==="Enter"&&(x.metaKey||x.ctrlKey)&&(x.preventDefault(),we()),x.key==="Escape"&&Me())},[we,Me]),b=[U.popup,B?U.light:"",A==="enter"?U.enter:"",A==="entered"?U.entered:"",A==="exit"?U.exit:"",ue?U.shake:""].filter(Boolean).join(" ");return tn("div",{ref:I,className:b,"data-annotation-popup":!0,style:v,onClick:x=>x.stopPropagation(),children:[tn("div",{className:U.header,children:[R&&Object.keys(R).length>0?tn("button",{className:U.headerToggle,onClick:()=>{let x=z;T(!z),x&&Ne(()=>yt(_e.current),0)},type:"button",children:[Ce("svg",{className:`${U.chevron} ${z?U.expanded:""}`,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Ce("path",{d:"M5.5 10.25L9 7.25L5.75 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Ce("span",{className:U.element,children:n})]}):Ce("span",{className:U.element,children:n}),o&&Ce("span",{className:U.timestamp,children:o})]}),R&&Object.keys(R).length>0&&Ce("div",{className:`${U.stylesWrapper} ${z?U.expanded:""}`,children:Ce("div",{className:U.stylesInner,children:Ce("div",{className:U.stylesBlock,children:Object.entries(R).map(([x,ee])=>tn("div",{className:U.styleLine,children:[Ce("span",{className:U.styleProperty,children:x.replace(/([A-Z])/g,"-$1").toLowerCase()}),": ",Ce("span",{className:U.styleValue,children:ee}),";"]},x))})})}),t&&tn("div",{className:U.quote,children:["\u201C",t.slice(0,80),t.length>80?"...":"","\u201D"]}),Ce("textarea",{ref:_e,className:U.textarea,style:{borderColor:Y?C:void 0},placeholder:s,value:K,onChange:x=>{ce(x.target.value);let ee=x.target;ee.style.height="auto",ee.style.height=`${Math.min(ee.scrollHeight,200)}px`},onFocus:()=>h(!0),onBlur:()=>h(!1),rows:4,onKeyDown:pe}),tn("div",{className:U.actions,children:[k&&Ce("div",{className:U.deleteWrapper,children:Ce("button",{className:U.deleteButton,onClick:k,type:"button",children:Ce(eo,{size:22})})}),Ce("button",{className:U.cancel,onClick:Me,children:"Cancel"}),Ce("button",{className:U.submit,style:{backgroundColor:C,opacity:K.trim()?1:.4},onClick:we,disabled:!K.trim(),children:i})]}),tn("div",{className:U.shortcutHint,children:[navigator?.platform?.includes("Mac")?"\u2318":"Ctrl","+Enter to submit"]})]})});function En(e){if(e.parentElement)return e.parentElement;let n=e.getRootNode();return n instanceof ShadowRoot?n.host:null}function on(e,n){let o=e;for(;o;){if(o.matches(n))return o;o=En(o)}return null}function bs(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 _=t.className.split(/\s+/).find(k=>k.length>2&&!k.match(/^[a-z]{1,2}$/)&&!k.match(/[A-Z0-9]{5,}/));_&&(i=`.${_.split("_")[0]}`)}let a=En(t);!t.parentElement&&a&&(i=`\u27E8shadow\u27E9 ${i}`),o.unshift(i),t=a,s++}return o.join(" > ")}function bt(e){let n=bs(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=on(e,"svg");if(t){let s=En(t);if(s instanceof HTMLElement)return{name:`graphic in ${bt(s).name}`,path:n}}return{name:"graphic element",path:n}}if(o==="svg"){let t=En(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 oo(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 so(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 ro=new Set(["none","normal","auto","0px","rgba(0, 0, 0, 0)","transparent","static","visible"]),xs=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"]),ks=new Set(["input","textarea","select"]),vs=new Set(["img","video","canvas","svg"]),Cs=new Set(["div","section","article","nav","header","footer","aside","main","ul","ol","form","fieldset"]);function io(e){if(typeof window>"u")return{};let n=window.getComputedStyle(e),o={},t=e.tagName.toLowerCase(),s;xs.has(t)?s=["color","fontSize","fontWeight","fontFamily","lineHeight"]:t==="button"||t==="a"&&e.getAttribute("role")==="button"?s=["backgroundColor","color","padding","borderRadius","fontSize"]:ks.has(t)?s=["backgroundColor","color","padding","borderRadius","fontSize"]:vs.has(t)?s=["width","height","objectFit","borderRadius"]:Cs.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&&!ro.has(a)&&(o[r]=a)}return o}var ws=["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 ao(e){if(typeof window>"u")return"";let n=window.getComputedStyle(e),o=[];for(let t of ws){let s=t.replace(/([A-Z])/g,"-$1").toLowerCase(),r=n.getPropertyValue(s);r&&!ro.has(r)&&o.push(`${s}: ${r}`)}return o.join("; ")}function lo(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 co(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=En(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},uo=new Set(["Component","PureComponent","Fragment","Suspense","Profiler","StrictMode","Routes","Route","Outlet","Root","ErrorBoundaryHandler","HotReload","Hot"]),_o=[/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$/],Ss=[/Page$/,/View$/,/Screen$/,/Section$/,/Card$/,/List$/,/Item$/,/Form$/,/Modal$/,/Dialog$/,/Button$/,/Nav$/,/Header$/,/Footer$/,/Layout$/,/Panel$/,/Tab$/,/Menu$/];function Ns(e){let n=e?.mode??"filtered",o=uo;if(e?.skipExact){let t=e.skipExact instanceof Set?e.skipExact:new Set(e.skipExact);o=new Set([...uo,...t])}return{maxComponents:e?.maxComponents??6,maxDepth:e?.maxDepth??30,mode:n,skipExact:o,skipPatterns:e?.skipPatterns?[..._o,...e.skipPatterns]:_o,userPatterns:e?.userPatterns??Ss,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 Ts(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 Is(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 Es(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&&Is(e,t)||o.userPatterns.some(s=>s.test(e)));default:return!0}}var un=null,Rs=new WeakMap;function xt(e){return Object.keys(e).some(n=>n.startsWith("__reactFiber$")||n.startsWith("__reactInternalInstance$")||n.startsWith("__reactProps$"))}function Ms(){if(un!==null)return un;if(typeof document>"u")return!1;if(document.body&&xt(document.body))return un=!0,!0;let e=["#root","#app","#__next","[data-reactroot]"];for(let n of e){let o=document.querySelector(n);if(o&&xt(o))return un=!0,!0}if(document.body){for(let n of document.body.children)if(xt(n))return un=!0,!0}return un=!1,!1}var Rn={map:Rs};function As(e){return Object.keys(e).find(o=>o.startsWith("__reactFiber$")||o.startsWith("__reactInternalInstance$"))||null}function Ps(e){let n=As(e);return n?e[n]:null}function sn(e){return e?e.displayName?e.displayName:e.name?e.name:null:null}function Fs(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=sn(s.render);if(r)return r}return s?.displayName?s.displayName:sn(o)}if(n===W.MemoComponent||n===W.SimpleMemoComponent){let s=t;if(s?.type){let r=sn(s.type);if(r)return r}return s?.displayName?s.displayName:sn(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?sn(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?sn(o):null}function $s(e){return e.length<=2||e.length<=3&&e===e.toLowerCase()}function mo(e,n){let o=Ns(n),t=o.mode==="all";if(t){let _=Rn.map.get(e);if(_!==void 0)return _}if(!Ms()){let _={path:null,components:[]};return t&&Rn.map.set(e,_),_}let s=o.mode==="smart"?Ts(e):void 0,r=[];try{let _=Ps(e),k=0;for(;_&&k<o.maxDepth&&r.length<o.maxComponents;){let v=Fs(_);v&&!$s(v)&&Es(v,k,o,s)&&r.push(v),_=_.return,k++}}catch{let _={path:null,components:[]};return t&&Rn.map.set(e,_),_}if(r.length===0){let _={path:null,components:[]};return t&&Rn.map.set(e,_),_}let a={path:r.slice().reverse().map(_=>`<${_}>`).join(" "),components:r};return t&&Rn.map.set(e,a),a}import Bs from"react";var Mn={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 Hs(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 An(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 zs(e,n=50){let o=e,t=0;for(;o&&t<n;){if(o._debugSource)return{source:o._debugSource,componentName:An(o)};if(o._debugOwner?._debugSource)return{source:o._debugOwner._debugSource,componentName:An(o._debugOwner)};o=o.return,t++}return null}function Ds(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:An(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:An(n)}}}n=n.return,o++}return null}var Jn=new Map;function js(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===Mn.FunctionComponent||n===Mn.IndeterminateComponent)&&typeof o=="function")return o;if(n===Mn.ForwardRef&&t){let s=t.render;if(typeof s=="function")return s}if((n===Mn.MemoComponent||n===Mn.SimpleMemoComponent)&&t){let s=t.type;if(typeof s=="function")return s}return typeof o=="function"?o:null}function Ws(){let e=Bs,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 Os(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(k=>k.test(a)))continue;let
|
|
332
|
+
}`,fs={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=ps}var U=fs;import{jsx as eo,jsxs as Si}from"react/jsx-runtime";var no=({size:e=24})=>eo("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:eo("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 gs=["data-feedback-toolbar","data-annotation-popup","data-annotation-marker"],Li=gs.flatMap(e=>[`:not([${e}])`,`:not([${e}] *)`]).join("");var ht="__agentation_freeze";function hs(){if(typeof window>"u")return{frozen:!1,installed:!0,origSetTimeout:setTimeout,origSetInterval:setInterval,origRAF:n=>0,pausedAnimations:[],frozenTimeoutQueue:[],frozenRAFQueue:[]};let e=window;return e[ht]||(e[ht]={frozen:!1,installed:!1,origSetTimeout:null,origSetInterval:null,origRAF:null,pausedAnimations:[],frozenTimeoutQueue:[],frozenRAFQueue:[]}),e[ht]}var fe=hs();typeof window<"u"&&!fe.installed&&(fe.origSetTimeout=window.setTimeout.bind(window),fe.origSetInterval=window.setInterval.bind(window),fe.origRAF=window.requestAnimationFrame.bind(window),window.setTimeout=(e,n,...o)=>typeof e=="string"?fe.origSetTimeout(e,n):fe.origSetTimeout((...t)=>{fe.frozen?fe.frozenTimeoutQueue.push(()=>e(...t)):e(...t)},n,...o),window.setInterval=(e,n,...o)=>typeof e=="string"?fe.origSetInterval(e,n):fe.origSetInterval((...t)=>{fe.frozen||e(...t)},n,...o),window.requestAnimationFrame=e=>fe.origRAF(n=>{fe.frozen?fe.frozenRAFQueue.push(e):e(n)}),fe.installed=!0);var Ne=fe.origSetTimeout,Ti=fe.origSetInterval,Ii=fe.origRAF;import{jsx as Ce,jsxs as on}from"react/jsx-runtime";function yt(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 oo=ys(function({element:n,timestamp:o,selectedText:t,placeholder:s="What should change?",initialValue:r="",submitLabel:i="Add",onSubmit:a,onCancel:u,onDelete:k,style:v,accentColor:S="#3c82f7",isExiting:N=!1,lightMode:L=!1,computedStyles:E},D){let[K,de]=En(r),[ce,re]=En(!1),[F,A]=En("initial"),[Y,h]=En(!1),[z,T]=En(!1),ue=qn(null),R=qn(null),J=qn(null),oe=qn(null);to(()=>{N&&F!=="exit"&&A("exit")},[N,F]),to(()=>{Ne(()=>{A("enter")},0);let x=Ne(()=>{A("entered")},200),ee=Ne(()=>{let p=ue.current;p&&(yt(p),p.selectionStart=p.selectionEnd=p.value.length,p.scrollTop=p.scrollHeight)},50);return()=>{clearTimeout(x),clearTimeout(ee),J.current&&clearTimeout(J.current),oe.current&&clearTimeout(oe.current)}},[]);let _e=Gn(()=>{oe.current&&clearTimeout(oe.current),re(!0),oe.current=Ne(()=>{re(!1),yt(ue.current)},250)},[]);bs(D,()=>({shake:_e}),[_e]);let Me=Gn(()=>{A("exit"),J.current=Ne(()=>{u()},150)},[u]),ve=Gn(()=>{K.trim()&&a(K.trim())},[K,a]),me=Gn(x=>{x.stopPropagation(),!x.nativeEvent.isComposing&&(x.key==="Enter"&&(x.metaKey||x.ctrlKey)&&(x.preventDefault(),ve()),x.key==="Escape"&&Me())},[ve,Me]),b=[U.popup,L?U.light:"",F==="enter"?U.enter:"",F==="entered"?U.entered:"",F==="exit"?U.exit:"",ce?U.shake:""].filter(Boolean).join(" ");return on("div",{ref:R,className:b,"data-annotation-popup":!0,style:v,onClick:x=>x.stopPropagation(),children:[on("div",{className:U.header,children:[E&&Object.keys(E).length>0?on("button",{className:U.headerToggle,onClick:()=>{let x=z;T(!z),x&&Ne(()=>yt(ue.current),0)},type:"button",children:[Ce("svg",{className:`${U.chevron} ${z?U.expanded:""}`,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:Ce("path",{d:"M5.5 10.25L9 7.25L5.75 4",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}),Ce("span",{className:U.element,children:n})]}):Ce("span",{className:U.element,children:n}),o&&Ce("span",{className:U.timestamp,children:o})]}),E&&Object.keys(E).length>0&&Ce("div",{className:`${U.stylesWrapper} ${z?U.expanded:""}`,children:Ce("div",{className:U.stylesInner,children:Ce("div",{className:U.stylesBlock,children:Object.entries(E).map(([x,ee])=>on("div",{className:U.styleLine,children:[Ce("span",{className:U.styleProperty,children:x.replace(/([A-Z])/g,"-$1").toLowerCase()}),": ",Ce("span",{className:U.styleValue,children:ee}),";"]},x))})})}),t&&on("div",{className:U.quote,children:["\u201C",t.slice(0,80),t.length>80?"...":"","\u201D"]}),Ce("textarea",{ref:ue,className:U.textarea,style:{borderColor:Y?S:void 0},placeholder:s,value:K,onChange:x=>{de(x.target.value);let ee=x.target;ee.style.height="auto",ee.style.height=`${Math.min(ee.scrollHeight,200)}px`},onFocus:()=>h(!0),onBlur:()=>h(!1),rows:4,onKeyDown:me}),on("div",{className:U.actions,children:[k&&Ce("div",{className:U.deleteWrapper,children:Ce("button",{className:U.deleteButton,onClick:k,type:"button",children:Ce(no,{size:22})})}),Ce("button",{className:U.cancel,onClick:Me,children:"Cancel"}),Ce("button",{className:U.submit,style:{backgroundColor:S,opacity:K.trim()?1:.4},onClick:ve,disabled:!K.trim(),children:i})]}),on("div",{className:U.shortcutHint,children:[navigator?.platform?.includes("Mac")?"\u2318":"Ctrl","+Enter to submit"]})]})});function Rn(e){if(e.parentElement)return e.parentElement;let n=e.getRootNode();return n instanceof ShadowRoot?n.host:null}function sn(e,n){let o=e;for(;o;){if(o.matches(n))return o;o=Rn(o)}return null}function xs(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 u=t.className.split(/\s+/).find(k=>k.length>2&&!k.match(/^[a-z]{1,2}$/)&&!k.match(/[A-Z0-9]{5,}/));u&&(i=`.${u.split("_")[0]}`)}let a=Rn(t);!t.parentElement&&a&&(i=`\u27E8shadow\u27E9 ${i}`),o.unshift(i),t=a,s++}return o.join(" > ")}function bt(e){let n=xs(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=sn(e,"svg");if(t){let s=Rn(t);if(s instanceof HTMLElement)return{name:`graphic in ${bt(s).name}`,path:n}}return{name:"graphic element",path:n}}if(o==="svg"){let t=Rn(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 so(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 ro(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 io=new Set(["none","normal","auto","0px","rgba(0, 0, 0, 0)","transparent","static","visible"]),ks=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"]),vs=new Set(["input","textarea","select"]),ws=new Set(["img","video","canvas","svg"]),Cs=new Set(["div","section","article","nav","header","footer","aside","main","ul","ol","form","fieldset"]);function ao(e){if(typeof window>"u")return{};let n=window.getComputedStyle(e),o={},t=e.tagName.toLowerCase(),s;ks.has(t)?s=["color","fontSize","fontWeight","fontFamily","lineHeight"]:t==="button"||t==="a"&&e.getAttribute("role")==="button"?s=["backgroundColor","color","padding","borderRadius","fontSize"]:vs.has(t)?s=["backgroundColor","color","padding","borderRadius","fontSize"]:ws.has(t)?s=["width","height","objectFit","borderRadius"]:Cs.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&&!io.has(a)&&(o[r]=a)}return o}var Ss=["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 lo(e){if(typeof window>"u")return"";let n=window.getComputedStyle(e),o=[];for(let t of Ss){let s=t.replace(/([A-Z])/g,"-$1").toLowerCase(),r=n.getPropertyValue(s);r&&!io.has(r)&&o.push(`${s}: ${r}`)}return o.join("; ")}function co(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 uo(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=Rn(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},_o=new Set(["Component","PureComponent","Fragment","Suspense","Profiler","StrictMode","Routes","Route","Outlet","Root","ErrorBoundaryHandler","HotReload","Hot"]),mo=[/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$/],Ns=[/Page$/,/View$/,/Screen$/,/Section$/,/Card$/,/List$/,/Item$/,/Form$/,/Modal$/,/Dialog$/,/Button$/,/Nav$/,/Header$/,/Footer$/,/Layout$/,/Panel$/,/Tab$/,/Menu$/];function Ls(e){let n=e?.mode??"filtered",o=_o;if(e?.skipExact){let t=e.skipExact instanceof Set?e.skipExact:new Set(e.skipExact);o=new Set([..._o,...t])}return{maxComponents:e?.maxComponents??6,maxDepth:e?.maxDepth??30,mode:n,skipExact:o,skipPatterns:e?.skipPatterns?[...mo,...e.skipPatterns]:mo,userPatterns:e?.userPatterns??Ns,filter:e?.filter}}function Ts(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/([A-Z])([A-Z][a-z])/g,"$1-$2").toLowerCase()}function Is(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 Es(e,n){let o=Ts(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 Rs(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&&Es(e,t)||o.userPatterns.some(s=>s.test(e)));default:return!0}}var _n=null,Ms=new WeakMap;function xt(e){return Object.keys(e).some(n=>n.startsWith("__reactFiber$")||n.startsWith("__reactInternalInstance$")||n.startsWith("__reactProps$"))}function As(){if(_n!==null)return _n;if(typeof document>"u")return!1;if(document.body&&xt(document.body))return _n=!0,!0;let e=["#root","#app","#__next","[data-reactroot]"];for(let n of e){let o=document.querySelector(n);if(o&&xt(o))return _n=!0,!0}if(document.body){for(let n of document.body.children)if(xt(n))return _n=!0,!0}return _n=!1,!1}var Mn={map:Ms};function Fs(e){return Object.keys(e).find(o=>o.startsWith("__reactFiber$")||o.startsWith("__reactInternalInstance$"))||null}function Ps(e){let n=Fs(e);return n?e[n]:null}function rn(e){return e?e.displayName?e.displayName:e.name?e.name:null:null}function $s(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=rn(s.render);if(r)return r}return s?.displayName?s.displayName:rn(o)}if(n===W.MemoComponent||n===W.SimpleMemoComponent){let s=t;if(s?.type){let r=rn(s.type);if(r)return r}return s?.displayName?s.displayName:rn(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?rn(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?rn(o):null}function Bs(e){return e.length<=2||e.length<=3&&e===e.toLowerCase()}function po(e,n){let o=Ls(n),t=o.mode==="all";if(t){let u=Mn.map.get(e);if(u!==void 0)return u}if(!As()){let u={path:null,components:[]};return t&&Mn.map.set(e,u),u}let s=o.mode==="smart"?Is(e):void 0,r=[];try{let u=Ps(e),k=0;for(;u&&k<o.maxDepth&&r.length<o.maxComponents;){let v=$s(u);v&&!Bs(v)&&Rs(v,k,o,s)&&r.push(v),u=u.return,k++}}catch{let u={path:null,components:[]};return t&&Mn.map.set(e,u),u}if(r.length===0){let u={path:null,components:[]};return t&&Mn.map.set(e,u),u}let a={path:r.slice().reverse().map(u=>`<${u}>`).join(" "),components:r};return t&&Mn.map.set(e,a),a}import Hs from"react";var An={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 zs(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 Fn(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 Ds(e,n=50){let o=e,t=0;for(;o&&t<n;){if(o._debugSource)return{source:o._debugSource,componentName:Fn(o)};if(o._debugOwner?._debugSource)return{source:o._debugOwner._debugSource,componentName:Fn(o._debugOwner)};o=o.return,t++}return null}function js(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:Fn(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:Fn(n)}}}n=n.return,o++}return null}var Jn=new Map;function Ws(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===An.FunctionComponent||n===An.IndeterminateComponent)&&typeof o=="function")return o;if(n===An.ForwardRef&&t){let s=t.render;if(typeof s=="function")return s}if((n===An.MemoComponent||n===An.SimpleMemoComponent)&&t){let s=t.type;if(typeof s=="function")return s}return typeof o=="function"?o:null}function Os(){let e=Hs,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 Vs(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(k=>k.test(a)))continue;let u=t.exec(a)||s.exec(a);if(u&&(r++,r>=3))return{fileName:u[1],line:parseInt(u[2],10),column:parseInt(u[3],10)}}return null}function Us(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 Ks(e){let n=Ws(e);if(!n)return null;if(Jn.has(n))return Jn.get(n);let o=Os();if(!o)return Jn.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=Vs(i.stack);a&&(s={fileName:Us(a.fileName),lineNumber:a.line,columnNumber:a.column,componentName:Fn(e)||void 0})}}}finally{o.set(t)}return Jn.set(n,s),s}function Zs(e,n=15){let o=[],t=new Set,s=e,r=0;for(;s&&r<n;){let i=Ks(s);i&&!t.has(i.fileName)&&(t.add(i.fileName),o.push(i)),s=s.return,r++}return o}function Pn(e){let n=zs(e);if(!n)return{found:!1,reason:"no-fiber",isReactApp:!1,isProduction:!1};let o=Ds(n);if(o||(o=js(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=Zs(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 et(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 kt(e,n=10){let o=e,t=0;for(;o&&t<n;){let s=Pn(o);if(s.found)return s;o=o.parentElement,t++}return Pn(e)}async function nt(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 fo(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(u=>u.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 Le=[],Bn=[],go=!1;function vt(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 Fn(e,n){$n.push({level:e,message:n.slice(0,500),timestamp:Date.now()}),$n.length>50&&$n.shift()}function Zs(){if(fo||typeof window>"u")return;fo=!0;let e=console.error,n=console.warn,o=console.log;console.error=(...t)=>{let s=vt(t);Te.push(s.slice(0,500)),Te.length>20&&Te.shift(),Fn("error",s),e.apply(console,t)},console.warn=(...t)=>{let s=vt(t);Te.push(`[warn] ${s}`.slice(0,500)),Te.length>20&&Te.shift(),Fn("warn",s),n.apply(console,t)},console.log=(...t)=>{Fn("log",vt(t)),o.apply(console,t)},window.addEventListener("error",t=>{let s=`${t.message} (${t.filename}:${t.lineno})`;Te.push(s.slice(0,500)),Te.length>20&&Te.shift(),Fn("error",s)}),window.addEventListener("unhandledrejection",t=>{let s=`Unhandled Promise: ${t.reason}`;Te.push(s.slice(0,500)),Te.length>20&&Te.shift(),Fn("error",s)})}Zs();function Xs(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 Ys=[/session/i,/csrf/i,/xsrf/i,/secret/i,/password/i,/key/i];function Qs(){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=Ys.some(i=>i.test(s));e[s]=r?"[masked]":decodeURIComponent(t.join("=")).slice(0,200)})}catch{}return e}function go(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 qs(){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=go(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=go(s);if(r&&r.sub){let i={},a=["sub","email","name","role","roles","org","iat","exp"];for(let _ of a)_ in r&&(i[_]=r[_]);return Object.keys(i).length>0?i:null}}}catch{}return null}function _n(e){let n=Math.round(e);return isNaN(n)||!isFinite(n)?void 0:n}function Gs(){if(typeof performance>"u")return{};let e={};try{let n=performance.getEntriesByType("navigation")[0];if(n){let s=_n(n.loadEventEnd-n.startTime),r=_n(n.domContentLoadedEventEnd-n.startTime),i=_n(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=_n(o.startTime);s&&(e.firstContentfulPaint=s)}let t=performance.memory;if(t){let s=_n(t.usedJSHeapSize/1024/1024),r=_n(t.totalJSHeapSize/1024/1024);s&&(e.usedJSHeapMB=s),r&&(e.totalJSHeapMB=r)}}catch{}return e}function ho(e){let n={url:window.location.href,timestamp:new Date().toISOString(),browser:Xs(navigator.userAgent),userAgent:navigator.userAgent,viewport:`${window.innerWidth}x${window.innerHeight}`,pixelRatio:window.devicePixelRatio,language:navigator.language,referrer:document.referrer,cookies:Qs(),jwtClaims:qs()??void 0,consoleErrors:Te.length>0?[...Te]:void 0,consoleLogs:$n.length>0?[...$n]:void 0,performance:Gs()};if(e)try{let o=e();o&&(n.user={...o,id:String(o.id),name:String(o.name||"")})}catch{}return n}var Js="/_next/static/chunks/impakers-debug-route-manifest.json",tt=null,ot=!1;function yo(e){return!e||e==="/"?"/":e.endsWith("/")?e.slice(0,-1)||"/":e}function er(e){let n=yo(e);return n==="/"?[]:n.slice(1).split("/").map(o=>decodeURIComponent(o)).filter(Boolean)}function nr(e){return/^\[[^\]]+\]$/.test(e)}function tr(e){return/^\[\.\.\.[^\]]+\]$/.test(e)}function or(e){return/^\[\[\.\.\.[^\]]+\]\]$/.test(e)}function sr(e,n){let o=0,t=0,s=0;for(;o<e.length;){let r=e[o];if(or(r)){s+=1,t=n.length,o+=1;break}if(tr(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(nr(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 rr(){return ot?null:tt||(tt=(async()=>{try{let e=await fetch(Js,{cache:"force-cache"});if(!e.ok)return ot=!0,null;let n=await e.json();return!n||typeof n!="object"||!Array.isArray(n.entries)?(ot=!0,null):n}catch{return ot=!0,null}})(),tt)}function ir(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 bo(e){if(typeof window>"u")return null;let n=e??window.location.pathname,o=await rr();if(!o)return null;let t=er(n),s=null,r=-1;for(let i of o.entries){let a=sr(i.segments,t);a!==null&&a>r&&(r=a,s=i)}return s?{targets:ir(s),context:{pathname:yo(n),matchedRoute:s.route,source:"next-route-manifest"}}:null}function xo(...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 ko(){let e=en();if(!e)throw new Error("\uC778\uC99D\uC774 \uD544\uC694\uD569\uB2C8\uB2E4");return e}async function Oe(e,n={}){let o=ko(),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 st=new Map,Ct=new Map,Bn=new Map,ar=3e4;function Ye(e){return`feedbacks:${e}`}function mn(){return"feedbacks:__all__"}function qe(e){return`comments:${e}`}function De(e,n){st.set(e,{data:n,timestamp:Date.now()});let o=Bn.get(e);o&&o.forEach(t=>t(n))}function Qe(e){return st.get(e)?.data??null}function lr(e){let n=st.get(e);return n?Date.now()-n.timestamp<=ar:!1}function St(e){return Array.from(st.keys()).filter(n=>n.includes(e))}function dr(e){let n=new Map;for(let o of St(e)){let t=Qe(o);t!==null&&n.set(o,t)}return n}function cr(e){e.forEach((n,o)=>De(o,n))}function wt(e,n){let o=n(Qe(e));return De(e,o),o}function ur(e,n){for(let o of St(e)){let t=Qe(o);t!==null&&De(o,n(t))}}async function Hn(e,n){let o=Ct.get(e);if(o)return o;let t=(async()=>{try{let s=await n();return De(e,s),s}finally{Ct.delete(e)}})();return Ct.set(e,t),t}async function Nt(e,n,o={}){let t=Qe(e);return t!==null&&!o.force?((o.staleWhileRevalidate||!lr(e))&&Hn(e,n),t):Hn(e,n)}function zn(e,n){let o=Bn.get(e)||new Set;return o.add(n),Bn.set(e,o),()=>{let t=Bn.get(e);t&&(t.delete(n),t.size===0&&Bn.delete(e))}}function pn(e){return Qe(e)}async function vo(e,n){let o=`temp-task-${Date.now()}`,t=n.feedbackUrl,s=n.feedbackMarker,r=t?Qe(Ye(t))||[]:null,i=Qe(mn()),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&&(De(Ye(t),[a,...r]),i&&De(mn(),[a,...i]));try{let k=await(await Oe(e,{method:"POST",body:JSON.stringify(n)})).json().catch(()=>({}));if(t&&a){let v={...a,id:k.taskId||o,taskNumber:k.taskNumber||0,_optimistic:!1};wt(Ye(t),C=>(C||[]).map(w=>w.id===o?v:w)),i&&wt(mn(),C=>(C||[]).map(w=>w.id===o?v:w)),So(e,t).catch(()=>{}),i&&No(e).catch(()=>{})}return k}catch(_){throw t&&r&&De(Ye(t),r),i&&De(mn(),i),_}}async function Co(e,n,o={}){let t=Ye(n);return Nt(t,async()=>(await(await Oe(`${e}?url=${encodeURIComponent(n)}`)).json()).tasks||[],o)}async function wo(e,n={}){let o=mn();return Nt(o,async()=>(await(await Oe(`${e}?url=__all__`)).json()).tasks||[],n)}async function So(e,n){let o=Ye(n);return Hn(o,async()=>(await(await Oe(`${e}?url=${encodeURIComponent(n)}`)).json()).tasks||[])}async function No(e){let n=mn();return Hn(n,async()=>(await(await Oe(`${e}?url=__all__`)).json()).tasks||[])}async function rt(e,n,o={}){let t=qe(n);return Nt(t,async()=>(await(await Oe(`${e}/${n}/comments`)).json()).comments||[],o)}async function _r(e,n){let o=qe(n);return Hn(o,async()=>(await(await Oe(`${e}/${n}/comments`)).json()).comments||[])}function mr(e,n){ur("feedbacks:",o=>o.map(t=>t.id===e?{...t,commentCount:Math.max(0,(t.commentCount||0)+n)}:t))}function pr(e){St("feedbacks:").forEach(o=>{let t=o.replace("feedbacks:","");t==="__all__"?No(e).catch(()=>{}):So(e,t).catch(()=>{})})}async function it(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()},_=qe(n),k=Qe(_)||[],v=dr("feedbacks:");De(_,[...k,a]),mr(n,1);try{let B=(await(await Oe(`${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 wt(_,R=>(R||[]).map(D=>D.id===a.id?B:D)),_r(e,n),pr(e),B}catch(C){throw De(_,k),cr(v),C}}var fr=4.5*1024*1024;async function at(e,n,o,t){if(n.size>fr)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=ko(),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 lt(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 Oe(s)).json()).events||[]}import{AnyMap as Lo,originalPositionFor as gr}from"@jridgewell/trace-mapping";var Dn=new Map,To=new Set;async function hr(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 yr(e){if(Dn.has(e))return Dn.get(e)??null;if(To.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 Lo(s);return Dn.set(e,r),r}}catch{}let o=await hr(e);if(o)try{let t=await fetch(o,{cache:"force-cache"});if(t.ok){let s=await t.json(),r=new Lo(s);return Dn.set(e,r),r}}catch{}return To.add(e),Dn.set(e,null),null}async function br(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 yr(t);if(!s)return null;try{let r=gr(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 Lt(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:br(o,r,i)}var xr=`@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 $n(e,n){Bn.push({level:e,message:n.slice(0,500),timestamp:Date.now()}),Bn.length>50&&Bn.shift()}function Xs(){if(go||typeof window>"u")return;go=!0;let e=console.error,n=console.warn,o=console.log;console.error=(...t)=>{let s=vt(t);Le.push(s.slice(0,500)),Le.length>20&&Le.shift(),$n("error",s),e.apply(console,t)},console.warn=(...t)=>{let s=vt(t);Le.push(`[warn] ${s}`.slice(0,500)),Le.length>20&&Le.shift(),$n("warn",s),n.apply(console,t)},console.log=(...t)=>{$n("log",vt(t)),o.apply(console,t)},window.addEventListener("error",t=>{let s=`${t.message} (${t.filename}:${t.lineno})`;Le.push(s.slice(0,500)),Le.length>20&&Le.shift(),$n("error",s)}),window.addEventListener("unhandledrejection",t=>{let s=`Unhandled Promise: ${t.reason}`;Le.push(s.slice(0,500)),Le.length>20&&Le.shift(),$n("error",s)})}Xs();function Ys(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 Qs=[/session/i,/csrf/i,/xsrf/i,/secret/i,/password/i,/key/i];function qs(){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=Qs.some(i=>i.test(s));e[s]=r?"[masked]":decodeURIComponent(t.join("=")).slice(0,200)})}catch{}return e}function ho(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 Gs(){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=ho(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=ho(s);if(r&&r.sub){let i={},a=["sub","email","name","role","roles","org","iat","exp"];for(let u of a)u in r&&(i[u]=r[u]);return Object.keys(i).length>0?i:null}}}catch{}return null}function mn(e){let n=Math.round(e);return isNaN(n)||!isFinite(n)?void 0:n}function Js(){if(typeof performance>"u")return{};let e={};try{let n=performance.getEntriesByType("navigation")[0];if(n){let s=mn(n.loadEventEnd-n.startTime),r=mn(n.domContentLoadedEventEnd-n.startTime),i=mn(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=mn(o.startTime);s&&(e.firstContentfulPaint=s)}let t=performance.memory;if(t){let s=mn(t.usedJSHeapSize/1024/1024),r=mn(t.totalJSHeapSize/1024/1024);s&&(e.usedJSHeapMB=s),r&&(e.totalJSHeapMB=r)}}catch{}return e}function yo(e){let n={url:window.location.href,timestamp:new Date().toISOString(),browser:Ys(navigator.userAgent),userAgent:navigator.userAgent,viewport:`${window.innerWidth}x${window.innerHeight}`,pixelRatio:window.devicePixelRatio,language:navigator.language,referrer:document.referrer,cookies:qs(),jwtClaims:Gs()??void 0,consoleErrors:Le.length>0?[...Le]:void 0,consoleLogs:Bn.length>0?[...Bn]:void 0,performance:Js()};if(e)try{let o=e();o&&(n.user={...o,id:String(o.id),name:String(o.name||"")})}catch{}return n}var er="/_next/static/chunks/impakers-debug-route-manifest.json",tt=null,ot=!1;function bo(e){return!e||e==="/"?"/":e.endsWith("/")?e.slice(0,-1)||"/":e}function nr(e){let n=bo(e);return n==="/"?[]:n.slice(1).split("/").map(o=>decodeURIComponent(o)).filter(Boolean)}function tr(e){return/^\[[^\]]+\]$/.test(e)}function or(e){return/^\[\.\.\.[^\]]+\]$/.test(e)}function sr(e){return/^\[\[\.\.\.[^\]]+\]\]$/.test(e)}function rr(e,n){let o=0,t=0,s=0;for(;o<e.length;){let r=e[o];if(sr(r)){s+=1,t=n.length,o+=1;break}if(or(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(tr(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 ir(){return ot?null:tt||(tt=(async()=>{try{let e=await fetch(er,{cache:"force-cache"});if(!e.ok)return ot=!0,null;let n=await e.json();return!n||typeof n!="object"||!Array.isArray(n.entries)?(ot=!0,null):n}catch{return ot=!0,null}})(),tt)}function ar(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 xo(e){if(typeof window>"u")return null;let n=e??window.location.pathname,o=await ir();if(!o)return null;let t=nr(n),s=null,r=-1;for(let i of o.entries){let a=rr(i.segments,t);a!==null&&a>r&&(r=a,s=i)}return s?{targets:ar(s),context:{pathname:bo(n),matchedRoute:s.route,source:"next-route-manifest"}}:null}function ko(...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 vo(){let e=nn();if(!e)throw new Error("\uC778\uC99D\uC774 \uD544\uC694\uD569\uB2C8\uB2E4");return e}async function Oe(e,n={}){let o=vo(),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 st=new Map,wt=new Map,Hn=new Map,lr=3e4;function Qe(e){return`feedbacks:${e}`}function pn(){return"feedbacks:__all__"}function Ge(e){return`comments:${e}`}function De(e,n){st.set(e,{data:n,timestamp:Date.now()});let o=Hn.get(e);o&&o.forEach(t=>t(n))}function qe(e){return st.get(e)?.data??null}function dr(e){let n=st.get(e);return n?Date.now()-n.timestamp<=lr:!1}function St(e){return Array.from(st.keys()).filter(n=>n.includes(e))}function cr(e){let n=new Map;for(let o of St(e)){let t=qe(o);t!==null&&n.set(o,t)}return n}function ur(e){e.forEach((n,o)=>De(o,n))}function Ct(e,n){let o=n(qe(e));return De(e,o),o}function _r(e,n){for(let o of St(e)){let t=qe(o);t!==null&&De(o,n(t))}}async function zn(e,n){let o=wt.get(e);if(o)return o;let t=(async()=>{try{let s=await n();return De(e,s),s}finally{wt.delete(e)}})();return wt.set(e,t),t}async function Nt(e,n,o={}){let t=qe(e);return t!==null&&!o.force?((o.staleWhileRevalidate||!dr(e))&&zn(e,n),t):zn(e,n)}function Dn(e,n){let o=Hn.get(e)||new Set;return o.add(n),Hn.set(e,o),()=>{let t=Hn.get(e);t&&(t.delete(n),t.size===0&&Hn.delete(e))}}function fn(e){return qe(e)}async function wo(e,n){let o=`temp-task-${Date.now()}`,t=n.feedbackUrl,s=n.feedbackMarker,r=t?qe(Qe(t))||[]:null,i=qe(pn()),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&&(De(Qe(t),[a,...r]),i&&De(pn(),[a,...i]));try{let k=await(await Oe(e,{method:"POST",body:JSON.stringify(n)})).json().catch(()=>({}));if(t&&a){let v={...a,id:k.taskId||o,taskNumber:k.taskNumber||0,_optimistic:!1};Ct(Qe(t),S=>(S||[]).map(N=>N.id===o?v:N)),i&&Ct(pn(),S=>(S||[]).map(N=>N.id===o?v:N)),No(e,t).catch(()=>{}),i&&Lo(e).catch(()=>{})}return k}catch(u){throw t&&r&&De(Qe(t),r),i&&De(pn(),i),u}}async function Co(e,n,o={}){let t=Qe(n);return Nt(t,async()=>(await(await Oe(`${e}?url=${encodeURIComponent(n)}`)).json()).tasks||[],o)}async function So(e,n={}){let o=pn();return Nt(o,async()=>(await(await Oe(`${e}?url=__all__`)).json()).tasks||[],n)}async function No(e,n){let o=Qe(n);return zn(o,async()=>(await(await Oe(`${e}?url=${encodeURIComponent(n)}`)).json()).tasks||[])}async function Lo(e){let n=pn();return zn(n,async()=>(await(await Oe(`${e}?url=__all__`)).json()).tasks||[])}async function rt(e,n,o={}){let t=Ge(n);return Nt(t,async()=>(await(await Oe(`${e}/${n}/comments`)).json()).comments||[],o)}async function mr(e,n){let o=Ge(n);return zn(o,async()=>(await(await Oe(`${e}/${n}/comments`)).json()).comments||[])}function pr(e,n){_r("feedbacks:",o=>o.map(t=>t.id===e?{...t,commentCount:Math.max(0,(t.commentCount||0)+n)}:t))}function fr(e){St("feedbacks:").forEach(o=>{let t=o.replace("feedbacks:","");t==="__all__"?Lo(e).catch(()=>{}):No(e,t).catch(()=>{})})}async function it(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()},u=Ge(n),k=qe(u)||[],v=cr("feedbacks:");De(u,[...k,a]),pr(n,1);try{let L=(await(await Oe(`${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 Ct(u,E=>(E||[]).map(D=>D.id===a.id?L:D)),mr(e,n),fr(e),L}catch(S){throw De(u,k),ur(v),S}}var gr=4.5*1024*1024;async function at(e,n,o,t){if(n.size>gr)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=vo(),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 lt(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 Oe(s)).json()).events||[]}import{AnyMap as To,originalPositionFor as hr}from"@jridgewell/trace-mapping";var jn=new Map,Io=new Set;async function yr(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 br(e){if(jn.has(e))return jn.get(e)??null;if(Io.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 To(s);return jn.set(e,r),r}}catch{}let o=await yr(e);if(o)try{let t=await fetch(o,{cache:"force-cache"});if(t.ok){let s=await t.json(),r=new To(s);return jn.set(e,r),r}}catch{}return Io.add(e),jn.set(e,null),null}async function xr(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 br(t);if(!s)return null;try{let r=hr(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 Lt(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:xr(o,r,i)}var kr=`@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
|
-
}`,
|
|
443
|
+
}`,vr={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=kr}var He=vr;import{jsx as gn,jsxs as Tt}from"react/jsx-runtime";var wr="#3b82f6",Cr="#9ca3af";function It({annotation:e,layerIndex:n,isAnimated:o,isHovered:t,accentColor:s,onHover:r,onHoverEnd:i,onClick:a}){let u=o?"":He.enter,k=e.status==="done"||e.status==="resolved",v=e.status==="in_progress",S=k?Cr:v?wr:s;return Tt("div",{className:`${He.marker} ${u} ${t?He.hovered:""} ${k?He.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:[gn("span",{children:n+1}),t&&Tt("div",{className:`${He.markerTooltip} ${He.enter}`,children:[gn("span",{className:He.markerQuote,children:e.element}),e.comment&&gn("span",{className:He.markerNote,children:e.comment})]})]})}function Eo({x:e,y:n,accentColor:o}){return gn("div",{className:`${He.pending} ${He.enter}`,"data-annotation-marker":!0,style:{left:`${e}%`,top:n,backgroundColor:o},children:Tt("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",children:[gn("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),gn("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})})}import{useState as hn,useRef as Et,useEffect as Mo,useCallback as an}from"react";var Sr=`@keyframes styles-module__spin___h0C6p {
|
|
444
444
|
to {
|
|
445
445
|
transform: rotate(360deg);
|
|
446
446
|
}
|
|
@@ -466,7 +466,7 @@ ${n.stack?.split(`
|
|
|
466
466
|
.styles-module__message___70Ayy {
|
|
467
467
|
font-size: 12px;
|
|
468
468
|
color: #9ca3af;
|
|
469
|
-
}`,
|
|
469
|
+
}`,Nr={container:"styles-module__container___YKn1h",spinner:"styles-module__spinner___4ELZK",spin:"styles-module__spin___h0C6p",message:"styles-module__message___70Ayy"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-loading-spinner-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-loading-spinner-styles",document.head.appendChild(e)),e.textContent=Sr}var dt=Nr;import{jsx as Ro,jsxs as Lr}from"react/jsx-runtime";function ct({message:e="\uB85C\uB529 \uC911..."}){return Lr("div",{className:dt.container,children:[Ro("div",{className:dt.spinner}),Ro("span",{className:dt.message,children:e})]})}var Tr=`@keyframes styles-module__threadIn___pBTFZ {
|
|
470
470
|
from {
|
|
471
471
|
opacity: 0;
|
|
472
472
|
transform: scale(0.96) translateY(4px);
|
|
@@ -489,7 +489,7 @@ ${n.stack?.split(`
|
|
|
489
489
|
.styles-module__thread___ua2EO {
|
|
490
490
|
position: fixed;
|
|
491
491
|
width: 340px;
|
|
492
|
-
max-height: min(480px,
|
|
492
|
+
max-height: min(480px, var(--thread-max-height, calc(100vh - 40px)));
|
|
493
493
|
background: #fff;
|
|
494
494
|
border-radius: 12px;
|
|
495
495
|
box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
|
|
@@ -950,7 +950,7 @@ ${n.stack?.split(`
|
|
|
950
950
|
}
|
|
951
951
|
.styles-module__lightboxClose___tGZlm:hover {
|
|
952
952
|
background: rgba(255, 255, 255, 0.25);
|
|
953
|
-
}`,Tr={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=Lr}var N=Tr;import{Fragment as $o,jsx as E,jsxs as de}from"react/jsx-runtime";function Mo(e){let n=new Date(e),o=Date.now()-n.getTime(),t=_=>String(_).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 Po(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 Bo({task:e,currentUserName:n,currentUserId:o,left:t,top:s,bottom:r,loading:i,onClose:a,onReply:_}){let[k,v]=gn(""),[C,w]=gn(!1),[B,R]=gn(null),[D,K]=gn(null),[ce,ue]=gn(!1),re=Et(null),A=Et(null),[M,Y]=gn(null),h=Et(null);Ro(()=>{A.current&&(A.current.scrollTop=A.current.scrollHeight),re.current?.focus()},[e.comments.length]),Ro(()=>{if(ce)return;let b=x=>{let ee=x.target;ee.closest(`.${N.thread}`)||ee.closest("[data-annotation-marker]")||ee.closest("[data-impakers-debug]")||z()};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[ce]);let z=rn(()=>{w(!0),setTimeout(()=>a(),120)},[a]),T=rn(()=>{!k.trim()&&!B&&!D||(_(e.id,k.trim(),B||void 0,D||void 0),v(""),R(null),K(null))},[k,B,D,e.id,_]),_e=rn(b=>{b.stopPropagation(),!b.nativeEvent.isComposing&&(b.key==="Enter"&&!b.shiftKey&&(b.preventDefault(),T()),b.key==="Escape"&&z())},[z,T]),I=rn(()=>{ue(!0);let b=document.querySelectorAll("[data-impakers-debug], [data-annotation-marker]");b.forEach(F=>F.style.visibility="hidden"),document.documentElement.classList.add("impakers-selecting");let x=null,ee=F=>{x||(x=document.createElement("div"),x.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(x)),x.style.left=`${F.left}px`,x.style.top=`${F.top}px`,x.style.width=`${F.width}px`,x.style.height=`${F.height}px`},p=()=>{document.removeEventListener("mousemove",P),document.removeEventListener("click",ie,!0),document.removeEventListener("keydown",H),document.documentElement.classList.remove("impakers-selecting"),x?.remove(),b.forEach(F=>F.style.visibility=""),ue(!1)},P=F=>{let Z=document.elementFromPoint(F.clientX,F.clientY);!Z||Z===x||ee(Z.getBoundingClientRect())},H=F=>{F.key==="Escape"&&p()},ie=async F=>{F.preventDefault(),F.stopPropagation(),F.stopImmediatePropagation();let Z=document.elementFromPoint(F.clientX,F.clientY);if(p(),!!Z){try{let te=await nt(Z);R(te)}catch(te){console.error("[@impakers/debug] DOM \uC2A4\uD06C\uB9B0\uC0F7 \uC2E4\uD328:",te)}re.current?.focus()}};document.addEventListener("mousemove",P),document.addEventListener("click",ie,!0),document.addEventListener("keydown",H)},[]),J=rn(()=>{I()},[I]),oe=rn(()=>{h.current?.click()},[]),me=rn(b=>{let x=b.target.files?.[0];if(x){if(x.size>4.5*1024*1024){console.warn("[@impakers/debug] \uD30C\uC77C \uD06C\uAE30\uAC00 4.5MB\uB97C \uCD08\uACFC\uD569\uB2C8\uB2E4."),b.target.value="";return}if(x.type.startsWith("image/")){K(null);let ee=new FileReader;ee.onload=()=>{R(ee.result)},ee.readAsDataURL(x)}else R(null),K(x);b.target.value=""}},[]),Me=e.title.replace(/^\[피드백\]\s*/,""),pe={left:t,...s!==void 0?{top:s}:{},...r!==void 0?{bottom:r}:{},"--thread-top":`${s!==void 0?s:40}px`};return de("div",{className:`${N.thread} ${C?N.exiting:""}`,style:pe,"data-impakers-debug":"",onClick:b=>b.stopPropagation(),children:[de("div",{className:N.header,children:[E("div",{className:N.avatar,children:Ao(e.authorName||n)}),de("div",{className:N.headerInfo,children:[de("div",{className:N.headerTop,children:[E("span",{className:N.authorName,children:e.authorName||n}),E("span",{className:N.timestamp,children:Mo(e.createdAt)})]}),E("div",{className:N.title,children:Me})]}),E("div",{className:N.headerActions,children:E("button",{className:N.headerAction,onClick:z,title:"\uB2EB\uAE30",type:"button",children:E("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:E("path",{d:"M18 6L6 18M6 6l12 12"})})})})]}),i&&e.comments.length===0&&de($o,{children:[E("div",{className:N.divider}),E(ct,{message:"\uB313\uAE00 \uB85C\uB529 \uC911..."})]}),e.comments.length>0&&de($o,{children:[E("div",{className:N.divider}),E("div",{className:N.commentsList,ref:A,children:e.comments.map(b=>de("div",{className:N.comment,children:[E("div",{className:N.avatar,style:{width:22,height:22,fontSize:10},children:Ao(b.authorName)}),de("div",{className:N.commentContent,children:[de("div",{className:N.commentTop,children:[E("span",{className:N.commentAuthor,children:b.authorName}),E("span",{className:N.commentTime,children:Mo(b.createdAt)})]}),b.content&&E("div",{className:N.commentText,children:b.content}),b.imageUrl&&b.imageUrl!=="loading..."&&E("div",{className:N.screenshot,onClick:()=>Y(b.imageUrl),style:{cursor:"pointer"},children:E("img",{src:b.imageUrl,alt:"screenshot"})}),b.fileUrl&&de("a",{className:N.fileCard,href:b.fileUrl,target:"_blank",rel:"noopener noreferrer",onClick:x=>x.stopPropagation(),children:[E("span",{className:N.fileIcon,children:Fo(b.fileType||"")}),de("span",{className:N.fileInfo,children:[E("span",{className:N.fileCardName,children:b.fileName||"\uD30C\uC77C"}),b.fileSize!=null&&E("span",{className:N.fileCardSize,children:Po(b.fileSize)})]})]})]})]},b.id))})]}),B&&de("div",{className:N.pendingImage,children:[E("img",{src:B,alt:"pending"}),E("button",{className:N.pendingRemove,onClick:()=>R(null),type:"button",children:"\xD7"})]}),D&&de("div",{className:N.pendingFile,children:[E("span",{className:N.fileIcon,children:Fo(D.type)}),de("span",{className:N.fileInfo,children:[E("span",{className:N.fileCardName,children:D.name}),E("span",{className:N.fileCardSize,children:Po(D.size)})]}),E("button",{className:N.pendingRemove,onClick:()=>K(null),type:"button",children:"\xD7"})]}),E("div",{className:N.replyArea,children:E("textarea",{ref:re,className:N.replyInput,placeholder:"Reply...",value:k,onChange:b=>{v(b.target.value);let x=b.target;x.style.height="auto",x.style.height=`${Math.min(x.scrollHeight,120)}px`},onKeyDown:_e,rows:2})}),de("div",{className:N.replyToolbar,children:[E("button",{className:N.replyTool,onClick:oe,type:"button",title:"\uD30C\uC77C \uCCA8\uBD80",children:de("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[E("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),E("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),E("button",{className:N.replyTool,onClick:J,type:"button",title:"\uC694\uC18C \uC2A4\uD06C\uB9B0\uC0F7",children:de("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[E("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"}),E("circle",{cx:"12",cy:"13",r:"3"})]})}),E("button",{className:`${N.replySend} ${k.trim()||B||D?N.active:""}`,onClick:T,disabled:!k.trim()&&!B&&!D,type:"button",title:"\uC804\uC1A1",children:de("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[E("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),E("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]}),E("input",{ref:h,type:"file",accept:"*/*",style:{display:"none"},onChange:me}),M&&de("div",{className:N.lightbox,onClick:()=>Y(null),"data-impakers-debug":"",children:[E("img",{src:M,alt:"enlarged",onClick:b=>b.stopPropagation()}),E("button",{className:N.lightboxClose,onClick:()=>Y(null),type:"button",children:"\xD7"})]})]})}import{useState as ut,useRef as hn,useCallback as jn,useEffect as Rr}from"react";var Ir=`@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=Tr}var C=Ir;import{Fragment as Bo,jsx as M,jsxs as le}from"react/jsx-runtime";function Ao(e){let n=new Date(e),o=Date.now()-n.getTime(),t=u=>String(u).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 Fo(e){return e.slice(0,1).toUpperCase()}function Po(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(0)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function $o(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 Ho({task:e,currentUserName:n,currentUserId:o,left:t,top:s,bottom:r,loading:i,onClose:a,onReply:u}){let[k,v]=hn(""),[S,N]=hn(!1),[L,E]=hn(null),[D,K]=hn(null),[de,ce]=hn(!1),re=Et(null),F=Et(null),[A,Y]=hn(null),h=Et(null);Mo(()=>{F.current&&(F.current.scrollTop=F.current.scrollHeight),re.current?.focus()},[e.comments.length]),Mo(()=>{if(de)return;let b=x=>{let ee=x.target;ee.closest(`.${C.thread}`)||ee.closest("[data-annotation-marker]")||ee.closest("[data-impakers-debug]")||z()};return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[de]);let z=an(()=>{N(!0),setTimeout(()=>a(),120)},[a]),T=an(()=>{!k.trim()&&!L&&!D||(u(e.id,k.trim(),L||void 0,D||void 0),v(""),E(null),K(null))},[k,L,D,e.id,u]),ue=an(b=>{b.stopPropagation(),!b.nativeEvent.isComposing&&(b.key==="Enter"&&!b.shiftKey&&(b.preventDefault(),T()),b.key==="Escape"&&z())},[z,T]),R=an(()=>{ce(!0);let b=document.querySelectorAll("[data-impakers-debug], [data-annotation-marker]");b.forEach($=>$.style.visibility="hidden"),document.documentElement.classList.add("impakers-selecting");let x=null,ee=$=>{x||(x=document.createElement("div"),x.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(x)),x.style.left=`${$.left}px`,x.style.top=`${$.top}px`,x.style.width=`${$.width}px`,x.style.height=`${$.height}px`},p=()=>{document.removeEventListener("mousemove",P),document.removeEventListener("click",ie,!0),document.removeEventListener("keydown",H),document.documentElement.classList.remove("impakers-selecting"),x?.remove(),b.forEach($=>$.style.visibility=""),ce(!1)},P=$=>{let Z=document.elementFromPoint($.clientX,$.clientY);!Z||Z===x||ee(Z.getBoundingClientRect())},H=$=>{$.key==="Escape"&&p()},ie=async $=>{$.preventDefault(),$.stopPropagation(),$.stopImmediatePropagation();let Z=document.elementFromPoint($.clientX,$.clientY);if(p(),!!Z){try{let te=await nt(Z);E(te)}catch(te){console.error("[@impakers/debug] DOM \uC2A4\uD06C\uB9B0\uC0F7 \uC2E4\uD328:",te)}re.current?.focus()}};document.addEventListener("mousemove",P),document.addEventListener("click",ie,!0),document.addEventListener("keydown",H)},[]),J=an(()=>{R()},[R]),oe=an(()=>{h.current?.click()},[]),_e=an(b=>{let x=b.target.files?.[0];if(x){if(x.size>4.5*1024*1024){console.warn("[@impakers/debug] \uD30C\uC77C \uD06C\uAE30\uAC00 4.5MB\uB97C \uCD08\uACFC\uD569\uB2C8\uB2E4."),b.target.value="";return}if(x.type.startsWith("image/")){K(null);let ee=new FileReader;ee.onload=()=>{E(ee.result)},ee.readAsDataURL(x)}else E(null),K(x);b.target.value=""}},[]),Me=e.title.replace(/^\[피드백\]\s*/,""),ve=s!==void 0?window.innerHeight-s-20:r!==void 0?window.innerHeight-r-20:window.innerHeight-40,me={left:t,...s!==void 0?{top:s}:{},...r!==void 0?{bottom:r}:{},"--thread-max-height":`${Math.max(200,ve)}px`};return le("div",{className:`${C.thread} ${S?C.exiting:""}`,style:me,"data-impakers-debug":"",onClick:b=>b.stopPropagation(),children:[le("div",{className:C.header,children:[M("div",{className:C.avatar,children:Fo(e.authorName||n)}),le("div",{className:C.headerInfo,children:[le("div",{className:C.headerTop,children:[M("span",{className:C.authorName,children:e.authorName||n}),M("span",{className:C.timestamp,children:Ao(e.createdAt)})]}),M("div",{className:C.title,children:Me})]}),M("div",{className:C.headerActions,children:M("button",{className:C.headerAction,onClick:z,title:"\uB2EB\uAE30",type:"button",children:M("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:M("path",{d:"M18 6L6 18M6 6l12 12"})})})})]}),i&&e.comments.length===0&&le(Bo,{children:[M("div",{className:C.divider}),M(ct,{message:"\uB313\uAE00 \uB85C\uB529 \uC911..."})]}),e.comments.length>0&&le(Bo,{children:[M("div",{className:C.divider}),M("div",{className:C.commentsList,ref:F,children:e.comments.map(b=>le("div",{className:C.comment,children:[M("div",{className:C.avatar,style:{width:22,height:22,fontSize:10},children:Fo(b.authorName)}),le("div",{className:C.commentContent,children:[le("div",{className:C.commentTop,children:[M("span",{className:C.commentAuthor,children:b.authorName}),M("span",{className:C.commentTime,children:Ao(b.createdAt)})]}),b.content&&M("div",{className:C.commentText,children:b.content}),b.imageUrl&&b.imageUrl!=="loading..."&&M("div",{className:C.screenshot,onClick:()=>Y(b.imageUrl),style:{cursor:"pointer"},children:M("img",{src:b.imageUrl,alt:"screenshot"})}),b.fileUrl&&le("a",{className:C.fileCard,href:b.fileUrl,target:"_blank",rel:"noopener noreferrer",onClick:x=>x.stopPropagation(),children:[M("span",{className:C.fileIcon,children:$o(b.fileType||"")}),le("span",{className:C.fileInfo,children:[M("span",{className:C.fileCardName,children:b.fileName||"\uD30C\uC77C"}),b.fileSize!=null&&M("span",{className:C.fileCardSize,children:Po(b.fileSize)})]})]})]})]},b.id))})]}),L&&le("div",{className:C.pendingImage,children:[M("img",{src:L,alt:"pending"}),M("button",{className:C.pendingRemove,onClick:()=>E(null),type:"button",children:"\xD7"})]}),D&&le("div",{className:C.pendingFile,children:[M("span",{className:C.fileIcon,children:$o(D.type)}),le("span",{className:C.fileInfo,children:[M("span",{className:C.fileCardName,children:D.name}),M("span",{className:C.fileCardSize,children:Po(D.size)})]}),M("button",{className:C.pendingRemove,onClick:()=>K(null),type:"button",children:"\xD7"})]}),M("div",{className:C.replyArea,children:M("textarea",{ref:re,className:C.replyInput,placeholder:"Reply...",value:k,onChange:b=>{v(b.target.value);let x=b.target;x.style.height="auto",x.style.height=`${Math.min(x.scrollHeight,120)}px`},onKeyDown:ue,rows:2})}),le("div",{className:C.replyToolbar,children:[M("button",{className:C.replyTool,onClick:oe,type:"button",title:"\uD30C\uC77C \uCCA8\uBD80",children:le("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[M("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),M("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),M("button",{className:C.replyTool,onClick:J,type:"button",title:"\uC694\uC18C \uC2A4\uD06C\uB9B0\uC0F7",children:le("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[M("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"}),M("circle",{cx:"12",cy:"13",r:"3"})]})}),M("button",{className:`${C.replySend} ${k.trim()||L||D?C.active:""}`,onClick:T,disabled:!k.trim()&&!L&&!D,type:"button",title:"\uC804\uC1A1",children:le("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[M("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),M("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]}),M("input",{ref:h,type:"file",accept:"*/*",style:{display:"none"},onChange:_e}),A&&le("div",{className:C.lightbox,onClick:()=>Y(null),"data-impakers-debug":"",children:[M("img",{src:A,alt:"enlarged",onClick:b=>b.stopPropagation()}),M("button",{className:C.lightboxClose,onClick:()=>Y(null),type:"button",children:"\xD7"})]})]})}import{useState as ut,useRef as yn,useCallback as Wn,useEffect as Mr}from"react";var Er=`@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
|
-
}`,
|
|
1146
|
+
}`,Rr={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=Er}var ze=Rr;import{Fragment as Ar,jsx as Ve,jsxs as Rt}from"react/jsx-runtime";function zo({items:e,onSelect:n,onHide:o,onDoubleTap:t}){let[s,r]=ut(!1),[i,a]=ut(!1),[u,k]=ut({right:24,bottom:24}),[v,S]=ut(null),N=yn(null),L=yn(!1),E=yn({x:0,y:0}),D=yn({x:0,y:0}),K=yn(!1),de=yn(0),ce=Wn(h=>{if(h.button===2)return;L.current=!0,K.current=!1;let z=N.current;if(!z)return;z.setPointerCapture(h.pointerId);let T=z.getBoundingClientRect();E.current={x:h.clientX,y:h.clientY},D.current={x:h.clientX-T.left,y:h.clientY-T.top}},[]),re=Wn(h=>{L.current&&((Math.abs(h.clientX-E.current.x)>3||Math.abs(h.clientY-E.current.y)>3)&&(K.current=!0),K.current&&k({right:Math.max(8,Math.min(window.innerWidth-h.clientX-(44-D.current.x),window.innerWidth-52)),bottom:Math.max(8,Math.min(window.innerHeight-h.clientY-(44-D.current.y),window.innerHeight-52))}))},[]),F=Wn(h=>{if(L.current&&(N.current?.releasePointerCapture(h.pointerId),L.current=!1,!K.current)){let z=Date.now(),T=z-de.current<350;if(de.current=z,T&&t){s&&A(),t();return}s?A():r(!0)}},[s,t]),A=Wn(()=>{a(!0),setTimeout(()=>{r(!1),a(!1)},150)},[]),Y=Wn(h=>{h.preventDefault(),h.stopPropagation(),S({x:h.clientX,y:h.clientY})},[]);return Mr(()=>{if(!s&&!v)return;let h=z=>{if(!z.target.closest("[data-impakers-fab]")){if(v){S(null);return}s&&A()}};return document.addEventListener("mousedown",h),()=>document.removeEventListener("mousedown",h)},[s,v,A]),Rt(Ar,{children:[(s||i)&&Ve("div",{className:ze.menuItems,style:{position:"fixed",right:u.right+4/2,bottom:u.bottom+44+8},"data-impakers-debug":"","data-impakers-fab":"",children:[...e].reverse().map((h,z)=>Rt("button",{className:`${ze.menuItem} ${h.active?ze.active:""} ${i?ze.menuItemClosing:""}`,style:{animationDelay:i?`${z*30}ms`:`${(e.length-1-z)*40}ms`},onClick:T=>{T.stopPropagation(),n(h.id),A()},type:"button","data-impakers-fab":"","data-impakers-debug":"",children:[h.icon,Ve("span",{className:ze.tooltip,children:h.label}),h.badge&&h.badge>0?Ve("span",{className:ze.badge,children:h.badge>99?"99+":h.badge}):null]},h.id))}),Ve("button",{ref:N,className:`${ze.fab} ${s?ze.expanded:""}`,style:{position:"fixed",right:u.right,bottom:u.bottom},onPointerDown:ce,onPointerMove:re,onPointerUp:F,onContextMenu:Y,type:"button","aria-label":"\uD53C\uB4DC\uBC31 \uBA54\uB274","data-impakers-debug":"","data-impakers-fab":"",children:Rt("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[Ve("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),Ve("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),v&&Ve("div",{style:{position:"fixed",inset:0,zIndex:2147483647},onMouseDown:()=>S(null),"data-impakers-debug":"","data-impakers-fab":"",children:Ve("div",{className:ze.contextMenu,style:{position:"fixed",left:v.x,top:v.y,zIndex:2147483647},onMouseDown:h=>h.stopPropagation(),"data-impakers-fab":"",children:Ve("button",{className:ze.contextMenuItem,onMouseDown:h=>{h.stopPropagation(),S(null),o?.()},type:"button",children:"\uC704\uC82F \uC228\uAE30\uAE30"})})})]})}import{useState as Pe,useCallback as Mt,useEffect as xn,useRef as Wo}from"react";import{createPortal as Dr}from"react-dom";import{useState as _t,useRef as Do,useCallback as On}from"react";var Fr=`.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
|
-
}`,Pr={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=
|
|
1315
|
+
}`,Pr={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=Fr}var xe=Pr;import{jsx as ge,jsxs as Je}from"react/jsx-runtime";function $r(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(0)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function Br(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 jo({onSend:e,onEscape:n,placeholder:o="Reply...",autoFocus:t=!1}){let[s,r]=_t(""),[i,a]=_t(null),[u,k]=_t(null),[v,S]=_t(!1),N=Do(null),L=Do(null),E=s.trim()||i||u,D=On(()=>{E&&(e(s.trim(),i||void 0,u||void 0),r(""),a(null),k(null),N.current&&(N.current.style.height="auto"))},[s,i,u,E,e]),K=On(F=>{F.stopPropagation(),!F.nativeEvent.isComposing&&(F.key==="Enter"&&!F.shiftKey&&(F.preventDefault(),D()),F.key==="Escape"&&n?.())},[D,n]),de=On(()=>{S(!0);let F=document.querySelectorAll("[data-impakers-debug], [data-annotation-marker]");F.forEach(R=>R.style.visibility="hidden"),document.documentElement.classList.add("impakers-selecting");let A=null,Y=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`},h=()=>{document.removeEventListener("mousemove",z),document.removeEventListener("click",ue,!0),document.removeEventListener("keydown",T),document.documentElement.classList.remove("impakers-selecting"),A?.remove(),F.forEach(R=>R.style.visibility=""),S(!1)},z=R=>{let J=document.elementFromPoint(R.clientX,R.clientY);!J||J===A||Y(J.getBoundingClientRect())},T=R=>{R.key==="Escape"&&h()},ue=async R=>{R.preventDefault(),R.stopPropagation(),R.stopImmediatePropagation();let J=document.elementFromPoint(R.clientX,R.clientY);if(h(),!!J){try{let oe=await nt(J);a(oe)}catch(oe){console.error("[@impakers/debug] DOM \uC2A4\uD06C\uB9B0\uC0F7 \uC2E4\uD328:",oe)}N.current?.focus()}};document.addEventListener("mousemove",z),document.addEventListener("click",ue,!0),document.addEventListener("keydown",T)},[]),ce=On(()=>{L.current?.click()},[]),re=On(F=>{let A=F.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."),F.target.value="";return}if(A.type.startsWith("image/")){k(null);let Y=new FileReader;Y.onload=()=>a(Y.result),Y.readAsDataURL(A)}else a(null),k(A);F.target.value=""}},[]);return Je("div",{className:xe.replyWrapper,"data-impakers-debug":"",children:[i&&Je("div",{className:xe.pendingImage,children:[ge("img",{src:i,alt:"pending"}),ge("button",{className:xe.pendingRemove,onClick:()=>a(null),type:"button",children:"\xD7"})]}),u&&Je("div",{className:xe.pendingFile,children:[ge("span",{className:xe.fileIcon,children:Br(u.type)}),Je("span",{className:xe.fileInfo,children:[ge("span",{className:xe.fileCardName,children:u.name}),ge("span",{className:xe.fileCardSize,children:$r(u.size)})]}),ge("button",{className:xe.pendingRemove,onClick:()=>k(null),type:"button",children:"\xD7"})]}),ge("div",{className:xe.replyArea,children:ge("textarea",{ref:N,className:xe.replyInput,placeholder:o,value:s,onChange:F=>{r(F.target.value);let A=F.target;A.style.height="auto",A.style.height=`${Math.min(A.scrollHeight,120)}px`},onKeyDown:K,rows:2,autoFocus:t})}),Je("div",{className:xe.replyToolbar,children:[ge("button",{className:xe.replyTool,onClick:ce,type:"button",title:"\uD30C\uC77C \uCCA8\uBD80",children:Je("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[ge("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),ge("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),ge("button",{className:xe.replyTool,onClick:de,type:"button",title:"\uC694\uC18C \uC2A4\uD06C\uB9B0\uC0F7",children:Je("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[ge("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"}),ge("circle",{cx:"12",cy:"13",r:"3"})]})}),ge("button",{className:`${xe.replySend} ${E?xe.active:""}`,onClick:D,disabled:!E,type:"button",title:"\uC804\uC1A1",children:Je("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[ge("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),ge("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]}),ge("input",{ref:L,type:"file",accept:"*/*",style:{display:"none"},onChange:re})]})}var Hr=`@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
|
-
}`,Hr={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=Br}var l=Hr;import{Fragment as Pt,jsx as m,jsxs as y}from"react/jsx-runtime";function Dr({src:e,onClose:n}){return bn(()=>{let o=t=>{t.key==="Escape"&&n()};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[n]),y("div",{className:l.lightbox,onClick:n,"data-impakers-debug":"",children:[m("img",{src:e,alt:"enlarged",onClick:o=>o.stopPropagation()}),m("button",{className:l.lightboxClose,onClick:n,type:"button",children:"\xD7"})]})}function jr(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(0)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function Wo(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 Wr(e){let n=e.match(/\/d\/([^/]+)/);return n?n[1]:null}function Or(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=Wr(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 Vr({fileUrl:e,fileName:n,fileType:o,fileSource:t,onClose:s}){bn(()=>{let i=a=>{a.key==="Escape"&&s()};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[s]);let r=Or(e,o,t);return m("div",{className:l.filePreviewOverlay,onClick:s,"data-impakers-debug":"",children:y("div",{className:l.filePreviewModal,onClick:i=>i.stopPropagation(),children:[y("div",{className:l.filePreviewHeader,children:[m("span",{className:l.filePreviewName,children:n}),y("div",{className:l.filePreviewActions,children:[y("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:l.filePreviewOpen,children:[y("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"14",height:"14",children:[m("path",{d:"M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6"}),m("polyline",{points:"15 3 21 3 21 9"}),m("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]}),"\uC5F4\uAE30"]}),m("button",{className:l.filePreviewClose,onClick:s,type:"button",children:"\xD7"})]})]}),m("div",{className:l.filePreviewBody,children:r?m("iframe",{src:r,className:l.filePreviewIframe,title:n}):y("div",{className:l.filePreviewFallback,children:[m("span",{className:l.filePreviewFallbackIcon,children:Wo(o)}),m("span",{children:"\uBBF8\uB9AC\uBCF4\uAE30\uB97C \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 \uD30C\uC77C \uD615\uC2DD\uC785\uB2C8\uB2E4"}),m("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:"\uD30C\uC77C \uC5F4\uAE30"})]})})]})})}function yn(e){let n=new Date(e),o=Date.now()-n.getTime(),t=_=>String(_).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 At(e){return e.slice(0,1).toUpperCase()}function Oo({pageItems:e,allItems:n,currentPath:o,serviceName:t,endpoint:s,currentUserName:r,currentUserId:i,onClose:a,onHistoryViewed:_,newNotiCount:k}){let[v,C]=Fe("page"),[w,B]=Fe("todo"),[R,D]=Fe(""),[K,ce]=Fe(!1),ue=jo(null),[re,A]=Fe([]),[M,Y]=Fe(!1),[h,z]=Fe(!1),[T,_e]=Fe(null),[I,J]=Fe([]),[oe,me]=Fe(!1),[Me,we]=Fe(null),[pe,b]=Fe(null),x=jo(null),ee=Mt(()=>{if(T){_e(null),J([]);return}z(!0),setTimeout(()=>a(),150)},[a,T]),p=Mt(async u=>{_e(u);let j=pn(qe(u.id));J(j||[]),me(!j)},[s]);bn(()=>{if(!T)return;let u=qe(T.id),j=pn(u);j&&(J(j),me(!1));let Ae=zn(u,ye=>{J(ye),me(!1)});return rt(s,T.id,{staleWhileRevalidate:!0}).then(ye=>{J(ye),me(!1)}).catch(()=>{me(!1)}),Ae},[T,s]),bn(()=>{x.current?.scrollIntoView({behavior:"smooth"})},[I.length]),bn(()=>{if(!K)return;let u=j=>{ue.current&&!ue.current.contains(j.target)&&ce(!1)};return document.addEventListener("mousedown",u),()=>document.removeEventListener("mousedown",u)},[K]);let P=Mt(async(u,j,Ae)=>{if(T)try{let ye;if(Ae)try{ye=await at(s,Ae,"comment",T.id)}catch(Pe){console.error("[@impakers/debug] \uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328:",Pe)}await it(s,T.id,u,r,i,j,ye)}catch(ye){console.error("[@impakers/debug] \uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328:",ye)}},[T,s,r,i]),H=v==="page"?e:v==="all"?n:[],ie=H.filter(u=>u.status===w),F=H.filter(u=>u.status==="todo").length,Z=H.filter(u=>u.status==="in_progress").length,te=H.filter(u=>u.status==="done").length;return bn(()=>{v==="history"&&(Y(!0),lt(s,{date:R||void 0,limit:200}).then(A).catch(()=>A([])).finally(()=>Y(!1)))},[v,R,s]),typeof document>"u"?null:zr(y("div",{"data-impakers-debug":"",children:[m("div",{className:l.backdrop,onClick:ee}),y("div",{className:`${l.panel} ${h?l.exiting:""}`,"data-impakers-debug":"",children:[y("div",{className:l.header,children:[y("div",{className:l.headerLeft,children:[T&&m("button",{className:l.backBtn,onClick:ee,type:"button",children:m("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"16",height:"16",children:m("polyline",{points:"15 18 9 12 15 6"})})}),m("span",{className:l.headerTitle,children:T?"\uD53C\uB4DC\uBC31 \uC0C1\uC138":t||"Feedback"})]}),m("button",{className:l.closeBtn,onClick:()=>{z(!0),setTimeout(()=>a(),150)},type:"button",children:m("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:m("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),T?y("div",{className:l.detailView,children:[y("div",{className:l.detailHeader,children:[m("div",{className:l.cardAvatar,children:At(T.authorName)}),y("div",{children:[y("div",{className:l.cardMeta,children:[m("span",{className:l.cardAuthor,children:T.authorName}),m("span",{className:l.cardTime,children:yn(T.createdAt)})]}),m("div",{className:l.detailTitle,children:T.title.replace(/^\[피드백\]\s*/,"")})]})]}),T.screenshot&&m("div",{className:l.detailScreenshot,children:m("img",{src:T.screenshot,alt:"screenshot"})}),y("div",{className:l.commentsList,children:[oe&&m(ct,{message:"\uB313\uAE00 \uB85C\uB529 \uC911..."}),!oe&&I.length===0&&m("div",{className:l.noComments,children:"\uC544\uC9C1 \uB313\uAE00\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"}),I.map(u=>y("div",{className:l.commentItem,children:[m("div",{className:l.commentAvatar,style:{width:22,height:22,fontSize:10},children:At(u.authorName)}),y("div",{className:l.commentBody,children:[y("div",{className:l.commentMeta,children:[m("span",{className:l.commentAuthorName,children:u.authorName}),m("span",{className:l.commentTime,children:yn(u.createdAt)})]}),u.content&&m("div",{className:l.commentContent,children:u.content}),u.imageUrl&&m("div",{className:l.commentImage,onClick:j=>{j.stopPropagation(),we(u.imageUrl)},children:m("img",{src:u.imageUrl,alt:"attachment"})}),u.fileUrl&&y("div",{className:l.commentFileCard,onClick:j=>{j.stopPropagation(),b({url:u.fileUrl,name:u.fileName||"\uD30C\uC77C",type:u.fileType||"",source:u.fileSource})},children:[m("span",{className:l.commentFileIcon,children:Wo(u.fileType||"")}),y("span",{className:l.commentFileInfo,children:[m("span",{className:l.commentFileName,children:u.fileName||"\uD30C\uC77C"}),u.fileSize!=null&&m("span",{className:l.commentFileSize,children:jr(u.fileSize)})]})]})]})]},u.id)),m("div",{ref:x})]}),m(Do,{onSend:P,onEscape:ee,autoFocus:!0})]}):y(Pt,{children:[y("div",{className:l.tabs,children:[y("button",{className:`${l.tab} ${v==="page"?l.active:""}`,onClick:()=>C("page"),type:"button",children:["This Page",e.length>0&&m("span",{className:l.tabBadge,children:e.length})]}),y("button",{className:`${l.tab} ${v==="all"?l.active:""}`,onClick:()=>C("all"),type:"button",children:["All",n.length>0&&m("span",{className:l.tabBadge,children:n.length})]}),y("button",{className:`${l.tab} ${v==="history"?l.active:""}`,onClick:()=>{C("history"),_?.()},type:"button",children:["History",k&&k>0?m("span",{className:l.tabBadge,children:k}):null]})]}),v==="history"?y(Pt,{children:[y("div",{className:l.historyFilter,children:[y("div",{className:l.historyDateWrap,ref:ue,children:[y("button",{className:`${l.filterChip} ${R?l.active:""}`,onClick:()=>ce(u=>!u),type:"button",children:[y("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"13",height:"13",children:[m("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",ry:"2"}),m("line",{x1:"16",y1:"2",x2:"16",y2:"6"}),m("line",{x1:"8",y1:"2",x2:"8",y2:"6"}),m("line",{x1:"3",y1:"10",x2:"21",y2:"10"})]}),R?`${new Date(R).getMonth()+1}/${new Date(R).getDate()}`:"\uB0A0\uC9DC"]}),K&&m("div",{className:l.datePopover,children:m("input",{type:"date",value:R,onChange:u=>{D(u.target.value),ce(!1)},className:l.dateInput,autoFocus:!0})})]}),R&&m("button",{className:l.filterChipClear,onClick:()=>D(""),type:"button",title:"\uD544\uD130 \uCD08\uAE30\uD654",children:"\xD7"})]}),m("div",{className:l.content,children:M?m("div",{className:l.empty,children:"\uB85C\uB529 \uC911..."}):re.length===0?y("div",{className:l.empty,children:[m("div",{className:l.emptyIcon,children:y("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[m("circle",{cx:"12",cy:"12",r:"10"}),m("polyline",{points:"12 6 12 12 16 14"})]})}),"\uD788\uC2A4\uD1A0\uB9AC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4"]}):re.map((u,j)=>y("div",{className:l.historyItem,children:[m("div",{className:`${l.historyDot} ${l[`historyDot_${u.action}`]}`}),y("div",{className:l.historyBody,children:[u.action==="status_changed"&&y("div",{className:l.historyStatusChange,children:[m("span",{className:`${l.historyStatusBadge} ${l[`status_${u.fromStatus}`]}`,children:u.fromStatus==="todo"?"\uB300\uAE30":u.fromStatus==="in_progress"?"\uC9C4\uD589\uC911":"\uC644\uB8CC"}),m("span",{className:l.historyArrow,children:"\u2192"}),m("span",{className:`${l.historyStatusBadge} ${l[`status_${u.toStatus}`]}`,children:u.toStatus==="todo"?"\uB300\uAE30":u.toStatus==="in_progress"?"\uC9C4\uD589\uC911":"\uC644\uB8CC"})]}),u.action==="created"&&y("div",{className:l.historyStatusChange,children:[m("span",{className:l.historyLabel,children:"\uC0DD\uC131"}),m("span",{className:`${l.historyStatusBadge} ${l.status_todo}`,children:"\uB300\uAE30"})]}),u.action==="comment_added"&&y("div",{className:l.historyComment,children:[m("span",{className:l.historyCommentAuthor,children:u.actorName||"\uC775\uBA85"}),u.metadata?.content&&m("span",{className:l.historyCommentContent,children:String(u.metadata.content).slice(0,100)})]}),y("div",{className:l.historyFooter,children:[m("span",{className:l.historyTime,children:yn(u.createdAt)}),m("span",{className:l.historyRef,children:(u.taskTitle||"").replace(/^\[피드백\]\s*/,"")})]})]})]},`${u.id}-${u.action}-${j}`))})]}):y(Pt,{children:[y("div",{className:l.statusFilter,children:[y("button",{className:`${l.filterChip} ${w==="todo"?l.active:""}`,onClick:()=>B("todo"),type:"button",children:["\uC9C4\uD589\uC804",F>0&&m("span",{className:l.filterCount,children:F})]}),y("button",{className:`${l.filterChip} ${w==="in_progress"?l.active:""}`,onClick:()=>B("in_progress"),type:"button",children:["\uC9C4\uD589\uC911",Z>0&&m("span",{className:l.filterCount,children:Z})]}),y("button",{className:`${l.filterChip} ${w==="done"?l.active:""}`,onClick:()=>B("done"),type:"button",children:["\uC644\uB8CC",te>0&&m("span",{className:l.filterCount,children:te})]})]}),m("div",{className:l.content,children:ie.length===0?y("div",{className:l.empty,children:[m("div",{className:l.emptyIcon,children:m("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:m("path",{d:"M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z"})})}),v==="page"?"\uC774 \uD398\uC774\uC9C0\uC5D0 \uD53C\uB4DC\uBC31\uC774 \uC5C6\uC2B5\uB2C8\uB2E4":"\uD53C\uB4DC\uBC31\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"]}):ie.map(u=>y("div",{className:`${l.card} ${u.status==="done"?l.cardDone:""}`,onClick:()=>p(u),children:[y("div",{className:l.cardHeader,children:[m("div",{className:l.cardAvatar,children:At(u.authorName)}),m("div",{className:l.cardInfo,children:y("div",{className:l.cardMeta,children:[m("span",{className:l.cardAuthor,children:u.authorName}),m("span",{className:l.cardTime,children:yn(u.createdAt)})]})})]}),m("div",{className:l.cardTitle,children:u.title.replace(/^\[피드백\]\s*/,"")}),u.screenshot&&m("div",{className:l.cardScreenshot,children:m("img",{src:u.screenshot,alt:"screenshot"})}),v==="all"&&u.feedbackUrl&&y("div",{className:l.cardRoute,onClick:j=>{j.stopPropagation(),window.location.href=u.feedbackUrl},title:"\uD398\uC774\uC9C0\uB85C \uC774\uB3D9",children:[m("span",{className:l.cardRoutePath,children:u.feedbackUrl}),y("svg",{className:l.cardRouteIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"12",height:"12",children:[m("path",{d:"M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6"}),m("polyline",{points:"15 3 21 3 21 9"}),m("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]})]}),(u.startedAt||u.completedAt)&&y("div",{className:l.cardStatusTime,children:[u.startedAt&&u.status!=="todo"&&y("span",{children:["\uC9C4\uD589 \uC2DC\uC791: ",yn(u.startedAt)]}),u.completedAt&&u.status==="done"&&y("span",{children:["\uC644\uB8CC: ",yn(u.completedAt)]})]}),y("div",{className:l.cardFooter,children:[m("span",{className:l.cardReplyDot}),y("span",{className:l.cardReplyCount,children:[u.commentCount," ",u.commentCount===1?"Reply":"Replies"]})]})]},u.id))})]})]})]}),Me&&m(Dr,{src:Me,onClose:()=>we(null)}),pe&&m(Vr,{fileUrl:pe.url,fileName:pe.name,fileType:pe.type,fileSource:pe.source,onClose:()=>b(null)})]}),document.body)}import{useState as Ie,useRef as On,useEffect as Ft,useCallback as Ue}from"react";import{createPortal as Zr}from"react-dom";var Ur=`@keyframes styles-module__slideIn___Wx-kZ {
|
|
2383
|
+
}`,zr={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=Hr}var l=zr;import{Fragment as Ft,jsx as m,jsxs as y}from"react/jsx-runtime";function jr({src:e,onClose:n}){return xn(()=>{let o=t=>{t.key==="Escape"&&n()};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[n]),y("div",{className:l.lightbox,onClick:n,"data-impakers-debug":"",children:[m("img",{src:e,alt:"enlarged",onClick:o=>o.stopPropagation()}),m("button",{className:l.lightboxClose,onClick:n,type:"button",children:"\xD7"})]})}function Wr(e){return e<1024?`${e}B`:e<1024*1024?`${(e/1024).toFixed(0)}KB`:`${(e/(1024*1024)).toFixed(1)}MB`}function Oo(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 Or(e){let n=e.match(/\/d\/([^/]+)/);return n?n[1]:null}function Vr(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=Or(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 Ur({fileUrl:e,fileName:n,fileType:o,fileSource:t,onClose:s}){xn(()=>{let i=a=>{a.key==="Escape"&&s()};return document.addEventListener("keydown",i),()=>document.removeEventListener("keydown",i)},[s]);let r=Vr(e,o,t);return m("div",{className:l.filePreviewOverlay,onClick:s,"data-impakers-debug":"",children:y("div",{className:l.filePreviewModal,onClick:i=>i.stopPropagation(),children:[y("div",{className:l.filePreviewHeader,children:[m("span",{className:l.filePreviewName,children:n}),y("div",{className:l.filePreviewActions,children:[y("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:l.filePreviewOpen,children:[y("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"14",height:"14",children:[m("path",{d:"M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6"}),m("polyline",{points:"15 3 21 3 21 9"}),m("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]}),"\uC5F4\uAE30"]}),m("button",{className:l.filePreviewClose,onClick:s,type:"button",children:"\xD7"})]})]}),m("div",{className:l.filePreviewBody,children:r?m("iframe",{src:r,className:l.filePreviewIframe,title:n}):y("div",{className:l.filePreviewFallback,children:[m("span",{className:l.filePreviewFallbackIcon,children:Oo(o)}),m("span",{children:"\uBBF8\uB9AC\uBCF4\uAE30\uB97C \uC9C0\uC6D0\uD558\uC9C0 \uC54A\uB294 \uD30C\uC77C \uD615\uC2DD\uC785\uB2C8\uB2E4"}),m("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:"\uD30C\uC77C \uC5F4\uAE30"})]})})]})})}function bn(e){let n=new Date(e),o=Date.now()-n.getTime(),t=u=>String(u).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 At(e){return e.slice(0,1).toUpperCase()}function Vo({pageItems:e,allItems:n,currentPath:o,serviceName:t,endpoint:s,currentUserName:r,currentUserId:i,onClose:a,onHistoryViewed:u,newNotiCount:k}){let[v,S]=Pe("page"),[N,L]=Pe("todo"),[E,D]=Pe(""),[K,de]=Pe(!1),ce=Wo(null),[re,F]=Pe([]),[A,Y]=Pe(!1),[h,z]=Pe(!1),[T,ue]=Pe(null),[R,J]=Pe([]),[oe,_e]=Pe(!1),[Me,ve]=Pe(null),[me,b]=Pe(null),x=Wo(null),ee=Mt(()=>{if(T){ue(null),J([]);return}z(!0),setTimeout(()=>a(),150)},[a,T]),p=Mt(async _=>{ue(_);let j=fn(Ge(_.id));J(j||[]),_e(!j)},[s]);xn(()=>{if(!T)return;let _=Ge(T.id),j=fn(_);j&&(J(j),_e(!1));let Ae=Dn(_,he=>{J(he),_e(!1)});return rt(s,T.id,{staleWhileRevalidate:!0}).then(he=>{J(he),_e(!1)}).catch(()=>{_e(!1)}),Ae},[T,s]),xn(()=>{x.current?.scrollIntoView({behavior:"smooth"})},[R.length]),xn(()=>{if(!K)return;let _=j=>{ce.current&&!ce.current.contains(j.target)&&de(!1)};return document.addEventListener("mousedown",_),()=>document.removeEventListener("mousedown",_)},[K]);let P=Mt(async(_,j,Ae)=>{if(T)try{let he;if(Ae)try{he=await at(s,Ae,"comment",T.id)}catch(Fe){console.error("[@impakers/debug] \uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328:",Fe)}await it(s,T.id,_,r,i,j,he)}catch(he){console.error("[@impakers/debug] \uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328:",he)}},[T,s,r,i]),H=v==="page"?e:v==="all"?n:[],ie=H.filter(_=>_.status===N),$=H.filter(_=>_.status==="todo").length,Z=H.filter(_=>_.status==="in_progress").length,te=H.filter(_=>_.status==="done").length;return xn(()=>{v==="history"&&(Y(!0),lt(s,{date:E||void 0,limit:200}).then(F).catch(()=>F([])).finally(()=>Y(!1)))},[v,E,s]),typeof document>"u"?null:Dr(y("div",{"data-impakers-debug":"",children:[m("div",{className:l.backdrop,onClick:ee}),y("div",{className:`${l.panel} ${h?l.exiting:""}`,"data-impakers-debug":"",children:[y("div",{className:l.header,children:[y("div",{className:l.headerLeft,children:[T&&m("button",{className:l.backBtn,onClick:ee,type:"button",children:m("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"16",height:"16",children:m("polyline",{points:"15 18 9 12 15 6"})})}),m("span",{className:l.headerTitle,children:T?"\uD53C\uB4DC\uBC31 \uC0C1\uC138":t||"Feedback"})]}),m("button",{className:l.closeBtn,onClick:()=>{z(!0),setTimeout(()=>a(),150)},type:"button",children:m("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:m("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),T?y("div",{className:l.detailView,children:[y("div",{className:l.detailHeader,children:[m("div",{className:l.cardAvatar,children:At(T.authorName)}),y("div",{children:[y("div",{className:l.cardMeta,children:[m("span",{className:l.cardAuthor,children:T.authorName}),m("span",{className:l.cardTime,children:bn(T.createdAt)})]}),m("div",{className:l.detailTitle,children:T.title.replace(/^\[피드백\]\s*/,"")})]})]}),T.screenshot&&m("div",{className:l.detailScreenshot,children:m("img",{src:T.screenshot,alt:"screenshot"})}),y("div",{className:l.commentsList,children:[oe&&m(ct,{message:"\uB313\uAE00 \uB85C\uB529 \uC911..."}),!oe&&R.length===0&&m("div",{className:l.noComments,children:"\uC544\uC9C1 \uB313\uAE00\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"}),R.map(_=>y("div",{className:l.commentItem,children:[m("div",{className:l.commentAvatar,style:{width:22,height:22,fontSize:10},children:At(_.authorName)}),y("div",{className:l.commentBody,children:[y("div",{className:l.commentMeta,children:[m("span",{className:l.commentAuthorName,children:_.authorName}),m("span",{className:l.commentTime,children:bn(_.createdAt)})]}),_.content&&m("div",{className:l.commentContent,children:_.content}),_.imageUrl&&m("div",{className:l.commentImage,onClick:j=>{j.stopPropagation(),ve(_.imageUrl)},children:m("img",{src:_.imageUrl,alt:"attachment"})}),_.fileUrl&&y("div",{className:l.commentFileCard,onClick:j=>{j.stopPropagation(),b({url:_.fileUrl,name:_.fileName||"\uD30C\uC77C",type:_.fileType||"",source:_.fileSource})},children:[m("span",{className:l.commentFileIcon,children:Oo(_.fileType||"")}),y("span",{className:l.commentFileInfo,children:[m("span",{className:l.commentFileName,children:_.fileName||"\uD30C\uC77C"}),_.fileSize!=null&&m("span",{className:l.commentFileSize,children:Wr(_.fileSize)})]})]})]})]},_.id)),m("div",{ref:x})]}),m(jo,{onSend:P,onEscape:ee,autoFocus:!0})]}):y(Ft,{children:[y("div",{className:l.tabs,children:[y("button",{className:`${l.tab} ${v==="page"?l.active:""}`,onClick:()=>S("page"),type:"button",children:["This Page",e.length>0&&m("span",{className:l.tabBadge,children:e.length})]}),y("button",{className:`${l.tab} ${v==="all"?l.active:""}`,onClick:()=>S("all"),type:"button",children:["All",n.length>0&&m("span",{className:l.tabBadge,children:n.length})]}),y("button",{className:`${l.tab} ${v==="history"?l.active:""}`,onClick:()=>{S("history"),u?.()},type:"button",children:["History",k&&k>0?m("span",{className:l.tabBadge,children:k}):null]})]}),v==="history"?y(Ft,{children:[y("div",{className:l.historyFilter,children:[y("div",{className:l.historyDateWrap,ref:ce,children:[y("button",{className:`${l.filterChip} ${E?l.active:""}`,onClick:()=>de(_=>!_),type:"button",children:[y("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"13",height:"13",children:[m("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2",ry:"2"}),m("line",{x1:"16",y1:"2",x2:"16",y2:"6"}),m("line",{x1:"8",y1:"2",x2:"8",y2:"6"}),m("line",{x1:"3",y1:"10",x2:"21",y2:"10"})]}),E?`${new Date(E).getMonth()+1}/${new Date(E).getDate()}`:"\uB0A0\uC9DC"]}),K&&m("div",{className:l.datePopover,children:m("input",{type:"date",value:E,onChange:_=>{D(_.target.value),de(!1)},className:l.dateInput,autoFocus:!0})})]}),E&&m("button",{className:l.filterChipClear,onClick:()=>D(""),type:"button",title:"\uD544\uD130 \uCD08\uAE30\uD654",children:"\xD7"})]}),m("div",{className:l.content,children:A?m("div",{className:l.empty,children:"\uB85C\uB529 \uC911..."}):re.length===0?y("div",{className:l.empty,children:[m("div",{className:l.emptyIcon,children:y("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[m("circle",{cx:"12",cy:"12",r:"10"}),m("polyline",{points:"12 6 12 12 16 14"})]})}),"\uD788\uC2A4\uD1A0\uB9AC\uAC00 \uC5C6\uC2B5\uB2C8\uB2E4"]}):re.map((_,j)=>y("div",{className:l.historyItem,children:[m("div",{className:`${l.historyDot} ${l[`historyDot_${_.action}`]}`}),y("div",{className:l.historyBody,children:[_.action==="status_changed"&&y("div",{className:l.historyStatusChange,children:[m("span",{className:`${l.historyStatusBadge} ${l[`status_${_.fromStatus}`]}`,children:_.fromStatus==="todo"?"\uB300\uAE30":_.fromStatus==="in_progress"?"\uC9C4\uD589\uC911":"\uC644\uB8CC"}),m("span",{className:l.historyArrow,children:"\u2192"}),m("span",{className:`${l.historyStatusBadge} ${l[`status_${_.toStatus}`]}`,children:_.toStatus==="todo"?"\uB300\uAE30":_.toStatus==="in_progress"?"\uC9C4\uD589\uC911":"\uC644\uB8CC"})]}),_.action==="created"&&y("div",{className:l.historyStatusChange,children:[m("span",{className:l.historyLabel,children:"\uC0DD\uC131"}),m("span",{className:`${l.historyStatusBadge} ${l.status_todo}`,children:"\uB300\uAE30"})]}),_.action==="comment_added"&&y("div",{className:l.historyComment,children:[m("span",{className:l.historyCommentAuthor,children:_.actorName||"\uC775\uBA85"}),_.metadata?.content&&m("span",{className:l.historyCommentContent,children:String(_.metadata.content).slice(0,100)})]}),y("div",{className:l.historyFooter,children:[m("span",{className:l.historyTime,children:bn(_.createdAt)}),m("span",{className:l.historyRef,children:(_.taskTitle||"").replace(/^\[피드백\]\s*/,"")})]})]})]},`${_.id}-${_.action}-${j}`))})]}):y(Ft,{children:[y("div",{className:l.statusFilter,children:[y("button",{className:`${l.filterChip} ${N==="todo"?l.active:""}`,onClick:()=>L("todo"),type:"button",children:["\uC9C4\uD589\uC804",$>0&&m("span",{className:l.filterCount,children:$})]}),y("button",{className:`${l.filterChip} ${N==="in_progress"?l.active:""}`,onClick:()=>L("in_progress"),type:"button",children:["\uC9C4\uD589\uC911",Z>0&&m("span",{className:l.filterCount,children:Z})]}),y("button",{className:`${l.filterChip} ${N==="done"?l.active:""}`,onClick:()=>L("done"),type:"button",children:["\uC644\uB8CC",te>0&&m("span",{className:l.filterCount,children:te})]})]}),m("div",{className:l.content,children:ie.length===0?y("div",{className:l.empty,children:[m("div",{className:l.emptyIcon,children:m("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:m("path",{d:"M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z"})})}),v==="page"?"\uC774 \uD398\uC774\uC9C0\uC5D0 \uD53C\uB4DC\uBC31\uC774 \uC5C6\uC2B5\uB2C8\uB2E4":"\uD53C\uB4DC\uBC31\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"]}):ie.map(_=>y("div",{className:`${l.card} ${_.status==="done"?l.cardDone:""}`,onClick:()=>p(_),children:[y("div",{className:l.cardHeader,children:[m("div",{className:l.cardAvatar,children:At(_.authorName)}),m("div",{className:l.cardInfo,children:y("div",{className:l.cardMeta,children:[m("span",{className:l.cardAuthor,children:_.authorName}),m("span",{className:l.cardTime,children:bn(_.createdAt)})]})})]}),m("div",{className:l.cardTitle,children:_.title.replace(/^\[피드백\]\s*/,"")}),_.screenshot&&m("div",{className:l.cardScreenshot,children:m("img",{src:_.screenshot,alt:"screenshot"})}),v==="all"&&_.feedbackUrl&&y("div",{className:l.cardRoute,onClick:j=>{j.stopPropagation(),window.location.href=_.feedbackUrl},title:"\uD398\uC774\uC9C0\uB85C \uC774\uB3D9",children:[m("span",{className:l.cardRoutePath,children:_.feedbackUrl}),y("svg",{className:l.cardRouteIcon,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"12",height:"12",children:[m("path",{d:"M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6"}),m("polyline",{points:"15 3 21 3 21 9"}),m("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]})]}),(_.startedAt||_.completedAt)&&y("div",{className:l.cardStatusTime,children:[_.startedAt&&_.status!=="todo"&&y("span",{children:["\uC9C4\uD589 \uC2DC\uC791: ",bn(_.startedAt)]}),_.completedAt&&_.status==="done"&&y("span",{children:["\uC644\uB8CC: ",bn(_.completedAt)]})]}),y("div",{className:l.cardFooter,children:[m("span",{className:l.cardReplyDot}),y("span",{className:l.cardReplyCount,children:[_.commentCount," ",_.commentCount===1?"Reply":"Replies"]})]})]},_.id))})]})]})]}),Me&&m(jr,{src:Me,onClose:()=>ve(null)}),me&&m(Ur,{fileUrl:me.url,fileName:me.name,fileType:me.type,fileSource:me.source,onClose:()=>b(null)})]}),document.body)}import{useState as Te,useRef as Vn,useEffect as Pt,useCallback as Ue}from"react";import{createPortal as Xr}from"react-dom";var Kr=`@keyframes styles-module__slideIn___Wx-kZ {
|
|
2384
2384
|
from {
|
|
2385
2385
|
transform: translateX(100%);
|
|
2386
2386
|
}
|
|
@@ -3100,15 +3100,15 @@ ${n.stack?.split(`
|
|
|
3100
3100
|
}
|
|
3101
3101
|
.styles-module__sendBtn___WLa8O:disabled {
|
|
3102
3102
|
cursor: not-allowed;
|
|
3103
|
-
}`,
|
|
3103
|
+
}`,Zr={backdrop:"styles-module__backdrop___qExl6",fadeIn:"styles-module__fadeIn___lF-be",panel:"styles-module__panel___ri2CN",slideIn:"styles-module__slideIn___Wx-kZ",exiting:"styles-module__exiting___iE6TS",slideOut:"styles-module__slideOut___1n8cb",resizeHandle:"styles-module__resizeHandle___VGNx4",header:"styles-module__header___gmriy",headerLeft:"styles-module__headerLeft___M17Y1",headerIcon:"styles-module__headerIcon___PsSMZ",headerTitle:"styles-module__headerTitle___Y96x8",headerActions:"styles-module__headerActions___-rG09",headerBtn:"styles-module__headerBtn___eSTQN",body:"styles-module__body___bXbbW",sidebar:"styles-module__sidebar___1NIqu",sidebarHeader:"styles-module__sidebarHeader___aMgpo",sidebarList:"styles-module__sidebarList___Ob-c6",sidebarEmpty:"styles-module__sidebarEmpty___QNq3K",sidebarItem:"styles-module__sidebarItem___T8-S5",sidebarActive:"styles-module__sidebarActive___WVtxJ",sidebarTitle:"styles-module__sidebarTitle___bkPQz",sidebarDate:"styles-module__sidebarDate___QNxsK",messages:"styles-module__messages___Al0UY",welcome:"styles-module__welcome___7MKNO",welcomeIcon:"styles-module__welcomeIcon___gd4O6",welcomeText:"styles-module__welcomeText___-aHqH",welcomeHint:"styles-module__welcomeHint___zUsgp",message:"styles-module__message___-0C3Z",user:"styles-module__user___V0NWN",msgBody:"styles-module__msgBody___YMLmR",msgContent:"styles-module__msgContent___ur5dX",assistant:"styles-module__assistant___sS3g4",msgAvatar:"styles-module__msgAvatar___AAtdS",msgImages:"styles-module__msgImages___xdjr7",msgImage:"styles-module__msgImage___g9UKr",msgMarkdown:"styles-module__msgMarkdown___2bE27",paragraph:"styles-module__paragraph___0db50",heading1:"styles-module__heading1___ObrLl",heading2:"styles-module__heading2___2GDnb",heading3:"styles-module__heading3___dJGMW",inlineCode:"styles-module__inlineCode___fXbsw",codeBlock:"styles-module__codeBlock___77Vmy",codeLang:"styles-module__codeLang___ANUgp",codeCopy:"styles-module__codeCopy___UKHGh",expandBtn:"styles-module__expandBtn___9EdJu",copyBtn:"styles-module__copyBtn___gMgrH",toolCalls:"styles-module__toolCalls___YDi5U",toolCall:"styles-module__toolCall___YG3jW",tool_success:"styles-module__tool_success___-qmku",tool_error:"styles-module__tool_error___tmRla",toolIcon:"styles-module__toolIcon___w-g-Z",toolName:"styles-module__toolName___yBXu6",toolMore:"styles-module__toolMore___MSrrk",subBadge:"styles-module__subBadge___bvbxD",toolCompact:"styles-module__toolCompact___i-o7k",toolCompactToggle:"styles-module__toolCompactToggle___uOgG4",toolCompactIcon:"styles-module__toolCompactIcon___onQV5",toolCompactError:"styles-module__toolCompactError___qcqEZ",toolCompactSub:"styles-module__toolCompactSub___awUyk",toolCompactList:"styles-module__toolCompactList___pumTz",toolCompactItem:"styles-module__toolCompactItem___GN7IT",toolSummary:"styles-module__toolSummary___-ultc",typing:"styles-module__typing___SxFST",typingDot:"styles-module__typingDot___-XQcu",continueBar:"styles-module__continueBar___Ox1ee",imagePreview:"styles-module__imagePreview___69vle",imageThumb:"styles-module__imageThumb___5-tAx",imageRemove:"styles-module__imageRemove___U8lFv",inputArea:"styles-module__inputArea___ySM3W",attachBtn:"styles-module__attachBtn___uvYvg",input:"styles-module__input___UnN4A",sendBtn:"styles-module__sendBtn___WLa8O",active:"styles-module__active___SooZB"};if(typeof document<"u"){let e=document.getElementById("impakers-debug-styles-agent-chat-styles");e||(e=document.createElement("style"),e.id="impakers-debug-styles-agent-chat-styles",document.head.appendChild(e)),e.textContent=Kr}var f=Zr;import{Fragment as Jr,jsx as g,jsxs as O}from"react/jsx-runtime";function Ko(e){return{github_read_file:"\uD30C\uC77C \uC77D\uAE30",github_search_code:"\uCF54\uB4DC \uAC80\uC0C9",github_grep_code:"\uCF54\uB4DC \uB0B4\uC6A9 \uAC80\uC0C9",github_get_tree:"\uB514\uB809\uD1A0\uB9AC \uAD6C\uC870",github_get_commits:"\uCEE4\uBC0B \uC774\uB825",supabase_query_db:"DB \uC870\uD68C",supabase_list_tables:"\uD14C\uC774\uBE14 \uBAA9\uB85D",supabase_get_api_logs:"API \uB85C\uADF8",vercel_get_runtime_logs:"\uB7F0\uD0C0\uC784 \uB85C\uADF8",vercel_get_deployments:"\uBC30\uD3EC \uC774\uB825",spawn_agent:"\uC11C\uBE0C \uC5D0\uC774\uC804\uD2B8",create_task:"\uD53C\uB4DC\uBC31 \uC0DD\uC131"}[e]||e}function Yr(e){let n=[],o=e.split(`
|
|
3104
3104
|
`),t=0;for(;t<o.length;){let s=o[t];if(s.startsWith("```")){let r=s.slice(3).trim(),i=[];for(t++;t<o.length&&!o[t].startsWith("```");)i.push(o[t]),t++;t++,n.push(O("div",{className:f.codeBlock,children:[r&&g("div",{className:f.codeLang,children:r}),g("pre",{children:g("code",{children:i.join(`
|
|
3105
3105
|
`)})}),g("button",{className:f.codeCopy,onClick:()=>navigator.clipboard?.writeText(i.join(`
|
|
3106
|
-
`)),type:"button",children:"\uBCF5\uC0AC"})]},`code-${t}`));continue}if(/^#{1,3}\s/.test(s)){let r=s.match(/^(#{1,3})/)?.[1].length||1,i=s.replace(/^#{1,3}\s/,"");n.push(g("div",{className:f[`heading${r}`],children:
|
|
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(g("div",{className:f[`heading${r}`],children:Uo(i)},`h-${t}`)),t++;continue}if(!s.trim()){t++;continue}n.push(g("p",{className:f.paragraph,children:Uo(s)},`p-${t}`)),t++}return n}function Uo(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(g("strong",{children:s[2]},r++)):s[3]&&n.push(g("code",{className:f.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]:g(Jr,{children:n})}function Qr({content:e}){let[n,o]=Te(!1),t=e.split(`
|
|
3107
3107
|
`);return t.length>8?O("div",{className:f.msgContent,children:[n?e:t.slice(0,6).join(`
|
|
3108
|
-
`)+"...",g("button",{className:f.expandBtn,onClick:()=>o(!n),type:"button",children:n?"\uC811\uAE30":"\uB354\uBCF4\uAE30"})]}):g("div",{className:f.msgContent,children:e})}function
|
|
3109
|
-
`);
|
|
3108
|
+
`)+"...",g("button",{className:f.expandBtn,onClick:()=>o(!n),type:"button",children:n?"\uC811\uAE30":"\uB354\uBCF4\uAE30"})]}):g("div",{className:f.msgContent,children:e})}function qr({text:e}){let[n,o]=Te(!1),t=Ue(()=>{navigator.clipboard?.writeText(e),o(!0),setTimeout(()=>o(!1),1500)},[e]);return g("button",{className:f.copyBtn,onClick:t,type:"button",children:n?"\u2713 \uBCF5\uC0AC\uB428":"\uBCF5\uC0AC"})}function Gr({calls:e}){let[n,o]=Te(!1);if(!e.length)return null;let t=e.filter(r=>r.status==="error").length,s=e.filter(r=>r.isSubAgent).length;return O("div",{className:f.toolCompact,children:[O("button",{className:f.toolCompactToggle,onClick:()=>o(!n),type:"button",children:[g("span",{className:f.toolCompactIcon,children:n?"\u25BE":"\u25B8"}),"\uB3C4\uAD6C ",e.length,"\uAC1C \uC0AC\uC6A9",t>0&&O("span",{className:f.toolCompactError,children:[" (",t," \uC2E4\uD328)"]}),s>0&&O("span",{className:f.toolCompactSub,children:[" \xB7 \uC11C\uBE0C ",s]})]}),n&&g("div",{className:f.toolCompactList,children:e.map((r,i)=>O("div",{className:`${f.toolCompactItem} ${f[`tool_${r.status}`]}`,children:[g("span",{children:r.status==="success"?"\u2713":r.status==="error"?"\u2717":"\u23F3"}),g("span",{children:Ko(r.name)}),r.isSubAgent&&g("span",{className:f.subBadge,children:"sub"}),r.summary&&g("span",{className:f.toolSummary,children:r.summary})]},i))})]})}function Zo({endpoint:e,onClose:n}){let[o,t]=Te([]),[s,r]=Te(""),[i,a]=Te(!1),[u,k]=Te(()=>{try{return localStorage.getItem("impakers-agent-session")||null}catch{return null}}),[v,S]=Te(!1),[N,L]=Te(!1),[E,D]=Te([]),[K,de]=Te(420),[ce,re]=Te(!1),[F,A]=Te([]),[Y,h]=Te([]),z=Vn(null),T=Vn(null),ue=Vn(null),R=Vn(null),J=Vn(!1);Pt(()=>{z.current?.scrollIntoView({behavior:"smooth"})},[o,Y]),Pt(()=>{T.current?.focus()},[]);let oe=Ue(()=>{let p=nn();if(!p)return;let P=e.replace(/\/api\/external\/feedback\/?$/,"");fetch(`${P}/api/agent/sessions?agentId=cs-assistant`,{headers:{Authorization:`Bearer ${p}`}}).then(H=>H.json()).then(H=>A(H.sessions||[])).catch(()=>{})},[e]);Pt(()=>{oe()},[oe]);let _e=Ue(()=>{S(!0),setTimeout(()=>n(),150)},[n]),Me=Ue(p=>{p.preventDefault(),J.current=!0;let P=p.clientX,H=K,ie=Z=>{if(!J.current)return;let te=P-Z.clientX;de(Math.max(360,Math.min(H+te,window.innerWidth-40)))},$=()=>{J.current=!1,document.removeEventListener("mousemove",ie),document.removeEventListener("mouseup",$)};document.addEventListener("mousemove",ie),document.addEventListener("mouseup",$)},[K]),ve=Ue(p=>{let P=p.target.files;P&&(Array.from(P).forEach(H=>{if(!H.type.startsWith("image/")||H.size>5*1024*1024)return;let ie=new FileReader;ie.onload=()=>{let $=ie.result.split(",")[1];D(Z=>[...Z,{base64:$,mediaType:H.type}])},ie.readAsDataURL(H)}),p.target.value="")},[]),me=Ue(async p=>{let P=nn();if(!P)return;let H=e.replace(/\/api\/external\/feedback\/?$/,"");try{let $=await(await fetch(`${H}/api/agent/sessions?sessionId=${p}`,{headers:{Authorization:`Bearer ${P}`}})).json();if($.messages){t($.messages.map((Z,te)=>({id:`loaded-${te}`,role:Z.role,content:Z.content,createdAt:new Date(Z.createdAt||Date.now()).getTime()}))),k(p);try{localStorage.setItem("impakers-agent-session",p)}catch{}re(!1)}}catch{}},[e]),b=Ue(async p=>{let P=p||s.trim(),H=E;if(!P&&H.length===0||i)return;let ie=nn();if(!ie)return;let $={id:`user-${Date.now()}`,role:"user",content:P||"\uC774\uBBF8\uC9C0\uB97C \uBD84\uC11D\uD574\uC8FC\uC138\uC694.",images:H.length>0?H:void 0,createdAt:Date.now()};t(j=>[...j,$]),r(""),D([]),a(!0),L(!1),h([]),T.current&&(T.current.style.height="auto");let Z=`assistant-${Date.now()}`,te={id:Z,role:"assistant",content:"",toolCalls:[],createdAt:Date.now()};t(j=>[...j,te]);let _=!1;try{let j=new AbortController;ue.current=j;let Ae=e.replace(/\/api\/external\/feedback\/?$/,""),he=await fetch(`${Ae}/api/agent`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${ie}`},body:JSON.stringify({message:P||"\uC774\uBBF8\uC9C0\uB97C \uBD84\uC11D\uD574\uC8FC\uC138\uC694.",agentId:"cs-assistant",sessionId:u||void 0,images:H.length>0?H.map(Ze=>({type:"image",...Ze})):void 0}),signal:j.signal});if(!he.ok){let Ze=await he.json().catch(()=>({error:"\uC694\uCCAD \uC2E4\uD328"}));t(Xe=>Xe.map(Be=>Be.id===Z?{...Be,content:`\uC624\uB958: ${Ze.error||"\uC694\uCCAD \uC2E4\uD328"}`}:Be)),a(!1);return}let Fe=he.body.getReader(),Kn=new TextDecoder,ln="";for(;;){let{done:Ze,value:Xe}=await Fe.read();if(Ze)break;ln+=Kn.decode(Xe,{stream:!0});let Be=ln.split(`
|
|
3109
|
+
`);ln=Be.pop()||"";for(let vn of Be){if(!vn.startsWith("data: "))continue;let wn=vn.slice(6).trim();if(wn)try{let q=JSON.parse(wn);switch(q.type){case"meta":if(q.conversationId){k(q.conversationId);try{localStorage.setItem("impakers-agent-session",q.conversationId)}catch{}}break;case"content":t(Se=>Se.map(V=>V.id===Z?{...V,content:V.content+(q.content||"")}:V));break;case"tool_call":{let Se={name:q.name||"",input:q.input||{},status:"running"};h(V=>[...V,Se]),t(V=>V.map(we=>we.id===Z?{...we,toolCalls:[...we.toolCalls||[],Se]}:we));break}case"tool_result":h(Se=>Se.map(V=>V.name===q.name&&V.status==="running"?{...V,status:q.result?.success?"success":"error",summary:q.result?.summary}:V)),t(Se=>Se.map(V=>{if(V.id!==Z)return V;let we=[...V.toolCalls||[]],dn=we.findLastIndex(Cn=>Cn.name===q.name&&Cn.status==="running");return dn>=0&&(we[dn]={...we[dn],status:q.result?.success?"success":"error",summary:q.result?.summary}),{...V,toolCalls:we}}));break;case"sub_agent_tool":{let Se={name:q.toolName||q.agentName||"sub-agent",input:{},status:q.status==="done"?"success":"running",isSubAgent:!0,summary:q.summary};q.status==="running"?h(V=>[...V,Se]):h(V=>V.map(we=>we.isSubAgent&&we.status==="running"?{...we,status:"success",summary:q.summary}:we));break}case"error":t(Se=>Se.map(V=>V.id===Z?{...V,content:V.content+`
|
|
3110
3110
|
|
|
3111
|
-
\uC624\uB958: ${q.error}`}:V));break;case"done":
|
|
3111
|
+
\uC624\uB958: ${q.error}`}:V));break;case"done":_=!0;break}}catch{}}}_||L(!0)}catch(j){if(j?.name!=="AbortError"){t(he=>he.map(Fe=>Fe.id===Z?{...Fe,content:Fe.content||"\uC5F0\uACB0\uC5D0 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4."}:Fe));let Ae=j?.message||"";(Ae.includes("timeout")||Ae.includes("aborted")||Ae.includes("network"))&&L(!0)}}finally{a(!1),h([]),ue.current=null,oe()}},[s,E,i,u,e,oe]),x=Ue(p=>{p.stopPropagation(),!p.nativeEvent.isComposing&&(p.key==="Enter"&&!p.shiftKey&&(p.preventDefault(),b()),p.key==="Escape"&&_e())},[b,_e]),ee=Ue(()=>{t([]),k(null),L(!1),h([]);try{localStorage.removeItem("impakers-agent-session")}catch{}},[]);return typeof document>"u"?null:Xr(O("div",{"data-impakers-debug":"",children:[g("div",{className:f.backdrop,onClick:_e}),O("div",{className:`${f.panel} ${v?f.exiting:""}`,style:{width:K},"data-impakers-debug":"",children:[g("div",{className:f.resizeHandle,onMouseDown:Me}),O("div",{className:f.header,children:[O("div",{className:f.headerLeft,children:[g("button",{className:f.headerBtn,onClick:()=>re(!ce),type:"button",title:"\uB300\uD654 \uAE30\uB85D",children:O("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"15",height:"15",children:[g("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),g("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),g("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]})}),g("span",{className:f.headerIcon,children:"\u2726"}),g("span",{className:f.headerTitle,children:"AI \uC5D0\uC774\uC804\uD2B8"})]}),O("div",{className:f.headerActions,children:[g("button",{className:f.headerBtn,onClick:ee,type:"button",title:"\uC0C8 \uB300\uD654",children:O("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"15",height:"15",children:[g("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),g("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),g("button",{className:f.headerBtn,onClick:_e,type:"button",title:"\uB2EB\uAE30",children:g("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"15",height:"15",children:g("path",{d:"M18 6L6 18M6 6l12 12"})})})]})]}),O("div",{className:f.body,children:[ce&&O("div",{className:f.sidebar,children:[g("div",{className:f.sidebarHeader,children:"\uB300\uD654 \uAE30\uB85D"}),O("div",{className:f.sidebarList,children:[F.length===0&&g("div",{className:f.sidebarEmpty,children:"\uAE30\uB85D\uC774 \uC5C6\uC2B5\uB2C8\uB2E4"}),F.map(p=>O("button",{className:`${f.sidebarItem} ${p.id===u?f.sidebarActive:""}`,onClick:()=>me(p.id),type:"button",children:[g("div",{className:f.sidebarTitle,children:p.title||"\uC0C8 \uB300\uD654"}),g("div",{className:f.sidebarDate,children:new Date(p.createdAt).toLocaleDateString("ko-KR",{month:"short",day:"numeric"})})]},p.id))]})]}),O("div",{className:f.messages,children:[o.length===0&&O("div",{className:f.welcome,children:[g("div",{className:f.welcomeIcon,children:"\u2726"}),g("div",{className:f.welcomeText,children:"\uBB34\uC5C7\uC744 \uB3C4\uC640\uB4DC\uB9B4\uAE4C\uC694?"}),g("div",{className:f.welcomeHint,children:"\uC0AC\uC6A9 \uC911 \uAD81\uAE08\uD55C \uC810\uC774\uB098 \uBB38\uC81C\uB97C \uBB3C\uC5B4\uBCF4\uC138\uC694"})]}),o.map(p=>O("div",{className:`${f.message} ${f[p.role]}`,children:[p.role==="assistant"&&g("div",{className:f.msgAvatar,children:"\u2726"}),O("div",{className:f.msgBody,children:[p.images&&p.images.length>0&&g("div",{className:f.msgImages,children:p.images.map((P,H)=>g("img",{src:`data:${P.mediaType};base64,${P.base64}`,alt:"",className:f.msgImage},H))}),p.toolCalls&&p.toolCalls.length>0&&!i&&g(Gr,{calls:p.toolCalls}),i&&p.id===o[o.length-1]?.id&&Y.length>0&&O("div",{className:f.toolCalls,children:[Y.slice(-3).map((P,H)=>O("div",{className:`${f.toolCall} ${f[`tool_${P.status}`]}`,children:[g("span",{className:f.toolIcon,children:P.status==="running"?"\u23F3":P.status==="success"?"\u2713":"\u2717"}),g("span",{className:f.toolName,children:Ko(P.name)}),P.isSubAgent&&g("span",{className:f.subBadge,children:"sub"})]},H)),Y.length>3&&O("div",{className:f.toolMore,children:["+",Y.length-3,"\uAC1C \uC644\uB8CC"]})]}),p.content&&p.role==="assistant"&&g("div",{className:f.msgMarkdown,children:Yr(p.content)}),p.content&&p.role==="user"&&g(Qr,{content:p.content}),p.role==="assistant"&&i&&p.id===o[o.length-1]?.id&&!p.content&&Y.length===0&&O("div",{className:f.typing,children:[g("span",{}),g("span",{}),g("span",{})]}),p.role==="assistant"&&p.content&&!i&&g(qr,{text:p.content})]})]},p.id)),N&&!i&&O("div",{className:f.continueBar,children:[g("span",{children:"\uD0C0\uC784\uC544\uC6C3\uC73C\uB85C \uBA48\uCDC4\uC2B5\uB2C8\uB2E4."}),g("button",{onClick:()=>{L(!1),b("\uC774\uC5B4\uC11C \uACC4\uC18D \uBD84\uC11D\uD574\uC918")},type:"button",children:"\uACC4\uC18D\uD558\uAE30 \u2192"})]}),g("div",{ref:z})]})]}),E.length>0&&g("div",{className:f.imagePreview,children:E.map((p,P)=>O("div",{className:f.imageThumb,children:[g("img",{src:`data:${p.mediaType};base64,${p.base64}`,alt:""}),g("button",{className:f.imageRemove,onClick:()=>D(H=>H.filter((ie,$)=>$!==P)),type:"button",children:"\xD7"})]},P))}),O("div",{className:f.inputArea,children:[g("button",{className:f.attachBtn,onClick:()=>R.current?.click(),type:"button",title:"\uC774\uBBF8\uC9C0 \uCCA8\uBD80",children:O("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"16",height:"16",children:[g("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"}),g("circle",{cx:"8.5",cy:"8.5",r:"1.5"}),g("polyline",{points:"21 15 16 10 5 21"})]})}),g("textarea",{ref:T,className:f.input,placeholder:"\uBA54\uC2DC\uC9C0\uB97C \uC785\uB825\uD558\uC138\uC694...",value:s,onChange:p=>{r(p.target.value);let P=p.target;P.style.height="auto",P.style.height=`${Math.min(P.scrollHeight,120)}px`},onKeyDown:x,rows:1,disabled:i}),g("button",{className:`${f.sendBtn} ${(s.trim()||E.length>0)&&!i?f.active:""}`,onClick:()=>b(),disabled:!s.trim()&&E.length===0||i,type:"button",children:O("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"16",height:"16",children:[g("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),g("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]})})]}),g("input",{ref:R,type:"file",accept:"image/jpeg,image/png,image/gif,image/webp",multiple:!0,style:{display:"none"},onChange:ve})]})]}),document.body)}import{useCallback as mt}from"react";import{createPortal as ti}from"react-dom";var Xo="impakers-debug-settings",$t={markerColor:"#6366f1",markersVisible:!0,hideDoneMarkers:!1,showOnlyMine:!1};function Yo(){try{let e=localStorage.getItem(Xo);return e?{...$t,...JSON.parse(e)}:{...$t}}catch{return{...$t}}}function Qo(e){try{localStorage.setItem(Xo,JSON.stringify(e))}catch{}}var qo=[{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 ei=`@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
|
-
}`,
|
|
3240
|
+
}`,ni={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=ei}var Q=ni;import{jsx as ke,jsxs as en}from"react/jsx-runtime";function Go({settings:e,onChange:n,onClose:o}){let t=mt(()=>{n({...e,markersVisible:!e.markersVisible})},[e,n]),s=mt(()=>{n({...e,hideDoneMarkers:!e.hideDoneMarkers})},[e,n]),r=mt(()=>{n({...e,showOnlyMine:!e.showOnlyMine})},[e,n]),i=mt(a=>{n({...e,markerColor:a})},[e,n]);return typeof document>"u"?null:ti(en("div",{"data-impakers-debug":"",children:[ke("div",{className:Q.backdrop,onClick:o}),en("div",{className:Q.panel,"data-impakers-debug":"",children:[en("div",{className:Q.header,children:[ke("span",{className:Q.title,children:"\uC124\uC815"}),ke("button",{className:Q.closeBtn,onClick:o,type:"button",children:ke("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:ke("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),en("div",{className:Q.body,children:[en("div",{className:Q.field,children:[ke("div",{className:Q.fieldLabel,children:"\uB9C8\uCEE4 \uD45C\uC2DC"}),ke("button",{className:`${Q.toggle} ${e.markersVisible?Q.on:""}`,onClick:t,type:"button",children:ke("span",{className:Q.toggleThumb})})]}),en("div",{className:Q.field,children:[ke("div",{className:Q.fieldLabel,children:"\uC644\uB8CC \uD540 \uC228\uAE30\uAE30"}),ke("button",{className:`${Q.toggle} ${e.hideDoneMarkers?Q.on:""}`,onClick:s,type:"button",children:ke("span",{className:Q.toggleThumb})})]}),en("div",{className:Q.field,children:[ke("div",{className:Q.fieldLabel,children:"\uB0B4\uAC00 \uCD94\uAC00\uD55C \uAC83\uB9CC"}),ke("button",{className:`${Q.toggle} ${e.showOnlyMine?Q.on:""}`,onClick:r,type:"button",children:ke("span",{className:Q.toggleThumb})})]}),en("div",{className:Q.field,children:[ke("div",{className:Q.fieldLabel,children:"\uB9C8\uCEE4 \uC0C9\uC0C1"}),ke("div",{className:Q.colors,children:qo.map(a=>ke("button",{className:`${Q.colorBtn} ${e.markerColor===a.value?Q.selected:""}`,style:{background:a.value},onClick:()=>i(a.value),title:a.label,type:"button"},a.id))})]})]})]})]}),document.body)}var oi=`.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
|
-
}`,oi={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=ti}var ae=oi;import{Fragment as _i,jsx as $,jsxs as $e}from"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 ii(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 Go(e){let{name:n,path:o}=bt(e),t=mo(e,{mode:"filtered"});return{name:t.path?`${t.path} ${n}`:n,elementName:n,path:o,reactComponents:t.path}}function ai(e){let n=Pn(e),o=n.found?n:kt(e);if(o.found&&o.source)return et(o.source,"path")}function li(e){let n=Pn(e),o=n.found?n:kt(e);return o.found&&o.sourceCandidates&&o.sourceCandidates.length>0?o.sourceCandidates.map(t=>et(t,"path")):o.found&&o.source?[et(o.source,"path")]:[]}function di(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 ci="impakers-debug-markers-";function zt(){return ci+window.location.pathname}function Ht(){try{let e=localStorage.getItem(zt());return e?JSON.parse(e):[]}catch{return[]}}function Jo(e){try{e.length===0?localStorage.removeItem(zt()):localStorage.setItem(zt(),JSON.stringify(e))}catch{}}function ui(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 es({endpoint:e,getUser:n,onHide:o}){let[t,s]=ne(!1),[r,i]=ne(()=>Ht()),[a,_]=ne(null),[k,v]=ne(!1),[C,w]=ne(null),[B,R]=ne({x:0,y:0}),[D,K]=ne(new Set),[ce,ue]=ne(!1),[re,A]=ne(null),[M,Y]=ne(null),[h,z]=ne(!1),[T,_e]=ne(null),[I,J]=ne(null),[oe,me]=ne({}),[Me,we]=ne(!1),[pe,b]=ne([]),[x,ee]=ne([]),[p,P]=ne(!1),[H,ie]=ne(!1),[F,Z]=ne(!1),[te,u]=ne(()=>Xo()),[j,Ae]=ne(()=>window.location.pathname),[ye,Pe]=ne(!1),[Un,an]=ne(0),[Ze,Xe]=ne(null),Be=Vn(null),kn=Vn(null),vn=Vn(null),q=Vn(!1),Se=Re(()=>{Xe(3);let d=3,c=()=>{d-=1,d<=0?(Xe(null),s(!0),document.documentElement.classList.add("impakers-selecting")):(Xe(d),Be.current=setTimeout(c,1e3))};Be.current=setTimeout(c,1e3)},[]),V=Re(d=>{d==="comment"?ln():d==="delay-capture"?Se():d==="agent"?ie(!0):d==="inbox"?(P(!0),wo(e,{staleWhileRevalidate:!0}).then(ee).catch(()=>{}),t&&(s(!1),document.documentElement.classList.remove("impakers-selecting"),w(null),_(null))):d==="settings"&&Z(!0)},[t,Se]),ke=Re(d=>{u(d),Yo(d)},[]),ln=Re(()=>{s(d=>{let c=!d;return c?document.documentElement.classList.add("impakers-selecting"):(document.documentElement.classList.remove("impakers-selecting"),w(null),_(null)),c})},[]);je(()=>()=>{document.documentElement.classList.remove("impakers-selecting")},[]),je(()=>{i(Ht());let d=()=>{Ae(window.location.pathname),i(Ht()),_(null),w(null)};window.addEventListener("popstate",d);let c=history.pushState.bind(history);return history.pushState=(...X)=>{c(...X),setTimeout(d,50)},()=>{window.removeEventListener("popstate",d),history.pushState=c}},[]),je(()=>{let d=Ye(j),c=pn(d);c&&(b(c),Pe(!0));let X=zn(d,L=>{b(L),Pe(!0)});return Co(e,j,{staleWhileRevalidate:!0}).then(L=>{b(L),Pe(!0)}).catch(()=>{}),X},[e,j]);let Cn="impakers-debug-history-last-seen";je(()=>{let d=localStorage.getItem(Cn)||new Date(0).toISOString();lt(e,{since:d,limit:100}).then(c=>an(c.length)).catch(()=>{})},[e]);let os=Re(()=>{localStorage.setItem(Cn,new Date().toISOString()),an(0)},[]);je(()=>{if(!ye)return;let d=pe.map(ui).filter(c=>c!==null);i(d),Jo(d)},[pe,ye]);let Vt=Vn(!0);je(()=>{if(Vt.current){Vt.current=!1;return}Jo(r)},[r]),je(()=>{let d=c=>{if(c.key==="Escape"){if(p){P(!1);return}if(a){c.preventDefault(),v(!0),Ne(()=>{_(null),v(!1)},150);return}t&&(c.preventDefault(),s(!1),document.documentElement.classList.remove("impakers-selecting"),w(null))}};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[p,a,t]),je(()=>{if(!t||a)return;let d=c=>{let X=c.composedPath()[0]||c.target;if(on(X,"[data-impakers-debug]")){w(null);return}let L=Bt(c.clientX,c.clientY);if(!L||on(L,"[data-impakers-debug]")){w(null);return}let{name:fe,elementName:Le,path:ve,reactComponents:se}=Go(L),S=L.getBoundingClientRect();w({element:fe,elementName:Le,elementPath:ve,rect:S,reactComponents:se}),R({x:c.clientX,y:c.clientY})};return document.addEventListener("mousemove",d),()=>document.removeEventListener("mousemove",d)},[t,a]),je(()=>{if(!t)return;let d=c=>{if(q.current)return;let X=c.composedPath()[0]||c.target;if(on(X,"[data-impakers-debug]")||on(X,"[data-annotation-popup]")||on(X,"[data-annotation-marker]"))return;if(a){c.preventDefault(),c.stopPropagation(),kn.current?.shake();return}c.preventDefault(),c.stopPropagation();let L=Bt(c.clientX,c.clientY);if(!L)return;let{name:fe,path:Le,reactComponents:ve}=Go(L),se=L.getBoundingClientRect(),S=c.clientX/window.innerWidth*100,le=ii(L),Zn=le?c.clientY:c.clientY+window.scrollY,Ln=window.getSelection(),dn;Ln&&Ln.toString().trim().length>0&&(dn=Ln.toString().trim().slice(0,500));let G=io(L),Ee=ao(L);_({x:S,y:Zn,clientY:c.clientY,element:fe,elementPath:Le,selectedText:dn,boundingBox:{x:se.left,y:le?se.top:se.top+window.scrollY,width:se.width,height:se.height},nearbyText:oo(L),cssClasses:so(L),isFixed:le,fullPath:co(L),accessibility:lo(L),computedStyles:Ee,computedStylesObj:G,reactComponents:ve??void 0,sourceFile:ai(L),targetElement:L}),w(null);let Xn=li(L).filter(Tn=>Tn.includes("/chunks/"));Xn.length>0&&(async()=>{for(let Tn of Xn)try{let Yn=await Lt(Tn);if(Yn){_(ft=>ft&&{...ft,resolvedSource:`${Yn.source}:${Yn.line}`,resolvedName:Yn.name??void 0});break}}catch{}})()};return document.addEventListener("click",d,!0),()=>document.removeEventListener("click",d,!0)},[t,a]);let wn=Re(d=>{_e(d),Ne(()=>_e(null),4e3)},[]),ss=Re(async d=>{if(!(!a||ce)){ue(!0);try{let c=ho(n),X=await po(),L=a.resolvedSource||a.sourceFile||"",fe=a.resolvedName||null;if(!a.resolvedSource&&a.sourceFile?.includes("/chunks/"))try{let G=await Lt(a.sourceFile);G&&(L=`${G.source}:${G.line}:${G.column}`,fe=G.name)}catch{}let Le=await bo(window.location.pathname),ve=L&&!L.includes("/chunks/")?di(L,fe):null,se=xo(ve?[ve]:void 0,Le?.targets);se.length>0&&(c.debugTargets=se),Le?.context&&(c.routeDebug=Le.context);let S=[];S.push(`## \uD53C\uB4DC\uBC31 ${d}`),se.length>0&&(S.push(""),S.push("---"),S.push(""),S.push("**\uB514\uBC84\uAE45 \uD0C0\uAC9F \uD30C\uC77C**:"),se.forEach(G=>{let Ee=G.line?`:${G.line}${typeof G.column=="number"?`:${G.column}`:""}`:"";S.push(`- [${G.kind}] \`${G.file}${Ee}\` (${G.reason})`)}));let le=[];if(a.element&&le.push(`**\uC120\uD0DD\uB41C \uC694\uC18C**: ${a.element}`),a.elementPath&&le.push(`**DOM \uACBD\uB85C**: \`${a.elementPath}\``),a.selectedText&&le.push(`**\uC120\uD0DD\uB41C \uD14D\uC2A4\uD2B8**: "${a.selectedText}"`),a.reactComponents?.trim()?le.push(`**React \uCEF4\uD3EC\uB10C\uD2B8**: ${a.reactComponents}`):fe&&le.push(`**\uCEF4\uD3EC\uB10C\uD2B8/\uD568\uC218**: ${fe}`),L&&!L.includes("/chunks/")&&le.push(`**\uC18C\uC2A4 \uD30C\uC77C**: \`${L}\``),a.cssClasses&&le.push(`**CSS \uD074\uB798\uC2A4**: \`${a.cssClasses}\``),a.nearbyText&&le.push(`**\uC8FC\uBCC0 \uD14D\uC2A4\uD2B8**: ${a.nearbyText}`),a.accessibility&&le.push(`**\uC811\uADFC\uC131**: ${a.accessibility}`),le.length>0&&(S.push(""),S.push("---"),S.push(""),le.forEach(G=>S.push(G))),c.consoleErrors?.length&&(S.push(""),S.push("---"),S.push(""),S.push("**\uCD5C\uADFC \uCF58\uC194 \uC5D0\uB7EC**:"),c.consoleErrors.slice(-10).forEach(G=>S.push(`- \`${G.slice(0,200)}\``))),c.consoleLogs?.length){let G=c.consoleLogs.filter(Ee=>Ee.level==="error"||Ee.level==="warn").slice(-10);G.length>0&&(S.push(""),S.push("**\uCD5C\uADFC \uCF58\uC194 \uB85C\uADF8**:"),G.forEach(Ee=>S.push(`- [${Ee.level}] \`${Ee.message.slice(0,200)}\``)))}if(S.push(""),S.push("---"),S.push(""),S.push("## \uD658\uACBD \uC815\uBCF4"),S.push(""),S.push(`- **URL**: ${c.url}`),S.push(`- **\uC2DC\uC810**: ${new Date(c.timestamp).toLocaleString("ko-KR")}`),S.push(`- **\uBE0C\uB77C\uC6B0\uC800**: ${c.browser}`),S.push(`- **\uD654\uBA74**: ${c.viewport} (@${c.pixelRatio}x)`),S.push(`- **\uC5B8\uC5B4**: ${c.language}`),c.user?.name&&S.push(`- **\uC0AC\uC6A9\uC790**: ${c.user.name}`),c.performance&&Object.keys(c.performance).length>0){S.push(""),S.push("---"),S.push(""),S.push("## \uC131\uB2A5"),S.push(""),S.push("| \uD56D\uBAA9 | \uAC12 |"),S.push("|------|-----|");let G={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[Ee,Yt]of Object.entries(c.performance)){let Xn=G[Ee]||Ee,Tn=Ee.includes("Heap")?"MB":"ms";S.push(`| ${Xn} | ${Yt}${Tn} |`)}}let Zn=S.join(`
|
|
3566
|
-
`),Ln=await vo(e,{title:d.slice(0,100),description:"",priority:"medium",metadata:c,debugInfo:Zn,debug_info:Zn,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});z(!0),Ne(()=>z(!1),3e3);let dn=Ln.taskId||null;vn.current=dn,Ne(()=>{vn.current=null},300),Ne(()=>{dn&&K(G=>new Set(G).add(dn))},250),v(!0),Ne(()=>{_(null),v(!1),s(!1),document.documentElement.classList.remove("impakers-selecting"),q.current=!0,setTimeout(()=>{q.current=!1},300)},150),window.getSelection()?.removeAllRanges()}catch(c){let X=c?.message||"\uD53C\uB4DC\uBC31 \uC804\uC1A1 \uC2E4\uD328";wn(X),console.error("[@impakers/debug] \uD53C\uB4DC\uBC31 \uC804\uC1A1 \uC2E4\uD328:",c)}finally{ue(!1)}}},[a,ce,e,n,wn]),rs=Re(()=>{v(!0),Ne(()=>{_(null),v(!1),s(!1),document.documentElement.classList.remove("impakers-selecting"),q.current=!0,setTimeout(()=>{q.current=!1},300)},150)},[]),Ut=Re(d=>{let c=d.id;J(X=>X===c?null:c)},[]);je(()=>{if(!I)return;let d=qe(I),c=pn(d);c?(me(L=>({...L,[I]:c})),we(!1)):we(!0);let X=zn(d,L=>{me(fe=>({...fe,[I]:L})),we(!1)});return rt(e,I,{staleWhileRevalidate:!0}).then(()=>we(!1)).catch(()=>we(!1)),X},[I,e]);let is=Re(async(d,c,X,L)=>{let fe=n?.()?.name?String(n().name):"\uC775\uBA85",Le=n?.()?.id?String(n().id):void 0;try{let ve;if(L)try{ve=await at(e,L,"comment",d)}catch(se){let S=se?.message||"\uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328";wn(S),console.error("[@impakers/debug] \uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328:",se)}await it(e,d,c,fe,Le,X,ve)}catch(ve){let se=ve?.message||"\uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328";wn(se),console.error("[@impakers/debug] \uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328:",ve)}},[n,e,wn]),as=Re(()=>{J(null)},[]),Kn=Re(d=>{if(!d){A(null),Y(null);return}if(A(d.id),d.boundingBox){let c=d.boundingBox,X=c.x+c.width/2,L=d.isFixed?c.y+c.height/2:c.y+c.height/2-window.scrollY,fe=Bt(X,L);if(fe){let Le=fe.getBoundingClientRect(),ve=Le.width/c.width,se=Le.height/c.height;if(ve>=.5&&se>=.5){Y(fe);return}}}Y(null)},[]),ls=Re(()=>{if(!a)return{left:0,top:0};let d=a.x/100*window.innerWidth,c=a.isFixed?a.y:a.y-window.scrollY,X=Math.max(160,Math.min(window.innerWidth-160,d));return c>window.innerHeight-290?{left:X,bottom:window.innerHeight-c+20}:{left:X,top:c+20}},[a]);if(typeof document>"u")return null;let Sn=ls(),Nn=M?.getBoundingClientRect(),ds=[{id:"comment",label:"\uD53C\uB4DC\uBC31",active:t,icon:$("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:$("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:$e("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[$("circle",{cx:"12",cy:"12",r:"10"}),$("polyline",{points:"12 6 12 12 16 14"})]})},{id:"agent",label:"\uC5D0\uC774\uC804\uD2B8",icon:$e("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[$("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"}),$("path",{d:"M20 3v4"}),$("path",{d:"M22 5h-4"})]})},{id:"inbox",label:"Inbox",badge:Un||void 0,icon:$e("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[$("polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12"}),$("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:$e("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[$("circle",{cx:"12",cy:"12",r:"3"}),$("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"})]})}],Kt=j,pt=n?.()?.name?String(n().name):null,Zt=si(()=>r.filter(d=>{let c=pe.find(X=>X.id===d.id);return!(te.hideDoneMarkers&&(d.status==="done"||d.status==="resolved")||te.showOnlyMine&&c?.authorName&&pt&&c.authorName!==pt)}),[r,pe,te.hideDoneMarkers,te.showOnlyMine,pt]),Xt=(d,c)=>({id:d.id,title:d.title||"\uD53C\uB4DC\uBC31",status:d.status,priority:d.priority,authorName:d.authorName||"\uC775\uBA85",feedbackUrl:d.feedbackUrl||c,createdAt:d.createdAt,startedAt:d.startedAt,completedAt:d.completedAt,commentCount:d.commentCount||0}),cs=pe.map(d=>Xt(d,Kt)),us=x.map(d=>Xt(d,""));return ri($e("div",{"data-impakers-debug":"",children:[$(Ho,{items:ds,onSelect:V,onHide:o,onDoubleTap:ln}),p&&$(Oo,{pageItems:cs,allItems:us,currentPath:Kt,serviceName:qt()||void 0,endpoint:e,currentUserName:n?.()?.name?String(n().name):"\uC775\uBA85",currentUserId:n?.()?.id?String(n().id):void 0,onClose:()=>P(!1),onHistoryViewed:os,newNotiCount:Un}),H&&$(Ko,{endpoint:e,onClose:()=>ie(!1)}),F&&$(qo,{settings:te,onChange:ke,onClose:()=>Z(!1)}),t&&$e(_i,{children:[C?.rect&&!a&&$("div",{className:`${ae.hoverHighlight} ${ae.enter}`,style:{left:C.rect.left,top:C.rect.top,width:C.rect.width,height:C.rect.height}}),C&&!a&&$e("div",{className:`${ae.hoverTooltip} ${ae.enter}`,style:{left:Math.min(B.x+14,window.innerWidth-200),top:B.y+14},children:[C.reactComponents&&$("div",{className:ae.hoverReactPath,children:C.reactComponents}),$("div",{className:ae.hoverElementName,children:C.elementName})]}),Nn&&re&&$("div",{className:`${ae.singleSelectOutline} ${ae.enter}`,style:{left:Nn.left,top:Nn.top,width:Nn.width,height:Nn.height}}),a?.targetElement&&(()=>{let d=a.targetElement.getBoundingClientRect();return $("div",{className:`${ae.singleSelectOutline} ${ae.enter}`,style:{left:d.left,top:d.top,width:d.width,height:d.height}})})()]}),$("div",{className:ae.markersLayer,"data-impakers-debug":"",style:{display:te.markersVisible?void 0:"none"},children:Zt.filter(d=>!d.isFixed).map((d,c)=>$(It,{annotation:d,layerIndex:c,isAnimated:D.has(d.id),isHovered:re===d.id,isDeleting:!1,markerClickBehavior:"edit",accentColor:te.markerColor,onHover:()=>Kn(d),onHoverEnd:()=>Kn(null),onClick:()=>Ut(d),onContextMenu:()=>{}},d.id))}),$e("div",{className:ae.fixedMarkersLayer,"data-impakers-debug":"",style:{display:te.markersVisible?void 0:"none"},children:[Zt.filter(d=>d.isFixed).map((d,c)=>$(It,{annotation:d,layerIndex:c,isAnimated:D.has(d.id),isHovered:re===d.id,isDeleting:!1,markerClickBehavior:"edit",accentColor:te.markerColor,onHover:()=>Kn(d),onHoverEnd:()=>Kn(null),onClick:()=>Ut(d),onContextMenu:()=>{}},d.id)),a&&$(Io,{x:a.x,y:a.clientY,isMultiSelect:!1,accentColor:te.markerColor})]}),a&&$(to,{ref:kn,element:a.resolvedSource||a.resolvedName||a.element,selectedText:a.selectedText,isExiting:k,style:{position:"fixed",left:Sn.left,..."top"in Sn?{top:Sn.top}:{},..."bottom"in Sn?{bottom:Sn.bottom}:{},transform:"translateX(-50%)",zIndex:100001},onSubmit:ss,onCancel:rs}),I&&(()=>{let d=r.find(le=>le.id===I),c=pe.find(le=>le.id===I);if(!d)return null;let X=d.x/100*window.innerWidth,L=d.isFixed?d.y:d.y-window.scrollY,fe=Math.max(10,Math.min(X+20,window.innerWidth-360)),Le=window.innerHeight-L,ve=L,se=Le>=300?Math.min(L,window.innerHeight-60):Math.max(10,L-Math.min(480,ve-10)),S={id:d.id,title:c?.title||d.comment||"\uD53C\uB4DC\uBC31",status:c?.status||"todo",authorName:c?.authorName||void 0,createdAt:c?.createdAt||new Date(d.timestamp).toISOString(),comments:oe[d.id]||[]};return $(Bo,{task:S,currentUserName:n?.()?.name?String(n().name):"\uC775\uBA85",currentUserId:n?.()?.id?String(n().id):void 0,left:fe,top:se,loading:Me,onClose:as,onReply:is})})(),Ze!==null&&$e("div",{className:ae.countdownOverlay,"data-impakers-debug":"",children:[$("div",{className:ae.countdownNumber,children:Ze}),$("div",{className:ae.countdownLabel,children:"\uD53C\uB4DC\uBC31 \uBAA8\uB4DC \uD65C\uC131\uD654\uAE4C\uC9C0..."}),$("button",{className:ae.countdownCancel,onClick:()=>{Be.current&&clearTimeout(Be.current),Xe(null)},type:"button",children:"\uCDE8\uC18C"})]}),h&&$e("div",{className:ae.toast,"data-impakers-debug":"",children:[$("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#16a34a",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:$("polyline",{points:"20 6 9 17 4 12"})}),$("span",{children:"\uD0DC\uC2A4\uD06C \uC0DD\uC131\uC774 \uC644\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4"})]}),T&&$e("div",{className:`${ae.toast} ${ae.toastError}`,"data-impakers-debug":"",children:[$e("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#ef4444",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[$("circle",{cx:"12",cy:"12",r:"10"}),$("line",{x1:"15",y1:"9",x2:"9",y2:"15"}),$("line",{x1:"9",y1:"9",x2:"15",y2:"15"})]}),$("span",{children:T})]})]}),document.body)}import{useState as Dt,useCallback as mi}from"react";import{createPortal as pi}from"react-dom";import{jsx as Ke,jsxs as xn}from"react/jsx-runtime";function ns({endpoint:e,onSuccess:n,onClose:o}){let[t,s]=Dt(""),[r,i]=Dt(!1),[a,_]=Dt(null),k=mi(async v=>{if(v.preventDefault(),!(!t.trim()||r)){i(!0),_(null);try{let C=await Gt(e,t.trim().toUpperCase());n(C.serviceName)}catch(C){_(C instanceof Error?C.message:"\uC778\uC99D \uC2E4\uD328")}finally{i(!1)}}},[t,e,r,n]);return typeof document>"u"?null:pi(xn("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:[Ke("div",{onClick:o,style:{position:"absolute",inset:0,background:"rgba(0, 0, 0, 0.4)"}}),xn("div",{style:{position:"relative",width:360,background:"white",borderRadius:12,boxShadow:"0 16px 48px rgba(0,0,0,0.16)",overflow:"hidden"},children:[xn("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px 20px",borderBottom:"1px solid #e5e5e5"},children:[Ke("h3",{style:{fontSize:15,fontWeight:600,color:"#18181b",margin:0},children:"\uD53C\uB4DC\uBC31 \uC704\uC82F \uC778\uC99D"}),Ke("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:Ke("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:Ke("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),xn("div",{style:{padding:20},children:[xn("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.",Ke("br",{}),"\uCF54\uB4DC\uB294 \uC784\uD328\uCEE4\uC2A4 OS\uC5D0\uC11C \uD655\uC778\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."]}),a&&Ke("div",{style:{background:"#fef2f2",border:"1px solid #fecaca",color:"#dc2626",padding:"8px 12px",borderRadius:8,fontSize:13,marginBottom:12},children:a}),xn("form",{onSubmit:k,children:[Ke("input",{type:"text",maxLength:6,placeholder:"A3F9K2",value:t,onChange:v=>s(v.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"}}),Ke("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)}import{Fragment as fi,jsx as ts,jsxs as gi}from"react/jsx-runtime";function Il({endpoint:e,getUser:n}){let[o,t]=Wt(!1),[s,r]=Wt(!1),[i,a]=Wt(()=>{try{return localStorage.getItem("impakers-debug-hidden")==="1"}catch{return!1}});jt(()=>{t(cn())},[]),jt(()=>{let C=[nn._on("impakers-debug:show-auth",()=>{r(!0),a(!1);try{localStorage.removeItem("impakers-debug-hidden")}catch{}}),nn._on("impakers-debug:open",()=>{a(!1);try{localStorage.removeItem("impakers-debug-hidden")}catch{}}),nn._on("impakers-debug:deactivate",()=>{t(!1),r(!1)})];return()=>C.forEach(w=>w())},[]),jt(()=>{function C(w){if((w.ctrlKey||w.metaKey)&&w.shiftKey&&(w.key==="."||w.key===">"||w.code==="Period")){if(w.preventDefault(),i){a(!1);try{localStorage.removeItem("impakers-debug-hidden")}catch{}return}cn()?t(!0):r(B=>!B)}}return document.addEventListener("keydown",C),()=>document.removeEventListener("keydown",C)},[i]);let _=Ot(C=>{t(!0),r(!1)},[]),k=Ot(()=>{r(!1)},[]),v=Ot(()=>{a(!0);try{localStorage.setItem("impakers-debug-hidden","1")}catch{}},[]);return gi(fi,{children:[o&&!i&&ts(es,{endpoint:e,getUser:n,onHide:v}),s&&!o&&ts(ns,{endpoint:e,onSuccess:_,onClose:k})]})}export{nn as ImpakersDebug,Il as ImpakersDebugProvider};
|
|
3565
|
+
}`,si={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=oi}var ae=si;import{Fragment as mi,jsx as B,jsxs as $e}from"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 ai(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 Jo(e){let{name:n,path:o}=bt(e),t=po(e,{mode:"filtered"});return{name:t.path?`${t.path} ${n}`:n,elementName:n,path:o,reactComponents:t.path}}function li(e){let n=Pn(e),o=n.found?n:kt(e);if(o.found&&o.source)return et(o.source,"path")}function di(e){let n=Pn(e),o=n.found?n:kt(e);return o.found&&o.sourceCandidates&&o.sourceCandidates.length>0?o.sourceCandidates.map(t=>et(t,"path")):o.found&&o.source?[et(o.source,"path")]:[]}function ci(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 ui="impakers-debug-markers-";function zt(){return ui+window.location.pathname}function Ht(){try{let e=localStorage.getItem(zt());return e?JSON.parse(e):[]}catch{return[]}}function es(e){try{e.length===0?localStorage.removeItem(zt()):localStorage.setItem(zt(),JSON.stringify(e))}catch{}}function _i(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 ns({endpoint:e,getUser:n,onHide:o}){let[t,s]=ne(!1),[r,i]=ne(()=>Ht()),[a,u]=ne(null),[k,v]=ne(!1),[S,N]=ne(null),[L,E]=ne({x:0,y:0}),[D,K]=ne(new Set),[de,ce]=ne(!1),[re,F]=ne(null),[A,Y]=ne(null),[h,z]=ne(!1),[T,ue]=ne(null),[R,J]=ne(null),[oe,_e]=ne({}),[Me,ve]=ne(!1),[me,b]=ne([]),[x,ee]=ne([]),[p,P]=ne(!1),[H,ie]=ne(!1),[$,Z]=ne(!1),[te,_]=ne(()=>Yo()),[j,Ae]=ne(()=>window.location.pathname),[he,Fe]=ne(!1),[Kn,ln]=ne(0),[Ze,Xe]=ne(null),Be=Un(null),vn=Un(null),wn=Un(null),q=Un(!1),Se=Re(()=>{Xe(3);let d=3,c=()=>{d-=1,d<=0?(Xe(null),s(!0),document.documentElement.classList.add("impakers-selecting")):(Xe(d),Be.current=setTimeout(c,1e3))};Be.current=setTimeout(c,1e3)},[]),V=Re(d=>{d==="comment"?dn():d==="delay-capture"?Se():d==="agent"?ie(!0):d==="inbox"?(P(!0),So(e,{staleWhileRevalidate:!0}).then(ee).catch(()=>{}),t&&(s(!1),document.documentElement.classList.remove("impakers-selecting"),N(null),u(null))):d==="settings"&&Z(!0)},[t,Se]),we=Re(d=>{_(d),Qo(d)},[]),dn=Re(()=>{s(d=>{let c=!d;return c?document.documentElement.classList.add("impakers-selecting"):(document.documentElement.classList.remove("impakers-selecting"),N(null),u(null)),c})},[]);je(()=>()=>{document.documentElement.classList.remove("impakers-selecting")},[]),je(()=>{i(Ht());let d=()=>{Ae(window.location.pathname),i(Ht()),u(null),N(null)};window.addEventListener("popstate",d);let c=history.pushState.bind(history);return history.pushState=(...X)=>{c(...X),setTimeout(d,50)},()=>{window.removeEventListener("popstate",d),history.pushState=c}},[]),je(()=>{let d=Qe(j),c=fn(d);c&&(b(c),Fe(!0));let X=Dn(d,I=>{b(I),Fe(!0)});return Co(e,j,{staleWhileRevalidate:!0}).then(I=>{b(I),Fe(!0)}).catch(()=>{}),X},[e,j]);let Cn="impakers-debug-history-last-seen";je(()=>{let d=localStorage.getItem(Cn)||new Date(0).toISOString();lt(e,{since:d,limit:100}).then(c=>ln(c.length)).catch(()=>{})},[e]);let ss=Re(()=>{localStorage.setItem(Cn,new Date().toISOString()),ln(0)},[]);je(()=>{if(!he)return;let d=me.map(_i).filter(c=>c!==null);i(d),es(d)},[me,he]);let Vt=Un(!0);je(()=>{if(Vt.current){Vt.current=!1;return}es(r)},[r]),je(()=>{let d=c=>{if(c.key==="Escape"){if(p){P(!1);return}if(a){c.preventDefault(),v(!0),Ne(()=>{u(null),v(!1)},150);return}t&&(c.preventDefault(),s(!1),document.documentElement.classList.remove("impakers-selecting"),N(null))}};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[p,a,t]),je(()=>{if(!t||a)return;let d=c=>{let X=c.composedPath()[0]||c.target;if(sn(X,"[data-impakers-debug]")){N(null);return}let I=Bt(c.clientX,c.clientY);if(!I||sn(I,"[data-impakers-debug]")){N(null);return}let{name:pe,elementName:Ie,path:ye,reactComponents:se}=Jo(I),w=I.getBoundingClientRect();N({element:pe,elementName:Ie,elementPath:ye,rect:w,reactComponents:se}),E({x:c.clientX,y:c.clientY})};return document.addEventListener("mousemove",d),()=>document.removeEventListener("mousemove",d)},[t,a]),je(()=>{if(!t)return;let d=c=>{if(q.current)return;let X=c.composedPath()[0]||c.target;if(sn(X,"[data-impakers-debug]")||sn(X,"[data-annotation-popup]")||sn(X,"[data-annotation-marker]"))return;if(a){c.preventDefault(),c.stopPropagation(),vn.current?.shake();return}c.preventDefault(),c.stopPropagation();let I=Bt(c.clientX,c.clientY);if(!I)return;let{name:pe,path:Ie,reactComponents:ye}=Jo(I),se=I.getBoundingClientRect(),w=c.clientX/window.innerWidth*100,be=ai(I),Ye=be?c.clientY:c.clientY+window.scrollY,Tn=window.getSelection(),cn;Tn&&Tn.toString().trim().length>0&&(cn=Tn.toString().trim().slice(0,500));let G=ao(I),Ee=lo(I);u({x:w,y:Ye,clientY:c.clientY,element:pe,elementPath:Ie,selectedText:cn,boundingBox:{x:se.left,y:be?se.top:se.top+window.scrollY,width:se.width,height:se.height},nearbyText:so(I),cssClasses:ro(I),isFixed:be,fullPath:uo(I),accessibility:co(I),computedStyles:Ee,computedStylesObj:G,reactComponents:ye??void 0,sourceFile:li(I),targetElement:I}),N(null);let Xn=di(I).filter(In=>In.includes("/chunks/"));Xn.length>0&&(async()=>{for(let In of Xn)try{let Yn=await Lt(In);if(Yn){u(ft=>ft&&{...ft,resolvedSource:`${Yn.source}:${Yn.line}`,resolvedName:Yn.name??void 0});break}}catch{}})()};return document.addEventListener("click",d,!0),()=>document.removeEventListener("click",d,!0)},[t,a]);let Sn=Re(d=>{ue(d),Ne(()=>ue(null),4e3)},[]),rs=Re(async d=>{if(!(!a||de)){ce(!0);try{let c=yo(n),X=await fo(),I=a.resolvedSource||a.sourceFile||"",pe=a.resolvedName||null;if(!a.resolvedSource&&a.sourceFile?.includes("/chunks/"))try{let G=await Lt(a.sourceFile);G&&(I=`${G.source}:${G.line}:${G.column}`,pe=G.name)}catch{}let Ie=await xo(window.location.pathname),ye=I&&!I.includes("/chunks/")?ci(I,pe):null,se=ko(ye?[ye]:void 0,Ie?.targets);se.length>0&&(c.debugTargets=se),Ie?.context&&(c.routeDebug=Ie.context);let w=[];w.push(`## \uD53C\uB4DC\uBC31 ${d}`),se.length>0&&(w.push(""),w.push("---"),w.push(""),w.push("**\uB514\uBC84\uAE45 \uD0C0\uAC9F \uD30C\uC77C**:"),se.forEach(G=>{let Ee=G.line?`:${G.line}${typeof G.column=="number"?`:${G.column}`:""}`:"";w.push(`- [${G.kind}] \`${G.file}${Ee}\` (${G.reason})`)}));let be=[];if(a.element&&be.push(`**\uC120\uD0DD\uB41C \uC694\uC18C**: ${a.element}`),a.elementPath&&be.push(`**DOM \uACBD\uB85C**: \`${a.elementPath}\``),a.selectedText&&be.push(`**\uC120\uD0DD\uB41C \uD14D\uC2A4\uD2B8**: "${a.selectedText}"`),a.reactComponents?.trim()?be.push(`**React \uCEF4\uD3EC\uB10C\uD2B8**: ${a.reactComponents}`):pe&&be.push(`**\uCEF4\uD3EC\uB10C\uD2B8/\uD568\uC218**: ${pe}`),I&&!I.includes("/chunks/")&&be.push(`**\uC18C\uC2A4 \uD30C\uC77C**: \`${I}\``),a.cssClasses&&be.push(`**CSS \uD074\uB798\uC2A4**: \`${a.cssClasses}\``),a.nearbyText&&be.push(`**\uC8FC\uBCC0 \uD14D\uC2A4\uD2B8**: ${a.nearbyText}`),a.accessibility&&be.push(`**\uC811\uADFC\uC131**: ${a.accessibility}`),be.length>0&&(w.push(""),w.push("---"),w.push(""),be.forEach(G=>w.push(G))),c.consoleErrors?.length&&(w.push(""),w.push("---"),w.push(""),w.push("**\uCD5C\uADFC \uCF58\uC194 \uC5D0\uB7EC**:"),c.consoleErrors.slice(-10).forEach(G=>w.push(`- \`${G.slice(0,200)}\``))),c.consoleLogs?.length){let G=c.consoleLogs.filter(Ee=>Ee.level==="error"||Ee.level==="warn").slice(-10);G.length>0&&(w.push(""),w.push("**\uCD5C\uADFC \uCF58\uC194 \uB85C\uADF8**:"),G.forEach(Ee=>w.push(`- [${Ee.level}] \`${Ee.message.slice(0,200)}\``)))}if(w.push(""),w.push("---"),w.push(""),w.push("## \uD658\uACBD \uC815\uBCF4"),w.push(""),w.push(`- **URL**: ${c.url}`),w.push(`- **\uC2DC\uC810**: ${new Date(c.timestamp).toLocaleString("ko-KR")}`),w.push(`- **\uBE0C\uB77C\uC6B0\uC800**: ${c.browser}`),w.push(`- **\uD654\uBA74**: ${c.viewport} (@${c.pixelRatio}x)`),w.push(`- **\uC5B8\uC5B4**: ${c.language}`),c.user?.name&&w.push(`- **\uC0AC\uC6A9\uC790**: ${c.user.name}`),c.performance&&Object.keys(c.performance).length>0){w.push(""),w.push("---"),w.push(""),w.push("## \uC131\uB2A5"),w.push(""),w.push("| \uD56D\uBAA9 | \uAC12 |"),w.push("|------|-----|");let G={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[Ee,Yt]of Object.entries(c.performance)){let Xn=G[Ee]||Ee,In=Ee.includes("Heap")?"MB":"ms";w.push(`| ${Xn} | ${Yt}${In} |`)}}let Ye=w.join(`
|
|
3566
|
+
`),Tn=await wo(e,{title:d.slice(0,100),description:"",priority:"medium",metadata:c,debugInfo:Ye,debug_info:Ye,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});z(!0),Ne(()=>z(!1),3e3);let cn=Tn.taskId||null;wn.current=cn,Ne(()=>{wn.current=null},300),Ne(()=>{cn&&K(G=>new Set(G).add(cn))},250),v(!0),Ne(()=>{u(null),v(!1),s(!1),document.documentElement.classList.remove("impakers-selecting"),q.current=!0,setTimeout(()=>{q.current=!1},300)},150),window.getSelection()?.removeAllRanges()}catch(c){let X=c?.message||"\uD53C\uB4DC\uBC31 \uC804\uC1A1 \uC2E4\uD328";Sn(X),console.error("[@impakers/debug] \uD53C\uB4DC\uBC31 \uC804\uC1A1 \uC2E4\uD328:",c)}finally{ce(!1)}}},[a,de,e,n,Sn]),is=Re(()=>{v(!0),Ne(()=>{u(null),v(!1),s(!1),document.documentElement.classList.remove("impakers-selecting"),q.current=!0,setTimeout(()=>{q.current=!1},300)},150)},[]),Ut=Re(d=>{let c=d.id;J(X=>X===c?null:c)},[]);je(()=>{if(!R)return;let d=Ge(R),c=fn(d);c?(_e(I=>({...I,[R]:c})),ve(!1)):ve(!0);let X=Dn(d,I=>{_e(pe=>({...pe,[R]:I})),ve(!1)});return rt(e,R,{staleWhileRevalidate:!0}).then(()=>ve(!1)).catch(()=>ve(!1)),X},[R,e]);let as=Re(async(d,c,X,I)=>{let pe=n?.()?.name?String(n().name):"\uC775\uBA85",Ie=n?.()?.id?String(n().id):void 0;try{let ye;if(I)try{ye=await at(e,I,"comment",d)}catch(se){let w=se?.message||"\uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328";Sn(w),console.error("[@impakers/debug] \uD30C\uC77C \uC5C5\uB85C\uB4DC \uC2E4\uD328:",se)}await it(e,d,c,pe,Ie,X,ye)}catch(ye){let se=ye?.message||"\uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328";Sn(se),console.error("[@impakers/debug] \uCF54\uBA58\uD2B8 \uC804\uC1A1 \uC2E4\uD328:",ye)}},[n,e,Sn]),ls=Re(()=>{J(null)},[]),Zn=Re(d=>{if(!d){F(null),Y(null);return}if(F(d.id),d.boundingBox){let c=d.boundingBox,X=c.x+c.width/2,I=d.isFixed?c.y+c.height/2:c.y+c.height/2-window.scrollY,pe=Bt(X,I);if(pe){let Ie=pe.getBoundingClientRect(),ye=Ie.width/c.width,se=Ie.height/c.height;if(ye>=.5&&se>=.5){Y(pe);return}}}Y(null)},[]),ds=Re(()=>{if(!a)return{left:0,top:0};let d=a.x/100*window.innerWidth,c=a.isFixed?a.y:a.y-window.scrollY,X=Math.max(160,Math.min(window.innerWidth-160,d));return c>window.innerHeight-290?{left:X,bottom:window.innerHeight-c+20}:{left:X,top:c+20}},[a]);if(typeof document>"u")return null;let Nn=ds(),Ln=A?.getBoundingClientRect(),cs=[{id:"comment",label:"\uD53C\uB4DC\uBC31",active:t,icon:B("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:B("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:$e("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[B("circle",{cx:"12",cy:"12",r:"10"}),B("polyline",{points:"12 6 12 12 16 14"})]})},{id:"agent",label:"\uC5D0\uC774\uC804\uD2B8",icon:$e("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[B("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"}),B("path",{d:"M20 3v4"}),B("path",{d:"M22 5h-4"})]})},{id:"inbox",label:"Inbox",badge:Kn||void 0,icon:$e("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[B("polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12"}),B("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:$e("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[B("circle",{cx:"12",cy:"12",r:"3"}),B("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"})]})}],Kt=j,pt=n?.()?.name?String(n().name):null,Zt=ri(()=>r.filter(d=>{let c=me.find(X=>X.id===d.id);return!(te.hideDoneMarkers&&(d.status==="done"||d.status==="resolved")||te.showOnlyMine&&c?.authorName&&pt&&c.authorName!==pt)}),[r,me,te.hideDoneMarkers,te.showOnlyMine,pt]),Xt=(d,c)=>({id:d.id,title:d.title||"\uD53C\uB4DC\uBC31",status:d.status,priority:d.priority,authorName:d.authorName||"\uC775\uBA85",feedbackUrl:d.feedbackUrl||c,createdAt:d.createdAt,startedAt:d.startedAt,completedAt:d.completedAt,commentCount:d.commentCount||0}),us=me.map(d=>Xt(d,Kt)),_s=x.map(d=>Xt(d,""));return ii($e("div",{"data-impakers-debug":"",children:[B(zo,{items:cs,onSelect:V,onHide:o,onDoubleTap:dn}),p&&B(Vo,{pageItems:us,allItems:_s,currentPath:Kt,serviceName:Gt()||void 0,endpoint:e,currentUserName:n?.()?.name?String(n().name):"\uC775\uBA85",currentUserId:n?.()?.id?String(n().id):void 0,onClose:()=>P(!1),onHistoryViewed:ss,newNotiCount:Kn}),H&&B(Zo,{endpoint:e,onClose:()=>ie(!1)}),$&&B(Go,{settings:te,onChange:we,onClose:()=>Z(!1)}),t&&$e(mi,{children:[S?.rect&&!a&&B("div",{className:`${ae.hoverHighlight} ${ae.enter}`,style:{left:S.rect.left,top:S.rect.top,width:S.rect.width,height:S.rect.height}}),S&&!a&&$e("div",{className:`${ae.hoverTooltip} ${ae.enter}`,style:{left:Math.min(L.x+14,window.innerWidth-200),top:L.y+14},children:[S.reactComponents&&B("div",{className:ae.hoverReactPath,children:S.reactComponents}),B("div",{className:ae.hoverElementName,children:S.elementName})]}),Ln&&re&&B("div",{className:`${ae.singleSelectOutline} ${ae.enter}`,style:{left:Ln.left,top:Ln.top,width:Ln.width,height:Ln.height}}),a?.targetElement&&(()=>{let d=a.targetElement.getBoundingClientRect();return B("div",{className:`${ae.singleSelectOutline} ${ae.enter}`,style:{left:d.left,top:d.top,width:d.width,height:d.height}})})()]}),B("div",{className:ae.markersLayer,"data-impakers-debug":"",style:{display:te.markersVisible?void 0:"none"},children:Zt.filter(d=>!d.isFixed).map((d,c)=>B(It,{annotation:d,layerIndex:c,isAnimated:D.has(d.id),isHovered:re===d.id,isDeleting:!1,markerClickBehavior:"edit",accentColor:te.markerColor,onHover:()=>Zn(d),onHoverEnd:()=>Zn(null),onClick:()=>Ut(d),onContextMenu:()=>{}},d.id))}),$e("div",{className:ae.fixedMarkersLayer,"data-impakers-debug":"",style:{display:te.markersVisible?void 0:"none"},children:[Zt.filter(d=>d.isFixed).map((d,c)=>B(It,{annotation:d,layerIndex:c,isAnimated:D.has(d.id),isHovered:re===d.id,isDeleting:!1,markerClickBehavior:"edit",accentColor:te.markerColor,onHover:()=>Zn(d),onHoverEnd:()=>Zn(null),onClick:()=>Ut(d),onContextMenu:()=>{}},d.id)),a&&B(Eo,{x:a.x,y:a.clientY,isMultiSelect:!1,accentColor:te.markerColor})]}),a&&B(oo,{ref:vn,element:a.resolvedSource||a.resolvedName||a.element,selectedText:a.selectedText,isExiting:k,style:{position:"fixed",left:Nn.left,..."top"in Nn?{top:Nn.top}:{},..."bottom"in Nn?{bottom:Nn.bottom}:{},transform:"translateX(-50%)",zIndex:100001},onSubmit:rs,onCancel:is}),R&&(()=>{let d=r.find(Ye=>Ye.id===R),c=me.find(Ye=>Ye.id===R);if(!d)return null;let X=d.x/100*window.innerWidth,I=d.isFixed?d.y:d.y-window.scrollY,pe=Math.max(10,Math.min(X+20,window.innerWidth-360)),ye=window.innerHeight-I>=300,se=ye?Math.max(10,I):void 0,w=ye?void 0:Math.max(10,window.innerHeight-I),be={id:d.id,title:c?.title||d.comment||"\uD53C\uB4DC\uBC31",status:c?.status||"todo",authorName:c?.authorName||void 0,createdAt:c?.createdAt||new Date(d.timestamp).toISOString(),comments:oe[d.id]||[]};return B(Ho,{task:be,currentUserName:n?.()?.name?String(n().name):"\uC775\uBA85",currentUserId:n?.()?.id?String(n().id):void 0,left:pe,top:se,bottom:w,loading:Me,onClose:ls,onReply:as})})(),Ze!==null&&$e("div",{className:ae.countdownOverlay,"data-impakers-debug":"",children:[B("div",{className:ae.countdownNumber,children:Ze}),B("div",{className:ae.countdownLabel,children:"\uD53C\uB4DC\uBC31 \uBAA8\uB4DC \uD65C\uC131\uD654\uAE4C\uC9C0..."}),B("button",{className:ae.countdownCancel,onClick:()=>{Be.current&&clearTimeout(Be.current),Xe(null)},type:"button",children:"\uCDE8\uC18C"})]}),h&&$e("div",{className:ae.toast,"data-impakers-debug":"",children:[B("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#16a34a",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:B("polyline",{points:"20 6 9 17 4 12"})}),B("span",{children:"\uD0DC\uC2A4\uD06C \uC0DD\uC131\uC774 \uC644\uB8CC\uB418\uC5C8\uC2B5\uB2C8\uB2E4"})]}),T&&$e("div",{className:`${ae.toast} ${ae.toastError}`,"data-impakers-debug":"",children:[$e("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"#ef4444",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[B("circle",{cx:"12",cy:"12",r:"10"}),B("line",{x1:"15",y1:"9",x2:"9",y2:"15"}),B("line",{x1:"9",y1:"9",x2:"15",y2:"15"})]}),B("span",{children:T})]})]}),document.body)}import{useState as Dt,useCallback as pi}from"react";import{createPortal as fi}from"react-dom";import{jsx as Ke,jsxs as kn}from"react/jsx-runtime";function ts({endpoint:e,onSuccess:n,onClose:o}){let[t,s]=Dt(""),[r,i]=Dt(!1),[a,u]=Dt(null),k=pi(async v=>{if(v.preventDefault(),!(!t.trim()||r)){i(!0),u(null);try{let S=await Jt(e,t.trim().toUpperCase());n(S.serviceName)}catch(S){u(S instanceof Error?S.message:"\uC778\uC99D \uC2E4\uD328")}finally{i(!1)}}},[t,e,r,n]);return typeof document>"u"?null:fi(kn("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:[Ke("div",{onClick:o,style:{position:"absolute",inset:0,background:"rgba(0, 0, 0, 0.4)"}}),kn("div",{style:{position:"relative",width:360,background:"white",borderRadius:12,boxShadow:"0 16px 48px rgba(0,0,0,0.16)",overflow:"hidden"},children:[kn("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"16px 20px",borderBottom:"1px solid #e5e5e5"},children:[Ke("h3",{style:{fontSize:15,fontWeight:600,color:"#18181b",margin:0},children:"\uD53C\uB4DC\uBC31 \uC704\uC82F \uC778\uC99D"}),Ke("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:Ke("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:Ke("path",{d:"M18 6L6 18M6 6l12 12"})})})]}),kn("div",{style:{padding:20},children:[kn("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.",Ke("br",{}),"\uCF54\uB4DC\uB294 \uC784\uD328\uCEE4\uC2A4 OS\uC5D0\uC11C \uD655\uC778\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4."]}),a&&Ke("div",{style:{background:"#fef2f2",border:"1px solid #fecaca",color:"#dc2626",padding:"8px 12px",borderRadius:8,fontSize:13,marginBottom:12},children:a}),kn("form",{onSubmit:k,children:[Ke("input",{type:"text",maxLength:6,placeholder:"A3F9K2",value:t,onChange:v=>s(v.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"}}),Ke("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)}import{Fragment as gi,jsx as os,jsxs as hi}from"react/jsx-runtime";function Ml({endpoint:e,getUser:n}){let o=e||Qt,[t,s]=Wt(!1),[r,i]=Wt(!1),[a,u]=Wt(()=>{try{return localStorage.getItem("impakers-debug-hidden")==="1"}catch{return!1}});jt(()=>{s(un())},[]),jt(()=>{let N=[tn._on("impakers-debug:show-auth",()=>{i(!0),u(!1);try{localStorage.removeItem("impakers-debug-hidden")}catch{}}),tn._on("impakers-debug:open",()=>{u(!1);try{localStorage.removeItem("impakers-debug-hidden")}catch{}}),tn._on("impakers-debug:deactivate",()=>{s(!1),i(!1)})];return()=>N.forEach(L=>L())},[]),jt(()=>{function N(L){if((L.ctrlKey||L.metaKey)&&L.shiftKey&&(L.key==="."||L.key===">"||L.code==="Period")){if(L.preventDefault(),a){u(!1);try{localStorage.removeItem("impakers-debug-hidden")}catch{}return}un()?s(!0):i(E=>!E)}}return document.addEventListener("keydown",N),()=>document.removeEventListener("keydown",N)},[a]);let k=Ot(N=>{s(!0),i(!1)},[]),v=Ot(()=>{i(!1)},[]),S=Ot(()=>{u(!0);try{localStorage.setItem("impakers-debug-hidden","1")}catch{}},[]);return hi(gi,{children:[t&&!a&&os(ns,{endpoint:o,getUser:n,onHide:S}),r&&!t&&os(ts,{endpoint:o,onSuccess:k,onClose:v})]})}export{tn as ImpakersDebug,Ml as ImpakersDebugProvider};
|