neural-loom 0.2.9 → 0.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +3 -3
- package/.next/cache/.previewinfo +1 -1
- package/.next/cache/.rscinfo +1 -1
- package/.next/cache/.tsbuildinfo +1 -1
- package/.next/diagnostics/route-bundle-stats.json +2 -2
- package/.next/fallback-build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +1 -1
- package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +2 -2
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/index.segments/_full.segment.rsc +2 -2
- package/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/page/react-loadable-manifest.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0d0pykb._.js +5 -5
- package/.next/server/chunks/[root-of-the-server]__0d0pykb._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__0e5cwnx._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0e5cwnx._.js.map +1 -1
- package/.next/server/chunks/ssr/_0t7oqy6._.js +1 -1
- package/.next/server/chunks/ssr/_0t7oqy6._.js.map +1 -1
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/{0.fe1iw3rves5.js → 0r1._76-1rt.-.js} +1 -1
- package/.next/static/chunks/178yphwi3n~oc.js +1 -0
- package/.next/trace +1 -1
- package/.next/trace-build +1 -1
- package/package.json +1 -1
- package/src/app/api/context/claude/route.ts +4 -1
- package/src/app/components/ClaudeWizard.tsx +17 -0
- package/src/app/page.tsx +1 -1
- package/src/lib/agents/ClaudeRunner.ts +19 -3
- package/src/lib/agents/DockerRunner.ts +15 -1
- package/src/lib/agents/SSHRunner.ts +15 -1
- package/.next/static/chunks/03wk6d_hkj.x2.js +0 -1
- /package/.next/static/{Zdg5QHFrz2LSBAcINdqar → IUac8eI99EN-VEZyfxyCO}/_buildManifest.js +0 -0
- /package/.next/static/{Zdg5QHFrz2LSBAcINdqar → IUac8eI99EN-VEZyfxyCO}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{Zdg5QHFrz2LSBAcINdqar → IUac8eI99EN-VEZyfxyCO}/_ssgManifest.js +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
2:I[39756,["/_next/static/chunks/0dbhjjzl8qfwv.js"],"default"]
|
|
3
3
|
3:I[37457,["/_next/static/chunks/0dbhjjzl8qfwv.js"],"default"]
|
|
4
4
|
4:I[47257,["/_next/static/chunks/0dbhjjzl8qfwv.js"],"ClientPageRoot"]
|
|
5
|
-
5:I[52683,["/_next/static/chunks/0dbhjjzl8qfwv.js","/_next/static/chunks/
|
|
5
|
+
5:I[52683,["/_next/static/chunks/0dbhjjzl8qfwv.js","/_next/static/chunks/0r1._76-1rt.-.js"],"default"]
|
|
6
6
|
8:I[97367,["/_next/static/chunks/0dbhjjzl8qfwv.js"],"OutletBoundary"]
|
|
7
7
|
9:"$Sreact.suspense"
|
|
8
8
|
b:I[97367,["/_next/static/chunks/0dbhjjzl8qfwv.js"],"ViewportBoundary"]
|
|
@@ -12,7 +12,7 @@ f:I[68027,["/_next/static/chunks/0dbhjjzl8qfwv.js"],"default",1]
|
|
|
12
12
|
:HL["/_next/static/media/797e433ab948586e-s.p.08e28id.o-okb.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
13
13
|
:HL["/_next/static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
14
14
|
:HL["/_next/static/chunks/0pp.lp89pntpv.css","style"]
|
|
15
|
-
0:{"P":null,"c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/139c54uo1w7.4.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/0dbhjjzl8qfwv.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","className":"geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable","children":["$","body",null,{"children":["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]]}],{"children":[["$","$1","c",{"children":[["$","$L4",null,{"Component":"$5","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@6","$@7"]}}],[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0pp.lp89pntpv.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/
|
|
15
|
+
0:{"P":null,"c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/139c54uo1w7.4.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/0dbhjjzl8qfwv.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","className":"geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable","children":["$","body",null,{"children":["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]]}],{"children":[["$","$1","c",{"children":[["$","$L4",null,{"Component":"$5","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@6","$@7"]}}],[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0pp.lp89pntpv.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/0r1._76-1rt.-.js","async":true,"nonce":"$undefined"}]],["$","$L8",null,{"children":["$","$9",null,{"name":"Next.MetadataOutlet","children":"$@a"}]}]]}],{},null,false,null]},null,false,null],["$","$1","h",{"children":[null,["$","$Lb",null,{"children":"$Lc"}],["$","div",null,{"hidden":true,"children":["$","$Ld",null,{"children":["$","$9",null,{"name":"Next.Metadata","children":"$Le"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$f",[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/139c54uo1w7.4.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"IUac8eI99EN-VEZyfxyCO"}
|
|
16
16
|
6:{}
|
|
17
17
|
7:"$0:f:0:1:1:children:0:props:children:0:props:serverProvidedParams:params"
|
|
18
18
|
c:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
1:"$Sreact.fragment"
|
|
2
2
|
2:I[47257,["/_next/static/chunks/0dbhjjzl8qfwv.js"],"ClientPageRoot"]
|
|
3
|
-
3:I[52683,["/_next/static/chunks/0dbhjjzl8qfwv.js","/_next/static/chunks/
|
|
3
|
+
3:I[52683,["/_next/static/chunks/0dbhjjzl8qfwv.js","/_next/static/chunks/0r1._76-1rt.-.js"],"default"]
|
|
4
4
|
6:I[97367,["/_next/static/chunks/0dbhjjzl8qfwv.js"],"OutletBoundary"]
|
|
5
5
|
7:"$Sreact.suspense"
|
|
6
6
|
:HL["/_next/static/chunks/0pp.lp89pntpv.css","style"]
|
|
7
|
-
0:{"rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0pp.lp89pntpv.css","precedence":"next"}],["$","script","script-0",{"src":"/_next/static/chunks/
|
|
7
|
+
0:{"rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0pp.lp89pntpv.css","precedence":"next"}],["$","script","script-0",{"src":"/_next/static/chunks/0r1._76-1rt.-.js","async":true}]],["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"IUac8eI99EN-VEZyfxyCO"}
|
|
8
8
|
4:{}
|
|
9
9
|
5:"$0:rsc:props:children:0:props:serverProvidedParams:params"
|
|
10
10
|
8:null
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
2:I[39756,["/_next/static/chunks/0dbhjjzl8qfwv.js"],"default"]
|
|
3
3
|
3:I[37457,["/_next/static/chunks/0dbhjjzl8qfwv.js"],"default"]
|
|
4
4
|
4:I[47257,["/_next/static/chunks/0dbhjjzl8qfwv.js"],"ClientPageRoot"]
|
|
5
|
-
5:I[52683,["/_next/static/chunks/0dbhjjzl8qfwv.js","/_next/static/chunks/
|
|
5
|
+
5:I[52683,["/_next/static/chunks/0dbhjjzl8qfwv.js","/_next/static/chunks/0r1._76-1rt.-.js"],"default"]
|
|
6
6
|
8:I[97367,["/_next/static/chunks/0dbhjjzl8qfwv.js"],"OutletBoundary"]
|
|
7
7
|
9:"$Sreact.suspense"
|
|
8
8
|
b:I[97367,["/_next/static/chunks/0dbhjjzl8qfwv.js"],"ViewportBoundary"]
|
|
@@ -12,7 +12,7 @@ f:I[68027,["/_next/static/chunks/0dbhjjzl8qfwv.js"],"default",1]
|
|
|
12
12
|
:HL["/_next/static/media/797e433ab948586e-s.p.08e28id.o-okb.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
13
13
|
:HL["/_next/static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
14
14
|
:HL["/_next/static/chunks/0pp.lp89pntpv.css","style"]
|
|
15
|
-
0:{"P":null,"c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/139c54uo1w7.4.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/0dbhjjzl8qfwv.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","className":"geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable","children":["$","body",null,{"children":["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]]}],{"children":[["$","$1","c",{"children":[["$","$L4",null,{"Component":"$5","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@6","$@7"]}}],[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0pp.lp89pntpv.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/
|
|
15
|
+
0:{"P":null,"c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/139c54uo1w7.4.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/0dbhjjzl8qfwv.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","className":"geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable","children":["$","body",null,{"children":["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]]}],{"children":[["$","$1","c",{"children":[["$","$L4",null,{"Component":"$5","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@6","$@7"]}}],[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/0pp.lp89pntpv.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/_next/static/chunks/0r1._76-1rt.-.js","async":true,"nonce":"$undefined"}]],["$","$L8",null,{"children":["$","$9",null,{"name":"Next.MetadataOutlet","children":"$@a"}]}]]}],{},null,false,null]},null,false,null],["$","$1","h",{"children":[null,["$","$Lb",null,{"children":"$Lc"}],["$","div",null,{"hidden":true,"children":["$","$Ld",null,{"children":["$","$9",null,{"name":"Next.Metadata","children":"$Le"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$f",[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/139c54uo1w7.4.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"IUac8eI99EN-VEZyfxyCO"}
|
|
16
16
|
6:{}
|
|
17
17
|
7:"$0:f:0:1:1:children:0:props:children:0:props:serverProvidedParams:params"
|
|
18
18
|
c:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]
|
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
3:I[97367,["/_next/static/chunks/0dbhjjzl8qfwv.js"],"MetadataBoundary"]
|
|
4
4
|
4:"$Sreact.suspense"
|
|
5
5
|
5:I[27201,["/_next/static/chunks/0dbhjjzl8qfwv.js"],"IconMark"]
|
|
6
|
-
0:{"rsc":["$","$1","h",{"children":[null,["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"NeuralLoom - Unified AI Agent Orchestrator & Context Bridge"}],["$","meta","1",{"name":"description","content":"Advanced console dashboard and context staging manager for Claude Code and simulated AI agents."}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.0x3dzn~oxb6tn.ico","sizes":"256x256","type":"image/x-icon"}],["$","$L5","3",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"
|
|
6
|
+
0:{"rsc":["$","$1","h",{"children":[null,["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"NeuralLoom - Unified AI Agent Orchestrator & Context Bridge"}],["$","meta","1",{"name":"description","content":"Advanced console dashboard and context staging manager for Claude Code and simulated AI agents."}],["$","link","2",{"rel":"icon","href":"/favicon.ico?favicon.0x3dzn~oxb6tn.ico","sizes":"256x256","type":"image/x-icon"}],["$","$L5","3",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"IUac8eI99EN-VEZyfxyCO"}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
2:I[39756,["/_next/static/chunks/0dbhjjzl8qfwv.js"],"default"]
|
|
3
3
|
3:I[37457,["/_next/static/chunks/0dbhjjzl8qfwv.js"],"default"]
|
|
4
4
|
:HL["/_next/static/chunks/139c54uo1w7.4.css","style"]
|
|
5
|
-
0:{"rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/139c54uo1w7.4.css","precedence":"next"}],["$","script","script-0",{"src":"/_next/static/chunks/0dbhjjzl8qfwv.js","async":true}]],["$","html",null,{"lang":"en","className":"geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable","children":["$","body",null,{"children":["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}]}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"
|
|
5
|
+
0:{"rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/chunks/139c54uo1w7.4.css","precedence":"next"}],["$","script","script-0",{"src":"/_next/static/chunks/0dbhjjzl8qfwv.js","async":true}]],["$","html",null,{"lang":"en","className":"geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable","children":["$","body",null,{"children":["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}]}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"IUac8eI99EN-VEZyfxyCO"}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
:HL["/_next/static/media/797e433ab948586e-s.p.08e28id.o-okb.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
3
3
|
:HL["/_next/static/media/caa3a2e1cccd8315-s.p.09~u27dqhyhd6.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
|
|
4
4
|
:HL["/_next/static/chunks/0pp.lp89pntpv.css","style"]
|
|
5
|
-
0:{"tree":{"name":"","param":null,"prefetchHints":16,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":0,"slots":null}}},"staleTime":300,"buildId":"
|
|
5
|
+
0:{"tree":{"name":"","param":null,"prefetchHints":16,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":0,"slots":null}}},"staleTime":300,"buildId":"IUac8eI99EN-VEZyfxyCO"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
globalThis.__RSC_MANIFEST = globalThis.__RSC_MANIFEST || {};
|
|
2
|
-
globalThis.__RSC_MANIFEST["/page"] = {"moduleLoading":{"prefix":"","crossOrigin":null},"clientModules":{"[project]/node_modules/next/dist/esm/client/components/layout-router.js <module evaluation>":{"id":39756,"name":"*","chunks":["/_next/static/chunks/0dbhjjzl8qfwv.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/layout-router.js":{"id":39756,"name":"*","chunks":["/_next/static/chunks/0dbhjjzl8qfwv.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/render-from-template-context.js <module evaluation>":{"id":37457,"name":"*","chunks":["/_next/static/chunks/0dbhjjzl8qfwv.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":37457,"name":"*","chunks":["/_next/static/chunks/0dbhjjzl8qfwv.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/client-page.js <module evaluation>":{"id":47257,"name":"*","chunks":["/_next/static/chunks/0dbhjjzl8qfwv.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/client-page.js":{"id":47257,"name":"*","chunks":["/_next/static/chunks/0dbhjjzl8qfwv.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/client-segment.js <module evaluation>":{"id":92825,"name":"*","chunks":["/_next/static/chunks/0dbhjjzl8qfwv.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/client-segment.js":{"id":92825,"name":"*","chunks":["/_next/static/chunks/0dbhjjzl8qfwv.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js <module evaluation>":{"id":68017,"name":"*","chunks":["/_next/static/chunks/0dbhjjzl8qfwv.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":68017,"name":"*","chunks":["/_next/static/chunks/0dbhjjzl8qfwv.js"],"async":false},"[project]/node_modules/next/dist/esm/lib/framework/boundary-components.js <module evaluation>":{"id":97367,"name":"*","chunks":["/_next/static/chunks/0dbhjjzl8qfwv.js"],"async":false},"[project]/node_modules/next/dist/esm/lib/framework/boundary-components.js":{"id":97367,"name":"*","chunks":["/_next/static/chunks/0dbhjjzl8qfwv.js"],"async":false},"[project]/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js <module evaluation>":{"id":27201,"name":"*","chunks":["/_next/static/chunks/0dbhjjzl8qfwv.js"],"async":false},"[project]/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js":{"id":27201,"name":"*","chunks":["/_next/static/chunks/0dbhjjzl8qfwv.js"],"async":false},"[project]/node_modules/next/dist/client/components/builtin/global-error.js <module evaluation>":{"id":68027,"name":"*","chunks":["/_next/static/chunks/0dbhjjzl8qfwv.js"],"async":false},"[project]/node_modules/next/dist/client/components/builtin/global-error.js":{"id":68027,"name":"*","chunks":["/_next/static/chunks/0dbhjjzl8qfwv.js"],"async":false},"[project]/src/app/page.tsx <module evaluation>":{"id":52683,"name":"*","chunks":["/_next/static/chunks/0dbhjjzl8qfwv.js","/_next/static/chunks/
|
|
2
|
+
globalThis.__RSC_MANIFEST["/page"] = {"moduleLoading":{"prefix":"","crossOrigin":null},"clientModules":{"[project]/node_modules/next/dist/esm/client/components/layout-router.js <module evaluation>":{"id":39756,"name":"*","chunks":["/_next/static/chunks/0dbhjjzl8qfwv.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/layout-router.js":{"id":39756,"name":"*","chunks":["/_next/static/chunks/0dbhjjzl8qfwv.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/render-from-template-context.js <module evaluation>":{"id":37457,"name":"*","chunks":["/_next/static/chunks/0dbhjjzl8qfwv.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":37457,"name":"*","chunks":["/_next/static/chunks/0dbhjjzl8qfwv.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/client-page.js <module evaluation>":{"id":47257,"name":"*","chunks":["/_next/static/chunks/0dbhjjzl8qfwv.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/client-page.js":{"id":47257,"name":"*","chunks":["/_next/static/chunks/0dbhjjzl8qfwv.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/client-segment.js <module evaluation>":{"id":92825,"name":"*","chunks":["/_next/static/chunks/0dbhjjzl8qfwv.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/client-segment.js":{"id":92825,"name":"*","chunks":["/_next/static/chunks/0dbhjjzl8qfwv.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js <module evaluation>":{"id":68017,"name":"*","chunks":["/_next/static/chunks/0dbhjjzl8qfwv.js"],"async":false},"[project]/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":68017,"name":"*","chunks":["/_next/static/chunks/0dbhjjzl8qfwv.js"],"async":false},"[project]/node_modules/next/dist/esm/lib/framework/boundary-components.js <module evaluation>":{"id":97367,"name":"*","chunks":["/_next/static/chunks/0dbhjjzl8qfwv.js"],"async":false},"[project]/node_modules/next/dist/esm/lib/framework/boundary-components.js":{"id":97367,"name":"*","chunks":["/_next/static/chunks/0dbhjjzl8qfwv.js"],"async":false},"[project]/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js <module evaluation>":{"id":27201,"name":"*","chunks":["/_next/static/chunks/0dbhjjzl8qfwv.js"],"async":false},"[project]/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js":{"id":27201,"name":"*","chunks":["/_next/static/chunks/0dbhjjzl8qfwv.js"],"async":false},"[project]/node_modules/next/dist/client/components/builtin/global-error.js <module evaluation>":{"id":68027,"name":"*","chunks":["/_next/static/chunks/0dbhjjzl8qfwv.js"],"async":false},"[project]/node_modules/next/dist/client/components/builtin/global-error.js":{"id":68027,"name":"*","chunks":["/_next/static/chunks/0dbhjjzl8qfwv.js"],"async":false},"[project]/src/app/page.tsx <module evaluation>":{"id":52683,"name":"*","chunks":["/_next/static/chunks/0dbhjjzl8qfwv.js","/_next/static/chunks/0r1._76-1rt.-.js"],"async":false},"[project]/src/app/page.tsx":{"id":52683,"name":"*","chunks":["/_next/static/chunks/0dbhjjzl8qfwv.js","/_next/static/chunks/0r1._76-1rt.-.js"],"async":false}},"ssrModuleMapping":{"39756":{"*":{"id":2420,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0uk0awy._.js","server/chunks/ssr/node_modules_next_dist_0qoh8ry._.js"],"async":false}},"37457":{"*":{"id":24017,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0uk0awy._.js","server/chunks/ssr/node_modules_next_dist_0qoh8ry._.js"],"async":false}},"47257":{"*":{"id":77682,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0uk0awy._.js","server/chunks/ssr/node_modules_next_dist_0qoh8ry._.js"],"async":false}},"92825":{"*":{"id":97296,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0uk0awy._.js","server/chunks/ssr/node_modules_next_dist_0qoh8ry._.js"],"async":false}},"68017":{"*":{"id":61660,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0uk0awy._.js","server/chunks/ssr/node_modules_next_dist_0qoh8ry._.js"],"async":false}},"97367":{"*":{"id":90574,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0uk0awy._.js","server/chunks/ssr/node_modules_next_dist_0qoh8ry._.js"],"async":false}},"27201":{"*":{"id":60704,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0uk0awy._.js","server/chunks/ssr/node_modules_next_dist_0qoh8ry._.js"],"async":false}},"68027":{"*":{"id":40622,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0uk0awy._.js","server/chunks/ssr/node_modules_next_dist_0qoh8ry._.js","server/chunks/ssr/node_modules_09w7yel._.js"],"async":false}},"52683":{"*":{"id":40777,"name":"*","chunks":["server/chunks/ssr/[root-of-the-server]__0uk0awy._.js","server/chunks/ssr/node_modules_next_dist_0qoh8ry._.js","server/chunks/ssr/node_modules_@swc_helpers_cjs__interop_require_default_cjs_11~q6fv._.js","server/chunks/ssr/_0t7oqy6._.js"],"async":false}}},"edgeSSRModuleMapping":{},"rscModuleMapping":{"39756":{"*":{"id":26768,"name":"*","chunks":[],"async":false}},"37457":{"*":{"id":17910,"name":"*","chunks":[],"async":false}},"47257":{"*":{"id":92977,"name":"*","chunks":[],"async":false}},"92825":{"*":{"id":48552,"name":"*","chunks":[],"async":false}},"68017":{"*":{"id":83919,"name":"*","chunks":[],"async":false}},"97367":{"*":{"id":24150,"name":"*","chunks":[],"async":false}},"27201":{"*":{"id":40771,"name":"*","chunks":[],"async":false}},"68027":{"*":{"id":82509,"name":"*","chunks":[],"async":false}},"52683":{"*":{"id":56983,"name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{},"entryCSSFiles":{"[project]/src/app/layout":[{"path":"static/chunks/139c54uo1w7.4.css","inlined":false}],"[project]/node_modules/next/dist/client/components/builtin/global-error":[{"path":"static/chunks/139c54uo1w7.4.css","inlined":false}],"[project]/src/app/page":[{"path":"static/chunks/139c54uo1w7.4.css","inlined":false},{"path":"static/chunks/0pp.lp89pntpv.css","inlined":false}]},"entryJSFiles":{"[project]/src/app/layout":["static/chunks/0dbhjjzl8qfwv.js"],"[project]/node_modules/next/dist/client/components/builtin/global-error":["static/chunks/0dbhjjzl8qfwv.js"],"[project]/src/app/page":["static/chunks/0dbhjjzl8qfwv.js","static/chunks/0r1._76-1rt.-.js"]}};
|
|
3
3
|
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
module.exports=[54799,(e,t,s)=>{t.exports=e.x("crypto",()=>require("crypto"))},27699,(e,t,s)=>{t.exports=e.x("events",()=>require("events"))},24836,(e,t,s)=>{t.exports=e.x("https",()=>require("https"))},21517,(e,t,s)=>{t.exports=e.x("http",()=>require("http"))},4446,(e,t,s)=>{t.exports=e.x("net",()=>require("net"))},55004,(e,t,s)=>{t.exports=e.x("tls",()=>require("tls"))},88947,(e,t,s)=>{t.exports=e.x("stream",()=>require("stream"))},92509,(e,t,s)=>{t.exports=e.x("url",()=>require("url"))},6461,(e,t,s)=>{t.exports=e.x("zlib",()=>require("zlib"))},74836,(e,t,s)=>{"use strict";let r=["nodebuffer","arraybuffer","fragments"],i="u">typeof Blob;i&&r.push("blob"),t.exports={BINARY_TYPES:r,CLOSE_TIMEOUT:3e4,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:i,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}},97970,(e,t,s)=>{"use strict";let{EMPTY_BUFFER:r}=e.r(74836),i=Buffer[Symbol.species];function o(e,t,s,r,i){for(let o=0;o<i;o++)s[r+o]=e[o]^t[3&o]}function n(e,t){for(let s=0;s<e.length;s++)e[s]^=t[3&s]}function a(e){let t;return(a.readOnly=!0,Buffer.isBuffer(e))?e:(e instanceof ArrayBuffer?t=new i(e):ArrayBuffer.isView(e)?t=new i(e.buffer,e.byteOffset,e.byteLength):(t=Buffer.from(e),a.readOnly=!1),t)}if(t.exports={concat:function(e,t){if(0===e.length)return r;if(1===e.length)return e[0];let s=Buffer.allocUnsafe(t),o=0;for(let t=0;t<e.length;t++){let r=e[t];s.set(r,o),o+=r.length}return o<t?new i(s.buffer,s.byteOffset,o):s},mask:o,toArrayBuffer:function(e){return e.length===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.length)},toBuffer:a,unmask:n},!process.env.WS_NO_BUFFER_UTIL)try{let e=(()=>{let e=Error("Cannot find module 'bufferutil'");throw e.code="MODULE_NOT_FOUND",e})();t.exports.mask=function(t,s,r,i,n){n<48?o(t,s,r,i,n):e.mask(t,s,r,i,n)},t.exports.unmask=function(t,s){t.length<32?n(t,s):e.unmask(t,s)}}catch(e){}},62048,(e,t,s)=>{"use strict";let r=Symbol("kDone"),i=Symbol("kRun");class o{constructor(e){this[r]=()=>{this.pending--,this[i]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[i]()}[i](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[r])}}}t.exports=o},80295,(e,t,s)=>{"use strict";let r,i=e.r(6461),o=e.r(97970),n=e.r(62048),{kStatusCode:a}=e.r(74836),l=Buffer[Symbol.species],h=Buffer.from([0,0,255,255]),c=Symbol("permessage-deflate"),d=Symbol("total-length"),p=Symbol("callback"),u=Symbol("buffers"),f=Symbol("error");class m{constructor(e){this._options=e||{},this._threshold=void 0!==this._options.threshold?this._options.threshold:1024,this._maxPayload=0|this._options.maxPayload,this._isServer=!!this._options.isServer,this._deflate=null,this._inflate=null,this.params=null,r||(r=new n(void 0!==this._options.concurrencyLimit?this._options.concurrencyLimit:10))}static get extensionName(){return"permessage-deflate"}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:null==this._options.clientMaxWindowBits&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let e=this._deflate[p];this._deflate.close(),this._deflate=null,e&&e(Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){let t=this._options,s=e.find(e=>(!1!==t.serverNoContextTakeover||!e.server_no_context_takeover)&&(!e.server_max_window_bits||!1!==t.serverMaxWindowBits&&("number"!=typeof t.serverMaxWindowBits||!(t.serverMaxWindowBits>e.server_max_window_bits)))&&("number"!=typeof t.clientMaxWindowBits||!!e.client_max_window_bits));if(!s)throw Error("None of the extension offers can be accepted");return t.serverNoContextTakeover&&(s.server_no_context_takeover=!0),t.clientNoContextTakeover&&(s.client_no_context_takeover=!0),"number"==typeof t.serverMaxWindowBits&&(s.server_max_window_bits=t.serverMaxWindowBits),"number"==typeof t.clientMaxWindowBits?s.client_max_window_bits=t.clientMaxWindowBits:(!0===s.client_max_window_bits||!1===t.clientMaxWindowBits)&&delete s.client_max_window_bits,s}acceptAsClient(e){let t=e[0];if(!1===this._options.clientNoContextTakeover&&t.client_no_context_takeover)throw Error('Unexpected parameter "client_no_context_takeover"');if(t.client_max_window_bits){if(!1===this._options.clientMaxWindowBits||"number"==typeof this._options.clientMaxWindowBits&&t.client_max_window_bits>this._options.clientMaxWindowBits)throw Error('Unexpected or invalid parameter "client_max_window_bits"')}else"number"==typeof this._options.clientMaxWindowBits&&(t.client_max_window_bits=this._options.clientMaxWindowBits);return t}normalizeParams(e){return e.forEach(e=>{Object.keys(e).forEach(t=>{let s=e[t];if(s.length>1)throw Error(`Parameter "${t}" must have only a single value`);if(s=s[0],"client_max_window_bits"===t){if(!0!==s){let e=+s;if(!Number.isInteger(e)||e<8||e>15)throw TypeError(`Invalid value for parameter "${t}": ${s}`);s=e}else if(!this._isServer)throw TypeError(`Invalid value for parameter "${t}": ${s}`)}else if("server_max_window_bits"===t){let e=+s;if(!Number.isInteger(e)||e<8||e>15)throw TypeError(`Invalid value for parameter "${t}": ${s}`);s=e}else if("client_no_context_takeover"===t||"server_no_context_takeover"===t){if(!0!==s)throw TypeError(`Invalid value for parameter "${t}": ${s}`)}else throw Error(`Unknown parameter "${t}"`);e[t]=s})}),e}decompress(e,t,s){r.add(r=>{this._decompress(e,t,(e,t)=>{r(),s(e,t)})})}compress(e,t,s){r.add(r=>{this._compress(e,t,(e,t)=>{r(),s(e,t)})})}_decompress(e,t,s){let r=this._isServer?"client":"server";if(!this._inflate){let e=`${r}_max_window_bits`,t="number"!=typeof this.params[e]?i.Z_DEFAULT_WINDOWBITS:this.params[e];this._inflate=i.createInflateRaw({...this._options.zlibInflateOptions,windowBits:t}),this._inflate[c]=this,this._inflate[d]=0,this._inflate[u]=[],this._inflate.on("error",y),this._inflate.on("data",g)}this._inflate[p]=s,this._inflate.write(e),t&&this._inflate.write(h),this._inflate.flush(()=>{let e=this._inflate[f];if(e){this._inflate.close(),this._inflate=null,s(e);return}let i=o.concat(this._inflate[u],this._inflate[d]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[d]=0,this._inflate[u]=[],t&&this.params[`${r}_no_context_takeover`]&&this._inflate.reset()),s(null,i)})}_compress(e,t,s){let r=this._isServer?"server":"client";if(!this._deflate){let e=`${r}_max_window_bits`,t="number"!=typeof this.params[e]?i.Z_DEFAULT_WINDOWBITS:this.params[e];this._deflate=i.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:t}),this._deflate[d]=0,this._deflate[u]=[],this._deflate.on("data",_)}this._deflate[p]=s,this._deflate.write(e),this._deflate.flush(i.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let e=o.concat(this._deflate[u],this._deflate[d]);t&&(e=new l(e.buffer,e.byteOffset,e.length-4)),this._deflate[p]=null,this._deflate[d]=0,this._deflate[u]=[],t&&this.params[`${r}_no_context_takeover`]&&this._deflate.reset(),s(null,e)})}}function _(e){this[u].push(e),this[d]+=e.length}function g(e){(this[d]+=e.length,this[c]._maxPayload<1||this[d]<=this[c]._maxPayload)?this[u].push(e):(this[f]=RangeError("Max payload size exceeded"),this[f].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[f][a]=1009,this.removeListener("data",g),this.reset())}function y(e){(this[c]._inflate=null,this[f])?this[p](this[f]):(e[a]=1007,this[p](e))}t.exports=m},874,(e,t,s)=>{t.exports=e.x("buffer",()=>require("buffer"))},58739,(e,t,s)=>{"use strict";let{isUtf8:r}=e.r(874),{hasBlob:i}=e.r(74836);function o(e){let t=e.length,s=0;for(;s<t;)if((128&e[s])==0)s++;else if((224&e[s])==192){if(s+1===t||(192&e[s+1])!=128||(254&e[s])==192)return!1;s+=2}else if((240&e[s])==224){if(s+2>=t||(192&e[s+1])!=128||(192&e[s+2])!=128||224===e[s]&&(224&e[s+1])==128||237===e[s]&&(224&e[s+1])==160)return!1;s+=3}else{if((248&e[s])!=240||s+3>=t||(192&e[s+1])!=128||(192&e[s+2])!=128||(192&e[s+3])!=128||240===e[s]&&(240&e[s+1])==128||244===e[s]&&e[s+1]>143||e[s]>244)return!1;s+=4}return!0}if(t.exports={isBlob:function(e){return i&&"object"==typeof e&&"function"==typeof e.arrayBuffer&&"string"==typeof e.type&&"function"==typeof e.stream&&("Blob"===e[Symbol.toStringTag]||"File"===e[Symbol.toStringTag])},isValidStatusCode:function(e){return e>=1e3&&e<=1014&&1004!==e&&1005!==e&&1006!==e||e>=3e3&&e<=4999},isValidUTF8:o,tokenChars:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0]},r)t.exports.isValidUTF8=function(e){return e.length<24?o(e):r(e)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let e=(()=>{let e=Error("Cannot find module 'utf-8-validate'");throw e.code="MODULE_NOT_FOUND",e})();t.exports.isValidUTF8=function(t){return t.length<32?o(t):e(t)}}catch(e){}},29485,(e,t,s)=>{"use strict";let{Writable:r}=e.r(88947),i=e.r(80295),{BINARY_TYPES:o,EMPTY_BUFFER:n,kStatusCode:a,kWebSocket:l}=e.r(74836),{concat:h,toArrayBuffer:c,unmask:d}=e.r(97970),{isValidStatusCode:p,isValidUTF8:u}=e.r(58739),f=Buffer[Symbol.species],m=0,_=1,g=2,y=3,b=4,S=5,x=6;class v extends r{constructor(e={}){super(),this._allowSynchronousEvents=void 0===e.allowSynchronousEvents||e.allowSynchronousEvents,this._binaryType=e.binaryType||o[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxBufferedChunks=0|e.maxBufferedChunks,this._maxFragments=0|e.maxFragments,this._maxPayload=0|e.maxPayload,this._skipUTF8Validation=!!e.skipUTF8Validation,this[l]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=m}_write(e,t,s){return 8===this._opcode&&this._state==m?s():this._maxBufferedChunks>0&&this._buffers.length>=this._maxBufferedChunks?void s(this.createError(RangeError,"Too many buffered chunks",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS")):void(this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(s))}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let t=this._buffers[0];return this._buffers[0]=new f(t.buffer,t.byteOffset+e,t.length-e),new f(t.buffer,t.byteOffset,e)}let t=Buffer.allocUnsafe(e);do{let s=this._buffers[0],r=t.length-e;e>=s.length?t.set(this._buffers.shift(),r):(t.set(new Uint8Array(s.buffer,s.byteOffset,e),r),this._buffers[0]=new f(s.buffer,s.byteOffset+e,s.length-e)),e-=s.length}while(e>0)return t}startLoop(e){this._loop=!0;do switch(this._state){case m:this.getInfo(e);break;case _:this.getPayloadLength16(e);break;case g:this.getPayloadLength64(e);break;case y:this.getMask();break;case b:this.getData(e);break;case S:case x:this._loop=!1;return}while(this._loop)this._errored||e()}getInfo(e){if(this._bufferedBytes<2){this._loop=!1;return}let t=this.consume(2);if((48&t[0])!=0)return void e(this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3"));let s=(64&t[0])==64;if(s&&!this._extensions[i.extensionName])return void e(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"));if(this._fin=(128&t[0])==128,this._opcode=15&t[0],this._payloadLength=127&t[1],0===this._opcode){if(s)return void e(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"));if(!this._fragmented)return void e(this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE"));this._opcode=this._fragmented}else if(1===this._opcode||2===this._opcode){if(this._fragmented)return void e(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE"));this._compressed=s}else{if(!(this._opcode>7)||!(this._opcode<11))return void e(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE"));if(!this._fin)return void e(this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN"));if(s)return void e(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"));if(this._payloadLength>125||8===this._opcode&&1===this._payloadLength)return void e(this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH"))}if(this._fin||this._fragmented||(this._fragmented=this._opcode),this._masked=(128&t[1])==128,this._isServer){if(!this._masked)return void e(this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK"))}else if(this._masked)return void e(this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK"));126===this._payloadLength?this._state=_:127===this._payloadLength?this._state=g:this.haveLength(e)}getPayloadLength16(e){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e)}getPayloadLength64(e){if(this._bufferedBytes<8){this._loop=!1;return}let t=this.consume(8),s=t.readUInt32BE(0);s>2097151?e(this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH")):(this._payloadLength=0x100000000*s+t.readUInt32BE(4),this.haveLength(e))}haveLength(e){this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)?e(this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH")):this._masked?this._state=y:this._state=b}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=b}getData(e){let t=n;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}t=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!=0&&d(t,this._mask)}if(this._opcode>7)return void this.controlMessage(t,e);if(this._compressed){this._state=S,this.decompress(t,e);return}if(t.length){if(this._maxFragments>0&&this._fragments.length>=this._maxFragments)return void e(this.createError(RangeError,"Too many message fragments",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS"));this._messageLength=this._totalPayloadLength,this._fragments.push(t)}this.dataMessage(e)}decompress(e,t){this._extensions[i.extensionName].decompress(e,this._fin,(e,s)=>{if(e)return t(e);if(s.length){if(this._messageLength+=s.length,this._messageLength>this._maxPayload&&this._maxPayload>0)return void t(this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"));if(this._maxFragments>0&&this._fragments.length>=this._maxFragments)return void t(this.createError(RangeError,"Too many message fragments",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS"));this._fragments.push(s)}this.dataMessage(t),this._state===m&&this.startLoop(t)})}dataMessage(e){if(!this._fin){this._state=m;return}let t=this._messageLength,s=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],2===this._opcode){let r;r="nodebuffer"===this._binaryType?h(s,t):"arraybuffer"===this._binaryType?c(h(s,t)):"blob"===this._binaryType?new Blob(s):s,this._allowSynchronousEvents?(this.emit("message",r,!0),this._state=m):(this._state=x,setImmediate(()=>{this.emit("message",r,!0),this._state=m,this.startLoop(e)}))}else{let r=h(s,t);if(!this._skipUTF8Validation&&!u(r))return void e(this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8"));this._state===S||this._allowSynchronousEvents?(this.emit("message",r,!1),this._state=m):(this._state=x,setImmediate(()=>{this.emit("message",r,!1),this._state=m,this.startLoop(e)}))}}controlMessage(e,t){if(8===this._opcode){if(0===e.length)this._loop=!1,this.emit("conclude",1005,n),this.end();else{let s=e.readUInt16BE(0);if(!p(s))return void t(this.createError(RangeError,`invalid status code ${s}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE"));let r=new f(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!u(r))return void t(this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8"));this._loop=!1,this.emit("conclude",s,r),this.end()}this._state=m;return}this._allowSynchronousEvents?(this.emit(9===this._opcode?"ping":"pong",e),this._state=m):(this._state=x,setImmediate(()=>{this.emit(9===this._opcode?"ping":"pong",e),this._state=m,this.startLoop(t)}))}createError(e,t,s,r,i){this._loop=!1,this._errored=!0;let o=new e(s?`Invalid WebSocket frame: ${t}`:t);return Error.captureStackTrace(o,this.createError),o.code=i,o[a]=r,o}}t.exports=v},16735,(e,t,s)=>{"use strict";let r,{Duplex:i}=e.r(88947),{randomFillSync:o}=e.r(54799),{types:{isUint8Array:n}}=e.r(24361),a=e.r(80295),{EMPTY_BUFFER:l,kWebSocket:h,NOOP:c}=e.r(74836),{isBlob:d,isValidStatusCode:p}=e.r(58739),{mask:u,toBuffer:f}=e.r(97970),m=Symbol("kByteLength"),_=Buffer.alloc(4),g=8192,y=8192,b=0,S=1,x=2;class v{constructor(e,t,s){this._extensions=t||{},s&&(this._generateMask=s,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=b,this.onerror=c,this[h]=void 0}static frame(e,t){let s,i,n=!1,a=2,l=!1;t.mask&&(s=t.maskBuffer||_,t.generateMask?t.generateMask(s):(y===g&&(void 0===r&&(r=Buffer.alloc(g)),o(r,0,g),y=0),s[0]=r[y++],s[1]=r[y++],s[2]=r[y++],s[3]=r[y++]),l=(s[0]|s[1]|s[2]|s[3])==0,a=6),"string"==typeof e?i=(!t.mask||l)&&void 0!==t[m]?t[m]:(e=Buffer.from(e)).length:(i=e.length,n=t.mask&&t.readOnly&&!l);let h=i;i>=65536?(a+=8,h=127):i>125&&(a+=2,h=126);let c=Buffer.allocUnsafe(n?i+a:a);return(c[0]=t.fin?128|t.opcode:t.opcode,t.rsv1&&(c[0]|=64),c[1]=h,126===h?c.writeUInt16BE(i,2):127===h&&(c[2]=c[3]=0,c.writeUIntBE(i,4,6)),t.mask)?(c[1]|=128,c[a-4]=s[0],c[a-3]=s[1],c[a-2]=s[2],c[a-1]=s[3],l)?[c,e]:n?(u(e,s,c,a,i),[c]):(u(e,s,e,0,i),[c,e]):[c,e]}close(e,t,s,r){let i;if(void 0===e)i=l;else if("number"==typeof e&&p(e))if(void 0!==t&&t.length){let s=Buffer.byteLength(t);if(s>123)throw RangeError("The message must not be greater than 123 bytes");if((i=Buffer.allocUnsafe(2+s)).writeUInt16BE(e,0),"string"==typeof t)i.write(t,2);else if(n(t))i.set(t,2);else throw TypeError("Second argument must be a string or a Uint8Array")}else(i=Buffer.allocUnsafe(2)).writeUInt16BE(e,0);else throw TypeError("First argument must be a valid error code number");let o={[m]:i.length,fin:!0,generateMask:this._generateMask,mask:s,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state!==b?this.enqueue([this.dispatch,i,!1,o,r]):this.sendFrame(v.frame(i,o),r)}ping(e,t,s){let r,i;if("string"==typeof e?(r=Buffer.byteLength(e),i=!1):d(e)?(r=e.size,i=!1):(r=(e=f(e)).length,i=f.readOnly),r>125)throw RangeError("The data size must not be greater than 125 bytes");let o={[m]:r,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:9,readOnly:i,rsv1:!1};d(e)?this._state!==b?this.enqueue([this.getBlobData,e,!1,o,s]):this.getBlobData(e,!1,o,s):this._state!==b?this.enqueue([this.dispatch,e,!1,o,s]):this.sendFrame(v.frame(e,o),s)}pong(e,t,s){let r,i;if("string"==typeof e?(r=Buffer.byteLength(e),i=!1):d(e)?(r=e.size,i=!1):(r=(e=f(e)).length,i=f.readOnly),r>125)throw RangeError("The data size must not be greater than 125 bytes");let o={[m]:r,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:10,readOnly:i,rsv1:!1};d(e)?this._state!==b?this.enqueue([this.getBlobData,e,!1,o,s]):this.getBlobData(e,!1,o,s):this._state!==b?this.enqueue([this.dispatch,e,!1,o,s]):this.sendFrame(v.frame(e,o),s)}send(e,t,s){let r,i,o=this._extensions[a.extensionName],n=t.binary?2:1,l=t.compress;"string"==typeof e?(r=Buffer.byteLength(e),i=!1):d(e)?(r=e.size,i=!1):(r=(e=f(e)).length,i=f.readOnly),this._firstFragment?(this._firstFragment=!1,l&&o&&o.params[o._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(l=r>=o._threshold),this._compress=l):(l=!1,n=0),t.fin&&(this._firstFragment=!0);let h={[m]:r,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:n,readOnly:i,rsv1:l};d(e)?this._state!==b?this.enqueue([this.getBlobData,e,this._compress,h,s]):this.getBlobData(e,this._compress,h,s):this._state!==b?this.enqueue([this.dispatch,e,this._compress,h,s]):this.dispatch(e,this._compress,h,s)}getBlobData(e,t,s,r){this._bufferedBytes+=s[m],this._state=x,e.arrayBuffer().then(e=>{if(this._socket.destroyed){let e=Error("The socket was closed while the blob was being read");process.nextTick(k,this,e,r);return}this._bufferedBytes-=s[m];let i=f(e);t?this.dispatch(i,t,s,r):(this._state=b,this.sendFrame(v.frame(i,s),r),this.dequeue())}).catch(e=>{process.nextTick(w,this,e,r)})}dispatch(e,t,s,r){if(!t)return void this.sendFrame(v.frame(e,s),r);let i=this._extensions[a.extensionName];this._bufferedBytes+=s[m],this._state=S,i.compress(e,s.fin,(e,t)=>{this._socket.destroyed?k(this,Error("The socket was closed while data was being compressed"),r):(this._bufferedBytes-=s[m],this._state=b,s.readOnly=!1,this.sendFrame(v.frame(t,s),r),this.dequeue())})}dequeue(){for(;this._state===b&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][m],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][m],this._queue.push(e)}sendFrame(e,t){2===e.length?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],t),this._socket.uncork()):this._socket.write(e[0],t)}}function k(e,t,s){"function"==typeof s&&s(t);for(let s=0;s<e._queue.length;s++){let r=e._queue[s],i=r[r.length-1];"function"==typeof i&&i(t)}}function w(e,t,s){k(e,t,s),e.onerror(t)}t.exports=v},70494,(e,t,s)=>{"use strict";let{kForOnEventAttribute:r,kListener:i}=e.r(74836),o=Symbol("kCode"),n=Symbol("kData"),a=Symbol("kError"),l=Symbol("kMessage"),h=Symbol("kReason"),c=Symbol("kTarget"),d=Symbol("kType"),p=Symbol("kWasClean");class u{constructor(e){this[c]=null,this[d]=e}get target(){return this[c]}get type(){return this[d]}}Object.defineProperty(u.prototype,"target",{enumerable:!0}),Object.defineProperty(u.prototype,"type",{enumerable:!0});class f extends u{constructor(e,t={}){super(e),this[o]=void 0===t.code?0:t.code,this[h]=void 0===t.reason?"":t.reason,this[p]=void 0!==t.wasClean&&t.wasClean}get code(){return this[o]}get reason(){return this[h]}get wasClean(){return this[p]}}Object.defineProperty(f.prototype,"code",{enumerable:!0}),Object.defineProperty(f.prototype,"reason",{enumerable:!0}),Object.defineProperty(f.prototype,"wasClean",{enumerable:!0});class m extends u{constructor(e,t={}){super(e),this[a]=void 0===t.error?null:t.error,this[l]=void 0===t.message?"":t.message}get error(){return this[a]}get message(){return this[l]}}Object.defineProperty(m.prototype,"error",{enumerable:!0}),Object.defineProperty(m.prototype,"message",{enumerable:!0});class _ extends u{constructor(e,t={}){super(e),this[n]=void 0===t.data?null:t.data}get data(){return this[n]}}Object.defineProperty(_.prototype,"data",{enumerable:!0});let g={addEventListener(e,t,s={}){let o;for(let o of this.listeners(e))if(!s[r]&&o[i]===t&&!o[r])return;if("message"===e)o=function(e,s){let r=new _("message",{data:s?e:e.toString()});r[c]=this,y(t,this,r)};else if("close"===e)o=function(e,s){let r=new f("close",{code:e,reason:s.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});r[c]=this,y(t,this,r)};else if("error"===e)o=function(e){let s=new m("error",{error:e,message:e.message});s[c]=this,y(t,this,s)};else{if("open"!==e)return;o=function(){let e=new u("open");e[c]=this,y(t,this,e)}}o[r]=!!s[r],o[i]=t,s.once?this.once(e,o):this.on(e,o)},removeEventListener(e,t){for(let s of this.listeners(e))if(s[i]===t&&!s[r]){this.removeListener(e,s);break}}};function y(e,t,s){"object"==typeof e&&e.handleEvent?e.handleEvent.call(e,s):e.call(t,s)}t.exports={CloseEvent:f,ErrorEvent:m,Event:u,EventTarget:g,MessageEvent:_}},96903,(e,t,s)=>{"use strict";let{tokenChars:r}=e.r(58739);function i(e,t,s){void 0===e[t]?e[t]=[s]:e[t].push(s)}t.exports={format:function(e){return Object.keys(e).map(t=>{let s=e[t];return Array.isArray(s)||(s=[s]),s.map(e=>[t].concat(Object.keys(e).map(t=>{let s=e[t];return Array.isArray(s)||(s=[s]),s.map(e=>!0===e?t:`${t}=${e}`).join("; ")})).join("; ")).join(", ")}).join(", ")},parse:function(e){let t,s,o=Object.create(null),n=Object.create(null),a=!1,l=!1,h=!1,c=-1,d=-1,p=-1,u=0;for(;u<e.length;u++)if(d=e.charCodeAt(u),void 0===t)if(-1===p&&1===r[d])-1===c&&(c=u);else if(0!==u&&(32===d||9===d))-1===p&&-1!==c&&(p=u);else if(59===d||44===d){if(-1===c)throw SyntaxError(`Unexpected character at index ${u}`);-1===p&&(p=u);let s=e.slice(c,p);44===d?(i(o,s,n),n=Object.create(null)):t=s,c=p=-1}else throw SyntaxError(`Unexpected character at index ${u}`);else if(void 0===s)if(-1===p&&1===r[d])-1===c&&(c=u);else if(32===d||9===d)-1===p&&-1!==c&&(p=u);else if(59===d||44===d){if(-1===c)throw SyntaxError(`Unexpected character at index ${u}`);-1===p&&(p=u),i(n,e.slice(c,p),!0),44===d&&(i(o,t,n),n=Object.create(null),t=void 0),c=p=-1}else if(61===d&&-1!==c&&-1===p)s=e.slice(c,u),c=p=-1;else throw SyntaxError(`Unexpected character at index ${u}`);else if(l){if(1!==r[d])throw SyntaxError(`Unexpected character at index ${u}`);-1===c?c=u:a||(a=!0),l=!1}else if(h)if(1===r[d])-1===c&&(c=u);else if(34===d&&-1!==c)h=!1,p=u;else if(92===d)l=!0;else throw SyntaxError(`Unexpected character at index ${u}`);else if(34===d&&61===e.charCodeAt(u-1))h=!0;else if(-1===p&&1===r[d])-1===c&&(c=u);else if(-1!==c&&(32===d||9===d))-1===p&&(p=u);else if(59===d||44===d){if(-1===c)throw SyntaxError(`Unexpected character at index ${u}`);-1===p&&(p=u);let r=e.slice(c,p);a&&(r=r.replace(/\\/g,""),a=!1),i(n,s,r),44===d&&(i(o,t,n),n=Object.create(null),t=void 0),s=void 0,c=p=-1}else throw SyntaxError(`Unexpected character at index ${u}`);if(-1===c||h||32===d||9===d)throw SyntaxError("Unexpected end of input");-1===p&&(p=u);let f=e.slice(c,p);return void 0===t?i(o,f,n):(void 0===s?i(n,f,!0):a?i(n,s,f.replace(/\\/g,"")):i(n,s,f),i(o,t,n)),o}}},35065,(e,t,s)=>{"use strict";let r=e.r(27699),i=e.r(24836),o=e.r(21517),n=e.r(4446),a=e.r(55004),{randomBytes:l,createHash:h}=e.r(54799),{Duplex:c,Readable:d}=e.r(88947),{URL:p}=e.r(92509),u=e.r(80295),f=e.r(29485),m=e.r(16735),{isBlob:_}=e.r(58739),{BINARY_TYPES:g,CLOSE_TIMEOUT:y,EMPTY_BUFFER:b,GUID:S,kForOnEventAttribute:x,kListener:v,kStatusCode:k,kWebSocket:w,NOOP:E}=e.r(74836),{EventTarget:{addEventListener:L,removeEventListener:O}}=e.r(70494),{format:P,parse:C}=e.r(96903),{toBuffer:T}=e.r(97970),A=Symbol("kAborted"),N=[8,13],R=["CONNECTING","OPEN","CLOSING","CLOSED"],I=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;class D extends r{constructor(e,t,s){super(),this._binaryType=g[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=b,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=D.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,null!==e?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,void 0===t?t=[]:Array.isArray(t)||("object"==typeof t&&null!==t?(s=t,t=[]):t=[t]),M(this,e,t,s)):(this._autoPong=s.autoPong,this._closeTimeout=s.closeTimeout,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){g.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(e,t,s){let r=new f({allowSynchronousEvents:s.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxBufferedChunks:s.maxBufferedChunks,maxFragments:s.maxFragments,maxPayload:s.maxPayload,skipUTF8Validation:s.skipUTF8Validation}),i=new m(e,this._extensions,s.generateMask);this._receiver=r,this._sender=i,this._socket=e,r[w]=this,i[w]=this,e[w]=this,r.on("conclude",G),r.on("drain",j),r.on("error",V),r.on("message",H),r.on("ping",z),r.on("pong",K),i.onerror=J,e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),t.length>0&&e.unshift(t),e.on("close",Z),e.on("data",Q),e.on("end",ee),e.on("error",et),this._readyState=D.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=D.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[u.extensionName]&&this._extensions[u.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=D.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,t){if(this.readyState!==D.CLOSED){if(this.readyState===D.CONNECTING){let e="WebSocket was closed before the connection was established";W(this,this._req,e);return}if(this.readyState===D.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=D.CLOSING,this._sender.close(e,t,!this._isServer,e=>{!e&&(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),X(this)}}pause(){this.readyState!==D.CONNECTING&&this.readyState!==D.CLOSED&&(this._paused=!0,this._socket.pause())}ping(e,t,s){if(this.readyState===D.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");("function"==typeof e?(s=e,e=t=void 0):"function"==typeof t&&(s=t,t=void 0),"number"==typeof e&&(e=e.toString()),this.readyState!==D.OPEN)?$(this,e,s):(void 0===t&&(t=!this._isServer),this._sender.ping(e||b,t,s))}pong(e,t,s){if(this.readyState===D.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");("function"==typeof e?(s=e,e=t=void 0):"function"==typeof t&&(s=t,t=void 0),"number"==typeof e&&(e=e.toString()),this.readyState!==D.OPEN)?$(this,e,s):(void 0===t&&(t=!this._isServer),this._sender.pong(e||b,t,s))}resume(){this.readyState!==D.CONNECTING&&this.readyState!==D.CLOSED&&(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,t,s){if(this.readyState===D.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");if("function"==typeof t&&(s=t,t={}),"number"==typeof e&&(e=e.toString()),this.readyState!==D.OPEN)return void $(this,e,s);let r={binary:"string"!=typeof e,mask:!this._isServer,compress:!0,fin:!0,...t};this._extensions[u.extensionName]||(r.compress=!1),this._sender.send(e||b,r,s)}terminate(){if(this.readyState!==D.CLOSED){if(this.readyState===D.CONNECTING){let e="WebSocket was closed before the connection was established";W(this,this._req,e);return}this._socket&&(this._readyState=D.CLOSING,this._socket.destroy())}}}function M(e,t,s,r){let n,a,c,d,f={allowSynchronousEvents:!0,autoPong:!0,closeTimeout:y,protocolVersion:N[1],maxBufferedChunks:1048576,maxFragments:131072,maxPayload:0x6400000,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(e._autoPong=f.autoPong,e._closeTimeout=f.closeTimeout,!N.includes(f.protocolVersion))throw RangeError(`Unsupported protocol version: ${f.protocolVersion} (supported versions: ${N.join(", ")})`);if(t instanceof p)n=t;else try{n=new p(t)}catch{throw SyntaxError(`Invalid URL: ${t}`)}"http:"===n.protocol?n.protocol="ws:":"https:"===n.protocol&&(n.protocol="wss:"),e._url=n.href;let m="wss:"===n.protocol,_="ws+unix:"===n.protocol;if("ws:"===n.protocol||m||_?_&&!n.pathname?a="The URL's pathname is empty":n.hash&&(a="The URL contains a fragment identifier"):a='The URL\'s protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"',a){let t=SyntaxError(a);if(0!==e._redirects)return void U(e,t);throw t}let g=m?443:80,b=l(16).toString("base64"),x=m?i.request:o.request,v=new Set;if(f.createConnection=f.createConnection||(m?F:B),f.defaultPort=f.defaultPort||g,f.port=n.port||g,f.host=n.hostname.startsWith("[")?n.hostname.slice(1,-1):n.hostname,f.headers={...f.headers,"Sec-WebSocket-Version":f.protocolVersion,"Sec-WebSocket-Key":b,Connection:"Upgrade",Upgrade:"websocket"},f.path=n.pathname+n.search,f.timeout=f.handshakeTimeout,f.perMessageDeflate&&(c=new u({...f.perMessageDeflate,isServer:!1,maxPayload:f.maxPayload}),f.headers["Sec-WebSocket-Extensions"]=P({[u.extensionName]:c.offer()})),s.length){for(let e of s){if("string"!=typeof e||!I.test(e)||v.has(e))throw SyntaxError("An invalid or duplicated subprotocol was specified");v.add(e)}f.headers["Sec-WebSocket-Protocol"]=s.join(",")}if(f.origin&&(f.protocolVersion<13?f.headers["Sec-WebSocket-Origin"]=f.origin:f.headers.Origin=f.origin),(n.username||n.password)&&(f.auth=`${n.username}:${n.password}`),_){let e=f.path.split(":");f.socketPath=e[0],f.path=e[1]}if(f.followRedirects){if(0===e._redirects){e._originalIpc=_,e._originalSecure=m,e._originalHostOrSocketPath=_?f.socketPath:n.host;let t=r&&r.headers;if(r={...r,headers:{}},t)for(let[e,s]of Object.entries(t))r.headers[e.toLowerCase()]=s}else if(0===e.listenerCount("redirect")){let t=_?!!e._originalIpc&&f.socketPath===e._originalHostOrSocketPath:!e._originalIpc&&n.host===e._originalHostOrSocketPath;t&&(!e._originalSecure||m)||(delete f.headers.authorization,delete f.headers.cookie,t||delete f.headers.host,f.auth=void 0)}f.auth&&!r.headers.authorization&&(r.headers.authorization="Basic "+Buffer.from(f.auth).toString("base64")),d=e._req=x(f),e._redirects&&e.emit("redirect",e.url,d)}else d=e._req=x(f);f.timeout&&d.on("timeout",()=>{W(e,d,"Opening handshake has timed out")}),d.on("error",t=>{null===d||d[A]||(d=e._req=null,U(e,t))}),d.on("response",i=>{let o=i.headers.location,n=i.statusCode;if(o&&f.followRedirects&&n>=300&&n<400){let i;if(++e._redirects>f.maxRedirects)return void W(e,d,"Maximum redirects exceeded");d.abort();try{i=new p(o,t)}catch(t){U(e,SyntaxError(`Invalid URL: ${o}`));return}M(e,i,s,r)}else e.emit("unexpected-response",d,i)||W(e,d,`Unexpected server response: ${i.statusCode}`)}),d.on("upgrade",(t,s,r)=>{let i;if(e.emit("upgrade",t),e.readyState!==D.CONNECTING)return;d=e._req=null;let o=t.headers.upgrade;if(void 0===o||"websocket"!==o.toLowerCase())return void W(e,s,"Invalid Upgrade header");let n=h("sha1").update(b+S).digest("base64");if(t.headers["sec-websocket-accept"]!==n)return void W(e,s,"Invalid Sec-WebSocket-Accept header");let a=t.headers["sec-websocket-protocol"];if(void 0!==a?v.size?v.has(a)||(i="Server sent an invalid subprotocol"):i="Server sent a subprotocol but none was requested":v.size&&(i="Server sent no subprotocol"),i)return void W(e,s,i);a&&(e._protocol=a);let l=t.headers["sec-websocket-extensions"];if(void 0!==l){let t;if(!c)return void W(e,s,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");try{t=C(l)}catch(t){W(e,s,"Invalid Sec-WebSocket-Extensions header");return}let r=Object.keys(t);if(1!==r.length||r[0]!==u.extensionName)return void W(e,s,"Server indicated an extension that was not requested");try{c.accept(t[u.extensionName])}catch(t){W(e,s,"Invalid Sec-WebSocket-Extensions header");return}e._extensions[u.extensionName]=c}e.setSocket(s,r,{allowSynchronousEvents:f.allowSynchronousEvents,generateMask:f.generateMask,maxBufferedChunks:f.maxBufferedChunks,maxFragments:f.maxFragments,maxPayload:f.maxPayload,skipUTF8Validation:f.skipUTF8Validation})}),f.finishRequest?f.finishRequest(d,e):d.end()}function U(e,t){e._readyState=D.CLOSING,e._errorEmitted=!0,e.emit("error",t),e.emitClose()}function B(e){return e.path=e.socketPath,n.connect(e)}function F(e){return e.path=void 0,e.servername||""===e.servername||(e.servername=n.isIP(e.host)?"":e.host),a.connect(e)}function W(e,t,s){e._readyState=D.CLOSING;let r=Error(s);Error.captureStackTrace(r,W),t.setHeader?(t[A]=!0,t.abort(),t.socket&&!t.socket.destroyed&&t.socket.destroy(),process.nextTick(U,e,r)):(t.destroy(r),t.once("error",e.emit.bind(e,"error")),t.once("close",e.emitClose.bind(e)))}function $(e,t,s){if(t){let s=_(t)?t.size:T(t).length;e._socket?e._sender._bufferedBytes+=s:e._bufferedAmount+=s}if(s){let t=Error(`WebSocket is not open: readyState ${e.readyState} (${R[e.readyState]})`);process.nextTick(s,t)}}function G(e,t){let s=this[w];s._closeFrameReceived=!0,s._closeMessage=t,s._closeCode=e,void 0!==s._socket[w]&&(s._socket.removeListener("data",Q),process.nextTick(Y,s._socket),1005===e?s.close():s.close(e,t))}function j(){let e=this[w];e.isPaused||e._socket.resume()}function V(e){let t=this[w];void 0!==t._socket[w]&&(t._socket.removeListener("data",Q),process.nextTick(Y,t._socket),t.close(e[k])),t._errorEmitted||(t._errorEmitted=!0,t.emit("error",e))}function q(){this[w].emitClose()}function H(e,t){this[w].emit("message",e,t)}function z(e){let t=this[w];t._autoPong&&t.pong(e,!this._isServer,E),t.emit("ping",e)}function K(e){this[w].emit("pong",e)}function Y(e){e.resume()}function J(e){let t=this[w];t.readyState!==D.CLOSED&&(t.readyState===D.OPEN&&(t._readyState=D.CLOSING,X(t)),this._socket.end(),t._errorEmitted||(t._errorEmitted=!0,t.emit("error",e)))}function X(e){e._closeTimer=setTimeout(e._socket.destroy.bind(e._socket),e._closeTimeout)}function Z(){let e=this[w];if(this.removeListener("close",Z),this.removeListener("data",Q),this.removeListener("end",ee),e._readyState=D.CLOSING,!this._readableState.endEmitted&&!e._closeFrameReceived&&!e._receiver._writableState.errorEmitted&&0!==this._readableState.length){let t=this.read(this._readableState.length);e._receiver.write(t)}e._receiver.end(),this[w]=void 0,clearTimeout(e._closeTimer),e._receiver._writableState.finished||e._receiver._writableState.errorEmitted?e.emitClose():(e._receiver.on("error",q),e._receiver.on("finish",q))}function Q(e){this[w]._receiver.write(e)||this.pause()}function ee(){let e=this[w];e._readyState=D.CLOSING,e._receiver.end(),this.end()}function et(){let e=this[w];this.removeListener("error",et),this.on("error",E),e&&(e._readyState=D.CLOSING,this.destroy())}Object.defineProperty(D,"CONNECTING",{enumerable:!0,value:R.indexOf("CONNECTING")}),Object.defineProperty(D.prototype,"CONNECTING",{enumerable:!0,value:R.indexOf("CONNECTING")}),Object.defineProperty(D,"OPEN",{enumerable:!0,value:R.indexOf("OPEN")}),Object.defineProperty(D.prototype,"OPEN",{enumerable:!0,value:R.indexOf("OPEN")}),Object.defineProperty(D,"CLOSING",{enumerable:!0,value:R.indexOf("CLOSING")}),Object.defineProperty(D.prototype,"CLOSING",{enumerable:!0,value:R.indexOf("CLOSING")}),Object.defineProperty(D,"CLOSED",{enumerable:!0,value:R.indexOf("CLOSED")}),Object.defineProperty(D.prototype,"CLOSED",{enumerable:!0,value:R.indexOf("CLOSED")}),["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(e=>{Object.defineProperty(D.prototype,e,{enumerable:!0})}),["open","error","close","message"].forEach(e=>{Object.defineProperty(D.prototype,`on${e}`,{enumerable:!0,get(){for(let t of this.listeners(e))if(t[x])return t[v];return null},set(t){for(let t of this.listeners(e))if(t[x]){this.removeListener(e,t);break}"function"==typeof t&&this.addEventListener(e,t,{[x]:!0})}})}),D.prototype.addEventListener=L,D.prototype.removeEventListener=O,t.exports=D},21365,(e,t,s)=>{"use strict";e.r(35065);let{Duplex:r}=e.r(88947);function i(e){e.emit("close")}function o(){!this.destroyed&&this._writableState.finished&&this.destroy()}function n(e){this.removeListener("error",n),this.destroy(),0===this.listenerCount("error")&&this.emit("error",e)}t.exports=function(e,t){let s=!0,a=new r({...t,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return e.on("message",function(t,s){let r=!s&&a._readableState.objectMode?t.toString():t;a.push(r)||e.pause()}),e.once("error",function(e){a.destroyed||(s=!1,a.destroy(e))}),e.once("close",function(){a.destroyed||a.push(null)}),a._destroy=function(t,r){if(e.readyState===e.CLOSED){r(t),process.nextTick(i,a);return}let o=!1;e.once("error",function(e){o=!0,r(e)}),e.once("close",function(){o||r(t),process.nextTick(i,a)}),s&&e.terminate()},a._final=function(t){e.readyState===e.CONNECTING?e.once("open",function(){a._final(t)}):null!==e._socket&&(e._socket._writableState.finished?(t(),a._readableState.endEmitted&&a.destroy()):(e._socket.once("finish",function(){t()}),e.close()))},a._read=function(){e.isPaused&&e.resume()},a._write=function(t,s,r){e.readyState===e.CONNECTING?e.once("open",function(){a._write(t,s,r)}):e.send(t,r)},a.on("end",o),a.on("error",n),a}},42977,(e,t,s)=>{"use strict";let{tokenChars:r}=e.r(58739);t.exports={parse:function(e){let t=new Set,s=-1,i=-1,o=0;for(;o<e.length;o++){let n=e.charCodeAt(o);if(-1===i&&1===r[n])-1===s&&(s=o);else if(0!==o&&(32===n||9===n))-1===i&&-1!==s&&(i=o);else if(44===n){if(-1===s)throw SyntaxError(`Unexpected character at index ${o}`);-1===i&&(i=o);let r=e.slice(s,i);if(t.has(r))throw SyntaxError(`The "${r}" subprotocol is duplicated`);t.add(r),s=i=-1}else throw SyntaxError(`Unexpected character at index ${o}`)}if(-1===s||-1!==i)throw SyntaxError("Unexpected end of input");let n=e.slice(s,o);if(t.has(n))throw SyntaxError(`The "${n}" subprotocol is duplicated`);return t.add(n),t}}},17198,(e,t,s)=>{"use strict";let r=e.r(27699),i=e.r(21517),{Duplex:o}=e.r(88947),{createHash:n}=e.r(54799),a=e.r(96903),l=e.r(80295),h=e.r(42977),c=e.r(35065),{CLOSE_TIMEOUT:d,GUID:p,kWebSocket:u}=e.r(74836),f=/^[+/0-9A-Za-z]{22}==$/,m=0,_=1,g=2;class y extends r{constructor(e,t){if(super(),null==(e={allowSynchronousEvents:!0,autoPong:!0,maxBufferedChunks:1048576,maxFragments:131072,maxPayload:0x6400000,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,closeTimeout:d,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:c,...e}).port&&!e.server&&!e.noServer||null!=e.port&&(e.server||e.noServer)||e.server&&e.noServer)throw TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(null!=e.port?(this._server=i.createServer((e,t)=>{let s=i.STATUS_CODES[426];t.writeHead(426,{"Content-Length":s.length,"Content-Type":"text/plain"}),t.end(s)}),this._server.listen(e.port,e.host,e.backlog,t)):e.server&&(this._server=e.server),this._server){const e=this.emit.bind(this,"connection");this._removeListeners=b(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(t,s,r)=>{this.handleUpgrade(t,s,r,e)}})}!0===e.perMessageDeflate&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=m}address(){if(this.options.noServer)throw Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(e){if(this._state===g){e&&this.once("close",()=>{e(Error("The server is not running"))}),process.nextTick(S,this);return}if(e&&this.once("close",e),this._state!==_)if(this._state=_,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients&&this.clients.size?this._shouldEmitClose=!0:process.nextTick(S,this);else{let e=this._server;this._removeListeners(),this._removeListeners=this._server=null,e.close(()=>{S(this)})}}shouldHandle(e){if(this.options.path){let t=e.url.indexOf("?");if((-1!==t?e.url.slice(0,t):e.url)!==this.options.path)return!1}return!0}handleUpgrade(e,t,s,r){t.on("error",x);let i=e.headers["sec-websocket-key"],o=e.headers.upgrade,n=+e.headers["sec-websocket-version"];if("GET"!==e.method)return void k(this,e,t,405,"Invalid HTTP method");if(void 0===o||"websocket"!==o.toLowerCase())return void k(this,e,t,400,"Invalid Upgrade header");if(void 0===i||!f.test(i))return void k(this,e,t,400,"Missing or invalid Sec-WebSocket-Key header");if(13!==n&&8!==n)return void k(this,e,t,400,"Missing or invalid Sec-WebSocket-Version header",{"Sec-WebSocket-Version":"13, 8"});if(!this.shouldHandle(e))return void v(t,400);let c=e.headers["sec-websocket-protocol"],d=new Set;if(void 0!==c)try{d=h.parse(c)}catch(s){k(this,e,t,400,"Invalid Sec-WebSocket-Protocol header");return}let p=e.headers["sec-websocket-extensions"],u={};if(this.options.perMessageDeflate&&void 0!==p){let s=new l({...this.options.perMessageDeflate,isServer:!0,maxPayload:this.options.maxPayload});try{let e=a.parse(p);e[l.extensionName]&&(s.accept(e[l.extensionName]),u[l.extensionName]=s)}catch(s){k(this,e,t,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let o={origin:e.headers[`${8===n?"sec-websocket-origin":"origin"}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(2===this.options.verifyClient.length)return void this.options.verifyClient(o,(o,n,a,l)=>{if(!o)return v(t,n||401,a,l);this.completeUpgrade(u,i,d,e,t,s,r)});if(!this.options.verifyClient(o))return v(t,401)}this.completeUpgrade(u,i,d,e,t,s,r)}completeUpgrade(e,t,s,r,i,o,h){if(!i.readable||!i.writable)return i.destroy();if(i[u])throw Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>m)return v(i,503);let c=n("sha1").update(t+p).digest("base64"),d=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${c}`],f=new this.options.WebSocket(null,void 0,this.options);if(s.size){let e=this.options.handleProtocols?this.options.handleProtocols(s,r):s.values().next().value;e&&(d.push(`Sec-WebSocket-Protocol: ${e}`),f._protocol=e)}if(e[l.extensionName]){let t=e[l.extensionName].params,s=a.format({[l.extensionName]:[t]});d.push(`Sec-WebSocket-Extensions: ${s}`),f._extensions=e}this.emit("headers",d,r),i.write(d.concat("\r\n").join("\r\n")),i.removeListener("error",x),f.setSocket(i,o,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxBufferedChunks:this.options.maxBufferedChunks,maxFragments:this.options.maxFragments,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(f),f.on("close",()=>{this.clients.delete(f),this._shouldEmitClose&&!this.clients.size&&process.nextTick(S,this)})),h(f,r)}}function b(e,t){for(let s of Object.keys(t))e.on(s,t[s]);return function(){for(let s of Object.keys(t))e.removeListener(s,t[s])}}function S(e){e._state=g,e.emit("close")}function x(){this.destroy()}function v(e,t,s,r){s=s||i.STATUS_CODES[t],r={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(s),...r},e.once("finish",e.destroy),e.end(`HTTP/1.1 ${t} ${i.STATUS_CODES[t]}\r
|
|
2
|
-
`+Object.keys(r).map(e=>`${e}: ${r[e]}`).join("\r\n")+"\r\n\r\n"+s)}function k(e,t,s,r,i,o){if(e.listenerCount("wsClientError")){let r=Error(i);Error.captureStackTrace(r,k),e.emit("wsClientError",r,s,t)}else v(s,r,i,o)}t.exports=y},29307,__turbopack_context__=>{"use strict";__turbopack_context__.s(["SessionManager",()=>SessionManager],29307);var __TURBOPACK__imported__module__54799__=__turbopack_context__.i(54799);class AgentRunner{workspaceRoot;scopedDirs;tokenUsage={input:0,output:0,cost:0};parseTokenUsage(e){let t=e.replace(/\x1b\[[0-9;]*m/g,""),s=t.match(/(?:cost|estimated cost)[:\s]*\$([0-9.]+)/i);s&&(this.tokenUsage.cost=parseFloat(s[1]));let r=e=>(e=e.replace(/,/g,"").toLowerCase().trim()).endsWith("k")?1e3*parseFloat(e.slice(0,-1)):e.endsWith("m")?1e6*parseFloat(e.slice(0,-1)):parseInt(e,10)||0,i=/tokens?[:\s]*([0-9,.]+[km]?)\s*(?:sent|input|prompt)[^a-zA-Z0-9]+([0-9,.]+[km]?)\s*(?:received|output|completion)/i,o=t.match(i);if(o)this.tokenUsage.input=r(o[1]),this.tokenUsage.output=r(o[2]);else{let e=t.match(/([0-9,.]+[km]?)\s*(?:sent|input|prompt)\s*tokens?/i)||t.match(/tokens?\s*(?:sent|input|prompt)[:\s]*([0-9,.]+[km]?)/i);e&&(this.tokenUsage.input=r(e[1]));let s=t.match(/([0-9,.]+[km]?)\s*(?:received|output|completion)\s*tokens?/i)||t.match(/tokens?\s*(?:received|output|completion)[:\s]*([0-9,.]+[km]?)/i);s&&(this.tokenUsage.output=r(s[1]))}0===this.tokenUsage.cost&&(this.tokenUsage.input>0||this.tokenUsage.output>0)&&(this.tokenUsage.cost=3e-6*this.tokenUsage.input+15e-6*this.tokenUsage.output)}listeners=[];onOutput(e){this.listeners.push(e)}offOutput(e){this.listeners=this.listeners.filter(t=>t!==e)}emitOutput(e){this.listeners.forEach(t=>t(e))}}var __TURBOPACK__imported__module__22734__=__turbopack_context__.i(22734),__TURBOPACK__imported__module__14747__=__turbopack_context__.i(14747);class SessionPersister{static get workspaceRoot(){return process.env.ORIGINAL_CWD||process.cwd()}static getSessionsDir(){let e=__TURBOPACK__imported__module__14747__.default.join(this.workspaceRoot,".ai","neural-loom","sessions");return __TURBOPACK__imported__module__22734__.default.existsSync(e)||__TURBOPACK__imported__module__22734__.default.mkdirSync(e,{recursive:!0}),e}static saveSession(e){try{let t=this.getSessionsDir(),s=__TURBOPACK__imported__module__14747__.default.join(t,`${e.id}.json`),r={id:e.id,name:e.name,type:e.type,status:"running"===e.status&&"mock"===e.type?"running":e.status,createdAt:e.createdAt,logs:e.logs,workspaceRoot:e.workspaceRoot,scopedDirs:e.scopedDirs};__TURBOPACK__imported__module__22734__.default.writeFileSync(s,JSON.stringify(r,null,2),"utf8")}catch(t){console.error(`[SessionPersister] Failed to save session ${e.id}:`,t)}}static loadAllSessions(){try{let e=this.getSessionsDir(),t=__TURBOPACK__imported__module__22734__.default.readdirSync(e),s=[];for(let r of t)if(r.endsWith(".json")){let t=__TURBOPACK__imported__module__14747__.default.join(e,r),i=__TURBOPACK__imported__module__22734__.default.readFileSync(t,"utf8"),o=JSON.parse(i);"running"===o.status&&"mock"!==o.type&&(o.status="stopped",o.logs.push("\r\n\x1b[1;31m[System] Server restarted. Terminal connection lost.\x1b[0m\r\n"),__TURBOPACK__imported__module__22734__.default.writeFileSync(t,JSON.stringify(o,null,2),"utf8")),s.push(o)}return s}catch(e){return console.error("[SessionPersister] Failed to load sessions:",e),[]}}static deleteSession(e){try{let t=this.getSessionsDir(),s=__TURBOPACK__imported__module__14747__.default.join(t,`${e}.json`);__TURBOPACK__imported__module__22734__.default.existsSync(s)&&__TURBOPACK__imported__module__22734__.default.unlinkSync(s)}catch(t){console.error(`[SessionPersister] Failed to delete session ${e}:`,t)}}}class MockRunner extends AgentRunner{id;name;type="mock";status="idle";createdAt;logs=[];intervalId=null;mockSteps=["[NeuralLoom] Loading virtual PTY context...","[NeuralLoom] Spawning sandbox mock runtime environment...","[Mock Agent] Model online (v2.0-mock-flash). Dedicated memory allocated.","[Mock Agent] System rules parsed successfully from global context registry.","[Mock Agent] Awaiting developer commands. Type '/help' to list mock skills."];stepIndex=0;constructor(e,t){super(),this.id=e,this.name=t||`Mock Session ${e.substring(0,8)}`,this.createdAt=new Date().toISOString()}appendLog(e){this.logs.push(e),this.parseTokenUsage(e),this.emitOutput(e+"\r\n"),SessionPersister.saveSession(this)}async start(){"running"!==this.status&&(this.status="running",this.appendLog("\x1b[1;35m==================================================\x1b[0m"),this.appendLog("\x1b[1;36m NEURALLOOM SIMULATED AGENT ENVIRONMENT \x1b[0m"),this.appendLog("\x1b[1;35m==================================================\x1b[0m"),this.stepIndex<this.mockSteps.length&&this.appendLog(this.mockSteps[this.stepIndex++]),this.intervalId=setInterval(()=>{if(this.tokenUsage.input+=Math.floor(50*Math.random())+10,this.tokenUsage.output+=Math.floor(20*Math.random())+5,this.tokenUsage.cost=3e-6*this.tokenUsage.input+15e-6*this.tokenUsage.output,this.stepIndex<this.mockSteps.length)this.appendLog(this.mockSteps[this.stepIndex++]);else{let e=new Date().toLocaleTimeString();this.appendLog(`[${e}] [Telemetry] CPU utilization 1.2% | Memory 142MB | Link stable.`)}},4e3))}async stop(){this.status="stopped",this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null),this.appendLog("\x1b[1;31m[System] Process terminated. Connection closed.\x1b[0m")}async sendInput(e,t){"running"!==this.status?this.appendLog(`\x1b[1;31m[Error] Cannot write input: process is ${this.status}.\x1b[0m`):(this.appendLog(`\x1b[1;32m> ${e}\x1b[0m`),setTimeout(()=>{let t=e.trim().toLowerCase();"/help"===t?(this.appendLog("[Mock Agent] Available commands:"),this.appendLog(" /help - List available mock commands."),this.appendLog(" /status - Fetch current agent diagnostic metrics."),this.appendLog(" /context - View loaded staging files."),this.appendLog(" /clear - Flush terminal console buffer.")):"/status"===t?(this.appendLog("[Mock Agent] Diagnostics:"),this.appendLog(" - Connection Type: WebSocket gateway (mock)"),this.appendLog(` - Active Runtime: ${this.id}`),this.appendLog(" - Sandbox State: Healthy (0 warnings)")):"/context"===t?(this.appendLog("[Mock Agent] Loaded Workspace Context Files:"),this.appendLog(" - [Mounted] src/app/globals.css (Modified)"),this.appendLog(" - [Mounted] src/app/page.tsx")):"/clear"===t?(this.logs=[],this.appendLog("\x1b[1;33m[Console Cleared]\x1b[0m")):(this.appendLog(`[Mock Agent] Received command: "${e}". Processing...`),setTimeout(()=>{this.appendLog("[Mock Agent] Done. Task simulated successfully.")},1500))},400))}getStatus(){return{id:this.id,name:this.name,type:this.type,status:this.status,createdAt:this.createdAt,logsCount:this.logs.length,tokenUsage:this.tokenUsage}}}var __TURBOPACK__imported__module__22734__1=__TURBOPACK__imported__module__22734__,__TURBOPACK__imported__module__14747__1=__TURBOPACK__imported__module__14747__;function isWindows(){if("u"<typeof process)return!1;let e=Object.keys(process).find(e=>e.startsWith("plat")&&e.endsWith("form"));return!!e&&"win32"===process[e]}function findGitBash(){if(!isWindows())return"bash";let e=process.env.PROGRAMFILES||"C:\\Program Files",t=process.env["PROGRAMFILES(X86)"]||"C:\\Program Files (x86)",s=process.env.LOCALAPPDATA||"";return[process.env.WINGMAN_BASH_PATH,__TURBOPACK__imported__module__14747__1.default.join(e,"Git","bin","bash.exe"),__TURBOPACK__imported__module__14747__1.default.join(t,"Git","bin","bash.exe"),s?__TURBOPACK__imported__module__14747__1.default.join(s,"Programs","Git","bin","bash.exe"):""].filter(e=>"string"==typeof e&&""!==e).find(e=>__TURBOPACK__imported__module__22734__1.default.existsSync(e))||null}class ClaudeRunner extends AgentRunner{id;name;type="claude";status="idle";createdAt;logs=[];ptyProcess=null;ptyModule=null;constructor(e,t){super(),this.id=e,this.name=t||`Claude Session ${e.substring(0,8)}`,this.createdAt=new Date().toISOString()}appendLog(e){this.logs.push(e),this.logs.length>5e3&&this.logs.shift(),this.parseTokenUsage(e),this.emitOutput(e),SessionPersister.saveSession(this)}async start(){if("running"===this.status)return;let bashPath=findGitBash();if(!bashPath){this.status="stopped",this.appendLog("\x1b[1;31m[System Error] Git Bash not found. Please install Git for Windows.\x1b[0m\r\n");return}try{this.ptyModule||(this.ptyModule=eval("require")("node-pty")),this.status="running",this.appendLog("\x1b[1;35m==================================================\x1b[0m\r\n"),this.appendLog("\x1b[1;36m NEURALLOOM ACTIVE CLAUDE TERMINAL ROUTE \x1b[0m\r\n"),this.appendLog("\x1b[1;35m==================================================\x1b[0m\r\n"),this.appendLog(`[System] Spawning
|
|
3
|
-
`)
|
|
1
|
+
module.exports=[54799,(e,t,s)=>{t.exports=e.x("crypto",()=>require("crypto"))},27699,(e,t,s)=>{t.exports=e.x("events",()=>require("events"))},24836,(e,t,s)=>{t.exports=e.x("https",()=>require("https"))},21517,(e,t,s)=>{t.exports=e.x("http",()=>require("http"))},4446,(e,t,s)=>{t.exports=e.x("net",()=>require("net"))},55004,(e,t,s)=>{t.exports=e.x("tls",()=>require("tls"))},88947,(e,t,s)=>{t.exports=e.x("stream",()=>require("stream"))},92509,(e,t,s)=>{t.exports=e.x("url",()=>require("url"))},6461,(e,t,s)=>{t.exports=e.x("zlib",()=>require("zlib"))},74836,(e,t,s)=>{"use strict";let r=["nodebuffer","arraybuffer","fragments"],i="u">typeof Blob;i&&r.push("blob"),t.exports={BINARY_TYPES:r,CLOSE_TIMEOUT:3e4,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:i,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}},97970,(e,t,s)=>{"use strict";let{EMPTY_BUFFER:r}=e.r(74836),i=Buffer[Symbol.species];function o(e,t,s,r,i){for(let o=0;o<i;o++)s[r+o]=e[o]^t[3&o]}function n(e,t){for(let s=0;s<e.length;s++)e[s]^=t[3&s]}function a(e){let t;return(a.readOnly=!0,Buffer.isBuffer(e))?e:(e instanceof ArrayBuffer?t=new i(e):ArrayBuffer.isView(e)?t=new i(e.buffer,e.byteOffset,e.byteLength):(t=Buffer.from(e),a.readOnly=!1),t)}if(t.exports={concat:function(e,t){if(0===e.length)return r;if(1===e.length)return e[0];let s=Buffer.allocUnsafe(t),o=0;for(let t=0;t<e.length;t++){let r=e[t];s.set(r,o),o+=r.length}return o<t?new i(s.buffer,s.byteOffset,o):s},mask:o,toArrayBuffer:function(e){return e.length===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.length)},toBuffer:a,unmask:n},!process.env.WS_NO_BUFFER_UTIL)try{let e=(()=>{let e=Error("Cannot find module 'bufferutil'");throw e.code="MODULE_NOT_FOUND",e})();t.exports.mask=function(t,s,r,i,n){n<48?o(t,s,r,i,n):e.mask(t,s,r,i,n)},t.exports.unmask=function(t,s){t.length<32?n(t,s):e.unmask(t,s)}}catch(e){}},62048,(e,t,s)=>{"use strict";let r=Symbol("kDone"),i=Symbol("kRun");class o{constructor(e){this[r]=()=>{this.pending--,this[i]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[i]()}[i](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[r])}}}t.exports=o},80295,(e,t,s)=>{"use strict";let r,i=e.r(6461),o=e.r(97970),n=e.r(62048),{kStatusCode:a}=e.r(74836),l=Buffer[Symbol.species],h=Buffer.from([0,0,255,255]),c=Symbol("permessage-deflate"),d=Symbol("total-length"),p=Symbol("callback"),u=Symbol("buffers"),f=Symbol("error");class m{constructor(e){this._options=e||{},this._threshold=void 0!==this._options.threshold?this._options.threshold:1024,this._maxPayload=0|this._options.maxPayload,this._isServer=!!this._options.isServer,this._deflate=null,this._inflate=null,this.params=null,r||(r=new n(void 0!==this._options.concurrencyLimit?this._options.concurrencyLimit:10))}static get extensionName(){return"permessage-deflate"}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:null==this._options.clientMaxWindowBits&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let e=this._deflate[p];this._deflate.close(),this._deflate=null,e&&e(Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){let t=this._options,s=e.find(e=>(!1!==t.serverNoContextTakeover||!e.server_no_context_takeover)&&(!e.server_max_window_bits||!1!==t.serverMaxWindowBits&&("number"!=typeof t.serverMaxWindowBits||!(t.serverMaxWindowBits>e.server_max_window_bits)))&&("number"!=typeof t.clientMaxWindowBits||!!e.client_max_window_bits));if(!s)throw Error("None of the extension offers can be accepted");return t.serverNoContextTakeover&&(s.server_no_context_takeover=!0),t.clientNoContextTakeover&&(s.client_no_context_takeover=!0),"number"==typeof t.serverMaxWindowBits&&(s.server_max_window_bits=t.serverMaxWindowBits),"number"==typeof t.clientMaxWindowBits?s.client_max_window_bits=t.clientMaxWindowBits:(!0===s.client_max_window_bits||!1===t.clientMaxWindowBits)&&delete s.client_max_window_bits,s}acceptAsClient(e){let t=e[0];if(!1===this._options.clientNoContextTakeover&&t.client_no_context_takeover)throw Error('Unexpected parameter "client_no_context_takeover"');if(t.client_max_window_bits){if(!1===this._options.clientMaxWindowBits||"number"==typeof this._options.clientMaxWindowBits&&t.client_max_window_bits>this._options.clientMaxWindowBits)throw Error('Unexpected or invalid parameter "client_max_window_bits"')}else"number"==typeof this._options.clientMaxWindowBits&&(t.client_max_window_bits=this._options.clientMaxWindowBits);return t}normalizeParams(e){return e.forEach(e=>{Object.keys(e).forEach(t=>{let s=e[t];if(s.length>1)throw Error(`Parameter "${t}" must have only a single value`);if(s=s[0],"client_max_window_bits"===t){if(!0!==s){let e=+s;if(!Number.isInteger(e)||e<8||e>15)throw TypeError(`Invalid value for parameter "${t}": ${s}`);s=e}else if(!this._isServer)throw TypeError(`Invalid value for parameter "${t}": ${s}`)}else if("server_max_window_bits"===t){let e=+s;if(!Number.isInteger(e)||e<8||e>15)throw TypeError(`Invalid value for parameter "${t}": ${s}`);s=e}else if("client_no_context_takeover"===t||"server_no_context_takeover"===t){if(!0!==s)throw TypeError(`Invalid value for parameter "${t}": ${s}`)}else throw Error(`Unknown parameter "${t}"`);e[t]=s})}),e}decompress(e,t,s){r.add(r=>{this._decompress(e,t,(e,t)=>{r(),s(e,t)})})}compress(e,t,s){r.add(r=>{this._compress(e,t,(e,t)=>{r(),s(e,t)})})}_decompress(e,t,s){let r=this._isServer?"client":"server";if(!this._inflate){let e=`${r}_max_window_bits`,t="number"!=typeof this.params[e]?i.Z_DEFAULT_WINDOWBITS:this.params[e];this._inflate=i.createInflateRaw({...this._options.zlibInflateOptions,windowBits:t}),this._inflate[c]=this,this._inflate[d]=0,this._inflate[u]=[],this._inflate.on("error",y),this._inflate.on("data",g)}this._inflate[p]=s,this._inflate.write(e),t&&this._inflate.write(h),this._inflate.flush(()=>{let e=this._inflate[f];if(e){this._inflate.close(),this._inflate=null,s(e);return}let i=o.concat(this._inflate[u],this._inflate[d]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[d]=0,this._inflate[u]=[],t&&this.params[`${r}_no_context_takeover`]&&this._inflate.reset()),s(null,i)})}_compress(e,t,s){let r=this._isServer?"server":"client";if(!this._deflate){let e=`${r}_max_window_bits`,t="number"!=typeof this.params[e]?i.Z_DEFAULT_WINDOWBITS:this.params[e];this._deflate=i.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:t}),this._deflate[d]=0,this._deflate[u]=[],this._deflate.on("data",_)}this._deflate[p]=s,this._deflate.write(e),this._deflate.flush(i.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let e=o.concat(this._deflate[u],this._deflate[d]);t&&(e=new l(e.buffer,e.byteOffset,e.length-4)),this._deflate[p]=null,this._deflate[d]=0,this._deflate[u]=[],t&&this.params[`${r}_no_context_takeover`]&&this._deflate.reset(),s(null,e)})}}function _(e){this[u].push(e),this[d]+=e.length}function g(e){(this[d]+=e.length,this[c]._maxPayload<1||this[d]<=this[c]._maxPayload)?this[u].push(e):(this[f]=RangeError("Max payload size exceeded"),this[f].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[f][a]=1009,this.removeListener("data",g),this.reset())}function y(e){(this[c]._inflate=null,this[f])?this[p](this[f]):(e[a]=1007,this[p](e))}t.exports=m},874,(e,t,s)=>{t.exports=e.x("buffer",()=>require("buffer"))},58739,(e,t,s)=>{"use strict";let{isUtf8:r}=e.r(874),{hasBlob:i}=e.r(74836);function o(e){let t=e.length,s=0;for(;s<t;)if((128&e[s])==0)s++;else if((224&e[s])==192){if(s+1===t||(192&e[s+1])!=128||(254&e[s])==192)return!1;s+=2}else if((240&e[s])==224){if(s+2>=t||(192&e[s+1])!=128||(192&e[s+2])!=128||224===e[s]&&(224&e[s+1])==128||237===e[s]&&(224&e[s+1])==160)return!1;s+=3}else{if((248&e[s])!=240||s+3>=t||(192&e[s+1])!=128||(192&e[s+2])!=128||(192&e[s+3])!=128||240===e[s]&&(240&e[s+1])==128||244===e[s]&&e[s+1]>143||e[s]>244)return!1;s+=4}return!0}if(t.exports={isBlob:function(e){return i&&"object"==typeof e&&"function"==typeof e.arrayBuffer&&"string"==typeof e.type&&"function"==typeof e.stream&&("Blob"===e[Symbol.toStringTag]||"File"===e[Symbol.toStringTag])},isValidStatusCode:function(e){return e>=1e3&&e<=1014&&1004!==e&&1005!==e&&1006!==e||e>=3e3&&e<=4999},isValidUTF8:o,tokenChars:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0]},r)t.exports.isValidUTF8=function(e){return e.length<24?o(e):r(e)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let e=(()=>{let e=Error("Cannot find module 'utf-8-validate'");throw e.code="MODULE_NOT_FOUND",e})();t.exports.isValidUTF8=function(t){return t.length<32?o(t):e(t)}}catch(e){}},29485,(e,t,s)=>{"use strict";let{Writable:r}=e.r(88947),i=e.r(80295),{BINARY_TYPES:o,EMPTY_BUFFER:n,kStatusCode:a,kWebSocket:l}=e.r(74836),{concat:h,toArrayBuffer:c,unmask:d}=e.r(97970),{isValidStatusCode:p,isValidUTF8:u}=e.r(58739),f=Buffer[Symbol.species],m=0,_=1,g=2,y=3,S=4,b=5,x=6;class v extends r{constructor(e={}){super(),this._allowSynchronousEvents=void 0===e.allowSynchronousEvents||e.allowSynchronousEvents,this._binaryType=e.binaryType||o[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxBufferedChunks=0|e.maxBufferedChunks,this._maxFragments=0|e.maxFragments,this._maxPayload=0|e.maxPayload,this._skipUTF8Validation=!!e.skipUTF8Validation,this[l]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=m}_write(e,t,s){return 8===this._opcode&&this._state==m?s():this._maxBufferedChunks>0&&this._buffers.length>=this._maxBufferedChunks?void s(this.createError(RangeError,"Too many buffered chunks",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS")):void(this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(s))}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let t=this._buffers[0];return this._buffers[0]=new f(t.buffer,t.byteOffset+e,t.length-e),new f(t.buffer,t.byteOffset,e)}let t=Buffer.allocUnsafe(e);do{let s=this._buffers[0],r=t.length-e;e>=s.length?t.set(this._buffers.shift(),r):(t.set(new Uint8Array(s.buffer,s.byteOffset,e),r),this._buffers[0]=new f(s.buffer,s.byteOffset+e,s.length-e)),e-=s.length}while(e>0)return t}startLoop(e){this._loop=!0;do switch(this._state){case m:this.getInfo(e);break;case _:this.getPayloadLength16(e);break;case g:this.getPayloadLength64(e);break;case y:this.getMask();break;case S:this.getData(e);break;case b:case x:this._loop=!1;return}while(this._loop)this._errored||e()}getInfo(e){if(this._bufferedBytes<2){this._loop=!1;return}let t=this.consume(2);if((48&t[0])!=0)return void e(this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3"));let s=(64&t[0])==64;if(s&&!this._extensions[i.extensionName])return void e(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"));if(this._fin=(128&t[0])==128,this._opcode=15&t[0],this._payloadLength=127&t[1],0===this._opcode){if(s)return void e(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"));if(!this._fragmented)return void e(this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE"));this._opcode=this._fragmented}else if(1===this._opcode||2===this._opcode){if(this._fragmented)return void e(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE"));this._compressed=s}else{if(!(this._opcode>7)||!(this._opcode<11))return void e(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE"));if(!this._fin)return void e(this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN"));if(s)return void e(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"));if(this._payloadLength>125||8===this._opcode&&1===this._payloadLength)return void e(this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH"))}if(this._fin||this._fragmented||(this._fragmented=this._opcode),this._masked=(128&t[1])==128,this._isServer){if(!this._masked)return void e(this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK"))}else if(this._masked)return void e(this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK"));126===this._payloadLength?this._state=_:127===this._payloadLength?this._state=g:this.haveLength(e)}getPayloadLength16(e){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e)}getPayloadLength64(e){if(this._bufferedBytes<8){this._loop=!1;return}let t=this.consume(8),s=t.readUInt32BE(0);s>2097151?e(this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH")):(this._payloadLength=0x100000000*s+t.readUInt32BE(4),this.haveLength(e))}haveLength(e){this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)?e(this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH")):this._masked?this._state=y:this._state=S}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=S}getData(e){let t=n;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}t=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!=0&&d(t,this._mask)}if(this._opcode>7)return void this.controlMessage(t,e);if(this._compressed){this._state=b,this.decompress(t,e);return}if(t.length){if(this._maxFragments>0&&this._fragments.length>=this._maxFragments)return void e(this.createError(RangeError,"Too many message fragments",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS"));this._messageLength=this._totalPayloadLength,this._fragments.push(t)}this.dataMessage(e)}decompress(e,t){this._extensions[i.extensionName].decompress(e,this._fin,(e,s)=>{if(e)return t(e);if(s.length){if(this._messageLength+=s.length,this._messageLength>this._maxPayload&&this._maxPayload>0)return void t(this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"));if(this._maxFragments>0&&this._fragments.length>=this._maxFragments)return void t(this.createError(RangeError,"Too many message fragments",!1,1008,"WS_ERR_TOO_MANY_BUFFERED_PARTS"));this._fragments.push(s)}this.dataMessage(t),this._state===m&&this.startLoop(t)})}dataMessage(e){if(!this._fin){this._state=m;return}let t=this._messageLength,s=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],2===this._opcode){let r;r="nodebuffer"===this._binaryType?h(s,t):"arraybuffer"===this._binaryType?c(h(s,t)):"blob"===this._binaryType?new Blob(s):s,this._allowSynchronousEvents?(this.emit("message",r,!0),this._state=m):(this._state=x,setImmediate(()=>{this.emit("message",r,!0),this._state=m,this.startLoop(e)}))}else{let r=h(s,t);if(!this._skipUTF8Validation&&!u(r))return void e(this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8"));this._state===b||this._allowSynchronousEvents?(this.emit("message",r,!1),this._state=m):(this._state=x,setImmediate(()=>{this.emit("message",r,!1),this._state=m,this.startLoop(e)}))}}controlMessage(e,t){if(8===this._opcode){if(0===e.length)this._loop=!1,this.emit("conclude",1005,n),this.end();else{let s=e.readUInt16BE(0);if(!p(s))return void t(this.createError(RangeError,`invalid status code ${s}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE"));let r=new f(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!u(r))return void t(this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8"));this._loop=!1,this.emit("conclude",s,r),this.end()}this._state=m;return}this._allowSynchronousEvents?(this.emit(9===this._opcode?"ping":"pong",e),this._state=m):(this._state=x,setImmediate(()=>{this.emit(9===this._opcode?"ping":"pong",e),this._state=m,this.startLoop(t)}))}createError(e,t,s,r,i){this._loop=!1,this._errored=!0;let o=new e(s?`Invalid WebSocket frame: ${t}`:t);return Error.captureStackTrace(o,this.createError),o.code=i,o[a]=r,o}}t.exports=v},16735,(e,t,s)=>{"use strict";let r,{Duplex:i}=e.r(88947),{randomFillSync:o}=e.r(54799),{types:{isUint8Array:n}}=e.r(24361),a=e.r(80295),{EMPTY_BUFFER:l,kWebSocket:h,NOOP:c}=e.r(74836),{isBlob:d,isValidStatusCode:p}=e.r(58739),{mask:u,toBuffer:f}=e.r(97970),m=Symbol("kByteLength"),_=Buffer.alloc(4),g=8192,y=8192,S=0,b=1,x=2;class v{constructor(e,t,s){this._extensions=t||{},s&&(this._generateMask=s,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=S,this.onerror=c,this[h]=void 0}static frame(e,t){let s,i,n=!1,a=2,l=!1;t.mask&&(s=t.maskBuffer||_,t.generateMask?t.generateMask(s):(y===g&&(void 0===r&&(r=Buffer.alloc(g)),o(r,0,g),y=0),s[0]=r[y++],s[1]=r[y++],s[2]=r[y++],s[3]=r[y++]),l=(s[0]|s[1]|s[2]|s[3])==0,a=6),"string"==typeof e?i=(!t.mask||l)&&void 0!==t[m]?t[m]:(e=Buffer.from(e)).length:(i=e.length,n=t.mask&&t.readOnly&&!l);let h=i;i>=65536?(a+=8,h=127):i>125&&(a+=2,h=126);let c=Buffer.allocUnsafe(n?i+a:a);return(c[0]=t.fin?128|t.opcode:t.opcode,t.rsv1&&(c[0]|=64),c[1]=h,126===h?c.writeUInt16BE(i,2):127===h&&(c[2]=c[3]=0,c.writeUIntBE(i,4,6)),t.mask)?(c[1]|=128,c[a-4]=s[0],c[a-3]=s[1],c[a-2]=s[2],c[a-1]=s[3],l)?[c,e]:n?(u(e,s,c,a,i),[c]):(u(e,s,e,0,i),[c,e]):[c,e]}close(e,t,s,r){let i;if(void 0===e)i=l;else if("number"==typeof e&&p(e))if(void 0!==t&&t.length){let s=Buffer.byteLength(t);if(s>123)throw RangeError("The message must not be greater than 123 bytes");if((i=Buffer.allocUnsafe(2+s)).writeUInt16BE(e,0),"string"==typeof t)i.write(t,2);else if(n(t))i.set(t,2);else throw TypeError("Second argument must be a string or a Uint8Array")}else(i=Buffer.allocUnsafe(2)).writeUInt16BE(e,0);else throw TypeError("First argument must be a valid error code number");let o={[m]:i.length,fin:!0,generateMask:this._generateMask,mask:s,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state!==S?this.enqueue([this.dispatch,i,!1,o,r]):this.sendFrame(v.frame(i,o),r)}ping(e,t,s){let r,i;if("string"==typeof e?(r=Buffer.byteLength(e),i=!1):d(e)?(r=e.size,i=!1):(r=(e=f(e)).length,i=f.readOnly),r>125)throw RangeError("The data size must not be greater than 125 bytes");let o={[m]:r,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:9,readOnly:i,rsv1:!1};d(e)?this._state!==S?this.enqueue([this.getBlobData,e,!1,o,s]):this.getBlobData(e,!1,o,s):this._state!==S?this.enqueue([this.dispatch,e,!1,o,s]):this.sendFrame(v.frame(e,o),s)}pong(e,t,s){let r,i;if("string"==typeof e?(r=Buffer.byteLength(e),i=!1):d(e)?(r=e.size,i=!1):(r=(e=f(e)).length,i=f.readOnly),r>125)throw RangeError("The data size must not be greater than 125 bytes");let o={[m]:r,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:10,readOnly:i,rsv1:!1};d(e)?this._state!==S?this.enqueue([this.getBlobData,e,!1,o,s]):this.getBlobData(e,!1,o,s):this._state!==S?this.enqueue([this.dispatch,e,!1,o,s]):this.sendFrame(v.frame(e,o),s)}send(e,t,s){let r,i,o=this._extensions[a.extensionName],n=t.binary?2:1,l=t.compress;"string"==typeof e?(r=Buffer.byteLength(e),i=!1):d(e)?(r=e.size,i=!1):(r=(e=f(e)).length,i=f.readOnly),this._firstFragment?(this._firstFragment=!1,l&&o&&o.params[o._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(l=r>=o._threshold),this._compress=l):(l=!1,n=0),t.fin&&(this._firstFragment=!0);let h={[m]:r,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:n,readOnly:i,rsv1:l};d(e)?this._state!==S?this.enqueue([this.getBlobData,e,this._compress,h,s]):this.getBlobData(e,this._compress,h,s):this._state!==S?this.enqueue([this.dispatch,e,this._compress,h,s]):this.dispatch(e,this._compress,h,s)}getBlobData(e,t,s,r){this._bufferedBytes+=s[m],this._state=x,e.arrayBuffer().then(e=>{if(this._socket.destroyed){let e=Error("The socket was closed while the blob was being read");process.nextTick(k,this,e,r);return}this._bufferedBytes-=s[m];let i=f(e);t?this.dispatch(i,t,s,r):(this._state=S,this.sendFrame(v.frame(i,s),r),this.dequeue())}).catch(e=>{process.nextTick(w,this,e,r)})}dispatch(e,t,s,r){if(!t)return void this.sendFrame(v.frame(e,s),r);let i=this._extensions[a.extensionName];this._bufferedBytes+=s[m],this._state=b,i.compress(e,s.fin,(e,t)=>{this._socket.destroyed?k(this,Error("The socket was closed while data was being compressed"),r):(this._bufferedBytes-=s[m],this._state=S,s.readOnly=!1,this.sendFrame(v.frame(t,s),r),this.dequeue())})}dequeue(){for(;this._state===S&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][m],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][m],this._queue.push(e)}sendFrame(e,t){2===e.length?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],t),this._socket.uncork()):this._socket.write(e[0],t)}}function k(e,t,s){"function"==typeof s&&s(t);for(let s=0;s<e._queue.length;s++){let r=e._queue[s],i=r[r.length-1];"function"==typeof i&&i(t)}}function w(e,t,s){k(e,t,s),e.onerror(t)}t.exports=v},70494,(e,t,s)=>{"use strict";let{kForOnEventAttribute:r,kListener:i}=e.r(74836),o=Symbol("kCode"),n=Symbol("kData"),a=Symbol("kError"),l=Symbol("kMessage"),h=Symbol("kReason"),c=Symbol("kTarget"),d=Symbol("kType"),p=Symbol("kWasClean");class u{constructor(e){this[c]=null,this[d]=e}get target(){return this[c]}get type(){return this[d]}}Object.defineProperty(u.prototype,"target",{enumerable:!0}),Object.defineProperty(u.prototype,"type",{enumerable:!0});class f extends u{constructor(e,t={}){super(e),this[o]=void 0===t.code?0:t.code,this[h]=void 0===t.reason?"":t.reason,this[p]=void 0!==t.wasClean&&t.wasClean}get code(){return this[o]}get reason(){return this[h]}get wasClean(){return this[p]}}Object.defineProperty(f.prototype,"code",{enumerable:!0}),Object.defineProperty(f.prototype,"reason",{enumerable:!0}),Object.defineProperty(f.prototype,"wasClean",{enumerable:!0});class m extends u{constructor(e,t={}){super(e),this[a]=void 0===t.error?null:t.error,this[l]=void 0===t.message?"":t.message}get error(){return this[a]}get message(){return this[l]}}Object.defineProperty(m.prototype,"error",{enumerable:!0}),Object.defineProperty(m.prototype,"message",{enumerable:!0});class _ extends u{constructor(e,t={}){super(e),this[n]=void 0===t.data?null:t.data}get data(){return this[n]}}Object.defineProperty(_.prototype,"data",{enumerable:!0});let g={addEventListener(e,t,s={}){let o;for(let o of this.listeners(e))if(!s[r]&&o[i]===t&&!o[r])return;if("message"===e)o=function(e,s){let r=new _("message",{data:s?e:e.toString()});r[c]=this,y(t,this,r)};else if("close"===e)o=function(e,s){let r=new f("close",{code:e,reason:s.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});r[c]=this,y(t,this,r)};else if("error"===e)o=function(e){let s=new m("error",{error:e,message:e.message});s[c]=this,y(t,this,s)};else{if("open"!==e)return;o=function(){let e=new u("open");e[c]=this,y(t,this,e)}}o[r]=!!s[r],o[i]=t,s.once?this.once(e,o):this.on(e,o)},removeEventListener(e,t){for(let s of this.listeners(e))if(s[i]===t&&!s[r]){this.removeListener(e,s);break}}};function y(e,t,s){"object"==typeof e&&e.handleEvent?e.handleEvent.call(e,s):e.call(t,s)}t.exports={CloseEvent:f,ErrorEvent:m,Event:u,EventTarget:g,MessageEvent:_}},96903,(e,t,s)=>{"use strict";let{tokenChars:r}=e.r(58739);function i(e,t,s){void 0===e[t]?e[t]=[s]:e[t].push(s)}t.exports={format:function(e){return Object.keys(e).map(t=>{let s=e[t];return Array.isArray(s)||(s=[s]),s.map(e=>[t].concat(Object.keys(e).map(t=>{let s=e[t];return Array.isArray(s)||(s=[s]),s.map(e=>!0===e?t:`${t}=${e}`).join("; ")})).join("; ")).join(", ")}).join(", ")},parse:function(e){let t,s,o=Object.create(null),n=Object.create(null),a=!1,l=!1,h=!1,c=-1,d=-1,p=-1,u=0;for(;u<e.length;u++)if(d=e.charCodeAt(u),void 0===t)if(-1===p&&1===r[d])-1===c&&(c=u);else if(0!==u&&(32===d||9===d))-1===p&&-1!==c&&(p=u);else if(59===d||44===d){if(-1===c)throw SyntaxError(`Unexpected character at index ${u}`);-1===p&&(p=u);let s=e.slice(c,p);44===d?(i(o,s,n),n=Object.create(null)):t=s,c=p=-1}else throw SyntaxError(`Unexpected character at index ${u}`);else if(void 0===s)if(-1===p&&1===r[d])-1===c&&(c=u);else if(32===d||9===d)-1===p&&-1!==c&&(p=u);else if(59===d||44===d){if(-1===c)throw SyntaxError(`Unexpected character at index ${u}`);-1===p&&(p=u),i(n,e.slice(c,p),!0),44===d&&(i(o,t,n),n=Object.create(null),t=void 0),c=p=-1}else if(61===d&&-1!==c&&-1===p)s=e.slice(c,u),c=p=-1;else throw SyntaxError(`Unexpected character at index ${u}`);else if(l){if(1!==r[d])throw SyntaxError(`Unexpected character at index ${u}`);-1===c?c=u:a||(a=!0),l=!1}else if(h)if(1===r[d])-1===c&&(c=u);else if(34===d&&-1!==c)h=!1,p=u;else if(92===d)l=!0;else throw SyntaxError(`Unexpected character at index ${u}`);else if(34===d&&61===e.charCodeAt(u-1))h=!0;else if(-1===p&&1===r[d])-1===c&&(c=u);else if(-1!==c&&(32===d||9===d))-1===p&&(p=u);else if(59===d||44===d){if(-1===c)throw SyntaxError(`Unexpected character at index ${u}`);-1===p&&(p=u);let r=e.slice(c,p);a&&(r=r.replace(/\\/g,""),a=!1),i(n,s,r),44===d&&(i(o,t,n),n=Object.create(null),t=void 0),s=void 0,c=p=-1}else throw SyntaxError(`Unexpected character at index ${u}`);if(-1===c||h||32===d||9===d)throw SyntaxError("Unexpected end of input");-1===p&&(p=u);let f=e.slice(c,p);return void 0===t?i(o,f,n):(void 0===s?i(n,f,!0):a?i(n,s,f.replace(/\\/g,"")):i(n,s,f),i(o,t,n)),o}}},35065,(e,t,s)=>{"use strict";let r=e.r(27699),i=e.r(24836),o=e.r(21517),n=e.r(4446),a=e.r(55004),{randomBytes:l,createHash:h}=e.r(54799),{Duplex:c,Readable:d}=e.r(88947),{URL:p}=e.r(92509),u=e.r(80295),f=e.r(29485),m=e.r(16735),{isBlob:_}=e.r(58739),{BINARY_TYPES:g,CLOSE_TIMEOUT:y,EMPTY_BUFFER:S,GUID:b,kForOnEventAttribute:x,kListener:v,kStatusCode:k,kWebSocket:w,NOOP:E}=e.r(74836),{EventTarget:{addEventListener:L,removeEventListener:O}}=e.r(70494),{format:C,parse:P}=e.r(96903),{toBuffer:T}=e.r(97970),A=Symbol("kAborted"),N=[8,13],R=["CONNECTING","OPEN","CLOSING","CLOSED"],I=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;class D extends r{constructor(e,t,s){super(),this._binaryType=g[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=S,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=D.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,null!==e?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,void 0===t?t=[]:Array.isArray(t)||("object"==typeof t&&null!==t?(s=t,t=[]):t=[t]),M(this,e,t,s)):(this._autoPong=s.autoPong,this._closeTimeout=s.closeTimeout,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){g.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(e,t,s){let r=new f({allowSynchronousEvents:s.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxBufferedChunks:s.maxBufferedChunks,maxFragments:s.maxFragments,maxPayload:s.maxPayload,skipUTF8Validation:s.skipUTF8Validation}),i=new m(e,this._extensions,s.generateMask);this._receiver=r,this._sender=i,this._socket=e,r[w]=this,i[w]=this,e[w]=this,r.on("conclude",G),r.on("drain",j),r.on("error",V),r.on("message",H),r.on("ping",z),r.on("pong",K),i.onerror=J,e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),t.length>0&&e.unshift(t),e.on("close",Z),e.on("data",Q),e.on("end",ee),e.on("error",et),this._readyState=D.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=D.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[u.extensionName]&&this._extensions[u.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=D.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,t){if(this.readyState!==D.CLOSED){if(this.readyState===D.CONNECTING){let e="WebSocket was closed before the connection was established";W(this,this._req,e);return}if(this.readyState===D.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=D.CLOSING,this._sender.close(e,t,!this._isServer,e=>{!e&&(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),X(this)}}pause(){this.readyState!==D.CONNECTING&&this.readyState!==D.CLOSED&&(this._paused=!0,this._socket.pause())}ping(e,t,s){if(this.readyState===D.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");("function"==typeof e?(s=e,e=t=void 0):"function"==typeof t&&(s=t,t=void 0),"number"==typeof e&&(e=e.toString()),this.readyState!==D.OPEN)?$(this,e,s):(void 0===t&&(t=!this._isServer),this._sender.ping(e||S,t,s))}pong(e,t,s){if(this.readyState===D.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");("function"==typeof e?(s=e,e=t=void 0):"function"==typeof t&&(s=t,t=void 0),"number"==typeof e&&(e=e.toString()),this.readyState!==D.OPEN)?$(this,e,s):(void 0===t&&(t=!this._isServer),this._sender.pong(e||S,t,s))}resume(){this.readyState!==D.CONNECTING&&this.readyState!==D.CLOSED&&(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,t,s){if(this.readyState===D.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");if("function"==typeof t&&(s=t,t={}),"number"==typeof e&&(e=e.toString()),this.readyState!==D.OPEN)return void $(this,e,s);let r={binary:"string"!=typeof e,mask:!this._isServer,compress:!0,fin:!0,...t};this._extensions[u.extensionName]||(r.compress=!1),this._sender.send(e||S,r,s)}terminate(){if(this.readyState!==D.CLOSED){if(this.readyState===D.CONNECTING){let e="WebSocket was closed before the connection was established";W(this,this._req,e);return}this._socket&&(this._readyState=D.CLOSING,this._socket.destroy())}}}function M(e,t,s,r){let n,a,c,d,f={allowSynchronousEvents:!0,autoPong:!0,closeTimeout:y,protocolVersion:N[1],maxBufferedChunks:1048576,maxFragments:131072,maxPayload:0x6400000,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(e._autoPong=f.autoPong,e._closeTimeout=f.closeTimeout,!N.includes(f.protocolVersion))throw RangeError(`Unsupported protocol version: ${f.protocolVersion} (supported versions: ${N.join(", ")})`);if(t instanceof p)n=t;else try{n=new p(t)}catch{throw SyntaxError(`Invalid URL: ${t}`)}"http:"===n.protocol?n.protocol="ws:":"https:"===n.protocol&&(n.protocol="wss:"),e._url=n.href;let m="wss:"===n.protocol,_="ws+unix:"===n.protocol;if("ws:"===n.protocol||m||_?_&&!n.pathname?a="The URL's pathname is empty":n.hash&&(a="The URL contains a fragment identifier"):a='The URL\'s protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"',a){let t=SyntaxError(a);if(0!==e._redirects)return void U(e,t);throw t}let g=m?443:80,S=l(16).toString("base64"),x=m?i.request:o.request,v=new Set;if(f.createConnection=f.createConnection||(m?F:B),f.defaultPort=f.defaultPort||g,f.port=n.port||g,f.host=n.hostname.startsWith("[")?n.hostname.slice(1,-1):n.hostname,f.headers={...f.headers,"Sec-WebSocket-Version":f.protocolVersion,"Sec-WebSocket-Key":S,Connection:"Upgrade",Upgrade:"websocket"},f.path=n.pathname+n.search,f.timeout=f.handshakeTimeout,f.perMessageDeflate&&(c=new u({...f.perMessageDeflate,isServer:!1,maxPayload:f.maxPayload}),f.headers["Sec-WebSocket-Extensions"]=C({[u.extensionName]:c.offer()})),s.length){for(let e of s){if("string"!=typeof e||!I.test(e)||v.has(e))throw SyntaxError("An invalid or duplicated subprotocol was specified");v.add(e)}f.headers["Sec-WebSocket-Protocol"]=s.join(",")}if(f.origin&&(f.protocolVersion<13?f.headers["Sec-WebSocket-Origin"]=f.origin:f.headers.Origin=f.origin),(n.username||n.password)&&(f.auth=`${n.username}:${n.password}`),_){let e=f.path.split(":");f.socketPath=e[0],f.path=e[1]}if(f.followRedirects){if(0===e._redirects){e._originalIpc=_,e._originalSecure=m,e._originalHostOrSocketPath=_?f.socketPath:n.host;let t=r&&r.headers;if(r={...r,headers:{}},t)for(let[e,s]of Object.entries(t))r.headers[e.toLowerCase()]=s}else if(0===e.listenerCount("redirect")){let t=_?!!e._originalIpc&&f.socketPath===e._originalHostOrSocketPath:!e._originalIpc&&n.host===e._originalHostOrSocketPath;t&&(!e._originalSecure||m)||(delete f.headers.authorization,delete f.headers.cookie,t||delete f.headers.host,f.auth=void 0)}f.auth&&!r.headers.authorization&&(r.headers.authorization="Basic "+Buffer.from(f.auth).toString("base64")),d=e._req=x(f),e._redirects&&e.emit("redirect",e.url,d)}else d=e._req=x(f);f.timeout&&d.on("timeout",()=>{W(e,d,"Opening handshake has timed out")}),d.on("error",t=>{null===d||d[A]||(d=e._req=null,U(e,t))}),d.on("response",i=>{let o=i.headers.location,n=i.statusCode;if(o&&f.followRedirects&&n>=300&&n<400){let i;if(++e._redirects>f.maxRedirects)return void W(e,d,"Maximum redirects exceeded");d.abort();try{i=new p(o,t)}catch(t){U(e,SyntaxError(`Invalid URL: ${o}`));return}M(e,i,s,r)}else e.emit("unexpected-response",d,i)||W(e,d,`Unexpected server response: ${i.statusCode}`)}),d.on("upgrade",(t,s,r)=>{let i;if(e.emit("upgrade",t),e.readyState!==D.CONNECTING)return;d=e._req=null;let o=t.headers.upgrade;if(void 0===o||"websocket"!==o.toLowerCase())return void W(e,s,"Invalid Upgrade header");let n=h("sha1").update(S+b).digest("base64");if(t.headers["sec-websocket-accept"]!==n)return void W(e,s,"Invalid Sec-WebSocket-Accept header");let a=t.headers["sec-websocket-protocol"];if(void 0!==a?v.size?v.has(a)||(i="Server sent an invalid subprotocol"):i="Server sent a subprotocol but none was requested":v.size&&(i="Server sent no subprotocol"),i)return void W(e,s,i);a&&(e._protocol=a);let l=t.headers["sec-websocket-extensions"];if(void 0!==l){let t;if(!c)return void W(e,s,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");try{t=P(l)}catch(t){W(e,s,"Invalid Sec-WebSocket-Extensions header");return}let r=Object.keys(t);if(1!==r.length||r[0]!==u.extensionName)return void W(e,s,"Server indicated an extension that was not requested");try{c.accept(t[u.extensionName])}catch(t){W(e,s,"Invalid Sec-WebSocket-Extensions header");return}e._extensions[u.extensionName]=c}e.setSocket(s,r,{allowSynchronousEvents:f.allowSynchronousEvents,generateMask:f.generateMask,maxBufferedChunks:f.maxBufferedChunks,maxFragments:f.maxFragments,maxPayload:f.maxPayload,skipUTF8Validation:f.skipUTF8Validation})}),f.finishRequest?f.finishRequest(d,e):d.end()}function U(e,t){e._readyState=D.CLOSING,e._errorEmitted=!0,e.emit("error",t),e.emitClose()}function B(e){return e.path=e.socketPath,n.connect(e)}function F(e){return e.path=void 0,e.servername||""===e.servername||(e.servername=n.isIP(e.host)?"":e.host),a.connect(e)}function W(e,t,s){e._readyState=D.CLOSING;let r=Error(s);Error.captureStackTrace(r,W),t.setHeader?(t[A]=!0,t.abort(),t.socket&&!t.socket.destroyed&&t.socket.destroy(),process.nextTick(U,e,r)):(t.destroy(r),t.once("error",e.emit.bind(e,"error")),t.once("close",e.emitClose.bind(e)))}function $(e,t,s){if(t){let s=_(t)?t.size:T(t).length;e._socket?e._sender._bufferedBytes+=s:e._bufferedAmount+=s}if(s){let t=Error(`WebSocket is not open: readyState ${e.readyState} (${R[e.readyState]})`);process.nextTick(s,t)}}function G(e,t){let s=this[w];s._closeFrameReceived=!0,s._closeMessage=t,s._closeCode=e,void 0!==s._socket[w]&&(s._socket.removeListener("data",Q),process.nextTick(Y,s._socket),1005===e?s.close():s.close(e,t))}function j(){let e=this[w];e.isPaused||e._socket.resume()}function V(e){let t=this[w];void 0!==t._socket[w]&&(t._socket.removeListener("data",Q),process.nextTick(Y,t._socket),t.close(e[k])),t._errorEmitted||(t._errorEmitted=!0,t.emit("error",e))}function q(){this[w].emitClose()}function H(e,t){this[w].emit("message",e,t)}function z(e){let t=this[w];t._autoPong&&t.pong(e,!this._isServer,E),t.emit("ping",e)}function K(e){this[w].emit("pong",e)}function Y(e){e.resume()}function J(e){let t=this[w];t.readyState!==D.CLOSED&&(t.readyState===D.OPEN&&(t._readyState=D.CLOSING,X(t)),this._socket.end(),t._errorEmitted||(t._errorEmitted=!0,t.emit("error",e)))}function X(e){e._closeTimer=setTimeout(e._socket.destroy.bind(e._socket),e._closeTimeout)}function Z(){let e=this[w];if(this.removeListener("close",Z),this.removeListener("data",Q),this.removeListener("end",ee),e._readyState=D.CLOSING,!this._readableState.endEmitted&&!e._closeFrameReceived&&!e._receiver._writableState.errorEmitted&&0!==this._readableState.length){let t=this.read(this._readableState.length);e._receiver.write(t)}e._receiver.end(),this[w]=void 0,clearTimeout(e._closeTimer),e._receiver._writableState.finished||e._receiver._writableState.errorEmitted?e.emitClose():(e._receiver.on("error",q),e._receiver.on("finish",q))}function Q(e){this[w]._receiver.write(e)||this.pause()}function ee(){let e=this[w];e._readyState=D.CLOSING,e._receiver.end(),this.end()}function et(){let e=this[w];this.removeListener("error",et),this.on("error",E),e&&(e._readyState=D.CLOSING,this.destroy())}Object.defineProperty(D,"CONNECTING",{enumerable:!0,value:R.indexOf("CONNECTING")}),Object.defineProperty(D.prototype,"CONNECTING",{enumerable:!0,value:R.indexOf("CONNECTING")}),Object.defineProperty(D,"OPEN",{enumerable:!0,value:R.indexOf("OPEN")}),Object.defineProperty(D.prototype,"OPEN",{enumerable:!0,value:R.indexOf("OPEN")}),Object.defineProperty(D,"CLOSING",{enumerable:!0,value:R.indexOf("CLOSING")}),Object.defineProperty(D.prototype,"CLOSING",{enumerable:!0,value:R.indexOf("CLOSING")}),Object.defineProperty(D,"CLOSED",{enumerable:!0,value:R.indexOf("CLOSED")}),Object.defineProperty(D.prototype,"CLOSED",{enumerable:!0,value:R.indexOf("CLOSED")}),["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(e=>{Object.defineProperty(D.prototype,e,{enumerable:!0})}),["open","error","close","message"].forEach(e=>{Object.defineProperty(D.prototype,`on${e}`,{enumerable:!0,get(){for(let t of this.listeners(e))if(t[x])return t[v];return null},set(t){for(let t of this.listeners(e))if(t[x]){this.removeListener(e,t);break}"function"==typeof t&&this.addEventListener(e,t,{[x]:!0})}})}),D.prototype.addEventListener=L,D.prototype.removeEventListener=O,t.exports=D},21365,(e,t,s)=>{"use strict";e.r(35065);let{Duplex:r}=e.r(88947);function i(e){e.emit("close")}function o(){!this.destroyed&&this._writableState.finished&&this.destroy()}function n(e){this.removeListener("error",n),this.destroy(),0===this.listenerCount("error")&&this.emit("error",e)}t.exports=function(e,t){let s=!0,a=new r({...t,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return e.on("message",function(t,s){let r=!s&&a._readableState.objectMode?t.toString():t;a.push(r)||e.pause()}),e.once("error",function(e){a.destroyed||(s=!1,a.destroy(e))}),e.once("close",function(){a.destroyed||a.push(null)}),a._destroy=function(t,r){if(e.readyState===e.CLOSED){r(t),process.nextTick(i,a);return}let o=!1;e.once("error",function(e){o=!0,r(e)}),e.once("close",function(){o||r(t),process.nextTick(i,a)}),s&&e.terminate()},a._final=function(t){e.readyState===e.CONNECTING?e.once("open",function(){a._final(t)}):null!==e._socket&&(e._socket._writableState.finished?(t(),a._readableState.endEmitted&&a.destroy()):(e._socket.once("finish",function(){t()}),e.close()))},a._read=function(){e.isPaused&&e.resume()},a._write=function(t,s,r){e.readyState===e.CONNECTING?e.once("open",function(){a._write(t,s,r)}):e.send(t,r)},a.on("end",o),a.on("error",n),a}},42977,(e,t,s)=>{"use strict";let{tokenChars:r}=e.r(58739);t.exports={parse:function(e){let t=new Set,s=-1,i=-1,o=0;for(;o<e.length;o++){let n=e.charCodeAt(o);if(-1===i&&1===r[n])-1===s&&(s=o);else if(0!==o&&(32===n||9===n))-1===i&&-1!==s&&(i=o);else if(44===n){if(-1===s)throw SyntaxError(`Unexpected character at index ${o}`);-1===i&&(i=o);let r=e.slice(s,i);if(t.has(r))throw SyntaxError(`The "${r}" subprotocol is duplicated`);t.add(r),s=i=-1}else throw SyntaxError(`Unexpected character at index ${o}`)}if(-1===s||-1!==i)throw SyntaxError("Unexpected end of input");let n=e.slice(s,o);if(t.has(n))throw SyntaxError(`The "${n}" subprotocol is duplicated`);return t.add(n),t}}},17198,(e,t,s)=>{"use strict";let r=e.r(27699),i=e.r(21517),{Duplex:o}=e.r(88947),{createHash:n}=e.r(54799),a=e.r(96903),l=e.r(80295),h=e.r(42977),c=e.r(35065),{CLOSE_TIMEOUT:d,GUID:p,kWebSocket:u}=e.r(74836),f=/^[+/0-9A-Za-z]{22}==$/,m=0,_=1,g=2;class y extends r{constructor(e,t){if(super(),null==(e={allowSynchronousEvents:!0,autoPong:!0,maxBufferedChunks:1048576,maxFragments:131072,maxPayload:0x6400000,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,closeTimeout:d,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:c,...e}).port&&!e.server&&!e.noServer||null!=e.port&&(e.server||e.noServer)||e.server&&e.noServer)throw TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(null!=e.port?(this._server=i.createServer((e,t)=>{let s=i.STATUS_CODES[426];t.writeHead(426,{"Content-Length":s.length,"Content-Type":"text/plain"}),t.end(s)}),this._server.listen(e.port,e.host,e.backlog,t)):e.server&&(this._server=e.server),this._server){const e=this.emit.bind(this,"connection");this._removeListeners=S(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(t,s,r)=>{this.handleUpgrade(t,s,r,e)}})}!0===e.perMessageDeflate&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=m}address(){if(this.options.noServer)throw Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(e){if(this._state===g){e&&this.once("close",()=>{e(Error("The server is not running"))}),process.nextTick(b,this);return}if(e&&this.once("close",e),this._state!==_)if(this._state=_,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients&&this.clients.size?this._shouldEmitClose=!0:process.nextTick(b,this);else{let e=this._server;this._removeListeners(),this._removeListeners=this._server=null,e.close(()=>{b(this)})}}shouldHandle(e){if(this.options.path){let t=e.url.indexOf("?");if((-1!==t?e.url.slice(0,t):e.url)!==this.options.path)return!1}return!0}handleUpgrade(e,t,s,r){t.on("error",x);let i=e.headers["sec-websocket-key"],o=e.headers.upgrade,n=+e.headers["sec-websocket-version"];if("GET"!==e.method)return void k(this,e,t,405,"Invalid HTTP method");if(void 0===o||"websocket"!==o.toLowerCase())return void k(this,e,t,400,"Invalid Upgrade header");if(void 0===i||!f.test(i))return void k(this,e,t,400,"Missing or invalid Sec-WebSocket-Key header");if(13!==n&&8!==n)return void k(this,e,t,400,"Missing or invalid Sec-WebSocket-Version header",{"Sec-WebSocket-Version":"13, 8"});if(!this.shouldHandle(e))return void v(t,400);let c=e.headers["sec-websocket-protocol"],d=new Set;if(void 0!==c)try{d=h.parse(c)}catch(s){k(this,e,t,400,"Invalid Sec-WebSocket-Protocol header");return}let p=e.headers["sec-websocket-extensions"],u={};if(this.options.perMessageDeflate&&void 0!==p){let s=new l({...this.options.perMessageDeflate,isServer:!0,maxPayload:this.options.maxPayload});try{let e=a.parse(p);e[l.extensionName]&&(s.accept(e[l.extensionName]),u[l.extensionName]=s)}catch(s){k(this,e,t,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let o={origin:e.headers[`${8===n?"sec-websocket-origin":"origin"}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(2===this.options.verifyClient.length)return void this.options.verifyClient(o,(o,n,a,l)=>{if(!o)return v(t,n||401,a,l);this.completeUpgrade(u,i,d,e,t,s,r)});if(!this.options.verifyClient(o))return v(t,401)}this.completeUpgrade(u,i,d,e,t,s,r)}completeUpgrade(e,t,s,r,i,o,h){if(!i.readable||!i.writable)return i.destroy();if(i[u])throw Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>m)return v(i,503);let c=n("sha1").update(t+p).digest("base64"),d=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${c}`],f=new this.options.WebSocket(null,void 0,this.options);if(s.size){let e=this.options.handleProtocols?this.options.handleProtocols(s,r):s.values().next().value;e&&(d.push(`Sec-WebSocket-Protocol: ${e}`),f._protocol=e)}if(e[l.extensionName]){let t=e[l.extensionName].params,s=a.format({[l.extensionName]:[t]});d.push(`Sec-WebSocket-Extensions: ${s}`),f._extensions=e}this.emit("headers",d,r),i.write(d.concat("\r\n").join("\r\n")),i.removeListener("error",x),f.setSocket(i,o,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxBufferedChunks:this.options.maxBufferedChunks,maxFragments:this.options.maxFragments,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(f),f.on("close",()=>{this.clients.delete(f),this._shouldEmitClose&&!this.clients.size&&process.nextTick(b,this)})),h(f,r)}}function S(e,t){for(let s of Object.keys(t))e.on(s,t[s]);return function(){for(let s of Object.keys(t))e.removeListener(s,t[s])}}function b(e){e._state=g,e.emit("close")}function x(){this.destroy()}function v(e,t,s,r){s=s||i.STATUS_CODES[t],r={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(s),...r},e.once("finish",e.destroy),e.end(`HTTP/1.1 ${t} ${i.STATUS_CODES[t]}\r
|
|
2
|
+
`+Object.keys(r).map(e=>`${e}: ${r[e]}`).join("\r\n")+"\r\n\r\n"+s)}function k(e,t,s,r,i,o){if(e.listenerCount("wsClientError")){let r=Error(i);Error.captureStackTrace(r,k),e.emit("wsClientError",r,s,t)}else v(s,r,i,o)}t.exports=y},29307,__turbopack_context__=>{"use strict";__turbopack_context__.s(["SessionManager",()=>SessionManager],29307);var __TURBOPACK__imported__module__54799__=__turbopack_context__.i(54799);class AgentRunner{workspaceRoot;scopedDirs;tokenUsage={input:0,output:0,cost:0};parseTokenUsage(e){let t=e.replace(/\x1b\[[0-9;]*m/g,""),s=t.match(/(?:cost|estimated cost)[:\s]*\$([0-9.]+)/i);s&&(this.tokenUsage.cost=parseFloat(s[1]));let r=e=>(e=e.replace(/,/g,"").toLowerCase().trim()).endsWith("k")?1e3*parseFloat(e.slice(0,-1)):e.endsWith("m")?1e6*parseFloat(e.slice(0,-1)):parseInt(e,10)||0,i=/tokens?[:\s]*([0-9,.]+[km]?)\s*(?:sent|input|prompt)[^a-zA-Z0-9]+([0-9,.]+[km]?)\s*(?:received|output|completion)/i,o=t.match(i);if(o)this.tokenUsage.input=r(o[1]),this.tokenUsage.output=r(o[2]);else{let e=t.match(/([0-9,.]+[km]?)\s*(?:sent|input|prompt)\s*tokens?/i)||t.match(/tokens?\s*(?:sent|input|prompt)[:\s]*([0-9,.]+[km]?)/i);e&&(this.tokenUsage.input=r(e[1]));let s=t.match(/([0-9,.]+[km]?)\s*(?:received|output|completion)\s*tokens?/i)||t.match(/tokens?\s*(?:received|output|completion)[:\s]*([0-9,.]+[km]?)/i);s&&(this.tokenUsage.output=r(s[1]))}0===this.tokenUsage.cost&&(this.tokenUsage.input>0||this.tokenUsage.output>0)&&(this.tokenUsage.cost=3e-6*this.tokenUsage.input+15e-6*this.tokenUsage.output)}listeners=[];onOutput(e){this.listeners.push(e)}offOutput(e){this.listeners=this.listeners.filter(t=>t!==e)}emitOutput(e){this.listeners.forEach(t=>t(e))}}var __TURBOPACK__imported__module__22734__=__turbopack_context__.i(22734),__TURBOPACK__imported__module__14747__=__turbopack_context__.i(14747);class SessionPersister{static get workspaceRoot(){return process.env.ORIGINAL_CWD||process.cwd()}static getSessionsDir(){let e=__TURBOPACK__imported__module__14747__.default.join(this.workspaceRoot,".ai","neural-loom","sessions");return __TURBOPACK__imported__module__22734__.default.existsSync(e)||__TURBOPACK__imported__module__22734__.default.mkdirSync(e,{recursive:!0}),e}static saveSession(e){try{let t=this.getSessionsDir(),s=__TURBOPACK__imported__module__14747__.default.join(t,`${e.id}.json`),r={id:e.id,name:e.name,type:e.type,status:"running"===e.status&&"mock"===e.type?"running":e.status,createdAt:e.createdAt,logs:e.logs,workspaceRoot:e.workspaceRoot,scopedDirs:e.scopedDirs};__TURBOPACK__imported__module__22734__.default.writeFileSync(s,JSON.stringify(r,null,2),"utf8")}catch(t){console.error(`[SessionPersister] Failed to save session ${e.id}:`,t)}}static loadAllSessions(){try{let e=this.getSessionsDir(),t=__TURBOPACK__imported__module__22734__.default.readdirSync(e),s=[];for(let r of t)if(r.endsWith(".json")){let t=__TURBOPACK__imported__module__14747__.default.join(e,r),i=__TURBOPACK__imported__module__22734__.default.readFileSync(t,"utf8"),o=JSON.parse(i);"running"===o.status&&"mock"!==o.type&&(o.status="stopped",o.logs.push("\r\n\x1b[1;31m[System] Server restarted. Terminal connection lost.\x1b[0m\r\n"),__TURBOPACK__imported__module__22734__.default.writeFileSync(t,JSON.stringify(o,null,2),"utf8")),s.push(o)}return s}catch(e){return console.error("[SessionPersister] Failed to load sessions:",e),[]}}static deleteSession(e){try{let t=this.getSessionsDir(),s=__TURBOPACK__imported__module__14747__.default.join(t,`${e}.json`);__TURBOPACK__imported__module__22734__.default.existsSync(s)&&__TURBOPACK__imported__module__22734__.default.unlinkSync(s)}catch(t){console.error(`[SessionPersister] Failed to delete session ${e}:`,t)}}}class MockRunner extends AgentRunner{id;name;type="mock";status="idle";createdAt;logs=[];intervalId=null;mockSteps=["[NeuralLoom] Loading virtual PTY context...","[NeuralLoom] Spawning sandbox mock runtime environment...","[Mock Agent] Model online (v2.0-mock-flash). Dedicated memory allocated.","[Mock Agent] System rules parsed successfully from global context registry.","[Mock Agent] Awaiting developer commands. Type '/help' to list mock skills."];stepIndex=0;constructor(e,t){super(),this.id=e,this.name=t||`Mock Session ${e.substring(0,8)}`,this.createdAt=new Date().toISOString()}appendLog(e){this.logs.push(e),this.parseTokenUsage(e),this.emitOutput(e+"\r\n"),SessionPersister.saveSession(this)}async start(){"running"!==this.status&&(this.status="running",this.appendLog("\x1b[1;35m==================================================\x1b[0m"),this.appendLog("\x1b[1;36m NEURALLOOM SIMULATED AGENT ENVIRONMENT \x1b[0m"),this.appendLog("\x1b[1;35m==================================================\x1b[0m"),this.stepIndex<this.mockSteps.length&&this.appendLog(this.mockSteps[this.stepIndex++]),this.intervalId=setInterval(()=>{if(this.tokenUsage.input+=Math.floor(50*Math.random())+10,this.tokenUsage.output+=Math.floor(20*Math.random())+5,this.tokenUsage.cost=3e-6*this.tokenUsage.input+15e-6*this.tokenUsage.output,this.stepIndex<this.mockSteps.length)this.appendLog(this.mockSteps[this.stepIndex++]);else{let e=new Date().toLocaleTimeString();this.appendLog(`[${e}] [Telemetry] CPU utilization 1.2% | Memory 142MB | Link stable.`)}},4e3))}async stop(){this.status="stopped",this.intervalId&&(clearInterval(this.intervalId),this.intervalId=null),this.appendLog("\x1b[1;31m[System] Process terminated. Connection closed.\x1b[0m")}async sendInput(e,t){"running"!==this.status?this.appendLog(`\x1b[1;31m[Error] Cannot write input: process is ${this.status}.\x1b[0m`):(this.appendLog(`\x1b[1;32m> ${e}\x1b[0m`),setTimeout(()=>{let t=e.trim().toLowerCase();"/help"===t?(this.appendLog("[Mock Agent] Available commands:"),this.appendLog(" /help - List available mock commands."),this.appendLog(" /status - Fetch current agent diagnostic metrics."),this.appendLog(" /context - View loaded staging files."),this.appendLog(" /clear - Flush terminal console buffer.")):"/status"===t?(this.appendLog("[Mock Agent] Diagnostics:"),this.appendLog(" - Connection Type: WebSocket gateway (mock)"),this.appendLog(` - Active Runtime: ${this.id}`),this.appendLog(" - Sandbox State: Healthy (0 warnings)")):"/context"===t?(this.appendLog("[Mock Agent] Loaded Workspace Context Files:"),this.appendLog(" - [Mounted] src/app/globals.css (Modified)"),this.appendLog(" - [Mounted] src/app/page.tsx")):"/clear"===t?(this.logs=[],this.appendLog("\x1b[1;33m[Console Cleared]\x1b[0m")):(this.appendLog(`[Mock Agent] Received command: "${e}". Processing...`),setTimeout(()=>{this.appendLog("[Mock Agent] Done. Task simulated successfully.")},1500))},400))}getStatus(){return{id:this.id,name:this.name,type:this.type,status:this.status,createdAt:this.createdAt,logsCount:this.logs.length,tokenUsage:this.tokenUsage}}}var __TURBOPACK__imported__module__22734__1=__TURBOPACK__imported__module__22734__,__TURBOPACK__imported__module__14747__1=__TURBOPACK__imported__module__14747__;function isWindows(){if("u"<typeof process)return!1;let e=Object.keys(process).find(e=>e.startsWith("plat")&&e.endsWith("form"));return!!e&&"win32"===process[e]}function findGitBash(){if(!isWindows())return"bash";let e=process.env.PROGRAMFILES||"C:\\Program Files",t=process.env["PROGRAMFILES(X86)"]||"C:\\Program Files (x86)",s=process.env.LOCALAPPDATA||"";return[process.env.WINGMAN_BASH_PATH,__TURBOPACK__imported__module__14747__1.default.join(e,"Git","bin","bash.exe"),__TURBOPACK__imported__module__14747__1.default.join(t,"Git","bin","bash.exe"),s?__TURBOPACK__imported__module__14747__1.default.join(s,"Programs","Git","bin","bash.exe"):""].filter(e=>"string"==typeof e&&""!==e).find(e=>__TURBOPACK__imported__module__22734__1.default.existsSync(e))||null}class ClaudeRunner extends AgentRunner{id;name;type="claude";status="idle";createdAt;logs=[];ptyProcess=null;ptyModule=null;constructor(e,t){super(),this.id=e,this.name=t||`Claude Session ${e.substring(0,8)}`,this.createdAt=new Date().toISOString()}appendLog(e){this.logs.push(e),this.logs.length>5e3&&this.logs.shift(),this.parseTokenUsage(e),this.emitOutput(e),SessionPersister.saveSession(this)}async start(){if("running"===this.status)return;let bashPath=findGitBash();if(!bashPath){this.status="stopped",this.appendLog("\x1b[1;31m[System Error] Git Bash not found. Please install Git for Windows.\x1b[0m\r\n");return}try{this.ptyModule||(this.ptyModule=eval("require")("node-pty")),this.status="running",this.appendLog("\x1b[1;35m==================================================\x1b[0m\r\n"),this.appendLog("\x1b[1;36m NEURALLOOM ACTIVE CLAUDE TERMINAL ROUTE \x1b[0m\r\n"),this.appendLog("\x1b[1;35m==================================================\x1b[0m\r\n");let targetCwd=this.workspaceRoot&&__TURBOPACK__imported__module__22734__1.default.existsSync(this.workspaceRoot)?this.workspaceRoot:process.env.ORIGINAL_CWD||process.cwd(),extraFlags="",claudeConfigPath=__TURBOPACK__imported__module__14747__1.default.join(process.env.ORIGINAL_CWD||process.cwd(),".ai","neural-loom","claude.json");if(__TURBOPACK__imported__module__22734__1.default.existsSync(claudeConfigPath))try{let config=JSON.parse(__TURBOPACK__imported__module__22734__1.default.readFileSync(claudeConfigPath,"utf8"));config.extraFlags&&(extraFlags=config.extraFlags)}catch(err){console.error("Failed to parse Claude configuration:",err)}let claudeCmd=`claude ${extraFlags}`.trim();this.appendLog(`[System] Spawning command: ${claudeCmd}\r
|
|
3
|
+
`),this.ptyProcess=this.ptyModule.spawn(bashPath,["-c",claudeCmd],{name:"xterm-256color",cols:120,rows:30,cwd:targetCwd,env:{...process.env,TERM:"xterm-256color",COLORTERM:"truecolor",...isWindows()?{PATH:"C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Microsoft\\VisualStudio\\NodeJs;"+process.env.PATH}:{}}}),this.ptyProcess.onData(e=>{this.appendLog(e)}),this.ptyProcess.onExit(({exitCode:e,signal:t})=>{this.status="stopped",this.appendLog(`\r
|
|
4
4
|
\x1b[1;31m[System] Claude Code PTY process exited (code=${e}, signal=${t}).\x1b[0m\r
|
|
5
5
|
`),this.ptyProcess=null})}catch(err){let errorMessage=err instanceof Error?err.message:"Unknown error";this.status="stopped",this.appendLog(`\x1b[1;31m[System Error] Failed to initialize node-pty runner: ${errorMessage}\x1b[0m\r
|
|
6
6
|
`),console.error("Failed to start Claude PTY runner:",err)}}async stop(){if(this.status="stopped",this.ptyProcess){try{this.ptyProcess.kill()}catch(e){console.error("Error killing PTY process:",e)}this.ptyProcess=null}this.appendLog("\r\n\x1b[1;31m[System] Terminal bridge terminated.\x1b[0m\r\n")}async sendInput(e,t=!1){"running"===this.status&&this.ptyProcess?this.ptyProcess.write(t?e:e+"\r"):this.appendLog(`\r
|
|
7
7
|
\x1b[1;31m[Error] Cannot write: session process is ${this.status}.\x1b[0m\r
|
|
8
|
-
`)}getStatus(){return{id:this.id,name:this.name,type:this.type,status:this.status,createdAt:this.createdAt,logsCount:this.logs.length,workspaceRoot:this.workspaceRoot,scopedDirs:this.scopedDirs,tokenUsage:this.tokenUsage}}}var __TURBOPACK__imported__module__22734__2=__TURBOPACK__imported__module__22734__,__TURBOPACK__imported__module__14747__2=__TURBOPACK__imported__module__14747__;function isWindows1(){if("u"<typeof process)return!1;let e=Object.keys(process).find(e=>e.startsWith("plat")&&e.endsWith("form"));return!!e&&"win32"===process[e]}function findGitBash1(){if(!isWindows1())return"bash";let e=process.env.PROGRAMFILES||"C:\\Program Files",t=process.env["PROGRAMFILES(X86)"]||"C:\\Program Files (x86)",s=process.env.LOCALAPPDATA||"";return[process.env.WINGMAN_BASH_PATH,__TURBOPACK__imported__module__14747__2.default.join(e,"Git","bin","bash.exe"),__TURBOPACK__imported__module__14747__2.default.join(t,"Git","bin","bash.exe"),s?__TURBOPACK__imported__module__14747__2.default.join(s,"Programs","Git","bin","bash.exe"):""].filter(e=>"string"==typeof e&&""!==e).find(e=>__TURBOPACK__imported__module__22734__2.default.existsSync(e))||null}class DockerRunner extends AgentRunner{id;name;type="claude-docker";status="idle";createdAt;logs=[];ptyProcess=null;ptyModule=null;constructor(e,t){super(),this.id=e,this.name=t||`Docker Session ${e.substring(0,8)}`,this.createdAt=new Date().toISOString()}appendLog(e){this.logs.push(e),this.logs.length>5e3&&this.logs.shift(),this.parseTokenUsage(e),this.emitOutput(e),SessionPersister.saveSession(this)}async start(){if("running"===this.status)return;this.status="running",this.appendLog("\x1b[1;35m==================================================\x1b[0m\r\n"),this.appendLog("\x1b[1;36m NEURALLOOM DOCKER SANDBOX RUNTIME BRIDGE \x1b[0m\r\n"),this.appendLog("\x1b[1;35m==================================================\x1b[0m\r\n"),this.appendLog("[System] Verifying Docker environment accessibility...\r\n");let bashPath=findGitBash1();if(!bashPath){this.status="stopped",this.appendLog("\x1b[1;31m[System Error] Git Bash not found. Cannot bootstrap PTY sandbox.\x1b[0m\r\n");return}try{this.ptyModule||(this.ptyModule=eval("require")("node-pty"));let targetCwd=this.workspaceRoot&&__TURBOPACK__imported__module__22734__2.default.existsSync(this.workspaceRoot)?this.workspaceRoot:process.env.ORIGINAL_CWD||process.cwd(),testPty=this.ptyModule.spawn(bashPath,["-c","docker --version"],{name:"xterm-256color",cols:80,rows:10,cwd:targetCwd}),hasDocker=!1;if(testPty.onData(e=>{e.toLowerCase().includes("docker version")&&(hasDocker=!0)}),await new Promise(e=>setTimeout(e,800)),testPty.kill(),!hasDocker){this.status="stopped",this.appendLog("\x1b[1;31m[Dependency Warning] Docker command not recognized in local PATH.\x1b[0m\r\n"),this.appendLog("\x1b[1;33mPlease install Docker Desktop (https://www.docker.com/products/docker-desktop) and ensure the daemon is running.\x1b[0m\r\n"),this.appendLog("\x1b[1;31m[System] Sandbox launch aborted.\x1b[0m\r\n");return}this.appendLog("[System] Docker detected. Initializing container mount...\r\n");let mounts=[`-v "${targetCwd}:/workspace"`];this.scopedDirs&&Array.isArray(this.scopedDirs)&&this.scopedDirs.forEach(e=>{if(__TURBOPACK__imported__module__22734__2.default.existsSync(e)){let t=__TURBOPACK__imported__module__14747__2.default.basename(e).replace(/[^a-zA-Z0-9-_]/g,"_");mounts.push(`-v "${e}:/scoped/${t}"`)}});let mountsStr=mounts.join(" "),dockerCmd=`docker run -it --name neural-loom-session-${this.id} --rm ${mountsStr} -w /workspace node:20-alpine npx -y @anthropic-ai/claude-code
|
|
8
|
+
`)}getStatus(){return{id:this.id,name:this.name,type:this.type,status:this.status,createdAt:this.createdAt,logsCount:this.logs.length,workspaceRoot:this.workspaceRoot,scopedDirs:this.scopedDirs,tokenUsage:this.tokenUsage}}}var __TURBOPACK__imported__module__22734__2=__TURBOPACK__imported__module__22734__,__TURBOPACK__imported__module__14747__2=__TURBOPACK__imported__module__14747__;function isWindows1(){if("u"<typeof process)return!1;let e=Object.keys(process).find(e=>e.startsWith("plat")&&e.endsWith("form"));return!!e&&"win32"===process[e]}function findGitBash1(){if(!isWindows1())return"bash";let e=process.env.PROGRAMFILES||"C:\\Program Files",t=process.env["PROGRAMFILES(X86)"]||"C:\\Program Files (x86)",s=process.env.LOCALAPPDATA||"";return[process.env.WINGMAN_BASH_PATH,__TURBOPACK__imported__module__14747__2.default.join(e,"Git","bin","bash.exe"),__TURBOPACK__imported__module__14747__2.default.join(t,"Git","bin","bash.exe"),s?__TURBOPACK__imported__module__14747__2.default.join(s,"Programs","Git","bin","bash.exe"):""].filter(e=>"string"==typeof e&&""!==e).find(e=>__TURBOPACK__imported__module__22734__2.default.existsSync(e))||null}class DockerRunner extends AgentRunner{id;name;type="claude-docker";status="idle";createdAt;logs=[];ptyProcess=null;ptyModule=null;constructor(e,t){super(),this.id=e,this.name=t||`Docker Session ${e.substring(0,8)}`,this.createdAt=new Date().toISOString()}appendLog(e){this.logs.push(e),this.logs.length>5e3&&this.logs.shift(),this.parseTokenUsage(e),this.emitOutput(e),SessionPersister.saveSession(this)}async start(){if("running"===this.status)return;this.status="running",this.appendLog("\x1b[1;35m==================================================\x1b[0m\r\n"),this.appendLog("\x1b[1;36m NEURALLOOM DOCKER SANDBOX RUNTIME BRIDGE \x1b[0m\r\n"),this.appendLog("\x1b[1;35m==================================================\x1b[0m\r\n"),this.appendLog("[System] Verifying Docker environment accessibility...\r\n");let bashPath=findGitBash1();if(!bashPath){this.status="stopped",this.appendLog("\x1b[1;31m[System Error] Git Bash not found. Cannot bootstrap PTY sandbox.\x1b[0m\r\n");return}try{this.ptyModule||(this.ptyModule=eval("require")("node-pty"));let targetCwd=this.workspaceRoot&&__TURBOPACK__imported__module__22734__2.default.existsSync(this.workspaceRoot)?this.workspaceRoot:process.env.ORIGINAL_CWD||process.cwd(),testPty=this.ptyModule.spawn(bashPath,["-c","docker --version"],{name:"xterm-256color",cols:80,rows:10,cwd:targetCwd}),hasDocker=!1;if(testPty.onData(e=>{e.toLowerCase().includes("docker version")&&(hasDocker=!0)}),await new Promise(e=>setTimeout(e,800)),testPty.kill(),!hasDocker){this.status="stopped",this.appendLog("\x1b[1;31m[Dependency Warning] Docker command not recognized in local PATH.\x1b[0m\r\n"),this.appendLog("\x1b[1;33mPlease install Docker Desktop (https://www.docker.com/products/docker-desktop) and ensure the daemon is running.\x1b[0m\r\n"),this.appendLog("\x1b[1;31m[System] Sandbox launch aborted.\x1b[0m\r\n");return}this.appendLog("[System] Docker detected. Initializing container mount...\r\n");let mounts=[`-v "${targetCwd}:/workspace"`];this.scopedDirs&&Array.isArray(this.scopedDirs)&&this.scopedDirs.forEach(e=>{if(__TURBOPACK__imported__module__22734__2.default.existsSync(e)){let t=__TURBOPACK__imported__module__14747__2.default.basename(e).replace(/[^a-zA-Z0-9-_]/g,"_");mounts.push(`-v "${e}:/scoped/${t}"`)}});let mountsStr=mounts.join(" "),extraFlags="",claudeConfigPath=__TURBOPACK__imported__module__14747__2.default.join(process.env.ORIGINAL_CWD||process.cwd(),".ai","neural-loom","claude.json");if(__TURBOPACK__imported__module__22734__2.default.existsSync(claudeConfigPath))try{let config=JSON.parse(__TURBOPACK__imported__module__22734__2.default.readFileSync(claudeConfigPath,"utf8"));config.extraFlags&&(extraFlags=config.extraFlags)}catch(err){console.error("Failed to parse Claude configuration:",err)}let dockerCmd=`docker run -it --name neural-loom-session-${this.id} --rm ${mountsStr} -w /workspace node:20-alpine npx -y @anthropic-ai/claude-code ${extraFlags}`.trim();this.ptyProcess=this.ptyModule.spawn(bashPath,["-c",dockerCmd],{name:"xterm-256color",cols:120,rows:30,cwd:targetCwd,env:{...process.env,TERM:"xterm-256color",COLORTERM:"truecolor"}}),this.ptyProcess.onData(e=>{this.appendLog(e)}),this.ptyProcess.onExit(({exitCode:e,signal:t})=>{this.status="stopped",this.appendLog(`\r
|
|
9
9
|
\x1b[1;31m[System] Docker Sandbox exited (code=${e}, signal=${t}).\x1b[0m\r
|
|
10
10
|
`),this.ptyProcess=null})}catch(err){let errorMessage=err instanceof Error?err.message:"Unknown error";this.status="stopped",this.appendLog(`\x1b[1;31m[System Error] Failed to launch Docker runner: ${errorMessage}\x1b[0m\r
|
|
11
11
|
`)}}async stop(){if(this.status="stopped",this.ptyProcess){try{this.ptyProcess.kill()}catch(e){console.error("Error killing Docker PTY process:",e)}this.ptyProcess=null}this.appendLog("\r\n\x1b[1;31m[System] Docker container stopped and unmounted.\x1b[0m\r\n")}async sendInput(e,t=!1){"running"===this.status&&this.ptyProcess?this.ptyProcess.write(t?e:e+"\r"):this.appendLog(`\r
|
|
12
12
|
\x1b[1;31m[Error] Cannot write: Docker container is ${this.status}.\x1b[0m\r
|
|
13
13
|
`)}getStatus(){return{id:this.id,name:this.name,type:this.type,status:this.status,createdAt:this.createdAt,logsCount:this.logs.length,workspaceRoot:this.workspaceRoot,scopedDirs:this.scopedDirs,tokenUsage:this.tokenUsage}}}var __TURBOPACK__imported__module__22734__3=__TURBOPACK__imported__module__22734__,__TURBOPACK__imported__module__14747__3=__TURBOPACK__imported__module__14747__;function isWindows2(){if("u"<typeof process)return!1;let e=Object.keys(process).find(e=>e.startsWith("plat")&&e.endsWith("form"));return!!e&&"win32"===process[e]}function findGitBash2(){if(!isWindows2())return"bash";let e=process.env.PROGRAMFILES||"C:\\Program Files",t=process.env["PROGRAMFILES(X86)"]||"C:\\Program Files (x86)",s=process.env.LOCALAPPDATA||"";return[process.env.WINGMAN_BASH_PATH,__TURBOPACK__imported__module__14747__3.default.join(e,"Git","bin","bash.exe"),__TURBOPACK__imported__module__14747__3.default.join(t,"Git","bin","bash.exe"),s?__TURBOPACK__imported__module__14747__3.default.join(s,"Programs","Git","bin","bash.exe"):""].filter(e=>"string"==typeof e&&""!==e).find(e=>__TURBOPACK__imported__module__22734__3.default.existsSync(e))||null}class SSHRunner extends AgentRunner{id;name;type="claude-ssh";status="idle";createdAt;logs=[];ptyProcess=null;ptyModule=null;constructor(e,t){super(),this.id=e,this.name=t||`SSH Session ${e.substring(0,8)}`,this.createdAt=new Date().toISOString()}appendLog(e){this.logs.push(e),this.logs.length>5e3&&this.logs.shift(),this.parseTokenUsage(e),this.emitOutput(e),SessionPersister.saveSession(this)}async start(){if("running"===this.status)return;this.status="running",this.appendLog("\x1b[1;35m==================================================\x1b[0m\r\n"),this.appendLog("\x1b[1;36m NEURALLOOM REMOTE VM (SSH) ROUTE BRIDGE \x1b[0m\r\n"),this.appendLog("\x1b[1;35m==================================================\x1b[0m\r\n"),this.appendLog("[System] Loading SSH configuration...\r\n");let bashPath=findGitBash2();if(!bashPath){this.status="stopped",this.appendLog("\x1b[1;31m[System Error] Git Bash not found. Cannot bootstrap SSH terminal.\x1b[0m\r\n");return}let configPath=__TURBOPACK__imported__module__14747__3.default.join(process.env.ORIGINAL_CWD||process.cwd(),".ai","neural-loom","ssh.json");if(!__TURBOPACK__imported__module__22734__3.default.existsSync(configPath)){this.status="stopped",this.appendLog("\x1b[1;31m[Configuration Error] ssh.json not found!\x1b[0m\r\n"),this.appendLog(`\x1b[1;33mPlease create the SSH credentials file at: ${configPath}\x1b[0m\r
|
|
14
14
|
`),this.appendLog("\x1b[1;36mTemplate structure:\x1b[0m\r\n"),this.appendLog(JSON.stringify({host:"your.remote.host.com",username:"dave",privateKeyPath:"C:\\\\Users\\\\Dave\\\\.ssh\\\\id_rsa",port:22},null,2).replace(/\n/g,"\r\n")+"\r\n"),this.appendLog("\x1b[1;31m[System] SSH startup aborted.\x1b[0m\r\n");return}try{let rawConfig=__TURBOPACK__imported__module__22734__3.default.readFileSync(configPath,"utf8"),config=JSON.parse(rawConfig);if(!config.host||!config.username){this.status="stopped",this.appendLog("\x1b[1;31m[System Error] Invalid ssh.json configuration. 'host' and 'username' are required.\x1b[0m\r\n");return}this.ptyModule||(this.ptyModule=eval("require")("node-pty")),this.appendLog(`[System] Connecting to ${config.username}@${config.host}...\r
|
|
15
|
-
`);let portOpt=config.port?`-p ${config.port}`:"",keyOpt=config.privateKeyPath?`-i "${config.privateKeyPath}"`:"",sshCmd=`ssh -t ${keyOpt} ${portOpt} ${config.username}@${config.host} "claude"`;this.ptyProcess=this.ptyModule.spawn(bashPath,["-c",sshCmd],{name:"xterm-256color",cols:120,rows:30,cwd:process.env.ORIGINAL_CWD||process.cwd(),env:{...process.env,TERM:"xterm-256color",COLORTERM:"truecolor"}}),this.ptyProcess.onData(e=>{this.appendLog(e)}),this.ptyProcess.onExit(({exitCode:e,signal:t})=>{this.status="stopped",this.appendLog(`\r
|
|
15
|
+
`);let portOpt=config.port?`-p ${config.port}`:"",keyOpt=config.privateKeyPath?`-i "${config.privateKeyPath}"`:"",extraFlags="",claudeConfigPath=__TURBOPACK__imported__module__14747__3.default.join(process.env.ORIGINAL_CWD||process.cwd(),".ai","neural-loom","claude.json");if(__TURBOPACK__imported__module__22734__3.default.existsSync(claudeConfigPath))try{let config=JSON.parse(__TURBOPACK__imported__module__22734__3.default.readFileSync(claudeConfigPath,"utf8"));config.extraFlags&&(extraFlags=config.extraFlags)}catch(err){console.error("Failed to parse Claude configuration:",err)}let sshCmd=`ssh -t ${keyOpt} ${portOpt} ${config.username}@${config.host} "claude ${extraFlags}"`;this.ptyProcess=this.ptyModule.spawn(bashPath,["-c",sshCmd],{name:"xterm-256color",cols:120,rows:30,cwd:process.env.ORIGINAL_CWD||process.cwd(),env:{...process.env,TERM:"xterm-256color",COLORTERM:"truecolor"}}),this.ptyProcess.onData(e=>{this.appendLog(e)}),this.ptyProcess.onExit(({exitCode:e,signal:t})=>{this.status="stopped",this.appendLog(`\r
|
|
16
16
|
\x1b[1;31m[System] SSH Session exited (code=${e}, signal=${t}).\x1b[0m\r
|
|
17
17
|
`),this.ptyProcess=null})}catch(err){let errorMessage=err instanceof Error?err.message:"Unknown error";this.status="stopped",this.appendLog(`\x1b[1;31m[System Error] SSH connection failed: ${errorMessage}\x1b[0m\r
|
|
18
18
|
`)}}async stop(){if(this.status="stopped",this.ptyProcess){try{this.ptyProcess.kill()}catch(e){console.error("Error killing SSH PTY process:",e)}this.ptyProcess=null}this.appendLog("\r\n\x1b[1;31m[System] SSH Connection terminated.\x1b[0m\r\n")}async sendInput(e,t=!1){"running"===this.status&&this.ptyProcess?this.ptyProcess.write(t?e:e+"\r"):this.appendLog(`\r
|