9remote 3.0.0 → 3.0.1

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 (178) hide show
  1. package/dist/cli.cjs +2 -2
  2. package/dist/server.cjs +4 -4
  3. package/dist/ui/assets/index-CgmlJ9gQ.js +8 -0
  4. package/dist/ui/index.html +1 -1
  5. package/dist/web/404.html +1 -1
  6. package/dist/web/__next.__PAGE__.txt +2 -2
  7. package/dist/web/__next._full.txt +2 -2
  8. package/dist/web/__next._head.txt +1 -1
  9. package/dist/web/__next._index.txt +1 -1
  10. package/dist/web/__next._tree.txt +1 -1
  11. package/dist/web/_next/static/chunks/app/login/{page-31786ee656da76b1.js → page-e0b9a16c4888e596.js} +1 -1
  12. package/dist/web/_next/static/chunks/app/{page-1cf39061b48db156.js → page-864dbd193d5f7261.js} +2 -2
  13. package/dist/web/_next/static/chunks/app/workspace/{layout-5e8f95fbc4ebaa6b.js → layout-914ab93a33a22f8e.js} +2 -2
  14. package/dist/web/_not-found/__next._full.txt +1 -1
  15. package/dist/web/_not-found/__next._head.txt +1 -1
  16. package/dist/web/_not-found/__next._index.txt +1 -1
  17. package/dist/web/_not-found/__next._not-found.__PAGE__.txt +1 -1
  18. package/dist/web/_not-found/__next._not-found.txt +1 -1
  19. package/dist/web/_not-found/__next._tree.txt +1 -1
  20. package/dist/web/_not-found.html +1 -1
  21. package/dist/web/_not-found.txt +1 -1
  22. package/dist/web/admin/__next._full.txt +1 -1
  23. package/dist/web/admin/__next._head.txt +1 -1
  24. package/dist/web/admin/__next._index.txt +1 -1
  25. package/dist/web/admin/__next._tree.txt +1 -1
  26. package/dist/web/admin/__next.admin.__PAGE__.txt +1 -1
  27. package/dist/web/admin/__next.admin.txt +1 -1
  28. package/dist/web/admin/admins/__next._full.txt +1 -1
  29. package/dist/web/admin/admins/__next._head.txt +1 -1
  30. package/dist/web/admin/admins/__next._index.txt +1 -1
  31. package/dist/web/admin/admins/__next._tree.txt +1 -1
  32. package/dist/web/admin/admins/__next.admin.admins.__PAGE__.txt +1 -1
  33. package/dist/web/admin/admins/__next.admin.admins.txt +1 -1
  34. package/dist/web/admin/admins/__next.admin.txt +1 -1
  35. package/dist/web/admin/admins.html +1 -1
  36. package/dist/web/admin/admins.txt +1 -1
  37. package/dist/web/admin/login/__next._full.txt +1 -1
  38. package/dist/web/admin/login/__next._head.txt +1 -1
  39. package/dist/web/admin/login/__next._index.txt +1 -1
  40. package/dist/web/admin/login/__next._tree.txt +1 -1
  41. package/dist/web/admin/login/__next.admin.login.__PAGE__.txt +1 -1
  42. package/dist/web/admin/login/__next.admin.login.txt +1 -1
  43. package/dist/web/admin/login/__next.admin.txt +1 -1
  44. package/dist/web/admin/login.html +1 -1
  45. package/dist/web/admin/login.txt +1 -1
  46. package/dist/web/admin/modes/__next._full.txt +1 -1
  47. package/dist/web/admin/modes/__next._head.txt +1 -1
  48. package/dist/web/admin/modes/__next._index.txt +1 -1
  49. package/dist/web/admin/modes/__next._tree.txt +1 -1
  50. package/dist/web/admin/modes/__next.admin.modes.__PAGE__.txt +1 -1
  51. package/dist/web/admin/modes/__next.admin.modes.txt +1 -1
  52. package/dist/web/admin/modes/__next.admin.txt +1 -1
  53. package/dist/web/admin/modes.html +1 -1
  54. package/dist/web/admin/modes.txt +1 -1
  55. package/dist/web/admin/ota/__next._full.txt +1 -1
  56. package/dist/web/admin/ota/__next._head.txt +1 -1
  57. package/dist/web/admin/ota/__next._index.txt +1 -1
  58. package/dist/web/admin/ota/__next._tree.txt +1 -1
  59. package/dist/web/admin/ota/__next.admin.ota.__PAGE__.txt +1 -1
  60. package/dist/web/admin/ota/__next.admin.ota.txt +1 -1
  61. package/dist/web/admin/ota/__next.admin.txt +1 -1
  62. package/dist/web/admin/ota.html +1 -1
  63. package/dist/web/admin/ota.txt +1 -1
  64. package/dist/web/admin/turn/__next._full.txt +1 -1
  65. package/dist/web/admin/turn/__next._head.txt +1 -1
  66. package/dist/web/admin/turn/__next._index.txt +1 -1
  67. package/dist/web/admin/turn/__next._tree.txt +1 -1
  68. package/dist/web/admin/turn/__next.admin.turn.__PAGE__.txt +1 -1
  69. package/dist/web/admin/turn/__next.admin.turn.txt +1 -1
  70. package/dist/web/admin/turn/__next.admin.txt +1 -1
  71. package/dist/web/admin/turn.html +1 -1
  72. package/dist/web/admin/turn.txt +1 -1
  73. package/dist/web/admin.html +1 -1
  74. package/dist/web/admin.txt +1 -1
  75. package/dist/web/dev/question/__next._full.txt +1 -1
  76. package/dist/web/dev/question/__next._head.txt +1 -1
  77. package/dist/web/dev/question/__next._index.txt +1 -1
  78. package/dist/web/dev/question/__next._tree.txt +1 -1
  79. package/dist/web/dev/question/__next.dev.question.__PAGE__.txt +1 -1
  80. package/dist/web/dev/question/__next.dev.question.txt +1 -1
  81. package/dist/web/dev/question/__next.dev.txt +1 -1
  82. package/dist/web/dev/question.html +1 -1
  83. package/dist/web/dev/question.txt +1 -1
  84. package/dist/web/index.html +1 -1
  85. package/dist/web/index.txt +2 -2
  86. package/dist/web/login/__next._full.txt +2 -2
  87. package/dist/web/login/__next._head.txt +1 -1
  88. package/dist/web/login/__next._index.txt +1 -1
  89. package/dist/web/login/__next._tree.txt +1 -1
  90. package/dist/web/login/__next.login.__PAGE__.txt +2 -2
  91. package/dist/web/login/__next.login.txt +1 -1
  92. package/dist/web/login.html +1 -1
  93. package/dist/web/login.txt +2 -2
  94. package/dist/web/workspace/__next._full.txt +2 -2
  95. package/dist/web/workspace/__next._head.txt +1 -1
  96. package/dist/web/workspace/__next._index.txt +1 -1
  97. package/dist/web/workspace/__next._tree.txt +1 -1
  98. package/dist/web/workspace/__next.workspace.__PAGE__.txt +1 -1
  99. package/dist/web/workspace/__next.workspace.txt +2 -2
  100. package/dist/web/workspace/browse/__next._full.txt +2 -2
  101. package/dist/web/workspace/browse/__next._head.txt +1 -1
  102. package/dist/web/workspace/browse/__next._index.txt +1 -1
  103. package/dist/web/workspace/browse/__next._tree.txt +1 -1
  104. package/dist/web/workspace/browse/__next.workspace.browse.__PAGE__.txt +1 -1
  105. package/dist/web/workspace/browse/__next.workspace.browse.txt +1 -1
  106. package/dist/web/workspace/browse/__next.workspace.txt +2 -2
  107. package/dist/web/workspace/browse.html +1 -1
  108. package/dist/web/workspace/browse.txt +2 -2
  109. package/dist/web/workspace/editor/__next._full.txt +2 -2
  110. package/dist/web/workspace/editor/__next._head.txt +1 -1
  111. package/dist/web/workspace/editor/__next._index.txt +1 -1
  112. package/dist/web/workspace/editor/__next._tree.txt +1 -1
  113. package/dist/web/workspace/editor/__next.workspace.editor.__PAGE__.txt +1 -1
  114. package/dist/web/workspace/editor/__next.workspace.editor.txt +1 -1
  115. package/dist/web/workspace/editor/__next.workspace.txt +2 -2
  116. package/dist/web/workspace/editor.html +1 -1
  117. package/dist/web/workspace/editor.txt +2 -2
  118. package/dist/web/workspace/files/__next._full.txt +2 -2
  119. package/dist/web/workspace/files/__next._head.txt +1 -1
  120. package/dist/web/workspace/files/__next._index.txt +1 -1
  121. package/dist/web/workspace/files/__next._tree.txt +1 -1
  122. package/dist/web/workspace/files/__next.workspace.files.__PAGE__.txt +1 -1
  123. package/dist/web/workspace/files/__next.workspace.files.txt +1 -1
  124. package/dist/web/workspace/files/__next.workspace.txt +2 -2
  125. package/dist/web/workspace/files.html +1 -1
  126. package/dist/web/workspace/files.txt +2 -2
  127. package/dist/web/workspace/git/__next._full.txt +2 -2
  128. package/dist/web/workspace/git/__next._head.txt +1 -1
  129. package/dist/web/workspace/git/__next._index.txt +1 -1
  130. package/dist/web/workspace/git/__next._tree.txt +1 -1
  131. package/dist/web/workspace/git/__next.workspace.git.__PAGE__.txt +1 -1
  132. package/dist/web/workspace/git/__next.workspace.git.txt +1 -1
  133. package/dist/web/workspace/git/__next.workspace.txt +2 -2
  134. package/dist/web/workspace/git.html +1 -1
  135. package/dist/web/workspace/git.txt +2 -2
  136. package/dist/web/workspace/mobile/__next._full.txt +2 -2
  137. package/dist/web/workspace/mobile/__next._head.txt +1 -1
  138. package/dist/web/workspace/mobile/__next._index.txt +1 -1
  139. package/dist/web/workspace/mobile/__next._tree.txt +1 -1
  140. package/dist/web/workspace/mobile/__next.workspace.mobile.__PAGE__.txt +1 -1
  141. package/dist/web/workspace/mobile/__next.workspace.mobile.txt +1 -1
  142. package/dist/web/workspace/mobile/__next.workspace.txt +2 -2
  143. package/dist/web/workspace/mobile.html +1 -1
  144. package/dist/web/workspace/mobile.txt +2 -2
  145. package/dist/web/workspace/remote/__next._full.txt +2 -2
  146. package/dist/web/workspace/remote/__next._head.txt +1 -1
  147. package/dist/web/workspace/remote/__next._index.txt +1 -1
  148. package/dist/web/workspace/remote/__next._tree.txt +1 -1
  149. package/dist/web/workspace/remote/__next.workspace.remote.__PAGE__.txt +1 -1
  150. package/dist/web/workspace/remote/__next.workspace.remote.txt +1 -1
  151. package/dist/web/workspace/remote/__next.workspace.txt +2 -2
  152. package/dist/web/workspace/remote.html +1 -1
  153. package/dist/web/workspace/remote.txt +2 -2
  154. package/dist/web/workspace/terminal/default/__next._full.txt +2 -2
  155. package/dist/web/workspace/terminal/default/__next._head.txt +1 -1
  156. package/dist/web/workspace/terminal/default/__next._index.txt +1 -1
  157. package/dist/web/workspace/terminal/default/__next._tree.txt +1 -1
  158. package/dist/web/workspace/terminal/default/__next.workspace.terminal.$d$sessionId.__PAGE__.txt +1 -1
  159. package/dist/web/workspace/terminal/default/__next.workspace.terminal.$d$sessionId.txt +1 -1
  160. package/dist/web/workspace/terminal/default/__next.workspace.terminal.txt +1 -1
  161. package/dist/web/workspace/terminal/default/__next.workspace.txt +2 -2
  162. package/dist/web/workspace/terminal/default.html +1 -1
  163. package/dist/web/workspace/terminal/default.txt +2 -2
  164. package/dist/web/workspace/workspaces/__next._full.txt +2 -2
  165. package/dist/web/workspace/workspaces/__next._head.txt +1 -1
  166. package/dist/web/workspace/workspaces/__next._index.txt +1 -1
  167. package/dist/web/workspace/workspaces/__next._tree.txt +1 -1
  168. package/dist/web/workspace/workspaces/__next.workspace.txt +2 -2
  169. package/dist/web/workspace/workspaces/__next.workspace.workspaces.__PAGE__.txt +1 -1
  170. package/dist/web/workspace/workspaces/__next.workspace.workspaces.txt +1 -1
  171. package/dist/web/workspace/workspaces.html +1 -1
  172. package/dist/web/workspace/workspaces.txt +2 -2
  173. package/dist/web/workspace.html +1 -1
  174. package/dist/web/workspace.txt +2 -2
  175. package/package.json +1 -1
  176. package/dist/ui/assets/index-EXcI2V_p.js +0 -8
  177. /package/dist/web/_next/static/{AUHtJgkYALYyNwHop9pgT → d4cJ0fUEgzqmRy9HsvvEu}/_buildManifest.js +0 -0
  178. /package/dist/web/_next/static/{AUHtJgkYALYyNwHop9pgT → d4cJ0fUEgzqmRy9HsvvEu}/_ssgManifest.js +0 -0
