diff --git a/.gitignore b/.gitignore index 324343a..dd3d470 100644 --- a/.gitignore +++ b/.gitignore @@ -4,9 +4,6 @@ tests/test_logs/ CLAUDE.md .DS_Store -# Frontend build output -mcphawk/web/static/* - # Node modules node_modules/ frontend/node_modules/ diff --git a/examples/branding/mcphawk_screenshot.png b/examples/branding/mcphawk_screenshot.png index 967c403..7844a63 100644 Binary files a/examples/branding/mcphawk_screenshot.png and b/examples/branding/mcphawk_screenshot.png differ diff --git a/frontend/src/App-original.vue b/frontend/src/App-original.vue new file mode 100644 index 0000000..b364615 --- /dev/null +++ b/frontend/src/App-original.vue @@ -0,0 +1,64 @@ + + + \ No newline at end of file diff --git a/frontend/src/App-sidebar.vue b/frontend/src/App-sidebar.vue new file mode 100644 index 0000000..099c986 --- /dev/null +++ b/frontend/src/App-sidebar.vue @@ -0,0 +1,98 @@ + + + \ No newline at end of file diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 8ca7733..6a5a36d 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -1,12 +1,23 @@ \ No newline at end of file diff --git a/frontend/src/components/LogTable/LogFiltersModern.vue b/frontend/src/components/LogTable/LogFiltersModern.vue new file mode 100644 index 0000000..f7edc3f --- /dev/null +++ b/frontend/src/components/LogTable/LogFiltersModern.vue @@ -0,0 +1,380 @@ + + + \ No newline at end of file diff --git a/frontend/src/components/LogTable/LogFiltersSidebar.vue b/frontend/src/components/LogTable/LogFiltersSidebar.vue new file mode 100644 index 0000000..c88b9d8 --- /dev/null +++ b/frontend/src/components/LogTable/LogFiltersSidebar.vue @@ -0,0 +1,411 @@ + + + \ No newline at end of file diff --git a/frontend/src/components/LogTable/LogRow.vue b/frontend/src/components/LogTable/LogRow.vue index 9594965..b9709e1 100644 --- a/frontend/src/components/LogTable/LogRow.vue +++ b/frontend/src/components/LogTable/LogRow.vue @@ -11,22 +11,22 @@ > - - - - - - - - - - diff --git a/frontend/src/components/LogTable/LogSearchBar.vue b/frontend/src/components/LogTable/LogSearchBar.vue new file mode 100644 index 0000000..d061b60 --- /dev/null +++ b/frontend/src/components/LogTable/LogSearchBar.vue @@ -0,0 +1,107 @@ + + + \ No newline at end of file diff --git a/frontend/src/components/LogTable/LogTable.vue b/frontend/src/components/LogTable/LogTable.vue index 3a0608c..3af545a 100644 --- a/frontend/src/components/LogTable/LogTable.vue +++ b/frontend/src/components/LogTable/LogTable.vue @@ -8,36 +8,36 @@
+ {{ formatDate(log.timestamp) }} + {{ formatTimestamp(log.timestamp) }} + + {{ messageId }} + {{ messageSummary }} + @@ -34,7 +34,7 @@ - + +
{{ log.src_ip }} {{ directionIcon }} {{ log.dst_ip }}
+ {{ portInfo }} + {{ pidInfo }}
- + - - - - - - - - - - diff --git a/manifest.in b/manifest.in index 74215c3..7352444 100644 --- a/manifest.in +++ b/manifest.in @@ -1,2 +1,8 @@ include README.md -include LICENSE \ No newline at end of file +include LICENSE +recursive-include mcphawk *.py +recursive-include mcphawk/web/static * +global-exclude *.pyc +global-exclude __pycache__ +global-exclude *.so +global-exclude *.dylib \ No newline at end of file diff --git a/mcphawk/cli.py b/mcphawk/cli.py index 73ad2c6..f1a43e6 100644 --- a/mcphawk/cli.py +++ b/mcphawk/cli.py @@ -38,7 +38,7 @@ def sniff( # Configure logging - clear existing handlers first logger.handlers.clear() handler = logging.StreamHandler(sys.stdout) - handler.setFormatter(logging.Formatter('[MCPHawk] %(message)s')) + handler.setFormatter(logging.Formatter('%(message)s')) logger.addHandler(handler) logger.setLevel(logging.DEBUG if debug else logging.INFO) @@ -69,18 +69,12 @@ def sniff( # Start MCP server if requested mcp_thread = None excluded_ports = [] - mcphawk_mcp_ports = [] if with_mcp: server = MCPHawkServer() if mcp_transport == "http": logger.info(f"Starting MCP HTTP server on http://localhost:{mcp_port}/mcp") - # Only exclude MCP port if not in debug mode - if not debug: - excluded_ports = [mcp_port] - else: - logger.info("Debug mode: HTTP MCP traffic will be captured and tagged") - mcphawk_mcp_ports = [mcp_port] + # MCPHawk's own MCP traffic will be captured and identified by server name def run_mcp(): asyncio.run(server.run_http(port=mcp_port)) else: @@ -101,8 +95,7 @@ def run_mcp(): filter_expr=filter_expr, auto_detect=auto_detect, debug=debug, - excluded_ports=excluded_ports, - mcphawk_mcp_ports=mcphawk_mcp_ports + excluded_ports=excluded_ports ) except KeyboardInterrupt: logger.info("Sniffer stopped.") @@ -126,7 +119,7 @@ def web( # Configure logging - clear existing handlers first logger.handlers.clear() handler = logging.StreamHandler(sys.stdout) - handler.setFormatter(logging.Formatter('[MCPHawk] %(message)s')) + handler.setFormatter(logging.Formatter('%(message)s')) logger.addHandler(handler) logger.setLevel(logging.DEBUG if debug else logging.INFO) @@ -155,18 +148,12 @@ def web( # Start MCP server if requested mcp_thread = None excluded_ports = [] - mcphawk_mcp_ports = [] if with_mcp: server = MCPHawkServer() if mcp_transport == "http": logger.info(f"Starting MCP HTTP server on http://localhost:{mcp_port}/mcp") - # Only exclude MCP port if not in debug mode - if not debug: - excluded_ports = [mcp_port] - else: - logger.info("Debug mode: HTTP MCP traffic will be captured and tagged") - mcphawk_mcp_ports = [mcp_port] + # MCPHawk's own MCP traffic will be captured and identified by server name def run_mcp(): asyncio.run(server.run_http(port=mcp_port)) else: @@ -187,8 +174,7 @@ def run_mcp(): auto_detect=auto_detect, debug=debug, excluded_ports=excluded_ports, - with_mcp=with_mcp, - mcphawk_mcp_ports=mcphawk_mcp_ports + with_mcp=with_mcp ) @@ -208,7 +194,7 @@ def mcp( # For other transports, use stdout handler = logging.StreamHandler(sys.stdout) - handler.setFormatter(logging.Formatter('[MCPHawk] %(message)s')) + handler.setFormatter(logging.Formatter('%(message)s')) logger.addHandler(handler) logger.setLevel(logging.DEBUG if debug else logging.INFO) @@ -270,7 +256,7 @@ def wrap( # Configure logging logger.handlers.clear() handler = logging.StreamHandler(sys.stderr) # Use stderr to avoid interfering with stdio - handler.setFormatter(logging.Formatter('[MCPHawk] %(message)s')) + handler.setFormatter(logging.Formatter('%(message)s')) logger.addHandler(handler) logger.setLevel(logging.DEBUG if debug else logging.INFO) diff --git a/mcphawk/mcp_server/server.py b/mcphawk/mcp_server/server.py index de1530b..37718e0 100644 --- a/mcphawk/mcp_server/server.py +++ b/mcphawk/mcp_server/server.py @@ -9,7 +9,6 @@ from .. import logger as mcphawk_logger # Set up logging -logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) diff --git a/mcphawk/sniffer.py b/mcphawk/sniffer.py index f78fe17..ea2f8db 100644 --- a/mcphawk/sniffer.py +++ b/mcphawk/sniffer.py @@ -47,9 +47,6 @@ def _broadcast_in_any_loop(log_entry: dict) -> None: # Global variable to track excluded ports _excluded_ports = set() -# Global variable to track MCPHawk's own MCP server ports for metadata tagging -_mcphawk_mcp_ports = set() - # TCP stream reassembler for handling SSE and chunked responses _tcp_reassembler = TCPStreamReassembler() logger.info("TCP stream reassembler initialized") @@ -157,7 +154,7 @@ def packet_callback(pkt): "stdio": "stdio", "unknown": "Unknown" }.get(transport, "Unknown") - print(f"[MCPHawk] Detected {transport_name} MCP traffic on port {msg_info['src_port']} -> {msg_info['dst_port']}") + logger.info(f"Detected {transport_name} MCP traffic on port {msg_info['src_port']} -> {msg_info['dst_port']}") if pkt.haslayer(Raw): raw_payload = pkt[Raw].load @@ -221,7 +218,7 @@ def packet_callback(pkt): # In auto-detect mode, log when we find MCP traffic on a new port if _auto_detect_mode: - print(f"[MCPHawk] Detected MCP traffic on port {src_port} -> {dst_port}") + logger.info(f"Detected MCP traffic on port {src_port} -> {dst_port}") # Get IP addresses if pkt.haslayer(IP): @@ -302,7 +299,7 @@ def packet_callback(pkt): logger.debug(f"JSON decode failed: {e}") -def start_sniffer(filter_expr: str = "tcp and port 12345", auto_detect: bool = False, debug: bool = False, excluded_ports: list[int] | None = None, mcphawk_mcp_ports: list[int] | None = None) -> None: +def start_sniffer(filter_expr: str = "tcp and port 12345", auto_detect: bool = False, debug: bool = False, excluded_ports: list[int] | None = None) -> None: """ Start sniffing packets on the appropriate interface. - On macOS: use `lo0` @@ -312,13 +309,11 @@ def start_sniffer(filter_expr: str = "tcp and port 12345", auto_detect: bool = F filter_expr: BPF filter expression auto_detect: If True, automatically detect MCP traffic on any port debug: If True, enable debug logging - mcphawk_mcp_ports: List of ports where MCPHawk's own MCP server is running - stdio: If True, also monitor stdio for JSON-RPC messages + excluded_ports: List of ports to exclude from capture """ - global _auto_detect_mode, _excluded_ports, _mcphawk_mcp_ports + global _auto_detect_mode, _excluded_ports _auto_detect_mode = auto_detect _excluded_ports = set(excluded_ports) if excluded_ports else set() - _mcphawk_mcp_ports = set(mcphawk_mcp_ports) if mcphawk_mcp_ports else set() # Configure logging based on debug flag if debug: diff --git a/mcphawk/tcp_reassembly.py b/mcphawk/tcp_reassembly.py index 566c85f..66aa1d5 100644 --- a/mcphawk/tcp_reassembly.py +++ b/mcphawk/tcp_reassembly.py @@ -13,8 +13,6 @@ ) logger = logging.getLogger(__name__) -# Ensure we're using the same log level as the parent -logger.setLevel(logging.DEBUG) class StreamKey: diff --git a/mcphawk/web/server.py b/mcphawk/web/server.py index 9243020..3b4e3b8 100644 --- a/mcphawk/web/server.py +++ b/mcphawk/web/server.py @@ -96,7 +96,7 @@ async def websocket_endpoint(websocket: WebSocket): logger.debug(f"WebSocket disconnected: {len(active_clients)} active clients") -def _start_sniffer_thread(filter_expr: str, auto_detect: bool = False, debug: bool = False, excluded_ports: Optional[list[int]] = None, mcphawk_mcp_ports: Optional[list[int]] = None): +def _start_sniffer_thread(filter_expr: str, auto_detect: bool = False, debug: bool = False, excluded_ports: Optional[list[int]] = None): """ Start the sniffer in a dedicated daemon thread. @@ -105,19 +105,18 @@ def _start_sniffer_thread(filter_expr: str, auto_detect: bool = False, debug: bo auto_detect: Whether to auto-detect MCP traffic. debug: Whether to enable debug logging. excluded_ports: List of ports to exclude from capture. - mcphawk_mcp_ports: List of ports where MCPHawk's own MCP server is running. """ from mcphawk.sniffer import start_sniffer def safe_start(): logger.debug(f"Sniffer thread starting with filter: {filter_expr}, auto_detect: {auto_detect}") - return start_sniffer(filter_expr=filter_expr, auto_detect=auto_detect, debug=debug, excluded_ports=excluded_ports, mcphawk_mcp_ports=mcphawk_mcp_ports) + return start_sniffer(filter_expr=filter_expr, auto_detect=auto_detect, debug=debug, excluded_ports=excluded_ports) thread = threading.Thread(target=safe_start, daemon=True) thread.start() -def run_web(sniffer: bool = True, host: str = "127.0.0.1", port: int = 8000, filter_expr: Optional[str] = None, auto_detect: bool = False, debug: bool = False, excluded_ports: Optional[list[int]] = None, with_mcp: bool = False, mcphawk_mcp_ports: Optional[list[int]] = None): +def run_web(sniffer: bool = True, host: str = "127.0.0.1", port: int = 8000, filter_expr: Optional[str] = None, auto_detect: bool = False, debug: bool = False, excluded_ports: Optional[list[int]] = None, with_mcp: bool = False): """ Run the web server and optionally the sniffer. @@ -133,26 +132,31 @@ def run_web(sniffer: bool = True, host: str = "127.0.0.1", port: int = 8000, fil global _with_mcp _with_mcp = with_mcp + # Configure logging based on debug flag first + if debug: + logging.basicConfig(level=logging.DEBUG, format='[%(levelname)s] %(message)s') + logger.setLevel(logging.DEBUG) + log_level = "debug" + else: + logging.basicConfig(level=logging.INFO, format='%(message)s') + logger.setLevel(logging.INFO) + log_level = "warning" # Only show warnings and errors for uvicorn + if sniffer: if not filter_expr: raise ValueError("filter_expr is required when sniffer is enabled") - _start_sniffer_thread(filter_expr, auto_detect, debug, excluded_ports, mcphawk_mcp_ports) + _start_sniffer_thread(filter_expr, auto_detect, debug, excluded_ports) if sniffer: - print(f"[MCPHawk] Starting sniffer and dashboard on http://{host}:{port}") - print(f"[MCPHawk] Using filter: {filter_expr}") + logger.info(f"Starting sniffer and dashboard on http://{host}:{port}") + logger.info(f"Using filter: {filter_expr}") if auto_detect: - print("[MCPHawk] Auto-detect mode enabled") + logger.info("Auto-detect mode enabled") else: - print(f"[MCPHawk] Starting dashboard only (no sniffer) on http://{host}:{port}") - - # Configure logging based on debug flag - if debug: - logging.basicConfig(level=logging.DEBUG, format='[%(levelname)s] %(message)s') - logger.setLevel(logging.DEBUG) + logger.info(f"Starting dashboard only (no sniffer) on http://{host}:{port}") import uvicorn - uvicorn.run(app, host=host, port=port) + uvicorn.run(app, host=host, port=port, log_level=log_level) # Serve static Vue dashboard (production mode) diff --git a/mcphawk/web/static/assets/index-DC4K23Wn.js b/mcphawk/web/static/assets/index-DC4K23Wn.js new file mode 100644 index 0000000..d56cec7 --- /dev/null +++ b/mcphawk/web/static/assets/index-DC4K23Wn.js @@ -0,0 +1,6 @@ +import{k as et,r as A,c as E,o as Fe,l as w,m as v,q as o,j as T,t as x,b as tt,v as oe,x as h,y as $,e as Te,F as G,z as Z,A as Ft,B as O,C as Y,D as Pt,E as Dt,G as Ut,H as X,I as Bt,J as jt}from"./vendor-CmqOmjtB.js";import{Y as Mt,h as je,G as qt,V as It,S as Ht}from"./ui-CZuBMD6M.js";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))s(n);new MutationObserver(n=>{for(const a of n)if(a.type==="childList")for(const l of a.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&s(l)}).observe(document,{childList:!0,subtree:!0});function r(n){const a={};return n.integrity&&(a.integrity=n.integrity),n.referrerPolicy&&(a.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?a.credentials="include":n.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function s(n){if(n.ep)return;n.ep=!0;const a=r(n);fetch(n.href,a)}})();const Jt="/mcphawk_logo.png";function rt(t,e){return function(){return t.apply(e,arguments)}}const{toString:zt}=Object.prototype,{getPrototypeOf:Pe}=Object,{iterator:he,toStringTag:st}=Symbol,xe=(t=>e=>{const r=zt.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),q=t=>(t=t.toLowerCase(),e=>xe(e)===t),be=t=>e=>typeof e===t,{isArray:re}=Array,ae=be("undefined");function le(t){return t!==null&&!ae(t)&&t.constructor!==null&&!ae(t.constructor)&&B(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const nt=q("ArrayBuffer");function Vt(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&nt(t.buffer),e}const Wt=be("string"),B=be("function"),ot=be("number"),ie=t=>t!==null&&typeof t=="object",Kt=t=>t===!0||t===!1,de=t=>{if(xe(t)!=="object")return!1;const e=Pe(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(st in t)&&!(he in t)},Qt=t=>{if(!ie(t)||le(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},Xt=q("Date"),Gt=q("File"),Zt=q("Blob"),Yt=q("FileList"),er=t=>ie(t)&&B(t.pipe),tr=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||B(t.append)&&((e=xe(t))==="formdata"||e==="object"&&B(t.toString)&&t.toString()==="[object FormData]"))},rr=q("URLSearchParams"),[sr,nr,or,ar]=["ReadableStream","Request","Response","Headers"].map(q),lr=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ce(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let s,n;if(typeof t!="object"&&(t=[t]),re(t))for(s=0,n=t.length;s0;)if(n=r[s],e===n.toLowerCase())return n;return null}const z=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,lt=t=>!ae(t)&&t!==z;function Re(){const{caseless:t}=lt(this)&&this||{},e={},r=(s,n)=>{const a=t&&at(e,n)||n;de(e[a])&&de(s)?e[a]=Re(e[a],s):de(s)?e[a]=Re({},s):re(s)?e[a]=s.slice():e[a]=s};for(let s=0,n=arguments.length;s(ce(e,(n,a)=>{r&&B(n)?t[a]=rt(n,r):t[a]=n},{allOwnKeys:s}),t),cr=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),ur=(t,e,r,s)=>{t.prototype=Object.create(e.prototype,s),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},dr=(t,e,r,s)=>{let n,a,l;const u={};if(e=e||{},t==null)return e;do{for(n=Object.getOwnPropertyNames(t),a=n.length;a-- >0;)l=n[a],(!s||s(l,t,e))&&!u[l]&&(e[l]=t[l],u[l]=!0);t=r!==!1&&Pe(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},fr=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;const s=t.indexOf(e,r);return s!==-1&&s===r},pr=t=>{if(!t)return null;if(re(t))return t;let e=t.length;if(!ot(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},gr=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Pe(Uint8Array)),mr=(t,e)=>{const s=(t&&t[he]).call(t);let n;for(;(n=s.next())&&!n.done;){const a=n.value;e.call(t,a[0],a[1])}},yr=(t,e)=>{let r;const s=[];for(;(r=t.exec(e))!==null;)s.push(r);return s},hr=q("HTMLFormElement"),xr=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,s,n){return s.toUpperCase()+n}),Me=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),br=q("RegExp"),it=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),s={};ce(r,(n,a)=>{let l;(l=e(n,a,t))!==!1&&(s[a]=l||n)}),Object.defineProperties(t,s)},vr=t=>{it(t,(e,r)=>{if(B(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const s=t[r];if(B(s)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},wr=(t,e)=>{const r={},s=n=>{n.forEach(a=>{r[a]=!0})};return re(t)?s(t):s(String(t).split(e)),r},kr=()=>{},_r=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function Sr(t){return!!(t&&B(t.append)&&t[st]==="FormData"&&t[he])}const Er=t=>{const e=new Array(10),r=(s,n)=>{if(ie(s)){if(e.indexOf(s)>=0)return;if(le(s))return s;if(!("toJSON"in s)){e[n]=s;const a=re(s)?[]:{};return ce(s,(l,u)=>{const m=r(l,n+1);!ae(m)&&(a[u]=m)}),e[n]=void 0,a}}return s};return r(t,0)},Tr=q("AsyncFunction"),Rr=t=>t&&(ie(t)||B(t))&&B(t.then)&&B(t.catch),ct=((t,e)=>t?setImmediate:e?((r,s)=>(z.addEventListener("message",({source:n,data:a})=>{n===z&&a===r&&s.length&&s.shift()()},!1),n=>{s.push(n),z.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",B(z.postMessage)),Cr=typeof queueMicrotask<"u"?queueMicrotask.bind(z):typeof process<"u"&&process.nextTick||ct,Or=t=>t!=null&&B(t[he]),c={isArray:re,isArrayBuffer:nt,isBuffer:le,isFormData:tr,isArrayBufferView:Vt,isString:Wt,isNumber:ot,isBoolean:Kt,isObject:ie,isPlainObject:de,isEmptyObject:Qt,isReadableStream:sr,isRequest:nr,isResponse:or,isHeaders:ar,isUndefined:ae,isDate:Xt,isFile:Gt,isBlob:Zt,isRegExp:br,isFunction:B,isStream:er,isURLSearchParams:rr,isTypedArray:gr,isFileList:Yt,forEach:ce,merge:Re,extend:ir,trim:lr,stripBOM:cr,inherits:ur,toFlatObject:dr,kindOf:xe,kindOfTest:q,endsWith:fr,toArray:pr,forEachEntry:mr,matchAll:yr,isHTMLForm:hr,hasOwnProperty:Me,hasOwnProp:Me,reduceDescriptors:it,freezeMethods:vr,toObjectSet:wr,toCamelCase:xr,noop:kr,toFiniteNumber:_r,findKey:at,global:z,isContextDefined:lt,isSpecCompliantForm:Sr,toJSONObject:Er,isAsyncFn:Tr,isThenable:Rr,setImmediate:ct,asap:Cr,isIterable:Or};function _(t,e,r,s,n){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),s&&(this.request=s),n&&(this.response=n,this.status=n.status?n.status:null)}c.inherits(_,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:c.toJSONObject(this.config),code:this.code,status:this.status}}});const ut=_.prototype,dt={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{dt[t]={value:t}});Object.defineProperties(_,dt);Object.defineProperty(ut,"isAxiosError",{value:!0});_.from=(t,e,r,s,n,a)=>{const l=Object.create(ut);return c.toFlatObject(t,l,function(m){return m!==Error.prototype},u=>u!=="isAxiosError"),_.call(l,t.message,e,r,s,n),l.cause=t,l.name=t.name,a&&Object.assign(l,a),l};const Lr=null;function Ce(t){return c.isPlainObject(t)||c.isArray(t)}function ft(t){return c.endsWith(t,"[]")?t.slice(0,-2):t}function qe(t,e,r){return t?t.concat(e).map(function(n,a){return n=ft(n),!r&&a?"["+n+"]":n}).join(r?".":""):e}function Ar(t){return c.isArray(t)&&!t.some(Ce)}const $r=c.toFlatObject(c,{},null,function(e){return/^is[A-Z]/.test(e)});function ve(t,e,r){if(!c.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=c.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(g,b){return!c.isUndefined(b[g])});const s=r.metaTokens,n=r.visitor||d,a=r.dots,l=r.indexes,m=(r.Blob||typeof Blob<"u"&&Blob)&&c.isSpecCompliantForm(e);if(!c.isFunction(n))throw new TypeError("visitor must be a function");function f(i){if(i===null)return"";if(c.isDate(i))return i.toISOString();if(c.isBoolean(i))return i.toString();if(!m&&c.isBlob(i))throw new _("Blob is not supported. Use a Buffer instead.");return c.isArrayBuffer(i)||c.isTypedArray(i)?m&&typeof Blob=="function"?new Blob([i]):Buffer.from(i):i}function d(i,g,b){let R=i;if(i&&!b&&typeof i=="object"){if(c.endsWith(g,"{}"))g=s?g:g.slice(0,-2),i=JSON.stringify(i);else if(c.isArray(i)&&Ar(i)||(c.isFileList(i)||c.endsWith(g,"[]"))&&(R=c.toArray(i)))return g=ft(g),R.forEach(function(F,M){!(c.isUndefined(F)||F===null)&&e.append(l===!0?qe([g],M,a):l===null?g:g+"[]",f(F))}),!1}return Ce(i)?!0:(e.append(qe(b,g,a),f(i)),!1)}const y=[],k=Object.assign($r,{defaultVisitor:d,convertValue:f,isVisitable:Ce});function p(i,g){if(!c.isUndefined(i)){if(y.indexOf(i)!==-1)throw Error("Circular reference detected in "+g.join("."));y.push(i),c.forEach(i,function(R,C){(!(c.isUndefined(R)||R===null)&&n.call(e,R,c.isString(C)?C.trim():C,g,k))===!0&&p(R,g?g.concat(C):[C])}),y.pop()}}if(!c.isObject(t))throw new TypeError("data must be an object");return p(t),e}function Ie(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(s){return e[s]})}function De(t,e){this._pairs=[],t&&ve(t,this,e)}const pt=De.prototype;pt.append=function(e,r){this._pairs.push([e,r])};pt.toString=function(e){const r=e?function(s){return e.call(this,s,Ie)}:Ie;return this._pairs.map(function(n){return r(n[0])+"="+r(n[1])},"").join("&")};function Nr(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function gt(t,e,r){if(!e)return t;const s=r&&r.encode||Nr;c.isFunction(r)&&(r={serialize:r});const n=r&&r.serialize;let a;if(n?a=n(e,r):a=c.isURLSearchParams(e)?e.toString():new De(e,r).toString(s),a){const l=t.indexOf("#");l!==-1&&(t=t.slice(0,l)),t+=(t.indexOf("?")===-1?"?":"&")+a}return t}class He{constructor(){this.handlers=[]}use(e,r,s){return this.handlers.push({fulfilled:e,rejected:r,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){c.forEach(this.handlers,function(s){s!==null&&e(s)})}}const mt={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Fr=typeof URLSearchParams<"u"?URLSearchParams:De,Pr=typeof FormData<"u"?FormData:null,Dr=typeof Blob<"u"?Blob:null,Ur={isBrowser:!0,classes:{URLSearchParams:Fr,FormData:Pr,Blob:Dr},protocols:["http","https","file","blob","url","data"]},Ue=typeof window<"u"&&typeof document<"u",Oe=typeof navigator=="object"&&navigator||void 0,Br=Ue&&(!Oe||["ReactNative","NativeScript","NS"].indexOf(Oe.product)<0),jr=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Mr=Ue&&window.location.href||"http://localhost",qr=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Ue,hasStandardBrowserEnv:Br,hasStandardBrowserWebWorkerEnv:jr,navigator:Oe,origin:Mr},Symbol.toStringTag,{value:"Module"})),D={...qr,...Ur};function Ir(t,e){return ve(t,new D.classes.URLSearchParams,{visitor:function(r,s,n,a){return D.isNode&&c.isBuffer(r)?(this.append(s,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...e})}function Hr(t){return c.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function Jr(t){const e={},r=Object.keys(t);let s;const n=r.length;let a;for(s=0;s=r.length;return l=!l&&c.isArray(n)?n.length:l,m?(c.hasOwnProp(n,l)?n[l]=[n[l],s]:n[l]=s,!u):((!n[l]||!c.isObject(n[l]))&&(n[l]=[]),e(r,s,n[l],a)&&c.isArray(n[l])&&(n[l]=Jr(n[l])),!u)}if(c.isFormData(t)&&c.isFunction(t.entries)){const r={};return c.forEachEntry(t,(s,n)=>{e(Hr(s),n,r,0)}),r}return null}function zr(t,e,r){if(c.isString(t))try{return(e||JSON.parse)(t),c.trim(t)}catch(s){if(s.name!=="SyntaxError")throw s}return(r||JSON.stringify)(t)}const ue={transitional:mt,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){const s=r.getContentType()||"",n=s.indexOf("application/json")>-1,a=c.isObject(e);if(a&&c.isHTMLForm(e)&&(e=new FormData(e)),c.isFormData(e))return n?JSON.stringify(yt(e)):e;if(c.isArrayBuffer(e)||c.isBuffer(e)||c.isStream(e)||c.isFile(e)||c.isBlob(e)||c.isReadableStream(e))return e;if(c.isArrayBufferView(e))return e.buffer;if(c.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let u;if(a){if(s.indexOf("application/x-www-form-urlencoded")>-1)return Ir(e,this.formSerializer).toString();if((u=c.isFileList(e))||s.indexOf("multipart/form-data")>-1){const m=this.env&&this.env.FormData;return ve(u?{"files[]":e}:e,m&&new m,this.formSerializer)}}return a||n?(r.setContentType("application/json",!1),zr(e)):e}],transformResponse:[function(e){const r=this.transitional||ue.transitional,s=r&&r.forcedJSONParsing,n=this.responseType==="json";if(c.isResponse(e)||c.isReadableStream(e))return e;if(e&&c.isString(e)&&(s&&!this.responseType||n)){const l=!(r&&r.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(u){if(l)throw u.name==="SyntaxError"?_.from(u,_.ERR_BAD_RESPONSE,this,null,this.response):u}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:D.classes.FormData,Blob:D.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};c.forEach(["delete","get","head","post","put","patch"],t=>{ue.headers[t]={}});const Vr=c.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Wr=t=>{const e={};let r,s,n;return t&&t.split(` +`).forEach(function(l){n=l.indexOf(":"),r=l.substring(0,n).trim().toLowerCase(),s=l.substring(n+1).trim(),!(!r||e[r]&&Vr[r])&&(r==="set-cookie"?e[r]?e[r].push(s):e[r]=[s]:e[r]=e[r]?e[r]+", "+s:s)}),e},Je=Symbol("internals");function ne(t){return t&&String(t).trim().toLowerCase()}function fe(t){return t===!1||t==null?t:c.isArray(t)?t.map(fe):String(t)}function Kr(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=r.exec(t);)e[s[1]]=s[2];return e}const Qr=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function _e(t,e,r,s,n){if(c.isFunction(s))return s.call(this,e,r);if(n&&(e=r),!!c.isString(e)){if(c.isString(s))return e.indexOf(s)!==-1;if(c.isRegExp(s))return s.test(e)}}function Xr(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,s)=>r.toUpperCase()+s)}function Gr(t,e){const r=c.toCamelCase(" "+e);["get","set","has"].forEach(s=>{Object.defineProperty(t,s+r,{value:function(n,a,l){return this[s].call(this,e,n,a,l)},configurable:!0})})}let j=class{constructor(e){e&&this.set(e)}set(e,r,s){const n=this;function a(u,m,f){const d=ne(m);if(!d)throw new Error("header name must be a non-empty string");const y=c.findKey(n,d);(!y||n[y]===void 0||f===!0||f===void 0&&n[y]!==!1)&&(n[y||m]=fe(u))}const l=(u,m)=>c.forEach(u,(f,d)=>a(f,d,m));if(c.isPlainObject(e)||e instanceof this.constructor)l(e,r);else if(c.isString(e)&&(e=e.trim())&&!Qr(e))l(Wr(e),r);else if(c.isObject(e)&&c.isIterable(e)){let u={},m,f;for(const d of e){if(!c.isArray(d))throw TypeError("Object iterator must return a key-value pair");u[f=d[0]]=(m=u[f])?c.isArray(m)?[...m,d[1]]:[m,d[1]]:d[1]}l(u,r)}else e!=null&&a(r,e,s);return this}get(e,r){if(e=ne(e),e){const s=c.findKey(this,e);if(s){const n=this[s];if(!r)return n;if(r===!0)return Kr(n);if(c.isFunction(r))return r.call(this,n,s);if(c.isRegExp(r))return r.exec(n);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=ne(e),e){const s=c.findKey(this,e);return!!(s&&this[s]!==void 0&&(!r||_e(this,this[s],s,r)))}return!1}delete(e,r){const s=this;let n=!1;function a(l){if(l=ne(l),l){const u=c.findKey(s,l);u&&(!r||_e(s,s[u],u,r))&&(delete s[u],n=!0)}}return c.isArray(e)?e.forEach(a):a(e),n}clear(e){const r=Object.keys(this);let s=r.length,n=!1;for(;s--;){const a=r[s];(!e||_e(this,this[a],a,e,!0))&&(delete this[a],n=!0)}return n}normalize(e){const r=this,s={};return c.forEach(this,(n,a)=>{const l=c.findKey(s,a);if(l){r[l]=fe(n),delete r[a];return}const u=e?Xr(a):String(a).trim();u!==a&&delete r[a],r[u]=fe(n),s[u]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const r=Object.create(null);return c.forEach(this,(s,n)=>{s!=null&&s!==!1&&(r[n]=e&&c.isArray(s)?s.join(", "):s)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(` +`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){const s=new this(e);return r.forEach(n=>s.set(n)),s}static accessor(e){const s=(this[Je]=this[Je]={accessors:{}}).accessors,n=this.prototype;function a(l){const u=ne(l);s[u]||(Gr(n,l),s[u]=!0)}return c.isArray(e)?e.forEach(a):a(e),this}};j.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);c.reduceDescriptors(j.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(s){this[r]=s}}});c.freezeMethods(j);function Se(t,e){const r=this||ue,s=e||r,n=j.from(s.headers);let a=s.data;return c.forEach(t,function(u){a=u.call(r,a,n.normalize(),e?e.status:void 0)}),n.normalize(),a}function ht(t){return!!(t&&t.__CANCEL__)}function se(t,e,r){_.call(this,t??"canceled",_.ERR_CANCELED,e,r),this.name="CanceledError"}c.inherits(se,_,{__CANCEL__:!0});function xt(t,e,r){const s=r.config.validateStatus;!r.status||!s||s(r.status)?t(r):e(new _("Request failed with status code "+r.status,[_.ERR_BAD_REQUEST,_.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Zr(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Yr(t,e){t=t||10;const r=new Array(t),s=new Array(t);let n=0,a=0,l;return e=e!==void 0?e:1e3,function(m){const f=Date.now(),d=s[a];l||(l=f),r[n]=m,s[n]=f;let y=a,k=0;for(;y!==n;)k+=r[y++],y=y%t;if(n=(n+1)%t,n===a&&(a=(a+1)%t),f-l{r=d,n=null,a&&(clearTimeout(a),a=null),t(...f)};return[(...f)=>{const d=Date.now(),y=d-r;y>=s?l(f,d):(n=f,a||(a=setTimeout(()=>{a=null,l(n)},s-y)))},()=>n&&l(n)]}const ge=(t,e,r=3)=>{let s=0;const n=Yr(50,250);return es(a=>{const l=a.loaded,u=a.lengthComputable?a.total:void 0,m=l-s,f=n(m),d=l<=u;s=l;const y={loaded:l,total:u,progress:u?l/u:void 0,bytes:m,rate:f||void 0,estimated:f&&u&&d?(u-l)/f:void 0,event:a,lengthComputable:u!=null,[e?"download":"upload"]:!0};t(y)},r)},ze=(t,e)=>{const r=t!=null;return[s=>e[0]({lengthComputable:r,total:t,loaded:s}),e[1]]},Ve=t=>(...e)=>c.asap(()=>t(...e)),ts=D.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,D.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(D.origin),D.navigator&&/(msie|trident)/i.test(D.navigator.userAgent)):()=>!0,rs=D.hasStandardBrowserEnv?{write(t,e,r,s,n,a){const l=[t+"="+encodeURIComponent(e)];c.isNumber(r)&&l.push("expires="+new Date(r).toGMTString()),c.isString(s)&&l.push("path="+s),c.isString(n)&&l.push("domain="+n),a===!0&&l.push("secure"),document.cookie=l.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function ss(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function ns(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function bt(t,e,r){let s=!ss(e);return t&&(s||r==!1)?ns(t,e):e}const We=t=>t instanceof j?{...t}:t;function W(t,e){e=e||{};const r={};function s(f,d,y,k){return c.isPlainObject(f)&&c.isPlainObject(d)?c.merge.call({caseless:k},f,d):c.isPlainObject(d)?c.merge({},d):c.isArray(d)?d.slice():d}function n(f,d,y,k){if(c.isUndefined(d)){if(!c.isUndefined(f))return s(void 0,f,y,k)}else return s(f,d,y,k)}function a(f,d){if(!c.isUndefined(d))return s(void 0,d)}function l(f,d){if(c.isUndefined(d)){if(!c.isUndefined(f))return s(void 0,f)}else return s(void 0,d)}function u(f,d,y){if(y in e)return s(f,d);if(y in t)return s(void 0,f)}const m={url:a,method:a,data:a,baseURL:l,transformRequest:l,transformResponse:l,paramsSerializer:l,timeout:l,timeoutMessage:l,withCredentials:l,withXSRFToken:l,adapter:l,responseType:l,xsrfCookieName:l,xsrfHeaderName:l,onUploadProgress:l,onDownloadProgress:l,decompress:l,maxContentLength:l,maxBodyLength:l,beforeRedirect:l,transport:l,httpAgent:l,httpsAgent:l,cancelToken:l,socketPath:l,responseEncoding:l,validateStatus:u,headers:(f,d,y)=>n(We(f),We(d),y,!0)};return c.forEach(Object.keys({...t,...e}),function(d){const y=m[d]||n,k=y(t[d],e[d],d);c.isUndefined(k)&&y!==u||(r[d]=k)}),r}const vt=t=>{const e=W({},t);let{data:r,withXSRFToken:s,xsrfHeaderName:n,xsrfCookieName:a,headers:l,auth:u}=e;e.headers=l=j.from(l),e.url=gt(bt(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),u&&l.set("Authorization","Basic "+btoa((u.username||"")+":"+(u.password?unescape(encodeURIComponent(u.password)):"")));let m;if(c.isFormData(r)){if(D.hasStandardBrowserEnv||D.hasStandardBrowserWebWorkerEnv)l.setContentType(void 0);else if((m=l.getContentType())!==!1){const[f,...d]=m?m.split(";").map(y=>y.trim()).filter(Boolean):[];l.setContentType([f||"multipart/form-data",...d].join("; "))}}if(D.hasStandardBrowserEnv&&(s&&c.isFunction(s)&&(s=s(e)),s||s!==!1&&ts(e.url))){const f=n&&a&&rs.read(a);f&&l.set(n,f)}return e},os=typeof XMLHttpRequest<"u",as=os&&function(t){return new Promise(function(r,s){const n=vt(t);let a=n.data;const l=j.from(n.headers).normalize();let{responseType:u,onUploadProgress:m,onDownloadProgress:f}=n,d,y,k,p,i;function g(){p&&p(),i&&i(),n.cancelToken&&n.cancelToken.unsubscribe(d),n.signal&&n.signal.removeEventListener("abort",d)}let b=new XMLHttpRequest;b.open(n.method.toUpperCase(),n.url,!0),b.timeout=n.timeout;function R(){if(!b)return;const F=j.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),P={data:!u||u==="text"||u==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:F,config:t,request:b};xt(function(J){r(J),g()},function(J){s(J),g()},P),b=null}"onloadend"in b?b.onloadend=R:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(R)},b.onabort=function(){b&&(s(new _("Request aborted",_.ECONNABORTED,t,b)),b=null)},b.onerror=function(){s(new _("Network Error",_.ERR_NETWORK,t,b)),b=null},b.ontimeout=function(){let M=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const P=n.transitional||mt;n.timeoutErrorMessage&&(M=n.timeoutErrorMessage),s(new _(M,P.clarifyTimeoutError?_.ETIMEDOUT:_.ECONNABORTED,t,b)),b=null},a===void 0&&l.setContentType(null),"setRequestHeader"in b&&c.forEach(l.toJSON(),function(M,P){b.setRequestHeader(P,M)}),c.isUndefined(n.withCredentials)||(b.withCredentials=!!n.withCredentials),u&&u!=="json"&&(b.responseType=n.responseType),f&&([k,i]=ge(f,!0),b.addEventListener("progress",k)),m&&b.upload&&([y,p]=ge(m),b.upload.addEventListener("progress",y),b.upload.addEventListener("loadend",p)),(n.cancelToken||n.signal)&&(d=F=>{b&&(s(!F||F.type?new se(null,t,b):F),b.abort(),b=null)},n.cancelToken&&n.cancelToken.subscribe(d),n.signal&&(n.signal.aborted?d():n.signal.addEventListener("abort",d)));const C=Zr(n.url);if(C&&D.protocols.indexOf(C)===-1){s(new _("Unsupported protocol "+C+":",_.ERR_BAD_REQUEST,t));return}b.send(a||null)})},ls=(t,e)=>{const{length:r}=t=t?t.filter(Boolean):[];if(e||r){let s=new AbortController,n;const a=function(f){if(!n){n=!0,u();const d=f instanceof Error?f:this.reason;s.abort(d instanceof _?d:new se(d instanceof Error?d.message:d))}};let l=e&&setTimeout(()=>{l=null,a(new _(`timeout ${e} of ms exceeded`,_.ETIMEDOUT))},e);const u=()=>{t&&(l&&clearTimeout(l),l=null,t.forEach(f=>{f.unsubscribe?f.unsubscribe(a):f.removeEventListener("abort",a)}),t=null)};t.forEach(f=>f.addEventListener("abort",a));const{signal:m}=s;return m.unsubscribe=()=>c.asap(u),m}},is=function*(t,e){let r=t.byteLength;if(r{const n=cs(t,e);let a=0,l,u=m=>{l||(l=!0,s&&s(m))};return new ReadableStream({async pull(m){try{const{done:f,value:d}=await n.next();if(f){u(),m.close();return}let y=d.byteLength;if(r){let k=a+=y;r(k)}m.enqueue(new Uint8Array(d))}catch(f){throw u(f),f}},cancel(m){return u(m),n.return()}},{highWaterMark:2})},we=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",wt=we&&typeof ReadableStream=="function",ds=we&&(typeof TextEncoder=="function"?(t=>e=>t.encode(e))(new TextEncoder):async t=>new Uint8Array(await new Response(t).arrayBuffer())),kt=(t,...e)=>{try{return!!t(...e)}catch{return!1}},fs=wt&&kt(()=>{let t=!1;const e=new Request(D.origin,{body:new ReadableStream,method:"POST",get duplex(){return t=!0,"half"}}).headers.has("Content-Type");return t&&!e}),Qe=64*1024,Le=wt&&kt(()=>c.isReadableStream(new Response("").body)),me={stream:Le&&(t=>t.body)};we&&(t=>{["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!me[e]&&(me[e]=c.isFunction(t[e])?r=>r[e]():(r,s)=>{throw new _(`Response type '${e}' is not supported`,_.ERR_NOT_SUPPORT,s)})})})(new Response);const ps=async t=>{if(t==null)return 0;if(c.isBlob(t))return t.size;if(c.isSpecCompliantForm(t))return(await new Request(D.origin,{method:"POST",body:t}).arrayBuffer()).byteLength;if(c.isArrayBufferView(t)||c.isArrayBuffer(t))return t.byteLength;if(c.isURLSearchParams(t)&&(t=t+""),c.isString(t))return(await ds(t)).byteLength},gs=async(t,e)=>{const r=c.toFiniteNumber(t.getContentLength());return r??ps(e)},ms=we&&(async t=>{let{url:e,method:r,data:s,signal:n,cancelToken:a,timeout:l,onDownloadProgress:u,onUploadProgress:m,responseType:f,headers:d,withCredentials:y="same-origin",fetchOptions:k}=vt(t);f=f?(f+"").toLowerCase():"text";let p=ls([n,a&&a.toAbortSignal()],l),i;const g=p&&p.unsubscribe&&(()=>{p.unsubscribe()});let b;try{if(m&&fs&&r!=="get"&&r!=="head"&&(b=await gs(d,s))!==0){let P=new Request(e,{method:"POST",body:s,duplex:"half"}),I;if(c.isFormData(s)&&(I=P.headers.get("content-type"))&&d.setContentType(I),P.body){const[J,Q]=ze(b,ge(Ve(m)));s=Ke(P.body,Qe,J,Q)}}c.isString(y)||(y=y?"include":"omit");const R="credentials"in Request.prototype;i=new Request(e,{...k,signal:p,method:r.toUpperCase(),headers:d.normalize().toJSON(),body:s,duplex:"half",credentials:R?y:void 0});let C=await fetch(i,k);const F=Le&&(f==="stream"||f==="response");if(Le&&(u||F&&g)){const P={};["status","statusText","headers"].forEach(S=>{P[S]=C[S]});const I=c.toFiniteNumber(C.headers.get("content-length")),[J,Q]=u&&ze(I,ge(Ve(u),!0))||[];C=new Response(Ke(C.body,Qe,J,()=>{Q&&Q(),g&&g()}),P)}f=f||"text";let M=await me[c.findKey(me,f)||"text"](C,t);return!F&&g&&g(),await new Promise((P,I)=>{xt(P,I,{data:M,headers:j.from(C.headers),status:C.status,statusText:C.statusText,config:t,request:i})})}catch(R){throw g&&g(),R&&R.name==="TypeError"&&/Load failed|fetch/i.test(R.message)?Object.assign(new _("Network Error",_.ERR_NETWORK,t,i),{cause:R.cause||R}):_.from(R,R&&R.code,t,i)}}),Ae={http:Lr,xhr:as,fetch:ms};c.forEach(Ae,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Xe=t=>`- ${t}`,ys=t=>c.isFunction(t)||t===null||t===!1,_t={getAdapter:t=>{t=c.isArray(t)?t:[t];const{length:e}=t;let r,s;const n={};for(let a=0;a`adapter ${u} `+(m===!1?"is not supported by the environment":"is not available in the build"));let l=e?a.length>1?`since : +`+a.map(Xe).join(` +`):" "+Xe(a[0]):"as no adapter specified";throw new _("There is no suitable adapter to dispatch the request "+l,"ERR_NOT_SUPPORT")}return s},adapters:Ae};function Ee(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new se(null,t)}function Ge(t){return Ee(t),t.headers=j.from(t.headers),t.data=Se.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),_t.getAdapter(t.adapter||ue.adapter)(t).then(function(s){return Ee(t),s.data=Se.call(t,t.transformResponse,s),s.headers=j.from(s.headers),s},function(s){return ht(s)||(Ee(t),s&&s.response&&(s.response.data=Se.call(t,t.transformResponse,s.response),s.response.headers=j.from(s.response.headers))),Promise.reject(s)})}const St="1.11.0",ke={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{ke[t]=function(s){return typeof s===t||"a"+(e<1?"n ":" ")+t}});const Ze={};ke.transitional=function(e,r,s){function n(a,l){return"[Axios v"+St+"] Transitional option '"+a+"'"+l+(s?". "+s:"")}return(a,l,u)=>{if(e===!1)throw new _(n(l," has been removed"+(r?" in "+r:"")),_.ERR_DEPRECATED);return r&&!Ze[l]&&(Ze[l]=!0,console.warn(n(l," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(a,l,u):!0}};ke.spelling=function(e){return(r,s)=>(console.warn(`${s} is likely a misspelling of ${e}`),!0)};function hs(t,e,r){if(typeof t!="object")throw new _("options must be an object",_.ERR_BAD_OPTION_VALUE);const s=Object.keys(t);let n=s.length;for(;n-- >0;){const a=s[n],l=e[a];if(l){const u=t[a],m=u===void 0||l(u,a,t);if(m!==!0)throw new _("option "+a+" must be "+m,_.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new _("Unknown option "+a,_.ERR_BAD_OPTION)}}const pe={assertOptions:hs,validators:ke},H=pe.validators;let V=class{constructor(e){this.defaults=e||{},this.interceptors={request:new He,response:new He}}async request(e,r){try{return await this._request(e,r)}catch(s){if(s instanceof Error){let n={};Error.captureStackTrace?Error.captureStackTrace(n):n=new Error;const a=n.stack?n.stack.replace(/^.+\n/,""):"";try{s.stack?a&&!String(s.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(s.stack+=` +`+a):s.stack=a}catch{}}throw s}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=W(this.defaults,r);const{transitional:s,paramsSerializer:n,headers:a}=r;s!==void 0&&pe.assertOptions(s,{silentJSONParsing:H.transitional(H.boolean),forcedJSONParsing:H.transitional(H.boolean),clarifyTimeoutError:H.transitional(H.boolean)},!1),n!=null&&(c.isFunction(n)?r.paramsSerializer={serialize:n}:pe.assertOptions(n,{encode:H.function,serialize:H.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),pe.assertOptions(r,{baseUrl:H.spelling("baseURL"),withXsrfToken:H.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let l=a&&c.merge(a.common,a[r.method]);a&&c.forEach(["delete","get","head","post","put","patch","common"],i=>{delete a[i]}),r.headers=j.concat(l,a);const u=[];let m=!0;this.interceptors.request.forEach(function(g){typeof g.runWhen=="function"&&g.runWhen(r)===!1||(m=m&&g.synchronous,u.unshift(g.fulfilled,g.rejected))});const f=[];this.interceptors.response.forEach(function(g){f.push(g.fulfilled,g.rejected)});let d,y=0,k;if(!m){const i=[Ge.bind(this),void 0];for(i.unshift(...u),i.push(...f),k=i.length,d=Promise.resolve(r);y{if(!s._listeners)return;let a=s._listeners.length;for(;a-- >0;)s._listeners[a](n);s._listeners=null}),this.promise.then=n=>{let a;const l=new Promise(u=>{s.subscribe(u),a=u}).then(n);return l.cancel=function(){s.unsubscribe(a)},l},e(function(a,l,u){s.reason||(s.reason=new se(a,l,u),r(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const e=new AbortController,r=s=>{e.abort(s)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new Et(function(n){e=n}),cancel:e}}};function bs(t){return function(r){return t.apply(null,r)}}function vs(t){return c.isObject(t)&&t.isAxiosError===!0}const $e={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries($e).forEach(([t,e])=>{$e[e]=t});function Tt(t){const e=new V(t),r=rt(V.prototype.request,e);return c.extend(r,V.prototype,e,{allOwnKeys:!0}),c.extend(r,e,null,{allOwnKeys:!0}),r.create=function(n){return Tt(W(t,n))},r}const N=Tt(ue);N.Axios=V;N.CanceledError=se;N.CancelToken=xs;N.isCancel=ht;N.VERSION=St;N.toFormData=ve;N.AxiosError=_;N.Cancel=N.CanceledError;N.all=function(e){return Promise.all(e)};N.spread=bs;N.isAxiosError=vs;N.mergeConfig=W;N.AxiosHeaders=j;N.formToJSON=t=>yt(c.isHTMLForm(t)?new FormData(t):t);N.getAdapter=_t.getAdapter;N.HttpStatusCode=$e;N.default=N;const{Axios:ha,AxiosError:xa,CanceledError:ba,isCancel:va,CancelToken:wa,VERSION:ka,all:_a,Cancel:Sa,isAxiosError:Ea,spread:Ta,toFormData:Ra,AxiosHeaders:Ca,HttpStatusCode:Oa,formToJSON:La,getAdapter:Aa,mergeConfig:$a}=N;function ee(t){try{return typeof t=="string"?JSON.parse(t):t}catch{return null}}function te(t){const e=ee(t);return!e||!e.jsonrpc||e.jsonrpc!=="2.0"?"unknown":e.error&&e.id!==void 0?"error":"result"in e&&e.id!==void 0?"response":e.method&&e.id!==void 0?"request":e.method&&e.id===void 0?"notification":"unknown"}function Ne(t){return new Date(t).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit",fractionalSecondDigits:3})}function Ye(t){const e=new Date(t),r=e.getDate().toString().padStart(2,"0"),s=(e.getMonth()+1).toString().padStart(2,"0"),n=e.getFullYear();return`${r}/${s}/${n}`}function ws(t){const e=ee(t);if(!e)return"Invalid JSON";switch(te(t)){case"request":return e.method;case"response":return e.result!==void 0&&(typeof e.result=="string"||typeof e.result=="number"||typeof e.result=="boolean")?`Result: ${e.result}`:"Response";case"notification":return e.method;case"error":return`Error: ${e.error.message}`;default:return"Unknown message type"}}function ks(t){return t.transport_type==="stdio"?"-":`${t.src_port||"?"} → ${t.dst_port||"?"}`}function Rt(t){switch(t){case"incoming":return"←";case"outgoing":return"→";default:return"↔"}}const K=et("logs",()=>{const t=A([]),e=A("all"),r=A(""),s=A("all"),n=A("all"),a=A(!1),l=A(null),u=A(!1),m=A(null),f=A(!1),d=E(()=>{let S=t.value;if(e.value!=="all"&&(S=S.filter(L=>te(L.message)===e.value)),s.value!=="all"&&(S=S.filter(L=>(L.transport_type||L.traffic_type||"unknown")===s.value)),n.value!=="all"&&(S=S.filter(L=>{if(!L.metadata)return!1;try{return JSON.parse(L.metadata).server_name===n.value}catch{return!1}})),r.value){const L=r.value.toLowerCase();S=S.filter(U=>JSON.stringify(U).toLowerCase().includes(L))}return S}),y=E(()=>{const S={total:t.value.length,requests:0,responses:0,notifications:0,errors:0};return t.value.forEach(L=>{const U=te(L.message);U==="request"?S.requests++:U==="response"?S.responses++:U==="notification"?S.notifications++:U==="error"&&S.errors++}),S}),k=E(()=>t.value.find(S=>S.log_id===l.value)),p=E(()=>{const S=new Set;return t.value.forEach(L=>{if(L.metadata)try{const U=JSON.parse(L.metadata);U.server_name&&S.add(U.server_name)}catch{}}),Array.from(S).sort()}),i=E(()=>{if(!a.value||!k.value)return new Set;const S=ee(k.value.message);if(!S||!S.id)return new Set;const L=new Set;return t.value.forEach(U=>{const Be=ee(U.message);Be&&Be.id===S.id&&L.add(U.log_id)}),L});async function g(S=100){u.value=!0,m.value=null;try{const L=await N.get("/logs",{params:{limit:S}});t.value=L.data}catch(L){m.value=L.message,console.error("Failed to fetch logs:",L)}finally{u.value=!1}}function b(S){t.value.unshift(S),t.value.length>1e4&&(t.value=t.value.slice(0,1e4))}function R(){t.value=[],l.value=null}function C(S){l.value=S}function F(S){e.value=S}function M(S){r.value=S}function P(){a.value=!a.value}function I(){f.value=!f.value}function J(S){s.value=S}function Q(S){n.value=S}return{logs:t,filter:e,searchQuery:r,transportFilter:s,serverFilter:n,showPairing:a,selectedLogId:l,loading:u,error:m,expandAll:f,filteredLogs:d,stats:y,selectedLog:k,uniqueServers:p,pairedLogs:i,fetchLogs:g,addLog:b,clearLogs:R,selectLog:C,setFilter:F,setSearchQuery:M,setTransportFilter:J,setServerFilter:Q,togglePairing:P,toggleExpandAll:I}}),Ct=et("websocket",()=>{const t=A(null),e=A(!1),r=A(null),s=A(0),n=10,a=3e3;function l(){var y;if(((y=t.value)==null?void 0:y.readyState)===WebSocket.OPEN)return;const d=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`;console.log("Connecting to WebSocket:",d),t.value=new WebSocket(d),t.value.onopen=()=>{console.log("WebSocket connected"),e.value=!0,s.value=0,clearTimeout(r.value)},t.value.onmessage=k=>{var p;try{const i=JSON.parse(k.data);if(i.type==="ping"){((p=t.value)==null?void 0:p.readyState)===WebSocket.OPEN&&t.value.send(JSON.stringify({type:"pong"}));return}K().addLog(i)}catch(i){console.error("Failed to parse WebSocket message:",i)}},t.value.onerror=k=>{console.error("WebSocket error:",k)},t.value.onclose=()=>{console.log("WebSocket disconnected"),e.value=!1,t.value=null,s.value{l()},a))}}function u(){clearTimeout(r.value),t.value&&(t.value.close(),t.value=null),e.value=!1}function m(f){var d;((d=t.value)==null?void 0:d.readyState)===WebSocket.OPEN&&t.value.send(JSON.stringify(f))}return{connected:e,reconnectAttempts:s,connect:l,disconnect:u,send:m}}),_s={class:"flex items-center space-x-4"},Ss={class:"flex items-center"},Es={class:"text-sm text-gray-600 dark:text-gray-400"},Ts={class:"flex items-center"},Rs={__name:"ConnectionStatus",setup(t){const e=Ct(),r=A(!1);Fe(async()=>{try{const u=await(await fetch("/status")).json();r.value=u.with_mcp}catch(l){console.error("Failed to fetch server status:",l)}});const s=E(()=>e.connected?"bg-green-500 animate-pulse-slow":e.reconnectAttempts>0?"bg-yellow-500 animate-pulse":"bg-red-500"),n=E(()=>e.connected?"Live Updates":e.reconnectAttempts>0?`Reconnecting (${e.reconnectAttempts})...`:"Disconnected"),a=E(()=>r.value?"bg-green-500 animate-pulse-slow":"bg-gray-400");return(l,u)=>(v(),w("div",_s,[o("div",Ss,[o("div",{class:T(["w-2 h-2 rounded-full mr-2",s.value])},null,2),o("span",Es,x(n.value),1)]),o("div",Ts,[o("div",{class:T(["w-2 h-2 rounded-full mr-2",a.value])},null,2),u[0]||(u[0]=o("span",{class:"text-sm text-gray-600 dark:text-gray-400"}," MCP Server ",-1))])]))}};function Cs(t,e){return v(),w("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"})])}function Os(t,e){return v(),w("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M8.25 7.5V6.108c0-1.135.845-2.098 1.976-2.192.373-.03.748-.057 1.123-.08M15.75 18H18a2.25 2.25 0 0 0 2.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 0 0-1.123-.08M15.75 18.75v-1.875a3.375 3.375 0 0 0-3.375-3.375h-1.5a1.125 1.125 0 0 1-1.125-1.125v-1.5A3.375 3.375 0 0 0 6.375 7.5H5.25m11.9-3.664A2.251 2.251 0 0 0 15 2.25h-1.5a2.251 2.251 0 0 0-2.15 1.586m5.8 0c.065.21.1.433.1.664v.75h-6V4.5c0-.231.035-.454.1-.664M6.75 7.5H4.875c-.621 0-1.125.504-1.125 1.125v12c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V16.5a9 9 0 0 0-9-9Z"})])}function Ls(t,e){return v(),w("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M17.25 6.75 22.5 12l-5.25 5.25m-10.5 0L1.5 12l5.25-5.25m7.5-3-4.5 16.5"})])}function As(t,e){return v(),w("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"})])}function $s(t,e){return v(),w("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M21.752 15.002A9.72 9.72 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z"})])}function Ns(t,e){return v(),w("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 3v2.25m6.364.386-1.591 1.591M21 12h-2.25m-.386 6.364-1.591-1.591M12 18.75V21m-4.773-4.227-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z"})])}function Fs(t,e){return v(),w("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"})])}function Ps(t,e){return v(),w("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M9 4.5v15m6-15v15m-10.875 0h15.75c.621 0 1.125-.504 1.125-1.125V5.625c0-.621-.504-1.125-1.125-1.125H4.125C3.504 4.5 3 5.004 3 5.625v12.75c0 .621.504 1.125 1.125 1.125Z"})])}function Ot(t,e){return v(),w("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"})])}const Ds=["title"],Us={__name:"ThemeToggle",setup(t){const e=A(!1);let r=null;Fe(()=>{const a=localStorage.getItem("theme");r=window.matchMedia("(prefers-color-scheme: dark)"),a?e.value=a==="dark":e.value=r.matches,n();const l=u=>{localStorage.getItem("theme")||(e.value=u.matches,n())};r.addEventListener("change",l),tt(()=>{r.removeEventListener("change",l)})});function s(){e.value=!e.value,n(),localStorage.setItem("theme",e.value?"dark":"light")}function n(){e.value?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark")}return(a,l)=>(v(),w("button",{onClick:s,class:"p-2 rounded-lg bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-300 hover:bg-gray-300 dark:hover:bg-gray-600 transition-colors",title:e.value?"Switch to light mode":"Switch to dark mode"},[e.value?(v(),oe(h(Ns),{key:0,class:"h-5 w-5"})):(v(),oe(h($s),{key:1,class:"h-5 w-5"}))],8,Ds))}},Bs={class:"flex items-center space-x-4 text-sm"},js={class:"flex items-center space-x-2"},Ms={class:"font-medium text-gray-900 dark:text-gray-100"},qs={class:"flex items-center space-x-2"},Is={class:"font-medium text-gray-900 dark:text-gray-100"},Hs={class:"flex items-center space-x-2"},Js={class:"font-medium text-gray-900 dark:text-gray-100"},zs={class:"flex items-center space-x-2"},Vs={class:"font-medium text-gray-900 dark:text-gray-100"},Ws={key:0,class:"flex items-center space-x-2"},Ks={class:"font-medium text-red-600 dark:text-red-400"},Qs={__name:"StatsPanel",setup(t){const e=K(),r=E(()=>e.stats);return(s,n)=>(v(),w("div",Bs,[o("div",js,[n[0]||(n[0]=o("span",{class:"text-gray-500 dark:text-gray-400"},"Total:",-1)),o("span",Ms,x(r.value.total),1)]),o("div",qs,[n[1]||(n[1]=o("div",{class:"w-2 h-2 rounded-full bg-blue-500"},null,-1)),n[2]||(n[2]=o("span",{class:"text-gray-500 dark:text-gray-400"},"Req:",-1)),o("span",Is,x(r.value.requests),1)]),o("div",Hs,[n[3]||(n[3]=o("div",{class:"w-2 h-2 rounded-full bg-green-500"},null,-1)),n[4]||(n[4]=o("span",{class:"text-gray-500 dark:text-gray-400"},"Res:",-1)),o("span",Js,x(r.value.responses),1)]),o("div",zs,[n[5]||(n[5]=o("div",{class:"w-2 h-2 rounded-full bg-yellow-500"},null,-1)),n[6]||(n[6]=o("span",{class:"text-gray-500 dark:text-gray-400"},"Notif:",-1)),o("span",Vs,x(r.value.notifications),1)]),r.value.errors>0?(v(),w("div",Ws,[n[7]||(n[7]=o("div",{class:"w-2 h-2 rounded-full bg-red-500"},null,-1)),n[8]||(n[8]=o("span",{class:"text-gray-500 dark:text-gray-400"},"Err:",-1)),o("span",Ks,x(r.value.errors),1)])):$("",!0)]))}},Xs={class:"h-full bg-white dark:bg-gray-800 border-r border-gray-200 dark:border-gray-700 flex flex-col"},Gs={class:"p-4 border-b border-gray-200 dark:border-gray-700"},Zs={key:0,class:"flex flex-wrap gap-2"},Ys=["onClick"],en={key:1,class:"text-sm text-gray-500 dark:text-gray-400"},tn={class:"flex-1 overflow-y-auto p-4 space-y-6"},rn={class:"space-y-2"},sn={class:"flex items-center"},nn=["value","checked","onChange"],on={class:"flex items-center"},an={key:0,class:"w-2 h-2 rounded-full bg-white"},ln={class:"space-y-2"},cn=["value","checked","onChange"],un={class:"flex items-center flex-1"},dn={key:0,class:"w-2 h-2 rounded-full bg-white"},fn={key:0},pn={class:"space-y-2"},gn=["checked"],mn={class:"flex items-center flex-1"},yn={key:0,class:"w-2 h-2 rounded-full bg-white"},hn=["value","checked","onChange"],xn={class:"flex items-center flex-1"},bn={key:0,class:"w-2 h-2 rounded-full bg-white"},vn=["title"],wn={class:"space-y-3"},kn={class:"flex items-center justify-between p-3 rounded-lg bg-gray-50 dark:bg-gray-700/50 cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-700 transition-all duration-200"},_n={class:"p-4 border-t border-gray-200 dark:border-gray-700 space-y-3"},Sn={__name:"LogFiltersSidebar",setup(t){const e=K(),r=A("all"),s=A("all"),n=E(()=>[{label:"All Messages",value:"all",count:e.stats.total},{label:"Requests",value:"request",count:e.stats.requests},{label:"Responses",value:"response",count:e.stats.responses},{label:"Notifications",value:"notification",count:e.stats.notifications},{label:"Errors",value:"error",count:e.stats.errors}]),a=[{label:"All Transports",value:"all"},{label:"Streamable HTTP",value:"streamable_http"},{label:"HTTP+SSE",value:"http_sse"},{label:"stdio",value:"stdio"},{label:"Unknown",value:"unknown"}],l=E(()=>{let p=0;return e.filter!=="all"&&p++,e.transportFilter!=="all"&&p++,e.serverFilter!=="all"&&p++,e.searchQuery&&p++,p}),u=E(()=>{const p=[];if(e.filter!=="all"){const i=n.value.find(g=>g.value===e.filter);i&&p.push({key:"type",type:"type",value:e.filter,label:i.label})}if(e.transportFilter!=="all"){const i=a.find(g=>g.value===e.transportFilter);p.push({key:"transport",type:"transport",value:e.transportFilter,label:i?i.label:e.transportFilter})}return e.serverFilter!=="all"&&p.push({key:"server",type:"server",value:e.serverFilter,label:`Server: ${e.serverFilter}`}),e.searchQuery&&p.push({key:"search",type:"search",value:e.searchQuery,label:`"${e.searchQuery}"`}),p});function m(p){return p>999?`${(p/1e3).toFixed(1)}k`:p}function f(p){r.value=p,e.setTransportFilter(p)}function d(p){s.value=p,e.setServerFilter(p)}function y(p){switch(p.type){case"type":e.setFilter("all");break;case"transport":r.value="all",e.setTransportFilter("all");break;case"server":s.value="all",e.setServerFilter("all");break;case"search":e.setSearchQuery("");break}}function k(){e.setFilter("all"),r.value="all",e.setTransportFilter("all"),s.value="all",e.setServerFilter("all"),e.setSearchQuery("")}return Te(()=>e.transportFilter,p=>{r.value=p}),Te(()=>e.serverFilter,p=>{s.value=p}),(p,i)=>(v(),w("div",Xs,[o("div",Gs,[i[3]||(i[3]=o("h2",{class:"text-lg font-semibold text-gray-900 dark:text-gray-100 mb-2"},"Filters",-1)),u.value.length>0?(v(),w("div",Zs,[(v(!0),w(G,null,Z(u.value,g=>(v(),w("span",{key:g.key,class:"inline-flex items-center gap-1 px-2.5 py-1 rounded-full text-xs font-medium bg-mcp-blue/10 text-mcp-blue dark:bg-mcp-blue/20 dark:text-mcp-blue-light border border-mcp-blue/20"},[Y(x(g.label)+" ",1),o("button",{onClick:b=>y(g),class:"ml-0.5 hover:text-mcp-blue-dark dark:hover:text-white transition-colors"},[O(h(Ot),{class:"h-3.5 w-3.5"})],8,Ys)]))),128))])):(v(),w("p",en," No active filters "))]),o("div",tn,[o("div",null,[i[4]||(i[4]=o("h3",{class:"text-sm font-semibold text-gray-900 dark:text-gray-100 mb-4"},"Message Type",-1)),o("div",rn,[(v(!0),w(G,null,Z(n.value,g=>(v(),w("label",{key:g.value,class:T(["flex items-center justify-between p-3 rounded-lg cursor-pointer transition-all duration-200",[h(e).filter===g.value?"bg-mcp-blue/10 dark:bg-mcp-blue/20 border border-mcp-blue/30":"bg-gray-50 dark:bg-gray-700/50 hover:bg-gray-100 dark:hover:bg-gray-700 border border-transparent"]])},[o("div",sn,[o("input",{type:"radio",name:"message-type",value:g.value,checked:h(e).filter===g.value,onChange:b=>h(e).setFilter(g.value),class:"sr-only"},null,40,nn),o("div",on,[o("div",{class:T(["w-4 h-4 rounded-full border-2 mr-3 flex items-center justify-center",[h(e).filter===g.value?"border-mcp-blue bg-mcp-blue":"border-gray-400 dark:border-gray-500"]])},[h(e).filter===g.value?(v(),w("div",an)):$("",!0)],2),o("span",{class:T(["text-sm font-medium",[h(e).filter===g.value?"text-mcp-blue dark:text-mcp-blue-light":"text-gray-700 dark:text-gray-300"]])},x(g.label),3)])]),o("span",{class:T(["text-sm",[h(e).filter===g.value?"text-mcp-blue dark:text-mcp-blue-light font-semibold":"text-gray-500 dark:text-gray-400"]])},x(m(g.count)),3)],2))),128))])]),o("div",null,[i[5]||(i[5]=o("h3",{class:"text-sm font-semibold text-gray-900 dark:text-gray-100 mb-4"},"Transport Type",-1)),o("div",ln,[(v(),w(G,null,Z(a,g=>o("label",{key:g.value,class:T(["flex items-center p-3 rounded-lg cursor-pointer transition-all duration-200",[r.value===g.value?"bg-mcp-blue/10 dark:bg-mcp-blue/20 border border-mcp-blue/30":"bg-gray-50 dark:bg-gray-700/50 hover:bg-gray-100 dark:hover:bg-gray-700 border border-transparent"]])},[o("input",{type:"radio",name:"transport-type",value:g.value,checked:r.value===g.value,onChange:b=>f(g.value),class:"sr-only"},null,40,cn),o("div",un,[o("div",{class:T(["w-4 h-4 rounded-full border-2 mr-3 flex items-center justify-center",[r.value===g.value?"border-mcp-blue bg-mcp-blue":"border-gray-400 dark:border-gray-500"]])},[r.value===g.value?(v(),w("div",dn)):$("",!0)],2),o("span",{class:T(["text-sm font-medium",[r.value===g.value?"text-mcp-blue dark:text-mcp-blue-light":"text-gray-700 dark:text-gray-300"]])},x(g.label),3)])],2)),64))])]),h(e).uniqueServers.length>0?(v(),w("div",fn,[i[6]||(i[6]=o("h3",{class:"text-sm font-semibold text-gray-900 dark:text-gray-100 mb-4"},"Server",-1)),o("div",pn,[o("label",{class:T(["flex items-center p-3 rounded-lg cursor-pointer transition-all duration-200",[s.value==="all"?"bg-mcp-blue/10 dark:bg-mcp-blue/20 border border-mcp-blue/30":"bg-gray-50 dark:bg-gray-700/50 hover:bg-gray-100 dark:hover:bg-gray-700 border border-transparent"]])},[o("input",{type:"radio",name:"server",value:"all",checked:s.value==="all",onChange:i[0]||(i[0]=g=>d("all")),class:"sr-only"},null,40,gn),o("div",mn,[o("div",{class:T(["w-4 h-4 rounded-full border-2 mr-3 flex items-center justify-center",[s.value==="all"?"border-mcp-blue bg-mcp-blue":"border-gray-400 dark:border-gray-500"]])},[s.value==="all"?(v(),w("div",yn)):$("",!0)],2),o("span",{class:T(["text-sm font-medium",[s.value==="all"?"text-mcp-blue dark:text-mcp-blue-light":"text-gray-700 dark:text-gray-300"]])}," All Servers ",2)])],2),(v(!0),w(G,null,Z(h(e).uniqueServers,g=>(v(),w("label",{key:g,class:T(["flex items-center p-3 rounded-lg cursor-pointer transition-all duration-200",[s.value===g?"bg-mcp-blue/10 dark:bg-mcp-blue/20 border border-mcp-blue/30":"bg-gray-50 dark:bg-gray-700/50 hover:bg-gray-100 dark:hover:bg-gray-700 border border-transparent"]])},[o("input",{type:"radio",name:"server",value:g,checked:s.value===g,onChange:b=>d(g),class:"sr-only"},null,40,hn),o("div",xn,[o("div",{class:T(["w-4 h-4 rounded-full border-2 mr-3 flex items-center justify-center",[s.value===g?"border-mcp-blue bg-mcp-blue":"border-gray-400 dark:border-gray-500"]])},[s.value===g?(v(),w("div",bn)):$("",!0)],2),o("span",{class:T(["text-sm font-medium truncate",[s.value===g?"text-mcp-blue dark:text-mcp-blue-light":"text-gray-700 dark:text-gray-300"]]),title:g},x(g),11,vn)])],2))),128))])])):$("",!0),o("div",null,[i[8]||(i[8]=o("h3",{class:"text-sm font-semibold text-gray-900 dark:text-gray-100 mb-4"},"Display Options",-1)),o("div",wn,[o("label",kn,[i[7]||(i[7]=o("span",{class:"text-sm font-medium text-gray-700 dark:text-gray-300"},"Expand all JSON",-1)),o("button",{onClick:i[1]||(i[1]=Ft((...g)=>h(e).toggleExpandAll&&h(e).toggleExpandAll(...g),["stop"])),class:T(["relative inline-flex h-6 w-11 items-center rounded-full transition-colors",h(e).expandAll?"bg-mcp-blue":"bg-gray-300 dark:bg-gray-600"])},[o("span",{class:T(["inline-block h-4 w-4 transform rounded-full bg-white transition-transform",h(e).expandAll?"translate-x-6":"translate-x-1"])},null,2)],2)])])])]),o("div",_n,[l.value>0?(v(),w("button",{key:0,onClick:k,class:"w-full px-4 py-2 text-sm font-medium text-gray-700 dark:text-gray-300 bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 rounded-lg transition-all duration-200"}," Clear All Filters ")):$("",!0),o("button",{onClick:i[2]||(i[2]=g=>h(e).fetchLogs()),class:"w-full px-4 py-2 text-sm font-medium text-gray-700 dark:text-gray-300 bg-gray-100 dark:bg-gray-700 hover:bg-gray-200 dark:hover:bg-gray-600 rounded-lg transition-all duration-200 flex items-center justify-center gap-2"},[O(h(Cs),{class:T(["h-4 w-4",{"animate-spin":h(e).loading}])},null,8,["class"]),i[9]||(i[9]=Y(" Refresh ",-1))])])]))}},En={class:"flex items-center gap-3"},Tn={class:"flex-1 relative"},Rn={class:"relative"},Cn={class:"flex items-center gap-2"},On=["title"],Ln={__name:"LogSearchBar",setup(t){const e=K(),r=A("");let s=null;Te(r,u=>{clearTimeout(s),s=setTimeout(()=>{e.setSearchQuery(u)},300)});function n(){const u=r.value.toLowerCase(),m=u.match(/type:(\w+)/),f=u.match(/transport:(\w+)/),d=u.match(/server:(\w+)/);m&&(e.setFilter(m[1]),r.value=u.replace(m[0],"").trim()),f&&(e.setTransportFilter(f[1]),r.value=u.replace(f[0],"").trim()),d&&(e.setServerFilter(d[1]),r.value=u.replace(d[0],"").trim())}function a(){r.value="",e.setSearchQuery("")}function l(){confirm("Are you sure you want to clear all logs from the display? This will not delete logs from the database.")&&e.clearLogs()}return(u,m)=>(v(),w("div",En,[o("div",Tn,[o("div",Rn,[Pt(o("input",{"onUpdate:modelValue":m[0]||(m[0]=f=>r.value=f),type:"text",placeholder:"Search messages, methods, or use filters like type:request",class:"w-full pl-10 pr-10 py-2.5 rounded-xl border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 placeholder-gray-500 dark:placeholder-gray-400 focus:ring-2 focus:ring-mcp-blue focus:border-transparent transition-all duration-200",onKeydown:Ut(n,["enter"])},null,544),[[Dt,r.value]]),O(h(As),{class:"absolute left-3 top-3 h-5 w-5 text-gray-400"}),r.value?(v(),w("button",{key:0,onClick:a,class:"absolute right-3 top-3 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300"},[O(h(Ot),{class:"h-5 w-5"})])):$("",!0)])]),o("div",Cn,[o("button",{onClick:m[1]||(m[1]=(...f)=>h(e).toggleExpandAll&&h(e).toggleExpandAll(...f)),class:T(["p-2.5 rounded-xl transition-all duration-200",[h(e).expandAll?"bg-mcp-blue text-white":"bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-700"]]),title:h(e).expandAll?"Collapse all":"Expand all"},[O(h(Ls),{class:"h-5 w-5"})],10,On),o("button",{onClick:l,class:"p-2.5 rounded-xl bg-gray-100 dark:bg-gray-800 text-gray-700 dark:text-gray-300 hover:bg-red-100 dark:hover:bg-red-900/20 hover:text-red-600 dark:hover:text-red-400 transition-all duration-200",title:"Clear display"},[O(h(Fs),{class:"h-5 w-5"})])])]))}};function Lt(t){return{streamable_http:"Streamable HTTP",http_sse:"HTTP+SSE",stdio:"stdio",unknown:"Unknown","TCP/Direct":"Unknown","N/A":"Unknown"}[t]||"Unknown"}function At(t){const e={streamable_http:"bg-blue-100 text-blue-800 dark:bg-blue-900 dark:text-blue-200",http_sse:"bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200",stdio:"bg-purple-100 text-purple-800 dark:bg-purple-900 dark:text-purple-200",unknown:"bg-gray-100 text-gray-800 dark:bg-gray-900 dark:text-gray-200"};return e[t]||e.unknown}const ye={__name:"MessageTypeBadge",props:{type:{type:String,required:!0}},setup(t){const e=t,r=E(()=>{switch(e.type){case"request":return"message-request";case"response":return"message-response";case"notification":return"message-notification";case"error":return"message-error";default:return"bg-gray-100 text-gray-800"}}),s=E(()=>{switch(e.type){case"request":return"REQ";case"response":return"RES";case"notification":return"NOTIF";case"error":return"ERR";default:return"UNK"}});return(n,a)=>(v(),w("span",{class:T(["message-badge",r.value])},x(s.value),3))}},An={class:"text-sm font-medium text-gray-700 dark:text-gray-300"},$n={class:"flex items-center gap-3"},Nn={class:"text-gray-600 dark:text-gray-400"},Fn={class:"text-xs text-gray-500 dark:text-gray-500 font-mono"},Pn={class:"text-xs font-mono text-gray-800 dark:text-gray-200 whitespace-pre overflow-x-auto"},$t={__name:"PairedMessages",props:{currentLog:{type:Object,required:!0},allLogs:{type:Array,required:!0},variant:{type:String,default:"compact"}},setup(t){const e=t,r=E(()=>{if(!e.allLogs.length)return[];try{const d=JSON.parse(e.currentLog.message);return d.id?e.allLogs.filter(y=>{if(y===e.currentLog||!(y.src_ip===e.currentLog.src_ip&&y.src_port===e.currentLog.src_port&&y.dst_ip===e.currentLog.dst_ip&&y.dst_port===e.currentLog.dst_port||y.src_ip===e.currentLog.dst_ip&&y.src_port===e.currentLog.dst_port&&y.dst_ip===e.currentLog.src_ip&&y.dst_port===e.currentLog.src_port))return!1;try{return JSON.parse(y.message).id===d.id}catch{return!1}}):[]}catch{return[]}});function s(d){try{const y=JSON.parse(d);return JSON.stringify(y,null,2)}catch{return d}}const n=E(()=>e.variant==="full"?"border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden":"border-t border-gray-200 dark:border-gray-700 px-4 py-3"),a=E(()=>e.variant==="full"?"bg-gray-50 dark:bg-gray-700 px-4 py-2":"text-xs font-medium text-gray-600 dark:text-gray-400 mb-2"),l=E(()=>e.variant==="full"?"p-4 space-y-4 max-h-96 overflow-y-auto":""),u=E(()=>e.variant==="full"?"border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden":"mb-3 last:mb-0"),m=E(()=>e.variant==="full"?"bg-gray-100 dark:bg-gray-800 px-3 py-2 flex items-center justify-between text-sm":"flex items-center gap-2 text-xs text-gray-600 dark:text-gray-400 mb-1"),f=E(()=>e.variant==="full"?"p-3 bg-gray-50 dark:bg-gray-900":"bg-gray-100 dark:bg-gray-800 rounded p-2");return(d,y)=>r.value.length>0?(v(),w("div",{key:0,class:T(n.value)},[o("div",{class:T(a.value)},[o("span",An," Paired "+x(r.value.length===1?"Message":"Messages")+" (same connection & ID) ",1)],2),o("div",{class:T(l.value)},[(v(!0),w(G,null,Z(r.value,(k,p)=>(v(),w("div",{key:p,class:T(u.value)},[o("div",{class:T(m.value)},[o("div",$n,[O(ye,{type:h(te)(k.message)},null,8,["type"]),o("span",Nn,x(h(Ne)(k.timestamp)),1)]),o("span",Fn,x(k.src_ip)+":"+x(k.src_port)+" → "+x(k.dst_ip)+":"+x(k.dst_port),1)],2),o("div",{class:T(f.value)},[o("pre",Pn,x(s(k.message)),1)],2)],2))),128))],2)],2)):$("",!0)}},Dn={colspan:"10",class:"p-0"},Un={class:"w-full table-fixed"},Bn={class:"px-3 py-3 text-left w-20 text-sm text-gray-900 dark:text-gray-100"},jn={class:"px-3 py-3 text-left w-24 text-sm text-gray-900 dark:text-gray-100"},Mn={class:"px-3 py-3 text-left w-24"},qn={class:"px-3 py-3 text-left w-16 text-sm text-gray-900 dark:text-gray-100 font-mono"},In={class:"text-gray-600 dark:text-gray-400"},Hn={class:"px-3 py-3 text-left text-sm text-gray-900 dark:text-gray-100 font-mono truncate"},Jn={class:"px-3 py-3 text-left w-32 text-sm text-gray-500 dark:text-gray-400"},zn=["title"],Vn={key:1,class:"text-gray-400 dark:text-gray-600"},Wn={class:"px-3 py-3 text-left w-28 text-sm text-gray-500 dark:text-gray-400 font-mono"},Kn={class:"px-3 py-3 text-left w-40 text-sm text-gray-500 dark:text-gray-400"},Qn={class:"flex items-center"},Xn={class:"mx-2"},Gn={class:"px-3 py-3 text-left w-20 text-sm text-gray-500 dark:text-gray-400 font-mono"},Zn={class:"px-3 py-3 text-left w-16 text-sm text-gray-500 dark:text-gray-400 font-mono"},Yn={key:0,class:"bg-gray-50 dark:bg-gray-900 border-t border-gray-200 dark:border-gray-700"},eo={class:"px-4 py-3 border-b border-gray-200 dark:border-gray-700"},to={class:"grid grid-cols-2 md:grid-cols-4 gap-4 text-sm"},ro={class:"ml-2 font-mono text-gray-900 dark:text-gray-100"},so={class:"ml-2 font-mono text-gray-900 dark:text-gray-100"},no={class:"ml-2 font-mono text-gray-900 dark:text-gray-100"},oo={key:0,class:"ml-2 text-gray-900 dark:text-gray-100"},ao={class:"text-gray-500 dark:text-gray-400"},lo={key:1,class:"ml-2 text-gray-500 dark:text-gray-400"},io={key:0},co={class:"ml-2 text-gray-900 dark:text-gray-100"},uo={class:"text-gray-500 dark:text-gray-400"},fo={class:"ml-2 text-gray-900 dark:text-gray-100"},po={key:1},go={class:"ml-2 font-mono text-gray-900 dark:text-gray-100"},mo={key:2},yo={class:"ml-2 font-mono text-gray-900 dark:text-gray-100"},ho={key:3},xo={class:"ml-2 font-mono text-gray-900 dark:text-gray-100 text-xs"},bo={class:"px-4 py-3"},vo={class:"text-xs font-mono text-gray-800 dark:text-gray-200 overflow-x-auto bg-gray-100 dark:bg-gray-800 p-3 rounded"},wo={__name:"LogRow",props:{log:{type:Object,required:!0},allLogs:{type:Array,default:()=>[]},isSelected:{type:Boolean,default:!1},isExpanded:{type:Boolean,default:!1}},emits:["click"],setup(t){const e=t,r=E(()=>te(e.log.message)),s=E(()=>ws(e.log.message)),n=E(()=>ks(e.log)),a=E(()=>{try{const p=JSON.parse(e.log.message);if(p&&p.id!==void 0)return p.id}catch{}return"-"}),l=E(()=>Rt(e.log.direction)),u=E(()=>{try{const p=JSON.parse(e.log.message);return JSON.stringify(p,null,2)}catch{return e.log.message}}),m=E(()=>Lt(e.log.transport_type||e.log.traffic_type||"unknown")),f=E(()=>At(e.log.transport_type||e.log.traffic_type||"unknown")),d=E(()=>e.log.transport_type==="stdio"&&e.log.pid?e.log.pid.toString():"-"),y=E(()=>{if(!e.log.metadata)return null;try{const p=JSON.parse(e.log.metadata);if(p.server_name)return{name:p.server_name,version:p.server_version||""}}catch{}return null}),k=E(()=>{if(!e.log.metadata)return null;try{const p=JSON.parse(e.log.metadata);if(p.client_name)return{name:p.client_name,version:p.client_version||""}}catch{}return null});return(p,i)=>(v(),w("tr",null,[o("td",Dn,[o("div",{class:T(["cursor-pointer transition-all relative",{"bg-blue-100 dark:bg-blue-900/30 ring-2 ring-blue-500":t.isSelected,"hover:bg-gray-50 dark:hover:bg-gray-700/50":!t.isSelected}]),onClick:i[0]||(i[0]=g=>p.$emit("click"))},[o("table",Un,[o("tr",null,[o("td",Bn,x(h(Ye)(t.log.timestamp)),1),o("td",jn,x(h(Ne)(t.log.timestamp)),1),o("td",Mn,[O(ye,{type:r.value},null,8,["type"])]),o("td",qn,[o("span",In,x(a.value),1)]),o("td",Hn,x(s.value),1),o("td",Jn,[y.value?(v(),w("span",{key:0,class:"inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-indigo-100 text-indigo-800 dark:bg-indigo-900 dark:text-indigo-200",title:`${y.value.name} v${y.value.version}`},x(y.value.name),9,zn)):(v(),w("span",Vn,"-"))]),o("td",Wn,[o("span",{class:T(["inline-flex items-center px-2 py-0.5 rounded text-xs font-medium",f.value])},x(m.value),3)]),o("td",Kn,[o("div",Qn,[o("span",null,x(t.log.src_ip),1),o("span",Xn,x(l.value),1),o("span",null,x(t.log.dst_ip),1)])]),o("td",Gn,x(n.value),1),o("td",Zn,x(d.value),1)])])],2),t.isExpanded?(v(),w("div",Yn,[o("div",eo,[o("div",to,[o("div",null,[i[1]||(i[1]=o("span",{class:"text-gray-500 dark:text-gray-400"},"Date:",-1)),o("span",ro,x(h(Ye)(t.log.timestamp)),1)]),o("div",null,[i[2]||(i[2]=o("span",{class:"text-gray-500 dark:text-gray-400"},"Time:",-1)),o("span",so,x(h(Ne)(t.log.timestamp)),1)]),o("div",null,[i[3]||(i[3]=o("span",{class:"text-gray-500 dark:text-gray-400"},"Type:",-1)),O(ye,{type:r.value,class:"ml-2"},null,8,["type"])]),o("div",null,[i[4]||(i[4]=o("span",{class:"text-gray-500 dark:text-gray-400"},"Message ID:",-1)),o("span",no,x(a.value),1)]),o("div",null,[i[5]||(i[5]=o("span",{class:"text-gray-500 dark:text-gray-400"},"Server:",-1)),y.value?(v(),w("span",oo,[Y(x(y.value.name)+" ",1),o("span",ao,"v"+x(y.value.version),1)])):(v(),w("span",lo,"-"))]),k.value?(v(),w("div",io,[i[6]||(i[6]=o("span",{class:"text-gray-500 dark:text-gray-400"},"Client:",-1)),o("span",co,[Y(x(k.value.name)+" ",1),o("span",uo,"v"+x(k.value.version),1)])])):$("",!0),o("div",null,[i[7]||(i[7]=o("span",{class:"text-gray-500 dark:text-gray-400"},"Transport:",-1)),o("span",{class:T(["ml-2 inline-flex items-center px-2 py-0.5 rounded text-xs font-medium",f.value])},x(m.value),3)]),o("div",null,[i[8]||(i[8]=o("span",{class:"text-gray-500 dark:text-gray-400"},"Direction:",-1)),o("span",fo,x(t.log.src_ip)+" "+x(l.value)+" "+x(t.log.dst_ip),1)]),t.log.src_port||t.log.dst_port?(v(),w("div",po,[i[9]||(i[9]=o("span",{class:"text-gray-500 dark:text-gray-400"},"Ports:",-1)),o("span",go,x(n.value),1)])):$("",!0),t.log.pid?(v(),w("div",mo,[i[10]||(i[10]=o("span",{class:"text-gray-500 dark:text-gray-400"},"PID:",-1)),o("span",yo,x(t.log.pid),1)])):$("",!0),t.log.log_id?(v(),w("div",ho,[i[11]||(i[11]=o("span",{class:"text-gray-500 dark:text-gray-400"},"Log ID:",-1)),o("span",xo,x(t.log.log_id),1)])):$("",!0)])]),o("div",bo,[i[12]||(i[12]=o("div",{class:"text-xs font-medium text-gray-500 dark:text-gray-400 mb-2"},"JSON-RPC Message:",-1)),o("pre",vo,x(u.value),1)]),O($t,{"current-log":t.log,"all-logs":t.allLogs,variant:"compact"},null,8,["current-log","all-logs"])])):$("",!0)])]))}},ko={class:"relative"},_o={key:0,class:"absolute inset-0 bg-white/50 dark:bg-gray-800/50 flex items-center justify-center z-10"},So={class:"overflow-hidden"},Eo={class:"min-w-full divide-y divide-gray-200 dark:divide-gray-700 table-fixed"},To={class:"bg-white dark:bg-gray-800 divide-y divide-gray-200 dark:divide-gray-700"},Ro={key:0},Co={__name:"LogTable",setup(t){const e=K(),r=E(()=>e.filteredLogs);function s(n){e.selectLog(n.log_id)}return(n,a)=>(v(),w("div",ko,[h(e).loading?(v(),w("div",_o,a[0]||(a[0]=[o("div",{class:"animate-spin rounded-full h-8 w-8 border-b-2 border-mcp-blue"},null,-1)]))):$("",!0),o("div",So,[o("table",Eo,[a[2]||(a[2]=o("thead",{class:"bg-gray-50 dark:bg-gray-700/50"},[o("tr",null,[o("th",{class:"px-3 py-4 text-left text-xs font-semibold text-gray-600 dark:text-gray-400 uppercase tracking-wider w-20"}," Date "),o("th",{class:"px-3 py-4 text-left text-xs font-semibold text-gray-600 dark:text-gray-400 uppercase tracking-wider w-24"}," Time "),o("th",{class:"px-3 py-4 text-left text-xs font-semibold text-gray-600 dark:text-gray-400 uppercase tracking-wider w-24"}," Type "),o("th",{class:"px-3 py-4 text-left text-xs font-semibold text-gray-600 dark:text-gray-400 uppercase tracking-wider w-16"}," ID "),o("th",{class:"px-3 py-4 text-left text-xs font-semibold text-gray-600 dark:text-gray-400 uppercase tracking-wider"}," Message "),o("th",{class:"px-3 py-4 text-left text-xs font-semibold text-gray-600 dark:text-gray-400 uppercase tracking-wider w-32"}," Server "),o("th",{class:"px-3 py-4 text-left text-xs font-semibold text-gray-600 dark:text-gray-400 uppercase tracking-wider w-28"}," Transport "),o("th",{class:"px-3 py-4 text-left text-xs font-semibold text-gray-600 dark:text-gray-400 uppercase tracking-wider w-40"}," Source → Dest "),o("th",{class:"px-3 py-4 text-left text-xs font-semibold text-gray-600 dark:text-gray-400 uppercase tracking-wider w-20"}," Port "),o("th",{class:"px-3 py-4 text-left text-xs font-semibold text-gray-600 dark:text-gray-400 uppercase tracking-wider w-16"}," PID ")])],-1)),o("tbody",To,[(v(!0),w(G,null,Z(r.value,l=>(v(),oe(wo,{key:l.log_id,log:l,"all-logs":h(e).logs,"is-selected":h(e).selectedLogId===l.log_id,"is-expanded":h(e).expandAll,onClick:u=>s(l)},null,8,["log","all-logs","is-selected","is-expanded","onClick"]))),128)),!h(e).loading&&r.value.length===0?(v(),w("tr",Ro,a[1]||(a[1]=[o("td",{colspan:"10",class:"px-4 py-8 text-center text-gray-500 dark:text-gray-400"},[o("div",{class:"flex flex-col items-center"},[o("svg",{class:"w-12 h-12 mb-4 text-gray-300 dark:text-gray-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[o("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})]),o("p",{class:"text-lg font-medium"},"No logs captured yet"),o("p",{class:"text-sm mt-1"},"MCP traffic will appear here when detected")])],-1)]))):$("",!0)])])])]))}},Oo={class:"fixed inset-0 overflow-y-auto"},Lo={class:"flex min-h-full items-center justify-center p-4 text-center"},Ao={key:0,class:"space-y-4"},$o={class:"grid grid-cols-2 md:grid-cols-3 gap-4 text-sm"},No={class:"ml-2 font-mono text-gray-900 dark:text-gray-100 text-xs"},Fo={class:"ml-2 font-mono text-gray-900 dark:text-gray-100"},Po={class:"ml-2 font-mono text-gray-900 dark:text-gray-100"},Do={class:"ml-2 text-gray-900 dark:text-gray-100"},Uo={class:"ml-2 text-gray-900 dark:text-gray-100"},Bo={key:0},jo={class:"ml-2 text-gray-900 dark:text-gray-100"},Mo={class:"ml-2 font-mono text-gray-900 dark:text-gray-100"},qo={class:"ml-2 font-mono text-gray-900 dark:text-gray-100"},Io={class:"ml-2 font-mono text-gray-900 dark:text-gray-100"},Ho={class:"border border-gray-200 dark:border-gray-700 rounded-lg overflow-hidden"},Jo={class:"bg-gray-50 dark:bg-gray-700 px-4 py-2 flex justify-between items-center"},zo={class:"p-4 bg-gray-900 overflow-x-auto"},Vo={class:"text-sm text-gray-100 font-mono whitespace-pre"},Wo={key:0},Ko={class:"p-4 bg-gray-900 overflow-x-auto"},Qo={class:"text-sm text-gray-400 font-mono whitespace-pre"},Xo={class:"flex justify-end gap-2 mt-6"},Go={__name:"MessageDetailModal",setup(t){const e=K(),r=A(!1),s=E(()=>e.selectedLog?te(e.selectedLog.message):"unknown"),n=E(()=>{if(!e.selectedLog)return"";const p=ee(e.selectedLog.message);return JSON.stringify(p,null,2)}),a=E(()=>{if(!e.selectedLog)return"-";try{const p=JSON.parse(e.selectedLog.message);if(p&&p.id!==void 0)return p.id}catch{}return"-"}),l=E(()=>{var p;if(!((p=e.selectedLog)!=null&&p.metadata))return null;try{const i=JSON.parse(e.selectedLog.metadata);if(i.server_name)return{name:i.server_name,version:i.server_version||""}}catch{}return null}),u=E(()=>{var p;if(!((p=e.selectedLog)!=null&&p.metadata))return null;try{const i=JSON.parse(e.selectedLog.metadata);if(i.client_name)return{name:i.client_name,version:i.client_version||""}}catch{}return null}),m=E(()=>{var p;if(!((p=e.selectedLog)!=null&&p.metadata))return"";try{const i=JSON.parse(e.selectedLog.metadata);return JSON.stringify(i,null,2)}catch{return e.selectedLog.metadata}}),f=E(()=>e.selectedLog?Lt(e.selectedLog.transport_type||e.selectedLog.traffic_type||"unknown"):"Unknown"),d=E(()=>e.selectedLog?At(e.selectedLog.transport_type||e.selectedLog.traffic_type||"unknown"):"");async function y(){try{await navigator.clipboard.writeText(n.value),r.value=!0,setTimeout(()=>{r.value=!1},2e3)}catch(p){console.error("Failed to copy:",p)}}function k(){const p=e.selectedLog,i=`mcp-log-${p.timestamp.replace(/[:.]/g,"-")}.json`,g={...p,parsed_message:ee(p.message)},b=new Blob([JSON.stringify(g,null,2)],{type:"application/json"}),R=URL.createObjectURL(b),C=document.createElement("a");C.href=R,C.download=i,C.click(),URL.revokeObjectURL(R)}return(p,i)=>(v(),oe(h(Ht),{show:!!h(e).selectedLog,as:"template"},{default:X(()=>[O(h(Mt),{as:"div",class:"relative z-50",onClose:i[1]||(i[1]=g=>h(e).selectLog(null))},{default:X(()=>[O(h(je),{as:"template",enter:"duration-300 ease-out","enter-from":"opacity-0","enter-to":"opacity-100",leave:"duration-200 ease-in","leave-from":"opacity-100","leave-to":"opacity-0"},{default:X(()=>i[2]||(i[2]=[o("div",{class:"fixed inset-0 bg-black bg-opacity-25"},null,-1)])),_:1,__:[2]}),o("div",Oo,[o("div",Lo,[O(h(je),{as:"template",enter:"duration-300 ease-out","enter-from":"opacity-0 scale-95","enter-to":"opacity-100 scale-100",leave:"duration-200 ease-in","leave-from":"opacity-100 scale-100","leave-to":"opacity-0 scale-95"},{default:X(()=>[O(h(qt),{class:"w-full max-w-4xl transform overflow-hidden rounded-2xl bg-white dark:bg-gray-800 p-6 text-left align-middle shadow-xl transition-all"},{default:X(()=>[O(h(It),{as:"h3",class:"text-lg font-medium leading-6 text-gray-900 dark:text-gray-100 mb-4"},{default:X(()=>i[3]||(i[3]=[Y(" Message Details ",-1)])),_:1,__:[3]}),h(e).selectedLog?(v(),w("div",Ao,[o("div",$o,[o("div",null,[i[4]||(i[4]=o("span",{class:"text-gray-500 dark:text-gray-400"},"Log ID:",-1)),o("span",No,x(h(e).selectedLog.log_id),1)]),o("div",null,[i[5]||(i[5]=o("span",{class:"text-gray-500 dark:text-gray-400"},"Time:",-1)),o("span",Fo,x(new Date(h(e).selectedLog.timestamp).toLocaleString()),1)]),o("div",null,[i[6]||(i[6]=o("span",{class:"text-gray-500 dark:text-gray-400"},"Type:",-1)),O(ye,{type:s.value,class:"ml-2"},null,8,["type"])]),o("div",null,[i[7]||(i[7]=o("span",{class:"text-gray-500 dark:text-gray-400"},"Message ID:",-1)),o("span",Po,x(a.value),1)]),o("div",null,[i[8]||(i[8]=o("span",{class:"text-gray-500 dark:text-gray-400"},"Direction:",-1)),o("span",Do,x(h(e).selectedLog.direction)+" "+x(h(Rt)(h(e).selectedLog.direction)),1)]),o("div",null,[i[9]||(i[9]=o("span",{class:"text-gray-500 dark:text-gray-400"},"Transport:",-1)),o("span",{class:T(["ml-2 inline-flex items-center px-2 py-0.5 rounded text-xs font-medium",d.value])},x(f.value),3)]),o("div",null,[i[10]||(i[10]=o("span",{class:"text-gray-500 dark:text-gray-400"},"Server:",-1)),o("span",Uo,x(l.value?`${l.value.name} v${l.value.version}`:"-"),1)]),u.value?(v(),w("div",Bo,[i[11]||(i[11]=o("span",{class:"text-gray-500 dark:text-gray-400"},"Client:",-1)),o("span",jo,x(u.value.name)+" v"+x(u.value.version),1)])):$("",!0),o("div",null,[i[12]||(i[12]=o("span",{class:"text-gray-500 dark:text-gray-400"},"PID:",-1)),o("span",Mo,x(h(e).selectedLog.pid||"-"),1)]),o("div",null,[i[13]||(i[13]=o("span",{class:"text-gray-500 dark:text-gray-400"},"Source:",-1)),o("span",qo,x(h(e).selectedLog.src_ip)+x(h(e).selectedLog.src_port?":"+h(e).selectedLog.src_port:""),1)]),o("div",null,[i[14]||(i[14]=o("span",{class:"text-gray-500 dark:text-gray-400"},"Destination:",-1)),o("span",Io,x(h(e).selectedLog.dst_ip)+x(h(e).selectedLog.dst_port?":"+h(e).selectedLog.dst_port:""),1)])]),o("div",Ho,[o("div",Jo,[i[15]||(i[15]=o("span",{class:"text-sm font-medium text-gray-700 dark:text-gray-300"},"JSON-RPC Message",-1)),o("button",{onClick:y,class:"text-sm text-mcp-blue hover:text-blue-600 flex items-center gap-1"},[O(h(Os),{class:"h-4 w-4"}),Y(" "+x(r.value?"Copied!":"Copy"),1)])]),o("div",zo,[o("pre",Vo,x(n.value),1)])]),h(e).selectedLog.metadata&&h(e).selectedLog.metadata!=="{}"?(v(),w("div",Wo,[i[16]||(i[16]=o("div",{class:"bg-gray-50 dark:bg-gray-700 px-4 py-2"},[o("span",{class:"text-sm font-medium text-gray-700 dark:text-gray-300"},"Metadata")],-1)),o("div",Ko,[o("pre",Qo,x(m.value),1)])])):$("",!0),h(e).selectedLog?(v(),oe($t,{key:1,"current-log":h(e).selectedLog,"all-logs":h(e).logs,variant:"full",class:"mt-4"},null,8,["current-log","all-logs"])):$("",!0),o("div",Xo,[o("button",{onClick:k,class:"btn-secondary"}," Export "),o("button",{onClick:i[0]||(i[0]=g=>h(e).selectLog(null)),class:"btn-primary"}," Close ")])])):$("",!0)]),_:1})]),_:1})])])]),_:1})]),_:1},8,["show"]))}},Zo={class:"min-h-screen bg-gray-50 dark:bg-gray-900 flex flex-col"},Yo={class:"bg-white dark:bg-gray-800 shadow-sm border-b border-gray-200 dark:border-gray-700 z-10"},ea={class:"px-4 sm:px-6 lg:px-8"},ta={class:"flex items-center justify-between h-16"},ra={class:"flex items-center space-x-4"},sa=["title"],na={class:"text-sm font-medium hidden sm:inline"},oa={class:"flex items-center space-x-4"},aa={class:"flex-1 flex overflow-hidden"},la={class:"flex-1 overflow-auto"},ia={class:"px-4 sm:px-6 lg:px-8 py-6"},ca={class:"mb-6"},ua={class:"bg-white dark:bg-gray-800 shadow-xl rounded-xl overflow-hidden"},da={__name:"App",setup(t){const e=K(),r=Ct(),s=A(!0),n=A(window.innerWidth),a=()=>{n.value=window.innerWidth},l=()=>{s.value=!s.value};return Fe(()=>{e.fetchLogs(),r.connect(),window.addEventListener("resize",a),a()}),tt(()=>{r.disconnect(),window.removeEventListener("resize",a)}),(u,m)=>(v(),w("div",Zo,[o("header",Yo,[o("div",ea,[o("div",ta,[o("div",ra,[m[1]||(m[1]=o("img",{src:Jt,alt:"MCPHawk Logo",class:"h-[62px]"},null,-1)),m[2]||(m[2]=o("div",{class:"h-8 w-px bg-gray-300 dark:bg-gray-600"},null,-1)),o("button",{onClick:l,class:"flex items-center gap-2 px-3 py-1.5 rounded-lg text-gray-600 dark:text-gray-300 hover:text-gray-900 dark:hover:text-gray-100 hover:bg-gray-100 dark:hover:bg-gray-700 transition-all duration-200",title:s.value?"Hide filters":"Show filters"},[O(h(Ps),{class:"h-5 w-5"}),o("span",na,x(s.value?"Hide":"Show")+" Filters ",1)],8,sa),O(Rs)]),o("div",oa,[O(Qs),O(Us)])])])]),o("div",aa,[o("aside",{class:T(["w-64 flex-shrink-0 overflow-hidden transition-all duration-300",n.value<1024?"fixed inset-y-0 left-0 z-40":"relative",s.value?"translate-x-0":"-translate-x-full lg:hidden"])},[o("div",{class:T(["h-full lg:h-full",{"mt-16":!0,"lg:mt-0":!0}])},[O(Sn)])],2),s.value&&n.value<1024?(v(),w("div",{key:0,onClick:m[0]||(m[0]=f=>s.value=!1),class:"fixed inset-0 bg-black/50 z-30 mt-16"})):$("",!0),o("main",la,[o("div",ia,[o("div",ca,[O(Ln)]),o("div",ua,[O(Co)])])])]),O(Go)]))}},Nt=Bt(da),fa=jt();Nt.use(fa);Nt.mount("#app"); diff --git a/mcphawk/web/static/assets/index-Do4cWYV7.css b/mcphawk/web/static/assets/index-Do4cWYV7.css new file mode 100644 index 0000000..b5de82c --- /dev/null +++ b/mcphawk/web/static/assets/index-Do4cWYV7.css @@ -0,0 +1 @@ +*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}body{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}body:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity, 1))}.btn-primary{border-radius:.5rem;--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1));padding:.5rem 1rem;--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.btn-primary:hover{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.btn-secondary{border-radius:.5rem;--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1));padding:.5rem 1rem;--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity, 1));transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.btn-secondary:hover{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity, 1))}.message-badge{display:inline-flex;align-items:center;border-radius:9999px;padding:.125rem .625rem;font-size:.75rem;line-height:1rem;font-weight:500}.message-request{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.message-response{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity, 1))}.message-notification{--tw-bg-opacity: 1;background-color:rgb(254 249 195 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(133 77 14 / var(--tw-text-opacity, 1))}.message-error{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1));--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity, 1))}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.left-0{left:0}.left-3{left:.75rem}.right-0{right:0}.right-3{right:.75rem}.top-2\.5{top:.625rem}.top-3{top:.75rem}.z-10{z-index:10}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.mx-2{margin-left:.5rem;margin-right:.5rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-0\.5{margin-left:.125rem}.ml-1{margin-left:.25rem}.ml-2{margin-left:.5rem}.ml-4{margin-left:1rem}.mr-2{margin-right:.5rem}.mr-3{margin-right:.75rem}.mt-0{margin-top:0}.mt-1{margin-top:.25rem}.mt-16{margin-top:4rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-12{height:3rem}.h-16{height:4rem}.h-2{height:.5rem}.h-3\.5{height:.875rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-\[62px\]{height:62px}.h-full{height:100%}.max-h-96{max-height:24rem}.min-h-full{min-height:100%}.min-h-screen{min-height:100vh}.w-11{width:2.75rem}.w-12{width:3rem}.w-16{width:4rem}.w-2{width:.5rem}.w-20{width:5rem}.w-24{width:6rem}.w-28{width:7rem}.w-3\.5{width:.875rem}.w-32{width:8rem}.w-4{width:1rem}.w-40{width:10rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-6{width:1.5rem}.w-64{width:16rem}.w-8{width:2rem}.w-80{width:20rem}.w-full{width:100%}.w-px{width:1px}.min-w-full{min-width:100%}.max-w-4xl{max-width:56rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}.table-fixed{table-layout:fixed}.origin-top-right{transform-origin:top right}.-translate-x-full{--tw-translate-x: -100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-2{--tw-translate-y: -.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-1{--tw-translate-x: .25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-6{--tw-translate-x: 1.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-90{--tw-scale-x: .9;--tw-scale-y: .9;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-95{--tw-scale-x: .95;--tw-scale-y: .95;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes pulse{50%{opacity:.5}}.animate-pulse-slow{animation:pulse 3s cubic-bezier(.4,0,.6,1) infinite}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.resize{resize:both}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-gray-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(229 231 235 / var(--tw-divide-opacity, 1))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-pre{white-space:pre}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:1rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-xl{border-radius:.75rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-b-2{border-bottom-width:2px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-gray-200{--tw-border-opacity: 1;border-color:rgb(229 231 235 / var(--tw-border-opacity, 1))}.border-gray-300{--tw-border-opacity: 1;border-color:rgb(209 213 219 / var(--tw-border-opacity, 1))}.border-gray-400{--tw-border-opacity: 1;border-color:rgb(156 163 175 / var(--tw-border-opacity, 1))}.border-mcp-blue{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.border-mcp-blue\/20{border-color:#3b82f633}.border-mcp-blue\/30{border-color:#3b82f64d}.border-transparent{border-color:transparent}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity, 1))}.bg-black\/50{background-color:#00000080}.bg-blue-100{--tw-bg-opacity: 1;background-color:rgb(219 234 254 / var(--tw-bg-opacity, 1))}.bg-blue-500{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-gray-100{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.bg-gray-200{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.bg-gray-300{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity, 1))}.bg-gray-400{--tw-bg-opacity: 1;background-color:rgb(156 163 175 / var(--tw-bg-opacity, 1))}.bg-gray-50{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.bg-gray-700\/50{background-color:#37415180}.bg-gray-900{--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1))}.bg-green-100{--tw-bg-opacity: 1;background-color:rgb(220 252 231 / var(--tw-bg-opacity, 1))}.bg-green-500{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-indigo-100{--tw-bg-opacity: 1;background-color:rgb(224 231 255 / var(--tw-bg-opacity, 1))}.bg-mcp-blue{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-mcp-blue\/10{background-color:#3b82f61a}.bg-purple-100{--tw-bg-opacity: 1;background-color:rgb(243 232 255 / var(--tw-bg-opacity, 1))}.bg-red-100{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.bg-red-500{--tw-bg-opacity: 1;background-color:rgb(239 68 68 / var(--tw-bg-opacity, 1))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-white\/20{background-color:#fff3}.bg-white\/50{background-color:#ffffff80}.bg-yellow-500{--tw-bg-opacity: 1;background-color:rgb(234 179 8 / var(--tw-bg-opacity, 1))}.bg-opacity-25{--tw-bg-opacity: .25}.p-0{padding:0}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pl-10{padding-left:2.5rem}.pr-10{padding-right:2.5rem}.pr-4{padding-right:1rem}.text-left{text-align:left}.text-center{text-align:center}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-6{line-height:1.5rem}.tracking-wider{letter-spacing:.05em}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.text-gray-100{--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity, 1))}.text-gray-300{--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.text-gray-400{--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.text-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.text-gray-700{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.text-gray-800{--tw-text-opacity: 1;color:rgb(31 41 55 / var(--tw-text-opacity, 1))}.text-gray-900{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity, 1))}.text-indigo-800{--tw-text-opacity: 1;color:rgb(55 48 163 / var(--tw-text-opacity, 1))}.text-mcp-blue{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-purple-800{--tw-text-opacity: 1;color:rgb(107 33 168 / var(--tw-text-opacity, 1))}.text-red-600{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.placeholder-gray-500::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(107 114 128 / var(--tw-placeholder-opacity, 1))}.placeholder-gray-500::placeholder{--tw-placeholder-opacity: 1;color:rgb(107 114 128 / var(--tw-placeholder-opacity, 1))}.opacity-0{opacity:0}.opacity-100{opacity:1}.opacity-70{opacity:.7}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.ring-1{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-black{--tw-ring-opacity: 1;--tw-ring-color: rgb(0 0 0 / var(--tw-ring-opacity, 1))}.ring-blue-500{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity, 1))}.ring-opacity-5{--tw-ring-opacity: .05}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-100{transition-duration:.1s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-75{transition-duration:75ms}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.last\:mb-0:last-child{margin-bottom:0}.hover\:bg-gray-100:hover{--tw-bg-opacity: 1;background-color:rgb(243 244 246 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-200:hover{--tw-bg-opacity: 1;background-color:rgb(229 231 235 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-300:hover{--tw-bg-opacity: 1;background-color:rgb(209 213 219 / var(--tw-bg-opacity, 1))}.hover\:bg-gray-50:hover{--tw-bg-opacity: 1;background-color:rgb(249 250 251 / var(--tw-bg-opacity, 1))}.hover\:bg-red-100:hover{--tw-bg-opacity: 1;background-color:rgb(254 226 226 / var(--tw-bg-opacity, 1))}.hover\:bg-red-200:hover{--tw-bg-opacity: 1;background-color:rgb(254 202 202 / var(--tw-bg-opacity, 1))}.hover\:text-blue-600:hover{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.hover\:text-gray-500:hover{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.hover\:text-gray-600:hover{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.hover\:text-gray-700:hover{--tw-text-opacity: 1;color:rgb(55 65 81 / var(--tw-text-opacity, 1))}.hover\:text-gray-900:hover{--tw-text-opacity: 1;color:rgb(17 24 39 / var(--tw-text-opacity, 1))}.hover\:text-red-600:hover{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.focus\:border-transparent:focus{border-color:transparent}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-mcp-blue:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity, 1))}.dark\:divide-gray-700:is(.dark *)>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(55 65 81 / var(--tw-divide-opacity, 1))}.dark\:border-gray-500:is(.dark *){--tw-border-opacity: 1;border-color:rgb(107 114 128 / var(--tw-border-opacity, 1))}.dark\:border-gray-600:is(.dark *){--tw-border-opacity: 1;border-color:rgb(75 85 99 / var(--tw-border-opacity, 1))}.dark\:border-gray-700:is(.dark *){--tw-border-opacity: 1;border-color:rgb(55 65 81 / var(--tw-border-opacity, 1))}.dark\:bg-blue-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(30 58 138 / var(--tw-bg-opacity, 1))}.dark\:bg-blue-900\/30:is(.dark *){background-color:#1e3a8a4d}.dark\:bg-gray-600:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity, 1))}.dark\:bg-gray-700:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}.dark\:bg-gray-700\/50:is(.dark *){background-color:#37415180}.dark\:bg-gray-800:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity, 1))}.dark\:bg-gray-800\/50:is(.dark *){background-color:#1f293780}.dark\:bg-gray-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(17 24 39 / var(--tw-bg-opacity, 1))}.dark\:bg-green-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(20 83 45 / var(--tw-bg-opacity, 1))}.dark\:bg-indigo-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(49 46 129 / var(--tw-bg-opacity, 1))}.dark\:bg-mcp-blue\/20:is(.dark *){background-color:#3b82f633}.dark\:bg-purple-900:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(88 28 135 / var(--tw-bg-opacity, 1))}.dark\:bg-red-900\/20:is(.dark *){background-color:#7f1d1d33}.dark\:text-blue-200:is(.dark *){--tw-text-opacity: 1;color:rgb(191 219 254 / var(--tw-text-opacity, 1))}.dark\:text-gray-100:is(.dark *){--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity, 1))}.dark\:text-gray-200:is(.dark *){--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}.dark\:text-gray-300:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.dark\:text-gray-400:is(.dark *){--tw-text-opacity: 1;color:rgb(156 163 175 / var(--tw-text-opacity, 1))}.dark\:text-gray-500:is(.dark *){--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity, 1))}.dark\:text-gray-600:is(.dark *){--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity, 1))}.dark\:text-green-200:is(.dark *){--tw-text-opacity: 1;color:rgb(187 247 208 / var(--tw-text-opacity, 1))}.dark\:text-indigo-200:is(.dark *){--tw-text-opacity: 1;color:rgb(199 210 254 / var(--tw-text-opacity, 1))}.dark\:text-purple-200:is(.dark *){--tw-text-opacity: 1;color:rgb(233 213 255 / var(--tw-text-opacity, 1))}.dark\:text-red-400:is(.dark *){--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.dark\:placeholder-gray-400:is(.dark *)::-moz-placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}.dark\:placeholder-gray-400:is(.dark *)::placeholder{--tw-placeholder-opacity: 1;color:rgb(156 163 175 / var(--tw-placeholder-opacity, 1))}.dark\:hover\:bg-gray-600:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(75 85 99 / var(--tw-bg-opacity, 1))}.dark\:hover\:bg-gray-700:hover:is(.dark *){--tw-bg-opacity: 1;background-color:rgb(55 65 81 / var(--tw-bg-opacity, 1))}.dark\:hover\:bg-gray-700\/50:hover:is(.dark *){background-color:#37415180}.dark\:hover\:bg-red-900\/20:hover:is(.dark *){background-color:#7f1d1d33}.dark\:hover\:bg-red-900\/30:hover:is(.dark *){background-color:#7f1d1d4d}.dark\:hover\:text-gray-100:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(243 244 246 / var(--tw-text-opacity, 1))}.dark\:hover\:text-gray-200:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity, 1))}.dark\:hover\:text-gray-300:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(209 213 219 / var(--tw-text-opacity, 1))}.dark\:hover\:text-red-400:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(248 113 113 / var(--tw-text-opacity, 1))}.dark\:hover\:text-white:hover:is(.dark *){--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}@media (min-width: 640px){.sm\:inline{display:inline}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:px-6{padding-left:1.5rem;padding-right:1.5rem}}@media (min-width: 768px){.md\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}@media (min-width: 1024px){.lg\:static{position:static}.lg\:relative{position:relative}.lg\:inset-auto{inset:auto}.lg\:ml-0{margin-left:0}.lg\:mt-0{margin-top:0}.lg\:hidden{display:none}.lg\:h-full{height:100%}.lg\:translate-x-0{--tw-translate-x: 0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.lg\:px-8{padding-left:2rem;padding-right:2rem}} diff --git a/mcphawk/web/static/assets/ui-CZuBMD6M.js b/mcphawk/web/static/assets/ui-CZuBMD6M.js new file mode 100644 index 0000000..f75480c --- /dev/null +++ b/mcphawk/web/static/assets/ui-CZuBMD6M.js @@ -0,0 +1,4 @@ +import{u as st,i as P,w as A,c as h,r as g,a as dt,h as S,F as qe,d as D,p as x,o as $,b as M,e as K,s as ct,g as ft,T as vt,f as pt,n as mt,j as ht}from"./vendor-CmqOmjtB.js";function De(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function ee(){let e=[],t={addEventListener(n,r,l,a){return n.addEventListener(r,l,a),t.add(()=>n.removeEventListener(r,l,a))},requestAnimationFrame(...n){let r=requestAnimationFrame(...n);t.add(()=>cancelAnimationFrame(r))},nextFrame(...n){t.requestAnimationFrame(()=>{t.requestAnimationFrame(...n)})},setTimeout(...n){let r=setTimeout(...n);t.add(()=>clearTimeout(r))},microTask(...n){let r={current:!0};return De(()=>{r.current&&n[0]()}),t.add(()=>{r.current=!1})},style(n,r,l){let a=n.style.getPropertyValue(r);return Object.assign(n.style,{[r]:l}),this.add(()=>{Object.assign(n.style,{[r]:a})})},group(n){let r=ee();return n(r),this.add(()=>r.dispose())},add(n){return e.push(n),()=>{let r=e.indexOf(n);if(r>=0)for(let l of e.splice(r,1))l()}},dispose(){for(let n of e.splice(0))n()}};return t}var He;let gt=Symbol("headlessui.useid"),yt=0;const pe=(He=st)!=null?He:function(){return P(gt,()=>`${++yt}`)()};function E(e){var t;if(e==null||e.value==null)return null;let n=(t=e.value.$el)!=null?t:e.value;return n instanceof Node?n:null}function R(e,t,...n){if(e in t){let l=t[e];return typeof l=="function"?l(...n):l}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(l=>`"${l}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,R),r}var wt=Object.defineProperty,bt=(e,t,n)=>t in e?wt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Be=(e,t,n)=>(bt(e,typeof t!="symbol"?t+"":t,n),n);let Et=class{constructor(){Be(this,"current",this.detect()),Be(this,"currentId",0)}set(t){this.current!==t&&(this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}},te=new Et;function z(e){if(te.isServer)return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty("value")){let t=E(e);if(t)return t.ownerDocument}return document}let Te=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var B=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(B||{}),_e=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(_e||{}),St=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(St||{});function Tt(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(Te)).sort((t,n)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(n.tabIndex||Number.MAX_SAFE_INTEGER)))}var Ge=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Ge||{});function Lt(e,t=0){var n;return e===((n=z(e))==null?void 0:n.body)?!1:R(t,{0(){return e.matches(Te)},1(){let r=e;for(;r!==null;){if(r.matches(Te))return!0;r=r.parentElement}return!1}})}var $t=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))($t||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function _(e){e==null||e.focus({preventScroll:!0})}let Ft=["textarea","input"].join(",");function Ot(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,Ft))!=null?n:!1}function Pt(e,t=n=>n){return e.slice().sort((n,r)=>{let l=t(n),a=t(r);if(l===null||a===null)return 0;let u=l.compareDocumentPosition(a);return u&Node.DOCUMENT_POSITION_FOLLOWING?-1:u&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function ce(e,t,{sorted:n=!0,relativeTo:r=null,skipElements:l=[]}={}){var a;let u=(a=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e==null?void 0:e.ownerDocument)!=null?a:document,o=Array.isArray(e)?n?Pt(e):e:Tt(e);l.length>0&&o.length>1&&(o=o.filter(f=>!l.includes(f))),r=r??u.activeElement;let i=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),s=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,o.indexOf(r))-1;if(t&4)return Math.max(0,o.indexOf(r))+1;if(t&8)return o.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),d=t&32?{preventScroll:!0}:{},m=0,c=o.length,v;do{if(m>=c||m+c<=0)return 0;let f=s+m;if(t&16)f=(f+c)%c;else{if(f<0)return 3;if(f>=c)return 1}v=o[f],v==null||v.focus(d),m+=i}while(v!==u.activeElement);return t&6&&Ot(v)&&v.select(),2}function Ye(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function At(){return/Android/gi.test(window.navigator.userAgent)}function Dt(){return Ye()||At()}function ie(e,t,n){te.isServer||A(r=>{document.addEventListener(e,t,n),r(()=>document.removeEventListener(e,t,n))})}function Ke(e,t,n){te.isServer||A(r=>{window.addEventListener(e,t,n),r(()=>window.removeEventListener(e,t,n))})}function Ct(e,t,n=h(()=>!0)){function r(a,u){if(!n.value||a.defaultPrevented)return;let o=u(a);if(o===null||!o.getRootNode().contains(o))return;let i=function s(d){return typeof d=="function"?s(d()):Array.isArray(d)||d instanceof Set?d:[d]}(e);for(let s of i){if(s===null)continue;let d=s instanceof HTMLElement?s:E(s);if(d!=null&&d.contains(o)||a.composed&&a.composedPath().includes(d))return}return!Lt(o,Ge.Loose)&&o.tabIndex!==-1&&a.preventDefault(),t(a,o)}let l=g(null);ie("pointerdown",a=>{var u,o;n.value&&(l.value=((o=(u=a.composedPath)==null?void 0:u.call(a))==null?void 0:o[0])||a.target)},!0),ie("mousedown",a=>{var u,o;n.value&&(l.value=((o=(u=a.composedPath)==null?void 0:u.call(a))==null?void 0:o[0])||a.target)},!0),ie("click",a=>{Dt()||l.value&&(r(a,()=>l.value),l.value=null)},!0),ie("touchend",a=>r(a,()=>a.target instanceof HTMLElement?a.target:null),!0),Ke("blur",a=>r(a,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}var fe=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(fe||{}),I=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(I||{});function k({visible:e=!0,features:t=0,ourProps:n,theirProps:r,...l}){var a;let u=Xe(r,n),o=Object.assign(l,{props:u});if(e||t&2&&u.static)return be(o);if(t&1){let i=(a=u.unmount)==null||a?0:1;return R(i,{0(){return null},1(){return be({...l,props:{...u,hidden:!0,style:{display:"none"}}})}})}return be(o)}function be({props:e,attrs:t,slots:n,slot:r,name:l}){var a,u;let{as:o,...i}=Qe(e,["unmount","static"]),s=(a=n.default)==null?void 0:a.call(n,r),d={};if(r){let m=!1,c=[];for(let[v,f]of Object.entries(r))typeof f=="boolean"&&(m=!0),f===!0&&c.push(v);m&&(d["data-headlessui-state"]=c.join(" "))}if(o==="template"){if(s=ze(s??[]),Object.keys(i).length>0||Object.keys(t).length>0){let[m,...c]=s??[];if(!Nt(m)||c.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${l} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(i).concat(Object.keys(t)).map(p=>p.trim()).filter((p,w,C)=>C.indexOf(p)===w).sort((p,w)=>p.localeCompare(w)).map(p=>` - ${p}`).join(` +`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".',"Render a single element as the child so that we can forward the props onto that element."].map(p=>` - ${p}`).join(` +`)].join(` +`));let v=Xe((u=m.props)!=null?u:{},i,d),f=dt(m,v,!0);for(let p in v)p.startsWith("on")&&(f.props||(f.props={}),f.props[p]=v[p]);return f}return Array.isArray(s)&&s.length===1?s[0]:s}return S(o,Object.assign({},i,d),{default:()=>s})}function ze(e){return e.flatMap(t=>t.type===qe?ze(t.children):[t])}function Xe(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let l in r)l.startsWith("on")&&typeof r[l]=="function"?(n[l]!=null||(n[l]=[]),n[l].push(r[l])):t[l]=r[l];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(let r in n)Object.assign(t,{[r](l,...a){let u=n[r];for(let o of u){if(l instanceof Event&&l.defaultPrevented)return;o(l,...a)}}});return t}function Qe(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function Nt(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}var ve=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(ve||{});let Le=D({name:"Hidden",props:{as:{type:[Object,String],default:"div"},features:{type:Number,default:1}},setup(e,{slots:t,attrs:n}){return()=>{var r;let{features:l,...a}=e,u={"aria-hidden":(l&2)===2?!0:(r=a["aria-hidden"])!=null?r:void 0,hidden:(l&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(l&4)===4&&(l&2)!==2&&{display:"none"}}};return k({ourProps:u,theirProps:a,slot:{},attrs:n,slots:t,name:"Hidden"})}}}),Ze=Symbol("Context");var L=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(L||{});function xt(){return Ce()!==null}function Ce(){return P(Ze,null)}function Mt(e){x(Ze,e)}var Je=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(Je||{});function Rt(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let V=[];Rt(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&V[0]!==t.target&&(V.unshift(t.target),V=V.filter(n=>n!=null&&n.isConnected),V.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function et(e,t,n,r){te.isServer||A(l=>{e=e??window,e.addEventListener(t,n,r),l(()=>e.removeEventListener(t,n,r))})}var J=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(J||{});function kt(){let e=g(0);return Ke("keydown",t=>{t.key==="Tab"&&(e.value=t.shiftKey?1:0)}),e}function tt(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let n of e.value){let r=E(n);r instanceof HTMLElement&&t.add(r)}return t}var nt=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(nt||{});let Q=Object.assign(D({name:"FocusTrap",props:{as:{type:[Object,String],default:"div"},initialFocus:{type:Object,default:null},features:{type:Number,default:30},containers:{type:[Object,Function],default:g(new Set)}},inheritAttrs:!1,setup(e,{attrs:t,slots:n,expose:r}){let l=g(null);r({el:l,$el:l});let a=h(()=>z(l)),u=g(!1);$(()=>u.value=!0),M(()=>u.value=!1),Ht({ownerDocument:a},h(()=>u.value&&!!(e.features&16)));let o=Bt({ownerDocument:a,container:l,initialFocus:h(()=>e.initialFocus)},h(()=>u.value&&!!(e.features&2)));It({ownerDocument:a,container:l,containers:e.containers,previousActiveElement:o},h(()=>u.value&&!!(e.features&8)));let i=kt();function s(v){let f=E(l);f&&(p=>p())(()=>{R(i.value,{[J.Forwards]:()=>{ce(f,B.First,{skipElements:[v.relatedTarget]})},[J.Backwards]:()=>{ce(f,B.Last,{skipElements:[v.relatedTarget]})}})})}let d=g(!1);function m(v){v.key==="Tab"&&(d.value=!0,requestAnimationFrame(()=>{d.value=!1}))}function c(v){if(!u.value)return;let f=tt(e.containers);E(l)instanceof HTMLElement&&f.add(E(l));let p=v.relatedTarget;p instanceof HTMLElement&&p.dataset.headlessuiFocusGuard!=="true"&&(rt(f,p)||(d.value?ce(E(l),R(i.value,{[J.Forwards]:()=>B.Next,[J.Backwards]:()=>B.Previous})|B.WrapAround,{relativeTo:v.target}):v.target instanceof HTMLElement&&_(v.target)))}return()=>{let v={},f={ref:l,onKeydown:m,onFocusout:c},{features:p,initialFocus:w,containers:C,...T}=e;return S(qe,[!!(p&4)&&S(Le,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:s,features:ve.Focusable}),k({ourProps:f,theirProps:{...t,...T},slot:v,attrs:t,slots:n,name:"FocusTrap"}),!!(p&4)&&S(Le,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:s,features:ve.Focusable})])}}}),{features:nt});function jt(e){let t=g(V.slice());return K([e],([n],[r])=>{r===!0&&n===!1?De(()=>{t.value.splice(0)}):r===!1&&n===!0&&(t.value=V.slice())},{flush:"post"}),()=>{var n;return(n=t.value.find(r=>r!=null&&r.isConnected))!=null?n:null}}function Ht({ownerDocument:e},t){let n=jt(t);$(()=>{A(()=>{var r,l;t.value||((r=e.value)==null?void 0:r.activeElement)===((l=e.value)==null?void 0:l.body)&&_(n())},{flush:"post"})}),M(()=>{t.value&&_(n())})}function Bt({ownerDocument:e,container:t,initialFocus:n},r){let l=g(null),a=g(!1);return $(()=>a.value=!0),M(()=>a.value=!1),$(()=>{K([t,n,r],(u,o)=>{if(u.every((s,d)=>(o==null?void 0:o[d])===s)||!r.value)return;let i=E(t);i&&De(()=>{var s,d;if(!a.value)return;let m=E(n),c=(s=e.value)==null?void 0:s.activeElement;if(m){if(m===c){l.value=c;return}}else if(i.contains(c)){l.value=c;return}m?_(m):ce(i,B.First|B.NoScroll)===_e.Error&&console.warn("There are no focusable elements inside the "),l.value=(d=e.value)==null?void 0:d.activeElement})},{immediate:!0,flush:"post"})}),l}function It({ownerDocument:e,container:t,containers:n,previousActiveElement:r},l){var a;et((a=e.value)==null?void 0:a.defaultView,"focus",u=>{if(!l.value)return;let o=tt(n);E(t)instanceof HTMLElement&&o.add(E(t));let i=r.value;if(!i)return;let s=u.target;s&&s instanceof HTMLElement?rt(o,s)?(r.value=s,_(s)):(u.preventDefault(),u.stopPropagation(),_(i)):_(r.value)},!0)}function rt(e,t){for(let n of e)if(n.contains(t))return!0;return!1}function Ut(e){let t=ct(e.getSnapshot());return M(e.subscribe(()=>{t.value=e.getSnapshot()})),t}function Wt(e,t){let n=e(),r=new Set;return{getSnapshot(){return n},subscribe(l){return r.add(l),()=>r.delete(l)},dispatch(l,...a){let u=t[l].call(n,...a);u&&(n=u,r.forEach(o=>o()))}}}function Vt(){let e;return{before({doc:t}){var n;let r=t.documentElement;e=((n=t.defaultView)!=null?n:window).innerWidth-r.clientWidth},after({doc:t,d:n}){let r=t.documentElement,l=r.clientWidth-r.offsetWidth,a=e-l;n.style(r,"paddingRight",`${a}px`)}}}function qt(){return Ye()?{before({doc:e,d:t,meta:n}){function r(l){return n.containers.flatMap(a=>a()).some(a=>a.contains(l))}t.microTask(()=>{var l;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let o=ee();o.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>o.dispose()))}let a=(l=window.scrollY)!=null?l:window.pageYOffset,u=null;t.addEventListener(e,"click",o=>{if(o.target instanceof HTMLElement)try{let i=o.target.closest("a");if(!i)return;let{hash:s}=new URL(i.href),d=e.querySelector(s);d&&!r(d)&&(u=d)}catch{}},!0),t.addEventListener(e,"touchstart",o=>{if(o.target instanceof HTMLElement)if(r(o.target)){let i=o.target;for(;i.parentElement&&r(i.parentElement);)i=i.parentElement;t.style(i,"overscrollBehavior","contain")}else t.style(o.target,"touchAction","none")}),t.addEventListener(e,"touchmove",o=>{if(o.target instanceof HTMLElement){if(o.target.tagName==="INPUT")return;if(r(o.target)){let i=o.target;for(;i.parentElement&&i.dataset.headlessuiPortal!==""&&!(i.scrollHeight>i.clientHeight||i.scrollWidth>i.clientWidth);)i=i.parentElement;i.dataset.headlessuiPortal===""&&o.preventDefault()}else o.preventDefault()}},{passive:!1}),t.add(()=>{var o;let i=(o=window.scrollY)!=null?o:window.pageYOffset;a!==i&&window.scrollTo(0,a),u&&u.isConnected&&(u.scrollIntoView({block:"nearest"}),u=null)})})}}:{}}function _t(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function Gt(e){let t={};for(let n of e)Object.assign(t,n(t));return t}let q=Wt(()=>new Map,{PUSH(e,t){var n;let r=(n=this.get(e))!=null?n:{doc:e,count:0,d:ee(),meta:new Set};return r.count++,r.meta.add(t),this.set(e,r),this},POP(e,t){let n=this.get(e);return n&&(n.count--,n.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:n}){let r={doc:e,d:t,meta:Gt(n)},l=[qt(),Vt(),_t()];l.forEach(({before:a})=>a==null?void 0:a(r)),l.forEach(({after:a})=>a==null?void 0:a(r))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});q.subscribe(()=>{let e=q.getSnapshot(),t=new Map;for(let[n]of e)t.set(n,n.documentElement.style.overflow);for(let n of e.values()){let r=t.get(n.doc)==="hidden",l=n.count!==0;(l&&!r||!l&&r)&&q.dispatch(n.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",n),n.count===0&&q.dispatch("TEARDOWN",n)}});function Yt(e,t,n){let r=Ut(q),l=h(()=>{let a=e.value?r.value.get(e.value):void 0;return a?a.count>0:!1});return K([e,t],([a,u],[o],i)=>{if(!a||!u)return;q.dispatch("PUSH",a,n);let s=!1;i(()=>{s||(q.dispatch("POP",o??a,n),s=!0)})},{immediate:!0}),l}let Ee=new Map,Z=new Map;function Ie(e,t=g(!0)){A(n=>{var r;if(!t.value)return;let l=E(e);if(!l)return;n(function(){var u;if(!l)return;let o=(u=Z.get(l))!=null?u:1;if(o===1?Z.delete(l):Z.set(l,o-1),o!==1)return;let i=Ee.get(l);i&&(i["aria-hidden"]===null?l.removeAttribute("aria-hidden"):l.setAttribute("aria-hidden",i["aria-hidden"]),l.inert=i.inert,Ee.delete(l))});let a=(r=Z.get(l))!=null?r:0;Z.set(l,a+1),a===0&&(Ee.set(l,{"aria-hidden":l.getAttribute("aria-hidden"),inert:l.inert}),l.setAttribute("aria-hidden","true"),l.inert=!0)})}function Kt({defaultContainers:e=[],portals:t,mainTreeNodeRef:n}={}){let r=g(null),l=z(r);function a(){var u,o,i;let s=[];for(let d of e)d!==null&&(d instanceof HTMLElement?s.push(d):"value"in d&&d.value instanceof HTMLElement&&s.push(d.value));if(t!=null&&t.value)for(let d of t.value)s.push(d);for(let d of(u=l==null?void 0:l.querySelectorAll("html > *, body > *"))!=null?u:[])d!==document.body&&d!==document.head&&d instanceof HTMLElement&&d.id!=="headlessui-portal-root"&&(d.contains(E(r))||d.contains((i=(o=E(r))==null?void 0:o.getRootNode())==null?void 0:i.host)||s.some(m=>d.contains(m))||s.push(d));return s}return{resolveContainers:a,contains(u){return a().some(o=>o.contains(u))},mainTreeNodeRef:r,MainTreeNode(){return n!=null?null:S(Le,{features:ve.Hidden,ref:r})}}}let lt=Symbol("ForcePortalRootContext");function zt(){return P(lt,!1)}let Ue=D({name:"ForcePortalRoot",props:{as:{type:[Object,String],default:"template"},force:{type:Boolean,default:!1}},setup(e,{slots:t,attrs:n}){return x(lt,e.force),()=>{let{force:r,...l}=e;return k({theirProps:l,ourProps:{},slot:{},slots:t,attrs:n,name:"ForcePortalRoot"})}}}),at=Symbol("StackContext");var $e=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))($e||{});function Xt(){return P(at,()=>{})}function Qt({type:e,enabled:t,element:n,onUpdate:r}){let l=Xt();function a(...u){r==null||r(...u),l(...u)}$(()=>{K(t,(u,o)=>{u?a(0,e,n):o===!0&&a(1,e,n)},{immediate:!0,flush:"sync"})}),M(()=>{t.value&&a(1,e,n)}),x(at,a)}let Zt=Symbol("DescriptionContext");function Jt({slot:e=g({}),name:t="Description",props:n={}}={}){let r=g([]);function l(a){return r.value.push(a),()=>{let u=r.value.indexOf(a);u!==-1&&r.value.splice(u,1)}}return x(Zt,{register:l,slot:e,name:t,props:n}),h(()=>r.value.length>0?r.value.join(" "):void 0)}function en(e){let t=z(e);if(!t){if(e===null)return null;throw new Error(`[Headless UI]: Cannot find ownerDocument for contextElement: ${e}`)}let n=t.getElementById("headlessui-portal-root");if(n)return n;let r=t.createElement("div");return r.setAttribute("id","headlessui-portal-root"),t.body.appendChild(r)}const Fe=new WeakMap;function tn(e){var t;return(t=Fe.get(e))!=null?t:0}function We(e,t){let n=t(tn(e));return n<=0?Fe.delete(e):Fe.set(e,n),n}let nn=D({name:"Portal",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:n}){let r=g(null),l=h(()=>z(r)),a=zt(),u=P(ot,null),o=g(a===!0||u==null?en(r.value):u.resolveTarget());o.value&&We(o.value,c=>c+1);let i=g(!1);$(()=>{i.value=!0}),A(()=>{a||u!=null&&(o.value=u.resolveTarget())});let s=P(Oe,null),d=!1,m=ft();return K(r,()=>{if(d||!s)return;let c=E(r);c&&(M(s.register(c),m),d=!0)}),M(()=>{var c,v;let f=(c=l.value)==null?void 0:c.getElementById("headlessui-portal-root");!f||o.value!==f||We(o.value,p=>p-1)||o.value.children.length>0||(v=o.value.parentElement)==null||v.removeChild(o.value)}),()=>{if(!i.value||o.value===null)return null;let c={ref:r,"data-headlessui-portal":""};return S(vt,{to:o.value},k({ourProps:c,theirProps:e,slot:{},attrs:n,slots:t,name:"Portal"}))}}}),Oe=Symbol("PortalParentContext");function rn(){let e=P(Oe,null),t=g([]);function n(a){return t.value.push(a),e&&e.register(a),()=>r(a)}function r(a){let u=t.value.indexOf(a);u!==-1&&t.value.splice(u,1),e&&e.unregister(a)}let l={register:n,unregister:r,portals:t};return[t,D({name:"PortalWrapper",setup(a,{slots:u}){return x(Oe,l),()=>{var o;return(o=u.default)==null?void 0:o.call(u)}}})]}let ot=Symbol("PortalGroupContext"),ln=D({name:"PortalGroup",props:{as:{type:[Object,String],default:"template"},target:{type:Object,default:null}},setup(e,{attrs:t,slots:n}){let r=pt({resolveTarget(){return e.target}});return x(ot,r),()=>{let{target:l,...a}=e;return k({theirProps:a,ourProps:{},slot:{},attrs:t,slots:n,name:"PortalGroup"})}}});var an=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(an||{});let Pe=Symbol("DialogContext");function Ne(e){let t=P(Pe,null);if(t===null){let n=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Ne),n}return t}let se="DC8F892D-2EBD-447C-A4C8-A03058436FF4",yn=D({name:"Dialog",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},open:{type:[Boolean,String],default:se},initialFocus:{type:Object,default:null},id:{type:String,default:null},role:{type:String,default:"dialog"}},emits:{close:e=>!0},setup(e,{emit:t,attrs:n,slots:r,expose:l}){var a,u;let o=(a=e.id)!=null?a:`headlessui-dialog-${pe()}`,i=g(!1);$(()=>{i.value=!0});let s=!1,d=h(()=>e.role==="dialog"||e.role==="alertdialog"?e.role:(s||(s=!0,console.warn(`Invalid role [${d}] passed to . Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")),m=g(0),c=Ce(),v=h(()=>e.open===se&&c!==null?(c.value&L.Open)===L.Open:e.open),f=g(null),p=h(()=>z(f));if(l({el:f,$el:f}),!(e.open!==se||c!==null))throw new Error("You forgot to provide an `open` prop to the `Dialog`.");if(typeof v.value!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${v.value===se?void 0:e.open}`);let w=h(()=>i.value&&v.value?0:1),C=h(()=>w.value===0),T=h(()=>m.value>1),U=P(Pe,null)!==null,[ne,re]=rn(),{resolveContainers:G,mainTreeNodeRef:le,MainTreeNode:ae}=Kt({portals:ne,defaultContainers:[h(()=>{var y;return(y=Y.panelRef.value)!=null?y:f.value})]}),he=h(()=>T.value?"parent":"leaf"),oe=h(()=>c!==null?(c.value&L.Closing)===L.Closing:!1),ge=h(()=>U||oe.value?!1:C.value),ye=h(()=>{var y,b,F;return(F=Array.from((b=(y=p.value)==null?void 0:y.querySelectorAll("body > *"))!=null?b:[]).find(O=>O.id==="headlessui-portal-root"?!1:O.contains(E(le))&&O instanceof HTMLElement))!=null?F:null});Ie(ye,ge);let N=h(()=>T.value?!0:C.value),X=h(()=>{var y,b,F;return(F=Array.from((b=(y=p.value)==null?void 0:y.querySelectorAll("[data-headlessui-portal]"))!=null?b:[]).find(O=>O.contains(E(le))&&O instanceof HTMLElement))!=null?F:null});Ie(X,N),Qt({type:"Dialog",enabled:h(()=>w.value===0),element:f,onUpdate:(y,b)=>{if(b==="Dialog")return R(y,{[$e.Add]:()=>m.value+=1,[$e.Remove]:()=>m.value-=1})}});let j=Jt({name:"DialogDescription",slot:h(()=>({open:v.value}))}),H=g(null),Y={titleId:H,panelRef:g(null),dialogState:w,setTitleId(y){H.value!==y&&(H.value=y)},close(){t("close",!1)}};x(Pe,Y);let Re=h(()=>!(!C.value||T.value));Ct(G,(y,b)=>{y.preventDefault(),Y.close(),mt(()=>b==null?void 0:b.focus())},Re);let ke=h(()=>!(T.value||w.value!==0));et((u=p.value)==null?void 0:u.defaultView,"keydown",y=>{ke.value&&(y.defaultPrevented||y.key===Je.Escape&&(y.preventDefault(),y.stopPropagation(),Y.close()))});let je=h(()=>!(oe.value||w.value!==0||U));return Yt(p,je,y=>{var b;return{containers:[...(b=y.containers)!=null?b:[],G]}}),A(y=>{if(w.value!==0)return;let b=E(f);if(!b)return;let F=new ResizeObserver(O=>{for(let we of O){let ue=we.target.getBoundingClientRect();ue.x===0&&ue.y===0&&ue.width===0&&ue.height===0&&Y.close()}});F.observe(b),y(()=>F.disconnect())}),()=>{let{open:y,initialFocus:b,...F}=e,O={...n,ref:f,id:o,role:d.value,"aria-modal":w.value===0?!0:void 0,"aria-labelledby":H.value,"aria-describedby":j.value},we={open:w.value===0};return S(Ue,{force:!0},()=>[S(nn,()=>S(ln,{target:f.value},()=>S(Ue,{force:!1},()=>S(Q,{initialFocus:b,containers:G,features:C.value?R(he.value,{parent:Q.features.RestoreFocus,leaf:Q.features.All&~Q.features.FocusLock}):Q.features.None},()=>S(re,{},()=>k({ourProps:O,theirProps:{...F,...n},slot:we,attrs:n,slots:r,visible:w.value===0,features:fe.RenderStrategy|fe.Static,name:"Dialog"})))))),S(ae)])}}}),wn=D({name:"DialogPanel",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:null}},setup(e,{attrs:t,slots:n,expose:r}){var l;let a=(l=e.id)!=null?l:`headlessui-dialog-panel-${pe()}`,u=Ne("DialogPanel");r({el:u.panelRef,$el:u.panelRef});function o(i){i.stopPropagation()}return()=>{let{...i}=e,s={id:a,ref:u.panelRef,onClick:o};return k({ourProps:s,theirProps:i,slot:{open:u.dialogState.value===0},attrs:t,slots:n,name:"DialogPanel"})}}}),bn=D({name:"DialogTitle",props:{as:{type:[Object,String],default:"h2"},id:{type:String,default:null}},setup(e,{attrs:t,slots:n}){var r;let l=(r=e.id)!=null?r:`headlessui-dialog-title-${pe()}`,a=Ne("DialogTitle");return $(()=>{a.setTitleId(l),M(()=>a.setTitleId(null))}),()=>{let{...u}=e;return k({ourProps:{id:l},theirProps:u,slot:{open:a.dialogState.value===0},attrs:t,slots:n,name:"DialogTitle"})}}});function on(e){let t={called:!1};return(...n)=>{if(!t.called)return t.called=!0,e(...n)}}function Se(e,...t){e&&t.length>0&&e.classList.add(...t)}function de(e,...t){e&&t.length>0&&e.classList.remove(...t)}var Ae=(e=>(e.Finished="finished",e.Cancelled="cancelled",e))(Ae||{});function un(e,t){let n=ee();if(!e)return n.dispose;let{transitionDuration:r,transitionDelay:l}=getComputedStyle(e),[a,u]=[r,l].map(o=>{let[i=0]=o.split(",").filter(Boolean).map(s=>s.includes("ms")?parseFloat(s):parseFloat(s)*1e3).sort((s,d)=>d-s);return i});return a!==0?n.setTimeout(()=>t("finished"),a+u):t("finished"),n.add(()=>t("cancelled")),n.dispose}function Ve(e,t,n,r,l,a){let u=ee(),o=a!==void 0?on(a):()=>{};return de(e,...l),Se(e,...t,...n),u.nextFrame(()=>{de(e,...n),Se(e,...r),u.add(un(e,i=>(de(e,...r,...t),Se(e,...l),o(i))))}),u.add(()=>de(e,...t,...n,...r,...l)),u.add(()=>o("cancelled")),u.dispose}function W(e=""){return e.split(/\s+/).filter(t=>t.length>1)}let xe=Symbol("TransitionContext");var sn=(e=>(e.Visible="visible",e.Hidden="hidden",e))(sn||{});function dn(){return P(xe,null)!==null}function cn(){let e=P(xe,null);if(e===null)throw new Error("A is used but it is missing a parent .");return e}function fn(){let e=P(Me,null);if(e===null)throw new Error("A is used but it is missing a parent .");return e}let Me=Symbol("NestingContext");function me(e){return"children"in e?me(e.children):e.value.filter(({state:t})=>t==="visible").length>0}function ut(e){let t=g([]),n=g(!1);$(()=>n.value=!0),M(()=>n.value=!1);function r(a,u=I.Hidden){let o=t.value.findIndex(({id:i})=>i===a);o!==-1&&(R(u,{[I.Unmount](){t.value.splice(o,1)},[I.Hidden](){t.value[o].state="hidden"}}),!me(t)&&n.value&&(e==null||e()))}function l(a){let u=t.value.find(({id:o})=>o===a);return u?u.state!=="visible"&&(u.state="visible"):t.value.push({id:a,state:"visible"}),()=>r(a,I.Unmount)}return{children:t,register:l,unregister:r}}let it=fe.RenderStrategy,vn=D({props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:n,slots:r,expose:l}){let a=g(0);function u(){a.value|=L.Opening,t("beforeEnter")}function o(){a.value&=~L.Opening,t("afterEnter")}function i(){a.value|=L.Closing,t("beforeLeave")}function s(){a.value&=~L.Closing,t("afterLeave")}if(!dn()&&xt())return()=>S(mn,{...e,onBeforeEnter:u,onAfterEnter:o,onBeforeLeave:i,onAfterLeave:s},r);let d=g(null),m=h(()=>e.unmount?I.Unmount:I.Hidden);l({el:d,$el:d});let{show:c,appear:v}=cn(),{register:f,unregister:p}=fn(),w=g(c.value?"visible":"hidden"),C={value:!0},T=pe(),U={value:!1},ne=ut(()=>{!U.value&&w.value!=="hidden"&&(w.value="hidden",p(T),s())});$(()=>{let N=f(T);M(N)}),A(()=>{if(m.value===I.Hidden&&T){if(c.value&&w.value!=="visible"){w.value="visible";return}R(w.value,{hidden:()=>p(T),visible:()=>f(T)})}});let re=W(e.enter),G=W(e.enterFrom),le=W(e.enterTo),ae=W(e.entered),he=W(e.leave),oe=W(e.leaveFrom),ge=W(e.leaveTo);$(()=>{A(()=>{if(w.value==="visible"){let N=E(d);if(N instanceof Comment&&N.data==="")throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}})});function ye(N){let X=C.value&&!v.value,j=E(d);!j||!(j instanceof HTMLElement)||X||(U.value=!0,c.value&&u(),c.value||i(),N(c.value?Ve(j,re,G,le,ae,H=>{U.value=!1,H===Ae.Finished&&o()}):Ve(j,he,oe,ge,ae,H=>{U.value=!1,H===Ae.Finished&&(me(ne)||(w.value="hidden",p(T),s()))})))}return $(()=>{K([c],(N,X,j)=>{ye(j),C.value=!1},{immediate:!0})}),x(Me,ne),Mt(h(()=>R(w.value,{visible:L.Open,hidden:L.Closed})|a.value)),()=>{let{appear:N,show:X,enter:j,enterFrom:H,enterTo:Y,entered:Re,leave:ke,leaveFrom:je,leaveTo:y,...b}=e,F={ref:d},O={...b,...v.value&&c.value&&te.isServer?{class:ht([n.class,b.class,...re,...G])}:{}};return k({theirProps:O,ourProps:F,slot:{},slots:r,attrs:n,features:it,visible:w.value==="visible",name:"TransitionChild"})}}}),pn=vn,mn=D({inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:n,slots:r}){let l=Ce(),a=h(()=>e.show===null&&l!==null?(l.value&L.Open)===L.Open:e.show);A(()=>{if(![!0,!1].includes(a.value))throw new Error('A is used but it is missing a `:show="true | false"` prop.')});let u=g(a.value?"visible":"hidden"),o=ut(()=>{u.value="hidden"}),i=g(!0),s={show:a,appear:h(()=>e.appear||!i.value)};return $(()=>{A(()=>{i.value=!1,a.value?u.value="visible":me(o)||(u.value="hidden")})}),x(Me,o),x(xe,s),()=>{let d=Qe(e,["show","appear","unmount","onBeforeEnter","onBeforeLeave","onAfterEnter","onAfterLeave"]),m={unmount:e.unmount};return k({ourProps:{...m,as:"template"},theirProps:{},slot:{},slots:{...r,default:()=>[S(pn,{onBeforeEnter:()=>t("beforeEnter"),onAfterEnter:()=>t("afterEnter"),onBeforeLeave:()=>t("beforeLeave"),onAfterLeave:()=>t("afterLeave"),...n,...m,...d},r.default)]},attrs:{},features:it,visible:u.value==="visible",name:"Transition"})}}});export{wn as G,mn as S,bn as V,yn as Y,vn as h}; diff --git a/mcphawk/web/static/assets/vendor-CmqOmjtB.js b/mcphawk/web/static/assets/vendor-CmqOmjtB.js new file mode 100644 index 0000000..8e089ec --- /dev/null +++ b/mcphawk/web/static/assets/vendor-CmqOmjtB.js @@ -0,0 +1,21 @@ +/** +* @vue/shared v3.5.18 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**//*! #__NO_SIDE_EFFECTS__ */function Ls(t){const e=Object.create(null);for(const s of t.split(","))e[s]=1;return s=>s in e}const B={},ie=[],At=()=>{},ci=()=>!1,ke=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&(t.charCodeAt(2)>122||t.charCodeAt(2)<97),$s=t=>t.startsWith("onUpdate:"),it=Object.assign,Ks=(t,e)=>{const s=t.indexOf(e);s>-1&&t.splice(s,1)},fi=Object.prototype.hasOwnProperty,K=(t,e)=>fi.call(t,e),M=Array.isArray,oe=t=>ts(t)==="[object Map]",qn=t=>ts(t)==="[object Set]",D=t=>typeof t=="function",k=t=>typeof t=="string",qt=t=>typeof t=="symbol",z=t=>t!==null&&typeof t=="object",Jn=t=>(z(t)||D(t))&&D(t.then)&&D(t.catch),Yn=Object.prototype.toString,ts=t=>Yn.call(t),ui=t=>ts(t).slice(8,-1),zn=t=>ts(t)==="[object Object]",Vs=t=>k(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t,_e=Ls(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"),es=t=>{const e=Object.create(null);return s=>e[s]||(e[s]=t(s))},ai=/-(\w)/g,Bt=es(t=>t.replace(ai,(e,s)=>s?s.toUpperCase():"")),hi=/\B([A-Z])/g,Jt=es(t=>t.replace(hi,"-$1").toLowerCase()),Xn=es(t=>t.charAt(0).toUpperCase()+t.slice(1)),hs=es(t=>t?`on${Xn(t)}`:""),Vt=(t,e)=>!Object.is(t,e),Ke=(t,...e)=>{for(let s=0;s{Object.defineProperty(t,e,{configurable:!0,enumerable:!1,writable:n,value:s})},Cs=t=>{const e=parseFloat(t);return isNaN(e)?t:e};let hn;const ss=()=>hn||(hn=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{});function Us(t){if(M(t)){const e={};for(let s=0;s{if(s){const n=s.split(pi);n.length>1&&(e[n[0].trim()]=n[1].trim())}}),e}function Bs(t){let e="";if(k(t))e=t;else if(M(t))for(let s=0;s!!(t&&t.__v_isRef===!0),yi=t=>k(t)?t:t==null?"":M(t)||z(t)&&(t.toString===Yn||!D(t.toString))?Qn(t)?yi(t.value):JSON.stringify(t,kn,2):String(t),kn=(t,e)=>Qn(e)?kn(t,e.value):oe(e)?{[`Map(${e.size})`]:[...e.entries()].reduce((s,[n,r],i)=>(s[ds(n,i)+" =>"]=r,s),{})}:qn(e)?{[`Set(${e.size})`]:[...e.values()].map(s=>ds(s))}:qt(e)?ds(e):z(e)&&!M(e)&&!zn(e)?String(e):e,ds=(t,e="")=>{var s;return qt(t)?`Symbol(${(s=t.description)!=null?s:e})`:t};/** +* @vue/reactivity v3.5.18 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let nt;class tr{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this.parent=nt,!e&&nt&&(this.index=(nt.scopes||(nt.scopes=[])).push(this)-1)}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,s;if(this.scopes)for(e=0,s=this.scopes.length;e0&&--this._on===0&&(nt=this.prevScope,this.prevScope=void 0)}stop(e){if(this._active){this._active=!1;let s,n;for(s=0,n=this.effects.length;s0)return;if(be){let e=be;for(be=void 0;e;){const s=e.next;e.next=void 0,e.flags&=-9,e=s}}let t;for(;me;){let e=me;for(me=void 0;e;){const s=e.next;if(e.next=void 0,e.flags&=-9,e.flags&1)try{e.trigger()}catch(n){t||(t=n)}e=s}}if(t)throw t}function or(t){for(let e=t.deps;e;e=e.nextDep)e.version=-1,e.prevActiveLink=e.dep.activeLink,e.dep.activeLink=e}function lr(t){let e,s=t.depsTail,n=s;for(;n;){const r=n.prevDep;n.version===-1?(n===s&&(s=r),qs(n),vi(n)):e=n,n.dep.activeLink=n.prevActiveLink,n.prevActiveLink=void 0,n=r}t.deps=e,t.depsTail=s}function Es(t){for(let e=t.deps;e;e=e.nextDep)if(e.dep.version!==e.version||e.dep.computed&&(cr(e.dep.computed)||e.dep.version!==e.version))return!0;return!!t._dirty}function cr(t){if(t.flags&4&&!(t.flags&16)||(t.flags&=-17,t.globalVersion===Ee)||(t.globalVersion=Ee,!t.isSSR&&t.flags&128&&(!t.deps&&!t._dirty||!Es(t))))return;t.flags|=2;const e=t.dep,s=Y,n=bt;Y=t,bt=!0;try{or(t);const r=t.fn(t._value);(e.version===0||Vt(r,t._value))&&(t.flags|=128,t._value=r,e.version++)}catch(r){throw e.version++,r}finally{Y=s,bt=n,lr(t),t.flags&=-3}}function qs(t,e=!1){const{dep:s,prevSub:n,nextSub:r}=t;if(n&&(n.nextSub=r,t.prevSub=void 0),r&&(r.prevSub=n,t.nextSub=void 0),s.subs===t&&(s.subs=n,!n&&s.computed)){s.computed.flags&=-5;for(let i=s.computed.deps;i;i=i.nextDep)qs(i,!0)}!e&&!--s.sc&&s.map&&s.map.delete(s.key)}function vi(t){const{prevDep:e,nextDep:s}=t;e&&(e.nextDep=s,t.prevDep=void 0),s&&(s.prevDep=e,t.nextDep=void 0)}let bt=!0;const fr=[];function Dt(){fr.push(bt),bt=!1}function jt(){const t=fr.pop();bt=t===void 0?!0:t}function dn(t){const{cleanup:e}=t;if(t.cleanup=void 0,e){const s=Y;Y=void 0;try{e()}finally{Y=s}}}let Ee=0;class Si{constructor(e,s){this.sub=e,this.dep=s,this.version=s.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}}class Js{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!Y||!bt||Y===this.computed)return;let s=this.activeLink;if(s===void 0||s.sub!==Y)s=this.activeLink=new Si(Y,this),Y.deps?(s.prevDep=Y.depsTail,Y.depsTail.nextDep=s,Y.depsTail=s):Y.deps=Y.depsTail=s,ur(s);else if(s.version===-1&&(s.version=this.version,s.nextDep)){const n=s.nextDep;n.prevDep=s.prevDep,s.prevDep&&(s.prevDep.nextDep=n),s.prevDep=Y.depsTail,s.nextDep=void 0,Y.depsTail.nextDep=s,Y.depsTail=s,Y.deps===s&&(Y.deps=n)}return s}trigger(e){this.version++,Ee++,this.notify(e)}notify(e){Ws();try{for(let s=this.subs;s;s=s.prevSub)s.sub.notify()&&s.sub.dep.notify()}finally{Gs()}}}function ur(t){if(t.dep.sc++,t.sub.flags&4){const e=t.dep.computed;if(e&&!t.dep.subs){e.flags|=20;for(let n=e.deps;n;n=n.nextDep)ur(n)}const s=t.dep.subs;s!==t&&(t.prevSub=s,s&&(s.nextSub=t)),t.dep.subs=t}}const Ge=new WeakMap,kt=Symbol(""),As=Symbol(""),Ae=Symbol("");function rt(t,e,s){if(bt&&Y){let n=Ge.get(t);n||Ge.set(t,n=new Map);let r=n.get(s);r||(n.set(s,r=new Js),r.map=n,r.key=s),r.track()}}function It(t,e,s,n,r,i){const o=Ge.get(t);if(!o){Ee++;return}const l=f=>{f&&f.trigger()};if(Ws(),e==="clear")o.forEach(l);else{const f=M(t),h=f&&Vs(s);if(f&&s==="length"){const a=Number(n);o.forEach((p,y)=>{(y==="length"||y===Ae||!qt(y)&&y>=a)&&l(p)})}else switch((s!==void 0||o.has(void 0))&&l(o.get(s)),h&&l(o.get(Ae)),e){case"add":f?h&&l(o.get("length")):(l(o.get(kt)),oe(t)&&l(o.get(As)));break;case"delete":f||(l(o.get(kt)),oe(t)&&l(o.get(As)));break;case"set":oe(t)&&l(o.get(kt));break}}Gs()}function wi(t,e){const s=Ge.get(t);return s&&s.get(e)}function ee(t){const e=$(t);return e===t?e:(rt(e,"iterate",Ae),mt(t)?e:e.map(st))}function ns(t){return rt(t=$(t),"iterate",Ae),t}const Ti={__proto__:null,[Symbol.iterator](){return gs(this,Symbol.iterator,st)},concat(...t){return ee(this).concat(...t.map(e=>M(e)?ee(e):e))},entries(){return gs(this,"entries",t=>(t[1]=st(t[1]),t))},every(t,e){return Pt(this,"every",t,e,void 0,arguments)},filter(t,e){return Pt(this,"filter",t,e,s=>s.map(st),arguments)},find(t,e){return Pt(this,"find",t,e,st,arguments)},findIndex(t,e){return Pt(this,"findIndex",t,e,void 0,arguments)},findLast(t,e){return Pt(this,"findLast",t,e,st,arguments)},findLastIndex(t,e){return Pt(this,"findLastIndex",t,e,void 0,arguments)},forEach(t,e){return Pt(this,"forEach",t,e,void 0,arguments)},includes(...t){return _s(this,"includes",t)},indexOf(...t){return _s(this,"indexOf",t)},join(t){return ee(this).join(t)},lastIndexOf(...t){return _s(this,"lastIndexOf",t)},map(t,e){return Pt(this,"map",t,e,void 0,arguments)},pop(){return de(this,"pop")},push(...t){return de(this,"push",t)},reduce(t,...e){return pn(this,"reduce",t,e)},reduceRight(t,...e){return pn(this,"reduceRight",t,e)},shift(){return de(this,"shift")},some(t,e){return Pt(this,"some",t,e,void 0,arguments)},splice(...t){return de(this,"splice",t)},toReversed(){return ee(this).toReversed()},toSorted(t){return ee(this).toSorted(t)},toSpliced(...t){return ee(this).toSpliced(...t)},unshift(...t){return de(this,"unshift",t)},values(){return gs(this,"values",st)}};function gs(t,e,s){const n=ns(t),r=n[e]();return n!==t&&!mt(t)&&(r._next=r.next,r.next=()=>{const i=r._next();return i.value&&(i.value=s(i.value)),i}),r}const Ci=Array.prototype;function Pt(t,e,s,n,r,i){const o=ns(t),l=o!==t&&!mt(t),f=o[e];if(f!==Ci[e]){const p=f.apply(t,i);return l?st(p):p}let h=s;o!==t&&(l?h=function(p,y){return s.call(this,st(p),y,t)}:s.length>2&&(h=function(p,y){return s.call(this,p,y,t)}));const a=f.call(o,h,n);return l&&r?r(a):a}function pn(t,e,s,n){const r=ns(t);let i=s;return r!==t&&(mt(t)?s.length>3&&(i=function(o,l,f){return s.call(this,o,l,f,t)}):i=function(o,l,f){return s.call(this,o,st(l),f,t)}),r[e](i,...n)}function _s(t,e,s){const n=$(t);rt(n,"iterate",Ae);const r=n[e](...s);return(r===-1||r===!1)&&Xs(s[0])?(s[0]=$(s[0]),n[e](...s)):r}function de(t,e,s=[]){Dt(),Ws();const n=$(t)[e].apply(t,s);return Gs(),jt(),n}const Ei=Ls("__proto__,__v_isRef,__isVue"),ar=new Set(Object.getOwnPropertyNames(Symbol).filter(t=>t!=="arguments"&&t!=="caller").map(t=>Symbol[t]).filter(qt));function Ai(t){qt(t)||(t=String(t));const e=$(this);return rt(e,"has",t),e.hasOwnProperty(t)}class hr{constructor(e=!1,s=!1){this._isReadonly=e,this._isShallow=s}get(e,s,n){if(s==="__v_skip")return e.__v_skip;const r=this._isReadonly,i=this._isShallow;if(s==="__v_isReactive")return!r;if(s==="__v_isReadonly")return r;if(s==="__v_isShallow")return i;if(s==="__v_raw")return n===(r?i?Ni:_r:i?gr:pr).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;const o=M(e);if(!r){let f;if(o&&(f=Ti[s]))return f;if(s==="hasOwnProperty")return Ai}const l=Reflect.get(e,s,Q(e)?e:n);return(qt(s)?ar.has(s):Ei(s))||(r||rt(e,"get",s),i)?l:Q(l)?o&&Vs(s)?l:l.value:z(l)?r?mr(l):rs(l):l}}class dr extends hr{constructor(e=!1){super(!1,e)}set(e,s,n,r){let i=e[s];if(!this._isShallow){const f=Wt(i);if(!mt(n)&&!Wt(n)&&(i=$(i),n=$(n)),!M(e)&&Q(i)&&!Q(n))return f?!1:(i.value=n,!0)}const o=M(e)&&Vs(s)?Number(s)t,He=t=>Reflect.getPrototypeOf(t);function Ii(t,e,s){return function(...n){const r=this.__v_raw,i=$(r),o=oe(i),l=t==="entries"||t===Symbol.iterator&&o,f=t==="keys"&&o,h=r[t](...n),a=s?Os:e?qe:st;return!e&&rt(i,"iterate",f?As:kt),{next(){const{value:p,done:y}=h.next();return y?{value:p,done:y}:{value:l?[a(p[0]),a(p[1])]:a(p),done:y}},[Symbol.iterator](){return this}}}}function Ne(t){return function(...e){return t==="delete"?!1:t==="clear"?void 0:this}}function Fi(t,e){const s={get(r){const i=this.__v_raw,o=$(i),l=$(r);t||(Vt(r,l)&&rt(o,"get",r),rt(o,"get",l));const{has:f}=He(o),h=e?Os:t?qe:st;if(f.call(o,r))return h(i.get(r));if(f.call(o,l))return h(i.get(l));i!==o&&i.get(r)},get size(){const r=this.__v_raw;return!t&&rt($(r),"iterate",kt),Reflect.get(r,"size",r)},has(r){const i=this.__v_raw,o=$(i),l=$(r);return t||(Vt(r,l)&&rt(o,"has",r),rt(o,"has",l)),r===l?i.has(r):i.has(r)||i.has(l)},forEach(r,i){const o=this,l=o.__v_raw,f=$(l),h=e?Os:t?qe:st;return!t&&rt(f,"iterate",kt),l.forEach((a,p)=>r.call(i,h(a),h(p),o))}};return it(s,t?{add:Ne("add"),set:Ne("set"),delete:Ne("delete"),clear:Ne("clear")}:{add(r){!e&&!mt(r)&&!Wt(r)&&(r=$(r));const i=$(this);return He(i).has.call(i,r)||(i.add(r),It(i,"add",r,r)),this},set(r,i){!e&&!mt(i)&&!Wt(i)&&(i=$(i));const o=$(this),{has:l,get:f}=He(o);let h=l.call(o,r);h||(r=$(r),h=l.call(o,r));const a=f.call(o,r);return o.set(r,i),h?Vt(i,a)&&It(o,"set",r,i):It(o,"add",r,i),this},delete(r){const i=$(this),{has:o,get:l}=He(i);let f=o.call(i,r);f||(r=$(r),f=o.call(i,r)),l&&l.call(i,r);const h=i.delete(r);return f&&It(i,"delete",r,void 0),h},clear(){const r=$(this),i=r.size!==0,o=r.clear();return i&&It(r,"clear",void 0,void 0),o}}),["keys","values","entries",Symbol.iterator].forEach(r=>{s[r]=Ii(r,t,e)}),s}function Ys(t,e){const s=Fi(t,e);return(n,r,i)=>r==="__v_isReactive"?!t:r==="__v_isReadonly"?t:r==="__v_raw"?n:Reflect.get(K(s,r)&&r in n?s:n,r,i)}const Di={get:Ys(!1,!1)},ji={get:Ys(!1,!0)},Hi={get:Ys(!0,!1)};const pr=new WeakMap,gr=new WeakMap,_r=new WeakMap,Ni=new WeakMap;function Li(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function $i(t){return t.__v_skip||!Object.isExtensible(t)?0:Li(ui(t))}function rs(t){return Wt(t)?t:zs(t,!1,Pi,Di,pr)}function Ki(t){return zs(t,!1,Ri,ji,gr)}function mr(t){return zs(t,!0,Mi,Hi,_r)}function zs(t,e,s,n,r){if(!z(t)||t.__v_raw&&!(e&&t.__v_isReactive))return t;const i=$i(t);if(i===0)return t;const o=r.get(t);if(o)return o;const l=new Proxy(t,i===2?n:s);return r.set(t,l),l}function Ut(t){return Wt(t)?Ut(t.__v_raw):!!(t&&t.__v_isReactive)}function Wt(t){return!!(t&&t.__v_isReadonly)}function mt(t){return!!(t&&t.__v_isShallow)}function Xs(t){return t?!!t.__v_raw:!1}function $(t){const e=t&&t.__v_raw;return e?$(e):t}function Zs(t){return!K(t,"__v_skip")&&Object.isExtensible(t)&&Ts(t,"__v_skip",!0),t}const st=t=>z(t)?rs(t):t,qe=t=>z(t)?mr(t):t;function Q(t){return t?t.__v_isRef===!0:!1}function br(t){return yr(t,!1)}function Ul(t){return yr(t,!0)}function yr(t,e){return Q(t)?t:new Vi(t,e)}class Vi{constructor(e,s){this.dep=new Js,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=s?e:$(e),this._value=s?e:st(e),this.__v_isShallow=s}get value(){return this.dep.track(),this._value}set value(e){const s=this._rawValue,n=this.__v_isShallow||mt(e)||Wt(e);e=n?e:$(e),Vt(e,s)&&(this._rawValue=e,this._value=n?e:st(e),this.dep.trigger())}}function Ui(t){return Q(t)?t.value:t}const Bi={get:(t,e,s)=>e==="__v_raw"?t:Ui(Reflect.get(t,e,s)),set:(t,e,s,n)=>{const r=t[e];return Q(r)&&!Q(s)?(r.value=s,!0):Reflect.set(t,e,s,n)}};function xr(t){return Ut(t)?t:new Proxy(t,Bi)}function Wi(t){const e=M(t)?new Array(t.length):{};for(const s in t)e[s]=qi(t,s);return e}class Gi{constructor(e,s,n){this._object=e,this._key=s,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0}get value(){const e=this._object[this._key];return this._value=e===void 0?this._defaultValue:e}set value(e){this._object[this._key]=e}get dep(){return wi($(this._object),this._key)}}function qi(t,e,s){const n=t[e];return Q(n)?n:new Gi(t,e,s)}class Ji{constructor(e,s,n){this.fn=e,this.setter=s,this._value=void 0,this.dep=new Js(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=Ee-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!s,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&Y!==this)return ir(this,!0),!0}get value(){const e=this.dep.track();return cr(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}}function Yi(t,e,s=!1){let n,r;return D(t)?n=t:(n=t.get,r=t.set),new Ji(n,r,s)}const Le={},Je=new WeakMap;let Qt;function zi(t,e=!1,s=Qt){if(s){let n=Je.get(s);n||Je.set(s,n=[]),n.push(t)}}function Xi(t,e,s=B){const{immediate:n,deep:r,once:i,scheduler:o,augmentJob:l,call:f}=s,h=P=>r?P:mt(P)||r===!1||r===0?Ft(P,1):Ft(P);let a,p,y,S,E=!1,A=!1;if(Q(t)?(p=()=>t.value,E=mt(t)):Ut(t)?(p=()=>h(t),E=!0):M(t)?(A=!0,E=t.some(P=>Ut(P)||mt(P)),p=()=>t.map(P=>{if(Q(P))return P.value;if(Ut(P))return h(P);if(D(P))return f?f(P,2):P()})):D(t)?e?p=f?()=>f(t,2):t:p=()=>{if(y){Dt();try{y()}finally{jt()}}const P=Qt;Qt=a;try{return f?f(t,3,[S]):t(S)}finally{Qt=P}}:p=At,e&&r){const P=p,H=r===!0?1/0:r;p=()=>Ft(P(),H)}const tt=sr(),N=()=>{a.stop(),tt&&tt.active&&Ks(tt.effects,a)};if(i&&e){const P=e;e=(...H)=>{P(...H),N()}}let W=A?new Array(t.length).fill(Le):Le;const U=P=>{if(!(!(a.flags&1)||!a.dirty&&!P))if(e){const H=a.run();if(r||E||(A?H.some((et,X)=>Vt(et,W[X])):Vt(H,W))){y&&y();const et=Qt;Qt=a;try{const X=[H,W===Le?void 0:A&&W[0]===Le?[]:W,S];W=H,f?f(e,3,X):e(...X)}finally{Qt=et}}}else a.run()};return l&&l(U),a=new nr(p),a.scheduler=o?()=>o(U,!1):U,S=P=>zi(P,!1,a),y=a.onStop=()=>{const P=Je.get(a);if(P){if(f)f(P,4);else for(const H of P)H();Je.delete(a)}},e?n?U(!0):W=a.run():o?o(U.bind(null,!0),!0):a.run(),N.pause=a.pause.bind(a),N.resume=a.resume.bind(a),N.stop=N,N}function Ft(t,e=1/0,s){if(e<=0||!z(t)||t.__v_skip||(s=s||new Set,s.has(t)))return t;if(s.add(t),e--,Q(t))Ft(t.value,e,s);else if(M(t))for(let n=0;n{Ft(n,e,s)});else if(zn(t)){for(const n in t)Ft(t[n],e,s);for(const n of Object.getOwnPropertySymbols(t))Object.prototype.propertyIsEnumerable.call(t,n)&&Ft(t[n],e,s)}return t}/** +* @vue/runtime-core v3.5.18 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/function Re(t,e,s,n){try{return n?t(...n):t()}catch(r){is(r,e,s)}}function Ot(t,e,s,n){if(D(t)){const r=Re(t,e,s,n);return r&&Jn(r)&&r.catch(i=>{is(i,e,s)}),r}if(M(t)){const r=[];for(let i=0;i>>1,r=ft[n],i=Oe(r);i=Oe(s)?ft.push(t):ft.splice(Qi(e),0,t),t.flags|=1,wr()}}function wr(){Ye||(Ye=vr.then(Cr))}function ki(t){M(t)?le.push(...t):$t&&t.id===-1?$t.splice(ne+1,0,t):t.flags&1||(le.push(t),t.flags|=1),wr()}function gn(t,e,s=Ct+1){for(;sOe(s)-Oe(n));if(le.length=0,$t){$t.push(...e);return}for($t=e,ne=0;ne<$t.length;ne++){const s=$t[ne];s.flags&4&&(s.flags&=-2),s.flags&8||s(),s.flags&=-2}$t=null,ne=0}}const Oe=t=>t.id==null?t.flags&2?-1:1/0:t.id;function Cr(t){try{for(Ct=0;Ct{n._d&&An(-1);const i=ze(e);let o;try{o=t(...r)}finally{ze(i),n._d&&An(1)}return o};return n._n=!0,n._c=!0,n._d=!0,n}function Bl(t,e){if(_t===null)return t;const s=fs(_t),n=t.dirs||(t.dirs=[]);for(let r=0;rt.__isTeleport,ye=t=>t&&(t.disabled||t.disabled===""),_n=t=>t&&(t.defer||t.defer===""),mn=t=>typeof SVGElement<"u"&&t instanceof SVGElement,bn=t=>typeof MathMLElement=="function"&&t instanceof MathMLElement,Ps=(t,e)=>{const s=t&&t.to;return k(s)?e?e(s):null:s},Or={name:"Teleport",__isTeleport:!0,process(t,e,s,n,r,i,o,l,f,h){const{mc:a,pc:p,pbc:y,o:{insert:S,querySelector:E,createText:A,createComment:tt}}=h,N=ye(e.props);let{shapeFlag:W,children:U,dynamicChildren:P}=e;if(t==null){const H=e.el=A(""),et=e.anchor=A("");S(H,s,n),S(et,s,n);const X=(I,G)=>{W&16&&(r&&r.isCE&&(r.ce._teleportTarget=I),a(U,I,G,r,i,o,l,f))},F=()=>{const I=e.target=Ps(e.props,E),G=Pr(I,e,A,S);I&&(o!=="svg"&&mn(I)?o="svg":o!=="mathml"&&bn(I)&&(o="mathml"),N||(X(I,G),Ve(e,!1)))};N&&(X(s,et),Ve(e,!0)),_n(e.props)?(e.el.__isMounted=!1,ct(()=>{F(),delete e.el.__isMounted},i)):F()}else{if(_n(e.props)&&t.el.__isMounted===!1){ct(()=>{Or.process(t,e,s,n,r,i,o,l,f,h)},i);return}e.el=t.el,e.targetStart=t.targetStart;const H=e.anchor=t.anchor,et=e.target=t.target,X=e.targetAnchor=t.targetAnchor,F=ye(t.props),I=F?s:et,G=F?H:X;if(o==="svg"||mn(et)?o="svg":(o==="mathml"||bn(et))&&(o="mathml"),P?(y(t.dynamicChildren,P,I,r,i,o,l),sn(t,e,!0)):f||p(t,e,I,G,r,i,o,l,!1),N)F?e.props&&t.props&&e.props.to!==t.props.to&&(e.props.to=t.props.to):$e(e,s,H,h,1);else if((e.props&&e.props.to)!==(t.props&&t.props.to)){const ot=e.target=Ps(e.props,E);ot&&$e(e,ot,null,h,0)}else F&&$e(e,et,X,h,1);Ve(e,N)}},remove(t,e,s,{um:n,o:{remove:r}},i){const{shapeFlag:o,children:l,anchor:f,targetStart:h,targetAnchor:a,target:p,props:y}=t;if(p&&(r(h),r(a)),i&&r(f),o&16){const S=i||!ye(y);for(let E=0;Exe(E,e&&(M(e)?e[A]:e),s,n,r));return}if(ve(n)&&!r){n.shapeFlag&512&&n.type.__asyncResolved&&n.component.subTree.component&&xe(t,e,s,n.component.subTree);return}const i=n.shapeFlag&4?fs(n.component):n.el,o=r?null:i,{i:l,r:f}=t,h=e&&e.r,a=l.refs===B?l.refs={}:l.refs,p=l.setupState,y=$(p),S=p===B?()=>!1:E=>K(y,E);if(h!=null&&h!==f&&(k(h)?(a[h]=null,S(h)&&(p[h]=null)):Q(h)&&(h.value=null)),D(f))Re(f,l,12,[o,a]);else{const E=k(f),A=Q(f);if(E||A){const tt=()=>{if(t.f){const N=E?S(f)?p[f]:a[f]:f.value;r?M(N)&&Ks(N,i):M(N)?N.includes(i)||N.push(i):E?(a[f]=[i],S(f)&&(p[f]=a[f])):(f.value=[i],t.k&&(a[t.k]=f.value))}else E?(a[f]=o,S(f)&&(p[f]=o)):A&&(f.value=o,t.k&&(a[t.k]=o))};o?(tt.id=-1,ct(tt,s)):tt()}}}ss().requestIdleCallback;ss().cancelIdleCallback;const ve=t=>!!t.type.__asyncLoader,Rr=t=>t.type.__isKeepAlive;function no(t,e){Ir(t,"a",e)}function ro(t,e){Ir(t,"da",e)}function Ir(t,e,s=ut){const n=t.__wdc||(t.__wdc=()=>{let r=s;for(;r;){if(r.isDeactivated)return;r=r.parent}return t()});if(os(e,n,s),s){let r=s.parent;for(;r&&r.parent;)Rr(r.parent.vnode)&&io(n,e,s,r),r=r.parent}}function io(t,e,s,n){const r=os(e,t,n,!0);Fr(()=>{Ks(n[e],r)},s)}function os(t,e,s=ut,n=!1){if(s){const r=s[t]||(s[t]=[]),i=e.__weh||(e.__weh=(...o)=>{Dt();const l=Ie(s),f=Ot(e,s,t,o);return l(),jt(),f});return n?r.unshift(i):r.push(i),i}}const Ht=t=>(e,s=ut)=>{(!Me||t==="sp")&&os(t,(...n)=>e(...n),s)},oo=Ht("bm"),lo=Ht("m"),co=Ht("bu"),fo=Ht("u"),uo=Ht("bum"),Fr=Ht("um"),ao=Ht("sp"),ho=Ht("rtg"),po=Ht("rtc");function go(t,e=ut){os("ec",t,e)}const _o=Symbol.for("v-ndc");function Jl(t,e,s,n){let r;const i=s,o=M(t);if(o||k(t)){const l=o&&Ut(t);let f=!1,h=!1;l&&(f=!mt(t),h=Wt(t),t=ns(t)),r=new Array(t.length);for(let a=0,p=t.length;ae(l,f,void 0,i));else{const l=Object.keys(t);r=new Array(l.length);for(let f=0,h=l.length;ft?Qr(t)?fs(t):Ms(t.parent):null,Se=it(Object.create(null),{$:t=>t,$el:t=>t.vnode.el,$data:t=>t.data,$props:t=>t.props,$attrs:t=>t.attrs,$slots:t=>t.slots,$refs:t=>t.refs,$parent:t=>Ms(t.parent),$root:t=>Ms(t.root),$host:t=>t.ce,$emit:t=>t.emit,$options:t=>jr(t),$forceUpdate:t=>t.f||(t.f=()=>{Qs(t.update)}),$nextTick:t=>t.n||(t.n=Sr.bind(t.proxy)),$watch:t=>$o.bind(t)}),ms=(t,e)=>t!==B&&!t.__isScriptSetup&&K(t,e),mo={get({_:t},e){if(e==="__v_skip")return!0;const{ctx:s,setupState:n,data:r,props:i,accessCache:o,type:l,appContext:f}=t;let h;if(e[0]!=="$"){const S=o[e];if(S!==void 0)switch(S){case 1:return n[e];case 2:return r[e];case 4:return s[e];case 3:return i[e]}else{if(ms(n,e))return o[e]=1,n[e];if(r!==B&&K(r,e))return o[e]=2,r[e];if((h=t.propsOptions[0])&&K(h,e))return o[e]=3,i[e];if(s!==B&&K(s,e))return o[e]=4,s[e];Rs&&(o[e]=0)}}const a=Se[e];let p,y;if(a)return e==="$attrs"&&rt(t.attrs,"get",""),a(t);if((p=l.__cssModules)&&(p=p[e]))return p;if(s!==B&&K(s,e))return o[e]=4,s[e];if(y=f.config.globalProperties,K(y,e))return y[e]},set({_:t},e,s){const{data:n,setupState:r,ctx:i}=t;return ms(r,e)?(r[e]=s,!0):n!==B&&K(n,e)?(n[e]=s,!0):K(t.props,e)||e[0]==="$"&&e.slice(1)in t?!1:(i[e]=s,!0)},has({_:{data:t,setupState:e,accessCache:s,ctx:n,appContext:r,propsOptions:i}},o){let l;return!!s[o]||t!==B&&K(t,o)||ms(e,o)||(l=i[0])&&K(l,o)||K(n,o)||K(Se,o)||K(r.config.globalProperties,o)},defineProperty(t,e,s){return s.get!=null?t._.accessCache[e]=0:K(s,"value")&&this.set(t,e,s.value,null),Reflect.defineProperty(t,e,s)}};function yn(t){return M(t)?t.reduce((e,s)=>(e[s]=null,e),{}):t}let Rs=!0;function bo(t){const e=jr(t),s=t.proxy,n=t.ctx;Rs=!1,e.beforeCreate&&xn(e.beforeCreate,t,"bc");const{data:r,computed:i,methods:o,watch:l,provide:f,inject:h,created:a,beforeMount:p,mounted:y,beforeUpdate:S,updated:E,activated:A,deactivated:tt,beforeDestroy:N,beforeUnmount:W,destroyed:U,unmounted:P,render:H,renderTracked:et,renderTriggered:X,errorCaptured:F,serverPrefetch:I,expose:G,inheritAttrs:ot,components:yt,directives:Nt,filters:fe}=e;if(h&&yo(h,n,null),o)for(const j in o){const q=o[j];D(q)&&(n[j]=q.bind(s))}if(r){const j=r.call(s,s);z(j)&&(t.data=rs(j))}if(Rs=!0,i)for(const j in i){const q=i[j],Yt=D(q)?q.bind(s,s):D(q.get)?q.get.bind(s,s):At,De=!D(q)&&D(q.set)?q.set.bind(s):At,zt=ti({get:Yt,set:De});Object.defineProperty(n,j,{enumerable:!0,configurable:!0,get:()=>zt.value,set:xt=>zt.value=xt})}if(l)for(const j in l)Dr(l[j],n,s,j);if(f){const j=D(f)?f.call(s):f;Reflect.ownKeys(j).forEach(q=>{Co(q,j[q])})}a&&xn(a,t,"c");function Z(j,q){M(q)?q.forEach(Yt=>j(Yt.bind(s))):q&&j(q.bind(s))}if(Z(oo,p),Z(lo,y),Z(co,S),Z(fo,E),Z(no,A),Z(ro,tt),Z(go,F),Z(po,et),Z(ho,X),Z(uo,W),Z(Fr,P),Z(ao,I),M(G))if(G.length){const j=t.exposed||(t.exposed={});G.forEach(q=>{Object.defineProperty(j,q,{get:()=>s[q],set:Yt=>s[q]=Yt,enumerable:!0})})}else t.exposed||(t.exposed={});H&&t.render===At&&(t.render=H),ot!=null&&(t.inheritAttrs=ot),yt&&(t.components=yt),Nt&&(t.directives=Nt),I&&Mr(t)}function yo(t,e,s=At){M(t)&&(t=Is(t));for(const n in t){const r=t[n];let i;z(r)?"default"in r?i=we(r.from||n,r.default,!0):i=we(r.from||n):i=we(r),Q(i)?Object.defineProperty(e,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:o=>i.value=o}):e[n]=i}}function xn(t,e,s){Ot(M(t)?t.map(n=>n.bind(e.proxy)):t.bind(e.proxy),e,s)}function Dr(t,e,s,n){let r=n.includes(".")?qr(s,n):()=>s[n];if(k(t)){const i=e[t];D(i)&&Ue(r,i)}else if(D(t))Ue(r,t.bind(s));else if(z(t))if(M(t))t.forEach(i=>Dr(i,e,s,n));else{const i=D(t.handler)?t.handler.bind(s):e[t.handler];D(i)&&Ue(r,i,t)}}function jr(t){const e=t.type,{mixins:s,extends:n}=e,{mixins:r,optionsCache:i,config:{optionMergeStrategies:o}}=t.appContext,l=i.get(e);let f;return l?f=l:!r.length&&!s&&!n?f=e:(f={},r.length&&r.forEach(h=>Xe(f,h,o,!0)),Xe(f,e,o)),z(e)&&i.set(e,f),f}function Xe(t,e,s,n=!1){const{mixins:r,extends:i}=e;i&&Xe(t,i,s,!0),r&&r.forEach(o=>Xe(t,o,s,!0));for(const o in e)if(!(n&&o==="expose")){const l=xo[o]||s&&s[o];t[o]=l?l(t[o],e[o]):e[o]}return t}const xo={data:vn,props:Sn,emits:Sn,methods:ge,computed:ge,beforeCreate:lt,created:lt,beforeMount:lt,mounted:lt,beforeUpdate:lt,updated:lt,beforeDestroy:lt,beforeUnmount:lt,destroyed:lt,unmounted:lt,activated:lt,deactivated:lt,errorCaptured:lt,serverPrefetch:lt,components:ge,directives:ge,watch:So,provide:vn,inject:vo};function vn(t,e){return e?t?function(){return it(D(t)?t.call(this,this):t,D(e)?e.call(this,this):e)}:e:t}function vo(t,e){return ge(Is(t),Is(e))}function Is(t){if(M(t)){const e={};for(let s=0;s1)return s&&D(e)?e.call(n&&n.proxy):e}}function Eo(){return!!(on()||te)}const Nr={},Lr=()=>Object.create(Nr),$r=t=>Object.getPrototypeOf(t)===Nr;function Ao(t,e,s,n=!1){const r={},i=Lr();t.propsDefaults=Object.create(null),Kr(t,e,r,i);for(const o in t.propsOptions[0])o in r||(r[o]=void 0);s?t.props=n?r:Ki(r):t.type.props?t.props=r:t.props=i,t.attrs=i}function Oo(t,e,s,n){const{props:r,attrs:i,vnode:{patchFlag:o}}=t,l=$(r),[f]=t.propsOptions;let h=!1;if((n||o>0)&&!(o&16)){if(o&8){const a=t.vnode.dynamicProps;for(let p=0;p{f=!0;const[y,S]=Vr(p,e,!0);it(o,y),S&&l.push(...S)};!s&&e.mixins.length&&e.mixins.forEach(a),t.extends&&a(t.extends),t.mixins&&t.mixins.forEach(a)}if(!i&&!f)return z(t)&&n.set(t,ie),ie;if(M(i))for(let a=0;at==="_"||t==="__"||t==="_ctx"||t==="$stable",en=t=>M(t)?t.map(Et):[Et(t)],Mo=(t,e,s)=>{if(e._n)return e;const n=to((...r)=>en(e(...r)),s);return n._c=!1,n},Ur=(t,e,s)=>{const n=t._ctx;for(const r in t){if(tn(r))continue;const i=t[r];if(D(i))e[r]=Mo(r,i,n);else if(i!=null){const o=en(i);e[r]=()=>o}}},Br=(t,e)=>{const s=en(e);t.slots.default=()=>s},Wr=(t,e,s)=>{for(const n in e)(s||!tn(n))&&(t[n]=e[n])},Ro=(t,e,s)=>{const n=t.slots=Lr();if(t.vnode.shapeFlag&32){const r=e.__;r&&Ts(n,"__",r,!0);const i=e._;i?(Wr(n,e,s),s&&Ts(n,"_",i,!0)):Ur(e,n)}else e&&Br(t,e)},Io=(t,e,s)=>{const{vnode:n,slots:r}=t;let i=!0,o=B;if(n.shapeFlag&32){const l=e._;l?s&&l===1?i=!1:Wr(r,e,s):(i=!e.$stable,Ur(e,r)),o=e}else e&&(Br(t,e),o={default:1});if(i)for(const l in r)!tn(l)&&o[l]==null&&delete r[l]},ct=qo;function Fo(t){return Do(t)}function Do(t,e){const s=ss();s.__VUE__=!0;const{insert:n,remove:r,patchProp:i,createElement:o,createText:l,createComment:f,setText:h,setElementText:a,parentNode:p,nextSibling:y,setScopeId:S=At,insertStaticContent:E}=t,A=(c,u,d,m=null,g=null,_=null,w=void 0,v=null,x=!!u.dynamicChildren)=>{if(c===u)return;c&&!pe(c,u)&&(m=je(c),xt(c,g,_,!0),c=null),u.patchFlag===-2&&(x=!1,u.dynamicChildren=null);const{type:b,ref:O,shapeFlag:T}=u;switch(b){case cs:tt(c,u,d,m);break;case Gt:N(c,u,d,m);break;case ys:c==null&&W(u,d,m,w);break;case Rt:yt(c,u,d,m,g,_,w,v,x);break;default:T&1?H(c,u,d,m,g,_,w,v,x):T&6?Nt(c,u,d,m,g,_,w,v,x):(T&64||T&128)&&b.process(c,u,d,m,g,_,w,v,x,ae)}O!=null&&g?xe(O,c&&c.ref,_,u||c,!u):O==null&&c&&c.ref!=null&&xe(c.ref,null,_,c,!0)},tt=(c,u,d,m)=>{if(c==null)n(u.el=l(u.children),d,m);else{const g=u.el=c.el;u.children!==c.children&&h(g,u.children)}},N=(c,u,d,m)=>{c==null?n(u.el=f(u.children||""),d,m):u.el=c.el},W=(c,u,d,m)=>{[c.el,c.anchor]=E(c.children,u,d,m,c.el,c.anchor)},U=({el:c,anchor:u},d,m)=>{let g;for(;c&&c!==u;)g=y(c),n(c,d,m),c=g;n(u,d,m)},P=({el:c,anchor:u})=>{let d;for(;c&&c!==u;)d=y(c),r(c),c=d;r(u)},H=(c,u,d,m,g,_,w,v,x)=>{u.type==="svg"?w="svg":u.type==="math"&&(w="mathml"),c==null?et(u,d,m,g,_,w,v,x):I(c,u,g,_,w,v,x)},et=(c,u,d,m,g,_,w,v)=>{let x,b;const{props:O,shapeFlag:T,transition:C,dirs:R}=c;if(x=c.el=o(c.type,_,O&&O.is,O),T&8?a(x,c.children):T&16&&F(c.children,x,null,m,g,bs(c,_),w,v),R&&Xt(c,null,m,"created"),X(x,c,c.scopeId,w,m),O){for(const J in O)J!=="value"&&!_e(J)&&i(x,J,null,O[J],_,m);"value"in O&&i(x,"value",null,O.value,_),(b=O.onVnodeBeforeMount)&&Tt(b,m,c)}R&&Xt(c,null,m,"beforeMount");const L=jo(g,C);L&&C.beforeEnter(x),n(x,u,d),((b=O&&O.onVnodeMounted)||L||R)&&ct(()=>{b&&Tt(b,m,c),L&&C.enter(x),R&&Xt(c,null,m,"mounted")},g)},X=(c,u,d,m,g)=>{if(d&&S(c,d),m)for(let _=0;_{for(let b=x;b{const v=u.el=c.el;let{patchFlag:x,dynamicChildren:b,dirs:O}=u;x|=c.patchFlag&16;const T=c.props||B,C=u.props||B;let R;if(d&&Zt(d,!1),(R=C.onVnodeBeforeUpdate)&&Tt(R,d,u,c),O&&Xt(u,c,d,"beforeUpdate"),d&&Zt(d,!0),(T.innerHTML&&C.innerHTML==null||T.textContent&&C.textContent==null)&&a(v,""),b?G(c.dynamicChildren,b,v,d,m,bs(u,g),_):w||q(c,u,v,null,d,m,bs(u,g),_,!1),x>0){if(x&16)ot(v,T,C,d,g);else if(x&2&&T.class!==C.class&&i(v,"class",null,C.class,g),x&4&&i(v,"style",T.style,C.style,g),x&8){const L=u.dynamicProps;for(let J=0;J{R&&Tt(R,d,u,c),O&&Xt(u,c,d,"updated")},m)},G=(c,u,d,m,g,_,w)=>{for(let v=0;v{if(u!==d){if(u!==B)for(const _ in u)!_e(_)&&!(_ in d)&&i(c,_,u[_],null,g,m);for(const _ in d){if(_e(_))continue;const w=d[_],v=u[_];w!==v&&_!=="value"&&i(c,_,v,w,g,m)}"value"in d&&i(c,"value",u.value,d.value,g)}},yt=(c,u,d,m,g,_,w,v,x)=>{const b=u.el=c?c.el:l(""),O=u.anchor=c?c.anchor:l("");let{patchFlag:T,dynamicChildren:C,slotScopeIds:R}=u;R&&(v=v?v.concat(R):R),c==null?(n(b,d,m),n(O,d,m),F(u.children||[],d,O,g,_,w,v,x)):T>0&&T&64&&C&&c.dynamicChildren?(G(c.dynamicChildren,C,d,g,_,w,v),(u.key!=null||g&&u===g.subTree)&&sn(c,u,!0)):q(c,u,d,O,g,_,w,v,x)},Nt=(c,u,d,m,g,_,w,v,x)=>{u.slotScopeIds=v,c==null?u.shapeFlag&512?g.ctx.activate(u,d,m,w,x):fe(u,d,m,g,_,w,x):Fe(c,u,x)},fe=(c,u,d,m,g,_,w)=>{const v=c.component=sl(c,m,g);if(Rr(c)&&(v.ctx.renderer=ae),nl(v,!1,w),v.asyncDep){if(g&&g.registerDep(v,Z,w),!c.el){const x=v.subTree=gt(Gt);N(null,x,u,d),c.placeholder=x.el}}else Z(v,c,u,d,g,_,w)},Fe=(c,u,d)=>{const m=u.component=c.component;if(Wo(c,u,d))if(m.asyncDep&&!m.asyncResolved){j(m,u,d);return}else m.next=u,m.update();else u.el=c.el,m.vnode=u},Z=(c,u,d,m,g,_,w)=>{const v=()=>{if(c.isMounted){let{next:T,bu:C,u:R,parent:L,vnode:J}=c;{const St=Gr(c);if(St){T&&(T.el=J.el,j(c,T,w)),St.asyncDep.then(()=>{c.isUnmounted||v()});return}}let V=T,at;Zt(c,!1),T?(T.el=J.el,j(c,T,w)):T=J,C&&Ke(C),(at=T.props&&T.props.onVnodeBeforeUpdate)&&Tt(at,L,T,J),Zt(c,!0);const ht=Cn(c),vt=c.subTree;c.subTree=ht,A(vt,ht,p(vt.el),je(vt),c,g,_),T.el=ht.el,V===null&&Go(c,ht.el),R&&ct(R,g),(at=T.props&&T.props.onVnodeUpdated)&&ct(()=>Tt(at,L,T,J),g)}else{let T;const{el:C,props:R}=u,{bm:L,m:J,parent:V,root:at,type:ht}=c,vt=ve(u);Zt(c,!1),L&&Ke(L),!vt&&(T=R&&R.onVnodeBeforeMount)&&Tt(T,V,u),Zt(c,!0);{at.ce&&at.ce._def.shadowRoot!==!1&&at.ce._injectChildStyle(ht);const St=c.subTree=Cn(c);A(null,St,d,m,c,g,_),u.el=St.el}if(J&&ct(J,g),!vt&&(T=R&&R.onVnodeMounted)){const St=u;ct(()=>Tt(T,V,St),g)}(u.shapeFlag&256||V&&ve(V.vnode)&&V.vnode.shapeFlag&256)&&c.a&&ct(c.a,g),c.isMounted=!0,u=d=m=null}};c.scope.on();const x=c.effect=new nr(v);c.scope.off();const b=c.update=x.run.bind(x),O=c.job=x.runIfDirty.bind(x);O.i=c,O.id=c.uid,x.scheduler=()=>Qs(O),Zt(c,!0),b()},j=(c,u,d)=>{u.component=c;const m=c.vnode.props;c.vnode=u,c.next=null,Oo(c,u.props,m,d),Io(c,u.children,d),Dt(),gn(c),jt()},q=(c,u,d,m,g,_,w,v,x=!1)=>{const b=c&&c.children,O=c?c.shapeFlag:0,T=u.children,{patchFlag:C,shapeFlag:R}=u;if(C>0){if(C&128){De(b,T,d,m,g,_,w,v,x);return}else if(C&256){Yt(b,T,d,m,g,_,w,v,x);return}}R&8?(O&16&&ue(b,g,_),T!==b&&a(d,T)):O&16?R&16?De(b,T,d,m,g,_,w,v,x):ue(b,g,_,!0):(O&8&&a(d,""),R&16&&F(T,d,m,g,_,w,v,x))},Yt=(c,u,d,m,g,_,w,v,x)=>{c=c||ie,u=u||ie;const b=c.length,O=u.length,T=Math.min(b,O);let C;for(C=0;CO?ue(c,g,_,!0,!1,T):F(u,d,m,g,_,w,v,x,T)},De=(c,u,d,m,g,_,w,v,x)=>{let b=0;const O=u.length;let T=c.length-1,C=O-1;for(;b<=T&&b<=C;){const R=c[b],L=u[b]=x?Kt(u[b]):Et(u[b]);if(pe(R,L))A(R,L,d,null,g,_,w,v,x);else break;b++}for(;b<=T&&b<=C;){const R=c[T],L=u[C]=x?Kt(u[C]):Et(u[C]);if(pe(R,L))A(R,L,d,null,g,_,w,v,x);else break;T--,C--}if(b>T){if(b<=C){const R=C+1,L=RC)for(;b<=T;)xt(c[b],g,_,!0),b++;else{const R=b,L=b,J=new Map;for(b=L;b<=C;b++){const dt=u[b]=x?Kt(u[b]):Et(u[b]);dt.key!=null&&J.set(dt.key,b)}let V,at=0;const ht=C-L+1;let vt=!1,St=0;const he=new Array(ht);for(b=0;b=ht){xt(dt,g,_,!0);continue}let wt;if(dt.key!=null)wt=J.get(dt.key);else for(V=L;V<=C;V++)if(he[V-L]===0&&pe(dt,u[V])){wt=V;break}wt===void 0?xt(dt,g,_,!0):(he[wt-L]=b+1,wt>=St?St=wt:vt=!0,A(dt,u[wt],d,null,g,_,w,v,x),at++)}const fn=vt?Ho(he):ie;for(V=fn.length-1,b=ht-1;b>=0;b--){const dt=L+b,wt=u[dt],un=u[dt+1],an=dt+1{const{el:_,type:w,transition:v,children:x,shapeFlag:b}=c;if(b&6){zt(c.component.subTree,u,d,m);return}if(b&128){c.suspense.move(u,d,m);return}if(b&64){w.move(c,u,d,ae);return}if(w===Rt){n(_,u,d);for(let T=0;Tv.enter(_),g);else{const{leave:T,delayLeave:C,afterLeave:R}=v,L=()=>{c.ctx.isUnmounted?r(_):n(_,u,d)},J=()=>{T(_,()=>{L(),R&&R()})};C?C(_,L,J):J()}else n(_,u,d)},xt=(c,u,d,m=!1,g=!1)=>{const{type:_,props:w,ref:v,children:x,dynamicChildren:b,shapeFlag:O,patchFlag:T,dirs:C,cacheIndex:R}=c;if(T===-2&&(g=!1),v!=null&&(Dt(),xe(v,null,d,c,!0),jt()),R!=null&&(u.renderCache[R]=void 0),O&256){u.ctx.deactivate(c);return}const L=O&1&&C,J=!ve(c);let V;if(J&&(V=w&&w.onVnodeBeforeUnmount)&&Tt(V,u,c),O&6)li(c.component,d,m);else{if(O&128){c.suspense.unmount(d,m);return}L&&Xt(c,null,u,"beforeUnmount"),O&64?c.type.remove(c,u,d,ae,m):b&&!b.hasOnce&&(_!==Rt||T>0&&T&64)?ue(b,u,d,!1,!0):(_===Rt&&T&384||!g&&O&16)&&ue(x,u,d),m&&ln(c)}(J&&(V=w&&w.onVnodeUnmounted)||L)&&ct(()=>{V&&Tt(V,u,c),L&&Xt(c,null,u,"unmounted")},d)},ln=c=>{const{type:u,el:d,anchor:m,transition:g}=c;if(u===Rt){oi(d,m);return}if(u===ys){P(c);return}const _=()=>{r(d),g&&!g.persisted&&g.afterLeave&&g.afterLeave()};if(c.shapeFlag&1&&g&&!g.persisted){const{leave:w,delayLeave:v}=g,x=()=>w(d,_);v?v(c.el,_,x):x()}else _()},oi=(c,u)=>{let d;for(;c!==u;)d=y(c),r(c),c=d;r(u)},li=(c,u,d)=>{const{bum:m,scope:g,job:_,subTree:w,um:v,m:x,a:b,parent:O,slots:{__:T}}=c;Tn(x),Tn(b),m&&Ke(m),O&&M(T)&&T.forEach(C=>{O.renderCache[C]=void 0}),g.stop(),_&&(_.flags|=8,xt(w,c,u,d)),v&&ct(v,u),ct(()=>{c.isUnmounted=!0},u),u&&u.pendingBranch&&!u.isUnmounted&&c.asyncDep&&!c.asyncResolved&&c.suspenseId===u.pendingId&&(u.deps--,u.deps===0&&u.resolve())},ue=(c,u,d,m=!1,g=!1,_=0)=>{for(let w=_;w{if(c.shapeFlag&6)return je(c.component.subTree);if(c.shapeFlag&128)return c.suspense.next();const u=y(c.anchor||c.el),d=u&&u[Ar];return d?y(d):u};let as=!1;const cn=(c,u,d)=>{c==null?u._vnode&&xt(u._vnode,null,null,!0):A(u._vnode||null,c,u,null,null,null,d),u._vnode=c,as||(as=!0,gn(),Tr(),as=!1)},ae={p:A,um:xt,m:zt,r:ln,mt:fe,mc:F,pc:q,pbc:G,n:je,o:t};return{render:cn,hydrate:void 0,createApp:To(cn)}}function bs({type:t,props:e},s){return s==="svg"&&t==="foreignObject"||s==="mathml"&&t==="annotation-xml"&&e&&e.encoding&&e.encoding.includes("html")?void 0:s}function Zt({effect:t,job:e},s){s?(t.flags|=32,e.flags|=4):(t.flags&=-33,e.flags&=-5)}function jo(t,e){return(!t||t&&!t.pendingBranch)&&e&&!e.persisted}function sn(t,e,s=!1){const n=t.children,r=e.children;if(M(n)&&M(r))for(let i=0;i>1,t[s[l]]0&&(e[n]=s[i-1]),s[i]=n)}}for(i=s.length,o=s[i-1];i-- >0;)s[i]=o,o=e[o];return s}function Gr(t){const e=t.subTree.component;if(e)return e.asyncDep&&!e.asyncResolved?e:Gr(e)}function Tn(t){if(t)for(let e=0;ewe(No);function Yl(t,e){return nn(t,null,e)}function Ue(t,e,s){return nn(t,e,s)}function nn(t,e,s=B){const{immediate:n,deep:r,flush:i,once:o}=s,l=it({},s),f=e&&n||!e&&i!=="post";let h;if(Me){if(i==="sync"){const S=Lo();h=S.__watcherHandles||(S.__watcherHandles=[])}else if(!f){const S=()=>{};return S.stop=At,S.resume=At,S.pause=At,S}}const a=ut;l.call=(S,E,A)=>Ot(S,a,E,A);let p=!1;i==="post"?l.scheduler=S=>{ct(S,a&&a.suspense)}:i!=="sync"&&(p=!0,l.scheduler=(S,E)=>{E?S():Qs(S)}),l.augmentJob=S=>{e&&(S.flags|=4),p&&(S.flags|=2,a&&(S.id=a.uid,S.i=a))};const y=Xi(t,e,l);return Me&&(h?h.push(y):f&&y()),y}function $o(t,e,s){const n=this.proxy,r=k(t)?t.includes(".")?qr(n,t):()=>n[t]:t.bind(n,n);let i;D(e)?i=e:(i=e.handler,s=e);const o=Ie(this),l=nn(r,i.bind(n),s);return o(),l}function qr(t,e){const s=e.split(".");return()=>{let n=t;for(let r=0;re==="modelValue"||e==="model-value"?t.modelModifiers:t[`${e}Modifiers`]||t[`${Bt(e)}Modifiers`]||t[`${Jt(e)}Modifiers`];function Vo(t,e,...s){if(t.isUnmounted)return;const n=t.vnode.props||B;let r=s;const i=e.startsWith("update:"),o=i&&Ko(n,e.slice(7));o&&(o.trim&&(r=s.map(a=>k(a)?a.trim():a)),o.number&&(r=s.map(Cs)));let l,f=n[l=hs(e)]||n[l=hs(Bt(e))];!f&&i&&(f=n[l=hs(Jt(e))]),f&&Ot(f,t,6,r);const h=n[l+"Once"];if(h){if(!t.emitted)t.emitted={};else if(t.emitted[l])return;t.emitted[l]=!0,Ot(h,t,6,r)}}function Jr(t,e,s=!1){const n=e.emitsCache,r=n.get(t);if(r!==void 0)return r;const i=t.emits;let o={},l=!1;if(!D(t)){const f=h=>{const a=Jr(h,e,!0);a&&(l=!0,it(o,a))};!s&&e.mixins.length&&e.mixins.forEach(f),t.extends&&f(t.extends),t.mixins&&t.mixins.forEach(f)}return!i&&!l?(z(t)&&n.set(t,null),null):(M(i)?i.forEach(f=>o[f]=null):it(o,i),z(t)&&n.set(t,o),o)}function ls(t,e){return!t||!ke(e)?!1:(e=e.slice(2).replace(/Once$/,""),K(t,e[0].toLowerCase()+e.slice(1))||K(t,Jt(e))||K(t,e))}function Cn(t){const{type:e,vnode:s,proxy:n,withProxy:r,propsOptions:[i],slots:o,attrs:l,emit:f,render:h,renderCache:a,props:p,data:y,setupState:S,ctx:E,inheritAttrs:A}=t,tt=ze(t);let N,W;try{if(s.shapeFlag&4){const P=r||n,H=P;N=Et(h.call(H,P,a,p,S,y,E)),W=l}else{const P=e;N=Et(P.length>1?P(p,{attrs:l,slots:o,emit:f}):P(p,null)),W=e.props?l:Uo(l)}}catch(P){Te.length=0,is(P,t,1),N=gt(Gt)}let U=N;if(W&&A!==!1){const P=Object.keys(W),{shapeFlag:H}=U;P.length&&H&7&&(i&&P.some($s)&&(W=Bo(W,i)),U=ce(U,W,!1,!0))}return s.dirs&&(U=ce(U,null,!1,!0),U.dirs=U.dirs?U.dirs.concat(s.dirs):s.dirs),s.transition&&ks(U,s.transition),N=U,ze(tt),N}const Uo=t=>{let e;for(const s in t)(s==="class"||s==="style"||ke(s))&&((e||(e={}))[s]=t[s]);return e},Bo=(t,e)=>{const s={};for(const n in t)(!$s(n)||!(n.slice(9)in e))&&(s[n]=t[n]);return s};function Wo(t,e,s){const{props:n,children:r,component:i}=t,{props:o,children:l,patchFlag:f}=e,h=i.emitsOptions;if(e.dirs||e.transition)return!0;if(s&&f>=0){if(f&1024)return!0;if(f&16)return n?En(n,o,h):!!o;if(f&8){const a=e.dynamicProps;for(let p=0;pt.__isSuspense;function qo(t,e){e&&e.pendingBranch?M(t)?e.effects.push(...t):e.effects.push(t):ki(t)}const Rt=Symbol.for("v-fgt"),cs=Symbol.for("v-txt"),Gt=Symbol.for("v-cmt"),ys=Symbol.for("v-stc"),Te=[];let pt=null;function Jo(t=!1){Te.push(pt=t?null:[])}function Yo(){Te.pop(),pt=Te[Te.length-1]||null}let Pe=1;function An(t,e=!1){Pe+=t,t<0&&pt&&e&&(pt.hasOnce=!0)}function zr(t){return t.dynamicChildren=Pe>0?pt||ie:null,Yo(),Pe>0&&pt&&pt.push(t),t}function zl(t,e,s,n,r,i){return zr(Zr(t,e,s,n,r,i,!0))}function zo(t,e,s,n,r){return zr(gt(t,e,s,n,r,!0))}function Ze(t){return t?t.__v_isVNode===!0:!1}function pe(t,e){return t.type===e.type&&t.key===e.key}const Xr=({key:t})=>t??null,Be=({ref:t,ref_key:e,ref_for:s})=>(typeof t=="number"&&(t=""+t),t!=null?k(t)||Q(t)||D(t)?{i:_t,r:t,k:e,f:!!s}:t:null);function Zr(t,e=null,s=null,n=0,r=null,i=t===Rt?0:1,o=!1,l=!1){const f={__v_isVNode:!0,__v_skip:!0,type:t,props:e,key:e&&Xr(e),ref:e&&Be(e),scopeId:Er,slotScopeIds:null,children:s,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:i,patchFlag:n,dynamicProps:r,dynamicChildren:null,appContext:null,ctx:_t};return l?(rn(f,s),i&128&&t.normalize(f)):s&&(f.shapeFlag|=k(s)?8:16),Pe>0&&!o&&pt&&(f.patchFlag>0||i&6)&&f.patchFlag!==32&&pt.push(f),f}const gt=Xo;function Xo(t,e=null,s=null,n=0,r=null,i=!1){if((!t||t===_o)&&(t=Gt),Ze(t)){const l=ce(t,e,!0);return s&&rn(l,s),Pe>0&&!i&&pt&&(l.shapeFlag&6?pt[pt.indexOf(t)]=l:pt.push(l)),l.patchFlag=-2,l}if(ll(t)&&(t=t.__vccOpts),e){e=Zo(e);let{class:l,style:f}=e;l&&!k(l)&&(e.class=Bs(l)),z(f)&&(Xs(f)&&!M(f)&&(f=it({},f)),e.style=Us(f))}const o=k(t)?1:Yr(t)?128:eo(t)?64:z(t)?4:D(t)?2:0;return Zr(t,e,s,n,r,o,i,!0)}function Zo(t){return t?Xs(t)||$r(t)?it({},t):t:null}function ce(t,e,s=!1,n=!1){const{props:r,ref:i,patchFlag:o,children:l,transition:f}=t,h=e?ko(r||{},e):r,a={__v_isVNode:!0,__v_skip:!0,type:t.type,props:h,key:h&&Xr(h),ref:e&&e.ref?s&&i?M(i)?i.concat(Be(e)):[i,Be(e)]:Be(e):i,scopeId:t.scopeId,slotScopeIds:t.slotScopeIds,children:l,target:t.target,targetStart:t.targetStart,targetAnchor:t.targetAnchor,staticCount:t.staticCount,shapeFlag:t.shapeFlag,patchFlag:e&&t.type!==Rt?o===-1?16:o|16:o,dynamicProps:t.dynamicProps,dynamicChildren:t.dynamicChildren,appContext:t.appContext,dirs:t.dirs,transition:f,component:t.component,suspense:t.suspense,ssContent:t.ssContent&&ce(t.ssContent),ssFallback:t.ssFallback&&ce(t.ssFallback),placeholder:t.placeholder,el:t.el,anchor:t.anchor,ctx:t.ctx,ce:t.ce};return f&&n&&ks(a,f.clone(a)),a}function Qo(t=" ",e=0){return gt(cs,null,t,e)}function Xl(t="",e=!1){return e?(Jo(),zo(Gt,null,t)):gt(Gt,null,t)}function Et(t){return t==null||typeof t=="boolean"?gt(Gt):M(t)?gt(Rt,null,t.slice()):Ze(t)?Kt(t):gt(cs,null,String(t))}function Kt(t){return t.el===null&&t.patchFlag!==-1||t.memo?t:ce(t)}function rn(t,e){let s=0;const{shapeFlag:n}=t;if(e==null)e=null;else if(M(e))s=16;else if(typeof e=="object")if(n&65){const r=e.default;r&&(r._c&&(r._d=!1),rn(t,r()),r._c&&(r._d=!0));return}else{s=32;const r=e._;!r&&!$r(e)?e._ctx=_t:r===3&&_t&&(_t.slots._===1?e._=1:(e._=2,t.patchFlag|=1024))}else D(e)?(e={default:e,_ctx:_t},s=32):(e=String(e),n&64?(s=16,e=[Qo(e)]):s=8);t.children=e,t.shapeFlag|=s}function ko(...t){const e={};for(let s=0;sut||_t;let Qe,Ds;{const t=ss(),e=(s,n)=>{let r;return(r=t[s])||(r=t[s]=[]),r.push(n),i=>{r.length>1?r.forEach(o=>o(i)):r[0](i)}};Qe=e("__VUE_INSTANCE_SETTERS__",s=>ut=s),Ds=e("__VUE_SSR_SETTERS__",s=>Me=s)}const Ie=t=>{const e=ut;return Qe(t),t.scope.on(),()=>{t.scope.off(),Qe(e)}},On=()=>{ut&&ut.scope.off(),Qe(null)};function Qr(t){return t.vnode.shapeFlag&4}let Me=!1;function nl(t,e=!1,s=!1){e&&Ds(e);const{props:n,children:r}=t.vnode,i=Qr(t);Ao(t,n,i,e),Ro(t,r,s||e);const o=i?rl(t,e):void 0;return e&&Ds(!1),o}function rl(t,e){const s=t.type;t.accessCache=Object.create(null),t.proxy=new Proxy(t.ctx,mo);const{setup:n}=s;if(n){Dt();const r=t.setupContext=n.length>1?ol(t):null,i=Ie(t),o=Re(n,t,0,[t.props,r]),l=Jn(o);if(jt(),i(),(l||t.sp)&&!ve(t)&&Mr(t),l){if(o.then(On,On),e)return o.then(f=>{Pn(t,f)}).catch(f=>{is(f,t,0)});t.asyncDep=o}else Pn(t,o)}else kr(t)}function Pn(t,e,s){D(e)?t.type.__ssrInlineRender?t.ssrRender=e:t.render=e:z(e)&&(t.setupState=xr(e)),kr(t)}function kr(t,e,s){const n=t.type;t.render||(t.render=n.render||At);{const r=Ie(t);Dt();try{bo(t)}finally{jt(),r()}}}const il={get(t,e){return rt(t,"get",""),t[e]}};function ol(t){const e=s=>{t.exposed=s||{}};return{attrs:new Proxy(t.attrs,il),slots:t.slots,emit:t.emit,expose:e}}function fs(t){return t.exposed?t.exposeProxy||(t.exposeProxy=new Proxy(xr(Zs(t.exposed)),{get(e,s){if(s in e)return e[s];if(s in Se)return Se[s](t)},has(e,s){return s in e||s in Se}})):t.proxy}function ll(t){return D(t)&&"__vccOpts"in t}const ti=(t,e)=>Yi(t,e,Me);function Zl(t,e,s){const n=arguments.length;return n===2?z(e)&&!M(e)?Ze(e)?gt(t,null,[e]):gt(t,e):gt(t,null,e):(n>3?s=Array.prototype.slice.call(arguments,2):n===3&&Ze(s)&&(s=[s]),gt(t,e,s))}const cl="3.5.18";/** +* @vue/runtime-dom v3.5.18 +* (c) 2018-present Yuxi (Evan) You and Vue contributors +* @license MIT +**/let js;const Mn=typeof window<"u"&&window.trustedTypes;if(Mn)try{js=Mn.createPolicy("vue",{createHTML:t=>t})}catch{}const ei=js?t=>js.createHTML(t):t=>t,fl="http://www.w3.org/2000/svg",ul="http://www.w3.org/1998/Math/MathML",Mt=typeof document<"u"?document:null,Rn=Mt&&Mt.createElement("template"),al={insert:(t,e,s)=>{e.insertBefore(t,s||null)},remove:t=>{const e=t.parentNode;e&&e.removeChild(t)},createElement:(t,e,s,n)=>{const r=e==="svg"?Mt.createElementNS(fl,t):e==="mathml"?Mt.createElementNS(ul,t):s?Mt.createElement(t,{is:s}):Mt.createElement(t);return t==="select"&&n&&n.multiple!=null&&r.setAttribute("multiple",n.multiple),r},createText:t=>Mt.createTextNode(t),createComment:t=>Mt.createComment(t),setText:(t,e)=>{t.nodeValue=e},setElementText:(t,e)=>{t.textContent=e},parentNode:t=>t.parentNode,nextSibling:t=>t.nextSibling,querySelector:t=>Mt.querySelector(t),setScopeId(t,e){t.setAttribute(e,"")},insertStaticContent(t,e,s,n,r,i){const o=s?s.previousSibling:e.lastChild;if(r&&(r===i||r.nextSibling))for(;e.insertBefore(r.cloneNode(!0),s),!(r===i||!(r=r.nextSibling)););else{Rn.innerHTML=ei(n==="svg"?`${t}`:n==="mathml"?`${t}`:t);const l=Rn.content;if(n==="svg"||n==="mathml"){const f=l.firstChild;for(;f.firstChild;)l.appendChild(f.firstChild);l.removeChild(f)}e.insertBefore(l,s)}return[o?o.nextSibling:e.firstChild,s?s.previousSibling:e.lastChild]}},hl=Symbol("_vtc");function dl(t,e,s){const n=t[hl];n&&(e=(e?[e,...n]:[...n]).join(" ")),e==null?t.removeAttribute("class"):s?t.setAttribute("class",e):t.className=e}const In=Symbol("_vod"),pl=Symbol("_vsh"),gl=Symbol(""),_l=/(^|;)\s*display\s*:/;function ml(t,e,s){const n=t.style,r=k(s);let i=!1;if(s&&!r){if(e)if(k(e))for(const o of e.split(";")){const l=o.slice(0,o.indexOf(":")).trim();s[l]==null&&We(n,l,"")}else for(const o in e)s[o]==null&&We(n,o,"");for(const o in s)o==="display"&&(i=!0),We(n,o,s[o])}else if(r){if(e!==s){const o=n[gl];o&&(s+=";"+o),n.cssText=s,i=_l.test(s)}}else e&&t.removeAttribute("style");In in t&&(t[In]=i?n.display:"",t[pl]&&(n.display="none"))}const Fn=/\s*!important$/;function We(t,e,s){if(M(s))s.forEach(n=>We(t,e,n));else if(s==null&&(s=""),e.startsWith("--"))t.setProperty(e,s);else{const n=bl(t,e);Fn.test(s)?t.setProperty(Jt(n),s.replace(Fn,""),"important"):t[n]=s}}const Dn=["Webkit","Moz","ms"],xs={};function bl(t,e){const s=xs[e];if(s)return s;let n=Bt(e);if(n!=="filter"&&n in t)return xs[e]=n;n=Xn(n);for(let r=0;rvs||(Sl.then(()=>vs=0),vs=Date.now());function Tl(t,e){const s=n=>{if(!n._vts)n._vts=Date.now();else if(n._vts<=s.attached)return;Ot(Cl(n,s.value),e,5,[n])};return s.value=t,s.attached=wl(),s}function Cl(t,e){if(M(e)){const s=t.stopImmediatePropagation;return t.stopImmediatePropagation=()=>{s.call(t),t._stopped=!0},e.map(n=>r=>!r._stopped&&n&&n(r))}else return e}const Kn=t=>t.charCodeAt(0)===111&&t.charCodeAt(1)===110&&t.charCodeAt(2)>96&&t.charCodeAt(2)<123,El=(t,e,s,n,r,i)=>{const o=r==="svg";e==="class"?dl(t,n,o):e==="style"?ml(t,s,n):ke(e)?$s(e)||xl(t,e,s,n,i):(e[0]==="."?(e=e.slice(1),!0):e[0]==="^"?(e=e.slice(1),!1):Al(t,e,n,o))?(Nn(t,e,n),!t.tagName.includes("-")&&(e==="value"||e==="checked"||e==="selected")&&Hn(t,e,n,o,i,e!=="value")):t._isVueCE&&(/[A-Z]/.test(e)||!k(n))?Nn(t,Bt(e),n,i,e):(e==="true-value"?t._trueValue=n:e==="false-value"&&(t._falseValue=n),Hn(t,e,n,o))};function Al(t,e,s,n){if(n)return!!(e==="innerHTML"||e==="textContent"||e in t&&Kn(e)&&D(s));if(e==="spellcheck"||e==="draggable"||e==="translate"||e==="autocorrect"||e==="form"||e==="list"&&t.tagName==="INPUT"||e==="type"&&t.tagName==="TEXTAREA")return!1;if(e==="width"||e==="height"){const r=t.tagName;if(r==="IMG"||r==="VIDEO"||r==="CANVAS"||r==="SOURCE")return!1}return Kn(e)&&k(s)?!1:e in t}const Vn=t=>{const e=t.props["onUpdate:modelValue"]||!1;return M(e)?s=>Ke(e,s):e};function Ol(t){t.target.composing=!0}function Un(t){const e=t.target;e.composing&&(e.composing=!1,e.dispatchEvent(new Event("input")))}const Ss=Symbol("_assign"),Ql={created(t,{modifiers:{lazy:e,trim:s,number:n}},r){t[Ss]=Vn(r);const i=n||r.props&&r.props.type==="number";re(t,e?"change":"input",o=>{if(o.target.composing)return;let l=t.value;s&&(l=l.trim()),i&&(l=Cs(l)),t[Ss](l)}),s&&re(t,"change",()=>{t.value=t.value.trim()}),e||(re(t,"compositionstart",Ol),re(t,"compositionend",Un),re(t,"change",Un))},mounted(t,{value:e}){t.value=e??""},beforeUpdate(t,{value:e,oldValue:s,modifiers:{lazy:n,trim:r,number:i}},o){if(t[Ss]=Vn(o),t.composing)return;const l=(i||t.type==="number")&&!/^0\d/.test(t.value)?Cs(t.value):t.value,f=e??"";l!==f&&(document.activeElement===t&&t.type!=="range"&&(n&&e===s||r&&t.value.trim()===f)||(t.value=f))}},Pl=["ctrl","shift","alt","meta"],Ml={stop:t=>t.stopPropagation(),prevent:t=>t.preventDefault(),self:t=>t.target!==t.currentTarget,ctrl:t=>!t.ctrlKey,shift:t=>!t.shiftKey,alt:t=>!t.altKey,meta:t=>!t.metaKey,left:t=>"button"in t&&t.button!==0,middle:t=>"button"in t&&t.button!==1,right:t=>"button"in t&&t.button!==2,exact:(t,e)=>Pl.some(s=>t[`${s}Key`]&&!e.includes(s))},kl=(t,e)=>{const s=t._withMods||(t._withMods={}),n=e.join(".");return s[n]||(s[n]=(r,...i)=>{for(let o=0;o{const s=t._withKeys||(t._withKeys={}),n=e.join(".");return s[n]||(s[n]=r=>{if(!("key"in r))return;const i=Jt(r.key);if(e.some(o=>o===i||Rl[o]===i))return t(r)})},Il=it({patchProp:El},al);let Bn;function Fl(){return Bn||(Bn=Fo(Il))}const ec=(...t)=>{const e=Fl().createApp(...t),{mount:s}=e;return e.mount=n=>{const r=jl(n);if(!r)return;const i=e._component;!D(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent="");const o=s(r,!1,Dl(r));return r instanceof Element&&(r.removeAttribute("v-cloak"),r.setAttribute("data-v-app","")),o},e};function Dl(t){if(t instanceof SVGElement)return"svg";if(typeof MathMLElement=="function"&&t instanceof MathMLElement)return"mathml"}function jl(t){return k(t)?document.querySelector(t):t}/*! + * pinia v2.3.1 + * (c) 2025 Eduardo San Martin Morote + * @license MIT + */let si;const us=t=>si=t,ni=Symbol();function Hs(t){return t&&typeof t=="object"&&Object.prototype.toString.call(t)==="[object Object]"&&typeof t.toJSON!="function"}var Ce;(function(t){t.direct="direct",t.patchObject="patch object",t.patchFunction="patch function"})(Ce||(Ce={}));function sc(){const t=er(!0),e=t.run(()=>br({}));let s=[],n=[];const r=Zs({install(i){us(r),r._a=i,i.provide(ni,r),i.config.globalProperties.$pinia=r,n.forEach(o=>s.push(o)),n=[]},use(i){return this._a?s.push(i):n.push(i),this},_p:s,_a:null,_e:t,_s:new Map,state:e});return r}const ri=()=>{};function Wn(t,e,s,n=ri){t.push(e);const r=()=>{const i=t.indexOf(e);i>-1&&(t.splice(i,1),n())};return!s&&sr()&&xi(r),r}function se(t,...e){t.slice().forEach(s=>{s(...e)})}const Hl=t=>t(),Gn=Symbol(),ws=Symbol();function Ns(t,e){t instanceof Map&&e instanceof Map?e.forEach((s,n)=>t.set(n,s)):t instanceof Set&&e instanceof Set&&e.forEach(t.add,t);for(const s in e){if(!e.hasOwnProperty(s))continue;const n=e[s],r=t[s];Hs(r)&&Hs(n)&&t.hasOwnProperty(s)&&!Q(n)&&!Ut(n)?t[s]=Ns(r,n):t[s]=n}return t}const Nl=Symbol();function Ll(t){return!Hs(t)||!t.hasOwnProperty(Nl)}const{assign:Lt}=Object;function $l(t){return!!(Q(t)&&t.effect)}function Kl(t,e,s,n){const{state:r,actions:i,getters:o}=e,l=s.state.value[t];let f;function h(){l||(s.state.value[t]=r?r():{});const a=Wi(s.state.value[t]);return Lt(a,i,Object.keys(o||{}).reduce((p,y)=>(p[y]=Zs(ti(()=>{us(s);const S=s._s.get(t);return o[y].call(S,S)})),p),{}))}return f=ii(t,h,e,s,n,!0),f}function ii(t,e,s={},n,r,i){let o;const l=Lt({actions:{}},s),f={deep:!0};let h,a,p=[],y=[],S;const E=n.state.value[t];!i&&!E&&(n.state.value[t]={}),br({});let A;function tt(F){let I;h=a=!1,typeof F=="function"?(F(n.state.value[t]),I={type:Ce.patchFunction,storeId:t,events:S}):(Ns(n.state.value[t],F),I={type:Ce.patchObject,payload:F,storeId:t,events:S});const G=A=Symbol();Sr().then(()=>{A===G&&(h=!0)}),a=!0,se(p,I,n.state.value[t])}const N=i?function(){const{state:I}=s,G=I?I():{};this.$patch(ot=>{Lt(ot,G)})}:ri;function W(){o.stop(),p=[],y=[],n._s.delete(t)}const U=(F,I="")=>{if(Gn in F)return F[ws]=I,F;const G=function(){us(n);const ot=Array.from(arguments),yt=[],Nt=[];function fe(j){yt.push(j)}function Fe(j){Nt.push(j)}se(y,{args:ot,name:G[ws],store:H,after:fe,onError:Fe});let Z;try{Z=F.apply(this&&this.$id===t?this:H,ot)}catch(j){throw se(Nt,j),j}return Z instanceof Promise?Z.then(j=>(se(yt,j),j)).catch(j=>(se(Nt,j),Promise.reject(j))):(se(yt,Z),Z)};return G[Gn]=!0,G[ws]=I,G},P={_p:n,$id:t,$onAction:Wn.bind(null,y),$patch:tt,$reset:N,$subscribe(F,I={}){const G=Wn(p,F,I.detached,()=>ot()),ot=o.run(()=>Ue(()=>n.state.value[t],yt=>{(I.flush==="sync"?a:h)&&F({storeId:t,type:Ce.direct,events:S},yt)},Lt({},f,I)));return G},$dispose:W},H=rs(P);n._s.set(t,H);const X=(n._a&&n._a.runWithContext||Hl)(()=>n._e.run(()=>(o=er()).run(()=>e({action:U}))));for(const F in X){const I=X[F];if(Q(I)&&!$l(I)||Ut(I))i||(E&&Ll(I)&&(Q(I)?I.value=E[F]:Ns(I,E[F])),n.state.value[t][F]=I);else if(typeof I=="function"){const G=U(I,F);X[F]=G,l.actions[F]=I}}return Lt(H,X),Lt($(H),X),Object.defineProperty(H,"$state",{get:()=>n.state.value[t],set:F=>{tt(I=>{Lt(I,F)})}}),n._p.forEach(F=>{Lt(H,o.run(()=>F({store:H,app:n._a,pinia:n,options:l})))}),E&&i&&s.hydrate&&s.hydrate(H.$state,E),h=!0,a=!0,H}/*! #__NO_SIDE_EFFECTS__ */function nc(t,e,s){let n,r;const i=typeof e=="function";typeof t=="string"?(n=t,r=i?s:e):(r=t,n=t.id);function o(l,f){const h=Eo();return l=l||(h?we(ni,null):null),l&&us(l),l=si,l._s.has(n)||(i?ii(n,e,r,l):Kl(n,r,l)),l._s.get(n)}return o.$id=n,o}export{kl as A,gt as B,Qo as C,Bl as D,Ql as E,Rt as F,tc as G,to as H,ec as I,sc as J,Wl as T,ce as a,Fr as b,ti as c,Gl as d,Ue as e,rs as f,on as g,Zl as h,we as i,Bs as j,nc as k,zl as l,Jo as m,Sr as n,lo as o,Co as p,Zr as q,br as r,Ul as s,yi as t,ql as u,zo as v,Yl as w,Ui as x,Xl as y,Jl as z}; diff --git a/mcphawk/web/static/index.html b/mcphawk/web/static/index.html new file mode 100644 index 0000000..1b0f692 --- /dev/null +++ b/mcphawk/web/static/index.html @@ -0,0 +1,16 @@ + + + + + + + MCPHawk - Model Context Protocol Debugger + + + + + + +
+ + \ No newline at end of file diff --git a/mcphawk/web/static/mcphawk_logo.png b/mcphawk/web/static/mcphawk_logo.png new file mode 100644 index 0000000..12b4f65 Binary files /dev/null and b/mcphawk/web/static/mcphawk_logo.png differ diff --git a/pyproject.toml b/pyproject.toml index 7e161ea..2b6370b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "mcphawk" -version = "0.3.0" +version = "0.4.0" description = "A passive MCP (Model Context Protocol) traffic sniffer for WebSocket-based MCP servers." authors = [ { name = "Your Name", email = "you@example.com" } @@ -29,7 +29,11 @@ dependencies = [ mcphawk = "mcphawk.cli:app" [tool.setuptools] -packages = ["mcphawk", "mcphawk.web"] +packages = {find = {where = ["."], include = ["mcphawk*"]}} +include-package-data = true + +[tool.setuptools.package-data] +"mcphawk.web" = ["static/**/*", "static/*", "static/assets/*"] [tool.ruff] # Exclude a variety of commonly ignored directories diff --git a/tests/integration/cli/test_cli.py b/tests/integration/cli/test_cli.py index 82fe703..d0d7f4a 100644 --- a/tests/integration/cli/test_cli.py +++ b/tests/integration/cli/test_cli.py @@ -145,7 +145,7 @@ def test_sniff_with_mcp_http(): ]) # Check MCP server startup message - assert "[MCPHawk] Starting MCP HTTP server on http://localhost:8765/mcp" in result.stdout + assert "Starting MCP HTTP server on http://localhost:8765/mcp" in result.stdout # Verify thread was started for MCP server mock_thread.assert_called_once() @@ -154,7 +154,7 @@ def test_sniff_with_mcp_http(): # Verify sniffer was called with excluded ports mock_start_sniffer.assert_called_once() call_args = mock_start_sniffer.call_args[1] - assert call_args['excluded_ports'] == [8765] + assert call_args['excluded_ports'] == [] def test_sniff_with_mcp_stdio(): @@ -171,7 +171,7 @@ def test_sniff_with_mcp_stdio(): ]) # Check MCP server startup message - assert "[MCPHawk] Starting MCP server on stdio" in result.stdout + assert "Starting MCP server on stdio" in result.stdout # Verify sniffer was called with empty excluded ports mock_start_sniffer.assert_called_once() @@ -194,12 +194,12 @@ def test_web_with_mcp_http(): ]) # Check MCP server startup message - assert "[MCPHawk] Starting MCP HTTP server on http://localhost:8766/mcp" in result.stdout + assert "Starting MCP HTTP server on http://localhost:8766/mcp" in result.stdout # Verify web was called with excluded ports mock_run_web.assert_called_once() call_args = mock_run_web.call_args[1] - assert call_args['excluded_ports'] == [8766] + assert call_args['excluded_ports'] == [] def test_mcp_command_custom_port(): @@ -241,7 +241,7 @@ def test_sniff_with_mcp_custom_port(): ]) # Check MCP server startup message with custom port - assert "[MCPHawk] Starting MCP HTTP server on http://localhost:7777/mcp" in result.stdout + assert "Starting MCP HTTP server on http://localhost:7777/mcp" in result.stdout # Verify thread was started for MCP server mock_thread.assert_called_once() @@ -250,7 +250,7 @@ def test_sniff_with_mcp_custom_port(): # Verify sniffer was called with custom port excluded mock_start_sniffer.assert_called_once() call_args = mock_start_sniffer.call_args[1] - assert call_args['excluded_ports'] == [7777] + assert call_args['excluded_ports'] == [] def test_mcp_stdio_ignores_port(): @@ -287,9 +287,9 @@ def test_web_with_mcp_default_vs_custom_port(): "--mcp-transport", "http" ]) - assert "[MCPHawk] Starting MCP HTTP server on http://localhost:8765/mcp" in result.stdout + assert "Starting MCP HTTP server on http://localhost:8765/mcp" in result.stdout call_args = mock_run_web.call_args[1] - assert call_args['excluded_ports'] == [8765] + assert call_args['excluded_ports'] == [] # Reset mocks mock_run_web.reset_mock() @@ -305,9 +305,9 @@ def test_web_with_mcp_default_vs_custom_port(): "--mcp-port", "5555" ]) - assert "[MCPHawk] Starting MCP HTTP server on http://localhost:5555/mcp" in result.stdout + assert "Starting MCP HTTP server on http://localhost:5555/mcp" in result.stdout call_args = mock_run_web.call_args[1] - assert call_args['excluded_ports'] == [5555] + assert call_args['excluded_ports'] == [] @patch('mcphawk.cli.start_sniffer') @@ -317,9 +317,9 @@ def test_sniff_command_with_port(mock_start_sniffer): result = runner.invoke(app, ["sniff", "--port", "3000"]) assert result.exit_code == 0 - assert "[MCPHawk] Starting sniffer with filter: tcp port 3000" in result.stdout - assert "[MCPHawk] Sniffer stopped." in result.stdout - mock_start_sniffer.assert_called_once_with(filter_expr="tcp port 3000", auto_detect=False, debug=False, excluded_ports=[], mcphawk_mcp_ports=[]) + assert "Starting sniffer with filter: tcp port 3000" in result.stdout + assert "Sniffer stopped." in result.stdout + mock_start_sniffer.assert_called_once_with(filter_expr="tcp port 3000", auto_detect=False, debug=False, excluded_ports=[]) @patch('mcphawk.cli.start_sniffer') @@ -329,8 +329,8 @@ def test_sniff_command_custom_filter(mock_start_sniffer): result = runner.invoke(app, ["sniff", "--filter", "tcp port 8080"]) assert result.exit_code == 0 - assert "[MCPHawk] Starting sniffer with filter: tcp port 8080" in result.stdout - mock_start_sniffer.assert_called_once_with(filter_expr="tcp port 8080", auto_detect=False, debug=False, excluded_ports=[], mcphawk_mcp_ports=[]) + assert "Starting sniffer with filter: tcp port 8080" in result.stdout + mock_start_sniffer.assert_called_once_with(filter_expr="tcp port 8080", auto_detect=False, debug=False, excluded_ports=[]) @patch('mcphawk.cli.start_sniffer') @@ -340,9 +340,9 @@ def test_sniff_command_auto_detect(mock_start_sniffer): result = runner.invoke(app, ["sniff", "--auto-detect"]) assert result.exit_code == 0 - assert "[MCPHawk] Auto-detect mode: monitoring all TCP traffic for MCP messages" in result.stdout - assert "[MCPHawk] Starting sniffer with filter: tcp" in result.stdout - mock_start_sniffer.assert_called_once_with(filter_expr="tcp", auto_detect=True, debug=False, excluded_ports=[], mcphawk_mcp_ports=[]) + assert "Auto-detect mode: monitoring all TCP traffic for MCP messages" in result.stdout + assert "Starting sniffer with filter: tcp" in result.stdout + mock_start_sniffer.assert_called_once_with(filter_expr="tcp", auto_detect=True, debug=False, excluded_ports=[]) def test_web_command_requires_flags(): @@ -361,7 +361,7 @@ def test_web_command_with_port(mock_run_web): """Test web command with port option.""" result = runner.invoke(app, ["web", "--port", "3000"]) assert result.exit_code == 0 - mock_run_web.assert_called_once_with(sniffer=True, host="127.0.0.1", port=8000, filter_expr="tcp port 3000", auto_detect=False, debug=False, excluded_ports=[], with_mcp=False, mcphawk_mcp_ports=[]) + mock_run_web.assert_called_once_with(sniffer=True, host="127.0.0.1", port=8000, filter_expr="tcp port 3000", auto_detect=False, debug=False, excluded_ports=[], with_mcp=False) @patch('mcphawk.cli.run_web') @@ -369,7 +369,7 @@ def test_web_command_no_sniffer(mock_run_web): """Test web command with --no-sniffer.""" result = runner.invoke(app, ["web", "--no-sniffer"]) assert result.exit_code == 0 - mock_run_web.assert_called_once_with(sniffer=False, host="127.0.0.1", port=8000, filter_expr=None, auto_detect=False, debug=False, excluded_ports=[], with_mcp=False, mcphawk_mcp_ports=[]) + mock_run_web.assert_called_once_with(sniffer=False, host="127.0.0.1", port=8000, filter_expr=None, auto_detect=False, debug=False, excluded_ports=[], with_mcp=False) @patch('mcphawk.cli.run_web') @@ -377,7 +377,7 @@ def test_web_command_custom_host_web_port(mock_run_web): """Test web command with custom host and web-port.""" result = runner.invoke(app, ["web", "--port", "3000", "--host", "0.0.0.0", "--web-port", "9000"]) assert result.exit_code == 0 - mock_run_web.assert_called_once_with(sniffer=True, host="0.0.0.0", port=9000, filter_expr="tcp port 3000", auto_detect=False, debug=False, excluded_ports=[], with_mcp=False, mcphawk_mcp_ports=[]) + mock_run_web.assert_called_once_with(sniffer=True, host="0.0.0.0", port=9000, filter_expr="tcp port 3000", auto_detect=False, debug=False, excluded_ports=[], with_mcp=False) @patch('mcphawk.cli.run_web') @@ -385,7 +385,7 @@ def test_web_command_with_filter(mock_run_web): """Test web command with custom filter.""" result = runner.invoke(app, ["web", "--filter", "tcp port 8080 or tcp port 8081"]) assert result.exit_code == 0 - mock_run_web.assert_called_once_with(sniffer=True, host="127.0.0.1", port=8000, filter_expr="tcp port 8080 or tcp port 8081", auto_detect=False, debug=False, excluded_ports=[], with_mcp=False, mcphawk_mcp_ports=[]) + mock_run_web.assert_called_once_with(sniffer=True, host="127.0.0.1", port=8000, filter_expr="tcp port 8080 or tcp port 8081", auto_detect=False, debug=False, excluded_ports=[], with_mcp=False) @patch('mcphawk.cli.run_web') @@ -393,7 +393,7 @@ def test_web_command_auto_detect(mock_run_web): """Test web command with auto-detect mode.""" result = runner.invoke(app, ["web", "--auto-detect"]) assert result.exit_code == 0 - mock_run_web.assert_called_once_with(sniffer=True, host="127.0.0.1", port=8000, filter_expr="tcp", auto_detect=True, debug=False, excluded_ports=[], with_mcp=False, mcphawk_mcp_ports=[]) + mock_run_web.assert_called_once_with(sniffer=True, host="127.0.0.1", port=8000, filter_expr="tcp", auto_detect=True, debug=False, excluded_ports=[], with_mcp=False) def test_scapy_warnings_suppressed(): @@ -421,7 +421,7 @@ def test_sniff_command_with_debug_flag(mock_start_sniffer): result = runner.invoke(app, ["sniff", "--port", "3000", "--debug"]) assert result.exit_code == 0 - mock_start_sniffer.assert_called_once_with(filter_expr="tcp port 3000", auto_detect=False, debug=True, excluded_ports=[], mcphawk_mcp_ports=[]) + mock_start_sniffer.assert_called_once_with(filter_expr="tcp port 3000", auto_detect=False, debug=True, excluded_ports=[]) @patch('mcphawk.cli.run_web') @@ -429,7 +429,7 @@ def test_web_command_with_debug_flag(mock_run_web): """Test web command with debug flag.""" result = runner.invoke(app, ["web", "--port", "3000", "--debug"]) assert result.exit_code == 0 - mock_run_web.assert_called_once_with(sniffer=True, host="127.0.0.1", port=8000, filter_expr="tcp port 3000", auto_detect=False, debug=True, excluded_ports=[], with_mcp=False, mcphawk_mcp_ports=[]) + mock_run_web.assert_called_once_with(sniffer=True, host="127.0.0.1", port=8000, filter_expr="tcp port 3000", auto_detect=False, debug=True, excluded_ports=[], with_mcp=False) @patch('mcphawk.cli.run_web') @@ -449,7 +449,7 @@ def test_web_command_with_mcp(mock_thread, mock_mcp_server, mock_run_web): # Check run_web was called with excluded ports # Default MCP transport is HTTP on port 8765 - # In non-debug mode, mcphawk_mcp_ports is empty + # MCPHawk's own MCP traffic is always captured mock_run_web.assert_called_once_with( sniffer=True, host="127.0.0.1", @@ -457,9 +457,8 @@ def test_web_command_with_mcp(mock_thread, mock_mcp_server, mock_run_web): filter_expr="tcp port 3000", auto_detect=False, debug=False, - excluded_ports=[8765], # Default HTTP MCP port is excluded + excluded_ports=[], # No longer excluding MCP port with_mcp=True, - mcphawk_mcp_ports=[], # Empty in non-debug mode ) diff --git a/tests/integration/mcp/test_mcp_stdio_integration.py b/tests/integration/mcp/test_mcp_stdio_integration.py index 9387312..170199f 100644 --- a/tests/integration/mcp/test_mcp_stdio_integration.py +++ b/tests/integration/mcp/test_mcp_stdio_integration.py @@ -213,7 +213,6 @@ def test_stdio_logging_to_stderr(self): assert "result" in response # Check stderr has log messages - assert "[MCPHawk]" in stderr assert "Starting MCP server" in stderr @pytest.mark.parametrize("tool_name,args,expected_in_result", [ diff --git a/tests/integration/network/test_sniffer.py b/tests/integration/network/test_sniffer.py index ca8f873..fd8e512 100644 --- a/tests/integration/network/test_sniffer.py +++ b/tests/integration/network/test_sniffer.py @@ -105,8 +105,8 @@ def setup_method(self): @patch('mcphawk.sniffer.log_message') @patch('mcphawk.sniffer._broadcast_in_any_loop') - @patch('builtins.print') - def test_auto_detect_prints_port_info(self, mock_print, mock_broadcast, mock_log): + @patch('mcphawk.sniffer.logger') + def test_auto_detect_prints_port_info(self, mock_logger, mock_broadcast, mock_log): """Test that auto-detect mode prints port information when MCP traffic is found.""" import mcphawk.sniffer mcphawk.sniffer._auto_detect_mode = True @@ -122,8 +122,8 @@ def test_auto_detect_prints_port_info(self, mock_print, mock_broadcast, mock_log packet_callback(mock_pkt) - # Check that port detection message was printed - mock_print.assert_any_call("[MCPHawk] Detected MCP traffic on port 54321 -> 3000") + # Check that port detection message was logged + mock_logger.info.assert_any_call("Detected MCP traffic on port 54321 -> 3000") # Verify log_message was called assert mock_log.called @@ -134,8 +134,8 @@ def test_auto_detect_prints_port_info(self, mock_print, mock_broadcast, mock_log @patch('mcphawk.sniffer.log_message') @patch('mcphawk.sniffer._broadcast_in_any_loop') - @patch('builtins.print') - def test_non_auto_detect_no_port_print(self, mock_print, mock_broadcast, mock_log): + @patch('mcphawk.sniffer.logger') + def test_non_auto_detect_no_port_print(self, mock_logger, mock_broadcast, mock_log): """Test that port info is not printed when not in auto-detect mode.""" import mcphawk.sniffer mcphawk.sniffer._auto_detect_mode = False @@ -150,9 +150,9 @@ def test_non_auto_detect_no_port_print(self, mock_print, mock_broadcast, mock_lo packet_callback(mock_pkt) - # Should not print port detection message - for call_args in mock_print.call_args_list: - assert "[MCPHawk] Detected MCP traffic on port" not in str(call_args) + # Should not log port detection message + for call in mock_logger.info.call_args_list: + assert "Detected MCP traffic on port" not in str(call) @patch('mcphawk.sniffer.sniff') def test_start_sniffer_auto_detect_flag(self, mock_sniff): @@ -174,9 +174,8 @@ class TestHTTPParsing: def setup_method(self): """Reset global state before each test.""" - import mcphawk.sniffer - # Clear MCPHawk MCP ports - mcphawk.sniffer._mcphawk_mcp_ports.clear() + # Reset any global state if needed + pass @patch('mcphawk.sniffer.log_message') @patch('mcphawk.sniffer._broadcast_in_any_loop') @@ -269,10 +268,6 @@ def test_http_without_jsonrpc_ignored(self, mock_broadcast, mock_log): @patch('mcphawk.sniffer._broadcast_in_any_loop') def test_mcphawk_mcp_traffic_server_info(self, mock_broadcast, mock_log): """Test that MCPHawk's own MCP traffic uses server info tracking.""" - import mcphawk.sniffer - # Set up MCPHawk MCP ports for this test - mcphawk.sniffer._mcphawk_mcp_ports = {8765} - # Simulate an initialize response with serverInfo http_response = ( b'HTTP/1.1 200 OK\r\n' @@ -299,19 +294,15 @@ def test_mcphawk_mcp_traffic_server_info(self, mock_broadcast, mock_log): packet_callback(mock_pkt) - # The test now verifies that server info tracking works for MCPHawk's own server - # This happens through the normal server registry mechanism, not special metadata + # Verify the server info was logged + assert mock_log.called + # The test verifies that server info tracking works through the normal server registry mechanism def test_state_isolation_between_tests(self): """Test that state is properly isolated between tests.""" - import mcphawk.sniffer - # Verify state is clean at the start of the test - assert len(mcphawk.sniffer._mcphawk_mcp_ports) == 0 - - # Modify state - mcphawk.sniffer._mcphawk_mcp_ports.add(9999) - - # State will be cleaned up by setup_method before next test + # MCPHawk ports no longer tracked separately + pass + # State isolation is maintained through other global variables @patch('mcphawk.sniffer.log_message') @patch('mcphawk.sniffer._broadcast_in_any_loop') diff --git a/tests/integration/web/test_web_server.py b/tests/integration/web/test_web_server.py index 89bc655..2af82b3 100644 --- a/tests/integration/web/test_web_server.py +++ b/tests/integration/web/test_web_server.py @@ -132,7 +132,7 @@ def test_run_web_with_sniffer(): ) # Verify sniffer was started - mock_start_sniffer.assert_called_once_with("tcp port 3000", False, True, None, None) + mock_start_sniffer.assert_called_once_with("tcp port 3000", False, True, None) # Verify uvicorn was started with correct params mock_uvicorn.assert_called_once()
+ Date + Time + Type + ID + Message + Server + Transport + Source → Dest + Port + PID