/**
 * Copyright (c) 2014 The xterm.js authors. All rights reserved.
 * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
 * https://github.com/chjj/term.js
 * @license MIT
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 * Originally forked from (with the author's permission):
 *   Fabrice Bellard's javascript vt100 for jslinux:
 *   http://bellard.org/jslinux/
 *   Copyright (c) 2011 Fabrice Bellard
 *   The original design remains. The terminal itself
 *   has been extended to include xterm CSI codes, among
 *   other features.
 */.xterm{cursor:text;position:relative;user-select:none;-ms-user-select:none;-webkit-user-select:none}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{position:absolute;top:0;z-index:5}.xterm .xterm-helper-textarea{padding:0;border:0;margin:0;position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-5;white-space:nowrap;overflow:hidden;resize:none}.xterm .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{background-color:#000;overflow-y:scroll;cursor:default;position:absolute;right:0;left:0;top:0;bottom:0}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;left:0;top:0}.xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;top:0;left:-9999em;line-height:normal}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility:not(.debug),.xterm .xterm-message{position:absolute;left:0;top:0;bottom:0;right:0;z-index:10;color:transparent;pointer-events:none}.xterm .xterm-accessibility-tree:not(.debug) *::selection{color:transparent}.xterm .xterm-accessibility-tree{font-family:monospace;-webkit-user-select:text;user-select:text;white-space:pre}.xterm .xterm-accessibility-tree>div{transform-origin:left;width:fit-content}.xterm .live-region{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{text-decoration:double underline}.xterm-underline-3{text-decoration:wavy underline}.xterm-underline-4{text-decoration:dotted underline}.xterm-underline-5{text-decoration:dashed underline}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:overline underline}.xterm-overline.xterm-underline-2{text-decoration:overline double underline}.xterm-overline.xterm-underline-3{text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;position:absolute;top:0;right:0;pointer-events:none}.xterm-decoration-top{z-index:2;position:relative}.xterm .xterm-scrollable-element>.scrollbar{cursor:default}.xterm .xterm-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.xterm .xterm-scrollable-element>.visible{opacity:1;background:rgba(0,0,0,0);transition:opacity .1s linear;z-index:11}.xterm .xterm-scrollable-element>.invisible{opacity:0;pointer-events:none}.xterm .xterm-scrollable-element>.invisible.fade{transition:opacity .8s linear}.xterm .xterm-scrollable-element>.shadow{position:absolute;display:none}.xterm .xterm-scrollable-element>.shadow.top{display:block;top:0;left:3px;height:3px;width:100%;box-shadow:var(--vscode-scrollbar-shadow, #000) 0 6px 6px -6px inset}.xterm .xterm-scrollable-element>.shadow.left{display:block;top:3px;left:0;height:100%;width:3px;box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}.xterm .xterm-scrollable-element>.shadow.top-left-corner{display:block;top:0;left:0;height:3px;width:3px}.xterm .xterm-scrollable-element>.shadow.top.left{box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}:root{font-family:Inter,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;color:#ecece9;background:#141619;color-scheme:dark}*{box-sizing:border-box}body{margin:0;height:100dvh;display:flex}button,input,select{font:inherit}button,a{-webkit-tap-highlight-color:transparent}button{cursor:pointer;border:1px solid #37393b;background:#26282b;color:inherit;border-radius:8px;padding:9px 13px}button:hover{background:#333639}button:disabled{opacity:.5;cursor:default}button:focus-visible,a:focus-visible{outline:2px solid #ed966e;outline-offset:3px}a{color:inherit;text-decoration:none}.primary{background:#ee9067;border-color:#ee9067;color:#241a15;font-weight:600}.primary:hover{background:#faa783}aside{width:270px;flex-shrink:0;background:#1c1e21;border-right:1px solid #303235;padding:26px 16px 16px;display:flex;gap:24px;flex-direction:column}.label{font-size:11px;letter-spacing:1px;color:#85878c;margin:6px 10px -12px}nav{flex:1;overflow:auto;display:flex;flex-direction:column;gap:7px}.session{text-align:left;border:1px solid transparent;background:transparent;padding:13px 12px}.session.selected{background:#303034;border-color:#48403b}.session strong,.session span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.session strong{font-size:14px;font-weight:500}.session span{font-size:10px;color:#98999e;margin-top:8px}footer{display:flex;flex-direction:column;gap:15px;font-size:12px}footer a,footer small{color:#919399}main{min-width:0;flex:1;display:flex;flex-direction:column}header{min-height:92px;display:flex;align-items:center;justify-content:space-between;gap:20px;border-bottom:1px solid #2d2f32;padding:20px 28px}h1{font-size:17px;margin:0 0 8px;font-weight:550}header p{font-size:11px;color:#93959a;margin:0;overflow-wrap:anywhere}.actions{display:flex;gap:10px;align-items:center;flex-shrink:0}.actions button{font-size:12px}#connection{font-size:11px;color:#b8bcac}#notice:empty{display:none}#notice{padding:12px 28px;background:#43392e;color:#f7d4ac;font-size:13px}#empty{flex:1;display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center}.mark{font-size:64px;color:#ef946d}h2{font-size:23px;font-weight:550}#empty p{font-size:14px;line-height:1.9;color:#96989c;margin:0 0 28px}#terminal{flex:1;min-height:0;padding:18px 18px 0;overflow:hidden}.bottom{font-size:10px;color:#787c81;padding:12px 24px;border-top:1px solid #292b2e}dialog{width:min(460px,92vw);border:1px solid #44464a;border-radius:16px;background:#202226;padding:28px}dialog::backdrop{background:#0009}dialog h2{margin-top:0}label{display:flex;flex-direction:column;gap:9px;margin:20px 0;font-size:13px}input,select{width:100%;border:1px solid #44464a;border-radius:7px;padding:11px;background:#15171a;color:inherit}dialog p{font-size:12px;color:#a4a5a9;line-height:1.6}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}[hidden]{display:none!important}@media (max-width: 760px){aside{width:185px;padding:18px 10px;gap:18px}header{padding:15px;align-items:flex-start;flex-direction:column;gap:10px}.actions{flex-wrap:wrap}.bottom{display:none}#terminal{padding:8px 4px 0}#empty{padding:20px}#empty h2{font-size:18px}#empty p{font-size:12px}}#composer{flex-shrink:0;margin:12px 20px 8px;padding:18px 16px 12px;border:1px solid #383838;border-radius:26px;background:#292929;color:#f5f5f5}#composer:focus-within{border-color:#555}#composer.drag-over{border-color:#ee9067}#message{display:block;width:100%;resize:none;min-height:64px;max-height:180px;padding:0 4px;border:0;border-radius:0;background:transparent;color:inherit;font:inherit;font-size:16px;line-height:1.6;outline:none;overflow-y:auto}#message::placeholder{color:#a2a2a2}.compose-actions{display:flex;align-items:center;justify-content:space-between;margin-top:12px}#attach,#send{display:flex;align-items:center;justify-content:center;width:38px;height:38px;flex-shrink:0;padding:8px;border-radius:50%}#attach{border:0;background:transparent;color:#f5f5f5}#attach:hover{background:#3a3a3a}#send{border:0;background:#fff;color:#161616;margin-left:auto}#send:hover{background:#e5e5e5}#attach svg,#send svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}#attachments{display:flex;flex-wrap:wrap;gap:8px}.attachment{display:flex;align-items:center;gap:6px;max-width:220px;font-size:11px;margin-bottom:8px}.attachment img{width:44px;height:44px;object-fit:cover;border-radius:6px}.attachment span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.attachment button{padding:4px 7px}@media (max-width: 760px){#composer{margin:8px;border-radius:22px;padding:14px 12px 10px}}.session-row{display:flex;align-items:center;gap:4px;min-width:0}.session-row .session{flex:1;min-width:0}.session-hide{padding:7px;background:transparent;border-color:transparent;opacity:.65}.session-hide:hover,.session-hide:focus-visible{opacity:1}#settings{width:min(680px,92vw);max-height:80vh;overflow-y:auto}.settings-heading{display:flex;align-items:center;justify-content:space-between;gap:20px}.settings-heading h2{margin:0}#archived-sessions{display:flex;flex-direction:column;gap:10px}.archived-row{display:flex;align-items:center;gap:8px;padding:12px 0;border-top:1px solid #7775}.archived-row>div{flex:1;min-width:0}.archived-row strong{display:block;overflow-wrap:anywhere}.archived-row small{display:block;color:#8c929d;margin-top:6px}body:not([data-connection=connected])>aside,body:not([data-connection=connected])>main{visibility:hidden}#login{position:fixed;top:0;right:0;bottom:0;left:0;width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;padding:28px;border:0;border-radius:0;background:#141619;color:#ecece9}#login[open]{display:flex;align-items:center;justify-content:center}#login::backdrop{background:#141619}.connection-card{width:min(400px,100%)}.connection-card h2{font-size:23px}.connection-card p{line-height:1.7}#login-submit,#connection-retry{width:100%;margin-top:12px}body{position:relative}.sidebar-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:13px;font-weight:600}#sidebar-close,#sidebar-toggle{padding:5px;width:34px;height:34px;flex-shrink:0;font-size:21px;line-height:1}.workspace-heading{display:flex;align-items:center;gap:12px;min-width:0}.workspace-title{min-width:0}body[data-sidebar=closed]>#conversation-sidebar{display:none}#sidebar-backdrop{position:absolute;top:0;right:0;bottom:0;left:0;z-index:20;border:0;border-radius:0;padding:0;background:#0008}#conversation-sidebar{min-height:0}@media (max-width: 760px){body:not([data-sidebar=open])>#conversation-sidebar{display:none}#conversation-sidebar{position:absolute;inset:0 auto 0 0;z-index:21;width:min(290px,85vw);padding:16px;box-shadow:8px 0 30px #0004}.workspace-heading{width:100%}}#model-control{position:relative;margin-left:auto;min-width:0}#model-toggle{display:flex;align-items:center;gap:8px;padding:7px 10px;border:0;background:transparent;color:inherit;max-width:240px;font-size:14px}#model-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#model-menu{position:absolute;bottom:calc(100% + 14px);right:0;z-index:12;width:min(370px,calc(100vw - 48px));max-height:min(480px,65dvh);overflow:auto;padding:14px;border:1px solid #4b4b4b;border-radius:18px;background:#252628;color:#f1f1f1;box-shadow:0 12px 40px #0006}.model-menu-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}#model-close{border:0;background:transparent;font-size:20px;padding:0 5px}#model-status{font-size:12px;color:#a7aab0;line-height:1.5}#model-options{display:flex;flex-direction:column;gap:5px}.model-option{text-align:left;border:1px solid transparent;background:transparent;padding:11px 12px;border-radius:10px}.model-option strong{display:block;font-size:14px}.model-option small{display:block;color:#a7aab0;margin-top:5px;line-height:1.4}.model-option[aria-checked=true]{background:#383b40;border-color:#737985}.model-option[aria-checked=true] strong:after{content:" ✓"}#model-control+#send{margin-left:10px}html[data-lampas-theme=light] #model-menu{background:#fff;color:#20242c;border-color:#cbd2dc}html[data-lampas-theme=light] .model-option small,html[data-lampas-theme=light] #model-status{color:#596575}@media (max-width: 760px){#model-toggle{max-width:190px;font-size:12px}#model-menu{right:-40px}}.workspace-title h1{margin:0}#rename-title{display:block;max-width:100%;padding:5px 0;border:0;border-radius:4px;background:transparent;color:inherit;font:inherit;text-align:left}#rename-title:disabled{opacity:1;cursor:default}#title{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#sidebar-toggle{display:inline-flex;align-items:center;justify-content:center;padding:7px;width:36px;height:36px}#sidebar-toggle svg{display:block;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round}html[data-lampas-theme=light] body:has(#sessions) #rename-title{background:transparent!important;border:0!important}.archived-row{flex-wrap:wrap}.archived-row>div{flex-basis:180px}#rename-form{width:min(440px,100%);margin:0}#rename-input{width:100%;min-width:0;font-size:inherit}.rename-actions{display:flex;gap:6px;margin-top:6px}.rename-actions button{padding:4px 10px;font-size:12px}#rename-error{margin:4px 0 0;font-size:12px}#rename-title[hidden],#rename-form[hidden]{display:none!important}@media (max-width: 760px){body[data-sidebar=open] #sidebar-toggle{position:relative;z-index:22}.sidebar-heading{min-height:36px;padding-left:46px}}.permission-current{font-size:11px;color:#b9bdc5;margin-left:8px;white-space:nowrap}#session-permissions{margin:20px 0;padding-bottom:20px;border-bottom:1px solid #7775}#permission-current-detail,#permission-setting-help,#create-permission-help{font-size:12px;line-height:1.6}html[data-lampas-theme=light] .permission-current{color:#596575}@media (max-width: 420px){.permission-current{font-size:10px;margin-left:4px}#model-toggle{max-width:140px}}header{flex-direction:row;align-items:center}.workspace-heading{flex:1;width:auto;gap:8px;overflow:hidden}.workspace-title{flex:1;overflow:hidden}.actions{flex-wrap:nowrap}.actions button{white-space:nowrap}#connection{flex:0 0 7px;width:7px;height:7px;border-radius:50%;overflow:hidden;font-size:0;background:#d7a84b}#connection[data-state=connected]{background:#57bf87}#connection[data-state=disconnected]{background:#e17b69}#connection[data-state=ended]{background:#95999f}@media (max-width: 760px){header{min-height:62px;padding:10px;gap:8px}.workspace-heading{width:auto;gap:6px}.actions{gap:5px}.actions button{padding:7px 8px;font-size:11px}.workspace-title h1{font-size:15px}#rename-input{padding:5px;font-size:14px}.rename-actions{gap:3px}.rename-actions button{padding:3px 5px;font-size:11px}}#project-sidebar{display:grid;gap:8px}#project-sidebar[hidden]{display:none}#project-list{max-height:22vh;overflow:auto}#project-list button{display:grid;width:100%;text-align:left;gap:5px;margin:5px 0}#project-list strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}#project-list small,.muted{color:#9da1a9;font-size:12px;line-height:1.7}#project-dialog{width:min(960px,96vw);max-height:94dvh;overflow:auto;padding:24px}#persona-dialog{width:min(640px,94vw);max-height:90dvh;overflow:auto}.project-heading{display:flex;gap:12px;justify-content:space-between;align-items:center}.project-heading h2{min-width:0;overflow-wrap:anywhere}.project-actions{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}.project-form-grid,.persona-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}#project-dialog form,#persona-dialog form{display:grid;gap:14px}#project-dialog textarea,#persona-dialog textarea{width:100%;resize:vertical;min-height:70px}#project-dialog fieldset{min-width:0;border:1px solid #52565e;border-radius:10px;padding:14px;display:grid;gap:12px}#project-dialog input,#project-dialog select,#persona-dialog input{width:100%;min-width:0}#project-models{display:flex;flex-wrap:wrap;gap:6px;max-height:160px;overflow:auto}.persona-card{display:grid;text-align:left;gap:8px;min-width:0;overflow-wrap:anywhere}.persona-card small{color:#9da1a9}.persona-card span{font-size:12px}.project-run{border-top:1px solid #52565e;padding:14px 0}#project-dialog pre,#persona-dialog pre{white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;line-height:1.7}.project-warning{padding:12px;border:1px solid #b48b52;border-radius:8px;font-size:12px;line-height:1.7}.project-conversation{max-height:260px;overflow:auto;font-size:13px;line-height:1.7}@media (max-width:600px){#project-dialog{padding:14px}.project-form-grid,.persona-grid{grid-template-columns:1fr}.project-actions button{font-size:12px}}html[data-lampas-theme=light] #project-dialog,html[data-lampas-theme=light] #persona-dialog{background:#fff;color:#25282c}#project-dialog p,#project-dialog small,#project-dialog summary,#persona-dialog p,#persona-dialog summary{overflow-wrap:anywhere}#project-dialog button,#persona-dialog button{max-width:100%}#project-document-dialog{width:min(900px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);padding:20px;border-radius:18px;border:1px solid #52565e;background:#1c1f23;color:#ecece9;overflow:auto;box-sizing:border-box}#project-document-dialog label{display:grid;gap:8px;margin:12px 0}#project-document-dialog textarea{box-sizing:border-box;width:100%;min-width:0;padding:12px;border-radius:10px;background:#141619;color:#ecece9;border:1px solid #52565e;font:13px/1.6 ui-monospace,monospace;resize:vertical}#project-document-dialog button{margin:4px;padding:8px 12px}.document-path,.project-document-list small,#project-document-dialog pre{overflow-wrap:anywhere;white-space:pre-wrap}.project-document-list{display:grid;gap:8px}.project-document-list button{display:grid;text-align:left;gap:6px;min-width:0}.document-history>div{display:flex;flex-wrap:wrap;align-items:center;padding:8px 0;border-bottom:1px solid #52565e;gap:6px}#document-error{color:#e97555}html[data-lampas-theme=light] #project-document-dialog{background:#fff;color:#25282c}html[data-lampas-theme=light] #project-document-dialog textarea{background:#f6f7f8;color:#25282c}#folder-dialog{width:min(640px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);padding:20px;overflow:auto}.folder-breadcrumbs,.folder-toolbar{display:flex;flex-wrap:wrap;gap:6px;align-items:center}.folder-breadcrumbs button{min-width:0;max-width:100%;overflow-wrap:anywhere;text-align:left}.folder-current{overflow-wrap:anywhere;font-size:13px;line-height:1.6}.folder-list{display:grid;gap:6px;max-height:40dvh;overflow:auto;margin:12px 0}.folder-list button{width:100%;min-width:0;text-align:left;overflow-wrap:anywhere}.folder-status{font-size:13px;overflow-wrap:anywhere}#folder-dialog .dialog-actions{flex-wrap:wrap}#folder-dialog .project-heading h2{font-size:20px}input[readonly]{cursor:default;text-overflow:ellipsis}html[data-lampas-theme=light] #folder-dialog{background:#fff;color:#25282c}@media (max-width:600px){#folder-dialog{padding:14px}.folder-toolbar button{font-size:12px}}button.permission-current{border:0;padding:4px 8px;background:transparent;cursor:pointer;font:inherit;font-size:12px;white-space:nowrap}#permission-form button{max-width:100%;white-space:normal}#permission-setting-help,#permission-result{overflow-wrap:anywhere;line-height:1.6}
