9remote 3.0.0 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +2 -2
- package/dist/server.cjs +5 -5
- package/dist/ui/assets/index-Ckex1BQP.js +8 -0
- package/dist/ui/index.html +1 -1
- package/dist/web/404.html +1 -1
- package/dist/web/__next.__PAGE__.txt +2 -2
- package/dist/web/__next._full.txt +2 -2
- package/dist/web/__next._head.txt +1 -1
- package/dist/web/__next._index.txt +1 -1
- package/dist/web/__next._tree.txt +1 -1
- package/dist/web/_next/static/chunks/3973-3a61c2014e1b09b8.js +1 -0
- package/dist/web/_next/static/chunks/6552-a42cab8d91efbdea.js +1 -0
- package/dist/web/_next/static/chunks/app/login/{page-31786ee656da76b1.js → page-3e24e4b0ca0a7df2.js} +1 -1
- package/dist/web/_next/static/chunks/app/page-35b671680baa15ac.js +22 -0
- package/dist/web/_next/static/chunks/app/workspace/{layout-5e8f95fbc4ebaa6b.js → layout-45760b58dab691e3.js} +4 -4
- package/dist/web/_not-found/__next._full.txt +1 -1
- package/dist/web/_not-found/__next._head.txt +1 -1
- package/dist/web/_not-found/__next._index.txt +1 -1
- package/dist/web/_not-found/__next._not-found.__PAGE__.txt +1 -1
- package/dist/web/_not-found/__next._not-found.txt +1 -1
- package/dist/web/_not-found/__next._tree.txt +1 -1
- package/dist/web/_not-found.html +1 -1
- package/dist/web/_not-found.txt +1 -1
- package/dist/web/admin/__next._full.txt +1 -1
- package/dist/web/admin/__next._head.txt +1 -1
- package/dist/web/admin/__next._index.txt +1 -1
- package/dist/web/admin/__next._tree.txt +1 -1
- package/dist/web/admin/__next.admin.__PAGE__.txt +1 -1
- package/dist/web/admin/__next.admin.txt +1 -1
- package/dist/web/admin/admins/__next._full.txt +1 -1
- package/dist/web/admin/admins/__next._head.txt +1 -1
- package/dist/web/admin/admins/__next._index.txt +1 -1
- package/dist/web/admin/admins/__next._tree.txt +1 -1
- package/dist/web/admin/admins/__next.admin.admins.__PAGE__.txt +1 -1
- package/dist/web/admin/admins/__next.admin.admins.txt +1 -1
- package/dist/web/admin/admins/__next.admin.txt +1 -1
- package/dist/web/admin/admins.html +1 -1
- package/dist/web/admin/admins.txt +1 -1
- package/dist/web/admin/login/__next._full.txt +1 -1
- package/dist/web/admin/login/__next._head.txt +1 -1
- package/dist/web/admin/login/__next._index.txt +1 -1
- package/dist/web/admin/login/__next._tree.txt +1 -1
- package/dist/web/admin/login/__next.admin.login.__PAGE__.txt +1 -1
- package/dist/web/admin/login/__next.admin.login.txt +1 -1
- package/dist/web/admin/login/__next.admin.txt +1 -1
- package/dist/web/admin/login.html +1 -1
- package/dist/web/admin/login.txt +1 -1
- package/dist/web/admin/modes/__next._full.txt +1 -1
- package/dist/web/admin/modes/__next._head.txt +1 -1
- package/dist/web/admin/modes/__next._index.txt +1 -1
- package/dist/web/admin/modes/__next._tree.txt +1 -1
- package/dist/web/admin/modes/__next.admin.modes.__PAGE__.txt +1 -1
- package/dist/web/admin/modes/__next.admin.modes.txt +1 -1
- package/dist/web/admin/modes/__next.admin.txt +1 -1
- package/dist/web/admin/modes.html +1 -1
- package/dist/web/admin/modes.txt +1 -1
- package/dist/web/admin/ota/__next._full.txt +1 -1
- package/dist/web/admin/ota/__next._head.txt +1 -1
- package/dist/web/admin/ota/__next._index.txt +1 -1
- package/dist/web/admin/ota/__next._tree.txt +1 -1
- package/dist/web/admin/ota/__next.admin.ota.__PAGE__.txt +1 -1
- package/dist/web/admin/ota/__next.admin.ota.txt +1 -1
- package/dist/web/admin/ota/__next.admin.txt +1 -1
- package/dist/web/admin/ota.html +1 -1
- package/dist/web/admin/ota.txt +1 -1
- package/dist/web/admin/turn/__next._full.txt +1 -1
- package/dist/web/admin/turn/__next._head.txt +1 -1
- package/dist/web/admin/turn/__next._index.txt +1 -1
- package/dist/web/admin/turn/__next._tree.txt +1 -1
- package/dist/web/admin/turn/__next.admin.turn.__PAGE__.txt +1 -1
- package/dist/web/admin/turn/__next.admin.turn.txt +1 -1
- package/dist/web/admin/turn/__next.admin.txt +1 -1
- package/dist/web/admin/turn.html +1 -1
- package/dist/web/admin/turn.txt +1 -1
- package/dist/web/admin.html +1 -1
- package/dist/web/admin.txt +1 -1
- package/dist/web/dev/question/__next._full.txt +2 -2
- package/dist/web/dev/question/__next._head.txt +1 -1
- package/dist/web/dev/question/__next._index.txt +1 -1
- package/dist/web/dev/question/__next._tree.txt +1 -1
- package/dist/web/dev/question/__next.dev.question.__PAGE__.txt +2 -2
- package/dist/web/dev/question/__next.dev.question.txt +1 -1
- package/dist/web/dev/question/__next.dev.txt +1 -1
- package/dist/web/dev/question.html +1 -1
- package/dist/web/dev/question.txt +2 -2
- package/dist/web/index.html +1 -1
- package/dist/web/index.txt +2 -2
- package/dist/web/login/__next._full.txt +2 -2
- package/dist/web/login/__next._head.txt +1 -1
- package/dist/web/login/__next._index.txt +1 -1
- package/dist/web/login/__next._tree.txt +1 -1
- package/dist/web/login/__next.login.__PAGE__.txt +2 -2
- package/dist/web/login/__next.login.txt +1 -1
- package/dist/web/login.html +1 -1
- package/dist/web/login.txt +2 -2
- package/dist/web/workspace/__next._full.txt +2 -2
- package/dist/web/workspace/__next._head.txt +1 -1
- package/dist/web/workspace/__next._index.txt +1 -1
- package/dist/web/workspace/__next._tree.txt +1 -1
- package/dist/web/workspace/__next.workspace.__PAGE__.txt +1 -1
- package/dist/web/workspace/__next.workspace.txt +2 -2
- package/dist/web/workspace/browse/__next._full.txt +2 -2
- package/dist/web/workspace/browse/__next._head.txt +1 -1
- package/dist/web/workspace/browse/__next._index.txt +1 -1
- package/dist/web/workspace/browse/__next._tree.txt +1 -1
- package/dist/web/workspace/browse/__next.workspace.browse.__PAGE__.txt +1 -1
- package/dist/web/workspace/browse/__next.workspace.browse.txt +1 -1
- package/dist/web/workspace/browse/__next.workspace.txt +2 -2
- package/dist/web/workspace/browse.html +1 -1
- package/dist/web/workspace/browse.txt +2 -2
- package/dist/web/workspace/editor/__next._full.txt +2 -2
- package/dist/web/workspace/editor/__next._head.txt +1 -1
- package/dist/web/workspace/editor/__next._index.txt +1 -1
- package/dist/web/workspace/editor/__next._tree.txt +1 -1
- package/dist/web/workspace/editor/__next.workspace.editor.__PAGE__.txt +1 -1
- package/dist/web/workspace/editor/__next.workspace.editor.txt +1 -1
- package/dist/web/workspace/editor/__next.workspace.txt +2 -2
- package/dist/web/workspace/editor.html +1 -1
- package/dist/web/workspace/editor.txt +2 -2
- package/dist/web/workspace/files/__next._full.txt +2 -2
- package/dist/web/workspace/files/__next._head.txt +1 -1
- package/dist/web/workspace/files/__next._index.txt +1 -1
- package/dist/web/workspace/files/__next._tree.txt +1 -1
- package/dist/web/workspace/files/__next.workspace.files.__PAGE__.txt +1 -1
- package/dist/web/workspace/files/__next.workspace.files.txt +1 -1
- package/dist/web/workspace/files/__next.workspace.txt +2 -2
- package/dist/web/workspace/files.html +1 -1
- package/dist/web/workspace/files.txt +2 -2
- package/dist/web/workspace/git/__next._full.txt +2 -2
- package/dist/web/workspace/git/__next._head.txt +1 -1
- package/dist/web/workspace/git/__next._index.txt +1 -1
- package/dist/web/workspace/git/__next._tree.txt +1 -1
- package/dist/web/workspace/git/__next.workspace.git.__PAGE__.txt +1 -1
- package/dist/web/workspace/git/__next.workspace.git.txt +1 -1
- package/dist/web/workspace/git/__next.workspace.txt +2 -2
- package/dist/web/workspace/git.html +1 -1
- package/dist/web/workspace/git.txt +2 -2
- package/dist/web/workspace/mobile/__next._full.txt +2 -2
- package/dist/web/workspace/mobile/__next._head.txt +1 -1
- package/dist/web/workspace/mobile/__next._index.txt +1 -1
- package/dist/web/workspace/mobile/__next._tree.txt +1 -1
- package/dist/web/workspace/mobile/__next.workspace.mobile.__PAGE__.txt +1 -1
- package/dist/web/workspace/mobile/__next.workspace.mobile.txt +1 -1
- package/dist/web/workspace/mobile/__next.workspace.txt +2 -2
- package/dist/web/workspace/mobile.html +1 -1
- package/dist/web/workspace/mobile.txt +2 -2
- package/dist/web/workspace/remote/__next._full.txt +2 -2
- package/dist/web/workspace/remote/__next._head.txt +1 -1
- package/dist/web/workspace/remote/__next._index.txt +1 -1
- package/dist/web/workspace/remote/__next._tree.txt +1 -1
- package/dist/web/workspace/remote/__next.workspace.remote.__PAGE__.txt +1 -1
- package/dist/web/workspace/remote/__next.workspace.remote.txt +1 -1
- package/dist/web/workspace/remote/__next.workspace.txt +2 -2
- package/dist/web/workspace/remote.html +1 -1
- package/dist/web/workspace/remote.txt +2 -2
- package/dist/web/workspace/terminal/default/__next._full.txt +2 -2
- package/dist/web/workspace/terminal/default/__next._head.txt +1 -1
- package/dist/web/workspace/terminal/default/__next._index.txt +1 -1
- package/dist/web/workspace/terminal/default/__next._tree.txt +1 -1
- package/dist/web/workspace/terminal/default/__next.workspace.terminal.$d$sessionId.__PAGE__.txt +1 -1
- package/dist/web/workspace/terminal/default/__next.workspace.terminal.$d$sessionId.txt +1 -1
- package/dist/web/workspace/terminal/default/__next.workspace.terminal.txt +1 -1
- package/dist/web/workspace/terminal/default/__next.workspace.txt +2 -2
- package/dist/web/workspace/terminal/default.html +1 -1
- package/dist/web/workspace/terminal/default.txt +2 -2
- package/dist/web/workspace/workspaces/__next._full.txt +2 -2
- package/dist/web/workspace/workspaces/__next._head.txt +1 -1
- package/dist/web/workspace/workspaces/__next._index.txt +1 -1
- package/dist/web/workspace/workspaces/__next._tree.txt +1 -1
- package/dist/web/workspace/workspaces/__next.workspace.txt +2 -2
- package/dist/web/workspace/workspaces/__next.workspace.workspaces.__PAGE__.txt +1 -1
- package/dist/web/workspace/workspaces/__next.workspace.workspaces.txt +1 -1
- package/dist/web/workspace/workspaces.html +1 -1
- package/dist/web/workspace/workspaces.txt +2 -2
- package/dist/web/workspace.html +1 -1
- package/dist/web/workspace.txt +2 -2
- package/package.json +1 -1
- package/dist/ui/assets/index-EXcI2V_p.js +0 -8
- package/dist/web/_next/static/chunks/3973-9b18bcd9afc0bcb4.js +0 -1
- package/dist/web/_next/static/chunks/6552-145e634541b5b66c.js +0 -1
- package/dist/web/_next/static/chunks/app/page-1cf39061b48db156.js +0 -22
- /package/dist/web/_next/static/{AUHtJgkYALYyNwHop9pgT → ddcA6fYUJfX5M6tasvU49}/_buildManifest.js +0 -0
- /package/dist/web/_next/static/{AUHtJgkYALYyNwHop9pgT → ddcA6fYUJfX5M6tasvU49}/_ssgManifest.js +0 -0
package/dist/web/_next/static/chunks/app/login/{page-31786ee656da76b1.js → page-3e24e4b0ca0a7df2.js}
RENAMED
|
@@ -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.2",{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()}]);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8974],{1988:(e,t,s)=>{"use strict";var r=s(70636);s(67497);var o=s(1521),a=o&&"object"==typeof o&&"default"in o?o:{default:o},n=void 0!==r&&r.env&&!0,l=function(e){return"[object String]"===Object.prototype.toString.call(e)},i=function(){function e(e){var t=void 0===e?{}:e,s=t.name,r=void 0===s?"stylesheet":s,o=t.optimizeForSpeed,a=void 0===o?n:o;c(l(r),"`name` must be a string"),this._name=r,this._deletedRulePlaceholder="#"+r+"-deleted-rule____{}",c("boolean"==typeof a,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=a,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0;var i=document.querySelector('meta[property="csp-nonce"]');this._nonce=i?i.getAttribute("content"):null}var t,s=e.prototype;return s.setOptimizeForSpeed=function(e){c("boolean"==typeof e,"`setOptimizeForSpeed` accepts a boolean"),c(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=e,this.inject()},s.isOptimizeForSpeed=function(){return this._optimizeForSpeed},s.inject=function(){var e=this;if(c(!this._injected,"sheet already injected"),this._injected=!0,this._optimizeForSpeed){this._tags[0]=this.makeStyleTag(this._name),this._optimizeForSpeed="insertRule"in this.getSheet(),this._optimizeForSpeed||(n||console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode."),this.flush(),this._injected=!0);return}this._serverSheet={cssRules:[],insertRule:function(t,s){return"number"==typeof s?e._serverSheet.cssRules[s]={cssText:t}:e._serverSheet.cssRules.push({cssText:t}),s},deleteRule:function(t){e._serverSheet.cssRules[t]=null}}},s.getSheetForTag=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]},s.getSheet=function(){return this.getSheetForTag(this._tags[this._tags.length-1])},s.insertRule=function(e,t){if(c(l(e),"`insertRule` accepts only strings"),this._optimizeForSpeed){var s=this.getSheet();"number"!=typeof t&&(t=s.cssRules.length);try{s.insertRule(e,t)}catch(t){return n||console.warn("StyleSheet: illegal rule: \n\n"+e+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),-1}}else{var r=this._tags[t];this._tags.push(this.makeStyleTag(this._name,e,r))}return this._rulesCount++},s.replaceRule=function(e,t){if(this._optimizeForSpeed){var s=this.getSheet();if(t.trim()||(t=this._deletedRulePlaceholder),!s.cssRules[e])return e;s.deleteRule(e);try{s.insertRule(t,e)}catch(r){n||console.warn("StyleSheet: illegal rule: \n\n"+t+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),s.insertRule(this._deletedRulePlaceholder,e)}}else{var r=this._tags[e];c(r,"old rule at index `"+e+"` not found"),r.textContent=t}return e},s.deleteRule=function(e){if(this._optimizeForSpeed)this.replaceRule(e,"");else{var t=this._tags[e];c(t,"rule at index `"+e+"` not found"),t.parentNode.removeChild(t),this._tags[e]=null}},s.flush=function(){this._injected=!1,this._rulesCount=0,this._tags.forEach(function(e){return e&&e.parentNode.removeChild(e)}),this._tags=[]},s.cssRules=function(){var e=this;return this._tags.reduce(function(t,s){return s?t=t.concat(Array.prototype.map.call(e.getSheetForTag(s).cssRules,function(t){return t.cssText===e._deletedRulePlaceholder?null:t})):t.push(null),t},[])},s.makeStyleTag=function(e,t,s){t&&c(l(t),"makeStyleTag accepts only strings as second parameter");var r=document.createElement("style");this._nonce&&r.setAttribute("nonce",this._nonce),r.type="text/css",r.setAttribute("data-"+e,""),t&&r.appendChild(document.createTextNode(t));var o=document.head||document.getElementsByTagName("head")[0];return s?o.insertBefore(r,s):o.appendChild(r),r},t=[{key:"length",get:function(){return this._rulesCount}}],function(e,t){for(var s=0;s<t.length;s++){var r=t[s];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(e.prototype,t),e}();function c(e,t){if(!e)throw Error("StyleSheet: "+t+".")}var d=function(e){for(var t=5381,s=e.length;s;)t=33*t^e.charCodeAt(--s);return t>>>0},m={};function h(e,t){if(!t)return"jsx-"+e;var s=String(t),r=e+s;return m[r]||(m[r]="jsx-"+d(e+"-"+s)),m[r]}function u(e,t){var s=e+t;return m[s]||(m[s]=t.replace(/__jsx-style-dynamic-selector/g,e)),m[s]}var x=function(){function e(e){var t=void 0===e?{}:e,s=t.styleSheet,r=void 0===s?null:s,o=t.optimizeForSpeed,a=void 0!==o&&o;this._sheet=r||new i({name:"styled-jsx",optimizeForSpeed:a}),this._sheet.inject(),r&&"boolean"==typeof a&&(this._sheet.setOptimizeForSpeed(a),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer=void 0,this._indices={},this._instancesCounts={}}var t=e.prototype;return t.add=function(e){var t=this;void 0===this._optimizeForSpeed&&(this._optimizeForSpeed=Array.isArray(e.children),this._sheet.setOptimizeForSpeed(this._optimizeForSpeed),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer||(this._fromServer=this.selectFromServer(),this._instancesCounts=Object.keys(this._fromServer).reduce(function(e,t){return e[t]=0,e},{}));var s=this.getIdAndRules(e),r=s.styleId,o=s.rules;if(r in this._instancesCounts){this._instancesCounts[r]+=1;return}var a=o.map(function(e){return t._sheet.insertRule(e)}).filter(function(e){return -1!==e});this._indices[r]=a,this._instancesCounts[r]=1},t.remove=function(e){var t=this,s=this.getIdAndRules(e).styleId;if(function(e,t){if(!e)throw Error("StyleSheetRegistry: "+t+".")}(s in this._instancesCounts,"styleId: `"+s+"` not found"),this._instancesCounts[s]-=1,this._instancesCounts[s]<1){var r=this._fromServer&&this._fromServer[s];r?(r.parentNode.removeChild(r),delete this._fromServer[s]):(this._indices[s].forEach(function(e){return t._sheet.deleteRule(e)}),delete this._indices[s]),delete this._instancesCounts[s]}},t.update=function(e,t){this.add(t),this.remove(e)},t.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},t.cssRules=function(){var e=this,t=this._fromServer?Object.keys(this._fromServer).map(function(t){return[t,e._fromServer[t]]}):[],s=this._sheet.cssRules();return t.concat(Object.keys(this._indices).map(function(t){return[t,e._indices[t].map(function(e){return s[e].cssText}).join(e._optimizeForSpeed?"":"\n")]}).filter(function(e){return!!e[1]}))},t.styles=function(e){var t,s;return t=this.cssRules(),void 0===(s=e)&&(s={}),t.map(function(e){var t=e[0],r=e[1];return a.default.createElement("style",{id:"__"+t,key:"__"+t,nonce:s.nonce?s.nonce:void 0,dangerouslySetInnerHTML:{__html:r}})})},t.getIdAndRules=function(e){var t=e.children,s=e.dynamic,r=e.id;if(s){var o=h(r,s);return{styleId:o,rules:Array.isArray(t)?t.map(function(e){return u(o,e)}):[u(o,t)]}}return{styleId:h(r),rules:Array.isArray(t)?t:[t]}},t.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(e,t){return e[t.id.slice(2)]=t,e},{})},e}(),p=o.createContext(null);p.displayName="StyleSheetContext";var f=a.default.useInsertionEffect||a.default.useLayoutEffect,b=new x;function y(e){var t=b||o.useContext(p);return t&&f(function(){return t.add(e),function(){t.remove(e)}},[e.id,String(e.dynamic)]),null}y.dynamic=function(e){return e.map(function(e){return h(e[0],e[1])}).join(" ")},t.style=y},28913:(e,t,s)=>{"use strict";e.exports=s(1988).style},38415:(e,t,s)=>{"use strict";s.d(t,{Gf:()=>i,Gi:()=>h,Hu:()=>l,Nn:()=>d,O8:()=>a,cu:()=>c,ij:()=>m,l7:()=>n,no:()=>u,pe:()=>r,rl:()=>o,xO:()=>x});let r="https://api.github.com",o="https://github.com/decolua/9remote",a=`${r}/repos/decolua/9remote`,n=!1,l=".devcontainer/devcontainer.json",i="NREMOTE_API_KEY",c={name:"9Remote",image:"mcr.microsoft.com/devcontainers/universal:latest",postCreateCommand:"npm install -g 9remote@latest",postAttachCommand:"nohup 9remote start > /tmp/9remote.log 2>&1 &",forwardPorts:[2208],portsAttributes:{2208:{label:"9Remote Server",onAutoForward:"silent",visibility:"public"}}},d=3e3,m=60,h={available:"Available",starting:"Starting",shutdown:"Shutdown",unknown:"Unknown"},u={user:"/user",codespaces:"/user/codespaces",codespaceByName:e=>`/user/codespaces/${e}`,startCodespace:e=>`/user/codespaces/${e}/start`,userReposList:"/user/repos?per_page=100&sort=updated&affiliation=owner,collaborator",repoContents:(e,t,s)=>`/repos/${e}/${t}/contents/${s}`,createCodespaceForRepo:(e,t)=>`/repos/${e}/${t}/codespaces`,codespaceSecretsPublicKey:"/user/codespaces/secrets/public-key",codespaceSecret:e=>`/user/codespaces/secrets/${e}`,codespaceSecretRepos:(e,t)=>`/user/codespaces/secrets/${e}/repositories/${t}`};function x(e){return`https://${e}-2208.app.github.dev`}},48310:(e,t,s)=>{"use strict";s.d(t,{w:()=>n});var r=s(1521),o=s(38415);let a="9remote_github_stars";function n(){let[e,t]=(0,r.useState)(null);return(0,r.useEffect)(()=>{try{let e=localStorage.getItem(a);if(e){let{count:s,timestamp:r}=JSON.parse(e);if("number"==typeof s&&t(s),Date.now()-r<36e5)return}}catch{}let e=!0;return fetch(o.O8).then(e=>e.ok?e.json():null).then(s=>{if(!e||"number"!=typeof s?.stargazers_count)return;let r=s.stargazers_count;t(r);try{localStorage.setItem(a,JSON.stringify({count:r,timestamp:Date.now()}))}catch{}}).catch(()=>{}),()=>{e=!1}},[]),{stars:e,formattedStars:null==e?"":e>=1e3?(e/1e3).toFixed(1).replace(/\.0$/,"")+"k":String(e)}}},58751:(e,t,s)=>{Promise.resolve().then(s.bind(s,91556))},67497:()=>{},90753:(e,t,s)=>{"use strict";s.d(t,{A:()=>i});var r=s(73365),o=s(44976),a=s(8910);let n=({size:e=18})=>(0,r.jsxs)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"4"}),(0,r.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"})]}),l=({size:e=18})=>(0,r.jsx)("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})});function i({className:e="",size:t=18}){let{theme:s,toggleTheme:c}=(0,o.D)(),d="dark"===s;return(0,r.jsx)("button",{type:"button",onClick:()=>{(0,a.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,r.jsx)(n,{size:t}):(0,r.jsx)(l,{size:t})})}},91556:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>Y});var r=s(73365),o=s(99568),a=s(30240),n=s(1521);let l="var(--color-bg)",i="var(--color-surface)",c="var(--color-surface-2)",d="var(--color-border)",m="var(--color-text)",h="var(--color-text-muted)",u="var(--color-text-subtle)",x="var(--color-accent)",p="color-mix(in srgb, var(--color-accent) 12%, transparent)",f="https://github.com/decolua/9remote/releases/latest/download",b=[{role:"Host",title:"On your machine",desc:"Serves your terminals, screen and files."},{role:"Client",title:"With you anywhere",desc:"Same session on any screen — nothing to sync."}];var y=s(90753),g=s(48310);let v=[{href:"#features",label:"Features"},{href:"#security",label:"Security"},{href:"#how-it-works",label:"How It Works"},{href:"https://docs.9remote.cc/",label:"Docs",external:!0},{href:"https://github.com/decolua/9remote",label:"GitHub",external:!0}];function j(){let[e,t]=(0,n.useState)(!1),[s,a]=(0,n.useState)(!1),{formattedStars:l}=(0,g.w)(),i="3.0.2";return(0,n.useEffect)(()=>{let e=()=>t(window.scrollY>20);return window.addEventListener("scroll",e),()=>window.removeEventListener("scroll",e)},[]),(0,r.jsxs)("nav",{className:"fixed top-0 left-0 right-0 z-50 transition-all duration-300",style:{background:e?"color-mix(in srgb, var(--color-bg) 75%, transparent)":"transparent",backdropFilter:e?"blur(16px)":"none",borderBottom:e?`1px solid ${d}`:"1px solid transparent"},children:[(0,r.jsxs)("div",{className:"max-w-7xl mx-auto px-6 h-16 flex items-center justify-between",children:[(0,r.jsxs)(o,{href:"/",className:"flex items-center gap-3 group",children:[(0,r.jsx)("img",{src:"/icon-192.png",alt:"9Remote Logo",className:"w-8 h-8 rounded-lg object-contain shadow-md shadow-brand-500/20"}),(0,r.jsx)("span",{className:"text-xl font-bold tracking-tight",style:{color:m},children:"9Remote"}),i&&(0,r.jsxs)("span",{className:"px-2 py-0.5 text-xs font-mono font-medium rounded-full bg-brand-500/10 text-brand-400 border border-brand-500/20",children:["v",i]})]}),(0,r.jsx)("div",{className:"hidden md:flex items-center gap-7",children:v.map(e=>(0,r.jsxs)("a",{href:e.href,target:e.external?"_blank":void 0,rel:e.external?"noopener noreferrer":void 0,className:"text-sm transition-colors flex items-center gap-1.5",style:{color:h},onMouseEnter:e=>e.currentTarget.style.color=m,onMouseLeave:e=>e.currentTarget.style.color=h,children:[(0,r.jsx)("span",{children:e.label}),"GitHub"===e.label&&l&&(0,r.jsxs)("span",{className:"text-[11px] font-mono px-1.5 py-0.5 rounded-full border border-border-subtle bg-surface-2/80 text-text",children:["★ ",l]})]},e.label))}),(0,r.jsxs)("div",{className:"hidden md:flex items-center gap-3",children:[(0,r.jsx)(y.A,{}),(0,r.jsx)("a",{href:"#how-it-works",className:"px-4 py-2 rounded-lg font-semibold text-sm border transition-transform hover:scale-[1.03]",style:{background:c,borderColor:d,color:m},children:(0,r.jsx)("span",{children:"Download Host"})}),(0,r.jsx)(o,{href:"/login",className:"btn-cta px-5 py-2 rounded-lg font-semibold text-sm transition-transform hover:scale-[1.03]",style:{background:"var(--color-text)",color:"var(--color-bg)"},children:(0,r.jsx)("span",{children:"Remote"})})]}),(0,r.jsxs)("div",{className:"md:hidden flex items-center gap-1.5",children:[(0,r.jsx)(y.A,{}),(0,r.jsx)("button",{onClick:()=>a(!s),className:"p-2",style:{color:m},children:(0,r.jsx)("svg",{className:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:s?(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"}):(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h16"})})})]})]}),s&&(0,r.jsx)("div",{className:"md:hidden",style:{background:"color-mix(in srgb, var(--color-bg) 95%, transparent)",backdropFilter:"blur(16px)",borderTop:`1px solid ${d}`},children:(0,r.jsxs)("div",{className:"flex flex-col gap-4 p-6",children:[v.map(e=>(0,r.jsxs)("a",{href:e.href,target:e.external?"_blank":void 0,rel:e.external?"noopener noreferrer":void 0,onClick:()=>a(!1),className:"text-sm flex items-center justify-between",style:{color:h},children:[(0,r.jsx)("span",{children:e.label}),"GitHub"===e.label&&l&&(0,r.jsxs)("span",{className:"text-xs font-mono px-2 py-0.5 rounded-full border border-border-subtle bg-surface-2 text-text",children:["★ ",l]})]},e.label)),(0,r.jsx)("a",{href:"#how-it-works",onClick:()=>a(!1),className:"px-6 py-2 rounded-lg font-semibold text-sm text-center border",style:{background:c,borderColor:d,color:m},children:"Download Host"}),(0,r.jsx)(o,{href:"/login",className:"px-6 py-2 rounded-lg font-semibold text-sm text-center",style:{background:"var(--color-text)",color:"var(--color-bg)"},children:"Remote"})]})})]})}var w=s(28913);let k=[{name:"Remote IDE",path:"M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"},{name:"Remote Vibe Coding",path:"M13 10V3L4 14h7v7l9-11h-7z"},{name:"Remote Desktop",path:"M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"},{name:"Remote Files",path:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},{name:"Remote Emulator",path:"M12 18h.01M8 21h8a2 2 0 002-2V5a2 2 0 00-2-2H8a2 2 0 00-2 2v14a2 2 0 002 2z"},{name:"Remote Localhost",path:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"},{name:"PC \xb7 Web \xb7 iPad \xb7 Mobile",path:"M12 18h.01M7 21h10a2 2 0 002-2V5a2 2 0 00-2-2H7a2 2 0 00-2 2v14a2 2 0 002 2z"}],N=[{src:"/screenshots/mobile-1.webp",alt:"Claude Code running in 9Remote on a phone"},{src:"/screenshots/mobile-2.webp",alt:"File explorer in 9Remote on a phone"},{src:"/screenshots/mobile-3.webp",alt:"System dashboard in 9Remote on a phone"}];function S(){return(0,r.jsxs)("section",{className:w.dynamic([["5086f7aaaeb15b68",[h,h]]])+" relative min-h-screen flex items-center px-4 sm:px-6 lg:px-8 pt-24 pb-16 overflow-hidden",children:[(0,r.jsx)("div",{className:w.dynamic([["5086f7aaaeb15b68",[h,h]]])+" max-w-7xl mx-auto relative z-10 w-full min-w-0",children:(0,r.jsxs)("div",{className:w.dynamic([["5086f7aaaeb15b68",[h,h]]])+" grid lg:grid-cols-2 gap-12 items-center min-w-0",children:[(0,r.jsxs)("div",{className:w.dynamic([["5086f7aaaeb15b68",[h,h]]])+" text-center lg:text-left",children:[(0,r.jsxs)("h1",{style:{fontWeight:900,lineHeight:1.1},className:w.dynamic([["5086f7aaaeb15b68",[h,h]]])+" mb-5 animate-fade-in-delay-1",children:[(0,r.jsx)("span",{style:{color:m},className:w.dynamic([["5086f7aaaeb15b68",[h,h]]])+" block text-2xl sm:text-3xl lg:text-4xl xl:text-5xl mb-2",children:"Remote Everything,"}),(0,r.jsx)("span",{style:{background:`linear-gradient(to right, ${m}, ${h})`,WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"},className:w.dynamic([["5086f7aaaeb15b68",[h,h]]])+" block text-2xl sm:text-3xl lg:text-4xl xl:text-5xl mb-3",children:"Vibecode Everywhere"})]}),(0,r.jsx)("div",{className:w.dynamic([["5086f7aaaeb15b68",[h,h]]])+" flex flex-wrap gap-2 mb-6 justify-center lg:justify-start animate-fade-in-delay-2",children:k.map(e=>(0,r.jsxs)("span",{style:{borderColor:d,background:c,color:m},className:w.dynamic([["5086f7aaaeb15b68",[h,h]]])+" inline-flex items-center gap-1.5 px-3 py-1 rounded-full text-xs font-mono font-medium border transition-colors hover:border-text-subtle",children:[(0,r.jsx)("svg",{style:{color:x},fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",className:w.dynamic([["5086f7aaaeb15b68",[h,h]]])+" w-3.5 h-3.5",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,d:e.path,className:w.dynamic([["5086f7aaaeb15b68",[h,h]]])})}),(0,r.jsx)("span",{className:w.dynamic([["5086f7aaaeb15b68",[h,h]]]),children:e.name})]},e.name))}),(0,r.jsx)("p",{"data-text":"Leave your laptop behind. Your entire dev workstation goes wherever you go — remote IDE, 60fps desktop, visual file explorer, live mobile emulator, and remote vibe coding with 30+ AI agents on PC, Web, iPad, or phone.",className:w.dynamic([["5086f7aaaeb15b68",[h,h]]])+" hero-gloss text-sm sm:text-base mb-8 max-w-xl mx-auto lg:mx-0",children:"Leave your laptop behind. Your entire dev workstation goes wherever you go — remote IDE, 60fps desktop, visual file explorer, live mobile emulator, and remote vibe coding with 30+ AI agents on PC, Web, iPad, or phone."}),(0,r.jsx)("div",{className:w.dynamic([["5086f7aaaeb15b68",[h,h]]])+" grid grid-cols-2 sm:grid-cols-4 gap-4 sm:gap-6 max-w-lg mx-auto lg:mx-0 mt-7 animate-fade-in-delay-6",children:[{val:"Direct P2P",label:"WebRTC DataChannel"},{val:"<20ms",label:"Ultra-Low Latency"},{val:"30+ AI Agents",label:"Vibe Coding Ready"},{val:"Persistent",label:"PTY Daemon Sessions"}].map(e=>(0,r.jsxs)("div",{className:w.dynamic([["5086f7aaaeb15b68",[h,h]]])+" text-center lg:text-left",children:[(0,r.jsx)("div",{style:{color:m},className:w.dynamic([["5086f7aaaeb15b68",[h,h]]])+" text-base sm:text-lg font-bold mb-0.5",children:e.val}),(0,r.jsx)("div",{style:{color:h},className:w.dynamic([["5086f7aaaeb15b68",[h,h]]])+" text-xs font-mono",children:e.label})]},e.label))})]}),(0,r.jsx)("div",{className:w.dynamic([["5086f7aaaeb15b68",[h,h]]])+" relative w-full flex justify-center items-center lg:justify-end animate-fade-in-delay-2 min-w-0 mt-4 lg:mt-0",children:(0,r.jsxs)("div",{className:w.dynamic([["5086f7aaaeb15b68",[h,h]]])+" relative w-full max-w-full sm:max-w-[620px] -translate-y-2 sm:-translate-y-5",children:[(0,r.jsx)("div",{style:{background:"radial-gradient(ellipse at center, rgba(255,255,255,0.10) 0%, transparent 70%)"},className:w.dynamic([["5086f7aaaeb15b68",[h,h]]])+" absolute -inset-8 opacity-50 blur-3xl pointer-events-none"}),(0,r.jsxs)("div",{style:{background:i,borderColor:d},className:w.dynamic([["5086f7aaaeb15b68",[h,h]]])+" relative rounded-xl overflow-hidden border shadow-2xl",children:[(0,r.jsxs)("div",{style:{background:c,borderColor:d},className:w.dynamic([["5086f7aaaeb15b68",[h,h]]])+" flex items-center gap-2 px-3 sm:px-4 py-2.5 sm:py-3 border-b",children:[(0,r.jsxs)("div",{className:w.dynamic([["5086f7aaaeb15b68",[h,h]]])+" flex gap-1.5 sm:gap-2 flex-shrink-0",children:[(0,r.jsx)("div",{style:{background:"#FF5F57"},className:w.dynamic([["5086f7aaaeb15b68",[h,h]]])+" w-2.5 h-2.5 sm:w-3 sm:h-3 rounded-full"}),(0,r.jsx)("div",{style:{background:"#FEBC2E"},className:w.dynamic([["5086f7aaaeb15b68",[h,h]]])+" w-2.5 h-2.5 sm:w-3 sm:h-3 rounded-full"}),(0,r.jsx)("div",{style:{background:"#28C840"},className:w.dynamic([["5086f7aaaeb15b68",[h,h]]])+" w-2.5 h-2.5 sm:w-3 sm:h-3 rounded-full"})]}),(0,r.jsxs)("span",{style:{color:h},className:w.dynamic([["5086f7aaaeb15b68",[h,h]]])+" ml-2 sm:ml-3 text-[10px] sm:text-xs font-mono truncate min-w-0",children:["9remote",(0,r.jsx)("span",{className:w.dynamic([["5086f7aaaeb15b68",[h,h]]])+" hidden sm:inline",children:" — desktop"})]})]}),(0,r.jsx)("img",{src:"/screenshots/desktop-ide.webp",alt:"9Remote desktop workspace: terminal, editor and AI agent panes side by side",className:w.dynamic([["5086f7aaaeb15b68",[h,h]]])+" w-full block"})]}),(0,r.jsx)("div",{className:w.dynamic([["5086f7aaaeb15b68",[h,h]]])+" mt-5 flex w-max mx-auto items-end gap-2 sm:absolute sm:mt-0 sm:mx-0 sm:-bottom-[134px] sm:-right-8 sm:gap-3 sm:origin-bottom-right sm:scale-[0.66]",children:N.map((e,t)=>(0,r.jsx)("div",{style:{background:l,border:"1px solid var(--color-border)",animationDelay:`${.9*t}s`},className:w.dynamic([["5086f7aaaeb15b68",[h,h]]])+" relative w-[100px] sm:w-[180px] rounded-[1.1rem] p-0.5 shadow-2xl animate-float-phone",children:(0,r.jsx)("img",{src:e.src,alt:e.alt,loading:"lazy",className:w.dynamic([["5086f7aaaeb15b68",[h,h]]])+" w-full block rounded-[0.95rem]"})},e.src))})]})})]})}),(0,r.jsx)(w,{id:"5086f7aaaeb15b68",dynamic:[h,h],children:`@keyframes fadeIn{from{opacity:0;transform:translatey(20px)}to{opacity:1;transform:translatey(0)}}.animate-fade-in-delay-1.__jsx-style-dynamic-selector{opacity:0;animation:fadeIn.8s ease-out.1s forwards}.hero-gloss.__jsx-style-dynamic-selector{position:relative;color:${h}}.hero-gloss.__jsx-style-dynamic-selector::after{content:attr(data-text);position:absolute;top:100%;left:0;right:0;white-space:pre-wrap;transform:scaley(-1);transform-origin:top;background:linear-gradient(to bottom,${h},transparent 40%);-webkit-background-clip:text;background-clip:text;color:transparent;opacity:.35;pointer-events:none;-webkit-user-select:none;user-select:none}.animate-fade-in-delay-4.__jsx-style-dynamic-selector{opacity:0;animation:fadeIn.8s ease-out.4s forwards}.animate-fade-in-delay-5.__jsx-style-dynamic-selector{opacity:0;animation:fadeIn.8s ease-out.5s forwards}.animate-fade-in-delay-6.__jsx-style-dynamic-selector{opacity:0;animation:fadeIn.8s ease-out.6s forwards}`})]})}function _(){if("u"<typeof navigator)return"other";let e=navigator.userAgent;return/iPhone|iPad|iPod/.test(e)?"other":/Mac/.test(e)?"macos":/Win/.test(e)?"windows":"other"}let C={Host:[{id:"app",label:"App"},{id:"npm",label:"npm"}],Client:[{id:"browser",label:"Browser"},{id:"desktop",label:"Desktop"},{id:"mobile",label:"Mobile"}]},R={macos:"macOS",windows:"Windows"},A={macos:"9remote.dmg",windows:"9remote.exe"};function M(){let e="3.0.2",t=(0,n.useSyncExternalStore)(()=>()=>{},_,()=>"other"),[s,a]=(0,n.useState)(!1),[l,p]=(0,n.useState)({}),y=()=>{navigator.clipboard?.writeText("npm i -g 9remote").catch(()=>{}),a(!0),setTimeout(()=>a(!1),2e3)};return(0,r.jsx)("section",{id:"how-it-works",className:"relative py-24 px-4 sm:px-6 lg:px-8",children:(0,r.jsxs)("div",{className:"max-w-5xl mx-auto",children:[(0,r.jsxs)("div",{className:"text-center mb-14",children:[(0,r.jsx)("h2",{className:"text-3xl sm:text-4xl lg:text-5xl font-bold mb-3",style:{color:m},children:"Two halves. One session."}),(0,r.jsx)("p",{className:"text-base sm:text-lg max-w-xl mx-auto",style:{color:h},children:"One command on your machine — then any browser joins it. Direct connection, no relay."})]}),(0,r.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-[1fr_auto_1fr] gap-4 md:gap-6 items-stretch",children:b.map((a,b)=>{let g=C[a.role],v=l[a.role]||("Client"===a.role?"browser":"app");return(0,r.jsxs)(n.Fragment,{children:[1===b&&(0,r.jsxs)("div",{className:"flex md:flex-col items-center justify-center gap-2 py-2 md:py-0",children:[(0,r.jsx)("span",{className:"text-[11px] font-mono px-2 py-0.5 rounded border whitespace-nowrap",style:{borderColor:d,background:c,color:x},children:"WebRTC"}),(0,r.jsx)("svg",{className:"w-6 h-6 rotate-90 md:rotate-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",style:{color:u},children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,d:"M4 12h16m0 0l-6-6m6 6l-6 6"})})]}),(0,r.jsxs)("div",{className:"p-6 sm:p-7 rounded-2xl border flex flex-col transition-all duration-300 hover:-translate-y-1",style:{background:i,borderColor:d},children:[(0,r.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,r.jsx)("span",{className:"text-[11px] font-mono font-bold px-2 py-0.5 rounded border uppercase tracking-wider",style:{borderColor:d,background:c,color:x},children:a.role}),e&&(0,r.jsxs)("span",{className:"text-[10px] font-mono px-1.5 py-0.5 rounded border",style:{borderColor:d,background:c,color:h},children:["v",e]})]}),(0,r.jsx)("h3",{className:"text-xl font-bold mb-1.5",style:{color:m},children:a.title}),(0,r.jsx)("p",{className:"text-sm mb-5",style:{color:h},children:a.desc}),(0,r.jsxs)("div",{className:"mt-auto flex flex-col items-center",children:[(0,r.jsx)("div",{className:"flex gap-0.5 p-1 rounded-lg border mb-6 w-full",style:{background:c,borderColor:d},children:g.map(e=>(0,r.jsx)("button",{onClick:()=>{let t;return t=e.id,p(e=>({...e,[a.role]:t}))},className:`flex-1 px-2.5 py-1.5 rounded-md text-xs font-medium transition-colors ${v===e.id?"":"hover:text-text"}`,style:v===e.id?{background:i,color:m,boxShadow:"0 1px 2px rgba(0,0,0,0.2)"}:{color:u},children:e.label},e.id))}),(0,r.jsx)("div",{className:"inline-block rounded-lg border overflow-hidden",style:{borderColor:d},children:"npm"===v?(0,r.jsxs)("button",{onClick:y,title:s?"Copied":"Copy",className:"w-full flex items-center gap-2 px-3 py-1.5 font-mono text-[13px] text-left transition-colors hover:bg-surface-2",style:{background:c},children:[(0,r.jsx)("span",{style:{color:u},children:"$"}),(0,r.jsx)("code",{className:"font-bold",style:{color:m},children:"npm i -g 9remote"}),(0,r.jsx)("span",{className:"ml-auto text-xs font-sans",style:{color:s?"var(--color-success)":u},children:s?"Copied":"Copy"})]}):"mobile"===v?(0,r.jsxs)("div",{className:"flex gap-2 w-full",children:[(0,r.jsxs)("a",{href:"https://apps.apple.com/us/app/9remote/id6796664210",target:"_blank",rel:"noopener noreferrer",className:"flex-1 flex items-center justify-center gap-1.5 px-3 py-1.5 text-[13px] font-semibold transition-opacity hover:opacity-90 whitespace-nowrap",style:{background:"var(--color-text)",color:"var(--color-bg)"},children:[(0,r.jsx)("svg",{className:"w-3.5 h-3.5 flex-shrink-0",viewBox:"0 0 24 24",fill:"currentColor",children:(0,r.jsx)("path",{d:"M18.71 19.5c-.83 1.24-1.71 2.45-3.05 2.47-1.34.03-1.77-.79-3.29-.79-1.53 0-2 .77-3.27.82-1.31.05-2.3-1.32-3.14-2.53C4.25 17 2.94 12.45 4.7 9.39c.87-1.52 2.43-2.48 4.12-2.51 1.28-.02 2.5.87 3.29.87.78 0 2.26-1.07 3.81-.91.65.03 2.47.26 3.64 1.98-.09.06-2.17 1.28-2.15 3.81.03 3.02 2.65 4.03 2.68 4.04-.03.07-.42 1.44-1.38 2.83M15.97 6.38c.62-.75 1.04-1.8 0.92-2.85-.9.04-2 .6-2.65 1.35-.58.66-1.09 1.73-.95 2.76.99.08 2.03-.51 2.68-1.26z"})}),"App Store"]}),(0,r.jsxs)("a",{href:"https://play.google.com/store/apps/details?id=cc.remote9.app&pli=1",target:"_blank",rel:"noopener noreferrer",className:"flex-1 flex items-center justify-center gap-1.5 px-3 py-1.5 text-[13px] font-semibold transition-opacity hover:opacity-90 whitespace-nowrap",style:{background:"var(--color-text)",color:"var(--color-bg)"},children:[(0,r.jsx)("svg",{className:"w-3.5 h-3.5 flex-shrink-0",viewBox:"0 0 24 24",fill:"currentColor",children:(0,r.jsx)("path",{d:"M3.609 1.814L13.793 12 3.61 22.186a2.128 2.128 0 0 1-.22-.964V2.778c0-.36.08-.694.22-.964zm11.233 11.234l2.584 2.584-11.834 6.83 9.25-9.414zm0-2.096L5.592 1.538l11.834 6.83-2.584 2.584zm1.485 1.048l3.633 2.098a1.328 1.328 0 0 0 0-2.296l-3.633-2.098-1.048 1.048 1.048 1.048z"})}),"Google Play"]})]}):(0,r.jsx)(o,{href:"browser"===v?"/login":"macos"===t?`${f}/9Remote-macos-universal.dmg`:"windows"===t?`${f}/9Remote-windows-x64-setup.exe`:"https://github.com/decolua/9remote/releases/latest",target:"browser"===v?void 0:"_blank",rel:"browser"===v?void 0:"noopener noreferrer",className:"w-full flex items-center justify-center gap-2 px-4 py-1.5 text-[13px] font-semibold transition-opacity hover:opacity-90",style:{background:"var(--color-text)",color:"var(--color-bg)"},children:"browser"===v?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("svg",{className:"w-4 h-4 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 11-9-9m9 9H3m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9"})}),"Open in Browser",(0,r.jsx)("span",{className:"ml-auto text-xs font-mono opacity-70",children:"→"})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("svg",{className:"w-4 h-4 flex-shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 3v12m0 0l-4-4m4 4l4-4M4 21h16"})}),"desktop"===v||"other"===t?e?`Download v${e}`:"Download":e?`Download v${e} for ${R[t]}`:`Download for ${R[t]}`,A[t]&&(0,r.jsx)("span",{className:"ml-auto text-xs font-mono opacity-70",children:A[t]})]})})})]})]})]},a.role)})})]})})}let z=[{title:"Remote Vibe Coding",tag:"AI-Ready",desc:"Run Claude Code, Cursor & 30+ AI agents on the go with live artifact previews.",path:"M13 10V3L4 14h7v7l9-11h-7z"},{title:"Every Screen, Everywhere",tag:"Any Device",desc:"Seamless across PC, Web, iPad keyboard shortcuts, and mobile dev keys.",path:"M12 18h.01M7 21h10a2 2 0 002-2V5a2 2 0 00-2-2H7a2 2 0 00-2 2v14a2 2 0 002 2z"},{title:"60fps Remote Desktop",tag:"Encrypted P2P",desc:"Ultra-smooth PC & Mac control over encrypted WebRTC with host approval.",path:"M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"},{title:"Full Remote IDE",tag:"All-in-One",desc:"Multi-pane terminal, code editor, and Git diffs in your pocket.",path:"M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4"},{title:"Live Mobile Emulator",tag:"Mobile Dev",desc:"Test and interact with Android & iOS emulators directly from your phone.",path:"M12 18h.01M8 21h8a2 2 0 002-2V5a2 2 0 00-2-2H8a2 2 0 00-2 2v14a2 2 0 002 2z"},{title:"Zero-Config Localhost",tag:"Zero-Exposure",desc:"Preview localhost without opening ports, ngrok, or exposing to the public internet.",path:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"},{title:"Visual File Explorer",tag:"Path-Jailed",desc:"Fuzzy search files (⌘⇧P) and edit code inside a secure, jailed workspace.",path:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"},{title:"Zero-Trust & 100% Private",tag:"Self-Hosted",desc:"Physical host approval, direct P2P, zero cloud storage. Your code never leaves your machine.",path:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"}],L=[{name:"Zero Config",nine:!0,claude:!0,teamviewer:!0,chrome:!0,termius:!1},{name:"Remote IDE",nine:!0,claude:!1,teamviewer:!1,chrome:!1,termius:!1},{name:"30+ AI Agents & Vibe Coding",nine:!0,claude:!0,teamviewer:!1,chrome:!1,termius:!1},{name:"Terminal Access",nine:!0,claude:!0,teamviewer:!1,chrome:!1,termius:!0},{name:"Persistent Daemon",nine:!0,claude:!0,teamviewer:!1,chrome:!1,termius:!0},{name:"Remote Localhost Preview",nine:!0,claude:!1,teamviewer:!1,chrome:!1,termius:!1},{name:"Touch File Explorer & Editor",nine:!0,claude:!1,teamviewer:!0,chrome:!1,termius:!0},{name:"Remote Desktop",nine:!0,claude:!1,teamviewer:!0,chrome:!0,termius:!1},{name:"Remote Emulator",nine:!0,claude:!1,teamviewer:!1,chrome:!1,termius:!1},{name:"AI Agent Artifacts",nine:!0,claude:!0,teamviewer:!1,chrome:!1,termius:!1},{name:"Physical Host Approval",nine:!0,claude:!1,teamviewer:!0,chrome:!1,termius:!1},{name:"Git Integration",nine:!0,claude:!1,teamviewer:!1,chrome:!1,termius:!1},{name:"Mobile & iPad Optimized",nine:!0,claude:!0,teamviewer:!1,chrome:!1,termius:!0},{name:"Browser-Based",nine:!0,claude:!0,teamviewer:!1,chrome:!0,termius:!1},{name:"QR Login",nine:!0,claude:!0,teamviewer:!1,chrome:!1,termius:!1},{name:"Auto Tunnel",nine:!0,claude:!0,teamviewer:!0,chrome:!0,termius:!1},{name:"No Port Forwarding",nine:!0,claude:!0,teamviewer:!0,chrome:!0,termius:!1},{name:"No Account Required",nine:!0,claude:!1,teamviewer:!1,chrome:!1,termius:!1},{name:"Free & Open Source",nine:!0,claude:!1,teamviewer:!1,chrome:!0,termius:!1}],F=[{key:"nine",name:"9Remote",highlight:!0},{key:"claude",name:"Claude Remote"},{key:"teamviewer",name:"TeamViewer"},{key:"chrome",name:"Chrome Remote"},{key:"termius",name:"Termius"}];function E({ok:e}){return e?(0,r.jsxs)("svg",{className:"w-4 h-4 sm:w-[18px] sm:h-[18px] mx-auto",viewBox:"0 0 20 20",style:{color:m},children:[(0,r.jsx)("circle",{cx:"10",cy:"10",r:"9",fill:"currentColor"}),(0,r.jsx)("path",{d:"M6.5 10.5l2.5 2.5 4.5-5.5",fill:"none",stroke:"var(--color-bg)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}):(0,r.jsx)("svg",{className:"w-3.5 h-3.5 sm:w-4 sm:h-4 mx-auto opacity-50",viewBox:"0 0 20 20",style:{color:u},children:(0,r.jsx)("path",{d:"M6 6l8 8m0-8l-8 8",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})})}function P(){return(0,r.jsxs)("section",{id:"features",className:"jsx-469167ead414021 relative py-24 px-4 sm:px-6 lg:px-8",children:[(0,r.jsxs)("div",{className:"jsx-469167ead414021 max-w-7xl mx-auto",children:[(0,r.jsxs)("div",{className:"jsx-469167ead414021 text-center mb-16",children:[(0,r.jsx)("div",{style:{borderColor:d,background:c,color:x},className:"jsx-469167ead414021 inline-flex items-center gap-2 px-3 py-1 mb-4 rounded-full border text-xs font-mono",children:"Remote Everything \xb7 Everywhere"}),(0,r.jsxs)("h2",{style:{color:m},className:"jsx-469167ead414021 text-3xl sm:text-4xl lg:text-5xl font-bold mb-4",children:["Why Choose ",(0,r.jsx)("span",{style:{color:m},className:"jsx-469167ead414021",children:"9Remote?"})]}),(0,r.jsx)("p",{style:{color:h},className:"jsx-469167ead414021 text-base sm:text-lg max-w-2xl mx-auto",children:"All your dev superpowers on any screen — zero config, zero lag, zero trust."})]}),(0,r.jsx)("div",{className:"jsx-469167ead414021 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-20",children:z.map((e,t)=>(0,r.jsxs)("div",{style:{background:i,borderColor:d,animation:`fadeInUp 0.4s ease-out ${.04*t}s both`},className:"jsx-469167ead414021 group relative p-6 rounded-xl border flex flex-col justify-between",children:[(0,r.jsxs)("div",{className:"jsx-469167ead414021",children:[(0,r.jsxs)("div",{className:"jsx-469167ead414021 flex items-center justify-between mb-4",children:[(0,r.jsx)("div",{style:{background:c,color:m},className:"jsx-469167ead414021 w-10 h-10 rounded-lg flex items-center justify-center",children:(0,r.jsx)("svg",{fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",className:"jsx-469167ead414021 w-5 h-5",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,d:e.path,className:"jsx-469167ead414021"})})}),(0,r.jsx)("span",{style:{borderColor:d,background:c,color:h},className:"jsx-469167ead414021 text-[11px] font-mono px-2 py-0.5 rounded border",children:e.tag})]}),(0,r.jsx)("h3",{style:{color:m},className:"jsx-469167ead414021 text-lg font-bold mb-2",children:e.title})]}),(0,r.jsx)("p",{style:{color:h},className:"jsx-469167ead414021 text-sm leading-relaxed",children:e.desc})]},e.title))}),(0,r.jsxs)("div",{className:"jsx-469167ead414021 pt-8",children:[(0,r.jsxs)("div",{className:"jsx-469167ead414021 text-center mb-10",children:[(0,r.jsx)("h3",{style:{color:m},className:"jsx-469167ead414021 text-2xl sm:text-3xl font-bold mb-2",children:"How 9Remote Compares"}),(0,r.jsx)("p",{style:{color:h},className:"jsx-469167ead414021 text-sm sm:text-base max-w-xl mx-auto",children:"Built from scratch for modern developers who need both power and mobility."})]}),(0,r.jsx)("div",{style:{background:i,borderColor:d},className:"jsx-469167ead414021 overflow-x-auto rounded-2xl border",children:(0,r.jsxs)("table",{className:"jsx-469167ead414021 min-w-full",children:[(0,r.jsx)("thead",{className:"jsx-469167ead414021",children:(0,r.jsxs)("tr",{style:{borderBottom:`1px solid ${d}`},className:"jsx-469167ead414021",children:[(0,r.jsx)("th",{style:{color:m,background:i},className:"jsx-469167ead414021 px-3 sm:px-4 py-3 sm:py-4 text-left text-xs sm:text-sm font-semibold sticky left-0 z-10 min-w-[140px] sm:min-w-[200px]",children:"Feature"}),F.map(e=>(0,r.jsx)("th",{style:{color:e.highlight?x:m,background:e.highlight?p:"transparent"},className:"jsx-469167ead414021 px-2 sm:px-4 py-3 sm:py-4 text-center text-xs sm:text-sm font-semibold min-w-[80px] sm:min-w-[110px]",children:e.name},e.key))]})}),(0,r.jsx)("tbody",{className:"jsx-469167ead414021",children:L.map((e,t)=>(0,r.jsxs)("tr",{style:{borderBottom:t<L.length-1?`1px solid ${d}`:"none"},onMouseEnter:e=>e.currentTarget.style.background=c,onMouseLeave:e=>e.currentTarget.style.background="transparent",className:"jsx-469167ead414021 transition-colors",children:[(0,r.jsx)("td",{style:{color:m,background:i},className:"jsx-469167ead414021 px-3 sm:px-4 py-2.5 sm:py-3 text-xs sm:text-sm font-medium sticky left-0 z-10",children:e.name}),F.map(t=>(0,r.jsx)("td",{style:{background:t.highlight?p:"transparent"},className:"jsx-469167ead414021 px-2 sm:px-4 py-2.5 sm:py-3 text-center",children:(0,r.jsx)(E,{ok:e[t.key]})},t.key))]},e.name))})]})}),(0,r.jsx)("div",{className:"jsx-469167ead414021 mt-8 text-center",children:(0,r.jsxs)("div",{style:{background:c,borderColor:d},className:"jsx-469167ead414021 inline-flex items-center gap-2 px-4 py-2 rounded-full border text-xs sm:text-sm",children:[(0,r.jsxs)("svg",{viewBox:"0 0 20 20",style:{color:m},className:"jsx-469167ead414021 w-4 h-4 flex-shrink-0",children:[(0,r.jsx)("circle",{cx:"10",cy:"10",r:"8",fill:"currentColor",className:"jsx-469167ead414021"}),(0,r.jsx)("path",{d:"M6.5 10.5l2.5 2.5 4.5-5.5",fill:"none",stroke:"var(--color-bg)",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",className:"jsx-469167ead414021"})]}),(0,r.jsx)("span",{style:{color:m},className:"jsx-469167ead414021 font-semibold",children:"9Remote: Complete 19/19 capabilities \xb7 100% self-hosted & private"})]})})]})]}),(0,r.jsx)(w,{id:"469167ead414021",children:"@keyframes fadeInUp{from{opacity:0;transform:translatey(30px)}to{opacity:1;transform:translatey(0)}}"})]})}var T=s(44976);let H=null,I=`
|
|
2
|
+
sequenceDiagram
|
|
3
|
+
autonumber
|
|
4
|
+
participant Client as Mobile / Web Client
|
|
5
|
+
participant Server as 9Remote Signaling Relay
|
|
6
|
+
participant Host as Host Machine (Agent)
|
|
7
|
+
|
|
8
|
+
Host->>Server: 1. Register HEAD (TAIL stays private on Host)
|
|
9
|
+
Client->>Server: 2. Request Host lookup with HEAD
|
|
10
|
+
Server-->>Client: 3. Return Host Public Key (Relay steps aside)
|
|
11
|
+
Note over Client,Host: Direct P2P Connection (WebRTC DataChannel)
|
|
12
|
+
Client->>Host: 4. Send encrypted TAIL (X25519 + AES-GCM)
|
|
13
|
+
Note over Host: Host verifies TAIL secret
|
|
14
|
+
Host-->>Host: 5. Physical Security Prompt: "Approve Device?"
|
|
15
|
+
Note over Host: You click Approve on host screen
|
|
16
|
+
Host-->>Client: 6. Secure P2P Session Established (<20ms latency)
|
|
17
|
+
`,D=[{step:"01",title:"Split-Key Zero-Trust",desc:"The pairing key is split into HEAD and TAIL. The relay server only sees HEAD to broker the WebRTC handshake and never receives or knows your secret TAIL.",iconPath:"M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"},{step:"02",title:"Direct P2P Verification",desc:"Clients connect directly to your machine via WebRTC. Your secret TAIL is sealed with the host's public key (X25519 + AES-256-GCM) — unreadable to any intermediate relay.",iconPath:"M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z"},{step:"03",title:"Physical Host Approval",desc:"Even if someone knows your key, new devices cannot access your machine until you physically click 'Approve' on your computer screen.",iconPath:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"}];function W(){let{theme:e}=(0,T.D)(),[t,o]=(0,n.useState)(""),a=(0,n.useRef)(null);return(0,n.useEffect)(()=>{let t=!1;return(!H&&(H=Promise.all([s.e(3755),s.e(7162),s.e(3606)]).then(s.bind(s,86492)).then(e=>e.default)),H).then(async s=>{if(!t){s.initialize({startOnLoad:!1,theme:"dark"===e?"dark":"neutral",securityLevel:"loose",sequence:{useMaxWidth:!0,showSequenceNumbers:!0,actorFontSize:13,messageFontSize:12,noteFontSize:12}});try{let e=`security-flow-${Date.now()}`,{svg:r}=await s.render(e,I);if(t)return;o(r)}catch{}}}).catch(()=>{}),()=>{t=!0}},[e]),(0,n.useEffect)(()=>{t&&a.current&&a.current.querySelectorAll("text").forEach(e=>{let t=e.textContent?.trim()||"",s=null;if(t.includes("Mobile / Web Client")?s='<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="#38bdf8" stroke-width="2.2"><rect x="5" y="2" width="14" height="20" rx="2" ry="2"/><line x1="12" y1="18" x2="12.01" y2="18"/></svg>':t.includes("9Remote Signaling Relay")?s='<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="#a855f7" stroke-width="2.2"><path d="M18 10h-1.26A8 8 0 1 0 9 20h9a5 5 0 0 0 0-10z"/></svg>':t.includes("Host Machine (Agent)")&&(s='<svg width="15" height="15" viewBox="0 0 24 24" fill="none" stroke="#22c55e" stroke-width="2.2"><rect x="2" y="3" width="20" height="14" rx="2" ry="2"/><line x1="8" y1="21" x2="16" y2="21"/><line x1="12" y1="17" x2="12" y2="21"/></svg>'),!s)return;let r=e.parentElement,o=r?.querySelector("rect")||e.previousElementSibling;if(!o||"rect"!==o.tagName||r.querySelector("foreignObject"))return;let a=o.getAttribute("x"),n=o.getAttribute("y"),l=o.getAttribute("width"),i=o.getAttribute("height");if(!a||!n||!l||!i)return;let c=document.createElementNS("http://www.w3.org/2000/svg","foreignObject");c.setAttribute("x",a),c.setAttribute("y",n),c.setAttribute("width",l),c.setAttribute("height",i),c.style.pointerEvents="none",c.innerHTML=`
|
|
18
|
+
<div xmlns="http://www.w3.org/1999/xhtml" style="display:flex;align-items:center;justify-content:center;width:100%;height:100%;gap:6px;font-family:ui-monospace,monospace;font-size:12px;font-weight:600;color:currentColor;">
|
|
19
|
+
<span style="display:flex;align-items:center;opacity:0.9;">${s}</span>
|
|
20
|
+
<span>${t}</span>
|
|
21
|
+
</div>
|
|
22
|
+
`,e.style.display="none",r.appendChild(c)})},[t]),(0,r.jsx)("section",{id:"security",className:"relative py-24 px-4 sm:px-6 lg:px-8",children:(0,r.jsxs)("div",{className:"max-w-7xl mx-auto",children:[(0,r.jsxs)("div",{className:"text-center mb-16",children:[(0,r.jsx)("div",{className:"inline-flex items-center gap-2 px-3 py-1 rounded-full border mb-4 text-xs font-mono",style:{borderColor:d,background:c,color:h},children:"Zero-Trust Architecture"}),(0,r.jsxs)("h2",{className:"text-3xl sm:text-4xl lg:text-5xl font-bold mb-4",style:{color:m},children:["3-Layer Security & ",(0,r.jsx)("span",{style:{color:m},children:"Zero-Trust Verification"})]}),(0,r.jsx)("p",{className:"text-base sm:text-lg max-w-2xl mx-auto",style:{color:h},children:"Split-Key pairing, direct WebRTC encryption, and physical host approval — your machine stays completely protected."})]}),(0,r.jsx)("div",{className:"p-4 sm:p-8 rounded-xl border mb-12 overflow-x-auto flex justify-center",style:{background:i,borderColor:d},children:t?(0,r.jsx)("div",{ref:a,className:"w-full max-w-4xl min-w-[320px] [&_svg]:w-full [&_svg]:h-auto",dangerouslySetInnerHTML:{__html:t}}):(0,r.jsx)("div",{className:"py-20 text-sm font-mono",style:{color:h},children:"Loading security flow diagram..."})}),(0,r.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:D.map(e=>(0,r.jsxs)("div",{className:"p-6 rounded-xl border flex flex-col justify-between",style:{background:i,borderColor:d},children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,r.jsx)("div",{className:"w-9 h-9 rounded-lg flex items-center justify-center border",style:{borderColor:d,background:c,color:x},children:(0,r.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.8,d:e.iconPath})})}),(0,r.jsxs)("span",{className:"text-xs font-mono",style:{color:x},children:["STEP ",e.step]})]}),(0,r.jsx)("h3",{className:"text-lg font-bold mb-2",style:{color:m},children:e.title})]}),(0,r.jsx)("p",{className:"text-sm leading-relaxed",style:{color:h},children:e.desc})]},e.step))})]})})}function O(){let{formattedStars:e}=(0,g.w)();return(0,r.jsx)("section",{className:"relative py-24 px-4 sm:px-6 lg:px-8",children:(0,r.jsx)("div",{className:"max-w-4xl mx-auto text-center",children:(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)("div",{className:"absolute inset-0 blur-3xl pointer-events-none animate-pulse-glow",style:{background:"rgba(255,255,255,0.05)"}}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsxs)("h2",{className:"text-3xl sm:text-4xl lg:text-5xl font-bold mb-5",style:{color:m},children:["Remote everything.",(0,r.jsx)("br",{}),"On any screen, ",(0,r.jsx)("span",{style:{color:m},children:"everywhere"}),"."]}),(0,r.jsx)("p",{className:"text-base sm:text-lg mb-8 max-w-2xl mx-auto",style:{color:h},children:"IDE, 60fps desktop, files, emulator & 30+ AI vibe coding agents on PC, Web, iPad, and mobile. Ready in 30 seconds."}),(0,r.jsxs)("div",{className:"flex flex-row gap-2.5 sm:gap-3 justify-center items-center flex-wrap",children:[(0,r.jsx)(o,{href:"/login",className:"btn-cta group px-5 sm:px-8 py-3 sm:py-4 rounded-lg font-semibold text-sm sm:text-base transition-transform duration-300 hover:scale-[1.03]",style:{background:x,color:"#FFF"},children:(0,r.jsxs)("span",{className:"flex items-center justify-center gap-2",children:["Get Remote",(0,r.jsx)("svg",{className:"w-5 h-5 group-hover:translate-x-1 transition-transform",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 7l5 5m0 0l-5 5m5-5H6"})})]})}),(0,r.jsxs)("a",{href:"https://github.com/decolua/9remote",target:"_blank",rel:"noopener noreferrer",className:"px-5 sm:px-8 py-3 sm:py-4 rounded-lg font-semibold text-sm sm:text-base transition-all duration-300 hover:scale-[1.03] flex items-center justify-center gap-2 border",style:{background:c,color:m,borderColor:d},children:[(0,r.jsx)("svg",{className:"w-4 h-4 sm:w-5 sm:h-5",fill:"currentColor",viewBox:"0 0 24 24",children:(0,r.jsx)("path",{fillRule:"evenodd",d:"M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z",clipRule:"evenodd"})}),(0,r.jsx)("span",{children:"Star on GitHub"}),e&&(0,r.jsxs)("span",{className:"text-xs font-mono px-2 py-0.5 rounded-full border border-border-subtle bg-surface-2 text-text",children:["★ ",e]})]})]}),(0,r.jsx)("p",{className:"mt-8 text-xs sm:text-sm font-mono",style:{color:u},children:"✓ 100% Free \xb7 Open source MIT \xb7 Zero tracking or telemetry"})]})]})})})}let $=[{href:"/login",label:"Remote",internal:!0},{href:"/workspace",label:"Terminal",internal:!0},{href:"/remote",label:"Remote Desktop",internal:!0},{href:"https://apps.apple.com/us/app/9remote/id6796664210",label:"iOS (App Store)"},{href:"https://play.google.com/store/apps/details?id=cc.remote9.app&pli=1",label:"Android (Google Play)"}],B=[{href:"https://github.com/decolua/9remote",label:"GitHub"},{href:"https://www.npmjs.com/package/9remote",label:"NPM"},{href:"https://docs.9remote.cc/",label:"Documentation"},{href:"https://www.facebook.com/groups/9teamvn",label:"Community"}];function V({href:e,label:t,internal:s}){let a=s?o:"a";return(0,r.jsx)(a,{href:e,...s?{}:{target:"_blank",rel:"noopener noreferrer"},className:"text-sm transition-colors",style:{color:h},onMouseEnter:e=>e.currentTarget.style.color=x,onMouseLeave:e=>e.currentTarget.style.color=h,children:t})}function G(){let e="3.0.2";return(0,r.jsx)("footer",{className:"relative py-14 px-4 sm:px-6 lg:px-8 border-t",style:{background:l,borderColor:d},children:(0,r.jsxs)("div",{className:"max-w-7xl mx-auto",children:[(0,r.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-4 gap-8 mb-8",children:[(0,r.jsxs)("div",{className:"col-span-1 md:col-span-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-3 mb-4",children:[(0,r.jsx)("img",{src:"/icon-192.png",alt:"9Remote Logo",className:"w-9 h-9 rounded-lg object-contain shadow-md shadow-brand-500/20"}),(0,r.jsx)("h3",{className:"text-xl font-bold",style:{color:m},children:"9Remote"})]}),(0,r.jsx)("p",{className:"text-sm max-w-md mb-4",style:{color:h},children:"Remote everything, everywhere. Remote IDE, 60fps desktop, files, emulator & vibe coding on any screen."}),(0,r.jsxs)("p",{className:"text-xs",style:{color:u},children:["\xa9 ",new Date().getFullYear()," 9Remote. All rights reserved.",e&&(0,r.jsxs)("span",{className:"ml-2",children:["v",e]})]})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"font-semibold mb-4 text-sm",style:{color:m},children:"Product"}),(0,r.jsx)("ul",{className:"space-y-2",children:$.map(e=>(0,r.jsx)("li",{children:(0,r.jsx)(V,{...e})},e.label))})]}),(0,r.jsxs)("div",{children:[(0,r.jsx)("h4",{className:"font-semibold mb-4 text-sm",style:{color:m},children:"Resources"}),(0,r.jsx)("ul",{className:"space-y-2",children:B.map(e=>(0,r.jsx)("li",{children:(0,r.jsx)(V,{...e})},e.label))})]})]}),(0,r.jsxs)("div",{className:"pt-8 flex flex-col sm:flex-row justify-between items-center gap-4 border-t",style:{borderColor:d},children:[(0,r.jsx)("p",{className:"text-xs",style:{color:u},children:"Built with Next.js, Socket.io, and Cloudflare Workers"}),(0,r.jsx)("div",{className:"flex gap-6",children:B.slice(0,3).map(e=>(0,r.jsx)("a",{href:e.href,target:"_blank",rel:"noopener noreferrer",className:"text-xs transition-colors",style:{color:u},onMouseEnter:e=>e.currentTarget.style.color=x,onMouseLeave:e=>e.currentTarget.style.color=u,children:e.label},e.label))})]})]})})}function q(){return(0,r.jsxs)("div",{className:"min-h-screen overflow-x-hidden safe-area-insets",style:{color:m},children:[(0,r.jsx)(a.A,{}),(0,r.jsx)("div",{className:"landing-light","aria-hidden":!0}),(0,r.jsx)(j,{}),(0,r.jsxs)("main",{className:"relative z-10",children:[(0,r.jsx)(S,{}),(0,r.jsx)(M,{}),(0,r.jsx)(P,{}),(0,r.jsx)(W,{}),(0,r.jsx)(O,{})]}),(0,r.jsx)(G,{})]})}function Y(){return(0,r.jsx)(q,{})}}},e=>{e.O(0,[9568,8922,2347,5158,7358],()=>e(e.s=58751)),_N_E=e.O()}]);
|