package/dist/web/404.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en" class="scroll-smooth scroll-pt-20"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, interactive-widget=resizes-content"/><link rel="preload" href="/_next/static/media/22a5144ee8d83bca-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/7d4881bb7e1bf84d-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/b496025c9cd768cc.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/5c40e58137a11306.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-c971919003362f96.js"/><script src="/_next/static/chunks/c7879cf7-0d16fce1674078f9.js" async=""></script><script src="/_next/static/chunks/5158-267908d069475cdc.js" async=""></script><script src="/_next/static/chunks/main-app-1831d4f902c3fcb9.js" async=""></script><script src="/_next/static/chunks/4732-76a574510722b2c3.js" async=""></script><script src="/_next/static/chunks/app/layout-341400810c81f67e.js" async=""></script><link rel="preload" href="https://www.googletagmanager.com/gtag/js?id=G-8XXG61NY56" as="script"/><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>404: This page could not be found.</title><meta name="theme-color" content="#121212"/><title>9Remote — Remote Everything, Everywhere</title><meta name="description" content="Remote IDE, desktop, files, emulator &amp; vibe coding on PC, Web, iPad, and Mobile. Ultra-low latency WebRTC P2P dev suite."/><meta name="application-name" content="9Remote Terminal"/><link rel="manifest" href="/manifest.json"/><meta name="mobile-web-app-capable" content="yes"/><meta name="apple-mobile-web-app-title" content="9Remote"/><meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/><link rel="icon" href="/favicon.ico" sizes="any"/><link rel="icon" href="/icon-192.png" sizes="192x192" type="image/png"/><link rel="icon" href="/icon-512.png" sizes="512x512" type="image/png"/><link rel="apple-touch-icon" href="/icon-192.png" sizes="192x192" type="image/png"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="__variable_246ccd __variable_c29908 antialiased"><div hidden=""><!--$--><!--/$--></div><script id="theme-init">(function(){try{var t=localStorage.getItem("app_theme_v2")||"dark";document.documentElement.classList.add(t);}catch(e){document.documentElement.classList.add("dark");}})();</script><script id="safe-area-bridge">window.handleSafeAreaInset=function(top,bottom){try{if(top&&top>0)document.documentElement.style.setProperty("--pl-top",top+"px");}catch(e){}};</script><script id="sw-register">if('serviceWorker' in navigator){window.addEventListener('load',function(){navigator.serviceWorker.register('/sw.js').catch(function(e){console.log('SW registration failed:',e);});});}</script><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/webpack-c971919003362f96.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[59584,[\"4732\",\"static/chunks/4732-76a574510722b2c3.js\",\"7177\",\"static/chunks/app/layout-341400810c81f67e.js\"],\"default\"]\n3:I[44976,[\"4732\",\"static/chunks/4732-76a574510722b2c3.js\",\"7177\",\"static/chunks/app/layout-341400810c81f67e.js\"],\"ThemeProvider\"]\n4:I[91133,[],\"\"]\n5:I[4297,[],\"\"]\n6:I[95223,[\"4732\",\"static/chunks/4732-76a574510722b2c3.js\",\"7177\",\"static/chunks/app/layout-341400810c81f67e.js\"],\"default\"]\n7:I[72569,[\"4732\",\"static/chunks/4732-76a574510722b2c3.js\",\"7177\",\"static/chunks/app/layout-341400810c81f67e.js\"],\"GoogleAnalytics\"]\n8:I[31872,[],\"OutletBoundary\"]\n9:\"$Sreact.suspense\"\nc:I[31872,[],\"ViewportBoundary\"]\ne:I[31872,[],\"MetadataBoundary\"]\n10:I[57567,[],\"default\",1]\n:HL[\"/_next/static/media/22a5144ee8d83bca-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/media/7d4881bb7e1bf84d-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/css/b496025c9cd768cc.css\",\"style\"]\n:HL[\"/_next/static/css/5c40e58137a11306.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/b496025c9cd768cc.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/5c40e58137a11306.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"scroll-smooth scroll-pt-20\",\"suppressHydrationWarning\":true,\"children\":[\"$\",\"body\",null,{\"className\":\"__variable_246ccd __variable_c29908 antialiased\",\"children\":[[\"$\",\"$L2\",null,{\"id\":\"theme-init\",\"html\":\"(function(){try{var t=localStorage.getItem(\\\"app_theme_v2\\\")||\\\"dark\\\";document.documentElement.classList.add(t);}catch(e){document.documentElement.classList.add(\\\"dark\\\");}})();\"}],[\"$\",\"$L2\",null,{\"id\":\"safe-area-bridge\",\"html\":\"window.handleSafeAreaInset=function(top,bottom){try{if(top\u0026\u0026top\u003e0)document.documentElement.style.setProperty(\\\"--pl-top\\\",top+\\\"px\\\");}catch(e){}};\"}],[\"$\",\"$L2\",null,{\"id\":\"sw-register\",\"html\":\"if('serviceWorker' in navigator){window.addEventListener('load',function(){navigator.serviceWorker.register('/sw.js').catch(function(e){console.log('SW registration failed:',e);});});}\"}],[\"$\",\"$L3\",null,{\"children\":[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}],[\"$\",\"$L6\",null,{}],[\"$\",\"$L7\",null,{\"gaId\":\"G-8XXG61NY56\"}]]}]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",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\":{\"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.\"}]}]]}]}]],null,[\"$\",\"$L8\",null,{\"children\":[\"$\",\"$9\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@a\"}]}]]}],{},null,false,null]},null,false,\"$@b\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$Lc\",null,{\"children\":\"$Ld\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Le\",null,{\"children\":[\"$\",\"$9\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lf\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$10\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"AUHtJgkYALYyNwHop9pgT\"}\n"])</script><script>self.__next_f.push([1,"11:[]\nb:\"$W11\"\n"])</script><script>self.__next_f.push([1,"d:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, interactive-widget=resizes-content\"}],[\"$\",\"meta\",\"2\",{\"name\":\"theme-color\",\"content\":\"#121212\"}]]\n"])</script><script>self.__next_f.push([1,"12:I[12569,[],\"IconMark\"]\na:null\nf:[[\"$\",\"title\",\"0\",{\"children\":\"9Remote — Remote Everything, Everywhere\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Remote IDE, desktop, files, emulator \u0026 vibe coding on PC, Web, iPad, and Mobile. Ultra-low latency WebRTC P2P dev suite.\"}],[\"$\",\"meta\",\"2\",{\"name\":\"application-name\",\"content\":\"9Remote Terminal\"}],[\"$\",\"link\",\"3\",{\"rel\":\"manifest\",\"href\":\"/manifest.json\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"meta\",\"4\",{\"name\":\"mobile-web-app-capable\",\"content\":\"yes\"}],[\"$\",\"meta\",\"5\",{\"name\":\"apple-mobile-web-app-title\",\"content\":\"9Remote\"}],[\"$\",\"meta\",\"6\",{\"name\":\"apple-mobile-web-app-status-bar-style\",\"content\":\"black-translucent\"}],[\"$\",\"link\",\"7\",{\"rel\":\"icon\",\"href\":\"/favicon.ico\",\"sizes\":\"any\"}],[\"$\",\"link\",\"8\",{\"rel\":\"icon\",\"href\":\"/icon-192.png\",\"sizes\":\"192x192\",\"type\":\"image/png\"}],[\"$\",\"link\",\"9\",{\"rel\":\"icon\",\"href\":\"/icon-512.png\",\"sizes\":\"512x512\",\"type\":\"image/png\"}],[\"$\",\"link\",\"10\",{\"rel\":\"apple-touch-icon\",\"href\":\"/icon-192.png\",\"sizes\":\"192x192\",\"type\":\"image/png\"}],[\"$\",\"$L12\",\"11\",{}]]\n"])</script></body></html>
1
+ <!DOCTYPE html><html lang="en" class="scroll-smooth scroll-pt-20"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, interactive-widget=resizes-content"/><link rel="preload" href="/_next/static/media/22a5144ee8d83bca-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="preload" href="/_next/static/media/7d4881bb7e1bf84d-s.p.woff2" as="font" crossorigin="" type="font/woff2"/><link rel="stylesheet" href="/_next/static/css/b496025c9cd768cc.css" data-precedence="next"/><link rel="stylesheet" href="/_next/static/css/5c40e58137a11306.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/_next/static/chunks/webpack-c971919003362f96.js"/><script src="/_next/static/chunks/c7879cf7-0d16fce1674078f9.js" async=""></script><script src="/_next/static/chunks/5158-267908d069475cdc.js" async=""></script><script src="/_next/static/chunks/main-app-1831d4f902c3fcb9.js" async=""></script><script src="/_next/static/chunks/4732-76a574510722b2c3.js" async=""></script><script src="/_next/static/chunks/app/layout-341400810c81f67e.js" async=""></script><link rel="preload" href="https://www.googletagmanager.com/gtag/js?id=G-8XXG61NY56" as="script"/><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><title>404: This page could not be found.</title><meta name="theme-color" content="#121212"/><title>9Remote — Remote Everything, Everywhere</title><meta name="description" content="Remote IDE, desktop, files, emulator &amp; vibe coding on PC, Web, iPad, and Mobile. Ultra-low latency WebRTC P2P dev suite."/><meta name="application-name" content="9Remote Terminal"/><link rel="manifest" href="/manifest.json"/><meta name="mobile-web-app-capable" content="yes"/><meta name="apple-mobile-web-app-title" content="9Remote"/><meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/><link rel="icon" href="/favicon.ico" sizes="any"/><link rel="icon" href="/icon-192.png" sizes="192x192" type="image/png"/><link rel="icon" href="/icon-512.png" sizes="512x512" type="image/png"/><link rel="apple-touch-icon" href="/icon-192.png" sizes="192x192" type="image/png"/><script src="/_next/static/chunks/polyfills-42372ed130431b0a.js" noModule=""></script></head><body class="__variable_246ccd __variable_c29908 antialiased"><div hidden=""><!--$--><!--/$--></div><script id="theme-init">(function(){try{var t=localStorage.getItem("app_theme_v2")||"dark";document.documentElement.classList.add(t);}catch(e){document.documentElement.classList.add("dark");}})();</script><script id="safe-area-bridge">window.handleSafeAreaInset=function(top,bottom){try{if(top&&top>0)document.documentElement.style.setProperty("--pl-top",top+"px");}catch(e){}};</script><script id="sw-register">if('serviceWorker' in navigator){window.addEventListener('load',function(){navigator.serviceWorker.register('/sw.js').catch(function(e){console.log('SW registration failed:',e);});});}</script><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/webpack-c971919003362f96.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[59584,[\"4732\",\"static/chunks/4732-76a574510722b2c3.js\",\"7177\",\"static/chunks/app/layout-341400810c81f67e.js\"],\"default\"]\n3:I[44976,[\"4732\",\"static/chunks/4732-76a574510722b2c3.js\",\"7177\",\"static/chunks/app/layout-341400810c81f67e.js\"],\"ThemeProvider\"]\n4:I[91133,[],\"\"]\n5:I[4297,[],\"\"]\n6:I[95223,[\"4732\",\"static/chunks/4732-76a574510722b2c3.js\",\"7177\",\"static/chunks/app/layout-341400810c81f67e.js\"],\"default\"]\n7:I[72569,[\"4732\",\"static/chunks/4732-76a574510722b2c3.js\",\"7177\",\"static/chunks/app/layout-341400810c81f67e.js\"],\"GoogleAnalytics\"]\n8:I[31872,[],\"OutletBoundary\"]\n9:\"$Sreact.suspense\"\nc:I[31872,[],\"ViewportBoundary\"]\ne:I[31872,[],\"MetadataBoundary\"]\n10:I[57567,[],\"default\",1]\n:HL[\"/_next/static/media/22a5144ee8d83bca-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/media/7d4881bb7e1bf84d-s.p.woff2\",\"font\",{\"crossOrigin\":\"\",\"type\":\"font/woff2\"}]\n:HL[\"/_next/static/css/b496025c9cd768cc.css\",\"style\"]\n:HL[\"/_next/static/css/5c40e58137a11306.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/b496025c9cd768cc.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"link\",\"1\",{\"rel\":\"stylesheet\",\"href\":\"/_next/static/css/5c40e58137a11306.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"className\":\"scroll-smooth scroll-pt-20\",\"suppressHydrationWarning\":true,\"children\":[\"$\",\"body\",null,{\"className\":\"__variable_246ccd __variable_c29908 antialiased\",\"children\":[[\"$\",\"$L2\",null,{\"id\":\"theme-init\",\"html\":\"(function(){try{var t=localStorage.getItem(\\\"app_theme_v2\\\")||\\\"dark\\\";document.documentElement.classList.add(t);}catch(e){document.documentElement.classList.add(\\\"dark\\\");}})();\"}],[\"$\",\"$L2\",null,{\"id\":\"safe-area-bridge\",\"html\":\"window.handleSafeAreaInset=function(top,bottom){try{if(top\u0026\u0026top\u003e0)document.documentElement.style.setProperty(\\\"--pl-top\\\",top+\\\"px\\\");}catch(e){}};\"}],[\"$\",\"$L2\",null,{\"id\":\"sw-register\",\"html\":\"if('serviceWorker' in navigator){window.addEventListener('load',function(){navigator.serviceWorker.register('/sw.js').catch(function(e){console.log('SW registration failed:',e);});});}\"}],[\"$\",\"$L3\",null,{\"children\":[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}],[\"$\",\"$L6\",null,{}],[\"$\",\"$L7\",null,{\"gaId\":\"G-8XXG61NY56\"}]]}]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L4\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L5\",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\":{\"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.\"}]}]]}]}]],null,[\"$\",\"$L8\",null,{\"children\":[\"$\",\"$9\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@a\"}]}]]}],{},null,false,null]},null,false,\"$@b\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$Lc\",null,{\"children\":\"$Ld\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$Le\",null,{\"children\":[\"$\",\"$9\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lf\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$10\",[]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"d4cJ0fUEgzqmRy9HsvvEu\"}\n"])</script><script>self.__next_f.push([1,"11:[]\nb:\"$W11\"\n"])</script><script>self.__next_f.push([1,"d:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, interactive-widget=resizes-content\"}],[\"$\",\"meta\",\"2\",{\"name\":\"theme-color\",\"content\":\"#121212\"}]]\n"])</script><script>self.__next_f.push([1,"12:I[12569,[],\"IconMark\"]\na:null\nf:[[\"$\",\"title\",\"0\",{\"children\":\"9Remote — Remote Everything, Everywhere\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Remote IDE, desktop, files, emulator \u0026 vibe coding on PC, Web, iPad, and Mobile. Ultra-low latency WebRTC P2P dev suite.\"}],[\"$\",\"meta\",\"2\",{\"name\":\"application-name\",\"content\":\"9Remote Terminal\"}],[\"$\",\"link\",\"3\",{\"rel\":\"manifest\",\"href\":\"/manifest.json\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"meta\",\"4\",{\"name\":\"mobile-web-app-capable\",\"content\":\"yes\"}],[\"$\",\"meta\",\"5\",{\"name\":\"apple-mobile-web-app-title\",\"content\":\"9Remote\"}],[\"$\",\"meta\",\"6\",{\"name\":\"apple-mobile-web-app-status-bar-style\",\"content\":\"black-translucent\"}],[\"$\",\"link\",\"7\",{\"rel\":\"icon\",\"href\":\"/favicon.ico\",\"sizes\":\"any\"}],[\"$\",\"link\",\"8\",{\"rel\":\"icon\",\"href\":\"/icon-192.png\",\"sizes\":\"192x192\",\"type\":\"image/png\"}],[\"$\",\"link\",\"9\",{\"rel\":\"icon\",\"href\":\"/icon-512.png\",\"sizes\":\"512x512\",\"type\":\"image/png\"}],[\"$\",\"link\",\"10\",{\"rel\":\"apple-touch-icon\",\"href\":\"/icon-192.png\",\"sizes\":\"192x192\",\"type\":\"image/png\"}],[\"$\",\"$L12\",\"11\",{}]]\n"])</script></body></html>
@@ -1,9 +1,9 @@
1
1
  1:"$Sreact.fragment"
2
2
  2:I[1076,[],"ClientPageRoot"]
3
- 3:I[91556,["9568","static/chunks/9568-0bfadca4fcb105aa.js","8922","static/chunks/8922-a9cee4a104876005.js","8974","static/chunks/app/page-1cf39061b48db156.js"],"default"]
3
+ 3:I[91556,["9568","static/chunks/9568-0bfadca4fcb105aa.js","8922","static/chunks/8922-a9cee4a104876005.js","8974","static/chunks/app/page-864dbd193d5f7261.js"],"default"]
4
4
  6:I[31872,[],"OutletBoundary"]
5
5
  7:"$Sreact.suspense"
