handmux 0.17.0 → 0.17.3
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.
|
@@ -201,7 +201,7 @@ Check the render method of %s.`,Tt(oi)||"Unknown"));var H=na(w,T);H.payload={ele
|
|
|
201
201
|
|
|
202
202
|
let root = createRoot(domContainer);
|
|
203
203
|
root.render(<App />);`),t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(c=t.identifierPrefix),t.onRecoverableError!==void 0&&(w=t.onRecoverableError),t.transitionCallbacks!==void 0&&t.transitionCallbacks);var T=m0(e,Vd,null,n,i,c,w);Rd(T.current,e);var P=e.nodeType===ei?e.parentNode:e;return jc(P),new bg(T)}function Hh(e){this._internalRoot=e}function $L(e){e&&sj(e)}Hh.prototype.unstable_scheduleHydration=$L;function WL(e,t,n){if(!zh(e))throw new Error("hydrateRoot(...): Target container is not a DOM element.");U0(e),t===void 0&&b("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var i=n??null,c=n!=null&&n.hydratedSources||null,w=!1,T=!1,P="",H=A0;n!=null&&(n.unstable_strictMode===!0&&(w=!0),n.identifierPrefix!==void 0&&(P=n.identifierPrefix),n.onRecoverableError!==void 0&&(H=n.onRecoverableError));var q=f0(t,null,e,Vd,i,w,T,P,H);if(Rd(q.current,e),jc(e),c)for(var Z=0;Z<c.length;Z++){var pe=c[Z];KR(q,pe)}return new Hh(q)}function zh(e){return!!(e&&(e.nodeType===Ai||e.nodeType===Gr||e.nodeType===Bo))}function wu(e){return!!(e&&(e.nodeType===Ai||e.nodeType===Gr||e.nodeType===Bo||e.nodeType===ei&&e.nodeValue===" react-mount-point-unstable "))}function U0(e){e.nodeType===Ai&&e.tagName&&e.tagName.toUpperCase()==="BODY"&&b("createRoot(): Creating roots directly with document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try using a container element created for your app."),Pc(e)&&(e._reactRootContainer?b("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported."):b("You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it."))}var GL=d.ReactCurrentOwner,O0;O0=function(e){if(e._reactRootContainer&&e.nodeType!==ei){var t=v0(e._reactRootContainer.current);t&&t.parentNode!==e&&b("render(...): It looks like the React-rendered content of this container was removed without using React. This is not supported and will cause errors. Instead, call ReactDOM.unmountComponentAtNode to empty a container.")}var n=!!e._reactRootContainer,i=yg(e),c=!!(i&&Ca(i));c&&!n&&b("render(...): Replacing React-rendered children with a new root component. If you intended to update the children of this node, you should instead have the existing children update their state and render the new components instead of calling ReactDOM.render."),e.nodeType===Ai&&e.tagName&&e.tagName.toUpperCase()==="BODY"&&b("render(): Rendering components directly into document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try rendering into a container element created for your app.")};function yg(e){return e?e.nodeType===Gr?e.documentElement:e.firstChild:null}function V0(){}function qL(e,t,n,i,c){if(c){if(typeof i=="function"){var w=i;i=function(){var fe=Fh(T);w.call(fe)}}var T=f0(t,i,e,ja,null,!1,!1,"",V0);e._reactRootContainer=T,Rd(T.current,e);var P=e.nodeType===ei?e.parentNode:e;return jc(P),aa(),T}else{for(var H;H=e.lastChild;)e.removeChild(H);if(typeof i=="function"){var q=i;i=function(){var fe=Fh(Z);q.call(fe)}}var Z=m0(e,ja,null,!1,!1,"",V0);e._reactRootContainer=Z,Rd(Z.current,e);var pe=e.nodeType===ei?e.parentNode:e;return jc(pe),aa(function(){xu(t,Z,n,i)}),Z}}function YL(e,t){e!==null&&typeof e!="function"&&b("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.",t,e)}function $h(e,t,n,i,c){O0(n),YL(c===void 0?null:c,"render");var w=n._reactRootContainer,T;if(!w)T=qL(n,t,e,c,i);else{if(T=w,typeof c=="function"){var P=c;c=function(){var H=Fh(T);P.call(H)}}xu(t,T,e,c)}return Fh(T)}var P0=!1;function KL(e){{P0||(P0=!0,b("findDOMNode is deprecated and will be removed in the next major release. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node"));var t=GL.current;if(t!==null&&t.stateNode!==null){var n=t.stateNode._warnedAboutRefsInRender;n||b("%s is accessing findDOMNode inside its render(). render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.",on(t.type)||"A component"),t.stateNode._warnedAboutRefsInRender=!0}}return e==null?null:e.nodeType===Ai?e:ML(e,"findDOMNode")}function XL(e,t,n){if(b("ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!wu(t))throw new Error("Target container is not a DOM element.");{var i=Pc(t)&&t._reactRootContainer===void 0;i&&b("You are calling ReactDOM.hydrate() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call hydrateRoot(container, element)?")}return $h(null,e,t,!0,n)}function JL(e,t,n){if(b("ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!wu(t))throw new Error("Target container is not a DOM element.");{var i=Pc(t)&&t._reactRootContainer===void 0;i&&b("You are calling ReactDOM.render() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.render(element)?")}return $h(null,e,t,!1,n)}function ZL(e,t,n,i){if(b("ReactDOM.unstable_renderSubtreeIntoContainer() is no longer supported in React 18. Consider using a portal instead. Until you switch to the createRoot API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),!wu(n))throw new Error("Target container is not a DOM element.");if(e==null||!GC(e))throw new Error("parentComponent must be a valid React Component");return $h(e,t,n,!1,i)}var B0=!1;function QL(e){if(B0||(B0=!0,b("unmountComponentAtNode is deprecated and will be removed in the next major release. Switch to the createRoot API. Learn more: https://reactjs.org/link/switch-to-createroot")),!wu(e))throw new Error("unmountComponentAtNode(...): Target container is not a DOM element.");{var t=Pc(e)&&e._reactRootContainer===void 0;t&&b("You are calling ReactDOM.unmountComponentAtNode() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.unmount()?")}if(e._reactRootContainer){{var n=yg(e),i=n&&!Ca(n);i&&b("unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React.")}return aa(function(){$h(null,null,e,!1,function(){e._reactRootContainer=null,Ay(e)})}),!0}else{{var c=yg(e),w=!!(c&&Ca(c)),T=e.nodeType===Ai&&wu(e.parentNode)&&!!e.parentNode._reactRootContainer;w&&b("unmountComponentAtNode(): The node you're attempting to unmount was rendered by React and is not a top-level container. %s",T?"You may have accidentally passed in a React root node instead of its container.":"Instead, have the parent component update its state and rerender in order to remove this component.")}return!1}}KE(AL),JE(UL),ZE(OL),QE(ls),ej(GE),(typeof Map!="function"||Map.prototype==null||typeof Map.prototype.forEach!="function"||typeof Set!="function"||Set.prototype==null||typeof Set.prototype.clear!="function"||typeof Set.prototype.forEach!="function")&&b("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),UC(tk),PC(Jv,W5,aa);function eM(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!zh(t))throw new Error("Target container is not a DOM element.");return LL(e,t,null,n)}function tM(e,t,n,i){return ZL(e,t,n,i)}var xg={usingClientEntryPoint:!1,Events:[Ca,ll,Td,X_,J_,Jv]};function nM(e,t){return xg.usingClientEntryPoint||b('You are importing createRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),zL(e,t)}function iM(e,t,n){return xg.usingClientEntryPoint||b('You are importing hydrateRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),WL(e,t,n)}function rM(e){return Gw()&&b("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."),aa(e)}var sM=HL({findFiberByHostInstance:ao,bundleType:1,version:fg,rendererPackageName:"react-dom"});if(!sM&&Ie&&window.top===window.self&&(navigator.userAgent.indexOf("Chrome")>-1&&navigator.userAgent.indexOf("Edge")===-1||navigator.userAgent.indexOf("Firefox")>-1)){var I0=window.location.protocol;/^(https?|file):$/.test(I0)&&console.info("%cDownload the React DevTools for a better development experience: https://reactjs.org/link/react-devtools"+(I0==="file:"?`
|
|
204
|
-
You might need to use a local HTTP server (instead of file://): https://reactjs.org/link/react-devtools-faq`:""),"font-weight:bold")}Pr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=xg,Pr.createPortal=eM,Pr.createRoot=nM,Pr.findDOMNode=KL,Pr.flushSync=rM,Pr.hydrate=XL,Pr.hydrateRoot=iM,Pr.render=JL,Pr.unmountComponentAtNode=QL,Pr.unstable_batchedUpdates=Jv,Pr.unstable_renderSubtreeIntoContainer=tM,Pr.version=fg,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})();N1.exports=Pr;var Wl=N1.exports,E1,z0=Wl;{var $0=z0.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;E1=function(r,s){$0.usingClientEntryPoint=!0;try{return z0.createRoot(r,s)}finally{$0.usingClientEntryPoint=!1}}}const j1={"common.save":"Save","common.cancel":"Cancel","common.confirm":"Confirm","common.ok":"OK","common.close":"Close","common.delete":"Delete","common.copy":"Copy","common.rename":"Rename","common.create":"Create","common.back":"Back","common.open":"Open","common.loading":"Loading…","common.done":"Done","token.title":"Access token required","token.placeholder":"Paste HANDMUX_TOKEN","settings.language":"Language","home.empty":"No files opened yet","home.emptyHint":'Switch to "New" to pick one',"home.remove":"Remove","drawer.empty":"No sessions bound yet","drawer.unbind":"Unbind","drawer.bind":"Bind session","drawer.logout":"Log out","windowbar.newWindow":"New window","rename.new_name":"New name","rename.name_rule":"Letters, digits, hyphens only (≤16)","rename.failed":"Rename failed, please retry","rename.saving":"Saving…","newwindow.title":"New window","newwindow.window_name":"Window name (optional)","newwindow.name_placeholder":"Leave blank to auto-name · letters/digits/hyphens ≤16","newwindow.name_rule":"Letters, digits, hyphens only (≤16)","newwindow.start_dir":"Start directory","newwindow.session_dir_named":"{dir} (session dir)","newwindow.session_dir_default":"Session dir (default)","newwindow.choose":"Choose","newwindow.reset_to_session_dir":"Reset to session dir","newwindow.creating":"Creating…","startup.label":"Startup command (optional)","startup.aria":"Startup command","startup.preset_shell":"Plain shell (default)","startup.preset_claude":"claude (launch Claude Code)","startup.preset_claude_continue":"claude -c (resume last session)","startup.preset_codex":"codex (launch Codex CLI)","startup.custom":"Custom…","startup.custom_placeholder":'e.g. claude "fix login bug"',"bind.title":"Bind session","bind.sessionName":"Session name","bind.pickSession":"Choose a session to bind","bind.newSession":"+ New session","bind.modeNew":"New","bind.modeExisting":"Existing","bind.alreadyExists":"Session already exists","bind.bind":"Bind","bind.checking":"Checking…","bind.createAndOpen":"Create & open","bind.creating":"Creating…","bind.createHint":`Session "{name}" doesn't exist — tap "Create & open" to create it`,"bind.alreadyBound":"Session already bound","bind.createFailed":"Create failed, please retry","bind.invalidName":"Only letters, digits, hyphens (≤16)","bind.desktopHint":"On the computer, one command takes any session here back over: handmux open <name>","bind.checkFailed":"Check failed, please retry","bind.startDir":"Start directory","bind.homeDirDefault":"Home directory (default)","bind.choose":"Choose","bind.reset":"Reset","actionsheet.confirmAgain":"Confirm? Tap again","dirpicker.title":"Choose directory","inbox.title":"Inbox","inbox.working":"Working","inbox.done":"Done","inbox.needs":"Needs you","inbox.clearDone":"Clear done","inbox.empty":"No pane status yet","inbox.enableTitle":"Turn on AI session notifications","inbox.enableHint":"Tag every Claude / Codex pane working / waiting on you / done, and get pinged when one needs you.","inbox.enableBtn":"Enable","inbox.enabling":"Enabling…","inbox.enableFailed":"Could not enable — check the server logs.","drawer.orphans.title":"{n} not taken over","drawer.orphans.hint":"Take over to control remotely","inbox.orphans.takeover":"Take over","inbox.orphans.noSession":"no resumable history","inbox.orphans.busy":"busy","inbox.orphans.idle":"idle","inbox.orphans.working":"Taking over…","inbox.orphans.failed":"Takeover failed","inbox.orphans.targetLabel":"Take over into","inbox.orphans.targetNew":"New session","inbox.orphans.nameLabel":"Session name","inbox.orphans.namePlaceholder":"session name","inbox.orphans.killTitle":"The original process","inbox.orphans.killEnd":"End it","inbox.orphans.killKeep":"Keep it","inbox.orphans.recommended":"Recommended","inbox.orphans.killWhy":"If the same session is written from both your computer and your phone, its history gets scrambled. Ending the original lets this device own it cleanly.","inbox.orphans.reopenPre":"Want to continue on the computer instead? Run in a terminal:","idea.title":"Ideas","idea.editPlaceholder":"Edit idea…","idea.addPlaceholder":"Jot an idea…","idea.add":"Add","idea.empty":"No ideas yet — jot one down","idea.dragSort":"Drag to reorder","idea.fillInput":"Fill into input","idea.send":"Send","doclink.title":"Open file","localurl.title":"Proxy & preview","localurl.open":"Enable proxy","localurl.disabled":"Dynamic preview is off — set a preview domain in Settings to proxy local ports.","localurl.notListening":"Nothing is listening on :{port}.","changelog.title":"What's new","preview.dynamic":"Dynamic preview","preview.static":"Static preview","preview.tabs":"Open previews","preview.remainTitle":"Time left — tap to renew / stop","preview.toPcView":"Switch to desktop view","preview.toMobileView":"Switch to mobile view","preview.pcView":"Desktop view","preview.mobileView":"Mobile view","preview.refresh":"Refresh","preview.minimize":"Minimize","preview.ttlDialog":"Preview lifetime","preview.renew":"Renew (reset to 1 hour)","preview.stop":"Stop preview","preview.iframeTitle":"Preview","preview.zoomOut":"Zoom out","preview.zoomIn":"Zoom in","imageviewer.loadFailed":"Failed to load image","imageviewer.saved":"Saved — find it in your album/gallery or Downloads","imageviewer.shareUnsupported":"Image sharing requires Chrome or Safari","imageviewer.zoomOut":"Zoom out","imageviewer.zoomIn":"Zoom in","imageviewer.imageTitle":"Image","imageviewer.saveImage":"Save image","imageviewer.shareImage":"Share image","mic.stop":"Stop voice input","mic.start":"Voice input","dock.send":"Send","dock.send.hint":"Tap to send · hold to insert","dock.phrases":"Phrases","dock.attach":"Upload","dock.history":"History","dock.kbdShow":"Keyboard","dock.kbdHide":"Hide keyboard","history.empty":"No history yet","history.scope":"This window only","dock.input.placeholder":"Say something…","dock.command.placeholder":"Type a command · Enter runs it","dock.mode.agent":"Chat","dock.mode.toggle":"Switch input mode","dock.mode.command":"Command","dock.mode.chat":"Chat","fav.title":"Favorites","fav.add":"Add","fav.addPlaceholder":"Add a favorite…","cmd.editTitle":"Saved commands","cmd.global":"GLOBAL","cmd.window":"THIS WINDOW","cmd.withEnter":"Send directly","cmd.addPlaceholder":"Add a command…","cmd.tabCmd":"Command","cmd.tabKey":"Key","cmd.addTo":"Add to","cmd.addTitle":"Add","cmd.editItem":"Edit","cmd.sticky":"Modifier","cmd.stickyNone":"None","cmd.baseKey":"Key","cmd.pickKey":"Pick a key","cmd.moveUp":"Move up","cmd.moveDown":"Move down","cmd.empty":"None yet","chat.editTitle":"Saved messages","chat.composer.placeholder":"Message Claude…","chat.stop":"Stop","chat.interrupted":"You stopped the response","chat.compacted":"Context compacted","chat.slash.handedOff":"Switched to terminal — run {cmd} there","chat.favs":"Saved","chat.tabMsg":"Message","chat.addPlaceholder":"Message / slash-command…","dock.upload.aria":"Upload file","dock.upload.title":"Upload file (saved to home upload area, not the project)","dock.upload.progress":"Uploading {name}{tag}","dock.upload.failed":"Upload failed: {names}","dock.upload.rejected":"Unsupported file type: {names}","app.nameExists":"That name already exists","app.renameFailed":"Rename failed, please retry","app.deleteFailed":"Delete failed, please retry","app.moveFailed":"Move failed, please retry","app.sessionGone":'Session "{name}" not found, it may have closed',"app.docNotFound":"File not found","app.docTooLarge":"File too large (over 2MB)","app.docUnsupported":"Unsupported file or path","app.docOpenFailed":"Open failed, please retry","app.preview":"Preview","app.openPreview":"Open preview","app.ideas":"Ideas","app.files":"Files","app.settings":"Settings","usage.title":"Usage","usage.win5h":"5-hour","usage.winWeekly":"Weekly","usage.winMonthly":"Monthly","usage.winGeneric":"{h}h window","usage.winPrimary":"Limit","usage.winSecondary":"Secondary","usage.resetIn":"resets in {t}","usage.resetSoon":"resetting…","usage.claudeOff":"Not wired yet — Claude's 5h/weekly usage needs the handmux statusLine:","usage.claudePending":"No data yet — send a message in a Claude session, then reopen.","usage.codexOff":"Codex not detected on this machine.","usage.codexNoQuota":"No quota data in the latest session yet.","usage.loadFailed":"Failed to load usage.","usage.updatedNow":"updated just now","usage.updatedMin":"updated {n}m ago","usage.updatedHr":"updated {n}h ago","usage.updatedDay":"updated {n}d ago","usage.activityNote":"Updates on new messages","usage.timeMark":"Time elapsed in this window","app.renameSession":"Rename session","app.renameWindow":"Rename window","app.moveLeft":"◀ Move left","app.moveRight":"Move right ▶","app.deleteWindow":"Delete window","pane.splitH":"Split left/right","pane.splitV":"Split top/bottom","pane.manage":"Manage split","pane.close":"Close pane","pane.closeConfirm":"Close? Tap again","pane.splitFailed":"Split failed","pane.closeFailed":"Close failed","app.deleteLastWindowConfirm":"This is the last window; deleting it closes the whole session! Tap again","app.deleteConfirm":"Delete? Tap again","app.cannotLocate":"Cannot locate","app.pickItsDir":", pick the directory it lives in:","app.noBoundSession":"No bound session yet","app.tapToBind":"Tap here to bind one","app.selectSessionHint":"Tap ☰ at the top-left to pick a session","app.backToExit":"Press Back again to exit","settings.title":"Settings","settings.group_global":"Global settings","settings.font_size":"Font size","settings.font_decrease":"Decrease font size","settings.font_increase":"Increase font size","settings.font_auto":"Auto","settings.font_auto_title":"Auto-fit to height","settings.chat_lens":"Enable chat view (experimental)","settings.chat_lens_hint":"Experimental — may be unstable. View and drive Claude sessions as a chat; enables the view switch in the window bar and the chat colour tones below.","settings.chat_lens_need_hooks":"Requires Claude hooks first — question cards and status cues in the chat view depend on them.","settings.chat_lens_no_claude":"Claude Code not found — install and run it first.","settings.chat_lens_install_hooks":"Install hooks","settings.chat_lens_installing":"Installing…","settings.chat_lens_hooks_err":"Install failed — run handmux hooks install on your computer","boot.loading":"Loading","boot.chat_empty":"Send your first message to start the conversation","settings.chat_tone":"Chat colour","settings.chat_tone_dusk":"Warm Dusk","settings.chat_tone_ink":"Warm Gold","settings.chat_tone_light":"Warm Cream","settings.chat_tone_hint":"The colour tone of the 对话 (chat) view — all warm.","settings.path_highlight":"Highlight file paths","settings.path_highlight_hint":"Tint tappable file paths in the terminal. Paths stay tappable either way.","settings.whats_new":"What's new","settings.view_changelog":"View changelog","settings.has_update":"Has update","settings.version":"Version","settings.feedback":"Feedback","settings.feedback_issues":"GitHub Issues","settings.feedback_group":"WeChat group","settings.feedback_hint":"Bugs and ideas welcome — issues are tracked and answered.","settings.update_available":"Version {v} available","settings.update_how":"On your computer, run","settings.push_notifications":"Push notifications","settings.notify_on":"Enabled ✓","settings.notify_enable":"Enable device notifications","settings.notify_enabled":"Enabled, you should receive a welcome notification","settings.notify_disabled":"Disabled","settings.notify_failed":"Operation failed","settings.processing":"Processing","settings.push_hint":'Listens for "Needs you" and "Done": when a watched session needs your authorization/answer, or a turn just finished, a push is sent to this device.',"settings.push_unsupported":"Push requires Chrome or Safari","settings.group_session":"Current session settings","settings.screen_cols":"Screen columns","settings.cols_dec":"Fewer","settings.cols_dec_title":"Fewer columns","settings.cols_inc":"More","settings.cols_inc_title":"More columns","settings.cols_restore":"Default","settings.cols_restore_title":"Restore default window size","settings.preview_site":"Preview site","settings.preview_static_site":"Preview static site","settings.preview_running_dynamic":"Dynamic preview running","settings.preview_running_static":"Static preview running","settings.preview_remain_title":"Time remaining","settings.preview_remain":"{time} left","settings.preview_renew":"Renew","settings.preview_confirm_stop":"Confirm stop","settings.preview_stop":"Stop","settings.preview_name":"Name: {name}","settings.preview_port":"(port :{port})","settings.preview_type":"Preview type","settings.preview_off":"Off","settings.preview_static":"Static","settings.preview_dynamic":"Dynamic","settings.preview_off_hint":'Preview is off. Choose "Static" to start.',"settings.preview_off_hint_both":'Preview is off. Choose "Static" or "Dynamic" to start.',"settings.preview_dynamic_disabled":"Dynamic port preview is off. To turn it on, point a wildcard preview domain (previewDomain, e.g. *.example.com) at the gateway with a matching TLS cert. See the README for the Cloudflare vs self-hosted specifics.","settings.preview_pick_dir":"Pick directory & start","settings.preview_static_hint":"Pick a directory containing index.html to preview on your phone.","settings.preview_port_placeholder":"Port, e.g. 3000","settings.preview_port_label":"Port","settings.preview_starting":"Starting…","settings.preview_start":"Start","settings.preview_dynamic_hint":"Enter a port running on this machine (dev server / backend); your phone accesses it directly via a subdomain.","settings.dir_picker_hint":"Pick the static site directory to preview (containing index.html)","settings.err_port_not_listening":"That port is not listening; make sure the service is running","settings.err_bad_port":"Invalid port (1–65535)","settings.err_dynamic_disabled":"Dynamic preview is not enabled","settings.err_start_failed":"Failed to start","filebrowser.openDirFailed":"Cannot open this directory","filebrowser.copiedPath":"Path copied: {abs}","filebrowser.mkdirFailed":"Failed to create folder (invalid name or already exists)","filebrowser.downloading":"Downloading {name}","filebrowser.downloadFailed":"Download failed","filebrowser.uploading":"Uploading {name}{tag}","filebrowser.uploadFailed":"Upload failed","filebrowser.uploadPartialFailed":"These files failed to upload: {names}","filebrowser.uploadRejected":"Unsupported file type: {names}","filebrowser.sessionDir":"Session directory","filebrowser.jumpToSessionDir":"Jump to current session directory","filebrowser.parentDir":"Parent directory","filebrowser.rootSelect":"Switch root (home / temp dirs)","filebrowser.pathPlaceholder":"Enter path (live filter / jump)","filebrowser.newFolder":"New folder","filebrowser.createBtn":"Create","filebrowser.uploadFile":"Upload file","filebrowser.uploadToCurrentDir":"Upload to current directory","filebrowser.enterSubdirToUpload":"Enter a subdirectory to upload","filebrowser.folderNamePlaceholder":"Folder name","filebrowser.uploadPendingTo":"Upload “{name}” to the current directory","filebrowser.enterSubdirFirst":"(enter a subdirectory first)","filebrowser.upload":"Upload","filebrowser.savedToDownloads":"Saved “{name}” to the Downloads folder; view it in the system file manager","filebrowser.noMatches":"No matching files or directories","filebrowser.tooMany":"Showing the first {shown} of {total} — type in the path box to filter","filebrowser.previewUnsupported":"Preview not supported for this file type; tap the button on the right to download","filebrowser.copyAbsPath":"Copy absolute path","filebrowser.download":"Download","filebrowser.pickThisDir":"Select this directory {path}","filebrowser.downloadConfirm":"Download {name}?","filemanager.files":"Files","filemanager.closeTab":"Close tab","filemanager.minimize":"Minimize","filemanager.recent":"Recent","filemanager.directory":"Directory","git.errReadRepo":"Cannot read repository","git.errLoad":"Load failed","git.noRepoInDir":"No git repository here yet — pick another directory, or run git init in this one.","git.outsideRoots":"This folder is outside the area handmux can open — only your home directory and /tmp are reachable. Move the repo under your home directory to browse it here.","git.errReadDir":"Cannot read this directory","git.commitDetail":"Commit details","git.diff":"Diff","git.bindRepo":"Bind repository","git.collapse":"Collapse","git.currentBranch":"Current branch","git.switchViewedBranch":"Switch viewed branch","git.switchBranch":"Switch branch","git.noBranches":"No branches","git.noRepoBound":'No repository bound — tap "+" at the top left to choose a directory.',"git.changes":"Changes","git.commits":"Commits","git.pullToLoadMore":"Pull to load more","git.pickerHint":"Choose a directory to auto-discover git repositories inside it","git.cleanTree":"Working tree clean","git.noCommits":"No commits","git.noDiff":"No diff","git.fontSmaller":"Decrease font size","git.fontLarger":"Increase font size","git.diffTruncated":"Diff too large, truncated","cmd.panel":"Command panel","cmd.title":"Commands","cmd.empty":"No commands yet — send one or save a favorite","cmd.favorites":"Favorites","cmd.scopeGlobal":"Global · all sessions","cmd.recent":"Recent","cmd.scopeSession":"This session only","cmd.favorite":"Favorite","cmd.unfavorite":"Unfavorite","doc.home":"Recent","doc.read":"Read aloud","doc.pauseRead":"Pause reading","doc.resumeRead":"Resume reading","doc.stopRead":"Stop reading","doc.rate":"Speed","doc.fontSmaller":"Smaller font","doc.fontLarger":"Larger font","inbox.view.working":"Running","inbox.view.done":"Completed","inbox.view.needs":"Needs you","push.unsupported":"Push notifications require Chrome or Safari","push.iosAddToHome":'On iOS, first "Add to Home Screen", then open from the home-screen icon to enable',"a2hs.title":"Add handmux to your Home Screen","a2hs.lead":"Open it like an app — full-screen, no address bar. On iPhone it’s also how push reaches you the moment a pane needs you.","a2hs.install":"Install handmux","a2hs.ios1":"Tap the Share button (the ⬆︎ box) in Safari.","a2hs.ios2":"Tap “More”, or scroll down the list.","a2hs.ios3":"Choose “Add to Home Screen”, then “Add”.","a2hs.iosHint":"In Safari: Share → More → Add to Home Screen.","a2hs.iosOpenSafari":"You’re not in Safari. Open this page in Safari, then add it to your Home Screen — other iOS browsers can’t install it.","a2hs.androidManual":"Open your browser menu (⋮) and choose “Add to Home screen” or “Install app”.","a2hs.later":"Maybe later","push.permissionDenied":"Notification permission denied","push.noVapid":"Push is not configured on the server (VAPID)","push.subscribeFailed":"Failed to report subscription","push.sendFailed":"Send failed","api.loadFailed":"Load failed","api.uploadFailed":"Upload failed","upload.title":"Uploading","upload.processing":"Sent — receiving on the server…","api.uploadBadDir":"Cannot upload to this directory","api.uploadDuplicate":"A file with this name already exists","api.uploadTooLarge":"File too large (50MB limit)","api.uploadBadType":"Unsupported file type","time.secAgo":"{n}s ago","time.minAgo":"{n}m ago","time.hourAgo":"{n}h ago","time.dayAgo":"{n}d ago","time.expired":"Expired","time.minutes":"{n} min","settings.script_push":"Script push","settings.script_push_open":"How it works","settings.script_push_hint":"Let a script on your computer push a notification to your phone.","scriptPush.title":"Script push","scriptPush.intro":"Let scripts on your computer reuse handmux’s push channel: on the machine running handmux, one `handmux push` command sends a notification to your phone — handy when a build, CI run, or long task finishes, with no separate push service to wire up.","scriptPush.copied":"Copied","scriptPush.session_placeholder":"<session>","scriptPush.device_placeholder":"<device-key>","scriptPush.scope_all":"All subscribed devices (default)","scriptPush.scope_session":"Only devices in one session","scriptPush.scope_device":"Only this device","scriptPush.device_key_note":"The key above is this device’s — copy and run as-is.","scriptPush.device_need_enable":"Turn on push notifications above first to generate this device’s key.","scriptPush.opts_label":"Optional (append to any of the above)","scriptPush.opt_tag":"--tag <tag> — the same tag replaces the previous push instead of stacking.","scriptPush.opt_url":"--url <path> — opens this path when the notification is tapped.","scriptPush.reliability":"Heads-up: Web Push goes through the phone OS (FCM/APNs) and is best-effort — battery-saver, offline, or vendor policy can delay or drop it. It is not a guaranteed real-time channel. For delivery-critical alerts use a dedicated IM (WeChat / Telegram bot, etc.).","pushInbox.title":"Notifications","pushInbox.empty":"No notifications yet","pushInbox.delete":"Delete","pushInbox.justNow":"just now","pushInbox.minutesAgo":"{n} min ago","pushInbox.hoursAgo":"{n} h ago","pushInbox.detailTitle":"Notification","pushInbox.openUrl":"Open link","pushInbox.expired":"This message has expired","pushInbox.back":"Back","pushInbox.markAllRead":"Mark all read","pushInbox.unreadCount":"{n} unread"},mM={"common.save":"保存","common.cancel":"取消","common.confirm":"确认","common.ok":"确定","common.close":"关闭","common.delete":"删除","common.copy":"复制","common.rename":"重命名","common.create":"新建","common.back":"返回","common.open":"打开","common.loading":"加载中…","common.done":"完成","token.title":"需要访问 token","token.placeholder":"粘贴 HANDMUX_TOKEN","settings.language":"语言 Language","home.empty":"还没有打开过文件","home.emptyHint":"切到「新增」去挑一个","home.remove":"移除","drawer.empty":"还没有绑定会话","drawer.unbind":"解绑","drawer.bind":"绑定会话","drawer.logout":"退出登录","windowbar.newWindow":"新建窗口","rename.new_name":"新名称","rename.name_rule":"只能用字母、数字、横线(≤16)","rename.failed":"重命名失败,请重试","rename.saving":"保存中…","newwindow.title":"新建窗口","newwindow.window_name":"窗口名称(可选)","newwindow.name_placeholder":"留空自动命名 · 字母/数字/横线 ≤16","newwindow.name_rule":"只能用字母、数字、横线(≤16)","newwindow.start_dir":"起始目录","newwindow.session_dir_named":"{dir}(会话目录)","newwindow.session_dir_default":"会话目录(默认)","newwindow.choose":"选择","newwindow.reset_to_session_dir":"重置为会话目录","newwindow.creating":"新建中…","startup.label":"启动命令(可选)","startup.aria":"启动命令","startup.preset_shell":"空 shell(默认)","startup.preset_claude":"claude(启动 Claude Code)","startup.preset_claude_continue":"claude -c(接着上次会话)","startup.preset_codex":"codex(启动 Codex CLI)","startup.custom":"自定义…","startup.custom_placeholder":'例如 claude "修复登录bug"',"bind.title":"绑定会话","bind.sessionName":"会话名称","bind.pickSession":"选择要绑定的会话","bind.newSession":"+ 新建会话","bind.modeNew":"新建会话","bind.modeExisting":"已有会话","bind.alreadyExists":"该会话已存在","bind.bind":"绑定","bind.checking":"校验中…","bind.createAndOpen":"新建并打开","bind.creating":"新建中…","bind.createHint":"会话「{name}」不存在,点「新建并打开」创建","bind.alreadyBound":"已绑定该会话","bind.createFailed":"新建失败,请重试","bind.invalidName":"只能用字母、数字、横线(≤16)","bind.desktopHint":"这里的会话(包括手机新建的),电脑上一条命令即可接管:handmux open <会话名>","bind.checkFailed":"校验失败,请重试","bind.startDir":"起始目录","bind.homeDirDefault":"主目录(默认)","bind.choose":"选择","bind.reset":"重置","actionsheet.confirmAgain":"确认?再点一次","dirpicker.title":"选择目录","inbox.title":"收件箱","inbox.working":"进行中","inbox.done":"已完成","inbox.needs":"需要你","inbox.clearDone":"清除已完成","inbox.empty":"暂无面板状态","inbox.enableTitle":"开启 AI 会话通知","inbox.enableHint":"把每个 Claude / Codex 面板标记为进行中 / 需要你 / 已完成,需要你时还会推送提醒。","inbox.enableBtn":"开启","inbox.enabling":"开启中…","inbox.enableFailed":"开启失败 —— 看看服务端日志。","drawer.orphans.title":"{n} 个未接管会话","drawer.orphans.hint":"接管即可远程操控","inbox.orphans.takeover":"接管","inbox.orphans.noSession":"无可续接的历史","inbox.orphans.busy":"运行中","inbox.orphans.idle":"空闲","inbox.orphans.working":"接管中…","inbox.orphans.failed":"接管失败","inbox.orphans.targetLabel":"接管到","inbox.orphans.targetNew":"新建会话","inbox.orphans.nameLabel":"会话名称","inbox.orphans.namePlaceholder":"会话名","inbox.orphans.killTitle":"接管后原来的进程","inbox.orphans.killEnd":"结束","inbox.orphans.killKeep":"保留","inbox.orphans.recommended":"推荐","inbox.orphans.killWhy":"同一个会话如果电脑和手机同时在写,历史记录会错乱。结束原进程后由手机这边独占,更稳妥。","inbox.orphans.reopenPre":"想回电脑上继续?在电脑终端运行:","idea.title":"想法","idea.editPlaceholder":"编辑想法…","idea.addPlaceholder":"记一条想法…","idea.add":"添加","idea.empty":"还没有想法,记一条吧","idea.dragSort":"拖动排序","idea.fillInput":"填入输入框","idea.send":"发送","doclink.title":"打开文件","localurl.title":"开启代理并预览","localurl.open":"开启代理","localurl.disabled":"动态预览未开启——在设置里配置预览域名后可代理本机端口。","localurl.notListening":"端口 :{port} 没有服务在监听。","changelog.title":"新功能","preview.dynamic":"动态预览","preview.static":"静态预览","preview.tabs":"打开的预览","preview.remainTitle":"剩余有效期 — 点击续期 / 停止","preview.toPcView":"切换到电脑视图","preview.toMobileView":"切换到手机视图","preview.pcView":"电脑视图","preview.mobileView":"手机视图","preview.refresh":"刷新","preview.minimize":"收起","preview.ttlDialog":"预览有效期","preview.renew":"续期(重置为 1 小时)","preview.stop":"停止预览","preview.iframeTitle":"预览","preview.zoomOut":"缩小","preview.zoomIn":"放大","imageviewer.loadFailed":"图片加载失败","imageviewer.saved":"已保存,可在相册/图库或「下载」中查看","imageviewer.shareUnsupported":"图片分享需要 Chrome 或 Safari 浏览器","imageviewer.zoomOut":"缩小","imageviewer.zoomIn":"放大","imageviewer.imageTitle":"图片","imageviewer.saveImage":"保存图片","imageviewer.shareImage":"分享图片","mic.stop":"停止语音输入","mic.start":"语音输入","dock.send":"发送","dock.send.hint":"点发送 · 长按填入","dock.phrases":"常用语","dock.attach":"上传","dock.history":"历史","dock.kbdShow":"展开键盘","dock.kbdHide":"收起键盘","history.empty":"还没有发送记录","history.scope":"仅当前窗口的记录","dock.input.placeholder":"说点什么…","dock.command.placeholder":"输入命令 · 回车执行","dock.mode.agent":"对话","dock.mode.toggle":"切换输入模式","dock.mode.command":"命令模式","dock.mode.chat":"聊天模式","fav.title":"常用","fav.add":"添加","fav.addPlaceholder":"加一条常用…","cmd.editTitle":"常用命令","cmd.global":"全局","cmd.window":"当前窗口","cmd.withEnter":"直接发送","cmd.addPlaceholder":"加一条命令…","cmd.tabCmd":"命令","cmd.tabKey":"按键","cmd.addTo":"添加到","cmd.addTitle":"添加","cmd.editItem":"编辑","cmd.sticky":"粘滞键","cmd.stickyNone":"无","cmd.baseKey":"基键","cmd.pickKey":"选择按键","cmd.moveUp":"上移","cmd.moveDown":"下移","cmd.empty":"还没有","chat.editTitle":"常用消息","chat.composer.placeholder":"和 Claude 对话…","chat.stop":"停止","chat.interrupted":"你终止了这次回复","chat.compacted":"上下文已压缩","chat.slash.handedOff":"已切到终端视图 · 在这里操作 {cmd}","chat.favs":"常用","chat.tabMsg":"消息","chat.addPlaceholder":"消息 / 斜杠命令…","dock.upload.aria":"上传文件","dock.upload.title":"上传文件(存到家目录上传区,不进项目)","dock.upload.progress":"上传 {name}{tag}","dock.upload.failed":"上传失败:{names}","dock.upload.rejected":"不支持的文件类型:{names}","app.nameExists":"该名已存在","app.renameFailed":"重命名失败,请重试","app.deleteFailed":"删除失败,请重试","app.moveFailed":"移动失败,请重试","app.sessionGone":"会话「{name}」不存在,可能已关闭","app.docNotFound":"文件不存在","app.docTooLarge":"文件过大(超过 2MB)","app.docUnsupported":"不支持的文件或路径","app.docOpenFailed":"打开失败,请重试","app.preview":"预览","app.openPreview":"打开预览","app.ideas":"想法","app.files":"文件","app.settings":"设置","usage.title":"用量","usage.win5h":"5 小时","usage.winWeekly":"本周","usage.winMonthly":"本月","usage.winGeneric":"{h} 小时窗口","usage.winPrimary":"额度","usage.winSecondary":"次级额度","usage.resetIn":"{t}后重置","usage.resetSoon":"即将重置…","usage.claudeOff":"尚未接入 —— Claude 的 5h/周额度需要 handmux statusLine:","usage.claudePending":"暂无数据 —— 在 Claude 会话里发一条消息,再重新打开。","usage.codexOff":"本机未检测到 Codex。","usage.codexNoQuota":"最近的会话里还没有额度数据。","usage.loadFailed":"加载用量失败。","usage.updatedNow":"刚刚更新","usage.updatedMin":"{n} 分钟前更新","usage.updatedHr":"{n} 小时前更新","usage.updatedDay":"{n} 天前更新","usage.activityNote":"在有新消息时更新","usage.timeMark":"本窗口已过去的时间","app.renameSession":"重命名会话","app.renameWindow":"重命名窗口","app.moveLeft":"◀ 左移","app.moveRight":"右移 ▶","app.deleteWindow":"删除窗口","pane.splitH":"左右分屏","pane.splitV":"上下分屏","pane.manage":"管理分屏","pane.close":"关闭此格","pane.closeConfirm":"确认关闭?再点一次","pane.splitFailed":"分屏失败","pane.closeFailed":"关闭失败","app.deleteLastWindowConfirm":"这是最后一个窗口,删除将关闭整个会话!再点一次","app.deleteConfirm":"确认删除?再点一次","app.cannotLocate":"无法定位","app.pickItsDir":",请选它所在的目录:","app.noBoundSession":"还没有绑定会话","app.tapToBind":"点此绑定一个","app.selectSessionHint":"点击左上角 ☰ 选择会话","app.backToExit":"再按一次返回键退出","settings.title":"设置","settings.group_global":"全局设置","settings.font_size":"字体大小","settings.font_decrease":"减小字体","settings.font_increase":"增大字体","settings.font_auto":"自适应","settings.font_auto_title":"按高度自动适配","settings.chat_lens":"启用对话视图(实验性功能)","settings.chat_lens_hint":"实验性功能,可能不稳定。以对话形式查看和操作 Claude 会话;开启后,窗口栏出现视图切换,并可选择对话配色。","boot.loading":"正在加载","boot.chat_empty":"发送你的第一条消息,对话就开始啦","settings.chat_lens_need_hooks":"需先安装 Claude hooks:对话里的问题卡、状态提示都依赖它。","settings.chat_lens_no_claude":"未检测到 Claude Code;安装并运行后再开启。","settings.chat_lens_install_hooks":"一键安装 hooks","settings.chat_lens_installing":"安装中…","settings.chat_lens_hooks_err":"安装失败,请到电脑上运行 handmux hooks install","settings.chat_tone":"对话配色","settings.chat_tone_dusk":"暖夜","settings.chat_tone_ink":"暖金","settings.chat_tone_light":"暖黄","settings.chat_tone_hint":"对话视图的色调,均为暖色系。暖夜=暖棕暗、暖金=品牌橄榄金、暖黄=奶油亮。","settings.path_highlight":"高亮文件路径","settings.path_highlight_hint":"给终端里可点开的文件路径加底色。无论开关与否,路径都可点开。","settings.whats_new":"新功能","settings.view_changelog":"查看更新日志","settings.has_update":"有更新","settings.version":"版本","settings.feedback":"反馈与交流","settings.feedback_issues":"GitHub 反馈","settings.feedback_group":"微信用户群","settings.feedback_hint":"bug、想法都欢迎——Issue 会被跟踪处理;微信群反馈直达。","settings.update_available":"有新版本 v{v} 可用","settings.update_how":"在电脑上运行","settings.push_notifications":"推送通知","settings.notify_on":"已开启 ✓","settings.notify_enable":"开启设备通知","settings.notify_enabled":"已开启,应会收到一条欢迎通知","settings.notify_disabled":"已关闭","settings.notify_failed":"操作失败","settings.processing":"处理中","settings.push_hint":"监听「需要你」和「已完成」:所关注会话需要你授权/回答,或一个回合刚做完时,推送到此设备。","settings.push_unsupported":"推送需要 Chrome 或 Safari 浏览器","settings.group_session":"当前会话设置","settings.screen_cols":"屏幕列数","settings.cols_dec":"减少","settings.cols_dec_title":"减少列数","settings.cols_inc":"增加","settings.cols_inc_title":"增加列数","settings.cols_restore":"默认","settings.cols_restore_title":"恢复窗口默认尺寸","settings.preview_site":"预览站点","settings.preview_static_site":"预览静态站点","settings.preview_running_dynamic":"动态预览 运行中","settings.preview_running_static":"静态预览 运行中","settings.preview_remain_title":"剩余有效期","settings.preview_remain":"剩 {time}","settings.preview_renew":"续期","settings.preview_confirm_stop":"确认停止","settings.preview_stop":"停止","settings.preview_name":"名称:{name}","settings.preview_port":"(端口 :{port})","settings.preview_type":"预览类型","settings.preview_off":"不开启","settings.preview_static":"静态","settings.preview_dynamic":"动态","settings.preview_off_hint":"未开启预览。选择「静态」开始。","settings.preview_off_hint_both":"未开启预览。选择「静态」或「动态」开始。","settings.preview_dynamic_disabled":"动态端口预览未启用。要开启:把一个通配预览域名(previewDomain,如 *.example.com)指向网关,并配上对应的 TLS 证书。Cloudflare / 自建的证书差异见 README。","settings.preview_pick_dir":"选择目录启动","settings.preview_static_hint":"选一个含 index.html 的目录,在手机上预览。","settings.preview_port_placeholder":"端口,如 3000","settings.preview_port_label":"端口","settings.preview_starting":"启动中…","settings.preview_start":"启动","settings.preview_dynamic_hint":"填本机正在运行的端口(dev server / 后端),手机经子域名直接访问。","settings.dir_picker_hint":"选择要预览的静态站点目录(含 index.html)","settings.err_port_not_listening":"该端口未在监听,请确认服务已启动","settings.err_bad_port":"端口不合法(1–65535)","settings.err_dynamic_disabled":"动态预览未开启","settings.err_start_failed":"启动失败","filebrowser.openDirFailed":"无法打开该目录","filebrowser.copiedPath":"已复制路径:{abs}","filebrowser.mkdirFailed":"新建目录失败(名称非法或已存在)","filebrowser.downloading":"下载 {name}","filebrowser.downloadFailed":"下载失败","filebrowser.uploading":"上传 {name}{tag}","filebrowser.uploadFailed":"上传失败","filebrowser.uploadPartialFailed":"以下文件上传失败:{names}","filebrowser.uploadRejected":"不支持的文件类型:{names}","filebrowser.sessionDir":"会话目录","filebrowser.jumpToSessionDir":"跳到当前会话目录","filebrowser.parentDir":"上级目录","filebrowser.rootSelect":"切换根目录(家目录 / 临时目录)","filebrowser.pathPlaceholder":"输入路径(实时筛选/跳转)","filebrowser.newFolder":"新建文件夹","filebrowser.createBtn":"创建","filebrowser.uploadFile":"上传文件","filebrowser.uploadToCurrentDir":"上传到当前目录","filebrowser.enterSubdirToUpload":"请进入一个子目录上传","filebrowser.folderNamePlaceholder":"文件夹名称","filebrowser.uploadPendingTo":"把「{name}」上传到当前目录","filebrowser.enterSubdirFirst":"(请先进入一个子目录)","filebrowser.upload":"上传","filebrowser.savedToDownloads":"已保存「{name}」到「下载」文件夹,可在系统文件管理器查看","filebrowser.noMatches":"没有匹配的文件或目录","filebrowser.tooMany":"共 {total} 项,只显示前 {shown} 项——在路径框输入关键词可筛选","filebrowser.previewUnsupported":"暂不支持该类型文件的预览,点右侧按钮可下载","filebrowser.copyAbsPath":"复制绝对路径","filebrowser.download":"下载","filebrowser.pickThisDir":"选定此目录 {path}","filebrowser.downloadConfirm":"下载 {name}?","filemanager.files":"文件","filemanager.closeTab":"关闭标签","filemanager.minimize":"最小化","filemanager.recent":"最近","filemanager.directory":"目录","git.errReadRepo":"无法读取仓库","git.errLoad":"加载失败","git.noRepoInDir":"这个目录还不是 git 仓库 —— 换一个目录,或在这里 git init 一下。","git.outsideRoots":"这个目录在 handmux 可访问范围之外 —— 只开放主目录和 /tmp。把仓库放到主目录下,就能在这里查看了。","git.errReadDir":"无法读取该目录","git.commitDetail":"提交详情","git.diff":"差异","git.bindRepo":"绑定仓库","git.collapse":"收起","git.currentBranch":"当前分支","git.switchViewedBranch":"切换查看的分支","git.switchBranch":"切换分支","git.noBranches":"暂无分支","git.noRepoBound":"未绑定仓库,点左上角「+」选择一个目录。","git.changes":"变更","git.commits":"提交","git.pullToLoadMore":"下拉加载更多","git.pickerHint":"选择一个目录,自动查找其中的 git 仓库","git.cleanTree":"工作区干净","git.noCommits":"暂无提交","git.noDiff":"无差异","git.fontSmaller":"缩小字体","git.fontLarger":"放大字体","git.diffTruncated":"diff 过大,已截断","cmd.panel":"命令面板","cmd.title":"命令","cmd.empty":"还没有命令,发送一条或保存常用","cmd.favorites":"常用","cmd.scopeGlobal":"全局 · 所有会话","cmd.recent":"最近","cmd.scopeSession":"仅本会话","cmd.favorite":"收藏","cmd.unfavorite":"取消收藏","doc.home":"最近","doc.read":"朗读","doc.pauseRead":"暂停朗读","doc.resumeRead":"继续朗读","doc.stopRead":"停止朗读","doc.rate":"语速","doc.fontSmaller":"缩小字体","doc.fontLarger":"放大字体","inbox.view.working":"进行中","inbox.view.done":"已完成","inbox.view.needs":"需要你","push.unsupported":"推送通知需要 Chrome 或 Safari 浏览器","push.iosAddToHome":'iOS 需先把本站"添加到主屏幕",从主屏图标打开后再开启',"a2hs.title":"把 handmux 添加到主屏","a2hs.lead":"像 App 一样打开——全屏、没有地址栏。在 iPhone 上,pane 需要你时的推送也靠它送达。","a2hs.install":"安装 handmux","a2hs.ios1":"点 Safari 里的分享按钮(⬆︎ 方框)。","a2hs.ios2":"点「更多」,或向下滑动列表。","a2hs.ios3":"选「添加到主屏幕」,再点「添加」。","a2hs.iosHint":"Safari 里:分享 → 更多 → 添加到主屏幕。","a2hs.iosOpenSafari":"当前不是 Safari。请在 Safari 里打开本页再添加到主屏——其他 iOS 浏览器无法安装。","a2hs.androidManual":"打开浏览器菜单(⋮),选「添加到主屏幕」或「安装应用」。","a2hs.later":"以后再说","push.permissionDenied":"通知权限被拒绝","push.noVapid":"服务端未配置推送(VAPID)","push.subscribeFailed":"订阅上报失败","push.sendFailed":"发送失败","api.loadFailed":"加载失败","api.uploadFailed":"上传失败","upload.title":"上传中","upload.processing":"已发送,服务器接收中…","api.uploadBadDir":"无法上传到该目录","api.uploadDuplicate":"已存在同名文件","api.uploadTooLarge":"文件过大(上限 50MB)","api.uploadBadType":"不支持的文件类型","time.secAgo":"{n}秒前","time.minAgo":"{n}分钟前","time.hourAgo":"{n}小时前","time.dayAgo":"{n}天前","time.expired":"已过期","time.minutes":"{n} 分钟","settings.script_push":"脚本推送","settings.script_push_open":"怎么用","settings.script_push_hint":"让电脑上的脚本把一条通知推到手机。","scriptPush.title":"脚本推送","scriptPush.intro":"让电脑上的脚本复用 handmux 的推送通道:在运行 handmux 的电脑上,一条 handmux push 命令就能把通知推到手机——构建、CI 或长任务结束时提醒你,不用另接推送服务。","scriptPush.copied":"已复制","scriptPush.session_placeholder":"<会话名>","scriptPush.device_placeholder":"<本设备key>","scriptPush.scope_all":"推给所有已订阅设备(默认)","scriptPush.scope_session":"只推某个会话里的设备","scriptPush.scope_device":"只推这台设备","scriptPush.device_key_note":"上面这串 key 就是这台设备的,复制即用。","scriptPush.device_need_enable":"先在上方开启推送通知,才会生成这台设备的 key。","scriptPush.opts_label":"可选参数(追加到上面任意一条后面)","scriptPush.opt_tag":"--tag <标签> —— 相同 tag 会覆盖上一条推送,而不是堆叠。","scriptPush.opt_url":"--url <路径> —— 点击通知时打开这个路径。","scriptPush.reliability":"注意:Web 推送经手机系统(FCM/APNs)中转,属尽力而为——省电模式、离线或厂商策略都可能延迟或丢弃它,并不保证实时送达。对送达强依赖的场景,请改用专门的 IM(微信 / Telegram bot 等)。","pushInbox.title":"通知记录","pushInbox.empty":"还没有脚本通知","pushInbox.delete":"删除","pushInbox.justNow":"刚刚","pushInbox.minutesAgo":"{n}分钟前","pushInbox.hoursAgo":"{n}小时前","pushInbox.detailTitle":"通知详情","pushInbox.openUrl":"打开链接","pushInbox.expired":"这条消息已过期","pushInbox.back":"返回","pushInbox.markAllRead":"全部已读","pushInbox.unreadCount":"{n} 未读"},fM={"common.save":"儲存","common.cancel":"取消","common.confirm":"確認","common.ok":"確定","common.close":"關閉","common.delete":"刪除","common.copy":"複製","common.rename":"重新命名","common.create":"新增","common.back":"返回","common.open":"開啟","common.loading":"載入中…","common.done":"完成","token.title":"需要存取 Token","token.placeholder":"貼上 HANDMUX_TOKEN","settings.language":"語言 Language","home.empty":"尚未開啟任何檔案","home.emptyHint":"切換到「新增」挑選一個","home.remove":"移除","drawer.empty":"尚未綁定工作階段","drawer.unbind":"解除綁定","drawer.bind":"綁定工作階段","drawer.logout":"登出","windowbar.newWindow":"新增視窗","rename.new_name":"新名稱","rename.name_rule":"只能使用字母、數字、連字號(≤16)","rename.failed":"重新命名失敗,請重試","rename.saving":"儲存中…","newwindow.title":"新增視窗","newwindow.window_name":"視窗名稱(選填)","newwindow.name_placeholder":"留空自動命名 · 字母/數字/連字號 ≤16","newwindow.name_rule":"只能使用字母、數字、連字號(≤16)","newwindow.start_dir":"起始目錄","newwindow.session_dir_named":"{dir}(工作階段目錄)","newwindow.session_dir_default":"工作階段目錄(預設)","newwindow.choose":"選擇","newwindow.reset_to_session_dir":"重置為工作階段目錄","newwindow.creating":"建立中…","startup.label":"啟動命令(選填)","startup.aria":"啟動命令","startup.preset_shell":"空白 Shell(預設)","startup.preset_claude":"claude(啟動 Claude Code)","startup.preset_claude_continue":"claude -c(繼續上次工作階段)","startup.preset_codex":"codex(啟動 Codex CLI)","startup.custom":"自訂…","startup.custom_placeholder":'例如 claude "修復登入 bug"',"bind.title":"綁定工作階段","bind.sessionName":"工作階段名稱","bind.pickSession":"選擇要綁定的工作階段","bind.newSession":"+ 新增工作階段","bind.modeNew":"新增工作階段","bind.modeExisting":"既有工作階段","bind.alreadyExists":"此工作階段已存在","bind.bind":"綁定","bind.checking":"驗證中…","bind.createAndOpen":"新增並開啟","bind.creating":"建立中…","bind.createHint":"工作階段「{name}」不存在,點「新增並開啟」建立","bind.alreadyBound":"已綁定此工作階段","bind.createFailed":"建立失敗,請重試","bind.invalidName":"只能使用字母、數字、連字號(≤16)","bind.desktopHint":"這裡的工作階段(包括手機新建的),電腦上一條命令即可接管:handmux open <名稱>","bind.checkFailed":"驗證失敗,請重試","bind.startDir":"起始目錄","bind.homeDirDefault":"主目錄(預設)","bind.choose":"選擇","bind.reset":"重置","actionsheet.confirmAgain":"確認?再點一次","dirpicker.title":"選擇目錄","inbox.title":"收件匣","inbox.working":"進行中","inbox.done":"已完成","inbox.needs":"需要你","inbox.clearDone":"清除已完成","inbox.empty":"目前沒有面板狀態","inbox.enableTitle":"開啟 AI 工作階段通知","inbox.enableHint":"將每個 Claude / Codex 面板標記為進行中 / 需要你 / 已完成,需要時也會推播提醒。","inbox.enableBtn":"開啟","inbox.enabling":"開啟中…","inbox.enableFailed":"開啟失敗——請查看伺服器日誌。","idea.title":"想法","idea.editPlaceholder":"編輯想法…","idea.addPlaceholder":"記錄一條想法…","idea.add":"新增","idea.empty":"還沒有想法,記錄一條吧","idea.dragSort":"拖曳排序","idea.fillInput":"填入輸入框","idea.send":"傳送","doclink.title":"開啟檔案","changelog.title":"新功能","preview.dynamic":"動態預覽","preview.static":"靜態預覽","preview.remainTitle":"剩餘有效期 — 點擊續期 / 停止","preview.toPcView":"切換到電腦檢視","preview.toMobileView":"切換到手機檢視","preview.pcView":"電腦檢視","preview.mobileView":"手機檢視","preview.refresh":"重新整理","preview.minimize":"收起","preview.ttlDialog":"預覽有效期","preview.renew":"續期(重置為 1 小時)","preview.stop":"停止預覽","preview.iframeTitle":"預覽","preview.zoomOut":"縮小","preview.zoomIn":"放大","imageviewer.loadFailed":"圖片載入失敗","imageviewer.saved":"已儲存,可在相簿或「下載」中查看","imageviewer.shareUnsupported":"圖片分享需要 Chrome 或 Safari 瀏覽器","imageviewer.zoomOut":"縮小","imageviewer.zoomIn":"放大","imageviewer.imageTitle":"圖片","imageviewer.saveImage":"儲存圖片","imageviewer.shareImage":"分享圖片","mic.stop":"停止語音輸入","mic.start":"語音輸入","dock.send":"傳送","dock.send.hint":"點傳送 · 長按填入","dock.phrases":"常用語","dock.attach":"上傳","dock.history":"歷史","history.empty":"還沒有發送記錄","history.scope":"僅目前視窗的記錄","dock.input.placeholder":"說點什麼…","dock.command.placeholder":"輸入指令 · Enter 執行","dock.mode.agent":"對話","dock.mode.toggle":"切換輸入模式","dock.mode.command":"命令模式","dock.mode.chat":"聊天模式","fav.title":"常用","fav.add":"新增","fav.addPlaceholder":"新增常用…","dock.upload.aria":"上傳檔案","dock.upload.title":"上傳檔案(存到主目錄上傳區,不進專案)","dock.upload.progress":"上傳 {name}{tag}","dock.upload.failed":"上傳失敗:{names}","app.nameExists":"該名稱已存在","app.renameFailed":"重新命名失敗,請重試","app.deleteFailed":"刪除失敗,請重試","app.moveFailed":"移動失敗,請重試","app.sessionGone":"工作階段「{name}」不存在,可能已關閉","app.docNotFound":"檔案不存在","app.docTooLarge":"檔案過大(超過 2MB)","app.docUnsupported":"不支援的檔案或路徑","app.docOpenFailed":"開啟失敗,請重試","app.preview":"預覽","app.openPreview":"開啟預覽","app.ideas":"想法","app.files":"檔案","app.settings":"設定","app.renameSession":"重新命名工作階段","app.renameWindow":"重新命名視窗","app.moveLeft":"◀ 左移","app.moveRight":"右移 ▶","app.deleteWindow":"刪除視窗","pane.splitH":"左右分割","pane.splitV":"上下分割","pane.manage":"管理分割","pane.close":"關閉此格","pane.closeConfirm":"確認關閉?再點一次","pane.splitFailed":"分割失敗","pane.closeFailed":"關閉失敗","app.deleteLastWindowConfirm":"這是最後一個視窗,刪除將關閉整個工作階段!再點一次","app.deleteConfirm":"確認刪除?再點一次","app.cannotLocate":"無法定位","app.pickItsDir":",請選擇所在目錄:","app.noBoundSession":"尚未綁定工作階段","app.tapToBind":"點此綁定一個","app.selectSessionHint":"點擊左上角 ☰ 選擇工作階段","app.backToExit":"再按一次返回鍵結束","settings.title":"設定","settings.group_global":"全域設定","settings.font_size":"字型大小","settings.font_decrease":"縮小字型","settings.font_increase":"放大字型","settings.font_auto":"自適應","settings.font_auto_title":"依高度自動調整","settings.chat_lens":"啟用對話視圖(實驗性功能)","settings.chat_lens_hint":"實驗性功能,可能不穩定。以對話形式查看和操作 Claude 工作階段;開啟後,視窗列出現視圖切換,並可選擇對話配色。","boot.loading":"正在載入","boot.chat_empty":"發送你的第一則訊息,對話就開始啦","settings.chat_lens_need_hooks":"需先安裝 Claude hooks:對話裡的問題卡、狀態提示都依賴它。","settings.chat_lens_no_claude":"未檢測到 Claude Code;安裝並運行後再開啟。","settings.chat_lens_install_hooks":"一鍵安裝 hooks","settings.chat_lens_installing":"安裝中…","settings.chat_lens_hooks_err":"安裝失敗,請到電腦上運行 handmux hooks install","settings.path_highlight":"高亮檔案路徑","settings.path_highlight_hint":"為終端機裡可點開的檔案路徑加底色。無論開關與否,路徑都可點開。","settings.whats_new":"新功能","settings.view_changelog":"查看更新日誌","settings.has_update":"有更新","settings.version":"版本","settings.feedback":"意見回饋","settings.feedback_issues":"GitHub 回報","settings.feedback_group":"微信用戶群","settings.feedback_hint":"bug、想法都歡迎——Issue 會被追蹤處理;微信群回饋直達。","settings.update_available":"有新版本 v{v} 可用","settings.update_how":"在電腦上執行","settings.push_notifications":"推播通知","settings.notify_on":"已開啟 ✓","settings.notify_enable":"開啟裝置通知","settings.notify_enabled":"已開啟,應會收到一則歡迎通知","settings.notify_disabled":"已關閉","settings.notify_failed":"操作失敗","settings.processing":"處理中","settings.push_hint":"監聽「需要你」和「已完成」:所關注工作階段需要授權/回答,或一輪剛完成時,推播到此裝置。","settings.push_unsupported":"推播需要 Chrome 或 Safari 瀏覽器","settings.group_session":"目前工作階段設定","settings.screen_cols":"螢幕欄數","settings.cols_dec":"減少","settings.cols_dec_title":"減少欄數","settings.cols_inc":"增加","settings.cols_inc_title":"增加欄數","settings.cols_restore":"預設","settings.cols_restore_title":"恢復視窗預設尺寸","settings.preview_site":"預覽站台","settings.preview_static_site":"預覽靜態站台","settings.preview_running_dynamic":"動態預覽 執行中","settings.preview_running_static":"靜態預覽 執行中","settings.preview_remain_title":"剩餘有效期","settings.preview_remain":"剩 {time}","settings.preview_renew":"續期","settings.preview_confirm_stop":"確認停止","settings.preview_stop":"停止","settings.preview_name":"名稱:{name}","settings.preview_port":"(連接埠:{port})","settings.preview_type":"預覽類型","settings.preview_off":"不開啟","settings.preview_static":"靜態","settings.preview_dynamic":"動態","settings.preview_off_hint":"未開啟預覽。選擇「靜態」開始。","settings.preview_off_hint_both":"未開啟預覽。選擇「靜態」或「動態」開始。","settings.preview_dynamic_disabled":"動態連接埠預覽未啟用。要開啟:將一個萬用字元預覽網域(previewDomain,如 *.example.com)指向閘道,並設定對應的 TLS 憑證。Cloudflare / 自建憑證差異請見 README。","settings.preview_pick_dir":"選擇目錄啟動","settings.preview_static_hint":"選一個含 index.html 的目錄,在手機上預覽。","settings.preview_port_placeholder":"連接埠,如 3000","settings.preview_port_label":"連接埠","settings.preview_starting":"啟動中…","settings.preview_start":"啟動","settings.preview_dynamic_hint":"填入本機正在執行的連接埠(dev server / 後端),手機透過子網域直接存取。","settings.dir_picker_hint":"選擇要預覽的靜態站台目錄(含 index.html)","settings.err_port_not_listening":"該連接埠未在監聽,請確認服務已啟動","settings.err_bad_port":"連接埠不合法(1–65535)","settings.err_dynamic_disabled":"動態預覽未開啟","settings.err_start_failed":"啟動失敗","filebrowser.openDirFailed":"無法開啟該目錄","filebrowser.copiedPath":"已複製路徑:{abs}","filebrowser.mkdirFailed":"建立目錄失敗(名稱不合法或已存在)","filebrowser.downloading":"下載 {name}","filebrowser.downloadFailed":"下載失敗","filebrowser.uploading":"上傳 {name}{tag}","filebrowser.uploadFailed":"上傳失敗","filebrowser.uploadPartialFailed":"以下檔案上傳失敗:{names}","filebrowser.sessionDir":"工作階段目錄","filebrowser.jumpToSessionDir":"跳到目前工作階段目錄","filebrowser.parentDir":"上層目錄","filebrowser.rootSelect":"切換根目錄(主目錄 / 暫存目錄)","filebrowser.pathPlaceholder":"輸入路徑(即時篩選/跳轉)","filebrowser.newFolder":"新增資料夾","filebrowser.createBtn":"建立","filebrowser.uploadFile":"上傳檔案","filebrowser.uploadToCurrentDir":"上傳到目前目錄","filebrowser.enterSubdirToUpload":"請進入一個子目錄上傳","filebrowser.folderNamePlaceholder":"資料夾名稱","filebrowser.uploadPendingTo":"將「{name}」上傳到目前目錄","filebrowser.enterSubdirFirst":"(請先進入一個子目錄)","filebrowser.upload":"上傳","filebrowser.savedToDownloads":"已儲存「{name}」到「下載」資料夾,可在系統檔案管理員查看","filebrowser.noMatches":"沒有符合的檔案或目錄","filebrowser.tooMany":"共 {total} 項,僅顯示前 {shown} 項——在路徑框輸入關鍵字可篩選","filebrowser.previewUnsupported":"暫不支援此類型檔案的預覽,點右側按鈕可下載","filebrowser.copyAbsPath":"複製絕對路徑","filebrowser.download":"下載","filebrowser.pickThisDir":"選定此目錄 {path}","filebrowser.downloadConfirm":"下載 {name}?","filemanager.files":"檔案","filemanager.closeTab":"關閉標籤","filemanager.minimize":"最小化","filemanager.recent":"最近","filemanager.directory":"目錄","git.errReadRepo":"無法讀取儲存庫","git.errLoad":"載入失敗","git.noRepoInDir":"這個目錄還不是 git 儲存庫 —— 換一個目錄,或在這裡 git init 一下。","git.outsideRoots":"這個目錄在 handmux 可存取範圍之外 —— 只開放主目錄和 /tmp。把儲存庫放到主目錄下,就能在這裡檢視了。","git.errReadDir":"無法讀取該目錄","git.commitDetail":"提交詳情","git.diff":"差異","git.bindRepo":"綁定儲存庫","git.collapse":"收起","git.currentBranch":"目前分支","git.switchViewedBranch":"切換查看的分支","git.switchBranch":"切換分支","git.noBranches":"目前沒有分支","git.noRepoBound":"未綁定儲存庫,點左上角「+」選擇一個目錄。","git.changes":"變更","git.commits":"提交","git.pullToLoadMore":"下拉載入更多","git.pickerHint":"選擇一個目錄,自動尋找其中的 git 儲存庫","git.cleanTree":"工作區乾淨","git.noCommits":"目前沒有提交","git.noDiff":"無差異","git.fontSmaller":"縮小字型","git.fontLarger":"放大字型","git.diffTruncated":"diff 過大,已截斷","cmd.panel":"命令面板","cmd.title":"命令","cmd.empty":"還沒有命令,傳送一條或儲存常用","cmd.favorites":"常用","cmd.scopeGlobal":"全域 · 所有工作階段","cmd.recent":"最近","cmd.scopeSession":"僅本工作階段","cmd.favorite":"收藏","cmd.unfavorite":"取消收藏","doc.home":"最近","doc.read":"朗讀","doc.pauseRead":"暫停朗讀","doc.resumeRead":"繼續朗讀","doc.stopRead":"停止朗讀","doc.rate":"語速","doc.fontSmaller":"縮小字型","doc.fontLarger":"放大字型","inbox.view.working":"進行中","inbox.view.done":"已完成","inbox.view.needs":"需要你","push.unsupported":"推播通知需要 Chrome 或 Safari 瀏覽器","push.iosAddToHome":"iOS 需先將本站「加入主畫面」,從主畫面圖示開啟後再開啟","a2hs.title":"將 handmux 加入主畫面","a2hs.lead":"像 App 一樣開啟——全螢幕、沒有網址列。在 iPhone 上,pane 需要你時的推播也靠它送達。","a2hs.install":"安裝 handmux","a2hs.ios1":"點 Safari 的分享按鈕(⬆︎ 方框)。","a2hs.ios2":"點「更多」,或向下滑動清單。","a2hs.ios3":"選「加入主畫面」,再點「加入」。","a2hs.iosHint":"Safari 裡:分享 → 更多 → 加入主畫面。","a2hs.iosOpenSafari":"目前不是 Safari。請在 Safari 開啟本頁再加入主畫面——其他 iOS 瀏覽器無法安裝。","a2hs.androidManual":"開啟瀏覽器選單(⋮),選「加入主畫面」或「安裝應用程式」。","a2hs.later":"稍後再說","push.permissionDenied":"通知權限被拒絕","push.noVapid":"伺服器未設定推播(VAPID)","push.subscribeFailed":"訂閱回報失敗","push.sendFailed":"傳送失敗","api.loadFailed":"載入失敗","api.uploadFailed":"上傳失敗","upload.title":"上傳中","upload.processing":"已傳送,伺服器接收中…","api.uploadBadDir":"無法上傳到該目錄","api.uploadDuplicate":"已存在同名檔案","api.uploadTooLarge":"檔案過大(上限 50MB)","api.uploadBadType":"不支援的檔案類型","time.secAgo":"{n} 秒前","time.minAgo":"{n} 分鐘前","time.hourAgo":"{n} 小時前","time.dayAgo":"{n} 天前","time.expired":"已過期","time.minutes":"{n} 分鐘","settings.script_push":"腳本推送","settings.script_push_open":"怎麼用","settings.script_push_hint":"讓電腦上的腳本把一條通知推到手機。","scriptPush.title":"腳本推送","scriptPush.intro":"讓電腦上的腳本複用 handmux 的推送通道:在執行 handmux 的電腦上,一條 handmux push 命令就能把通知推到手機——建置、CI 或長任務結束時提醒你,不用另接推送服務。","scriptPush.copied":"已複製","scriptPush.session_placeholder":"<會話名>","scriptPush.device_placeholder":"<本裝置key>","scriptPush.scope_all":"推給所有已訂閱裝置(預設)","scriptPush.scope_session":"只推某個會話裡的裝置","scriptPush.scope_device":"只推這台裝置","scriptPush.device_key_note":"上面這串 key 就是這台裝置的,複製即用。","scriptPush.device_need_enable":"先在上方開啟推送通知,才會生成這台裝置的 key。","scriptPush.opts_label":"可選參數(追加到上面任意一條後面)","scriptPush.opt_tag":"--tag <標籤> —— 相同 tag 會覆蓋上一條推送,而不是堆疊。","scriptPush.opt_url":"--url <路徑> —— 點擊通知時開啟這個路徑。","scriptPush.reliability":"注意:Web 推送經手機系統(FCM/APNs)中轉,屬盡力而為——省電模式、離線或廠商策略都可能延遲或丟棄它,並不保證即時送達。對送達強依賴的場景,請改用專門的 IM(WeChat / Telegram bot 等)。","pushInbox.title":"通知記錄","pushInbox.empty":"還沒有腳本通知","pushInbox.delete":"刪除","pushInbox.justNow":"剛剛","pushInbox.minutesAgo":"{n}分鐘前","pushInbox.hoursAgo":"{n}小時前","pushInbox.detailTitle":"通知詳情","pushInbox.openUrl":"打開連結","pushInbox.expired":"這條訊息已過期","pushInbox.back":"返回","pushInbox.markAllRead":"全部已讀","pushInbox.unreadCount":"{n} 未讀"},pM={"common.save":"保存","common.cancel":"キャンセル","common.confirm":"確認","common.ok":"OK","common.close":"閉じる","common.delete":"削除","common.copy":"コピー","common.rename":"名前を変更","common.create":"新規作成","common.back":"戻る","common.open":"開く","common.loading":"読み込み中…","common.done":"完了","token.title":"アクセストークンが必要です","token.placeholder":"HANDMUX_TOKEN を貼り付け","settings.language":"言語 Language","home.empty":"ファイルが開かれていません","home.emptyHint":"「新規」タブでファイルを選択してください","home.remove":"削除","drawer.empty":"セッションが紐付けられていません","drawer.unbind":"紐付け解除","drawer.bind":"セッションを紐付け","drawer.logout":"ログアウト","windowbar.newWindow":"新規ウィンドウ","rename.new_name":"新しい名前","rename.name_rule":"英数字とハイフンのみ(≤16文字)","rename.failed":"名前の変更に失敗しました。再試行してください","rename.saving":"保存中…","newwindow.title":"新規ウィンドウ","newwindow.window_name":"ウィンドウ名(任意)","newwindow.name_placeholder":"空白で自動命名 · 英数字/ハイフン ≤16","newwindow.name_rule":"英数字とハイフンのみ(≤16文字)","newwindow.start_dir":"開始ディレクトリ","newwindow.session_dir_named":"{dir}(セッションディレクトリ)","newwindow.session_dir_default":"セッションディレクトリ(デフォルト)","newwindow.choose":"選択","newwindow.reset_to_session_dir":"セッションディレクトリにリセット","newwindow.creating":"作成中…","startup.label":"起動コマンド(任意)","startup.aria":"起動コマンド","startup.preset_shell":"空のシェル(デフォルト)","startup.preset_claude":"claude(Claude Code を起動)","startup.preset_claude_continue":"claude -c(前回のセッションを継続)","startup.preset_codex":"codex(Codex CLI を起動)","startup.custom":"カスタム…","startup.custom_placeholder":'例:claude "ログインバグを修正"',"bind.title":"セッションを紐付け","bind.sessionName":"セッション名","bind.pickSession":"紐付けるセッションを選択","bind.newSession":"+ 新規セッション","bind.modeNew":"新規作成","bind.modeExisting":"既存を選択","bind.alreadyExists":"このセッションは既に存在します","bind.bind":"紐付け","bind.checking":"確認中…","bind.createAndOpen":"作成して開く","bind.creating":"作成中…","bind.createHint":"セッション「{name}」が存在しません。「作成して開く」をタップして作成してください","bind.alreadyBound":"このセッションはすでに紐付けられています","bind.createFailed":"作成に失敗しました。再試行してください","bind.invalidName":"英数字とハイフンのみ(≤16文字)","bind.desktopHint":"ここのセッション(スマホで作成したものも)は、PC で 1 コマンドで引き継げます:handmux open <名前>","bind.checkFailed":"確認に失敗しました。再試行してください","bind.startDir":"開始ディレクトリ","bind.homeDirDefault":"ホームディレクトリ(デフォルト)","bind.choose":"選択","bind.reset":"リセット","actionsheet.confirmAgain":"確認しますか?もう一度タップ","dirpicker.title":"ディレクトリを選択","inbox.title":"受信トレイ","inbox.working":"進行中","inbox.done":"完了","inbox.needs":"要対応","inbox.clearDone":"完了済みをクリア","inbox.empty":"パネルの状態なし","inbox.enableTitle":"AI セッション通知を有効にする","inbox.enableHint":"各 Claude / Codex パネルを「進行中」「要対応」「完了」にマークし、対応が必要なときにプッシュ通知を送信します。","inbox.enableBtn":"有効にする","inbox.enabling":"有効化中…","inbox.enableFailed":"有効化に失敗しました——サーバーログを確認してください。","idea.title":"アイデア","idea.editPlaceholder":"アイデアを編集…","idea.addPlaceholder":"アイデアを記録…","idea.add":"追加","idea.empty":"まだアイデアがありません。記録してみましょう","idea.dragSort":"ドラッグで並べ替え","idea.fillInput":"入力欄に挿入","idea.send":"送信","doclink.title":"ファイルを開く","changelog.title":"新機能","preview.dynamic":"ダイナミックプレビュー","preview.static":"静的プレビュー","preview.remainTitle":"残り有効期限 — タップして更新 / 停止","preview.toPcView":"PCビューに切り替え","preview.toMobileView":"モバイルビューに切り替え","preview.pcView":"PCビュー","preview.mobileView":"モバイルビュー","preview.refresh":"更新","preview.minimize":"最小化","preview.ttlDialog":"プレビュー有効期限","preview.renew":"更新(1時間にリセット)","preview.stop":"プレビューを停止","preview.iframeTitle":"プレビュー","preview.zoomOut":"縮小","preview.zoomIn":"拡大","imageviewer.loadFailed":"画像の読み込みに失敗しました","imageviewer.saved":"保存しました。フォトライブラリまたは「ダウンロード」で確認できます","imageviewer.shareUnsupported":"画像の共有には Chrome または Safari が必要です","imageviewer.zoomOut":"縮小","imageviewer.zoomIn":"拡大","imageviewer.imageTitle":"画像","imageviewer.saveImage":"画像を保存","imageviewer.shareImage":"画像を共有","mic.stop":"音声入力を停止","mic.start":"音声入力","dock.send":"送信","dock.send.hint":"タップで送信 · 長押しで挿入","dock.phrases":"よく使うフレーズ","dock.attach":"添付","dock.history":"履歴","history.empty":"履歴はまだありません","history.scope":"このウィンドウの記録のみ","dock.input.placeholder":"メッセージを入力…","dock.command.placeholder":"コマンドを入力 · Enterで実行","dock.mode.agent":"会話","dock.mode.toggle":"入力モードを切替","dock.mode.command":"コマンド","dock.mode.chat":"チャット","fav.title":"よく使う","fav.add":"追加","fav.addPlaceholder":"よく使う項目を追加…","dock.upload.aria":"ファイルをアップロード","dock.upload.title":"ファイルをアップロード(ホームのアップロードフォルダに保存、プロジェクトには含まない)","dock.upload.progress":"{name}{tag} をアップロード中","dock.upload.failed":"アップロード失敗:{names}","app.nameExists":"その名前はすでに使われています","app.renameFailed":"名前の変更に失敗しました。再試行してください","app.deleteFailed":"削除に失敗しました。再試行してください","app.moveFailed":"移動に失敗しました。再試行してください","app.sessionGone":"セッション「{name}」が存在しません。閉じられた可能性があります","app.docNotFound":"ファイルが存在しません","app.docTooLarge":"ファイルが大きすぎます(2MB超)","app.docUnsupported":"サポートされていないファイルまたはパス","app.docOpenFailed":"開くのに失敗しました。再試行してください","app.preview":"プレビュー","app.openPreview":"プレビューを開く","app.ideas":"アイデア","app.files":"ファイル","app.settings":"設定","app.renameSession":"セッション名を変更","app.renameWindow":"ウィンドウ名を変更","app.moveLeft":"◀ 左へ移動","app.moveRight":"右へ移動 ▶","app.deleteWindow":"ウィンドウを削除","pane.splitH":"左右に分割","pane.splitV":"上下に分割","pane.manage":"分割を管理","pane.close":"ペインを閉じる","pane.closeConfirm":"閉じますか?もう一度タップ","pane.splitFailed":"分割に失敗しました","pane.closeFailed":"閉じる操作に失敗しました","app.deleteLastWindowConfirm":"これは最後のウィンドウです。削除するとセッション全体が閉じます!もう一度タップ","app.deleteConfirm":"削除しますか?もう一度タップ","app.cannotLocate":"場所を特定できません","app.pickItsDir":"。ディレクトリを選択してください:","app.noBoundSession":"セッションが紐付けられていません","app.tapToBind":"タップして紐付け","app.selectSessionHint":"左上の ☰ をタップしてセッションを選択","app.backToExit":"もう一度戻るで終了します","settings.title":"設定","settings.group_global":"グローバル設定","settings.font_size":"フォントサイズ","settings.font_decrease":"フォントを縮小","settings.font_increase":"フォントを拡大","settings.font_auto":"自動調整","settings.font_auto_title":"高さに合わせて自動調整","settings.path_highlight":"ファイルパスをハイライト","settings.path_highlight_hint":"ターミナル内のタップ可能なファイルパスに色を付けます。オフでもパスはタップできます。","settings.whats_new":"新機能","settings.view_changelog":"変更履歴を表示","settings.has_update":"更新あり","settings.version":"バージョン","settings.feedback":"フィードバック","settings.feedback_issues":"GitHub Issues","settings.feedback_group":"WeChat グループ","settings.feedback_hint":"バグ報告や要望は Issue へ — 必ず追跡・返信されます。","settings.update_available":"バージョン {v} が利用可能","settings.update_how":"パソコンで実行:","settings.push_notifications":"プッシュ通知","settings.notify_on":"有効 ✓","settings.notify_enable":"デバイス通知を有効にする","settings.notify_enabled":"有効にしました。ウェルカム通知が届くはずです","settings.notify_disabled":"無効","settings.notify_failed":"操作に失敗しました","settings.processing":"処理中","settings.push_hint":"「要対応」と「完了」を監視:注目しているセッションが承認/回答を必要としているとき、またはラウンドが完了したときにこのデバイスへ通知します。","settings.push_unsupported":"プッシュ通知には Chrome または Safari が必要です","settings.group_session":"現在のセッション設定","settings.screen_cols":"画面の列数","settings.cols_dec":"減らす","settings.cols_dec_title":"列数を減らす","settings.cols_inc":"増やす","settings.cols_inc_title":"列数を増やす","settings.cols_restore":"デフォルト","settings.cols_restore_title":"ウィンドウのデフォルトサイズに戻す","settings.preview_site":"プレビューサイト","settings.preview_static_site":"静的サイトをプレビュー","settings.preview_running_dynamic":"ダイナミックプレビュー 実行中","settings.preview_running_static":"静的プレビュー 実行中","settings.preview_remain_title":"残り有効期限","settings.preview_remain":"残り {time}","settings.preview_renew":"更新","settings.preview_confirm_stop":"停止を確認","settings.preview_stop":"停止","settings.preview_name":"名前:{name}","settings.preview_port":"(ポート:{port})","settings.preview_type":"プレビュータイプ","settings.preview_off":"無効","settings.preview_static":"静的","settings.preview_dynamic":"ダイナミック","settings.preview_off_hint":"プレビューは無効です。「静的」を選択して開始してください。","settings.preview_off_hint_both":"プレビューは無効です。「静的」または「ダイナミック」を選択して開始してください。","settings.preview_dynamic_disabled":"ダイナミックポートプレビューは無効です。有効にするには:ワイルドカードプレビュードメイン(previewDomain、例:*.example.com)をゲートウェイに向け、対応するTLS証明書を設定してください。Cloudflare /自己署名証明書の違いはREADMEを参照。","settings.preview_pick_dir":"ディレクトリを選択して開始","settings.preview_static_hint":"index.html を含むディレクトリを選択して、スマートフォンでプレビュー。","settings.preview_port_placeholder":"ポート番号(例:3000)","settings.preview_port_label":"ポート","settings.preview_starting":"起動中…","settings.preview_start":"起動","settings.preview_dynamic_hint":"ローカルで実行中のポート(devサーバー / バックエンド)を入力すると、スマートフォンからサブドメイン経由でアクセスできます。","settings.dir_picker_hint":"プレビューする静的サイトのディレクトリを選択(index.html を含む)","settings.err_port_not_listening":"そのポートはリッスンしていません。サービスが起動しているか確認してください","settings.err_bad_port":"ポート番号が無効です(1〜65535)","settings.err_dynamic_disabled":"ダイナミックプレビューは無効です","settings.err_start_failed":"起動に失敗しました","filebrowser.openDirFailed":"ディレクトリを開けませんでした","filebrowser.copiedPath":"パスをコピーしました:{abs}","filebrowser.mkdirFailed":"ディレクトリの作成に失敗しました(名前が無効または既に存在します)","filebrowser.downloading":"{name} をダウンロード中","filebrowser.downloadFailed":"ダウンロードに失敗しました","filebrowser.uploading":"{name}{tag} をアップロード中","filebrowser.uploadFailed":"アップロードに失敗しました","filebrowser.uploadPartialFailed":"以下のファイルのアップロードに失敗しました:{names}","filebrowser.sessionDir":"セッションディレクトリ","filebrowser.jumpToSessionDir":"現在のセッションディレクトリへ移動","filebrowser.parentDir":"親ディレクトリ","filebrowser.rootSelect":"ルートディレクトリを切り替え(ホーム / 一時)","filebrowser.pathPlaceholder":"パスを入力(リアルタイムフィルタ / ジャンプ)","filebrowser.newFolder":"新規フォルダ","filebrowser.createBtn":"作成","filebrowser.uploadFile":"ファイルをアップロード","filebrowser.uploadToCurrentDir":"現在のディレクトリにアップロード","filebrowser.enterSubdirToUpload":"サブディレクトリに移動してからアップロードしてください","filebrowser.folderNamePlaceholder":"フォルダ名","filebrowser.uploadPendingTo":"「{name}」を現在のディレクトリにアップロード","filebrowser.enterSubdirFirst":"(先にサブディレクトリに移動してください)","filebrowser.upload":"アップロード","filebrowser.savedToDownloads":"「{name}」を「ダウンロード」フォルダに保存しました。ファイルマネージャーで確認できます","filebrowser.noMatches":"一致するファイルまたはディレクトリがありません","filebrowser.tooMany":"合計 {total} 件、最初の {shown} 件のみ表示——パス欄にキーワードを入力してフィルタできます","filebrowser.previewUnsupported":"このファイルタイプのプレビューはサポートされていません。右のボタンでダウンロードできます","filebrowser.copyAbsPath":"絶対パスをコピー","filebrowser.download":"ダウンロード","filebrowser.pickThisDir":"このディレクトリを選択 {path}","filebrowser.downloadConfirm":"{name} をダウンロードしますか?","filemanager.files":"ファイル","filemanager.closeTab":"タブを閉じる","filemanager.minimize":"最小化","filemanager.recent":"最近","filemanager.directory":"ディレクトリ","git.errReadRepo":"リポジトリを読み込めませんでした","git.errLoad":"読み込みに失敗しました","git.noRepoInDir":"このディレクトリにはまだ git リポジトリがありません — 別のディレクトリを選ぶか、ここで git init してください。","git.outsideRoots":"このフォルダは handmux がアクセスできる範囲外です — ホームディレクトリと /tmp のみ開けます。リポジトリをホーム配下に移すとここで閲覧できます。","git.errReadDir":"ディレクトリを読み込めませんでした","git.commitDetail":"コミット詳細","git.diff":"差分","git.bindRepo":"リポジトリを紐付け","git.collapse":"折りたたむ","git.currentBranch":"現在のブランチ","git.switchViewedBranch":"表示するブランチを切り替え","git.switchBranch":"ブランチを切り替え","git.noBranches":"ブランチがありません","git.noRepoBound":"リポジトリが紐付けられていません。左上の「+」をタップしてディレクトリを選択してください。","git.changes":"変更","git.commits":"コミット","git.pullToLoadMore":"引っ張ってさらに読み込む","git.pickerHint":"ディレクトリを選択すると、その中の git リポジトリを自動的に検索します","git.cleanTree":"ワーキングツリーはクリーンです","git.noCommits":"コミットがありません","git.noDiff":"差分なし","git.fontSmaller":"フォントを縮小","git.fontLarger":"フォントを拡大","git.diffTruncated":"差分が大きすぎるため、切り捨てられました","cmd.panel":"コマンドパネル","cmd.title":"コマンド","cmd.empty":"コマンドがありません。送信するか、よく使うものを保存してください","cmd.favorites":"お気に入り","cmd.scopeGlobal":"グローバル · 全セッション","cmd.recent":"最近","cmd.scopeSession":"このセッションのみ","cmd.favorite":"お気に入りに追加","cmd.unfavorite":"お気に入りから削除","doc.home":"最近","doc.read":"読み上げ","doc.pauseRead":"一時停止","doc.resumeRead":"再開","doc.stopRead":"読み上げを停止","doc.rate":"読み上げ速度","doc.fontSmaller":"フォントを縮小","doc.fontLarger":"フォントを拡大","inbox.view.working":"進行中","inbox.view.done":"完了","inbox.view.needs":"要対応","push.unsupported":"プッシュ通知には Chrome または Safari が必要です","push.iosAddToHome":"iOS では先にこのサイトを「ホーム画面に追加」し、ホーム画面のアイコンから開いてください","a2hs.title":"handmux をホーム画面に追加","a2hs.lead":"アプリのように全画面で開けます。iPhone では、pane があなたを必要とするときの通知もこれで届きます。","a2hs.install":"handmux をインストール","a2hs.ios1":"Safari の共有ボタン(⬆︎ の四角)をタップ。","a2hs.ios2":"「その他」をタップ、または下にスクロール。","a2hs.ios3":"「ホーム画面に追加」を選び、「追加」をタップ。","a2hs.iosHint":"Safari で:共有 → その他 → ホーム画面に追加。","a2hs.iosOpenSafari":"現在 Safari ではありません。Safari でこのページを開いてからホーム画面に追加してください(他の iOS ブラウザではインストールできません)。","a2hs.androidManual":"ブラウザのメニュー(⋮)から「ホーム画面に追加」または「アプリをインストール」を選択。","a2hs.later":"あとで","push.permissionDenied":"通知の権限が拒否されました","push.noVapid":"サーバーにプッシュ通知(VAPID)が設定されていません","push.subscribeFailed":"サブスクリプションの登録に失敗しました","push.sendFailed":"送信に失敗しました","api.loadFailed":"読み込みに失敗しました","api.uploadFailed":"アップロードに失敗しました","upload.title":"アップロード中","upload.processing":"送信完了 — サーバーで受信中…","api.uploadBadDir":"そのディレクトリへはアップロードできません","api.uploadDuplicate":"同名のファイルが既に存在します","api.uploadTooLarge":"ファイルが大きすぎます(上限 50MB)","api.uploadBadType":"サポートされていないファイルタイプです","time.secAgo":"{n}秒前","time.minAgo":"{n}分前","time.hourAgo":"{n}時間前","time.dayAgo":"{n}日前","time.expired":"期限切れ","time.minutes":"{n} 分"},vM={"common.save":"저장","common.cancel":"취소","common.confirm":"확인","common.ok":"확인","common.close":"닫기","common.delete":"삭제","common.copy":"복사","common.rename":"이름 변경","common.create":"새로 만들기","common.back":"뒤로","common.open":"열기","common.loading":"로드 중…","common.done":"완료","token.title":"액세스 토큰이 필요합니다","token.placeholder":"HANDMUX_TOKEN 붙여넣기","settings.language":"언어 Language","home.empty":"열린 파일이 없습니다","home.emptyHint":"「새로 만들기」 탭에서 파일을 선택하세요","home.remove":"제거","drawer.empty":"연결된 세션이 없습니다","drawer.unbind":"연결 해제","drawer.bind":"세션 연결","drawer.logout":"로그아웃","windowbar.newWindow":"새 창","rename.new_name":"새 이름","rename.name_rule":"영문자, 숫자, 하이픈만 사용 가능(≤16자)","rename.failed":"이름 변경에 실패했습니다. 다시 시도하세요","rename.saving":"저장 중…","newwindow.title":"새 창","newwindow.window_name":"창 이름(선택 사항)","newwindow.name_placeholder":"비워두면 자동 이름 지정 · 영문/숫자/하이픈 ≤16","newwindow.name_rule":"영문자, 숫자, 하이픈만 사용 가능(≤16자)","newwindow.start_dir":"시작 디렉토리","newwindow.session_dir_named":"{dir}(세션 디렉토리)","newwindow.session_dir_default":"세션 디렉토리(기본값)","newwindow.choose":"선택","newwindow.reset_to_session_dir":"세션 디렉토리로 초기화","newwindow.creating":"생성 중…","startup.label":"시작 명령(선택 사항)","startup.aria":"시작 명령","startup.preset_shell":"빈 셸(기본값)","startup.preset_claude":"claude(Claude Code 시작)","startup.preset_claude_continue":"claude -c(이전 세션 이어서)","startup.preset_codex":"codex(Codex CLI 시작)","startup.custom":"사용자 정의…","startup.custom_placeholder":'예:claude "로그인 버그 수정"',"bind.title":"세션 연결","bind.sessionName":"세션 이름","bind.pickSession":"연결할 세션 선택","bind.newSession":"+ 새 세션","bind.modeNew":"새 세션","bind.modeExisting":"기존 세션","bind.alreadyExists":"이미 존재하는 세션입니다","bind.bind":"연결","bind.checking":"확인 중…","bind.createAndOpen":"생성 후 열기","bind.creating":"생성 중…","bind.createHint":"세션「{name}」이 존재하지 않습니다. 「생성 후 열기」를 탭하여 생성하세요","bind.alreadyBound":"이미 연결된 세션입니다","bind.createFailed":"생성에 실패했습니다. 다시 시도하세요","bind.invalidName":"영문자, 숫자, 하이픈만 사용 가능(≤16자)","bind.desktopHint":"여기의 세션(폰에서 만든 것 포함)은 컴퓨터에서 명령 하나로 이어받을 수 있습니다: handmux open <이름>","bind.checkFailed":"확인에 실패했습니다. 다시 시도하세요","bind.startDir":"시작 디렉토리","bind.homeDirDefault":"홈 디렉토리(기본값)","bind.choose":"선택","bind.reset":"초기화","actionsheet.confirmAgain":"확인하시겠습니까? 한 번 더 탭하세요","dirpicker.title":"디렉토리 선택","inbox.title":"받은 편지함","inbox.working":"진행 중","inbox.done":"완료","inbox.needs":"확인 필요","inbox.clearDone":"완료 항목 지우기","inbox.empty":"패널 상태 없음","inbox.enableTitle":"AI 세션 알림 활성화","inbox.enableHint":"각 Claude / Codex 패널을 「진행 중」「확인 필요」「완료」로 표시하고, 확인이 필요할 때 푸시 알림을 보냅니다.","inbox.enableBtn":"활성화","inbox.enabling":"활성화 중…","inbox.enableFailed":"활성화에 실패했습니다——서버 로그를 확인하세요.","idea.title":"아이디어","idea.editPlaceholder":"아이디어 편집…","idea.addPlaceholder":"아이디어를 기록하세요…","idea.add":"추가","idea.empty":"아직 아이디어가 없습니다. 하나 기록해보세요","idea.dragSort":"드래그하여 정렬","idea.fillInput":"입력창에 삽입","idea.send":"보내기","doclink.title":"파일 열기","changelog.title":"새 기능","preview.dynamic":"동적 미리보기","preview.static":"정적 미리보기","preview.remainTitle":"남은 유효 기간 — 탭하여 갱신 / 중지","preview.toPcView":"PC 보기로 전환","preview.toMobileView":"모바일 보기로 전환","preview.pcView":"PC 보기","preview.mobileView":"모바일 보기","preview.refresh":"새로 고침","preview.minimize":"최소화","preview.ttlDialog":"미리보기 유효 기간","preview.renew":"갱신(1시간으로 초기화)","preview.stop":"미리보기 중지","preview.iframeTitle":"미리보기","preview.zoomOut":"축소","preview.zoomIn":"확대","imageviewer.loadFailed":"이미지를 불러오지 못했습니다","imageviewer.saved":"저장되었습니다. 사진 앱 또는 「다운로드」에서 확인할 수 있습니다","imageviewer.shareUnsupported":"이미지 공유는 Chrome 또는 Safari가 필요합니다","imageviewer.zoomOut":"축소","imageviewer.zoomIn":"확대","imageviewer.imageTitle":"이미지","imageviewer.saveImage":"이미지 저장","imageviewer.shareImage":"이미지 공유","mic.stop":"음성 입력 중지","mic.start":"음성 입력","dock.send":"보내기","dock.send.hint":"탭하여 보내기 · 길게 눌러 삽입","dock.phrases":"자주 쓰는 문구","dock.attach":"첨부","dock.history":"기록","history.empty":"기록이 아직 없습니다","history.scope":"현재 창의 기록만","dock.input.placeholder":"메시지를 입력하세요…","dock.command.placeholder":"명령 입력 · Enter로 실행","dock.mode.agent":"대화","dock.mode.toggle":"입력 모드 전환","dock.mode.command":"명령 모드","dock.mode.chat":"채팅 모드","fav.title":"자주 쓰기","fav.add":"추가","fav.addPlaceholder":"자주 쓰는 항목 추가…","dock.upload.aria":"파일 업로드","dock.upload.title":"파일 업로드(홈 업로드 폴더에 저장, 프로젝트에는 포함되지 않음)","dock.upload.progress":"{name}{tag} 업로드 중","dock.upload.failed":"업로드 실패:{names}","app.nameExists":"해당 이름은 이미 사용 중입니다","app.renameFailed":"이름 변경에 실패했습니다. 다시 시도하세요","app.deleteFailed":"삭제에 실패했습니다. 다시 시도하세요","app.moveFailed":"이동에 실패했습니다. 다시 시도하세요","app.sessionGone":"세션「{name}」이 존재하지 않습니다. 이미 닫혔을 수 있습니다","app.docNotFound":"파일이 존재하지 않습니다","app.docTooLarge":"파일이 너무 큽니다(2MB 초과)","app.docUnsupported":"지원되지 않는 파일 또는 경로","app.docOpenFailed":"열기에 실패했습니다. 다시 시도하세요","app.preview":"미리보기","app.openPreview":"미리보기 열기","app.ideas":"아이디어","app.files":"파일","app.settings":"설정","app.renameSession":"세션 이름 변경","app.renameWindow":"창 이름 변경","app.moveLeft":"◀ 왼쪽으로 이동","app.moveRight":"오른쪽으로 이동 ▶","app.deleteWindow":"창 삭제","pane.splitH":"좌우 분할","pane.splitV":"상하 분할","pane.manage":"분할 관리","pane.close":"창 닫기","pane.closeConfirm":"닫을까요? 다시 탭","pane.splitFailed":"분할 실패","pane.closeFailed":"닫기 실패","app.deleteLastWindowConfirm":"마지막 창입니다. 삭제하면 전체 세션이 닫힙니다!한 번 더 탭하세요","app.deleteConfirm":"삭제하시겠습니까? 한 번 더 탭하세요","app.cannotLocate":"위치를 찾을 수 없습니다","app.pickItsDir":",디렉토리를 선택하세요:","app.noBoundSession":"연결된 세션이 없습니다","app.tapToBind":"탭하여 연결","app.selectSessionHint":"왼쪽 상단의 ☰ 를 탭하여 세션 선택","app.backToExit":"한 번 더 뒤로가기를 누르면 종료됩니다","settings.title":"설정","settings.group_global":"전체 설정","settings.font_size":"글꼴 크기","settings.font_decrease":"글꼴 축소","settings.font_increase":"글꼴 확대","settings.font_auto":"자동 조정","settings.font_auto_title":"높이에 맞게 자동 조정","settings.path_highlight":"파일 경로 강조","settings.path_highlight_hint":"터미널에서 탭 가능한 파일 경로에 색을 입힙니다. 꺼져 있어도 경로는 탭할 수 있습니다.","settings.whats_new":"새 기능","settings.view_changelog":"변경 내역 보기","settings.has_update":"업데이트 있음","settings.version":"버전","settings.feedback":"피드백","settings.feedback_issues":"GitHub Issues","settings.feedback_group":"WeChat 그룹","settings.feedback_hint":"버그와 아이디어 모두 환영 — Issue는 추적되고 답변됩니다.","settings.update_available":"버전 {v} 사용 가능","settings.update_how":"컴퓨터에서 실행:","settings.push_notifications":"푸시 알림","settings.notify_on":"활성화됨 ✓","settings.notify_enable":"기기 알림 활성화","settings.notify_enabled":"활성화되었습니다. 환영 알림이 도착할 것입니다","settings.notify_disabled":"비활성화됨","settings.notify_failed":"작업에 실패했습니다","settings.processing":"처리 중","settings.push_hint":"「확인 필요」및「완료」를 모니터링:관심 세션에서 승인/응답이 필요하거나 한 라운드가 완료되면 이 기기로 알림을 보냅니다.","settings.push_unsupported":"푸시 알림은 Chrome 또는 Safari가 필요합니다","settings.group_session":"현재 세션 설정","settings.screen_cols":"화면 열 수","settings.cols_dec":"감소","settings.cols_dec_title":"열 수 감소","settings.cols_inc":"증가","settings.cols_inc_title":"열 수 증가","settings.cols_restore":"기본값","settings.cols_restore_title":"창 기본 크기로 복원","settings.preview_site":"미리보기 사이트","settings.preview_static_site":"정적 사이트 미리보기","settings.preview_running_dynamic":"동적 미리보기 실행 중","settings.preview_running_static":"정적 미리보기 실행 중","settings.preview_remain_title":"남은 유효 기간","settings.preview_remain":"남은 시간 {time}","settings.preview_renew":"갱신","settings.preview_confirm_stop":"중지 확인","settings.preview_stop":"중지","settings.preview_name":"이름:{name}","settings.preview_port":"(포트:{port})","settings.preview_type":"미리보기 유형","settings.preview_off":"비활성화","settings.preview_static":"정적","settings.preview_dynamic":"동적","settings.preview_off_hint":"미리보기가 비활성화되어 있습니다. 「정적」을 선택하여 시작하세요.","settings.preview_off_hint_both":"미리보기가 비활성화되어 있습니다. 「정적」또는「동적」을 선택하여 시작하세요.","settings.preview_dynamic_disabled":"동적 포트 미리보기가 비활성화되어 있습니다. 활성화하려면:와일드카드 미리보기 도메인(previewDomain, 예:*.example.com)을 게이트웨이로 지정하고 TLS 인증서를 설정하세요. Cloudflare /자체 서명 인증서 차이는 README를 참조하세요.","settings.preview_pick_dir":"디렉토리를 선택하여 시작","settings.preview_static_hint":"index.html이 포함된 디렉토리를 선택하여 스마트폰에서 미리보기.","settings.preview_port_placeholder":"포트 번호(예:3000)","settings.preview_port_label":"포트","settings.preview_starting":"시작 중…","settings.preview_start":"시작","settings.preview_dynamic_hint":"로컬에서 실행 중인 포트(dev 서버 / 백엔드)를 입력하면 스마트폰에서 서브도메인을 통해 직접 접속할 수 있습니다.","settings.dir_picker_hint":"미리볼 정적 사이트 디렉토리 선택(index.html 포함)","settings.err_port_not_listening":"해당 포트가 수신 대기 중이지 않습니다. 서비스가 시작되었는지 확인하세요","settings.err_bad_port":"포트 번호가 유효하지 않습니다(1–65535)","settings.err_dynamic_disabled":"동적 미리보기가 비활성화되어 있습니다","settings.err_start_failed":"시작에 실패했습니다","filebrowser.openDirFailed":"디렉토리를 열 수 없습니다","filebrowser.copiedPath":"경로가 복사되었습니다:{abs}","filebrowser.mkdirFailed":"디렉토리 생성에 실패했습니다(이름이 유효하지 않거나 이미 존재합니다)","filebrowser.downloading":"{name} 다운로드 중","filebrowser.downloadFailed":"다운로드에 실패했습니다","filebrowser.uploading":"{name}{tag} 업로드 중","filebrowser.uploadFailed":"업로드에 실패했습니다","filebrowser.uploadPartialFailed":"다음 파일 업로드에 실패했습니다:{names}","filebrowser.sessionDir":"세션 디렉토리","filebrowser.jumpToSessionDir":"현재 세션 디렉토리로 이동","filebrowser.parentDir":"상위 디렉토리","filebrowser.rootSelect":"루트 디렉토리 전환(홈 / 임시)","filebrowser.pathPlaceholder":"경로 입력(실시간 필터 / 이동)","filebrowser.newFolder":"새 폴더","filebrowser.createBtn":"생성","filebrowser.uploadFile":"파일 업로드","filebrowser.uploadToCurrentDir":"현재 디렉토리에 업로드","filebrowser.enterSubdirToUpload":"하위 디렉토리로 이동한 후 업로드하세요","filebrowser.folderNamePlaceholder":"폴더 이름","filebrowser.uploadPendingTo":"「{name}」을 현재 디렉토리에 업로드","filebrowser.enterSubdirFirst":"(먼저 하위 디렉토리로 이동하세요)","filebrowser.upload":"업로드","filebrowser.savedToDownloads":"「{name}」이 「다운로드」 폴더에 저장되었습니다. 파일 관리자에서 확인할 수 있습니다","filebrowser.noMatches":"일치하는 파일 또는 디렉토리가 없습니다","filebrowser.tooMany":"총 {total}개, 처음 {shown}개만 표시——경로 입력창에 키워드를 입력하여 필터할 수 있습니다","filebrowser.previewUnsupported":"이 파일 유형의 미리보기는 지원되지 않습니다. 오른쪽 버튼으로 다운로드할 수 있습니다","filebrowser.copyAbsPath":"절대 경로 복사","filebrowser.download":"다운로드","filebrowser.pickThisDir":"이 디렉토리 선택 {path}","filebrowser.downloadConfirm":"{name}을 다운로드하시겠습니까?","filemanager.files":"파일","filemanager.closeTab":"탭 닫기","filemanager.minimize":"최소화","filemanager.recent":"최근","filemanager.directory":"디렉토리","git.errReadRepo":"저장소를 읽을 수 없습니다","git.errLoad":"불러오기에 실패했습니다","git.noRepoInDir":"아직 git 저장소가 없습니다 — 다른 디렉토리를 선택하거나 여기서 git init 하세요.","git.outsideRoots":"이 폴더는 handmux가 열 수 있는 범위 밖입니다 — 홈 디렉토리와 /tmp만 접근할 수 있습니다. 저장소를 홈 디렉토리 아래로 옮기면 여기서 볼 수 있습니다.","git.errReadDir":"디렉토리를 읽을 수 없습니다","git.commitDetail":"커밋 상세","git.diff":"변경 사항","git.bindRepo":"저장소 연결","git.collapse":"접기","git.currentBranch":"현재 브랜치","git.switchViewedBranch":"표시할 브랜치 전환","git.switchBranch":"브랜치 전환","git.noBranches":"브랜치가 없습니다","git.noRepoBound":"저장소가 연결되지 않았습니다. 왼쪽 상단의 「+」를 탭하여 디렉토리를 선택하세요.","git.changes":"변경사항","git.commits":"커밋","git.pullToLoadMore":"당겨서 더 불러오기","git.pickerHint":"디렉토리를 선택하면 그 안의 git 저장소를 자동으로 찾습니다","git.cleanTree":"작업 트리가 깨끗합니다","git.noCommits":"커밋이 없습니다","git.noDiff":"변경 사항 없음","git.fontSmaller":"글꼴 축소","git.fontLarger":"글꼴 확대","git.diffTruncated":"변경 사항이 너무 커서 잘렸습니다","cmd.panel":"명령 패널","cmd.title":"명령","cmd.empty":"명령이 없습니다. 보내거나 자주 쓰는 것을 저장하세요","cmd.favorites":"즐겨찾기","cmd.scopeGlobal":"전체 · 모든 세션","cmd.recent":"최근","cmd.scopeSession":"현재 세션만","cmd.favorite":"즐겨찾기 추가","cmd.unfavorite":"즐겨찾기 해제","doc.home":"최근","doc.read":"읽어주기","doc.pauseRead":"읽기 일시 정지","doc.resumeRead":"읽기 재개","doc.stopRead":"읽기 중지","doc.rate":"읽기 속도","doc.fontSmaller":"글꼴 축소","doc.fontLarger":"글꼴 확대","inbox.view.working":"진행 중","inbox.view.done":"완료","inbox.view.needs":"확인 필요","push.unsupported":"푸시 알림은 Chrome 또는 Safari가 필요합니다","push.iosAddToHome":"iOS에서는 먼저 이 사이트를 「홈 화면에 추가」한 후 홈 화면 아이콘에서 열어주세요","a2hs.title":"handmux를 홈 화면에 추가","a2hs.lead":"앱처럼 전체 화면으로 열 수 있습니다. iPhone에서는 pane이 당신을 필요로 할 때의 푸시도 이 방식으로 전달됩니다.","a2hs.install":"handmux 설치","a2hs.ios1":"Safari의 공유 버튼(⬆︎ 상자)을 탭하세요.","a2hs.ios2":"「더 보기」를 탭하거나 목록을 아래로 스크롤하세요.","a2hs.ios3":"「홈 화면에 추가」를 선택한 뒤 「추가」를 탭하세요.","a2hs.iosHint":"Safari에서: 공유 → 더 보기 → 홈 화면에 추가.","a2hs.iosOpenSafari":"현재 Safari가 아닙니다. Safari에서 이 페이지를 연 뒤 홈 화면에 추가하세요 — 다른 iOS 브라우저는 설치할 수 없습니다.","a2hs.androidManual":"브라우저 메뉴(⋮)에서 「홈 화면에 추가」 또는 「앱 설치」를 선택하세요.","a2hs.later":"나중에","push.permissionDenied":"알림 권한이 거부되었습니다","push.noVapid":"서버에 푸시 알림(VAPID)이 설정되지 않았습니다","push.subscribeFailed":"구독 등록에 실패했습니다","push.sendFailed":"전송에 실패했습니다","api.loadFailed":"불러오기에 실패했습니다","api.uploadFailed":"업로드에 실패했습니다","upload.title":"업로드 중","upload.processing":"전송 완료 — 서버에서 수신 중…","api.uploadBadDir":"해당 디렉토리에는 업로드할 수 없습니다","api.uploadDuplicate":"같은 이름의 파일이 이미 존재합니다","api.uploadTooLarge":"파일이 너무 큽니다(최대 50MB)","api.uploadBadType":"지원되지 않는 파일 유형입니다","time.secAgo":"{n}초 전","time.minAgo":"{n}분 전","time.hourAgo":"{n}시간 전","time.dayAgo":"{n}일 전","time.expired":"만료됨","time.minutes":"{n}분"},m_={zh:mM,"zh-TW":fM,en:j1,ja:pM,ko:vM},W0=[{code:"zh",label:"简体中文"},{code:"zh-TW",label:"繁體中文"},{code:"en",label:"English"},{code:"ja",label:"日本語"},{code:"ko",label:"한국어"}],D1="tw_lang";function gM(r,s,d=m_){if(r&&d[r])return r;for(const _ of s&&s.length?s:["en"]){const E=String(_).toLowerCase();if(d[E])return E;const R=E.split("-")[0];if(d[R])return R}return"en"}function _M(r,s,d,_){let E=r&&r[d]!=null?r[d]:s&&s[d]!=null?s[d]:d;return _&&(E=E.replace(/\{(\w+)\}/g,(R,b)=>_[b]!=null?_[b]:`{${b}}`)),E}const bM=()=>typeof navigator<"u"?navigator.languages||[navigator.language]:null,yM=()=>{try{return localStorage.getItem(D1)}catch{return null}};let sm=gM(yM(),bM());function V(r,s){return _M(m_[sm],j1,r,s)}function Il(){return sm}function xM(r){if(!(!m_[r]||r===sm)){try{localStorage.setItem(D1,r)}catch{}sm=r,typeof location<"u"&&location.reload()}}const f_="tw_token",p_="tw_font",ym="tw_bound",k1="tw_last_session",R1="tw_win",T1="tw_pane",v_="tw_favs",wM="tw_recent",NM=30,Pg="tw_inbox_seen",L1="tw_inbox_read_ts",M1="tw_browse_dir",A1="tw_preview_dir",U1="tw_startup_cmd",Bg="tw_chat_draft",O1="tw_chat_tone",Ig="tw_chat_lens",SM="tw_ideas",V1="tw_changelog_seen",P1="tw_version_seen",g_="tw_git_repos",Lo=()=>localStorage.getItem(f_),CM=r=>localStorage.setItem(f_,r),EM=()=>localStorage.removeItem(f_);function Eo(){try{return JSON.parse(localStorage.getItem(ym))||[]}catch{return[]}}function G0(r){const s=Eo();return s.includes(r)||s.push(r),localStorage.setItem(ym,JSON.stringify(s)),s}function q0(r){const s=Eo().filter(d=>d!==r);return localStorage.setItem(ym,JSON.stringify(s)),s}function jM(r,s){const d=Eo().map(_=>_===r?s:_);return localStorage.setItem(ym,JSON.stringify(d)),__.renameSession(r,s),xm.renameSession(r,s),d}function Ir(r){try{const s=JSON.parse(localStorage.getItem(r));return s&&typeof s=="object"&&!Array.isArray(s)?s:{}}catch{return{}}}function Ha(r,s,d){const _=Ir(r);_[s]=d,localStorage.setItem(r,JSON.stringify(_))}function B1(r){const s=d=>d&&typeof d=="object"&&!Array.isArray(d)?d:{};return{get(d,_){return!d||!_?[]:s(Ir(r)[d])[_]??[]},set(d,_,E){const R=Ir(r),b=s(R[d]);return E&&E.length?b[_]=E:delete b[_],Object.keys(b).length?R[d]=b:delete R[d],localStorage.setItem(r,JSON.stringify(R)),E??[]},renameWindow(d,_,E){if(!d||!_||!E||_===E)return;const R=Ir(r),b=s(R[d]);b[_]!=null&&(b[E]=b[_],delete b[_],R[d]=b,localStorage.setItem(r,JSON.stringify(R)))},renameSession(d,_){const E=Ir(r);E[d]!=null&&(E[_]=E[d],delete E[d],localStorage.setItem(r,JSON.stringify(E)))}}}const __=B1(wM),xm=B1(SM),Y0=()=>Ir(Pg);function K0(r,s){return Ha(Pg,r,s),Ir(Pg)}const DM=()=>{const r=localStorage.getItem(L1);return r==null?null:Number(r)},X0=r=>localStorage.setItem(L1,String(r)),I1="tw_notif_seen_ts",kM=()=>{const r=localStorage.getItem(I1);return r==null?0:Number(r)},RM=r=>localStorage.setItem(I1,String(r)),b_="tw_notif_read_ids",Lu=()=>{try{const r=JSON.parse(localStorage.getItem(b_)||"[]");return Array.isArray(r)?r:[]}catch{return[]}},J0=r=>{const s=Lu();s.includes(r)||localStorage.setItem(b_,JSON.stringify([...s,r]))},TM=r=>{const s=Lu().filter(d=>r.includes(d));return localStorage.setItem(b_,JSON.stringify(s)),s},LM=r=>r?Ir(M1)[r]??null:null,Z0=(r,s)=>{r&&s&&Ha(M1,r,s)},MM=r=>r?Ir(A1)[r]??null:null,AM=(r,s)=>{r&&s&&Ha(A1,r,s)},UM=()=>localStorage.getItem(k1),OM=r=>Ir(R1)[r]??null,Gh=r=>Ir(T1)[r]??null;function Ml({sessionId:r,windowId:s,paneId:d}={}){r&&localStorage.setItem(k1,r),r&&s&&Ha(R1,r,s),s&&d&&Ha(T1,s,d)}function VM(){const r=Number(localStorage.getItem(p_));return Number.isFinite(r)&&r>0?r:null}const Su=r=>localStorage.setItem(p_,String(r)),PM=()=>localStorage.removeItem(p_),F1=["dusk","ink","light"],BM=()=>{const r=localStorage.getItem(O1);return F1.includes(r)?r:"dusk"},IM=r=>{F1.includes(r)&&localStorage.setItem(O1,r)},FM=()=>localStorage.getItem(Ig)==="1",HM=r=>{r?localStorage.setItem(Ig,"1"):localStorage.removeItem(Ig)},H1=()=>localStorage.getItem(Bg)||"",z1=r=>{r?localStorage.setItem(Bg,r):localStorage.removeItem(Bg)};function am(){try{return JSON.parse(localStorage.getItem(v_))||[]}catch{return[]}}function zM(r){const s=r.trim(),d=am();return s&&!d.includes(s)&&d.push(s),localStorage.setItem(v_,JSON.stringify(d)),d}function $M(r){const s=am().filter(d=>d!==r);return localStorage.setItem(v_,JSON.stringify(s)),s}const $1=()=>localStorage.getItem(U1)||"",W1=r=>localStorage.setItem(U1,r||""),G1="tw_orphan_kill",WM=()=>localStorage.getItem(G1)!=="0",GM=r=>localStorage.setItem(G1,r?"1":"0"),q1="tw_doc_highlight",Y1=()=>localStorage.getItem(q1)==="1",qM=r=>localStorage.setItem(q1,r?"1":"0"),om=(r,s)=>__.get(r,s),K1=(r,s,d)=>__.set(r,s,d);function YM(r,s,d){const _=(d||"").trim(),E=om(r,s);return!_||!r||!s?E:K1(r,s,[_,...E.filter(R=>R!==_)].slice(0,NM))}function KM(r,s,d){return!r||!s?om(r,s):K1(r,s,om(r,s).filter(_=>_!==d))}const y_="tw_recent_docs",X1="tw_pane_base",XM=30;function Mu(){try{return JSON.parse(localStorage.getItem(y_))||[]}catch{return[]}}function Q0({path:r,name:s,type:d,ts:_=Date.now()}){const E=[{path:r,name:s,type:d,ts:_},...Mu().filter(R=>R.path!==r)].slice(0,XM);return localStorage.setItem(y_,JSON.stringify(E)),E}function JM(r){const s=Mu().filter(d=>d.path!==r);return localStorage.setItem(y_,JSON.stringify(s)),s}const eN=r=>Ir(X1)[r]??null,ZM=(r,s)=>Ha(X1,r,s),da=[10,11,12,13,14,16,18,20,22],QM=4,J1="tw_doc_font";function eA(){const r=localStorage.getItem(J1),s=Number(r);return r!==null&&Number.isInteger(s)&&s>=0&&s<da.length?s:QM}const tA=r=>localStorage.setItem(J1,String(Math.min(da.length-1,Math.max(0,r)))),nA=2,Z1="tw_diff_font";function iA(){const r=localStorage.getItem(Z1),s=Number(r);return r!==null&&Number.isInteger(s)&&s>=0&&s<da.length?s:nA}const rA=r=>localStorage.setItem(Z1,String(Math.min(da.length-1,Math.max(0,r)))),Q1=(r,s)=>xm.get(r,s);function tN(r,s,d){return!r||!s?[]:xm.set(r,s,d)}const sA=()=>localStorage.getItem(V1),aA=r=>{r&&localStorage.setItem(V1,r)},oA=()=>localStorage.getItem(P1),lA=r=>{r&&localStorage.setItem(P1,r)};function cA(r,s,d){xm.renameWindow(r,s,d)}function x_(r){if(!r)return[];const s=Ir(g_)[r];return Array.isArray(s)?s:[]}function nN(r,s){if(!r)return[];const d=[...x_(r)];for(const _ of s)_&&!d.includes(_)&&d.push(_);return Ha(g_,r,d),d}function uA(r,s){if(!r)return[];const d=x_(r).filter(_=>_!==s);return Ha(g_,r,d),d}const Fg=[{version:"0.17.0",date:"2026-07-18",highlight:{zh:"对话视图(实验性)· 通知记录 · 本机地址一键预览",en:"Chat view (experimental) · notification inbox · one-tap localhost preview"},items:{zh:["新增「对话视图」(实验性功能,默认关):到设置里打开「启用对话视图(实验性功能)」后,窗口栏就能把 Claude 会话在终端/对话两个视图间一键切换(需已装 Claude hooks,没装可一键安装)。对话视图把会话读成聊天记录——气泡 + Markdown、工具卡(编辑文件带 +A/−B 和彩色 diff)、Claude 提问时点按即答的问题卡、上下文压缩动画、三套暖色配色;终端视图照旧,完全不受影响。","新增「通知记录」:脚本推送(handmux push)的通知按设备留存(各 100 条),全屏翻看、点开看详情、逐条删除;点手机上的通知直接跳到那条消息的详情。","终端里打印的本机地址(localhost:3000 等)自动变成可点的:点一下就能起代理在手机上预览(带路径),多个端口还能并行切换、自动续期。","修复了对话视图 /clear 后残留旧会话内容、问题卡确认后偶发闪现多余卡片、长输出在工具卡里滑不到、消息不足一屏时无法加载更早消息的问题。"],en:["New chat view (experimental, off by default): enable it in Settings → Enable chat view, then flip a Claude pane between terminal and chat from the window bar (requires Claude hooks — one-tap install offered). The chat view reads the session as a conversation — bubbles with Markdown, tool cards (+A/−B and colored diffs for file edits), question cards you answer with a tap, a visible compaction animation, and three warm colour tones. The terminal view is untouched.","New notification inbox: pushes from handmux push are kept per device (latest 100) — browse full-screen, open details, delete one by one; tapping a push lands on that message’s detail.","Localhost URLs printed in the terminal (localhost:3000, …) are now tappable: one tap proxies and previews them on your phone (path preserved), with several ports open in parallel and auto-renewed.","Fixed chat-view issues: stale content after /clear, a stray fallback card flashing after answering a question, long tool output unreachable in the sheet, and older messages unloadable when the window was shorter than a screen."]}},{version:"0.16.0",date:"2026-07-15",highlight:{zh:"分屏布局地图 · 手机也能建/删窗格",en:"Split-layout map · create & close panes from the phone"},items:{zh:["有多个窗格的窗口,选择器不再是一条干巴巴的下拉列表,而是照着你屏幕上真实的分屏样子画出来:每一格对应一个窗格,标着序号、正在跑的命令和 Agent 图标,一眼就看出谁在左谁在右、谁在上谁在下,点一下就切过去看那一格。","现在手机上就能直接分屏和关窗格了:长按地图里的某一格,就能把它「左右分屏」或「上下分屏」,也能「关闭」;还没分屏的窗口在它的菜单里也能分,已经分屏的窗口菜单里点「管理分屏」直接进地图。分好之后自动就落在新的那格里,地图也一直开着,随时能接着分或关。","绑定会话的弹窗更清楚了:「新建会话」和「选已有会话」分成两个明确的选项,不会再让人以为点一下「新建」就直接把会话建出来。"],en:["For a window with several panes, the picker is no longer a plain dropdown — it’s drawn to match the way your screen is actually split: each tile is one pane, labelled with its number, the command it’s running, and its agent, so you can tell at a glance which pane is where. Tap a tile to jump to that pane.","You can now split and close panes right from the phone: long-press a tile in the map to Split it left/right or top/bottom, or Close it; a window that isn’t split yet can be split from its menu, and a split window has a “Manage split” entry that opens the map. After a split you’re dropped into the new pane, and the map stays open so you can keep splitting or closing.","The bind-session dialog is clearer: “New session” and “Pick an existing session” are now two distinct choices, so tapping “New” no longer looks like it creates a session on the spot."]}},{version:"0.15.0",date:"2026-07-14",highlight:{zh:"键盘弹起终端自适应 · 全屏程序可上下滚动",en:"Keyboard-aware terminal · scroll inside full-screen apps"},items:{zh:["键盘弹起时终端不再被顶飞:内容自动重排到键盘上方,主屏短内容贴着键盘上沿显示;全屏程序(vim/less/htop 等)可以在里面上下滚动、到顶/底才翻页,默认显示程序的第一行,移动光标时自动跟随。","全屏程序翻页键上方新增「适配高度」和「定位」两个按钮:「适配高度」一键缩字号,收起键盘就能把整屏程序完整塞进手机屏;「定位」点亮后高亮光标所在行并跟随,方便在长内容里盯住光标。键盘弹起的瞬间光标也一直可见,不用再补按一下。","收件箱在一种特定场景下抓不到状态变更:你回应了权限弹窗、但那次回应没产生任何收尾信号时(普通授权、拒绝并反馈、或按 ESC 中断),它会停留在「需要你」。这一版补上识别——授权或拒绝反馈后回到「进行中」,ESC 中断则消掉状态。","光标不用点屏幕也能看到了:一进会话就能看到光标位置,发键/发指令后即使 Claude 正在忙也会亮着。","从设置里启动动态端口预览,现在会像静态预览一样自动弹出预览面板。","会话重命名撞到已有名字时,会明确提示「名称已存在」;修复了终端上滑一点后画面自己往上爬的问题。"],en:["The terminal no longer gets shoved off-screen when the keyboard opens: content reflows to sit just above the keyboard, with short main-screen output resting on its top edge. Full-screen programs (vim/less/htop, etc.) now scroll up/down inside themselves and only page at the edges, default to showing the program’s first line, and follow the cursor as you move it.","Two new buttons above the full-screen pager: “Fit height” shrinks the font in one tap so the whole program fits on the phone with the keyboard down, and “Locate” highlights and follows the cursor’s row so you can keep track of it in long content. The cursor also stays visible the moment the keyboard opens — no extra tap needed.","In one specific case the inbox couldn’t pick up a state change: when you responded to a permission prompt but that response produced no closing signal (a normal approval, a deny-with-feedback, or an ESC interrupt), it would linger on “needs you”. This release adds that detection — approving or denying returns it to “working”, and an ESC interrupt clears it.","The cursor now shows without tapping the screen: you can see where it is the moment you open a session, and it stays lit after you send a key/command even while Claude is busy.","Starting a dynamic-port preview from Settings now auto-opens the preview sheet, just like a static one.","Renaming a session to a name that already exists now says so clearly; and fixed the terminal creeping upward a line at a time after a small scroll up."]}},{version:"0.14.0",date:"2026-07-13",highlight:{zh:"终端文字选中拷贝 · 脚本复用推送通道",en:"Terminal select & copy · scripts reuse the push channel"},items:{zh:["终端可以长按选中文字了:iOS 式首尾手柄精调、跨屏选择,浮条一键拷贝/整行/整段,复制自动去掉行尾空格;选中期间顶部显示「复制模式 · N 行 · M 字」。","你自己的脚本也能复用 handmux 的推送通道:命令行用 handmux push <标题> <正文> 直接给手机发通知(可选 --session/--device 限定范围),脚本跑完主动提醒你。","滚动终端不再收起键盘:滑动时键盘保持、单击才收起;还能用 ⌨ 按钮或底部手柄拖拽显隐键盘,命令/聊天切换也保持键盘不掉。","往上滑看历史更顺了:一次滑到顶只加载一页、不再叠加拉取来回跳,位置稳停在你看的那行,顶部显示「距底 N/M 行」。","全屏程序(vim/less/htop 等)上方不再串出无关的终端历史。","修复了主页误触返回直接退出、以及从通知进入要多按一次返回才能退出的问题。"],en:["You can now long-press to select text in the terminal: iOS-style start/end handles, selection across screens, a callout to copy / whole line / whole paragraph, with trailing spaces trimmed on copy. A “copy mode · N lines · M chars” bar shows while selecting.","Your own scripts can reuse handmux’s push channel: run handmux push <title> <body> to send a notification straight to your phone (optionally scoped with --session/--device) — handy for a script pinging you when it finishes.","Scrolling the terminal no longer dismisses the keyboard: a swipe keeps it up, a single tap puts it away; you can also show/hide it with the ⌨ button or the dock’s grip handle, and it stays up when you switch between command and chat.","Scrolling up through history is smoother: reaching the top loads exactly one page instead of stacking pulls and jumping around, and your place holds steady on the line you were reading, with a “N/M lines from bottom” readout.","A full-screen program (vim/less/htop, etc.) no longer leaks unrelated terminal history above it.","Fixed a stray Back on the home page dropping you straight out, and needing an extra Back to leave after opening the app from a notification."]}},{version:"0.13.0",date:"2026-07-12",highlight:{zh:"终端文件路径高亮可点",en:"Tappable, highlighted file paths"},items:{zh:["终端里的文件路径现在会高亮显示、可以直接点开;这个高亮可以在设置里开关(默认关闭)。","桌面浏览器用鼠标滚轮往上翻,现在能拉出更深的历史了(不再卡在第一屏);桌面和手机都加了一条纤细的滚动条。","设置面板太高时可以整体滚动了,标题和关闭按钮始终可见、够得到。","修复了 agent 图标和底部输入模式偶尔乱跳的问题——现在按 agent 是否真的在运行来判断,分屏里每个窗格也各显各的图标。","handmux setup 新增「令牌」一项:可以手动固定访问令牌,这样每次重启后手机网址不再变化(留空则仍每次自动生成一个)。"],en:["File paths in the terminal are now highlighted and tappable — tap one to open it. You can toggle the highlight in Settings (off by default).","On a desktop browser the mouse wheel now pulls deeper history instead of stalling at the first screen, and a thin scrollbar was added on both desktop and mobile.","The Settings sheet scrolls as a whole when it is taller than the screen, with the title and close button always reachable.","Fixed the agent icon and the bottom input mode occasionally jumping around — both now track whether the agent is actually running, and each pane in a split shows its own icon.","handmux setup has a new “Token” item: you can pin the access token by hand so the phone URL stops changing on every restart (leave it blank to keep auto-generating one each start)."]}},{version:"0.12.3",date:"2026-07-11",highlight:{zh:"接管会话可自定义名称 + Homebrew 一键安装",en:"Name a takeover session · Homebrew install"},items:{zh:["接管电脑上的会话时,可以自己给新会话起名(默认也帮你填好);接管后想回电脑继续的命令,现在直接显示成 handmux open <名称>,照着敲即可。","新增 Homebrew 一键安装:没装 Node 的 Mac 也能用 brew install handmux/tap/handmux 一条命令装好(handmux + Node + tmux)。已有 Node 的话,npm i -g handmux 仍是更轻的选择。"],en:["When taking over a session running on your computer, you can now name the new session yourself (a default is filled in), and the “continue on the computer” hint shows the exact command to run — handmux open <name>.","New Homebrew install: on a Mac without Node, brew install handmux/tap/handmux sets up handmux, Node, and tmux in one command. If you already have Node, npm i -g handmux stays the lighter option."]}},{version:"0.12.2",date:"2026-07-11",highlight:{zh:"修复主屏图标偏大 / 换图标后不刷新",en:"Home-screen icon: right size & always fresh"},items:{zh:["修复了「添加到主屏」的图标在安卓上偏大、以及更换图标后旧图标不刷新的问题——图标更新现在会自动生效(已加到 iPhone 主屏的需删掉重加一次)。"],en:["Fixed the Add-to-Home-Screen icon looking oversized on Android and a changed icon not refreshing for returning users — icon updates now apply automatically (one already on an iOS home screen needs a one-time remove + re-add)."]}},{version:"0.12.1",date:"2026-07-11",highlight:{zh:"全新品牌图标与双色字标",en:"New brand icon & two-tone wordmark"},items:{zh:["焕新品牌:全新的发光终端图标(主屏图标、启动页都换了)+ 圆润的双色「handmux」字标(hand 白、mux 青→绿),官网、分享卡和 README 也一并更新。"],en:['Brand refresh: a new glowing terminal app icon (home-screen icon + boot splash) and a rounded two-tone "handmux" wordmark (hand in white, mux teal→green), with the site, share cards, and README updated to match.']}},{version:"0.12.0",date:"2026-07-11",highlight:{zh:"全屏程序也能滑动滚动 · 反馈入口 · 聊天草稿不丢",en:"Swipe-scroll full-screen apps · feedback channels · chat drafts kept"},items:{zh:["全屏程序(vim / htop / less 等)现在能直接滑动滚动了:开了鼠标的程序像电脑滚轮一样滑着滚,没开鼠标的分页器(less / man / git log)靠滑动逐行滚;每个全屏画面右侧还多了一枚翻页按钮做整页跳。","设置里新增「反馈与交流」:直达 GitHub Issues,中文用户还能扫码进微信交流群;README、官网、文档里也都能找到入口。","聊天框里没发出去的内容现在会自动保存,下次打开自动填回——误划走、切后台被杀、崩溃都不会再丢半截提示词。","修复:从终端链接或「最近」直接打开的文档,点返回会一次收起面板,不再被硬塞进「目录」层、再返一次直接退出 App。"],en:["Full-screen apps (vim / htop / less …) now scroll by swipe: mouse-mode apps scroll like a desktop wheel, and pagers (less / man / git log) scroll line-by-line on a swipe; every full-screen view also gets a page up/down button on the right for whole-page jumps.",'New "Feedback" section in Settings: a direct link to GitHub Issues, plus a WeChat user group for Chinese users — also surfaced in the README, the site, and the docs.',"Whatever you've typed in the chat box is now saved automatically and restored next time you open it — an accidental swipe-away, a background kill, or a crash no longer eats a half-written prompt.","Fixed: a doc opened straight from a terminal link or 最近 now closes the sheet in one Back press, instead of being forced into its folder view and then dropping you out of the app on the next Back."]}},{version:"0.11.1",date:"2026-07-09",highlight:{zh:"修复 Node 18 下无法启动的问题",en:"Fixes startup crash on Node 18"},items:{zh:["修复了电脑用 Node 18 时 handmux 任何命令都启动不了的问题(0.11.0 配置向导引入的依赖要求过新的 Node)。"],en:["Fixed handmux failing to start any command on Node 18 (a dependency introduced by the 0.11.0 setup wizard required a newer Node)."]}},{version:"0.11.0",date:"2026-07-08",highlight:{zh:"国内可用隧道 natapp/cpolar · 配置向导重做",en:"China-usable tunnels · setup redesigned"},items:{zh:["新增两条国内可用的隧道 natapp 和 cpolar:当 Cloudflare 在国内不稳定时,用你自己的免费账号就能把手机连到电脑。只要一个 authtoken;想要固定地址就填公网地址,留空则用免费临时域名;cpolar 的客户端还会自动下载。","`handmux setup` 重做成菜单式向导:每项设置一行、直接显示当前值,想改哪项就点哪项,不用再一路问到底。连接分两级——先选隧道类型,再进去配它的参数;推送、语音也各成小面板。第一次用会一步步带你走,默认落在「直连」并停在「保存并启动」,小白也能顺下来。"],en:["Two China-usable tunnels, natapp and cpolar: when Cloudflare is unreliable inside mainland China, reach your computer from your phone using your own free account. Just an authtoken; add a public URL for a fixed address or leave it blank for a free temporary one — and cpolar's client auto-downloads.",'`handmux setup` is now a menu-style wizard: every setting is a row showing its current value, so you jump straight to what you want to change instead of answering every prompt in order. Connection is two levels — pick the tunnel type, then configure it inside; push and voice are their own mini-panels. A first run walks you through it, defaulting to "Direct" with the cursor on "Save & start".']}},{version:"0.10.0",date:"2026-07-06",highlight:{zh:"升级前预览新功能 · 电脑 handmux open 接管",en:"Preview an update before installing · handmux open"},items:{zh:["更新提示现在会提前告诉你新版有什么:检测到有新版本时,设置里会逐版列出这次升级带来的新功能(一句话说明),让你在电脑上跑 `handmux update` 之前就知道值不值得。","电脑上新增 `handmux open <会话名>`:把你在手机上建的会话直接在电脑终端接回来(没有就新建),不用再记 `tmux new -A -s`。绑定/新建会话的弹窗里也加了这句提示。"],en:["The update notice now tells you what a new version brings before you install it: when an update is detected, Settings lists each newer version's highlight in one line, so you know whether it's worth running `handmux update` on your computer.","New `handmux open <session>` on the computer: reclaim a session you created from your phone straight into your computer's terminal (created if missing) — no need to remember `tmux new -A -s`. The bind/create dialog now hints at it too."]}},{version:"0.9.1",date:"2026-07-06",highlight:{zh:"「添加到主屏」引导",en:'"Add to Home Screen" coach'},items:{zh:["新增「添加到主屏」引导:第一次在浏览器里打开时,提示你把 handmux 装到主屏,像 App 一样全屏打开。安卓可一键安装;iPhone 给出 Safari 的「分享 → 更多 → 添加到主屏幕」三步——iOS 上收推送也需要它。装好后不再打扰。"],en:[`New "Add to Home Screen" coach: the first time you open handmux in a browser, it shows how to install it to your home screen and run it full-screen like an app. Android installs in one tap; iPhone gets the Safari steps (Share → More → Add to Home Screen) — which is also what iOS push needs. It won't nag once you've added it.`]}},{version:"0.9.0",date:"2026-07-05",highlight:{zh:"聊天输入框多行重做",en:"Multi-line chat composer redone"},items:{zh:["聊天输入框多行重做:文字占满整行,麦克风/发送悬到右下角,末行快挤到按钮才让出一行——长消息不再被右侧按钮列挤窄,多行时拖光标也不会误收键盘。"],en:["Chat composer redone for multi-line: text takes the full width, mic/send float in the bottom-right corner, and a row is yielded only when the last line actually reaches them — long messages are no longer squeezed by a right-hand button column, and dragging the caret no longer collapses the keyboard."]}},{version:"0.8.0",date:"2026-07-05",highlight:{zh:"快捷栏可自定义 · 上传体验重做",en:"Customizable quick-bars · upload redone"},items:{zh:["命令模式的常用命令分成「全局」和「当前窗口」两组:快捷栏里全局的(灰)排前、当前窗口的(绿)排后。尾部改成 ⚙ 齿轮,点开更高的编辑器分两区、各自 ▲▼ 排序。新增区一行搞定:顶部「命令/按键」大 Tab 选类型,左侧开关选加到全局还是本窗口。命令可勾「带回车」(点一下直接执行,末尾带 ⏎);按键用 ⌃⇧⌥ + 一个基键拼出组合键(如 Ctrl+C),点一下直接发到终端。","聊天模式的快捷条也能自定义了:末尾同样是 ⚙,点开编辑器,「消息/按键」两个 Tab —— 消息就是一句发给 agent 的话(以 / 开头当斜杠命令),按键用同一套 ⌃⇧⌥ + 基键拼组合键(ESC/Tab/退格默认就在里面)。点任意一条可回到弹窗改,▲▼ 排序。","上传体验重做:进度条不再一冲到 100% 就假装完事——先显示真实发送进度,字节发完后转成「服务器接收中…」,大文件不再像卡死。上传中可随时「取消」,已传完的文件会保留。","重名不再报错:上传一个已存在的文件名会自动改名(如 `报告 (1).pdf`),绝不覆盖原文件。上传失败时也会告诉你具体原因(过大 / 不支持的类型)。","现在可以上传视频了(mp4、mov、webm 等)。","Git 面板现在能打开 `/tmp` 等家目录以外的仓库(比如 agent 在 /tmp 里干活的项目),不再报红。","用量进度条新增「时间竖线」:标出当前重置窗口已过去的时间比例。已用量在竖线左边=烧得比时间慢(稳),越过竖线=烧得偏快,一眼看出自己的节奏。","新增版本更新提示:每次打开检测一次,服务端落后于 npm 最新版时设置齿轮亮红点,进设置能看到当前/最新版本号,按提示在电脑上跑 `handmux update` 升级即可。"],en:[`Command mode's saved commands now split into "Global" and "This window": the quick-bar shows global ones (grey) first, then this window's (green). The trailing + is now a ⚙ opening a taller two-section editor, each reorderable with ▲▼. One add row does it all: a big Command/Key tab picks the type, a left switch picks which list it lands in. Commands can tick "Send Enter" (a tap runs it, marked ⏎); keys are built from ⌃⇧⌥ + a base key into a combo like Ctrl+C that fires straight into the terminal.`,"Chat mode's quick-bar is now customizable too: the same ⚙ at the end opens an editor with a Message/Key tab — a message is a line sent to the agent (starts with / for a slash-command), a key is built from the same ⌃⇧⌥ + base-key picker (ESC/Tab/Backspace ship as defaults). Tap any row to re-open the card and edit it, ▲▼ to reorder.","Upload redone: the bar no longer jumps to 100% and then hangs — it shows real send progress, then flips to “receiving on the server…” once bytes are flushed, so a big file no longer looks stuck. You can Cancel mid-upload; already-uploaded files are kept.","Name clashes no longer fail: uploading an existing name auto-renames (e.g. `report (1).pdf`) and never overwrites. Failures now tell you why (too large / unsupported type).","Video files can now be uploaded (mp4, mov, webm, …).","The git panel can now open repos outside your home directory (e.g. a project an agent is working in under `/tmp`) instead of erroring.",`Usage bars now show a "time marker": a thin vertical line at how far the current reset window has elapsed. Usage left of the line = you're burning slower than the clock; past it = faster — pacing at a glance.`,"New update notice: checked once each time you open the app — when the server is behind the latest npm release, the settings gear lights a dot and Settings shows the current/latest version so you can run `handmux update` on your computer."]}},{version:"0.7.0",date:"2026-07-03",highlight:{zh:"新增「用量」页",en:'New "Usage" page'},items:{zh:["新增「用量」页(顶栏仪表盘图标):一眼看 Claude 的 5 小时 / 本周额度进度条 + 重置倒计时,以及 Codex 的额度环。全部读主机本地文件,不登录账号、不调用 API。Codex 零配置即用;Claude 的实时额度需要在电脑上运行一次 handmux hooks install(会装一个 statusLine 捕获器,已有自定义 statusLine 的绝不覆盖)。"],en:["New \"Usage\" page (gauge icon in the top bar): see Claude's 5-hour / weekly limit bars with reset countdowns, plus Codex's quota ring — at a glance. All read from local files on the host: no account login, no API calls. Codex works with zero setup; Claude's live limits need a one-time `handmux hooks install` on the computer (it adds a statusLine capturer and never clobbers an existing custom statusLine)."]}},{version:"0.6.0",date:"2026-07-02",highlight:{zh:"新增 Codex 支持",en:"Codex support added"},items:{zh:["新增 Codex 支持:收件箱与推送现在同时认得 Claude 和 Codex——Codex 会话的「进行中 / 需要你 / 已完成」都会像 Claude 一样推到手机;tmux 外跑着的 Codex 会话也能一键「接管」进来(codex resume);新建会话的启动命令预设新增 codex。收件箱每一条、以及顶栏当前会话,都带上 Claude / Codex 标记,一眼区分是哪种 agent。","会话抽屉底部新增「未接管会话」:一眼看到在 tmux 外跑着、手机还控制不了的 Claude / Codex(带状态、时间、最后一条消息),点「接管」即可在 tmux 里续接同一会话——自动加进会话列表并跳进去,以后手机随时回来。"],en:["Added Codex support: the inbox and push now recognize both Claude and Codex — a Codex session's working / waiting-on-you / done states reach your phone just like Claude. You can take over Codex sessions running outside tmux (codex resume), and there's a new codex startup-command preset. Every inbox row and the current-session topbar now carry a Claude / Codex mark so you can tell the two apart at a glance.",`The session drawer now has a "not taken over" section at the bottom: Claude / Codex sessions running outside tmux that your phone can't steer yet (with their state, time, and last message). Tap Take over to resume the same conversation inside tmux — it's added to your session list and opened, so you can return to it from your phone anytime.`]}},{version:"0.5.0",date:"2026-06-28",highlight:{zh:"首个公开版 · 多语言界面",en:"First public release · multi-language UI"},items:{zh:["首个公开发布版本(npm 上的 handmux)。","新增繁体中文、日语、韩语界面(设置 → Language 切换)。","想法角标:有未完成想法时,灯泡图标右上角显示数量。","设置面板列数调节:实时显示当前列数,新增 ±1 精细调节按钮。"],en:["First public release (handmux on npm).","Added Traditional Chinese, Japanese, and Korean UI (Settings → Language to switch).","Idea badge: when there are pending ideas, the lightbulb icon shows a count in the corner.","Settings column control: shows the current column count live, with new ±1 fine-adjust buttons."]}},{date:"2026-06",label:{zh:"早期内测",en:"Early builds"},highlight:{zh:"早期内测",en:"Early builds"},items:{zh:["新增「Git」面板(顶栏图标):仿 VS Code,一页同屏看变更 + 提交历史,点文件/提交看全屏彩色 diff;只读,不动你的工作树。可绑多个目录用 tab 切换。","新增「想法」管理器(顶栏灯泡):按窗口记待办,可编辑、拖拽排序、一键填入、语音输入。","网站预览:选目录预览静态站点,或填端口预览本机正在跑的服务(走专属子域名);图片预览:文件/终端里点图片(含 GIF)直接内嵌打开,可捏合缩放、长按保存。","文件:上传/下载(进度条、系统分享上传),浏览器打开即落到当前会话目录,支持 /tmp、$TMPDIR;文档在应用内预览 Markdown/txt/log/sh,可语音朗读(逐句高亮)。","收件箱 + Web Push:汇总各会话「进行中/已完成/需要你」,窗口标签带状态色点,需要你时推送到手机。","命令面板:常用 + 每会话最近命令,斜杠命令快捷键(/clear、/compact、/model…)。","可靠性:断线重连(退避 + 每请求超时 + 断线横幅,后台自动暂停轮询),离线兜底页。","首版:手机浏览器驱动真实 tmux 面板(xterm 终端 + 会话/窗口/pane 导航 + 深链),移动按键区、键盘自动抬升、列宽/字号调节,可添加到主屏(PWA)。"],en:['New "Git" panel (top-bar icon): VS Code style — changes + commit history on one screen, tap a file/commit for a full-screen colored diff; read-only, never touches your working tree. Bind multiple dirs and switch via tabs.','New "Ideas" manager (top-bar lightbulb): per-window to-dos — edit, drag to reorder, one-tap insert, voice input.',"Website preview: pick a directory for a static site, or a port for a service running locally (dedicated subdomain); image preview: tap an image (including GIFs) in Files or the terminal to open inline, pinch to zoom, long-press to save.","Files: upload/download (progress bar, share-to-upload), the browser opens straight to the current session dir, /tmp and $TMPDIR supported; documents preview in-app (Markdown/txt/log/sh) and can be read aloud (sentence-by-sentence highlight).","Inbox + Web Push: summarizes each session's In-progress / Done / Needs-you, window tabs get a status color dot, and Needs-you pushes to your phone.","Command panel: frequent + per-session recent commands, slash-command shortcuts (/clear, /compact, /model, …).","Reliability: reconnect on disconnect (backoff + per-request timeout + connection-lost banner, polling auto-paused in the background) and an offline fallback page.","First release: a phone browser drives real tmux panes (xterm terminal + session/window/pane navigation + deep links), a mobile key bar, keyboard auto-lift, column-width/font-size adjustment, and add-to-home-screen (PWA)."]}}],dA=r=>r.version||r.date,qh=Fg[0]?dA(Fg[0]):null,hA={jpg:"image/jpeg",jpeg:"image/jpeg",jfif:"image/jpeg",png:"image/png",gif:"image/gif",webp:"image/webp",bmp:"image/bmp",svg:"image/svg+xml",ico:"image/x-icon",heic:"image/heic",heif:"image/heif",avif:"image/avif",tif:"image/tiff",tiff:"image/tiff",pdf:"application/pdf",txt:"text/plain",log:"text/plain",md:"text/markdown",markdown:"text/markdown",csv:"text/csv",json:"application/json",xml:"application/xml",html:"text/html",htm:"text/html",zip:"application/zip",mp4:"video/mp4",m4v:"video/mp4",mov:"video/quicktime",webm:"video/webm",mkv:"video/x-matroska",avi:"video/x-msvideo",wmv:"video/x-ms-wmv",flv:"video/x-flv","3gp":"video/3gpp",ogv:"video/ogg",mpeg:"video/mpeg",mpg:"video/mpeg",doc:"application/msword",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",xls:"application/vnd.ms-excel",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",ppt:"application/vnd.ms-powerpoint",pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation"};function wm(r){const s=(r||"").lastIndexOf(".");return s<0?"":hA[r.slice(s+1).toLowerCase()]||""}function mA(r){return wm(r).startsWith("image/")}class tr extends Error{}class fA extends Error{constructor(s,d,_){super(s),this.status=d,this.serverError=_??null}}async function Zt(r,s={}){const d=Lo(),{timeoutMs:_,...E}=s,R={Authorization:`Bearer ${d??""}`,...E.headers||{}};E.body&&(R["Content-Type"]="application/json");let b=null,a=null;_&&(b=new AbortController,a=setTimeout(()=>b.abort(),_));try{const u=await fetch(r,{cache:"no-store",...E,headers:R,signal:b==null?void 0:b.signal});if(u.status===401)throw new tr;if(!u.ok){let g=null;try{const x=await u.json();x!=null&&x.error&&(g=x.error)}catch{}throw new fA(g||`${r} -> ${u.status}`,u.status,g)}return u.status===204?{unchanged:!0}:await u.json()}catch(u){throw b!=null&&b.signal.aborted?new Error(`${r} -> timeout`):u}finally{a&&clearTimeout(a)}}const Fl=()=>Zt("/api/sessions"),pA=()=>Zt("/api/usage"),Cu=r=>Zt(`/api/windows?session=${encodeURIComponent(r)}`),Fa=r=>Zt(`/api/panes?window=${encodeURIComponent(r)}`),vA=(r,s=1500,d)=>Zt(`/api/history?pane=${encodeURIComponent(r)}&lines=${s}${d?`&since=${d}`:""}`,{timeoutMs:8e3}),iN=(r,{since:s,before:d,limit:_=10}={})=>{let E=`/api/transcript?pane=${encodeURIComponent(r)}&limit=${encodeURIComponent(_)}`;return s&&(E+=`&since=${encodeURIComponent(s)}`),d!=null&&(E+=`&before=${encodeURIComponent(d)}`),Zt(E,{timeoutMs:8e3}).then(R=>R.unchanged?null:R)},gA=r=>Zt(`/api/context?pane=${encodeURIComponent(r)}`,{timeoutMs:8e3}),_A=r=>Zt(`/api/pending-prompt?pane=${encodeURIComponent(r)}`,{timeoutMs:8e3}).then(s=>s.prompt||null),Co=(r,s,d=!0)=>Zt("/api/send",{method:"POST",body:JSON.stringify({pane:r,text:s,enter:d})}),Pu=(r,s)=>Zt("/api/keys",{method:"POST",body:JSON.stringify({pane:r,keys:s})}),bA=(r,s,d=1)=>Zt("/api/scroll",{method:"POST",body:JSON.stringify({pane:r,dir:s,lines:d})}),yA=(r,s,d)=>Zt("/api/resize",{method:"POST",body:JSON.stringify({window:r,cols:s,rows:d})}),xA=(r,s)=>Zt("/api/resize",{method:"POST",body:JSON.stringify({pane:r,cols:s})}),wA=r=>Zt(`/api/layout?window=${encodeURIComponent(r)}`),NA=(r,s)=>Zt("/api/resize",{method:"POST",body:JSON.stringify({window:r,auto:!0,layout:s})}),SA=(r,s,d)=>Zt("/api/sessions",{method:"POST",body:JSON.stringify({name:r,cwd:s,cmd:d})}),CA=(r,s,d,_,E)=>Zt("/api/windows",{method:"POST",body:JSON.stringify({session:r,pane:s,name:d,cwd:_,cmd:E})}),EA=(r,s)=>Zt("/api/sessions",{method:"PATCH",body:JSON.stringify({id:r,name:s})}),jA=(r,s)=>Zt("/api/windows",{method:"PATCH",body:JSON.stringify({id:r,name:s})}),DA=r=>Zt(`/api/windows?window=${encodeURIComponent(r)}`,{method:"DELETE"}),kA=(r,s)=>Zt("/api/windows/swap",{method:"POST",body:JSON.stringify({a:r,b:s})}),rN=(r,s)=>Zt("/api/panes/split",{method:"POST",body:JSON.stringify({pane:r,dir:s})}),RA=r=>Zt(`/api/panes?pane=${encodeURIComponent(r)}`,{method:"DELETE"}),TA=(r,s)=>Zt("/api/dir",{method:"POST",body:JSON.stringify({dir:r,name:s})}),sN=(r,s=null)=>Zt(`/api/file?path=${encodeURIComponent(r)}${s!=null?`&mtime=${encodeURIComponent(s)}`:""}`,{timeoutMs:8e3}),eS=r=>Zt(`/api/dir${r?`?path=${encodeURIComponent(r)}`:""}`,{timeoutMs:8e3}),jo=r=>Zt(`/api/pane-cwd?pane=${encodeURIComponent(r)}`,{timeoutMs:8e3}),LA=()=>Zt("/api/asr/sign",{timeoutMs:8e3}),tS=()=>Zt("/api/config",{timeoutMs:8e3}),MA=()=>Zt("/api/version",{timeoutMs:8e3}),AA=()=>Zt("/api/hooks/install",{method:"POST",timeoutMs:15e3}),UA=(r=[])=>Zt(`/api/states?sessions=${encodeURIComponent(r.join(","))}`,{timeoutMs:4e3}),aN=()=>Zt("/api/orphans",{timeoutMs:8e3}),OA=r=>Zt("/api/orphans/takeover",{method:"POST",body:JSON.stringify(r),timeoutMs:15e3}),oN=r=>Zt(`/api/git/repos?dir=${encodeURIComponent(r)}`,{timeoutMs:8e3}),VA=r=>Zt(`/api/git/status?repo=${encodeURIComponent(r)}`,{timeoutMs:8e3}),PA=(r,{limit:s=50,ref:d}={})=>{let _=`/api/git/log?repo=${encodeURIComponent(r)}&limit=${s}`;return d&&(_+=`&ref=${encodeURIComponent(d)}`),Zt(_,{timeoutMs:8e3})},BA=r=>Zt(`/api/git/branches?repo=${encodeURIComponent(r)}`,{timeoutMs:8e3}),IA=(r,{path:s,commit:d,staged:_}={})=>{let E=`/api/git/diff?repo=${encodeURIComponent(r)}&path=${encodeURIComponent(s??"")}`;return d&&(E+=`&commit=${encodeURIComponent(d)}`),_&&(E+="&staged=1"),Zt(E,{timeoutMs:8e3})},FA=(r,s)=>Zt(`/api/git/commit?repo=${encodeURIComponent(r)}&hash=${encodeURIComponent(s)}`,{timeoutMs:8e3});function HA(r,s){return new Promise((d,_)=>{const E=Lo(),R=new XMLHttpRequest;R.open("GET",`/api/download?path=${encodeURIComponent(r)}`),R.setRequestHeader("Authorization",`Bearer ${E??""}`),R.responseType="blob",R.onprogress=b=>{s&&b.lengthComputable&&s(b.loaded/b.total)},R.onerror=()=>_(new Error("download failed")),R.onload=()=>{if(R.status===401)return _(new tr);if(R.status<200||R.status>=300)return _(new Error(`download -> ${R.status}`));const b=r.split("/").pop()||"download";let a=R.response;const u=wm(b);u&&a&&a.type!==u&&(a=a.slice(0,a.size,u));const g=URL.createObjectURL(a),x=document.createElement("a");x.href=g,x.download=b,document.body.appendChild(x),x.click(),x.remove(),setTimeout(()=>URL.revokeObjectURL(g),1e3),d()},R.send()})}function lN(r,s=null){return new Promise((d,_)=>{const E=Lo(),R=new XMLHttpRequest,b=s!=null?`&mtime=${encodeURIComponent(s)}`:"";R.open("GET",`/api/download?path=${encodeURIComponent(r)}${b}`),R.setRequestHeader("Authorization",`Bearer ${E??""}`),R.responseType="blob",R.onerror=()=>_(new Error(V("api.loadFailed"))),R.onload=()=>{if(R.status===304)return d({notModified:!0});if(R.status===401)return _(new tr);if(R.status<200||R.status>=300)return _(new Error(`image -> ${R.status}`));let a=R.response;const u=wm(r.split("/").pop()||"");u&&a&&a.type!==u&&(a=a.slice(0,a.size,u));const g=Number(R.getResponseHeader("X-Mtime"));d({url:URL.createObjectURL(a),mtimeMs:Number.isFinite(g)?g:null})},R.send()})}const zA=(r,s,d="/")=>{const _=encodeURIComponent(Lo()??"");if((r==null?void 0:r.kind)==="dynamic"){const E=d&&d.startsWith("/")?d:"/",R=E.includes("?")?"&":"?";return`https://${encodeURIComponent(r.name)}.${s}${E}${R}token=${_}`}return`/preview/${encodeURIComponent(r==null?void 0:r.name)}/?token=${_}`},Eu=(r,s={})=>Zt("/api/previews",{method:"POST",body:JSON.stringify(s.port!=null?{name:r,port:s.port}:{name:r,dir:s.dir})}),$A=()=>Zt("/api/previews"),WA=r=>Zt(`/api/previews/${encodeURIComponent(r)}`,{method:"DELETE"});class lm extends Error{constructor(){super("upload aborted"),this.name="UploadAbort"}}function nS(r,s,d,_=!1,{signal:E}={}){return new Promise((R,b)=>{if(E!=null&&E.aborted)return b(new lm);const a=Lo(),u=new FormData;u.append("dir",r),_&&u.append("stash","1"),u.append("file",s,s.name);const g=new XMLHttpRequest;g.open("POST","/api/upload"),g.setRequestHeader("Authorization",`Bearer ${a??""}`),g.upload.onprogress=f=>{d&&f.lengthComputable&&d(f.loaded/f.total,"sending")},g.upload.onload=()=>{d==null||d(1,"processing")};const x=()=>g.abort();E&&E.addEventListener("abort",x,{once:!0});const h=()=>{E&&E.removeEventListener("abort",x)};g.onabort=()=>{h(),b(new lm)},g.onerror=()=>{h(),b(new Error(V("api.uploadFailed")))},g.onload=()=>{if(h(),g.status===401)return b(new tr);if(g.status>=200&&g.status<300)try{return R(JSON.parse(g.responseText))}catch{return R({})}const f={400:V("api.uploadBadDir"),409:V("api.uploadDuplicate"),413:V("api.uploadTooLarge"),415:V("api.uploadBadType")}[g.status]||V("api.uploadFailed");b(new Error(f))},g.send(u)})}async function cN({paneId:r,dir:s,windowId:d,api:_,getPanes:E}){const{id:R}=await _.splitPane(r,s);return{panes:await E(d),selectPaneId:R}}async function GA({paneId:r,windowId:s,viewedPaneId:d,api:_,getPanes:E,pickId:R}){await _.closePane(r);const b=await E(s),a=r===d&&b.length?R(b,null):null;return{panes:b,selectPaneId:a}}const qA=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" role="img" aria-label="Claude"><title>Claude</title><path fill="#d97757" d="m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z"/></svg>
|
|
204
|
+
You might need to use a local HTTP server (instead of file://): https://reactjs.org/link/react-devtools-faq`:""),"font-weight:bold")}Pr.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=xg,Pr.createPortal=eM,Pr.createRoot=nM,Pr.findDOMNode=KL,Pr.flushSync=rM,Pr.hydrate=XL,Pr.hydrateRoot=iM,Pr.render=JL,Pr.unmountComponentAtNode=QL,Pr.unstable_batchedUpdates=Jv,Pr.unstable_renderSubtreeIntoContainer=tM,Pr.version=fg,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})();N1.exports=Pr;var Wl=N1.exports,E1,z0=Wl;{var $0=z0.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;E1=function(r,s){$0.usingClientEntryPoint=!0;try{return z0.createRoot(r,s)}finally{$0.usingClientEntryPoint=!1}}}const j1={"common.save":"Save","common.cancel":"Cancel","common.confirm":"Confirm","common.ok":"OK","common.close":"Close","common.delete":"Delete","common.copy":"Copy","common.rename":"Rename","common.create":"Create","common.back":"Back","common.open":"Open","common.loading":"Loading…","common.done":"Done","token.title":"Access token required","token.placeholder":"Paste HANDMUX_TOKEN","settings.language":"Language","home.empty":"No files opened yet","home.emptyHint":'Switch to "New" to pick one',"home.remove":"Remove","drawer.empty":"No sessions bound yet","drawer.unbind":"Unbind","drawer.bind":"Bind session","drawer.logout":"Log out","windowbar.newWindow":"New window","rename.new_name":"New name","rename.name_rule":"Letters, digits, hyphens only (≤16)","rename.failed":"Rename failed, please retry","rename.saving":"Saving…","newwindow.title":"New window","newwindow.window_name":"Window name (optional)","newwindow.name_placeholder":"Leave blank to auto-name · letters/digits/hyphens ≤16","newwindow.name_rule":"Letters, digits, hyphens only (≤16)","newwindow.start_dir":"Start directory","newwindow.session_dir_named":"{dir} (session dir)","newwindow.session_dir_default":"Session dir (default)","newwindow.choose":"Choose","newwindow.reset_to_session_dir":"Reset to session dir","newwindow.creating":"Creating…","startup.label":"Startup command (optional)","startup.aria":"Startup command","startup.preset_shell":"Plain shell (default)","startup.preset_claude":"claude (launch Claude Code)","startup.preset_claude_continue":"claude -c (resume last session)","startup.preset_codex":"codex (launch Codex CLI)","startup.custom":"Custom…","startup.custom_placeholder":'e.g. claude "fix login bug"',"bind.title":"Bind session","bind.sessionName":"Session name","bind.pickSession":"Choose a session to bind","bind.newSession":"+ New session","bind.modeNew":"New","bind.modeExisting":"Existing","bind.alreadyExists":"Session already exists","bind.bind":"Bind","bind.checking":"Checking…","bind.createAndOpen":"Create & open","bind.creating":"Creating…","bind.createHint":`Session "{name}" doesn't exist — tap "Create & open" to create it`,"bind.alreadyBound":"Session already bound","bind.createFailed":"Create failed, please retry","bind.invalidName":"Only letters, digits, hyphens (≤16)","bind.desktopHint":"On the computer, one command takes any session here back over: handmux open <name>","bind.checkFailed":"Check failed, please retry","bind.startDir":"Start directory","bind.homeDirDefault":"Home directory (default)","bind.choose":"Choose","bind.reset":"Reset","actionsheet.confirmAgain":"Confirm? Tap again","dirpicker.title":"Choose directory","inbox.title":"Inbox","inbox.working":"Working","inbox.done":"Done","inbox.needs":"Needs you","inbox.clearDone":"Clear done","inbox.empty":"No pane status yet","inbox.enableTitle":"Turn on AI session notifications","inbox.enableHint":"Tag every Claude / Codex pane working / waiting on you / done, and get pinged when one needs you.","inbox.enableBtn":"Enable","inbox.enabling":"Enabling…","inbox.enableFailed":"Could not enable — check the server logs.","drawer.orphans.title":"{n} not taken over","drawer.orphans.hint":"Take over to control remotely","inbox.orphans.takeover":"Take over","inbox.orphans.noSession":"no resumable history","inbox.orphans.busy":"busy","inbox.orphans.idle":"idle","inbox.orphans.working":"Taking over…","inbox.orphans.failed":"Takeover failed","inbox.orphans.targetLabel":"Take over into","inbox.orphans.targetNew":"New session","inbox.orphans.nameLabel":"Session name","inbox.orphans.namePlaceholder":"session name","inbox.orphans.killTitle":"The original process","inbox.orphans.killEnd":"End it","inbox.orphans.killKeep":"Keep it","inbox.orphans.recommended":"Recommended","inbox.orphans.killWhy":"If the same session is written from both your computer and your phone, its history gets scrambled. Ending the original lets this device own it cleanly.","inbox.orphans.reopenPre":"Want to continue on the computer instead? Run in a terminal:","idea.title":"Ideas","idea.editPlaceholder":"Edit idea…","idea.addPlaceholder":"Jot an idea…","idea.add":"Add","idea.empty":"No ideas yet — jot one down","idea.dragSort":"Drag to reorder","idea.fillInput":"Fill into input","idea.send":"Send","doclink.title":"Open file","localurl.title":"Proxy & preview","localurl.open":"Enable proxy","localurl.disabled":"Dynamic preview is off — set a preview domain in Settings to proxy local ports.","localurl.notListening":"Nothing is listening on :{port}.","changelog.title":"What's new","preview.dynamic":"Dynamic preview","preview.static":"Static preview","preview.tabs":"Open previews","preview.remainTitle":"Time left — tap to renew / stop","preview.toPcView":"Switch to desktop view","preview.toMobileView":"Switch to mobile view","preview.pcView":"Desktop view","preview.mobileView":"Mobile view","preview.refresh":"Refresh","preview.minimize":"Minimize","preview.ttlDialog":"Preview lifetime","preview.renew":"Renew (reset to 1 hour)","preview.stop":"Stop preview","preview.iframeTitle":"Preview","preview.zoomOut":"Zoom out","preview.zoomIn":"Zoom in","imageviewer.loadFailed":"Failed to load image","imageviewer.saved":"Saved — find it in your album/gallery or Downloads","imageviewer.shareUnsupported":"Image sharing requires Chrome or Safari","imageviewer.zoomOut":"Zoom out","imageviewer.zoomIn":"Zoom in","imageviewer.imageTitle":"Image","imageviewer.saveImage":"Save image","imageviewer.shareImage":"Share image","mic.stop":"Stop voice input","mic.start":"Voice input","dock.send":"Send","dock.send.hint":"Tap to send · hold to insert","dock.phrases":"Phrases","dock.attach":"Upload","dock.history":"History","dock.kbdShow":"Keyboard","dock.kbdHide":"Hide keyboard","history.empty":"No history yet","history.scope":"This window only","dock.input.placeholder":"Say something…","dock.command.placeholder":"Type a command · Enter runs it","dock.mode.agent":"Chat","dock.mode.toggle":"Switch input mode","dock.mode.command":"Command","dock.mode.chat":"Chat","fav.title":"Favorites","fav.add":"Add","fav.addPlaceholder":"Add a favorite…","cmd.editTitle":"Saved commands","cmd.global":"GLOBAL","cmd.window":"THIS WINDOW","cmd.withEnter":"Send directly","cmd.addPlaceholder":"Add a command…","cmd.tabCmd":"Command","cmd.tabKey":"Key","cmd.addTo":"Add to","cmd.addTitle":"Add","cmd.editItem":"Edit","cmd.sticky":"Modifier","cmd.stickyNone":"None","cmd.baseKey":"Key","cmd.pickKey":"Pick a key","cmd.moveUp":"Move up","cmd.moveDown":"Move down","cmd.empty":"None yet","chat.editTitle":"Saved messages","chat.composer.placeholder":"Message Claude…","chat.stop":"Stop","chat.interrupted":"You stopped the response","chat.compacted":"Context compacted","chat.slash.handedOff":"Switched to terminal — run {cmd} there","chat.favs":"Saved","chat.tabMsg":"Message","chat.addPlaceholder":"Message / slash-command…","dock.upload.aria":"Upload file","dock.upload.title":"Upload file (saved to home upload area, not the project)","dock.upload.progress":"Uploading {name}{tag}","dock.upload.failed":"Upload failed: {names}","dock.upload.rejected":"Unsupported file type: {names}","app.nameExists":"That name already exists","app.renameFailed":"Rename failed, please retry","app.deleteFailed":"Delete failed, please retry","app.moveFailed":"Move failed, please retry","app.sessionGone":'Session "{name}" not found, it may have closed',"app.docNotFound":"File not found","app.docTooLarge":"File too large (over 2MB)","app.docUnsupported":"Unsupported file or path","app.docOpenFailed":"Open failed, please retry","app.preview":"Preview","app.openPreview":"Open preview","app.ideas":"Ideas","app.files":"Files","app.settings":"Settings","usage.title":"Usage","usage.win5h":"5-hour","usage.winWeekly":"Weekly","usage.winMonthly":"Monthly","usage.winGeneric":"{h}h window","usage.winPrimary":"Limit","usage.winSecondary":"Secondary","usage.resetIn":"resets in {t}","usage.resetSoon":"resetting…","usage.claudeOff":"Not wired yet — Claude's 5h/weekly usage needs the handmux statusLine:","usage.claudePending":"No data yet — send a message in a Claude session, then reopen.","usage.codexOff":"Codex not detected on this machine.","usage.codexNoQuota":"No quota data in the latest session yet.","usage.loadFailed":"Failed to load usage.","usage.updatedNow":"updated just now","usage.updatedMin":"updated {n}m ago","usage.updatedHr":"updated {n}h ago","usage.updatedDay":"updated {n}d ago","usage.activityNote":"Updates on new messages","usage.timeMark":"Time elapsed in this window","app.renameSession":"Rename session","app.renameWindow":"Rename window","app.moveLeft":"◀ Move left","app.moveRight":"Move right ▶","app.deleteWindow":"Delete window","pane.splitH":"Split left/right","pane.splitV":"Split top/bottom","pane.manage":"Manage split","pane.close":"Close pane","pane.closeConfirm":"Close? Tap again","pane.splitFailed":"Split failed","pane.closeFailed":"Close failed","app.deleteLastWindowConfirm":"This is the last window; deleting it closes the whole session! Tap again","app.deleteConfirm":"Delete? Tap again","app.cannotLocate":"Cannot locate","app.pickItsDir":", pick the directory it lives in:","app.noBoundSession":"No bound session yet","app.tapToBind":"Tap here to bind one","app.selectSessionHint":"Tap ☰ at the top-left to pick a session","app.backToExit":"Press Back again to exit","settings.title":"Settings","settings.group_global":"Global settings","settings.font_size":"Font size","settings.font_decrease":"Decrease font size","settings.font_increase":"Increase font size","settings.font_auto":"Auto","settings.font_auto_title":"Auto-fit to height","settings.chat_lens":"Enable chat view (experimental)","settings.chat_lens_hint":"Experimental — may be unstable. View and drive Claude sessions as a chat; enables the view switch in the window bar and the chat colour tones below.","settings.chat_lens_need_hooks":"Requires Claude hooks first — question cards and status cues in the chat view depend on them.","settings.chat_lens_no_claude":"Claude Code not found — install and run it first.","settings.chat_lens_install_hooks":"Install hooks","settings.chat_lens_installing":"Installing…","settings.chat_lens_hooks_err":"Install failed — run handmux hooks install on your computer","boot.loading":"Loading","boot.chat_empty":"Send your first message to start the conversation","settings.chat_tone":"Chat colour","settings.chat_tone_dusk":"Warm Dusk","settings.chat_tone_ink":"Warm Gold","settings.chat_tone_light":"Warm Cream","settings.chat_tone_hint":"The colour tone of the 对话 (chat) view — all warm.","settings.path_highlight":"Highlight file paths","settings.path_highlight_hint":"Tint tappable file paths in the terminal. Paths stay tappable either way.","settings.whats_new":"What's new","settings.view_changelog":"View changelog","settings.has_update":"Has update","settings.version":"Version","settings.feedback":"Feedback","settings.feedback_issues":"GitHub Issues","settings.feedback_group":"WeChat group","settings.feedback_hint":"Bugs and ideas welcome — issues are tracked and answered.","settings.update_available":"Version {v} available","settings.update_how":"On your computer, run","settings.push_notifications":"Push notifications","settings.notify_on":"Enabled ✓","settings.notify_enable":"Enable device notifications","settings.notify_enabled":"Enabled, you should receive a welcome notification","settings.notify_disabled":"Disabled","settings.notify_failed":"Operation failed","settings.processing":"Processing","settings.push_hint":'Listens for "Needs you" and "Done": when a watched session needs your authorization/answer, or a turn just finished, a push is sent to this device.',"settings.push_unsupported":"Push requires Chrome or Safari","settings.group_session":"Current session settings","settings.screen_cols":"Screen columns","settings.cols_dec":"Fewer","settings.cols_dec_title":"Fewer columns","settings.cols_inc":"More","settings.cols_inc_title":"More columns","settings.cols_restore":"Default","settings.cols_restore_title":"Restore default window size","settings.preview_site":"Preview site","settings.preview_static_site":"Preview static site","settings.preview_running_dynamic":"Dynamic preview running","settings.preview_running_static":"Static preview running","settings.preview_remain_title":"Time remaining","settings.preview_remain":"{time} left","settings.preview_renew":"Renew","settings.preview_confirm_stop":"Confirm stop","settings.preview_stop":"Stop","settings.preview_name":"Name: {name}","settings.preview_port":"(port :{port})","settings.preview_type":"Preview type","settings.preview_off":"Off","settings.preview_static":"Static","settings.preview_dynamic":"Dynamic","settings.preview_off_hint":'Preview is off. Choose "Static" to start.',"settings.preview_off_hint_both":'Preview is off. Choose "Static" or "Dynamic" to start.',"settings.preview_dynamic_disabled":"Dynamic port preview is off. To turn it on, point a wildcard preview domain (previewDomain, e.g. *.example.com) at the gateway with a matching TLS cert. See the README for the Cloudflare vs self-hosted specifics.","settings.preview_pick_dir":"Pick directory & start","settings.preview_static_hint":"Pick a directory containing index.html to preview on your phone.","settings.preview_port_placeholder":"Port, e.g. 3000","settings.preview_port_label":"Port","settings.preview_starting":"Starting…","settings.preview_start":"Start","settings.preview_dynamic_hint":"Enter a port running on this machine (dev server / backend); your phone accesses it directly via a subdomain.","settings.dir_picker_hint":"Pick the static site directory to preview (containing index.html)","settings.err_port_not_listening":"That port is not listening; make sure the service is running","settings.err_bad_port":"Invalid port (1–65535)","settings.err_dynamic_disabled":"Dynamic preview is not enabled","settings.err_start_failed":"Failed to start","filebrowser.openDirFailed":"Cannot open this directory","filebrowser.copiedPath":"Path copied: {abs}","filebrowser.mkdirFailed":"Failed to create folder (invalid name or already exists)","filebrowser.downloading":"Downloading {name}","filebrowser.downloadFailed":"Download failed","filebrowser.uploading":"Uploading {name}{tag}","filebrowser.uploadFailed":"Upload failed","filebrowser.uploadPartialFailed":"These files failed to upload: {names}","filebrowser.uploadRejected":"Unsupported file type: {names}","filebrowser.sessionDir":"Session directory","filebrowser.jumpToSessionDir":"Jump to current session directory","filebrowser.parentDir":"Parent directory","filebrowser.rootSelect":"Switch root (home / temp dirs)","filebrowser.pathPlaceholder":"Enter path (live filter / jump)","filebrowser.newFolder":"New folder","filebrowser.createBtn":"Create","filebrowser.uploadFile":"Upload file","filebrowser.uploadToCurrentDir":"Upload to current directory","filebrowser.enterSubdirToUpload":"Enter a subdirectory to upload","filebrowser.folderNamePlaceholder":"Folder name","filebrowser.uploadPendingTo":"Upload “{name}” to the current directory","filebrowser.enterSubdirFirst":"(enter a subdirectory first)","filebrowser.upload":"Upload","filebrowser.savedToDownloads":"Saved “{name}” to the Downloads folder; view it in the system file manager","filebrowser.noMatches":"No matching files or directories","filebrowser.tooMany":"Showing the first {shown} of {total} — type in the path box to filter","filebrowser.previewUnsupported":"Preview not supported for this file type; tap the button on the right to download","filebrowser.copyAbsPath":"Copy absolute path","filebrowser.download":"Download","filebrowser.pickThisDir":"Select this directory {path}","filebrowser.downloadConfirm":"Download {name}?","filemanager.files":"Files","filemanager.closeTab":"Close tab","filemanager.minimize":"Minimize","filemanager.recent":"Recent","filemanager.directory":"Directory","git.errReadRepo":"Cannot read repository","git.errLoad":"Load failed","git.noRepoInDir":"No git repository here yet — pick another directory, or run git init in this one.","git.outsideRoots":"This folder is outside the area handmux can open — only your home directory and /tmp are reachable. Move the repo under your home directory to browse it here.","git.errReadDir":"Cannot read this directory","git.commitDetail":"Commit details","git.diff":"Diff","git.bindRepo":"Bind repository","git.collapse":"Collapse","git.currentBranch":"Current branch","git.switchViewedBranch":"Switch viewed branch","git.switchBranch":"Switch branch","git.noBranches":"No branches","git.noRepoBound":'No repository bound — tap "+" at the top left to choose a directory.',"git.changes":"Changes","git.commits":"Commits","git.pullToLoadMore":"Pull to load more","git.pickerHint":"Choose a directory to auto-discover git repositories inside it","git.cleanTree":"Working tree clean","git.noCommits":"No commits","git.noDiff":"No diff","git.fontSmaller":"Decrease font size","git.fontLarger":"Increase font size","git.diffTruncated":"Diff too large, truncated","cmd.panel":"Command panel","cmd.title":"Commands","cmd.empty":"No commands yet — send one or save a favorite","cmd.favorites":"Favorites","cmd.scopeGlobal":"Global · all sessions","cmd.recent":"Recent","cmd.scopeSession":"This session only","cmd.favorite":"Favorite","cmd.unfavorite":"Unfavorite","doc.home":"Recent","doc.read":"Read aloud","doc.pauseRead":"Pause reading","doc.resumeRead":"Resume reading","doc.stopRead":"Stop reading","doc.rate":"Speed","doc.fontSmaller":"Smaller font","doc.fontLarger":"Larger font","inbox.view.working":"Running","inbox.view.done":"Completed","inbox.view.needs":"Needs you","push.unsupported":"Push notifications require Chrome or Safari","push.iosAddToHome":'On iOS, first "Add to Home Screen", then open from the home-screen icon to enable',"a2hs.title":"Add handmux to your Home Screen","a2hs.lead":"Open it like an app — full-screen, no address bar. On iPhone it’s also how push reaches you the moment a pane needs you.","a2hs.install":"Install handmux","a2hs.ios1":"Tap the Share button (the ⬆︎ box) in Safari.","a2hs.ios2":"Tap “More”, or scroll down the list.","a2hs.ios3":"Choose “Add to Home Screen”, then “Add”.","a2hs.iosHint":"In Safari: Share → More → Add to Home Screen.","a2hs.iosOpenSafari":"You’re not in Safari. Open this page in Safari, then add it to your Home Screen — other iOS browsers can’t install it.","a2hs.androidManual":"Open your browser menu (⋮) and choose “Add to Home screen” or “Install app”.","a2hs.later":"Maybe later","push.permissionDenied":"Notification permission denied","push.noVapid":"Push is not configured on the server (VAPID)","push.subscribeFailed":"Failed to report subscription","push.sendFailed":"Send failed","api.loadFailed":"Load failed","api.uploadFailed":"Upload failed","upload.title":"Uploading","upload.processing":"Sent — receiving on the server…","api.uploadBadDir":"Cannot upload to this directory","api.uploadDuplicate":"A file with this name already exists","api.uploadTooLarge":"File too large (50MB limit)","api.uploadBadType":"Unsupported file type","time.secAgo":"{n}s ago","time.minAgo":"{n}m ago","time.hourAgo":"{n}h ago","time.dayAgo":"{n}d ago","time.expired":"Expired","time.minutes":"{n} min","settings.script_push":"Script push","settings.script_push_open":"How it works","settings.script_push_hint":"Let a script on your computer push a notification to your phone.","scriptPush.title":"Script push","scriptPush.intro":"Let scripts on your computer reuse handmux’s push channel: on the machine running handmux, one `handmux push` command sends a notification to your phone — handy when a build, CI run, or long task finishes, with no separate push service to wire up.","scriptPush.copied":"Copied","scriptPush.session_placeholder":"<session>","scriptPush.device_placeholder":"<device-key>","scriptPush.scope_all":"All subscribed devices (default)","scriptPush.scope_session":"Only devices in one session","scriptPush.scope_device":"Only this device","scriptPush.device_key_note":"The key above is this device’s — copy and run as-is.","scriptPush.device_need_enable":"Turn on push notifications above first to generate this device’s key.","scriptPush.opts_label":"Optional (append to any of the above)","scriptPush.opt_tag":"--tag <tag> — the same tag replaces the previous push instead of stacking.","scriptPush.opt_url":"--url <path> — opens this path when the notification is tapped.","scriptPush.reliability":"Heads-up: Web Push goes through the phone OS (FCM/APNs) and is best-effort — battery-saver, offline, or vendor policy can delay or drop it. It is not a guaranteed real-time channel. For delivery-critical alerts use a dedicated IM (WeChat / Telegram bot, etc.).","pushInbox.title":"Notifications","pushInbox.empty":"No notifications yet","pushInbox.delete":"Delete","pushInbox.justNow":"just now","pushInbox.minutesAgo":"{n} min ago","pushInbox.hoursAgo":"{n} h ago","pushInbox.detailTitle":"Notification","pushInbox.openUrl":"Open link","pushInbox.expired":"This message has expired","pushInbox.back":"Back","pushInbox.markAllRead":"Mark all read","pushInbox.unreadCount":"{n} unread"},mM={"common.save":"保存","common.cancel":"取消","common.confirm":"确认","common.ok":"确定","common.close":"关闭","common.delete":"删除","common.copy":"复制","common.rename":"重命名","common.create":"新建","common.back":"返回","common.open":"打开","common.loading":"加载中…","common.done":"完成","token.title":"需要访问 token","token.placeholder":"粘贴 HANDMUX_TOKEN","settings.language":"语言 Language","home.empty":"还没有打开过文件","home.emptyHint":"切到「新增」去挑一个","home.remove":"移除","drawer.empty":"还没有绑定会话","drawer.unbind":"解绑","drawer.bind":"绑定会话","drawer.logout":"退出登录","windowbar.newWindow":"新建窗口","rename.new_name":"新名称","rename.name_rule":"只能用字母、数字、横线(≤16)","rename.failed":"重命名失败,请重试","rename.saving":"保存中…","newwindow.title":"新建窗口","newwindow.window_name":"窗口名称(可选)","newwindow.name_placeholder":"留空自动命名 · 字母/数字/横线 ≤16","newwindow.name_rule":"只能用字母、数字、横线(≤16)","newwindow.start_dir":"起始目录","newwindow.session_dir_named":"{dir}(会话目录)","newwindow.session_dir_default":"会话目录(默认)","newwindow.choose":"选择","newwindow.reset_to_session_dir":"重置为会话目录","newwindow.creating":"新建中…","startup.label":"启动命令(可选)","startup.aria":"启动命令","startup.preset_shell":"空 shell(默认)","startup.preset_claude":"claude(启动 Claude Code)","startup.preset_claude_continue":"claude -c(接着上次会话)","startup.preset_codex":"codex(启动 Codex CLI)","startup.custom":"自定义…","startup.custom_placeholder":'例如 claude "修复登录bug"',"bind.title":"绑定会话","bind.sessionName":"会话名称","bind.pickSession":"选择要绑定的会话","bind.newSession":"+ 新建会话","bind.modeNew":"新建会话","bind.modeExisting":"已有会话","bind.alreadyExists":"该会话已存在","bind.bind":"绑定","bind.checking":"校验中…","bind.createAndOpen":"新建并打开","bind.creating":"新建中…","bind.createHint":"会话「{name}」不存在,点「新建并打开」创建","bind.alreadyBound":"已绑定该会话","bind.createFailed":"新建失败,请重试","bind.invalidName":"只能用字母、数字、横线(≤16)","bind.desktopHint":"这里的会话(包括手机新建的),电脑上一条命令即可接管:handmux open <会话名>","bind.checkFailed":"校验失败,请重试","bind.startDir":"起始目录","bind.homeDirDefault":"主目录(默认)","bind.choose":"选择","bind.reset":"重置","actionsheet.confirmAgain":"确认?再点一次","dirpicker.title":"选择目录","inbox.title":"收件箱","inbox.working":"进行中","inbox.done":"已完成","inbox.needs":"需要你","inbox.clearDone":"清除已完成","inbox.empty":"暂无面板状态","inbox.enableTitle":"开启 AI 会话通知","inbox.enableHint":"把每个 Claude / Codex 面板标记为进行中 / 需要你 / 已完成,需要你时还会推送提醒。","inbox.enableBtn":"开启","inbox.enabling":"开启中…","inbox.enableFailed":"开启失败 —— 看看服务端日志。","drawer.orphans.title":"{n} 个未接管会话","drawer.orphans.hint":"接管即可远程操控","inbox.orphans.takeover":"接管","inbox.orphans.noSession":"无可续接的历史","inbox.orphans.busy":"运行中","inbox.orphans.idle":"空闲","inbox.orphans.working":"接管中…","inbox.orphans.failed":"接管失败","inbox.orphans.targetLabel":"接管到","inbox.orphans.targetNew":"新建会话","inbox.orphans.nameLabel":"会话名称","inbox.orphans.namePlaceholder":"会话名","inbox.orphans.killTitle":"接管后原来的进程","inbox.orphans.killEnd":"结束","inbox.orphans.killKeep":"保留","inbox.orphans.recommended":"推荐","inbox.orphans.killWhy":"同一个会话如果电脑和手机同时在写,历史记录会错乱。结束原进程后由手机这边独占,更稳妥。","inbox.orphans.reopenPre":"想回电脑上继续?在电脑终端运行:","idea.title":"想法","idea.editPlaceholder":"编辑想法…","idea.addPlaceholder":"记一条想法…","idea.add":"添加","idea.empty":"还没有想法,记一条吧","idea.dragSort":"拖动排序","idea.fillInput":"填入输入框","idea.send":"发送","doclink.title":"打开文件","localurl.title":"开启代理并预览","localurl.open":"开启代理","localurl.disabled":"动态预览未开启——在设置里配置预览域名后可代理本机端口。","localurl.notListening":"端口 :{port} 没有服务在监听。","changelog.title":"新功能","preview.dynamic":"动态预览","preview.static":"静态预览","preview.tabs":"打开的预览","preview.remainTitle":"剩余有效期 — 点击续期 / 停止","preview.toPcView":"切换到电脑视图","preview.toMobileView":"切换到手机视图","preview.pcView":"电脑视图","preview.mobileView":"手机视图","preview.refresh":"刷新","preview.minimize":"收起","preview.ttlDialog":"预览有效期","preview.renew":"续期(重置为 1 小时)","preview.stop":"停止预览","preview.iframeTitle":"预览","preview.zoomOut":"缩小","preview.zoomIn":"放大","imageviewer.loadFailed":"图片加载失败","imageviewer.saved":"已保存,可在相册/图库或「下载」中查看","imageviewer.shareUnsupported":"图片分享需要 Chrome 或 Safari 浏览器","imageviewer.zoomOut":"缩小","imageviewer.zoomIn":"放大","imageviewer.imageTitle":"图片","imageviewer.saveImage":"保存图片","imageviewer.shareImage":"分享图片","mic.stop":"停止语音输入","mic.start":"语音输入","dock.send":"发送","dock.send.hint":"点发送 · 长按填入","dock.phrases":"常用语","dock.attach":"上传","dock.history":"历史","dock.kbdShow":"展开键盘","dock.kbdHide":"收起键盘","history.empty":"还没有发送记录","history.scope":"仅当前窗口的记录","dock.input.placeholder":"说点什么…","dock.command.placeholder":"输入命令 · 回车执行","dock.mode.agent":"对话","dock.mode.toggle":"切换输入模式","dock.mode.command":"命令模式","dock.mode.chat":"聊天模式","fav.title":"常用","fav.add":"添加","fav.addPlaceholder":"加一条常用…","cmd.editTitle":"常用命令","cmd.global":"全局","cmd.window":"当前窗口","cmd.withEnter":"直接发送","cmd.addPlaceholder":"加一条命令…","cmd.tabCmd":"命令","cmd.tabKey":"按键","cmd.addTo":"添加到","cmd.addTitle":"添加","cmd.editItem":"编辑","cmd.sticky":"粘滞键","cmd.stickyNone":"无","cmd.baseKey":"基键","cmd.pickKey":"选择按键","cmd.moveUp":"上移","cmd.moveDown":"下移","cmd.empty":"还没有","chat.editTitle":"常用消息","chat.composer.placeholder":"和 Claude 对话…","chat.stop":"停止","chat.interrupted":"你终止了这次回复","chat.compacted":"上下文已压缩","chat.slash.handedOff":"已切到终端视图 · 在这里操作 {cmd}","chat.favs":"常用","chat.tabMsg":"消息","chat.addPlaceholder":"消息 / 斜杠命令…","dock.upload.aria":"上传文件","dock.upload.title":"上传文件(存到家目录上传区,不进项目)","dock.upload.progress":"上传 {name}{tag}","dock.upload.failed":"上传失败:{names}","dock.upload.rejected":"不支持的文件类型:{names}","app.nameExists":"该名已存在","app.renameFailed":"重命名失败,请重试","app.deleteFailed":"删除失败,请重试","app.moveFailed":"移动失败,请重试","app.sessionGone":"会话「{name}」不存在,可能已关闭","app.docNotFound":"文件不存在","app.docTooLarge":"文件过大(超过 2MB)","app.docUnsupported":"不支持的文件或路径","app.docOpenFailed":"打开失败,请重试","app.preview":"预览","app.openPreview":"打开预览","app.ideas":"想法","app.files":"文件","app.settings":"设置","usage.title":"用量","usage.win5h":"5 小时","usage.winWeekly":"本周","usage.winMonthly":"本月","usage.winGeneric":"{h} 小时窗口","usage.winPrimary":"额度","usage.winSecondary":"次级额度","usage.resetIn":"{t}后重置","usage.resetSoon":"即将重置…","usage.claudeOff":"尚未接入 —— Claude 的 5h/周额度需要 handmux statusLine:","usage.claudePending":"暂无数据 —— 在 Claude 会话里发一条消息,再重新打开。","usage.codexOff":"本机未检测到 Codex。","usage.codexNoQuota":"最近的会话里还没有额度数据。","usage.loadFailed":"加载用量失败。","usage.updatedNow":"刚刚更新","usage.updatedMin":"{n} 分钟前更新","usage.updatedHr":"{n} 小时前更新","usage.updatedDay":"{n} 天前更新","usage.activityNote":"在有新消息时更新","usage.timeMark":"本窗口已过去的时间","app.renameSession":"重命名会话","app.renameWindow":"重命名窗口","app.moveLeft":"◀ 左移","app.moveRight":"右移 ▶","app.deleteWindow":"删除窗口","pane.splitH":"左右分屏","pane.splitV":"上下分屏","pane.manage":"管理分屏","pane.close":"关闭此格","pane.closeConfirm":"确认关闭?再点一次","pane.splitFailed":"分屏失败","pane.closeFailed":"关闭失败","app.deleteLastWindowConfirm":"这是最后一个窗口,删除将关闭整个会话!再点一次","app.deleteConfirm":"确认删除?再点一次","app.cannotLocate":"无法定位","app.pickItsDir":",请选它所在的目录:","app.noBoundSession":"还没有绑定会话","app.tapToBind":"点此绑定一个","app.selectSessionHint":"点击左上角 ☰ 选择会话","app.backToExit":"再按一次返回键退出","settings.title":"设置","settings.group_global":"全局设置","settings.font_size":"字体大小","settings.font_decrease":"减小字体","settings.font_increase":"增大字体","settings.font_auto":"自适应","settings.font_auto_title":"按高度自动适配","settings.chat_lens":"启用对话视图(实验性功能)","settings.chat_lens_hint":"实验性功能,可能不稳定。以对话形式查看和操作 Claude 会话;开启后,窗口栏出现视图切换,并可选择对话配色。","boot.loading":"正在加载","boot.chat_empty":"发送你的第一条消息,对话就开始啦","settings.chat_lens_need_hooks":"需先安装 Claude hooks:对话里的问题卡、状态提示都依赖它。","settings.chat_lens_no_claude":"未检测到 Claude Code;安装并运行后再开启。","settings.chat_lens_install_hooks":"一键安装 hooks","settings.chat_lens_installing":"安装中…","settings.chat_lens_hooks_err":"安装失败,请到电脑上运行 handmux hooks install","settings.chat_tone":"对话配色","settings.chat_tone_dusk":"暖夜","settings.chat_tone_ink":"暖金","settings.chat_tone_light":"暖黄","settings.chat_tone_hint":"对话视图的色调,均为暖色系。暖夜=暖棕暗、暖金=品牌橄榄金、暖黄=奶油亮。","settings.path_highlight":"高亮文件路径","settings.path_highlight_hint":"给终端里可点开的文件路径加底色。无论开关与否,路径都可点开。","settings.whats_new":"新功能","settings.view_changelog":"查看更新日志","settings.has_update":"有更新","settings.version":"版本","settings.feedback":"反馈与交流","settings.feedback_issues":"GitHub 反馈","settings.feedback_group":"微信用户群","settings.feedback_hint":"bug、想法都欢迎——Issue 会被跟踪处理;微信群反馈直达。","settings.update_available":"有新版本 v{v} 可用","settings.update_how":"在电脑上运行","settings.push_notifications":"推送通知","settings.notify_on":"已开启 ✓","settings.notify_enable":"开启设备通知","settings.notify_enabled":"已开启,应会收到一条欢迎通知","settings.notify_disabled":"已关闭","settings.notify_failed":"操作失败","settings.processing":"处理中","settings.push_hint":"监听「需要你」和「已完成」:所关注会话需要你授权/回答,或一个回合刚做完时,推送到此设备。","settings.push_unsupported":"推送需要 Chrome 或 Safari 浏览器","settings.group_session":"当前会话设置","settings.screen_cols":"屏幕列数","settings.cols_dec":"减少","settings.cols_dec_title":"减少列数","settings.cols_inc":"增加","settings.cols_inc_title":"增加列数","settings.cols_restore":"默认","settings.cols_restore_title":"恢复窗口默认尺寸","settings.preview_site":"预览站点","settings.preview_static_site":"预览静态站点","settings.preview_running_dynamic":"动态预览 运行中","settings.preview_running_static":"静态预览 运行中","settings.preview_remain_title":"剩余有效期","settings.preview_remain":"剩 {time}","settings.preview_renew":"续期","settings.preview_confirm_stop":"确认停止","settings.preview_stop":"停止","settings.preview_name":"名称:{name}","settings.preview_port":"(端口 :{port})","settings.preview_type":"预览类型","settings.preview_off":"不开启","settings.preview_static":"静态","settings.preview_dynamic":"动态","settings.preview_off_hint":"未开启预览。选择「静态」开始。","settings.preview_off_hint_both":"未开启预览。选择「静态」或「动态」开始。","settings.preview_dynamic_disabled":"动态端口预览未启用。要开启:把一个通配预览域名(previewDomain,如 *.example.com)指向网关,并配上对应的 TLS 证书。Cloudflare / 自建的证书差异见 README。","settings.preview_pick_dir":"选择目录启动","settings.preview_static_hint":"选一个含 index.html 的目录,在手机上预览。","settings.preview_port_placeholder":"端口,如 3000","settings.preview_port_label":"端口","settings.preview_starting":"启动中…","settings.preview_start":"启动","settings.preview_dynamic_hint":"填本机正在运行的端口(dev server / 后端),手机经子域名直接访问。","settings.dir_picker_hint":"选择要预览的静态站点目录(含 index.html)","settings.err_port_not_listening":"该端口未在监听,请确认服务已启动","settings.err_bad_port":"端口不合法(1–65535)","settings.err_dynamic_disabled":"动态预览未开启","settings.err_start_failed":"启动失败","filebrowser.openDirFailed":"无法打开该目录","filebrowser.copiedPath":"已复制路径:{abs}","filebrowser.mkdirFailed":"新建目录失败(名称非法或已存在)","filebrowser.downloading":"下载 {name}","filebrowser.downloadFailed":"下载失败","filebrowser.uploading":"上传 {name}{tag}","filebrowser.uploadFailed":"上传失败","filebrowser.uploadPartialFailed":"以下文件上传失败:{names}","filebrowser.uploadRejected":"不支持的文件类型:{names}","filebrowser.sessionDir":"会话目录","filebrowser.jumpToSessionDir":"跳到当前会话目录","filebrowser.parentDir":"上级目录","filebrowser.rootSelect":"切换根目录(家目录 / 临时目录)","filebrowser.pathPlaceholder":"输入路径(实时筛选/跳转)","filebrowser.newFolder":"新建文件夹","filebrowser.createBtn":"创建","filebrowser.uploadFile":"上传文件","filebrowser.uploadToCurrentDir":"上传到当前目录","filebrowser.enterSubdirToUpload":"请进入一个子目录上传","filebrowser.folderNamePlaceholder":"文件夹名称","filebrowser.uploadPendingTo":"把「{name}」上传到当前目录","filebrowser.enterSubdirFirst":"(请先进入一个子目录)","filebrowser.upload":"上传","filebrowser.savedToDownloads":"已保存「{name}」到「下载」文件夹,可在系统文件管理器查看","filebrowser.noMatches":"没有匹配的文件或目录","filebrowser.tooMany":"共 {total} 项,只显示前 {shown} 项——在路径框输入关键词可筛选","filebrowser.previewUnsupported":"暂不支持该类型文件的预览,点右侧按钮可下载","filebrowser.copyAbsPath":"复制绝对路径","filebrowser.download":"下载","filebrowser.pickThisDir":"选定此目录 {path}","filebrowser.downloadConfirm":"下载 {name}?","filemanager.files":"文件","filemanager.closeTab":"关闭标签","filemanager.minimize":"最小化","filemanager.recent":"最近","filemanager.directory":"目录","git.errReadRepo":"无法读取仓库","git.errLoad":"加载失败","git.noRepoInDir":"这个目录还不是 git 仓库 —— 换一个目录,或在这里 git init 一下。","git.outsideRoots":"这个目录在 handmux 可访问范围之外 —— 只开放主目录和 /tmp。把仓库放到主目录下,就能在这里查看了。","git.errReadDir":"无法读取该目录","git.commitDetail":"提交详情","git.diff":"差异","git.bindRepo":"绑定仓库","git.collapse":"收起","git.currentBranch":"当前分支","git.switchViewedBranch":"切换查看的分支","git.switchBranch":"切换分支","git.noBranches":"暂无分支","git.noRepoBound":"未绑定仓库,点左上角「+」选择一个目录。","git.changes":"变更","git.commits":"提交","git.pullToLoadMore":"下拉加载更多","git.pickerHint":"选择一个目录,自动查找其中的 git 仓库","git.cleanTree":"工作区干净","git.noCommits":"暂无提交","git.noDiff":"无差异","git.fontSmaller":"缩小字体","git.fontLarger":"放大字体","git.diffTruncated":"diff 过大,已截断","cmd.panel":"命令面板","cmd.title":"命令","cmd.empty":"还没有命令,发送一条或保存常用","cmd.favorites":"常用","cmd.scopeGlobal":"全局 · 所有会话","cmd.recent":"最近","cmd.scopeSession":"仅本会话","cmd.favorite":"收藏","cmd.unfavorite":"取消收藏","doc.home":"最近","doc.read":"朗读","doc.pauseRead":"暂停朗读","doc.resumeRead":"继续朗读","doc.stopRead":"停止朗读","doc.rate":"语速","doc.fontSmaller":"缩小字体","doc.fontLarger":"放大字体","inbox.view.working":"进行中","inbox.view.done":"已完成","inbox.view.needs":"需要你","push.unsupported":"推送通知需要 Chrome 或 Safari 浏览器","push.iosAddToHome":'iOS 需先把本站"添加到主屏幕",从主屏图标打开后再开启',"a2hs.title":"把 handmux 添加到主屏","a2hs.lead":"像 App 一样打开——全屏、没有地址栏。在 iPhone 上,pane 需要你时的推送也靠它送达。","a2hs.install":"安装 handmux","a2hs.ios1":"点 Safari 里的分享按钮(⬆︎ 方框)。","a2hs.ios2":"点「更多」,或向下滑动列表。","a2hs.ios3":"选「添加到主屏幕」,再点「添加」。","a2hs.iosHint":"Safari 里:分享 → 更多 → 添加到主屏幕。","a2hs.iosOpenSafari":"当前不是 Safari。请在 Safari 里打开本页再添加到主屏——其他 iOS 浏览器无法安装。","a2hs.androidManual":"打开浏览器菜单(⋮),选「添加到主屏幕」或「安装应用」。","a2hs.later":"以后再说","push.permissionDenied":"通知权限被拒绝","push.noVapid":"服务端未配置推送(VAPID)","push.subscribeFailed":"订阅上报失败","push.sendFailed":"发送失败","api.loadFailed":"加载失败","api.uploadFailed":"上传失败","upload.title":"上传中","upload.processing":"已发送,服务器接收中…","api.uploadBadDir":"无法上传到该目录","api.uploadDuplicate":"已存在同名文件","api.uploadTooLarge":"文件过大(上限 50MB)","api.uploadBadType":"不支持的文件类型","time.secAgo":"{n}秒前","time.minAgo":"{n}分钟前","time.hourAgo":"{n}小时前","time.dayAgo":"{n}天前","time.expired":"已过期","time.minutes":"{n} 分钟","settings.script_push":"脚本推送","settings.script_push_open":"怎么用","settings.script_push_hint":"让电脑上的脚本把一条通知推到手机。","scriptPush.title":"脚本推送","scriptPush.intro":"让电脑上的脚本复用 handmux 的推送通道:在运行 handmux 的电脑上,一条 handmux push 命令就能把通知推到手机——构建、CI 或长任务结束时提醒你,不用另接推送服务。","scriptPush.copied":"已复制","scriptPush.session_placeholder":"<会话名>","scriptPush.device_placeholder":"<本设备key>","scriptPush.scope_all":"推给所有已订阅设备(默认)","scriptPush.scope_session":"只推某个会话里的设备","scriptPush.scope_device":"只推这台设备","scriptPush.device_key_note":"上面这串 key 就是这台设备的,复制即用。","scriptPush.device_need_enable":"先在上方开启推送通知,才会生成这台设备的 key。","scriptPush.opts_label":"可选参数(追加到上面任意一条后面)","scriptPush.opt_tag":"--tag <标签> —— 相同 tag 会覆盖上一条推送,而不是堆叠。","scriptPush.opt_url":"--url <路径> —— 点击通知时打开这个路径。","scriptPush.reliability":"注意:Web 推送经手机系统(FCM/APNs)中转,属尽力而为——省电模式、离线或厂商策略都可能延迟或丢弃它,并不保证实时送达。对送达强依赖的场景,请改用专门的 IM(微信 / Telegram bot 等)。","pushInbox.title":"通知记录","pushInbox.empty":"还没有脚本通知","pushInbox.delete":"删除","pushInbox.justNow":"刚刚","pushInbox.minutesAgo":"{n}分钟前","pushInbox.hoursAgo":"{n}小时前","pushInbox.detailTitle":"通知详情","pushInbox.openUrl":"打开链接","pushInbox.expired":"这条消息已过期","pushInbox.back":"返回","pushInbox.markAllRead":"全部已读","pushInbox.unreadCount":"{n} 未读"},fM={"common.save":"儲存","common.cancel":"取消","common.confirm":"確認","common.ok":"確定","common.close":"關閉","common.delete":"刪除","common.copy":"複製","common.rename":"重新命名","common.create":"新增","common.back":"返回","common.open":"開啟","common.loading":"載入中…","common.done":"完成","token.title":"需要存取 Token","token.placeholder":"貼上 HANDMUX_TOKEN","settings.language":"語言 Language","home.empty":"尚未開啟任何檔案","home.emptyHint":"切換到「新增」挑選一個","home.remove":"移除","drawer.empty":"尚未綁定工作階段","drawer.unbind":"解除綁定","drawer.bind":"綁定工作階段","drawer.logout":"登出","windowbar.newWindow":"新增視窗","rename.new_name":"新名稱","rename.name_rule":"只能使用字母、數字、連字號(≤16)","rename.failed":"重新命名失敗,請重試","rename.saving":"儲存中…","newwindow.title":"新增視窗","newwindow.window_name":"視窗名稱(選填)","newwindow.name_placeholder":"留空自動命名 · 字母/數字/連字號 ≤16","newwindow.name_rule":"只能使用字母、數字、連字號(≤16)","newwindow.start_dir":"起始目錄","newwindow.session_dir_named":"{dir}(工作階段目錄)","newwindow.session_dir_default":"工作階段目錄(預設)","newwindow.choose":"選擇","newwindow.reset_to_session_dir":"重置為工作階段目錄","newwindow.creating":"建立中…","startup.label":"啟動命令(選填)","startup.aria":"啟動命令","startup.preset_shell":"空白 Shell(預設)","startup.preset_claude":"claude(啟動 Claude Code)","startup.preset_claude_continue":"claude -c(繼續上次工作階段)","startup.preset_codex":"codex(啟動 Codex CLI)","startup.custom":"自訂…","startup.custom_placeholder":'例如 claude "修復登入 bug"',"bind.title":"綁定工作階段","bind.sessionName":"工作階段名稱","bind.pickSession":"選擇要綁定的工作階段","bind.newSession":"+ 新增工作階段","bind.modeNew":"新增工作階段","bind.modeExisting":"既有工作階段","bind.alreadyExists":"此工作階段已存在","bind.bind":"綁定","bind.checking":"驗證中…","bind.createAndOpen":"新增並開啟","bind.creating":"建立中…","bind.createHint":"工作階段「{name}」不存在,點「新增並開啟」建立","bind.alreadyBound":"已綁定此工作階段","bind.createFailed":"建立失敗,請重試","bind.invalidName":"只能使用字母、數字、連字號(≤16)","bind.desktopHint":"這裡的工作階段(包括手機新建的),電腦上一條命令即可接管:handmux open <名稱>","bind.checkFailed":"驗證失敗,請重試","bind.startDir":"起始目錄","bind.homeDirDefault":"主目錄(預設)","bind.choose":"選擇","bind.reset":"重置","actionsheet.confirmAgain":"確認?再點一次","dirpicker.title":"選擇目錄","inbox.title":"收件匣","inbox.working":"進行中","inbox.done":"已完成","inbox.needs":"需要你","inbox.clearDone":"清除已完成","inbox.empty":"目前沒有面板狀態","inbox.enableTitle":"開啟 AI 工作階段通知","inbox.enableHint":"將每個 Claude / Codex 面板標記為進行中 / 需要你 / 已完成,需要時也會推播提醒。","inbox.enableBtn":"開啟","inbox.enabling":"開啟中…","inbox.enableFailed":"開啟失敗——請查看伺服器日誌。","idea.title":"想法","idea.editPlaceholder":"編輯想法…","idea.addPlaceholder":"記錄一條想法…","idea.add":"新增","idea.empty":"還沒有想法,記錄一條吧","idea.dragSort":"拖曳排序","idea.fillInput":"填入輸入框","idea.send":"傳送","doclink.title":"開啟檔案","changelog.title":"新功能","preview.dynamic":"動態預覽","preview.static":"靜態預覽","preview.remainTitle":"剩餘有效期 — 點擊續期 / 停止","preview.toPcView":"切換到電腦檢視","preview.toMobileView":"切換到手機檢視","preview.pcView":"電腦檢視","preview.mobileView":"手機檢視","preview.refresh":"重新整理","preview.minimize":"收起","preview.ttlDialog":"預覽有效期","preview.renew":"續期(重置為 1 小時)","preview.stop":"停止預覽","preview.iframeTitle":"預覽","preview.zoomOut":"縮小","preview.zoomIn":"放大","imageviewer.loadFailed":"圖片載入失敗","imageviewer.saved":"已儲存,可在相簿或「下載」中查看","imageviewer.shareUnsupported":"圖片分享需要 Chrome 或 Safari 瀏覽器","imageviewer.zoomOut":"縮小","imageviewer.zoomIn":"放大","imageviewer.imageTitle":"圖片","imageviewer.saveImage":"儲存圖片","imageviewer.shareImage":"分享圖片","mic.stop":"停止語音輸入","mic.start":"語音輸入","dock.send":"傳送","dock.send.hint":"點傳送 · 長按填入","dock.phrases":"常用語","dock.attach":"上傳","dock.history":"歷史","history.empty":"還沒有發送記錄","history.scope":"僅目前視窗的記錄","dock.input.placeholder":"說點什麼…","dock.command.placeholder":"輸入指令 · Enter 執行","dock.mode.agent":"對話","dock.mode.toggle":"切換輸入模式","dock.mode.command":"命令模式","dock.mode.chat":"聊天模式","fav.title":"常用","fav.add":"新增","fav.addPlaceholder":"新增常用…","dock.upload.aria":"上傳檔案","dock.upload.title":"上傳檔案(存到主目錄上傳區,不進專案)","dock.upload.progress":"上傳 {name}{tag}","dock.upload.failed":"上傳失敗:{names}","app.nameExists":"該名稱已存在","app.renameFailed":"重新命名失敗,請重試","app.deleteFailed":"刪除失敗,請重試","app.moveFailed":"移動失敗,請重試","app.sessionGone":"工作階段「{name}」不存在,可能已關閉","app.docNotFound":"檔案不存在","app.docTooLarge":"檔案過大(超過 2MB)","app.docUnsupported":"不支援的檔案或路徑","app.docOpenFailed":"開啟失敗,請重試","app.preview":"預覽","app.openPreview":"開啟預覽","app.ideas":"想法","app.files":"檔案","app.settings":"設定","app.renameSession":"重新命名工作階段","app.renameWindow":"重新命名視窗","app.moveLeft":"◀ 左移","app.moveRight":"右移 ▶","app.deleteWindow":"刪除視窗","pane.splitH":"左右分割","pane.splitV":"上下分割","pane.manage":"管理分割","pane.close":"關閉此格","pane.closeConfirm":"確認關閉?再點一次","pane.splitFailed":"分割失敗","pane.closeFailed":"關閉失敗","app.deleteLastWindowConfirm":"這是最後一個視窗,刪除將關閉整個工作階段!再點一次","app.deleteConfirm":"確認刪除?再點一次","app.cannotLocate":"無法定位","app.pickItsDir":",請選擇所在目錄:","app.noBoundSession":"尚未綁定工作階段","app.tapToBind":"點此綁定一個","app.selectSessionHint":"點擊左上角 ☰ 選擇工作階段","app.backToExit":"再按一次返回鍵結束","settings.title":"設定","settings.group_global":"全域設定","settings.font_size":"字型大小","settings.font_decrease":"縮小字型","settings.font_increase":"放大字型","settings.font_auto":"自適應","settings.font_auto_title":"依高度自動調整","settings.chat_lens":"啟用對話視圖(實驗性功能)","settings.chat_lens_hint":"實驗性功能,可能不穩定。以對話形式查看和操作 Claude 工作階段;開啟後,視窗列出現視圖切換,並可選擇對話配色。","boot.loading":"正在載入","boot.chat_empty":"發送你的第一則訊息,對話就開始啦","settings.chat_lens_need_hooks":"需先安裝 Claude hooks:對話裡的問題卡、狀態提示都依賴它。","settings.chat_lens_no_claude":"未檢測到 Claude Code;安裝並運行後再開啟。","settings.chat_lens_install_hooks":"一鍵安裝 hooks","settings.chat_lens_installing":"安裝中…","settings.chat_lens_hooks_err":"安裝失敗,請到電腦上運行 handmux hooks install","settings.path_highlight":"高亮檔案路徑","settings.path_highlight_hint":"為終端機裡可點開的檔案路徑加底色。無論開關與否,路徑都可點開。","settings.whats_new":"新功能","settings.view_changelog":"查看更新日誌","settings.has_update":"有更新","settings.version":"版本","settings.feedback":"意見回饋","settings.feedback_issues":"GitHub 回報","settings.feedback_group":"微信用戶群","settings.feedback_hint":"bug、想法都歡迎——Issue 會被追蹤處理;微信群回饋直達。","settings.update_available":"有新版本 v{v} 可用","settings.update_how":"在電腦上執行","settings.push_notifications":"推播通知","settings.notify_on":"已開啟 ✓","settings.notify_enable":"開啟裝置通知","settings.notify_enabled":"已開啟,應會收到一則歡迎通知","settings.notify_disabled":"已關閉","settings.notify_failed":"操作失敗","settings.processing":"處理中","settings.push_hint":"監聽「需要你」和「已完成」:所關注工作階段需要授權/回答,或一輪剛完成時,推播到此裝置。","settings.push_unsupported":"推播需要 Chrome 或 Safari 瀏覽器","settings.group_session":"目前工作階段設定","settings.screen_cols":"螢幕欄數","settings.cols_dec":"減少","settings.cols_dec_title":"減少欄數","settings.cols_inc":"增加","settings.cols_inc_title":"增加欄數","settings.cols_restore":"預設","settings.cols_restore_title":"恢復視窗預設尺寸","settings.preview_site":"預覽站台","settings.preview_static_site":"預覽靜態站台","settings.preview_running_dynamic":"動態預覽 執行中","settings.preview_running_static":"靜態預覽 執行中","settings.preview_remain_title":"剩餘有效期","settings.preview_remain":"剩 {time}","settings.preview_renew":"續期","settings.preview_confirm_stop":"確認停止","settings.preview_stop":"停止","settings.preview_name":"名稱:{name}","settings.preview_port":"(連接埠:{port})","settings.preview_type":"預覽類型","settings.preview_off":"不開啟","settings.preview_static":"靜態","settings.preview_dynamic":"動態","settings.preview_off_hint":"未開啟預覽。選擇「靜態」開始。","settings.preview_off_hint_both":"未開啟預覽。選擇「靜態」或「動態」開始。","settings.preview_dynamic_disabled":"動態連接埠預覽未啟用。要開啟:將一個萬用字元預覽網域(previewDomain,如 *.example.com)指向閘道,並設定對應的 TLS 憑證。Cloudflare / 自建憑證差異請見 README。","settings.preview_pick_dir":"選擇目錄啟動","settings.preview_static_hint":"選一個含 index.html 的目錄,在手機上預覽。","settings.preview_port_placeholder":"連接埠,如 3000","settings.preview_port_label":"連接埠","settings.preview_starting":"啟動中…","settings.preview_start":"啟動","settings.preview_dynamic_hint":"填入本機正在執行的連接埠(dev server / 後端),手機透過子網域直接存取。","settings.dir_picker_hint":"選擇要預覽的靜態站台目錄(含 index.html)","settings.err_port_not_listening":"該連接埠未在監聽,請確認服務已啟動","settings.err_bad_port":"連接埠不合法(1–65535)","settings.err_dynamic_disabled":"動態預覽未開啟","settings.err_start_failed":"啟動失敗","filebrowser.openDirFailed":"無法開啟該目錄","filebrowser.copiedPath":"已複製路徑:{abs}","filebrowser.mkdirFailed":"建立目錄失敗(名稱不合法或已存在)","filebrowser.downloading":"下載 {name}","filebrowser.downloadFailed":"下載失敗","filebrowser.uploading":"上傳 {name}{tag}","filebrowser.uploadFailed":"上傳失敗","filebrowser.uploadPartialFailed":"以下檔案上傳失敗:{names}","filebrowser.sessionDir":"工作階段目錄","filebrowser.jumpToSessionDir":"跳到目前工作階段目錄","filebrowser.parentDir":"上層目錄","filebrowser.rootSelect":"切換根目錄(主目錄 / 暫存目錄)","filebrowser.pathPlaceholder":"輸入路徑(即時篩選/跳轉)","filebrowser.newFolder":"新增資料夾","filebrowser.createBtn":"建立","filebrowser.uploadFile":"上傳檔案","filebrowser.uploadToCurrentDir":"上傳到目前目錄","filebrowser.enterSubdirToUpload":"請進入一個子目錄上傳","filebrowser.folderNamePlaceholder":"資料夾名稱","filebrowser.uploadPendingTo":"將「{name}」上傳到目前目錄","filebrowser.enterSubdirFirst":"(請先進入一個子目錄)","filebrowser.upload":"上傳","filebrowser.savedToDownloads":"已儲存「{name}」到「下載」資料夾,可在系統檔案管理員查看","filebrowser.noMatches":"沒有符合的檔案或目錄","filebrowser.tooMany":"共 {total} 項,僅顯示前 {shown} 項——在路徑框輸入關鍵字可篩選","filebrowser.previewUnsupported":"暫不支援此類型檔案的預覽,點右側按鈕可下載","filebrowser.copyAbsPath":"複製絕對路徑","filebrowser.download":"下載","filebrowser.pickThisDir":"選定此目錄 {path}","filebrowser.downloadConfirm":"下載 {name}?","filemanager.files":"檔案","filemanager.closeTab":"關閉標籤","filemanager.minimize":"最小化","filemanager.recent":"最近","filemanager.directory":"目錄","git.errReadRepo":"無法讀取儲存庫","git.errLoad":"載入失敗","git.noRepoInDir":"這個目錄還不是 git 儲存庫 —— 換一個目錄,或在這裡 git init 一下。","git.outsideRoots":"這個目錄在 handmux 可存取範圍之外 —— 只開放主目錄和 /tmp。把儲存庫放到主目錄下,就能在這裡檢視了。","git.errReadDir":"無法讀取該目錄","git.commitDetail":"提交詳情","git.diff":"差異","git.bindRepo":"綁定儲存庫","git.collapse":"收起","git.currentBranch":"目前分支","git.switchViewedBranch":"切換查看的分支","git.switchBranch":"切換分支","git.noBranches":"目前沒有分支","git.noRepoBound":"未綁定儲存庫,點左上角「+」選擇一個目錄。","git.changes":"變更","git.commits":"提交","git.pullToLoadMore":"下拉載入更多","git.pickerHint":"選擇一個目錄,自動尋找其中的 git 儲存庫","git.cleanTree":"工作區乾淨","git.noCommits":"目前沒有提交","git.noDiff":"無差異","git.fontSmaller":"縮小字型","git.fontLarger":"放大字型","git.diffTruncated":"diff 過大,已截斷","cmd.panel":"命令面板","cmd.title":"命令","cmd.empty":"還沒有命令,傳送一條或儲存常用","cmd.favorites":"常用","cmd.scopeGlobal":"全域 · 所有工作階段","cmd.recent":"最近","cmd.scopeSession":"僅本工作階段","cmd.favorite":"收藏","cmd.unfavorite":"取消收藏","doc.home":"最近","doc.read":"朗讀","doc.pauseRead":"暫停朗讀","doc.resumeRead":"繼續朗讀","doc.stopRead":"停止朗讀","doc.rate":"語速","doc.fontSmaller":"縮小字型","doc.fontLarger":"放大字型","inbox.view.working":"進行中","inbox.view.done":"已完成","inbox.view.needs":"需要你","push.unsupported":"推播通知需要 Chrome 或 Safari 瀏覽器","push.iosAddToHome":"iOS 需先將本站「加入主畫面」,從主畫面圖示開啟後再開啟","a2hs.title":"將 handmux 加入主畫面","a2hs.lead":"像 App 一樣開啟——全螢幕、沒有網址列。在 iPhone 上,pane 需要你時的推播也靠它送達。","a2hs.install":"安裝 handmux","a2hs.ios1":"點 Safari 的分享按鈕(⬆︎ 方框)。","a2hs.ios2":"點「更多」,或向下滑動清單。","a2hs.ios3":"選「加入主畫面」,再點「加入」。","a2hs.iosHint":"Safari 裡:分享 → 更多 → 加入主畫面。","a2hs.iosOpenSafari":"目前不是 Safari。請在 Safari 開啟本頁再加入主畫面——其他 iOS 瀏覽器無法安裝。","a2hs.androidManual":"開啟瀏覽器選單(⋮),選「加入主畫面」或「安裝應用程式」。","a2hs.later":"稍後再說","push.permissionDenied":"通知權限被拒絕","push.noVapid":"伺服器未設定推播(VAPID)","push.subscribeFailed":"訂閱回報失敗","push.sendFailed":"傳送失敗","api.loadFailed":"載入失敗","api.uploadFailed":"上傳失敗","upload.title":"上傳中","upload.processing":"已傳送,伺服器接收中…","api.uploadBadDir":"無法上傳到該目錄","api.uploadDuplicate":"已存在同名檔案","api.uploadTooLarge":"檔案過大(上限 50MB)","api.uploadBadType":"不支援的檔案類型","time.secAgo":"{n} 秒前","time.minAgo":"{n} 分鐘前","time.hourAgo":"{n} 小時前","time.dayAgo":"{n} 天前","time.expired":"已過期","time.minutes":"{n} 分鐘","settings.script_push":"腳本推送","settings.script_push_open":"怎麼用","settings.script_push_hint":"讓電腦上的腳本把一條通知推到手機。","scriptPush.title":"腳本推送","scriptPush.intro":"讓電腦上的腳本複用 handmux 的推送通道:在執行 handmux 的電腦上,一條 handmux push 命令就能把通知推到手機——建置、CI 或長任務結束時提醒你,不用另接推送服務。","scriptPush.copied":"已複製","scriptPush.session_placeholder":"<會話名>","scriptPush.device_placeholder":"<本裝置key>","scriptPush.scope_all":"推給所有已訂閱裝置(預設)","scriptPush.scope_session":"只推某個會話裡的裝置","scriptPush.scope_device":"只推這台裝置","scriptPush.device_key_note":"上面這串 key 就是這台裝置的,複製即用。","scriptPush.device_need_enable":"先在上方開啟推送通知,才會生成這台裝置的 key。","scriptPush.opts_label":"可選參數(追加到上面任意一條後面)","scriptPush.opt_tag":"--tag <標籤> —— 相同 tag 會覆蓋上一條推送,而不是堆疊。","scriptPush.opt_url":"--url <路徑> —— 點擊通知時開啟這個路徑。","scriptPush.reliability":"注意:Web 推送經手機系統(FCM/APNs)中轉,屬盡力而為——省電模式、離線或廠商策略都可能延遲或丟棄它,並不保證即時送達。對送達強依賴的場景,請改用專門的 IM(WeChat / Telegram bot 等)。","pushInbox.title":"通知記錄","pushInbox.empty":"還沒有腳本通知","pushInbox.delete":"刪除","pushInbox.justNow":"剛剛","pushInbox.minutesAgo":"{n}分鐘前","pushInbox.hoursAgo":"{n}小時前","pushInbox.detailTitle":"通知詳情","pushInbox.openUrl":"打開連結","pushInbox.expired":"這條訊息已過期","pushInbox.back":"返回","pushInbox.markAllRead":"全部已讀","pushInbox.unreadCount":"{n} 未讀"},pM={"common.save":"保存","common.cancel":"キャンセル","common.confirm":"確認","common.ok":"OK","common.close":"閉じる","common.delete":"削除","common.copy":"コピー","common.rename":"名前を変更","common.create":"新規作成","common.back":"戻る","common.open":"開く","common.loading":"読み込み中…","common.done":"完了","token.title":"アクセストークンが必要です","token.placeholder":"HANDMUX_TOKEN を貼り付け","settings.language":"言語 Language","home.empty":"ファイルが開かれていません","home.emptyHint":"「新規」タブでファイルを選択してください","home.remove":"削除","drawer.empty":"セッションが紐付けられていません","drawer.unbind":"紐付け解除","drawer.bind":"セッションを紐付け","drawer.logout":"ログアウト","windowbar.newWindow":"新規ウィンドウ","rename.new_name":"新しい名前","rename.name_rule":"英数字とハイフンのみ(≤16文字)","rename.failed":"名前の変更に失敗しました。再試行してください","rename.saving":"保存中…","newwindow.title":"新規ウィンドウ","newwindow.window_name":"ウィンドウ名(任意)","newwindow.name_placeholder":"空白で自動命名 · 英数字/ハイフン ≤16","newwindow.name_rule":"英数字とハイフンのみ(≤16文字)","newwindow.start_dir":"開始ディレクトリ","newwindow.session_dir_named":"{dir}(セッションディレクトリ)","newwindow.session_dir_default":"セッションディレクトリ(デフォルト)","newwindow.choose":"選択","newwindow.reset_to_session_dir":"セッションディレクトリにリセット","newwindow.creating":"作成中…","startup.label":"起動コマンド(任意)","startup.aria":"起動コマンド","startup.preset_shell":"空のシェル(デフォルト)","startup.preset_claude":"claude(Claude Code を起動)","startup.preset_claude_continue":"claude -c(前回のセッションを継続)","startup.preset_codex":"codex(Codex CLI を起動)","startup.custom":"カスタム…","startup.custom_placeholder":'例:claude "ログインバグを修正"',"bind.title":"セッションを紐付け","bind.sessionName":"セッション名","bind.pickSession":"紐付けるセッションを選択","bind.newSession":"+ 新規セッション","bind.modeNew":"新規作成","bind.modeExisting":"既存を選択","bind.alreadyExists":"このセッションは既に存在します","bind.bind":"紐付け","bind.checking":"確認中…","bind.createAndOpen":"作成して開く","bind.creating":"作成中…","bind.createHint":"セッション「{name}」が存在しません。「作成して開く」をタップして作成してください","bind.alreadyBound":"このセッションはすでに紐付けられています","bind.createFailed":"作成に失敗しました。再試行してください","bind.invalidName":"英数字とハイフンのみ(≤16文字)","bind.desktopHint":"ここのセッション(スマホで作成したものも)は、PC で 1 コマンドで引き継げます:handmux open <名前>","bind.checkFailed":"確認に失敗しました。再試行してください","bind.startDir":"開始ディレクトリ","bind.homeDirDefault":"ホームディレクトリ(デフォルト)","bind.choose":"選択","bind.reset":"リセット","actionsheet.confirmAgain":"確認しますか?もう一度タップ","dirpicker.title":"ディレクトリを選択","inbox.title":"受信トレイ","inbox.working":"進行中","inbox.done":"完了","inbox.needs":"要対応","inbox.clearDone":"完了済みをクリア","inbox.empty":"パネルの状態なし","inbox.enableTitle":"AI セッション通知を有効にする","inbox.enableHint":"各 Claude / Codex パネルを「進行中」「要対応」「完了」にマークし、対応が必要なときにプッシュ通知を送信します。","inbox.enableBtn":"有効にする","inbox.enabling":"有効化中…","inbox.enableFailed":"有効化に失敗しました——サーバーログを確認してください。","idea.title":"アイデア","idea.editPlaceholder":"アイデアを編集…","idea.addPlaceholder":"アイデアを記録…","idea.add":"追加","idea.empty":"まだアイデアがありません。記録してみましょう","idea.dragSort":"ドラッグで並べ替え","idea.fillInput":"入力欄に挿入","idea.send":"送信","doclink.title":"ファイルを開く","changelog.title":"新機能","preview.dynamic":"ダイナミックプレビュー","preview.static":"静的プレビュー","preview.remainTitle":"残り有効期限 — タップして更新 / 停止","preview.toPcView":"PCビューに切り替え","preview.toMobileView":"モバイルビューに切り替え","preview.pcView":"PCビュー","preview.mobileView":"モバイルビュー","preview.refresh":"更新","preview.minimize":"最小化","preview.ttlDialog":"プレビュー有効期限","preview.renew":"更新(1時間にリセット)","preview.stop":"プレビューを停止","preview.iframeTitle":"プレビュー","preview.zoomOut":"縮小","preview.zoomIn":"拡大","imageviewer.loadFailed":"画像の読み込みに失敗しました","imageviewer.saved":"保存しました。フォトライブラリまたは「ダウンロード」で確認できます","imageviewer.shareUnsupported":"画像の共有には Chrome または Safari が必要です","imageviewer.zoomOut":"縮小","imageviewer.zoomIn":"拡大","imageviewer.imageTitle":"画像","imageviewer.saveImage":"画像を保存","imageviewer.shareImage":"画像を共有","mic.stop":"音声入力を停止","mic.start":"音声入力","dock.send":"送信","dock.send.hint":"タップで送信 · 長押しで挿入","dock.phrases":"よく使うフレーズ","dock.attach":"添付","dock.history":"履歴","history.empty":"履歴はまだありません","history.scope":"このウィンドウの記録のみ","dock.input.placeholder":"メッセージを入力…","dock.command.placeholder":"コマンドを入力 · Enterで実行","dock.mode.agent":"会話","dock.mode.toggle":"入力モードを切替","dock.mode.command":"コマンド","dock.mode.chat":"チャット","fav.title":"よく使う","fav.add":"追加","fav.addPlaceholder":"よく使う項目を追加…","dock.upload.aria":"ファイルをアップロード","dock.upload.title":"ファイルをアップロード(ホームのアップロードフォルダに保存、プロジェクトには含まない)","dock.upload.progress":"{name}{tag} をアップロード中","dock.upload.failed":"アップロード失敗:{names}","app.nameExists":"その名前はすでに使われています","app.renameFailed":"名前の変更に失敗しました。再試行してください","app.deleteFailed":"削除に失敗しました。再試行してください","app.moveFailed":"移動に失敗しました。再試行してください","app.sessionGone":"セッション「{name}」が存在しません。閉じられた可能性があります","app.docNotFound":"ファイルが存在しません","app.docTooLarge":"ファイルが大きすぎます(2MB超)","app.docUnsupported":"サポートされていないファイルまたはパス","app.docOpenFailed":"開くのに失敗しました。再試行してください","app.preview":"プレビュー","app.openPreview":"プレビューを開く","app.ideas":"アイデア","app.files":"ファイル","app.settings":"設定","app.renameSession":"セッション名を変更","app.renameWindow":"ウィンドウ名を変更","app.moveLeft":"◀ 左へ移動","app.moveRight":"右へ移動 ▶","app.deleteWindow":"ウィンドウを削除","pane.splitH":"左右に分割","pane.splitV":"上下に分割","pane.manage":"分割を管理","pane.close":"ペインを閉じる","pane.closeConfirm":"閉じますか?もう一度タップ","pane.splitFailed":"分割に失敗しました","pane.closeFailed":"閉じる操作に失敗しました","app.deleteLastWindowConfirm":"これは最後のウィンドウです。削除するとセッション全体が閉じます!もう一度タップ","app.deleteConfirm":"削除しますか?もう一度タップ","app.cannotLocate":"場所を特定できません","app.pickItsDir":"。ディレクトリを選択してください:","app.noBoundSession":"セッションが紐付けられていません","app.tapToBind":"タップして紐付け","app.selectSessionHint":"左上の ☰ をタップしてセッションを選択","app.backToExit":"もう一度戻るで終了します","settings.title":"設定","settings.group_global":"グローバル設定","settings.font_size":"フォントサイズ","settings.font_decrease":"フォントを縮小","settings.font_increase":"フォントを拡大","settings.font_auto":"自動調整","settings.font_auto_title":"高さに合わせて自動調整","settings.path_highlight":"ファイルパスをハイライト","settings.path_highlight_hint":"ターミナル内のタップ可能なファイルパスに色を付けます。オフでもパスはタップできます。","settings.whats_new":"新機能","settings.view_changelog":"変更履歴を表示","settings.has_update":"更新あり","settings.version":"バージョン","settings.feedback":"フィードバック","settings.feedback_issues":"GitHub Issues","settings.feedback_group":"WeChat グループ","settings.feedback_hint":"バグ報告や要望は Issue へ — 必ず追跡・返信されます。","settings.update_available":"バージョン {v} が利用可能","settings.update_how":"パソコンで実行:","settings.push_notifications":"プッシュ通知","settings.notify_on":"有効 ✓","settings.notify_enable":"デバイス通知を有効にする","settings.notify_enabled":"有効にしました。ウェルカム通知が届くはずです","settings.notify_disabled":"無効","settings.notify_failed":"操作に失敗しました","settings.processing":"処理中","settings.push_hint":"「要対応」と「完了」を監視:注目しているセッションが承認/回答を必要としているとき、またはラウンドが完了したときにこのデバイスへ通知します。","settings.push_unsupported":"プッシュ通知には Chrome または Safari が必要です","settings.group_session":"現在のセッション設定","settings.screen_cols":"画面の列数","settings.cols_dec":"減らす","settings.cols_dec_title":"列数を減らす","settings.cols_inc":"増やす","settings.cols_inc_title":"列数を増やす","settings.cols_restore":"デフォルト","settings.cols_restore_title":"ウィンドウのデフォルトサイズに戻す","settings.preview_site":"プレビューサイト","settings.preview_static_site":"静的サイトをプレビュー","settings.preview_running_dynamic":"ダイナミックプレビュー 実行中","settings.preview_running_static":"静的プレビュー 実行中","settings.preview_remain_title":"残り有効期限","settings.preview_remain":"残り {time}","settings.preview_renew":"更新","settings.preview_confirm_stop":"停止を確認","settings.preview_stop":"停止","settings.preview_name":"名前:{name}","settings.preview_port":"(ポート:{port})","settings.preview_type":"プレビュータイプ","settings.preview_off":"無効","settings.preview_static":"静的","settings.preview_dynamic":"ダイナミック","settings.preview_off_hint":"プレビューは無効です。「静的」を選択して開始してください。","settings.preview_off_hint_both":"プレビューは無効です。「静的」または「ダイナミック」を選択して開始してください。","settings.preview_dynamic_disabled":"ダイナミックポートプレビューは無効です。有効にするには:ワイルドカードプレビュードメイン(previewDomain、例:*.example.com)をゲートウェイに向け、対応するTLS証明書を設定してください。Cloudflare /自己署名証明書の違いはREADMEを参照。","settings.preview_pick_dir":"ディレクトリを選択して開始","settings.preview_static_hint":"index.html を含むディレクトリを選択して、スマートフォンでプレビュー。","settings.preview_port_placeholder":"ポート番号(例:3000)","settings.preview_port_label":"ポート","settings.preview_starting":"起動中…","settings.preview_start":"起動","settings.preview_dynamic_hint":"ローカルで実行中のポート(devサーバー / バックエンド)を入力すると、スマートフォンからサブドメイン経由でアクセスできます。","settings.dir_picker_hint":"プレビューする静的サイトのディレクトリを選択(index.html を含む)","settings.err_port_not_listening":"そのポートはリッスンしていません。サービスが起動しているか確認してください","settings.err_bad_port":"ポート番号が無効です(1〜65535)","settings.err_dynamic_disabled":"ダイナミックプレビューは無効です","settings.err_start_failed":"起動に失敗しました","filebrowser.openDirFailed":"ディレクトリを開けませんでした","filebrowser.copiedPath":"パスをコピーしました:{abs}","filebrowser.mkdirFailed":"ディレクトリの作成に失敗しました(名前が無効または既に存在します)","filebrowser.downloading":"{name} をダウンロード中","filebrowser.downloadFailed":"ダウンロードに失敗しました","filebrowser.uploading":"{name}{tag} をアップロード中","filebrowser.uploadFailed":"アップロードに失敗しました","filebrowser.uploadPartialFailed":"以下のファイルのアップロードに失敗しました:{names}","filebrowser.sessionDir":"セッションディレクトリ","filebrowser.jumpToSessionDir":"現在のセッションディレクトリへ移動","filebrowser.parentDir":"親ディレクトリ","filebrowser.rootSelect":"ルートディレクトリを切り替え(ホーム / 一時)","filebrowser.pathPlaceholder":"パスを入力(リアルタイムフィルタ / ジャンプ)","filebrowser.newFolder":"新規フォルダ","filebrowser.createBtn":"作成","filebrowser.uploadFile":"ファイルをアップロード","filebrowser.uploadToCurrentDir":"現在のディレクトリにアップロード","filebrowser.enterSubdirToUpload":"サブディレクトリに移動してからアップロードしてください","filebrowser.folderNamePlaceholder":"フォルダ名","filebrowser.uploadPendingTo":"「{name}」を現在のディレクトリにアップロード","filebrowser.enterSubdirFirst":"(先にサブディレクトリに移動してください)","filebrowser.upload":"アップロード","filebrowser.savedToDownloads":"「{name}」を「ダウンロード」フォルダに保存しました。ファイルマネージャーで確認できます","filebrowser.noMatches":"一致するファイルまたはディレクトリがありません","filebrowser.tooMany":"合計 {total} 件、最初の {shown} 件のみ表示——パス欄にキーワードを入力してフィルタできます","filebrowser.previewUnsupported":"このファイルタイプのプレビューはサポートされていません。右のボタンでダウンロードできます","filebrowser.copyAbsPath":"絶対パスをコピー","filebrowser.download":"ダウンロード","filebrowser.pickThisDir":"このディレクトリを選択 {path}","filebrowser.downloadConfirm":"{name} をダウンロードしますか?","filemanager.files":"ファイル","filemanager.closeTab":"タブを閉じる","filemanager.minimize":"最小化","filemanager.recent":"最近","filemanager.directory":"ディレクトリ","git.errReadRepo":"リポジトリを読み込めませんでした","git.errLoad":"読み込みに失敗しました","git.noRepoInDir":"このディレクトリにはまだ git リポジトリがありません — 別のディレクトリを選ぶか、ここで git init してください。","git.outsideRoots":"このフォルダは handmux がアクセスできる範囲外です — ホームディレクトリと /tmp のみ開けます。リポジトリをホーム配下に移すとここで閲覧できます。","git.errReadDir":"ディレクトリを読み込めませんでした","git.commitDetail":"コミット詳細","git.diff":"差分","git.bindRepo":"リポジトリを紐付け","git.collapse":"折りたたむ","git.currentBranch":"現在のブランチ","git.switchViewedBranch":"表示するブランチを切り替え","git.switchBranch":"ブランチを切り替え","git.noBranches":"ブランチがありません","git.noRepoBound":"リポジトリが紐付けられていません。左上の「+」をタップしてディレクトリを選択してください。","git.changes":"変更","git.commits":"コミット","git.pullToLoadMore":"引っ張ってさらに読み込む","git.pickerHint":"ディレクトリを選択すると、その中の git リポジトリを自動的に検索します","git.cleanTree":"ワーキングツリーはクリーンです","git.noCommits":"コミットがありません","git.noDiff":"差分なし","git.fontSmaller":"フォントを縮小","git.fontLarger":"フォントを拡大","git.diffTruncated":"差分が大きすぎるため、切り捨てられました","cmd.panel":"コマンドパネル","cmd.title":"コマンド","cmd.empty":"コマンドがありません。送信するか、よく使うものを保存してください","cmd.favorites":"お気に入り","cmd.scopeGlobal":"グローバル · 全セッション","cmd.recent":"最近","cmd.scopeSession":"このセッションのみ","cmd.favorite":"お気に入りに追加","cmd.unfavorite":"お気に入りから削除","doc.home":"最近","doc.read":"読み上げ","doc.pauseRead":"一時停止","doc.resumeRead":"再開","doc.stopRead":"読み上げを停止","doc.rate":"読み上げ速度","doc.fontSmaller":"フォントを縮小","doc.fontLarger":"フォントを拡大","inbox.view.working":"進行中","inbox.view.done":"完了","inbox.view.needs":"要対応","push.unsupported":"プッシュ通知には Chrome または Safari が必要です","push.iosAddToHome":"iOS では先にこのサイトを「ホーム画面に追加」し、ホーム画面のアイコンから開いてください","a2hs.title":"handmux をホーム画面に追加","a2hs.lead":"アプリのように全画面で開けます。iPhone では、pane があなたを必要とするときの通知もこれで届きます。","a2hs.install":"handmux をインストール","a2hs.ios1":"Safari の共有ボタン(⬆︎ の四角)をタップ。","a2hs.ios2":"「その他」をタップ、または下にスクロール。","a2hs.ios3":"「ホーム画面に追加」を選び、「追加」をタップ。","a2hs.iosHint":"Safari で:共有 → その他 → ホーム画面に追加。","a2hs.iosOpenSafari":"現在 Safari ではありません。Safari でこのページを開いてからホーム画面に追加してください(他の iOS ブラウザではインストールできません)。","a2hs.androidManual":"ブラウザのメニュー(⋮)から「ホーム画面に追加」または「アプリをインストール」を選択。","a2hs.later":"あとで","push.permissionDenied":"通知の権限が拒否されました","push.noVapid":"サーバーにプッシュ通知(VAPID)が設定されていません","push.subscribeFailed":"サブスクリプションの登録に失敗しました","push.sendFailed":"送信に失敗しました","api.loadFailed":"読み込みに失敗しました","api.uploadFailed":"アップロードに失敗しました","upload.title":"アップロード中","upload.processing":"送信完了 — サーバーで受信中…","api.uploadBadDir":"そのディレクトリへはアップロードできません","api.uploadDuplicate":"同名のファイルが既に存在します","api.uploadTooLarge":"ファイルが大きすぎます(上限 50MB)","api.uploadBadType":"サポートされていないファイルタイプです","time.secAgo":"{n}秒前","time.minAgo":"{n}分前","time.hourAgo":"{n}時間前","time.dayAgo":"{n}日前","time.expired":"期限切れ","time.minutes":"{n} 分"},vM={"common.save":"저장","common.cancel":"취소","common.confirm":"확인","common.ok":"확인","common.close":"닫기","common.delete":"삭제","common.copy":"복사","common.rename":"이름 변경","common.create":"새로 만들기","common.back":"뒤로","common.open":"열기","common.loading":"로드 중…","common.done":"완료","token.title":"액세스 토큰이 필요합니다","token.placeholder":"HANDMUX_TOKEN 붙여넣기","settings.language":"언어 Language","home.empty":"열린 파일이 없습니다","home.emptyHint":"「새로 만들기」 탭에서 파일을 선택하세요","home.remove":"제거","drawer.empty":"연결된 세션이 없습니다","drawer.unbind":"연결 해제","drawer.bind":"세션 연결","drawer.logout":"로그아웃","windowbar.newWindow":"새 창","rename.new_name":"새 이름","rename.name_rule":"영문자, 숫자, 하이픈만 사용 가능(≤16자)","rename.failed":"이름 변경에 실패했습니다. 다시 시도하세요","rename.saving":"저장 중…","newwindow.title":"새 창","newwindow.window_name":"창 이름(선택 사항)","newwindow.name_placeholder":"비워두면 자동 이름 지정 · 영문/숫자/하이픈 ≤16","newwindow.name_rule":"영문자, 숫자, 하이픈만 사용 가능(≤16자)","newwindow.start_dir":"시작 디렉토리","newwindow.session_dir_named":"{dir}(세션 디렉토리)","newwindow.session_dir_default":"세션 디렉토리(기본값)","newwindow.choose":"선택","newwindow.reset_to_session_dir":"세션 디렉토리로 초기화","newwindow.creating":"생성 중…","startup.label":"시작 명령(선택 사항)","startup.aria":"시작 명령","startup.preset_shell":"빈 셸(기본값)","startup.preset_claude":"claude(Claude Code 시작)","startup.preset_claude_continue":"claude -c(이전 세션 이어서)","startup.preset_codex":"codex(Codex CLI 시작)","startup.custom":"사용자 정의…","startup.custom_placeholder":'예:claude "로그인 버그 수정"',"bind.title":"세션 연결","bind.sessionName":"세션 이름","bind.pickSession":"연결할 세션 선택","bind.newSession":"+ 새 세션","bind.modeNew":"새 세션","bind.modeExisting":"기존 세션","bind.alreadyExists":"이미 존재하는 세션입니다","bind.bind":"연결","bind.checking":"확인 중…","bind.createAndOpen":"생성 후 열기","bind.creating":"생성 중…","bind.createHint":"세션「{name}」이 존재하지 않습니다. 「생성 후 열기」를 탭하여 생성하세요","bind.alreadyBound":"이미 연결된 세션입니다","bind.createFailed":"생성에 실패했습니다. 다시 시도하세요","bind.invalidName":"영문자, 숫자, 하이픈만 사용 가능(≤16자)","bind.desktopHint":"여기의 세션(폰에서 만든 것 포함)은 컴퓨터에서 명령 하나로 이어받을 수 있습니다: handmux open <이름>","bind.checkFailed":"확인에 실패했습니다. 다시 시도하세요","bind.startDir":"시작 디렉토리","bind.homeDirDefault":"홈 디렉토리(기본값)","bind.choose":"선택","bind.reset":"초기화","actionsheet.confirmAgain":"확인하시겠습니까? 한 번 더 탭하세요","dirpicker.title":"디렉토리 선택","inbox.title":"받은 편지함","inbox.working":"진행 중","inbox.done":"완료","inbox.needs":"확인 필요","inbox.clearDone":"완료 항목 지우기","inbox.empty":"패널 상태 없음","inbox.enableTitle":"AI 세션 알림 활성화","inbox.enableHint":"각 Claude / Codex 패널을 「진행 중」「확인 필요」「완료」로 표시하고, 확인이 필요할 때 푸시 알림을 보냅니다.","inbox.enableBtn":"활성화","inbox.enabling":"활성화 중…","inbox.enableFailed":"활성화에 실패했습니다——서버 로그를 확인하세요.","idea.title":"아이디어","idea.editPlaceholder":"아이디어 편집…","idea.addPlaceholder":"아이디어를 기록하세요…","idea.add":"추가","idea.empty":"아직 아이디어가 없습니다. 하나 기록해보세요","idea.dragSort":"드래그하여 정렬","idea.fillInput":"입력창에 삽입","idea.send":"보내기","doclink.title":"파일 열기","changelog.title":"새 기능","preview.dynamic":"동적 미리보기","preview.static":"정적 미리보기","preview.remainTitle":"남은 유효 기간 — 탭하여 갱신 / 중지","preview.toPcView":"PC 보기로 전환","preview.toMobileView":"모바일 보기로 전환","preview.pcView":"PC 보기","preview.mobileView":"모바일 보기","preview.refresh":"새로 고침","preview.minimize":"최소화","preview.ttlDialog":"미리보기 유효 기간","preview.renew":"갱신(1시간으로 초기화)","preview.stop":"미리보기 중지","preview.iframeTitle":"미리보기","preview.zoomOut":"축소","preview.zoomIn":"확대","imageviewer.loadFailed":"이미지를 불러오지 못했습니다","imageviewer.saved":"저장되었습니다. 사진 앱 또는 「다운로드」에서 확인할 수 있습니다","imageviewer.shareUnsupported":"이미지 공유는 Chrome 또는 Safari가 필요합니다","imageviewer.zoomOut":"축소","imageviewer.zoomIn":"확대","imageviewer.imageTitle":"이미지","imageviewer.saveImage":"이미지 저장","imageviewer.shareImage":"이미지 공유","mic.stop":"음성 입력 중지","mic.start":"음성 입력","dock.send":"보내기","dock.send.hint":"탭하여 보내기 · 길게 눌러 삽입","dock.phrases":"자주 쓰는 문구","dock.attach":"첨부","dock.history":"기록","history.empty":"기록이 아직 없습니다","history.scope":"현재 창의 기록만","dock.input.placeholder":"메시지를 입력하세요…","dock.command.placeholder":"명령 입력 · Enter로 실행","dock.mode.agent":"대화","dock.mode.toggle":"입력 모드 전환","dock.mode.command":"명령 모드","dock.mode.chat":"채팅 모드","fav.title":"자주 쓰기","fav.add":"추가","fav.addPlaceholder":"자주 쓰는 항목 추가…","dock.upload.aria":"파일 업로드","dock.upload.title":"파일 업로드(홈 업로드 폴더에 저장, 프로젝트에는 포함되지 않음)","dock.upload.progress":"{name}{tag} 업로드 중","dock.upload.failed":"업로드 실패:{names}","app.nameExists":"해당 이름은 이미 사용 중입니다","app.renameFailed":"이름 변경에 실패했습니다. 다시 시도하세요","app.deleteFailed":"삭제에 실패했습니다. 다시 시도하세요","app.moveFailed":"이동에 실패했습니다. 다시 시도하세요","app.sessionGone":"세션「{name}」이 존재하지 않습니다. 이미 닫혔을 수 있습니다","app.docNotFound":"파일이 존재하지 않습니다","app.docTooLarge":"파일이 너무 큽니다(2MB 초과)","app.docUnsupported":"지원되지 않는 파일 또는 경로","app.docOpenFailed":"열기에 실패했습니다. 다시 시도하세요","app.preview":"미리보기","app.openPreview":"미리보기 열기","app.ideas":"아이디어","app.files":"파일","app.settings":"설정","app.renameSession":"세션 이름 변경","app.renameWindow":"창 이름 변경","app.moveLeft":"◀ 왼쪽으로 이동","app.moveRight":"오른쪽으로 이동 ▶","app.deleteWindow":"창 삭제","pane.splitH":"좌우 분할","pane.splitV":"상하 분할","pane.manage":"분할 관리","pane.close":"창 닫기","pane.closeConfirm":"닫을까요? 다시 탭","pane.splitFailed":"분할 실패","pane.closeFailed":"닫기 실패","app.deleteLastWindowConfirm":"마지막 창입니다. 삭제하면 전체 세션이 닫힙니다!한 번 더 탭하세요","app.deleteConfirm":"삭제하시겠습니까? 한 번 더 탭하세요","app.cannotLocate":"위치를 찾을 수 없습니다","app.pickItsDir":",디렉토리를 선택하세요:","app.noBoundSession":"연결된 세션이 없습니다","app.tapToBind":"탭하여 연결","app.selectSessionHint":"왼쪽 상단의 ☰ 를 탭하여 세션 선택","app.backToExit":"한 번 더 뒤로가기를 누르면 종료됩니다","settings.title":"설정","settings.group_global":"전체 설정","settings.font_size":"글꼴 크기","settings.font_decrease":"글꼴 축소","settings.font_increase":"글꼴 확대","settings.font_auto":"자동 조정","settings.font_auto_title":"높이에 맞게 자동 조정","settings.path_highlight":"파일 경로 강조","settings.path_highlight_hint":"터미널에서 탭 가능한 파일 경로에 색을 입힙니다. 꺼져 있어도 경로는 탭할 수 있습니다.","settings.whats_new":"새 기능","settings.view_changelog":"변경 내역 보기","settings.has_update":"업데이트 있음","settings.version":"버전","settings.feedback":"피드백","settings.feedback_issues":"GitHub Issues","settings.feedback_group":"WeChat 그룹","settings.feedback_hint":"버그와 아이디어 모두 환영 — Issue는 추적되고 답변됩니다.","settings.update_available":"버전 {v} 사용 가능","settings.update_how":"컴퓨터에서 실행:","settings.push_notifications":"푸시 알림","settings.notify_on":"활성화됨 ✓","settings.notify_enable":"기기 알림 활성화","settings.notify_enabled":"활성화되었습니다. 환영 알림이 도착할 것입니다","settings.notify_disabled":"비활성화됨","settings.notify_failed":"작업에 실패했습니다","settings.processing":"처리 중","settings.push_hint":"「확인 필요」및「완료」를 모니터링:관심 세션에서 승인/응답이 필요하거나 한 라운드가 완료되면 이 기기로 알림을 보냅니다.","settings.push_unsupported":"푸시 알림은 Chrome 또는 Safari가 필요합니다","settings.group_session":"현재 세션 설정","settings.screen_cols":"화면 열 수","settings.cols_dec":"감소","settings.cols_dec_title":"열 수 감소","settings.cols_inc":"증가","settings.cols_inc_title":"열 수 증가","settings.cols_restore":"기본값","settings.cols_restore_title":"창 기본 크기로 복원","settings.preview_site":"미리보기 사이트","settings.preview_static_site":"정적 사이트 미리보기","settings.preview_running_dynamic":"동적 미리보기 실행 중","settings.preview_running_static":"정적 미리보기 실행 중","settings.preview_remain_title":"남은 유효 기간","settings.preview_remain":"남은 시간 {time}","settings.preview_renew":"갱신","settings.preview_confirm_stop":"중지 확인","settings.preview_stop":"중지","settings.preview_name":"이름:{name}","settings.preview_port":"(포트:{port})","settings.preview_type":"미리보기 유형","settings.preview_off":"비활성화","settings.preview_static":"정적","settings.preview_dynamic":"동적","settings.preview_off_hint":"미리보기가 비활성화되어 있습니다. 「정적」을 선택하여 시작하세요.","settings.preview_off_hint_both":"미리보기가 비활성화되어 있습니다. 「정적」또는「동적」을 선택하여 시작하세요.","settings.preview_dynamic_disabled":"동적 포트 미리보기가 비활성화되어 있습니다. 활성화하려면:와일드카드 미리보기 도메인(previewDomain, 예:*.example.com)을 게이트웨이로 지정하고 TLS 인증서를 설정하세요. Cloudflare /자체 서명 인증서 차이는 README를 참조하세요.","settings.preview_pick_dir":"디렉토리를 선택하여 시작","settings.preview_static_hint":"index.html이 포함된 디렉토리를 선택하여 스마트폰에서 미리보기.","settings.preview_port_placeholder":"포트 번호(예:3000)","settings.preview_port_label":"포트","settings.preview_starting":"시작 중…","settings.preview_start":"시작","settings.preview_dynamic_hint":"로컬에서 실행 중인 포트(dev 서버 / 백엔드)를 입력하면 스마트폰에서 서브도메인을 통해 직접 접속할 수 있습니다.","settings.dir_picker_hint":"미리볼 정적 사이트 디렉토리 선택(index.html 포함)","settings.err_port_not_listening":"해당 포트가 수신 대기 중이지 않습니다. 서비스가 시작되었는지 확인하세요","settings.err_bad_port":"포트 번호가 유효하지 않습니다(1–65535)","settings.err_dynamic_disabled":"동적 미리보기가 비활성화되어 있습니다","settings.err_start_failed":"시작에 실패했습니다","filebrowser.openDirFailed":"디렉토리를 열 수 없습니다","filebrowser.copiedPath":"경로가 복사되었습니다:{abs}","filebrowser.mkdirFailed":"디렉토리 생성에 실패했습니다(이름이 유효하지 않거나 이미 존재합니다)","filebrowser.downloading":"{name} 다운로드 중","filebrowser.downloadFailed":"다운로드에 실패했습니다","filebrowser.uploading":"{name}{tag} 업로드 중","filebrowser.uploadFailed":"업로드에 실패했습니다","filebrowser.uploadPartialFailed":"다음 파일 업로드에 실패했습니다:{names}","filebrowser.sessionDir":"세션 디렉토리","filebrowser.jumpToSessionDir":"현재 세션 디렉토리로 이동","filebrowser.parentDir":"상위 디렉토리","filebrowser.rootSelect":"루트 디렉토리 전환(홈 / 임시)","filebrowser.pathPlaceholder":"경로 입력(실시간 필터 / 이동)","filebrowser.newFolder":"새 폴더","filebrowser.createBtn":"생성","filebrowser.uploadFile":"파일 업로드","filebrowser.uploadToCurrentDir":"현재 디렉토리에 업로드","filebrowser.enterSubdirToUpload":"하위 디렉토리로 이동한 후 업로드하세요","filebrowser.folderNamePlaceholder":"폴더 이름","filebrowser.uploadPendingTo":"「{name}」을 현재 디렉토리에 업로드","filebrowser.enterSubdirFirst":"(먼저 하위 디렉토리로 이동하세요)","filebrowser.upload":"업로드","filebrowser.savedToDownloads":"「{name}」이 「다운로드」 폴더에 저장되었습니다. 파일 관리자에서 확인할 수 있습니다","filebrowser.noMatches":"일치하는 파일 또는 디렉토리가 없습니다","filebrowser.tooMany":"총 {total}개, 처음 {shown}개만 표시——경로 입력창에 키워드를 입력하여 필터할 수 있습니다","filebrowser.previewUnsupported":"이 파일 유형의 미리보기는 지원되지 않습니다. 오른쪽 버튼으로 다운로드할 수 있습니다","filebrowser.copyAbsPath":"절대 경로 복사","filebrowser.download":"다운로드","filebrowser.pickThisDir":"이 디렉토리 선택 {path}","filebrowser.downloadConfirm":"{name}을 다운로드하시겠습니까?","filemanager.files":"파일","filemanager.closeTab":"탭 닫기","filemanager.minimize":"최소화","filemanager.recent":"최근","filemanager.directory":"디렉토리","git.errReadRepo":"저장소를 읽을 수 없습니다","git.errLoad":"불러오기에 실패했습니다","git.noRepoInDir":"아직 git 저장소가 없습니다 — 다른 디렉토리를 선택하거나 여기서 git init 하세요.","git.outsideRoots":"이 폴더는 handmux가 열 수 있는 범위 밖입니다 — 홈 디렉토리와 /tmp만 접근할 수 있습니다. 저장소를 홈 디렉토리 아래로 옮기면 여기서 볼 수 있습니다.","git.errReadDir":"디렉토리를 읽을 수 없습니다","git.commitDetail":"커밋 상세","git.diff":"변경 사항","git.bindRepo":"저장소 연결","git.collapse":"접기","git.currentBranch":"현재 브랜치","git.switchViewedBranch":"표시할 브랜치 전환","git.switchBranch":"브랜치 전환","git.noBranches":"브랜치가 없습니다","git.noRepoBound":"저장소가 연결되지 않았습니다. 왼쪽 상단의 「+」를 탭하여 디렉토리를 선택하세요.","git.changes":"변경사항","git.commits":"커밋","git.pullToLoadMore":"당겨서 더 불러오기","git.pickerHint":"디렉토리를 선택하면 그 안의 git 저장소를 자동으로 찾습니다","git.cleanTree":"작업 트리가 깨끗합니다","git.noCommits":"커밋이 없습니다","git.noDiff":"변경 사항 없음","git.fontSmaller":"글꼴 축소","git.fontLarger":"글꼴 확대","git.diffTruncated":"변경 사항이 너무 커서 잘렸습니다","cmd.panel":"명령 패널","cmd.title":"명령","cmd.empty":"명령이 없습니다. 보내거나 자주 쓰는 것을 저장하세요","cmd.favorites":"즐겨찾기","cmd.scopeGlobal":"전체 · 모든 세션","cmd.recent":"최근","cmd.scopeSession":"현재 세션만","cmd.favorite":"즐겨찾기 추가","cmd.unfavorite":"즐겨찾기 해제","doc.home":"최근","doc.read":"읽어주기","doc.pauseRead":"읽기 일시 정지","doc.resumeRead":"읽기 재개","doc.stopRead":"읽기 중지","doc.rate":"읽기 속도","doc.fontSmaller":"글꼴 축소","doc.fontLarger":"글꼴 확대","inbox.view.working":"진행 중","inbox.view.done":"완료","inbox.view.needs":"확인 필요","push.unsupported":"푸시 알림은 Chrome 또는 Safari가 필요합니다","push.iosAddToHome":"iOS에서는 먼저 이 사이트를 「홈 화면에 추가」한 후 홈 화면 아이콘에서 열어주세요","a2hs.title":"handmux를 홈 화면에 추가","a2hs.lead":"앱처럼 전체 화면으로 열 수 있습니다. iPhone에서는 pane이 당신을 필요로 할 때의 푸시도 이 방식으로 전달됩니다.","a2hs.install":"handmux 설치","a2hs.ios1":"Safari의 공유 버튼(⬆︎ 상자)을 탭하세요.","a2hs.ios2":"「더 보기」를 탭하거나 목록을 아래로 스크롤하세요.","a2hs.ios3":"「홈 화면에 추가」를 선택한 뒤 「추가」를 탭하세요.","a2hs.iosHint":"Safari에서: 공유 → 더 보기 → 홈 화면에 추가.","a2hs.iosOpenSafari":"현재 Safari가 아닙니다. Safari에서 이 페이지를 연 뒤 홈 화면에 추가하세요 — 다른 iOS 브라우저는 설치할 수 없습니다.","a2hs.androidManual":"브라우저 메뉴(⋮)에서 「홈 화면에 추가」 또는 「앱 설치」를 선택하세요.","a2hs.later":"나중에","push.permissionDenied":"알림 권한이 거부되었습니다","push.noVapid":"서버에 푸시 알림(VAPID)이 설정되지 않았습니다","push.subscribeFailed":"구독 등록에 실패했습니다","push.sendFailed":"전송에 실패했습니다","api.loadFailed":"불러오기에 실패했습니다","api.uploadFailed":"업로드에 실패했습니다","upload.title":"업로드 중","upload.processing":"전송 완료 — 서버에서 수신 중…","api.uploadBadDir":"해당 디렉토리에는 업로드할 수 없습니다","api.uploadDuplicate":"같은 이름의 파일이 이미 존재합니다","api.uploadTooLarge":"파일이 너무 큽니다(최대 50MB)","api.uploadBadType":"지원되지 않는 파일 유형입니다","time.secAgo":"{n}초 전","time.minAgo":"{n}분 전","time.hourAgo":"{n}시간 전","time.dayAgo":"{n}일 전","time.expired":"만료됨","time.minutes":"{n}분"},m_={zh:mM,"zh-TW":fM,en:j1,ja:pM,ko:vM},W0=[{code:"zh",label:"简体中文"},{code:"zh-TW",label:"繁體中文"},{code:"en",label:"English"},{code:"ja",label:"日本語"},{code:"ko",label:"한국어"}],D1="tw_lang";function gM(r,s,d=m_){if(r&&d[r])return r;for(const _ of s&&s.length?s:["en"]){const E=String(_).toLowerCase();if(d[E])return E;const R=E.split("-")[0];if(d[R])return R}return"en"}function _M(r,s,d,_){let E=r&&r[d]!=null?r[d]:s&&s[d]!=null?s[d]:d;return _&&(E=E.replace(/\{(\w+)\}/g,(R,b)=>_[b]!=null?_[b]:`{${b}}`)),E}const bM=()=>typeof navigator<"u"?navigator.languages||[navigator.language]:null,yM=()=>{try{return localStorage.getItem(D1)}catch{return null}};let sm=gM(yM(),bM());function V(r,s){return _M(m_[sm],j1,r,s)}function Il(){return sm}function xM(r){if(!(!m_[r]||r===sm)){try{localStorage.setItem(D1,r)}catch{}sm=r,typeof location<"u"&&location.reload()}}const f_="tw_token",p_="tw_font",ym="tw_bound",k1="tw_last_session",R1="tw_win",T1="tw_pane",v_="tw_favs",wM="tw_recent",NM=30,Pg="tw_inbox_seen",L1="tw_inbox_read_ts",M1="tw_browse_dir",A1="tw_preview_dir",U1="tw_startup_cmd",Bg="tw_chat_draft",O1="tw_chat_tone",Ig="tw_chat_lens",SM="tw_ideas",V1="tw_changelog_seen",P1="tw_version_seen",g_="tw_git_repos",Lo=()=>localStorage.getItem(f_),CM=r=>localStorage.setItem(f_,r),EM=()=>localStorage.removeItem(f_);function Eo(){try{return JSON.parse(localStorage.getItem(ym))||[]}catch{return[]}}function G0(r){const s=Eo();return s.includes(r)||s.push(r),localStorage.setItem(ym,JSON.stringify(s)),s}function q0(r){const s=Eo().filter(d=>d!==r);return localStorage.setItem(ym,JSON.stringify(s)),s}function jM(r,s){const d=Eo().map(_=>_===r?s:_);return localStorage.setItem(ym,JSON.stringify(d)),__.renameSession(r,s),xm.renameSession(r,s),d}function Ir(r){try{const s=JSON.parse(localStorage.getItem(r));return s&&typeof s=="object"&&!Array.isArray(s)?s:{}}catch{return{}}}function Ha(r,s,d){const _=Ir(r);_[s]=d,localStorage.setItem(r,JSON.stringify(_))}function B1(r){const s=d=>d&&typeof d=="object"&&!Array.isArray(d)?d:{};return{get(d,_){return!d||!_?[]:s(Ir(r)[d])[_]??[]},set(d,_,E){const R=Ir(r),b=s(R[d]);return E&&E.length?b[_]=E:delete b[_],Object.keys(b).length?R[d]=b:delete R[d],localStorage.setItem(r,JSON.stringify(R)),E??[]},renameWindow(d,_,E){if(!d||!_||!E||_===E)return;const R=Ir(r),b=s(R[d]);b[_]!=null&&(b[E]=b[_],delete b[_],R[d]=b,localStorage.setItem(r,JSON.stringify(R)))},renameSession(d,_){const E=Ir(r);E[d]!=null&&(E[_]=E[d],delete E[d],localStorage.setItem(r,JSON.stringify(E)))}}}const __=B1(wM),xm=B1(SM),Y0=()=>Ir(Pg);function K0(r,s){return Ha(Pg,r,s),Ir(Pg)}const DM=()=>{const r=localStorage.getItem(L1);return r==null?null:Number(r)},X0=r=>localStorage.setItem(L1,String(r)),I1="tw_notif_seen_ts",kM=()=>{const r=localStorage.getItem(I1);return r==null?0:Number(r)},RM=r=>localStorage.setItem(I1,String(r)),b_="tw_notif_read_ids",Lu=()=>{try{const r=JSON.parse(localStorage.getItem(b_)||"[]");return Array.isArray(r)?r:[]}catch{return[]}},J0=r=>{const s=Lu();s.includes(r)||localStorage.setItem(b_,JSON.stringify([...s,r]))},TM=r=>{const s=Lu().filter(d=>r.includes(d));return localStorage.setItem(b_,JSON.stringify(s)),s},LM=r=>r?Ir(M1)[r]??null:null,Z0=(r,s)=>{r&&s&&Ha(M1,r,s)},MM=r=>r?Ir(A1)[r]??null:null,AM=(r,s)=>{r&&s&&Ha(A1,r,s)},UM=()=>localStorage.getItem(k1),OM=r=>Ir(R1)[r]??null,Gh=r=>Ir(T1)[r]??null;function Ml({sessionId:r,windowId:s,paneId:d}={}){r&&localStorage.setItem(k1,r),r&&s&&Ha(R1,r,s),s&&d&&Ha(T1,s,d)}function VM(){const r=Number(localStorage.getItem(p_));return Number.isFinite(r)&&r>0?r:null}const Su=r=>localStorage.setItem(p_,String(r)),PM=()=>localStorage.removeItem(p_),F1=["dusk","ink","light"],BM=()=>{const r=localStorage.getItem(O1);return F1.includes(r)?r:"dusk"},IM=r=>{F1.includes(r)&&localStorage.setItem(O1,r)},FM=()=>localStorage.getItem(Ig)==="1",HM=r=>{r?localStorage.setItem(Ig,"1"):localStorage.removeItem(Ig)},H1=()=>localStorage.getItem(Bg)||"",z1=r=>{r?localStorage.setItem(Bg,r):localStorage.removeItem(Bg)};function am(){try{return JSON.parse(localStorage.getItem(v_))||[]}catch{return[]}}function zM(r){const s=r.trim(),d=am();return s&&!d.includes(s)&&d.push(s),localStorage.setItem(v_,JSON.stringify(d)),d}function $M(r){const s=am().filter(d=>d!==r);return localStorage.setItem(v_,JSON.stringify(s)),s}const $1=()=>localStorage.getItem(U1)||"",W1=r=>localStorage.setItem(U1,r||""),G1="tw_orphan_kill",WM=()=>localStorage.getItem(G1)!=="0",GM=r=>localStorage.setItem(G1,r?"1":"0"),q1="tw_doc_highlight",Y1=()=>localStorage.getItem(q1)==="1",qM=r=>localStorage.setItem(q1,r?"1":"0"),om=(r,s)=>__.get(r,s),K1=(r,s,d)=>__.set(r,s,d);function YM(r,s,d){const _=(d||"").trim(),E=om(r,s);return!_||!r||!s?E:K1(r,s,[_,...E.filter(R=>R!==_)].slice(0,NM))}function KM(r,s,d){return!r||!s?om(r,s):K1(r,s,om(r,s).filter(_=>_!==d))}const y_="tw_recent_docs",X1="tw_pane_base",XM=30;function Mu(){try{return JSON.parse(localStorage.getItem(y_))||[]}catch{return[]}}function Q0({path:r,name:s,type:d,ts:_=Date.now()}){const E=[{path:r,name:s,type:d,ts:_},...Mu().filter(R=>R.path!==r)].slice(0,XM);return localStorage.setItem(y_,JSON.stringify(E)),E}function JM(r){const s=Mu().filter(d=>d.path!==r);return localStorage.setItem(y_,JSON.stringify(s)),s}const eN=r=>Ir(X1)[r]??null,ZM=(r,s)=>Ha(X1,r,s),da=[10,11,12,13,14,16,18,20,22],QM=4,J1="tw_doc_font";function eA(){const r=localStorage.getItem(J1),s=Number(r);return r!==null&&Number.isInteger(s)&&s>=0&&s<da.length?s:QM}const tA=r=>localStorage.setItem(J1,String(Math.min(da.length-1,Math.max(0,r)))),nA=2,Z1="tw_diff_font";function iA(){const r=localStorage.getItem(Z1),s=Number(r);return r!==null&&Number.isInteger(s)&&s>=0&&s<da.length?s:nA}const rA=r=>localStorage.setItem(Z1,String(Math.min(da.length-1,Math.max(0,r)))),Q1=(r,s)=>xm.get(r,s);function tN(r,s,d){return!r||!s?[]:xm.set(r,s,d)}const sA=()=>localStorage.getItem(V1),aA=r=>{r&&localStorage.setItem(V1,r)},oA=()=>localStorage.getItem(P1),lA=r=>{r&&localStorage.setItem(P1,r)};function cA(r,s,d){xm.renameWindow(r,s,d)}function x_(r){if(!r)return[];const s=Ir(g_)[r];return Array.isArray(s)?s:[]}function nN(r,s){if(!r)return[];const d=[...x_(r)];for(const _ of s)_&&!d.includes(_)&&d.push(_);return Ha(g_,r,d),d}function uA(r,s){if(!r)return[];const d=x_(r).filter(_=>_!==s);return Ha(g_,r,d),d}const Fg=[{version:"0.17.3",date:"2026-07-19",highlight:{zh:"三修官方一键安装的 Claude 识别,真机已验证",en:"Third fix for native-install Claude detection, device-verified"},items:{zh:["修复了官方一键安装器版 Claude Code 仍识别不出的问题(0.17.2 的对账依据在真实环境不成立);本次按真机数据修正,已验证所有官方安装方式都能正确识别(agent 图标、对话视图切换钮正常出现)。"],en:["Fixed native-installer Claude detection still not working (0.17.2 relied on a signal that doesn't hold in the real environment); corrected against real-device data — verified across all official install methods (agent icon and chat-view switch appear)."]}},{version:"0.17.0",date:"2026-07-18",highlight:{zh:"对话视图(实验性)· 通知记录 · 本机地址一键预览",en:"Chat view (experimental) · notification inbox · one-tap localhost preview"},items:{zh:["新增「对话视图」(实验性功能,默认关):到设置里打开「启用对话视图(实验性功能)」后,窗口栏就能把 Claude 会话在终端/对话两个视图间一键切换(需已装 Claude hooks,没装可一键安装)。对话视图把会话读成聊天记录——气泡 + Markdown、工具卡(编辑文件带 +A/−B 和彩色 diff)、Claude 提问时点按即答的问题卡、上下文压缩动画、三套暖色配色;终端视图照旧,完全不受影响。","新增「通知记录」:脚本推送(handmux push)的通知按设备留存(各 100 条),全屏翻看、点开看详情、逐条删除;点手机上的通知直接跳到那条消息的详情。","终端里打印的本机地址(localhost:3000 等)自动变成可点的:点一下就能起代理在手机上预览(带路径),多个端口还能并行切换、自动续期。","修复了对话视图 /clear 后残留旧会话内容、问题卡确认后偶发闪现多余卡片、长输出在工具卡里滑不到、消息不足一屏时无法加载更早消息的问题。"],en:["New chat view (experimental, off by default): enable it in Settings → Enable chat view, then flip a Claude pane between terminal and chat from the window bar (requires Claude hooks — one-tap install offered). The chat view reads the session as a conversation — bubbles with Markdown, tool cards (+A/−B and colored diffs for file edits), question cards you answer with a tap, a visible compaction animation, and three warm colour tones. The terminal view is untouched.","New notification inbox: pushes from handmux push are kept per device (latest 100) — browse full-screen, open details, delete one by one; tapping a push lands on that message’s detail.","Localhost URLs printed in the terminal (localhost:3000, …) are now tappable: one tap proxies and previews them on your phone (path preserved), with several ports open in parallel and auto-renewed.","Fixed chat-view issues: stale content after /clear, a stray fallback card flashing after answering a question, long tool output unreachable in the sheet, and older messages unloadable when the window was shorter than a screen."]}},{version:"0.16.0",date:"2026-07-15",highlight:{zh:"分屏布局地图 · 手机也能建/删窗格",en:"Split-layout map · create & close panes from the phone"},items:{zh:["有多个窗格的窗口,选择器不再是一条干巴巴的下拉列表,而是照着你屏幕上真实的分屏样子画出来:每一格对应一个窗格,标着序号、正在跑的命令和 Agent 图标,一眼就看出谁在左谁在右、谁在上谁在下,点一下就切过去看那一格。","现在手机上就能直接分屏和关窗格了:长按地图里的某一格,就能把它「左右分屏」或「上下分屏」,也能「关闭」;还没分屏的窗口在它的菜单里也能分,已经分屏的窗口菜单里点「管理分屏」直接进地图。分好之后自动就落在新的那格里,地图也一直开着,随时能接着分或关。","绑定会话的弹窗更清楚了:「新建会话」和「选已有会话」分成两个明确的选项,不会再让人以为点一下「新建」就直接把会话建出来。"],en:["For a window with several panes, the picker is no longer a plain dropdown — it’s drawn to match the way your screen is actually split: each tile is one pane, labelled with its number, the command it’s running, and its agent, so you can tell at a glance which pane is where. Tap a tile to jump to that pane.","You can now split and close panes right from the phone: long-press a tile in the map to Split it left/right or top/bottom, or Close it; a window that isn’t split yet can be split from its menu, and a split window has a “Manage split” entry that opens the map. After a split you’re dropped into the new pane, and the map stays open so you can keep splitting or closing.","The bind-session dialog is clearer: “New session” and “Pick an existing session” are now two distinct choices, so tapping “New” no longer looks like it creates a session on the spot."]}},{version:"0.15.0",date:"2026-07-14",highlight:{zh:"键盘弹起终端自适应 · 全屏程序可上下滚动",en:"Keyboard-aware terminal · scroll inside full-screen apps"},items:{zh:["键盘弹起时终端不再被顶飞:内容自动重排到键盘上方,主屏短内容贴着键盘上沿显示;全屏程序(vim/less/htop 等)可以在里面上下滚动、到顶/底才翻页,默认显示程序的第一行,移动光标时自动跟随。","全屏程序翻页键上方新增「适配高度」和「定位」两个按钮:「适配高度」一键缩字号,收起键盘就能把整屏程序完整塞进手机屏;「定位」点亮后高亮光标所在行并跟随,方便在长内容里盯住光标。键盘弹起的瞬间光标也一直可见,不用再补按一下。","收件箱在一种特定场景下抓不到状态变更:你回应了权限弹窗、但那次回应没产生任何收尾信号时(普通授权、拒绝并反馈、或按 ESC 中断),它会停留在「需要你」。这一版补上识别——授权或拒绝反馈后回到「进行中」,ESC 中断则消掉状态。","光标不用点屏幕也能看到了:一进会话就能看到光标位置,发键/发指令后即使 Claude 正在忙也会亮着。","从设置里启动动态端口预览,现在会像静态预览一样自动弹出预览面板。","会话重命名撞到已有名字时,会明确提示「名称已存在」;修复了终端上滑一点后画面自己往上爬的问题。"],en:["The terminal no longer gets shoved off-screen when the keyboard opens: content reflows to sit just above the keyboard, with short main-screen output resting on its top edge. Full-screen programs (vim/less/htop, etc.) now scroll up/down inside themselves and only page at the edges, default to showing the program’s first line, and follow the cursor as you move it.","Two new buttons above the full-screen pager: “Fit height” shrinks the font in one tap so the whole program fits on the phone with the keyboard down, and “Locate” highlights and follows the cursor’s row so you can keep track of it in long content. The cursor also stays visible the moment the keyboard opens — no extra tap needed.","In one specific case the inbox couldn’t pick up a state change: when you responded to a permission prompt but that response produced no closing signal (a normal approval, a deny-with-feedback, or an ESC interrupt), it would linger on “needs you”. This release adds that detection — approving or denying returns it to “working”, and an ESC interrupt clears it.","The cursor now shows without tapping the screen: you can see where it is the moment you open a session, and it stays lit after you send a key/command even while Claude is busy.","Starting a dynamic-port preview from Settings now auto-opens the preview sheet, just like a static one.","Renaming a session to a name that already exists now says so clearly; and fixed the terminal creeping upward a line at a time after a small scroll up."]}},{version:"0.14.0",date:"2026-07-13",highlight:{zh:"终端文字选中拷贝 · 脚本复用推送通道",en:"Terminal select & copy · scripts reuse the push channel"},items:{zh:["终端可以长按选中文字了:iOS 式首尾手柄精调、跨屏选择,浮条一键拷贝/整行/整段,复制自动去掉行尾空格;选中期间顶部显示「复制模式 · N 行 · M 字」。","你自己的脚本也能复用 handmux 的推送通道:命令行用 handmux push <标题> <正文> 直接给手机发通知(可选 --session/--device 限定范围),脚本跑完主动提醒你。","滚动终端不再收起键盘:滑动时键盘保持、单击才收起;还能用 ⌨ 按钮或底部手柄拖拽显隐键盘,命令/聊天切换也保持键盘不掉。","往上滑看历史更顺了:一次滑到顶只加载一页、不再叠加拉取来回跳,位置稳停在你看的那行,顶部显示「距底 N/M 行」。","全屏程序(vim/less/htop 等)上方不再串出无关的终端历史。","修复了主页误触返回直接退出、以及从通知进入要多按一次返回才能退出的问题。"],en:["You can now long-press to select text in the terminal: iOS-style start/end handles, selection across screens, a callout to copy / whole line / whole paragraph, with trailing spaces trimmed on copy. A “copy mode · N lines · M chars” bar shows while selecting.","Your own scripts can reuse handmux’s push channel: run handmux push <title> <body> to send a notification straight to your phone (optionally scoped with --session/--device) — handy for a script pinging you when it finishes.","Scrolling the terminal no longer dismisses the keyboard: a swipe keeps it up, a single tap puts it away; you can also show/hide it with the ⌨ button or the dock’s grip handle, and it stays up when you switch between command and chat.","Scrolling up through history is smoother: reaching the top loads exactly one page instead of stacking pulls and jumping around, and your place holds steady on the line you were reading, with a “N/M lines from bottom” readout.","A full-screen program (vim/less/htop, etc.) no longer leaks unrelated terminal history above it.","Fixed a stray Back on the home page dropping you straight out, and needing an extra Back to leave after opening the app from a notification."]}},{version:"0.13.0",date:"2026-07-12",highlight:{zh:"终端文件路径高亮可点",en:"Tappable, highlighted file paths"},items:{zh:["终端里的文件路径现在会高亮显示、可以直接点开;这个高亮可以在设置里开关(默认关闭)。","桌面浏览器用鼠标滚轮往上翻,现在能拉出更深的历史了(不再卡在第一屏);桌面和手机都加了一条纤细的滚动条。","设置面板太高时可以整体滚动了,标题和关闭按钮始终可见、够得到。","修复了 agent 图标和底部输入模式偶尔乱跳的问题——现在按 agent 是否真的在运行来判断,分屏里每个窗格也各显各的图标。","handmux setup 新增「令牌」一项:可以手动固定访问令牌,这样每次重启后手机网址不再变化(留空则仍每次自动生成一个)。"],en:["File paths in the terminal are now highlighted and tappable — tap one to open it. You can toggle the highlight in Settings (off by default).","On a desktop browser the mouse wheel now pulls deeper history instead of stalling at the first screen, and a thin scrollbar was added on both desktop and mobile.","The Settings sheet scrolls as a whole when it is taller than the screen, with the title and close button always reachable.","Fixed the agent icon and the bottom input mode occasionally jumping around — both now track whether the agent is actually running, and each pane in a split shows its own icon.","handmux setup has a new “Token” item: you can pin the access token by hand so the phone URL stops changing on every restart (leave it blank to keep auto-generating one each start)."]}},{version:"0.12.3",date:"2026-07-11",highlight:{zh:"接管会话可自定义名称 + Homebrew 一键安装",en:"Name a takeover session · Homebrew install"},items:{zh:["接管电脑上的会话时,可以自己给新会话起名(默认也帮你填好);接管后想回电脑继续的命令,现在直接显示成 handmux open <名称>,照着敲即可。","新增 Homebrew 一键安装:没装 Node 的 Mac 也能用 brew install handmux/tap/handmux 一条命令装好(handmux + Node + tmux)。已有 Node 的话,npm i -g handmux 仍是更轻的选择。"],en:["When taking over a session running on your computer, you can now name the new session yourself (a default is filled in), and the “continue on the computer” hint shows the exact command to run — handmux open <name>.","New Homebrew install: on a Mac without Node, brew install handmux/tap/handmux sets up handmux, Node, and tmux in one command. If you already have Node, npm i -g handmux stays the lighter option."]}},{version:"0.12.2",date:"2026-07-11",highlight:{zh:"修复主屏图标偏大 / 换图标后不刷新",en:"Home-screen icon: right size & always fresh"},items:{zh:["修复了「添加到主屏」的图标在安卓上偏大、以及更换图标后旧图标不刷新的问题——图标更新现在会自动生效(已加到 iPhone 主屏的需删掉重加一次)。"],en:["Fixed the Add-to-Home-Screen icon looking oversized on Android and a changed icon not refreshing for returning users — icon updates now apply automatically (one already on an iOS home screen needs a one-time remove + re-add)."]}},{version:"0.12.1",date:"2026-07-11",highlight:{zh:"全新品牌图标与双色字标",en:"New brand icon & two-tone wordmark"},items:{zh:["焕新品牌:全新的发光终端图标(主屏图标、启动页都换了)+ 圆润的双色「handmux」字标(hand 白、mux 青→绿),官网、分享卡和 README 也一并更新。"],en:['Brand refresh: a new glowing terminal app icon (home-screen icon + boot splash) and a rounded two-tone "handmux" wordmark (hand in white, mux teal→green), with the site, share cards, and README updated to match.']}},{version:"0.12.0",date:"2026-07-11",highlight:{zh:"全屏程序也能滑动滚动 · 反馈入口 · 聊天草稿不丢",en:"Swipe-scroll full-screen apps · feedback channels · chat drafts kept"},items:{zh:["全屏程序(vim / htop / less 等)现在能直接滑动滚动了:开了鼠标的程序像电脑滚轮一样滑着滚,没开鼠标的分页器(less / man / git log)靠滑动逐行滚;每个全屏画面右侧还多了一枚翻页按钮做整页跳。","设置里新增「反馈与交流」:直达 GitHub Issues,中文用户还能扫码进微信交流群;README、官网、文档里也都能找到入口。","聊天框里没发出去的内容现在会自动保存,下次打开自动填回——误划走、切后台被杀、崩溃都不会再丢半截提示词。","修复:从终端链接或「最近」直接打开的文档,点返回会一次收起面板,不再被硬塞进「目录」层、再返一次直接退出 App。"],en:["Full-screen apps (vim / htop / less …) now scroll by swipe: mouse-mode apps scroll like a desktop wheel, and pagers (less / man / git log) scroll line-by-line on a swipe; every full-screen view also gets a page up/down button on the right for whole-page jumps.",'New "Feedback" section in Settings: a direct link to GitHub Issues, plus a WeChat user group for Chinese users — also surfaced in the README, the site, and the docs.',"Whatever you've typed in the chat box is now saved automatically and restored next time you open it — an accidental swipe-away, a background kill, or a crash no longer eats a half-written prompt.","Fixed: a doc opened straight from a terminal link or 最近 now closes the sheet in one Back press, instead of being forced into its folder view and then dropping you out of the app on the next Back."]}},{version:"0.11.1",date:"2026-07-09",highlight:{zh:"修复 Node 18 下无法启动的问题",en:"Fixes startup crash on Node 18"},items:{zh:["修复了电脑用 Node 18 时 handmux 任何命令都启动不了的问题(0.11.0 配置向导引入的依赖要求过新的 Node)。"],en:["Fixed handmux failing to start any command on Node 18 (a dependency introduced by the 0.11.0 setup wizard required a newer Node)."]}},{version:"0.11.0",date:"2026-07-08",highlight:{zh:"国内可用隧道 natapp/cpolar · 配置向导重做",en:"China-usable tunnels · setup redesigned"},items:{zh:["新增两条国内可用的隧道 natapp 和 cpolar:当 Cloudflare 在国内不稳定时,用你自己的免费账号就能把手机连到电脑。只要一个 authtoken;想要固定地址就填公网地址,留空则用免费临时域名;cpolar 的客户端还会自动下载。","`handmux setup` 重做成菜单式向导:每项设置一行、直接显示当前值,想改哪项就点哪项,不用再一路问到底。连接分两级——先选隧道类型,再进去配它的参数;推送、语音也各成小面板。第一次用会一步步带你走,默认落在「直连」并停在「保存并启动」,小白也能顺下来。"],en:["Two China-usable tunnels, natapp and cpolar: when Cloudflare is unreliable inside mainland China, reach your computer from your phone using your own free account. Just an authtoken; add a public URL for a fixed address or leave it blank for a free temporary one — and cpolar's client auto-downloads.",'`handmux setup` is now a menu-style wizard: every setting is a row showing its current value, so you jump straight to what you want to change instead of answering every prompt in order. Connection is two levels — pick the tunnel type, then configure it inside; push and voice are their own mini-panels. A first run walks you through it, defaulting to "Direct" with the cursor on "Save & start".']}},{version:"0.10.0",date:"2026-07-06",highlight:{zh:"升级前预览新功能 · 电脑 handmux open 接管",en:"Preview an update before installing · handmux open"},items:{zh:["更新提示现在会提前告诉你新版有什么:检测到有新版本时,设置里会逐版列出这次升级带来的新功能(一句话说明),让你在电脑上跑 `handmux update` 之前就知道值不值得。","电脑上新增 `handmux open <会话名>`:把你在手机上建的会话直接在电脑终端接回来(没有就新建),不用再记 `tmux new -A -s`。绑定/新建会话的弹窗里也加了这句提示。"],en:["The update notice now tells you what a new version brings before you install it: when an update is detected, Settings lists each newer version's highlight in one line, so you know whether it's worth running `handmux update` on your computer.","New `handmux open <session>` on the computer: reclaim a session you created from your phone straight into your computer's terminal (created if missing) — no need to remember `tmux new -A -s`. The bind/create dialog now hints at it too."]}},{version:"0.9.1",date:"2026-07-06",highlight:{zh:"「添加到主屏」引导",en:'"Add to Home Screen" coach'},items:{zh:["新增「添加到主屏」引导:第一次在浏览器里打开时,提示你把 handmux 装到主屏,像 App 一样全屏打开。安卓可一键安装;iPhone 给出 Safari 的「分享 → 更多 → 添加到主屏幕」三步——iOS 上收推送也需要它。装好后不再打扰。"],en:[`New "Add to Home Screen" coach: the first time you open handmux in a browser, it shows how to install it to your home screen and run it full-screen like an app. Android installs in one tap; iPhone gets the Safari steps (Share → More → Add to Home Screen) — which is also what iOS push needs. It won't nag once you've added it.`]}},{version:"0.9.0",date:"2026-07-05",highlight:{zh:"聊天输入框多行重做",en:"Multi-line chat composer redone"},items:{zh:["聊天输入框多行重做:文字占满整行,麦克风/发送悬到右下角,末行快挤到按钮才让出一行——长消息不再被右侧按钮列挤窄,多行时拖光标也不会误收键盘。"],en:["Chat composer redone for multi-line: text takes the full width, mic/send float in the bottom-right corner, and a row is yielded only when the last line actually reaches them — long messages are no longer squeezed by a right-hand button column, and dragging the caret no longer collapses the keyboard."]}},{version:"0.8.0",date:"2026-07-05",highlight:{zh:"快捷栏可自定义 · 上传体验重做",en:"Customizable quick-bars · upload redone"},items:{zh:["命令模式的常用命令分成「全局」和「当前窗口」两组:快捷栏里全局的(灰)排前、当前窗口的(绿)排后。尾部改成 ⚙ 齿轮,点开更高的编辑器分两区、各自 ▲▼ 排序。新增区一行搞定:顶部「命令/按键」大 Tab 选类型,左侧开关选加到全局还是本窗口。命令可勾「带回车」(点一下直接执行,末尾带 ⏎);按键用 ⌃⇧⌥ + 一个基键拼出组合键(如 Ctrl+C),点一下直接发到终端。","聊天模式的快捷条也能自定义了:末尾同样是 ⚙,点开编辑器,「消息/按键」两个 Tab —— 消息就是一句发给 agent 的话(以 / 开头当斜杠命令),按键用同一套 ⌃⇧⌥ + 基键拼组合键(ESC/Tab/退格默认就在里面)。点任意一条可回到弹窗改,▲▼ 排序。","上传体验重做:进度条不再一冲到 100% 就假装完事——先显示真实发送进度,字节发完后转成「服务器接收中…」,大文件不再像卡死。上传中可随时「取消」,已传完的文件会保留。","重名不再报错:上传一个已存在的文件名会自动改名(如 `报告 (1).pdf`),绝不覆盖原文件。上传失败时也会告诉你具体原因(过大 / 不支持的类型)。","现在可以上传视频了(mp4、mov、webm 等)。","Git 面板现在能打开 `/tmp` 等家目录以外的仓库(比如 agent 在 /tmp 里干活的项目),不再报红。","用量进度条新增「时间竖线」:标出当前重置窗口已过去的时间比例。已用量在竖线左边=烧得比时间慢(稳),越过竖线=烧得偏快,一眼看出自己的节奏。","新增版本更新提示:每次打开检测一次,服务端落后于 npm 最新版时设置齿轮亮红点,进设置能看到当前/最新版本号,按提示在电脑上跑 `handmux update` 升级即可。"],en:[`Command mode's saved commands now split into "Global" and "This window": the quick-bar shows global ones (grey) first, then this window's (green). The trailing + is now a ⚙ opening a taller two-section editor, each reorderable with ▲▼. One add row does it all: a big Command/Key tab picks the type, a left switch picks which list it lands in. Commands can tick "Send Enter" (a tap runs it, marked ⏎); keys are built from ⌃⇧⌥ + a base key into a combo like Ctrl+C that fires straight into the terminal.`,"Chat mode's quick-bar is now customizable too: the same ⚙ at the end opens an editor with a Message/Key tab — a message is a line sent to the agent (starts with / for a slash-command), a key is built from the same ⌃⇧⌥ + base-key picker (ESC/Tab/Backspace ship as defaults). Tap any row to re-open the card and edit it, ▲▼ to reorder.","Upload redone: the bar no longer jumps to 100% and then hangs — it shows real send progress, then flips to “receiving on the server…” once bytes are flushed, so a big file no longer looks stuck. You can Cancel mid-upload; already-uploaded files are kept.","Name clashes no longer fail: uploading an existing name auto-renames (e.g. `report (1).pdf`) and never overwrites. Failures now tell you why (too large / unsupported type).","Video files can now be uploaded (mp4, mov, webm, …).","The git panel can now open repos outside your home directory (e.g. a project an agent is working in under `/tmp`) instead of erroring.",`Usage bars now show a "time marker": a thin vertical line at how far the current reset window has elapsed. Usage left of the line = you're burning slower than the clock; past it = faster — pacing at a glance.`,"New update notice: checked once each time you open the app — when the server is behind the latest npm release, the settings gear lights a dot and Settings shows the current/latest version so you can run `handmux update` on your computer."]}},{version:"0.7.0",date:"2026-07-03",highlight:{zh:"新增「用量」页",en:'New "Usage" page'},items:{zh:["新增「用量」页(顶栏仪表盘图标):一眼看 Claude 的 5 小时 / 本周额度进度条 + 重置倒计时,以及 Codex 的额度环。全部读主机本地文件,不登录账号、不调用 API。Codex 零配置即用;Claude 的实时额度需要在电脑上运行一次 handmux hooks install(会装一个 statusLine 捕获器,已有自定义 statusLine 的绝不覆盖)。"],en:["New \"Usage\" page (gauge icon in the top bar): see Claude's 5-hour / weekly limit bars with reset countdowns, plus Codex's quota ring — at a glance. All read from local files on the host: no account login, no API calls. Codex works with zero setup; Claude's live limits need a one-time `handmux hooks install` on the computer (it adds a statusLine capturer and never clobbers an existing custom statusLine)."]}},{version:"0.6.0",date:"2026-07-02",highlight:{zh:"新增 Codex 支持",en:"Codex support added"},items:{zh:["新增 Codex 支持:收件箱与推送现在同时认得 Claude 和 Codex——Codex 会话的「进行中 / 需要你 / 已完成」都会像 Claude 一样推到手机;tmux 外跑着的 Codex 会话也能一键「接管」进来(codex resume);新建会话的启动命令预设新增 codex。收件箱每一条、以及顶栏当前会话,都带上 Claude / Codex 标记,一眼区分是哪种 agent。","会话抽屉底部新增「未接管会话」:一眼看到在 tmux 外跑着、手机还控制不了的 Claude / Codex(带状态、时间、最后一条消息),点「接管」即可在 tmux 里续接同一会话——自动加进会话列表并跳进去,以后手机随时回来。"],en:["Added Codex support: the inbox and push now recognize both Claude and Codex — a Codex session's working / waiting-on-you / done states reach your phone just like Claude. You can take over Codex sessions running outside tmux (codex resume), and there's a new codex startup-command preset. Every inbox row and the current-session topbar now carry a Claude / Codex mark so you can tell the two apart at a glance.",`The session drawer now has a "not taken over" section at the bottom: Claude / Codex sessions running outside tmux that your phone can't steer yet (with their state, time, and last message). Tap Take over to resume the same conversation inside tmux — it's added to your session list and opened, so you can return to it from your phone anytime.`]}},{version:"0.5.0",date:"2026-06-28",highlight:{zh:"首个公开版 · 多语言界面",en:"First public release · multi-language UI"},items:{zh:["首个公开发布版本(npm 上的 handmux)。","新增繁体中文、日语、韩语界面(设置 → Language 切换)。","想法角标:有未完成想法时,灯泡图标右上角显示数量。","设置面板列数调节:实时显示当前列数,新增 ±1 精细调节按钮。"],en:["First public release (handmux on npm).","Added Traditional Chinese, Japanese, and Korean UI (Settings → Language to switch).","Idea badge: when there are pending ideas, the lightbulb icon shows a count in the corner.","Settings column control: shows the current column count live, with new ±1 fine-adjust buttons."]}},{date:"2026-06",label:{zh:"早期内测",en:"Early builds"},highlight:{zh:"早期内测",en:"Early builds"},items:{zh:["新增「Git」面板(顶栏图标):仿 VS Code,一页同屏看变更 + 提交历史,点文件/提交看全屏彩色 diff;只读,不动你的工作树。可绑多个目录用 tab 切换。","新增「想法」管理器(顶栏灯泡):按窗口记待办,可编辑、拖拽排序、一键填入、语音输入。","网站预览:选目录预览静态站点,或填端口预览本机正在跑的服务(走专属子域名);图片预览:文件/终端里点图片(含 GIF)直接内嵌打开,可捏合缩放、长按保存。","文件:上传/下载(进度条、系统分享上传),浏览器打开即落到当前会话目录,支持 /tmp、$TMPDIR;文档在应用内预览 Markdown/txt/log/sh,可语音朗读(逐句高亮)。","收件箱 + Web Push:汇总各会话「进行中/已完成/需要你」,窗口标签带状态色点,需要你时推送到手机。","命令面板:常用 + 每会话最近命令,斜杠命令快捷键(/clear、/compact、/model…)。","可靠性:断线重连(退避 + 每请求超时 + 断线横幅,后台自动暂停轮询),离线兜底页。","首版:手机浏览器驱动真实 tmux 面板(xterm 终端 + 会话/窗口/pane 导航 + 深链),移动按键区、键盘自动抬升、列宽/字号调节,可添加到主屏(PWA)。"],en:['New "Git" panel (top-bar icon): VS Code style — changes + commit history on one screen, tap a file/commit for a full-screen colored diff; read-only, never touches your working tree. Bind multiple dirs and switch via tabs.','New "Ideas" manager (top-bar lightbulb): per-window to-dos — edit, drag to reorder, one-tap insert, voice input.',"Website preview: pick a directory for a static site, or a port for a service running locally (dedicated subdomain); image preview: tap an image (including GIFs) in Files or the terminal to open inline, pinch to zoom, long-press to save.","Files: upload/download (progress bar, share-to-upload), the browser opens straight to the current session dir, /tmp and $TMPDIR supported; documents preview in-app (Markdown/txt/log/sh) and can be read aloud (sentence-by-sentence highlight).","Inbox + Web Push: summarizes each session's In-progress / Done / Needs-you, window tabs get a status color dot, and Needs-you pushes to your phone.","Command panel: frequent + per-session recent commands, slash-command shortcuts (/clear, /compact, /model, …).","Reliability: reconnect on disconnect (backoff + per-request timeout + connection-lost banner, polling auto-paused in the background) and an offline fallback page.","First release: a phone browser drives real tmux panes (xterm terminal + session/window/pane navigation + deep links), a mobile key bar, keyboard auto-lift, column-width/font-size adjustment, and add-to-home-screen (PWA)."]}}],dA=r=>r.version||r.date,qh=Fg[0]?dA(Fg[0]):null,hA={jpg:"image/jpeg",jpeg:"image/jpeg",jfif:"image/jpeg",png:"image/png",gif:"image/gif",webp:"image/webp",bmp:"image/bmp",svg:"image/svg+xml",ico:"image/x-icon",heic:"image/heic",heif:"image/heif",avif:"image/avif",tif:"image/tiff",tiff:"image/tiff",pdf:"application/pdf",txt:"text/plain",log:"text/plain",md:"text/markdown",markdown:"text/markdown",csv:"text/csv",json:"application/json",xml:"application/xml",html:"text/html",htm:"text/html",zip:"application/zip",mp4:"video/mp4",m4v:"video/mp4",mov:"video/quicktime",webm:"video/webm",mkv:"video/x-matroska",avi:"video/x-msvideo",wmv:"video/x-ms-wmv",flv:"video/x-flv","3gp":"video/3gpp",ogv:"video/ogg",mpeg:"video/mpeg",mpg:"video/mpeg",doc:"application/msword",docx:"application/vnd.openxmlformats-officedocument.wordprocessingml.document",xls:"application/vnd.ms-excel",xlsx:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",ppt:"application/vnd.ms-powerpoint",pptx:"application/vnd.openxmlformats-officedocument.presentationml.presentation"};function wm(r){const s=(r||"").lastIndexOf(".");return s<0?"":hA[r.slice(s+1).toLowerCase()]||""}function mA(r){return wm(r).startsWith("image/")}class tr extends Error{}class fA extends Error{constructor(s,d,_){super(s),this.status=d,this.serverError=_??null}}async function Zt(r,s={}){const d=Lo(),{timeoutMs:_,...E}=s,R={Authorization:`Bearer ${d??""}`,...E.headers||{}};E.body&&(R["Content-Type"]="application/json");let b=null,a=null;_&&(b=new AbortController,a=setTimeout(()=>b.abort(),_));try{const u=await fetch(r,{cache:"no-store",...E,headers:R,signal:b==null?void 0:b.signal});if(u.status===401)throw new tr;if(!u.ok){let g=null;try{const x=await u.json();x!=null&&x.error&&(g=x.error)}catch{}throw new fA(g||`${r} -> ${u.status}`,u.status,g)}return u.status===204?{unchanged:!0}:await u.json()}catch(u){throw b!=null&&b.signal.aborted?new Error(`${r} -> timeout`):u}finally{a&&clearTimeout(a)}}const Fl=()=>Zt("/api/sessions"),pA=()=>Zt("/api/usage"),Cu=r=>Zt(`/api/windows?session=${encodeURIComponent(r)}`),Fa=r=>Zt(`/api/panes?window=${encodeURIComponent(r)}`),vA=(r,s=1500,d)=>Zt(`/api/history?pane=${encodeURIComponent(r)}&lines=${s}${d?`&since=${d}`:""}`,{timeoutMs:8e3}),iN=(r,{since:s,before:d,limit:_=10}={})=>{let E=`/api/transcript?pane=${encodeURIComponent(r)}&limit=${encodeURIComponent(_)}`;return s&&(E+=`&since=${encodeURIComponent(s)}`),d!=null&&(E+=`&before=${encodeURIComponent(d)}`),Zt(E,{timeoutMs:8e3}).then(R=>R.unchanged?null:R)},gA=r=>Zt(`/api/context?pane=${encodeURIComponent(r)}`,{timeoutMs:8e3}),_A=r=>Zt(`/api/pending-prompt?pane=${encodeURIComponent(r)}`,{timeoutMs:8e3}).then(s=>s.prompt||null),Co=(r,s,d=!0)=>Zt("/api/send",{method:"POST",body:JSON.stringify({pane:r,text:s,enter:d})}),Pu=(r,s)=>Zt("/api/keys",{method:"POST",body:JSON.stringify({pane:r,keys:s})}),bA=(r,s,d=1)=>Zt("/api/scroll",{method:"POST",body:JSON.stringify({pane:r,dir:s,lines:d})}),yA=(r,s,d)=>Zt("/api/resize",{method:"POST",body:JSON.stringify({window:r,cols:s,rows:d})}),xA=(r,s)=>Zt("/api/resize",{method:"POST",body:JSON.stringify({pane:r,cols:s})}),wA=r=>Zt(`/api/layout?window=${encodeURIComponent(r)}`),NA=(r,s)=>Zt("/api/resize",{method:"POST",body:JSON.stringify({window:r,auto:!0,layout:s})}),SA=(r,s,d)=>Zt("/api/sessions",{method:"POST",body:JSON.stringify({name:r,cwd:s,cmd:d})}),CA=(r,s,d,_,E)=>Zt("/api/windows",{method:"POST",body:JSON.stringify({session:r,pane:s,name:d,cwd:_,cmd:E})}),EA=(r,s)=>Zt("/api/sessions",{method:"PATCH",body:JSON.stringify({id:r,name:s})}),jA=(r,s)=>Zt("/api/windows",{method:"PATCH",body:JSON.stringify({id:r,name:s})}),DA=r=>Zt(`/api/windows?window=${encodeURIComponent(r)}`,{method:"DELETE"}),kA=(r,s)=>Zt("/api/windows/swap",{method:"POST",body:JSON.stringify({a:r,b:s})}),rN=(r,s)=>Zt("/api/panes/split",{method:"POST",body:JSON.stringify({pane:r,dir:s})}),RA=r=>Zt(`/api/panes?pane=${encodeURIComponent(r)}`,{method:"DELETE"}),TA=(r,s)=>Zt("/api/dir",{method:"POST",body:JSON.stringify({dir:r,name:s})}),sN=(r,s=null)=>Zt(`/api/file?path=${encodeURIComponent(r)}${s!=null?`&mtime=${encodeURIComponent(s)}`:""}`,{timeoutMs:8e3}),eS=r=>Zt(`/api/dir${r?`?path=${encodeURIComponent(r)}`:""}`,{timeoutMs:8e3}),jo=r=>Zt(`/api/pane-cwd?pane=${encodeURIComponent(r)}`,{timeoutMs:8e3}),LA=()=>Zt("/api/asr/sign",{timeoutMs:8e3}),tS=()=>Zt("/api/config",{timeoutMs:8e3}),MA=()=>Zt("/api/version",{timeoutMs:8e3}),AA=()=>Zt("/api/hooks/install",{method:"POST",timeoutMs:15e3}),UA=(r=[])=>Zt(`/api/states?sessions=${encodeURIComponent(r.join(","))}`,{timeoutMs:4e3}),aN=()=>Zt("/api/orphans",{timeoutMs:8e3}),OA=r=>Zt("/api/orphans/takeover",{method:"POST",body:JSON.stringify(r),timeoutMs:15e3}),oN=r=>Zt(`/api/git/repos?dir=${encodeURIComponent(r)}`,{timeoutMs:8e3}),VA=r=>Zt(`/api/git/status?repo=${encodeURIComponent(r)}`,{timeoutMs:8e3}),PA=(r,{limit:s=50,ref:d}={})=>{let _=`/api/git/log?repo=${encodeURIComponent(r)}&limit=${s}`;return d&&(_+=`&ref=${encodeURIComponent(d)}`),Zt(_,{timeoutMs:8e3})},BA=r=>Zt(`/api/git/branches?repo=${encodeURIComponent(r)}`,{timeoutMs:8e3}),IA=(r,{path:s,commit:d,staged:_}={})=>{let E=`/api/git/diff?repo=${encodeURIComponent(r)}&path=${encodeURIComponent(s??"")}`;return d&&(E+=`&commit=${encodeURIComponent(d)}`),_&&(E+="&staged=1"),Zt(E,{timeoutMs:8e3})},FA=(r,s)=>Zt(`/api/git/commit?repo=${encodeURIComponent(r)}&hash=${encodeURIComponent(s)}`,{timeoutMs:8e3});function HA(r,s){return new Promise((d,_)=>{const E=Lo(),R=new XMLHttpRequest;R.open("GET",`/api/download?path=${encodeURIComponent(r)}`),R.setRequestHeader("Authorization",`Bearer ${E??""}`),R.responseType="blob",R.onprogress=b=>{s&&b.lengthComputable&&s(b.loaded/b.total)},R.onerror=()=>_(new Error("download failed")),R.onload=()=>{if(R.status===401)return _(new tr);if(R.status<200||R.status>=300)return _(new Error(`download -> ${R.status}`));const b=r.split("/").pop()||"download";let a=R.response;const u=wm(b);u&&a&&a.type!==u&&(a=a.slice(0,a.size,u));const g=URL.createObjectURL(a),x=document.createElement("a");x.href=g,x.download=b,document.body.appendChild(x),x.click(),x.remove(),setTimeout(()=>URL.revokeObjectURL(g),1e3),d()},R.send()})}function lN(r,s=null){return new Promise((d,_)=>{const E=Lo(),R=new XMLHttpRequest,b=s!=null?`&mtime=${encodeURIComponent(s)}`:"";R.open("GET",`/api/download?path=${encodeURIComponent(r)}${b}`),R.setRequestHeader("Authorization",`Bearer ${E??""}`),R.responseType="blob",R.onerror=()=>_(new Error(V("api.loadFailed"))),R.onload=()=>{if(R.status===304)return d({notModified:!0});if(R.status===401)return _(new tr);if(R.status<200||R.status>=300)return _(new Error(`image -> ${R.status}`));let a=R.response;const u=wm(r.split("/").pop()||"");u&&a&&a.type!==u&&(a=a.slice(0,a.size,u));const g=Number(R.getResponseHeader("X-Mtime"));d({url:URL.createObjectURL(a),mtimeMs:Number.isFinite(g)?g:null})},R.send()})}const zA=(r,s,d="/")=>{const _=encodeURIComponent(Lo()??"");if((r==null?void 0:r.kind)==="dynamic"){const E=d&&d.startsWith("/")?d:"/",R=E.includes("?")?"&":"?";return`https://${encodeURIComponent(r.name)}.${s}${E}${R}token=${_}`}return`/preview/${encodeURIComponent(r==null?void 0:r.name)}/?token=${_}`},Eu=(r,s={})=>Zt("/api/previews",{method:"POST",body:JSON.stringify(s.port!=null?{name:r,port:s.port}:{name:r,dir:s.dir})}),$A=()=>Zt("/api/previews"),WA=r=>Zt(`/api/previews/${encodeURIComponent(r)}`,{method:"DELETE"});class lm extends Error{constructor(){super("upload aborted"),this.name="UploadAbort"}}function nS(r,s,d,_=!1,{signal:E}={}){return new Promise((R,b)=>{if(E!=null&&E.aborted)return b(new lm);const a=Lo(),u=new FormData;u.append("dir",r),_&&u.append("stash","1"),u.append("file",s,s.name);const g=new XMLHttpRequest;g.open("POST","/api/upload"),g.setRequestHeader("Authorization",`Bearer ${a??""}`),g.upload.onprogress=f=>{d&&f.lengthComputable&&d(f.loaded/f.total,"sending")},g.upload.onload=()=>{d==null||d(1,"processing")};const x=()=>g.abort();E&&E.addEventListener("abort",x,{once:!0});const h=()=>{E&&E.removeEventListener("abort",x)};g.onabort=()=>{h(),b(new lm)},g.onerror=()=>{h(),b(new Error(V("api.uploadFailed")))},g.onload=()=>{if(h(),g.status===401)return b(new tr);if(g.status>=200&&g.status<300)try{return R(JSON.parse(g.responseText))}catch{return R({})}const f={400:V("api.uploadBadDir"),409:V("api.uploadDuplicate"),413:V("api.uploadTooLarge"),415:V("api.uploadBadType")}[g.status]||V("api.uploadFailed");b(new Error(f))},g.send(u)})}async function cN({paneId:r,dir:s,windowId:d,api:_,getPanes:E}){const{id:R}=await _.splitPane(r,s);return{panes:await E(d),selectPaneId:R}}async function GA({paneId:r,windowId:s,viewedPaneId:d,api:_,getPanes:E,pickId:R}){await _.closePane(r);const b=await E(s),a=r===d&&b.length?R(b,null):null;return{panes:b,selectPaneId:a}}const qA=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" role="img" aria-label="Claude"><title>Claude</title><path fill="#d97757" d="m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z"/></svg>
|
|
205
205
|
`,YA=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" role="img" aria-label="Codex"><title>Codex (OpenAI)</title><path fill="#ededed" d="M22.2819 9.8211a5.9847 5.9847 0 0 0-.5157-4.9108 6.0462 6.0462 0 0 0-6.5098-2.9A6.0651 6.0651 0 0 0 4.9807 4.1818a5.9847 5.9847 0 0 0-3.9977 2.9 6.0462 6.0462 0 0 0 .7427 7.0966 5.98 5.98 0 0 0 .511 4.9107 6.051 6.051 0 0 0 6.5146 2.9001A5.9847 5.9847 0 0 0 13.2599 24a6.0557 6.0557 0 0 0 5.7718-4.2058 5.9894 5.9894 0 0 0 3.9977-2.9001 6.0557 6.0557 0 0 0-.7475-7.0729zm-9.022 12.6081a4.4755 4.4755 0 0 1-2.8764-1.0408l.1419-.0804 4.7783-2.7582a.7948.7948 0 0 0 .3927-.6813v-6.7369l2.02 1.1686a.071.071 0 0 1 .038.052v5.5826a4.504 4.504 0 0 1-4.4945 4.4944zm-9.6607-4.1254a4.4708 4.4708 0 0 1-.5346-3.0137l.142.0852 4.783 2.7582a.7712.7712 0 0 0 .7806 0l5.8428-3.3685v2.3324a.0804.0804 0 0 1-.0332.0615L9.74 19.9502a4.4992 4.4992 0 0 1-6.1408-1.6464zM2.3408 7.8956a4.485 4.485 0 0 1 2.3655-1.9728V11.6a.7664.7664 0 0 0 .3879.6765l5.8144 3.3543-2.0201 1.1685a.0757.0757 0 0 1-.071 0l-4.8303-2.7865A4.504 4.504 0 0 1 2.3408 7.872zm16.5963 3.8558L13.1038 8.364 15.1192 7.2a.0757.0757 0 0 1 .071 0l4.8303 2.7913a4.4944 4.4944 0 0 1-.6765 8.1042v-5.6772a.79.79 0 0 0-.407-.667zm2.0107-3.0231l-.142-.0852-4.7735-2.7818a.7759.7759 0 0 0-.7854 0L9.409 9.2297V6.8974a.0662.0662 0 0 1 .0284-.0615l4.8303-2.7866a4.4992 4.4992 0 0 1 6.6802 4.66zM8.3065 12.863l-2.02-1.1638a.0804.0804 0 0 1-.038-.0567V6.0742a4.4992 4.4992 0 0 1 7.3757-3.4537l-.142.0805L8.704 5.459a.7948.7948 0 0 0-.3927.6813zm1.0976-2.3654l2.602-1.4998 2.6069 1.4998v2.9994l-2.5974 1.4997-2.6067-1.4997Z"/></svg>
|
|
206
206
|
`,un={viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.75,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0};function Bu(){return o.jsxDEV("svg",{...un,children:o.jsxDEV("path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:15,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:14,columnNumber:5},this)}function KA(){return o.jsxDEV("svg",{...un,children:[o.jsxDEV("path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:24,columnNumber:7},this),o.jsxDEV("path",{d:"M12 10v6M9 13h6"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:25,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:23,columnNumber:5},this)}function cm(){return o.jsxDEV("svg",{...un,children:[o.jsxDEV("path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2Z"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:33,columnNumber:7},this),o.jsxDEV("circle",{cx:"12",cy:"12",r:"3"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:34,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:32,columnNumber:5},this)}function iS(){return o.jsxDEV("svg",{...un,children:[o.jsxDEV("path",{d:"M14 3H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V8z"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:43,columnNumber:7},this),o.jsxDEV("path",{d:"M14 3v5h5"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:44,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:42,columnNumber:5},this)}function XA(){return o.jsxDEV("svg",{...un,children:[o.jsxDEV("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",ry:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:53,columnNumber:7},this),o.jsxDEV("circle",{cx:"9",cy:"9",r:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:54,columnNumber:7},this),o.jsxDEV("path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:55,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:52,columnNumber:5},this)}function w_(){return o.jsxDEV("svg",{...un,children:[o.jsxDEV("path",{d:"M12 19V5"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:64,columnNumber:7},this),o.jsxDEV("path",{d:"m5 12 7-7 7 7"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:65,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:63,columnNumber:5},this)}function JA(){return o.jsxDEV("svg",{...un,children:[o.jsxDEV("line",{x1:"2",x2:"5",y1:"12",y2:"12"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:74,columnNumber:7},this),o.jsxDEV("line",{x1:"19",x2:"22",y1:"12",y2:"12"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:75,columnNumber:7},this),o.jsxDEV("line",{x1:"12",x2:"12",y1:"2",y2:"5"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:76,columnNumber:7},this),o.jsxDEV("line",{x1:"12",x2:"12",y1:"19",y2:"22"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:77,columnNumber:7},this),o.jsxDEV("circle",{cx:"12",cy:"12",r:"7"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:78,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:73,columnNumber:5},this)}function ha(){return o.jsxDEV("svg",{...un,children:o.jsxDEV("path",{d:"m6 9 6 6 6-6"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:87,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:86,columnNumber:5},this)}function N_(){return o.jsxDEV("svg",{...un,children:o.jsxDEV("path",{d:"M12 5v14M5 12h14"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:96,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:95,columnNumber:5},this)}function S_(){return o.jsxDEV("svg",{...un,children:o.jsxDEV("path",{d:"M20 6 9 17l-5-5"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:105,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:104,columnNumber:5},this)}function rS(){return o.jsxDEV("svg",{...un,children:[o.jsxDEV("circle",{cx:"12",cy:"12",r:"9"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:124,columnNumber:7},this),o.jsxDEV("path",{d:"M12 7v5l3 2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:125,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:123,columnNumber:5},this)}function ZA(){return o.jsxDEV("svg",{...un,children:[o.jsxDEV("path",{d:"M9 18h6"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:135,columnNumber:7},this),o.jsxDEV("path",{d:"M10 22h4"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:136,columnNumber:7},this),o.jsxDEV("path",{d:"M15.09 14c.18-.98.65-1.74 1.41-2.5A4.65 4.65 0 0 0 18 8 6 6 0 0 0 6 8c0 1 .23 2.23 1.5 3.5A4.61 4.61 0 0 1 8.91 14"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:137,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:134,columnNumber:5},this)}function QA(){return o.jsxDEV("svg",{...un,children:[o.jsxDEV("path",{d:"M22 12h-6l-2 3h-4l-2-3H2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:146,columnNumber:7},this),o.jsxDEV("path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11Z"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:147,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:145,columnNumber:5},this)}function e3(){return o.jsxDEV("svg",{...un,children:[o.jsxDEV("path",{d:"M12 3v12"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:156,columnNumber:7},this),o.jsxDEV("path",{d:"m7 10 5 5 5-5"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:157,columnNumber:7},this),o.jsxDEV("path",{d:"M5 21h14"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:158,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:155,columnNumber:5},this)}function sS(){return o.jsxDEV("svg",{...un,children:[o.jsxDEV("path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:168,columnNumber:7},this),o.jsxDEV("path",{d:"M14 2v4a2 2 0 0 0 2 2h4"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:169,columnNumber:7},this),o.jsxDEV("path",{d:"M12 18v-6"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:170,columnNumber:7},this),o.jsxDEV("path",{d:"m9 15 3-3 3 3"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:171,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:167,columnNumber:5},this)}function aS(){return o.jsxDEV("svg",{...un,children:[o.jsxDEV("rect",{x:"9",y:"9",width:"11",height:"11",rx:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:180,columnNumber:7},this),o.jsxDEV("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:181,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:179,columnNumber:5},this)}function t3(){return o.jsxDEV("svg",{...un,children:o.jsxDEV("path",{d:"M7 5l12 7-12 7z"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:190,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:189,columnNumber:5},this)}function n3(){return o.jsxDEV("svg",{...un,children:[o.jsxDEV("line",{x1:"9",y1:"5",x2:"9",y2:"19"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:199,columnNumber:7},this),o.jsxDEV("line",{x1:"15",y1:"5",x2:"15",y2:"19"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:200,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:198,columnNumber:5},this)}function oS(){return o.jsxDEV("svg",{...un,children:o.jsxDEV("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:209,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:208,columnNumber:5},this)}function i3(){return o.jsxDEV("svg",{...un,children:[o.jsxDEV("rect",{x:"9",y:"3",width:"6",height:"11",rx:"3"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:218,columnNumber:7},this),o.jsxDEV("path",{d:"M5 11a7 7 0 0 0 14 0"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:219,columnNumber:7},this),o.jsxDEV("line",{x1:"12",y1:"18",x2:"12",y2:"21"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:220,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:217,columnNumber:5},this)}function um(){return o.jsxDEV("svg",{...un,children:[o.jsxDEV("rect",{x:"2",y:"3",width:"20",height:"14",rx:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:229,columnNumber:7},this),o.jsxDEV("path",{d:"M8 21h8M12 17v4"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:230,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:228,columnNumber:5},this)}function r3(){return o.jsxDEV("svg",{...un,children:[o.jsxDEV("path",{d:"M12 14l4-4"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:239,columnNumber:7},this),o.jsxDEV("path",{d:"M3.34 19a10 10 0 1 1 17.32 0"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:240,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:238,columnNumber:5},this)}function s3(){return o.jsxDEV("svg",{...un,children:[o.jsxDEV("rect",{x:"5",y:"2",width:"14",height:"20",rx:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:249,columnNumber:7},this),o.jsxDEV("path",{d:"M12 18h.01"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:250,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:248,columnNumber:5},this)}function a3(){return o.jsxDEV("svg",{...un,children:[o.jsxDEV("path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:259,columnNumber:7},this),o.jsxDEV("path",{d:"M21 3v5h-5"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:260,columnNumber:7},this),o.jsxDEV("path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:261,columnNumber:7},this),o.jsxDEV("path",{d:"M3 21v-5h5"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:262,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:258,columnNumber:5},this)}function lS(){return o.jsxDEV("svg",{...un,children:[o.jsxDEV("line",{x1:"6",y1:"3",x2:"6",y2:"15"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:271,columnNumber:7},this),o.jsxDEV("circle",{cx:"18",cy:"6",r:"3"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:272,columnNumber:7},this),o.jsxDEV("circle",{cx:"6",cy:"18",r:"3"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:273,columnNumber:7},this),o.jsxDEV("path",{d:"M18 9a9 9 0 0 1-9 9"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:274,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:270,columnNumber:5},this)}function ca(){return o.jsxDEV("svg",{...un,children:[o.jsxDEV("path",{d:"M18 6 6 18"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:283,columnNumber:7},this),o.jsxDEV("path",{d:"m6 6 12 12"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:284,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:282,columnNumber:5},this)}function o3(){return o.jsxDEV("svg",{...un,children:[o.jsxDEV("path",{d:"m7 11 2-2-2-2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:302,columnNumber:7},this),o.jsxDEV("path",{d:"M11 13h4"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:303,columnNumber:7},this),o.jsxDEV("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:304,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:301,columnNumber:5},this)}function l3({down:r=!1}){return o.jsxDEV("svg",{...un,children:[o.jsxDEV("rect",{x:"3",y:"9",width:"18",height:"11",rx:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:326,columnNumber:7},this),o.jsxDEV("path",{d:"M7 13h.01M11 13h.01M15 13h.01M8 16.5h8"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:327,columnNumber:7},this),r?o.jsxDEV("path",{d:"M9 4.5l3 3 3-3"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:328,columnNumber:15},this):o.jsxDEV("path",{d:"M9 6.5l3-3 3 3"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:328,columnNumber:45},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:325,columnNumber:5},this)}function uN(){return o.jsxDEV("svg",{...un,children:[o.jsxDEV("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:337,columnNumber:7},this),o.jsxDEV("path",{d:"M12 4v16"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:338,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:336,columnNumber:5},this)}function dN(){return o.jsxDEV("svg",{...un,children:[o.jsxDEV("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:347,columnNumber:7},this),o.jsxDEV("path",{d:"M3 12h18"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:348,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:346,columnNumber:5},this)}function c3(){return o.jsxDEV("svg",{...un,children:[o.jsxDEV("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:357,columnNumber:7},this),o.jsxDEV("path",{d:"M12 3v18M3 12h18"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:358,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:356,columnNumber:5},this)}function cS(){return o.jsxDEV("svg",{...un,children:[o.jsxDEV("path",{d:"m18 5-2.4-2.4A2 2 0 0 0 14.2 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:369,columnNumber:7},this),o.jsxDEV("path",{d:"M21.4 12.6a1 1 0 0 0-3-3l-4 4a2 2 0 0 0-.5.9l-.8 2.9a.5.5 0 0 0 .6.6l2.9-.8a2 2 0 0 0 .8-.5z"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:370,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:368,columnNumber:5},this)}function u3(){return o.jsxDEV("svg",{...un,children:[o.jsxDEV("circle",{cx:"11",cy:"11",r:"8"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:378,columnNumber:7},this),o.jsxDEV("path",{d:"m21 21-4.3-4.3"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:379,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:377,columnNumber:5},this)}function d3(){return o.jsxDEV("svg",{...un,children:[o.jsxDEV("circle",{cx:"12",cy:"12",r:"10"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:387,columnNumber:7},this),o.jsxDEV("path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:388,columnNumber:7},this),o.jsxDEV("path",{d:"M2 12h20"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:389,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:386,columnNumber:5},this)}function h3(){return o.jsxDEV("svg",{...un,children:[o.jsxDEV("path",{d:"m3 17 2 2 4-4"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:397,columnNumber:7},this),o.jsxDEV("path",{d:"m3 7 2 2 4-4"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:398,columnNumber:7},this),o.jsxDEV("path",{d:"M13 6h8M13 12h8M13 18h8"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:399,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:396,columnNumber:5},this)}function m3(){return o.jsxDEV("svg",{...un,children:o.jsxDEV("path",{d:"M19.439 7.85c-.049.322.059.648.289.878l1.568 1.568c.47.47.706 1.087.706 1.704s-.235 1.233-.706 1.704l-1.611 1.611a.98.98 0 0 1-.837.276c-.47-.07-.802-.48-.968-.925a2.501 2.501 0 1 0-3.214 3.214c.446.166.855.497.925.968a.979.979 0 0 1-.276.837l-1.61 1.61a2.404 2.404 0 0 1-1.705.707 2.402 2.402 0 0 1-1.704-.706l-1.568-1.568a1.026 1.026 0 0 0-.877-.29c-.493.074-.84.504-1.02.968a2.5 2.5 0 1 1-3.237-3.237c.464-.18.894-.527.967-1.02a1.026 1.026 0 0 0-.289-.877l-1.568-1.568A2.402 2.402 0 0 1 1.998 12c0-.617.236-1.234.706-1.704L4.23 8.77c.24-.24.581-.353.917-.303.515.077.877.528 1.073 1.01a2.5 2.5 0 1 0 3.259-3.259c-.482-.196-.933-.558-1.01-1.073-.05-.336.062-.676.303-.917l1.525-1.525A2.402 2.402 0 0 1 12 1.998c.617 0 1.234.236 1.704.706l1.568 1.568c.23.23.556.338.877.29.493-.074.84-.504 1.02-.968a2.5 2.5 0 1 1 3.237 3.237c-.464.18-.894.527-.967 1.02Z"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:407,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:406,columnNumber:5},this)}function f3(){return o.jsxDEV("svg",{...un,children:[o.jsxDEV("path",{d:"M12 8V4H8"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:415,columnNumber:7},this),o.jsxDEV("rect",{x:"4",y:"8",width:"16",height:"12",rx:"2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:416,columnNumber:7},this),o.jsxDEV("path",{d:"M2 14h2M20 14h2M15 13v2M9 13v2"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:417,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:414,columnNumber:5},this)}function p3(){return o.jsxDEV("svg",{...un,children:o.jsxDEV("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:425,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:424,columnNumber:5},this)}const hN={claude:qA,codex:YA};function Do({agent:r}){const s=hN[r]?r:"claude";return o.jsxDEV("span",{className:"agent-mark",role:"img","aria-label":s,dangerouslySetInnerHTML:{__html:hN[s]}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/icons.jsx",lineNumber:440,columnNumber:10},this)}const uS=r=>{if(r<=0)return V("time.expired");const s=Math.max(1,Math.round(r/6e4));return V("time.minutes",{n:s})};function dS(r,s=!0){const[d,_]=U.useState(()=>Date.now());return U.useEffect(()=>{if(!s||r==null)return;_(Date.now());const E=setInterval(()=>_(Date.now()),1e3);return()=>clearInterval(E)},[s,r]),r!=null?Math.max(0,r-d):0}const wg=1280,mN=6;function v3({open:r,tabs:s,activeName:d,name:_,kind:E="static",domain:R=null,port:b,dir:a,expiresAt:u,initialPath:g="/",onSwitchTab:x,onCloseTab:h,onRenew:f,onStop:S,onMinimize:C}){const y=s&&s.length?s:_?[{name:_,kind:E,port:b,dir:a,expiresAt:u,path:g}]:[],l=y.find(Y=>Y.name===d)||y[0]||null,[v,m]=U.useState(!1),[p,N]=U.useState("mobile"),[k,j]=U.useState(1),[M,D]=U.useState({w:0,h:0}),L=U.useRef(null),A=U.useRef(null);U.useEffect(()=>{r||m(!1)},[r]),U.useEffect(()=>{p==="mobile"&&j(1)},[p]),U.useEffect(()=>{const Y=A.current;if(!r||!Y)return;const ve=()=>D({w:Y.clientWidth,h:Y.clientHeight});if(ve(),typeof ResizeObserver>"u")return;const he=new ResizeObserver(ve);return he.observe(Y),()=>he.disconnect()},[r]);const F=dS(l==null?void 0:l.expiresAt,r),O=(l==null?void 0:l.kind)==="dynamic"?l.port!=null?`:${l.port}`:"":(l==null?void 0:l.dir)||"",I=Y=>Y.kind==="dynamic"?Y.port!=null?`:${Y.port}`:Y.name:Y.dir?Y.dir.split("/").filter(Boolean).pop():V("preview.static"),G=p==="pc"&&M.w>0,ne=M.w>0?M.w/wg:1,ee=M.h>0?M.h/ne:0,te=ne*k,se=G?{width:`${wg*te}px`,height:`${ee*te}px`}:void 0,B=G?{width:`${wg}px`,height:`${ee}px`,transform:`scale(${te})`,transformOrigin:"0 0"}:void 0,W=Y=>j(ve=>Math.min(mN,Math.max(1,+(ve+Y).toFixed(2)))),X=()=>{const Y=L.current;if(Y)try{Y.contentWindow.location.reload()}catch{Y.src=Y.src}};return Wl.createPortal(o.jsxDEV("div",{className:`file-sheet ${r?"open":""}`,"aria-hidden":!r,children:[o.jsxDEV("div",{className:"file-tabs preview-head",children:[o.jsxDEV("span",{className:"preview-status",children:[o.jsxDEV(um,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:79,columnNumber:11},this),o.jsxDEV("span",{className:"preview-state",children:(l==null?void 0:l.kind)==="dynamic"?V("preview.dynamic"):V("preview.static")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:80,columnNumber:11},this),(l==null?void 0:l.name)&&o.jsxDEV("span",{className:"preview-name",title:`${l.name}${O?" "+O:""}`,children:[l.name,O&&o.jsxDEV("span",{className:"preview-detail",children:O},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:83,columnNumber:39},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:82,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:78,columnNumber:9},this),o.jsxDEV("button",{className:"preview-remain",title:V("preview.remainTitle"),"aria-haspopup":"dialog","aria-expanded":v,onClick:()=>m(Y=>!Y),children:uS(F)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:87,columnNumber:9},this),o.jsxDEV("button",{className:"preview-iconbtn",onClick:()=>N(Y=>Y==="mobile"?"pc":"mobile"),"aria-label":V(p==="mobile"?"preview.toPcView":"preview.toMobileView"),title:V(p==="mobile"?"preview.pcView":"preview.mobileView"),"aria-pressed":p==="pc",children:p==="mobile"?o.jsxDEV(um,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:92,columnNumber:34},this):o.jsxDEV(s3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:92,columnNumber:52},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:89,columnNumber:9},this),o.jsxDEV("button",{className:"preview-iconbtn",onClick:X,"aria-label":V("preview.refresh"),title:V("preview.refresh"),children:o.jsxDEV(a3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:94,columnNumber:126},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:94,columnNumber:9},this),o.jsxDEV("button",{className:"file-min","aria-label":V("preview.minimize"),title:V("preview.minimize"),onClick:C,children:o.jsxDEV(ha,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:95,columnNumber:124},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:95,columnNumber:9},this),v&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"preview-pop-backdrop",onClick:()=>m(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:98,columnNumber:13},this),o.jsxDEV("div",{className:"preview-pop",role:"dialog","aria-label":V("preview.ttlDialog"),children:[o.jsxDEV("button",{className:"preview-pop-item",onClick:()=>{m(!1),f==null||f()},children:V("preview.renew")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:100,columnNumber:15},this),o.jsxDEV("button",{className:"preview-pop-item preview-pop-danger",onClick:()=>{m(!1),S==null||S()},children:V("preview.stop")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:101,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:99,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:97,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:77,columnNumber:7},this),y.length>1&&o.jsxDEV("div",{className:"preview-tabs",role:"tablist","aria-label":V("preview.tabs"),children:y.map(Y=>{const ve=l&&Y.name===l.name;return o.jsxDEV("span",{className:`preview-tab ${ve?"active":""}`,children:[o.jsxDEV("button",{className:"preview-tab-btn",role:"tab","aria-selected":ve,title:Y.name,onClick:()=>x==null?void 0:x(Y.name),children:I(Y)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:112,columnNumber:17},this),o.jsxDEV("button",{className:"preview-tab-close","aria-label":V("preview.stop"),title:V("preview.stop"),onClick:()=>h==null?void 0:h(Y.name),children:"×"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:114,columnNumber:17},this)]},Y.name,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:111,columnNumber:15},this)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:107,columnNumber:9},this),o.jsxDEV("div",{className:`file-body preview-body ${G?"pc":""}`,ref:A,children:y.map(Y=>{const ve=l&&Y.name===l.name,he=me=>{ve&&(L.current=me)},Me=zA({name:Y.name,kind:Y.kind},R,Y.path||"/");return o.jsxDEV("div",{className:"preview-pane",style:ve?void 0:{display:"none"},children:ve&&G?o.jsxDEV("div",{className:"preview-scaler",style:se,children:o.jsxDEV("iframe",{ref:he,className:"preview-frame",title:V("preview.iframeTitle"),style:B,src:Me},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:132,columnNumber:19},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:131,columnNumber:17},this):o.jsxDEV("iframe",{ref:he,className:"preview-frame",title:V("preview.iframeTitle"),src:Me},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:135,columnNumber:17},this)},Y.name,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:129,columnNumber:13},this)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:121,columnNumber:7},this),G&&o.jsxDEV("div",{className:"preview-zoom",children:[o.jsxDEV("button",{className:"preview-zoom-btn",onClick:()=>W(-.5),disabled:k<=1,"aria-label":V("preview.zoomOut"),children:"−"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:143,columnNumber:11},this),o.jsxDEV("span",{className:"preview-zoom-val","aria-hidden":"true",children:[Math.round(k*100),"%"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:144,columnNumber:11},this),o.jsxDEV("button",{className:"preview-zoom-btn",onClick:()=>W(.5),disabled:k>=mN,"aria-label":V("preview.zoomIn"),children:"+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:145,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:142,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PreviewSheet.jsx",lineNumber:76,columnNumber:5},this),document.body)}const g3={working:"working",compacting:"working",done:"done",idle:"done",permission:"needs"},Hg={needs:3,done:2,working:1},_3={working:V("inbox.view.working"),done:V("inbox.view.done"),needs:V("inbox.view.needs")};function b3(r,s={},d=0){const _=[];for(const[E,R]of Object.entries(r)){const b=g3[R.kind];if(!b)continue;const a=R.ts||0;b==="done"&&!(a>Math.max(d||0,s[E]||0))||_.push({pane:E,session:R.session,window:R.window,windowName:R.windowName,view:b,msg:R.msg||"",ts:a,agent:R.agent||"claude"})}return _.sort((E,R)=>E.session<R.session?-1:E.session>R.session?1:Hg[R.view]-Hg[E.view]||R.ts-E.ts),_}function y3(r){const s={working:0,done:0,needs:0};for(const d of r)s[d.view]!=null&&(s[d.view]+=1);return s}function x3(r){let s=null,d=0;for(const _ of r){const E=Hg[_.view]||0;E>d&&(d=E,s=_.view)}return s}function fN(r){let s=0;for(const d of Object.values(r))(d.ts||0)>s&&(s=d.ts);return s}function hS(r,s){if(!r)return"";const d=Math.max(0,Math.round((s-r)/1e3));if(d<60)return V("time.secAgo",{n:d});const _=Math.round(d/60);if(_<60)return V("time.minAgo",{n:_});const E=Math.round(_/60);return E<24?V("time.hourAgo",{n:E}):V("time.dayAgo",{n:Math.round(E/24)})}function Ng(r,s,d){const _=r.findIndex(E=>E.id===s);return _<0?null:r[d==="left"?_-1:_+1]??null}const mS="tw_notify",zg=()=>localStorage.getItem(mS)==="1",fS=r=>localStorage.setItem(mS,r?"1":"0");function $l(){return typeof navigator<"u"&&"serviceWorker"in navigator&&typeof window<"u"&&"PushManager"in window&&"Notification"in window}function pS(){var r;return typeof window<"u"&&(((r=window.matchMedia)==null?void 0:r.call(window,"(display-mode: standalone)").matches)||window.navigator.standalone===!0)||!1}const w3=()=>/iP(hone|ad|od)/.test(navigator.userAgent||"");function ko(r={}){return{Authorization:`Bearer ${Lo()??""}`,...r}}function N3(r){const s="=".repeat((4-r.length%4)%4),d=(r+s).replace(/-/g,"+").replace(/_/g,"/"),_=atob(d),E=new Uint8Array(_.length);for(let R=0;R<_.length;R+=1)E[R]=_.charCodeAt(R);return E}async function S3(){if(!$l())throw new Error(V("push.unsupported"));if(w3()&&!pS())throw new Error(V("push.iosAddToHome"));if(await Notification.requestPermission()!=="granted")throw new Error(V("push.permissionDenied"));const s=await navigator.serviceWorker.ready,d=await fetch("/api/push/vapid",{headers:ko(),cache:"no-store"});if(!d.ok)throw new Error(V("push.noVapid"));const{key:_}=await d.json();let E=await s.pushManager.getSubscription();if(E||(E=await s.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:N3(_)})),!(await fetch("/api/push/subscribe",{method:"POST",headers:ko({"Content-Type":"application/json"}),body:JSON.stringify({subscription:E,boundSessions:Eo()})})).ok)throw new Error(V("push.subscribeFailed"));return fS(!0),!0}async function C3(){try{const s=await(await navigator.serviceWorker.ready).pushManager.getSubscription();s&&(await fetch("/api/push/unsubscribe",{method:"POST",headers:ko({"Content-Type":"application/json"}),body:JSON.stringify({endpoint:s.endpoint})}),await s.unsubscribe())}catch{}fS(!1)}async function ju(){if(!(!zg()||!$l()))try{const s=await(await navigator.serviceWorker.ready).pushManager.getSubscription();if(!s)return;await fetch("/api/push/bound",{method:"POST",headers:ko({"Content-Type":"application/json"}),body:JSON.stringify({endpoint:s.endpoint,boundSessions:Eo()})})}catch{}}async function C_(){if(!$l())return null;try{const s=await(await navigator.serviceWorker.ready).pushManager.getSubscription();if(!s)return null;const d=await fetch("/api/push/key",{method:"POST",headers:ko({"Content-Type":"application/json"}),body:JSON.stringify({endpoint:s.endpoint})});return d.ok&&(await d.json()).pushKey||null}catch{return null}}async function E3(r){if($l())try{(await(await navigator.serviceWorker.ready).getNotifications({tag:`pane-${r}`})).forEach(_=>_.close())}catch{}}async function j3(){const r=await C_();if(!r)return[];try{const s=await fetch(`/api/notifications?device=${encodeURIComponent(r)}`,{headers:ko(),cache:"no-store"});return s.ok?(await s.json()).items||[]:[]}catch{return[]}}async function D3(r){const s=await C_();if(!s)return!1;try{const d=await fetch(`/api/notifications/${encodeURIComponent(r)}?device=${encodeURIComponent(s)}`,{method:"DELETE",headers:ko()});return d.ok?(await d.json()).ok===!0:!1}catch{return!1}}function pN(r){const s=Math.max(0,Date.now()-r),d=Math.floor(s/6e4);if(d<1)return V("pushInbox.justNow");if(d<60)return V("pushInbox.minutesAgo").replace("{n}",d);const _=Math.floor(d/60);return _<24?V("pushInbox.hoursAgo").replace("{n}",_):new Date(r).toLocaleDateString()}function k3({open:r,detailId:s,items:d,readIds:_=[],onOpenDetail:E,onCloseDetail:R,onClose:b,onDelete:a,onMarkAllRead:u,unreadCount:g=0}){const x=new Set(_),h=s!=null,f=h?d.find(C=>C.id===s):null,S=d.some(C=>!x.has(C.id));return Wl.createPortal(o.jsxDEV("div",{className:`file-sheet push-inbox-sheet ${r?"open":""}`,"aria-hidden":!r,role:"dialog","aria-label":V("pushInbox.title"),children:[o.jsxDEV("div",{className:"file-tabs push-inbox-head",children:[h?o.jsxDEV("div",{className:"push-inbox-drill-head",children:[o.jsxDEV("button",{className:"push-inbox-back","aria-label":V("pushInbox.back"),title:V("pushInbox.back"),onClick:R,children:"‹"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:33,columnNumber:13},this),o.jsxDEV("span",{className:"push-inbox-head-title",children:V("pushInbox.detailTitle")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:34,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:32,columnNumber:11},this):o.jsxDEV("span",{className:"push-inbox-head-title push-inbox-list-title",children:[V("pushInbox.title"),g>0&&o.jsxDEV("span",{className:"push-inbox-unread-count",children:V("pushInbox.unreadCount").replace("{n}",g)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:39,columnNumber:33},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:37,columnNumber:11},this),!h&&S&&o.jsxDEV("button",{className:"push-inbox-markall",onClick:u,children:V("pushInbox.markAllRead")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:43,columnNumber:11},this),o.jsxDEV("button",{className:"file-min","aria-label":V("common.close"),title:V("common.close"),onClick:b,children:o.jsxDEV(ha,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:45,columnNumber:113},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:45,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:30,columnNumber:7},this),o.jsxDEV("div",{className:"push-inbox-body",children:h?f?o.jsxDEV("div",{className:"push-inbox-detail",children:[o.jsxDEV("div",{className:"push-inbox-detail-title",children:f.title},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:52,columnNumber:15},this),o.jsxDEV("div",{className:"push-inbox-detail-time",children:pN(f.ts)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:53,columnNumber:15},this),o.jsxDEV("div",{className:"push-inbox-detail-text",children:f.body},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:54,columnNumber:15},this),f.url&&o.jsxDEV("a",{className:"fontbtn push-inbox-openurl",href:f.url,children:V("pushInbox.openUrl")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:55,columnNumber:30},this),o.jsxDEV("button",{className:"fontbtn push-inbox-detail-del",onClick:()=>{a(f.id),R()},children:V("pushInbox.delete")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:56,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:51,columnNumber:13},this):o.jsxDEV("p",{className:"push-inbox-empty",children:V("pushInbox.expired")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:59,columnNumber:13},this):d.length===0?o.jsxDEV("p",{className:"push-inbox-empty",children:V("pushInbox.empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:62,columnNumber:11},this):o.jsxDEV("ul",{className:"push-inbox-list",children:d.map(C=>o.jsxDEV("li",{className:`push-inbox-row${x.has(C.id)?"":" push-inbox-unread"}`,children:[o.jsxDEV("button",{className:"push-inbox-main",onClick:()=>E(C.id),children:[o.jsxDEV("div",{className:"push-inbox-row-top",children:[o.jsxDEV("span",{className:"push-inbox-row-title",children:C.title},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:69,columnNumber:21},this),o.jsxDEV("span",{className:"push-inbox-row-time",children:pN(C.ts)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:70,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:68,columnNumber:19},this),o.jsxDEV("div",{className:"push-inbox-row-body",children:C.body},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:72,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:67,columnNumber:17},this),o.jsxDEV("button",{className:"push-inbox-del",onClick:()=>a(C.id),"aria-label":V("pushInbox.delete"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:74,columnNumber:17},this)]},C.id,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:66,columnNumber:15},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:64,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:48,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/InboxPage.jsx",lineNumber:28,columnNumber:5},this),document.body)}const $g="\\s'\"`()\\[\\]<>,;,。、;:!?()【】《》「」“”‘’*…:│",R3=["md","markdown","html","htm","txt","log","sh"],T3=["png","jpg","jpeg","jfif","gif","webp","svg","bmp","ico","avif","apng"],L3=[...R3,...T3].join("|"),vN=new RegExp(`[^${$g}]+\\.(?:${L3})(?=$|[${$g}.])`,"gi");function M3(r){const s=[];if(!r)return s;vN.lastIndex=0;let d;for(;(d=vN.exec(r))!==null;){let _=d.index,E=d[0];const R=/^@+/.exec(E);R&&(_+=R[0].length,E=E.slice(R[0].length)),E&&s.push({start:_,end:_+E.length,path:E})}return s}const vS=r=>typeof r=="string"&&r.startsWith("/");function So(r,s){const d=vS(s)?s:`${r.replace(/\/+$/,"")}/${s}`,_=d.startsWith("/"),E=[];for(const R of d.split("/"))if(!(!R||R===".")){if(R===".."){E.pop();continue}E.push(R)}return(_?"/":"")+E.join("/")}const A3={key:"home",type:"home",name:V("doc.home")},gS=(r,s)=>({...r,type:s.type??r.type,name:s.name??r.name,content:s.content!==void 0?s.content:r.content,mtime:s.mtime!==void 0?s.mtime:r.mtime});function U3(r,s,d){if(r.tabs.some(E=>E.key===s))return{tabs:r.tabs.map(E=>E.key===s?gS(E,d):E),active:s};const _={key:s,type:d.type,name:d.name,content:d.content,mtime:d.mtime,path:s};return{tabs:[...r.tabs,_],active:s}}function O3(r,s,d){return r.tabs.some(_=>_.key===s)?{...r,tabs:r.tabs.map(_=>_.key===s?gS(_,d):_)}:r}function V3(r,s){const d=r.tabs.findIndex(R=>R.key===s);if(d<=0)return r;const _=r.tabs.filter(R=>R.key!==s),E=r.active===s?r.tabs[d-1].key:r.active;return{tabs:_,active:E}}function P3(){const[r,s]=U.useState({tabs:[A3],active:"home"}),d=U.useCallback((b,a)=>s(u=>U3(u,b,a)),[]),_=U.useCallback((b,a)=>s(u=>O3(u,b,a)),[]),E=U.useCallback(b=>s(a=>V3(a,b)),[]),R=U.useCallback(b=>s(a=>({...a,active:b})),[]);return{tabs:r.tabs,active:r.active,openDoc:d,refreshDoc:_,closeTab:E,activate:R}}function gN(r){return String(r||"").replace(/[^A-Za-z0-9._-]+/g,"-").replace(/-{2,}/g,"-").replace(/^[-.]+|-+$/g,"").toLowerCase()}function B3({session:r,windowName:s,windowId:d}){const _=[r,s].map(gN).filter(Boolean);return _.push(gN(d)||"w"),_.join("-")}function I3(r,{settingsOpen:s,setSettingsOpen:d}){var W,X,Y,ve,he,Me;const[_,E]=U.useState([]),[R,b]=U.useState(null),[a,u]=U.useState(!1),[g,x]=U.useState(!1),[h,f]=U.useState(null),[S,C]=U.useState({}),y=U.useCallback(async()=>{try{const me=await $A();E(me.previews||[]),b(me.domain??null),u(!!me.dynamicEnabled)}catch{}},[]);U.useEffect(()=>{y()},[y]);const l=r?B3({session:(W=r.session)==null?void 0:W.name,windowName:(X=r.window)==null?void 0:X.name,windowId:(Y=r.window)==null?void 0:Y.id}):null,v=_.find(me=>me.name===l&&me.expiresAt>Date.now())||null,m=(v==null?void 0:v.expiresAt)??null,p=me=>!!l&&(me===l||me.startsWith(`${l}-`)),N=Date.now(),k=_.filter(me=>me&&me.expiresAt>N&&p(me.name)).map(me=>({name:me.name,kind:me.kind,port:me.port,dir:me.dir,expiresAt:me.expiresAt,path:S[me.name]||"/"})).sort((me,ie)=>me.name===l?-1:ie.name===l?1:(me.port||0)-(ie.port||0)),j=((ve=k.find(me=>me.name===h))==null?void 0:ve.name)??((he=k[0])==null?void 0:he.name)??null,M=k.find(me=>me.name===j)??null,D=(M==null?void 0:M.path)||"/";U.useEffect(()=>{f(null)},[l]);const L=k.length>0;U.useEffect(()=>{L||x(!1)},[L]),U.useEffect(()=>{if(m==null)return;const me=setTimeout(y,Math.max(0,m-Date.now())+500);return()=>clearTimeout(me)},[m,y]);const A=U.useCallback(()=>{f(l),s?(d(!1),requestAnimationFrame(()=>x(!0))):x(!0)},[s,d,l]),F=U.useCallback(async me=>{var ie;if(l)try{await Eu(l,{dir:me}),AM((ie=r==null?void 0:r.window)==null?void 0:ie.id,me),C($=>({...$,[l]:"/"})),await y(),A()}catch{}},[l,(Me=r==null?void 0:r.window)==null?void 0:Me.id,y,A]),O=U.useCallback(async me=>{if(!l)return;await Eu(l,{port:me}),C(Ie=>({...Ie,[l]:"/"})),f(l),await y();let ie=!1;const $=()=>{ie||(ie=!0,window.removeEventListener("popstate",_e),clearTimeout(de),x(!0))},_e=()=>$();window.addEventListener("popstate",_e);const de=setTimeout($,300);d(!1)},[l,y,d]),I=U.useCallback(async({port:me,path:ie})=>{if(!l)return;const $=`${l}-${me}`;await Eu($,{port:me}),C(_e=>({..._e,[$]:ie||"/"})),f($),await y(),x(!0)},[l,y]),G=U.useCallback(me=>f(me),[]),ne=U.useCallback(async me=>{if(me)try{await WA(me),C(ie=>{const $={...ie};return delete $[me],$}),h===me&&f(null),await y()}catch{}},[h,y]),ee=U.useCallback(()=>ne(j),[ne,j]),te=U.useCallback(async()=>{const me=k.find($=>$.name===j);if(!me)return;const ie=me.kind==="dynamic"?{port:me.port}:{dir:me.dir};try{await Eu(me.name,ie),await y()}catch{}},[k,j,y]),se=k.map(me=>me.name).join("|"),B=k.length?Math.min(...k.map(me=>me.expiresAt)):null;return U.useEffect(()=>{if(!g||B==null||!se)return;const me=se.split("|"),ie=Math.max(0,B-Date.now()-6e4),$=setTimeout(async()=>{try{await Promise.all(me.map(_e=>{const de=_.find(Ie=>Ie&&Ie.name===_e);return de?Eu(_e,de.kind==="dynamic"?{port:de.port}:{dir:de.dir}):null})),await y()}catch{}},ie);return()=>clearTimeout($)},[g,B,se,_,y]),{previews:_,previewDomain:R,dynamicEnabled:a,previewSheetOpen:g,setPreviewSheetOpen:x,activePreview:v,curPreviewName:l,tabs:k,activeName:j,shownPreview:M,shownPath:D,refreshPreviews:y,openPreviewSheet:A,startPreview:F,startDynamicPreview:O,startUrlPreview:I,switchTab:G,closeTab:ne,stopPreview:ee,renewPreview:te}}function Wg({fetch:r,apply:s,intervalMs:d,enabled:_=!0,deps:E=[]}){const R=U.useRef(r),b=U.useRef(s);R.current=r,b.current=s,U.useEffect(()=>{if(!_)return;let a=!1,u=null;const g=async()=>{if(!document.hidden)try{const f=await R.current();a||b.current(f)}catch{}},x=()=>{g(),u=setTimeout(x,d)};x();const h=()=>{document.hidden||(clearTimeout(u),x())};return document.addEventListener("visibilitychange",h),()=>{a=!0,clearTimeout(u),document.removeEventListener("visibilitychange",h)}},[_,d,...E])}function F3(r,s){return r instanceof tr?(s==null||s(),!0):!1}function H3({open:r,currentSessionName:s,bound:d,onSelectSession:_,onUnbind:E,onBind:R,onClose:b,onLogout:a,orphans:u=[],onTakeoverRequest:g}){const[x,h]=U.useState(!1);return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:`drawer ${r?"open":""}`,children:[o.jsxDEV("div",{className:"drawer-list",children:[o.jsxDEV("div",{className:"drawer-title",children:"SESSIONS"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:19,columnNumber:11},this),d.length===0&&o.jsxDEV("div",{className:"drawer-empty",children:V("drawer.empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:20,columnNumber:34},this),d.map(f=>o.jsxDEV("div",{className:`drawer-row drawer-session ${f===s?"active":""}`,children:[o.jsxDEV("span",{className:"drawer-name",onClick:()=>_(f),children:f},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:26,columnNumber:15},this),o.jsxDEV("button",{className:"drawer-unbind",onClick:S=>{S.stopPropagation(),E(f)},"aria-label":V("drawer.unbind"),title:V("drawer.unbind"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:27,columnNumber:15},this)]},f,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:22,columnNumber:13},this)),o.jsxDEV("button",{className:"drawer-bind",onClick:R,children:["+ ",V("drawer.bind")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:35,columnNumber:11},this),u.length>0&&o.jsxDEV("div",{className:"drawer-orphans",children:[o.jsxDEV("button",{className:"drawer-orphans-head",onClick:()=>h(f=>!f),children:[o.jsxDEV("span",{children:V("drawer.orphans.title",{n:u.length})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:40,columnNumber:17},this),o.jsxDEV("span",{className:"drawer-orphans-caret","aria-hidden":"true",children:x?"▾":"▸"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:41,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:39,columnNumber:15},this),x&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"drawer-orphans-hint",children:V("drawer.orphans.hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:45,columnNumber:19},this),u.map(f=>{const S=!f.sessionId,C=f.state==="busy"||S;return o.jsxDEV("div",{className:"drawer-orphan-row",children:[o.jsxDEV("div",{className:"drawer-orphan-head",children:[o.jsxDEV("span",{className:"drawer-orphan-cwd",title:f.cwd,children:f.cwdLabel||f.cwd},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:52,columnNumber:27},this),o.jsxDEV("button",{className:"drawer-orphan-btn",disabled:C,title:S?V("inbox.orphans.noSession"):void 0,onClick:()=>g==null?void 0:g(f),children:V("inbox.orphans.takeover")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:53,columnNumber:27},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:51,columnNumber:25},this),o.jsxDEV("div",{className:"drawer-orphan-meta",children:[f.agentLabel&&o.jsxDEV("span",{className:"drawer-orphan-agent",children:f.agentLabel},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:63,columnNumber:44},this),o.jsxDEV("span",{className:`drawer-orphan-state ${f.state==="busy"?"busy":"idle"}`,children:f.state==="busy"?V("inbox.orphans.busy"):V("inbox.orphans.idle")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:64,columnNumber:27},this),o.jsxDEV("span",{className:"drawer-orphan-time",children:hS(f.startedAt||f.lastActivity,Date.now())},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:67,columnNumber:27},this),f.snippet&&o.jsxDEV("span",{className:"drawer-orphan-msg",children:f.snippet},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:68,columnNumber:41},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:62,columnNumber:25},this)]},f.pid,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:50,columnNumber:23},this)})]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:44,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:38,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:18,columnNumber:9},this),o.jsxDEV("button",{className:"drawer-logout",onClick:a,children:V("drawer.logout")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:78,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:17,columnNumber:7},this),r&&o.jsxDEV("div",{className:"drawer-backdrop",onClick:b},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:80,columnNumber:16},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Drawer.jsx",lineNumber:16,columnNumber:5},this)}const z3=500,_N=10;function Nm(r,{onClick:s}={}){const d=U.useRef(null),_=U.useRef(null),E=U.useRef(!1),R=()=>{d.current&&(clearTimeout(d.current),d.current=null)};return{onPointerDown:b=>{E.current=!1,_.current={x:b.clientX,y:b.clientY},R(),d.current=setTimeout(()=>{d.current=null,E.current=!0,r==null||r()},z3)},onPointerMove:b=>{!d.current||!_.current||(Math.abs(b.clientX-_.current.x)>_N||Math.abs(b.clientY-_.current.y)>_N)&&R()},onPointerUp:R,onPointerLeave:R,onPointerCancel:R,onClick:b=>{var a,u;if(E.current){E.current=!1,(a=b.preventDefault)==null||a.call(b),(u=b.stopPropagation)==null||u.call(b);return}s==null||s(b)}}}const Gg=248,qg=158,dm=6,bN=2,$3=52,W3=34,Yh=r=>typeof r=="number"&&Number.isFinite(r);function Yg(r){return Array.isArray(r)&&r.length>0&&r.every(s=>Yh(s.left)&&Yh(s.top)&&Yh(s.width)&&Yh(s.height))}const yN=r=>[...new Set(r)].sort((s,d)=>s-d);function xN(r,s,d){const _=[];for(let u=0;u<r.length-1;u+=1){const g=r[u],x=r[u+1],h=s.some(([f,S])=>f===g&&S===x);_.push(x-g<=1&&!h)}const E=_.filter(u=>!u).length,R=E>0?(d-_.filter(Boolean).length*bN)/E:d,b=[{at:0}];let a=0;for(let u=0;u<_.length;u+=1)a+=_[u]?bN:R,b.push({at:a});return b}function G3(r){if(!Yg(r))return null;const s=Math.max(...r.map(x=>x.left+x.width)),d=Math.max(...r.map(x=>x.top+x.height));if(s<=0||d<=0)return null;const _=yN(r.flatMap(x=>[x.left,x.left+x.width])),E=yN(r.flatMap(x=>[x.top,x.top+x.height])),R=r.map(x=>[x.left,x.left+x.width]),b=r.map(x=>[x.top,x.top+x.height]),a=xN(_,R,Gg-dm*2),u=xN(E,b,qg-dm*2),g=r.map((x,h)=>{const f=a[_.indexOf(x.left)].at,S=a[_.indexOf(x.left+x.width)].at,C=u[E.indexOf(x.top)].at,y=u[E.indexOf(x.top+x.height)].at;return{id:x.id,active:!!x.active,command:x.command,seq:h,left:f,top:C,width:S-f,height:y-C}});return{w:Gg,h:qg,cells:g}}function q3(r){const s=r.width<$3,d=r.height<W3;return s&&d?"tiny":s?"narrow":d?"flat":""}const Sg={terminal:"终端",chat:"对话"};function Y3(){return o.jsxDEV("svg",{width:"15",height:"15",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[o.jsxDEV("path",{d:"M4 8h13M13 4l4 4-4 4"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/LensSwitch.jsx",lineNumber:12,columnNumber:7},this),o.jsxDEV("path",{d:"M20 16H7M11 20l-4-4 4-4"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/LensSwitch.jsx",lineNumber:13,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/LensSwitch.jsx",lineNumber:10,columnNumber:5},this)}function K3({value:r,onChange:s}){const d=r==="chat"?"terminal":"chat";return o.jsxDEV("button",{type:"button",className:"lens-toggle",onClick:()=>s(d),"aria-label":`切换到${Sg[d]}视图`,title:`切换到${Sg[d]}视图`,children:[o.jsxDEV(Y3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/LensSwitch.jsx",lineNumber:28,columnNumber:7},this),o.jsxDEV("span",{className:"lens-toggle-label",children:Sg[r]},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/LensSwitch.jsx",lineNumber:29,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/LensSwitch.jsx",lineNumber:21,columnNumber:5},this)}const wN="①②③④⑤⑥⑦⑧⑨",Au=r=>r<wN.length?wN[r]:String(r+1),X3=(r,s)=>`${Au(s)} ${r.command||r.id}`;function J3({window:r,active:s,agent:d,onSelect:_,onManage:E}){const R=Nm(()=>E(r),{onClick:()=>_(r)});return o.jsxDEV("button",{"data-win":r.id,className:`win-tab ${s?"active":""}`,...R,children:[d&&o.jsxDEV(Do,{agent:d},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:24,columnNumber:17},this),r.name||r.id,r.panes>1&&o.jsxDEV("span",{className:"win-panes",children:r.panes},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:26,columnNumber:25},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:23,columnNumber:5},this)}const Z3=200;function Q3({cell:r,cur:s,releasing:d,picking:_,agent:E,onChoose:R,onManage:b}){const a=q3(r),u=r.command||r.id,g=Nm(()=>b(r.id),{onClick:()=>R(r.id)});return o.jsxDEV("button",{type:"button",role:"option","aria-selected":s,"aria-label":u,className:`pane-map-cell${s?" is-current":""}${d?" is-releasing":""}${a?` is-${a}`:""}${_?" is-picking":""}`,style:{left:`${r.left+dm}px`,top:`${r.top+dm}px`,width:`${r.width}px`,height:`${r.height}px`},...g,children:o.jsxDEV("span",{className:"pmc-surf",children:a==="narrow"||a==="tiny"?o.jsxDEV("span",{className:"pmc-seq","aria-hidden":"true",children:Au(r.seq)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:56,columnNumber:11},this):a==="flat"?o.jsxDEV(o.Fragment,{children:[o.jsxDEV("span",{className:"pmc-seq","aria-hidden":"true",children:Au(r.seq)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:59,columnNumber:13},this),o.jsxDEV("span",{className:"pmc-cmd",children:u},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:60,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:58,columnNumber:11},this):o.jsxDEV(o.Fragment,{children:[o.jsxDEV("span",{className:"pmc-row",children:[o.jsxDEV("span",{className:"pmc-seq","aria-hidden":"true",children:Au(r.seq)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:65,columnNumber:15},this),E&&o.jsxDEV(Do,{agent:E},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:66,columnNumber:25},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:64,columnNumber:13},this),o.jsxDEV("span",{className:"pmc-cmd",children:u},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:68,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:63,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:54,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:45,columnNumber:5},this)}function eU({window:r,panes:s,paneAgents:d={},currentPaneId:_,agent:E,onManage:R,onManagePane:b,onSelectPane:a,paneSheetOpen:u=!1,openMapFor:g=null,onMapOpened:x}){const[h,f]=U.useState(!1),[S,C]=U.useState(null),y=U.useRef(null);U.useEffect(()=>()=>clearTimeout(y.current),[]);const l=F=>{var I;try{(I=navigator.vibrate)==null||I.call(navigator,10)}catch{}if(u&&(b==null||b(F)),typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches){a(F);return}C(F),clearTimeout(y.current),y.current=setTimeout(()=>{C(null),a(F)},Z3)},[v,m]=U.useState(null),p=U.useRef(null),N=Yg(s)?G3(s):null,k=N?N.w:Gg,j=N?N.h:qg,M=()=>{var te;const F=(te=p.current)==null?void 0:te.getBoundingClientRect();if(!F)return;const O=8,I=window.innerWidth,G=window.innerHeight,ne=Math.max(O,Math.min(F.left,I-k-O));let ee=F.bottom+6;if(ee+j+O>G){const se=F.top-6-j;ee=se>=O?se:Math.max(O,G-j-O)}m({top:ee,left:ne})},D=Nm(()=>R(r),{onClick:()=>{h||M(),f(F=>!F)}});U.useEffect(()=>{g&&g===r.id&&(M(),f(!0),x==null||x())},[g,r.id]),U.useEffect(()=>{if(!h)return;const F=I=>{var G;u||(G=p.current)!=null&&G.contains(I.target)||f(!1)},O=()=>M();return document.addEventListener("pointerdown",F,!0),window.addEventListener("scroll",O,!0),window.addEventListener("resize",O),()=>{document.removeEventListener("pointerdown",F,!0),window.removeEventListener("scroll",O,!0),window.removeEventListener("resize",O)}},[h,u]);const L=Math.max(0,s.findIndex(F=>F.id===_)),A=s[L];return o.jsxDEV("div",{className:"wt-dd active","data-win":r.id,ref:p,children:[o.jsxDEV("button",{className:"win-tab active wt-trigger","aria-haspopup":"listbox","aria-expanded":h,...D,children:[E&&o.jsxDEV(Do,{agent:E},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:177,columnNumber:19},this),o.jsxDEV("span",{className:"wt-name",children:r.name||r.id},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:178,columnNumber:9},this),o.jsxDEV("span",{className:"wt-sep","aria-hidden":"true",children:"│"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:179,columnNumber:9},this),o.jsxDEV("span",{className:"wt-pane",children:X3(A,L)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:180,columnNumber:9},this),o.jsxDEV("span",{className:`wt-caret${h?" open":""}`,"aria-hidden":"true",children:"▾"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:181,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:171,columnNumber:7},this),h&&v&&(Yg(s)?o.jsxDEV("div",{className:"pane-map",role:"listbox",style:{top:v.top,left:v.left,width:k,height:j},children:N.cells.map(F=>{const O=F.id===_;return o.jsxDEV(Q3,{cell:F,cur:O,releasing:O&&!!S&&S!==_,picking:S===F.id,agent:d[F.id],onChoose:l,onManage:b},F.id,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:189,columnNumber:17},this)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:185,columnNumber:11},this):o.jsxDEV("div",{className:"dd-menu wt-menu",role:"listbox",style:{top:v.top,left:v.left},children:s.map((F,O)=>o.jsxDEV("button",{type:"button",role:"option","aria-selected":F.id===_,className:`dd-option${F.id===_?" is-selected":""}`,onClick:()=>{a(F.id),f(!1)},children:[o.jsxDEV("span",{className:"dd-option-label",children:[o.jsxDEV("span",{className:"dd-pane-seq","aria-hidden":"true",children:Au(O)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:214,columnNumber:19},this),d[F.id]&&o.jsxDEV(Do,{agent:d[F.id]},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:215,columnNumber:40},this),o.jsxDEV("span",{className:"dd-pane-cmd",children:F.command||F.id},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:216,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:213,columnNumber:17},this),F.id===_&&o.jsxDEV("span",{className:"dd-check","aria-hidden":"true",children:"✓"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:218,columnNumber:44},this)]},F.id,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:205,columnNumber:15},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:203,columnNumber:11},this))]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:170,columnNumber:5},this)}function tU({windows:r,windowAgents:s={},paneAgents:d={},currentAgent:_,currentWindowId:E,panes:R,currentPaneId:b,onSelectWindow:a,onSelectPane:u,onNewWindow:g,onManageWindow:x,onManagePane:h,paneSheetOpen:f=!1,openMapFor:S=null,onMapOpened:C,trackWindowId:y,lens:l="terminal",onLensChange:v=()=>{},chatLensEnabled:m=!1}){const p=U.useRef(null);return U.useLayoutEffect(()=>{var N,k;y&&((k=(N=p.current)==null?void 0:N.querySelector(`[data-win="${y}"]`))==null||k.scrollIntoView({block:"nearest",inline:"nearest"}))},[r,y]),o.jsxDEV("div",{className:"windowbar",children:[o.jsxDEV("div",{className:"windowbar-scroll",ref:p,children:[r.map(N=>{const k=N.id===E;return k&&R.length>1?o.jsxDEV(eU,{window:N,panes:R,paneAgents:d,currentPaneId:b,agent:_,onManage:x,onManagePane:h,onSelectPane:u,paneSheetOpen:f,openMapFor:S,onMapOpened:C},N.id,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:250,columnNumber:15},this):o.jsxDEV(J3,{window:N,active:k,agent:s[N.id],onSelect:a,onManage:x},N.id,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:267,columnNumber:13},this)}),o.jsxDEV("button",{className:"win-tab win-new",onClick:g,"aria-label":V("windowbar.newWindow"),title:V("windowbar.newWindow"),children:"+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:277,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:245,columnNumber:7},this),_&&m&&o.jsxDEV(K3,{value:l,onChange:v},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:280,columnNumber:43},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/WindowBar.jsx",lineNumber:244,columnNumber:5},this)}var _S={exports:{}};(function(r,s){(function(d,_){r.exports=_()})(globalThis,()=>(()=>{var d={4567:function(b,a,u){var g=this&&this.__decorate||function(m,p,N,k){var j,M=arguments.length,D=M<3?p:k===null?k=Object.getOwnPropertyDescriptor(p,N):k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(m,p,N,k);else for(var L=m.length-1;L>=0;L--)(j=m[L])&&(D=(M<3?j(D):M>3?j(p,N,D):j(p,N))||D);return M>3&&D&&Object.defineProperty(p,N,D),D},x=this&&this.__param||function(m,p){return function(N,k){p(N,k,m)}};Object.defineProperty(a,"__esModule",{value:!0}),a.AccessibilityManager=void 0;const h=u(9042),f=u(9924),S=u(844),C=u(4725),y=u(2585),l=u(3656);let v=a.AccessibilityManager=class extends S.Disposable{constructor(m,p,N,k){super(),this._terminal=m,this._coreBrowserService=N,this._renderService=k,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let j=0;j<this._terminal.rows;j++)this._rowElements[j]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[j]);if(this._topBoundaryFocusListener=j=>this._handleBoundaryFocus(j,0),this._bottomBoundaryFocusListener=j=>this._handleBoundaryFocus(j,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new f.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize(j=>this._handleResize(j.rows))),this.register(this._terminal.onRender(j=>this._refreshRows(j.start,j.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(j=>this._handleChar(j))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
|
|
207
207
|
`))),this.register(this._terminal.onA11yTab(j=>this._handleTab(j))),this.register(this._terminal.onKey(j=>this._handleKey(j.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this.register((0,l.addDisposableDomListener)(document,"selectionchange",()=>this._handleSelectionChange())),this.register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRows(),this.register((0,S.toDisposable)(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(m){for(let p=0;p<m;p++)this._handleChar(" ")}_handleChar(m){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==m&&(this._charsToAnnounce+=m):this._charsToAnnounce+=m,m===`
|
|
@@ -327,4 +327,4 @@ ${s}</tr>
|
|
|
327
327
|
Please report this to https://github.com/markedjs/marked.`,s){const E="<p>An error occurred:</p><pre>"+Br(_.message+"",!0)+"</pre>";return d?Promise.resolve(E):E}if(d)return Promise.reject(_);throw _}};const Ro=new jO;function Mn(r,s){return Ro.parse(r,s)}Mn.options=Mn.setOptions=function(r){return Ro.setOptions(r),Mn.defaults=Ro.defaults,VS(Mn.defaults),Mn};Mn.getDefaults=M_;Mn.defaults=Mo;Mn.use=function(...r){return Ro.use(...r),Mn.defaults=Ro.defaults,VS(Mn.defaults),Mn};Mn.walkTokens=function(r,s){return Ro.walkTokens(r,s)};Mn.parseInline=Ro.parseInline;Mn.Parser=Is;Mn.parser=Is.parse;Mn.Renderer=vm;Mn.TextRenderer=B_;Mn.Lexer=Bs;Mn.lexer=Bs.lex;Mn.Tokenizer=fm;Mn.Hooks=Vu;Mn.parse=Mn;Mn.options;Mn.setOptions;Mn.use;Mn.walkTokens;Mn.parseInline;Is.parse;Bs.lex;/*! @license DOMPurify 3.4.8 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.8/LICENSE */function GN(r,s){(s==null||s>r.length)&&(s=r.length);for(var d=0,_=Array(s);d<s;d++)_[d]=r[d];return _}function DO(r){if(Array.isArray(r))return r}function kO(r,s){var d=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(d!=null){var _,E,R,b,a=[],u=!0,g=!1;try{if(R=(d=d.call(r)).next,s!==0)for(;!(u=(_=R.call(d)).done)&&(a.push(_.value),a.length!==s);u=!0);}catch(x){g=!0,E=x}finally{try{if(!u&&d.return!=null&&(b=d.return(),Object(b)!==b))return}finally{if(g)throw E}}return a}}function RO(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
328
328
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TO(r,s){return DO(r)||kO(r,s)||LO(r,s)||RO()}function LO(r,s){if(r){if(typeof r=="string")return GN(r,s);var d={}.toString.call(r).slice(8,-1);return d==="Object"&&r.constructor&&(d=r.constructor.name),d==="Map"||d==="Set"?Array.from(r):d==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(d)?GN(r,s):void 0}}const YS=Object.entries,qN=Object.setPrototypeOf,MO=Object.isFrozen,AO=Object.getPrototypeOf,UO=Object.getOwnPropertyDescriptor;let fr=Object.freeze,ts=Object.seal,Bl=Object.create,KS=typeof Reflect<"u"&&Reflect,c_=KS.apply,u_=KS.construct;fr||(fr=function(s){return s});ts||(ts=function(s){return s});c_||(c_=function(s,d){for(var _=arguments.length,E=new Array(_>2?_-2:0),R=2;R<_;R++)E[R-2]=arguments[R];return s.apply(d,E)});u_||(u_=function(s){for(var d=arguments.length,_=new Array(d>1?d-1:0),E=1;E<d;E++)_[E-1]=arguments[E];return new s(..._)});const No=vi(Array.prototype.forEach),OO=vi(Array.prototype.lastIndexOf),YN=vi(Array.prototype.pop),Al=vi(Array.prototype.push),VO=vi(Array.prototype.splice),mr=Array.isArray,Tu=vi(String.prototype.toLowerCase),kg=vi(String.prototype.toString),KN=vi(String.prototype.match),Ul=vi(String.prototype.replace),XN=vi(String.prototype.indexOf),PO=vi(String.prototype.trim),BO=vi(Number.prototype.toString),IO=vi(Boolean.prototype.toString),JN=typeof BigInt>"u"?null:vi(BigInt.prototype.toString),ZN=typeof Symbol>"u"?null:vi(Symbol.prototype.toString),ai=vi(Object.prototype.hasOwnProperty),ku=vi(Object.prototype.toString),$i=vi(RegExp.prototype.test),Ol=FO(TypeError);function vi(r){return function(s){s instanceof RegExp&&(s.lastIndex=0);for(var d=arguments.length,_=new Array(d>1?d-1:0),E=1;E<d;E++)_[E-1]=arguments[E];return c_(r,s,_)}}function FO(r){return function(){for(var s=arguments.length,d=new Array(s),_=0;_<s;_++)d[_]=arguments[_];return u_(r,d)}}function rn(r,s){let d=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Tu;if(qN&&qN(r,null),!mr(s))return r;let _=s.length;for(;_--;){let E=s[_];if(typeof E=="string"){const R=d(E);R!==E&&(MO(s)||(s[_]=R),E=R)}r[E]=!0}return r}function HO(r){for(let s=0;s<r.length;s++)ai(r,s)||(r[s]=null);return r}function Qi(r){const s=Bl(null);for(const _ of YS(r)){var d=TO(_,2);const E=d[0],R=d[1];ai(r,E)&&(mr(R)?s[E]=HO(R):R&&typeof R=="object"&&R.constructor===Object?s[E]=Qi(R):s[E]=R)}return s}function zO(r){switch(typeof r){case"string":return r;case"number":return BO(r);case"boolean":return IO(r);case"bigint":return JN?JN(r):"0";case"symbol":return ZN?ZN(r):"Symbol()";case"undefined":return ku(r);case"function":case"object":{if(r===null)return ku(r);const s=r,d=Ps(s,"toString");if(typeof d=="function"){const _=d(s);return typeof _=="string"?_:ku(_)}return ku(r)}default:return ku(r)}}function Ps(r,s){for(;r!==null;){const _=UO(r,s);if(_){if(_.get)return vi(_.get);if(typeof _.value=="function")return vi(_.value)}r=AO(r)}function d(){return null}return d}function $O(r){try{return $i(r,""),!0}catch{return!1}}const QN=fr(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Rg=fr(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Tg=fr(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),WO=fr(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Lg=fr(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),GO=fr(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),e1=fr(["#text"]),t1=fr(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Mg=fr(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),n1=fr(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Zh=fr(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),qO=ts(/{{[\w\W]*|^[\w\W]*}}/g),YO=ts(/<%[\w\W]*|^[\w\W]*%>/g),KO=ts(/\${[\w\W]*/g),XO=ts(/^data-[\-\w.\u00B7-\uFFFF]+$/),JO=ts(/^aria-[\-\w]+$/),i1=ts(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ZO=ts(/^(?:\w+script|data):/i),QO=ts(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),e4=ts(/^html$/i),t4=ts(/^[a-z][.\w]*(-[.\w]+)+$/i),Vs={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},n4=function(){return typeof window>"u"?null:window},i4=function(s,d){if(typeof s!="object"||typeof s.createPolicy!="function")return null;let _=null;const E="data-tt-policy-suffix";d&&d.hasAttribute(E)&&(_=d.getAttribute(E));const R="dompurify"+(_?"#"+_:"");try{return s.createPolicy(R,{createHTML(b){return b},createScriptURL(b){return b}})}catch{return console.warn("TrustedTypes policy "+R+" could not be created."),null}},r1=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function XS(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:n4();const s=xe=>XS(xe);if(s.version="3.4.8",s.removed=[],!r||!r.document||r.document.nodeType!==Vs.document||!r.Element)return s.isSupported=!1,s;let d=r.document;const _=d,E=_.currentScript;r.DocumentFragment;const R=r.HTMLTemplateElement,b=r.Node,a=r.Element,u=r.NodeFilter,g=r.NamedNodeMap;g===void 0&&(r.NamedNodeMap||r.MozNamedAttrMap),r.HTMLFormElement;const x=r.DOMParser,h=r.trustedTypes,f=a.prototype,S=Ps(f,"cloneNode"),C=Ps(f,"remove"),y=Ps(f,"nextSibling"),l=Ps(f,"childNodes"),v=Ps(f,"parentNode"),m=Ps(f,"shadowRoot"),p=Ps(f,"attributes"),N=b&&b.prototype?Ps(b.prototype,"nodeType"):null,k=b&&b.prototype?Ps(b.prototype,"nodeName"):null;if(typeof R=="function"){const xe=d.createElement("template");xe.content&&xe.content.ownerDocument&&(d=xe.content.ownerDocument)}let j,M="",D=0;const L=function(Q){if(D>0)throw Ol('The configured TRUSTED_TYPES_POLICY.createHTML must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose createHTML wraps DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.');D++;try{return j.createHTML(Q)}finally{D--}},A=d,F=A.implementation,O=A.createNodeIterator,I=A.createDocumentFragment,G=A.getElementsByTagName,ne=_.importNode;let ee=r1();s.isSupported=typeof YS=="function"&&typeof v=="function"&&F&&F.createHTMLDocument!==void 0;const te=qO,se=YO,B=KO,W=XO,X=JO,Y=ZO,ve=QO,he=t4;let Me=i1,me=null;const ie=rn({},[...QN,...Rg,...Tg,...Lg,...e1]);let $=null;const _e=rn({},[...t1,...Mg,...n1,...Zh]);let de=Object.seal(Bl(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Ie=null,Ue=null;const tt=Object.seal(Bl(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Qe=!0,st=!0,Nt=!1,J=!0,bt=!1,Gt=!0,Ee=!1,Te=!1,Ge=!1,re=!1,We=!1,Ye=!1,ge=!0,Ze=!1;const je="user-content-";let Pe=!0,be=!1,Ae={},He=null;const wt=rn({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);let kt=null;const Ot=rn({},["audio","video","img","source","image","track"]);let Pt=null;const dn=rn({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Qt="http://www.w3.org/1998/Math/MathML",Mt="http://www.w3.org/2000/svg",Ft="http://www.w3.org/1999/xhtml";let sn=Ft,Dn=!1,it=null;const cn=rn({},[Qt,Mt,Ft],kg);let zn=rn({},["mi","mo","mn","ms","mtext"]),$n=rn({},["annotation-xml"]);const en=rn({},["title","style","font","a","script"]);let kn=null;const On=["application/xhtml+xml","text/html"],ni="text/html";let nn=null,En=null;const vn=d.createElement("form"),Xn=function(Q){return Q instanceof RegExp||Q instanceof Function},oe=function(){let Q=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(En&&En===Q)return;(!Q||typeof Q!="object")&&(Q={}),Q=Qi(Q),kn=On.indexOf(Q.PARSER_MEDIA_TYPE)===-1?ni:Q.PARSER_MEDIA_TYPE,nn=kn==="application/xhtml+xml"?kg:Tu,me=ai(Q,"ALLOWED_TAGS")&&mr(Q.ALLOWED_TAGS)?rn({},Q.ALLOWED_TAGS,nn):ie,$=ai(Q,"ALLOWED_ATTR")&&mr(Q.ALLOWED_ATTR)?rn({},Q.ALLOWED_ATTR,nn):_e,it=ai(Q,"ALLOWED_NAMESPACES")&&mr(Q.ALLOWED_NAMESPACES)?rn({},Q.ALLOWED_NAMESPACES,kg):cn,Pt=ai(Q,"ADD_URI_SAFE_ATTR")&&mr(Q.ADD_URI_SAFE_ATTR)?rn(Qi(dn),Q.ADD_URI_SAFE_ATTR,nn):dn,kt=ai(Q,"ADD_DATA_URI_TAGS")&&mr(Q.ADD_DATA_URI_TAGS)?rn(Qi(Ot),Q.ADD_DATA_URI_TAGS,nn):Ot,He=ai(Q,"FORBID_CONTENTS")&&mr(Q.FORBID_CONTENTS)?rn({},Q.FORBID_CONTENTS,nn):wt,Ie=ai(Q,"FORBID_TAGS")&&mr(Q.FORBID_TAGS)?rn({},Q.FORBID_TAGS,nn):Qi({}),Ue=ai(Q,"FORBID_ATTR")&&mr(Q.FORBID_ATTR)?rn({},Q.FORBID_ATTR,nn):Qi({}),Ae=ai(Q,"USE_PROFILES")?Q.USE_PROFILES&&typeof Q.USE_PROFILES=="object"?Qi(Q.USE_PROFILES):Q.USE_PROFILES:!1,Qe=Q.ALLOW_ARIA_ATTR!==!1,st=Q.ALLOW_DATA_ATTR!==!1,Nt=Q.ALLOW_UNKNOWN_PROTOCOLS||!1,J=Q.ALLOW_SELF_CLOSE_IN_ATTR!==!1,bt=Q.SAFE_FOR_TEMPLATES||!1,Gt=Q.SAFE_FOR_XML!==!1,Ee=Q.WHOLE_DOCUMENT||!1,re=Q.RETURN_DOM||!1,We=Q.RETURN_DOM_FRAGMENT||!1,Ye=Q.RETURN_TRUSTED_TYPE||!1,Ge=Q.FORCE_BODY||!1,ge=Q.SANITIZE_DOM!==!1,Ze=Q.SANITIZE_NAMED_PROPS||!1,Pe=Q.KEEP_CONTENT!==!1,be=Q.IN_PLACE||!1,Me=$O(Q.ALLOWED_URI_REGEXP)?Q.ALLOWED_URI_REGEXP:i1,sn=typeof Q.NAMESPACE=="string"?Q.NAMESPACE:Ft,zn=ai(Q,"MATHML_TEXT_INTEGRATION_POINTS")&&Q.MATHML_TEXT_INTEGRATION_POINTS&&typeof Q.MATHML_TEXT_INTEGRATION_POINTS=="object"?Qi(Q.MATHML_TEXT_INTEGRATION_POINTS):rn({},["mi","mo","mn","ms","mtext"]),$n=ai(Q,"HTML_INTEGRATION_POINTS")&&Q.HTML_INTEGRATION_POINTS&&typeof Q.HTML_INTEGRATION_POINTS=="object"?Qi(Q.HTML_INTEGRATION_POINTS):rn({},["annotation-xml"]);const Ce=ai(Q,"CUSTOM_ELEMENT_HANDLING")&&Q.CUSTOM_ELEMENT_HANDLING&&typeof Q.CUSTOM_ELEMENT_HANDLING=="object"?Qi(Q.CUSTOM_ELEMENT_HANDLING):Bl(null);if(de=Bl(null),ai(Ce,"tagNameCheck")&&Xn(Ce.tagNameCheck)&&(de.tagNameCheck=Ce.tagNameCheck),ai(Ce,"attributeNameCheck")&&Xn(Ce.attributeNameCheck)&&(de.attributeNameCheck=Ce.attributeNameCheck),ai(Ce,"allowCustomizedBuiltInElements")&&typeof Ce.allowCustomizedBuiltInElements=="boolean"&&(de.allowCustomizedBuiltInElements=Ce.allowCustomizedBuiltInElements),bt&&(st=!1),We&&(re=!0),Ae&&(me=rn({},e1),$=Bl(null),Ae.html===!0&&(rn(me,QN),rn($,t1)),Ae.svg===!0&&(rn(me,Rg),rn($,Mg),rn($,Zh)),Ae.svgFilters===!0&&(rn(me,Tg),rn($,Mg),rn($,Zh)),Ae.mathMl===!0&&(rn(me,Lg),rn($,n1),rn($,Zh))),tt.tagCheck=null,tt.attributeCheck=null,ai(Q,"ADD_TAGS")&&(typeof Q.ADD_TAGS=="function"?tt.tagCheck=Q.ADD_TAGS:mr(Q.ADD_TAGS)&&(me===ie&&(me=Qi(me)),rn(me,Q.ADD_TAGS,nn))),ai(Q,"ADD_ATTR")&&(typeof Q.ADD_ATTR=="function"?tt.attributeCheck=Q.ADD_ATTR:mr(Q.ADD_ATTR)&&($===_e&&($=Qi($)),rn($,Q.ADD_ATTR,nn))),ai(Q,"ADD_URI_SAFE_ATTR")&&mr(Q.ADD_URI_SAFE_ATTR)&&rn(Pt,Q.ADD_URI_SAFE_ATTR,nn),ai(Q,"FORBID_CONTENTS")&&mr(Q.FORBID_CONTENTS)&&(He===wt&&(He=Qi(He)),rn(He,Q.FORBID_CONTENTS,nn)),ai(Q,"ADD_FORBID_CONTENTS")&&mr(Q.ADD_FORBID_CONTENTS)&&(He===wt&&(He=Qi(He)),rn(He,Q.ADD_FORBID_CONTENTS,nn)),Pe&&(me["#text"]=!0),Ee&&rn(me,["html","head","body"]),me.table&&(rn(me,["tbody"]),delete Ie.tbody),Q.TRUSTED_TYPES_POLICY){if(typeof Q.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ol('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof Q.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ol('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const Je=j;j=Q.TRUSTED_TYPES_POLICY;try{M=L("")}catch(Vt){throw j=Je,Vt}}else j===void 0&&Q.TRUSTED_TYPES_POLICY!==null&&(j=i4(h,E)),j&&typeof M=="string"&&(M=L(""));(ee.uponSanitizeElement.length>0||ee.uponSanitizeAttribute.length>0)&&me===ie&&(me=Qi(me)),ee.uponSanitizeAttribute.length>0&&$===_e&&($=Qi($)),fr&&fr(Q),En=Q},$e=rn({},[...Rg,...Tg,...WO]),et=rn({},[...Lg,...GO]),yt=function(Q){let Ce=v(Q);(!Ce||!Ce.tagName)&&(Ce={namespaceURI:sn,tagName:"template"});const Je=Tu(Q.tagName),Vt=Tu(Ce.tagName);return it[Q.namespaceURI]?Q.namespaceURI===Mt?Ce.namespaceURI===Ft?Je==="svg":Ce.namespaceURI===Qt?Je==="svg"&&(Vt==="annotation-xml"||zn[Vt]):!!$e[Je]:Q.namespaceURI===Qt?Ce.namespaceURI===Ft?Je==="math":Ce.namespaceURI===Mt?Je==="math"&&$n[Vt]:!!et[Je]:Q.namespaceURI===Ft?Ce.namespaceURI===Mt&&!$n[Vt]||Ce.namespaceURI===Qt&&!zn[Vt]?!1:!et[Je]&&(en[Je]||!$e[Je]):!!(kn==="application/xhtml+xml"&&it[Q.namespaceURI]):!1},gt=function(Q){Al(s.removed,{element:Q});try{v(Q).removeChild(Q)}catch{C(Q)}},ft=function(Q,Ce){try{Al(s.removed,{attribute:Ce.getAttributeNode(Q),from:Ce})}catch{Al(s.removed,{attribute:null,from:Ce})}if(Ce.removeAttribute(Q),Q==="is")if(re||We)try{gt(Ce)}catch{}else try{Ce.setAttribute(Q,"")}catch{}},Rt=function(Q){let Ce=null,Je=null;if(Ge)Q="<remove></remove>"+Q;else{const St=KN(Q,/^[\r\n\t ]+/);Je=St&&St[0]}kn==="application/xhtml+xml"&&sn===Ft&&(Q='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Q+"</body></html>");const Vt=j?L(Q):Q;if(sn===Ft)try{Ce=new x().parseFromString(Vt,kn)}catch{}if(!Ce||!Ce.documentElement){Ce=F.createDocument(sn,"template",null);try{Ce.documentElement.innerHTML=Dn?M:Vt}catch{}}const _t=Ce.body||Ce.documentElement;return Q&&Je&&_t.insertBefore(d.createTextNode(Je),_t.childNodes[0]||null),sn===Ft?G.call(Ce,Ee?"html":"body")[0]:Ee?Ce.documentElement:_t},pt=function(Q){return O.call(Q.ownerDocument||Q,Q,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},gn=function(Q){var Ce,Je;Q.normalize();const Vt=O.call(Q.ownerDocument||Q,Q,u.SHOW_TEXT|u.SHOW_COMMENT|u.SHOW_CDATA_SECTION|u.SHOW_PROCESSING_INSTRUCTION,null);let _t=Vt.nextNode();for(;_t;){let Jt=_t.data;No([te,se,B],yn=>{Jt=Ul(Jt,yn," ")}),_t.data=Jt,_t=Vt.nextNode()}const St=(Ce=(Je=Q.querySelectorAll)===null||Je===void 0?void 0:Je.call(Q,"template"))!==null&&Ce!==void 0?Ce:[];No(Array.from(St),Jt=>{qt(Jt.content)&&gn(Jt.content)})},an=function(Q){const Ce=k?k(Q):null;return typeof Ce!="string"||nn(Ce)!=="form"?!1:typeof Q.nodeName!="string"||typeof Q.textContent!="string"||typeof Q.removeChild!="function"||Q.attributes!==p(Q)||typeof Q.removeAttribute!="function"||typeof Q.setAttribute!="function"||typeof Q.namespaceURI!="string"||typeof Q.insertBefore!="function"||typeof Q.hasChildNodes!="function"||Q.nodeType!==N(Q)||Q.childNodes!==l(Q)},qt=function(Q){if(!N||typeof Q!="object"||Q===null)return!1;try{return N(Q)===Vs.documentFragment}catch{return!1}},bn=function(Q){if(!N||typeof Q!="object"||Q===null)return!1;try{return typeof N(Q)=="number"}catch{return!1}};function Nn(xe,Q,Ce){No(xe,Je=>{Je.call(s,Q,Ce,En)})}const ui=function(Q){let Ce=null;if(Nn(ee.beforeSanitizeElements,Q,null),an(Q))return gt(Q),!0;const Je=nn(k?k(Q):Q.nodeName);if(Nn(ee.uponSanitizeElement,Q,{tagName:Je,allowedTags:me}),Gt&&Q.hasChildNodes()&&!bn(Q.firstElementChild)&&$i(/<[/\w!]/g,Q.innerHTML)&&$i(/<[/\w!]/g,Q.textContent)||Gt&&Q.namespaceURI===Ft&&Je==="style"&&bn(Q.firstElementChild)||Q.nodeType===Vs.progressingInstruction||Gt&&Q.nodeType===Vs.comment&&$i(/<[/\w]/g,Q.data))return gt(Q),!0;if(Ie[Je]||!(tt.tagCheck instanceof Function&&tt.tagCheck(Je))&&!me[Je]){if(!Ie[Je]&&ii(Je)&&(de.tagNameCheck instanceof RegExp&&$i(de.tagNameCheck,Je)||de.tagNameCheck instanceof Function&&de.tagNameCheck(Je)))return!1;if(Pe&&!He[Je]){const _t=v(Q),St=l(Q);if(St&&_t){const Jt=St.length;for(let yn=Jt-1;yn>=0;--yn){const hn=S(St[yn],!0);_t.insertBefore(hn,y(Q))}}}return gt(Q),!0}return(N?N(Q):Q.nodeType)===Vs.element&&!yt(Q)||(Je==="noscript"||Je==="noembed"||Je==="noframes")&&$i(/<\/no(script|embed|frames)/i,Q.innerHTML)?(gt(Q),!0):(bt&&Q.nodeType===Vs.text&&(Ce=Q.textContent,No([te,se,B],_t=>{Ce=Ul(Ce,_t," ")}),Q.textContent!==Ce&&(Al(s.removed,{element:Q.cloneNode()}),Q.textContent=Ce)),Nn(ee.afterSanitizeElements,Q,null),!1)},Vn=function(Q,Ce,Je){if(Ue[Ce]||ge&&(Ce==="id"||Ce==="name")&&(Je in d||Je in vn))return!1;const Vt=$[Ce]||tt.attributeCheck instanceof Function&&tt.attributeCheck(Ce,Q);if(!(st&&!Ue[Ce]&&$i(W,Ce))){if(!(Qe&&$i(X,Ce))){if(!Vt||Ue[Ce]){if(!(ii(Q)&&(de.tagNameCheck instanceof RegExp&&$i(de.tagNameCheck,Q)||de.tagNameCheck instanceof Function&&de.tagNameCheck(Q))&&(de.attributeNameCheck instanceof RegExp&&$i(de.attributeNameCheck,Ce)||de.attributeNameCheck instanceof Function&&de.attributeNameCheck(Ce,Q))||Ce==="is"&&de.allowCustomizedBuiltInElements&&(de.tagNameCheck instanceof RegExp&&$i(de.tagNameCheck,Je)||de.tagNameCheck instanceof Function&&de.tagNameCheck(Je))))return!1}else if(!Pt[Ce]){if(!$i(Me,Ul(Je,ve,""))){if(!((Ce==="src"||Ce==="xlink:href"||Ce==="href")&&Q!=="script"&&XN(Je,"data:")===0&&kt[Q])){if(!(Nt&&!$i(Y,Ul(Je,ve,"")))){if(Je)return!1}}}}}}return!0},Jn=rn({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ii=function(Q){return!Jn[Tu(Q)]&&$i(he,Q)},Dt=function(Q){Nn(ee.beforeSanitizeAttributes,Q,null);const Ce=Q.attributes;if(!Ce||an(Q))return;const Je={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:$,forceKeepAttr:void 0};let Vt=Ce.length;for(;Vt--;){const _t=Ce[Vt],St=_t.name,Jt=_t.namespaceURI,yn=_t.value,hn=nn(St),An=yn;let Yt=St==="value"?An:PO(An);if(Je.attrName=hn,Je.attrValue=Yt,Je.keepAttr=!0,Je.forceKeepAttr=void 0,Nn(ee.uponSanitizeAttribute,Q,Je),Yt=Je.attrValue,Ze&&(hn==="id"||hn==="name")&&XN(Yt,je)!==0&&(ft(St,Q),Yt=je+Yt),Gt&&$i(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Yt)){ft(St,Q);continue}if(hn==="attributename"&&KN(Yt,"href")){ft(St,Q);continue}if(Je.forceKeepAttr)continue;if(!Je.keepAttr){ft(St,Q);continue}if(!J&&$i(/\/>/i,Yt)){ft(St,Q);continue}bt&&No([te,se,B],Zn=>{Yt=Ul(Yt,Zn," ")});const Wn=nn(Q.nodeName);if(!Vn(Wn,hn,Yt)){ft(St,Q);continue}if(j&&typeof h=="object"&&typeof h.getAttributeType=="function"&&!Jt)switch(h.getAttributeType(Wn,hn)){case"TrustedHTML":{Yt=L(Yt);break}case"TrustedScriptURL":{Yt=j.createScriptURL(Yt);break}}if(Yt!==An)try{Jt?Q.setAttributeNS(Jt,St,Yt):Q.setAttribute(St,Yt),an(Q)?gt(Q):YN(s.removed)}catch{ft(St,Q)}}Nn(ee.afterSanitizeAttributes,Q,null)},ae=function(Q){let Ce=null;const Je=pt(Q);for(Nn(ee.beforeSanitizeShadowDOM,Q,null);Ce=Je.nextNode();)if(Nn(ee.uponSanitizeShadowNode,Ce,null),ui(Ce),Dt(Ce),qt(Ce.content)&&ae(Ce.content),(N?N(Ce):Ce.nodeType)===Vs.element){const _t=m?m(Ce):Ce.shadowRoot;qt(_t)&&(Be(_t),ae(_t))}Nn(ee.afterSanitizeShadowDOM,Q,null)},Be=function(Q){const Ce=N?N(Q):Q.nodeType;if(Ce===Vs.element){const _t=m?m(Q):Q.shadowRoot;qt(_t)&&(Be(_t),ae(_t))}const Je=l?l(Q):Q.childNodes;if(!Je)return;const Vt=[];No(Je,_t=>{Al(Vt,_t)});for(const _t of Vt)Be(_t);if(Ce===Vs.element){const _t=k?k(Q):null;if(typeof _t=="string"&&nn(_t)==="template"){const St=Q.content;qt(St)&&Be(St)}}};return s.sanitize=function(xe){let Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Ce=null,Je=null,Vt=null,_t=null;if(Dn=!xe,Dn&&(xe="<!-->"),typeof xe!="string"&&!bn(xe)&&(xe=zO(xe),typeof xe!="string"))throw Ol("dirty is not a string, aborting");if(!s.isSupported)return xe;if(Te||oe(Q),s.removed=[],typeof xe=="string"&&(be=!1),be){const yn=k?k(xe):xe.nodeName;if(typeof yn=="string"){const hn=nn(yn);if(!me[hn]||Ie[hn])throw Ol("root node is forbidden and cannot be sanitized in-place")}if(an(xe))throw Ol("root node is clobbered and cannot be sanitized in-place");Be(xe)}else if(bn(xe))Ce=Rt("<!---->"),Je=Ce.ownerDocument.importNode(xe,!0),Je.nodeType===Vs.element&&Je.nodeName==="BODY"||Je.nodeName==="HTML"?Ce=Je:Ce.appendChild(Je),Be(Je);else{if(!re&&!bt&&!Ee&&xe.indexOf("<")===-1)return j&&Ye?L(xe):xe;if(Ce=Rt(xe),!Ce)return re?null:Ye?M:""}Ce&&Ge&>(Ce.firstChild);const St=pt(be?xe:Ce);for(;Vt=St.nextNode();)ui(Vt),Dt(Vt),qt(Vt.content)&&ae(Vt.content);if(be)return bt&&gn(xe),xe;if(re){if(bt&&gn(Ce),We)for(_t=I.call(Ce.ownerDocument);Ce.firstChild;)_t.appendChild(Ce.firstChild);else _t=Ce;return($.shadowroot||$.shadowrootmode)&&(_t=ne.call(_,_t,!0)),_t}let Jt=Ee?Ce.outerHTML:Ce.innerHTML;return Ee&&me["!doctype"]&&Ce.ownerDocument&&Ce.ownerDocument.doctype&&Ce.ownerDocument.doctype.name&&$i(e4,Ce.ownerDocument.doctype.name)&&(Jt="<!DOCTYPE "+Ce.ownerDocument.doctype.name+`>
|
|
329
329
|
`+Jt),bt&&No([te,se,B],yn=>{Jt=Ul(Jt,yn," ")}),j&&Ye?L(Jt):Jt},s.setConfig=function(){let xe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};oe(xe),Te=!0},s.clearConfig=function(){En=null,Te=!1},s.isValidAttribute=function(xe,Q,Ce){En||oe({});const Je=nn(xe),Vt=nn(Q);return Vn(Je,Vt,Ce)},s.addHook=function(xe,Q){typeof Q=="function"&&Al(ee[xe],Q)},s.removeHook=function(xe,Q){if(Q!==void 0){const Ce=OO(ee[xe],Q);return Ce===-1?void 0:VO(ee[xe],Ce,1)[0]}return YN(ee[xe])},s.removeHooks=function(xe){ee[xe]=[]},s.removeAllHooks=function(){ee=r1()},s}var JS=XS();function s1(r,s){const d=new Map(r.map(_=>[_.k,_]));for(const _ of s)d.set(_.k,_);return Array.from(d.values()).sort((_,E)=>_.k-E.k)}function r4(r,s){const[d,_]=U.useState([]),[E,R]=U.useState(!1),[b,a]=U.useState(!1),[u,g]=U.useState(null),[x,h]=U.useState(!1),f=U.useRef(""),S=U.useRef(null),C=U.useRef(!1),y=U.useRef(!1),l=U.useRef(null);U.useEffect(()=>{f.current="",S.current=null,C.current=!1,y.current=!1,l.current=null,_([]),R(!1),a(!1),g(null),h(!1)},[r]);const v=U.useCallback(()=>iN(r,{since:f.current,limit:20}),[r]),m=U.useCallback(N=>{if(!N)return;h(!0),f.current=N.hash||"";const k=Array.isArray(N.messages)?N.messages:[];N.session&&l.current&&N.session!==l.current?(_(k),S.current=N.firstSeq??null,R(!!N.hasMore),C.current=!0):(_(j=>s1(j,k)),!C.current&&!y.current&&(C.current=!0,S.current=N.firstSeq??null,R(!!N.hasMore))),N.session&&(l.current=N.session,g(N.session))},[]);Wg({fetch:v,apply:m,intervalMs:1500,enabled:!!r,deps:[r]});const p=U.useCallback(async()=>{if(!(y.current||!E||S.current==null)){y.current=!0,a(!0);try{const N=await iN(r,{before:S.current,limit:10});if(!N)return;const k=Array.isArray(N.messages)?N.messages:[];_(j=>s1(j,k)),S.current=N.firstSeq??S.current,R(!!N.hasMore)}finally{y.current=!1,a(!1)}}},[r,E]);return{messages:d,hasMoreOlder:E,loadOlder:p,loadingOlder:b,session:u,loaded:x}}const s4=1200,a4=450;function o4(r,s){const[d,_]=U.useState(null),E=U.useRef(!0),R=U.useCallback(async()=>{if(!r||!s){_(null);return}try{const a=await _A(r);E.current&&_(a)}catch{}},[r,s]),b=U.useCallback(()=>{setTimeout(()=>{R()},a4)},[R]);return U.useEffect(()=>{if(E.current=!0,!s)return _(null),()=>{E.current=!1};R();const a=setInterval(R,s4);return()=>{E.current=!1,clearInterval(a)}},[r,s,R]),{prompt:d,refetch:b}}function l4(){return{prompt:"需要你确认",options:[{label:"允许",keys:["Enter"]},{label:"拒绝",keys:["Escape"]}]}}function c4({pane:r,prompt:s,onAuthFail:d,onAct:_}){var h;const E=s.cursor??((h=s.options[0])==null?void 0:h.n)??null,[R,b]=U.useState(E),a=`${s.title}|${s.options.map(f=>`${f.n}:${f.label}`).join(",")}`;U.useEffect(()=>{var f;b(s.cursor??((f=s.options[0])==null?void 0:f.n)??null)},[a]);const u=async f=>{try{await f(),_==null||_()}catch(S){S instanceof tr&&(d==null||d())}},g=f=>u(()=>Co(r,String(f),!1)),x=()=>u(()=>Pu(r,["Escape"]));if(s.submit){const f=(s.options.find(C=>/submit/i.test(C.label))||s.options[0]).n,S=s.options.find(C=>/cancel/i.test(C.label));return o.jsxDEV("div",{className:"chat-gate",children:[o.jsxDEV("div",{className:"chat-gate-prompt",children:"复核并提交你的回答?"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:36,columnNumber:9},this),o.jsxDEV("div",{className:"chat-gate-actions",children:[o.jsxDEV("button",{type:"button",className:"chat-gate-btn primary",onClick:()=>g(f),children:"提交"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:38,columnNumber:11},this),o.jsxDEV("button",{type:"button",className:"chat-gate-btn",onClick:()=>S?g(S.n):x(),children:"取消"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:39,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:37,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:35,columnNumber:7},this)}return o.jsxDEV("div",{className:"chat-gate",children:[s.leadIn&&o.jsxDEV("div",{className:"chat-gate-leadin",children:s.leadIn},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:47,columnNumber:25},this),s.multi&&o.jsxDEV("div",{className:"chat-gate-step",children:["第 ",s.step,"/",s.total," 题"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:48,columnNumber:24},this),o.jsxDEV("div",{className:"chat-gate-prompt",children:s.title},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:49,columnNumber:7},this),o.jsxDEV("div",{className:"chat-gate-options",role:"radiogroup",children:s.options.map(f=>o.jsxDEV("button",{type:"button",role:"radio","aria-checked":R===f.n,className:`chat-gate-opt${R===f.n?" on":""}`,onClick:()=>b(f.n),children:[o.jsxDEV("span",{className:"chat-gate-opt-label",children:f.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:54,columnNumber:13},this),f.description&&o.jsxDEV("span",{className:"chat-gate-opt-desc",children:f.description},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:55,columnNumber:31},this)]},f.n,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:52,columnNumber:11},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:50,columnNumber:7},this),o.jsxDEV("div",{className:"chat-gate-actions",children:[o.jsxDEV("button",{type:"button",className:"chat-gate-btn primary",disabled:R==null,onClick:()=>g(R),children:"确认"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:60,columnNumber:9},this),o.jsxDEV("button",{type:"button",className:"chat-gate-btn",onClick:x,children:"取消"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:61,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:59,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PromptGate.jsx",lineNumber:46,columnNumber:5},this)}function u4(r){const s=r.name||"工具",d=r.input||{};return s==="Bash"?`运行 ${d.command||""}`.trim():s==="Edit"||s==="MultiEdit"||s==="Write"?`${s==="Write"?"写入":"编辑"} ${d.file_path||""}`.trim():s==="Read"?`读取 ${d.file_path||d.notebook_path||""}`.trim():s==="NotebookEdit"?`编辑 ${d.notebook_path||""}`.trim():s==="Grep"?`搜索 ${d.pattern||""}`.trim():s==="Glob"?`查找文件 ${d.pattern||""}`.trim():s==="WebSearch"?`联网搜索 ${d.query||""}`.trim():s==="WebFetch"?`读取网页 ${d.url||""}`.trim():s==="TodoWrite"?"更新待办":s==="Skill"?`激活技能 ${d.command||d.skill||""}`.trim():s==="Task"||s==="Agent"?`调用 Agent${d.subagent_type?`(${d.subagent_type})`:""}: ${d.description||""}`.trim():`调用工具 ${s}`}function ZS(r){return r==="Bash"?o.jsxDEV(o3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:46,columnNumber:31},this):r==="Edit"||r==="MultiEdit"||r==="Write"||r==="NotebookEdit"?o.jsxDEV(cS,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:47,columnNumber:102},this):r==="Read"?o.jsxDEV(iS,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:48,columnNumber:31},this):r==="Grep"||r==="Glob"?o.jsxDEV(u3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:49,columnNumber:50},this):r==="WebSearch"||r==="WebFetch"?o.jsxDEV(d3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:50,columnNumber:59},this):r==="TodoWrite"?o.jsxDEV(h3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:51,columnNumber:36},this):r==="Skill"?o.jsxDEV(m3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:52,columnNumber:32},this):r==="Task"||r==="Agent"?o.jsxDEV(f3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:53,columnNumber:51},this):o.jsxDEV(p3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:54,columnNumber:10},this)}function d_(){return o.jsxDEV("span",{className:"chat-typing-dots",children:[o.jsxDEV("span",{className:"chat-typing-dot"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:61,columnNumber:7},this),o.jsxDEV("span",{className:"chat-typing-dot"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:62,columnNumber:7},this),o.jsxDEV("span",{className:"chat-typing-dot"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:63,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:60,columnNumber:5},this)}function QS({diff:r}){return!r||!r.added&&!r.removed?null:o.jsxDEV("span",{className:"chat-tool-stat","aria-label":`增 ${r.added} 行,删 ${r.removed} 行`,children:[r.added>0&&o.jsxDEV("span",{className:"cts-add",children:["+",r.added]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:74,columnNumber:26},this),r.removed>0&&o.jsxDEV("span",{className:"cts-del",children:["−",r.removed]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:75,columnNumber:28},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:73,columnNumber:5},this)}function d4({tool:r}){return r.diff&&r.diff.hunks&&r.diff.hunks.length?o.jsxDEV("div",{className:"chat-diff",children:r.diff.hunks.map((s,d)=>o.jsxDEV("div",{className:"chat-diff-hunk",children:s.lines.map((_,E)=>{const R=_[0]==="+"?"add":_[0]==="-"?"del":"ctx";return o.jsxDEV("div",{className:"chat-diff-line cd-"+R,children:_||" "},E,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:90,columnNumber:22},this)})},d,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:87,columnNumber:11},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:85,columnNumber:7},this):r.result!=null?o.jsxDEV("pre",{className:"chat-tool-body",children:r.result},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:97,columnNumber:35},this):null}function h4({tool:r}){if(r.isError)return o.jsxDEV("span",{className:"chat-tool-status err","aria-label":"失败",children:o.jsxDEV(ca,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:105,columnNumber:83},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:105,columnNumber:28},this);const s=r.diff&&(r.diff.added||r.diff.removed);return r.result!=null&&!s?o.jsxDEV("span",{className:"chat-tool-status ok","aria-label":"成功",children:o.jsxDEV(S_,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:107,columnNumber:105},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:107,columnNumber:51},this):null}function m4({tool:r,running:s,onOpen:d}){return o.jsxDEV("div",{className:"chat-tool"+(r.isError?" chat-tool-err":"")+(s?" chat-tool-running":""),children:o.jsxDEV("button",{type:"button",className:"chat-tool-head",onClick:d,children:[o.jsxDEV("span",{className:"chat-tool-ic",children:ZS(r.name)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:117,columnNumber:9},this),o.jsxDEV("span",{className:"chat-tool-head-text",children:u4(r)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:118,columnNumber:9},this),o.jsxDEV(QS,{diff:r.diff},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:119,columnNumber:9},this),s?o.jsxDEV("span",{className:"chat-tool-head-running",children:o.jsxDEV(d_,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:121,columnNumber:61},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:121,columnNumber:20},this):o.jsxDEV(h4,{tool:r},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:121,columnNumber:85},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:116,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:115,columnNumber:5},this)}function eC(r){return{Bash:"运行命令",Edit:"编辑文件",MultiEdit:"编辑文件",Write:"写入文件",Read:"读取文件",NotebookEdit:"编辑笔记本",Grep:"搜索",Glob:"查找文件",WebSearch:"联网搜索",WebFetch:"读取网页",TodoWrite:"更新待办",Skill:"激活技能",Task:"调用 Agent",Agent:"调用 Agent"}[r]||"调用工具"}function f4(r){const s=r.name,d=r.input||{};return s==="Bash"?d.command||"":s==="Read"||s==="Edit"||s==="MultiEdit"||s==="Write"?d.file_path||"":s==="NotebookEdit"?d.notebook_path||"":s==="Grep"||s==="Glob"?d.pattern||"":s==="WebSearch"?d.query||"":s==="WebFetch"?d.url||"":s==="Skill"?d.command||d.skill||"":s==="Task"||s==="Agent"?d.prompt||d.description||"":Object.keys(d).length?JSON.stringify(d,null,2):""}function p4(r){if(!r)return{dir:"",name:""};const s=r.lastIndexOf("/");return s>=0?{dir:r.slice(0,s+1),name:r.slice(s+1)}:{dir:"",name:r}}function v4({hunks:r}){return o.jsxDEV("div",{className:"dv",children:r.map((s,d)=>{let _=s.oldStart||0,E=s.newStart||0;return o.jsxDEV("div",{className:"dv-hunk",children:[d>0&&o.jsxDEV("div",{className:"dv-gap",children:o.jsxDEV("span",{children:"⋯"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:175,columnNumber:48},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:175,columnNumber:24},this),(s.lines||[]).map((R,b)=>{const a=typeof R=="string"?R[0]:" ",u=typeof R=="string"?R.slice(1):"";let g,x;return a==="+"?(g=E++,x="add"):a==="-"?(g=_++,x="del"):(g=E++,_++,x="ctx"),o.jsxDEV("div",{className:"dv-row dv-"+x,children:[o.jsxDEV("span",{className:"dv-ln",children:g},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:186,columnNumber:19},this),o.jsxDEV("span",{className:"dv-sign",children:a==="+"?"+":a==="-"?"−":""},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:187,columnNumber:19},this),o.jsxDEV("span",{className:"dv-code",children:u||" "},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:188,columnNumber:19},this)]},b,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:185,columnNumber:17},this)})]},d,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:174,columnNumber:11},this)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:169,columnNumber:5},this)}function tC(r,s){return s?{txt:"执行中",cls:"run"}:r.isError?{txt:"失败",cls:"err"}:r.result!=null?{txt:"成功",cls:"ok"}:{txt:"未返回",cls:"idle"}}function g4({tool:r,running:s}){const{dir:d,name:_}=p4(r.input&&r.input.file_path||""),E=tC(r,s),R=r.diff&&r.diff.created,b=r.diff&&r.diff.hunks;return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"tool-sheet-head es-head",children:[o.jsxDEV("span",{className:"tool-sheet-ic",children:o.jsxDEV(cS,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:218,columnNumber:41},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:218,columnNumber:9},this),o.jsxDEV("div",{className:"es-file",children:[o.jsxDEV("span",{className:"es-name",children:_||r.name},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:220,columnNumber:11},this),d&&o.jsxDEV("span",{className:"es-dir",children:d},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:221,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:219,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:217,columnNumber:7},this),o.jsxDEV("div",{className:"tool-sheet-body es-body",children:[o.jsxDEV("div",{className:"es-meta",children:[o.jsxDEV("span",{className:"tool-sheet-mode-val",children:eC(r.name)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:226,columnNumber:11},this),o.jsxDEV("span",{className:"tool-sheet-state "+E.cls,children:E.txt},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:227,columnNumber:11},this),o.jsxDEV(QS,{diff:r.diff},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:228,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:225,columnNumber:9},this),b&&b.length?o.jsxDEV("div",{className:"es-diff",children:o.jsxDEV(v4,{hunks:b},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:231,columnNumber:38},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:231,columnNumber:13},this):R?o.jsxDEV("div",{className:"es-note",children:["新建文件",r.diff.added?` · 新增 ${r.diff.added} 行`:""]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:233,columnNumber:15},this):s?o.jsxDEV("div",{className:"tool-sheet-empty",children:"执行中…"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:235,columnNumber:17},this):o.jsxDEV("div",{className:"tool-sheet-empty",children:"没有可显示的改动"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:236,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:224,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:216,columnNumber:5},this)}function _4({tool:r,running:s,onClose:d}){if(U.useEffect(()=>{const a=u=>{u.key==="Escape"&&d()};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[d]),!r)return null;const _=!!(r.diff&&(r.diff.hunks&&r.diff.hunks.length||r.diff.created)),E=f4(r),R=r.result!=null,b=tC(r,s);return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"tool-sheet-backdrop",onClick:d},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:258,columnNumber:7},this),o.jsxDEV("div",{className:"tool-sheet"+(_?" tool-sheet-edit":""),role:"dialog","aria-modal":"true",children:[o.jsxDEV("div",{className:"tool-sheet-grip"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:260,columnNumber:9},this),o.jsxDEV("button",{type:"button",className:"cmd-close tool-sheet-x","aria-label":"关闭",onClick:d,children:o.jsxDEV(ca,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:261,columnNumber:100},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:261,columnNumber:9},this),_?o.jsxDEV(g4,{tool:r,running:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:263,columnNumber:11},this):o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"tool-sheet-head",children:[o.jsxDEV("span",{className:"tool-sheet-ic",children:ZS(r.name)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:267,columnNumber:15},this),o.jsxDEV("span",{className:"tool-sheet-title",children:r.name||"工具"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:268,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:266,columnNumber:13},this),o.jsxDEV("div",{className:"tool-sheet-body",children:[o.jsxDEV("section",{className:"tool-sheet-sec",children:[o.jsxDEV("div",{className:"tool-sheet-label",children:"执行模式"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:272,columnNumber:17},this),o.jsxDEV("div",{className:"tool-sheet-mode-row",children:[o.jsxDEV("span",{className:"tool-sheet-mode-val",children:eC(r.name)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:274,columnNumber:19},this),o.jsxDEV("span",{className:"tool-sheet-state "+b.cls,children:b.txt},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:275,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:273,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:271,columnNumber:15},this),E&&o.jsxDEV("section",{className:"tool-sheet-sec",children:[o.jsxDEV("div",{className:"tool-sheet-label",children:"执行的命令"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:280,columnNumber:19},this),o.jsxDEV("pre",{className:"tool-sheet-cmd",children:E},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:281,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:279,columnNumber:17},this),o.jsxDEV("section",{className:"tool-sheet-sec tool-sheet-out",children:[o.jsxDEV("div",{className:"tool-sheet-label",children:o.jsxDEV("span",{children:"输出结果"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:285,columnNumber:51},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:285,columnNumber:17},this),R?o.jsxDEV(d4,{tool:r},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:287,columnNumber:21},this):o.jsxDEV("div",{className:"tool-sheet-empty",children:s?"执行中…":"无输出"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:288,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:284,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:270,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:265,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:259,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:257,columnNumber:5},this)}function b4({m:r,running:s,onOpenTool:d}){if(r.type==="tool")return o.jsxDEV(m4,{tool:r.tool,running:s,onOpen:()=>d(r)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:299,columnNumber:33},this);if(r.type==="interrupt")return o.jsxDEV("div",{className:"chat-interrupt",children:V("chat.interrupted")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:302,columnNumber:38},this);if(r.type==="compact")return o.jsxDEV("div",{className:"chat-compact-divider",children:V("chat.compacted")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:304,columnNumber:36},this);if(r.type==="slash")return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"chat-slash-cmd",children:[r.name,r.args?" "+r.args:""]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:312,columnNumber:9},this),r.result&&o.jsxDEV("div",{className:"chat-slash-result",children:r.result},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:313,columnNumber:22},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:311,columnNumber:7},this);if(r.type==="thinking")return null;if(r.role!=="user"){const _=JS.sanitize(Mn.parse(r.text||""));return o.jsxDEV("div",{className:"chat-bubble chat-them chat-md",dangerouslySetInnerHTML:{__html:_}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:324,columnNumber:12},this)}return o.jsxDEV("div",{className:"chat-bubble chat-me",children:r.text},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:326,columnNumber:10},this)}const y4=40,x4=80;function w4(r){const s=new Set;let d=-1;return r.forEach((_,E)=>{_.type==="text"&&_.role==="user"?(s.add(E),d>=0&&(s.add(d),d=-1)):_.type==="text"&&(d=E)}),d>=0&&s.add(d),s}function N4(r){if(!r)return null;const s=new Date(r);if(Number.isNaN(s.getTime()))return null;const d=`${String(s.getHours()).padStart(2,"0")}:${String(s.getMinutes()).padStart(2,"0")}`,_=new Date;return s.getFullYear()===_.getFullYear()&&s.getMonth()===_.getMonth()&&s.getDate()===_.getDate()?d:`${s.getMonth()+1}月${s.getDate()}日 ${d}`}function S4(r){var R,b,a,u;const s=(R=r.closest)==null?void 0:R.call(r,".chat-md pre");if(s)return{el:s,text:s.innerText};const d=(b=r.closest)==null?void 0:b.call(r,".chat-tool-body, .chat-diff");if(d)return{el:d,text:d.innerText};const _=(a=r.closest)==null?void 0:a.call(r,".chat-bubble");if(_)return{el:_,text:_.innerText};const E=(u=r.closest)==null?void 0:u.call(r,".chat-tool");return E?{el:E,text:E.innerText}:null}const a1=72;function C4({pane:r,kind:s,msg:d,onAuthFail:_,slashEcho:E,onSlashEchoDone:R}){const{messages:b,hasMoreOlder:a,loadOlder:u,loadingOlder:g,session:x,loaded:h}=r4(r),f=U.useMemo(()=>w4(b),[b]),S=s==="permission",{prompt:C,refetch:y}=o4(r,S),l=U.useRef(!1);U.useEffect(()=>{C&&(l.current=!0)},[C]),U.useEffect(()=>{S||(l.current=!1)},[S]);const v=!C&&S&&!l.current?l4():null,m=b.length?b[b.length-1]:null,p=(m==null?void 0:m.type)==="tool"&&m.tool.result===null&&s==="working",N=p,k=s==="compacting",j=s==="error",M=U.useRef(null);E&&!M.current&&(M.current={k:b.reduce((Ee,Te)=>Math.max(Ee,Te.k??-1),-1),session:x}),!E&&M.current&&(M.current=null);const D=!!(E&&M.current&&(M.current.session&&x&&M.current.session!==x||b.some(Ee=>Ee.type==="slash"&&Ee.name===E.name&&(Ee.k??-1)>M.current.k)));U.useEffect(()=>{D&&(R==null||R())},[D,R]);const L=!p&&!k&&!j&&((m==null?void 0:m.role)==="user"?s!=="permission":s==="working"),A=U.useRef(null),F=U.useRef(null),O=U.useRef(!0),I=U.useRef(null),G=U.useRef(!1),ne=U.useRef(null),[ee,te]=U.useState(!0),[se,B]=U.useState(null),W=U.useRef(null),X=U.useRef({timer:null,x:0,y:0,fired:!1}),[Y,ve]=U.useState(null),he=Y!=null?b.find(Ee=>Ee.type==="tool"&&(Ee.k??Ee.i)===Y):null;U.useEffect(()=>{Y!=null&&!he&&ve(null)},[Y,he]);const Me=he!=null,me=U.useRef(0);U.useEffect(()=>{if(!Me)return;window.history.pushState({chatToolSheet:!0},""),me.current=1;const Ee=()=>{me.current=0,ve(null)};return window.addEventListener("popstate",Ee),()=>{window.removeEventListener("popstate",Ee),me.current>0&&(window.history.go(-me.current),me.current=0)}},[Me]);const ie=()=>{W.current&&(W.current.classList.remove("chat-copy-hl"),W.current=null)},$=()=>{ie(),B(null)},_e=()=>{const Ee=X.current;Ee.timer&&(clearTimeout(Ee.timer),Ee.timer=null)},de=(Ee,Te,Ge)=>{var be;X.current.timer=null;const re=S4(Ge),We=F.current;if(!re||!re.text.trim()||!We)return;X.current.fired=!0,(be=navigator.vibrate)==null||be.call(navigator,12),re.el.classList.add("chat-copy-hl"),W.current=re.el;const Ye=We.getBoundingClientRect(),ge=re.el.getBoundingClientRect(),Ze=Math.max(8,Math.min(Ee-Ye.left-a1/2,Ye.width-a1-8)),je=ge.top-Ye.top-44,Pe=je<4?Math.min(ge.bottom-Ye.top+8,Ye.height-52):je;B({top:Pe,left:Ze,text:re.text})},Ie=Ee=>{if($(),X.current.fired=!1,Ee.pointerType==="mouse")return;const Te=X.current;Te.x=Ee.clientX,Te.y=Ee.clientY;const{target:Ge}=Ee;_e(),Te.timer=setTimeout(()=>de(Te.x,Te.y,Ge),480)},Ue=Ee=>{X.current.fired&&(X.current.fired=!1,Ee.stopPropagation(),Ee.preventDefault())},tt=Ee=>{const Te=X.current;Te.timer&&Math.hypot(Ee.clientX-Te.x,Ee.clientY-Te.y)>10&&_e()},Qe=async Ee=>{var Te;try{await navigator.clipboard.writeText(Ee),(Te=navigator.vibrate)==null||Te.call(navigator,8)}catch{}$()};U.useEffect(()=>_e,[]),U.useEffect(()=>{$(),ve(null)},[r]);const[st,Nt]=U.useState(null),J=!!(C||v);U.useEffect(()=>{var Te;if(!J){Nt(null);return}const Ee=()=>{const Ge=F.current,re=Ge==null?void 0:Ge.closest(".app");if(!Ge||!re)return;const We=Ge.getBoundingClientRect(),Ye=re.getBoundingClientRect(),ge=Ye.bottom-We.top;Nt(ge>0?{top:We.top-Ye.top,height:ge}:null)};return Ee(),window.addEventListener("resize",Ee),(Te=window.visualViewport)==null||Te.addEventListener("resize",Ee),()=>{var Ge;window.removeEventListener("resize",Ee),(Ge=window.visualViewport)==null||Ge.removeEventListener("resize",Ee)}},[J]);const bt=()=>{const Ee=A.current;if(!Ee)return;_e(),se&&$();const Te=Ee.scrollHeight-Ee.scrollTop-Ee.clientHeight<y4;O.current=Te,te(Te),Ee.scrollTop<x4&&a&&!g&&(I.current=Ee.scrollHeight,G.current=!0,u())},Gt=()=>{const Ee=A.current;Ee&&(Ee.scrollTop=Ee.scrollHeight,O.current=!0,te(!0))};return U.useEffect(()=>{const Ee=A.current,Te=b.length?b[b.length-1]:null,Ge=Te?Te.k??Te.i:null,re=Te&&Te.role==="user"&&ne.current!=null&&Ge!=null&&Ge>ne.current;if(Ee){if(G.current){Ee.scrollTop+=Ee.scrollHeight-I.current,I.current=null,G.current=!1;return}if(Ge!=null&&(ne.current=ne.current==null?Ge:Math.max(ne.current,Ge)),re){Ee.scrollTop=Ee.scrollHeight,O.current=!0,te(!0);return}O.current&&(Ee.scrollTop=Ee.scrollHeight)}},[b,L]),U.useEffect(()=>{const Ee=A.current;!Ee||g||!a||b.length===0||Ee.clientHeight>0&&Ee.scrollHeight<=Ee.clientHeight&&(I.current=Ee.scrollHeight,G.current=!0,u())},[b,a,g,u]),U.useEffect(()=>{const Ee=A.current;Ee&&(Ee.scrollTop=Ee.scrollHeight),O.current=!0,te(!0),ne.current=null},[r]),o.jsxDEV("div",{className:"chat-view",ref:F,children:[o.jsxDEV("div",{className:"chat-scroll",ref:A,onScroll:bt,onPointerDown:Ie,onPointerMove:tt,onPointerUp:_e,onPointerCancel:_e,onClickCapture:Ue,children:[b.length===0&&(h?o.jsxDEV("div",{className:"chat-new",children:V("boot.chat_empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:643,columnNumber:13},this):o.jsxDEV(xS,{hint:V("boot.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:644,columnNumber:13},this)),b.map((Ee,Te)=>{if(Ee.type==="thinking")return null;const Ge=f.has(Te)?N4(Ee.ts):null;return o.jsxDEV(U.Fragment,{children:[o.jsxDEV(b4,{m:Ee,running:N&&Te===b.length-1,onOpenTool:re=>ve(re.k??re.i)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:650,columnNumber:15},this),Ge&&o.jsxDEV("div",{className:"chat-ts "+(Ee.role==="user"?"ts-me":"ts-them"),children:Ge},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:652,columnNumber:25},this)]},(Ee.k??Ee.i)+":"+Te,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:649,columnNumber:13},this)}),E&&!D&&o.jsxDEV("div",{className:"chat-slash-cmd",children:[E.name,E.args?" "+E.args:""]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:657,columnNumber:11},this),k&&o.jsxDEV("div",{className:"chat-compacting","aria-live":"polite",children:[o.jsxDEV("span",{className:"chat-compacting-label",children:"正在压缩上下文"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:661,columnNumber:13},this),o.jsxDEV(d_,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:662,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:660,columnNumber:11},this),j&&o.jsxDEV("div",{className:"chat-turn-error",role:"status",children:["本轮出错",d?`:${d}`:""]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:666,columnNumber:11},this),L&&o.jsxDEV("div",{className:"chat-typing","aria-hidden":"true",children:o.jsxDEV(d_,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:672,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:671,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:636,columnNumber:7},this),se&&o.jsxDEV("div",{className:"sel-callout chat-copy-callout",style:{top:se.top,left:se.left},onPointerDown:Ee=>Ee.preventDefault(),children:o.jsxDEV("button",{type:"button",onClick:()=>Qe(se.text),children:"拷贝"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:680,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:678,columnNumber:9},this),!ee&&o.jsxDEV("button",{type:"button",className:"new-output","aria-label":"回到最新",onClick:Gt,children:"↓ 回到底部"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:685,columnNumber:9},this),he&&o.jsxDEV(_4,{tool:he.tool,running:N&&he===b[b.length-1],onClose:()=>ve(null)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:691,columnNumber:9},this),J&&o.jsxDEV("div",{className:"chat-gate-backdrop",style:st?{top:st.top+"px",height:st.height+"px",bottom:"auto"}:void 0},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:702,columnNumber:18},this),C&&o.jsxDEV(c4,{pane:r,prompt:C,onAuthFail:_,onAct:y},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:704,columnNumber:18},this),v&&o.jsxDEV("div",{className:"chat-gate",children:[o.jsxDEV("div",{className:"chat-gate-prompt",children:v.prompt},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:707,columnNumber:11},this),o.jsxDEV("div",{className:"chat-gate-actions",children:v.options.map((Ee,Te)=>o.jsxDEV("button",{type:"button",className:"chat-gate-btn",onClick:()=>Pu(r,Ee.keys),children:Ee.label},Te,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:710,columnNumber:15},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:708,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:706,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ChatView.jsx",lineNumber:635,columnNumber:5},this)}function E4({onSaved:r}){const[s,d]=U.useState(""),_=E=>{E.preventDefault();const R=s.trim();R&&(CM(R),r())};return o.jsxDEV("form",{className:"token-prompt",onSubmit:_,children:[o.jsxDEV("h2",{children:V("token.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TokenPrompt.jsx",lineNumber:16,columnNumber:7},this),o.jsxDEV("input",{value:s,onChange:E=>d(E.target.value),placeholder:V("token.placeholder")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TokenPrompt.jsx",lineNumber:17,columnNumber:7},this),o.jsxDEV("button",{type:"submit",children:V("common.save")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TokenPrompt.jsx",lineNumber:18,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/TokenPrompt.jsx",lineNumber:15,columnNumber:5},this)}function gm({open:r,title:s,actions:d=[],onClose:_}){const[E,R]=U.useState(null);if(U.useEffect(()=>{r||R(null)},[r]),!r)return null;const b=u=>{var g;if(!u.disabled){if(u.confirm&&E!==u.key){R(u.key);return}R(null),(g=u.onClick)==null||g.call(u)}},a=u=>o.jsxDEV("button",{className:`sheet-action ${u.danger?"danger":""} ${E===u.key?"armed":""}`,disabled:u.disabled,onClick:()=>b(u),children:[u.icon&&E!==u.key&&o.jsxDEV("span",{className:"sheet-action-icon","aria-hidden":"true",children:u.icon},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:30,columnNumber:37},this),u.confirm&&E===u.key?u.confirmLabel||V("actionsheet.confirmAgain"):u.label]},u.key,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:24,columnNumber:5},this);return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-backdrop",onClick:_},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:37,columnNumber:7},this),o.jsxDEV("div",{className:"settings-card",role:"dialog","aria-label":s,"aria-modal":"true",children:[o.jsxDEV("div",{className:"settings-head",children:[o.jsxDEV("span",{className:"settings-title",children:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:40,columnNumber:11},this),o.jsxDEV("button",{className:"settings-close",onClick:_,"aria-label":V("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:41,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:39,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section sheet-actions",children:[d.map((u,g)=>Array.isArray(u)?o.jsxDEV("div",{className:"sheet-row",children:u.map(a)},`row-${g}`,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:45,columnNumber:15},this):a(u)),o.jsxDEV("button",{className:"fontbtn sheet-cancel",onClick:_,children:V("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:47,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:43,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:38,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ActionSheet.jsx",lineNumber:36,columnNumber:5},this)}const j4=/\.(?:md|markdown|html|htm|txt|log|sh)$/i,o1=300;function l1(r){const s=r.lastIndexOf("/");return s<0?{dir:"",frag:r}:{dir:r.slice(0,s+1),frag:r.slice(s+1)}}const D4=r=>r.replace(/\/+$/,"")||"/",Ag=(r,s)=>r===s?"":r.startsWith(`${s}/`)?r.slice(s.length+1):r,Qh=(r,s,d)=>{let _=null;for(const E of s||[])(r===E||r!=null&&r.startsWith(`${E}/`))&&(!_||E.length>_.length)&&(_=E);return _||d},k4=r=>r==null?"":r<1024?`${r} B`:r<1024*1024?`${Math.round(r/1024)} KB`:`${(r/1024/1024).toFixed(1)} MB`;function nC({path:r,onNavigate:s,onOpenDoc:d,onJumpToCwd:_,pendingFile:E,onPendingConsumed:R,pickMode:b=!1,allowMkdir:a=!b,onPick:u,refreshKey:g=0}){const[x,h]=U.useState(""),[f,S]=U.useState(null),[C,y]=U.useState(!1),[l,v]=U.useState(""),[m,p]=U.useState(""),[N,k]=U.useState(""),[j,M]=U.useState(null),[D,L]=U.useState(!1),[A,F]=U.useState(!1),[O,I]=U.useState(""),[G,ne]=U.useState(null),ee=U.useRef(null),te=U.useRef(!1),se=U.useRef(g),B=U.useRef(null),W=U.useRef(null),X=U.useRef(null),Y=async(ge,{sync:Ze=!1,notify:je=!1,fallbackHome:Pe=!1}={})=>{v("");try{const be=await eS(ge??void 0);if(te.current=be.path,S(be),Ze){const Ae=Ag(be.path,Qh(be.path,be.roots,be.home));h(Ae?`${Ae}/`:"")}je&&(s==null||s(be.path),F(!1),I(""))}catch{if(Pe&&ge!=null){Y(null,{sync:!0});return}v(V("filebrowser.openDirFailed"))}};U.useEffect(()=>{const ge=g!==se.current;se.current=g,!(r===te.current&&!ge)&&Y(r,{sync:!0,fallbackHome:b})},[r,g]),U.useEffect(()=>()=>{clearTimeout(B.current),clearTimeout(W.current)},[]),U.useEffect(()=>{if(!C)return;const ge=Ze=>{var je;(je=X.current)!=null&&je.contains(Ze.target)||y(!1)};return document.addEventListener("pointerdown",ge,!0),()=>document.removeEventListener("pointerdown",ge,!0)},[C]);const ve=ge=>{p(ge),clearTimeout(W.current),W.current=setTimeout(()=>p(""),2500)},he=ge=>{const Ze=f==null?void 0:f.home;if(!Ze){h(ge);return}const je=(f==null?void 0:f.roots)||[Ze];let Pe=ge;(Pe==="~"||Pe.startsWith("~/"))&&(Pe=Ze+Pe.slice(1));let be=Qh(f==null?void 0:f.path,je,Ze);Pe.startsWith("/")&&(be=Qh(Pe,je,Ze),Pe=Pe===be?"":Pe.startsWith(`${be}/`)?Pe.slice(be.length+1):Pe.replace(/^\/+/,"")),h(Pe);const Ae=D4(`${be}/${l1(Pe).dir}`);Ae!==te.current&&(clearTimeout(B.current),B.current=setTimeout(()=>{Ae!==te.current&&Y(Ae,{notify:!0})},250))},Me=async ge=>{const Ze=So(f.path,ge);try{await navigator.clipboard.writeText(Ze),ve(V("filebrowser.copiedPath",{abs:Ze}))}catch{ve(Ze)}},me=ge=>d(So(f.path,ge)),ie=ge=>Y(So(f.path,ge),{sync:!0,notify:!0}),$=()=>(f==null?void 0:f.parent)&&Y(f.parent,{sync:!0,notify:!0}),_e=async()=>{const ge=O.trim();if(!(!ge||!f)){v("");try{await TA(f.path,ge),await Y(f.path,{}),F(!1),I("")}catch{v(V("filebrowser.mkdirFailed"))}}},de=async ge=>{v(""),ne({label:V("filebrowser.downloading",{name:ge}),pct:0});try{await HA(So(f.path,ge),Ze=>ne({label:V("filebrowser.downloading",{name:ge}),pct:Ze})),k(ge)}catch{v(V("filebrowser.downloadFailed"))}finally{ne(null)}},Ie=()=>{const ge=j;M(null),ge&&de(ge)},Ue=f==null?void 0:f.home,tt=(f==null?void 0:f.roots)||(Ue?[Ue]:[]),Qe=Qh(f==null?void 0:f.path,tt,Ue),st=ge=>ge===Ue?"~":/\/tmp$/.test(ge)?"tmp":ge.includes("/var/folders/")?"TMPDIR":ge.split("/").filter(Boolean).pop()||"/",Nt=ge=>{y(!1),ge!==Qe&&Y(ge,{sync:!0,notify:!0})},J=(ge,Ze)=>!ge||!Ze||ge===Ze?!1:(ge.startsWith(`${Ze}/`)?ge.slice(Ze.length+1):ge).split("/").some(Pe=>Pe.startsWith(".")),bt=!!f&&f.path!==Ue&&!J(f.path,Qe),Gt=async ge=>{const{allowed:Ze,rejected:je}=LS(ge);if(!Ze.length)return je.length&&v(V("filebrowser.uploadRejected",{names:je.join("、")})),je;L(!0),v("");const Pe=Ze.length,be=[],Ae=new AbortController;AS(Ae,V("filebrowser.uploading",{name:Ze[0].name,tag:Pe>1?`(1/${Pe})`:""}));try{for(let He=0;He<Pe&&!Ae.signal.aborted;He++){const wt=Ze[He],kt=Pe>1?`(${He+1}/${Pe})`:"";mm({label:V("filebrowser.uploading",{name:wt.name,tag:kt}),phase:"sending",pct:0});try{await nS(f.path,wt,(Ot,Pt)=>mm({pct:Ot,phase:Pt}),!1,{signal:Ae.signal})}catch(Ot){if(Ot instanceof lm)break;be.push({name:wt.name,reason:(Ot==null?void 0:Ot.message)||V("filebrowser.uploadFailed")})}}}finally{s_()}return await Y(f.path,{}),L(!1),be.length?v(be.map(He=>`${He.name}:${He.reason}`).join(";")):je.length&&v(V("filebrowser.uploadRejected",{names:je.join("、")})),[...be.map(He=>He.name),...je]},Ee=async()=>{E&&(await Gt(E)).length===0&&(R==null||R())},Te=ge=>{if(b||ge.key!=="Enter")return;const Ze=x.trim();Ze&&j4.test(Ze)&&(f!=null&&f.home)&&d(So(f.home,Ze))},Ge=l1(x).frag.toLowerCase(),re=((f==null?void 0:f.entries)||[]).filter(ge=>(!b||ge.type==="dir")&&(!Ge||ge.name.toLowerCase().includes(Ge))),We=re.length>o1?re.slice(0,o1):re,Ye=re.length-We.length;return o.jsxDEV("div",{className:"browse-view",children:[o.jsxDEV("div",{className:"browse-bar",children:[_&&o.jsxDEV("button",{className:"browse-cwd","aria-label":V("filebrowser.sessionDir"),title:V("filebrowser.jumpToSessionDir"),onClick:_,children:o.jsxDEV(JA,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:274,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:273,columnNumber:11},this),o.jsxDEV("button",{className:"browse-up","aria-label":V("filebrowser.parentDir"),disabled:!(f!=null&&f.parent),onClick:$,children:o.jsxDEV(w_,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:278,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:277,columnNumber:9},this),o.jsxDEV("div",{className:"browse-path",children:[tt.length>1?o.jsxDEV("div",{className:"dd browse-root-dd",ref:X,children:[o.jsxDEV("button",{type:"button",className:"browse-root","aria-haspopup":"listbox","aria-expanded":C,"aria-label":V("filebrowser.rootSelect"),onClick:()=>y(ge=>!ge),children:[o.jsxDEV("span",{children:[st(Qe),"/"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:289,columnNumber:17},this),o.jsxDEV("span",{className:`dd-caret${C?" open":""}`,"aria-hidden":"true",children:"▾"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:290,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:285,columnNumber:15},this),C&&o.jsxDEV("div",{className:"dd-menu",role:"listbox",children:tt.map(ge=>o.jsxDEV("button",{type:"button",role:"option","aria-selected":ge===Qe,title:ge,className:`dd-option${ge===Qe?" is-selected":""}`,onClick:()=>Nt(ge),children:[o.jsxDEV("span",{className:"dd-option-label",children:[st(ge),"/"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:299,columnNumber:23},this),ge===Qe&&o.jsxDEV("span",{className:"dd-check","aria-hidden":"true",children:"✓"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:300,columnNumber:41},this)]},ge,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:295,columnNumber:21},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:293,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:284,columnNumber:13},this):o.jsxDEV("span",{className:"browse-home","aria-hidden":"true",children:"~/"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:307,columnNumber:13},this),o.jsxDEV("input",{className:"browse-input",value:x,placeholder:V("filebrowser.pathPlaceholder"),autoCapitalize:"off",autoCorrect:"off",spellCheck:!1,onChange:ge=>he(ge.target.value),onKeyDown:Te},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:309,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:280,columnNumber:9},this),a&&o.jsxDEV("button",{className:"browse-mkdir","aria-label":V("filebrowser.newFolder"),title:V("filebrowser.newFolder"),disabled:!f,onClick:()=>{F(ge=>!ge),I("")},children:o.jsxDEV(KA,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:321,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:316,columnNumber:11},this),!b&&o.jsxDEV("button",{className:"browse-upload","aria-label":V("filebrowser.uploadFile"),title:V(bt?"filebrowser.uploadToCurrentDir":"filebrowser.enterSubdirToUpload"),disabled:!bt||D,onClick:()=>{var ge;return(ge=ee.current)==null?void 0:ge.click()},children:o.jsxDEV(sS,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:332,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:325,columnNumber:11},this),!b&&o.jsxDEV("input",{ref:ee,className:"browse-file-input",type:"file",multiple:!0,accept:D_,onChange:ge=>{Gt(Array.from(ge.target.files||[])),ge.target.value=""}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:338,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:271,columnNumber:7},this),A&&o.jsxDEV("div",{className:"browse-newfolder",children:[o.jsxDEV("input",{className:"browse-newfolder-input",autoFocus:!0,value:O,placeholder:V("filebrowser.folderNamePlaceholder"),autoCapitalize:"off",autoCorrect:"off",spellCheck:!1,onChange:ge=>I(ge.target.value),onKeyDown:ge=>{ge.key==="Enter"&&_e()}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:350,columnNumber:11},this),o.jsxDEV("button",{className:"browse-newfolder-ok",onClick:_e,children:V("filebrowser.createBtn")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:356,columnNumber:11},this),o.jsxDEV("button",{className:"browse-newfolder-x","aria-label":V("common.cancel"),onClick:()=>{F(!1),I("")},children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:357,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:349,columnNumber:9},this),!b&&E&&o.jsxDEV("div",{className:"browse-pending",children:[o.jsxDEV("span",{className:"browse-pending-text",children:[V("filebrowser.uploadPendingTo",{name:E.name}),!bt&&o.jsxDEV("em",{className:"browse-pending-hint",children:V("filebrowser.enterSubdirFirst")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:364,columnNumber:28},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:362,columnNumber:11},this),o.jsxDEV("button",{className:"browse-pending-btn",disabled:!bt||D,onClick:Ee,children:V("filebrowser.upload")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:366,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:361,columnNumber:9},this),l&&o.jsxDEV("div",{className:"bind-error browse-err",children:l},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:369,columnNumber:15},this),m&&o.jsxDEV("div",{className:"browse-notice",children:m},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:370,columnNumber:18},this),!b&&N&&o.jsxDEV("div",{className:"browse-saved",children:[o.jsxDEV("span",{className:"browse-saved-text",children:V("filebrowser.savedToDownloads",{name:N})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:373,columnNumber:11},this),o.jsxDEV("button",{className:"browse-saved-close","aria-label":V("common.close"),onClick:()=>k(""),children:"×"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:374,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:372,columnNumber:9},this),!b&&G&&o.jsxDEV("div",{className:"browse-progress",children:[o.jsxDEV("span",{className:"browse-progress-label",children:[G.label," ",Math.round(G.pct*100),"%"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:379,columnNumber:11},this),o.jsxDEV("span",{className:"browse-progress-track",children:o.jsxDEV("span",{className:"browse-progress-fill",style:{width:`${Math.round(G.pct*100)}%`}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:381,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:380,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:378,columnNumber:9},this),o.jsxDEV("div",{className:"browse-list",children:[We.length===0&&!l&&o.jsxDEV("div",{className:"browse-empty",children:V("filebrowser.noMatches")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:386,columnNumber:42},this),We.map(ge=>o.jsxDEV("div",{className:"browse-entry-row",children:[o.jsxDEV("button",{className:"browse-entry",onClick:()=>ge.type==="dir"?ie(ge.name):ge.type==="doc"||ge.type==="image"?me(ge.name):ve(V("filebrowser.previewUnsupported")),children:[o.jsxDEV("span",{className:"browse-entry-icon",children:ge.type==="dir"?o.jsxDEV(Bu,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:397,columnNumber:71},this):ge.type==="image"?o.jsxDEV(XA,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:397,columnNumber:109},this):o.jsxDEV(iS,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:397,columnNumber:125},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:397,columnNumber:15},this),o.jsxDEV("span",{className:"browse-entry-name",children:ge.name},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:398,columnNumber:15},this),ge.type!=="dir"&&o.jsxDEV("span",{className:"browse-entry-size",children:k4(ge.size)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:399,columnNumber:36},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:389,columnNumber:13},this),ge.type!=="dir"&&o.jsxDEV("button",{className:"browse-copy","aria-label":V("filebrowser.copyAbsPath"),title:V("filebrowser.copyAbsPath"),onClick:()=>Me(ge.name),children:o.jsxDEV(aS,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:403,columnNumber:17},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:402,columnNumber:15},this),ge.type!=="dir"&&o.jsxDEV("button",{className:"browse-dl","aria-label":V("filebrowser.download"),onClick:()=>M(ge.name),children:o.jsxDEV(e3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:408,columnNumber:17},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:407,columnNumber:15},this)]},ge.name,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:388,columnNumber:11},this)),Ye>0&&o.jsxDEV("div",{className:"browse-overflow",children:V("filebrowser.tooMany",{shown:We.length,total:re.length})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:414,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:385,columnNumber:7},this),b&&f&&o.jsxDEV("div",{className:"browse-pick-bar",children:o.jsxDEV("button",{className:"browse-pick-confirm",onClick:()=>u==null?void 0:u(f.path),children:V("filebrowser.pickThisDir",{path:Ag(f.path,f.home)?`~/${Ag(f.path,f.home)}`:"~"})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:419,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:418,columnNumber:9},this),o.jsxDEV(gm,{open:!!j,title:j?V("filebrowser.downloadConfirm",{name:j}):"",actions:[{key:"dl",label:V("filebrowser.download"),onClick:Ie}],onClose:()=>M(null)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:424,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileBrowser.jsx",lineNumber:270,columnNumber:5},this)}const R4=()=>{};function Wu({open:r,seedCwd:s=null,hint:d=null,pane:_=null,allowMkdir:E=!1,onPick:R,onClose:b,inset:a=0}){const[u,g]=U.useState(s),x=U.useRef(!1);r&&!x.current?(x.current=!0,u!==s&&g(s)):!r&&x.current&&(x.current=!1);const h=_?async()=>{try{const{cwd:f}=await jo(_);f&&g(f)}catch{}}:null;return r?o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-backdrop dirpick-backdrop",onClick:b},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DirPicker.jsx",lineNumber:31,columnNumber:7},this),o.jsxDEV("div",{className:"settings-card dirpick-card",style:{transform:`translate(-50%, calc(-50% + ${a/2}px))`,"--kb-inset":`${a}px`},role:"dialog","aria-label":V("dirpicker.title"),"aria-modal":"true",children:[o.jsxDEV("div",{className:"settings-head",children:[o.jsxDEV("span",{className:"settings-title",children:V("dirpicker.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DirPicker.jsx",lineNumber:38,columnNumber:11},this),o.jsxDEV("button",{className:"settings-close",onClick:b,"aria-label":V("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DirPicker.jsx",lineNumber:39,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DirPicker.jsx",lineNumber:37,columnNumber:9},this),d&&o.jsxDEV("div",{className:"dirpick-hint",children:d},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DirPicker.jsx",lineNumber:41,columnNumber:18},this),o.jsxDEV(nC,{path:u,onNavigate:g,onOpenDoc:R4,onJumpToCwd:h,pickMode:!0,allowMkdir:E,onPick:R},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DirPicker.jsx",lineNumber:42,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DirPicker.jsx",lineNumber:32,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DirPicker.jsx",lineNumber:30,columnNumber:5},this):null}function T4({open:r,pushKey:s,notifyOn:d,onClose:_}){const[E,R]=U.useState("");if(!r)return null;const b='handmux push "构建完成" "耗时 3m12s"',a=!!(d&&s),u=b,g=`${b} --session ${V("scriptPush.session_placeholder")}`,x=`${b} --device ${a?s:V("scriptPush.device_placeholder")}`,h=async(C,y)=>{try{await navigator.clipboard.writeText(C),R(y),setTimeout(()=>R(""),1500)}catch{}},f=C=>V(E===C?"scriptPush.copied":"common.copy"),S=(C,y,l,v)=>o.jsxDEV("div",{className:"push-script-block",children:[o.jsxDEV("div",{className:"push-script-label",children:y},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:25,columnNumber:7},this),o.jsxDEV("pre",{className:"push-script-cmd",children:o.jsxDEV("code",{children:l},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:26,columnNumber:40},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:26,columnNumber:7},this),v&&o.jsxDEV("div",{className:"push-script-hint",children:v},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:27,columnNumber:16},this),o.jsxDEV("button",{className:"fontbtn",onClick:()=>h(l,C),children:f(C)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:28,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:24,columnNumber:5},this);return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-backdrop push-script-backdrop",onClick:_},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:34,columnNumber:7},this),o.jsxDEV("div",{className:"settings-card push-script-sheet",role:"dialog","aria-label":V("scriptPush.title"),"aria-modal":"true",children:[o.jsxDEV("div",{className:"settings-head",children:[o.jsxDEV("span",{className:"settings-title",children:V("scriptPush.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:37,columnNumber:11},this),o.jsxDEV("button",{className:"settings-close",onClick:_,"aria-label":V("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:38,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:36,columnNumber:9},this),o.jsxDEV("p",{className:"push-script-intro",children:V("scriptPush.intro")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:41,columnNumber:9},this),S("all",V("scriptPush.scope_all"),u),S("session",V("scriptPush.scope_session"),g),S("device",V("scriptPush.scope_device"),x,V(a?"scriptPush.device_key_note":"scriptPush.device_need_enable")),o.jsxDEV("div",{className:"push-script-block",children:[o.jsxDEV("div",{className:"push-script-label",children:V("scriptPush.opts_label")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:49,columnNumber:11},this),o.jsxDEV("ul",{className:"push-script-fields",children:[o.jsxDEV("li",{children:V("scriptPush.opt_tag")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:51,columnNumber:13},this),o.jsxDEV("li",{children:V("scriptPush.opt_url")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:52,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:50,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:48,columnNumber:9},this),o.jsxDEV("div",{className:"push-script-note",children:V("scriptPush.reliability")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:56,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:35,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/PushScriptSheet.jsx",lineNumber:33,columnNumber:5},this)}function L4({open:r,onClose:s,termRef:d,onColAdjust:_,onColRestore:E,onOpenChangelog:R,changelogUnread:b,chatTone:a="ink",onChatTone:u=()=>{},chatLensEnabled:g=!1,onChatLensEnabled:x=()=>{},hooksStatus:h=null,onEnableHooks:f=null,notifUnread:S=!1,onOpenInbox:C,updateInfo:y=null,activePreview:l=null,pane:v=null,lastPreviewDir:m=null,dynamicEnabled:p=!1,getColCount:N=null,onStartPreview:k,onStartDynamicPreview:j,onOpenPreview:M,onRenew:D,onStop:L}){var sn,Dn;const[A,F]=U.useState(null),[O,I]=U.useState(Y1()),[G,ne]=U.useState(null),[ee,te]=U.useState(!1),[se,B]=U.useState(zg()),[W,X]=U.useState(!1),[Y,ve]=U.useState(""),he=h==="absent"||h==="no-claude",[Me,me]=U.useState(!1),[ie,$]=U.useState(!1),_e=async()=>{me(!0),$(!1);try{const it=await(f==null?void 0:f());(!it||it.status!=="installed")&&$(!0)}catch{$(!0)}finally{me(!1)}},[de,Ie]=U.useState(!1),[Ue,tt]=U.useState(null),[Qe,st]=U.useState(!1),[Nt,J]=U.useState(null),[bt,Gt]=U.useState("off"),[Ee,Te]=U.useState(""),[Ge,re]=U.useState(!1),[We,Ye]=U.useState(""),[ge,Ze]=U.useState(!1),je=dS(l==null?void 0:l.expiresAt,!!l&&r);U.useEffect(()=>{re(!1),Ye("")},[l==null?void 0:l.name,r]);const Pe=it=>({"port not listening":V("settings.err_port_not_listening"),"bad port":V("settings.err_bad_port"),"dynamic disabled":V("settings.err_dynamic_disabled")})[it]||it||V("settings.err_start_failed"),be=async()=>{const it=Number(Ee);if(it){Ye(""),Ze(!0);try{await(j==null?void 0:j(it))}catch(cn){Ye(Pe(cn==null?void 0:cn.message))}finally{Ze(!1)}}},Ae=async()=>{tt(zg()?await C_():null),Ie(!0)},He=async()=>{let it=m;if(!it&&v)try{it=(await jo(v)).cwd||null}catch{}J(it),st(!0)};U.useEffect(()=>{var it,cn;r&&(F(((cn=(it=d.current)==null?void 0:it.getFontSize)==null?void 0:cn.call(it))??null),ne((N==null?void 0:N())??null))},[r,d,N]);const wt=async()=>{X(!0),ve("");try{se?(await C3(),B(!1),ve(V("settings.notify_disabled"))):(await S3(),B(!0),ve(V("settings.notify_enabled")))}catch(it){ve(it.message||V("settings.notify_failed"))}finally{X(!1)}};if(!r)return null;const kt=it=>{var $n,en,kn,On;const cn=(en=($n=d.current)==null?void 0:$n.getFontSize)==null?void 0:en.call($n),zn=(On=(kn=d.current)==null?void 0:kn.setFontSize)==null?void 0:On.call(kn,((cn==null?void 0:cn.size)??14)+it);zn!=null&&F({size:zn,auto:!1})},Ot=()=>{var it,cn;(cn=(it=d.current)==null?void 0:it.autoFont)==null||cn.call(it),F({size:null,auto:!0})},Pt=it=>{var cn,zn;I(it),qM(it),(zn=(cn=d.current)==null?void 0:cn.setDocHighlight)==null||zn.call(cn,it)},dn=A!=null&&A.auto?V("settings.font_auto"):A!=null&&A.size?`${A.size}px`:"—",Qt=G!=null?`${G} 列`:"—",Mt=it=>{_==null||_(it),ne((N==null?void 0:N())??null)},Ft=()=>{E==null||E(),ne(null)};return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-backdrop",onClick:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:122,columnNumber:7},this),o.jsxDEV("div",{className:"settings-card",role:"dialog","aria-label":V("settings.title"),"aria-modal":"true",children:[o.jsxDEV("div",{className:"settings-head",children:[o.jsxDEV("span",{className:"settings-title",children:V("settings.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:125,columnNumber:11},this),o.jsxDEV("button",{className:"settings-close",onClick:s,"aria-label":V("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:126,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:124,columnNumber:9},this),o.jsxDEV("div",{className:"settings-body",children:[o.jsxDEV("div",{className:"settings-group",children:V("settings.group_global")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:130,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"settings-label",children:V("settings.language")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:133,columnNumber:11},this),o.jsxDEV("div",{className:"lang-drop",children:[ee&&o.jsxDEV("div",{className:"lang-drop-backdrop",onClick:()=>te(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:135,columnNumber:26},this),o.jsxDEV("button",{className:"lang-trigger",onClick:()=>te(it=>!it),children:[o.jsxDEV("span",{children:(sn=W0.find(it=>it.code===Il()))==null?void 0:sn.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:137,columnNumber:15},this),o.jsxDEV("span",{className:"lang-chevron",children:ee?"▴":"▾"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:138,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:136,columnNumber:13},this),ee&&o.jsxDEV("div",{className:"lang-menu",children:W0.map(it=>o.jsxDEV("button",{className:`lang-option${it.code===Il()?" active":""}`,onClick:()=>xM(it.code),children:it.label},it.code,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:143,columnNumber:19},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:141,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:134,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:132,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"settings-label",children:V("settings.font_size")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:152,columnNumber:11},this),o.jsxDEV("div",{className:"settings-btns",children:[o.jsxDEV("button",{className:"fontbtn",onClick:()=>kt(-1),"aria-label":V("settings.font_decrease"),children:"A−"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:154,columnNumber:13},this),o.jsxDEV("span",{className:"settings-value",children:dn},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:155,columnNumber:13},this),o.jsxDEV("button",{className:"fontbtn",onClick:()=>kt(1),"aria-label":V("settings.font_increase"),children:"A+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:156,columnNumber:13},this),o.jsxDEV("button",{className:"fontbtn",onClick:Ot,title:V("settings.font_auto_title"),children:V("settings.font_auto")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:157,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:153,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:151,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("label",{className:"settings-toggle",children:[o.jsxDEV("span",{className:"settings-label",children:V("settings.chat_lens")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:167,columnNumber:13},this),o.jsxDEV("span",{className:"cmd-switch",children:[o.jsxDEV("input",{type:"checkbox",checked:g,disabled:he&&!g,onChange:it=>x(it.target.checked)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:169,columnNumber:15},this),o.jsxDEV("span",{className:"cmd-switch-track","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:172,columnNumber:15},this),o.jsxDEV("span",{className:"cmd-switch-knob","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:173,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:168,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:166,columnNumber:11},this),he?o.jsxDEV("div",{className:"settings-hint",children:[V(h==="no-claude"?"settings.chat_lens_no_claude":"settings.chat_lens_need_hooks"),h==="absent"&&o.jsxDEV("button",{type:"button",className:"fontbtn settings-hint-btn",disabled:Me,onClick:_e,children:V(Me?"settings.chat_lens_installing":"settings.chat_lens_install_hooks")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:180,columnNumber:17},this),ie&&o.jsxDEV("div",{className:"settings-hint settings-hint-err",children:V("settings.chat_lens_hooks_err")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:185,columnNumber:32},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:177,columnNumber:13},this):o.jsxDEV("div",{className:"settings-hint",children:V("settings.chat_lens_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:188,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:161,columnNumber:9},this),g&&o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"settings-label",children:V("settings.chat_tone")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:195,columnNumber:11},this),o.jsxDEV("div",{className:"settings-btns",children:["dusk","ink","light"].map(it=>o.jsxDEV("button",{className:"fontbtn","aria-pressed":a===it,onClick:()=>u(it),children:V(`settings.chat_tone_${it}`)},it,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:198,columnNumber:15},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:196,columnNumber:11},this),o.jsxDEV("div",{className:"settings-hint",children:V("settings.chat_tone_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:208,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:194,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("label",{className:"settings-toggle",children:[o.jsxDEV("span",{className:"settings-label",children:V("settings.path_highlight")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:214,columnNumber:13},this),o.jsxDEV("span",{className:"cmd-switch",children:[o.jsxDEV("input",{type:"checkbox",checked:O,onChange:it=>Pt(it.target.checked)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:216,columnNumber:15},this),o.jsxDEV("span",{className:"cmd-switch-track","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:217,columnNumber:15},this),o.jsxDEV("span",{className:"cmd-switch-knob","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:218,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:215,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:213,columnNumber:11},this),o.jsxDEV("div",{className:"settings-hint",children:V("settings.path_highlight_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:221,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:212,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"settings-label",children:V("settings.version")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:225,columnNumber:11},this),o.jsxDEV("div",{className:"settings-btns",children:[o.jsxDEV("span",{className:"settings-value",children:y!=null&&y.current?`v${y.current}`:"—"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:227,columnNumber:13},this),o.jsxDEV("button",{className:"fontbtn",onClick:R,children:[V("settings.view_changelog"),b&&o.jsxDEV("span",{className:"settings-dot","aria-label":V("settings.has_update")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:229,columnNumber:65},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:228,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:226,columnNumber:11},this),(y==null?void 0:y.updateAvailable)&&o.jsxDEV("div",{className:"settings-update",children:[o.jsxDEV("div",{className:"settings-update-title",children:V("settings.update_available",{v:y.latest})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:238,columnNumber:15},this),((Dn=y.whatsNew)==null?void 0:Dn.length)>0&&o.jsxDEV("ul",{className:"settings-update-new",children:y.whatsNew.map(it=>o.jsxDEV("li",{children:[o.jsxDEV("span",{className:"settings-update-new-ver",children:["v",it.version]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:243,columnNumber:23},this),(Il().startsWith("zh")?it.zh:it.en)||it.en]},it.version,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:242,columnNumber:21},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:240,columnNumber:17},this),o.jsxDEV("div",{className:"settings-update-how",children:[V("settings.update_how")," ",o.jsxDEV("code",{children:"handmux update"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:249,columnNumber:79},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:249,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:237,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:224,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"settings-label",children:V("settings.feedback")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:259,columnNumber:11},this),o.jsxDEV("div",{className:"settings-btns",children:[o.jsxDEV("a",{className:"fontbtn settings-linkbtn",href:"https://github.com/handmux/handmux/issues",target:"_blank",rel:"noreferrer",children:V("settings.feedback_issues")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:261,columnNumber:13},this),Il().startsWith("zh")&&o.jsxDEV("a",{className:"fontbtn settings-linkbtn",href:"https://handmux.com/#community",target:"_blank",rel:"noreferrer",children:V("settings.feedback_group")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:263,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:260,columnNumber:11},this),o.jsxDEV("div",{className:"settings-hint",children:V("settings.feedback_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:266,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:258,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"settings-label",children:V("settings.push_notifications")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:270,columnNumber:11},this),$l()?o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-btns",children:[o.jsxDEV("button",{className:"fontbtn",onClick:wt,disabled:W,"aria-pressed":se,children:V(se?"settings.notify_on":"settings.notify_enable")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:274,columnNumber:17},this),W&&o.jsxDEV("span",{className:"spinner",role:"status","aria-label":V("settings.processing")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:277,columnNumber:32},this),!W&&Y&&o.jsxDEV("span",{className:"settings-note",children:Y},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:278,columnNumber:46},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:273,columnNumber:15},this),o.jsxDEV("div",{className:"settings-hint",children:V("settings.push_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:280,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:272,columnNumber:13},this):o.jsxDEV("div",{className:"settings-value",style:{display:"block"},children:V("settings.push_unsupported")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:283,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:269,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"settings-label",children:V("settings.script_push")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:288,columnNumber:11},this),o.jsxDEV("div",{className:"settings-btns",children:[o.jsxDEV("button",{className:"fontbtn",onClick:Ae,disabled:!$l(),children:V("settings.script_push_open")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:290,columnNumber:13},this),o.jsxDEV("button",{className:"fontbtn push-inbox-entry",onClick:C,children:[V("pushInbox.title"),S&&o.jsxDEV("span",{className:"push-inbox-entry-dot","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:293,columnNumber:31},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:291,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:289,columnNumber:11},this),o.jsxDEV("div",{className:"settings-hint",children:V("settings.script_push_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:296,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:287,columnNumber:9},this),o.jsxDEV("div",{className:"settings-group",children:V("settings.group_session")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:299,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"settings-label",children:V("settings.screen_cols")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:302,columnNumber:11},this),o.jsxDEV("div",{className:"settings-btns cols-btns",children:[o.jsxDEV("button",{className:"fontbtn col-step",onClick:()=>Mt(-10),children:"−10"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:304,columnNumber:13},this),o.jsxDEV("button",{className:"fontbtn col-step col-fine",onClick:()=>Mt(-1),children:"−1"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:305,columnNumber:13},this),o.jsxDEV("span",{className:"settings-value",children:Qt},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:306,columnNumber:13},this),o.jsxDEV("button",{className:"fontbtn col-step col-fine",onClick:()=>Mt(1),children:"+1"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:307,columnNumber:13},this),o.jsxDEV("button",{className:"fontbtn col-step",onClick:()=>Mt(10),children:"+10"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:308,columnNumber:13},this),o.jsxDEV("button",{className:"fontbtn",onClick:Ft,children:["↺ ",V("settings.cols_restore")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:309,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:303,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:301,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"settings-label",children:V(p?"settings.preview_site":"settings.preview_static_site")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:314,columnNumber:11},this),l?o.jsxDEV("div",{className:"preview-active",children:[o.jsxDEV("div",{className:"preview-active-head",children:[o.jsxDEV("span",{className:"preview-running",children:[o.jsxDEV("span",{className:"live-dot"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:318,columnNumber:51},this),l.kind==="dynamic"?V("settings.preview_running_dynamic"):V("settings.preview_running_static")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:318,columnNumber:17},this),o.jsxDEV("span",{className:"preview-remain-s",title:V("settings.preview_remain_title"),children:V("settings.preview_remain",{time:uS(je)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:319,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:317,columnNumber:15},this),o.jsxDEV("div",{className:"settings-btns",children:[o.jsxDEV("button",{className:"fontbtn",onClick:()=>{M==null||M(),s==null||s()},children:V("common.open")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:322,columnNumber:17},this),o.jsxDEV("button",{className:"fontbtn",onClick:()=>D==null?void 0:D(),children:V("settings.preview_renew")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:323,columnNumber:17},this),Ge?o.jsxDEV(o.Fragment,{children:[o.jsxDEV("button",{className:"fontbtn preview-confirm-danger",onClick:()=>{re(!1),L==null||L()},children:V("settings.preview_confirm_stop")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:326,columnNumber:21},this),o.jsxDEV("button",{className:"fontbtn",onClick:()=>re(!1),children:V("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:327,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:325,columnNumber:19},this):o.jsxDEV("button",{className:"fontbtn",onClick:()=>re(!0),children:V("settings.preview_stop")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:330,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:321,columnNumber:15},this),o.jsxDEV("div",{className:"settings-hint",children:[V("settings.preview_name",{name:l.name}),l.kind==="dynamic"?V("settings.preview_port",{port:l.port}):l.dir?`(${l.dir})`:""]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:333,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:316,columnNumber:13},this):o.jsxDEV("div",{className:"preview-start",children:[o.jsxDEV("div",{className:"preview-seg",role:"tablist","aria-label":V("settings.preview_type"),children:[o.jsxDEV("button",{role:"tab",className:bt==="off"?"on":"","aria-selected":bt==="off",onClick:()=>Gt("off"),children:V("settings.preview_off")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:342,columnNumber:17},this),o.jsxDEV("button",{role:"tab",className:bt==="static"?"on":"","aria-selected":bt==="static",onClick:()=>Gt("static"),children:V("settings.preview_static")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:343,columnNumber:17},this),p&&o.jsxDEV("button",{role:"tab",className:bt==="dynamic"?"on":"","aria-selected":bt==="dynamic",onClick:()=>{Ye(""),Gt("dynamic")},children:V("settings.preview_dynamic")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:345,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:341,columnNumber:15},this),bt==="off"&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-hint",children:V(p?"settings.preview_off_hint_both":"settings.preview_off_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:350,columnNumber:19},this),!p&&o.jsxDEV("div",{className:"settings-hint preview-dynamic-disabled",children:V("settings.preview_dynamic_disabled")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:352,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:349,columnNumber:17},this),bt==="static"&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-btns",children:o.jsxDEV("button",{className:"fontbtn",onClick:He,children:V("settings.preview_pick_dir")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:359,columnNumber:21},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:358,columnNumber:19},this),o.jsxDEV("div",{className:"settings-hint",children:V("settings.preview_static_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:361,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:357,columnNumber:17},this),bt==="dynamic"&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-btns",children:[o.jsxDEV("input",{className:"preview-port",type:"number",inputMode:"numeric",min:"1",max:"65535",placeholder:V("settings.preview_port_placeholder"),value:Ee,onChange:it=>{Te(it.target.value),Ye("")},"aria-label":V("settings.preview_port_label")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:367,columnNumber:21},this),o.jsxDEV("button",{className:"fontbtn",disabled:!Ee||ge,onClick:be,children:V(ge?"settings.preview_starting":"settings.preview_start")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:369,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:366,columnNumber:19},this),We?o.jsxDEV("div",{className:"settings-hint settings-err",children:We},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:372,columnNumber:23},this):o.jsxDEV("div",{className:"settings-hint",children:V("settings.preview_dynamic_hint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:373,columnNumber:23},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:365,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:340,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:313,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:129,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:123,columnNumber:7},this),o.jsxDEV(Wu,{open:Qe,seedCwd:Nt,pane:v,hint:V("settings.dir_picker_hint"),onPick:it=>{st(!1),k==null||k(it),s==null||s()},onClose:()=>st(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:381,columnNumber:7},this),o.jsxDEV(T4,{open:de,pushKey:Ue,notifyOn:se,onClose:()=>Ie(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:389,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Settings.jsx",lineNumber:121,columnNumber:5},this)}function c1(r){return r===300?V("usage.win5h"):r===10080?V("usage.winWeekly"):r===43200?V("usage.winMonthly"):r>0?V("usage.winGeneric",{h:Math.round(r/60)}):""}function _m(r,s){if(!r)return"";const d=r-Math.floor(s/1e3);if(d<=0)return V("usage.resetSoon");const _=Math.floor(d/86400),E=Math.floor(d%86400/3600),R=Math.floor(d%3600/60),b=_>0?`${_}d ${E}h`:E>0?`${E}h ${R}m`:`${R}m`;return V("usage.resetIn",{t:b})}function iC({at:r,now:s}){if(!r)return null;const d=Math.max(0,Math.floor((s-r)/1e3)),_=d<60?V("usage.updatedNow"):d<3600?V("usage.updatedMin",{n:Math.floor(d/60)}):d<86400?V("usage.updatedHr",{n:Math.floor(d/3600)}):V("usage.updatedDay",{n:Math.floor(d/86400)});return o.jsxDEV("div",{className:"usage-updated",children:_},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:38,columnNumber:10},this)}function Hl(r,s,d){if(!r||!s)return null;const _=r-Math.floor(d/1e3);return Math.max(0,Math.min(100,(1-_/(s*60))*100))}function M4({pct:r,timePct:s}){const d=Math.max(0,Math.min(100,r??0)),_=d>=80?"hi":d>=50?"mid":"lo";return o.jsxDEV("div",{className:"usage-bar",children:[o.jsxDEV("div",{className:`usage-bar-fill lvl-${_}`,style:{width:`${d}%`}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:54,columnNumber:7},this),s!=null&&o.jsxDEV("div",{className:"usage-bar-time",style:{left:`${s}%`},title:V("usage.timeMark")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:55,columnNumber:27},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:53,columnNumber:5},this)}function zl({label:r,pct:s,reset:d,sub:_,timePct:E}){return o.jsxDEV("div",{className:"usage-row",children:[o.jsxDEV("div",{className:"usage-row-head",children:[o.jsxDEV("span",{className:"usage-row-label",children:[r,_&&o.jsxDEV("span",{className:"usage-row-sub",children:[" · ",_]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:64,columnNumber:58},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:64,columnNumber:9},this),o.jsxDEV("span",{className:"usage-row-pct",children:[Math.round(s),"%"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:65,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:63,columnNumber:7},this),o.jsxDEV(M4,{pct:s,timePct:E},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:67,columnNumber:7},this),d&&o.jsxDEV("div",{className:"usage-row-reset",children:d},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:68,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:62,columnNumber:5},this)}function A4({claude:r,now:s}){var d,_;return o.jsxDEV("section",{className:"usage-agent",children:[o.jsxDEV("div",{className:"usage-agent-head",children:[o.jsxDEV(Do,{agent:"claude"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:76,columnNumber:41},this),o.jsxDEV("span",{children:"Claude Code"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:76,columnNumber:69},this),o.jsxDEV(iC,{at:r==null?void 0:r.updatedAt,now:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:76,columnNumber:93},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:76,columnNumber:7},this),r?!((d=r.rateLimits)!=null&&d.fiveHour)&&!((_=r.rateLimits)!=null&&_.sevenDay)?o.jsxDEV("div",{className:"usage-empty",children:V("usage.claudePending")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:83,columnNumber:9},this):o.jsxDEV(o.Fragment,{children:[r.rateLimits.fiveHour&&o.jsxDEV(zl,{label:V("usage.win5h"),pct:r.rateLimits.fiveHour.usedPercent,reset:_m(r.rateLimits.fiveHour.resetsAt,s),timePct:Hl(r.rateLimits.fiveHour.resetsAt,300,s)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:87,columnNumber:13},this),r.rateLimits.sevenDay&&o.jsxDEV(zl,{label:V("usage.winWeekly"),pct:r.rateLimits.sevenDay.usedPercent,reset:_m(r.rateLimits.sevenDay.resetsAt,s),timePct:Hl(r.rateLimits.sevenDay.resetsAt,10080,s)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:92,columnNumber:13},this),r.rateLimits.sevenDayOpus&&o.jsxDEV(zl,{label:V("usage.winWeekly"),sub:"Opus",pct:r.rateLimits.sevenDayOpus.usedPercent,timePct:Hl(r.rateLimits.sevenDayOpus.resetsAt,10080,s)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:97,columnNumber:13},this),r.rateLimits.sevenDaySonnet&&o.jsxDEV(zl,{label:V("usage.winWeekly"),sub:"Sonnet",pct:r.rateLimits.sevenDaySonnet.usedPercent,timePct:Hl(r.rateLimits.sevenDaySonnet.resetsAt,10080,s)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:101,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:85,columnNumber:9},this):o.jsxDEV("div",{className:"usage-empty",children:[o.jsxDEV("div",{children:V("usage.claudeOff")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:79,columnNumber:11},this),o.jsxDEV("code",{className:"usage-code",children:"handmux hooks install"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:80,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:78,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:75,columnNumber:5},this)}function U4({codex:r,now:s}){const d=r==null?void 0:r.rateLimits;return o.jsxDEV("section",{className:"usage-agent",children:[o.jsxDEV("div",{className:"usage-agent-head",children:[o.jsxDEV(Do,{agent:"codex"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:114,columnNumber:41},this),o.jsxDEV("span",{children:"Codex CLI"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:114,columnNumber:68},this),o.jsxDEV(iC,{at:r==null?void 0:r.updatedAt,now:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:114,columnNumber:90},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:114,columnNumber:7},this),r?o.jsxDEV(o.Fragment,{children:[(d==null?void 0:d.primary)&&o.jsxDEV(zl,{label:c1(d.primary.windowMinutes)||V("usage.winPrimary"),pct:d.primary.usedPercent,reset:_m(d.primary.resetsAt,s),timePct:Hl(d.primary.resetsAt,d.primary.windowMinutes,s)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:120,columnNumber:13},this),(d==null?void 0:d.secondary)&&o.jsxDEV(zl,{label:c1(d.secondary.windowMinutes)||V("usage.winSecondary"),pct:d.secondary.usedPercent,reset:_m(d.secondary.resetsAt,s),timePct:Hl(d.secondary.resetsAt,d.secondary.windowMinutes,s)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:125,columnNumber:13},this),!(d!=null&&d.primary)&&!(d!=null&&d.secondary)&&o.jsxDEV("div",{className:"usage-empty",children:V("usage.codexNoQuota")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:129,columnNumber:46},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:118,columnNumber:9},this):o.jsxDEV("div",{className:"usage-empty",children:V("usage.codexOff")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:116,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:113,columnNumber:5},this)}function O4({open:r,onClose:s,onAuthFail:d}){const[_,E]=U.useState(null),[R,b]=U.useState(""),[a,u]=U.useState(!1),g=Date.now();return U.useEffect(()=>{if(!r)return;let x=!1;return u(!0),b(""),pA().then(h=>{x||(E(h),u(!1))}).catch(h=>{x||(h instanceof tr?d==null||d():b(V("usage.loadFailed")),u(!1))}),()=>{x=!0}},[r]),r?o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-backdrop",onClick:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:161,columnNumber:7},this),o.jsxDEV("div",{className:"settings-card usage-card",role:"dialog","aria-label":V("usage.title"),"aria-modal":"true",children:[o.jsxDEV("div",{className:"settings-head",children:[o.jsxDEV("span",{className:"settings-title",children:V("usage.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:164,columnNumber:11},this),o.jsxDEV("span",{className:"usage-head-note",children:V("usage.activityNote")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:165,columnNumber:11},this),o.jsxDEV("button",{className:"settings-close",onClick:s,"aria-label":V("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:166,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:163,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:a&&!_?o.jsxDEV("div",{className:"usage-empty",children:V("common.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:170,columnNumber:13},this):R?o.jsxDEV("div",{className:"bind-error",children:R},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:172,columnNumber:13},this):_?o.jsxDEV(o.Fragment,{children:[_.codex&&o.jsxDEV(U4,{codex:_.codex,now:g},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:175,columnNumber:30},this),o.jsxDEV(A4,{claude:_.claude,now:g},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:176,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:174,columnNumber:13},this):null},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:168,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:162,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UsagePage.jsx",lineNumber:160,columnNumber:5},this):null}function V4({rows:r,top:s,open:d,onToggle:_,onClose:E,onSelectRow:R,onMarkAllRead:b,hooksStatus:a,onEnableHooks:u}){const g=[];for(const p of r){const N=g[g.length-1];N&&N.session===p.session?N.items.push(p):g.push({session:p.session,items:[p]})}const x=Date.now(),h=r.some(p=>p.view==="done"),f=y3(r),[S,C]=U.useState(!1),[y,l]=U.useState(!1),v=g.length===0&&a==="absent",m=async()=>{C(!0),l(!1);try{const p=await(u==null?void 0:u());(!p||p.status!=="installed")&&l(!0)}catch{l(!0)}finally{C(!1)}};return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("button",{className:"topbar-icon inbox-btn",onClick:_,"aria-label":V("inbox.title"),title:V("inbox.title"),children:[o.jsxDEV(QA,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:36,columnNumber:9},this),s&&o.jsxDEV("span",{className:`inbox-dot ${s}`,"aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:37,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:35,columnNumber:7},this),d&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"inbox-backdrop",onClick:E},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:41,columnNumber:11},this),o.jsxDEV("div",{className:"inbox-panel",role:"dialog","aria-label":V("inbox.title"),children:[o.jsxDEV("div",{className:"inbox-head",children:[o.jsxDEV("span",{children:V("inbox.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:44,columnNumber:15},this),o.jsxDEV("div",{className:"inbox-summary",children:[o.jsxDEV("span",{className:"inbox-chip working",children:[V("inbox.working")," ",f.working]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:47,columnNumber:17},this),o.jsxDEV("span",{className:"inbox-chip done",children:[V("inbox.done")," ",f.done]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:48,columnNumber:17},this),o.jsxDEV("span",{className:"inbox-chip needs",children:[V("inbox.needs")," ",f.needs]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:49,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:46,columnNumber:15},this),h&&o.jsxDEV("button",{className:"inbox-readall",onClick:b,children:V("inbox.clearDone")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:51,columnNumber:27},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:43,columnNumber:13},this),g.length===0?v?o.jsxDEV("div",{className:"inbox-empty inbox-enable",children:[o.jsxDEV("div",{className:"inbox-enable-title",children:V("inbox.enableTitle")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:56,columnNumber:19},this),o.jsxDEV("div",{className:"inbox-enable-hint",children:V("inbox.enableHint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:57,columnNumber:19},this),o.jsxDEV("button",{className:"inbox-enable-btn",onClick:m,disabled:S,children:V(S?"inbox.enabling":"inbox.enableBtn")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:58,columnNumber:19},this),y&&o.jsxDEV("div",{className:"inbox-enable-err",children:V("inbox.enableFailed")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:61,columnNumber:33},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:55,columnNumber:17},this):o.jsxDEV("div",{className:"inbox-empty",children:V("inbox.empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:64,columnNumber:17},this):g.map(p=>o.jsxDEV("div",{className:"inbox-group",children:[o.jsxDEV("div",{className:"inbox-group-title",children:p.session},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:68,columnNumber:17},this),p.items.map(N=>o.jsxDEV("button",{className:"inbox-row",onClick:()=>R(N),children:[o.jsxDEV("div",{className:"inbox-row-head",children:[o.jsxDEV("span",{className:`inbox-chip ${N.view}`,children:_3[N.view]},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:72,columnNumber:23},this),o.jsxDEV(Do,{agent:N.agent},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:73,columnNumber:23},this),o.jsxDEV("span",{className:"inbox-loc",children:N.windowName||N.window},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:74,columnNumber:23},this),o.jsxDEV("span",{className:"inbox-time",children:hS(N.ts,x)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:75,columnNumber:23},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:71,columnNumber:21},this),N.msg&&o.jsxDEV("div",{className:"inbox-msg",children:N.msg},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:77,columnNumber:31},this)]},N.pane,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:70,columnNumber:19},this))]},p.session,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:67,columnNumber:15},this))]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:42,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:40,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Inbox.jsx",lineNumber:34,columnNumber:5},this)}function P4({open:r,orphan:s,onConfirm:d,onClose:_,inset:E=0}){var p;const[R,b]=U.useState([]),[a,u]=U.useState("new"),[g,x]=U.useState(""),[h,f]=U.useState(!0),[S,C]=U.useState(!1),[y,l]=U.useState("");if(U.useEffect(()=>{r&&(u("new"),x((s==null?void 0:s.suggestedName)||""),f(WM()),C(!1),l(""),Fl().then(N=>b(Array.isArray(N)?N:[])).catch(()=>b([])))},[r,s]),!r||!s)return null;const v=a==="new"?g.trim()||s.suggestedName||"":((p=R.find(N=>N.id===a))==null?void 0:p.name)||"",m=async()=>{if(S)return;C(!0),l(""),GM(h);const N=a==="new"?{mode:"new"}:{mode:"window",session:a};try{await d({target:N,kill:h,name:a==="new"?g.trim():void 0})}catch{C(!1),l(V("inbox.orphans.failed"))}};return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-backdrop",onClick:_},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:44,columnNumber:7},this),o.jsxDEV("div",{className:"settings-card",style:{transform:`translate(-50%, calc(-50% + ${E/2}px))`},role:"dialog","aria-label":V("inbox.orphans.takeover"),"aria-modal":"true",children:[o.jsxDEV("div",{className:"settings-head",children:[o.jsxDEV("span",{className:"settings-title",children:V("inbox.orphans.takeover")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:51,columnNumber:11},this),o.jsxDEV("button",{className:"settings-close",onClick:_,"aria-label":V("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:52,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:50,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"opt",children:[o.jsxDEV("div",{className:"settings-label",children:s.cwdLabel||s.cwd},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:56,columnNumber:13},this),s.snippet&&o.jsxDEV("div",{className:"inbox-msg",children:s.snippet},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:57,columnNumber:32},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:55,columnNumber:11},this),o.jsxDEV("div",{className:"opt",children:[o.jsxDEV("div",{className:"settings-label",children:V("inbox.orphans.targetLabel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:60,columnNumber:13},this),o.jsxDEV("div",{className:"orphan-targets",children:[o.jsxDEV("button",{className:"fontbtn","aria-pressed":a==="new",onClick:()=>u("new"),children:V("inbox.orphans.targetNew")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:62,columnNumber:15},this),R.map(N=>o.jsxDEV("button",{className:"fontbtn","aria-pressed":a===N.id,onClick:()=>u(N.id),children:N.name},N.id,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:66,columnNumber:17},this))]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:61,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:59,columnNumber:11},this),a==="new"&&o.jsxDEV("div",{className:"opt",children:[o.jsxDEV("div",{className:"settings-label",children:V("inbox.orphans.nameLabel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:74,columnNumber:15},this),o.jsxDEV("input",{className:"bind-input",value:g,placeholder:V("bind.invalidName"),onChange:N=>{x(N.target.value),l("")}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:75,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:73,columnNumber:13},this),o.jsxDEV("div",{className:"opt",children:[o.jsxDEV("div",{className:"settings-label",children:V("inbox.orphans.killTitle")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:84,columnNumber:13},this),o.jsxDEV("div",{className:"orphan-targets orphan-kill",children:[o.jsxDEV("button",{className:"fontbtn","aria-pressed":h,onClick:()=>f(!0),children:[V("inbox.orphans.killEnd"),o.jsxDEV("span",{className:"orphan-reco",children:V("inbox.orphans.recommended")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:87,columnNumber:45},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:86,columnNumber:15},this),o.jsxDEV("button",{className:"fontbtn","aria-pressed":!h,onClick:()=>f(!1),children:V("inbox.orphans.killKeep")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:89,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:85,columnNumber:13},this),o.jsxDEV("div",{className:"orphan-help",children:V("inbox.orphans.killWhy")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:93,columnNumber:13},this),o.jsxDEV("div",{className:"orphan-help",children:[V("inbox.orphans.reopenPre")," ",o.jsxDEV("code",{className:"orphan-cmd",children:["handmux open ",v||V("inbox.orphans.namePlaceholder")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:96,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:94,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:83,columnNumber:11},this),y&&o.jsxDEV("div",{className:"bind-error",children:y},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:99,columnNumber:21},this),o.jsxDEV("div",{className:"settings-btns bind-actions",children:[o.jsxDEV("button",{className:"fontbtn",onClick:_,children:V("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:101,columnNumber:13},this),o.jsxDEV("button",{className:"fontbtn bind-confirm",onClick:m,disabled:S,children:V(S?"inbox.orphans.working":"inbox.orphans.takeover")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:102,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:100,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:54,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:45,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/OrphanTakeoverSheet.jsx",lineNumber:43,columnNumber:5},this)}const u1="tw_a2hs_dismissed",Hu=()=>typeof navigator<"u"&&navigator.userAgent||"",tm=()=>/iP(hone|ad|od)/.test(Hu())||/Macintosh/.test(Hu())&&typeof navigator<"u"&&navigator.maxTouchPoints>1,B4=()=>/Android/.test(Hu()),I4=()=>tm()&&/Safari/.test(Hu())&&!/(CriOS|FxiOS|EdgiOS|OPiOS|mercury|GSA)/.test(Hu());function F4(){const[r,s]=U.useState(!1),[d,_]=U.useState(null);if(U.useEffect(()=>{if(pS()||!tm()&&!B4())return;try{if(localStorage.getItem(u1)==="1")return}catch{}const g=x=>{x.preventDefault(),_(x)};return window.addEventListener("beforeinstallprompt",g),s(!0),()=>window.removeEventListener("beforeinstallprompt",g)},[]),!r)return null;const E=()=>{try{localStorage.setItem(u1,"1")}catch{}s(!1)},R=async()=>{if(d){d.prompt();try{await d.userChoice}catch{}E()}};let b,a,u=null;return d?(b="install",a=V("a2hs.lead"),u=o.jsxDEV("button",{className:"a2hs-banner-cta",onClick:R,children:V("a2hs.install")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/AddToHome.jsx",lineNumber:54,columnNumber:11},this)):tm()&&!I4()?(b="ios-other",a=V("a2hs.iosOpenSafari")):tm()?(b="ios",a=V("a2hs.iosHint")):(b="android",a=V("a2hs.androidManual")),o.jsxDEV("div",{className:"a2hs-banner",role:"status","aria-label":V("a2hs.title"),"data-mode":b,children:[o.jsxDEV("span",{className:"a2hs-banner-icon","aria-hidden":"true",children:"⊕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/AddToHome.jsx",lineNumber:65,columnNumber:7},this),o.jsxDEV("div",{className:"a2hs-banner-txt",children:[o.jsxDEV("span",{className:"a2hs-banner-title",children:V("a2hs.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/AddToHome.jsx",lineNumber:67,columnNumber:9},this),o.jsxDEV("span",{className:"a2hs-banner-sub",children:a},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/AddToHome.jsx",lineNumber:68,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/AddToHome.jsx",lineNumber:66,columnNumber:7},this),u,o.jsxDEV("button",{className:"a2hs-banner-x",onClick:E,"aria-label":V("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/AddToHome.jsx",lineNumber:71,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/AddToHome.jsx",lineNumber:64,columnNumber:5},this)}const h_="tw_claude_hooks";function H4(){try{return localStorage.getItem(h_)||null}catch{return null}}function z4(){const[r,s]=U.useState(H4);U.useEffect(()=>{let _=!0;return Promise.resolve().then(tS).then(E=>{if(!_)return;const R=(E==null?void 0:E.claudeHooks)||"installed";s(R);try{localStorage.setItem(h_,R)}catch{}}).catch(()=>{}),()=>{_=!1}},[]);const d=U.useCallback(async()=>{const _=await AA();if(_!=null&&_.status){s(_.status);try{localStorage.setItem(h_,_.status)}catch{}}return _},[]);return{status:r,enable:d}}function $4({value:r,options:s,onChange:d,ariaLabel:_}){const[E,R]=U.useState(!1),b=U.useRef(null),a=s.find(u=>u.value===r)||s[0];return U.useEffect(()=>{if(!E)return;const u=g=>{var x;(x=b.current)!=null&&x.contains(g.target)||R(!1)};return document.addEventListener("pointerdown",u,!0),()=>document.removeEventListener("pointerdown",u,!0)},[E]),o.jsxDEV("div",{className:"dd",ref:b,children:[o.jsxDEV("button",{type:"button",className:"field dd-trigger","aria-haspopup":"listbox","aria-expanded":E,"aria-label":_,onClick:()=>R(u=>!u),children:[o.jsxDEV("span",{className:"dd-value",children:a==null?void 0:a.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Dropdown.jsx",lineNumber:30,columnNumber:9},this),o.jsxDEV("span",{className:`dd-caret${E?" open":""}`,"aria-hidden":"true",children:"▾"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Dropdown.jsx",lineNumber:31,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Dropdown.jsx",lineNumber:22,columnNumber:7},this),E&&o.jsxDEV("div",{className:"dd-menu",role:"listbox",children:s.map(u=>o.jsxDEV("button",{type:"button",role:"option","aria-selected":u.value===r,className:`dd-option${u.value===r?" is-selected":""}`,onClick:()=>{d==null||d(u.value),R(!1)},children:[o.jsxDEV("span",{className:"dd-option-label",children:u.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Dropdown.jsx",lineNumber:44,columnNumber:15},this),u.value===r&&o.jsxDEV("span",{className:"dd-check","aria-hidden":"true",children:"✓"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Dropdown.jsx",lineNumber:45,columnNumber:37},this)]},u.value||"__none__",!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Dropdown.jsx",lineNumber:36,columnNumber:13},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Dropdown.jsx",lineNumber:34,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Dropdown.jsx",lineNumber:21,columnNumber:5},this)}const rC=[{value:"",label:V("startup.preset_shell")},{value:"claude",label:V("startup.preset_claude")},{value:"claude --continue",label:V("startup.preset_claude_continue")},{value:"codex",label:V("startup.preset_codex")}],nm="__custom__",W4=[...rC,{value:nm,label:V("startup.custom")}];function sC({value:r="",onChange:s}){const d=rC.some(g=>g.value===r),[_,E]=U.useState(d?r:nm),[R,b]=U.useState(d?"":r),a=g=>{E(g),s==null||s(g===nm?R:g)},u=g=>{const x=g.target.value;b(x),s==null||s(x)};return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-label",children:V("startup.label")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/StartupCmdPicker.jsx",lineNumber:29,columnNumber:7},this),o.jsxDEV($4,{value:_,options:W4,onChange:a,ariaLabel:V("startup.aria")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/StartupCmdPicker.jsx",lineNumber:30,columnNumber:7},this),_===nm&&o.jsxDEV("input",{className:"bind-input startup-custom",value:R,placeholder:V("startup.custom_placeholder"),onChange:u,autoCapitalize:"off",autoCorrect:"off",spellCheck:!1},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/StartupCmdPicker.jsx",lineNumber:32,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/StartupCmdPicker.jsx",lineNumber:28,columnNumber:5},this)}const G4=/^[A-Za-z0-9-]{1,16}$/;function q4({open:r,onClose:s,onBound:d,bound:_,onAuthFail:E,inset:R=0}){const[b,a]=U.useState([]),[u,g]=U.useState("new"),[x,h]=U.useState(null),[f,S]=U.useState(""),[C,y]=U.useState(""),[l,v]=U.useState(!1),[m,p]=U.useState(null),[N,k]=U.useState($1()),[j,M]=U.useState(!1),D=U.useRef(null);if(U.useEffect(()=>{r&&(S(""),y(""),v(!1),p(null),M(!1),g("new"),h("new"),Fl().then(O=>{const I=Array.isArray(O)?O:[];a(I),I.some(G=>!_.includes(G.name))&&(g("existing"),h(null))}).catch(O=>{O instanceof tr?E==null||E():y(V("bind.checkFailed"))}))},[r]),U.useEffect(()=>{x==="new"&&setTimeout(()=>{var O;return(O=D.current)==null?void 0:O.focus()},0)},[x]),!r)return null;const L=b.filter(O=>!_.includes(O.name)),A=async()=>{if(l||!x)return;if(x!=="new"){d(x);return}const O=f.trim();if(O){if(_.includes(O)||b.some(I=>I.name===O)){y(V("bind.alreadyExists"));return}if(!G4.test(O)){y(V("bind.invalidName"));return}v(!0),y(""),W1(N);try{await SA(O,m||void 0,N||void 0),d(O)}catch(I){I instanceof tr?E==null||E():y(V("bind.createFailed")),v(!1)}}},F=V(x==="new"?l?"bind.creating":"bind.createAndOpen":l?"bind.checking":"bind.bind");return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-backdrop",onClick:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:79,columnNumber:7},this),o.jsxDEV("div",{className:"settings-card",style:{transform:`translate(-50%, calc(-50% + ${R/2}px))`},role:"dialog","aria-label":V("bind.title"),"aria-modal":"true",children:[o.jsxDEV("div",{className:"settings-head",children:[o.jsxDEV("span",{className:"settings-title",children:V("bind.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:89,columnNumber:11},this),o.jsxDEV("button",{className:"settings-close",onClick:s,"aria-label":V("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:90,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:88,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"opt",children:o.jsxDEV("div",{className:"bind-mode",role:"tablist","aria-label":V("bind.pickSession"),children:[o.jsxDEV("button",{className:"seg",role:"tab","aria-pressed":u==="new",onClick:()=>{g("new"),h("new"),y("")},children:V("bind.modeNew")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:97,columnNumber:15},this),o.jsxDEV("button",{className:"seg",role:"tab","aria-pressed":u==="existing",disabled:!L.length,onClick:()=>{g("existing"),h(null),y("")},children:V("bind.modeExisting")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:103,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:96,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:93,columnNumber:11},this),u==="existing"&&o.jsxDEV("div",{className:"opt",children:[o.jsxDEV("div",{className:"settings-label",children:V("bind.pickSession")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:113,columnNumber:15},this),o.jsxDEV("div",{className:"orphan-targets",children:L.map(O=>o.jsxDEV("button",{className:"fontbtn","aria-pressed":x===O.name,onClick:()=>{h(O.name),y("")},children:O.name},O.id||O.name,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:116,columnNumber:19},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:114,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:112,columnNumber:13},this),u==="new"&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"opt",children:[o.jsxDEV("div",{className:"settings-label",children:V("bind.sessionName")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:131,columnNumber:17},this),o.jsxDEV("input",{ref:D,className:"bind-input",value:f,placeholder:V("bind.invalidName"),onChange:O=>{S(O.target.value),y("")},onKeyDown:O=>{O.key==="Enter"&&A()}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:132,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:130,columnNumber:15},this),o.jsxDEV("div",{className:"opt",children:[o.jsxDEV("div",{className:"settings-label",children:V("bind.startDir")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:142,columnNumber:17},this),o.jsxDEV("button",{type:"button",className:"field cwd-field",onClick:()=>M(!0),children:[o.jsxDEV("span",{className:"cwd-path",children:m||V("bind.homeDirDefault")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:144,columnNumber:19},this),o.jsxDEV("span",{className:"cwd-action",children:V("bind.choose")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:145,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:143,columnNumber:17},this),m&&o.jsxDEV("button",{type:"button",className:"cwd-reset",onClick:()=>p(null),children:V("bind.reset")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:147,columnNumber:25},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:141,columnNumber:15},this),o.jsxDEV("div",{className:"opt",children:o.jsxDEV(sC,{value:N,onChange:k},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:150,columnNumber:17},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:149,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:129,columnNumber:13},this),C&&o.jsxDEV("div",{className:"bind-error",children:C},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:154,columnNumber:21},this),o.jsxDEV("div",{className:"settings-hint",children:V("bind.desktopHint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:157,columnNumber:11},this),o.jsxDEV("div",{className:"settings-btns bind-actions",children:[o.jsxDEV("button",{className:"fontbtn",onClick:s,children:V("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:159,columnNumber:13},this),o.jsxDEV("button",{className:"fontbtn bind-confirm",onClick:A,disabled:l||!x,children:F},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:160,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:158,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:92,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:83,columnNumber:7},this),o.jsxDEV(Wu,{open:j,seedCwd:m,allowMkdir:!0,onPick:O=>{p(O),M(!1)},onClose:()=>M(!1),inset:R},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:166,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/BindSession.jsx",lineNumber:78,columnNumber:5},this)}const Y4=/^[A-Za-z0-9-]{1,16}$/;function K4({open:r,onClose:s,onCreate:d,paneId:_,inset:E=0}){const[R,b]=U.useState(""),[a,u]=U.useState(""),[g,x]=U.useState(!1),[h,f]=U.useState(null),[S,C]=U.useState(""),[y,l]=U.useState($1()),[v,m]=U.useState(!1),p=U.useRef(null);if(U.useEffect(()=>{r&&(b(""),u(""),x(!1),f(null),C(""),m(!1),setTimeout(()=>{var k;return(k=p.current)==null?void 0:k.focus()},0),_&&jo(_).then(({cwd:k})=>C(k||"")).catch(()=>{}))},[r,_]),!r)return null;const N=async()=>{if(g)return;const k=R.trim();if(k&&!Y4.test(k)){u(V("newwindow.name_rule"));return}x(!0),u(""),W1(y);try{await d(k,h||void 0,y||void 0)}catch{x(!1)}};return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-backdrop",onClick:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:49,columnNumber:7},this),o.jsxDEV("div",{className:"settings-card",style:{transform:`translate(-50%, calc(-50% + ${E/2}px))`},role:"dialog","aria-label":V("newwindow.title"),"aria-modal":"true",children:[o.jsxDEV("div",{className:"settings-head",children:[o.jsxDEV("span",{className:"settings-title",children:V("newwindow.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:56,columnNumber:11},this),o.jsxDEV("button",{className:"settings-close",onClick:s,"aria-label":V("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:57,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:55,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"opt",children:[o.jsxDEV("div",{className:"settings-label",children:V("newwindow.window_name")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:61,columnNumber:13},this),o.jsxDEV("input",{ref:p,className:"bind-input",value:R,placeholder:V("newwindow.name_placeholder"),onChange:k=>{b(k.target.value),u("")},onKeyDown:k=>{k.key==="Enter"&&N()}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:62,columnNumber:13},this),a&&o.jsxDEV("div",{className:"bind-error",children:a},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:70,columnNumber:23},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:60,columnNumber:11},this),o.jsxDEV("div",{className:"opt",children:[o.jsxDEV("div",{className:"settings-label",children:V("newwindow.start_dir")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:73,columnNumber:13},this),o.jsxDEV("button",{type:"button",className:"field cwd-field",onClick:()=>m(!0),children:[o.jsxDEV("span",{className:"cwd-path",children:h||(S?V("newwindow.session_dir_named",{dir:S}):V("newwindow.session_dir_default"))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:75,columnNumber:15},this),o.jsxDEV("span",{className:"cwd-action",children:V("newwindow.choose")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:76,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:74,columnNumber:13},this),h&&o.jsxDEV("button",{type:"button",className:"cwd-reset",onClick:()=>f(null),children:V("newwindow.reset_to_session_dir")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:78,columnNumber:21},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:72,columnNumber:11},this),o.jsxDEV("div",{className:"opt",children:o.jsxDEV(sC,{value:y,onChange:l},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:81,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:80,columnNumber:11},this),o.jsxDEV("div",{className:"settings-btns bind-actions",children:[o.jsxDEV("button",{className:"fontbtn",onClick:s,children:V("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:84,columnNumber:13},this),o.jsxDEV("button",{className:"fontbtn bind-confirm",onClick:N,disabled:g,children:V(g?"newwindow.creating":"common.create")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:85,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:83,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:59,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:50,columnNumber:7},this),o.jsxDEV(Wu,{open:v,seedCwd:h||S||null,pane:_,allowMkdir:!0,onPick:k=>{f(k),m(!1)},onClose:()=>m(!1),inset:E},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:91,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/NewWindowModal.jsx",lineNumber:48,columnNumber:5},this)}const X4=/^[A-Za-z0-9-]{1,16}$/;function J4({open:r,title:s,currentName:d="",onClose:_,onSubmit:E,inset:R=0}){const[b,a]=U.useState(d),[u,g]=U.useState(""),[x,h]=U.useState(!1),f=U.useRef(null);if(U.useEffect(()=>{r&&(a(d),g(""),h(!1),setTimeout(()=>{var C;return(C=f.current)==null?void 0:C.focus()},0))},[r,d]),!r)return null;const S=async()=>{if(x)return;const C=b.trim();if(!X4.test(C)){g(V("rename.name_rule"));return}h(!0),g("");try{await E(C)}catch(y){g((y==null?void 0:y.message)||V("rename.failed")),h(!1)}};return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"settings-backdrop",onClick:_},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:36,columnNumber:7},this),o.jsxDEV("div",{className:"settings-card",style:{transform:`translate(-50%, calc(-50% + ${R/2}px))`},role:"dialog","aria-label":s,"aria-modal":"true",children:[o.jsxDEV("div",{className:"settings-head",children:[o.jsxDEV("span",{className:"settings-title",children:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:43,columnNumber:11},this),o.jsxDEV("button",{className:"settings-close",onClick:_,"aria-label":V("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:44,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:42,columnNumber:9},this),o.jsxDEV("div",{className:"settings-section",children:[o.jsxDEV("div",{className:"settings-label",children:V("rename.new_name")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:47,columnNumber:11},this),o.jsxDEV("input",{ref:f,className:"bind-input",value:b,placeholder:V("rename.name_rule"),onChange:C=>{a(C.target.value),g("")},onKeyDown:C=>{C.key==="Enter"&&S()}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:48,columnNumber:11},this),u&&o.jsxDEV("div",{className:"bind-error",children:u},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:56,columnNumber:21},this),o.jsxDEV("div",{className:"settings-btns bind-actions",children:[o.jsxDEV("button",{className:"fontbtn",onClick:_,children:V("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:58,columnNumber:13},this),o.jsxDEV("button",{className:"fontbtn bind-confirm",onClick:S,disabled:x,children:V(x?"rename.saving":"common.save")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:59,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:57,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:46,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:37,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/RenameModal.jsx",lineNumber:35,columnNumber:5},this)}function Z4({onOpenDoc:r,refreshKey:s=0}){const[d,_]=U.useState(()=>Mu()),E=b=>{JM(b),_(Mu())},R=U.useRef(!0);return U.useEffect(()=>{if(R.current){R.current=!1;return}_(Mu())},[s]),d.length===0?o.jsxDEV("div",{className:"home-view",children:o.jsxDEV("div",{className:"home-empty",children:[V("home.empty"),o.jsxDEV("span",{children:V("home.emptyHint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/HomeView.jsx",lineNumber:23,columnNumber:54},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/HomeView.jsx",lineNumber:23,columnNumber:9},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/HomeView.jsx",lineNumber:22,columnNumber:7},this):o.jsxDEV("div",{className:"home-view",children:d.map(b=>o.jsxDEV("div",{className:"home-recent-row",children:[o.jsxDEV("button",{className:"home-recent",onClick:()=>r(b.path),title:b.path,children:[o.jsxDEV("span",{className:"home-name",children:b.name},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/HomeView.jsx",lineNumber:32,columnNumber:13},this),o.jsxDEV("span",{className:"home-path",children:b.path},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/HomeView.jsx",lineNumber:33,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/HomeView.jsx",lineNumber:31,columnNumber:11},this),o.jsxDEV("button",{className:"home-x","aria-label":V("home.remove"),onClick:()=>E(b.path),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/HomeView.jsx",lineNumber:35,columnNumber:11},this)]},b.path,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/HomeView.jsx",lineNumber:30,columnNumber:9},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/HomeView.jsx",lineNumber:28,columnNumber:5},this)}const Q4=/[^\n]*?(?:[。!?…]+|[.!?]+(?=\s|$)|\n+|$)/gu,eV=/[。!?…]$|[.!?]$/;function tV(r,s){for(let d=r.parentNode;d&&d!==s;d=d.parentNode){const _=d.nodeName;if(_==="PRE"||_==="SCRIPT"||_==="STYLE"||_==="CODE")return!0}return!1}function nV(r){if(!r)return[];if(r.querySelector("span.tts-sent"))return iV(r);const s=document.createTreeWalker(r,NodeFilter.SHOW_TEXT,{acceptNode:a=>a.nodeValue&&a.nodeValue.trim()&&!tV(a,r)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}),d=[];for(;s.nextNode();)d.push(s.currentNode);const _=[],E=[];let R=0;for(const a of d){const u=a.ownerDocument.createDocumentFragment();for(const g of a.nodeValue.matchAll(Q4)){const x=g[0];if(x==="")continue;const h=a.ownerDocument.createElement("span");h.className="tts-sent",h.textContent=x,u.appendChild(h),(E[R]||(E[R]=[])).push(h),_[R]=(_[R]||"")+x,eV.test(x)&&R++}a.parentNode.replaceChild(u,a)}const b=[];return _.forEach((a,u)=>{const g=(a||"").replace(/\s+/g," ").trim();if(!g)return;const x=b.length;b.push(g);for(const h of E[u]||[])h.dataset.tts=String(x)}),b}function iV(r){const s=[];return r.querySelectorAll("span.tts-sent[data-tts]").forEach(d=>{const _=Number(d.dataset.tts);s[_]=(s[_]||"")+d.textContent}),s.map(d=>(d||"").replace(/\s+/g," ").trim())}const aC="tw_doc_rate",im=[1,1.25,1.5],d1=()=>{const r=Number(localStorage.getItem(aC));return im.includes(r)?r:1};function rV(){const r=typeof window<"u"&&window.speechSynthesis||null,[s,d]=U.useState({playing:!1,paused:!1,idx:-1}),[_,E]=U.useState(d1),R=U.useRef({sentences:[],idx:-1,playing:!1,rate:d1()});R.current.rate=_;const b=()=>((r==null?void 0:r.getVoices())||[]).find(S=>/^zh/i.test(S.lang))||null,a=S=>{const C=R.current;if(!r)return;if(S<0||S>=C.sentences.length){u();return}C.idx=S,d({playing:!0,paused:!1,idx:S});const y=new SpeechSynthesisUtterance(C.sentences[S]);y.rate=C.rate;const l=b();l?(y.voice=l,y.lang=l.lang):y.lang="zh-CN";const v=()=>{C.playing&&C.idx===S&&a(S+1)};y.onend=v,y.onerror=v,r.speak(y)},u=()=>{const S=R.current;S.playing=!1,S.idx=-1,r&&r.cancel(),d({playing:!1,paused:!1,idx:-1})},g=S=>{if(!r||!S||!S.length)return;r.cancel();const C=R.current;if(C.sentences=S,C.playing=!0,C.idx=-1,d({playing:!0,paused:!1,idx:-1}),r.getVoices().length){a(0);return}const y=()=>{r.removeEventListener("voiceschanged",y),C.playing&&C.idx===-1&&a(0)};r.addEventListener("voiceschanged",y),setTimeout(y,300)},x=()=>{r&&R.current.playing&&(r.pause(),d(S=>({...S,paused:!0})))},h=()=>{r&&R.current.playing&&(r.resume(),d(S=>({...S,paused:!1})))},f=()=>{const S=im[(im.indexOf(_)+1)%im.length]||1;localStorage.setItem(aC,String(S)),R.current.rate=S,E(S);const C=R.current;r&&C.playing&&C.idx>=0&&(r.cancel(),a(C.idx))};return U.useEffect(()=>()=>{R.current.playing=!1,r&&r.cancel()},[r]),{supported:!!r,playing:s.playing,paused:s.paused,idx:s.idx,rate:_,play:g,pause:x,resume:h,stop:u,cycleRate:f}}const h1=6,sV=500,m1=10,aV=300,f1=(r,s)=>Math.hypot(r.x-s.x,r.y-s.y);function oV({url:r,name:s}){const[d,_]=U.useState({s:1,x:0,y:0}),[E,R]=U.useState(""),[b,a]=U.useState(!1),u=U.useRef(d);u.current=d;const g=U.useRef(null),x=U.useRef(null),h=U.useRef(null),f=U.useRef(new Map),S=U.useRef(null),C=U.useRef(null),y=U.useRef(null),l=U.useRef({moved:!1,lpFired:!1,pinched:!1}),v=U.useRef(0);if(!r)return o.jsxDEV("div",{className:"doc-image-msg",children:V("imageviewer.loadFailed")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:39,columnNumber:20},this);const m=(O,I,G)=>{const ne=x.current,ee=h.current;if(!ne||!ee)return{x:I,y:G};const te=Math.max(0,(ee.offsetWidth*O-ne.clientWidth)/2),se=Math.max(0,(ee.offsetHeight*O-ne.clientHeight)/2);return{x:Math.min(te,Math.max(-te,I)),y:Math.min(se,Math.max(-se,G))}},p=(O,I,G)=>{if(O=Math.min(h1,Math.max(1,O)),O<=1){_({s:1,x:0,y:0});return}const ne=m(O,I,G);_({s:O,x:ne.x,y:ne.y})},N=O=>p(u.current.s*O,u.current.x,u.current.y),k=()=>{y.current&&(clearTimeout(y.current),y.current=null)},j=O=>{R(O),g.current&&clearTimeout(g.current),g.current=setTimeout(()=>R(""),2500)},M=()=>{a(!1);const O=document.createElement("a");O.href=r,O.download=s||"image",document.body.appendChild(O),O.click(),O.remove(),j(V("imageviewer.saved"))},D=async()=>{var O;a(!1);try{const I=await(await fetch(r)).blob(),G=new File([I],s||"image",{type:wm(s)||I.type||"application/octet-stream"});if((O=navigator.canShare)!=null&&O.call(navigator,{files:[G]})){await navigator.share({files:[G]});return}}catch{return}j(V("imageviewer.shareUnsupported"))},L=O=>{var G,ne;(ne=(G=O.currentTarget).setPointerCapture)==null||ne.call(G,O.pointerId),f.current.set(O.pointerId,{x:O.clientX,y:O.clientY});const I=f.current.size;if(I===2){k(),l.current.pinched=!0;const[ee,te]=[...f.current.values()];S.current={dist:f1(ee,te)||1,s:u.current.s}}else I===1&&(l.current.moved=!1,l.current.lpFired=!1,l.current.pinched=!1,C.current={x:O.clientX,y:O.clientY},k(),y.current=setTimeout(()=>{y.current=null,f.current.size===1&&!l.current.moved&&(l.current.lpFired=!0,a(!0))},sV))},A=O=>{if(f.current.has(O.pointerId)){if(f.current.set(O.pointerId,{x:O.clientX,y:O.clientY}),f.current.size>=2&&S.current){const[I,G]=[...f.current.values()];p(S.current.s*(f1(I,G)/S.current.dist),u.current.x,u.current.y);return}if(C.current){const I=O.clientX-C.current.x,G=O.clientY-C.current.y;(Math.abs(I)>m1||Math.abs(G)>m1)&&(l.current.moved=!0,k()),u.current.s>1&&(C.current={x:O.clientX,y:O.clientY},p(u.current.s,u.current.x+I,u.current.y+G))}}},F=O=>{if(k(),f.current.delete(O.pointerId),f.current.size===1){S.current=null;const[I]=[...f.current.values()];C.current={x:I.x,y:I.y}}else if(f.current.size===0){if(!l.current.moved&&!l.current.lpFired&&!l.current.pinched){const G=O.timeStamp||0;G-v.current<aV?(v.current=0,u.current.s>1?p(1,0,0):p(2,0,0)):v.current=G}S.current=null,C.current=null,l.current={moved:!1,lpFired:!1,pinched:!1}}};return o.jsxDEV("div",{ref:x,className:"doc-image-wrap",onPointerDown:L,onPointerMove:A,onPointerUp:F,onPointerCancel:F,onContextMenu:O=>O.preventDefault(),children:[o.jsxDEV("img",{ref:h,className:"doc-image",src:r,alt:s,draggable:!1,style:{transform:`translate(${d.x}px, ${d.y}px) scale(${d.s})`}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:159,columnNumber:7},this),o.jsxDEV("div",{className:"doc-image-zoom",onPointerDown:O=>O.stopPropagation(),children:[o.jsxDEV("button",{onClick:()=>N(1/1.5),disabled:d.s<=1,"aria-label":V("imageviewer.zoomOut"),children:"−"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:168,columnNumber:9},this),o.jsxDEV("span",{className:"doc-image-zoom-val","aria-hidden":"true",children:[Math.round(d.s*100),"%"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:169,columnNumber:9},this),o.jsxDEV("button",{onClick:()=>N(1.5),disabled:d.s>=h1,"aria-label":V("imageviewer.zoomIn"),children:"+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:170,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:167,columnNumber:7},this),E&&o.jsxDEV("div",{className:"doc-image-note",role:"status",children:E},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:172,columnNumber:16},this),o.jsxDEV(gm,{open:b,title:s||V("imageviewer.imageTitle"),actions:[{key:"save",label:V("imageviewer.saveImage"),onClick:M},{key:"share",label:V("imageviewer.shareImage"),onClick:D}],onClose:()=>a(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:173,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/ImageViewer.jsx",lineNumber:150,columnNumber:5},this)}const Ug=da.length-1;function lV({type:r,name:s,content:d}){const[_,E]=U.useState(()=>eA()),R=U.useRef(null),b=rV();Cm(b.playing&&!b.paused);const a=U.useMemo(()=>r==="markdown"?JS.sanitize(Mn.parse(d||"")):"",[r,d]);if(U.useEffect(()=>{b.stop()},[a]),U.useEffect(()=>{var S;const h=R.current;if(!h||(h.querySelectorAll(".tts-active").forEach(C=>C.classList.remove("tts-active")),b.idx<0))return;const f=h.querySelectorAll(`.tts-sent[data-tts="${b.idx}"]`);f.forEach(C=>C.classList.add("tts-active")),(S=f[0])==null||S.scrollIntoView({block:"center",behavior:"smooth"})},[b.idx]),r==="image")return o.jsxDEV(oV,{url:d,name:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:50,columnNumber:12},this);if(r==="html")return o.jsxDEV("iframe",{className:"doc-iframe",sandbox:"allow-scripts",srcDoc:d||"",title:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:54,columnNumber:12},this);const u=h=>{const f=Math.min(Ug,Math.max(0,_+h));E(f),tA(f)};if(r==="text")return o.jsxDEV("div",{className:"doc-md-wrap",children:[o.jsxDEV("div",{className:"doc-zoom",children:o.jsxDEV("div",{className:"doc-fonts",children:[o.jsxDEV("button",{className:"doc-zoom-btn",onClick:()=>u(-1),disabled:_<=0,"aria-label":V("doc.fontSmaller"),children:"A−"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:65,columnNumber:13},this),o.jsxDEV("button",{className:"doc-zoom-btn",onClick:()=>u(1),disabled:_>=Ug,"aria-label":V("doc.fontLarger"),children:"A+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:66,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:64,columnNumber:11},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:63,columnNumber:9},this),o.jsxDEV("pre",{className:"doc-text",style:{fontSize:`${da[_]}px`},children:d||""},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:69,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:62,columnNumber:7},this);const g=()=>{if(b.playing){b.paused?b.resume():b.pause();return}const h=nV(R.current);h.length&&b.play(h)},x=b.playing&&!b.paused;return o.jsxDEV("div",{className:"doc-md-wrap",children:[o.jsxDEV("div",{className:"doc-zoom",children:[b.supported&&o.jsxDEV("div",{className:"doc-tts",children:[o.jsxDEV("button",{className:"doc-zoom-btn doc-zoom-icon",onClick:g,"aria-label":x?V("doc.pauseRead"):b.paused?V("doc.resumeRead"):V("doc.read"),children:x?o.jsxDEV(n3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:88,columnNumber:26},this):o.jsxDEV(t3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:88,columnNumber:42},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:86,columnNumber:13},this),o.jsxDEV("button",{className:"doc-zoom-btn doc-zoom-icon",onClick:b.stop,disabled:!b.playing,"aria-label":V("doc.stopRead"),children:o.jsxDEV(oS,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:91,columnNumber:15},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:90,columnNumber:13},this),o.jsxDEV("button",{className:"doc-zoom-btn",onClick:b.cycleRate,"aria-label":V("doc.rate"),children:[b.rate,"×"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:93,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:85,columnNumber:11},this),o.jsxDEV("div",{className:"doc-fonts",children:[o.jsxDEV("button",{className:"doc-zoom-btn",onClick:()=>u(-1),disabled:_<=0,"aria-label":V("doc.fontSmaller"),children:"A−"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:97,columnNumber:11},this),o.jsxDEV("button",{className:"doc-zoom-btn",onClick:()=>u(1),disabled:_>=Ug,"aria-label":V("doc.fontLarger"),children:"A+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:98,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:96,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:83,columnNumber:7},this),o.jsxDEV("div",{ref:R,className:"doc-md",style:{fontSize:`${da[_]}px`},dangerouslySetInnerHTML:{__html:a}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:101,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocView.jsx",lineNumber:82,columnNumber:5},this)}function cV({open:r,pane:s,windowId:d,tabs:_,active:E,onActivate:R,onCloseTab:b,onMinimize:a,onOpenDoc:u,pendingShare:g,onPendingConsumed:x}){const h=_.find(ee=>ee.key===E)||_[0],[f,S]=U.useState("recent"),[C,y]=U.useState(null),[l,v]=U.useState(0),m=h.type==="home",p=U.useRef(null),N=U.useRef(C);N.current=C;const k=U.useRef(E);k.current=E;const j=U.useRef(d);j.current=d;const M=U.useRef(a);M.current=a;const D=U.useRef(R);D.current=R;const L=U.useRef(E),A=U.useRef(0),F=U.useRef([]),O=()=>{window.history.pushState({fileOverlay:!0},""),A.current+=1},I=ee=>{r&&ee!==N.current&&(F.current.push({type:"nav",prev:N.current}),O()),y(ee),Z0(d,ee)},G=U.useRef(r);U.useEffect(()=>{const ee=L.current;L.current=E;const te=G.current;G.current=r,r&&te&&ee==="home"&&E!=="home"&&(F.current.push({type:"doc"}),O())},[E,r]),U.useEffect(()=>{if(!r)return;F.current=[],A.current=0,O();const ee=()=>{var se,B;A.current=Math.max(0,A.current-1);const te=F.current.pop();if((te==null?void 0:te.type)==="doc"){(se=D.current)==null||se.call(D,"home");return}if((te==null?void 0:te.type)==="nav"){y(te.prev),te.prev&&Z0(j.current,te.prev);return}(B=M.current)==null||B.call(M)};return window.addEventListener("popstate",ee),()=>{window.removeEventListener("popstate",ee),A.current>0&&(window.history.go(-A.current),A.current=0)}},[r]);const ne=async()=>{try{const{cwd:ee}=await jo(s);ee&&y(ee)}catch{}};return U.useEffect(()=>{g&&S("browse")},[g]),U.useEffect(()=>{r&&v(ee=>ee+1)},[r]),U.useEffect(()=>{if(!r){p.current=null;return}if(p.current===d)return;p.current=d,F.current=[],S("browse");let ee=!1;return(async()=>{const te=LM(d);let se=null;if(te)try{await eS(te),se=te}catch{}if(!se&&s)try{const{cwd:B}=await jo(s);se=B}catch{}!ee&&se&&y(se)})(),()=>{ee=!0}},[r,d,s]),Wl.createPortal(o.jsxDEV("div",{className:`file-sheet ${r?"open":""}`,"aria-hidden":!r,children:[o.jsxDEV("div",{className:"file-tabs",children:[o.jsxDEV("div",{className:"file-tabs-scroll",children:_.map(ee=>o.jsxDEV("div",{className:`file-tab ${ee.key===E?"active":""}`,children:[o.jsxDEV("button",{className:"file-tab-label",onClick:()=>R(ee.key),children:ee.key==="home"?o.jsxDEV(o.Fragment,{children:[o.jsxDEV(Bu,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:146,columnNumber:39},this),V("filemanager.files")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:146,columnNumber:37},this):ee.name},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:145,columnNumber:15},this),ee.key!=="home"&&o.jsxDEV("button",{className:"file-tab-x","aria-label":V("filemanager.closeTab"),onClick:()=>b(ee.key),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:149,columnNumber:17},this)]},ee.key,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:144,columnNumber:13},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:142,columnNumber:9},this),o.jsxDEV("button",{className:"file-min","aria-label":V("filemanager.minimize"),title:V("filemanager.minimize"),onClick:a,children:o.jsxDEV(ha,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:154,columnNumber:134},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:154,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:141,columnNumber:7},this),o.jsxDEV("div",{className:"file-body",children:m?o.jsxDEV("div",{className:"home-pane",children:[o.jsxDEV("div",{className:"file-seg",role:"tablist",children:[o.jsxDEV("button",{className:`file-seg-btn ${f==="recent"?"on":""}`,role:"tab","aria-selected":f==="recent",onClick:()=>S("recent"),children:[o.jsxDEV(rS,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:162,columnNumber:17},this),V("filemanager.recent")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:160,columnNumber:15},this),o.jsxDEV("button",{className:`file-seg-btn ${f==="browse"?"on":""}`,role:"tab","aria-selected":f==="browse",onClick:()=>S("browse"),children:[o.jsxDEV(Bu,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:166,columnNumber:17},this),V("filemanager.directory")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:164,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:159,columnNumber:13},this),f==="recent"?o.jsxDEV(Z4,{onOpenDoc:u,refreshKey:l},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:170,columnNumber:17},this):o.jsxDEV(nC,{path:C,onNavigate:I,onOpenDoc:u,onJumpToCwd:s?ne:null,refreshKey:l,pendingFile:g,onPendingConsumed:x},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:171,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:158,columnNumber:11},this):o.jsxDEV(lV,{type:h.type,name:h.name,content:h.content},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:175,columnNumber:13},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:156,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/FileManager.jsx",lineNumber:140,columnNumber:5},this),document.body)}function uV(r){if(!r)return[];const s=[];let d=null,_=null;for(const E of r.split(`
|
|
330
|
-
`)){if(E.startsWith("diff --git")){const b=E.match(/ b\/(.*)$/);d={path:b?b[1]:E.slice(11),hunks:[]},s.push(d),_=null;continue}if(!d)continue;if(E.startsWith("@@")){_={header:E,lines:[]},d.hunks.push(_);continue}if(!_)continue;const R=E[0];R==="+"?_.lines.push({type:"add",text:E.slice(1)}):R==="-"?_.lines.push({type:"del",text:E.slice(1)}):R===" "&&_.lines.push({type:"ctx",text:E.slice(1)})}return s}const dV=r=>String(r||"").replace(/\/+$/,"").split("/").pop()||r;function bm(r,s){const d=(r&&r!==" "?r:s)||"?";return d==="?"?"?":d}function hV({open:r,pane:s,windowId:d,inset:_=0,onClose:E}){const R=U.useRef(!0);U.useEffect(()=>()=>{R.current=!1},[]);const[b,a]=U.useState([]),[u,g]=U.useState(null),[x,h]=U.useState([]),f=x.length?x[x.length-1]:null,[S,C]=U.useState(!1),[y,l]=U.useState(null),v=U.useRef(d);U.useEffect(()=>{v.current=d},[d]);const[m,p]=U.useState(null),[N,k]=U.useState(null),[j,M]=U.useState(null),[D,L]=U.useState(null),[A,F]=U.useState(20),[O,I]=U.useState(!1),[G,ne]=U.useState({changes:!0,commits:!0}),[ee,te]=U.useState(!1),se=U.useRef(null),[B,W]=U.useState(null),[X,Y]=U.useState(null),[ve,he]=U.useState(null),Me=U.useRef(x);Me.current=x;const me=U.useRef(S);me.current=S;const ie=U.useRef(E);ie.current=E;const $=U.useRef(0),_e=()=>{window.history.pushState({gitOverlay:!0},""),$.current+=1},de=je=>{_e(),h(Pe=>[...Pe,je])},Ie=()=>{_e(),C(!0)};U.useEffect(()=>{if(!r)return;_e();const je=()=>{var Pe;if($.current=Math.max(0,$.current-1),me.current){C(!1);return}if(Me.current.length){h(be=>be.slice(0,-1));return}(Pe=ie.current)==null||Pe.call(ie)};return window.addEventListener("popstate",je),()=>{window.removeEventListener("popstate",je),$.current>0&&(window.history.go(-$.current),$.current=0)}},[r]),U.useEffect(()=>{if(!r)return;let je=!1;h([]),L(null),Y(null),he(null);const Pe=x_(d);return Pe.length?(a(Pe),g(be=>be&&Pe.includes(be)?be:Pe[0]),()=>{je=!0}):(a([]),g(null),(async()=>{try{if(!s)return;const{cwd:be}=await jo(s);if(!be)return;const{repos:Ae=[]}=await oN(be);if(je||!Ae.length)return;const He=nN(d,Ae.map(wt=>wt.path));if(je)return;a(He),g(He[0]??null)}catch(be){if(je)return;(be==null?void 0:be.message)==="outside home"?he(V("git.outsideRoots")):Y(V("git.errReadRepo"))}})(),()=>{je=!0})},[r,s,d]),U.useEffect(()=>{if(!r||!s)return;let je=!1;return jo(s).then(({cwd:Pe})=>{!je&&Pe&&l(Pe)}).catch(()=>{}),()=>{je=!0}},[r,s]),U.useEffect(()=>{if(!r||!u){p(null),k(null);return}let je=!1;return p(null),k(null),M(null),L(null),F(20),Y(null),he(null),(async()=>{try{const[Pe,be]=await Promise.all([VA(u),BA(u)]);if(je)return;p(Pe.changes??[]),k(be.branches??[])}catch{je||Y(V("git.errLoad"))}})(),()=>{je=!0}},[r,u]),U.useEffect(()=>{if(!r||!u){M(null);return}let je=!1;return(async()=>{try{const{commits:Pe=[]}=await PA(u,{ref:D||void 0,limit:A});je||M(Pe)}catch{je||M([])}finally{je||I(!1)}})(),()=>{je=!0}},[r,u,D,A]);const Ue=!u||!f?"":f.kind==="diff"?`${u}|diff|${f.path}|${f.commit||""}|${f.staged?1:0}`:`${u}|commit|${f.hash}`;U.useEffect(()=>{if(!r||!u||!f){W(null);return}let je=!1;return Y(null),W(null),(async()=>{try{let Pe;if(f.kind==="diff"){const{diff:be,truncated:Ae}=await IA(u,{path:f.path,commit:f.commit,staged:f.staged});Pe={files:uV(be),truncated:Ae}}else Pe=await FA(u,f.hash);je||W({key:Ue,payload:Pe})}catch{je||Y(V("git.errLoad"))}})(),()=>{je=!0}},[r,Ue]);const tt=U.useCallback(()=>{window.history.back()},[]),Qe=je=>{g(je),h([]),L(null)},st=async je=>{window.history.back(),he(null);try{const{repos:Pe=[]}=await oN(je);if(!R.current)return;if(!Pe.length){he(V("git.noRepoInDir"));return}const be=Pe.map(kt=>kt.path),Ae=v.current,He=Ae?nN(Ae,be):be;a(kt=>{const Ot=[...kt];for(const Pt of He)Ot.includes(Pt)||Ot.push(Pt);return Ot});const wt=be.find(kt=>!b.includes(kt))||be[0];Qe(wt)}catch(Pe){if(!R.current)return;(Pe==null?void 0:Pe.message)==="outside home"?he(V("git.outsideRoots")):Y(V("git.errReadDir"))}},Nt=je=>{const Pe=uA(d,je);a(Pe),u===je&&(g(Pe[0]??null),h([]),L(null))},J=(N||[]).find(je=>je.current)||null,bt=je=>{const Pe=je===(J==null?void 0:J.name)?null:je;Pe!==D&&(L(Pe),M(null),F(20))},Gt=je=>ne(Pe=>({...Pe,[je]:!Pe[je]})),Ee=j!=null&&j.length>=A,Te=je=>{if(!Ee||O)return;const Pe=je.currentTarget;Pe.scrollHeight-Pe.scrollTop-Pe.clientHeight<80&&(I(!0),F(be=>be+20))},Ge=D||(J==null?void 0:J.name)||null,re=!!D&&D!==(J==null?void 0:J.name),We=D?(N||[]).find(je=>je.name===D):J,Ye=B&&B.key===Ue?B.payload:null,ge=!!f,Ze=(f==null?void 0:f.kind)==="commit"?V("git.commitDetail"):(f==null?void 0:f.kind)==="diff"?f.path||V("git.diff"):"";return Wl.createPortal(o.jsxDEV("div",{className:`file-sheet git-sheet ${r?"open":""}`,"aria-hidden":!r,style:{"--kb-inset":`${_}px`},children:[o.jsxDEV("div",{className:"file-tabs git-head",children:[ge?o.jsxDEV("div",{className:"git-drill-head",children:[o.jsxDEV("button",{className:"git-back","aria-label":V("common.back"),title:V("common.back"),onClick:tt,children:"‹"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:291,columnNumber:13},this),o.jsxDEV("span",{className:"git-drill-title",children:[o.jsxDEV(lS,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:292,columnNumber:47},this),o.jsxDEV("span",{className:"git-title-text",children:Ze},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:292,columnNumber:58},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:292,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:290,columnNumber:11},this):o.jsxDEV("div",{className:"git-tabs-scroll",children:[o.jsxDEV("button",{className:"git-tab-add","aria-label":V("git.bindRepo"),title:V("git.bindRepo"),onClick:Ie,children:"+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:296,columnNumber:13},this),b.map(je=>o.jsxDEV("div",{className:`git-tab ${je===u?"active":""}`,children:[o.jsxDEV("button",{className:"git-tab-label",onClick:()=>Qe(je),children:dV(je)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:299,columnNumber:17},this),o.jsxDEV("button",{className:"git-tab-x","aria-label":V("common.close"),title:V("common.close"),onClick:()=>Nt(je),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:300,columnNumber:17},this)]},je,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:298,columnNumber:15},this))]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:295,columnNumber:11},this),o.jsxDEV("button",{className:"file-min","aria-label":V("git.collapse"),title:V("git.collapse"),onClick:()=>E==null?void 0:E(),children:o.jsxDEV(ha,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:305,columnNumber:123},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:305,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:288,columnNumber:7},this),!ge&&u&&o.jsxDEV("div",{className:"git-branch-bar",children:[o.jsxDEV("span",{className:"git-branch-bar-name",children:[o.jsxDEV("span",{className:"git-branch-glyph",children:"⎇"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:316,columnNumber:13},this)," ",Ge||"—",!re&&Ge&&o.jsxDEV("span",{className:"git-branch-cur-tag",children:V("git.currentBranch")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:317,columnNumber:46},this),We&&(We.ahead||We.behind)?o.jsxDEV("span",{className:"git-branch-bar-track",children:[We.ahead?o.jsxDEV("span",{className:"git-ahead",children:["↑",We.ahead]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:320,columnNumber:42},this):null,We.behind?o.jsxDEV("span",{className:"git-behind",children:["↓",We.behind]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:321,columnNumber:43},this):null]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:319,columnNumber:15},this):null]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:315,columnNumber:11},this),o.jsxDEV("div",{className:"git-branch-dd",children:[o.jsxDEV("button",{className:`git-branch-trigger ${re?"other":""}`,onClick:()=>te(je=>!je),"aria-haspopup":"listbox","aria-expanded":ee,title:V("git.switchViewedBranch"),children:[o.jsxDEV("span",{className:"git-branch-trigger-name",children:V("git.switchBranch")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:328,columnNumber:15},this),o.jsxDEV("span",{className:"git-branch-caret",children:o.jsxDEV(ha,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:329,columnNumber:50},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:329,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:326,columnNumber:13},this),ee&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"git-dd-backdrop",onClick:()=>te(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:333,columnNumber:17},this),o.jsxDEV("div",{className:"git-dd-menu",role:"listbox",children:[(N||[]).length===0&&o.jsxDEV("div",{className:"git-empty",children:V("git.noBranches")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:335,columnNumber:53},this),(N||[]).map(je=>{const Pe=D?je.name===D:je.current;return o.jsxDEV("button",{role:"option","aria-selected":Pe,className:`git-dd-item ${je.current?"current":""} ${Pe?"viewing":""}`,onClick:()=>{bt(je.name),te(!1)},children:[o.jsxDEV("span",{className:"git-branch-dot",children:je.current?"●":""},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:342,columnNumber:25},this),o.jsxDEV("span",{className:"git-row-path",children:je.name},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:343,columnNumber:25},this),je.upstream&&o.jsxDEV("span",{className:"git-branch-up",children:[je.upstream,je.ahead?o.jsxDEV("span",{className:"git-ahead",children:[" ↑",je.ahead]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:346,columnNumber:40},this):null,je.behind?o.jsxDEV("span",{className:"git-behind",children:[" ↓",je.behind]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:347,columnNumber:41},this):null]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:345,columnNumber:27},this)]},je.name,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:339,columnNumber:23},this)})]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:334,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:332,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:325,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:312,columnNumber:9},this),o.jsxDEV("div",{className:"git-body",children:[X&&o.jsxDEV("div",{className:"git-error",children:X},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:361,columnNumber:19},this),ve&&!X&&!ge&&o.jsxDEV("div",{className:"git-notice",children:ve},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:362,columnNumber:44},this),!u&&!X&&!ve&&o.jsxDEV("div",{className:"git-empty",children:V("git.noRepoBound")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:364,columnNumber:11},this),ge&&u&&!X&&o.jsxDEV("div",{className:"git-scroll",children:Ye?f.kind==="diff"?o.jsxDEV(vV,{data:Ye},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:370,columnNumber:41},this):o.jsxDEV(pV,{data:Ye,onOpenFile:je=>de({kind:"diff",path:je,commit:f.hash})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:371,columnNumber:17},this):o.jsxDEV("div",{className:"git-loading",children:V("common.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:369,columnNumber:23},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:368,columnNumber:11},this),!ge&&u&&!X&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV(p1,{variant:"top",title:V("git.changes"),count:m==null?void 0:m.length,expanded:G.changes,onToggle:()=>Gt("changes"),children:m==null?o.jsxDEV("div",{className:"git-loading",children:V("common.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:380,columnNumber:34},this):o.jsxDEV(mV,{data:{changes:m},onOpenFile:(je,Pe)=>de({kind:"diff",path:je,staged:Pe})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:381,columnNumber:19},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:379,columnNumber:13},this),o.jsxDEV(p1,{variant:"mid",title:V("git.commits"),subtitle:re?Ge:null,expanded:G.commits,onToggle:()=>Gt("commits"),bodyRef:se,onScroll:Te,children:j==null?o.jsxDEV("div",{className:"git-loading",children:V("common.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:385,columnNumber:34},this):o.jsxDEV(o.Fragment,{children:[o.jsxDEV(fV,{data:{commits:j},onOpen:je=>de({kind:"commit",hash:je})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:388,columnNumber:21},this),Ee&&o.jsxDEV("div",{className:"git-more",children:V(O?"common.loading":"git.pullToLoadMore")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:389,columnNumber:40},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:387,columnNumber:19},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:383,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:378,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:360,columnNumber:7},this),o.jsxDEV(Wu,{open:S,seedCwd:y,pane:s,inset:_,hint:V("git.pickerHint"),onPick:st,onClose:()=>window.history.back()},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:397,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:285,columnNumber:5},this),document.body)}function p1({variant:r,title:s,subtitle:d,count:_,expanded:E,onToggle:R,onScroll:b,bodyRef:a,children:u}){return o.jsxDEV("div",{className:`git-section git-section--${r} ${E?"open":""}`,children:[o.jsxDEV("button",{className:"git-section-head",onClick:R,"aria-expanded":E,children:[o.jsxDEV("span",{className:"git-section-caret",children:o.jsxDEV(ha,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:418,columnNumber:45},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:418,columnNumber:9},this),o.jsxDEV("span",{className:"git-section-title",children:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:419,columnNumber:9},this),d&&o.jsxDEV("span",{className:"git-section-sub",children:d},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:420,columnNumber:22},this),_!=null&&o.jsxDEV("span",{className:"git-section-count",children:_},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:421,columnNumber:27},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:417,columnNumber:7},this),E&&o.jsxDEV("div",{className:"git-section-body",ref:a,onScroll:b,children:u},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:423,columnNumber:20},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:416,columnNumber:5},this)}function mV({data:r,onOpenFile:s}){const d=(r==null?void 0:r.changes)??[];return d.length?o.jsxDEV("div",{className:"git-list",children:d.map((_,E)=>{const R=!!(_.x&&_.x!==" "&&_.x!=="?");return o.jsxDEV("button",{className:"git-row",onClick:()=>s(_.path,R),children:[o.jsxDEV("span",{className:`git-badge git-badge-${bm(_.x,_.y).toLowerCase().replace("?","q")}`,children:bm(_.x,_.y)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:437,columnNumber:13},this),o.jsxDEV("span",{className:"git-row-path",children:_.path},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:438,columnNumber:13},this)]},`${_.path}-${E}`,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:436,columnNumber:11},this)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:432,columnNumber:5},this):o.jsxDEV("div",{className:"git-empty",children:V("git.cleanTree")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:430,columnNumber:31},this)}function fV({data:r,onOpen:s}){const d=(r==null?void 0:r.commits)??[];return d.length?o.jsxDEV("div",{className:"git-list",children:d.map(_=>o.jsxDEV("button",{className:"git-row git-commit-row",onClick:()=>s(_.hash),children:[o.jsxDEV("span",{className:"git-hash",children:_.short},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:453,columnNumber:11},this),o.jsxDEV("span",{className:"git-commit-main",children:[o.jsxDEV("span",{className:"git-row-path",children:_.subject},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:455,columnNumber:13},this),o.jsxDEV("span",{className:"git-commit-meta",children:[_.author," · ",_.relDate]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:456,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:454,columnNumber:11},this)]},_.hash,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:452,columnNumber:9},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:450,columnNumber:5},this):o.jsxDEV("div",{className:"git-empty",children:V("git.noCommits")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:448,columnNumber:31},this)}function pV({data:r,onOpenFile:s}){if(!r)return null;const d=r.files??[];return o.jsxDEV("div",{className:"git-commit-detail",children:[r.message&&o.jsxDEV("pre",{className:"git-commit-msg",children:r.message},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:469,columnNumber:24},this),o.jsxDEV("div",{className:"git-list",children:d.map((_,E)=>o.jsxDEV("button",{className:"git-row",onClick:()=>s(_.path),children:[o.jsxDEV("span",{className:`git-badge git-badge-${bm(_.x,_.y).toLowerCase().replace("?","q")}`,children:bm(_.x,_.y)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:473,columnNumber:13},this),o.jsxDEV("span",{className:"git-row-path",children:_.path},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:474,columnNumber:13},this)]},`${_.path}-${E}`,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:472,columnNumber:11},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:470,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:468,columnNumber:5},this)}const v1=da.length-1;function vV({data:r}){const[s,d]=U.useState(()=>iA()),_=R=>{const b=Math.min(v1,Math.max(0,s+R));d(b),rA(b)};if(!r)return null;const E=r.files??[];return E.length?o.jsxDEV("div",{className:"git-diff-wrap",style:{fontSize:`${da[s]}px`},children:[o.jsxDEV("div",{className:"git-diff-zoom",children:[o.jsxDEV("button",{className:"doc-zoom-btn",onClick:()=>_(-1),disabled:s<=0,"aria-label":V("git.fontSmaller"),children:"A−"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:493,columnNumber:9},this),o.jsxDEV("button",{className:"doc-zoom-btn",onClick:()=>_(1),disabled:s>=v1,"aria-label":V("git.fontLarger"),children:"A+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:494,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:492,columnNumber:7},this),r.truncated&&o.jsxDEV("div",{className:"git-diff-trunc",children:V("git.diffTruncated")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:496,columnNumber:26},this),E.map((R,b)=>o.jsxDEV("div",{className:"git-diff-file",children:[E.length>1&&o.jsxDEV("div",{className:"git-diff-fname",children:R.path},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:499,columnNumber:32},this),o.jsxDEV("div",{className:"git-diff",children:R.hunks.map((a,u)=>o.jsxDEV("div",{className:"git-diff-hunk-block",children:[o.jsxDEV("div",{className:"git-diff-line git-diff-hunk",children:a.header},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:503,columnNumber:17},this),a.lines.map((g,x)=>o.jsxDEV("div",{className:`git-diff-line git-diff-${g.type}`,children:[g.type==="add"?"+":g.type==="del"?"-":" ",g.text]},x,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:505,columnNumber:19},this))]},u,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:502,columnNumber:15},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:500,columnNumber:11},this)]},`${R.path}-${b}`,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:498,columnNumber:9},this))]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:491,columnNumber:5},this):o.jsxDEV("div",{className:"git-empty",children:V("git.noDiff")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:489,columnNumber:29},this)}function gV(){const r=x2();if(!r.active)return null;const s=r.phase==="sending",d=Math.round((r.pct||0)*100);return Wl.createPortal(o.jsxDEV("div",{className:"upload-overlay",role:"alertdialog","aria-modal":"true","aria-label":V("upload.title"),children:o.jsxDEV("div",{className:"upload-card",children:[r.label&&o.jsxDEV("div",{className:"upload-card-label",children:r.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:18,columnNumber:23},this),s?o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"upload-bar",children:o.jsxDEV("div",{className:"upload-bar-fill",style:{width:`${d}%`}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:21,columnNumber:41},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:21,columnNumber:13},this),o.jsxDEV("div",{className:"upload-card-sub",children:[d,"%"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:22,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:20,columnNumber:11},this):o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"upload-spinner","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:26,columnNumber:13},this),o.jsxDEV("div",{className:"upload-card-sub",children:V("upload.processing")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:27,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:25,columnNumber:11},this),o.jsxDEV("button",{type:"button",className:"upload-cancel",onClick:_2,children:V("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:30,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:17,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:16,columnNumber:5},this),document.body)}const em=8,g1=12;function _1({path:r,x:s,y:d,onOpen:_,onClose:E,icon:R,name:b,openLabel:a,note:u,disabled:g=!1}){const x=b??(r.split("/").filter(Boolean).pop()||r),h=U.useRef(null),[f,S]=U.useState(null);return U.useLayoutEffect(()=>{const C=h.current;if(!C)return;const y=C.offsetWidth,l=C.offsetHeight,v=window.innerWidth,m=window.innerHeight,p=Math.min(Math.max(s-y/2,em),v-y-em);let N=d+g1;N+l>m-em&&(N=Math.max(em,d-g1-l)),S({left:p,top:N})},[s,d,r]),o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"doclink-backdrop",onClick:E},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:37,columnNumber:7},this),o.jsxDEV("div",{ref:h,className:"doclink-pop",style:f?{left:f.left,top:f.top}:{left:0,top:0,visibility:"hidden"},role:"dialog","aria-label":V("doclink.title"),children:[o.jsxDEV("div",{className:"doclink-name",children:[R??o.jsxDEV(Bu,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:44,columnNumber:48},this),x]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:44,columnNumber:9},this),o.jsxDEV("div",{className:"doclink-path",children:r},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:45,columnNumber:9},this),u&&o.jsxDEV("div",{className:"doclink-note",children:u},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:46,columnNumber:18},this),o.jsxDEV("div",{className:"doclink-actions",children:[o.jsxDEV("button",{className:"doclink-cancel",onClick:E,children:V("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:48,columnNumber:11},this),!g&&o.jsxDEV("button",{className:"doclink-open",onClick:()=>_(r),children:a??V("common.open")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:49,columnNumber:25},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:47,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:38,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:36,columnNumber:5},this)}const _V=()=>`${Date.now().toString(36)}${Math.random().toString(36).slice(2,6)}`;function bV(r){const s=(r??"").trim();return s?{id:_V(),text:s}:null}function yV(r,s,d){const _=[...r];if(s<0||s>=_.length||d<0||d>=_.length||s===d)return _;const[E]=_.splice(s,1);return _.splice(d,0,E),_}function xV({open:r,session:s,window:d,onClose:_,onSend:E,onCountChange:R}){const[b,a]=U.useState([]),[u,g]=U.useState(""),[x,h]=U.useState(null),[f,S]=U.useState(null),C=U.useRef(null),y=U.useRef({head:"",tail:""}),l=U.useRef(null),v=U.useRef(!1),m=U.useRef({active:!1}),p=B=>{tN(s,d,B),a(B),R==null||R(B.length)},N=B=>{B&&(B.style.height="auto",B.style.height=`${B.scrollHeight+2}px`)};U.useEffect(()=>{if(!r)return;const B=Q1(s,d);a(B),R==null||R(B.length),g(""),h(null)},[r,s,d]);const j=T_({onText:B=>{if(v.current){v.current=!1;return}const{head:W,tail:X}=y.current;g(W+B+X),l.current=W.length+B.length}}),M=L_(),D=j.state==="recording"||j.state==="finalizing";Cm(D),U.useEffect(()=>{if(j.state!=="recording"&&j.state!=="finalizing"||v.current)return;const{head:B,tail:W}=y.current;g(B+j.partial+W),l.current=B.length+j.partial.length},[j.partial,j.state]),U.useLayoutEffect(()=>{const B=C.current;if(!B||(N(B),l.current==null))return;const W=l.current;if(l.current=null,document.activeElement===B)try{B.setSelectionRange(W,W)}catch{}},[u]);const L=()=>{if(D){j.stop();return}const B=C.current,W=B?B.selectionStart:u.length;y.current={head:u.slice(0,W),tail:u.slice(W)},j.start()},A=()=>{D&&(v.current=!0,j.stop())},F=()=>{A();const B=u.trim();if(B){if(x)p(b.map(W=>W.id===x?{...W,text:B}:W));else{const W=bV(B);W&&p([...b,W])}g(""),h(null)}},O=B=>{h(B.id),g(B.text),requestAnimationFrame(()=>{var W;return(W=C.current)==null?void 0:W.focus()})},I=()=>{h(null),g("")},G=B=>{p(b.filter(W=>W.id!==B)),B===x&&I()},ne=(B,W)=>{var X,Y;B.cancelable&&B.preventDefault(),(Y=(X=B.currentTarget).setPointerCapture)==null||Y.call(X,B.pointerId),m.current={active:!0,pointerId:B.pointerId,id:W},S(W)},ee=B=>{var he;const W=m.current;if(!W.active||B.pointerId!==W.pointerId)return;const X=(he=B.currentTarget.closest(".idea-list"))==null?void 0:he.querySelectorAll("[data-idea]");if(!X||!X.length)return;const Y=B.clientY;let ve=X.length-1;for(let Me=0;Me<X.length;Me++){const me=X[Me].getBoundingClientRect();if(Y<me.top+me.height/2){ve=Me;break}}a(Me=>{const me=Me.findIndex(ie=>ie.id===W.id);return me<0||me===ve?Me:yV(Me,me,ve)})},te=B=>{const W=m.current;!W.active||B.pointerId!==W.pointerId||(m.current={active:!1},S(null),a(X=>(tN(s,d,X),X)))};if(!r)return null;const se=x!=null;return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"cmd-backdrop",onClick:_},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:149,columnNumber:7},this),o.jsxDEV("div",{className:"idea-panel",role:"dialog","aria-label":V("idea.title"),children:[o.jsxDEV("div",{className:"cmd-head",children:[o.jsxDEV("span",{className:"cmd-title",children:[V("idea.title"),d?` · ${d}`:"",b.length>0&&o.jsxDEV("span",{className:"idea-head-count",children:b.length},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:152,columnNumber:100},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:152,columnNumber:11},this),o.jsxDEV("button",{className:"cmd-close",onClick:_,"aria-label":V("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:153,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:151,columnNumber:9},this),o.jsxDEV("div",{className:`idea-compose${D?" recording":""}`,children:[o.jsxDEV("textarea",{ref:C,className:"idea-input",rows:1,placeholder:V(se?"idea.editPlaceholder":"idea.addPlaceholder"),value:u,readOnly:D,onChange:B=>g(B.target.value)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:157,columnNumber:11},this),se&&o.jsxDEV("button",{className:"idea-cancel",onClick:I,children:V("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:166,columnNumber:23},this),M&&o.jsxDEV(j_,{active:D,disabled:j.state==="requesting",onToggle:L},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:167,columnNumber:28},this),o.jsxDEV("button",{className:"idea-act",onClick:F,disabled:!u.trim(),"aria-label":V(se?"common.save":"idea.add"),children:se?o.jsxDEV(S_,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:169,columnNumber:24},this):o.jsxDEV(N_,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:169,columnNumber:40},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:168,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:156,columnNumber:9},this),o.jsxDEV("div",{className:"idea-list",children:b.length===0?o.jsxDEV("div",{className:"cmd-empty",children:V("idea.empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:175,columnNumber:13},this):b.map(B=>o.jsxDEV("div",{"data-idea":B.id,className:`idea-row${B.id===f?" dragging":""}${B.id===x?" editing":""}`,children:[o.jsxDEV("button",{type:"button",className:"idea-handle","aria-label":V("idea.dragSort"),onPointerDown:W=>ne(W,B.id),onPointerMove:ee,onPointerUp:te,onPointerCancel:te,children:"≡"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:182,columnNumber:15},this),o.jsxDEV("span",{className:"idea-text",onClick:()=>O(B),children:B.text},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:191,columnNumber:15},this),o.jsxDEV("button",{className:"idea-send",onClick:()=>E==null?void 0:E(B.text),"aria-label":V("idea.fillInput"),children:V("idea.send")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:192,columnNumber:15},this),o.jsxDEV("button",{className:"idea-del",onClick:()=>G(B.id),"aria-label":V("common.delete"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:193,columnNumber:15},this)]},B.id,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:177,columnNumber:13},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:173,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:150,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:148,columnNumber:5},this)}function wV({open:r,onClose:s}){return r?o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"cmd-backdrop",onClick:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:10,columnNumber:7},this),o.jsxDEV("div",{className:"changelog-panel",role:"dialog","aria-label":V("changelog.title"),children:[o.jsxDEV("div",{className:"cmd-head",children:[o.jsxDEV("span",{className:"cmd-title",children:V("changelog.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:13,columnNumber:11},this),o.jsxDEV("button",{className:"cmd-close",onClick:s,"aria-label":V("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:14,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:12,columnNumber:9},this),o.jsxDEV("div",{className:"changelog-list",children:Fg.map(d=>{var R,b;const _=d.items[Il()]||d.items.en||d.items.zh||[],E=d.version?`v${d.version}`:((R=d.label)==null?void 0:R[Il()])||((b=d.label)==null?void 0:b.en);return o.jsxDEV("div",{className:"rel",children:[o.jsxDEV("div",{className:"rel-date",children:[E&&o.jsxDEV("span",{className:"rel-ver",children:E},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:26,columnNumber:29},this),o.jsxDEV("span",{className:"rel-day",children:d.date},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:27,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:25,columnNumber:17},this),o.jsxDEV("ul",{className:"rel-items",children:_.map((a,u)=>o.jsxDEV("li",{children:a},u,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:30,columnNumber:41},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:29,columnNumber:17},this)]},d.version||d.date,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:24,columnNumber:15},this)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:16,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:11,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:9,columnNumber:5},this):null}function NV(r){let s=!1,d=!1;for(let _=r;_&&_!==document.body&&_!==document.documentElement;_=_.parentElement){const E=getComputedStyle(_);if(!d&&(E.overflowY==="auto"||E.overflowY==="scroll")&&_.scrollHeight>_.clientHeight&&(d=!0),!s&&(E.overflowX==="auto"||E.overflowX==="scroll")&&_.scrollWidth>_.clientWidth&&(s=!0),s&&d)break}return{x:s,y:d}}function SV(){U.useEffect(()=>{let r="block",s=0,d=0;const _=R=>{const b=R.touches[0];if(s=b?b.clientX:0,d=b?b.clientY:0,!(R.target instanceof Element)){r="block";return}const{x:a,y:u}=NV(R.target);r=u?"free":a?"xonly":"block"},E=R=>{if(!(r==="free"||!R.cancelable)){if(r==="xonly"){const b=R.touches[0];if(b&&Math.abs(b.clientX-s)>=Math.abs(b.clientY-d))return}R.preventDefault()}};return document.addEventListener("touchstart",_,{passive:!0,capture:!0}),document.addEventListener("touchmove",E,{passive:!1,capture:!0}),()=>{document.removeEventListener("touchstart",_,{capture:!0}),document.removeEventListener("touchmove",E,{capture:!0})}},[])}function CV(r,s,d=2e3){const _=U.useRef(s);_.current=s,U.useEffect(()=>{if(!r)return;let E=!1,R=null,b=!1;const a=()=>{var h;(h=window.history.state)!=null&&h.exitRoot||window.history.replaceState({...window.history.state,exitRoot:!0},"")},u=()=>{var h;b||(h=window.history.state)!=null&&h.exitGuard||(window.history.pushState({exitGuard:!0},""),b=!0)},g=()=>{var h;R&&(clearTimeout(R),R=null),E&&(E=!1,(h=_.current)==null||h.call(_,!1))};a(),u();const x=()=>{var h,f,S;if((h=window.history.state)!=null&&h.exitGuard){b=!0,g();return}(f=window.history.state)!=null&&f.exitRoot&&(b=!1,!E&&(E=!0,(S=_.current)==null||S.call(_,!0),R=setTimeout(()=>{var C;E=!1,R=null,(C=_.current)==null||C.call(_,!1),u()},d)))};return window.addEventListener("popstate",x),()=>{var h,f;window.removeEventListener("popstate",x),R&&clearTimeout(R),E&&((h=_.current)==null||h.call(_,!1)),b&&((f=window.history.state)!=null&&f.exitGuard)&&window.history.back()}},[r,d])}function b1(r){history.replaceState(history.state,"",`#${encodeURIComponent(r)}`)}const Ru=r=>{try{return decodeURIComponent(r)}catch{return r}};function Og(){const r=location.hash.replace(/^#/,""),s=r.match(/^\/inbox(?:\/(.*))?$/);if(s)return{session:null,window:null,pane:null,inbox:!0,inboxId:s[1]?Ru(s[1]):null};const d=r.match(/^\/s\/([^/]*)\/w\/([^/]*)\/p\/(.*)$/);return d?{session:Ru(d[1]),window:Ru(d[2]),pane:Ru(d[3]),inbox:!1,inboxId:null}:{session:Ru(r)||null,window:null,pane:null,inbox:!1,inboxId:null}}const EV="tmw-share-v1",jV="/__share__/";function DV(r=typeof location<"u"?location.search:""){try{return new URLSearchParams(r).has("share")}catch{return!1}}function kV(){if(typeof location>"u"||typeof history>"u")return;const r=new URL(location.href);r.searchParams.delete("share"),history.replaceState(history.state,"",r.pathname+r.search+r.hash)}async function RV(){if(typeof caches>"u")return null;let r;try{r=await caches.open(EV)}catch{return null}const s=await r.keys();if(!s.length)return null;const d=s[s.length-1],_=await r.match(d);if(await r.delete(d),!_)return null;const E=await _.blob();let R="shared";try{R=decodeURIComponent(new URL(d.url).pathname.slice(jV.length))||"shared"}catch{}return new File([E],R,{type:E.type||_.headers.get("Content-Type")||""})}const y1="①②③④⑤⑥⑦⑧⑨",Vl=(r,s)=>s&&r.some(d=>d.id===s)?s:r[0].id;function TV(){var za,Ao,Gl,Uo,ql,Yl,Kl,Gu,$r,qu,Oo,Vo,Po,Yu,$a,Xl,Ai,Wr,ei,Gr,Bo,Wa;const[r,s]=U.useState(!Lo()),[d,_]=U.useState(!1),[E,R]=U.useState(!1),[b,a]=U.useState(BM),u=le=>{IM(le),a(le)},[g,x]=U.useState(FM),h=le=>{HM(le),x(le)},[f,S]=U.useState(!1),[C,y]=U.useState(!1),[l,v]=U.useState(!1),[m,p]=U.useState(null),[N,k]=U.useState(null),[j,M]=U.useState(null),[D,L]=U.useState(null),[A,F]=U.useState(!1),[O,I]=U.useState(!1),[G,ne]=U.useState(null),[ee,te]=U.useState(null),[se,B]=U.useState(null),[W,X]=U.useState(null),[Y,ve]=U.useState(null),[he,Me]=U.useState(!1),[me,ie]=U.useState(null),[$,_e]=U.useState(null),de=P3(),[Ie,Ue]=U.useState(Eo),[tt,Qe]=U.useState(am),[st,Nt]=U.useState([]),[J,bt]=U.useState(null),[Gt,Ee]=U.useState(!0),[Te,Ge]=U.useState({}),[re,We]=U.useState("terminal");U.useEffect(()=>{We(localStorage.getItem("tw_lens_"+(J==null?void 0:J.paneId))||"terminal")},[J==null?void 0:J.paneId]);const[Ye,ge]=U.useState([]),[Ze,je]=U.useState(null),[Pe,be]=U.useState(!1),{status:Ae,enable:He}=z4(),[wt,kt]=U.useState(!1),[Ot,Pt]=U.useState(0),[dn,Qt]=U.useState(!1),[Mt,Ft]=U.useState(sA),[sn,Dn]=U.useState(null),[it,cn]=U.useState(oA),[zn,$n]=U.useState(Y0),[en,kn]=U.useState(DM),[On,ni]=U.useState([]),[nn,En]=U.useState(Lu),[vn,Xn]=U.useState(!1),[oe,$e]=U.useState(null),[et,yt]=U.useState(null),[gt,ft]=U.useState(kM),Rt=()=>{let le=!1;const Se=()=>{le||(le=!0,window.removeEventListener("popstate",ze),clearTimeout(rt),Xn(!0))},ze=()=>Se();window.addEventListener("popstate",ze);const rt=setTimeout(Se,300);R(!1)},pt=U.useRef(0),gn=U.useRef(null);gn.current=oe;const an=()=>{window.history.pushState({overlay:!0},""),pt.current+=1},qt=le=>{an(),$e(le),J0(le),En(Lu())},bn=()=>window.history.back(),Nn=()=>{$e(null),Xn(!1)},ui=()=>{On.forEach(le=>J0(le.id)),En(Lu())},Vn=async le=>{ni(Se=>Se.filter(ze=>ze.id!==le)),await D3(le)},Jn=U.useRef(null),ii=U.useRef(null),Dt=U.useRef(null),ae=U.useRef(null),Be=U.useCallback(()=>s(!0),[]),xe=U.useCallback(le=>F3(le,Be),[Be]),{previewDomain:Q,dynamicEnabled:Ce,previewSheetOpen:Je,setPreviewSheetOpen:Vt,activePreview:_t,shownPreview:St,tabs:Jt,activeName:yn,openPreviewSheet:hn,startPreview:An,startDynamicPreview:Yt,startUrlPreview:Wn,switchTab:Zn,closeTab:Wi,stopPreview:Gi,renewPreview:Cr}=I3(J,{settingsOpen:E,setSettingsOpen:R});U.useEffect(()=>{r||MA().then(Dn).catch(()=>{})},[r]);const pr=U.useCallback(()=>{EM(),R(!1),y(!1),_(!1),bt(null),Ee(!0),s(!0)},[]);SV();const di=A2();es(Je,()=>Vt(!1)),es(d,()=>_(!1)),es(Pe,()=>be(!1)),es(f,()=>S(!1)),es(C,()=>y(!1)),es(l,()=>v(!1)),es(wt,()=>kt(!1)),es(!!ee,()=>te(null)),es(E||dn,()=>{dn?Qt(!1):R(!1)}),es(!!N||!!m,()=>{m?p(null):k(null)}),es(!!j,()=>M(null)),U.useEffect(()=>{if(!vn)return;an();const le=()=>{if(pt.current=Math.max(0,pt.current-1),gn.current){$e(null);return}Xn(!1)};return window.addEventListener("popstate",le),()=>{window.removeEventListener("popstate",le),pt.current>0&&(window.history.go(-pt.current),pt.current=0)}},[vn]),U.useEffect(()=>{vn&&et&&(qt(et),yt(null))},[vn,et]),U.useEffect(()=>{vn&&On.length&&On[0].ts>gt&&(RM(On[0].ts),ft(On[0].ts))},[vn,On,gt]),CV(!!J,Me);const Er=U.useCallback(async le=>{var ze,rt;const Se=J==null?void 0:J.paneId;if(Se)try{await Pu(Se,[le]),(rt=(ze=Jn.current)==null?void 0:ze.wake)==null||rt.call(ze)}catch(nt){xe(nt)}},[J,Be]),vr=U.useCallback(async le=>{var ze,rt;const Se=J==null?void 0:J.paneId;if(Se)try{await Co(Se,le,!1),(rt=(ze=Jn.current)==null?void 0:ze.wake)==null||rt.call(ze)}catch(nt){xe(nt)}},[J,Be]),gr=U.useCallback(async le=>{var nt,Et,Ht,Xt,mi;const Se=(nt=J==null?void 0:J.window)==null?void 0:nt.id,ze=Dt.current??((Ht=(Et=Jn.current)==null?void 0:Et.getSize())==null?void 0:Ht.cols);if(!Se||!ze)return;const rt=Math.max(20,Math.min(500,ze+le));Dt.current=rt,(mi=(Xt=Jn.current)==null?void 0:Xt.flash)==null||mi.call(Xt);try{ae.current==null&&(ae.current=await wA(Se).then(Fn=>Fn.layout||"").catch(()=>"")),J.panes&&J.panes.length>1?await xA(J.paneId,rt):await yA(Se,rt)}catch(Fn){xe(Fn)}},[J,Be]),Fs=U.useCallback(async()=>{var ze;const le=(ze=J==null?void 0:J.window)==null?void 0:ze.id;if(!le)return;const Se=ae.current;Dt.current=null,ae.current=null;try{await NA(le,Se)}catch(rt){xe(rt)}},[J,Be]),hi=U.useCallback(async(le,Se=null)=>{var Ht;const ze=await Cu(le.id);if(!ze.length)return!1;const rt=(Se==null?void 0:Se.window)&&ze.find(Xt=>Xt.id===Se.window)||ze.find(Xt=>Xt.id===Vl(ze,OM(le.id))),nt=await Fa(rt.id);if(!nt.length)return!1;const Et=Se!=null&&Se.pane&&nt.some(Xt=>Xt.id===Se.pane)?Se.pane:Vl(nt,Gh(rt.id));return bt({session:le,windows:ze,window:rt,panes:nt,paneId:Et}),Ml({sessionId:le.id,windowId:rt.id,paneId:Et}),b1(le.name),Dt.current=((Ht=nt.find(Xt=>Xt.id===Et))==null?void 0:Ht.width)??null,ae.current=null,!0},[]),on=U.useCallback(async le=>{var Se;try{const ze=await Fa(le.id);if(!ze.length)return;const rt=Vl(ze,Gh(le.id));return bt(nt=>nt&&{...nt,window:le,panes:ze,paneId:rt}),Ml({sessionId:J.session.id,windowId:le.id,paneId:rt}),Dt.current=((Se=ze.find(nt=>nt.id===rt))==null?void 0:Se.width)??null,ae.current=null,rt}catch(ze){return xe(ze),null}},[J,Be]),ns=U.useCallback(async(le,Se,ze)=>{var Et,Ht,Xt,mi;const rt=(Et=J==null?void 0:J.session)==null?void 0:Et.id,nt=J==null?void 0:J.paneId;if(!(!rt||!nt))try{const{id:Fn}=await CA(rt,nt,le||void 0,Se,ze),va=await Cu(rt),ws=va.find(as=>as.id===Fn)||va[va.length-1],Ga=await Fa(ws.id);if(!Ga.length)return;const Ns=Vl(Ga,Gh(ws.id));bt(as=>as&&{...as,windows:va,window:ws,panes:Ga,paneId:Ns}),Ml({sessionId:rt,windowId:ws.id,paneId:Ns}),Dt.current=((Ht=Ga.find(as=>as.id===Ns))==null?void 0:Ht.width)??null,ae.current=null,v(!1),(mi=(Xt=Jn.current)==null?void 0:Xt.wake)==null||mi.call(Xt)}catch(Fn){if(xe(Fn))return;throw Fn}},[J,Be]),nr=U.useCallback(async le=>{var rt,nt;const Se=m;if(!Se)return;const ze=(rt=J==null?void 0:J.session)==null?void 0:rt.id;if(Se.kind==="session"){try{await EA(Se.id,le)}catch(Et){throw xe(Et)?Et:Et.status===409?new Error(Se("app.nameExists")):new Error(Se("app.renameFailed"))}Ue(jM(Se.name,le)),ju(),b1(le),bt(Et=>Et&&Et.session.id===Se.id?{...Et,session:{...Et.session,name:le}}:Et)}else{try{await jA(Se.id,le)}catch(Ht){throw xe(Ht)?Ht:new Error(Se("app.renameFailed"))}cA((nt=J==null?void 0:J.session)==null?void 0:nt.name,Se.name||Se.id,le);const Et=await Cu(ze);bt(Ht=>Ht&&{...Ht,windows:Et,window:Et.find(Xt=>Xt.id===Ht.window.id)||Ht.window})}p(null)},[m,J,Be]),Tt=U.useCallback(async()=>{var Et;const le=N,Se=J==null?void 0:J.session;if(!le||!Se)return;const ze=Se.id,rt=J.windows.length<=1;try{await DA(le.id)}catch(Ht){if(xe(Ht))return;window.alert(V("app.deleteFailed")),k(null);return}if(k(null),rt){Ue(q0(Se.name)),ju(),bt(null);return}const nt=await Cu(ze);if(le.id===J.window.id&&nt.length){const Ht=nt.find(Fn=>Fn.active)||nt[0],Xt=await Fa(Ht.id);if(!Xt.length)return;const mi=Vl(Xt,Gh(Ht.id));bt(Fn=>Fn&&{...Fn,windows:nt,window:Ht,panes:Xt,paneId:mi}),Ml({sessionId:ze,windowId:Ht.id,paneId:mi}),Dt.current=((Et=Xt.find(Fn=>Fn.id===mi))==null?void 0:Et.width)??null,ae.current=null}else bt(Ht=>Ht&&{...Ht,windows:nt})},[N,J,Be]),Fr=U.useCallback(async le=>{var nt;const Se=N,ze=(nt=J==null?void 0:J.session)==null?void 0:nt.id;if(!Se||!ze)return;const rt=Ng(J.windows,Se.id,le);if(rt)try{await kA(Se.id,rt.id);const Et=await Cu(ze);bt(Ht=>Ht&&{...Ht,windows:Et,window:Et.find(Xt=>Xt.id===Ht.window.id)||Ht.window}),k(Et.find(Ht=>Ht.id===Se.id)||null)}catch(Et){if(xe(Et)){k(null);return}window.alert(V("app.moveFailed")),k(null)}},[N,J,Be]),oi=Nm(()=>{J!=null&&J.session&&p({kind:"session",id:J.session.id,name:J.session.name})}),_r=U.useCallback(async le=>{try{const Se=(await Fl()).find(ze=>ze.name===le);if(!Se){window.alert(V("app.sessionGone",{name:le}));return}await hi(Se)&&_(!1)}catch(Se){xe(Se)}},[hi,Be]),jr=U.useCallback(async le=>{be(!1),$n(K0(le.pane,le.ts));try{const Se=(await Fl()).find(ze=>ze.name===le.session);if(!Se){window.alert(V("app.sessionGone",{name:le.session}));return}_(!1),await hi(Se,{window:le.window,pane:le.pane})}catch(Se){xe(Se)}},[hi,Be]),ma=U.useCallback(async({target:le,kill:Se,name:ze})=>{const rt=Ze,nt=await OA({pid:rt.pid,sessionId:rt.sessionId,target:le,kill:Se,name:ze});nt.name&&(Ue(G0(nt.name)),ju()),je(null),be(!1);try{nt.name&&(_(!1),await hi({id:nt.session,name:nt.name},{window:nt.window,pane:nt.pane}))}catch(Et){xe(Et)}try{ge(await aN())}catch{}},[Ze,hi,Be]),Qn=U.useCallback(()=>{const le=fN(Te);X0(le),kn(le)},[Te]),Un=U.useCallback(le=>{Ue(G0(le)),ju(),y(!1),_r(le)},[_r]),li=U.useCallback(le=>{Ue(q0(le)),ju(),bt(Se=>Se&&Se.session.name===le?null:Se)},[]),Gn=U.useCallback(le=>{bt(Se=>Se&&(Ml({windowId:Se.window.id,paneId:le}),{...Se,paneId:le}))},[]),Pn=U.useCallback((le,Se)=>{bt(ze=>{if(!ze)return ze;const rt=ze.windows.map(nt=>nt.id===le?{...nt,panes:Se.length}:nt);return ze.window.id===le?{...ze,windows:rt,panes:Se}:{...ze,windows:rt}})},[]),Bn=U.useCallback(async(le,Se)=>{var rt;const ze=(rt=J==null?void 0:J.window)==null?void 0:rt.id;if(ze){M(null),k(null);try{const{panes:nt,selectPaneId:Et}=await cN({paneId:le,dir:Se,windowId:ze,api:{splitPane:rN},getPanes:Fa});Pn(ze,nt),Gn(Et),ae.current=null}catch(nt){if(xe(nt))return;window.alert(V("pane.splitFailed"))}}},[J,Pn,Gn,Be]),Hs=U.useCallback(async()=>{var rt;const le=j,Se=(rt=J==null?void 0:J.window)==null?void 0:rt.id,ze=J==null?void 0:J.paneId;if(!(!le||!Se))try{const{panes:nt,selectPaneId:Et}=await GA({paneId:le,windowId:Se,viewedPaneId:ze,api:{closePane:RA},getPanes:Fa,pickId:Vl});M(null),Pn(Se,nt),Et&&Gn(Et),ae.current=null}catch(nt){if(M(null),xe(nt))return;window.alert(V("pane.closeFailed"))}},[j,J,Pn,Gn,Be]),ki=U.useCallback(async(le,Se)=>{var rt,nt;const ze=(rt=J==null?void 0:J.session)==null?void 0:rt.id;if(!(!le||!ze)){k(null);try{const Et=await Fa(le.id),Ht=Et.find(Fn=>Fn.active)||Et[0];if(!Ht)return;const{panes:Xt,selectPaneId:mi}=await cN({paneId:Ht.id,dir:Se,windowId:le.id,api:{splitPane:rN},getPanes:Fa});bt(Fn=>{if(!Fn)return Fn;const va=Fn.windows.map(ws=>ws.id===le.id?{...ws,panes:Xt.length}:ws);return{...Fn,windows:va,window:le,panes:Xt,paneId:mi}}),Ml({sessionId:ze,windowId:le.id,paneId:mi}),Dt.current=((nt=Xt.find(Fn=>Fn.id===mi))==null?void 0:nt.width)??null,ae.current=null}catch(Et){if(xe(Et))return;window.alert(V("pane.splitFailed"))}}},[J,Be]),zs=U.useCallback(async le=>{var ze;if(!le)return;let Se=J==null?void 0:J.paneId;le.id!==((ze=J==null?void 0:J.window)==null?void 0:ze.id)?(k(null),Se=await on(le)):await new Promise(rt=>{const nt=()=>{clearTimeout(Et),window.removeEventListener("popstate",nt),rt()},Et=setTimeout(nt,80);window.addEventListener("popstate",nt),k(null)}),Se&&(L(le.id),M(Se))},[J,on]),Hr=(za=J==null?void 0:J.session)==null?void 0:za.name,Dr=(Ao=J==null?void 0:J.window)==null?void 0:Ao.id;U.useEffect(()=>{Nt(Hr&&Dr?om(Hr,Dr):[])},[Hr,Dr]);const ys=(Gl=J==null?void 0:J.session)==null?void 0:Gl.name,Ri=((Uo=J==null?void 0:J.window)==null?void 0:Uo.name)||((ql=J==null?void 0:J.window)==null?void 0:ql.id);U.useEffect(()=>{Pt(ys&&Ri?Q1(ys,Ri).length:0)},[ys,Ri]),U.useEffect(()=>{J!=null&&J.paneId&&E3(J.paneId)},[J==null?void 0:J.paneId]),U.useEffect(()=>{var ze;const le=J==null?void 0:J.paneId;if(!le)return;const Se=(ze=Te[le])==null?void 0:ze.ts;Se!=null&&Y0()[le]!==Se&&$n(K0(le,Se))},[J==null?void 0:J.paneId,Te]),U.useEffect(()=>{if(!DV())return;kV();let le=!1;return(async()=>{const Se=await RV();le||!Se||(ne(Se),de.activate("home"),F(!0))})(),()=>{le=!0}},[]),U.useEffect(()=>{if(r||typeof navigator>"u"||!("serviceWorker"in navigator))return;const le=async({session:rt,window:nt,pane:Et})=>{if(rt)try{const Xt=(await Fl()).find(mi=>mi.name===rt);Xt&&(_(!1),await hi(Xt,{window:nt,pane:Et}))}catch(Ht){xe(Ht)}},Se=rt=>{const nt=rt.data;nt&&(nt.type==="navigate"?le(nt):nt.type==="navigate-inbox"&&nt.id&&(Xn(!0),yt(nt.id)))},ze=()=>{const rt=Og();rt.session&&(rt.window||rt.pane)&&le(rt)};return navigator.serviceWorker.addEventListener("message",Se),window.addEventListener("hashchange",ze),()=>{navigator.serviceWorker.removeEventListener("message",Se),window.removeEventListener("hashchange",ze)}},[r,hi,Be]),U.useEffect(()=>{if(r)return;const le=Og();le.inbox&&(Xn(!0),le.inboxId&&yt(le.inboxId),history.replaceState(history.state,"","#"))},[r]),U.useEffect(()=>{if(r)return;let le=!0;const Se=()=>j3().then(rt=>{le&&(ni(rt),En(TM(rt.map(nt=>nt.id))))});Se();const ze=()=>{document.visibilityState==="visible"&&Se()};return document.addEventListener("visibilitychange",ze),()=>{le=!1,document.removeEventListener("visibilitychange",ze)}},[r,vn]);const br=U.useCallback(le=>{var nt,Et,Ht,Xt;(Et=(nt=Jn.current)==null?void 0:nt.wake)==null||Et.call(nt);const Se=(Ht=J==null?void 0:J.session)==null?void 0:Ht.name,ze=(Xt=J==null?void 0:J.window)==null?void 0:Xt.id;Se&&ze&&Nt(YM(Se,ze,le));const rt=F2(le);X(rt&&(J!=null&&J.paneId)?{...rt,paneId:J.paneId}:null)},[J]),xs=U.useCallback(le=>{Qe(am().includes(le)?$M(le):zM(le))},[]),kr=U.useCallback(le=>{var rt,nt;const Se=(rt=J==null?void 0:J.session)==null?void 0:rt.name,ze=(nt=J==null?void 0:J.window)==null?void 0:nt.id;Se&&ze&&Nt(KM(Se,ze,le))},[J]),Ti=((Kl=(Yl=J==null?void 0:J.panes)==null?void 0:Yl.find(le=>le.id===J.paneId))==null?void 0:Kl.cwd)||null,zr=g&&!!(J!=null&&J.paneId)&&!!((Gu=Te[J.paneId])!=null&&Gu.agent)&&re==="chat",ir=async le=>{if(mA(le)){const ze=le.split("/").pop()||le;if(de.tabs.some(Et=>Et.key===le)){de.activate(le),is(le),F(!0);return}const{url:rt,mtimeMs:nt}=await lN(le);de.openDoc(le,{type:"image",name:ze,content:rt,mtime:nt}),Q0({path:le,name:ze,type:"image",ts:Date.now()}),F(!0);return}const Se=await sN(le);de.openDoc(le,{type:Se.type,name:Se.name,content:Se.content,mtime:Se.mtimeMs}),Q0({path:le,name:Se.name,type:Se.type,ts:Date.now()}),F(!0)},fa=le=>{const Se=de.tabs.find(ze=>ze.key===le);(Se==null?void 0:Se.type)==="image"&&Se.content&&URL.revokeObjectURL(Se.content),de.closeTab(le)},is=le=>{const Se=de.tabs.find(ze=>ze.key===le);if(!(!Se||Se.type==="home")){if(Se.type==="image"){lN(le,Se.mtime??null).then(ze=>{if(ze.notModified)return;const rt=Se.content;de.refreshDoc(le,{content:ze.url,mtime:ze.mtimeMs}),rt&&URL.revokeObjectURL(rt)}).catch(()=>{});return}sN(le,Se.mtime??null).then(ze=>{ze.notModified||de.refreshDoc(le,{type:ze.type,name:ze.name,content:ze.content,mtime:ze.mtimeMs})}).catch(()=>{})}},$s=le=>{de.activate(le),is(le)},Li=()=>{F(!0),is(de.active)},z=le=>{const Se=/-> (\d+)/.exec((le==null?void 0:le.message)||""),ze=Se?Number(Se[1]):0;return V(ze===404?"app.docNotFound":ze===413?"app.docTooLarge":ze===400?"app.docUnsupported":"app.docOpenFailed")},ce=async le=>{if(vS(le)){try{await ir(le)}catch(ze){ve(z(ze))}return}const Se=eN(J==null?void 0:J.paneId)??Ti;if(Se)try{await ir(So(Se,le));return}catch{}te({rawPath:le})},K=async le=>{try{await ir(So(le,ee.rawPath))}catch(Se){ve(z(Se));return}J!=null&&J.paneId&&ZM(J.paneId,le),setTimeout(()=>te(null),0)},ue=(le,Se,ze)=>{(le==null?void 0:le.kind)==="url"?_e({port:le.port,path:le.urlPath,raw:le.raw,x:Se,y:ze}):ie({path:(le==null?void 0:le.path)??le,x:Se,y:ze})},ye=le=>{ie(null),ce(le)},[Le,Re]=U.useState(null),Xe=async()=>{const le=$;if(le)try{await Wn({port:le.port,path:le.path}),_e(null),Re(null)}catch{Re(V("localurl.notListening",{port:le.port}))}},at=()=>{_e(null),Re(null)};if(U.useEffect(()=>{if(!Y)return;const le=setTimeout(()=>ve(null),4e3);return()=>clearTimeout(le)},[Y]),U.useEffect(()=>{if(!se)return;const le=setTimeout(()=>B(null),3500);return()=>clearTimeout(le)},[se]),U.useEffect(()=>{if(r)return;const le=Eo();if(!le.length){Ee(!1);return}let Se=!1;return(async()=>{try{const ze=await Fl();if(Se||!ze.length)return;const rt=ze.filter(Xt=>le.includes(Xt.name));if(!rt.length)return;const nt=Og();let Et=nt.session?rt.find(Xt=>Xt.name===nt.session):null;const Ht=Et?{window:nt.window,pane:nt.pane}:null;if(!Et){const Xt=UM();Xt&&(Et=rt.find(mi=>mi.id===Xt))}Et||(Et=rt[0]),Se||await hi(Et,Ht)}catch(ze){xe(ze)}finally{Se||Ee(!1)}})(),()=>{Se=!0}},[r,hi]),Wg({fetch:()=>UA(Ie),apply:le=>Ge(le||{}),intervalMs:5e3,enabled:!r,deps:[Ie]}),U.useEffect(()=>{if(en!=null)return;const le=fN(Te);le>0&&(X0(le),kn(le))},[Te,en]),Wg({fetch:aN,apply:le=>ge(Array.isArray(le)?le:[]),intervalMs:15e3,enabled:!r}),r)return o.jsxDEV(E4,{onSaved:()=>{s(!1),Ee(!0)}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1046,columnNumber:12},this);const vt=b3(Te,zn,en??1/0),ct=x3(vt),Kt={};for(const le of Object.values(Te))le.window&&le.agent&&(Kt[le.window]=le.agent);const Ct={};for(const[le,Se]of Object.entries(Te))Se.agent&&(Ct[le]=Se.agent);const At=!!qh&&Mt!==qh,_n=!!(sn!=null&&sn.updateAvailable)&&sn.latest!==it,Mi=new Set(nn),rs=On.filter(le=>!Mi.has(le.id)).length,rr=On.length>0&&On[0].ts>gt,ss=At||_n||rr,sr=()=>{R(!0),sn!=null&&sn.latest&&(lA(sn.latest),cn(sn.latest))},pa=()=>{R(!1),Qt(!0),aA(qh),Ft(qh)};return o.jsxDEV("div",{className:"app","data-chat-tone":b,style:di?{transform:`translateY(-${di}px)`}:void 0,children:[o.jsxDEV("header",{className:"topbar",children:[o.jsxDEV("button",{className:"hamburger",onClick:()=>_(!0),children:"☰"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1090,columnNumber:9},this),o.jsxDEV("span",{className:"session-name",...oi,children:(($r=J==null?void 0:J.session)==null?void 0:$r.name)??"—"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1091,columnNumber:9},this),St&&o.jsxDEV("button",{className:"topbar-icon preview-live",onClick:()=>Vt(!0),"aria-label":V("app.preview"),title:V("app.openPreview"),children:o.jsxDEV(um,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1096,columnNumber:72},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1095,columnNumber:11},this),o.jsxDEV("button",{className:"topbar-icon",onClick:()=>kt(!0),"aria-label":V("app.ideas"),title:V("app.ideas"),disabled:!J,children:[o.jsxDEV(ZA,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1101,columnNumber:11},this),Ot>0&&o.jsxDEV("span",{className:"idea-badge",children:Ot},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1102,columnNumber:29},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1099,columnNumber:9},this),o.jsxDEV(V4,{rows:vt,top:ct,open:Pe,onToggle:()=>be(le=>!le),onClose:()=>be(!1),onSelectRow:jr,onMarkAllRead:Qn,hooksStatus:Ae,onEnableHooks:He},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1104,columnNumber:9},this),o.jsxDEV("button",{className:"topbar-icon",onClick:()=>S(!0),"aria-label":V("usage.title"),title:V("usage.title"),children:o.jsxDEV(r3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1115,columnNumber:131},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1115,columnNumber:9},this),o.jsxDEV("button",{className:"topbar-icon",onClick:Li,"aria-label":V("app.files"),title:V("app.files"),children:o.jsxDEV(Bu,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1116,columnNumber:114},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1116,columnNumber:9},this),o.jsxDEV("button",{className:"topbar-icon",onClick:()=>I(!0),"aria-label":"Git",title:"Git",children:o.jsxDEV(lS,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1117,columnNumber:103},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1117,columnNumber:9},this),o.jsxDEV("button",{className:"topbar-icon",onClick:sr,"aria-label":V("app.settings"),title:V("app.settings"),children:[o.jsxDEV(cm,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1119,columnNumber:11},this),ss&&o.jsxDEV("span",{className:"topbar-dot","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1120,columnNumber:23},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1118,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1089,columnNumber:7},this),o.jsxDEV(O4,{open:f,onClose:()=>S(!1),onAuthFail:Be},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1123,columnNumber:7},this),o.jsxDEV(L4,{open:E,onClose:()=>R(!1),chatTone:b,onChatTone:u,chatLensEnabled:g,onChatLensEnabled:h,hooksStatus:Ae,onEnableHooks:He,termRef:Jn,getColCount:()=>{var le,Se;return Dt.current??((Se=(le=Jn.current)==null?void 0:le.getSize())==null?void 0:Se.cols)},onColAdjust:le=>gr(le),onColRestore:Fs,onOpenChangelog:pa,changelogUnread:At,notifUnread:rr,onOpenInbox:Rt,updateInfo:sn,activePreview:_t,pane:J==null?void 0:J.paneId,lastPreviewDir:MM((qu=J==null?void 0:J.window)==null?void 0:qu.id),dynamicEnabled:Ce,onStartPreview:An,onStartDynamicPreview:Yt,onOpenPreview:hn,onRenew:Cr,onStop:Gi},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1128,columnNumber:7},this),o.jsxDEV(wV,{open:dn,onClose:()=>Qt(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1156,columnNumber:7},this),o.jsxDEV(k3,{open:vn,detailId:oe,items:On,readIds:nn,onOpenDetail:qt,onCloseDetail:bn,onClose:Nn,onDelete:Vn,onMarkAllRead:ui,unreadCount:rs},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1157,columnNumber:7},this),o.jsxDEV(H3,{open:d,currentSessionName:(Oo=J==null?void 0:J.session)==null?void 0:Oo.name,bound:Ie,onSelectSession:_r,onUnbind:li,onBind:()=>y(!0),onClose:()=>_(!1),onLogout:pr,orphans:Ye,onTakeoverRequest:je},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1169,columnNumber:7},this),o.jsxDEV(q4,{open:C,bound:Ie,onBound:Un,onClose:()=>y(!1),onAuthFail:Be,inset:di},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1181,columnNumber:7},this),o.jsxDEV(K4,{open:l,onClose:()=>v(!1),onCreate:ns,paneId:J==null?void 0:J.paneId,inset:di},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1189,columnNumber:7},this),o.jsxDEV(J4,{open:!!m,title:(m==null?void 0:m.kind)==="session"?V("app.renameSession"):V("app.renameWindow"),currentName:(m==null?void 0:m.name)||"",onClose:()=>p(null),onSubmit:nr,inset:di},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1196,columnNumber:7},this),o.jsxDEV(P4,{open:!!Ze,orphan:Ze,onConfirm:ma,onClose:()=>je(null),inset:di},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1204,columnNumber:7},this),o.jsxDEV(gm,{open:!!N,title:N?N.name||N.id:"",onClose:()=>k(null),actions:N?[...N.panes===1?[{key:"split-h",icon:o.jsxDEV(uN,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1220,columnNumber:37},this),label:V("pane.splitH"),onClick:()=>ki(N,"h")},{key:"split-v",icon:o.jsxDEV(dN,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1221,columnNumber:37},this),label:V("pane.splitV"),onClick:()=>ki(N,"v")}]:[],...N.panes>1?[{key:"manage-split",icon:o.jsxDEV(c3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1225,columnNumber:42},this),label:V("pane.manage"),onClick:()=>zs(N)}]:[],...J&&J.windows.length>1?[[{key:"move-left",label:V("app.moveLeft"),disabled:!Ng(J.windows,N.id,"left"),onClick:()=>Fr("left")},{key:"move-right",label:V("app.moveRight"),disabled:!Ng(J.windows,N.id,"right"),onClick:()=>Fr("right")}]]:[],{key:"rename",label:V("common.rename"),onClick:()=>{p({kind:"window",id:N.id,name:N.name||""}),k(null)}},{key:"delete",label:V("app.deleteWindow"),danger:!0,confirm:!0,confirmLabel:J&&J.windows.length<=1?V("app.deleteLastWindowConfirm"):V("app.deleteConfirm"),onClick:Tt}]:[]},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1211,columnNumber:7},this),o.jsxDEV(gm,{open:!!j,title:(()=>{if(!j||!J)return"";const le=J.panes.findIndex(rt=>rt.id===j),Se=J.panes[le];return Se?`${le<y1.length?y1[le]:String(le+1)} ${Se.command||Se.id}`:""})(),onClose:()=>M(null),actions:j?[{key:"split-h",icon:o.jsxDEV(uN,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1269,columnNumber:35},this),label:V("pane.splitH"),onClick:()=>Bn(j,"h")},{key:"split-v",icon:o.jsxDEV(dN,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1270,columnNumber:35},this),label:V("pane.splitV"),onClick:()=>Bn(j,"v")},{key:"close",icon:o.jsxDEV(ca,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1272,columnNumber:33},this),label:V("pane.close"),danger:!0,confirm:!0,confirmLabel:V("pane.closeConfirm"),onClick:Hs}]:[]},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1257,columnNumber:7},this),o.jsxDEV(cV,{open:A,pane:J==null?void 0:J.paneId,windowId:(Vo=J==null?void 0:J.window)==null?void 0:Vo.id,tabs:de.tabs,active:de.active,onActivate:$s,onCloseTab:fa,onMinimize:()=>F(!1),onOpenDoc:ce,pendingShare:G,onPendingConsumed:()=>ne(null)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1277,columnNumber:7},this),o.jsxDEV(hV,{open:O,pane:J==null?void 0:J.paneId,windowId:(Po=J==null?void 0:J.window)==null?void 0:Po.id,inset:di,onClose:()=>I(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1290,columnNumber:7},this),o.jsxDEV(gV,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1293,columnNumber:7},this),o.jsxDEV(F4,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1295,columnNumber:7},this),o.jsxDEV(v3,{open:Je&&!!St,tabs:Jt,activeName:yn,domain:Q,onSwitchTab:Zn,onCloseTab:Wi,onRenew:Cr,onStop:Gi,onMinimize:()=>Vt(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1297,columnNumber:7},this),Y&&o.jsxDEV("div",{className:"doc-toast",role:"alert",onClick:()=>ve(null),children:Y},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1309,columnNumber:9},this),he&&o.jsxDEV("div",{className:"exit-toast",role:"status",children:V("app.backToExit")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1312,columnNumber:9},this),se&&o.jsxDEV("div",{className:"handoff-toast",role:"status",children:V("chat.slash.handedOff",{cmd:se})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1315,columnNumber:9},this),me&&o.jsxDEV(_1,{path:me.path,x:me.x,y:me.y,onOpen:ye,onClose:()=>ie(null)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1318,columnNumber:9},this),$&&o.jsxDEV(_1,{icon:o.jsxDEV(um,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1328,columnNumber:17},this),name:V("localurl.title"),path:$.raw,openLabel:V("localurl.open"),note:Le??(Ce?void 0:V("localurl.disabled")),disabled:!Ce,x:$.x,y:$.y,onOpen:Xe,onClose:at},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1327,columnNumber:9},this),o.jsxDEV(xV,{open:wt,session:(Yu=J==null?void 0:J.session)==null?void 0:Yu.name,window:(($a=J==null?void 0:J.window)==null?void 0:$a.name)||((Xl=J==null?void 0:J.window)==null?void 0:Xl.id),onClose:()=>kt(!1),onSend:le=>{var Se;(Se=ii.current)==null||Se.fill(le),kt(!1)},onCountChange:Pt},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1340,columnNumber:7},this),o.jsxDEV(Wu,{open:!!ee,seedCwd:eN(J==null?void 0:J.paneId)??Ti??null,pane:(J==null?void 0:J.paneId)??null,hint:ee?o.jsxDEV(o.Fragment,{children:[V("app.cannotLocate")," ",o.jsxDEV("code",{children:ee.rawPath},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1352,columnNumber:54},this),V("app.pickItsDir")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1352,columnNumber:28},this):null,onPick:K,onClose:()=>te(null),inset:di},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1348,columnNumber:7},this),J?o.jsxDEV(o.Fragment,{children:[o.jsxDEV(tU,{windows:J.windows,windowAgents:Kt,paneAgents:Ct,currentAgent:(Ai=Te[J.paneId])==null?void 0:Ai.agent,currentWindowId:J.window.id,panes:J.panes,currentPaneId:J.paneId,onSelectWindow:on,onSelectPane:Gn,onNewWindow:()=>v(!0),onManageWindow:le=>k(le),onManagePane:le=>M(le),paneSheetOpen:!!j,openMapFor:D,onMapOpened:()=>L(null),trackWindowId:N==null?void 0:N.id,lens:re,chatLensEnabled:g,onLensChange:le=>{We(le),localStorage.setItem("tw_lens_"+J.paneId,le)}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1359,columnNumber:11},this),J.paneId&&(zr?o.jsxDEV(C4,{pane:J.paneId,kind:(Wr=Te[J.paneId])==null?void 0:Wr.kind,msg:(ei=Te[J.paneId])==null?void 0:ei.msg,onAuthFail:Be,slashEcho:W&&W.paneId===J.paneId?W:null,onSlashEchoDone:()=>X(null)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1382,columnNumber:15},this):o.jsxDEV($U,{ref:Jn,pane:J.paneId,inset:di,onAuthFail:Be,onDocLinkTap:ue,onTap:()=>{var le;return(le=ii.current)==null?void 0:le.hideKeyboard()}},J.paneId,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1386,columnNumber:15},this)),zr?o.jsxDEV(G2,{pane:J.paneId,kind:(Gr=Te[J.paneId])==null?void 0:Gr.kind,cwd:Ti,onKey:Er,onAuthFail:Be,onSent:br,onInteractiveSlash:le=>{We("terminal"),localStorage.setItem("tw_lens_"+J.paneId,"terminal"),B(le)}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1399,columnNumber:13},this):o.jsxDEV(B2,{ref:ii,pane:J.paneId,onAuthFail:Be,onKey:Er,onText:vr,cwd:Ti,agent:(Bo=Te[J.paneId])==null?void 0:Bo.agent,windowId:(Wa=J.window)==null?void 0:Wa.id,recent:st,favorites:tt,onSent:br,onToggleFav:xs,onRemoveRecent:kr,inset:di},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1409,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1358,columnNumber:9},this):Gt?o.jsxDEV("div",{className:"loading",children:V("common.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1428,columnNumber:9},this):Ie.length===0?o.jsxDEV("button",{className:"empty-cta",onClick:()=>y(!0),children:[V("app.noBoundSession"),o.jsxDEV("span",{children:V("app.tapToBind")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1431,columnNumber:36},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1430,columnNumber:9},this):o.jsxDEV("div",{className:"loading",children:V("app.selectSessionHint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1434,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1088,columnNumber:5},this)}E1(document.getElementById("root")).render(o.jsxDEV(TV,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/main.jsx",lineNumber:6,columnNumber:52},void 0));if(typeof window<"u"&&window.__hideBootSplash){const r=[...document.querySelectorAll('link[rel="stylesheet"]')].filter(d=>d.media==="print"),s=r.length?new Promise(d=>{let _=r.length;r.forEach(E=>E.addEventListener("load",()=>{--_||d()},{once:!0}))}):Promise.resolve();requestAnimationFrame(()=>requestAnimationFrame(()=>s.then(()=>window.__hideBootSplash())))}
|
|
330
|
+
`)){if(E.startsWith("diff --git")){const b=E.match(/ b\/(.*)$/);d={path:b?b[1]:E.slice(11),hunks:[]},s.push(d),_=null;continue}if(!d)continue;if(E.startsWith("@@")){_={header:E,lines:[]},d.hunks.push(_);continue}if(!_)continue;const R=E[0];R==="+"?_.lines.push({type:"add",text:E.slice(1)}):R==="-"?_.lines.push({type:"del",text:E.slice(1)}):R===" "&&_.lines.push({type:"ctx",text:E.slice(1)})}return s}const dV=r=>String(r||"").replace(/\/+$/,"").split("/").pop()||r;function bm(r,s){const d=(r&&r!==" "?r:s)||"?";return d==="?"?"?":d}function hV({open:r,pane:s,windowId:d,inset:_=0,onClose:E}){const R=U.useRef(!0);U.useEffect(()=>()=>{R.current=!1},[]);const[b,a]=U.useState([]),[u,g]=U.useState(null),[x,h]=U.useState([]),f=x.length?x[x.length-1]:null,[S,C]=U.useState(!1),[y,l]=U.useState(null),v=U.useRef(d);U.useEffect(()=>{v.current=d},[d]);const[m,p]=U.useState(null),[N,k]=U.useState(null),[j,M]=U.useState(null),[D,L]=U.useState(null),[A,F]=U.useState(20),[O,I]=U.useState(!1),[G,ne]=U.useState({changes:!0,commits:!0}),[ee,te]=U.useState(!1),se=U.useRef(null),[B,W]=U.useState(null),[X,Y]=U.useState(null),[ve,he]=U.useState(null),Me=U.useRef(x);Me.current=x;const me=U.useRef(S);me.current=S;const ie=U.useRef(E);ie.current=E;const $=U.useRef(0),_e=()=>{window.history.pushState({gitOverlay:!0},""),$.current+=1},de=je=>{_e(),h(Pe=>[...Pe,je])},Ie=()=>{_e(),C(!0)};U.useEffect(()=>{if(!r)return;_e();const je=()=>{var Pe;if($.current=Math.max(0,$.current-1),me.current){C(!1);return}if(Me.current.length){h(be=>be.slice(0,-1));return}(Pe=ie.current)==null||Pe.call(ie)};return window.addEventListener("popstate",je),()=>{window.removeEventListener("popstate",je),$.current>0&&(window.history.go(-$.current),$.current=0)}},[r]),U.useEffect(()=>{if(!r)return;let je=!1;h([]),L(null),Y(null),he(null);const Pe=x_(d);return Pe.length?(a(Pe),g(be=>be&&Pe.includes(be)?be:Pe[0]),()=>{je=!0}):(a([]),g(null),(async()=>{try{if(!s)return;const{cwd:be}=await jo(s);if(!be)return;const{repos:Ae=[]}=await oN(be);if(je||!Ae.length)return;const He=nN(d,Ae.map(wt=>wt.path));if(je)return;a(He),g(He[0]??null)}catch(be){if(je)return;(be==null?void 0:be.message)==="outside home"?he(V("git.outsideRoots")):Y(V("git.errReadRepo"))}})(),()=>{je=!0})},[r,s,d]),U.useEffect(()=>{if(!r||!s)return;let je=!1;return jo(s).then(({cwd:Pe})=>{!je&&Pe&&l(Pe)}).catch(()=>{}),()=>{je=!0}},[r,s]),U.useEffect(()=>{if(!r||!u){p(null),k(null);return}let je=!1;return p(null),k(null),M(null),L(null),F(20),Y(null),he(null),(async()=>{try{const[Pe,be]=await Promise.all([VA(u),BA(u)]);if(je)return;p(Pe.changes??[]),k(be.branches??[])}catch{je||Y(V("git.errLoad"))}})(),()=>{je=!0}},[r,u]),U.useEffect(()=>{if(!r||!u){M(null);return}let je=!1;return(async()=>{try{const{commits:Pe=[]}=await PA(u,{ref:D||void 0,limit:A});je||M(Pe)}catch{je||M([])}finally{je||I(!1)}})(),()=>{je=!0}},[r,u,D,A]);const Ue=!u||!f?"":f.kind==="diff"?`${u}|diff|${f.path}|${f.commit||""}|${f.staged?1:0}`:`${u}|commit|${f.hash}`;U.useEffect(()=>{if(!r||!u||!f){W(null);return}let je=!1;return Y(null),W(null),(async()=>{try{let Pe;if(f.kind==="diff"){const{diff:be,truncated:Ae}=await IA(u,{path:f.path,commit:f.commit,staged:f.staged});Pe={files:uV(be),truncated:Ae}}else Pe=await FA(u,f.hash);je||W({key:Ue,payload:Pe})}catch{je||Y(V("git.errLoad"))}})(),()=>{je=!0}},[r,Ue]);const tt=U.useCallback(()=>{window.history.back()},[]),Qe=je=>{g(je),h([]),L(null)},st=async je=>{window.history.back(),he(null);try{const{repos:Pe=[]}=await oN(je);if(!R.current)return;if(!Pe.length){he(V("git.noRepoInDir"));return}const be=Pe.map(kt=>kt.path),Ae=v.current,He=Ae?nN(Ae,be):be;a(kt=>{const Ot=[...kt];for(const Pt of He)Ot.includes(Pt)||Ot.push(Pt);return Ot});const wt=be.find(kt=>!b.includes(kt))||be[0];Qe(wt)}catch(Pe){if(!R.current)return;(Pe==null?void 0:Pe.message)==="outside home"?he(V("git.outsideRoots")):Y(V("git.errReadDir"))}},Nt=je=>{const Pe=uA(d,je);a(Pe),u===je&&(g(Pe[0]??null),h([]),L(null))},J=(N||[]).find(je=>je.current)||null,bt=je=>{const Pe=je===(J==null?void 0:J.name)?null:je;Pe!==D&&(L(Pe),M(null),F(20))},Gt=je=>ne(Pe=>({...Pe,[je]:!Pe[je]})),Ee=j!=null&&j.length>=A,Te=je=>{if(!Ee||O)return;const Pe=je.currentTarget;Pe.scrollHeight-Pe.scrollTop-Pe.clientHeight<80&&(I(!0),F(be=>be+20))},Ge=D||(J==null?void 0:J.name)||null,re=!!D&&D!==(J==null?void 0:J.name),We=D?(N||[]).find(je=>je.name===D):J,Ye=B&&B.key===Ue?B.payload:null,ge=!!f,Ze=(f==null?void 0:f.kind)==="commit"?V("git.commitDetail"):(f==null?void 0:f.kind)==="diff"?f.path||V("git.diff"):"";return Wl.createPortal(o.jsxDEV("div",{className:`file-sheet git-sheet ${r?"open":""}`,"aria-hidden":!r,style:{"--kb-inset":`${_}px`},children:[o.jsxDEV("div",{className:"file-tabs git-head",children:[ge?o.jsxDEV("div",{className:"git-drill-head",children:[o.jsxDEV("button",{className:"git-back","aria-label":V("common.back"),title:V("common.back"),onClick:tt,children:"‹"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:291,columnNumber:13},this),o.jsxDEV("span",{className:"git-drill-title",children:[o.jsxDEV(lS,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:292,columnNumber:47},this),o.jsxDEV("span",{className:"git-title-text",children:Ze},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:292,columnNumber:58},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:292,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:290,columnNumber:11},this):o.jsxDEV("div",{className:"git-tabs-scroll",children:[o.jsxDEV("button",{className:"git-tab-add","aria-label":V("git.bindRepo"),title:V("git.bindRepo"),onClick:Ie,children:"+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:296,columnNumber:13},this),b.map(je=>o.jsxDEV("div",{className:`git-tab ${je===u?"active":""}`,children:[o.jsxDEV("button",{className:"git-tab-label",onClick:()=>Qe(je),children:dV(je)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:299,columnNumber:17},this),o.jsxDEV("button",{className:"git-tab-x","aria-label":V("common.close"),title:V("common.close"),onClick:()=>Nt(je),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:300,columnNumber:17},this)]},je,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:298,columnNumber:15},this))]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:295,columnNumber:11},this),o.jsxDEV("button",{className:"file-min","aria-label":V("git.collapse"),title:V("git.collapse"),onClick:()=>E==null?void 0:E(),children:o.jsxDEV(ha,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:305,columnNumber:123},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:305,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:288,columnNumber:7},this),!ge&&u&&o.jsxDEV("div",{className:"git-branch-bar",children:[o.jsxDEV("span",{className:"git-branch-bar-name",children:[o.jsxDEV("span",{className:"git-branch-glyph",children:"⎇"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:316,columnNumber:13},this)," ",Ge||"—",!re&&Ge&&o.jsxDEV("span",{className:"git-branch-cur-tag",children:V("git.currentBranch")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:317,columnNumber:46},this),We&&(We.ahead||We.behind)?o.jsxDEV("span",{className:"git-branch-bar-track",children:[We.ahead?o.jsxDEV("span",{className:"git-ahead",children:["↑",We.ahead]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:320,columnNumber:42},this):null,We.behind?o.jsxDEV("span",{className:"git-behind",children:["↓",We.behind]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:321,columnNumber:43},this):null]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:319,columnNumber:15},this):null]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:315,columnNumber:11},this),o.jsxDEV("div",{className:"git-branch-dd",children:[o.jsxDEV("button",{className:`git-branch-trigger ${re?"other":""}`,onClick:()=>te(je=>!je),"aria-haspopup":"listbox","aria-expanded":ee,title:V("git.switchViewedBranch"),children:[o.jsxDEV("span",{className:"git-branch-trigger-name",children:V("git.switchBranch")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:328,columnNumber:15},this),o.jsxDEV("span",{className:"git-branch-caret",children:o.jsxDEV(ha,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:329,columnNumber:50},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:329,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:326,columnNumber:13},this),ee&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"git-dd-backdrop",onClick:()=>te(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:333,columnNumber:17},this),o.jsxDEV("div",{className:"git-dd-menu",role:"listbox",children:[(N||[]).length===0&&o.jsxDEV("div",{className:"git-empty",children:V("git.noBranches")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:335,columnNumber:53},this),(N||[]).map(je=>{const Pe=D?je.name===D:je.current;return o.jsxDEV("button",{role:"option","aria-selected":Pe,className:`git-dd-item ${je.current?"current":""} ${Pe?"viewing":""}`,onClick:()=>{bt(je.name),te(!1)},children:[o.jsxDEV("span",{className:"git-branch-dot",children:je.current?"●":""},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:342,columnNumber:25},this),o.jsxDEV("span",{className:"git-row-path",children:je.name},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:343,columnNumber:25},this),je.upstream&&o.jsxDEV("span",{className:"git-branch-up",children:[je.upstream,je.ahead?o.jsxDEV("span",{className:"git-ahead",children:[" ↑",je.ahead]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:346,columnNumber:40},this):null,je.behind?o.jsxDEV("span",{className:"git-behind",children:[" ↓",je.behind]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:347,columnNumber:41},this):null]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:345,columnNumber:27},this)]},je.name,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:339,columnNumber:23},this)})]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:334,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:332,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:325,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:312,columnNumber:9},this),o.jsxDEV("div",{className:"git-body",children:[X&&o.jsxDEV("div",{className:"git-error",children:X},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:361,columnNumber:19},this),ve&&!X&&!ge&&o.jsxDEV("div",{className:"git-notice",children:ve},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:362,columnNumber:44},this),!u&&!X&&!ve&&o.jsxDEV("div",{className:"git-empty",children:V("git.noRepoBound")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:364,columnNumber:11},this),ge&&u&&!X&&o.jsxDEV("div",{className:"git-scroll",children:Ye?f.kind==="diff"?o.jsxDEV(vV,{data:Ye},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:370,columnNumber:41},this):o.jsxDEV(pV,{data:Ye,onOpenFile:je=>de({kind:"diff",path:je,commit:f.hash})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:371,columnNumber:17},this):o.jsxDEV("div",{className:"git-loading",children:V("common.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:369,columnNumber:23},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:368,columnNumber:11},this),!ge&&u&&!X&&o.jsxDEV(o.Fragment,{children:[o.jsxDEV(p1,{variant:"top",title:V("git.changes"),count:m==null?void 0:m.length,expanded:G.changes,onToggle:()=>Gt("changes"),children:m==null?o.jsxDEV("div",{className:"git-loading",children:V("common.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:380,columnNumber:34},this):o.jsxDEV(mV,{data:{changes:m},onOpenFile:(je,Pe)=>de({kind:"diff",path:je,staged:Pe})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:381,columnNumber:19},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:379,columnNumber:13},this),o.jsxDEV(p1,{variant:"mid",title:V("git.commits"),subtitle:re?Ge:null,expanded:G.commits,onToggle:()=>Gt("commits"),bodyRef:se,onScroll:Te,children:j==null?o.jsxDEV("div",{className:"git-loading",children:V("common.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:385,columnNumber:34},this):o.jsxDEV(o.Fragment,{children:[o.jsxDEV(fV,{data:{commits:j},onOpen:je=>de({kind:"commit",hash:je})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:388,columnNumber:21},this),Ee&&o.jsxDEV("div",{className:"git-more",children:V(O?"common.loading":"git.pullToLoadMore")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:389,columnNumber:40},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:387,columnNumber:19},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:383,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:378,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:360,columnNumber:7},this),o.jsxDEV(Wu,{open:S,seedCwd:y,pane:s,inset:_,hint:V("git.pickerHint"),onPick:st,onClose:()=>window.history.back()},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:397,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:285,columnNumber:5},this),document.body)}function p1({variant:r,title:s,subtitle:d,count:_,expanded:E,onToggle:R,onScroll:b,bodyRef:a,children:u}){return o.jsxDEV("div",{className:`git-section git-section--${r} ${E?"open":""}`,children:[o.jsxDEV("button",{className:"git-section-head",onClick:R,"aria-expanded":E,children:[o.jsxDEV("span",{className:"git-section-caret",children:o.jsxDEV(ha,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:418,columnNumber:45},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:418,columnNumber:9},this),o.jsxDEV("span",{className:"git-section-title",children:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:419,columnNumber:9},this),d&&o.jsxDEV("span",{className:"git-section-sub",children:d},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:420,columnNumber:22},this),_!=null&&o.jsxDEV("span",{className:"git-section-count",children:_},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:421,columnNumber:27},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:417,columnNumber:7},this),E&&o.jsxDEV("div",{className:"git-section-body",ref:a,onScroll:b,children:u},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:423,columnNumber:20},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:416,columnNumber:5},this)}function mV({data:r,onOpenFile:s}){const d=(r==null?void 0:r.changes)??[];return d.length?o.jsxDEV("div",{className:"git-list",children:d.map((_,E)=>{const R=!!(_.x&&_.x!==" "&&_.x!=="?");return o.jsxDEV("button",{className:"git-row",onClick:()=>s(_.path,R),children:[o.jsxDEV("span",{className:`git-badge git-badge-${bm(_.x,_.y).toLowerCase().replace("?","q")}`,children:bm(_.x,_.y)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:437,columnNumber:13},this),o.jsxDEV("span",{className:"git-row-path",children:_.path},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:438,columnNumber:13},this)]},`${_.path}-${E}`,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:436,columnNumber:11},this)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:432,columnNumber:5},this):o.jsxDEV("div",{className:"git-empty",children:V("git.cleanTree")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:430,columnNumber:31},this)}function fV({data:r,onOpen:s}){const d=(r==null?void 0:r.commits)??[];return d.length?o.jsxDEV("div",{className:"git-list",children:d.map(_=>o.jsxDEV("button",{className:"git-row git-commit-row",onClick:()=>s(_.hash),children:[o.jsxDEV("span",{className:"git-hash",children:_.short},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:453,columnNumber:11},this),o.jsxDEV("span",{className:"git-commit-main",children:[o.jsxDEV("span",{className:"git-row-path",children:_.subject},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:455,columnNumber:13},this),o.jsxDEV("span",{className:"git-commit-meta",children:[_.author," · ",_.relDate]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:456,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:454,columnNumber:11},this)]},_.hash,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:452,columnNumber:9},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:450,columnNumber:5},this):o.jsxDEV("div",{className:"git-empty",children:V("git.noCommits")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:448,columnNumber:31},this)}function pV({data:r,onOpenFile:s}){if(!r)return null;const d=r.files??[];return o.jsxDEV("div",{className:"git-commit-detail",children:[r.message&&o.jsxDEV("pre",{className:"git-commit-msg",children:r.message},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:469,columnNumber:24},this),o.jsxDEV("div",{className:"git-list",children:d.map((_,E)=>o.jsxDEV("button",{className:"git-row",onClick:()=>s(_.path),children:[o.jsxDEV("span",{className:`git-badge git-badge-${bm(_.x,_.y).toLowerCase().replace("?","q")}`,children:bm(_.x,_.y)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:473,columnNumber:13},this),o.jsxDEV("span",{className:"git-row-path",children:_.path},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:474,columnNumber:13},this)]},`${_.path}-${E}`,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:472,columnNumber:11},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:470,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:468,columnNumber:5},this)}const v1=da.length-1;function vV({data:r}){const[s,d]=U.useState(()=>iA()),_=R=>{const b=Math.min(v1,Math.max(0,s+R));d(b),rA(b)};if(!r)return null;const E=r.files??[];return E.length?o.jsxDEV("div",{className:"git-diff-wrap",style:{fontSize:`${da[s]}px`},children:[o.jsxDEV("div",{className:"git-diff-zoom",children:[o.jsxDEV("button",{className:"doc-zoom-btn",onClick:()=>_(-1),disabled:s<=0,"aria-label":V("git.fontSmaller"),children:"A−"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:493,columnNumber:9},this),o.jsxDEV("button",{className:"doc-zoom-btn",onClick:()=>_(1),disabled:s>=v1,"aria-label":V("git.fontLarger"),children:"A+"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:494,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:492,columnNumber:7},this),r.truncated&&o.jsxDEV("div",{className:"git-diff-trunc",children:V("git.diffTruncated")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:496,columnNumber:26},this),E.map((R,b)=>o.jsxDEV("div",{className:"git-diff-file",children:[E.length>1&&o.jsxDEV("div",{className:"git-diff-fname",children:R.path},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:499,columnNumber:32},this),o.jsxDEV("div",{className:"git-diff",children:R.hunks.map((a,u)=>o.jsxDEV("div",{className:"git-diff-hunk-block",children:[o.jsxDEV("div",{className:"git-diff-line git-diff-hunk",children:a.header},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:503,columnNumber:17},this),a.lines.map((g,x)=>o.jsxDEV("div",{className:`git-diff-line git-diff-${g.type}`,children:[g.type==="add"?"+":g.type==="del"?"-":" ",g.text]},x,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:505,columnNumber:19},this))]},u,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:502,columnNumber:15},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:500,columnNumber:11},this)]},`${R.path}-${b}`,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:498,columnNumber:9},this))]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:491,columnNumber:5},this):o.jsxDEV("div",{className:"git-empty",children:V("git.noDiff")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/GitPanel.jsx",lineNumber:489,columnNumber:29},this)}function gV(){const r=x2();if(!r.active)return null;const s=r.phase==="sending",d=Math.round((r.pct||0)*100);return Wl.createPortal(o.jsxDEV("div",{className:"upload-overlay",role:"alertdialog","aria-modal":"true","aria-label":V("upload.title"),children:o.jsxDEV("div",{className:"upload-card",children:[r.label&&o.jsxDEV("div",{className:"upload-card-label",children:r.label},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:18,columnNumber:23},this),s?o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"upload-bar",children:o.jsxDEV("div",{className:"upload-bar-fill",style:{width:`${d}%`}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:21,columnNumber:41},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:21,columnNumber:13},this),o.jsxDEV("div",{className:"upload-card-sub",children:[d,"%"]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:22,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:20,columnNumber:11},this):o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"upload-spinner","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:26,columnNumber:13},this),o.jsxDEV("div",{className:"upload-card-sub",children:V("upload.processing")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:27,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:25,columnNumber:11},this),o.jsxDEV("button",{type:"button",className:"upload-cancel",onClick:_2,children:V("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:30,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:17,columnNumber:7},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/UploadOverlay.jsx",lineNumber:16,columnNumber:5},this),document.body)}const em=8,g1=12;function _1({path:r,x:s,y:d,onOpen:_,onClose:E,icon:R,name:b,openLabel:a,note:u,disabled:g=!1}){const x=b??(r.split("/").filter(Boolean).pop()||r),h=U.useRef(null),[f,S]=U.useState(null);return U.useLayoutEffect(()=>{const C=h.current;if(!C)return;const y=C.offsetWidth,l=C.offsetHeight,v=window.innerWidth,m=window.innerHeight,p=Math.min(Math.max(s-y/2,em),v-y-em);let N=d+g1;N+l>m-em&&(N=Math.max(em,d-g1-l)),S({left:p,top:N})},[s,d,r]),o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"doclink-backdrop",onClick:E},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:37,columnNumber:7},this),o.jsxDEV("div",{ref:h,className:"doclink-pop",style:f?{left:f.left,top:f.top}:{left:0,top:0,visibility:"hidden"},role:"dialog","aria-label":V("doclink.title"),children:[o.jsxDEV("div",{className:"doclink-name",children:[R??o.jsxDEV(Bu,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:44,columnNumber:48},this),x]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:44,columnNumber:9},this),o.jsxDEV("div",{className:"doclink-path",children:r},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:45,columnNumber:9},this),u&&o.jsxDEV("div",{className:"doclink-note",children:u},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:46,columnNumber:18},this),o.jsxDEV("div",{className:"doclink-actions",children:[o.jsxDEV("button",{className:"doclink-cancel",onClick:E,children:V("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:48,columnNumber:11},this),!g&&o.jsxDEV("button",{className:"doclink-open",onClick:()=>_(r),children:a??V("common.open")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:49,columnNumber:25},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:47,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:38,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/DocLinkPopover.jsx",lineNumber:36,columnNumber:5},this)}const _V=()=>`${Date.now().toString(36)}${Math.random().toString(36).slice(2,6)}`;function bV(r){const s=(r??"").trim();return s?{id:_V(),text:s}:null}function yV(r,s,d){const _=[...r];if(s<0||s>=_.length||d<0||d>=_.length||s===d)return _;const[E]=_.splice(s,1);return _.splice(d,0,E),_}function xV({open:r,session:s,window:d,onClose:_,onSend:E,onCountChange:R}){const[b,a]=U.useState([]),[u,g]=U.useState(""),[x,h]=U.useState(null),[f,S]=U.useState(null),C=U.useRef(null),y=U.useRef({head:"",tail:""}),l=U.useRef(null),v=U.useRef(!1),m=U.useRef({active:!1}),p=B=>{tN(s,d,B),a(B),R==null||R(B.length)},N=B=>{B&&(B.style.height="auto",B.style.height=`${B.scrollHeight+2}px`)};U.useEffect(()=>{if(!r)return;const B=Q1(s,d);a(B),R==null||R(B.length),g(""),h(null)},[r,s,d]);const j=T_({onText:B=>{if(v.current){v.current=!1;return}const{head:W,tail:X}=y.current;g(W+B+X),l.current=W.length+B.length}}),M=L_(),D=j.state==="recording"||j.state==="finalizing";Cm(D),U.useEffect(()=>{if(j.state!=="recording"&&j.state!=="finalizing"||v.current)return;const{head:B,tail:W}=y.current;g(B+j.partial+W),l.current=B.length+j.partial.length},[j.partial,j.state]),U.useLayoutEffect(()=>{const B=C.current;if(!B||(N(B),l.current==null))return;const W=l.current;if(l.current=null,document.activeElement===B)try{B.setSelectionRange(W,W)}catch{}},[u]);const L=()=>{if(D){j.stop();return}const B=C.current,W=B?B.selectionStart:u.length;y.current={head:u.slice(0,W),tail:u.slice(W)},j.start()},A=()=>{D&&(v.current=!0,j.stop())},F=()=>{A();const B=u.trim();if(B){if(x)p(b.map(W=>W.id===x?{...W,text:B}:W));else{const W=bV(B);W&&p([...b,W])}g(""),h(null)}},O=B=>{h(B.id),g(B.text),requestAnimationFrame(()=>{var W;return(W=C.current)==null?void 0:W.focus()})},I=()=>{h(null),g("")},G=B=>{p(b.filter(W=>W.id!==B)),B===x&&I()},ne=(B,W)=>{var X,Y;B.cancelable&&B.preventDefault(),(Y=(X=B.currentTarget).setPointerCapture)==null||Y.call(X,B.pointerId),m.current={active:!0,pointerId:B.pointerId,id:W},S(W)},ee=B=>{var he;const W=m.current;if(!W.active||B.pointerId!==W.pointerId)return;const X=(he=B.currentTarget.closest(".idea-list"))==null?void 0:he.querySelectorAll("[data-idea]");if(!X||!X.length)return;const Y=B.clientY;let ve=X.length-1;for(let Me=0;Me<X.length;Me++){const me=X[Me].getBoundingClientRect();if(Y<me.top+me.height/2){ve=Me;break}}a(Me=>{const me=Me.findIndex(ie=>ie.id===W.id);return me<0||me===ve?Me:yV(Me,me,ve)})},te=B=>{const W=m.current;!W.active||B.pointerId!==W.pointerId||(m.current={active:!1},S(null),a(X=>(tN(s,d,X),X)))};if(!r)return null;const se=x!=null;return o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"cmd-backdrop",onClick:_},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:149,columnNumber:7},this),o.jsxDEV("div",{className:"idea-panel",role:"dialog","aria-label":V("idea.title"),children:[o.jsxDEV("div",{className:"cmd-head",children:[o.jsxDEV("span",{className:"cmd-title",children:[V("idea.title"),d?` · ${d}`:"",b.length>0&&o.jsxDEV("span",{className:"idea-head-count",children:b.length},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:152,columnNumber:100},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:152,columnNumber:11},this),o.jsxDEV("button",{className:"cmd-close",onClick:_,"aria-label":V("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:153,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:151,columnNumber:9},this),o.jsxDEV("div",{className:`idea-compose${D?" recording":""}`,children:[o.jsxDEV("textarea",{ref:C,className:"idea-input",rows:1,placeholder:V(se?"idea.editPlaceholder":"idea.addPlaceholder"),value:u,readOnly:D,onChange:B=>g(B.target.value)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:157,columnNumber:11},this),se&&o.jsxDEV("button",{className:"idea-cancel",onClick:I,children:V("common.cancel")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:166,columnNumber:23},this),M&&o.jsxDEV(j_,{active:D,disabled:j.state==="requesting",onToggle:L},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:167,columnNumber:28},this),o.jsxDEV("button",{className:"idea-act",onClick:F,disabled:!u.trim(),"aria-label":V(se?"common.save":"idea.add"),children:se?o.jsxDEV(S_,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:169,columnNumber:24},this):o.jsxDEV(N_,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:169,columnNumber:40},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:168,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:156,columnNumber:9},this),o.jsxDEV("div",{className:"idea-list",children:b.length===0?o.jsxDEV("div",{className:"cmd-empty",children:V("idea.empty")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:175,columnNumber:13},this):b.map(B=>o.jsxDEV("div",{"data-idea":B.id,className:`idea-row${B.id===f?" dragging":""}${B.id===x?" editing":""}`,children:[o.jsxDEV("button",{type:"button",className:"idea-handle","aria-label":V("idea.dragSort"),onPointerDown:W=>ne(W,B.id),onPointerMove:ee,onPointerUp:te,onPointerCancel:te,children:"≡"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:182,columnNumber:15},this),o.jsxDEV("span",{className:"idea-text",onClick:()=>O(B),children:B.text},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:191,columnNumber:15},this),o.jsxDEV("button",{className:"idea-send",onClick:()=>E==null?void 0:E(B.text),"aria-label":V("idea.fillInput"),children:V("idea.send")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:192,columnNumber:15},this),o.jsxDEV("button",{className:"idea-del",onClick:()=>G(B.id),"aria-label":V("common.delete"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:193,columnNumber:15},this)]},B.id,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:177,columnNumber:13},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:173,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:150,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/IdeaPanel.jsx",lineNumber:148,columnNumber:5},this)}function wV({open:r,onClose:s}){return r?o.jsxDEV(o.Fragment,{children:[o.jsxDEV("div",{className:"cmd-backdrop",onClick:s},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:11,columnNumber:7},this),o.jsxDEV("div",{className:"changelog-panel",role:"dialog","aria-label":V("changelog.title"),children:[o.jsxDEV("div",{className:"cmd-head",children:[o.jsxDEV("span",{className:"cmd-title",children:V("changelog.title")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:14,columnNumber:11},this),o.jsxDEV("button",{className:"cmd-close",onClick:s,"aria-label":V("common.close"),children:"✕"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:15,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:13,columnNumber:9},this),o.jsxDEV("div",{className:"changelog-list",children:Fg.slice(0,1).map(d=>{var R,b;const _=d.items[Il()]||d.items.en||d.items.zh||[],E=d.version?`v${d.version}`:((R=d.label)==null?void 0:R[Il()])||((b=d.label)==null?void 0:b.en);return o.jsxDEV("div",{className:"rel",children:[o.jsxDEV("div",{className:"rel-date",children:[E&&o.jsxDEV("span",{className:"rel-ver",children:E},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:27,columnNumber:29},this),o.jsxDEV("span",{className:"rel-day",children:d.date},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:28,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:26,columnNumber:17},this),o.jsxDEV("ul",{className:"rel-items",children:_.map((a,u)=>o.jsxDEV("li",{children:a},u,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:31,columnNumber:41},this))},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:30,columnNumber:17},this)]},d.version||d.date,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:25,columnNumber:15},this)})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:17,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:12,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/components/Changelog.jsx",lineNumber:10,columnNumber:5},this):null}function NV(r){let s=!1,d=!1;for(let _=r;_&&_!==document.body&&_!==document.documentElement;_=_.parentElement){const E=getComputedStyle(_);if(!d&&(E.overflowY==="auto"||E.overflowY==="scroll")&&_.scrollHeight>_.clientHeight&&(d=!0),!s&&(E.overflowX==="auto"||E.overflowX==="scroll")&&_.scrollWidth>_.clientWidth&&(s=!0),s&&d)break}return{x:s,y:d}}function SV(){U.useEffect(()=>{let r="block",s=0,d=0;const _=R=>{const b=R.touches[0];if(s=b?b.clientX:0,d=b?b.clientY:0,!(R.target instanceof Element)){r="block";return}const{x:a,y:u}=NV(R.target);r=u?"free":a?"xonly":"block"},E=R=>{if(!(r==="free"||!R.cancelable)){if(r==="xonly"){const b=R.touches[0];if(b&&Math.abs(b.clientX-s)>=Math.abs(b.clientY-d))return}R.preventDefault()}};return document.addEventListener("touchstart",_,{passive:!0,capture:!0}),document.addEventListener("touchmove",E,{passive:!1,capture:!0}),()=>{document.removeEventListener("touchstart",_,{capture:!0}),document.removeEventListener("touchmove",E,{capture:!0})}},[])}function CV(r,s,d=2e3){const _=U.useRef(s);_.current=s,U.useEffect(()=>{if(!r)return;let E=!1,R=null,b=!1;const a=()=>{var h;(h=window.history.state)!=null&&h.exitRoot||window.history.replaceState({...window.history.state,exitRoot:!0},"")},u=()=>{var h;b||(h=window.history.state)!=null&&h.exitGuard||(window.history.pushState({exitGuard:!0},""),b=!0)},g=()=>{var h;R&&(clearTimeout(R),R=null),E&&(E=!1,(h=_.current)==null||h.call(_,!1))};a(),u();const x=()=>{var h,f,S;if((h=window.history.state)!=null&&h.exitGuard){b=!0,g();return}(f=window.history.state)!=null&&f.exitRoot&&(b=!1,!E&&(E=!0,(S=_.current)==null||S.call(_,!0),R=setTimeout(()=>{var C;E=!1,R=null,(C=_.current)==null||C.call(_,!1),u()},d)))};return window.addEventListener("popstate",x),()=>{var h,f;window.removeEventListener("popstate",x),R&&clearTimeout(R),E&&((h=_.current)==null||h.call(_,!1)),b&&((f=window.history.state)!=null&&f.exitGuard)&&window.history.back()}},[r,d])}function b1(r){history.replaceState(history.state,"",`#${encodeURIComponent(r)}`)}const Ru=r=>{try{return decodeURIComponent(r)}catch{return r}};function Og(){const r=location.hash.replace(/^#/,""),s=r.match(/^\/inbox(?:\/(.*))?$/);if(s)return{session:null,window:null,pane:null,inbox:!0,inboxId:s[1]?Ru(s[1]):null};const d=r.match(/^\/s\/([^/]*)\/w\/([^/]*)\/p\/(.*)$/);return d?{session:Ru(d[1]),window:Ru(d[2]),pane:Ru(d[3]),inbox:!1,inboxId:null}:{session:Ru(r)||null,window:null,pane:null,inbox:!1,inboxId:null}}const EV="tmw-share-v1",jV="/__share__/";function DV(r=typeof location<"u"?location.search:""){try{return new URLSearchParams(r).has("share")}catch{return!1}}function kV(){if(typeof location>"u"||typeof history>"u")return;const r=new URL(location.href);r.searchParams.delete("share"),history.replaceState(history.state,"",r.pathname+r.search+r.hash)}async function RV(){if(typeof caches>"u")return null;let r;try{r=await caches.open(EV)}catch{return null}const s=await r.keys();if(!s.length)return null;const d=s[s.length-1],_=await r.match(d);if(await r.delete(d),!_)return null;const E=await _.blob();let R="shared";try{R=decodeURIComponent(new URL(d.url).pathname.slice(jV.length))||"shared"}catch{}return new File([E],R,{type:E.type||_.headers.get("Content-Type")||""})}const y1="①②③④⑤⑥⑦⑧⑨",Vl=(r,s)=>s&&r.some(d=>d.id===s)?s:r[0].id;function TV(){var za,Ao,Gl,Uo,ql,Yl,Kl,Gu,$r,qu,Oo,Vo,Po,Yu,$a,Xl,Ai,Wr,ei,Gr,Bo,Wa;const[r,s]=U.useState(!Lo()),[d,_]=U.useState(!1),[E,R]=U.useState(!1),[b,a]=U.useState(BM),u=le=>{IM(le),a(le)},[g,x]=U.useState(FM),h=le=>{HM(le),x(le)},[f,S]=U.useState(!1),[C,y]=U.useState(!1),[l,v]=U.useState(!1),[m,p]=U.useState(null),[N,k]=U.useState(null),[j,M]=U.useState(null),[D,L]=U.useState(null),[A,F]=U.useState(!1),[O,I]=U.useState(!1),[G,ne]=U.useState(null),[ee,te]=U.useState(null),[se,B]=U.useState(null),[W,X]=U.useState(null),[Y,ve]=U.useState(null),[he,Me]=U.useState(!1),[me,ie]=U.useState(null),[$,_e]=U.useState(null),de=P3(),[Ie,Ue]=U.useState(Eo),[tt,Qe]=U.useState(am),[st,Nt]=U.useState([]),[J,bt]=U.useState(null),[Gt,Ee]=U.useState(!0),[Te,Ge]=U.useState({}),[re,We]=U.useState("terminal");U.useEffect(()=>{We(localStorage.getItem("tw_lens_"+(J==null?void 0:J.paneId))||"terminal")},[J==null?void 0:J.paneId]);const[Ye,ge]=U.useState([]),[Ze,je]=U.useState(null),[Pe,be]=U.useState(!1),{status:Ae,enable:He}=z4(),[wt,kt]=U.useState(!1),[Ot,Pt]=U.useState(0),[dn,Qt]=U.useState(!1),[Mt,Ft]=U.useState(sA),[sn,Dn]=U.useState(null),[it,cn]=U.useState(oA),[zn,$n]=U.useState(Y0),[en,kn]=U.useState(DM),[On,ni]=U.useState([]),[nn,En]=U.useState(Lu),[vn,Xn]=U.useState(!1),[oe,$e]=U.useState(null),[et,yt]=U.useState(null),[gt,ft]=U.useState(kM),Rt=()=>{let le=!1;const Se=()=>{le||(le=!0,window.removeEventListener("popstate",ze),clearTimeout(rt),Xn(!0))},ze=()=>Se();window.addEventListener("popstate",ze);const rt=setTimeout(Se,300);R(!1)},pt=U.useRef(0),gn=U.useRef(null);gn.current=oe;const an=()=>{window.history.pushState({overlay:!0},""),pt.current+=1},qt=le=>{an(),$e(le),J0(le),En(Lu())},bn=()=>window.history.back(),Nn=()=>{$e(null),Xn(!1)},ui=()=>{On.forEach(le=>J0(le.id)),En(Lu())},Vn=async le=>{ni(Se=>Se.filter(ze=>ze.id!==le)),await D3(le)},Jn=U.useRef(null),ii=U.useRef(null),Dt=U.useRef(null),ae=U.useRef(null),Be=U.useCallback(()=>s(!0),[]),xe=U.useCallback(le=>F3(le,Be),[Be]),{previewDomain:Q,dynamicEnabled:Ce,previewSheetOpen:Je,setPreviewSheetOpen:Vt,activePreview:_t,shownPreview:St,tabs:Jt,activeName:yn,openPreviewSheet:hn,startPreview:An,startDynamicPreview:Yt,startUrlPreview:Wn,switchTab:Zn,closeTab:Wi,stopPreview:Gi,renewPreview:Cr}=I3(J,{settingsOpen:E,setSettingsOpen:R});U.useEffect(()=>{r||MA().then(Dn).catch(()=>{})},[r]);const pr=U.useCallback(()=>{EM(),R(!1),y(!1),_(!1),bt(null),Ee(!0),s(!0)},[]);SV();const di=A2();es(Je,()=>Vt(!1)),es(d,()=>_(!1)),es(Pe,()=>be(!1)),es(f,()=>S(!1)),es(C,()=>y(!1)),es(l,()=>v(!1)),es(wt,()=>kt(!1)),es(!!ee,()=>te(null)),es(E||dn,()=>{dn?Qt(!1):R(!1)}),es(!!N||!!m,()=>{m?p(null):k(null)}),es(!!j,()=>M(null)),U.useEffect(()=>{if(!vn)return;an();const le=()=>{if(pt.current=Math.max(0,pt.current-1),gn.current){$e(null);return}Xn(!1)};return window.addEventListener("popstate",le),()=>{window.removeEventListener("popstate",le),pt.current>0&&(window.history.go(-pt.current),pt.current=0)}},[vn]),U.useEffect(()=>{vn&&et&&(qt(et),yt(null))},[vn,et]),U.useEffect(()=>{vn&&On.length&&On[0].ts>gt&&(RM(On[0].ts),ft(On[0].ts))},[vn,On,gt]),CV(!!J,Me);const Er=U.useCallback(async le=>{var ze,rt;const Se=J==null?void 0:J.paneId;if(Se)try{await Pu(Se,[le]),(rt=(ze=Jn.current)==null?void 0:ze.wake)==null||rt.call(ze)}catch(nt){xe(nt)}},[J,Be]),vr=U.useCallback(async le=>{var ze,rt;const Se=J==null?void 0:J.paneId;if(Se)try{await Co(Se,le,!1),(rt=(ze=Jn.current)==null?void 0:ze.wake)==null||rt.call(ze)}catch(nt){xe(nt)}},[J,Be]),gr=U.useCallback(async le=>{var nt,Et,Ht,Xt,mi;const Se=(nt=J==null?void 0:J.window)==null?void 0:nt.id,ze=Dt.current??((Ht=(Et=Jn.current)==null?void 0:Et.getSize())==null?void 0:Ht.cols);if(!Se||!ze)return;const rt=Math.max(20,Math.min(500,ze+le));Dt.current=rt,(mi=(Xt=Jn.current)==null?void 0:Xt.flash)==null||mi.call(Xt);try{ae.current==null&&(ae.current=await wA(Se).then(Fn=>Fn.layout||"").catch(()=>"")),J.panes&&J.panes.length>1?await xA(J.paneId,rt):await yA(Se,rt)}catch(Fn){xe(Fn)}},[J,Be]),Fs=U.useCallback(async()=>{var ze;const le=(ze=J==null?void 0:J.window)==null?void 0:ze.id;if(!le)return;const Se=ae.current;Dt.current=null,ae.current=null;try{await NA(le,Se)}catch(rt){xe(rt)}},[J,Be]),hi=U.useCallback(async(le,Se=null)=>{var Ht;const ze=await Cu(le.id);if(!ze.length)return!1;const rt=(Se==null?void 0:Se.window)&&ze.find(Xt=>Xt.id===Se.window)||ze.find(Xt=>Xt.id===Vl(ze,OM(le.id))),nt=await Fa(rt.id);if(!nt.length)return!1;const Et=Se!=null&&Se.pane&&nt.some(Xt=>Xt.id===Se.pane)?Se.pane:Vl(nt,Gh(rt.id));return bt({session:le,windows:ze,window:rt,panes:nt,paneId:Et}),Ml({sessionId:le.id,windowId:rt.id,paneId:Et}),b1(le.name),Dt.current=((Ht=nt.find(Xt=>Xt.id===Et))==null?void 0:Ht.width)??null,ae.current=null,!0},[]),on=U.useCallback(async le=>{var Se;try{const ze=await Fa(le.id);if(!ze.length)return;const rt=Vl(ze,Gh(le.id));return bt(nt=>nt&&{...nt,window:le,panes:ze,paneId:rt}),Ml({sessionId:J.session.id,windowId:le.id,paneId:rt}),Dt.current=((Se=ze.find(nt=>nt.id===rt))==null?void 0:Se.width)??null,ae.current=null,rt}catch(ze){return xe(ze),null}},[J,Be]),ns=U.useCallback(async(le,Se,ze)=>{var Et,Ht,Xt,mi;const rt=(Et=J==null?void 0:J.session)==null?void 0:Et.id,nt=J==null?void 0:J.paneId;if(!(!rt||!nt))try{const{id:Fn}=await CA(rt,nt,le||void 0,Se,ze),va=await Cu(rt),ws=va.find(as=>as.id===Fn)||va[va.length-1],Ga=await Fa(ws.id);if(!Ga.length)return;const Ns=Vl(Ga,Gh(ws.id));bt(as=>as&&{...as,windows:va,window:ws,panes:Ga,paneId:Ns}),Ml({sessionId:rt,windowId:ws.id,paneId:Ns}),Dt.current=((Ht=Ga.find(as=>as.id===Ns))==null?void 0:Ht.width)??null,ae.current=null,v(!1),(mi=(Xt=Jn.current)==null?void 0:Xt.wake)==null||mi.call(Xt)}catch(Fn){if(xe(Fn))return;throw Fn}},[J,Be]),nr=U.useCallback(async le=>{var rt,nt;const Se=m;if(!Se)return;const ze=(rt=J==null?void 0:J.session)==null?void 0:rt.id;if(Se.kind==="session"){try{await EA(Se.id,le)}catch(Et){throw xe(Et)?Et:Et.status===409?new Error(Se("app.nameExists")):new Error(Se("app.renameFailed"))}Ue(jM(Se.name,le)),ju(),b1(le),bt(Et=>Et&&Et.session.id===Se.id?{...Et,session:{...Et.session,name:le}}:Et)}else{try{await jA(Se.id,le)}catch(Ht){throw xe(Ht)?Ht:new Error(Se("app.renameFailed"))}cA((nt=J==null?void 0:J.session)==null?void 0:nt.name,Se.name||Se.id,le);const Et=await Cu(ze);bt(Ht=>Ht&&{...Ht,windows:Et,window:Et.find(Xt=>Xt.id===Ht.window.id)||Ht.window})}p(null)},[m,J,Be]),Tt=U.useCallback(async()=>{var Et;const le=N,Se=J==null?void 0:J.session;if(!le||!Se)return;const ze=Se.id,rt=J.windows.length<=1;try{await DA(le.id)}catch(Ht){if(xe(Ht))return;window.alert(V("app.deleteFailed")),k(null);return}if(k(null),rt){Ue(q0(Se.name)),ju(),bt(null);return}const nt=await Cu(ze);if(le.id===J.window.id&&nt.length){const Ht=nt.find(Fn=>Fn.active)||nt[0],Xt=await Fa(Ht.id);if(!Xt.length)return;const mi=Vl(Xt,Gh(Ht.id));bt(Fn=>Fn&&{...Fn,windows:nt,window:Ht,panes:Xt,paneId:mi}),Ml({sessionId:ze,windowId:Ht.id,paneId:mi}),Dt.current=((Et=Xt.find(Fn=>Fn.id===mi))==null?void 0:Et.width)??null,ae.current=null}else bt(Ht=>Ht&&{...Ht,windows:nt})},[N,J,Be]),Fr=U.useCallback(async le=>{var nt;const Se=N,ze=(nt=J==null?void 0:J.session)==null?void 0:nt.id;if(!Se||!ze)return;const rt=Ng(J.windows,Se.id,le);if(rt)try{await kA(Se.id,rt.id);const Et=await Cu(ze);bt(Ht=>Ht&&{...Ht,windows:Et,window:Et.find(Xt=>Xt.id===Ht.window.id)||Ht.window}),k(Et.find(Ht=>Ht.id===Se.id)||null)}catch(Et){if(xe(Et)){k(null);return}window.alert(V("app.moveFailed")),k(null)}},[N,J,Be]),oi=Nm(()=>{J!=null&&J.session&&p({kind:"session",id:J.session.id,name:J.session.name})}),_r=U.useCallback(async le=>{try{const Se=(await Fl()).find(ze=>ze.name===le);if(!Se){window.alert(V("app.sessionGone",{name:le}));return}await hi(Se)&&_(!1)}catch(Se){xe(Se)}},[hi,Be]),jr=U.useCallback(async le=>{be(!1),$n(K0(le.pane,le.ts));try{const Se=(await Fl()).find(ze=>ze.name===le.session);if(!Se){window.alert(V("app.sessionGone",{name:le.session}));return}_(!1),await hi(Se,{window:le.window,pane:le.pane})}catch(Se){xe(Se)}},[hi,Be]),ma=U.useCallback(async({target:le,kill:Se,name:ze})=>{const rt=Ze,nt=await OA({pid:rt.pid,sessionId:rt.sessionId,target:le,kill:Se,name:ze});nt.name&&(Ue(G0(nt.name)),ju()),je(null),be(!1);try{nt.name&&(_(!1),await hi({id:nt.session,name:nt.name},{window:nt.window,pane:nt.pane}))}catch(Et){xe(Et)}try{ge(await aN())}catch{}},[Ze,hi,Be]),Qn=U.useCallback(()=>{const le=fN(Te);X0(le),kn(le)},[Te]),Un=U.useCallback(le=>{Ue(G0(le)),ju(),y(!1),_r(le)},[_r]),li=U.useCallback(le=>{Ue(q0(le)),ju(),bt(Se=>Se&&Se.session.name===le?null:Se)},[]),Gn=U.useCallback(le=>{bt(Se=>Se&&(Ml({windowId:Se.window.id,paneId:le}),{...Se,paneId:le}))},[]),Pn=U.useCallback((le,Se)=>{bt(ze=>{if(!ze)return ze;const rt=ze.windows.map(nt=>nt.id===le?{...nt,panes:Se.length}:nt);return ze.window.id===le?{...ze,windows:rt,panes:Se}:{...ze,windows:rt}})},[]),Bn=U.useCallback(async(le,Se)=>{var rt;const ze=(rt=J==null?void 0:J.window)==null?void 0:rt.id;if(ze){M(null),k(null);try{const{panes:nt,selectPaneId:Et}=await cN({paneId:le,dir:Se,windowId:ze,api:{splitPane:rN},getPanes:Fa});Pn(ze,nt),Gn(Et),ae.current=null}catch(nt){if(xe(nt))return;window.alert(V("pane.splitFailed"))}}},[J,Pn,Gn,Be]),Hs=U.useCallback(async()=>{var rt;const le=j,Se=(rt=J==null?void 0:J.window)==null?void 0:rt.id,ze=J==null?void 0:J.paneId;if(!(!le||!Se))try{const{panes:nt,selectPaneId:Et}=await GA({paneId:le,windowId:Se,viewedPaneId:ze,api:{closePane:RA},getPanes:Fa,pickId:Vl});M(null),Pn(Se,nt),Et&&Gn(Et),ae.current=null}catch(nt){if(M(null),xe(nt))return;window.alert(V("pane.closeFailed"))}},[j,J,Pn,Gn,Be]),ki=U.useCallback(async(le,Se)=>{var rt,nt;const ze=(rt=J==null?void 0:J.session)==null?void 0:rt.id;if(!(!le||!ze)){k(null);try{const Et=await Fa(le.id),Ht=Et.find(Fn=>Fn.active)||Et[0];if(!Ht)return;const{panes:Xt,selectPaneId:mi}=await cN({paneId:Ht.id,dir:Se,windowId:le.id,api:{splitPane:rN},getPanes:Fa});bt(Fn=>{if(!Fn)return Fn;const va=Fn.windows.map(ws=>ws.id===le.id?{...ws,panes:Xt.length}:ws);return{...Fn,windows:va,window:le,panes:Xt,paneId:mi}}),Ml({sessionId:ze,windowId:le.id,paneId:mi}),Dt.current=((nt=Xt.find(Fn=>Fn.id===mi))==null?void 0:nt.width)??null,ae.current=null}catch(Et){if(xe(Et))return;window.alert(V("pane.splitFailed"))}}},[J,Be]),zs=U.useCallback(async le=>{var ze;if(!le)return;let Se=J==null?void 0:J.paneId;le.id!==((ze=J==null?void 0:J.window)==null?void 0:ze.id)?(k(null),Se=await on(le)):await new Promise(rt=>{const nt=()=>{clearTimeout(Et),window.removeEventListener("popstate",nt),rt()},Et=setTimeout(nt,80);window.addEventListener("popstate",nt),k(null)}),Se&&(L(le.id),M(Se))},[J,on]),Hr=(za=J==null?void 0:J.session)==null?void 0:za.name,Dr=(Ao=J==null?void 0:J.window)==null?void 0:Ao.id;U.useEffect(()=>{Nt(Hr&&Dr?om(Hr,Dr):[])},[Hr,Dr]);const ys=(Gl=J==null?void 0:J.session)==null?void 0:Gl.name,Ri=((Uo=J==null?void 0:J.window)==null?void 0:Uo.name)||((ql=J==null?void 0:J.window)==null?void 0:ql.id);U.useEffect(()=>{Pt(ys&&Ri?Q1(ys,Ri).length:0)},[ys,Ri]),U.useEffect(()=>{J!=null&&J.paneId&&E3(J.paneId)},[J==null?void 0:J.paneId]),U.useEffect(()=>{var ze;const le=J==null?void 0:J.paneId;if(!le)return;const Se=(ze=Te[le])==null?void 0:ze.ts;Se!=null&&Y0()[le]!==Se&&$n(K0(le,Se))},[J==null?void 0:J.paneId,Te]),U.useEffect(()=>{if(!DV())return;kV();let le=!1;return(async()=>{const Se=await RV();le||!Se||(ne(Se),de.activate("home"),F(!0))})(),()=>{le=!0}},[]),U.useEffect(()=>{if(r||typeof navigator>"u"||!("serviceWorker"in navigator))return;const le=async({session:rt,window:nt,pane:Et})=>{if(rt)try{const Xt=(await Fl()).find(mi=>mi.name===rt);Xt&&(_(!1),await hi(Xt,{window:nt,pane:Et}))}catch(Ht){xe(Ht)}},Se=rt=>{const nt=rt.data;nt&&(nt.type==="navigate"?le(nt):nt.type==="navigate-inbox"&&nt.id&&(Xn(!0),yt(nt.id)))},ze=()=>{const rt=Og();rt.session&&(rt.window||rt.pane)&&le(rt)};return navigator.serviceWorker.addEventListener("message",Se),window.addEventListener("hashchange",ze),()=>{navigator.serviceWorker.removeEventListener("message",Se),window.removeEventListener("hashchange",ze)}},[r,hi,Be]),U.useEffect(()=>{if(r)return;const le=Og();le.inbox&&(Xn(!0),le.inboxId&&yt(le.inboxId),history.replaceState(history.state,"","#"))},[r]),U.useEffect(()=>{if(r)return;let le=!0;const Se=()=>j3().then(rt=>{le&&(ni(rt),En(TM(rt.map(nt=>nt.id))))});Se();const ze=()=>{document.visibilityState==="visible"&&Se()};return document.addEventListener("visibilitychange",ze),()=>{le=!1,document.removeEventListener("visibilitychange",ze)}},[r,vn]);const br=U.useCallback(le=>{var nt,Et,Ht,Xt;(Et=(nt=Jn.current)==null?void 0:nt.wake)==null||Et.call(nt);const Se=(Ht=J==null?void 0:J.session)==null?void 0:Ht.name,ze=(Xt=J==null?void 0:J.window)==null?void 0:Xt.id;Se&&ze&&Nt(YM(Se,ze,le));const rt=F2(le);X(rt&&(J!=null&&J.paneId)?{...rt,paneId:J.paneId}:null)},[J]),xs=U.useCallback(le=>{Qe(am().includes(le)?$M(le):zM(le))},[]),kr=U.useCallback(le=>{var rt,nt;const Se=(rt=J==null?void 0:J.session)==null?void 0:rt.name,ze=(nt=J==null?void 0:J.window)==null?void 0:nt.id;Se&&ze&&Nt(KM(Se,ze,le))},[J]),Ti=((Kl=(Yl=J==null?void 0:J.panes)==null?void 0:Yl.find(le=>le.id===J.paneId))==null?void 0:Kl.cwd)||null,zr=g&&!!(J!=null&&J.paneId)&&!!((Gu=Te[J.paneId])!=null&&Gu.agent)&&re==="chat",ir=async le=>{if(mA(le)){const ze=le.split("/").pop()||le;if(de.tabs.some(Et=>Et.key===le)){de.activate(le),is(le),F(!0);return}const{url:rt,mtimeMs:nt}=await lN(le);de.openDoc(le,{type:"image",name:ze,content:rt,mtime:nt}),Q0({path:le,name:ze,type:"image",ts:Date.now()}),F(!0);return}const Se=await sN(le);de.openDoc(le,{type:Se.type,name:Se.name,content:Se.content,mtime:Se.mtimeMs}),Q0({path:le,name:Se.name,type:Se.type,ts:Date.now()}),F(!0)},fa=le=>{const Se=de.tabs.find(ze=>ze.key===le);(Se==null?void 0:Se.type)==="image"&&Se.content&&URL.revokeObjectURL(Se.content),de.closeTab(le)},is=le=>{const Se=de.tabs.find(ze=>ze.key===le);if(!(!Se||Se.type==="home")){if(Se.type==="image"){lN(le,Se.mtime??null).then(ze=>{if(ze.notModified)return;const rt=Se.content;de.refreshDoc(le,{content:ze.url,mtime:ze.mtimeMs}),rt&&URL.revokeObjectURL(rt)}).catch(()=>{});return}sN(le,Se.mtime??null).then(ze=>{ze.notModified||de.refreshDoc(le,{type:ze.type,name:ze.name,content:ze.content,mtime:ze.mtimeMs})}).catch(()=>{})}},$s=le=>{de.activate(le),is(le)},Li=()=>{F(!0),is(de.active)},z=le=>{const Se=/-> (\d+)/.exec((le==null?void 0:le.message)||""),ze=Se?Number(Se[1]):0;return V(ze===404?"app.docNotFound":ze===413?"app.docTooLarge":ze===400?"app.docUnsupported":"app.docOpenFailed")},ce=async le=>{if(vS(le)){try{await ir(le)}catch(ze){ve(z(ze))}return}const Se=eN(J==null?void 0:J.paneId)??Ti;if(Se)try{await ir(So(Se,le));return}catch{}te({rawPath:le})},K=async le=>{try{await ir(So(le,ee.rawPath))}catch(Se){ve(z(Se));return}J!=null&&J.paneId&&ZM(J.paneId,le),setTimeout(()=>te(null),0)},ue=(le,Se,ze)=>{(le==null?void 0:le.kind)==="url"?_e({port:le.port,path:le.urlPath,raw:le.raw,x:Se,y:ze}):ie({path:(le==null?void 0:le.path)??le,x:Se,y:ze})},ye=le=>{ie(null),ce(le)},[Le,Re]=U.useState(null),Xe=async()=>{const le=$;if(le)try{await Wn({port:le.port,path:le.path}),_e(null),Re(null)}catch{Re(V("localurl.notListening",{port:le.port}))}},at=()=>{_e(null),Re(null)};if(U.useEffect(()=>{if(!Y)return;const le=setTimeout(()=>ve(null),4e3);return()=>clearTimeout(le)},[Y]),U.useEffect(()=>{if(!se)return;const le=setTimeout(()=>B(null),3500);return()=>clearTimeout(le)},[se]),U.useEffect(()=>{if(r)return;const le=Eo();if(!le.length){Ee(!1);return}let Se=!1;return(async()=>{try{const ze=await Fl();if(Se||!ze.length)return;const rt=ze.filter(Xt=>le.includes(Xt.name));if(!rt.length)return;const nt=Og();let Et=nt.session?rt.find(Xt=>Xt.name===nt.session):null;const Ht=Et?{window:nt.window,pane:nt.pane}:null;if(!Et){const Xt=UM();Xt&&(Et=rt.find(mi=>mi.id===Xt))}Et||(Et=rt[0]),Se||await hi(Et,Ht)}catch(ze){xe(ze)}finally{Se||Ee(!1)}})(),()=>{Se=!0}},[r,hi]),Wg({fetch:()=>UA(Ie),apply:le=>Ge(le||{}),intervalMs:5e3,enabled:!r,deps:[Ie]}),U.useEffect(()=>{if(en!=null)return;const le=fN(Te);le>0&&(X0(le),kn(le))},[Te,en]),Wg({fetch:aN,apply:le=>ge(Array.isArray(le)?le:[]),intervalMs:15e3,enabled:!r}),r)return o.jsxDEV(E4,{onSaved:()=>{s(!1),Ee(!0)}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1046,columnNumber:12},this);const vt=b3(Te,zn,en??1/0),ct=x3(vt),Kt={};for(const le of Object.values(Te))le.window&&le.agent&&(Kt[le.window]=le.agent);const Ct={};for(const[le,Se]of Object.entries(Te))Se.agent&&(Ct[le]=Se.agent);const At=!!qh&&Mt!==qh,_n=!!(sn!=null&&sn.updateAvailable)&&sn.latest!==it,Mi=new Set(nn),rs=On.filter(le=>!Mi.has(le.id)).length,rr=On.length>0&&On[0].ts>gt,ss=At||_n||rr,sr=()=>{R(!0),sn!=null&&sn.latest&&(lA(sn.latest),cn(sn.latest))},pa=()=>{R(!1),Qt(!0),aA(qh),Ft(qh)};return o.jsxDEV("div",{className:"app","data-chat-tone":b,style:di?{transform:`translateY(-${di}px)`}:void 0,children:[o.jsxDEV("header",{className:"topbar",children:[o.jsxDEV("button",{className:"hamburger",onClick:()=>_(!0),children:"☰"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1090,columnNumber:9},this),o.jsxDEV("span",{className:"session-name",...oi,children:(($r=J==null?void 0:J.session)==null?void 0:$r.name)??"—"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1091,columnNumber:9},this),St&&o.jsxDEV("button",{className:"topbar-icon preview-live",onClick:()=>Vt(!0),"aria-label":V("app.preview"),title:V("app.openPreview"),children:o.jsxDEV(um,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1096,columnNumber:72},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1095,columnNumber:11},this),o.jsxDEV("button",{className:"topbar-icon",onClick:()=>kt(!0),"aria-label":V("app.ideas"),title:V("app.ideas"),disabled:!J,children:[o.jsxDEV(ZA,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1101,columnNumber:11},this),Ot>0&&o.jsxDEV("span",{className:"idea-badge",children:Ot},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1102,columnNumber:29},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1099,columnNumber:9},this),o.jsxDEV(V4,{rows:vt,top:ct,open:Pe,onToggle:()=>be(le=>!le),onClose:()=>be(!1),onSelectRow:jr,onMarkAllRead:Qn,hooksStatus:Ae,onEnableHooks:He},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1104,columnNumber:9},this),o.jsxDEV("button",{className:"topbar-icon",onClick:()=>S(!0),"aria-label":V("usage.title"),title:V("usage.title"),children:o.jsxDEV(r3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1115,columnNumber:131},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1115,columnNumber:9},this),o.jsxDEV("button",{className:"topbar-icon",onClick:Li,"aria-label":V("app.files"),title:V("app.files"),children:o.jsxDEV(Bu,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1116,columnNumber:114},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1116,columnNumber:9},this),o.jsxDEV("button",{className:"topbar-icon",onClick:()=>I(!0),"aria-label":"Git",title:"Git",children:o.jsxDEV(lS,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1117,columnNumber:103},this)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1117,columnNumber:9},this),o.jsxDEV("button",{className:"topbar-icon",onClick:sr,"aria-label":V("app.settings"),title:V("app.settings"),children:[o.jsxDEV(cm,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1119,columnNumber:11},this),ss&&o.jsxDEV("span",{className:"topbar-dot","aria-hidden":"true"},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1120,columnNumber:23},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1118,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1089,columnNumber:7},this),o.jsxDEV(O4,{open:f,onClose:()=>S(!1),onAuthFail:Be},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1123,columnNumber:7},this),o.jsxDEV(L4,{open:E,onClose:()=>R(!1),chatTone:b,onChatTone:u,chatLensEnabled:g,onChatLensEnabled:h,hooksStatus:Ae,onEnableHooks:He,termRef:Jn,getColCount:()=>{var le,Se;return Dt.current??((Se=(le=Jn.current)==null?void 0:le.getSize())==null?void 0:Se.cols)},onColAdjust:le=>gr(le),onColRestore:Fs,onOpenChangelog:pa,changelogUnread:At,notifUnread:rr,onOpenInbox:Rt,updateInfo:sn,activePreview:_t,pane:J==null?void 0:J.paneId,lastPreviewDir:MM((qu=J==null?void 0:J.window)==null?void 0:qu.id),dynamicEnabled:Ce,onStartPreview:An,onStartDynamicPreview:Yt,onOpenPreview:hn,onRenew:Cr,onStop:Gi},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1128,columnNumber:7},this),o.jsxDEV(wV,{open:dn,onClose:()=>Qt(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1156,columnNumber:7},this),o.jsxDEV(k3,{open:vn,detailId:oe,items:On,readIds:nn,onOpenDetail:qt,onCloseDetail:bn,onClose:Nn,onDelete:Vn,onMarkAllRead:ui,unreadCount:rs},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1157,columnNumber:7},this),o.jsxDEV(H3,{open:d,currentSessionName:(Oo=J==null?void 0:J.session)==null?void 0:Oo.name,bound:Ie,onSelectSession:_r,onUnbind:li,onBind:()=>y(!0),onClose:()=>_(!1),onLogout:pr,orphans:Ye,onTakeoverRequest:je},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1169,columnNumber:7},this),o.jsxDEV(q4,{open:C,bound:Ie,onBound:Un,onClose:()=>y(!1),onAuthFail:Be,inset:di},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1181,columnNumber:7},this),o.jsxDEV(K4,{open:l,onClose:()=>v(!1),onCreate:ns,paneId:J==null?void 0:J.paneId,inset:di},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1189,columnNumber:7},this),o.jsxDEV(J4,{open:!!m,title:(m==null?void 0:m.kind)==="session"?V("app.renameSession"):V("app.renameWindow"),currentName:(m==null?void 0:m.name)||"",onClose:()=>p(null),onSubmit:nr,inset:di},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1196,columnNumber:7},this),o.jsxDEV(P4,{open:!!Ze,orphan:Ze,onConfirm:ma,onClose:()=>je(null),inset:di},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1204,columnNumber:7},this),o.jsxDEV(gm,{open:!!N,title:N?N.name||N.id:"",onClose:()=>k(null),actions:N?[...N.panes===1?[{key:"split-h",icon:o.jsxDEV(uN,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1220,columnNumber:37},this),label:V("pane.splitH"),onClick:()=>ki(N,"h")},{key:"split-v",icon:o.jsxDEV(dN,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1221,columnNumber:37},this),label:V("pane.splitV"),onClick:()=>ki(N,"v")}]:[],...N.panes>1?[{key:"manage-split",icon:o.jsxDEV(c3,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1225,columnNumber:42},this),label:V("pane.manage"),onClick:()=>zs(N)}]:[],...J&&J.windows.length>1?[[{key:"move-left",label:V("app.moveLeft"),disabled:!Ng(J.windows,N.id,"left"),onClick:()=>Fr("left")},{key:"move-right",label:V("app.moveRight"),disabled:!Ng(J.windows,N.id,"right"),onClick:()=>Fr("right")}]]:[],{key:"rename",label:V("common.rename"),onClick:()=>{p({kind:"window",id:N.id,name:N.name||""}),k(null)}},{key:"delete",label:V("app.deleteWindow"),danger:!0,confirm:!0,confirmLabel:J&&J.windows.length<=1?V("app.deleteLastWindowConfirm"):V("app.deleteConfirm"),onClick:Tt}]:[]},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1211,columnNumber:7},this),o.jsxDEV(gm,{open:!!j,title:(()=>{if(!j||!J)return"";const le=J.panes.findIndex(rt=>rt.id===j),Se=J.panes[le];return Se?`${le<y1.length?y1[le]:String(le+1)} ${Se.command||Se.id}`:""})(),onClose:()=>M(null),actions:j?[{key:"split-h",icon:o.jsxDEV(uN,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1269,columnNumber:35},this),label:V("pane.splitH"),onClick:()=>Bn(j,"h")},{key:"split-v",icon:o.jsxDEV(dN,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1270,columnNumber:35},this),label:V("pane.splitV"),onClick:()=>Bn(j,"v")},{key:"close",icon:o.jsxDEV(ca,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1272,columnNumber:33},this),label:V("pane.close"),danger:!0,confirm:!0,confirmLabel:V("pane.closeConfirm"),onClick:Hs}]:[]},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1257,columnNumber:7},this),o.jsxDEV(cV,{open:A,pane:J==null?void 0:J.paneId,windowId:(Vo=J==null?void 0:J.window)==null?void 0:Vo.id,tabs:de.tabs,active:de.active,onActivate:$s,onCloseTab:fa,onMinimize:()=>F(!1),onOpenDoc:ce,pendingShare:G,onPendingConsumed:()=>ne(null)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1277,columnNumber:7},this),o.jsxDEV(hV,{open:O,pane:J==null?void 0:J.paneId,windowId:(Po=J==null?void 0:J.window)==null?void 0:Po.id,inset:di,onClose:()=>I(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1290,columnNumber:7},this),o.jsxDEV(gV,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1293,columnNumber:7},this),o.jsxDEV(F4,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1295,columnNumber:7},this),o.jsxDEV(v3,{open:Je&&!!St,tabs:Jt,activeName:yn,domain:Q,onSwitchTab:Zn,onCloseTab:Wi,onRenew:Cr,onStop:Gi,onMinimize:()=>Vt(!1)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1297,columnNumber:7},this),Y&&o.jsxDEV("div",{className:"doc-toast",role:"alert",onClick:()=>ve(null),children:Y},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1309,columnNumber:9},this),he&&o.jsxDEV("div",{className:"exit-toast",role:"status",children:V("app.backToExit")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1312,columnNumber:9},this),se&&o.jsxDEV("div",{className:"handoff-toast",role:"status",children:V("chat.slash.handedOff",{cmd:se})},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1315,columnNumber:9},this),me&&o.jsxDEV(_1,{path:me.path,x:me.x,y:me.y,onOpen:ye,onClose:()=>ie(null)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1318,columnNumber:9},this),$&&o.jsxDEV(_1,{icon:o.jsxDEV(um,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1328,columnNumber:17},this),name:V("localurl.title"),path:$.raw,openLabel:V("localurl.open"),note:Le??(Ce?void 0:V("localurl.disabled")),disabled:!Ce,x:$.x,y:$.y,onOpen:Xe,onClose:at},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1327,columnNumber:9},this),o.jsxDEV(xV,{open:wt,session:(Yu=J==null?void 0:J.session)==null?void 0:Yu.name,window:(($a=J==null?void 0:J.window)==null?void 0:$a.name)||((Xl=J==null?void 0:J.window)==null?void 0:Xl.id),onClose:()=>kt(!1),onSend:le=>{var Se;(Se=ii.current)==null||Se.fill(le),kt(!1)},onCountChange:Pt},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1340,columnNumber:7},this),o.jsxDEV(Wu,{open:!!ee,seedCwd:eN(J==null?void 0:J.paneId)??Ti??null,pane:(J==null?void 0:J.paneId)??null,hint:ee?o.jsxDEV(o.Fragment,{children:[V("app.cannotLocate")," ",o.jsxDEV("code",{children:ee.rawPath},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1352,columnNumber:54},this),V("app.pickItsDir")]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1352,columnNumber:28},this):null,onPick:K,onClose:()=>te(null),inset:di},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1348,columnNumber:7},this),J?o.jsxDEV(o.Fragment,{children:[o.jsxDEV(tU,{windows:J.windows,windowAgents:Kt,paneAgents:Ct,currentAgent:(Ai=Te[J.paneId])==null?void 0:Ai.agent,currentWindowId:J.window.id,panes:J.panes,currentPaneId:J.paneId,onSelectWindow:on,onSelectPane:Gn,onNewWindow:()=>v(!0),onManageWindow:le=>k(le),onManagePane:le=>M(le),paneSheetOpen:!!j,openMapFor:D,onMapOpened:()=>L(null),trackWindowId:N==null?void 0:N.id,lens:re,chatLensEnabled:g,onLensChange:le=>{We(le),localStorage.setItem("tw_lens_"+J.paneId,le)}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1359,columnNumber:11},this),J.paneId&&(zr?o.jsxDEV(C4,{pane:J.paneId,kind:(Wr=Te[J.paneId])==null?void 0:Wr.kind,msg:(ei=Te[J.paneId])==null?void 0:ei.msg,onAuthFail:Be,slashEcho:W&&W.paneId===J.paneId?W:null,onSlashEchoDone:()=>X(null)},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1382,columnNumber:15},this):o.jsxDEV($U,{ref:Jn,pane:J.paneId,inset:di,onAuthFail:Be,onDocLinkTap:ue,onTap:()=>{var le;return(le=ii.current)==null?void 0:le.hideKeyboard()}},J.paneId,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1386,columnNumber:15},this)),zr?o.jsxDEV(G2,{pane:J.paneId,kind:(Gr=Te[J.paneId])==null?void 0:Gr.kind,cwd:Ti,onKey:Er,onAuthFail:Be,onSent:br,onInteractiveSlash:le=>{We("terminal"),localStorage.setItem("tw_lens_"+J.paneId,"terminal"),B(le)}},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1399,columnNumber:13},this):o.jsxDEV(B2,{ref:ii,pane:J.paneId,onAuthFail:Be,onKey:Er,onText:vr,cwd:Ti,agent:(Bo=Te[J.paneId])==null?void 0:Bo.agent,windowId:(Wa=J.window)==null?void 0:Wa.id,recent:st,favorites:tt,onSent:br,onToggleFav:xs,onRemoveRecent:kr,inset:di},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1409,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1358,columnNumber:9},this):Gt?o.jsxDEV("div",{className:"loading",children:V("common.loading")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1428,columnNumber:9},this):Ie.length===0?o.jsxDEV("button",{className:"empty-cta",onClick:()=>y(!0),children:[V("app.noBoundSession"),o.jsxDEV("span",{children:V("app.tapToBind")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1431,columnNumber:36},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1430,columnNumber:9},this):o.jsxDEV("div",{className:"loading",children:V("app.selectSessionHint")},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1434,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/App.jsx",lineNumber:1088,columnNumber:5},this)}E1(document.getElementById("root")).render(o.jsxDEV(TV,{},void 0,!1,{fileName:"/Users/admin/jly_gh/handmux_private/web/src/main.jsx",lineNumber:6,columnNumber:52},void 0));if(typeof window<"u"&&window.__hideBootSplash){const r=[...document.querySelectorAll('link[rel="stylesheet"]')].filter(d=>d.media==="print"),s=r.length?new Promise(d=>{let _=r.length;r.forEach(E=>E.addEventListener("load",()=>{--_||d()},{once:!0}))}):Promise.resolve();requestAnimationFrame(()=>requestAnimationFrame(()=>s.then(()=>window.__hideBootSplash())))}
|