/** * @license * Copyright 2025 Google LLC * SPDX-License-Identifier: Apache-2.0 */ export declare const INDEX_HTML = "\n\n \n \n \n Gemini CLI DevTools\n \n \n \n
\n \n \n\n"; export declare const CLIENT_JS = "var uy=Object.create;var Pf=Object.defineProperty;var iy=Object.getOwnPropertyDescriptor;var cy=Object.getOwnPropertyNames;var fy=Object.getPrototypeOf,oy=Object.prototype.hasOwnProperty;var lt=(l,t)=>()=>(t||l((t={exports:{}}).exports,t),t.exports);var dy=(l,t,e,a)=>{if(t&&typeof t==\"object\"||typeof t==\"function\")for(let n of cy(t))!oy.call(l,n)&&n!==e&&Pf(l,n,{get:()=>t[n],enumerable:!(a=iy(t,n))||a.enumerable});return l};var ne=(l,t,e)=>(e=l!=null?uy(fy(l)):{},dy(t||!l||!l.__esModule?Pf(e,\"default\",{value:l,enumerable:!0}):e,l));var so=lt(D=>{\"use strict\";var oi=Symbol.for(\"react.transitional.element\"),sy=Symbol.for(\"react.portal\"),yy=Symbol.for(\"react.fragment\"),ry=Symbol.for(\"react.strict_mode\"),hy=Symbol.for(\"react.profiler\"),my=Symbol.for(\"react.consumer\"),vy=Symbol.for(\"react.context\"),gy=Symbol.for(\"react.forward_ref\"),Sy=Symbol.for(\"react.suspense\"),py=Symbol.for(\"react.memo\"),no=Symbol.for(\"react.lazy\"),by=Symbol.for(\"react.activity\"),lo=Symbol.iterator;function zy(l){return l===null||typeof l!=\"object\"?null:(l=lo&&l[lo]||l[\"@@iterator\"],typeof l==\"function\"?l:null)}var uo={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},io=Object.assign,co={};function _e(l,t,e){this.props=l,this.context=t,this.refs=co,this.updater=e||uo}_e.prototype.isReactComponent={};_e.prototype.setState=function(l,t){if(typeof l!=\"object\"&&typeof l!=\"function\"&&l!=null)throw Error(\"takes an object of state variables to update or a function which returns an object of state variables.\");this.updater.enqueueSetState(this,l,t,\"setState\")};_e.prototype.forceUpdate=function(l){this.updater.enqueueForceUpdate(this,l,\"forceUpdate\")};function fo(){}fo.prototype=_e.prototype;function di(l,t,e){this.props=l,this.context=t,this.refs=co,this.updater=e||uo}var si=di.prototype=new fo;si.constructor=di;io(si,_e.prototype);si.isPureReactComponent=!0;var to=Array.isArray;function fi(){}var J={H:null,A:null,T:null,S:null},oo=Object.prototype.hasOwnProperty;function yi(l,t,e){var a=e.ref;return{$$typeof:oi,type:l,key:t,ref:a!==void 0?a:null,props:e}}function Ey(l,t){return yi(l.type,t,l.props)}function ri(l){return typeof l==\"object\"&&l!==null&&l.$$typeof===oi}function Ty(l){var t={\"=\":\"=0\",\":\":\"=2\"};return\"$\"+l.replace(/[=:]/g,function(e){return t[e]})}var eo=/\\/+/g;function ci(l,t){return typeof l==\"object\"&&l!==null&&l.key!=null?Ty(\"\"+l.key):t.toString(36)}function xy(l){switch(l.status){case\"fulfilled\":return l.value;case\"rejected\":throw l.reason;default:switch(typeof l.status==\"string\"?l.then(fi,fi):(l.status=\"pending\",l.then(function(t){l.status===\"pending\"&&(l.status=\"fulfilled\",l.value=t)},function(t){l.status===\"pending\"&&(l.status=\"rejected\",l.reason=t)})),l.status){case\"fulfilled\":return l.value;case\"rejected\":throw l.reason}}throw l}function Me(l,t,e,a,n){var u=typeof l;(u===\"undefined\"||u===\"boolean\")&&(l=null);var i=!1;if(l===null)i=!0;else switch(u){case\"bigint\":case\"string\":case\"number\":i=!0;break;case\"object\":switch(l.$$typeof){case oi:case sy:i=!0;break;case no:return i=l._init,Me(i(l._payload),t,e,a,n)}}if(i)return n=n(l),i=a===\"\"?\".\"+ci(l,0):a,to(n)?(e=\"\",i!=null&&(e=i.replace(eo,\"$&/\")+\"/\"),Me(n,t,e,\"\",function(d){return d})):n!=null&&(ri(n)&&(n=Ey(n,e+(n.key==null||l&&l.key===n.key?\"\":(\"\"+n.key).replace(eo,\"$&/\")+\"/\")+i)),t.push(n)),1;i=0;var c=a===\"\"?\".\":a+\":\";if(to(l))for(var f=0;f{\"use strict\";yo.exports=so()});var Eo=lt($=>{\"use strict\";function gi(l,t){var e=l.length;l.push(t);l:for(;0>>1,n=l[a];if(0>>1;aDn(c,e))fDn(d,c)?(l[a]=d,l[f]=e,a=f):(l[a]=c,l[i]=e,a=i);else if(fDn(d,e))l[a]=d,l[f]=e,a=f;else break l}}return t}function Dn(l,t){var e=l.sortIndex-t.sortIndex;return e!==0?e:l.id-t.id}$.unstable_now=void 0;typeof performance==\"object\"&&typeof performance.now==\"function\"?(ro=performance,$.unstable_now=function(){return ro.now()}):(hi=Date,ho=hi.now(),$.unstable_now=function(){return hi.now()-ho});var ro,hi,ho,dt=[],Ut=[],My=1,Ll=null,gl=3,Si=!1,Ta=!1,xa=!1,pi=!1,go=typeof setTimeout==\"function\"?setTimeout:null,So=typeof clearTimeout==\"function\"?clearTimeout:null,mo=typeof setImmediate<\"u\"?setImmediate:null;function Un(l){for(var t=tt(Ut);t!==null;){if(t.callback===null)Nn(Ut);else if(t.startTime<=l)Nn(Ut),t.sortIndex=t.expirationTime,gi(dt,t);else break;t=tt(Ut)}}function bi(l){if(xa=!1,Un(l),!Ta)if(tt(dt)!==null)Ta=!0,Ne||(Ne=!0,Ue());else{var t=tt(Ut);t!==null&&zi(bi,t.startTime-l)}}var Ne=!1,Aa=-1,po=5,bo=-1;function zo(){return pi?!0:!($.unstable_now()-bol&&zo());){var a=Ll.callback;if(typeof a==\"function\"){Ll.callback=null,gl=Ll.priorityLevel;var n=a(Ll.expirationTime<=l);if(l=$.unstable_now(),typeof n==\"function\"){Ll.callback=n,Un(l),t=!0;break t}Ll===tt(dt)&&Nn(dt),Un(l)}else Nn(dt);Ll=tt(dt)}if(Ll!==null)t=!0;else{var u=tt(Ut);u!==null&&zi(bi,u.startTime-l),t=!1}}break l}finally{Ll=null,gl=e,Si=!1}t=void 0}}finally{t?Ue():Ne=!1}}}var Ue;typeof mo==\"function\"?Ue=function(){mo(mi)}:typeof MessageChannel<\"u\"?(vi=new MessageChannel,vo=vi.port2,vi.port1.onmessage=mi,Ue=function(){vo.postMessage(null)}):Ue=function(){go(mi,0)};var vi,vo;function zi(l,t){Aa=go(function(){l($.unstable_now())},t)}$.unstable_IdlePriority=5;$.unstable_ImmediatePriority=1;$.unstable_LowPriority=4;$.unstable_NormalPriority=3;$.unstable_Profiling=null;$.unstable_UserBlockingPriority=2;$.unstable_cancelCallback=function(l){l.callback=null};$.unstable_forceFrameRate=function(l){0>l||125a?(l.sortIndex=e,gi(Ut,l),tt(dt)===null&&l===tt(Ut)&&(xa?(So(Aa),Aa=-1):xa=!0,zi(bi,e-a))):(l.sortIndex=n,gi(dt,l),Ta||Si||(Ta=!0,Ne||(Ne=!0,Ue()))),l};$.unstable_shouldYield=zo;$.unstable_wrapCallback=function(l){var t=gl;return function(){var e=gl;gl=t;try{return l.apply(this,arguments)}finally{gl=e}}}});var xo=lt((mm,To)=>{\"use strict\";To.exports=Eo()});var Oo=lt(pl=>{\"use strict\";var _y=De();function Ao(l){var t=\"https://react.dev/errors/\"+l;if(1{\"use strict\";function Mo(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>\"u\"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=\"function\"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Mo)}catch(l){console.error(l)}}Mo(),_o.exports=Oo()});var X1=lt(ai=>{\"use strict\";var fl=xo(),ts=De(),Ny=Do();function p(l){var t=\"https://react.dev/errors/\"+l;if(1je||(l.current=ic[je],ic[je]=null,je--)}function K(l,t){je++,ic[je]=l.current,l.current=t}var ut=it(null),Ia=it(null),Zt=it(null),yu=it(null);function ru(l,t){switch(K(Zt,t),K(Ia,l),K(ut,null),t.nodeType){case 9:case 11:l=(l=t.documentElement)&&(l=l.namespaceURI)?jd(l):0;break;default:if(l=t.tagName,t=t.namespaceURI)t=jd(t),l=M1(t,l);else switch(l){case\"svg\":l=1;break;case\"math\":l=2;break;default:l=0}}sl(ut),K(ut,l)}function ea(){sl(ut),sl(Ia),sl(Zt)}function cc(l){l.memoizedState!==null&&K(yu,l);var t=ut.current,e=M1(t,l.type);t!==e&&(K(Ia,l),K(ut,e))}function hu(l){Ia.current===l&&(sl(ut),sl(Ia)),yu.current===l&&(sl(yu),dn._currentValue=de)}var Ei,Co;function ie(l){if(Ei===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\\n( *(at )?)/);Ei=t&&t[1]||\"\",Co=-1)\":-1n||f[a]!==d[n]){var h=`\n`+f[a].replace(\" at new \",\" at \");return l.displayName&&h.includes(\"\")&&(h=h.replace(\"\",l.displayName)),h}while(1<=a&&0<=n);break}}}finally{Ti=!1,Error.prepareStackTrace=e}return(e=l?l.displayName||l.name:\"\")?ie(e):\"\"}function qy(l,t){switch(l.tag){case 26:case 27:case 5:return ie(l.type);case 16:return ie(\"Lazy\");case 13:return l.child!==t&&t!==null?ie(\"Suspense Fallback\"):ie(\"Suspense\");case 19:return ie(\"SuspenseList\");case 0:case 15:return xi(l.type,!1);case 11:return xi(l.type.render,!1);case 1:return xi(l.type,!0);case 31:return ie(\"Activity\");default:return\"\"}}function Ho(l){try{var t=\"\",e=null;do t+=qy(l,e),e=l,l=l.return;while(l);return t}catch(a){return`\nError generating stack: `+a.message+`\n`+a.stack}}var fc=Object.prototype.hasOwnProperty,Ic=fl.unstable_scheduleCallback,Ai=fl.unstable_cancelCallback,Yy=fl.unstable_shouldYield,jy=fl.unstable_requestPaint,Rl=fl.unstable_now,Gy=fl.unstable_getCurrentPriorityLevel,fs=fl.unstable_ImmediatePriority,os=fl.unstable_UserBlockingPriority,mu=fl.unstable_NormalPriority,Ly=fl.unstable_LowPriority,ds=fl.unstable_IdlePriority,Xy=fl.log,Qy=fl.unstable_setDisableYieldValue,hn=null,Bl=null;function jt(l){if(typeof Xy==\"function\"&&Qy(l),Bl&&typeof Bl.setStrictMode==\"function\")try{Bl.setStrictMode(hn,l)}catch{}}var ql=Math.clz32?Math.clz32:Ky,Zy=Math.log,Vy=Math.LN2;function Ky(l){return l>>>=0,l===0?32:31-(Zy(l)/Vy|0)|0}var Rn=256,Bn=262144,qn=4194304;function ce(l){var t=l&42;if(t!==0)return t;switch(l&-l){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return l&261888;case 262144:case 524288:case 1048576:case 2097152:return l&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return l&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return l}}function Xu(l,t,e){var a=l.pendingLanes;if(a===0)return 0;var n=0,u=l.suspendedLanes,i=l.pingedLanes;l=l.warmLanes;var c=a&134217727;return c!==0?(a=c&~u,a!==0?n=ce(a):(i&=c,i!==0?n=ce(i):e||(e=c&~l,e!==0&&(n=ce(e))))):(c=a&~u,c!==0?n=ce(c):i!==0?n=ce(i):e||(e=a&~l,e!==0&&(n=ce(e)))),n===0?0:t!==0&&t!==n&&(t&u)===0&&(u=n&-n,e=t&-t,u>=e||u===32&&(e&4194048)!==0)?t:n}function mn(l,t){return(l.pendingLanes&~(l.suspendedLanes&~l.pingedLanes)&t)===0}function Jy(l,t){switch(l){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ss(){var l=qn;return qn<<=1,(qn&62914560)===0&&(qn=4194304),l}function Oi(l){for(var t=[],e=0;31>e;e++)t.push(l);return t}function vn(l,t){l.pendingLanes|=t,t!==268435456&&(l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0)}function wy(l,t,e,a,n,u){var i=l.pendingLanes;l.pendingLanes=e,l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0,l.expiredLanes&=e,l.entangledLanes&=e,l.errorRecoveryDisabledLanes&=e,l.shellSuspendCounter=0;var c=l.entanglements,f=l.expirationTimes,d=l.hiddenUpdates;for(e=i&~e;0\"u\")return null;try{return l.activeElement||l.body}catch{return l.body}}var Py=/[\\n\"\\\\]/g;function Kl(l){return l.replace(Py,function(t){return\"\\\\\"+t.charCodeAt(0).toString(16)+\" \"})}function sc(l,t,e,a,n,u,i,c){l.name=\"\",i!=null&&typeof i!=\"function\"&&typeof i!=\"symbol\"&&typeof i!=\"boolean\"?l.type=i:l.removeAttribute(\"type\"),t!=null?i===\"number\"?(t===0&&l.value===\"\"||l.value!=t)&&(l.value=\"\"+Ql(t)):l.value!==\"\"+Ql(t)&&(l.value=\"\"+Ql(t)):i!==\"submit\"&&i!==\"reset\"||l.removeAttribute(\"value\"),t!=null?yc(l,i,Ql(t)):e!=null?yc(l,i,Ql(e)):a!=null&&l.removeAttribute(\"value\"),n==null&&u!=null&&(l.defaultChecked=!!u),n!=null&&(l.checked=n&&typeof n!=\"function\"&&typeof n!=\"symbol\"),c!=null&&typeof c!=\"function\"&&typeof c!=\"symbol\"&&typeof c!=\"boolean\"?l.name=\"\"+Ql(c):l.removeAttribute(\"name\")}function bs(l,t,e,a,n,u,i,c){if(u!=null&&typeof u!=\"function\"&&typeof u!=\"symbol\"&&typeof u!=\"boolean\"&&(l.type=u),t!=null||e!=null){if(!(u!==\"submit\"&&u!==\"reset\"||t!=null)){dc(l);return}e=e!=null?\"\"+Ql(e):\"\",t=t!=null?\"\"+Ql(t):e,c||t===l.value||(l.value=t),l.defaultValue=t}a=a??n,a=typeof a!=\"function\"&&typeof a!=\"symbol\"&&!!a,l.checked=c?l.checked:!!a,l.defaultChecked=!!a,i!=null&&typeof i!=\"function\"&&typeof i!=\"symbol\"&&typeof i!=\"boolean\"&&(l.name=i),dc(l)}function yc(l,t,e){t===\"number\"&&vu(l.ownerDocument)===l||l.defaultValue===\"\"+e||(l.defaultValue=\"\"+e)}function $e(l,t,e,a){if(l=l.options,t){t={};for(var n=0;n\"u\"||typeof window.document>\"u\"||typeof window.document.createElement>\"u\"),hc=!1;if(xt)try{Ce={},Object.defineProperty(Ce,\"passive\",{get:function(){hc=!0}}),window.addEventListener(\"test\",Ce,Ce),window.removeEventListener(\"test\",Ce,Ce)}catch{hc=!1}var Ce,Gt=null,nf=null,Pn=null;function As(){if(Pn)return Pn;var l,t=nf,e=t.length,a,n=\"value\"in Gt?Gt.value:Gt.textContent,u=n.length;for(l=0;l=Ga),Vo=\" \",Ko=!1;function Ms(l,t){switch(l){case\"keyup\":return Mr.indexOf(t.keyCode)!==-1;case\"keydown\":return t.keyCode!==229;case\"keypress\":case\"mousedown\":case\"focusout\":return!0;default:return!1}}function _s(l){return l=l.detail,typeof l==\"object\"&&\"data\"in l?l.data:null}var Xe=!1;function Dr(l,t){switch(l){case\"compositionend\":return _s(t);case\"keypress\":return t.which!==32?null:(Ko=!0,Vo);case\"textInput\":return l=t.data,l===Vo&&Ko?null:l;default:return null}}function Ur(l,t){if(Xe)return l===\"compositionend\"||!cf&&Ms(l,t)?(l=As(),Pn=nf=Gt=null,Xe=!1,l):null;switch(l){case\"paste\":return null;case\"keypress\":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:e,offset:t-l};l=a}l:{for(;e;){if(e.nextSibling){e=e.nextSibling;break l}e=e.parentNode}e=void 0}e=ko(e)}}function Cs(l,t){return l&&t?l===t?!0:l&&l.nodeType===3?!1:t&&t.nodeType===3?Cs(l,t.parentNode):\"contains\"in l?l.contains(t):l.compareDocumentPosition?!!(l.compareDocumentPosition(t)&16):!1:!1}function Hs(l){l=l!=null&&l.ownerDocument!=null&&l.ownerDocument.defaultView!=null?l.ownerDocument.defaultView:window;for(var t=vu(l.document);t instanceof l.HTMLIFrameElement;){try{var e=typeof t.contentWindow.location.href==\"string\"}catch{e=!1}if(e)l=t.contentWindow;else break;t=vu(l.document)}return t}function ff(l){var t=l&&l.nodeName&&l.nodeName.toLowerCase();return t&&(t===\"input\"&&(l.type===\"text\"||l.type===\"search\"||l.type===\"tel\"||l.type===\"url\"||l.type===\"password\")||t===\"textarea\"||l.contentEditable===\"true\")}var jr=xt&&\"documentMode\"in document&&11>=document.documentMode,Qe=null,mc=null,Xa=null,vc=!1;function Fo(l,t,e){var a=e.window===e?e.document:e.nodeType===9?e:e.ownerDocument;vc||Qe==null||Qe!==vu(a)||(a=Qe,\"selectionStart\"in a&&ff(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Xa&&tn(Xa,a)||(Xa=a,a=Ru(mc,\"onSelect\"),0>=i,n-=i,et=1<<32-ql(t)+n|e<x?(_=E,E=null):_=E.sibling;var H=y(r,E,m[x],s);if(H===null){E===null&&(E=_);break}l&&E&&H.alternate===null&&t(r,E),o=u(H,o,x),A===null?b=H:A.sibling=H,A=H,E=_}if(x===m.length)return e(r,E),Y&&vt(r,x),b;if(E===null){for(;xx?(_=E,E=null):_=E.sibling;var O=y(r,E,H.value,s);if(O===null){E===null&&(E=_);break}l&&E&&O.alternate===null&&t(r,E),o=u(O,o,x),A===null?b=O:A.sibling=O,A=O,E=_}if(H.done)return e(r,E),Y&&vt(r,x),b;if(E===null){for(;!H.done;x++,H=m.next())H=g(r,H.value,s),H!==null&&(o=u(H,o,x),A===null?b=H:A.sibling=H,A=H);return Y&&vt(r,x),b}for(E=a(E);!H.done;x++,H=m.next())H=v(E,r,x,H.value,s),H!==null&&(l&&H.alternate!==null&&E.delete(H.key===null?x:H.key),o=u(H,o,x),A===null?b=H:A.sibling=H,A=H);return l&&E.forEach(function(Dl){return t(r,Dl)}),Y&&vt(r,x),b}function U(r,o,m,s){if(typeof m==\"object\"&&m!==null&&m.type===Ye&&m.key===null&&(m=m.props.children),typeof m==\"object\"&&m!==null){switch(m.$$typeof){case Hn:l:{for(var b=m.key;o!==null;){if(o.key===b){if(b=m.type,b===Ye){if(o.tag===7){e(r,o.sibling),s=n(o,m.props.children),s.return=r,r=s;break l}}else if(o.elementType===b||typeof b==\"object\"&&b!==null&&b.$$typeof===Ct&&fe(b)===o.type){e(r,o.sibling),s=n(o,m.props),Da(s,m),s.return=r,r=s;break l}e(r,o);break}else t(r,o);o=o.sibling}m.type===Ye?(s=se(m.props.children,r.mode,s,m.key),s.return=r,r=s):(s=tu(m.type,m.key,m.props,null,r.mode,s),Da(s,m),s.return=r,r=s)}return i(r);case Ra:l:{for(b=m.key;o!==null;){if(o.key===b)if(o.tag===4&&o.stateNode.containerInfo===m.containerInfo&&o.stateNode.implementation===m.implementation){e(r,o.sibling),s=n(o,m.children||[]),s.return=r,r=s;break l}else{e(r,o);break}else t(r,o);o=o.sibling}s=Ri(m,r.mode,s),s.return=r,r=s}return i(r);case Ct:return m=fe(m),U(r,o,m,s)}if(Ba(m))return z(r,o,m,s);if(Ma(m)){if(b=Ma(m),typeof b!=\"function\")throw Error(p(150));return m=b.call(m),T(r,o,m,s)}if(typeof m.then==\"function\")return U(r,o,Qn(m),s);if(m.$$typeof===St)return U(r,o,Xn(r,m),s);Zn(r,m)}return typeof m==\"string\"&&m!==\"\"||typeof m==\"number\"||typeof m==\"bigint\"?(m=\"\"+m,o!==null&&o.tag===6?(e(r,o.sibling),s=n(o,m),s.return=r,r=s):(e(r,o),s=Hi(m,r.mode,s),s.return=r,r=s),i(r)):e(r,o)}return function(r,o,m,s){try{nn=0;var b=U(r,o,m,s);return Pe=null,b}catch(E){if(E===va||E===wu)throw E;var A=Cl(29,E,null,r.mode);return A.lanes=s,A.return=r,A}finally{}}}var ge=Ws(!0),ks=Ws(!1),Ht=!1;function gf(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Tc(l,t){l=l.updateQueue,t.updateQueue===l&&(t.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,callbacks:null})}function Kt(l){return{lane:l,tag:0,payload:null,callback:null,next:null}}function Jt(l,t,e){var a=l.updateQueue;if(a===null)return null;if(a=a.shared,(j&2)!==0){var n=a.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),a.pending=t,t=Su(l),Ls(l,null,e),t}return Ju(l,a,t,e),Su(l)}function Za(l,t,e){if(t=t.updateQueue,t!==null&&(t=t.shared,(e&4194048)!==0)){var a=t.lanes;a&=l.pendingLanes,e|=a,t.lanes=e,rs(l,e)}}function qi(l,t){var e=l.updateQueue,a=l.alternate;if(a!==null&&(a=a.updateQueue,e===a)){var n=null,u=null;if(e=e.firstBaseUpdate,e!==null){do{var i={lane:e.lane,tag:e.tag,payload:e.payload,callback:null,next:null};u===null?n=u=i:u=u.next=i,e=e.next}while(e!==null);u===null?n=u=t:u=u.next=t}else n=u=t;e={baseState:a.baseState,firstBaseUpdate:n,lastBaseUpdate:u,shared:a.shared,callbacks:a.callbacks},l.updateQueue=e;return}l=e.lastBaseUpdate,l===null?e.firstBaseUpdate=t:l.next=t,e.lastBaseUpdate=t}var xc=!1;function Va(){if(xc){var l=Ie;if(l!==null)throw l}}function Ka(l,t,e,a){xc=!1;var n=l.updateQueue;Ht=!1;var u=n.firstBaseUpdate,i=n.lastBaseUpdate,c=n.shared.pending;if(c!==null){n.shared.pending=null;var f=c,d=f.next;f.next=null,i===null?u=d:i.next=d,i=f;var h=l.alternate;h!==null&&(h=h.updateQueue,c=h.lastBaseUpdate,c!==i&&(c===null?h.firstBaseUpdate=d:c.next=d,h.lastBaseUpdate=f))}if(u!==null){var g=n.baseState;i=0,h=d=f=null,c=u;do{var y=c.lane&-536870913,v=y!==c.lane;if(v?(q&y)===y:(a&y)===y){y!==0&&y===ua&&(xc=!0),h!==null&&(h=h.next={lane:0,tag:c.tag,payload:c.payload,callback:null,next:null});l:{var z=l,T=c;y=t;var U=e;switch(T.tag){case 1:if(z=T.payload,typeof z==\"function\"){g=z.call(U,g,y);break l}g=z;break l;case 3:z.flags=z.flags&-65537|128;case 0:if(z=T.payload,y=typeof z==\"function\"?z.call(U,g,y):z,y==null)break l;g=k({},g,y);break l;case 2:Ht=!0}}y=c.callback,y!==null&&(l.flags|=64,v&&(l.flags|=8192),v=n.callbacks,v===null?n.callbacks=[y]:v.push(y))}else v={lane:y,tag:c.tag,payload:c.payload,callback:c.callback,next:null},h===null?(d=h=v,f=g):h=h.next=v,i|=y;if(c=c.next,c===null){if(c=n.shared.pending,c===null)break;v=c,c=v.next,v.next=null,n.lastBaseUpdate=v,n.shared.pending=null}}while(!0);h===null&&(f=g),n.baseState=f,n.firstBaseUpdate=d,n.lastBaseUpdate=h,u===null&&(n.shared.lanes=0),te|=i,l.lanes=i,l.memoizedState=g}}function $s(l,t){if(typeof l!=\"function\")throw Error(p(191,l));l.call(t)}function Fs(l,t){var e=l.callbacks;if(e!==null)for(l.callbacks=null,l=0;lu?u:8;var i=M.T,c={};M.T=c,Uf(l,!1,t,e);try{var f=n(),d=M.S;if(d!==null&&d(c,f),f!==null&&typeof f==\"object\"&&typeof f.then==\"function\"){var h=wr(f,a);Ja(l,t,h,Yl(l))}else Ja(l,t,a,Yl(l))}catch(g){Ja(l,t,{then:function(){},status:\"rejected\",reason:g},Yl())}finally{G.p=u,i!==null&&c.types!==null&&(i.types=c.types),M.T=i}}function Pr(){}function Dc(l,t,e,a){if(l.tag!==5)throw Error(p(476));var n=E0(l).queue;z0(l,n,t,de,e===null?Pr:function(){return T0(l),e(a)})}function E0(l){var t=l.memoizedState;if(t!==null)return t;t={memoizedState:de,baseState:de,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ot,lastRenderedState:de},next:null};var e={};return t.next={memoizedState:e,baseState:e,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ot,lastRenderedState:e},next:null},l.memoizedState=t,l=l.alternate,l!==null&&(l.memoizedState=t),t}function T0(l){var t=E0(l);t.next===null&&(t=l.alternate.memoizedState),Ja(l,t.next.queue,{},Yl())}function Df(){return ml(dn)}function x0(){return el().memoizedState}function A0(){return el().memoizedState}function lh(l){for(var t=l.return;t!==null;){switch(t.tag){case 24:case 3:var e=Yl();l=Kt(e);var a=Jt(t,l,e);a!==null&&(Ol(a,t,e),Za(a,t,e)),t={cache:hf()},l.payload=t;return}t=t.return}}function th(l,t,e){var a=Yl();e={lane:a,revertLane:0,gesture:null,action:e,hasEagerState:!1,eagerState:null,next:null},Fu(l)?M0(t,e):(e=df(l,t,e,a),e!==null&&(Ol(e,l,a),_0(e,t,a)))}function O0(l,t,e){var a=Yl();Ja(l,t,e,a)}function Ja(l,t,e,a){var n={lane:a,revertLane:0,gesture:null,action:e,hasEagerState:!1,eagerState:null,next:null};if(Fu(l))M0(t,n);else{var u=l.alternate;if(l.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var i=t.lastRenderedState,c=u(i,e);if(n.hasEagerState=!0,n.eagerState=c,jl(c,i))return Ju(l,t,n,0),V===null&&Ku(),!1}catch{}finally{}if(e=df(l,t,n,a),e!==null)return Ol(e,l,a),_0(e,t,a),!0}return!1}function Uf(l,t,e,a){if(a={lane:2,revertLane:Gf(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Fu(l)){if(t)throw Error(p(479))}else t=df(l,e,a,2),t!==null&&Ol(t,l,2)}function Fu(l){var t=l.alternate;return l===N||t!==null&&t===N}function M0(l,t){la=xu=!0;var e=l.pending;e===null?t.next=t:(t.next=e.next,e.next=t),l.pending=t}function _0(l,t,e){if((e&4194048)!==0){var a=t.lanes;a&=l.pendingLanes,e|=a,t.lanes=e,rs(l,e)}}var cn={readContext:ml,use:ku,useCallback:P,useContext:P,useEffect:P,useImperativeHandle:P,useLayoutEffect:P,useInsertionEffect:P,useMemo:P,useReducer:P,useRef:P,useState:P,useDebugValue:P,useDeferredValue:P,useTransition:P,useSyncExternalStore:P,useId:P,useHostTransitionStatus:P,useFormState:P,useActionState:P,useOptimistic:P,useMemoCache:P,useCacheRefresh:P};cn.useEffectEvent=P;var D0={readContext:ml,use:ku,useCallback:function(l,t){return bl().memoizedState=[l,t===void 0?null:t],l},useContext:ml,useEffect:yd,useImperativeHandle:function(l,t,e){e=e!=null?e.concat([l]):null,nu(4194308,4,v0.bind(null,t,l),e)},useLayoutEffect:function(l,t){return nu(4194308,4,l,t)},useInsertionEffect:function(l,t){nu(4,2,l,t)},useMemo:function(l,t){var e=bl();t=t===void 0?null:t;var a=l();if(Se){jt(!0);try{l()}finally{jt(!1)}}return e.memoizedState=[a,t],a},useReducer:function(l,t,e){var a=bl();if(e!==void 0){var n=e(t);if(Se){jt(!0);try{e(t)}finally{jt(!1)}}}else n=t;return a.memoizedState=a.baseState=n,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:n},a.queue=l,l=l.dispatch=th.bind(null,N,l),[a.memoizedState,l]},useRef:function(l){var t=bl();return l={current:l},t.memoizedState=l},useState:function(l){l=Mc(l);var t=l.queue,e=O0.bind(null,N,t);return t.dispatch=e,[l.memoizedState,e]},useDebugValue:Mf,useDeferredValue:function(l,t){var e=bl();return _f(e,l,t)},useTransition:function(){var l=Mc(!1);return l=z0.bind(null,N,l.queue,!0,!1),bl().memoizedState=l,[!1,l]},useSyncExternalStore:function(l,t,e){var a=N,n=bl();if(Y){if(e===void 0)throw Error(p(407));e=e()}else{if(e=t(),V===null)throw Error(p(349));(q&127)!==0||e0(a,t,e)}n.memoizedState=e;var u={value:e,getSnapshot:t};return n.queue=u,yd(n0.bind(null,a,u,l),[l]),a.flags|=2048,ca(9,{destroy:void 0},a0.bind(null,a,u,e,t),null),e},useId:function(){var l=bl(),t=V.identifierPrefix;if(Y){var e=at,a=et;e=(a&~(1<<32-ql(a)-1)).toString(32)+e,t=\"_\"+t+\"R_\"+e,e=Au++,0<\\/script>\",u=u.removeChild(u.firstChild);break;case\"select\":u=typeof a.is==\"string\"?i.createElement(\"select\",{is:a.is}):i.createElement(\"select\"),a.multiple?u.multiple=!0:a.size&&(u.size=a.size);break;default:u=typeof a.is==\"string\"?i.createElement(n,{is:a.is}):i.createElement(n)}}u[rl]=t,u[Ml]=a;l:for(i=t.child;i!==null;){if(i.tag===5||i.tag===6)u.appendChild(i.stateNode);else if(i.tag!==4&&i.tag!==27&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===t)break l;for(;i.sibling===null;){if(i.return===null||i.return===t)break l;i=i.return}i.sibling.return=i.return,i=i.sibling}t.stateNode=u;l:switch(vl(u,n,a),n){case\"button\":case\"input\":case\"select\":case\"textarea\":a=!!a.autoFocus;break l;case\"img\":a=!0;break l;default:a=!1}a&&yt(t)}}return w(t),Vi(t,t.type,l===null?null:l.memoizedProps,t.pendingProps,e),null;case 6:if(l&&t.stateNode!=null)l.memoizedProps!==a&&yt(t);else{if(typeof a!=\"string\"&&t.stateNode===null)throw Error(p(166));if(l=Zt.current,He(t)){if(l=t.stateNode,e=t.memoizedProps,a=null,n=hl,n!==null)switch(n.tag){case 27:case 5:a=n.memoizedProps}l[rl]=t,l=!!(l.nodeValue===e||a!==null&&a.suppressHydrationWarning===!0||O1(l.nodeValue,e)),l||Pt(t,!0)}else l=Bu(l).createTextNode(a),l[rl]=t,t.stateNode=l}return w(t),null;case 31:if(e=t.memoizedState,l===null||l.memoizedState!==null){if(a=He(t),e!==null){if(l===null){if(!a)throw Error(p(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(p(557));l[rl]=t}else me(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;w(t),l=!1}else e=Bi(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=e),l=!0;if(!l)return t.flags&256?(Nl(t),t):(Nl(t),null);if((t.flags&128)!==0)throw Error(p(558))}return w(t),null;case 13:if(a=t.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(n=He(t),a!==null&&a.dehydrated!==null){if(l===null){if(!n)throw Error(p(318));if(n=t.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(p(317));n[rl]=t}else me(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;w(t),n=!1}else n=Bi(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=n),n=!0;if(!n)return t.flags&256?(Nl(t),t):(Nl(t),null)}return Nl(t),(t.flags&128)!==0?(t.lanes=e,t):(e=a!==null,l=l!==null&&l.memoizedState!==null,e&&(a=t.child,n=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(n=a.alternate.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==n&&(a.flags|=2048)),e!==l&&e&&(t.child.flags|=8192),Vn(t,t.updateQueue),w(t),null);case 4:return ea(),l===null&&Lf(t.stateNode.containerInfo),w(t),null;case 10:return Et(t.type),w(t),null;case 19:if(sl(tl),a=t.memoizedState,a===null)return w(t),null;if(n=(t.flags&128)!==0,u=a.rendering,u===null)if(n)Ua(a,!1);else{if(ll!==0||l!==null&&(l.flags&128)!==0)for(l=t.child;l!==null;){if(u=Tu(l),u!==null){for(t.flags|=128,Ua(a,!1),l=u.updateQueue,t.updateQueue=l,Vn(t,l),t.subtreeFlags=0,l=e,e=t.child;e!==null;)Xs(e,l),e=e.sibling;return K(tl,tl.current&1|2),Y&&vt(t,a.treeForkCount),t.child}l=l.sibling}a.tail!==null&&Rl()>Du&&(t.flags|=128,n=!0,Ua(a,!1),t.lanes=4194304)}else{if(!n)if(l=Tu(u),l!==null){if(t.flags|=128,n=!0,l=l.updateQueue,t.updateQueue=l,Vn(t,l),Ua(a,!0),a.tail===null&&a.tailMode===\"hidden\"&&!u.alternate&&!Y)return w(t),null}else 2*Rl()-a.renderingStartTime>Du&&e!==536870912&&(t.flags|=128,n=!0,Ua(a,!1),t.lanes=4194304);a.isBackwards?(u.sibling=t.child,t.child=u):(l=a.last,l!==null?l.sibling=u:t.child=u,a.last=u)}return a.tail!==null?(l=a.tail,a.rendering=l,a.tail=l.sibling,a.renderingStartTime=Rl(),l.sibling=null,e=tl.current,K(tl,n?e&1|2:e&1),Y&&vt(t,a.treeForkCount),l):(w(t),null);case 22:case 23:return Nl(t),Sf(),a=t.memoizedState!==null,l!==null?l.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(e&536870912)!==0&&(t.flags&128)===0&&(w(t),t.subtreeFlags&6&&(t.flags|=8192)):w(t),e=t.updateQueue,e!==null&&Vn(t,e.retryQueue),e=null,l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(e=l.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==e&&(t.flags|=2048),l!==null&&sl(ye),null;case 24:return e=null,l!==null&&(e=l.memoizedState.cache),t.memoizedState.cache!==e&&(t.flags|=2048),Et(ul),w(t),null;case 25:return null;case 30:return null}throw Error(p(156,t.tag))}function ih(l,t){switch(rf(t),t.tag){case 1:return l=t.flags,l&65536?(t.flags=l&-65537|128,t):null;case 3:return Et(ul),ea(),l=t.flags,(l&65536)!==0&&(l&128)===0?(t.flags=l&-65537|128,t):null;case 26:case 27:case 5:return hu(t),null;case 31:if(t.memoizedState!==null){if(Nl(t),t.alternate===null)throw Error(p(340));me()}return l=t.flags,l&65536?(t.flags=l&-65537|128,t):null;case 13:if(Nl(t),l=t.memoizedState,l!==null&&l.dehydrated!==null){if(t.alternate===null)throw Error(p(340));me()}return l=t.flags,l&65536?(t.flags=l&-65537|128,t):null;case 19:return sl(tl),null;case 4:return ea(),null;case 10:return Et(t.type),null;case 22:case 23:return Nl(t),Sf(),l!==null&&sl(ye),l=t.flags,l&65536?(t.flags=l&-65537|128,t):null;case 24:return Et(ul),null;case 25:return null;default:return null}}function X0(l,t){switch(rf(t),t.tag){case 3:Et(ul),ea();break;case 26:case 27:case 5:hu(t);break;case 4:ea();break;case 31:t.memoizedState!==null&&Nl(t);break;case 13:Nl(t);break;case 19:sl(tl);break;case 10:Et(t.type);break;case 22:case 23:Nl(t),Sf(),l!==null&&sl(ye);break;case 24:Et(ul)}}function zn(l,t){try{var e=t.updateQueue,a=e!==null?e.lastEffect:null;if(a!==null){var n=a.next;e=n;do{if((e.tag&l)===l){a=void 0;var u=e.create,i=e.inst;a=u(),i.destroy=a}e=e.next}while(e!==n)}}catch(c){X(t,t.return,c)}}function le(l,t,e){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var u=n.next;a=u;do{if((a.tag&l)===l){var i=a.inst,c=i.destroy;if(c!==void 0){i.destroy=void 0,n=t;var f=e,d=c;try{d()}catch(h){X(n,f,h)}}}a=a.next}while(a!==u)}}catch(h){X(t,t.return,h)}}function Q0(l){var t=l.updateQueue;if(t!==null){var e=l.stateNode;try{Fs(t,e)}catch(a){X(l,l.return,a)}}}function Z0(l,t,e){e.props=pe(l.type,l.memoizedProps),e.state=l.memoizedState;try{e.componentWillUnmount()}catch(a){X(l,t,a)}}function wa(l,t){try{var e=l.ref;if(e!==null){switch(l.tag){case 26:case 27:case 5:var a=l.stateNode;break;case 30:a=l.stateNode;break;default:a=l.stateNode}typeof e==\"function\"?l.refCleanup=e(a):e.current=a}}catch(n){X(l,t,n)}}function nt(l,t){var e=l.ref,a=l.refCleanup;if(e!==null)if(typeof a==\"function\")try{a()}catch(n){X(l,t,n)}finally{l.refCleanup=null,l=l.alternate,l!=null&&(l.refCleanup=null)}else if(typeof e==\"function\")try{e(null)}catch(n){X(l,t,n)}else e.current=null}function V0(l){var t=l.type,e=l.memoizedProps,a=l.stateNode;try{l:switch(t){case\"button\":case\"input\":case\"select\":case\"textarea\":e.autoFocus&&a.focus();break l;case\"img\":e.src?a.src=e.src:e.srcSet&&(a.srcset=e.srcSet)}}catch(n){X(l,l.return,n)}}function Ki(l,t,e){try{var a=l.stateNode;Oh(a,l.type,e,t),a[Ml]=t}catch(n){X(l,l.return,n)}}function K0(l){return l.tag===5||l.tag===3||l.tag===26||l.tag===27&&ae(l.type)||l.tag===4}function Ji(l){l:for(;;){for(;l.sibling===null;){if(l.return===null||K0(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&l.tag!==18;){if(l.tag===27&&ae(l.type)||l.flags&2||l.child===null||l.tag===4)continue l;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function Rc(l,t,e){var a=l.tag;if(a===5||a===6)l=l.stateNode,t?(e.nodeType===9?e.body:e.nodeName===\"HTML\"?e.ownerDocument.body:e).insertBefore(l,t):(t=e.nodeType===9?e.body:e.nodeName===\"HTML\"?e.ownerDocument.body:e,t.appendChild(l),e=e._reactRootContainer,e!=null||t.onclick!==null||(t.onclick=pt));else if(a!==4&&(a===27&&ae(l.type)&&(e=l.stateNode,t=null),l=l.child,l!==null))for(Rc(l,t,e),l=l.sibling;l!==null;)Rc(l,t,e),l=l.sibling}function _u(l,t,e){var a=l.tag;if(a===5||a===6)l=l.stateNode,t?e.insertBefore(l,t):e.appendChild(l);else if(a!==4&&(a===27&&ae(l.type)&&(e=l.stateNode),l=l.child,l!==null))for(_u(l,t,e),l=l.sibling;l!==null;)_u(l,t,e),l=l.sibling}function J0(l){var t=l.stateNode,e=l.memoizedProps;try{for(var a=l.type,n=t.attributes;n.length;)t.removeAttributeNode(n[0]);vl(t,a,e),t[rl]=l,t[Ml]=e}catch(u){X(l,l.return,u)}}var gt=!1,nl=!1,wi=!1,Ad=typeof WeakSet==\"function\"?WeakSet:Set,ol=null;function ch(l,t){if(l=l.containerInfo,Xc=Gu,l=Hs(l),ff(l)){if(\"selectionStart\"in l)var e={start:l.selectionStart,end:l.selectionEnd};else l:{e=(e=l.ownerDocument)&&e.defaultView||window;var a=e.getSelection&&e.getSelection();if(a&&a.rangeCount!==0){e=a.anchorNode;var n=a.anchorOffset,u=a.focusNode;a=a.focusOffset;try{e.nodeType,u.nodeType}catch{e=null;break l}var i=0,c=-1,f=-1,d=0,h=0,g=l,y=null;t:for(;;){for(var v;g!==e||n!==0&&g.nodeType!==3||(c=i+n),g!==u||a!==0&&g.nodeType!==3||(f=i+a),g.nodeType===3&&(i+=g.nodeValue.length),(v=g.firstChild)!==null;)y=g,g=v;for(;;){if(g===l)break t;if(y===e&&++d===n&&(c=i),y===u&&++h===a&&(f=i),(v=g.nextSibling)!==null)break;g=y,y=g.parentNode}g=v}e=c===-1||f===-1?null:{start:c,end:f}}else e=null}e=e||{start:0,end:0}}else e=null;for(Qc={focusedElem:l,selectionRange:e},Gu=!1,ol=t;ol!==null;)if(t=ol,l=t.child,(t.subtreeFlags&1028)!==0&&l!==null)l.return=t,ol=l;else for(;ol!==null;){switch(t=ol,u=t.alternate,l=t.flags,t.tag){case 0:if((l&4)!==0&&(l=t.updateQueue,l=l!==null?l.events:null,l!==null))for(e=0;e title\"))),vl(u,a,e),u[rl]=l,dl(u),a=u;break l;case\"link\":var i=wd(\"link\",\"href\",n).get(a+(e.href||\"\"));if(i){for(var c=0;cU&&(i=U,U=T,T=i);var r=$o(c,T),o=$o(c,U);if(r&&o&&(v.rangeCount!==1||v.anchorNode!==r.node||v.anchorOffset!==r.offset||v.focusNode!==o.node||v.focusOffset!==o.offset)){var m=g.createRange();m.setStart(r.node,r.offset),v.removeAllRanges(),T>U?(v.addRange(m),v.extend(o.node,o.offset)):(m.setEnd(o.node,o.offset),v.addRange(m))}}}}for(g=[],v=c;v=v.parentNode;)v.nodeType===1&&g.push({element:v,left:v.scrollLeft,top:v.scrollTop});for(typeof c.focus==\"function\"&&c.focus(),c=0;ce?32:e,M.T=null,e=Yc,Yc=null;var u=Wt,i=Tt;if(cl=0,oa=Wt=null,Tt=0,(j&6)!==0)throw Error(p(331));var c=j;if(j|=4,a1(u.current),l1(u,u.current,i,e),j=c,En(0,!1),Bl&&typeof Bl.onPostCommitFiberRoot==\"function\")try{Bl.onPostCommitFiberRoot(hn,u)}catch{}return!0}finally{G.p=n,M.T=a,S1(l,t)}}function Dd(l,t,e){t=Jl(e,t),t=Nc(l.stateNode,t,2),l=Jt(l,t,2),l!==null&&(vn(l,2),ct(l))}function X(l,t,e){if(l.tag===3)Dd(l,l,e);else for(;t!==null;){if(t.tag===3){Dd(t,l,e);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError==\"function\"||typeof a.componentDidCatch==\"function\"&&(wt===null||!wt.has(a))){l=Jl(e,l),e=R0(2),a=Jt(t,e,2),a!==null&&(B0(e,a,t,l),vn(a,2),ct(a));break}}t=t.return}}function ki(l,t,e){var a=l.pingCache;if(a===null){a=l.pingCache=new dh;var n=new Set;a.set(t,n)}else n=a.get(t),n===void 0&&(n=new Set,a.set(t,n));n.has(e)||(qf=!0,n.add(e),l=mh.bind(null,l,t,e),t.then(l,l))}function mh(l,t,e){var a=l.pingCache;a!==null&&a.delete(t),l.pingedLanes|=l.suspendedLanes&e,l.warmLanes&=~e,V===l&&(q&e)===e&&(ll===4||ll===3&&(q&62914560)===q&&300>Rl()-Iu?(j&2)===0&&da(l,0):Yf|=e,fa===q&&(fa=0)),ct(l)}function b1(l,t){t===0&&(t=ss()),l=Te(l,t),l!==null&&(vn(l,t),ct(l))}function vh(l){var t=l.memoizedState,e=0;t!==null&&(e=t.retryLane),b1(l,e)}function gh(l,t){var e=0;switch(l.tag){case 31:case 13:var a=l.stateNode,n=l.memoizedState;n!==null&&(e=n.retryLane);break;case 19:a=l.stateNode;break;case 22:a=l.stateNode._retryCache;break;default:throw Error(p(314))}a!==null&&a.delete(t),b1(l,e)}function Sh(l,t){return Ic(l,t)}var Cu=null,qe=null,Gc=!1,Hu=!1,$i=!1,Qt=0;function ct(l){l!==qe&&l.next===null&&(qe===null?Cu=qe=l:qe=qe.next=l),Hu=!0,Gc||(Gc=!0,bh())}function En(l,t){if(!$i&&Hu){$i=!0;do for(var e=!1,a=Cu;a!==null;){if(!t)if(l!==0){var n=a.pendingLanes;if(n===0)var u=0;else{var i=a.suspendedLanes,c=a.pingedLanes;u=(1<<31-ql(42|l)+1)-1,u&=n&~(i&~c),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(e=!0,Ud(a,u))}else u=q,u=Xu(a,a===V?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(u&3)===0||mn(a,u)||(e=!0,Ud(a,u));a=a.next}while(e);$i=!1}}function ph(){z1()}function z1(){Hu=Gc=!1;var l=0;Qt!==0&&_h()&&(l=Qt);for(var t=Rl(),e=null,a=Cu;a!==null;){var n=a.next,u=E1(a,t);u===0?(a.next=null,e===null?Cu=n:e.next=n,n===null&&(qe=e)):(e=a,(l!==0||(u&3)!==0)&&(Hu=!0)),a=n}cl!==0&&cl!==5||En(l,!1),Qt!==0&&(Qt=0)}function E1(l,t){for(var e=l.suspendedLanes,a=l.pingedLanes,n=l.expirationTimes,u=l.pendingLanes&-62914561;0c)break;var h=f.transferSize,g=f.initiatorType;h&&Yd(g)&&(f=f.responseEnd,i+=h*(f\"u\"?null:document;function N1(l,t,e){var a=Sa;if(a&&typeof t==\"string\"&&t){var n=Kl(t);n='link[rel=\"'+l+'\"][href=\"'+n+'\"]',typeof e==\"string\"&&(n+='[crossorigin=\"'+e+'\"]'),Vd.has(n)||(Vd.add(n),l={rel:l,crossOrigin:e,href:t},a.querySelector(n)===null&&(t=a.createElement(\"link\"),vl(t,\"link\",l),dl(t),a.head.appendChild(t)))}}function Yh(l){Dt.D(l),N1(\"dns-prefetch\",l,null)}function jh(l,t){Dt.C(l,t),N1(\"preconnect\",l,t)}function Gh(l,t,e){Dt.L(l,t,e);var a=Sa;if(a&&l&&t){var n='link[rel=\"preload\"][as=\"'+Kl(t)+'\"]';t===\"image\"&&e&&e.imageSrcSet?(n+='[imagesrcset=\"'+Kl(e.imageSrcSet)+'\"]',typeof e.imageSizes==\"string\"&&(n+='[imagesizes=\"'+Kl(e.imageSizes)+'\"]')):n+='[href=\"'+Kl(l)+'\"]';var u=n;switch(t){case\"style\":u=sa(l);break;case\"script\":u=pa(l)}$l.has(u)||(l=k({rel:\"preload\",href:t===\"image\"&&e&&e.imageSrcSet?void 0:l,as:t},e),$l.set(u,l),a.querySelector(n)!==null||t===\"style\"&&a.querySelector(Tn(u))||t===\"script\"&&a.querySelector(xn(u))||(t=a.createElement(\"link\"),vl(t,\"link\",l),dl(t),a.head.appendChild(t)))}}function Lh(l,t){Dt.m(l,t);var e=Sa;if(e&&l){var a=t&&typeof t.as==\"string\"?t.as:\"script\",n='link[rel=\"modulepreload\"][as=\"'+Kl(a)+'\"][href=\"'+Kl(l)+'\"]',u=n;switch(a){case\"audioworklet\":case\"paintworklet\":case\"serviceworker\":case\"sharedworker\":case\"worker\":case\"script\":u=pa(l)}if(!$l.has(u)&&(l=k({rel:\"modulepreload\",href:l},t),$l.set(u,l),e.querySelector(n)===null)){switch(a){case\"audioworklet\":case\"paintworklet\":case\"serviceworker\":case\"sharedworker\":case\"worker\":case\"script\":if(e.querySelector(xn(u)))return}a=e.createElement(\"link\"),vl(a,\"link\",l),dl(a),e.head.appendChild(a)}}}function Xh(l,t,e){Dt.S(l,t,e);var a=Sa;if(a&&l){var n=ke(a).hoistableStyles,u=sa(l);t=t||\"default\";var i=n.get(u);if(!i){var c={loading:0,preload:null};if(i=a.querySelector(Tn(u)))c.loading=5;else{l=k({rel:\"stylesheet\",href:l,\"data-precedence\":t},e),(e=$l.get(u))&&Xf(l,e);var f=i=a.createElement(\"link\");dl(f),vl(f,\"link\",l),f._p=new Promise(function(d,h){f.onload=d,f.onerror=h}),f.addEventListener(\"load\",function(){c.loading|=1}),f.addEventListener(\"error\",function(){c.loading|=2}),c.loading|=4,fu(i,t,a)}i={type:\"stylesheet\",instance:i,count:1,state:c},n.set(u,i)}}}function Qh(l,t){Dt.X(l,t);var e=Sa;if(e&&l){var a=ke(e).hoistableScripts,n=pa(l),u=a.get(n);u||(u=e.querySelector(xn(n)),u||(l=k({src:l,async:!0},t),(t=$l.get(n))&&Qf(l,t),u=e.createElement(\"script\"),dl(u),vl(u,\"link\",l),e.head.appendChild(u)),u={type:\"script\",instance:u,count:1,state:null},a.set(n,u))}}function Zh(l,t){Dt.M(l,t);var e=Sa;if(e&&l){var a=ke(e).hoistableScripts,n=pa(l),u=a.get(n);u||(u=e.querySelector(xn(n)),u||(l=k({src:l,async:!0,type:\"module\"},t),(t=$l.get(n))&&Qf(l,t),u=e.createElement(\"script\"),dl(u),vl(u,\"link\",l),e.head.appendChild(u)),u={type:\"script\",instance:u,count:1,state:null},a.set(n,u))}}function Kd(l,t,e,a){var n=(n=Zt.current)?qu(n):null;if(!n)throw Error(p(446));switch(l){case\"meta\":case\"title\":return null;case\"style\":return typeof e.precedence==\"string\"&&typeof e.href==\"string\"?(t=sa(e.href),e=ke(n).hoistableStyles,a=e.get(t),a||(a={type:\"style\",instance:null,count:0,state:null},e.set(t,a)),a):{type:\"void\",instance:null,count:0,state:null};case\"link\":if(e.rel===\"stylesheet\"&&typeof e.href==\"string\"&&typeof e.precedence==\"string\"){l=sa(e.href);var u=ke(n).hoistableStyles,i=u.get(l);if(i||(n=n.ownerDocument||n,i={type:\"stylesheet\",instance:null,count:0,state:{loading:0,preload:null}},u.set(l,i),(u=n.querySelector(Tn(l)))&&!u._p&&(i.instance=u,i.state.loading=5),$l.has(l)||(e={rel:\"preload\",as:\"style\",href:e.href,crossOrigin:e.crossOrigin,integrity:e.integrity,media:e.media,hrefLang:e.hrefLang,referrerPolicy:e.referrerPolicy},$l.set(l,e),u||Vh(n,l,e,i.state))),t&&a===null)throw Error(p(528,\"\"));return i}if(t&&a!==null)throw Error(p(529,\"\"));return null;case\"script\":return t=e.async,e=e.src,typeof e==\"string\"&&t&&typeof t!=\"function\"&&typeof t!=\"symbol\"?(t=pa(e),e=ke(n).hoistableScripts,a=e.get(t),a||(a={type:\"script\",instance:null,count:0,state:null},e.set(t,a)),a):{type:\"void\",instance:null,count:0,state:null};default:throw Error(p(444,l))}}function sa(l){return'href=\"'+Kl(l)+'\"'}function Tn(l){return'link[rel=\"stylesheet\"]['+l+\"]\"}function C1(l){return k({},l,{\"data-precedence\":l.precedence,precedence:null})}function Vh(l,t,e,a){l.querySelector('link[rel=\"preload\"][as=\"style\"]['+t+\"]\")?a.loading=1:(t=l.createElement(\"link\"),a.preload=t,t.addEventListener(\"load\",function(){return a.loading|=1}),t.addEventListener(\"error\",function(){return a.loading|=2}),vl(t,\"link\",e),dl(t),l.head.appendChild(t))}function pa(l){return'[src=\"'+Kl(l)+'\"]'}function xn(l){return\"script[async]\"+l}function Jd(l,t,e){if(t.count++,t.instance===null)switch(t.type){case\"style\":var a=l.querySelector('style[data-href~=\"'+Kl(e.href)+'\"]');if(a)return t.instance=a,dl(a),a;var n=k({},e,{\"data-href\":e.href,\"data-precedence\":e.precedence,href:null,precedence:null});return a=(l.ownerDocument||l).createElement(\"style\"),dl(a),vl(a,\"style\",n),fu(a,e.precedence,l),t.instance=a;case\"stylesheet\":n=sa(e.href);var u=l.querySelector(Tn(n));if(u)return t.state.loading|=4,t.instance=u,dl(u),u;a=C1(e),(n=$l.get(n))&&Xf(a,n),u=(l.ownerDocument||l).createElement(\"link\"),dl(u);var i=u;return i._p=new Promise(function(c,f){i.onload=c,i.onerror=f}),vl(u,\"link\",a),t.state.loading|=4,fu(u,e.precedence,l),t.instance=u;case\"script\":return u=pa(e.src),(n=l.querySelector(xn(u)))?(t.instance=n,dl(n),n):(a=e,(n=$l.get(u))&&(a=k({},e),Qf(a,n)),l=l.ownerDocument||l,n=l.createElement(\"script\"),dl(n),vl(n,\"link\",a),l.head.appendChild(n),t.instance=n);case\"void\":return null;default:throw Error(p(443,t.type))}else t.type===\"stylesheet\"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,fu(a,e.precedence,l));return t.instance}function fu(l,t,e){for(var a=e.querySelectorAll('link[rel=\"stylesheet\"][data-precedence],style[data-precedence]'),n=a.length?a[a.length-1]:null,u=n,i=0;i title\"):null)}function Kh(l,t,e){if(e===1||t.itemProp!=null)return!1;switch(l){case\"meta\":case\"title\":return!0;case\"style\":if(typeof t.precedence!=\"string\"||typeof t.href!=\"string\"||t.href===\"\")break;return!0;case\"link\":if(typeof t.rel!=\"string\"||typeof t.href!=\"string\"||t.href===\"\"||t.onLoad||t.onError)break;switch(t.rel){case\"stylesheet\":return l=t.disabled,typeof t.precedence==\"string\"&&l==null;default:return!0}case\"script\":if(t.async&&typeof t.async!=\"function\"&&typeof t.async!=\"symbol\"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==\"string\")return!0}return!1}function H1(l){return!(l.type===\"stylesheet\"&&(l.state.loading&3)===0)}function Jh(l,t,e,a){if(e.type===\"stylesheet\"&&(typeof a.media!=\"string\"||matchMedia(a.media).matches!==!1)&&(e.state.loading&4)===0){if(e.instance===null){var n=sa(a.href),u=t.querySelector(Tn(n));if(u){t=u._p,t!==null&&typeof t==\"object\"&&typeof t.then==\"function\"&&(l.count++,l=Yu.bind(l),t.then(l,l)),e.state.loading|=4,e.instance=u,dl(u);return}u=t.ownerDocument||t,a=C1(a),(n=$l.get(n))&&Xf(a,n),u=u.createElement(\"link\"),dl(u);var i=u;i._p=new Promise(function(c,f){i.onload=c,i.onerror=f}),vl(u,\"link\",a),e.instance=u}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(e,t),(t=e.state.preload)&&(e.state.loading&3)===0&&(l.count++,e=Yu.bind(l),t.addEventListener(\"load\",e),t.addEventListener(\"error\",e))}}var lc=0;function wh(l,t){return l.stylesheets&&l.count===0&&du(l,l.stylesheets),0lc?50:800)+t);return l.unsuspend=e,function(){l.unsuspend=null,clearTimeout(a),clearTimeout(n)}}:null}function Yu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)du(this,this.stylesheets);else if(this.unsuspend){var l=this.unsuspend;this.unsuspend=null,l()}}}var ju=null;function du(l,t){l.stylesheets=null,l.unsuspend!==null&&(l.count++,ju=new Map,t.forEach(Wh,l),ju=null,Yu.call(l))}function Wh(l,t){if(!(t.state.loading&4)){var e=ju.get(l);if(e)var a=e.get(null);else{e=new Map,ju.set(l,e);for(var n=l.querySelectorAll(\"link[data-precedence],style[data-precedence]\"),u=0;u{\"use strict\";function Q1(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>\"u\"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=\"function\"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Q1)}catch(l){console.error(l)}}Q1(),Z1.exports=X1()});var J1=lt(ni=>{\"use strict\";var em=Symbol.for(\"react.transitional.element\"),am=Symbol.for(\"react.fragment\");function K1(l,t,e){var a=null;if(e!==void 0&&(a=\"\"+e),t.key!==void 0&&(a=\"\"+t.key),\"key\"in t){e={};for(var n in t)n!==\"key\"&&(e[n]=t[n])}else e=t;return t=e.ref,{$$typeof:em,type:l,key:a,ref:t!==void 0?t:null,props:e}}ni.Fragment=am;ni.jsx=K1;ni.jsxs=K1});var ui=lt((zm,w1)=>{\"use strict\";w1.exports=J1()});var ey=ne(De(),1),ay=ne(V1(),1);var S=ne(ui(),1),C=ne(De(),1);var Ae=ne(De(),1);function W1(){let[l,t]=(0,Ae.useState)([]),[e,a]=(0,Ae.useState)([]),[n,u]=(0,Ae.useState)(!1),[i,c]=(0,Ae.useState)([]);return(0,Ae.useEffect)(()=>{let f=new EventSource(\"/events\");return f.onopen=()=>u(!0),f.onerror=()=>u(!1),f.addEventListener(\"snapshot\",d=>{try{let h=JSON.parse(d.data);t(g=>{if(h.networkLogs.length===0)return g;let y=new Map(g.map(v=>[v.id,v]));for(let v of h.networkLogs)y.set(v.id,v);return Array.from(y.values())}),a(g=>{if(h.consoleLogs.length===0)return g;let y=new Set(g.map(T=>T.id)),v=h.consoleLogs.filter(T=>!y.has(T.id)),z=[...g,...v];return z.length>5e3?z.slice(-5e3):z}),c(h.sessions)}catch{}}),f.addEventListener(\"network\",d=>{try{let h=JSON.parse(d.data);t(g=>{let y=g.findIndex(v=>v.id===h.id);if(y>-1){let v=[...g];return v[y]=h,v}return[...g,h]})}catch{}}),f.addEventListener(\"console\",d=>{try{let h=JSON.parse(d.data);a(g=>{let y=[...g,h];return y.length>5e3?y.slice(-5e3):y})}catch{}}),f.addEventListener(\"session\",d=>{try{c(JSON.parse(d.data))}catch{}}),()=>f.close()},[]),{networkLogs:l,consoleLogs:e,isConnected:n,connectedSessions:i}}function kf(){let[l,t]=(0,C.useState)(\"console\"),{networkLogs:e,consoleLogs:a,connectedSessions:n}=W1(),[u,i]=(0,C.useState)(null),[c,f]=(0,C.useState)(null),[d,h]=(0,C.useState)(null),[g,y]=(0,C.useState)(null),v=(0,C.useRef)(null),z=O=>{y(O),v.current&&clearTimeout(v.current),v.current=setTimeout(()=>{y(null),v.current=null},5e3)},[T,U]=(0,C.useState)(()=>{let O=localStorage.getItem(\"devtools-theme\");return O||null}),[r,o]=(0,C.useState)(window.matchMedia(\"(prefers-color-scheme: dark)\").matches);(0,C.useEffect)(()=>{let O=window.matchMedia(\"(prefers-color-scheme: dark)\"),Dl=ft=>o(ft.matches);return O.addEventListener(\"change\",Dl),()=>O.removeEventListener(\"change\",Dl)},[]);let m=T===null?r:T===\"dark\",s=(0,C.useMemo)(()=>({bg:m?\"#202124\":\"#ffffff\",bgSecondary:m?\"#292a2d\":\"#f3f3f3\",bgHover:m?\"#35363a\":\"#e8f0fe\",border:m?\"#3c4043\":\"#ccc\",text:m?\"#e8eaed\":\"#333\",textSecondary:m?\"#9aa0a6\":\"#666\",accent:m?\"#8ab4f8\":\"#1a73e8\",consoleBg:m?\"#1e1e1e\":\"#fff\",rowBorder:m?\"#303134\":\"#f0f0f0\",errorBg:m?\"#3c1e1e\":\"#fff0f0\",errorText:m?\"#f28b82\":\"#a80000\",warnBg:m?\"#302a10\":\"#fff3cd\",warnText:m?\"#fdd663\":\"#7a5d00\"}),[m]),b=()=>{let O=m?\"light\":\"dark\";U(O),localStorage.setItem(\"devtools-theme\",O)},A=O=>{let Dl=O.target.files?.[0];if(!Dl)return;let ft=new FileReader;ft.onload=zl=>{let ot=zl.target?.result;try{let I=new Map,On=[];ot.split(`\n`).filter(ba=>ba.trim()).forEach(ba=>{let za=JSON.parse(ba),Ea=za.payload||{},Mn=za.type,If=za.timestamp;if(Mn===\"console\")On.push({...Ea,type:Mn,timestamp:If,id:Ea.id||Math.random().toString(36).substring(2,11)});else if(Mn===\"network\"){let Oe=Ea.id;if(!Oe)return;if(!I.has(Oe))I.set(Oe,{...Ea,type:Mn,timestamp:If,id:Oe});else{let ii=I.get(Oe);I.set(Oe,{...ii,...Ea,type:ii.type,timestamp:ii.timestamp})}}});let Ff=`[Imported] ${Dl.name}`,ny=Array.from(I.values()).sort((ba,za)=>ba.timestamp-za.timestamp);f({network:ny,console:On}),h(Ff),i(Ff)}catch(I){console.error(\"Import error:\",I),alert(\"Failed to parse session file. Ensure it is a valid JSONL file.\")}},ft.readAsText(Dl),O.target.value=\"\"},E=()=>{if(!u)return;let O=[];_.forEach(I=>{O.push({timestamp:I.timestamp,data:{type:\"console\",payload:{type:I.type,content:I.content},sessionId:I.sessionId,timestamp:I.timestamp}})}),H.forEach(I=>{O.push({timestamp:I.timestamp,data:{type:\"network\",payload:I,sessionId:I.sessionId,timestamp:I.timestamp}})}),O.sort((I,On)=>I.timestamp-On.timestamp);let Dl=O.map(I=>JSON.stringify(I.data)).join(`\n`),ft=new Blob([Dl],{type:\"application/jsonl\"}),zl=URL.createObjectURL(ft),ot=document.createElement(\"a\");ot.href=zl,ot.download=`session-${u}.jsonl`,ot.click(),URL.revokeObjectURL(zl)},x=(0,C.useMemo)(()=>{let O=new Map,Dl=zl=>{if(!zl.sessionId)return;let ot=O.get(zl.sessionId)||0;zl.timestamp>ot&&O.set(zl.sessionId,zl.timestamp)};e.forEach(Dl),a.forEach(Dl);let ft=Array.from(O.entries()).sort((zl,ot)=>ot[1]-zl[1]).map(zl=>zl[0]);return d?[d,...ft]:ft},[e,a,d]);(0,C.useEffect)(()=>{x.length>0&&u===null&&i(x[0])},[x,u]);let _=(0,C.useMemo)(()=>u?u===d&&c?c.console:a.filter(O=>O.sessionId===u):[],[a,u,d,c]),H=(0,C.useMemo)(()=>u?u===d&&c?c.network:e.filter(O=>O.sessionId===u):[],[e,u,d,c]);return(0,S.jsxs)(\"div\",{style:{display:\"flex\",flexDirection:\"column\",height:\"100vh\",background:s.bg,color:s.text,transition:\"background 0.2s, color 0.2s\",fontFamily:'-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif'},children:[(0,S.jsx)(\"style\",{children:`\n ::-webkit-scrollbar { width: 8px; height: 8px; }\n ::-webkit-scrollbar-track { background: ${s.bgSecondary}; }\n ::-webkit-scrollbar-thumb { background: ${s.border}; border-radius: 4px; }\n ::-webkit-scrollbar-thumb:hover { background: ${s.textSecondary}; }\n [data-gutter]::selection, [data-gutter] *::selection { background: transparent; }\n [data-gutter] .fold-icon { opacity: 0; transition: opacity 0.15s; }\n [data-code-view]:has([data-gutter]:hover) .fold-icon { opacity: 1; }\n `}),(0,S.jsxs)(\"div\",{style:{display:\"flex\",background:s.bgSecondary,borderBottom:`1px solid ${s.border}`,height:\"36px\",alignItems:\"center\",padding:\"0 8px\",gap:\"12px\"},children:[(0,S.jsxs)(\"div\",{style:{display:\"flex\",height:\"100%\"},children:[(0,S.jsx)(k1,{active:l===\"console\",onClick:()=>t(\"console\"),label:\"Console\",t:s}),(0,S.jsx)(k1,{active:l===\"network\",onClick:()=>t(\"network\"),label:\"Network\",t:s})]}),(0,S.jsxs)(\"div\",{style:{marginLeft:\"auto\",fontSize:\"11px\",display:\"flex\",alignItems:\"center\",gap:\"12px\"},children:[u&&n.includes(u)&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(\"button\",{onClick:async()=>{try{await fetch(\"/api/trigger-debugger\",{method:\"POST\",headers:{\"Content-Type\":\"application/json\"},body:JSON.stringify({sessionId:u})}),z(\"Node debugger attached. Open chrome://inspect in Chrome to start debugging.\")}catch(O){console.error(\"Failed to trigger debugger:\",O)}},style:{fontSize:\"11px\",padding:\"4px 8px\",border:`1px solid ${s.border}`,background:s.bg,color:s.text,borderRadius:\"4px\",cursor:\"pointer\",fontWeight:600},title:\"Attach Node Debugger and open chrome://inspect\",children:\"\\u{1F41E} Debug Node\"}),(0,S.jsx)(\"button\",{onClick:E,style:{fontSize:\"11px\",padding:\"4px 8px\",border:`1px solid ${s.border}`,background:s.bg,color:s.text,borderRadius:\"4px\",cursor:\"pointer\",fontWeight:600},children:\"\\u{1F4E4} Export\"})]}),(0,S.jsxs)(\"label\",{style:{padding:\"2px 8px\",borderRadius:\"4px\",border:`1px solid ${s.border}`,background:s.bg,cursor:\"pointer\",display:\"flex\",alignItems:\"center\",gap:\"6px\",fontWeight:600,fontSize:\"11px\"},children:[(0,S.jsx)(\"span\",{children:\"\\u{1F4E5} Import\"}),(0,S.jsx)(\"input\",{type:\"file\",accept:\".jsonl\",onChange:A,style:{display:\"none\"}})]}),(0,S.jsxs)(\"div\",{style:{display:\"flex\",alignItems:\"center\",gap:\"6px\"},children:[(0,S.jsx)(\"span\",{style:{fontSize:\"11px\",color:s.textSecondary},children:\"Session:\"}),x.length>0?(0,S.jsx)(\"select\",{value:u||\"\",onChange:O=>i(O.target.value),style:{fontSize:\"11px\",padding:\"2px 8px\",background:s.bg,color:s.text,border:`1px solid ${s.border}`,borderRadius:\"3px\",minWidth:\"280px\",outline:\"none\"},children:x.map(O=>(0,S.jsxs)(\"option\",{value:O,children:[O,\" \",O===x[0]&&!O.startsWith(\"[Imported]\")?\"(Latest)\":\"\"]},O))}):(0,S.jsx)(\"span\",{style:{fontSize:\"11px\",color:s.textSecondary,fontStyle:\"italic\"},children:\"No Sessions\"}),u&&!u.startsWith(\"[Imported]\")&&(0,S.jsxs)(\"span\",{style:{display:\"flex\",alignItems:\"center\",gap:\"4px\",fontSize:\"11px\",marginLeft:\"8px\"},children:[(0,S.jsx)(\"span\",{style:{width:\"6px\",height:\"6px\",borderRadius:\"50%\",background:n.includes(u)?\"#34a853\":\"#ea4335\"}}),(0,S.jsx)(\"span\",{style:{color:s.textSecondary},children:n.includes(u)?\"Connected\":\"Disconnected\"})]})]}),(0,S.jsx)(\"button\",{onClick:b,style:{fontSize:\"14px\",padding:\"2px 8px\",border:`1px solid ${s.border}`,background:s.bg,color:s.text,borderRadius:\"4px\",cursor:\"pointer\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",height:\"24px\",width:\"32px\"},title:m?\"Switch to light mode\":\"Switch to dark mode\",children:m?\"\\u{1F319}\":\"\\u2600\\uFE0F\"})]})]}),(0,S.jsx)(\"div\",{style:{flex:1,overflow:\"hidden\",display:\"flex\",flexDirection:\"column\"},children:u?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(\"div\",{style:{display:l===\"console\"?\"flex\":\"none\",height:\"100%\"},children:(0,S.jsx)(um,{logs:_,t:s})}),(0,S.jsx)(\"div\",{style:{display:l===\"network\"?\"flex\":\"none\",height:\"100%\"},children:(0,S.jsx)(im,{logs:H,t:s,isDark:m})})]}):(0,S.jsx)(\"div\",{style:{flex:1,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",color:s.textSecondary,fontSize:\"14px\"},children:\"Please start Gemini CLI to begin debugging\"})}),g&&(0,S.jsx)(\"div\",{style:{position:\"fixed\",bottom:\"24px\",right:\"24px\",background:s.accent,color:\"#fff\",padding:\"12px 24px\",borderRadius:\"8px\",boxShadow:\"0 4px 12px rgba(0,0,0,0.15)\",fontSize:\"13px\",fontWeight:500,zIndex:1e3,animation:\"fadeInOut 5s ease forwards\"},children:g}),(0,S.jsx)(\"style\",{children:`\n @keyframes fadeInOut {\n 0% { opacity: 0; transform: translateY(10px); }\n 5% { opacity: 1; transform: translateY(0); }\n 95% { opacity: 1; transform: translateY(0); }\n 100% { opacity: 0; transform: translateY(10px); }\n }\n `})]})}function k1({active:l,onClick:t,label:e,t:a}){return(0,S.jsx)(\"div\",{onClick:t,style:{padding:\"4px 16px\",cursor:\"pointer\",color:l?a.accent:a.textSecondary,fontWeight:600,fontSize:\"12px\",userSelect:\"none\",borderBottom:l?`2px solid ${a.accent}`:\"2px solid transparent\",height:\"100%\",boxSizing:\"border-box\",display:\"flex\",alignItems:\"center\",transition:\"all 0.2s\"},children:e})}function nm({log:l,t}){let[e,a]=(0,C.useState)(!1),n=l.content||\"\",u=n.split(`\n`),i=500,c=5,f=n.length>i,d=u.length>c,h=f||d,g=l.type===\"error\",y=l.type===\"warn\",v=g?t.errorBg:y?t.warnBg:\"transparent\",z=g?t.errorText:y?t.warnText:t.text,T=g?\"\\u274C\":y?\"\\u26A0\\uFE0F\":\" \",U=n;return h&&!e&&(d?U=u.slice(0,c).join(`\n`)+`\n...`:U=n.substring(0,i)+\"...\"),(0,S.jsxs)(\"div\",{style:{display:\"flex\",borderBottom:`1px solid ${t.rowBorder}`,padding:\"4px 12px\",backgroundColor:v,alignItems:\"flex-start\",gap:\"8px\"},children:[(0,S.jsx)(\"div\",{style:{width:\"16px\",textAlign:\"center\",flexShrink:0,fontSize:\"10px\",marginTop:\"2px\"},children:T}),(0,S.jsx)(\"div\",{style:{flex:1,display:\"flex\",flexDirection:\"column\"},children:(0,S.jsx)(\"div\",{style:{whiteSpace:\"pre-wrap\",wordBreak:\"break-all\",color:z,lineHeight:\"1.5\",fontSize:\"11px\"},children:U})}),(0,S.jsxs)(\"div\",{style:{display:\"flex\",alignItems:\"center\",gap:\"8px\",flexShrink:0},children:[h&&(0,S.jsx)(\"div\",{onClick:()=>a(!e),style:{fontSize:\"12px\",color:t.text,cursor:\"pointer\",fontWeight:\"bold\",userSelect:\"none\",width:\"20px\",height:\"20px\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",borderRadius:\"4px\",border:`1px solid ${t.border}`,background:t.bgSecondary,transition:\"all 0.1s\"},onMouseOver:r=>{r.currentTarget.style.background=t.bgHover},onMouseOut:r=>{r.currentTarget.style.background=t.bgSecondary},title:e?\"Collapse\":\"Expand\",children:e?\"\\u2212\":\"+\"}),(0,S.jsx)(\"div\",{style:{color:t.textSecondary,fontSize:\"10px\",userSelect:\"none\",textAlign:\"right\",minWidth:\"70px\"},children:new Date(l.timestamp).toLocaleTimeString([],{hour12:!1,hour:\"2-digit\",minute:\"2-digit\",second:\"2-digit\"})})]})]})}function um({logs:l,t}){let e=(0,C.useRef)(null);return(0,C.useEffect)(()=>{e.current?.scrollIntoView({behavior:\"smooth\"})},[l.length]),l.length===0?(0,S.jsx)(\"div\",{style:{padding:\"20px\",color:t.textSecondary,fontSize:\"11px\",textAlign:\"center\",flex:1},children:\"No console logs in this session\"}):(0,S.jsxs)(\"div\",{style:{flex:1,overflowY:\"auto\",fontFamily:'SFMono-Regular, Consolas, \"Liberation Mono\", Menlo, monospace',background:t.consoleBg,fontSize:\"12px\"},children:[l.map(a=>(0,S.jsx)(nm,{log:a,t},a.id)),(0,S.jsx)(\"div\",{ref:e})]})}function im({logs:l,t,isDark:e}){let[a,n]=(0,C.useState)(null),[u,i]=(0,C.useState)(\"\"),[c,f]=(0,C.useState)(!0),[d,h]=(0,C.useState)({}),[g,y]=(0,C.useState)(400),v=(0,C.useRef)(!1);(0,C.useEffect)(()=>{let s=A=>{if(!v.current)return;let E=Math.max(200,Math.min(A.clientX,window.innerWidth-200));y(E)},b=()=>{v.current=!1,document.body.style.cursor=\"default\",document.body.style.userSelect=\"auto\"};return document.addEventListener(\"mousemove\",s),document.addEventListener(\"mouseup\",b),()=>{document.removeEventListener(\"mousemove\",s),document.removeEventListener(\"mouseup\",b)}},[]);let z=()=>{v.current=!0,document.body.style.cursor=\"col-resize\",document.body.style.userSelect=\"none\"},T=(0,C.useMemo)(()=>{let s=l;if(u){let b=u.toLowerCase();s=l.filter(A=>A.url.toLowerCase().includes(b))}return s},[l,u]),U=(0,C.useMemo)(()=>{if(!c)return null;let s={};return T.forEach(b=>{let A=\"Other\";try{let E=new URL(b.url),x=E.pathname.lastIndexOf(\"/\"),_=x!==-1?E.pathname.substring(0,x+1):\"/\";A=E.hostname+_}catch{}s[A]||(s[A]=[]),s[A].push(b)}),s},[T,c]);(0,C.useEffect)(()=>{U&&h(s=>{let b={...s};return Object.keys(U).forEach(A=>{b[A]===void 0&&(b[A]=!A.includes(\"play.googleapis.com\"))}),b})},[U]);let r=s=>{h(b=>({...b,[s]:!b[s]}))},o=l.find(s=>s.id===a),m=(s,b)=>{let A=s.pending,E=s.response?s.response.status:s.error?\"ERR\":\"...\",x=s.error||s.response&&s.response.status>=400,_=b||s.url;if(!b)try{let O=new URL(s.url);_=O.pathname+O.search}catch{}let H=s.id===a;return(0,S.jsx)(\"div\",{onClick:()=>n(s.id),style:{padding:\"8px 12px\",cursor:\"pointer\",borderBottom:`1px solid ${t.rowBorder}`,display:\"flex\",flexDirection:\"column\",fontSize:\"12px\",backgroundColor:H?t.bgHover:\"transparent\",color:x?\"#f28b82\":t.text,paddingLeft:b?\"24px\":\"12px\"},children:(0,S.jsxs)(\"div\",{style:{display:\"flex\",alignItems:\"center\"},children:[(0,S.jsx)(\"span\",{style:{fontWeight:\"bold\",width:\"45px\",flexShrink:0,fontSize:\"10px\",color:e?\"#81c995\":\"#188038\"},children:s.method}),(0,S.jsx)(\"span\",{style:{flex:1,whiteSpace:\"nowrap\",overflow:\"hidden\",textOverflow:\"ellipsis\",margin:\"0 8px\",fontWeight:500},title:s.url,children:_}),(0,S.jsx)(\"span\",{style:{width:\"40px\",textAlign:\"right\",flexShrink:0,fontSize:\"11px\",color:A?t.accent:x?\"#f28b82\":\"#81c995\"},children:A?\"\\u23F3\":E})]})},s.id)};return l.length===0?(0,S.jsx)(\"div\",{style:{flex:1,display:\"flex\",alignItems:\"center\",justifyContent:\"center\",color:t.textSecondary,fontSize:\"12px\"},children:\"No network activity in this session\"}):(0,S.jsxs)(\"div\",{style:{display:\"flex\",width:\"100%\",height:\"100%\"},children:[(0,S.jsxs)(\"div\",{style:{width:`${g}px`,display:\"flex\",flexDirection:\"column\",borderRight:`1px solid ${t.border}`,background:t.bg},children:[(0,S.jsxs)(\"div\",{style:{padding:\"6px\",background:t.bgSecondary,borderBottom:`1px solid ${t.border}`,display:\"flex\",gap:\"6px\"},children:[(0,S.jsx)(\"input\",{type:\"text\",placeholder:\"Filter...\",value:u,onChange:s=>i(s.target.value),style:{flex:1,boxSizing:\"border-box\",padding:\"4px 10px\",background:t.bg,color:t.text,border:`1px solid ${t.border}`,borderRadius:\"4px\",fontSize:\"12px\"}}),(0,S.jsx)(\"button\",{onClick:()=>f(!c),style:{background:c?t.accent:t.bg,color:c?\"#fff\":t.text,border:`1px solid ${t.border}`,borderRadius:\"4px\",cursor:\"pointer\",fontSize:\"12px\",padding:\"0 8px\"},title:\"Group by Domain\",children:\"\\u{1F4C2}\"})]}),(0,S.jsx)(\"div\",{style:{flex:1,overflowY:\"auto\"},children:c&&U?Object.keys(U).map(s=>(0,S.jsxs)(\"div\",{children:[(0,S.jsxs)(\"div\",{onClick:()=>r(s),style:{padding:\"6px 12px\",background:t.bgSecondary,fontWeight:\"bold\",fontSize:\"11px\",borderBottom:`1px solid ${t.rowBorder}`,wordBreak:\"break-all\",cursor:\"pointer\",display:\"flex\",alignItems:\"center\",userSelect:\"none\"},children:[(0,S.jsx)(\"span\",{style:{marginRight:\"8px\",fontSize:\"9px\",color:t.textSecondary},children:d[s]?\"\\u25BC\":\"\\u25B6\"}),s,(0,S.jsx)(\"span\",{style:{marginLeft:\"auto\",fontWeight:\"normal\",color:t.textSecondary,fontSize:\"10px\",background:t.bg,padding:\"0 6px\",borderRadius:\"10px\"},children:U[s].length})]}),d[s]&&U[s].map(b=>{let A=b.url;try{let E=new URL(b.url),x=E.pathname.lastIndexOf(\"/\");A=(E.pathname.substring(x+1)||\"/\")+E.search}catch{}return m(b,A)})]},s)):T.map(s=>m(s))})]}),(0,S.jsx)(\"div\",{onMouseDown:z,style:{width:\"2px\",cursor:\"col-resize\",background:t.border,flexShrink:0,zIndex:10}}),(0,S.jsx)(\"div\",{style:{flex:1,display:\"flex\",flexDirection:\"column\",overflow:\"hidden\",background:t.bg},children:o?(0,S.jsx)(cm,{log:o,t}):(0,S.jsx)(\"div\",{style:{padding:\"40px\",textAlign:\"center\",color:t.textSecondary,fontSize:\"14px\"},children:\"Select a request to view details\"})})]})}function cm({log:l,t}){let[e,a]=(0,C.useState)(\"headers\"),n=l.response?l.pending?\"\\u23F3\":l.response.status:l.error?\"Error\":\"\\u23F3\";return(0,S.jsxs)(\"div\",{style:{display:\"flex\",flexDirection:\"column\",height:\"100%\",overflow:\"hidden\"},children:[(0,S.jsxs)(\"div\",{style:{padding:\"12px 16px\",borderBottom:`1px solid ${t.border}`,background:t.bgSecondary},children:[(0,S.jsx)(\"div\",{style:{fontWeight:\"bold\",fontSize:\"13px\",marginBottom:\"6px\",wordBreak:\"break-all\",color:t.text},children:l.url}),(0,S.jsxs)(\"div\",{style:{fontSize:\"11px\",color:t.textSecondary,display:\"flex\",gap:\"8px\"},children:[(0,S.jsx)(\"span\",{style:{background:t.bg,padding:\"1px 6px\",borderRadius:\"3px\",fontWeight:\"bold\"},children:l.method}),(0,S.jsx)(\"span\",{children:\"\\u2022\"}),(0,S.jsx)(\"span\",{style:{color:l.error?\"#f28b82\":\"#81c995\"},children:n}),(0,S.jsx)(\"span\",{children:\"\\u2022\"}),(0,S.jsx)(\"span\",{children:new Date(l.timestamp).toLocaleTimeString()}),l.response&&(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(\"span\",{children:\"\\u2022\"}),(0,S.jsxs)(\"span\",{style:{color:t.accent},children:[l.response.durationMs,\"ms\"]})]})]})]}),(0,S.jsx)(\"div\",{style:{display:\"flex\",borderBottom:`1px solid ${t.border}`,background:t.bgSecondary,paddingLeft:\"8px\"},children:[\"headers\",\"payload\",\"response\"].map(u=>(0,S.jsx)(\"div\",{onClick:()=>a(u),style:{padding:\"8px 16px\",cursor:\"pointer\",fontWeight:600,fontSize:\"12px\",textTransform:\"capitalize\",borderBottom:e===u?`2px solid ${t.accent}`:\"2px solid transparent\",color:e===u?t.accent:t.textSecondary,transition:\"all 0.2s\"},children:u},u))}),(0,S.jsxs)(\"div\",{style:{flex:1,overflowY:\"auto\",background:t.bg},children:[e===\"headers\"&&(0,S.jsxs)(\"div\",{style:{padding:\"16px\"},children:[(0,S.jsxs)(wf,{title:\"General\",t,children:[(0,S.jsx)(An,{k:\"Request URL\",v:l.url,t}),(0,S.jsx)(An,{k:\"Request Method\",v:l.method,t}),(0,S.jsx)(An,{k:\"Status Code\",v:String(l.response?l.response.status:\"Pending\"),t,color:l.error?\"#f28b82\":\"#81c995\"}),l.error&&(0,S.jsx)(An,{k:\"Error\",v:l.error,t,color:\"#f28b82\"})]}),(0,S.jsx)(wf,{title:\"Response Headers\",t,children:l.response?(0,S.jsx)($1,{headers:l.response.headers,t}):(0,S.jsx)(\"span\",{style:{fontStyle:\"italic\",color:t.textSecondary},children:\"(no response yet)\"})}),(0,S.jsx)(wf,{title:\"Request Headers\",t,children:(0,S.jsx)($1,{headers:l.headers,t})})]}),e===\"payload\"&&(0,S.jsx)(F1,{content:l.body,t}),e===\"response\"&&(0,S.jsx)(F1,{content:l.response?.body,chunks:l.chunks,t})]})]})}function wf({title:l,children:t,t:e}){let[a,n]=(0,C.useState)(!1);return(0,S.jsxs)(\"div\",{style:{marginBottom:\"16px\",border:`1px solid ${e.border}`,borderRadius:\"6px\",overflow:\"hidden\"},children:[(0,S.jsxs)(\"div\",{onClick:()=>n(!a),style:{padding:\"8px 12px\",background:e.bgSecondary,fontWeight:\"bold\",fontSize:\"11px\",cursor:\"pointer\",userSelect:\"none\",display:\"flex\",alignItems:\"center\",gap:\"8px\"},children:[(0,S.jsx)(\"span\",{style:{fontSize:\"9px\",color:e.textSecondary},children:a?\"\\u25B6\":\"\\u25BC\"}),l]}),!a&&(0,S.jsx)(\"div\",{style:{padding:\"12px\",background:e.bg},children:t})]})}function An({k:l,v:t,color:e,t:a}){return(0,S.jsxs)(\"div\",{style:{display:\"flex\",fontSize:\"12px\",fontFamily:\"monospace\",marginBottom:\"4px\",lineHeight:\"1.4\"},children:[(0,S.jsxs)(\"div\",{style:{fontWeight:\"bold\",color:a.textSecondary,width:\"160px\",flexShrink:0},children:[l,\":\"]}),(0,S.jsx)(\"div\",{style:{flex:1,wordBreak:\"break-all\",color:e||a.text},children:t})]})}function $1({headers:l,t}){return l?(0,S.jsx)(S.Fragment,{children:Object.entries(l).map(([e,a])=>(0,S.jsx)(An,{k:e,v:String(a),t},e))}):(0,S.jsx)(\"div\",{style:{color:t.textSecondary},children:\"(none)\"})}function F1({content:l,chunks:t,t:e}){let[a,n]=(0,C.useState)(\"json\"),u=t&&t.length>0,i=u?t.map(g=>g.data).join(\"\"):l||\"\",c=()=>{try{return JSON.stringify(JSON.parse(i),null,2)}catch{return i}},f=()=>{navigator.clipboard.writeText(c()).catch(()=>{})},d=()=>{let g=new Blob([c()],{type:\"application/json\"}),y=URL.createObjectURL(g),v=document.createElement(\"a\");v.href=y,v.download=\"body.json\",v.click(),URL.revokeObjectURL(y)};if(!i&&!u)return(0,S.jsx)(\"div\",{style:{padding:\"40px\",color:e.textSecondary,textAlign:\"center\"},children:\"(No content)\"});let h={background:\"none\",border:\"none\",cursor:\"pointer\",color:e.textSecondary,padding:\"2px\",borderRadius:\"4px\",display:\"flex\",alignItems:\"center\"};return(0,S.jsxs)(\"div\",{style:{display:\"flex\",flexDirection:\"column\",height:\"100%\"},children:[(0,S.jsxs)(\"div\",{style:{padding:\"6px 12px\",background:e.bgSecondary,borderBottom:`1px solid ${e.border}`,display:\"flex\",gap:\"8px\",alignItems:\"center\"},children:[[\"json\",\"raw\"].map(g=>(0,S.jsx)(\"button\",{onClick:()=>n(g),style:{fontSize:\"11px\",padding:\"2px 8px\",borderRadius:\"4px\",border:`1px solid ${e.border}`,background:a===g?e.accent:e.bg,color:a===g?\"#fff\":e.text,cursor:\"pointer\",textTransform:\"uppercase\",fontWeight:\"bold\"},children:g},g)),(0,S.jsx)(\"div\",{style:{flex:1}}),(0,S.jsx)(\"button\",{onClick:f,style:h,title:\"Copy JSON\",children:(0,S.jsxs)(\"svg\",{width:\"14\",height:\"14\",viewBox:\"0 0 16 16\",fill:\"currentColor\",children:[(0,S.jsx)(\"path\",{d:\"M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25z\"}),(0,S.jsx)(\"path\",{d:\"M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25z\"})]})}),(0,S.jsx)(\"button\",{onClick:d,style:h,title:\"Download JSON\",children:(0,S.jsxs)(\"svg\",{width:\"14\",height:\"14\",viewBox:\"0 0 16 16\",fill:\"currentColor\",children:[(0,S.jsx)(\"path\",{d:\"M2.75 14A1.75 1.75 0 011 12.25v-2.5a.75.75 0 011.5 0v2.5c0 .138.112.25.25.25h10.5a.25.25 0 00.25-.25v-2.5a.75.75 0 011.5 0v2.5A1.75 1.75 0 0113.25 14z\"}),(0,S.jsx)(\"path\",{d:\"M7.25 7.689V2a.75.75 0 011.5 0v5.689l1.97-1.969a.749.749 0 111.06 1.06l-3.25 3.25a.749.749 0 01-1.06 0L4.22 6.78a.749.749 0 111.06-1.06z\"})]})})]}),(0,S.jsx)(\"div\",{style:{flex:1,overflow:\"auto\",padding:a===\"raw\"?\"16px\":0},children:u&&a===\"raw\"?(0,S.jsx)(\"div\",{children:t.map((g,y)=>(0,S.jsxs)(\"div\",{style:{marginBottom:\"12px\"},children:[(0,S.jsxs)(\"div\",{style:{fontSize:\"10px\",color:e.textSecondary,marginBottom:\"4px\"},children:[\"[\",new Date(g.timestamp).toLocaleTimeString(\"en-US\",{hour12:!1}),\".\",String(g.timestamp%1e3).padStart(3,\"0\"),\"]\"]}),(0,S.jsx)(\"pre\",{style:{margin:0,fontSize:\"12px\",fontFamily:\"SFMono-Regular, Consolas, monospace\",whiteSpace:\"pre-wrap\",wordBreak:\"break-all\",color:e.text,lineHeight:\"1.5\"},children:g.data})]},y))}):a===\"raw\"?(0,S.jsx)(\"pre\",{style:{margin:0,fontSize:\"12px\",fontFamily:\"SFMono-Regular, Consolas, monospace\",whiteSpace:\"pre-wrap\",wordBreak:\"break-all\",color:e.text,lineHeight:\"1.5\"},children:i}):(0,S.jsx)(fm,{content:i,t:e})})]})}function fm({content:l,t}){let e=l||\"\";if(e.includes(\"data:\")){let a=e.split(/\\n\\s*\\n/).map((n,u)=>({index:u+1,jsonStr:n.split(`\n`).filter(i=>i.trim().startsWith(\"data:\")).map(i=>i.trim().substring(5).trim()).join(\"\")})).filter(n=>n.jsonStr);if(a.length>0)return(0,S.jsx)(\"div\",{children:a.map(n=>(0,S.jsxs)(\"div\",{style:{marginBottom:\"12px\",borderLeft:`2px solid ${t.accent}`,paddingLeft:\"12px\",background:t.bgSecondary,borderRadius:\"0 4px 4px 0\",padding:\"8px 12px\"},children:[(0,S.jsxs)(\"div\",{style:{fontWeight:\"bold\",color:t.textSecondary,fontSize:\"10px\",marginBottom:\"4px\"},children:[\"CHUNK \",n.index]}),(0,S.jsx)(ty,{data:I1(n.jsonStr),t})]},n.index))})}return(0,S.jsx)(ty,{data:I1(e),t})}function I1(l){try{return JSON.parse(l)}catch{return l}}function om(l){let t=typeof l==\"string\"&&!l.startsWith(\"{\")&&!l.startsWith(\"[\")?l:JSON.stringify(l,null,2);if(t==null)return[{text:\"undefined\",foldStart:!1,foldEnd:-1,closingBracket:\"\"}];let e=t.split(`\n`),a=e.map(u=>({text:u,foldStart:!1,foldEnd:-1,closingBracket:\"\"})),n=[];for(let u=0;u0&&n[n.length-1].bracket===d){let h=n.pop();a[h.index].foldStart=!0,a[h.index].foldEnd=u,a[h.index].closingBracket=h.bracket}}return a}var P1=/(\"(?:[^\"\\\\]|\\\\.)*\")\\s*(?=:)|(\"(?:[^\"\\\\]|\\\\.)*\")|(-?\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)|(\\btrue\\b|\\bfalse\\b)|(\\bnull\\b)|([{}[\\]:,])/g;function ly(l,t){let e=[],a=0,n;for(P1.lastIndex=0;(n=P1.exec(l))!==null;){n.index>a&&e.push(l.slice(a,n.index));let[u,i,c,f,d,h]=n;if(i)e.push((0,S.jsx)(\"span\",{style:{color:t.accent,fontWeight:\"bold\"},children:u},a));else if(c){let g;try{g=JSON.parse(u)}catch{g=u.slice(1,-1)}let y=g.split(`\n`);if(y.length<=1)e.push((0,S.jsx)(\"span\",{style:{color:\"#81c995\"},children:u},a));else{let v=\" \".repeat(n.index+1);e.push((0,S.jsx)(dm,{lines:y,indent:v,t},a))}}else f?e.push((0,S.jsx)(\"span\",{style:{color:\"#ad7fa8\"},children:u},a)):d?e.push((0,S.jsx)(\"span\",{style:{color:\"#fdd663\",fontWeight:\"bold\"},children:u},a)):h?e.push((0,S.jsx)(\"span\",{style:{color:\"#babdb6\",fontWeight:\"bold\"},children:u},a)):e.push((0,S.jsx)(\"span\",{children:u},a));a=n.index+u.length}return aWf,i=u&&!a?l.slice(0,Wf):l;return(0,S.jsxs)(\"span\",{style:{color:\"#81c995\"},children:['\"',i[0],i.slice(1).map((c,f)=>(0,S.jsxs)(C.default.Fragment,{children:[`\n`,t,c]},f)),u&&(0,S.jsxs)(S.Fragment,{children:[`\n`,t,(0,S.jsx)(\"span\",{onClick:()=>n(!a),style:{color:e.accent,cursor:\"pointer\",fontStyle:\"italic\",userSelect:\"none\"},children:a?\"\\u25B2 collapse\":`... ${l.length-Wf} more lines`})]}),'\"']})}function ty({data:l,t}){let e=(0,C.useMemo)(()=>om(l),[l]),[a,n]=(0,C.useState)(()=>new Set),u=(0,C.useRef)(null),i=h=>{n(g=>{let y=new Set(g);return y.has(h)?y.delete(h):y.add(h),y})},c=h=>{if((h.metaKey||h.ctrlKey)&&h.key===\"a\"){h.preventDefault();let g=window.getSelection();if(g&&u.current){g.removeAllRanges();let y=document.createRange();y.selectNodeContents(u.current),g.addRange(y)}}},f=[],d=0;for(;d0&&(0,S.jsx)(\"span\",{children:y}),ly(v,t),(0,S.jsxs)(\"span\",{style:{color:t.textSecondary,fontStyle:\"italic\"},children:[\" \",\"... \",h.closingBracket]})]}),foldable:!0,isCollapsed:!0}),d=h.foldEnd+1}else f.push({index:d,content:ly(h.text,t),foldable:h.foldStart,isCollapsed:!1}),d++}return(0,S.jsx)(\"div\",{tabIndex:0,onKeyDown:c,ref:u,\"data-code-view\":!0,style:{display:\"grid\",gridTemplateColumns:\"20px 1fr\",fontFamily:'SFMono-Regular, Consolas, \"Liberation Mono\", Menlo, monospace',fontSize:\"12px\",lineHeight:\"1.5\",outline:\"none\"},children:f.map(h=>(0,S.jsxs)(C.default.Fragment,{children:[(0,S.jsx)(\"div\",{\"data-gutter\":!0,style:{userSelect:\"none\",textAlign:\"center\",color:t.textSecondary,borderRight:`1px solid ${t.border}`,paddingRight:\"2px\",cursor:h.foldable?\"pointer\":\"default\",fontSize:\"9px\",paddingTop:\"3px\"},onClick:h.foldable?()=>i(h.index):void 0,children:h.foldable?(0,S.jsx)(\"span\",{className:\"fold-icon\",children:h.isCollapsed?\"\\u25B6\":\"\\u25BC\"}):\"\"}),(0,S.jsx)(\"div\",{style:{whiteSpace:\"pre\",color:t.text,paddingLeft:\"8px\",minHeight:\"18px\"},children:h.content})]},h.index))})}var $f=ne(ui(),1);ay.default.createRoot(document.getElementById(\"root\")).render((0,$f.jsx)(ey.default.StrictMode,{children:(0,$f.jsx)(kf,{})}));\n/**\n * @license\n * Copyright 2025 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * @license\n * Copyright 2026 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n/*! Bundled license information:\n\nreact/cjs/react.production.js:\n (**\n * @license React\n * react.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *)\n\nscheduler/cjs/scheduler.production.js:\n (**\n * @license React\n * scheduler.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *)\n\nreact-dom/cjs/react-dom.production.js:\n (**\n * @license React\n * react-dom.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *)\n\nreact-dom/cjs/react-dom-client.production.js:\n (**\n * @license React\n * react-dom-client.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *)\n\nreact/cjs/react-jsx-runtime.production.js:\n (**\n * @license React\n * react-jsx-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *)\n*/\n";