@slycode/slycode 0.2.12 → 0.2.14

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.
Files changed (51) hide show
  1. package/dist/bridge/session-manager.js +28 -3
  2. package/dist/bridge/session-manager.js.map +1 -1
  3. package/dist/bridge/types.d.ts +3 -0
  4. package/dist/messaging/state.js +1 -0
  5. package/dist/messaging/state.js.map +1 -1
  6. package/dist/scripts/kanban.js +26 -1
  7. package/dist/web/.next/BUILD_ID +1 -1
  8. package/dist/web/.next/build-manifest.json +2 -2
  9. package/dist/web/.next/server/app/_global-error.html +2 -2
  10. package/dist/web/.next/server/app/_global-error.rsc +1 -1
  11. package/dist/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  12. package/dist/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  13. package/dist/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  14. package/dist/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  15. package/dist/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  16. package/dist/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  17. package/dist/web/.next/server/app/_not-found.html +1 -1
  18. package/dist/web/.next/server/app/_not-found.rsc +2 -2
  19. package/dist/web/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  20. package/dist/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  21. package/dist/web/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  22. package/dist/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  23. package/dist/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  24. package/dist/web/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  25. package/dist/web/.next/server/app/page/react-loadable-manifest.json +1 -1
  26. package/dist/web/.next/server/app/page_client-reference-manifest.js +1 -1
  27. package/dist/web/.next/server/app/project/[id]/page/react-loadable-manifest.json +1 -1
  28. package/dist/web/.next/server/app/project/[id]/page_client-reference-manifest.js +1 -1
  29. package/dist/web/.next/server/chunks/ssr/[root-of-the-server]__1f5fc489._.js +1 -1
  30. package/dist/web/.next/server/chunks/ssr/[root-of-the-server]__bcbe4bf2._.js +1 -1
  31. package/dist/web/.next/server/pages/404.html +1 -1
  32. package/dist/web/.next/server/pages/500.html +2 -2
  33. package/dist/web/.next/static/chunks/{4d5e1b83ce67acfa.js → 0a4b215957655f38.js} +1 -1
  34. package/dist/web/.next/static/chunks/2744d72103f49934.css +1 -0
  35. package/dist/web/.next/static/chunks/c5d50c930f4e26a6.js +4 -0
  36. package/dist/web/.next/static/chunks/{24c966c8b9e12be5.js → c7a853519f3ebcb8.js} +1 -1
  37. package/dist/web/.next/static/chunks/{29b5d391d655a999.js → cfec56fdddd52361.js} +2 -2
  38. package/dist/web/.next/static/chunks/{02a9b2dcd9d8b87c.js → e52d73ad4544e983.js} +1 -1
  39. package/dist/web/src/components/ClaudeTerminalPanel.tsx +30 -1
  40. package/dist/web/src/components/Terminal.tsx +2 -2
  41. package/dist/web/tsconfig.tsbuildinfo +1 -1
  42. package/lib/cli/stop.d.ts.map +1 -1
  43. package/lib/cli/stop.js +38 -18
  44. package/lib/cli/stop.js.map +1 -1
  45. package/package.json +1 -1
  46. package/templates/kanban-seed.json +1 -1
  47. package/dist/web/.next/static/chunks/17bf7ad67057dc74.js +0 -4
  48. package/dist/web/.next/static/chunks/3df3846316317676.css +0 -1
  49. /package/dist/web/.next/static/{rlJUIaeDUP-JDj2nvHySS → y4wg5RLBkOtdMpGszS8Fs}/_buildManifest.js +0 -0
  50. /package/dist/web/.next/static/{rlJUIaeDUP-JDj2nvHySS → y4wg5RLBkOtdMpGszS8Fs}/_clientMiddlewareManifest.json +0 -0
  51. /package/dist/web/.next/static/{rlJUIaeDUP-JDj2nvHySS → y4wg5RLBkOtdMpGszS8Fs}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- <!DOCTYPE html><!--rlJUIaeDUP_JDj2nvHySS--><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/43bfca92afbacd38.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/chunks/3df3846316317676.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/5f95863347fe47d9.js"/><script src="/_next/static/chunks/7de9141b1af425c3.js" async=""></script><script src="/_next/static/chunks/cf910fc299170b7d.js" async=""></script><script src="/_next/static/chunks/turbopack-563e27abda63930f.js" async=""></script><script src="/_next/static/chunks/8fb2a99c64580de7.js" async=""></script><script src="/_next/static/chunks/e24d6768d85df882.js" async=""></script><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>404: This page could not be found.</title><title>SlyCode 🦊</title><meta name="description" content="SlyCode Managed Projects"/><link rel="icon" href="/favicon.png"/><script>(function(){try{var t=localStorage.getItem('slycode-theme');if(t==='light')return;if(t==='dark'||window.matchMedia('(prefers-color-scheme:dark)').matches)document.documentElement.classList.add('dark')}catch(e){}})()</script><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body class="geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable jetbrains_mono_7d65b77b-module__VxV-Ta__variable font-sans antialiased"><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>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)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/5f95863347fe47d9.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[1088,[\"/_next/static/chunks/8fb2a99c64580de7.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"VoiceProvider\"]\n3:I[39756,[\"/_next/static/chunks/8fb2a99c64580de7.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"default\"]\n4:I[37457,[\"/_next/static/chunks/8fb2a99c64580de7.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"default\"]\n5:I[97367,[\"/_next/static/chunks/8fb2a99c64580de7.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"OutletBoundary\"]\n6:\"$Sreact.suspense\"\n8:I[97367,[\"/_next/static/chunks/8fb2a99c64580de7.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"ViewportBoundary\"]\na:I[97367,[\"/_next/static/chunks/8fb2a99c64580de7.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"MetadataBoundary\"]\nc:I[68027,[\"/_next/static/chunks/8fb2a99c64580de7.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"default\"]\n:HL[\"/_next/static/chunks/43bfca92afbacd38.css\",\"style\"]\n:HL[\"/_next/static/chunks/3df3846316317676.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"rlJUIaeDUP-JDj2nvHySS\",\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/43bfca92afbacd38.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/3df3846316317676.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/8fb2a99c64580de7.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/e24d6768d85df882.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"(function(){try{var t=localStorage.getItem('slycode-theme');if(t==='light')return;if(t==='dark'||window.matchMedia('(prefers-color-scheme:dark)').matches)document.documentElement.classList.add('dark')}catch(e){}})()\"}}]}],[\"$\",\"body\",null,{\"className\":\"geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable jetbrains_mono_7d65b77b-module__VxV-Ta__variable font-sans antialiased\",\"children\":[\"$\",\"$L2\",null,{\"children\":[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",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\":[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:children:props:notFound:0:1:props:style\",\"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\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L5\",null,{\"children\":[\"$\",\"$6\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@7\"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$6\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",\"$undefined\"],\"S\":true}\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"d:I[27201,[\"/_next/static/chunks/8fb2a99c64580de7.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"IconMark\"]\n7:null\nb:[[\"$\",\"title\",\"0\",{\"children\":\"SlyCode 🦊\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"SlyCode Managed Projects\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/favicon.png\"}],[\"$\",\"$Ld\",\"3\",{}]]\n"])</script></body></html>