6
- 0:{"rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],null,["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"AUHtJgkYALYyNwHop9pgT"}
6
+ 0:{"rsc":["$","$1","c",{"children":[["$","$L2",null,{"Component":"$3","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@4","$@5"]}}],null,["$","$L6",null,{"children":["$","$7",null,{"name":"Next.MetadataOutlet","children":"$@8"}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"d4cJ0fUEgzqmRy9HsvvEu"}
7
7
  4:{}
8
8
  5:"$0:rsc:props:children:0:props:serverProvidedParams:params"
9
9
  8:null
@@ -6,7 +6,7 @@
6
6
  6:I[95223,["4732","static/chunks/4732-76a574510722b2c3.js","7177","static/chunks/app/layout-341400810c81f67e.js"],"default"]
7
7
  7:I[72569,["4732","static/chunks/4732-76a574510722b2c3.js","7177","static/chunks/app/layout-341400810c81f67e.js"],"GoogleAnalytics"]
8
8
  8:I[1076,[],"ClientPageRoot"]
9
- 9:I[91556,["9568","static/chunks/9568-0bfadca4fcb105aa.js","8922","static/chunks/8922-a9cee4a104876005.js","8974","static/chunks/app/page-1cf39061b48db156.js"],"default"]
9
+ 9:I[91556,["9568","static/chunks/9568-0bfadca4fcb105aa.js","8922","static/chunks/8922-a9cee4a104876005.js","8974","static/chunks/app/page-864dbd193d5f7261.js"],"default"]
10
10
  c:I[31872,[],"OutletBoundary"]
11
11
  d:"$Sreact.suspense"
12
12
  f:I[31872,[],"ViewportBoundary"]
@@ -16,7 +16,7 @@ f:I[31872,[],"ViewportBoundary"]
16
16
  :HL["/_next/static/media/7d4881bb7e1bf84d-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
17
17
  :HL["/_next/static/css/b496025c9cd768cc.css","style"]
18
18
  :HL["/_next/static/css/5c40e58137a11306.css","style"]
19
- 0:{"P":null,"c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/b496025c9cd768cc.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/5c40e58137a11306.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","className":"scroll-smooth scroll-pt-20","suppressHydrationWarning":true,"children":["$","body",null,{"className":"__variable_246ccd __variable_c29908 antialiased","children":[["$","$L2",null,{"id":"theme-init","html":"(function(){try{var t=localStorage.getItem(\"app_theme_v2\")||\"dark\";document.documentElement.classList.add(t);}catch(e){document.documentElement.classList.add(\"dark\");}})();"}],["$","$L2",null,{"id":"safe-area-bridge","html":"window.handleSafeAreaInset=function(top,bottom){try{if(top&&top>0)document.documentElement.style.setProperty(\"--pl-top\",top+\"px\");}catch(e){}};"}],["$","$L2",null,{"id":"sw-register","html":"if('serviceWorker' in navigator){window.addEventListener('load',function(){navigator.serviceWorker.register('/sw.js').catch(function(e){console.log('SW registration failed:',e);});});}"}],["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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"}]}],["$","$L6",null,{}],["$","$L7",null,{"gaId":"G-8XXG61NY56"}]]}]}]]}],{"children":[["$","$1","c",{"children":[["$","$L8",null,{"Component":"$9","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@a","$@b"]}}],null,["$","$Lc",null,{"children":["$","$d",null,{"name":"Next.MetadataOutlet","children":"$@e"}]}]]}],{},null,false,null]},null,false,null],["$","$1","h",{"children":[null,["$","$Lf",null,{"children":"$L10"}],["$","div",null,{"hidden":true,"children":["$","$L11",null,{"children":["$","$d",null,{"name":"Next.Metadata","children":"$L12"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$13",[]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"AUHtJgkYALYyNwHop9pgT"}
19
+ 0:{"P":null,"c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/b496025c9cd768cc.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/5c40e58137a11306.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","className":"scroll-smooth scroll-pt-20","suppressHydrationWarning":true,"children":["$","body",null,{"className":"__variable_246ccd __variable_c29908 antialiased","children":[["$","$L2",null,{"id":"theme-init","html":"(function(){try{var t=localStorage.getItem(\"app_theme_v2\")||\"dark\";document.documentElement.classList.add(t);}catch(e){document.documentElement.classList.add(\"dark\");}})();"}],["$","$L2",null,{"id":"safe-area-bridge","html":"window.handleSafeAreaInset=function(top,bottom){try{if(top&&top>0)document.documentElement.style.setProperty(\"--pl-top\",top+\"px\");}catch(e){}};"}],["$","$L2",null,{"id":"sw-register","html":"if('serviceWorker' in navigator){window.addEventListener('load',function(){navigator.serviceWorker.register('/sw.js').catch(function(e){console.log('SW registration failed:',e);});});}"}],["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",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"}]}],["$","$L6",null,{}],["$","$L7",null,{"gaId":"G-8XXG61NY56"}]]}]}]]}],{"children":[["$","$1","c",{"children":[["$","$L8",null,{"Component":"$9","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@a","$@b"]}}],null,["$","$Lc",null,{"children":["$","$d",null,{"name":"Next.MetadataOutlet","children":"$@e"}]}]]}],{},null,false,null]},null,false,null],["$","$1","h",{"children":[null,["$","$Lf",null,{"children":"$L10"}],["$","div",null,{"hidden":true,"children":["$","$L11",null,{"children":["$","$d",null,{"name":"Next.Metadata","children":"$L12"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$13",[]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"d4cJ0fUEgzqmRy9HsvvEu"}
20
20
  a:{}
21
21
  b:"$0:f:0:1:1:children:0:props:children:0:props:serverProvidedParams:params"
22
22
  10:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, interactive-widget=resizes-content"}],["$","meta","2",{"name":"theme-color","content":"#121212"}]]
@@ -3,4 +3,4 @@
3
3
  3:I[31872,[],"MetadataBoundary"]
4
4
  4:"$Sreact.suspense"
5
5
  5:I[12569,[],"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, maximum-scale=1, user-scalable=no, interactive-widget=resizes-content"}],["$","meta","2",{"name":"theme-color","content":"#121212"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"9Remote — Remote Everything, Everywhere"}],["$","meta","1",{"name":"description","content":"Remote IDE, desktop, files, emulator & vibe coding on PC, Web, iPad, and Mobile. Ultra-low latency WebRTC P2P dev suite."}],["$","meta","2",{"name":"application-name","content":"9Remote Terminal"}],["$","link","3",{"rel":"manifest","href":"/manifest.json"}],["$","meta","4",{"name":"mobile-web-app-capable","content":"yes"}],["$","meta","5",{"name":"apple-mobile-web-app-title","content":"9Remote"}],["$","meta","6",{"name":"apple-mobile-web-app-status-bar-style","content":"black-translucent"}],["$","link","7",{"rel":"icon","href":"/favicon.ico","sizes":"any"}],["$","link","8",{"rel":"icon","href":"/icon-192.png","sizes":"192x192","type":"image/png"}],["$","link","9",{"rel":"icon","href":"/icon-512.png","sizes":"512x512","type":"image/png"}],["$","link","10",{"rel":"apple-touch-icon","href":"/icon-192.png","sizes":"192x192","type":"image/png"}],["$","$L5","11",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"AUHtJgkYALYyNwHop9pgT"}
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, maximum-scale=1, user-scalable=no, interactive-widget=resizes-content"}],["$","meta","2",{"name":"theme-color","content":"#121212"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"9Remote — Remote Everything, Everywhere"}],["$","meta","1",{"name":"description","content":"Remote IDE, desktop, files, emulator & vibe coding on PC, Web, iPad, and Mobile. Ultra-low latency WebRTC P2P dev suite."}],["$","meta","2",{"name":"application-name","content":"9Remote Terminal"}],["$","link","3",{"rel":"manifest","href":"/manifest.json"}],["$","meta","4",{"name":"mobile-web-app-capable","content":"yes"}],["$","meta","5",{"name":"apple-mobile-web-app-title","content":"9Remote"}],["$","meta","6",{"name":"apple-mobile-web-app-status-bar-style","content":"black-translucent"}],["$","link","7",{"rel":"icon","href":"/favicon.ico","sizes":"any"}],["$","link","8",{"rel":"icon","href":"/icon-192.png","sizes":"192x192","type":"image/png"}],["$","link","9",{"rel":"icon","href":"/icon-512.png","sizes":"512x512","type":"image/png"}],["$","link","10",{"rel":"apple-touch-icon","href":"/icon-192.png","sizes":"192x192","type":"image/png"}],["$","$L5","11",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"d4cJ0fUEgzqmRy9HsvvEu"}
@@ -7,4 +7,4 @@
7
7
  7:I[72569,["4732","static/chunks/4732-76a574510722b2c3.js","7177","static/chunks/app/layout-341400810c81f67e.js"],"GoogleAnalytics"]
8
8
  :HL["/_next/static/css/b496025c9cd768cc.css","style"]
9
9
  :HL["/_next/static/css/5c40e58137a11306.css","style"]
10
- 0:{"rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/b496025c9cd768cc.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/5c40e58137a11306.css","precedence":"next"}]],["$","html",null,{"lang":"en","className":"scroll-smooth scroll-pt-20","suppressHydrationWarning":true,"children":["$","body",null,{"className":"__variable_246ccd __variable_c29908 antialiased","children":[["$","$L2",null,{"id":"theme-init","html":"(function(){try{var t=localStorage.getItem(\"app_theme_v2\")||\"dark\";document.documentElement.classList.add(t);}catch(e){document.documentElement.classList.add(\"dark\");}})();"}],["$","$L2",null,{"id":"safe-area-bridge","html":"window.handleSafeAreaInset=function(top,bottom){try{if(top&&top>0)document.documentElement.style.setProperty(\"--pl-top\",top+\"px\");}catch(e){}};"}],["$","$L2",null,{"id":"sw-register","html":"if('serviceWorker' in navigator){window.addEventListener('load',function(){navigator.serviceWorker.register('/sw.js').catch(function(e){console.log('SW registration failed:',e);});});}"}],["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","template":["$","$L5",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."}]}]]}]}]],[]]}]}],["$","$L6",null,{}],["$","$L7",null,{"gaId":"G-8XXG61NY56"}]]}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"AUHtJgkYALYyNwHop9pgT"}
10
+ 0:{"rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/b496025c9cd768cc.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/_next/static/css/5c40e58137a11306.css","precedence":"next"}]],["$","html",null,{"lang":"en","className":"scroll-smooth scroll-pt-20","suppressHydrationWarning":true,"children":["$","body",null,{"className":"__variable_246ccd __variable_c29908 antialiased","children":[["$","$L2",null,{"id":"theme-init","html":"(function(){try{var t=localStorage.getItem(\"app_theme_v2\")||\"dark\";document.documentElement.classList.add(t);}catch(e){document.documentElement.classList.add(\"dark\");}})();"}],["$","$L2",null,{"id":"safe-area-bridge","html":"window.handleSafeAreaInset=function(top,bottom){try{if(top&&top>0)document.documentElement.style.setProperty(\"--pl-top\",top+\"px\");}catch(e){}};"}],["$","$L2",null,{"id":"sw-register","html":"if('serviceWorker' in navigator){window.addEventListener('load',function(){navigator.serviceWorker.register('/sw.js').catch(function(e){console.log('SW registration failed:',e);});});}"}],["$","$L3",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","template":["$","$L5",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."}]}]]}]}]],[]]}]}],["$","$L6",null,{}],["$","$L7",null,{"gaId":"G-8XXG61NY56"}]]}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"d4cJ0fUEgzqmRy9HsvvEu"}
@@ -2,4 +2,4 @@
2
2
  :HL["/_next/static/media/7d4881bb7e1bf84d-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}]
3
3
  :HL["/_next/static/css/b496025c9cd768cc.css","style"]
4
4
  :HL["/_next/static/css/5c40e58137a11306.css","style"]
5
- 0:{"tree":{"name":"","param":null,"prefetchHints":16,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":0,"slots":null}}},"staleTime":300,"buildId":"AUHtJgkYALYyNwHop9pgT"}
5
+ 0:{"tree":{"name":"","param":null,"prefetchHints":16,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":0,"slots":null}}},"staleTime":300,"buildId":"d4cJ0fUEgzqmRy9HsvvEu"}
@@ -1 +1 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4520],{45136:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>W});var a=s(73365),n=s(1521),r=s(29717),l=s(20464),i=s(4018),o=s(2163),c=s(59893),d=s(64683),x=s(80186),m=s(78762);function u({isOpen:e,onClose:t,onScan:r}){let{t:l}=(0,m.s)(),i=(0,n.useRef)(null),o=(0,n.useRef)(null),c=(0,n.useRef)(null),p=(0,n.useRef)(null),h=(0,n.useRef)(null),[g,b]=(0,n.useState)(""),[f,j]=(0,n.useState)(""),y=(0,n.useCallback)(async e=>{if(o.current)try{await o.current.stop()}catch(e){}j("detected"),await new Promise(e=>setTimeout(e,300)),j("authenticating"),await r(e)||(j(""),h.current?.())},[r]),v=(0,n.useCallback)(async()=>{if(!c.current){let e=await Promise.all([s.e(3446),s.e(6075)]).then(s.bind(s,16075)).catch(()=>null);if(!e)return void b(l("login.qrLibFail"));c.current=e.Html5Qrcode}let e=document.getElementById("qr-reader");if(!e)return void b(l("login.qrInitFail"));try{e.innerHTML="";let t=new c.current("qr-reader");o.current=t,await t.start({facingMode:"environment"},{fps:10,qrbox:{width:250,height:250}},e=>{p.current?.(e)},()=>{})}catch(t){let e=t.toString();e.includes("NotAllowedError")?b(l("login.qrCamDenied")):e.includes("NotFoundError")?b(l("login.qrNoCamera")):e.includes("NotReadableError")?b(l("login.qrCamBusy")):b(l("login.qrCamError"))}},[l]),w=(0,n.useCallback)(async()=>{if(o.current){try{await o.current.stop()}catch(e){}o.current=null}b(""),j(""),t()},[t]);return((0,n.useEffect)(()=>{p.current=y},[y]),(0,n.useEffect)(()=>{if(!e)return;let t=!1;h.current=async()=>{o.current=null,await new Promise(e=>setTimeout(e,400)),t||v()};let s=setTimeout(()=>{t||v()},200);return()=>{if(t=!0,clearTimeout(s),h.current=null,o.current){try{o.current.stop()}catch(e){}o.current=null}}},[e,v]),e)?(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/80 backdrop-blur-sm",children:(0,a.jsxs)("div",{className:"relative card-elev max-w-md w-full mx-4 overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between p-4 border-b border-border",children:[(0,a.jsx)("h2",{className:"text-xl font-bold text-text",children:l("login.qrScanTitle")}),(0,a.jsx)("button",{onClick:w,className:"text-text-muted hover:text-text transition-colors p-1",children:(0,a.jsx)(d.X,{size:24})})]}),(0,a.jsx)("div",{className:"relative bg-black",children:(0,a.jsx)("div",{id:"qr-reader",ref:i,className:"w-full",style:{minHeight:"300px"}})}),(0,a.jsxs)("div",{className:"p-4",children:[g?(0,a.jsxs)("div",{className:"flex items-start gap-2 p-3 bg-red-500/10 rounded-brand text-red-400",children:[(0,a.jsx)(d.RI,{size:20,className:"flex-shrink-0 mt-0.5"}),(0,a.jsx)("p",{className:"text-sm",children:g})]}):"detected"===f?(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2 p-3 bg-green-500/10 rounded-brand text-green-400",children:[(0,a.jsx)(d.vW,{size:22}),(0,a.jsx)("p",{className:"text-sm font-medium",children:l("login.qrDetected")})]}):"authenticating"===f?(0,a.jsx)("div",{className:"flex items-center justify-center gap-2 p-3 bg-brand-500/10 rounded-brand text-brand-400",children:(0,a.jsx)("p",{className:"text-sm font-medium",children:l("login.qrAuthenticating")})}):(0,a.jsx)("p",{className:"text-sm text-text-muted text-center",children:l("login.qrHint")}),(0,a.jsx)(x.A,{variant:"secondary",onClick:w,disabled:"authenticating"===f,className:"w-full mt-4",children:"authenticating"===f?l("login.qrPleaseWait"):l("common.cancel")})]})]})}):null}var p=s(45111),h=s(42174),g=s(30240),b=s(8910),f=s(52345),j=s(18057);function y({className:e="",showLabel:t=!0}){let{locale:s}=(0,m.s)(),[r,l]=(0,n.useState)(!1),i=f.dI.find(e=>e.code===s)||f.dI[0];return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("button",{onClick:()=>{(0,b.e)(),l(!0)},className:`flex items-center gap-1.5 bg-surface-2 hover:bg-surface-3 rounded-brand text-text text-sm px-2 py-1 transition-all duration-150 ease-out active:scale-[0.96] ${e}`,title:i.label,children:[(0,a.jsx)("img",{src:`https://flagcdn.com/w40/${i.country}.png`,alt:i.label,className:"w-[17px] h-[12px] object-cover rounded-[2px]",loading:"lazy"}),t&&(0,a.jsx)("span",{className:"hidden sm:inline",children:i.code.toUpperCase()})]}),(0,a.jsx)(j.A,{isOpen:r,onClose:()=>l(!1)})]})}var v=s(90753),w=s(38415),N=s(23346);let k=null;async function C(){k||(k=N.Ay.ready),await k}async function S(e,t){await C();let s=N.Ay.from_base64(e,N.Ay.base64_variants.ORIGINAL),a=N.Ay.from_string(t),n=N.Ay.crypto_box_seal(a,s);return N.Ay.to_base64(n,N.Ay.base64_variants.ORIGINAL)}function A(e=24){let t=new Uint8Array(e);return crypto.getRandomValues(t),Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}let _="9remote_github_token",L="9remote:githubTokenChange";async function z(e,t,s={}){let a=await fetch(`${w.pe}${t}`,{...s,headers:{...{Authorization:`Bearer ${e}`,Accept:"application/vnd.github+json","X-GitHub-Api-Version":"2022-11-28"},...s.headers||{}}});if(!a.ok){let e=await a.text().catch(()=>"");throw Error(`GitHub ${a.status}: ${e||a.statusText}`)}return 204===a.status?null:a.json()}function K(){let[e,t]=(0,n.useState)(()=>localStorage.getItem(_)||""),[s,a]=(0,n.useState)(!1),[r,l]=(0,n.useState)(null);(0,n.useEffect)(()=>{let e=()=>{t(localStorage.getItem(_)||"")};return window.addEventListener(L,e),window.addEventListener("storage",e),()=>{window.removeEventListener(L,e),window.removeEventListener("storage",e)}},[!0]);let i=(0,n.useCallback)(e=>{t(e),e?localStorage.setItem(_,e):localStorage.removeItem(_),window.dispatchEvent(new Event(L))},[!0]),o=(0,n.useCallback)(()=>{i("")},[i]),c=(0,n.useCallback)(async(t=e)=>z(t,w.no.user),[e]),d=(0,n.useCallback)(async()=>{a(!0),l(null);try{return(await z(e,w.no.codespaces)).codespaces||[]}catch(e){return l(e.message),[]}finally{a(!1)}},[e]),x=(0,n.useCallback)(async t=>z(e,w.no.codespaceByName(t)),[e]),m=(0,n.useCallback)(async t=>z(e,w.no.startCodespace(t),{method:"POST"}),[e]),u=(0,n.useCallback)(async()=>z(e,w.no.userReposList),[e]),p=(0,n.useCallback)(async(t,s)=>z(e,w.no.createCodespaceForRepo(t,s),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})}),[e]),h=(0,n.useCallback)(async(t,s)=>{let a=await z(e,w.no.codespaceSecretsPublicKey),n=await S(a.key,s);await z(e,w.no.codespaceSecret(w.Gf),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({encrypted_value:n,key_id:a.key_id,selected_repository_ids:[t]})})},[e]),g=(0,n.useCallback)(async(t,s)=>{let a=w.no.repoContents(t,s,w.Hu),n=!1;try{await z(e,a),n=!0}catch{}if(n)return{existed:!0};let r=JSON.stringify(w.cu,null,2);return await z(e,a,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:"Add 9remote devcontainer",content:btoa(unescape(encodeURIComponent(r)))})}),{existed:!1}},[e]),b=(0,n.useCallback)(async(e,t)=>{for(let s=0;s<w.ij;s++){let s=await x(e);if(t?.(s.state),s.state===w.Gi.available)return s;await new Promise(e=>setTimeout(e,w.Nn))}throw Error("Codespace start timeout")},[x]);return{token:e,setToken:i,clearToken:o,loading:s,error:r,getUser:c,listCodespaces:d,getCodespace:x,startCodespace:m,waitUntilAvailable:b,listRepos:u,createCodespace:p,ensureDevcontainer:g,setApiKeySecret:h,generateApiKey:A}}function I({isOpen:e,onClose:t,onCreated:s}){let{listRepos:r,createCodespace:l,ensureDevcontainer:i,setApiKeySecret:o,generateApiKey:c,error:m}=K(),[u,h]=(0,n.useState)([]),[g,b]=(0,n.useState)(!1),[f,j]=(0,n.useState)(null),[y,v]=(0,n.useState)(""),[w,N]=(0,n.useState)(null),[k,C]=(0,n.useState)("");(0,n.useEffect)(()=>{e&&(N(null),b(!0),r().then(e=>h(Array.isArray(e)?e:[])).catch(e=>N(e.message)).finally(()=>b(!1)))},[e,r]),(0,n.useEffect)(()=>{if(!e||f)return;let s=e=>{"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),t?.())};return window.addEventListener("keydown",s,!0),()=>window.removeEventListener("keydown",s,!0)},[e,f,t]);let S=(0,n.useMemo)(()=>{let e=y.trim().toLowerCase();return e?u.filter(t=>t.full_name.toLowerCase().includes(e)):u},[u,y]),A=async e=>{j(e.full_name),N(null),C("Generating API key...");try{let t=c();C("Setting codespace secret..."),await o(e.id,t),C("Setting up devcontainer..."),await i(e.owner.login,e.name),C("Creating codespace...");let a=await l(e.owner.login,e.name);s({codespace:a,apiKey:t})}catch(e){N(e.message)}finally{j(null),C("")}};return e?(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4",onClick:t,children:(0,a.jsxs)("div",{className:"card-elev p-6 max-w-md w-full max-h-[80dvh] flex flex-col border border-border",onClick:e=>e.stopPropagation(),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsx)("h3",{className:"text-lg font-bold text-text",children:"Select repository"}),(0,a.jsx)("button",{onClick:t,className:"p-1 text-text-muted hover:text-text",children:(0,a.jsx)(d.X,{size:20})})]}),(0,a.jsxs)("div",{className:"relative mb-3",children:[(0,a.jsx)(d.vj,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-muted"}),(0,a.jsx)("input",{type:"text",value:y,onChange:e=>v(e.target.value),placeholder:"Search repos...",className:"w-full pl-9 pr-3 py-2 bg-surface-2 rounded-brand text-text placeholder-text-muted focus:outline-none focus:ring-2 focus:ring-brand-500/40 text-sm"})]}),(w||m)&&(0,a.jsxs)("div",{className:"flex items-start gap-2 mb-3 p-2 bg-danger/10 rounded-brand text-xs text-danger",children:[(0,a.jsx)(d.RI,{size:14,className:"flex-shrink-0 mt-0.5"}),(0,a.jsx)("span",{className:"break-words",children:w||m})]}),(0,a.jsx)("div",{className:"flex-1 overflow-auto space-y-1",children:g?(0,a.jsx)(p.A,{text:"Loading repos..."}):0===S.length?(0,a.jsx)("div",{className:"text-center py-6 text-text-muted text-sm",children:"No repos"}):S.map(e=>{let t=f===e.full_name;return(0,a.jsxs)("div",{className:"p-2 bg-surface-2 hover:bg-surface-3 rounded-brand transition-colors",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"text-sm text-text font-medium truncate",title:e.full_name,children:e.full_name}),e.private&&(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"private"})]}),(0,a.jsxs)(x.A,{variant:"primary",onClick:()=>A(e),disabled:!!f,loading:t,className:"!py-1 !px-2 text-xs",children:[(0,a.jsx)(d.FW,{size:12}),"Create"]})]}),t&&k&&(0,a.jsx)("div",{className:"mt-1 text-xs text-text-muted",children:k})]},e.id)})})]})}):null}let E="9remote_codespace_keys";function R(){try{return JSON.parse(localStorage.getItem(E)||"{}")}catch{return{}}}function P({onConnect:e,onLogout:t}){let{listCodespaces:s,startCodespace:r,waitUntilAvailable:l,loading:i,error:o,getUser:c}=K(),[m,u]=(0,n.useState)([]),[h,g]=(0,n.useState)(null),[b,f]=(0,n.useState)(null),[j,y]=(0,n.useState)(""),[v,N]=(0,n.useState)(!1),k=(0,n.useCallback)(async()=>{try{let e=await c();g(e)}catch{}u(await s())},[c,s]);(0,n.useEffect)(()=>{k()},[k]);let C=async t=>{var s;let a=(s=t.name,R()[s]||null);if(!a){y("No saved key for this codespace. Recreate it from web to enable auto-connect."),f(t.name),setTimeout(()=>{f(null),y("")},4e3);return}f(t.name),y("");try{let s=t;t.state!==w.Gi.available&&(y("Starting codespace..."),await r(t.name),s=await l(t.name,e=>{y(`State: ${e}`)})),e(s,a)}catch(e){y(`Error: ${e.message}`)}finally{f(null)}};return(0,a.jsxs)("div",{className:"card-elev p-8 max-w-md w-full border border-border",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-6",children:[(0,a.jsx)("div",{className:"p-2 bg-brand-500/10 rounded-brand",children:(0,a.jsx)(d.Cp,{className:"text-brand-500",size:24})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("h2",{className:"text-xl font-bold text-text",children:"Codespaces"}),h&&(0,a.jsxs)("p",{className:"text-sm text-text-muted truncate",children:["@",h.login]})]}),(0,a.jsx)("button",{onClick:()=>N(!0),className:"p-2 text-text-muted hover:text-text hover:bg-surface-2 rounded-brand transition-colors",title:"New codespace",children:(0,a.jsx)(d.FW,{size:18})}),(0,a.jsx)("button",{onClick:k,disabled:i,className:"p-2 text-text-muted hover:text-text hover:bg-surface-2 rounded-brand transition-colors",title:"Refresh",children:(0,a.jsx)(d.e9,{size:18,className:i?"animate-spin":""})}),(0,a.jsx)("button",{onClick:t,className:"p-2 text-text-muted hover:text-text hover:bg-surface-2 rounded-brand transition-colors",title:"Logout",children:(0,a.jsx)(d.nU,{size:18})})]}),o&&(0,a.jsxs)("div",{className:"flex items-start gap-2 mb-4 p-3 bg-danger/10 rounded-brand text-sm text-danger",children:[(0,a.jsx)(d.RI,{size:16,className:"flex-shrink-0 mt-0.5"}),(0,a.jsx)("span",{className:"break-words",children:o})]}),i&&0===m.length?(0,a.jsx)(p.A,{text:"Loading codespaces..."}):0===m.length?(0,a.jsxs)("div",{className:"text-center py-8",children:[(0,a.jsx)("p",{className:"text-text-muted text-sm mb-4",children:"No codespaces yet."}),(0,a.jsxs)(x.A,{variant:"primary",onClick:()=>N(!0),children:[(0,a.jsx)(d.FW,{size:16}),"Create new codespace"]})]}):(0,a.jsx)("div",{className:"space-y-2",children:m.map(e=>{let t=b===e.name,s=e.state===w.Gi.available;return(0,a.jsxs)("div",{className:"bg-surface-2 rounded-brand p-3 hover:bg-surface-3 transition-colors",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"text-text font-medium truncate",title:e.display_name||e.name,children:e.display_name||e.name}),(0,a.jsxs)("div",{className:"text-xs text-text-muted truncate",title:`${e.repository?.full_name} \xb7 ${e.state}`,children:[e.repository?.full_name," \xb7 ",e.state]})]}),(0,a.jsxs)(x.A,{variant:"primary",onClick:()=>C(e),disabled:t,loading:t,className:"!py-1.5 !px-3 text-sm",children:[(0,a.jsx)(d.jG,{size:14}),s?"Connect":"Start"]})]}),t&&j&&(0,a.jsx)("div",{className:"mt-2 text-xs text-text-muted",children:j})]},e.name)})}),(0,a.jsx)(I,{isOpen:v,onClose:()=>N(!1),onCreated:({codespace:e,apiKey:t})=>{var s;let a;s=e.name,(a=R())[s]=t,localStorage.setItem(E,JSON.stringify(a)),N(!1),k()}})]})}var T=s(97711),M=s(90084),F=s(86129),$=s(11155),O=s(2805),U=s(90076);function q(e){let t=String(e||"").trim(),s=e=>({tempKey:e.slice(0,6).toUpperCase(),tail:e.slice(6,8).toUpperCase()}),a=/#([A-NP-Z1-9]{6}-?[a-np-z1-9]{2})$/i.exec(t);if(a)return s(a[1].replace(/-/g,""));let n=/^([A-NP-Z1-9]{6}-?[a-np-z1-9]{2})$/i.exec(t);if(n)return s(n[1].replace(/-/g,""));let r=/[?&]k=([A-NP-Z1-9]{6})(?:[^A-NP-Z1-9]|$)/i.exec(t);return r?{tempKey:r[1].toUpperCase()}:/^[A-NP-Z1-9]{6}$/i.test(t)?{tempKey:t.toUpperCase()}:null}function D(){let{t:e}=(0,m.s)(),[t,s]=(0,n.useState)(""),[b,f]=(0,n.useState)(!0),[j,N]=(0,n.useState)([]),[k,C]=(0,n.useState)(!1),[S,A]=(0,n.useState)(!1),[_,L]=(0,n.useState)("local"),[z,I]=(0,n.useState)(null),[E,R]=(0,n.useState)(""),[D,G]=(0,n.useState)(null),[W,B]=(0,n.useState)(null),[H,J]=(0,n.useState)(null),Q="3.0.0",{token:X,clearToken:Z}=K(),{setAuth:V}=(0,T.F)(),Y=(0,r.useSearchParams)(),ee=(0,r.useRouter)(),{loading:et,error:es,authenticateWithToken:ea,authenticateWithApiKey:en}=(0,l.As)(),[er,el]=(0,n.useState)(!1),{loadKeys:ei,saveKey:eo,removeKey:ec,renameKey:ed,hasStoredKeys:ex,updateLastLogin:em}=(0,i.u)(),eu=(0,n.useMemo)(()=>j.some(e=>(0,$.PF)(e.key)),[j]),ep=(0,n.useMemo)(()=>Y.get("t"),[Y]),[eh]=(0,n.useState)(()=>{try{let e=sessionStorage.getItem("9remote_url_pairing");if(e)return e;let t=q(window.location.hash)||q(window.location.search);if(t?.tempKey)return sessionStorage.setItem("9remote_url_pairing",t.tempKey+(t.tail||"")),t.tempKey+(t.tail||"")}catch{}return null}),eg=!!ep||!!eh;(0,n.useEffect)(()=>{if(window.location.hash||window.location.search){let e=q(window.location.hash)||q(window.location.search);e?.tempKey&&window.history.replaceState(null,"",window.location.pathname)}f("false"!==localStorage.getItem("9remote_remember_key_preference")),N(ei()),C(!0),sessionStorage.getItem(F.Jd)&&(sessionStorage.removeItem(F.Jd),el(!0)),X&&L("github"),(0,O._r)()&&window.location.port===String(U._8)&&fetch("/api/ui/state").then(e=>e.ok?e.json():null).then(e=>{if(e?.permanentKey){J(e.permanentKey);let t="remote"===Y.get("mode");if(t)try{sessionStorage.setItem("9remote_manual_disconnect","1")}catch{}if(!(t||"1"===sessionStorage.getItem("9remote_manual_disconnect"))){let t=e.permanentKey,s=(0,$.Uo)(t),a=(0,$.Cj)(t);(0,M.LG)(s,{tail:a}),V({apiKey:s,tunnelUrl:window.location.origin,mode:"local",tempKey:null,localIp:null}),ee.push("/workspace/")}}}).catch(()=>{})},[ei,X,ee,V,Y]);let eb=(0,n.useCallback)(async e=>{let t=q(e),s=await ea(t?.tempKey||e,!0,t?.tail);try{sessionStorage.removeItem("9remote_url_pairing")}catch{}s.success&&(t?.tail&&(0,M.LG)(t.tempKey,{tail:t.tail}),"false"!==localStorage.getItem("9remote_remember_key_preference")&&sessionStorage.setItem(F.aS,"1"),ee.push("/workspace/"))},[ea,ee]),ef=(0,n.useRef)(!1);(0,n.useEffect)(()=>{(ep||eh)&&(ef.current||(ef.current=!0,ep?ea(ep):eb(eh)))},[ep,eh,ea,eb]);let ej=async()=>{let s=t.trim();if(!s)return;if((0,$.PF)(s))return void setError(e("login.legacyKeyError"));let a=q(s),n=!!a?.tempKey,r=n?a.tempKey:(0,$.Uo)(s),l=n?a.tail:(0,$.Cj)(s),i=n?await ea(a.tempKey,!0,a.tail):await en(s);if(!i.success)return;let o=n?i.apiKey:r,c=n?a.tempKey:o;l&&c&&(0,M.LG)(c,{tail:l}),b&&o&&(n?sessionStorage.setItem(F.aS,"1"):sessionStorage.setItem(F.El,s)),ee.push("/workspace/")},ey=async t=>{let s;if(!t)return;if((0,$.PF)(t))return void setError(e("login.legacyKeyError"));let a=(0,$.Cj)(t);a&&(0,M.LG)((0,$.Uo)(t),{tail:a});let n=a?t:(0,M.$4)(t);B(t);try{s=await en(n)}finally{B(null)}s?.success&&(n!==t&&eo(n),em(t),ee.push("/workspace/"))},ev=e=>{ed(e,E.trim()),N(ei()),I(null)},ew=()=>{I(null)},eN=async e=>{let t=q(e);return!!t?.tempKey&&!!(await ea(t.tempKey,!0,t.tail)).success&&(t.tail&&(0,M.LG)(t.tempKey,{tail:t.tail}),"false"!==localStorage.getItem("9remote_remember_key_preference")&&sessionStorage.setItem(F.aS,"1"),ee.push("/workspace/"),!0)};return eg&&et?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(g.A,{}),(0,a.jsx)(c.A,{children:(0,a.jsx)("div",{className:"card-elev p-8 max-w-md w-full border border-border",children:(0,a.jsx)(p.A,{size:"lg",text:e("login.authenticating")})})})]}):"github"===_&&X?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(g.A,{}),(0,a.jsx)(c.A,{children:(0,a.jsx)(P,{onConnect:(e,t)=>{let s=(0,w.xO)(e.name);V({apiKey:(0,$.Uo)(t),tunnelUrl:s,mode:"remote"}),ee.push("/workspace/")},onLogout:()=>{Z()}})})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(g.A,{}),k&&(0,O._r)()&&(0,a.jsxs)("a",{href:"/",className:"fixed top-4 left-4 z-50 inline-flex items-center gap-2 px-3 py-1.5 text-xs font-medium text-text hover:text-white bg-surface-2/90 hover:bg-surface-3 border border-border-subtle rounded-brand-lg backdrop-blur-md transition-all shadow-sm active:scale-[0.97]",title:"Back to Host QR",children:[(0,a.jsx)(d.Ay,{name:"ChevronLeft",size:15,className:"opacity-70"}),(0,a.jsx)(d.Ay,{name:"QrCode",size:15,className:"text-brand-500"}),(0,a.jsx)("span",{children:"Host QR"})]}),(0,a.jsxs)("div",{className:"min-h-screen grid lg:grid-cols-2",children:[(0,a.jsxs)("section",{className:"hidden lg:flex flex-col justify-between px-12 xl:px-20 py-12 relative overflow-hidden",children:[(0,a.jsx)("div",{className:"login-hero-glow","aria-hidden":!0}),(0,a.jsxs)("div",{className:"my-auto max-w-xl relative z-10",children:[(0,a.jsxs)("div",{className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-surface-2/60 border border-border-subtle font-mono text-[11px] text-text-muted mb-7",children:[(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-brand-500 animate-pulse-glow"}),e("login.termConnected")," \xb7 ",e("login.termTunnel")]}),(0,a.jsxs)("h1",{className:"text-6xl xl:text-7xl font-extrabold tracking-tight leading-[0.98] mb-6 text-text",children:[e("login.heroLine1"),(0,a.jsx)("br",{}),e("login.heroLine2"),(0,a.jsx)("br",{}),(0,a.jsx)("span",{className:"login-hero-grad",children:e("login.heroLine3")})]}),(0,a.jsx)("p",{className:"text-text-muted text-base lg:text-lg leading-relaxed max-w-md mb-8",children:e("login.tagline")}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2 mb-9",children:["Terminal","Desktop","Files","WebRTC low-latency","iOS \xb7 Android \xb7 Web"].map(e=>(0,a.jsx)("span",{className:"font-mono text-xs text-text-muted px-3 py-1.5 rounded-full border border-border-subtle",children:e},e))}),(0,a.jsxs)("div",{className:"rounded-xl border border-border-subtle bg-surface-2/60 overflow-hidden max-w-md shadow-lg",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 px-3 py-2 border-b border-border-subtle",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#ff5f57]"}),(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#febc2e]"}),(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#28c840]"}),(0,a.jsx)("span",{className:"ml-2 font-mono text-[10px] text-text-subtle",children:"dev@mac — zsh"})]}),(0,a.jsxs)("div",{className:"p-3.5 font-mono text-[12px] leading-relaxed",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-subtle",children:"➜"})," 9remote start"]}),(0,a.jsx)("div",{className:"text-text-subtle",children:"↳ tunnel up \xb7 pairing open"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-brand-500",children:"[ok]"})," ",(0,a.jsx)("span",{className:"text-text",children:"machine"})," ",(0,a.jsx)("span",{className:"text-text-subtle",children:"macbook-pro-m3"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-brand-500",children:"[ok]"})," ",(0,a.jsx)("span",{className:"text-text",children:"pty"})," ",(0,a.jsx)("span",{className:"text-text-subtle",children:"daemon v3.1 \xb7 12 warm"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-[#6aab6a]",children:"●"})," ",(0,a.jsx)("span",{className:"text-text-subtle",children:"waiting for phone…"})," ",(0,a.jsx)("span",{className:"inline-block w-[7px] h-[13px] bg-brand-500 align-middle animate-cursor-blink"})]})]})]})]}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-x-5 gap-y-1 font-mono text-[11px] text-text-subtle pt-8 relative z-10",children:[(0,a.jsx)("span",{children:"› PTY persistent"}),(0,a.jsx)("span",{children:"› end-to-end encrypted"}),(0,a.jsx)("span",{children:"› open source"})]})]}),(0,a.jsxs)("section",{className:"flex items-center justify-center p-6 sm:p-10 lg:border-l lg:border-border-subtle lg:bg-surface-1 relative",children:[(0,a.jsx)("div",{className:"login-mobile-glow lg:hidden","aria-hidden":!0}),(0,a.jsxs)("div",{className:"relative z-10 w-full max-w-sm space-y-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-6",children:[(0,a.jsx)("img",{src:"/icon-192.png",alt:"9Remote Logo",className:"w-10 h-10 rounded-[11px] object-contain shadow-lg shadow-brand-500/20"}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("h1",{className:"text-[22px] font-bold tracking-tight text-text leading-none",children:"9Remote"}),Q&&(0,a.jsxs)("p",{className:"font-mono text-[11px] text-text-subtle mt-1",children:["v",Q]})]}),(0,a.jsx)(y,{}),(0,a.jsx)(v.A,{})]}),(0,a.jsx)("p",{className:"text-text-muted text-lg font-medium leading-snug pr-4 mb-6 lg:hidden",children:e("login.tagline")}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-2.5",children:[(0,a.jsx)(d.Ay,{name:"KeyRound",className:"text-text-muted opacity-70",size:14}),(0,a.jsx)("span",{className:"text-[13px] font-semibold text-text",children:e("login.accessKey")})]}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{id:"accessKeyInput",type:"text",value:t,onChange:e=>{let t=e.target.value;s(t.length<=F.qM?t.toUpperCase():t.toLowerCase())},onKeyDown:e=>"Enter"===e.key&&t&&ej(),placeholder:e("login.placeholder"),className:"w-full pl-3.5 pr-20 py-3 bg-surface-2 border border-border-subtle rounded-[10px] font-mono text-sm text-text placeholder-text-subtle focus:outline-none focus:border-brand-500 focus:ring-2 focus:ring-brand-500/20 transition-all duration-150"}),(0,a.jsxs)("div",{className:"absolute right-2.5 top-1/2 -translate-y-1/2 flex items-center gap-1",children:[t&&(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("button",{onMouseDown:e=>e.preventDefault(),onClick:()=>{s("")},className:"w-7 h-7 grid place-items-center rounded-[7px] text-text-subtle hover:bg-surface-3 hover:text-text transition-colors",type:"button",children:(0,a.jsx)(d.X,{size:16})})}),(0,a.jsx)("button",{onMouseDown:e=>e.preventDefault(),onClick:()=>A(!0),className:"w-7 h-7 grid place-items-center rounded-[7px] text-text-subtle hover:bg-surface-3 hover:text-brand-500 transition-colors",type:"button","aria-label":e("login.scanQr"),children:(0,a.jsx)(d.Ay,{name:"QrCode",size:16})})]})]}),(es||er)&&(0,a.jsx)("p",{className:"mt-2 text-xs font-mono text-danger",children:"agent-offline"===es?e("login.agentOffline"):es&&"wrong-key-tail"!==es?es:e("login.invalidKeyTail")}),(0,a.jsxs)("label",{className:"flex items-center gap-2.5 cursor-pointer mt-4 select-none",children:[(0,a.jsx)("input",{type:"checkbox",checked:b,onChange:e=>{var t;f(t=e.target.checked),localStorage.setItem("9remote_remember_key_preference",t)},className:"w-[15px] h-[15px] accent-brand-500"}),(0,a.jsx)("span",{className:"text-[13px] text-text-muted",children:e("login.rememberKey")})]}),(0,a.jsx)(x.A,{variant:"primary",onClick:ej,loading:et,className:"btn-cta w-full mt-4",children:(0,a.jsxs)("span",{className:"inline-flex items-center justify-center gap-2",children:[e("login.connect"),(0,a.jsx)(d.Ay,{name:"ArrowRight",size:16})]})}),k&&j.length>0&&(0,a.jsxs)("div",{className:"mt-5 pt-5 border-t border-border-subtle",children:[(0,a.jsx)("div",{className:"font-mono text-[11px] uppercase tracking-wider text-text-subtle mb-1 px-1",children:e("login.savedKeys")}),eu&&(0,a.jsxs)("div",{className:"my-2.5 px-3 py-2.5 bg-amber-500/10 border border-amber-500/30 rounded-brand-lg flex items-start gap-2.5",children:[(0,a.jsx)(d.Ay,{name:"AlertCircle",size:16,className:"text-amber-500 shrink-0 mt-0.5"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"text-xs font-medium text-text",children:e("login.legacyKeyUpdateRequired")}),(0,a.jsx)("div",{className:"text-xs text-text-muted mt-0.5",children:e("login.legacyKeyUpdateHint")}),(0,a.jsx)("code",{className:"inline-block mt-1.5 px-2 py-0.5 bg-surface-2 border border-border text-text text-xs rounded font-mono select-all",children:"npm i -g 9remote@latest"})]})]}),j.map(t=>{let s=z===t.id,n=W===t.key,r=(0,$.PF)(t.key);return(0,a.jsxs)("div",{className:`flex items-center gap-3 px-1 py-2 rounded-[10px] hover:bg-surface-2 transition-colors cursor-pointer ${r?"opacity-85":""}`,onClick:()=>!s&&!n&&ey(t.key),role:"button",tabIndex:0,children:[(0,a.jsx)("div",{className:`w-12 h-12 rounded-[12px] bg-surface-2 border ${r?"border-amber-500/40 text-amber-500":"border-border-subtle text-text-muted"} grid place-items-center flex-shrink-0`,children:(0,a.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round",className:"w-[26px] h-[26px]",children:[(0,a.jsx)("rect",{x:"2",y:"4",width:"20",height:"13",rx:"2"}),(0,a.jsx)("line",{x1:"2",y1:"20",x2:"22",y2:"20"})]})}),(0,a.jsx)("div",{className:"flex-1 min-w-0",children:s?(0,a.jsxs)("div",{className:"flex items-center gap-1",onClick:e=>e.stopPropagation(),children:[(0,a.jsx)("input",{autoFocus:!0,value:E,onChange:e=>R(e.target.value),onKeyDown:e=>{"Enter"===e.key&&ev(t.id),"Escape"===e.key&&ew()},placeholder:e("login.namePlaceholder"),className:"flex-1 min-w-0 bg-surface-2 border border-brand-500 rounded-md text-text text-[13px] px-2 py-1 outline-none"}),(0,a.jsx)("button",{onClick:()=>ev(t.id),className:"w-6 h-6 grid place-items-center rounded-md bg-brand-500 text-white","aria-label":e("common.done"),children:(0,a.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round",className:"w-3 h-3",children:(0,a.jsx)("polyline",{points:"20 6 9 17 4 12"})})}),(0,a.jsx)("button",{onClick:ew,className:"w-6 h-6 grid place-items-center rounded-md bg-surface-2 text-text-muted","aria-label":e("common.cancel"),children:(0,a.jsx)(d.X,{size:13})})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-[13px] font-medium text-text truncate",title:t.label||e("agentSwitcher.unnamed"),children:t.label||e("agentSwitcher.unnamed")}),r&&(0,a.jsx)("span",{className:"shrink-0 px-1.5 py-0.5 text-[9px] font-semibold font-mono uppercase rounded bg-amber-500/15 text-amber-500 border border-amber-500/30",children:e("login.updateRequired")})]}),(0,a.jsx)("div",{className:"font-mono text-[11px] text-text-subtle mt-0.5 truncate",children:(0,o.o)(t.key)})]})}),!s&&(0,a.jsx)("span",{className:"font-mono text-[11px] text-text-subtle whitespace-nowrap",children:n?e("agentSwitcher.connecting"):(t=>{if(!t)return"";try{let s=new Date(t),a=new Date-s,n=Math.floor(a/6e4),r=Math.floor(a/36e5),l=Math.floor(a/864e5);if(n<1)return e("login.justNow");if(n<60)return e("login.minutesAgo",{n:n});if(r<24)return e("login.hoursAgo",{n:r});if(l<7)return e("login.daysAgo",{n:l});return s.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}catch{return""}})(t.lastLoginDate)}),!s&&(0,a.jsxs)("div",{className:"flex gap-0.5",onClick:e=>e.stopPropagation(),children:[(0,a.jsx)("button",{onClick:()=>{I(t.id),R(t.label||"")},title:e("common.edit"),className:"w-[26px] h-[26px] grid place-items-center rounded-[7px] text-text-subtle hover:bg-surface-3 hover:text-text transition-colors",children:(0,a.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"w-3.5 h-3.5",children:[(0,a.jsx)("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),(0,a.jsx)("path",{d:"M18.5 2.5a2.12 2.12 0 0 1 3 3L12 15l-4 1 1-4z"})]})}),(0,a.jsx)("button",{onClick:()=>G(t),title:e("common.delete"),className:"w-[26px] h-[26px] grid place-items-center rounded-[7px] text-text-subtle hover:bg-surface-3 hover:text-danger transition-colors",children:(0,a.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"w-3.5 h-3.5",children:[(0,a.jsx)("polyline",{points:"3 6 5 6 21 6"}),(0,a.jsx)("path",{d:"M19 6l-2 14a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2L5 6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"})]})})]})]},t.id)})]}),(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2 pt-1 text-text-subtle",children:[(0,a.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"w-3.5 h-3.5",children:(0,a.jsx)("path",{d:"M12 2l9 4v6c0 5-3.8 9.7-9 11-5.2-1.3-9-6-9-11V6l9-4z"})}),(0,a.jsx)("span",{className:"font-mono text-[11px]",children:e("login.secureTitle")})]})]})]})]}),(0,a.jsx)(u,{isOpen:S,onClose:()=>A(!1),onScan:eN}),(0,a.jsx)(h.A,{isOpen:!!D,onClose:()=>G(null),onConfirm:()=>{D&&(ec(D.id),N(ei()))},title:e("login.deleteKeyTitle"),message:e("login.deleteKeyConfirm",{name:D?.label}),confirmText:e("common.delete")})]})}function G(){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(g.A,{}),(0,a.jsx)(c.A,{children:(0,a.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[(0,a.jsx)(p.A,{text:"Loading..."}),(0,a.jsx)("a",{href:"/login",className:"text-sm text-text-muted hover:text-brand-500 underline underline-offset-4 transition-colors",children:"Reload"})]})})]})}function W(){return(0,a.jsx)(n.Suspense,{fallback:(0,a.jsx)(G,{}),children:(0,a.jsx)(D,{})})}},59893:(e,t,s)=>{"use strict";s.d(t,{A:()=>n});var a=s(73365);function n({children:e,centered:t=!0,className:s=""}){return(0,a.jsx)("div",{className:`min-h-screen ${t?"flex items-center justify-center p-4":""} ${s}`,children:e})}},66859:(e,t,s)=>{Promise.resolve().then(s.bind(s,45136))},90753:(e,t,s)=>{"use strict";s.d(t,{A:()=>o});var a=s(73365),n=s(44976),r=s(8910);let l=({size:e=18})=>(0,a.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,a.jsx)("circle",{cx:"12",cy:"12",r:"4"}),(0,a.jsx)("path",{d:"M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41"})]}),i=({size:e=18})=>(0,a.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,a.jsx)("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})});function o({className:e="",size:t=18}){let{theme:s,toggleTheme:c}=(0,n.D)(),d="dark"===s;return(0,a.jsx)("button",{type:"button",onClick:()=>{(0,r.e)(),c()},"aria-label":d?"Switch to light theme":"Switch to dark theme",title:d?"Light mode":"Dark mode",className:`p-1.5 rounded-brand transition-colors text-[var(--color-text-muted)] hover:text-[var(--color-text)] hover:bg-[var(--color-surface-2)] ${e}`,children:d?(0,a.jsx)(l,{size:t}):(0,a.jsx)(i,{size:t})})}}},e=>{e.O(0,[1236,7629,635,8922,3973,2347,5158,7358],()=>e(e.s=66859)),_N_E=e.O()}]);
1
+ (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4520],{45136:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>W});var a=s(73365),n=s(1521),r=s(29717),l=s(20464),i=s(4018),o=s(2163),c=s(59893),d=s(64683),x=s(80186),m=s(78762);function u({isOpen:e,onClose:t,onScan:r}){let{t:l}=(0,m.s)(),i=(0,n.useRef)(null),o=(0,n.useRef)(null),c=(0,n.useRef)(null),p=(0,n.useRef)(null),h=(0,n.useRef)(null),[g,b]=(0,n.useState)(""),[f,j]=(0,n.useState)(""),y=(0,n.useCallback)(async e=>{if(o.current)try{await o.current.stop()}catch(e){}j("detected"),await new Promise(e=>setTimeout(e,300)),j("authenticating"),await r(e)||(j(""),h.current?.())},[r]),v=(0,n.useCallback)(async()=>{if(!c.current){let e=await Promise.all([s.e(3446),s.e(6075)]).then(s.bind(s,16075)).catch(()=>null);if(!e)return void b(l("login.qrLibFail"));c.current=e.Html5Qrcode}let e=document.getElementById("qr-reader");if(!e)return void b(l("login.qrInitFail"));try{e.innerHTML="";let t=new c.current("qr-reader");o.current=t,await t.start({facingMode:"environment"},{fps:10,qrbox:{width:250,height:250}},e=>{p.current?.(e)},()=>{})}catch(t){let e=t.toString();e.includes("NotAllowedError")?b(l("login.qrCamDenied")):e.includes("NotFoundError")?b(l("login.qrNoCamera")):e.includes("NotReadableError")?b(l("login.qrCamBusy")):b(l("login.qrCamError"))}},[l]),w=(0,n.useCallback)(async()=>{if(o.current){try{await o.current.stop()}catch(e){}o.current=null}b(""),j(""),t()},[t]);return((0,n.useEffect)(()=>{p.current=y},[y]),(0,n.useEffect)(()=>{if(!e)return;let t=!1;h.current=async()=>{o.current=null,await new Promise(e=>setTimeout(e,400)),t||v()};let s=setTimeout(()=>{t||v()},200);return()=>{if(t=!0,clearTimeout(s),h.current=null,o.current){try{o.current.stop()}catch(e){}o.current=null}}},[e,v]),e)?(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/80 backdrop-blur-sm",children:(0,a.jsxs)("div",{className:"relative card-elev max-w-md w-full mx-4 overflow-hidden",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between p-4 border-b border-border",children:[(0,a.jsx)("h2",{className:"text-xl font-bold text-text",children:l("login.qrScanTitle")}),(0,a.jsx)("button",{onClick:w,className:"text-text-muted hover:text-text transition-colors p-1",children:(0,a.jsx)(d.X,{size:24})})]}),(0,a.jsx)("div",{className:"relative bg-black",children:(0,a.jsx)("div",{id:"qr-reader",ref:i,className:"w-full",style:{minHeight:"300px"}})}),(0,a.jsxs)("div",{className:"p-4",children:[g?(0,a.jsxs)("div",{className:"flex items-start gap-2 p-3 bg-red-500/10 rounded-brand text-red-400",children:[(0,a.jsx)(d.RI,{size:20,className:"flex-shrink-0 mt-0.5"}),(0,a.jsx)("p",{className:"text-sm",children:g})]}):"detected"===f?(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2 p-3 bg-green-500/10 rounded-brand text-green-400",children:[(0,a.jsx)(d.vW,{size:22}),(0,a.jsx)("p",{className:"text-sm font-medium",children:l("login.qrDetected")})]}):"authenticating"===f?(0,a.jsx)("div",{className:"flex items-center justify-center gap-2 p-3 bg-brand-500/10 rounded-brand text-brand-400",children:(0,a.jsx)("p",{className:"text-sm font-medium",children:l("login.qrAuthenticating")})}):(0,a.jsx)("p",{className:"text-sm text-text-muted text-center",children:l("login.qrHint")}),(0,a.jsx)(x.A,{variant:"secondary",onClick:w,disabled:"authenticating"===f,className:"w-full mt-4",children:"authenticating"===f?l("login.qrPleaseWait"):l("common.cancel")})]})]})}):null}var p=s(45111),h=s(42174),g=s(30240),b=s(8910),f=s(52345),j=s(18057);function y({className:e="",showLabel:t=!0}){let{locale:s}=(0,m.s)(),[r,l]=(0,n.useState)(!1),i=f.dI.find(e=>e.code===s)||f.dI[0];return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("button",{onClick:()=>{(0,b.e)(),l(!0)},className:`flex items-center gap-1.5 bg-surface-2 hover:bg-surface-3 rounded-brand text-text text-sm px-2 py-1 transition-all duration-150 ease-out active:scale-[0.96] ${e}`,title:i.label,children:[(0,a.jsx)("img",{src:`https://flagcdn.com/w40/${i.country}.png`,alt:i.label,className:"w-[17px] h-[12px] object-cover rounded-[2px]",loading:"lazy"}),t&&(0,a.jsx)("span",{className:"hidden sm:inline",children:i.code.toUpperCase()})]}),(0,a.jsx)(j.A,{isOpen:r,onClose:()=>l(!1)})]})}var v=s(90753),w=s(38415),N=s(23346);let k=null;async function C(){k||(k=N.Ay.ready),await k}async function S(e,t){await C();let s=N.Ay.from_base64(e,N.Ay.base64_variants.ORIGINAL),a=N.Ay.from_string(t),n=N.Ay.crypto_box_seal(a,s);return N.Ay.to_base64(n,N.Ay.base64_variants.ORIGINAL)}function A(e=24){let t=new Uint8Array(e);return crypto.getRandomValues(t),Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}let _="9remote_github_token",L="9remote:githubTokenChange";async function z(e,t,s={}){let a=await fetch(`${w.pe}${t}`,{...s,headers:{...{Authorization:`Bearer ${e}`,Accept:"application/vnd.github+json","X-GitHub-Api-Version":"2022-11-28"},...s.headers||{}}});if(!a.ok){let e=await a.text().catch(()=>"");throw Error(`GitHub ${a.status}: ${e||a.statusText}`)}return 204===a.status?null:a.json()}function K(){let[e,t]=(0,n.useState)(()=>localStorage.getItem(_)||""),[s,a]=(0,n.useState)(!1),[r,l]=(0,n.useState)(null);(0,n.useEffect)(()=>{let e=()=>{t(localStorage.getItem(_)||"")};return window.addEventListener(L,e),window.addEventListener("storage",e),()=>{window.removeEventListener(L,e),window.removeEventListener("storage",e)}},[!0]);let i=(0,n.useCallback)(e=>{t(e),e?localStorage.setItem(_,e):localStorage.removeItem(_),window.dispatchEvent(new Event(L))},[!0]),o=(0,n.useCallback)(()=>{i("")},[i]),c=(0,n.useCallback)(async(t=e)=>z(t,w.no.user),[e]),d=(0,n.useCallback)(async()=>{a(!0),l(null);try{return(await z(e,w.no.codespaces)).codespaces||[]}catch(e){return l(e.message),[]}finally{a(!1)}},[e]),x=(0,n.useCallback)(async t=>z(e,w.no.codespaceByName(t)),[e]),m=(0,n.useCallback)(async t=>z(e,w.no.startCodespace(t),{method:"POST"}),[e]),u=(0,n.useCallback)(async()=>z(e,w.no.userReposList),[e]),p=(0,n.useCallback)(async(t,s)=>z(e,w.no.createCodespaceForRepo(t,s),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})}),[e]),h=(0,n.useCallback)(async(t,s)=>{let a=await z(e,w.no.codespaceSecretsPublicKey),n=await S(a.key,s);await z(e,w.no.codespaceSecret(w.Gf),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({encrypted_value:n,key_id:a.key_id,selected_repository_ids:[t]})})},[e]),g=(0,n.useCallback)(async(t,s)=>{let a=w.no.repoContents(t,s,w.Hu),n=!1;try{await z(e,a),n=!0}catch{}if(n)return{existed:!0};let r=JSON.stringify(w.cu,null,2);return await z(e,a,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:"Add 9remote devcontainer",content:btoa(unescape(encodeURIComponent(r)))})}),{existed:!1}},[e]),b=(0,n.useCallback)(async(e,t)=>{for(let s=0;s<w.ij;s++){let s=await x(e);if(t?.(s.state),s.state===w.Gi.available)return s;await new Promise(e=>setTimeout(e,w.Nn))}throw Error("Codespace start timeout")},[x]);return{token:e,setToken:i,clearToken:o,loading:s,error:r,getUser:c,listCodespaces:d,getCodespace:x,startCodespace:m,waitUntilAvailable:b,listRepos:u,createCodespace:p,ensureDevcontainer:g,setApiKeySecret:h,generateApiKey:A}}function I({isOpen:e,onClose:t,onCreated:s}){let{listRepos:r,createCodespace:l,ensureDevcontainer:i,setApiKeySecret:o,generateApiKey:c,error:m}=K(),[u,h]=(0,n.useState)([]),[g,b]=(0,n.useState)(!1),[f,j]=(0,n.useState)(null),[y,v]=(0,n.useState)(""),[w,N]=(0,n.useState)(null),[k,C]=(0,n.useState)("");(0,n.useEffect)(()=>{e&&(N(null),b(!0),r().then(e=>h(Array.isArray(e)?e:[])).catch(e=>N(e.message)).finally(()=>b(!1)))},[e,r]),(0,n.useEffect)(()=>{if(!e||f)return;let s=e=>{"Escape"===e.key&&(e.preventDefault(),e.stopPropagation(),t?.())};return window.addEventListener("keydown",s,!0),()=>window.removeEventListener("keydown",s,!0)},[e,f,t]);let S=(0,n.useMemo)(()=>{let e=y.trim().toLowerCase();return e?u.filter(t=>t.full_name.toLowerCase().includes(e)):u},[u,y]),A=async e=>{j(e.full_name),N(null),C("Generating API key...");try{let t=c();C("Setting codespace secret..."),await o(e.id,t),C("Setting up devcontainer..."),await i(e.owner.login,e.name),C("Creating codespace...");let a=await l(e.owner.login,e.name);s({codespace:a,apiKey:t})}catch(e){N(e.message)}finally{j(null),C("")}};return e?(0,a.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4",onClick:t,children:(0,a.jsxs)("div",{className:"card-elev p-6 max-w-md w-full max-h-[80dvh] flex flex-col border border-border",onClick:e=>e.stopPropagation(),children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsx)("h3",{className:"text-lg font-bold text-text",children:"Select repository"}),(0,a.jsx)("button",{onClick:t,className:"p-1 text-text-muted hover:text-text",children:(0,a.jsx)(d.X,{size:20})})]}),(0,a.jsxs)("div",{className:"relative mb-3",children:[(0,a.jsx)(d.vj,{size:16,className:"absolute left-3 top-1/2 -translate-y-1/2 text-text-muted"}),(0,a.jsx)("input",{type:"text",value:y,onChange:e=>v(e.target.value),placeholder:"Search repos...",className:"w-full pl-9 pr-3 py-2 bg-surface-2 rounded-brand text-text placeholder-text-muted focus:outline-none focus:ring-2 focus:ring-brand-500/40 text-sm"})]}),(w||m)&&(0,a.jsxs)("div",{className:"flex items-start gap-2 mb-3 p-2 bg-danger/10 rounded-brand text-xs text-danger",children:[(0,a.jsx)(d.RI,{size:14,className:"flex-shrink-0 mt-0.5"}),(0,a.jsx)("span",{className:"break-words",children:w||m})]}),(0,a.jsx)("div",{className:"flex-1 overflow-auto space-y-1",children:g?(0,a.jsx)(p.A,{text:"Loading repos..."}):0===S.length?(0,a.jsx)("div",{className:"text-center py-6 text-text-muted text-sm",children:"No repos"}):S.map(e=>{let t=f===e.full_name;return(0,a.jsxs)("div",{className:"p-2 bg-surface-2 hover:bg-surface-3 rounded-brand transition-colors",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"text-sm text-text font-medium truncate",title:e.full_name,children:e.full_name}),e.private&&(0,a.jsx)("span",{className:"text-xs text-text-muted",children:"private"})]}),(0,a.jsxs)(x.A,{variant:"primary",onClick:()=>A(e),disabled:!!f,loading:t,className:"!py-1 !px-2 text-xs",children:[(0,a.jsx)(d.FW,{size:12}),"Create"]})]}),t&&k&&(0,a.jsx)("div",{className:"mt-1 text-xs text-text-muted",children:k})]},e.id)})})]})}):null}let E="9remote_codespace_keys";function R(){try{return JSON.parse(localStorage.getItem(E)||"{}")}catch{return{}}}function P({onConnect:e,onLogout:t}){let{listCodespaces:s,startCodespace:r,waitUntilAvailable:l,loading:i,error:o,getUser:c}=K(),[m,u]=(0,n.useState)([]),[h,g]=(0,n.useState)(null),[b,f]=(0,n.useState)(null),[j,y]=(0,n.useState)(""),[v,N]=(0,n.useState)(!1),k=(0,n.useCallback)(async()=>{try{let e=await c();g(e)}catch{}u(await s())},[c,s]);(0,n.useEffect)(()=>{k()},[k]);let C=async t=>{var s;let a=(s=t.name,R()[s]||null);if(!a){y("No saved key for this codespace. Recreate it from web to enable auto-connect."),f(t.name),setTimeout(()=>{f(null),y("")},4e3);return}f(t.name),y("");try{let s=t;t.state!==w.Gi.available&&(y("Starting codespace..."),await r(t.name),s=await l(t.name,e=>{y(`State: ${e}`)})),e(s,a)}catch(e){y(`Error: ${e.message}`)}finally{f(null)}};return(0,a.jsxs)("div",{className:"card-elev p-8 max-w-md w-full border border-border",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-6",children:[(0,a.jsx)("div",{className:"p-2 bg-brand-500/10 rounded-brand",children:(0,a.jsx)(d.Cp,{className:"text-brand-500",size:24})}),(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("h2",{className:"text-xl font-bold text-text",children:"Codespaces"}),h&&(0,a.jsxs)("p",{className:"text-sm text-text-muted truncate",children:["@",h.login]})]}),(0,a.jsx)("button",{onClick:()=>N(!0),className:"p-2 text-text-muted hover:text-text hover:bg-surface-2 rounded-brand transition-colors",title:"New codespace",children:(0,a.jsx)(d.FW,{size:18})}),(0,a.jsx)("button",{onClick:k,disabled:i,className:"p-2 text-text-muted hover:text-text hover:bg-surface-2 rounded-brand transition-colors",title:"Refresh",children:(0,a.jsx)(d.e9,{size:18,className:i?"animate-spin":""})}),(0,a.jsx)("button",{onClick:t,className:"p-2 text-text-muted hover:text-text hover:bg-surface-2 rounded-brand transition-colors",title:"Logout",children:(0,a.jsx)(d.nU,{size:18})})]}),o&&(0,a.jsxs)("div",{className:"flex items-start gap-2 mb-4 p-3 bg-danger/10 rounded-brand text-sm text-danger",children:[(0,a.jsx)(d.RI,{size:16,className:"flex-shrink-0 mt-0.5"}),(0,a.jsx)("span",{className:"break-words",children:o})]}),i&&0===m.length?(0,a.jsx)(p.A,{text:"Loading codespaces..."}):0===m.length?(0,a.jsxs)("div",{className:"text-center py-8",children:[(0,a.jsx)("p",{className:"text-text-muted text-sm mb-4",children:"No codespaces yet."}),(0,a.jsxs)(x.A,{variant:"primary",onClick:()=>N(!0),children:[(0,a.jsx)(d.FW,{size:16}),"Create new codespace"]})]}):(0,a.jsx)("div",{className:"space-y-2",children:m.map(e=>{let t=b===e.name,s=e.state===w.Gi.available;return(0,a.jsxs)("div",{className:"bg-surface-2 rounded-brand p-3 hover:bg-surface-3 transition-colors",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"text-text font-medium truncate",title:e.display_name||e.name,children:e.display_name||e.name}),(0,a.jsxs)("div",{className:"text-xs text-text-muted truncate",title:`${e.repository?.full_name} \xb7 ${e.state}`,children:[e.repository?.full_name," \xb7 ",e.state]})]}),(0,a.jsxs)(x.A,{variant:"primary",onClick:()=>C(e),disabled:t,loading:t,className:"!py-1.5 !px-3 text-sm",children:[(0,a.jsx)(d.jG,{size:14}),s?"Connect":"Start"]})]}),t&&j&&(0,a.jsx)("div",{className:"mt-2 text-xs text-text-muted",children:j})]},e.name)})}),(0,a.jsx)(I,{isOpen:v,onClose:()=>N(!1),onCreated:({codespace:e,apiKey:t})=>{var s;let a;s=e.name,(a=R())[s]=t,localStorage.setItem(E,JSON.stringify(a)),N(!1),k()}})]})}var T=s(97711),M=s(90084),F=s(86129),$=s(11155),O=s(2805),U=s(90076);function q(e){let t=String(e||"").trim(),s=e=>({tempKey:e.slice(0,6).toUpperCase(),tail:e.slice(6,8).toUpperCase()}),a=/#([A-NP-Z1-9]{6}-?[a-np-z1-9]{2})$/i.exec(t);if(a)return s(a[1].replace(/-/g,""));let n=/^([A-NP-Z1-9]{6}-?[a-np-z1-9]{2})$/i.exec(t);if(n)return s(n[1].replace(/-/g,""));let r=/[?&]k=([A-NP-Z1-9]{6})(?:[^A-NP-Z1-9]|$)/i.exec(t);return r?{tempKey:r[1].toUpperCase()}:/^[A-NP-Z1-9]{6}$/i.test(t)?{tempKey:t.toUpperCase()}:null}function D(){let{t:e}=(0,m.s)(),[t,s]=(0,n.useState)(""),[b,f]=(0,n.useState)(!0),[j,N]=(0,n.useState)([]),[k,C]=(0,n.useState)(!1),[S,A]=(0,n.useState)(!1),[_,L]=(0,n.useState)("local"),[z,I]=(0,n.useState)(null),[E,R]=(0,n.useState)(""),[D,G]=(0,n.useState)(null),[W,B]=(0,n.useState)(null),[H,J]=(0,n.useState)(null),Q="3.0.1",{token:X,clearToken:Z}=K(),{setAuth:V}=(0,T.F)(),Y=(0,r.useSearchParams)(),ee=(0,r.useRouter)(),{loading:et,error:es,authenticateWithToken:ea,authenticateWithApiKey:en}=(0,l.As)(),[er,el]=(0,n.useState)(!1),{loadKeys:ei,saveKey:eo,removeKey:ec,renameKey:ed,hasStoredKeys:ex,updateLastLogin:em}=(0,i.u)(),eu=(0,n.useMemo)(()=>j.some(e=>(0,$.PF)(e.key)),[j]),ep=(0,n.useMemo)(()=>Y.get("t"),[Y]),[eh]=(0,n.useState)(()=>{try{let e=sessionStorage.getItem("9remote_url_pairing");if(e)return e;let t=q(window.location.hash)||q(window.location.search);if(t?.tempKey)return sessionStorage.setItem("9remote_url_pairing",t.tempKey+(t.tail||"")),t.tempKey+(t.tail||"")}catch{}return null}),eg=!!ep||!!eh;(0,n.useEffect)(()=>{if(window.location.hash||window.location.search){let e=q(window.location.hash)||q(window.location.search);e?.tempKey&&window.history.replaceState(null,"",window.location.pathname)}f("false"!==localStorage.getItem("9remote_remember_key_preference")),N(ei()),C(!0),sessionStorage.getItem(F.Jd)&&(sessionStorage.removeItem(F.Jd),el(!0)),X&&L("github"),(0,O._r)()&&window.location.port===String(U._8)&&fetch("/api/ui/state").then(e=>e.ok?e.json():null).then(e=>{if(e?.permanentKey){J(e.permanentKey);let t="remote"===Y.get("mode");if(t)try{sessionStorage.setItem("9remote_manual_disconnect","1")}catch{}if(!(t||"1"===sessionStorage.getItem("9remote_manual_disconnect"))){let t=e.permanentKey,s=(0,$.Uo)(t),a=(0,$.Cj)(t);(0,M.LG)(s,{tail:a}),V({apiKey:s,tunnelUrl:window.location.origin,mode:"local",tempKey:null,localIp:null}),ee.push("/workspace/")}}}).catch(()=>{})},[ei,X,ee,V,Y]);let eb=(0,n.useCallback)(async e=>{let t=q(e),s=await ea(t?.tempKey||e,!0,t?.tail);try{sessionStorage.removeItem("9remote_url_pairing")}catch{}s.success&&(t?.tail&&(0,M.LG)(t.tempKey,{tail:t.tail}),"false"!==localStorage.getItem("9remote_remember_key_preference")&&sessionStorage.setItem(F.aS,"1"),ee.push("/workspace/"))},[ea,ee]),ef=(0,n.useRef)(!1);(0,n.useEffect)(()=>{(ep||eh)&&(ef.current||(ef.current=!0,ep?ea(ep):eb(eh)))},[ep,eh,ea,eb]);let ej=async()=>{let s=t.trim();if(!s)return;if((0,$.PF)(s))return void setError(e("login.legacyKeyError"));let a=q(s),n=!!a?.tempKey,r=n?a.tempKey:(0,$.Uo)(s),l=n?a.tail:(0,$.Cj)(s),i=n?await ea(a.tempKey,!0,a.tail):await en(s);if(!i.success)return;let o=n?i.apiKey:r,c=n?a.tempKey:o;l&&c&&(0,M.LG)(c,{tail:l}),b&&o&&(n?sessionStorage.setItem(F.aS,"1"):sessionStorage.setItem(F.El,s)),ee.push("/workspace/")},ey=async t=>{let s;if(!t)return;if((0,$.PF)(t))return void setError(e("login.legacyKeyError"));let a=(0,$.Cj)(t);a&&(0,M.LG)((0,$.Uo)(t),{tail:a});let n=a?t:(0,M.$4)(t);B(t);try{s=await en(n)}finally{B(null)}s?.success&&(n!==t&&eo(n),em(t),ee.push("/workspace/"))},ev=e=>{ed(e,E.trim()),N(ei()),I(null)},ew=()=>{I(null)},eN=async e=>{let t=q(e);return!!t?.tempKey&&!!(await ea(t.tempKey,!0,t.tail)).success&&(t.tail&&(0,M.LG)(t.tempKey,{tail:t.tail}),"false"!==localStorage.getItem("9remote_remember_key_preference")&&sessionStorage.setItem(F.aS,"1"),ee.push("/workspace/"),!0)};return eg&&et?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(g.A,{}),(0,a.jsx)(c.A,{children:(0,a.jsx)("div",{className:"card-elev p-8 max-w-md w-full border border-border",children:(0,a.jsx)(p.A,{size:"lg",text:e("login.authenticating")})})})]}):"github"===_&&X?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(g.A,{}),(0,a.jsx)(c.A,{children:(0,a.jsx)(P,{onConnect:(e,t)=>{let s=(0,w.xO)(e.name);V({apiKey:(0,$.Uo)(t),tunnelUrl:s,mode:"remote"}),ee.push("/workspace/")},onLogout:()=>{Z()}})})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(g.A,{}),k&&(0,O._r)()&&(0,a.jsxs)("a",{href:"/",className:"fixed top-4 left-4 z-50 inline-flex items-center gap-2 px-3 py-1.5 text-xs font-medium text-text hover:text-white bg-surface-2/90 hover:bg-surface-3 border border-border-subtle rounded-brand-lg backdrop-blur-md transition-all shadow-sm active:scale-[0.97]",title:"Back to Host QR",children:[(0,a.jsx)(d.Ay,{name:"ChevronLeft",size:15,className:"opacity-70"}),(0,a.jsx)(d.Ay,{name:"QrCode",size:15,className:"text-brand-500"}),(0,a.jsx)("span",{children:"Host QR"})]}),(0,a.jsxs)("div",{className:"min-h-screen grid lg:grid-cols-2",children:[(0,a.jsxs)("section",{className:"hidden lg:flex flex-col justify-between px-12 xl:px-20 py-12 relative overflow-hidden",children:[(0,a.jsx)("div",{className:"login-hero-glow","aria-hidden":!0}),(0,a.jsxs)("div",{className:"my-auto max-w-xl relative z-10",children:[(0,a.jsxs)("div",{className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-surface-2/60 border border-border-subtle font-mono text-[11px] text-text-muted mb-7",children:[(0,a.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-brand-500 animate-pulse-glow"}),e("login.termConnected")," \xb7 ",e("login.termTunnel")]}),(0,a.jsxs)("h1",{className:"text-6xl xl:text-7xl font-extrabold tracking-tight leading-[0.98] mb-6 text-text",children:[e("login.heroLine1"),(0,a.jsx)("br",{}),e("login.heroLine2"),(0,a.jsx)("br",{}),(0,a.jsx)("span",{className:"login-hero-grad",children:e("login.heroLine3")})]}),(0,a.jsx)("p",{className:"text-text-muted text-base lg:text-lg leading-relaxed max-w-md mb-8",children:e("login.tagline")}),(0,a.jsx)("div",{className:"flex flex-wrap gap-2 mb-9",children:["Terminal","Desktop","Files","WebRTC low-latency","iOS \xb7 Android \xb7 Web"].map(e=>(0,a.jsx)("span",{className:"font-mono text-xs text-text-muted px-3 py-1.5 rounded-full border border-border-subtle",children:e},e))}),(0,a.jsxs)("div",{className:"rounded-xl border border-border-subtle bg-surface-2/60 overflow-hidden max-w-md shadow-lg",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5 px-3 py-2 border-b border-border-subtle",children:[(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#ff5f57]"}),(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#febc2e]"}),(0,a.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-[#28c840]"}),(0,a.jsx)("span",{className:"ml-2 font-mono text-[10px] text-text-subtle",children:"dev@mac — zsh"})]}),(0,a.jsxs)("div",{className:"p-3.5 font-mono text-[12px] leading-relaxed",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-text-subtle",children:"➜"})," 9remote start"]}),(0,a.jsx)("div",{className:"text-text-subtle",children:"↳ tunnel up \xb7 pairing open"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-brand-500",children:"[ok]"})," ",(0,a.jsx)("span",{className:"text-text",children:"machine"})," ",(0,a.jsx)("span",{className:"text-text-subtle",children:"macbook-pro-m3"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-brand-500",children:"[ok]"})," ",(0,a.jsx)("span",{className:"text-text",children:"pty"})," ",(0,a.jsx)("span",{className:"text-text-subtle",children:"daemon v3.1 \xb7 12 warm"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-[#6aab6a]",children:"●"})," ",(0,a.jsx)("span",{className:"text-text-subtle",children:"waiting for phone…"})," ",(0,a.jsx)("span",{className:"inline-block w-[7px] h-[13px] bg-brand-500 align-middle animate-cursor-blink"})]})]})]})]}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-x-5 gap-y-1 font-mono text-[11px] text-text-subtle pt-8 relative z-10",children:[(0,a.jsx)("span",{children:"› PTY persistent"}),(0,a.jsx)("span",{children:"› end-to-end encrypted"}),(0,a.jsx)("span",{children:"› open source"})]})]}),(0,a.jsxs)("section",{className:"flex items-center justify-center p-6 sm:p-10 lg:border-l lg:border-border-subtle lg:bg-surface-1 relative",children:[(0,a.jsx)("div",{className:"login-mobile-glow lg:hidden","aria-hidden":!0}),(0,a.jsxs)("div",{className:"relative z-10 w-full max-w-sm space-y-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3 mb-6",children:[(0,a.jsx)("img",{src:"/icon-192.png",alt:"9Remote Logo",className:"w-10 h-10 rounded-[11px] object-contain shadow-lg shadow-brand-500/20"}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("h1",{className:"text-[22px] font-bold tracking-tight text-text leading-none",children:"9Remote"}),Q&&(0,a.jsxs)("p",{className:"font-mono text-[11px] text-text-subtle mt-1",children:["v",Q]})]}),(0,a.jsx)(y,{}),(0,a.jsx)(v.A,{})]}),(0,a.jsx)("p",{className:"text-text-muted text-lg font-medium leading-snug pr-4 mb-6 lg:hidden",children:e("login.tagline")}),(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-2.5",children:[(0,a.jsx)(d.Ay,{name:"KeyRound",className:"text-text-muted opacity-70",size:14}),(0,a.jsx)("span",{className:"text-[13px] font-semibold text-text",children:e("login.accessKey")})]}),(0,a.jsxs)("div",{className:"relative",children:[(0,a.jsx)("input",{id:"accessKeyInput",type:"text",value:t,onChange:e=>{let t=e.target.value;s(t.length<=F.qM?t.toUpperCase():t.toLowerCase())},onKeyDown:e=>"Enter"===e.key&&t&&ej(),placeholder:e("login.placeholder"),className:"w-full pl-3.5 pr-20 py-3 bg-surface-2 border border-border-subtle rounded-[10px] font-mono text-sm text-text placeholder-text-subtle focus:outline-none focus:border-brand-500 focus:ring-2 focus:ring-brand-500/20 transition-all duration-150"}),(0,a.jsxs)("div",{className:"absolute right-2.5 top-1/2 -translate-y-1/2 flex items-center gap-1",children:[t&&(0,a.jsx)(a.Fragment,{children:(0,a.jsx)("button",{onMouseDown:e=>e.preventDefault(),onClick:()=>{s("")},className:"w-7 h-7 grid place-items-center rounded-[7px] text-text-subtle hover:bg-surface-3 hover:text-text transition-colors",type:"button",children:(0,a.jsx)(d.X,{size:16})})}),(0,a.jsx)("button",{onMouseDown:e=>e.preventDefault(),onClick:()=>A(!0),className:"w-7 h-7 grid place-items-center rounded-[7px] text-text-subtle hover:bg-surface-3 hover:text-brand-500 transition-colors",type:"button","aria-label":e("login.scanQr"),children:(0,a.jsx)(d.Ay,{name:"QrCode",size:16})})]})]}),(es||er)&&(0,a.jsx)("p",{className:"mt-2 text-xs font-mono text-danger",children:"agent-offline"===es?e("login.agentOffline"):es&&"wrong-key-tail"!==es?es:e("login.invalidKeyTail")}),(0,a.jsxs)("label",{className:"flex items-center gap-2.5 cursor-pointer mt-4 select-none",children:[(0,a.jsx)("input",{type:"checkbox",checked:b,onChange:e=>{var t;f(t=e.target.checked),localStorage.setItem("9remote_remember_key_preference",t)},className:"w-[15px] h-[15px] accent-brand-500"}),(0,a.jsx)("span",{className:"text-[13px] text-text-muted",children:e("login.rememberKey")})]}),(0,a.jsx)(x.A,{variant:"primary",onClick:ej,loading:et,className:"btn-cta w-full mt-4",children:(0,a.jsxs)("span",{className:"inline-flex items-center justify-center gap-2",children:[e("login.connect"),(0,a.jsx)(d.Ay,{name:"ArrowRight",size:16})]})}),k&&j.length>0&&(0,a.jsxs)("div",{className:"mt-5 pt-5 border-t border-border-subtle",children:[(0,a.jsx)("div",{className:"font-mono text-[11px] uppercase tracking-wider text-text-subtle mb-1 px-1",children:e("login.savedKeys")}),eu&&(0,a.jsxs)("div",{className:"my-2.5 px-3 py-2.5 bg-amber-500/10 border border-amber-500/30 rounded-brand-lg flex items-start gap-2.5",children:[(0,a.jsx)(d.Ay,{name:"AlertCircle",size:16,className:"text-amber-500 shrink-0 mt-0.5"}),(0,a.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,a.jsx)("div",{className:"text-xs font-medium text-text",children:e("login.legacyKeyUpdateRequired")}),(0,a.jsx)("div",{className:"text-xs text-text-muted mt-0.5",children:e("login.legacyKeyUpdateHint")}),(0,a.jsx)("code",{className:"inline-block mt-1.5 px-2 py-0.5 bg-surface-2 border border-border text-text text-xs rounded font-mono select-all",children:"npm i -g 9remote@latest"})]})]}),j.map(t=>{let s=z===t.id,n=W===t.key,r=(0,$.PF)(t.key);return(0,a.jsxs)("div",{className:`flex items-center gap-3 px-1 py-2 rounded-[10px] hover:bg-surface-2 transition-colors cursor-pointer ${r?"opacity-85":""}`,onClick:()=>!s&&!n&&ey(t.key),role:"button",tabIndex:0,children:[(0,a.jsx)("div",{className:`w-12 h-12 rounded-[12px] bg-surface-2 border ${r?"border-amber-500/40 text-amber-500":"border-border-subtle text-text-muted"} grid place-items-center flex-shrink-0`,children:(0,a.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round",className:"w-[26px] h-[26px]",children:[(0,a.jsx)("rect",{x:"2",y:"4",width:"20",height:"13",rx:"2"}),(0,a.jsx)("line",{x1:"2",y1:"20",x2:"22",y2:"20"})]})}),(0,a.jsx)("div",{className:"flex-1 min-w-0",children:s?(0,a.jsxs)("div",{className:"flex items-center gap-1",onClick:e=>e.stopPropagation(),children:[(0,a.jsx)("input",{autoFocus:!0,value:E,onChange:e=>R(e.target.value),onKeyDown:e=>{"Enter"===e.key&&ev(t.id),"Escape"===e.key&&ew()},placeholder:e("login.namePlaceholder"),className:"flex-1 min-w-0 bg-surface-2 border border-brand-500 rounded-md text-text text-[13px] px-2 py-1 outline-none"}),(0,a.jsx)("button",{onClick:()=>ev(t.id),className:"w-6 h-6 grid place-items-center rounded-md bg-brand-500 text-white","aria-label":e("common.done"),children:(0,a.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:3,strokeLinecap:"round",strokeLinejoin:"round",className:"w-3 h-3",children:(0,a.jsx)("polyline",{points:"20 6 9 17 4 12"})})}),(0,a.jsx)("button",{onClick:ew,className:"w-6 h-6 grid place-items-center rounded-md bg-surface-2 text-text-muted","aria-label":e("common.cancel"),children:(0,a.jsx)(d.X,{size:13})})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-[13px] font-medium text-text truncate",title:t.label||e("agentSwitcher.unnamed"),children:t.label||e("agentSwitcher.unnamed")}),r&&(0,a.jsx)("span",{className:"shrink-0 px-1.5 py-0.5 text-[9px] font-semibold font-mono uppercase rounded bg-amber-500/15 text-amber-500 border border-amber-500/30",children:e("login.updateRequired")})]}),(0,a.jsx)("div",{className:"font-mono text-[11px] text-text-subtle mt-0.5 truncate",children:(0,o.o)(t.key)})]})}),!s&&(0,a.jsx)("span",{className:"font-mono text-[11px] text-text-subtle whitespace-nowrap",children:n?e("agentSwitcher.connecting"):(t=>{if(!t)return"";try{let s=new Date(t),a=new Date-s,n=Math.floor(a/6e4),r=Math.floor(a/36e5),l=Math.floor(a/864e5);if(n<1)return e("login.justNow");if(n<60)return e("login.minutesAgo",{n:n});if(r<24)return e("login.hoursAgo",{n:r});if(l<7)return e("login.daysAgo",{n:l});return s.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"})}catch{return""}})(t.lastLoginDate)}),!s&&(0,a.jsxs)("div",{className:"flex gap-0.5",onClick:e=>e.stopPropagation(),children:[(0,a.jsx)("button",{onClick:()=>{I(t.id),R(t.label||"")},title:e("common.edit"),className:"w-[26px] h-[26px] grid place-items-center rounded-[7px] text-text-subtle hover:bg-surface-3 hover:text-text transition-colors",children:(0,a.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"w-3.5 h-3.5",children:[(0,a.jsx)("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),(0,a.jsx)("path",{d:"M18.5 2.5a2.12 2.12 0 0 1 3 3L12 15l-4 1 1-4z"})]})}),(0,a.jsx)("button",{onClick:()=>G(t),title:e("common.delete"),className:"w-[26px] h-[26px] grid place-items-center rounded-[7px] text-text-subtle hover:bg-surface-3 hover:text-danger transition-colors",children:(0,a.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"w-3.5 h-3.5",children:[(0,a.jsx)("polyline",{points:"3 6 5 6 21 6"}),(0,a.jsx)("path",{d:"M19 6l-2 14a2 2 0 0 1-2 2H9a2 2 0 0 1-2-2L5 6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"})]})})]})]},t.id)})]}),(0,a.jsxs)("div",{className:"flex items-center justify-center gap-2 pt-1 text-text-subtle",children:[(0,a.jsx)("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:"w-3.5 h-3.5",children:(0,a.jsx)("path",{d:"M12 2l9 4v6c0 5-3.8 9.7-9 11-5.2-1.3-9-6-9-11V6l9-4z"})}),(0,a.jsx)("span",{className:"font-mono text-[11px]",children:e("login.secureTitle")})]})]})]})]}),(0,a.jsx)(u,{isOpen:S,onClose:()=>A(!1),onScan:eN}),(0,a.jsx)(h.A,{isOpen:!!D,onClose:()=>G(null),onConfirm:()=>{D&&(ec(D.id),N(ei()))},title:e("login.deleteKeyTitle"),message:e("login.deleteKeyConfirm",{name:D?.label}),confirmText:e("common.delete")})]})}function G(){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(g.A,{}),(0,a.jsx)(c.A,{children:(0,a.jsxs)("div",{className:"flex flex-col items-center gap-4",children:[(0,a.jsx)(p.A,{text:"Loading..."}),(0,a.jsx)("a",{href:"/login",className:"text-sm text-text-muted hover:text-brand-500 underline underline-offset-4 transition-colors",children:"Reload"})]})})]})}function W(){return(0,a.jsx)(n.Suspense,{fallback:(0,a.jsx)(G,{}),children:(0,a.jsx)(D,{})})}},59893:(e,t,s)=>{"use strict";s.d(t,{A:()=>n});var a=s(73365);function n({children:e,centered:t=!0,className:s=""}){return(0,a.jsx)("div",{className:`min-h-screen ${t?"flex items-center justify-center p-4":""} ${s}`,children:e})}},66859:(e,t,s)=>{Promise.resolve().then(s.bind(s,45136))},90753:(e,t,s)=>{"use strict";s.d(t,{A:()=>o});var a=s(73365),n=s(44976),r=s(8910);let l=({size:e=18})=>(0,a.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,a.jsx)("circle",{cx:"12",cy:"12",r:"4"}),(0,a.jsx)("path",{d:"M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41"})]}),i=({size:e=18})=>(0,a.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,a.jsx)("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})});function o({className:e="",size:t=18}){let{theme:s,toggleTheme:c}=(0,n.D)(),d="dark"===s;return(0,a.jsx)("button",{type:"button",onClick:()=>{(0,r.e)(),c()},"aria-label":d?"Switch to light theme":"Switch to dark theme",title:d?"Light mode":"Dark mode",className:`p-1.5 rounded-brand transition-colors text-[var(--color-text-muted)] hover:text-[var(--color-text)] hover:bg-[var(--color-surface-2)] ${e}`,children:d?(0,a.jsx)(l,{size:t}):(0,a.jsx)(i,{size:t})})}}},e=>{e.O(0,[1236,7629,635,8922,3973,2347,5158,7358],()=>e(e.s=66859)),_N_E=e.O()}]);