1
+ <!DOCTYPE html><!--y4wg5RLBkOtdMpGszS8Fs--><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="/_next/static/chunks/43bfca92afbacd38.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/chunks/2744d72103f49934.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/5f95863347fe47d9.js"/><script src="/_next/static/chunks/7de9141b1af425c3.js" async=""></script><script src="/_next/static/chunks/cf910fc299170b7d.js" async=""></script><script src="/_next/static/chunks/turbopack-563e27abda63930f.js" async=""></script><script src="/_next/static/chunks/8fb2a99c64580de7.js" async=""></script><script src="/_next/static/chunks/e24d6768d85df882.js" async=""></script><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>404: This page could not be found.</title><title>SlyCode 🦊</title><meta name="description" content="SlyCode Managed Projects"/><link rel="icon" href="/favicon.png"/><script>(function(){try{var t=localStorage.getItem('slycode-theme');if(t==='light')return;if(t==='dark'||window.matchMedia('(prefers-color-scheme:dark)').matches)document.documentElement.classList.add('dark')}catch(e){}})()</script><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body class="geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable jetbrains_mono_7d65b77b-module__VxV-Ta__variable font-sans antialiased"><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>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)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/5f95863347fe47d9.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[1088,[\"/_next/static/chunks/8fb2a99c64580de7.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"VoiceProvider\"]\n3:I[39756,[\"/_next/static/chunks/8fb2a99c64580de7.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"default\"]\n4:I[37457,[\"/_next/static/chunks/8fb2a99c64580de7.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"default\"]\n5:I[97367,[\"/_next/static/chunks/8fb2a99c64580de7.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"OutletBoundary\"]\n6:\"$Sreact.suspense\"\n8:I[97367,[\"/_next/static/chunks/8fb2a99c64580de7.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"ViewportBoundary\"]\na:I[97367,[\"/_next/static/chunks/8fb2a99c64580de7.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"MetadataBoundary\"]\nc:I[68027,[\"/_next/static/chunks/8fb2a99c64580de7.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"default\"]\n:HL[\"/_next/static/chunks/43bfca92afbacd38.css\",\"style\"]\n:HL[\"/_next/static/chunks/2744d72103f49934.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"y4wg5RLBkOtdMpGszS8Fs\",\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",true],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/43bfca92afbacd38.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/chunks/2744d72103f49934.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/8fb2a99c64580de7.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/e24d6768d85df882.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"suppressHydrationWarning\":true,\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"script\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"(function(){try{var t=localStorage.getItem('slycode-theme');if(t==='light')return;if(t==='dark'||window.matchMedia('(prefers-color-scheme:dark)').matches)document.documentElement.classList.add('dark')}catch(e){}})()\"}}]}],[\"$\",\"body\",null,{\"className\":\"geist_a71539c9-module__T19VSG__variable geist_mono_8d43a2aa-module__8Li5zG__variable jetbrains_mono_7d65b77b-module__VxV-Ta__variable font-sans antialiased\",\"children\":[\"$\",\"$L2\",null,{\"children\":[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",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\":[null,[\"$\",\"$L3\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L4\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:children:props:notFound:0:1:props:style\",\"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\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L5\",null,{\"children\":[\"$\",\"$6\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@7\"}]}]]}],{},null,false,false]},null,false,false]},null,false,false],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$6\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",\"$undefined\"],\"S\":true}\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"d:I[27201,[\"/_next/static/chunks/8fb2a99c64580de7.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"IconMark\"]\n7:null\nb:[[\"$\",\"title\",\"0\",{\"children\":\"SlyCode 🦊\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"SlyCode Managed Projects\"}],[\"$\",\"link\",\"2\",{\"rel\":\"icon\",\"href\":\"/favicon.png\"}],[\"$\",\"$Ld\",\"3\",{}]]\n"])</script></body></html>
@@ -1,2 +1,2 @@
1
- <!DOCTYPE html><!--rlJUIaeDUP_JDj2nvHySS--><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/5f95863347fe47d9.js"/><script src="/_next/static/chunks/7de9141b1af425c3.js" async=""></script><script src="/_next/static/chunks/cf910fc299170b7d.js" async=""></script><script src="/_next/static/chunks/turbopack-563e27abda63930f.js" async=""></script><script src="/_next/static/chunks/ff1a16fafef87110.js" async=""></script><script src="/_next/static/chunks/e24d6768d85df882.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: Internal Server Error.</title><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}
2
- @media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/5f95863347fe47d9.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[39756,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"default\"]\n3:I[37457,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"default\"]\n4:I[97367,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n7:I[97367,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"ViewportBoundary\"]\n9:I[97367,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"MetadataBoundary\"]\nb:I[68027,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"default\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"rlJUIaeDUP-JDj2nvHySS\",\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"title\",null,{\"children\":\"500: Internal Server Error.\"}]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"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,{\"style\":{\"lineHeight\":\"48px\"},\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}\\n@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\",\"paddingRight\":23,\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\"},\"children\":\"500\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"28px\"},\"children\":\"Internal Server Error.\"}]}]]}]}]}]]}],[[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/ff1a16fafef87110.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/e24d6768d85df882.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,false]},null,false,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L7\",null,{\"children\":\"$L8\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$L9\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$La\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$b\",\"$undefined\"],\"S\":true}\n"])</script><script>self.__next_f.push([1,"8:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"6:null\na:[]\n"])</script></body></html>
1
+ <!DOCTYPE html><!--y4wg5RLBkOtdMpGszS8Fs--><html id="__next_error__"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/5f95863347fe47d9.js"/><script src="/_next/static/chunks/7de9141b1af425c3.js" async=""></script><script src="/_next/static/chunks/cf910fc299170b7d.js" async=""></script><script src="/_next/static/chunks/turbopack-563e27abda63930f.js" async=""></script><script src="/_next/static/chunks/ff1a16fafef87110.js" async=""></script><script src="/_next/static/chunks/e24d6768d85df882.js" async=""></script><meta name="next-size-adjust" content=""/><title>500: Internal Server Error.</title><script src="/_next/static/chunks/a6dad97d9634a72d.js" noModule=""></script></head><body><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div style="line-height:48px"><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}
2
+ @media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding-right:23px;font-size:24px;font-weight:500;vertical-align:top">500</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:28px">Internal Server Error.</h2></div></div></div><!--$--><!--/$--><script src="/_next/static/chunks/5f95863347fe47d9.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[39756,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"default\"]\n3:I[37457,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"default\"]\n4:I[97367,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n7:I[97367,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"ViewportBoundary\"]\n9:I[97367,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"MetadataBoundary\"]\nb:I[68027,[\"/_next/static/chunks/ff1a16fafef87110.js\",\"/_next/static/chunks/e24d6768d85df882.js\"],\"default\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"b\":\"y4wg5RLBkOtdMpGszS8Fs\",\"c\":[\"\",\"_global-error\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"__PAGE__\",{}]}],[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[\"$\",\"html\",null,{\"id\":\"__next_error__\",\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"title\",null,{\"children\":\"500: Internal Server Error.\"}]}],[\"$\",\"body\",null,{\"children\":[\"$\",\"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,{\"style\":{\"lineHeight\":\"48px\"},\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}\\n@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\",\"paddingRight\":23,\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\"},\"children\":\"500\"}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"28px\"},\"children\":\"Internal Server Error.\"}]}]]}]}]}]]}],[[\"$\",\"script\",\"script-0\",{\"src\":\"/_next/static/chunks/ff1a16fafef87110.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/_next/static/chunks/e24d6768d85df882.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,false]},null,false,false],[\"$\",\"$1\",\"h\",{\"children\":[null,[\"$\",\"$L7\",null,{\"children\":\"$L8\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$L9\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$La\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$b\",\"$undefined\"],\"S\":true}\n"])</script><script>self.__next_f.push([1,"8:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1\"}]]\n"])</script><script>self.__next_f.push([1,"6:null\na:[]\n"])</script></body></html>
@@ -17,6 +17,6 @@ WARNING: This link could potentially be dangerous`)){let e=window.open();if(e){t
17
17
  `&&(this._liveRegionLineCount++,21===this._liveRegionLineCount&&(this._liveRegion.textContent+=y)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(e){this._clearLiveRegion(),/\p{Control}/u.test(e)||this._charsToConsume.push(e)}_refreshRows(e,i){this._liveRegionDebouncer.refresh(e,i,this._terminal.rows)}_renderRows(e,i){let s=this._terminal.buffer,r=s.lines.length.toString();for(let n=e;n<=i;n++){let e=s.lines.get(s.ydisp+n),i=[],o=e?.translateToString(!0,void 0,void 0,i)||"",h=(s.ydisp+n+1).toString(),a=this._rowElements[n];a&&(0===o.length?(a.textContent=" ",this._rowColumns.set(a,[0,1])):(a.textContent=o,this._rowColumns.set(a,i)),a.setAttribute("aria-posinset",h),a.setAttribute("aria-setsize",r),this._alignRowWidth(a))}this._announceCharacters()}_announceCharacters(){0!==this._charsToAnnounce.length&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(e,i){let s,r,n=e.target,o=this._rowElements[0===i?1:this._rowElements.length-2];if(n.getAttribute("aria-posinset")!==(0===i?"1":`${this._terminal.buffer.lines.length}`)&&e.relatedTarget===o){if(0===i?(s=n,r=this._rowElements.pop(),this._rowContainer.removeChild(r)):(s=this._rowElements.shift(),r=n,this._rowContainer.removeChild(s)),s.removeEventListener("focus",this._topBoundaryFocusListener),r.removeEventListener("focus",this._bottomBoundaryFocusListener),0===i){let e=this._createAccessibilityTreeNode();this._rowElements.unshift(e),this._rowContainer.insertAdjacentElement("afterbegin",e)}else{let e=this._createAccessibilityTreeNode();this._rowElements.push(e),this._rowContainer.appendChild(e)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(0===i?-1:1),this._rowElements[0===i?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}}_handleSelectionChange(){if(0===this._rowElements.length)return;let e=this._coreBrowserService.mainDocument.getSelection();if(!e)return;if(e.isCollapsed){this._rowContainer.contains(e.anchorNode)&&this._terminal.clearSelection();return}if(!e.anchorNode||!e.focusNode)return void console.error("anchorNode and/or focusNode are null");let i={node:e.anchorNode,offset:e.anchorOffset},s={node:e.focusNode,offset:e.focusOffset};if((i.node.compareDocumentPosition(s.node)&Node.DOCUMENT_POSITION_PRECEDING||i.node===s.node&&i.offset>s.offset)&&([i,s]=[s,i]),i.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(i={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(i.node))return;let r=this._rowElements.slice(-1)[0];if(s.node.compareDocumentPosition(r)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(s={node:r,offset:r.textContent?.length??0}),!this._rowContainer.contains(s.node))return;let n=({node:e,offset:i})=>{let s=e instanceof Text?e.parentNode:e,r=parseInt(s?.getAttribute("aria-posinset"),10)-1;if(isNaN(r))return console.warn("row is invalid. Race condition?"),null;let n=this._rowColumns.get(s);if(!n)return console.warn("columns is null. Race condition?"),null;let o=i<n.length?n[i]:n.slice(-1)[0]+1;return o>=this._terminal.cols&&(++r,o=0),{row:r,column:o}},o=n(i),h=n(s);if(!(!o||!h)){if(o.row>h.row||o.row===h.row&&o.column>=h.column)throw Error("invalid range");this._terminal.select(o.column,o.row,(h.row-o.row)*this._terminal.cols-o.column+h.column)}}_handleResize(e){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let e=this._rowContainer.children.length;e<this._terminal.rows;e++)this._rowElements[e]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[e]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){let e=this._coreBrowserService.mainDocument.createElement("div");return e.setAttribute("role","listitem"),e.tabIndex=-1,this._refreshRowDimensions(e),e}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){Object.assign(this._accessibilityContainer.style,{width:`${this._renderService.dimensions.css.canvas.width}px`,fontSize:`${this._terminal.options.fontSize}px`}),this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let e=0;e<this._terminal.rows;e++)this._refreshRowDimensions(this._rowElements[e]),this._alignRowWidth(this._rowElements[e])}}_refreshRowDimensions(e){e.style.height=`${this._renderService.dimensions.css.cell.height}px`}_alignRowWidth(e){e.style.transform="";let i=e.getBoundingClientRect().width,s=this._rowColumns.get(e)?.slice(-1)?.[0];if(!s)return;let r=s*this._renderService.dimensions.css.cell.width;e.style.transform=`scaleX(${r/i})`}};rq=S([w(1,F),w(2,X),w(3,J)],rq);var rV=class extends eg{constructor(e,i,s,r,n){super(),this._element=e,this._mouseService=i,this._renderService=s,this._bufferService=r,this._linkProviderService=n,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this._register(new eO),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this._register(new eO),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this._register(eu(()=>{e_(this._linkCacheDisposables),this._linkCacheDisposables.length=0,this._lastMouseEvent=void 0,this._activeProviderReplies?.clear()})),this._register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this._register(tW(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this._register(tW(this._element,"mousemove",this._handleMouseMove.bind(this))),this._register(tW(this._element,"mousedown",this._handleMouseDown.bind(this))),this._register(tW(this._element,"mouseup",this._handleMouseUp.bind(this)))}get currentLink(){return this._currentLink}_handleMouseMove(e){this._lastMouseEvent=e;let i=this._positionFromMouseEvent(e,this._element,this._mouseService);if(!i)return;this._isMouseOut=!1;let s=e.composedPath();for(let e=0;e<s.length;e++){let i=s[e];if(i.classList.contains("xterm"))break;if(i.classList.contains("xterm-hover"))return}this._lastBufferCell&&i.x===this._lastBufferCell.x&&i.y===this._lastBufferCell.y||(this._handleHover(i),this._lastBufferCell=i)}_handleHover(e){if(this._activeLine!==e.y||this._wasResized){this._clearCurrentLink(),this._askForLink(e,!1),this._wasResized=!1;return}this._currentLink&&this._linkAtPosition(this._currentLink.link,e)||(this._clearCurrentLink(),this._askForLink(e,!0))}_askForLink(e,i){this._activeProviderReplies&&i||(this._activeProviderReplies?.forEach(e=>{e?.forEach(e=>{e.link.dispose&&e.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=e.y);let s=!1;for(let[r,n]of this._linkProviderService.linkProviders.entries())i?this._activeProviderReplies?.get(r)&&(s=this._checkLinkProviderResult(r,e,s)):n.provideLinks(e.y,i=>{if(this._isMouseOut)return;let n=i?.map(e=>({link:e}));this._activeProviderReplies?.set(r,n),s=this._checkLinkProviderResult(r,e,s),this._activeProviderReplies?.size===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(e.y,this._activeProviderReplies)})}_removeIntersectingLinks(e,i){let s=new Set;for(let r=0;r<i.size;r++){let n=i.get(r);if(n)for(let i=0;i<n.length;i++){let r=n[i],o=r.link.range.start.y<e?0:r.link.range.start.x,h=r.link.range.end.y>e?this._bufferService.cols:r.link.range.end.x;for(let e=o;e<=h;e++){if(s.has(e)){n.splice(i--,1);break}s.add(e)}}}}_checkLinkProviderResult(e,i,s){if(!this._activeProviderReplies)return s;let r=this._activeProviderReplies.get(e),n=!1;for(let i=0;i<e;i++)(!this._activeProviderReplies.has(i)||this._activeProviderReplies.get(i))&&(n=!0);if(!n&&r){let e=r.find(e=>this._linkAtPosition(e.link,i));e&&(s=!0,this._handleNewLink(e))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!s)for(let e=0;e<this._activeProviderReplies.size;e++){let r=this._activeProviderReplies.get(e)?.find(e=>this._linkAtPosition(e.link,i));if(r){s=!0,this._handleNewLink(r);break}}return s}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(e){var i,s;if(!this._currentLink)return;let r=this._positionFromMouseEvent(e,this._element,this._mouseService);r&&this._mouseDownLink&&(i=this._mouseDownLink.link,s=this._currentLink.link,i.text===s.text&&i.range.start.x===s.range.start.x&&i.range.start.y===s.range.start.y&&i.range.end.x===s.range.end.x&&i.range.end.y===s.range.end.y)&&this._linkAtPosition(this._currentLink.link,r)&&this._currentLink.link.activate(e,this._currentLink.link.text)}_clearCurrentLink(e,i){this._currentLink&&this._lastMouseEvent&&(!e||!i||this._currentLink.link.range.start.y>=e&&this._currentLink.link.range.end.y<=i)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,e_(this._linkCacheDisposables),this._linkCacheDisposables.length=0)}_handleNewLink(e){if(!this._lastMouseEvent)return;let i=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);i&&this._linkAtPosition(e.link,i)&&(this._currentLink=e,this._currentLink.state={decorations:{underline:void 0===e.link.decorations||e.link.decorations.underline,pointerCursor:void 0===e.link.decorations||e.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,e.link,this._lastMouseEvent),e.link.decorations={},Object.defineProperties(e.link.decorations,{pointerCursor:{get:()=>this._currentLink?.state?.decorations.pointerCursor,set:e=>{this._currentLink?.state&&this._currentLink.state.decorations.pointerCursor!==e&&(this._currentLink.state.decorations.pointerCursor=e,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",e))}},underline:{get:()=>this._currentLink?.state?.decorations.underline,set:i=>{this._currentLink?.state&&this._currentLink?.state?.decorations.underline!==i&&(this._currentLink.state.decorations.underline=i,this._currentLink.state.isHovered&&this._fireUnderlineEvent(e.link,i))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(e=>{if(!this._currentLink)return;let i=0===e.start?0:e.start+1+this._bufferService.buffer.ydisp,s=this._bufferService.buffer.ydisp+1+e.end;if(this._currentLink.link.range.start.y>=i&&this._currentLink.link.range.end.y<=s&&(this._clearCurrentLink(i,s),this._lastMouseEvent)){let e=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);e&&this._askForLink(e,!1)}})))}_linkHover(e,i,s){this._currentLink?.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(i,!0),this._currentLink.state.decorations.pointerCursor&&e.classList.add("xterm-cursor-pointer")),i.hover&&i.hover(s,i.text)}_fireUnderlineEvent(e,i){let s=e.range,r=this._bufferService.buffer.ydisp,n=this._createLinkUnderlineEvent(s.start.x-1,s.start.y-r-1,s.end.x,s.end.y-r-1,void 0);(i?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(n)}_linkLeave(e,i,s){this._currentLink?.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(i,!1),this._currentLink.state.decorations.pointerCursor&&e.classList.remove("xterm-cursor-pointer")),i.leave&&i.leave(s,i.text)}_linkAtPosition(e,i){let s=e.range.start.y*this._bufferService.cols+e.range.start.x,r=e.range.end.y*this._bufferService.cols+e.range.end.x,n=i.y*this._bufferService.cols+i.x;return s<=n&&n<=r}_positionFromMouseEvent(e,i,s){let r=s.getCoords(e,i,this._bufferService.cols,this._bufferService.rows);if(r)return{x:r[0],y:r[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(e,i,s,r,n){return{x1:e,y1:i,x2:s,y2:r,cols:this._bufferService.cols,fg:n}}};rV=S([w(1,G),w(2,J),w(3,N),w(4,et)],rV);var rY=class extends rI{constructor(e={}){super(e),this._linkifier=this._register(new ev),this.browser=i4,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this._register(new ev),this._onCursorMove=this._register(new eO),this.onCursorMove=this._onCursorMove.event,this._onKey=this._register(new eO),this.onKey=this._onKey.event,this._onRender=this._register(new eO),this.onRender=this._onRender.event,this._onSelectionChange=this._register(new eO),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this._register(new eO),this.onTitleChange=this._onTitleChange.event,this._onBell=this._register(new eO),this.onBell=this._onBell.event,this._onFocus=this._register(new eO),this._onBlur=this._register(new eO),this._onA11yCharEmitter=this._register(new eO),this._onA11yTabEmitter=this._register(new eO),this._onWillOpen=this._register(new eO),this._setup(),this._decorationService=this._instantiationService.createInstance(r$),this._instantiationService.setService(V,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(i2),this._instantiationService.setService(et,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(Y)),this._register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this._register(this._inputHandler.onRequestRefreshRows(e=>this.refresh(e?.start??0,e?.end??this.rows-1))),this._register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this._register(this._inputHandler.onRequestReset(()=>this.reset())),this._register(this._inputHandler.onRequestWindowsOptionsReport(e=>this._reportWindowsOptions(e))),this._register(this._inputHandler.onColor(e=>this._handleColorEvent(e))),this._register(eD.forward(this._inputHandler.onCursorMove,this._onCursorMove)),this._register(eD.forward(this._inputHandler.onTitleChange,this._onTitleChange)),this._register(eD.forward(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this._register(eD.forward(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this._register(this._bufferService.onResize(e=>this._afterResize(e.cols,e.rows))),this._register(eu(()=>{this._customKeyEventHandler=void 0,this.element?.parentNode?.removeChild(this.element)}))}get linkifier(){return this._linkifier.value}get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}_handleColorEvent(e){if(this._themeService)for(let i of e){let e,s="";switch(i.index){case 256:e="foreground",s="10";break;case 257:e="background",s="11";break;case 258:e="cursor",s="12";break;default:e="ansi",s="4;"+i.index}switch(i.type){case 0:let r=rt.toColorRGB("ansi"===e?this._themeService.colors.ansi[i.index]:this._themeService.colors[e]);this.coreService.triggerDataEvent(`${iv.ESC}]${s};${function(e,i=16){let[s,r,n]=e;return`rgb:${rE(s,i)}/${rE(r,i)}/${rE(n,i)}`}(r)}${iS.ST}`);break;case 1:if("ansi"===e)this._themeService.modifyColors(e=>e.ansi[i.index]=iw.toColor(...i.color));else{let s=e;this._themeService.modifyColors(e=>e[s]=iw.toColor(...i.color))}break;case 2:this._themeService.restoreColor(i.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(e){e?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(rq,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(e){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(iv.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){return this.textarea?.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(iv.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;let e=this.buffer.ybase+this.buffer.y,i=this.buffer.lines.get(e);if(!i)return;let s=Math.min(this.buffer.x,this.cols-1),r=this._renderService.dimensions.css.cell.height,n=i.getWidth(s),o=this._renderService.dimensions.css.cell.width*n,h=this.buffer.y*this._renderService.dimensions.css.cell.height,a=s*this._renderService.dimensions.css.cell.width;this.textarea.style.left=a+"px",this.textarea.style.top=h+"px",this.textarea.style.width=o+"px",this.textarea.style.height=r+"px",this.textarea.style.lineHeight=r+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this._register(tW(this.element,"copy",e=>{var i;this.hasSelection()&&(i=this._selectionService,e.clipboardData&&e.clipboardData.setData("text/plain",i.selectionText),e.preventDefault())}));let e=e=>{var i,s,r;return i=this.textarea,s=this.coreService,r=this.optionsService,void(e.stopPropagation(),e.clipboardData&&C(e.clipboardData.getData("text/plain"),i,s,r))};this._register(tW(this.textarea,"paste",e)),this._register(tW(this.element,"paste",e)),si?this._register(tW(this.element,"mousedown",e=>{2===e.button&&k(e,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this._register(tW(this.element,"contextmenu",e=>{k(e,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),sc&&this._register(tW(this.element,"auxclick",e=>{1===e.button&&x(e,this.textarea,this.screenElement)}))}_bindKeys(){this._register(tW(this.textarea,"keyup",e=>this._keyUp(e),!0)),this._register(tW(this.textarea,"keydown",e=>this._keyDown(e),!0)),this._register(tW(this.textarea,"keypress",e=>this._keyPress(e),!0)),this._register(tW(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this._register(tW(this.textarea,"compositionupdate",e=>this._compositionHelper.compositionupdate(e))),this._register(tW(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this._register(tW(this.textarea,"input",e=>this._inputEvent(e),!0)),this._register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(e){if(!e)throw Error("Terminal requires a parent element.");if(e.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this.element?.ownerDocument.defaultView&&this._coreBrowserService){this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView);return}this._document=e.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),e.appendChild(this.element);let i=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),i.appendChild(this._viewportElement),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._register(tW(this.screenElement,"mousemove",e=>this.updateCursorStyle(e))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),i.appendChild(this.screenElement);let s=this.textarea=this._document.createElement("textarea");this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",b),sd||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._register(this.optionsService.onSpecificOptionChange("disableStdin",()=>s.readOnly=this.optionsService.rawOptions.disableStdin)),this.textarea.readOnly=this.optionsService.rawOptions.disableStdin,this._coreBrowserService=this._register(this._instantiationService.createInstance(i0,this.textarea,e.ownerDocument.defaultView??window,this._document??"u">typeof window?window.document:null)),this._instantiationService.setService(X,this._coreBrowserService),this._register(tW(this.textarea,"focus",e=>this._handleTextAreaFocus(e))),this._register(tW(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(iG,this._document,this._helperContainer),this._instantiationService.setService(j,this._charSizeService),this._themeService=this._instantiationService.createInstance(sO),this._instantiationService.setService(ee,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(iI),this._instantiationService.setService(Q,this._characterJoinerService),this._renderService=this._register(this._instantiationService.createInstance(sv,this.rows,this.screenElement)),this._instantiationService.setService(J,this._renderService),this._register(this._renderService.onRenderedViewportChange(e=>this._onRender.fire(e))),this.onResize(e=>this._renderService.resize(e.cols,e.rows)),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(ic,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(i3),this._instantiationService.setService(G,this._mouseService);let r=this._linkifier.value=this._register(this._instantiationService.createInstance(rV,this.screenElement));this.element.appendChild(i);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this._register(this.onCursorMove(()=>{this._renderService.handleCursorMove(),this._syncTextArea()})),this._register(this.onResize(()=>this._renderService.handleResize(this.cols,this.rows))),this._register(this.onBlur(()=>this._renderService.handleBlur())),this._register(this.onFocus(()=>this._renderService.handleFocus())),this._viewport=this._register(this._instantiationService.createInstance(ii,this.element,this.screenElement)),this._register(this._viewport.onRequestScrollLines(e=>{super.scrollLines(e,!1),this.refresh(0,this.rows-1)})),this._selectionService=this._register(this._instantiationService.createInstance(sB,this.element,this.screenElement,r)),this._instantiationService.setService(Z,this._selectionService),this._register(this._selectionService.onRequestScrollLines(e=>this.scrollLines(e.amount,e.suppressScrollEvent))),this._register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this._register(this._selectionService.onRequestRedraw(e=>this._renderService.handleSelectionChanged(e.start,e.end,e.columnSelectMode))),this._register(this._selectionService.onLinuxMouseSelection(e=>{this.textarea.value=e,this.textarea.focus(),this.textarea.select()})),this._register(eD.any(this._onScroll.event,this._inputHandler.onScroll)(()=>{this._selectionService.refresh(),this._viewport?.queueSync()})),this._register(this._instantiationService.createInstance(is,this.screenElement)),this._register(tW(this.element,"mousedown",e=>this._selectionService.handleMouseDown(e))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(rq,this)),this._register(this.optionsService.onSpecificOptionChange("screenReaderMode",e=>this._handleScreenReaderModeOptionChange(e))),this.options.overviewRuler.width&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(il,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRuler",e=>{!this._overviewRulerRenderer&&e&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this._register(this._instantiationService.createInstance(il,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(iX,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){let e=this,i=this.element;function s(i){let s,r,n=e._mouseService.getMouseReportCoords(i,e.screenElement);if(!n)return!1;switch(i.overrideType||i.type){case"mousemove":r=32,void 0===i.buttons?(s=3,void 0!==i.button&&(s=i.button<3?i.button:3)):s=1&i.buttons?0:4&i.buttons?1:2&i.buttons?2:3;break;case"mouseup":r=0,s=i.button<3?i.button:3;break;case"mousedown":r=1,s=i.button<3?i.button:3;break;case"wheel":if(e._customWheelEventHandler&&!1===e._customWheelEventHandler(i))return!1;let o=i.deltaY;if(0===o||0===e.coreMouseService.consumeWheelEvent(i,e._renderService?.dimensions?.device?.cell?.height,e._coreBrowserService?.dpr))return!1;r=o<0?0:1,s=4;break;default:return!1}return void 0!==r&&void 0!==s&&!(s>4)&&e.coreMouseService.triggerMouseEvent({col:n.col,row:n.row,x:n.x,y:n.y,button:s,action:r,ctrl:i.ctrlKey,alt:i.altKey,shift:i.shiftKey})}let r={mouseup:null,wheel:null,mousedrag:null,mousemove:null},n=e=>(s(e),e.buttons||(this._document.removeEventListener("mouseup",r.mouseup),r.mousedrag&&this._document.removeEventListener("mousemove",r.mousedrag)),this.cancel(e)),o=e=>(s(e),this.cancel(e,!0)),h=e=>{e.buttons&&s(e)},a=e=>{e.buttons||s(e)};this._register(this.coreMouseService.onProtocolChange(e=>{e?("debug"===this.optionsService.rawOptions.logLevel&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(e)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&e?r.mousemove||(i.addEventListener("mousemove",a),r.mousemove=a):(i.removeEventListener("mousemove",r.mousemove),r.mousemove=null),16&e?r.wheel||(i.addEventListener("wheel",o,{passive:!1}),r.wheel=o):(i.removeEventListener("wheel",r.wheel),r.wheel=null),2&e?r.mouseup||(r.mouseup=n):(this._document.removeEventListener("mouseup",r.mouseup),r.mouseup=null),4&e?r.mousedrag||(r.mousedrag=h):(this._document.removeEventListener("mousemove",r.mousedrag),r.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this._register(tW(i,"mousedown",e=>{if(e.preventDefault(),this.focus(),!(!this.coreMouseService.areMouseEventsActive||this._selectionService.shouldForceSelection(e)))return s(e),r.mouseup&&this._document.addEventListener("mouseup",r.mouseup),r.mousedrag&&this._document.addEventListener("mousemove",r.mousedrag),this.cancel(e)})),this._register(tW(i,"wheel",i=>{if(!r.wheel){if(this._customWheelEventHandler&&!1===this._customWheelEventHandler(i))return!1;if(!this.buffer.hasScrollback){if(0===i.deltaY)return!1;if(0===e.coreMouseService.consumeWheelEvent(i,e._renderService?.dimensions?.device?.cell?.height,e._coreBrowserService?.dpr))return this.cancel(i,!0);let s=iv.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(i.deltaY<0?"A":"B");return this.coreService.triggerDataEvent(s,!0),this.cancel(i,!0)}}},{passive:!1}))}refresh(e,i){this._renderService?.refreshRows(e,i)}updateCursorStyle(e){this._selectionService?.shouldColumnSelect(e)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(e,i){this._viewport?this._viewport.scrollLines(e):super.scrollLines(e,i),this.refresh(0,this.rows-1)}scrollPages(e){this.scrollLines(e*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(e){e&&this._viewport?this._viewport.scrollToLine(this.buffer.ybase,!0):this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(e){let i=e-this._bufferService.buffer.ydisp;0!==i&&this.scrollLines(i)}paste(e){C(e,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(e){this._customKeyEventHandler=e}attachCustomWheelEventHandler(e){this._customWheelEventHandler=e}registerLinkProvider(e){return this._linkProviderService.registerLinkProvider(e)}registerCharacterJoiner(e){if(!this._characterJoinerService)throw Error("Terminal must be opened first");let i=this._characterJoinerService.register(e);return this.refresh(0,this.rows-1),i}deregisterCharacterJoiner(e){if(!this._characterJoinerService)throw Error("Terminal must be opened first");this._characterJoinerService.deregister(e)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(e){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+e)}registerDecoration(e){return this._decorationService.registerDecoration(e)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(e,i,s){this._selectionService.setSelection(e,i,s)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(!(!this._selectionService||!this._selectionService.hasSelection))return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){this._selectionService?.clearSelection()}selectAll(){this._selectionService?.selectAll()}selectLines(e,i){this._selectionService?.selectLines(e,i)}_keyDown(e){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&!1===this._customKeyEventHandler(e))return!1;let i=this.browser.isMac&&this.options.macOptionIsMeta&&e.altKey;if(!i&&!this._compositionHelper.keydown(e))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(!0),!1;i||"Dead"!==e.key&&"AltGraph"!==e.key||(this._unprocessedDeadKey=!0);let s=function(e,i,s,r){let n={type:0,cancel:!1,key:void 0},o=!!e.shiftKey|2*!!e.altKey|4*!!e.ctrlKey|8*!!e.metaKey;switch(e.keyCode){case 0:"UIKeyInputUpArrow"===e.key?i?n.key=iv.ESC+"OA":n.key=iv.ESC+"[A":"UIKeyInputLeftArrow"===e.key?i?n.key=iv.ESC+"OD":n.key=iv.ESC+"[D":"UIKeyInputRightArrow"===e.key?i?n.key=iv.ESC+"OC":n.key=iv.ESC+"[C":"UIKeyInputDownArrow"===e.key&&(i?n.key=iv.ESC+"OB":n.key=iv.ESC+"[B");break;case 8:n.key=e.ctrlKey?"\b":iv.DEL,e.altKey&&(n.key=iv.ESC+n.key);break;case 9:if(e.shiftKey){n.key=iv.ESC+"[Z";break}n.key=iv.HT,n.cancel=!0;break;case 13:n.key=e.altKey?iv.ESC+iv.CR:iv.CR,n.cancel=!0;break;case 27:n.key=iv.ESC,e.altKey&&(n.key=iv.ESC+iv.ESC),n.cancel=!0;break;case 37:if(e.metaKey)break;o?n.key=iv.ESC+"[1;"+(o+1)+"D":i?n.key=iv.ESC+"OD":n.key=iv.ESC+"[D";break;case 39:if(e.metaKey)break;o?n.key=iv.ESC+"[1;"+(o+1)+"C":i?n.key=iv.ESC+"OC":n.key=iv.ESC+"[C";break;case 38:if(e.metaKey)break;o?n.key=iv.ESC+"[1;"+(o+1)+"A":i?n.key=iv.ESC+"OA":n.key=iv.ESC+"[A";break;case 40:if(e.metaKey)break;o?n.key=iv.ESC+"[1;"+(o+1)+"B":i?n.key=iv.ESC+"OB":n.key=iv.ESC+"[B";break;case 45:e.shiftKey||e.ctrlKey||(n.key=iv.ESC+"[2~");break;case 46:o?n.key=iv.ESC+"[3;"+(o+1)+"~":n.key=iv.ESC+"[3~";break;case 36:o?n.key=iv.ESC+"[1;"+(o+1)+"H":i?n.key=iv.ESC+"OH":n.key=iv.ESC+"[H";break;case 35:o?n.key=iv.ESC+"[1;"+(o+1)+"F":i?n.key=iv.ESC+"OF":n.key=iv.ESC+"[F";break;case 33:e.shiftKey?n.type=2:e.ctrlKey?n.key=iv.ESC+"[5;"+(o+1)+"~":n.key=iv.ESC+"[5~";break;case 34:e.shiftKey?n.type=3:e.ctrlKey?n.key=iv.ESC+"[6;"+(o+1)+"~":n.key=iv.ESC+"[6~";break;case 112:o?n.key=iv.ESC+"[1;"+(o+1)+"P":n.key=iv.ESC+"OP";break;case 113:o?n.key=iv.ESC+"[1;"+(o+1)+"Q":n.key=iv.ESC+"OQ";break;case 114:o?n.key=iv.ESC+"[1;"+(o+1)+"R":n.key=iv.ESC+"OR";break;case 115:o?n.key=iv.ESC+"[1;"+(o+1)+"S":n.key=iv.ESC+"OS";break;case 116:o?n.key=iv.ESC+"[15;"+(o+1)+"~":n.key=iv.ESC+"[15~";break;case 117:o?n.key=iv.ESC+"[17;"+(o+1)+"~":n.key=iv.ESC+"[17~";break;case 118:o?n.key=iv.ESC+"[18;"+(o+1)+"~":n.key=iv.ESC+"[18~";break;case 119:o?n.key=iv.ESC+"[19;"+(o+1)+"~":n.key=iv.ESC+"[19~";break;case 120:o?n.key=iv.ESC+"[20;"+(o+1)+"~":n.key=iv.ESC+"[20~";break;case 121:o?n.key=iv.ESC+"[21;"+(o+1)+"~":n.key=iv.ESC+"[21~";break;case 122:o?n.key=iv.ESC+"[23;"+(o+1)+"~":n.key=iv.ESC+"[23~";break;case 123:o?n.key=iv.ESC+"[24;"+(o+1)+"~":n.key=iv.ESC+"[24~";break;default:if(!e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)if((!s||r)&&e.altKey&&!e.metaKey){let i=rN[e.keyCode]?.[+!!e.shiftKey];if(i)n.key=iv.ESC+i;else if(e.keyCode>=65&&e.keyCode<=90){let i=String.fromCharCode(e.ctrlKey?e.keyCode-64:e.keyCode+32);e.shiftKey&&(i=i.toUpperCase()),n.key=iv.ESC+i}else if(32===e.keyCode)n.key=iv.ESC+(e.ctrlKey?iv.NUL:" ");else if("Dead"===e.key&&e.code.startsWith("Key")){let i=e.code.slice(3,4);e.shiftKey||(i=i.toLowerCase()),n.key=iv.ESC+i,n.cancel=!0}}else!s||e.altKey||e.ctrlKey||e.shiftKey||!e.metaKey?!e.key||e.ctrlKey||e.altKey||e.metaKey||!(e.keyCode>=48)||1!==e.key.length?e.key&&e.ctrlKey&&("_"===e.key&&(n.key=iv.US),"@"===e.key&&(n.key=iv.NUL)):n.key=e.key:65===e.keyCode&&(n.type=1);else e.keyCode>=65&&e.keyCode<=90?n.key=String.fromCharCode(e.keyCode-64):32===e.keyCode?n.key=iv.NUL:e.keyCode>=51&&e.keyCode<=55?n.key=String.fromCharCode(e.keyCode-51+27):56===e.keyCode?n.key=iv.DEL:219===e.keyCode?n.key=iv.ESC:220===e.keyCode?n.key=iv.FS:221===e.keyCode&&(n.key=iv.GS)}return n}(e,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(e),3===s.type||2===s.type){let i=this.rows-1;return this.scrollLines(2===s.type?-i:i),this.cancel(e,!0)}return 1===s.type&&this.selectAll(),!!(this._isThirdLevelShift(this.browser,e)||(s.cancel&&this.cancel(e,!0),!s.key)||e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&1===e.key.length&&e.key.charCodeAt(0)>=65&&90>=e.key.charCodeAt(0))||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):((s.key===iv.ETX||s.key===iv.CR)&&(this.textarea.value=""),this._onKey.fire({key:s.key,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(s.key,!0),!this.optionsService.rawOptions.screenReaderMode||e.altKey||e.ctrlKey)?this.cancel(e,!0):void(this._keyDownHandled=!0))}_isThirdLevelShift(e,i){let s=e.isMac&&!this.options.macOptionIsMeta&&i.altKey&&!i.ctrlKey&&!i.metaKey||e.isWindows&&i.altKey&&i.ctrlKey&&!i.metaKey||e.isWindows&&i.getModifierState("AltGraph");return"keypress"===i.type?s:s&&(!i.keyCode||i.keyCode>47)}_keyUp(e){var i;this._keyDownSeen=!1,this._customKeyEventHandler&&!1===this._customKeyEventHandler(e)||(16===(i=e).keyCode||17===i.keyCode||18===i.keyCode||this.focus(),this.updateCursorStyle(e),this._keyPressHandled=!1)}_keyPress(e){let i;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&!1===this._customKeyEventHandler(e))return!1;if(this.cancel(e),e.charCode)i=e.charCode;else if(null===e.which||void 0===e.which)i=e.keyCode;else{if(0===e.which||0===e.charCode)return!1;i=e.which}return!!i&&(!e.altKey&&!e.ctrlKey&&!e.metaKey||!!this._isThirdLevelShift(this.browser,e))&&(i=String.fromCharCode(i),this._onKey.fire({key:i,domEvent:e}),this._showCursor(),this.coreService.triggerDataEvent(i,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,!0)}_inputEvent(e){if(e.data&&"insertText"===e.inputType&&(!e.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;let i=e.data;return this.coreService.triggerDataEvent(i,!0),this.cancel(e),!0}return!1}resize(e,i){if(e===this.cols&&i===this.rows){this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure();return}super.resize(e,i)}_afterResize(e,i){this._charSizeService?.measure()}clear(){if(0!==this.buffer.ybase||0!==this.buffer.y){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let e=1;e<this.rows;e++)this.buffer.lines.push(this.buffer.getBlankLine(s$));this._onScroll.fire({position:this.buffer.ydisp}),this.refresh(0,this.rows-1)}}reset(){this.options.rows=this.rows,this.options.cols=this.cols;let e=this._customKeyEventHandler;this._setup(),super.reset(),this._selectionService?.reset(),this._decorationService.reset(),this._customKeyEventHandler=e,this.refresh(0,this.rows-1)}clearTextureAtlas(){this._renderService?.clearTextureAtlas()}_reportFocus(){this.element?.classList.contains("focus")?this.coreService.triggerDataEvent(iv.ESC+"[I"):this.coreService.triggerDataEvent(iv.ESC+"[O")}_reportWindowsOptions(e){if(this._renderService)switch(e){case 0:let i=this._renderService.dimensions.css.canvas.width.toFixed(0),s=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${iv.ESC}[4;${s};${i}t`);break;case 1:let r=this._renderService.dimensions.css.cell.width.toFixed(0),n=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${iv.ESC}[6;${n};${r}t`)}}cancel(e,i){if(!(!this.options.cancelEvents&&!i))return e.preventDefault(),e.stopPropagation(),!1}},rj=class{constructor(){this._addons=[]}dispose(){for(let e=this._addons.length-1;e>=0;e--)this._addons[e].instance.dispose()}loadAddon(e,i){let s={instance:i,dispose:i.dispose,isDisposed:!1};this._addons.push(s),i.dispose=()=>this._wrappedAddonDispose(s),i.activate(e)}_wrappedAddonDispose(e){if(e.isDisposed)return;let i=-1;for(let s=0;s<this._addons.length;s++)if(this._addons[s]===e){i=s;break}if(-1===i)throw Error("Could not dispose an addon that has not been loaded");e.isDisposed=!0,e.dispose.apply(e.instance),this._addons.splice(i,1)}},rX=class{constructor(e){this._line=e}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(e,i){if(!(e<0||e>=this._line.length))return i?(this._line.loadCell(e,i),i):this._line.loadCell(e,new P)}translateToString(e,i,s){return this._line.translateToString(e,i,s)}},rG=class{constructor(e,i){this._buffer=e,this.type=i}init(e){return this._buffer=e,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(e){let i=this._buffer.lines.get(e);if(i)return new rX(i)}getNullCell(){return new P}},rJ=class extends eg{constructor(e){super(),this._core=e,this._onBufferChange=this._register(new eO),this.onBufferChange=this._onBufferChange.event,this._normal=new rG(this._core.buffers.normal,"normal"),this._alternate=new rG(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate(()=>this._onBufferChange.fire(this.active))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}},rZ=class{constructor(e){this._core=e}registerCsiHandler(e,i){return this._core.registerCsiHandler(e,e=>i(e.toArray()))}addCsiHandler(e,i){return this.registerCsiHandler(e,i)}registerDcsHandler(e,i){return this._core.registerDcsHandler(e,(e,s)=>i(e,s.toArray()))}addDcsHandler(e,i){return this.registerDcsHandler(e,i)}registerEscHandler(e,i){return this._core.registerEscHandler(e,i)}addEscHandler(e,i){return this.registerEscHandler(e,i)}registerOscHandler(e,i){return this._core.registerOscHandler(e,i)}addOscHandler(e,i){return this.registerOscHandler(e,i)}},rQ=class{constructor(e){this._core=e}register(e){this._core.unicodeService.register(e)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(e){this._core.unicodeService.activeVersion=e}},r0=["cols","rows"],r1=0,r2=class extends eg{constructor(e){super(),this._core=this._register(new rY(e)),this._addonManager=this._register(new rj),this._publicOptions={...this._core.options};let i=e=>this._core.options[e],s=(e,i)=>{this._checkReadonlyOptions(e),this._core.options[e]=i};for(let e in this._core.options){let r={get:i.bind(this,e),set:s.bind(this,e)};Object.defineProperty(this._publicOptions,e,r)}}_checkReadonlyOptions(e){if(r0.includes(e))throw Error(`Option "${e}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new rZ(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new rQ(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this._register(new rJ(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){let e=this._core.coreService.decPrivateModes,i="none";switch(this._core.coreMouseService.activeProtocol){case"X10":i="x10";break;case"VT200":i="vt200";break;case"DRAG":i="drag";break;case"ANY":i="any"}return{applicationCursorKeysMode:e.applicationCursorKeys,applicationKeypadMode:e.applicationKeypad,bracketedPasteMode:e.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:i,originMode:e.origin,reverseWraparoundMode:e.reverseWraparound,sendFocusMode:e.sendFocus,synchronizedOutputMode:e.synchronizedOutput,wraparoundMode:e.wraparound}}get options(){return this._publicOptions}set options(e){for(let i in e)this._publicOptions[i]=e[i]}blur(){this._core.blur()}focus(){this._core.focus()}input(e,i=!0){this._core.input(e,i)}resize(e,i){this._verifyIntegers(e,i),this._core.resize(e,i)}open(e){this._core.open(e)}attachCustomKeyEventHandler(e){this._core.attachCustomKeyEventHandler(e)}attachCustomWheelEventHandler(e){this._core.attachCustomWheelEventHandler(e)}registerLinkProvider(e){return this._core.registerLinkProvider(e)}registerCharacterJoiner(e){return this._checkProposedApi(),this._core.registerCharacterJoiner(e)}deregisterCharacterJoiner(e){this._checkProposedApi(),this._core.deregisterCharacterJoiner(e)}registerMarker(e=0){return this._verifyIntegers(e),this._core.registerMarker(e)}registerDecoration(e){return this._checkProposedApi(),this._verifyPositiveIntegers(e.x??0,e.width??0,e.height??0),this._core.registerDecoration(e)}hasSelection(){return this._core.hasSelection()}select(e,i,s){this._verifyIntegers(e,i,s),this._core.select(e,i,s)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(e,i){this._verifyIntegers(e,i),this._core.selectLines(e,i)}dispose(){super.dispose()}scrollLines(e){this._verifyIntegers(e),this._core.scrollLines(e)}scrollPages(e){this._verifyIntegers(e),this._core.scrollPages(e)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(e){this._verifyIntegers(e),this._core.scrollToLine(e)}clear(){this._core.clear()}write(e,i){this._core.write(e,i)}writeln(e,i){this._core.write(e),this._core.write(`\r
18
18
  `,i)}paste(e){this._core.paste(e)}refresh(e,i){this._verifyIntegers(e,i),this._core.refresh(e,i)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(e){this._addonManager.loadAddon(this,e)}static get strings(){return{get promptLabel(){return b},set promptLabel(t){b=t},get tooMuchOutput(){return y},set tooMuchOutput(t){y=t}}}_verifyIntegers(...e){for(r1 of e)if(r1===1/0||isNaN(r1)||r1%1!=0)throw Error("This API only accepts integers")}_verifyPositiveIntegers(...e){for(r1 of e)if(r1&&(r1===1/0||isNaN(r1)||r1%1!=0||r1<0))throw Error("This API only accepts positive integers")}},r5=class{activate(e){this._terminal=e}dispose(){}fit(){let e=this.proposeDimensions();if(!e||!this._terminal||isNaN(e.cols)||isNaN(e.rows))return;let i=this._terminal._core;(this._terminal.rows!==e.rows||this._terminal.cols!==e.cols)&&(i._renderService.clear(),this._terminal.resize(e.cols,e.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;let e=this._terminal._core._renderService.dimensions;if(0===e.css.cell.width||0===e.css.cell.height)return;let i=0===this._terminal.options.scrollback?0:this._terminal.options.overviewRuler?.width||14,s=window.getComputedStyle(this._terminal.element.parentElement),r=parseInt(s.getPropertyValue("height")),n=Math.max(0,parseInt(s.getPropertyValue("width"))),o=window.getComputedStyle(this._terminal.element),h={top:parseInt(o.getPropertyValue("padding-top")),bottom:parseInt(o.getPropertyValue("padding-bottom")),right:parseInt(o.getPropertyValue("padding-right")),left:parseInt(o.getPropertyValue("padding-left"))},a=h.top+h.bottom;return{cols:Math.max(2,Math.floor((n-(h.right+h.left)-i)/e.css.cell.width)),rows:Math.max(1,Math.floor((r-a)/e.css.cell.height))}}},r3=class{constructor(e,i,s,r={}){this._terminal=e,this._regex=i,this._handler=s,this._options=r}provideLinks(e,i){let s=r6.computeLink(e,this._regex,this._terminal,this._handler);i(this._addCallbacks(s))}_addCallbacks(e){return e.map(e=>(e.leave=this._options.leave,e.hover=(i,s)=>{if(this._options.hover){let{range:r}=e;this._options.hover(i,s,r)}},e))}},r6=class e{static computeLink(i,s,r,n){let o=RegExp(s.source,(s.flags||"")+"g"),[h,a]=e._getWindowedLineStrings(i-1,r),l=h.join(""),c,d=[];for(;c=o.exec(l);){let i=c[0];if(!function(e){try{let i=new URL(e),s=i.password&&i.username?`${i.protocol}//${i.username}:${i.password}@${i.host}`:i.username?`${i.protocol}//${i.username}@${i.host}`:`${i.protocol}//${i.host}`;return e.toLocaleLowerCase().startsWith(s.toLocaleLowerCase())}catch{return!1}}(i))continue;let[s,o]=e._mapStrIdx(r,a,0,c.index),[h,l]=e._mapStrIdx(r,s,o,i.length);if(-1===s||-1===o||-1===h||-1===l)continue;let _={start:{x:o+1,y:s+1},end:{x:l,y:h+1}};d.push({range:_,text:i,activate:n})}return d}static _getWindowedLineStrings(e,i){let s,r=e,n=e,o=0,h="",a=[];if(s=i.buffer.active.getLine(e)){let e=s.translateToString(!0);if(s.isWrapped&&" "!==e[0]){for(o=0;(s=i.buffer.active.getLine(--r))&&o<2048&&(o+=(h=s.translateToString(!0)).length,a.push(h),!(!s.isWrapped||-1!==h.indexOf(" "))););a.reverse()}for(a.push(e),o=0;(s=i.buffer.active.getLine(++n))&&s.isWrapped&&o<2048&&(o+=(h=s.translateToString(!0)).length,a.push(h),-1===h.indexOf(" ")););}return[a,r]}static _mapStrIdx(e,i,s,r){let n=e.buffer.active,o=n.getNullCell(),h=s;for(;r;){let e=n.getLine(i);if(!e)return[-1,-1];for(let s=h;s<e.length;++s){e.getCell(s,o);let h=o.getChars();if(o.getWidth()&&(r-=h.length||1,s===e.length-1&&""===h)){let e=n.getLine(i+1);e&&e.isWrapped&&(e.getCell(0,o),2===o.getWidth()&&(r+=1))}if(r<0)return[i,s]}i++,h=0}return[i,h]}},r4=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function r8(e,i){let s=window.open();if(s){try{s.opener=null}catch{}s.location.href=i}else console.warn("Opening link blocked as opener could not be cleared")}var r7=class{constructor(e=r8,i={}){this._handler=e,this._options=i}activate(e){this._terminal=e;let i=this._options,s=i.urlRegex||r4;this._linkProvider=this._terminal.registerLinkProvider(new r3(this._terminal,s,this._handler,i))}dispose(){this._linkProvider?.dispose()}},r9=e.i(21146);let ne=(0,p.forwardRef)(function({sessionName:e,bridgeUrl:i="/api/bridge",tintColor:s,onConnectionChange:r,onSessionExit:n,onReady:o,onImagePaste:h},a){let l=(0,p.useRef)(null),c=(0,p.useRef)(null),d=(0,p.useRef)(null),_=(0,p.useRef)(null),u=(0,p.useRef)({cols:80,rows:24}),[g,v]=(0,p.useState)(!0),[m,S]=(0,p.useState)(!1),[w,b]=(0,p.useState)(e),y=(0,p.useRef)(!1);w!==e&&(b(e),v(!0));let C=(0,p.useRef)(r),x=(0,p.useRef)(n),k=(0,p.useRef)(o),E=(0,p.useRef)(h);return(0,p.useEffect)(()=>{C.current=r,x.current=n,k.current=o,E.current=h},[r,n,o,h]),(0,p.useImperativeHandle)(a,()=>({focus:()=>{c.current?.focus()},sendInput:s=>{fetch(`${i}/sessions/${encodeURIComponent(e)}/input`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({data:s})}).catch(()=>{})}}),[i,e]),(0,p.useEffect)(()=>{if(!l.current)return;let s=new AbortController,r=document.documentElement.classList.contains("dark")?"#1a1a1a":"#222228",n=new r2({cursorBlink:!0,fontSize:14,fontFamily:'Menlo, Monaco, "Courier New", monospace',theme:{background:r,foreground:"#e0e0e0",cursor:"#00bfff",cursorAccent:r,selectionBackground:"rgba(0, 191, 255, 0.2)"}});c.current=n;let o=new r5;_.current=o,n.loadAddon(o),n.loadAddon(new r7),n.open(l.current);let h=r=>{fetch(`${i}/sessions/${encodeURIComponent(e)}/input`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({data:r}),signal:s.signal}).catch(()=>{})};n.attachCustomKeyEventHandler(e=>"keydown"!==e.type||!e.ctrlKey&&!e.metaKey||"v"!==e.key||!!e.shiftKey||(navigator.clipboard.read().then(async e=>{for(let i of e){let e=i.types.find(e=>e.startsWith("image/"));if(e){let s=new File([await i.getType(e)],"clipboard-image.png",{type:e});E.current?.(s);return}}try{let e=await navigator.clipboard.readText();e&&h(e)}catch{}}).catch(async()=>{try{let e=await navigator.clipboard.readText();e&&h(e)}catch{}}),!1)),o.fit();let a=null,f=0,p=Math.ceil((n.options.fontSize??14)*(n.options.lineHeight??1)),g=e=>{1===e.touches.length&&(a=e.touches[0].clientY,f=0)},m=e=>{if(null===a||1!==e.touches.length)return;let i=e.touches[0].clientY,s=a-i;a=i;let r=Math.trunc((f+=s)/p);0!==r&&(n.scrollLines(r),f-=r*p),e.preventDefault()},w=()=>{a=null,f=0},b=l.current;b.addEventListener("touchstart",g,{passive:!0}),b.addEventListener("touchmove",m,{passive:!1}),b.addEventListener("touchend",w,{passive:!0}),k.current?.({focus:()=>n.focus(),sendInput:r=>{fetch(`${i}/sessions/${encodeURIComponent(e)}/input`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({data:r}),signal:s.signal}).catch(()=>{})}}),n.onData(r=>{fetch(`${i}/sessions/${encodeURIComponent(e)}/input`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({data:r}),signal:s.signal}).catch(()=>{})});let B=!1,D=()=>{"visible"!==document.visibilityState||B||fetch(`${i}/sessions/${encodeURIComponent(e)}/resize`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cols:n.cols,rows:n.rows}),signal:s.signal}).catch(()=>{})},R=null,M=new ResizeObserver(()=>{R&&clearTimeout(R),R=setTimeout(()=>{R=null,o.fit(),D()},150)});M.observe(l.current);let L=`${i}/sessions/${encodeURIComponent(e)}/stream`;return d.current=r9.connectionManager.createManagedEventSource(L,{onOpen:()=>{let e=y.current;e&&(S(!1),n.write("\r\n\x1b[32mReconnected\x1b[0m\r\n")),y.current=!0,C.current?.(!0),e||setTimeout(D,100)},onError:()=>{y.current&&(S(!0),C.current?.(!1),n.write("\r\n\x1b[33mConnection lost - reconnecting...\x1b[0m\r\n"))},connected:()=>{},dimensions:e=>{try{let i=JSON.parse(e.data);u.current={cols:i.cols,rows:i.rows}}catch{}},restore:e=>{try{let{state:i}=JSON.parse(e.data);i&&(n.resize(u.current.cols,u.current.rows),n.write(i),o.fit(),D()),v(!1),S(!1)}catch{v(!1),S(!1)}},resize:e=>{try{let{cols:i,rows:s}=JSON.parse(e.data);i&&s&&(i!==n.cols||s!==n.rows)&&(B=!0,n.resize(i,s),B=!1)}catch{}},output:e=>{v(!1),S(!1);try{let i=JSON.parse(e.data);n.write(i.data)}catch{n.write(e.data)}},exit:e=>{try{let i=JSON.parse(e.data);n.write(`\r
19
19
  \x1b[33mSession exited (code: ${i.code})\x1b[0m\r
20
- `),x.current?.(i.code)}catch{n.write("\r\n\x1b[33mSession exited\x1b[0m\r\n")}},error:e=>{try{let i=JSON.parse(e.data);n.write(`\r
20
+ `),x.current?.(i.code,i.output)}catch{n.write("\r\n\x1b[33mSession exited\x1b[0m\r\n")}},error:e=>{try{let i=JSON.parse(e.data);n.write(`\r
21
21
  \x1b[31mError: ${i.message}\x1b[0m\r
22
22
  `)}catch{}}}),()=>{s.abort(),b.removeEventListener("touchstart",g),b.removeEventListener("touchmove",m),b.removeEventListener("touchend",w),R&&clearTimeout(R),M.disconnect(),d.current&&(r9.connectionManager.closeConnection(d.current),d.current=null),n.dispose()}},[e,i]),(0,f.jsxs)("div",{className:"relative h-full w-full touch-none bg-[#222228] dark:bg-[#1a1a1a]",children:[(0,f.jsx)("div",{ref:l,className:"h-full w-full px-3 py-2"}),(0,f.jsx)("div",{className:"pointer-events-none absolute inset-0 terminal-texture",style:s?{"--terminal-tint":s}:void 0}),g&&(0,f.jsx)("div",{className:"absolute inset-0 flex items-center justify-center bg-[#222228] dark:bg-[#1a1a1a]",children:(0,f.jsxs)("div",{className:"flex flex-col items-center gap-2 text-void-500",children:[(0,f.jsxs)("svg",{className:"h-6 w-6 animate-spin",viewBox:"0 0 24 24",fill:"none",children:[(0,f.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,f.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),(0,f.jsx)("span",{className:"text-sm",children:"Restoring session..."})]})}),m&&!g&&(0,f.jsxs)("div",{className:"absolute bottom-2 right-2 flex items-center gap-2 rounded bg-amber-900/80 px-2 py-1 text-xs text-amber-200",children:[(0,f.jsxs)("svg",{className:"h-3 w-3 animate-spin",viewBox:"0 0 24 24",fill:"none",children:[(0,f.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,f.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),(0,f.jsx)("span",{children:"Reconnecting..."})]})]})});e.s(["Terminal",0,ne],6203)},81485,e=>{e.n(e.i(6203))}]);