@devness/useai 0.8.21 → 0.8.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +64 -15
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -189,7 +189,7 @@ var init_types = __esm({
|
|
|
189
189
|
// ../shared/dist/constants/paths.js
|
|
190
190
|
import { join } from "path";
|
|
191
191
|
import { homedir } from "os";
|
|
192
|
-
var USEAI_DIR, DATA_DIR, ACTIVE_DIR, SEALED_DIR, KEYSTORE_FILE, CONFIG_FILE, SESSIONS_FILE, MILESTONES_FILE, SYNC_LOG_FILE, DAEMON_PID_FILE, USEAI_HOOKS_DIR, DAEMON_PORT, DAEMON_LOG_FILE, DAEMON_MCP_URL, DAEMON_HEALTH_URL, LAUNCHD_PLIST_PATH, SYSTEMD_SERVICE_PATH, WINDOWS_STARTUP_SCRIPT_PATH;
|
|
192
|
+
var USEAI_DIR, DATA_DIR, ACTIVE_DIR, SEALED_DIR, KEYSTORE_FILE, CONFIG_FILE, SESSIONS_FILE, MILESTONES_FILE, SYNC_LOG_FILE, SYNC_STATE_FILE, DAEMON_PID_FILE, USEAI_HOOKS_DIR, DAEMON_PORT, DAEMON_LOG_FILE, DAEMON_MCP_URL, DAEMON_HEALTH_URL, LAUNCHD_PLIST_PATH, SYSTEMD_SERVICE_PATH, WINDOWS_STARTUP_SCRIPT_PATH;
|
|
193
193
|
var init_paths = __esm({
|
|
194
194
|
"../shared/dist/constants/paths.js"() {
|
|
195
195
|
"use strict";
|
|
@@ -202,6 +202,7 @@ var init_paths = __esm({
|
|
|
202
202
|
SESSIONS_FILE = join(DATA_DIR, "sessions.json");
|
|
203
203
|
MILESTONES_FILE = join(DATA_DIR, "milestones.json");
|
|
204
204
|
SYNC_LOG_FILE = join(DATA_DIR, "sync-log.json");
|
|
205
|
+
SYNC_STATE_FILE = join(DATA_DIR, "sync-state.json");
|
|
205
206
|
DAEMON_PID_FILE = join(USEAI_DIR, "daemon.pid");
|
|
206
207
|
USEAI_HOOKS_DIR = join(USEAI_DIR, "hooks");
|
|
207
208
|
DAEMON_PORT = 19200;
|
|
@@ -219,7 +220,7 @@ var VERSION;
|
|
|
219
220
|
var init_version = __esm({
|
|
220
221
|
"../shared/dist/constants/version.js"() {
|
|
221
222
|
"use strict";
|
|
222
|
-
VERSION = "0.8.
|
|
223
|
+
VERSION = "0.8.23";
|
|
223
224
|
}
|
|
224
225
|
});
|
|
225
226
|
|
|
@@ -6294,6 +6295,7 @@ __export(dist_exports, {
|
|
|
6294
6295
|
SPIKE_MULTIPLIER: () => SPIKE_MULTIPLIER,
|
|
6295
6296
|
SUPPORTED_AI_TOOLS: () => SUPPORTED_AI_TOOLS,
|
|
6296
6297
|
SYNC_LOG_FILE: () => SYNC_LOG_FILE,
|
|
6298
|
+
SYNC_STATE_FILE: () => SYNC_STATE_FILE,
|
|
6297
6299
|
SYSTEMD_SERVICE_PATH: () => SYSTEMD_SERVICE_PATH,
|
|
6298
6300
|
TOOL_COLORS: () => TOOL_COLORS,
|
|
6299
6301
|
TOOL_DISPLAY_NAMES: () => TOOL_DISPLAY_NAMES,
|
|
@@ -34400,14 +34402,14 @@ var gl={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24
|
|
|
34400
34402
|
*
|
|
34401
34403
|
* This source code is licensed under the ISC license.
|
|
34402
34404
|
* See the LICENSE file in the root directory of this source tree.
|
|
34403
|
-
*/const xl=h.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:s,iconNode:i,...o},l)=>h.createElement("svg",{ref:l,...gl,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:ml("lucide",a),...o},[...i.map(([e,t])=>h.createElement(e,t)),...Array.isArray(s)?s:[s]])),yl=(e,t)=>{const n=h.forwardRef(({className:n,...r},a)=>{return h.createElement(xl,{ref:a,iconNode:t,className:ml(\`lucide-\${s=e,s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}\`,n),...r});var s});return n.displayName=\`\${e}\`,n},vl=yl("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]),bl=yl("Bug",[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]]),wl=yl("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]),kl=yl("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]),Sl=yl("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]),jl=yl("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),Nl=yl("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),Cl=yl("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),Tl=yl("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),El=yl("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),Ml=yl("CircleArrowUp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]]),Pl=yl("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]),Ll=yl("CloudDownload",[["path",{d:"M12 13v8l-4-4",key:"1f5nwf"}],["path",{d:"m12 21 4-4",key:"1lfcce"}],["path",{d:"M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284",key:"ui1hmy"}]]),Dl=yl("CloudUpload",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]),Al=yl("Cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]),_l=yl("Compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]),zl=yl("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]),Rl=yl("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]),Fl=yl("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]),Vl=yl("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]),Il=yl("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),Ol=yl("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]),$l=yl("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]),Bl=yl("Flag",[["path",{d:"M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z",key:"i9b6wo"}],["line",{x1:"4",x2:"4",y1:"22",y2:"15",key:"1cm3nv"}]]),Hl=yl("FolderKanban",[["path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 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",key:"1fr9dc"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M12 10v2",key:"hh53o1"}],["path",{d:"M16 10v6",key:"1d6xys"}]]),Ul=yl("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]),Wl=yl("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["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",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]),ql=yl("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]),Yl=yl("Layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]),Kl=yl("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]),Xl=yl("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),Ql=yl("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]),Zl=yl("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]),Gl=yl("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]),Jl=yl("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]),ec=yl("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]),tc=yl("Pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]),nc=yl("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]),rc=yl("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]),ac=yl("Rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]),sc=yl("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]),ic=yl("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]),oc=yl("ScrollText",[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]),lc=yl("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),cc=yl("Settings",[["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",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),uc=yl("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]),dc=yl("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]),hc=yl("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]),fc=yl("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]),pc=yl("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),mc=yl("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),gc=yl("Trophy",[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]]),xc=yl("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]),yc=yl("Wrench",[["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",key:"cbrjhi"}]]),vc=yl("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),bc=yl("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),wc={"claude-code":"#d4a04a","claude-desktop":"#d4a04a","claude-cli":"#d4a04a",anthropic:"#d4a04a",codex:"#10a37f","codex-cli":"#10a37f",openai:"#10a37f",cursor:"#00b4d8",copilot:"#6e40c9","github-copilot":"#6e40c9","copilot-cli":"#6e40c9",windsurf:"#38bdf8",trae:"#06b6d4",vscode:"#007ACC","vscode-insiders":"#24bfa5",aider:"#4ade80","kilo-code":"#14b8a6",crush:"#ef4444",continue:"#f97316",cody:"#ff6b6b",tabby:"#a78bfa",roo:"#f472b6","roo-code":"#f472b6",gemini:"#4285f4","gemini-cli":"#4285f4",zed:"#084CCF",cline:"#EAB308","amazon-q":"#01A88D","amazon-q-cli":"#01A88D","amazon-q-ide":"#01A88D",goose:"#FF6F00",jetbrains:"#6B57D2",junie:"#7B68EE",opencode:"#71717A",antigravity:"#E91E63",augment:"#e879f9",amp:"#f87171",mcp:"#91919a"},kc={"claude-code":"Claude Code","claude-desktop":"Claude Desktop","claude-cli":"Claude CLI",anthropic:"Anthropic",codex:"Codex","codex-cli":"Codex CLI",openai:"OpenAI",cursor:"Cursor",copilot:"GitHub Copilot","github-copilot":"GitHub Copilot","copilot-cli":"Copilot CLI",windsurf:"Windsurf",trae:"Trae",vscode:"VS Code","vscode-insiders":"VS Code Insiders",aider:"Aider","kilo-code":"Kilo Code",crush:"Crush",continue:"Continue",cody:"Sourcegraph Cody",tabby:"TabbyML",roo:"Roo Code","roo-code":"Roo Code",mcp:"MCP Client",gemini:"Gemini","gemini-cli":"Gemini CLI",zed:"Zed",cline:"Cline","amazon-q":"Amazon Q","amazon-q-cli":"Amazon Q CLI","amazon-q-ide":"Amazon Q IDE",goose:"Goose",jetbrains:"JetBrains",junie:"Junie",opencode:"OpenCode",antigravity:"Antigravity",augment:"Augment",amp:"Amp"},Sc={"claude-code":"CC","claude-desktop":"CD","claude-cli":"CL",anthropic:"An",codex:"OX","codex-cli":"OX",openai:"OA",cursor:"Cu",copilot:"CP","github-copilot":"CP","copilot-cli":"CP",windsurf:"WS",trae:"Tr",vscode:"VS","vscode-insiders":"VI",aider:"Ai","kilo-code":"Ki",crush:"Cr",continue:"Co",cody:"Cy",tabby:"Tb",roo:"Ro","roo-code":"Ro",mcp:"MC",gemini:"Ge","gemini-cli":"Ge",zed:"Ze",cline:"Cl","amazon-q":"AQ","amazon-q-cli":"AQ","amazon-q-ide":"AQ",goose:"Go",jetbrains:"JB",junie:"Ju",opencode:"OC",antigravity:"AG",augment:"Au",amp:"Am"},jc=e=>\`data:image/svg+xml,\${encodeURIComponent(\`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">\${e}</svg>\`)}\`,Nc={"claude-code":\`data:image/svg+xml,\${encodeURIComponent('<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z"></path></svg>')}\`,"claude-desktop":\`data:image/svg+xml,\${encodeURIComponent('<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z"></path></svg>')}\`,"claude-cli":\`data:image/svg+xml,\${encodeURIComponent('<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z"></path></svg>')}\`,anthropic:\`data:image/svg+xml,\${encodeURIComponent('<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z"></path></svg>')}\`,codex:\`data:image/svg+xml,\${encodeURIComponent('<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M22.282 9.821a5.985 5.985 0 0 0-.516-4.91 6.046 6.046 0 0 0-6.51-2.9A6.065 6.065 0 0 0 4.981 4.18a5.985 5.985 0 0 0-3.998 2.9 6.046 6.046 0 0 0 .743 7.097 5.98 5.98 0 0 0 .51 4.911 6.051 6.051 0 0 0 6.515 2.9A5.985 5.985 0 0 0 13.26 24a6.056 6.056 0 0 0 5.772-4.206 5.99 5.99 0 0 0 3.997-2.9 6.056 6.056 0 0 0-.747-7.073zM13.26 22.43a4.476 4.476 0 0 1-2.876-1.04l.141-.081 4.779-2.758a.795.795 0 0 0 .392-.681v-6.737l2.02 1.168a.071.071 0 0 1 .038.052v5.583a4.504 4.504 0 0 1-4.494 4.494zM3.6 18.304a4.47 4.47 0 0 1-.535-3.014l.142.085 4.783 2.759a.771.771 0 0 0 .78 0l5.843-3.369v2.332a.08.08 0 0 1-.033.062L9.74 19.95a4.5 4.5 0 0 1-6.14-1.646zM2.34 7.896a4.485 4.485 0 0 1 2.366-1.973V11.6a.766.766 0 0 0 .388.676l5.815 3.355-2.02 1.168a.076.076 0 0 1-.071 0l-4.83-2.786A4.504 4.504 0 0 1 2.34 7.872zm16.597 3.855l-5.833-3.387L15.119 7.2a.076.076 0 0 1 .071 0l4.83 2.791a4.494 4.494 0 0 1-.676 8.105v-5.678a.79.79 0 0 0-.407-.667zm2.01-3.023l-.141-.085-4.774-2.782a.776.776 0 0 0-.785 0L9.409 9.23V6.897a.066.066 0 0 1 .028-.061l4.83-2.787a4.5 4.5 0 0 1 6.68 4.66zm-12.64 4.135l-2.02-1.164a.08.08 0 0 1-.038-.057V6.075a4.5 4.5 0 0 1 7.375-3.453l-.142.08L8.704 5.46a.795.795 0 0 0-.393.681zm1.097-2.365l2.602-1.5 2.607 1.5v2.999l-2.597 1.5-2.607-1.5z"/></svg>')}\`,openai:\`data:image/svg+xml,\${encodeURIComponent('<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M22.282 9.821a5.985 5.985 0 0 0-.516-4.91 6.046 6.046 0 0 0-6.51-2.9A6.065 6.065 0 0 0 4.981 4.18a5.985 5.985 0 0 0-3.998 2.9 6.046 6.046 0 0 0 .743 7.097 5.98 5.98 0 0 0 .51 4.911 6.051 6.051 0 0 0 6.515 2.9A5.985 5.985 0 0 0 13.26 24a6.056 6.056 0 0 0 5.772-4.206 5.99 5.99 0 0 0 3.997-2.9 6.056 6.056 0 0 0-.747-7.073z"/></svg>')}\`,"codex-cli":\`data:image/svg+xml,\${encodeURIComponent('<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M22.282 9.821a5.985 5.985 0 0 0-.516-4.91 6.046 6.046 0 0 0-6.51-2.9A6.065 6.065 0 0 0 4.981 4.18a5.985 5.985 0 0 0-3.998 2.9 6.046 6.046 0 0 0 .743 7.097 5.98 5.98 0 0 0 .51 4.911 6.051 6.051 0 0 0 6.515 2.9A5.985 5.985 0 0 0 13.26 24a6.056 6.056 0 0 0 5.772-4.206 5.99 5.99 0 0 0 3.997-2.9 6.056 6.056 0 0 0-.747-7.073z"/></svg>')}\`,cursor:jc('<path fill="currentColor" d="M11.503.131 1.891 5.678a.84.84 0 0 0-.42.726v11.188c0 .3.162.575.42.724l9.609 5.55a1 1 0 0 0 .998 0l9.61-5.55a.84.84 0 0 0 .42-.724V6.404a.84.84 0 0 0-.42-.726L12.497.131a1.01 1.01 0 0 0-.996 0M2.657 6.338h18.55c.263 0 .43.287.297.515L12.23 22.918c-.062.107-.229.064-.229-.06V12.335a.59.59 0 0 0-.295-.51l-9.11-5.257c-.109-.063-.064-.23.061-.23"/>'),copilot:jc('<path fill="currentColor" d="M9 23l.073-.001a2.53 2.53 0 01-2.347-1.838l-.697-2.433a2.529 2.529 0 00-2.426-1.839h-.497l-.104-.002c-4.485 0-2.935-5.278-1.75-9.225l.162-.525C2.412 3.99 3.883 1 6.25 1h8.86c1.12 0 2.106.745 2.422 1.829l.715 2.453a2.53 2.53 0 002.247 1.823l.147.005.534.001c3.557.115 3.088 3.745 2.156 7.206l-.113.413c-.154.548-.315 1.089-.47 1.607l-.163.525C21.588 20.01 20.116 23 17.75 23h-8.75zm8.22-15.89l-3.856.001a2.526 2.526 0 00-2.35 1.615L9.21 15.04a2.529 2.529 0 01-2.43 1.847l3.853.002c1.056 0 1.992-.661 2.361-1.644l1.796-6.287a2.529 2.529 0 012.43-1.848z"/>'),"github-copilot":jc('<path fill="currentColor" d="M23.922 16.997C23.061 18.492 18.063 22.02 12 22.02 5.937 22.02.939 18.492.078 16.997A.641.641 0 0 1 0 16.741v-2.869a.883.883 0 0 1 .053-.22c.372-.935 1.347-2.292 2.605-2.656.167-.429.414-1.055.644-1.517a10.098 10.098 0 0 1-.052-1.086c0-1.331.282-2.499 1.132-3.368.397-.406.89-.717 1.474-.952C7.255 2.937 9.248 1.98 11.978 1.98c2.731 0 4.767.957 6.166 2.093.584.235 1.077.546 1.474.952.85.869 1.132 2.037 1.132 3.368 0 .368-.014.733-.052 1.086.23.462.477 1.088.644 1.517 1.258.364 2.233 1.721 2.605 2.656a.841.841 0 0 1 .053.22v2.869a.641.641 0 0 1-.078.256Zm-11.75-5.992h-.344a4.359 4.359 0 0 1-.355.508c-.77.947-1.918 1.492-3.508 1.492-1.725 0-2.989-.359-3.782-1.259a2.137 2.137 0 0 1-.085-.104L4 11.746v6.585c1.435.779 4.514 2.179 8 2.179 3.486 0 6.565-1.4 8-2.179v-6.585l-.098-.104s-.033.045-.085.104c-.793.9-2.057 1.259-3.782 1.259-1.59 0-2.738-.545-3.508-1.492a4.359 4.359 0 0 1-.355-.508Zm2.328 3.25c.549 0 1 .451 1 1v2c0 .549-.451 1-1 1-.549 0-1-.451-1-1v-2c0-.549.451-1 1-1Zm-5 0c.549 0 1 .451 1 1v2c0 .549-.451 1-1 1-.549 0-1-.451-1-1v-2c0-.549.451-1 1-1Zm3.313-6.185c.136 1.057.403 1.913.878 2.497.442.544 1.134.938 2.344.938 1.573 0 2.292-.337 2.657-.751.384-.435.558-1.15.558-2.361 0-1.14-.243-1.847-.705-2.319-.477-.488-1.319-.862-2.824-1.025-1.487-.161-2.192.138-2.533.529-.269.307-.437.808-.438 1.578v.021c0 .265.021.562.063.893Zm-1.626 0c.042-.331.063-.628.063-.894v-.02c-.001-.77-.169-1.271-.438-1.578-.341-.391-1.046-.69-2.533-.529-1.505.163-2.347.537-2.824 1.025-.462.472-.705 1.179-.705 2.319 0 1.211.175 1.926.558 2.361.365.414 1.084.751 2.657.751 1.21 0 1.902-.394 2.344-.938.475-.584.742-1.44.878-2.497Z"/>'),"copilot-cli":jc('<path fill="currentColor" d="M9 23l.073-.001a2.53 2.53 0 01-2.347-1.838l-.697-2.433a2.529 2.529 0 00-2.426-1.839h-.497l-.104-.002c-4.485 0-2.935-5.278-1.75-9.225l.162-.525C2.412 3.99 3.883 1 6.25 1h8.86c1.12 0 2.106.745 2.422 1.829l.715 2.453a2.53 2.53 0 002.247 1.823l.147.005.534.001c3.557.115 3.088 3.745 2.156 7.206l-.113.413c-.154.548-.315 1.089-.47 1.607l-.163.525C21.588 20.01 20.116 23 17.75 23h-8.75zm8.22-15.89l-3.856.001a2.526 2.526 0 00-2.35 1.615L9.21 15.04a2.529 2.529 0 01-2.43 1.847l3.853.002c1.056 0 1.992-.661 2.361-1.644l1.796-6.287a2.529 2.529 0 012.43-1.848z"/>'),windsurf:jc('<path fill="currentColor" d="M23.78 5.004h-.228a2.187 2.187 0 00-2.18 2.196v4.912c0 .98-.804 1.775-1.76 1.775a1.818 1.818 0 01-1.472-.773L13.168 5.95a2.197 2.197 0 00-1.81-.95c-1.134 0-2.154.972-2.154 2.173v4.94c0 .98-.797 1.775-1.76 1.775-.57 0-1.136-.289-1.472-.773L.408 5.098C.282 4.918 0 5.007 0 5.228v4.284c0 .216.066.426.188.604l5.475 7.889c.324.466.8.812 1.351.938 1.377.316 2.645-.754 2.645-2.117V11.89c0-.98.787-1.775 1.76-1.775h.002c.586 0 1.135.288 1.472.773l4.972 7.163a2.15 2.15 0 001.81.95c1.158 0 2.151-.973 2.151-2.173v-4.939c0-.98.787-1.775 1.76-1.775h.194c.122 0 .22-.1.22-.222V5.225a.221.221 0 00-.22-.222z"/>'),trae:\`data:image/svg+xml,\${encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="28" height="21" fill="none" viewBox="0 0 28 21"><g clip-path="url(#logo_svg__a)"><path fill="#fff" d="M28.002 20.846H4v-3.998H0V.846h28.002zM4 16.848h20.002V4.845H4zm10.002-6.062-2.829 2.828-2.828-2.828 2.828-2.829zm8-.002-2.828 2.828-2.829-2.828 2.829-2.829z"></path></g><defs><clipPath id="logo_svg__a"><path fill="#fff" d="M0 .846h28.002v20H0z"></path></clipPath></defs></svg>')}\`,gemini:jc('<path fill="currentColor" d="M12 0C12 6.627 6.627 12 0 12c6.627 0 12 5.373 12 12 0-6.627 5.373-12 12-12-6.627 0-12-5.373-12-12Z"/>'),"gemini-cli":jc('<path fill="currentColor" d="M12 0C12 6.627 6.627 12 0 12c6.627 0 12 5.373 12 12 0-6.627 5.373-12 12-12-6.627 0-12-5.373-12-12Z"/>'),vscode:jc('<path fill="currentColor" d="M23.15 2.587L18.21.21a1.49 1.49 0 0 0-1.705.29l-9.46 8.63-4.12-3.128a1 1 0 0 0-1.276.057L.327 7.261A1 1 0 0 0 .326 8.74L3.899 12 .326 15.26a1 1 0 0 0 .001 1.479L1.65 17.94a1 1 0 0 0 1.276.057l4.12-3.128 9.46 8.63a1.49 1.49 0 0 0 1.704.29l4.942-2.377A1.5 1.5 0 0 0 24 20.06V3.939a1.5 1.5 0 0 0-.85-1.352m-5.146 14.861L10.826 12l7.178-5.448z"/>'),"vscode-insiders":jc('<path fill="currentColor" d="M23.15 2.587L18.21.21a1.49 1.49 0 0 0-1.705.29l-9.46 8.63-4.12-3.128a1 1 0 0 0-1.276.057L.327 7.261A1 1 0 0 0 .326 8.74L3.899 12 .326 15.26a1 1 0 0 0 .001 1.479L1.65 17.94a1 1 0 0 0 1.276.057l4.12-3.128 9.46 8.63a1.49 1.49 0 0 0 1.704.29l4.942-2.377A1.5 1.5 0 0 0 24 20.06V3.939a1.5 1.5 0 0 0-.85-1.352m-5.146 14.861L10.826 12l7.178-5.448z"/>'),zed:jc('<path fill="currentColor" d="M2.25 1.5a.75.75 0 0 0-.75.75v16.5H0V2.25A2.25 2.25 0 0 1 2.25 0h20.095c1.002 0 1.504 1.212.795 1.92L10.764 14.298h3.486V12.75h1.5v1.922a1.125 1.125 0 0 1-1.125 1.125H9.264l-2.578 2.578h11.689V9h1.5v9.375a1.5 1.5 0 0 1-1.5 1.5H5.185L2.562 22.5H21.75a.75.75 0 0 0 .75-.75V5.25H24v16.5A2.25 2.25 0 0 1 21.75 24H1.655C.653 24 .151 22.788.86 22.08L13.19 9.75H9.75v1.5h-1.5V9.375A1.125 1.125 0 0 1 9.375 8.25h5.314l2.625-2.625H5.625V15h-1.5V5.625a1.5 1.5 0 0 1 1.5-1.5h13.19L21.438 1.5z"/>'),cline:jc('<path fill="currentColor" d="M17.035 3.991c2.75 0 4.98 2.24 4.98 5.003v1.667l1.45 2.896a1.01 1.01 0 01-.002.909l-1.448 2.864v1.668c0 2.762-2.23 5.002-4.98 5.002H7.074c-2.751 0-4.98-2.24-4.98-5.002V17.33l-1.48-2.855a1.01 1.01 0 01-.003-.927l1.482-2.887V8.994c0-2.763 2.23-5.003 4.98-5.003h9.962zM8.265 9.6a2.274 2.274 0 00-2.274 2.274v4.042a2.274 2.274 0 004.547 0v-4.042A2.274 2.274 0 008.265 9.6zm7.326 0a2.274 2.274 0 00-2.274 2.274v4.042a2.274 2.274 0 104.548 0v-4.042A2.274 2.274 0 0015.59 9.6z"/><path fill="currentColor" d="M12.054 5.558a2.779 2.779 0 100-5.558 2.779 2.779 0 000 5.558z"/>'),jetbrains:jc('<path fill="currentColor" d="M2.345 23.997A2.347 2.347 0 0 1 0 21.652V10.988C0 9.665.535 8.37 1.473 7.433l5.965-5.961A5.01 5.01 0 0 1 10.989 0h10.666A2.347 2.347 0 0 1 24 2.345v10.664a5.056 5.056 0 0 1-1.473 3.554l-5.965 5.965A5.017 5.017 0 0 1 13.007 24v-.003H2.345Zm8.969-6.854H5.486v1.371h5.828v-1.371ZM3.963 6.514h13.523v13.519l4.257-4.257a3.936 3.936 0 0 0 1.146-2.767V2.345c0-.678-.552-1.234-1.234-1.234H10.989a3.897 3.897 0 0 0-2.767 1.145L3.963 6.514Zm-.192.192L2.256 8.22a3.944 3.944 0 0 0-1.145 2.768v10.664c0 .678.552 1.234 1.234 1.234h10.666a3.9 3.9 0 0 0 2.767-1.146l1.512-1.511H3.771V6.706Z"/>'),junie:jc('<path fill="currentColor" d="M2.345 23.997A2.347 2.347 0 0 1 0 21.652V10.988C0 9.665.535 8.37 1.473 7.433l5.965-5.961A5.01 5.01 0 0 1 10.989 0h10.666A2.347 2.347 0 0 1 24 2.345v10.664a5.056 5.056 0 0 1-1.473 3.554l-5.965 5.965A5.017 5.017 0 0 1 13.007 24v-.003H2.345Zm8.969-6.854H5.486v1.371h5.828v-1.371ZM3.963 6.514h13.523v13.519l4.257-4.257a3.936 3.936 0 0 0 1.146-2.767V2.345c0-.678-.552-1.234-1.234-1.234H10.989a3.897 3.897 0 0 0-2.767 1.145L3.963 6.514Zm-.192.192L2.256 8.22a3.944 3.944 0 0 0-1.145 2.768v10.664c0 .678.552 1.234 1.234 1.234h10.666a3.9 3.9 0 0 0 2.767-1.146l1.512-1.511H3.771V6.706Z"/>'),cody:jc('<path fill="currentColor" d="M17.897 3.84a2.38 2.38 0 1 1 3.09 3.623l-3.525 3.006-2.59-.919-.967-.342-1.625-.576 1.312-1.12.78-.665 3.525-3.007zm-8.27 13.313l.78-.665 1.312-1.12-1.624-.575-.967-.344-2.59-.918-3.525 3.007a2.38 2.38 0 1 0 3.09 3.622l3.525-3.007zM8.724 7.37l2.592.92 2.09-1.784-.84-4.556a2.38 2.38 0 1 0-4.683.865l.841 4.555zm6.554 9.262l-2.592-.92-2.091 1.784.842 4.557a2.38 2.38 0 0 0 4.682-.866l-.841-4.555zm8.186-.564a2.38 2.38 0 0 0-1.449-3.04l-4.365-1.55-.967-.342-1.625-.576-.966-.343-2.59-.92-.967-.342-1.624-.576-.967-.343-4.366-1.55a2.38 2.38 0 1 0-1.591 4.488l4.366 1.55.966.342 1.625.576.965.343 2.591.92.967.342 1.624.577.966.342 4.367 1.55a2.38 2.38 0 0 0 3.04-1.447"/>'),goose:jc('<path fill="currentColor" d="M21.595 23.61c1.167-.254 2.405-.944 2.405-.944l-2.167-1.784a12.124 12.124 0 01-2.695-3.131 12.127 12.127 0 00-3.97-4.049l-.794-.462a1.115 1.115 0 01-.488-.815.844.844 0 01.154-.575c.413-.582 2.548-3.115 2.94-3.44.503-.416 1.065-.762 1.586-1.159.074-.056.148-.112.221-.17.003-.002.007-.004.009-.007.167-.131.325-.272.45-.438.453-.524.563-.988.59-1.193-.061-.197-.244-.639-.753-1.148.319.02.705.272 1.056.569.235-.376.481-.773.727-1.171.165-.266-.08-.465-.086-.471h-.001V3.22c-.007-.007-.206-.25-.471-.086-.567.35-1.134.702-1.639 1.021 0 0-.597-.012-1.305.599a2.464 2.464 0 00-.438.45l-.007.009c-.058.072-.114.147-.17.221-.397.521-.743 1.083-1.16 1.587-.323.391-2.857 2.526-3.44 2.94a.842.842 0 01-.574.153 1.115 1.115 0 01-.815-.488l-.462-.794a12.123 12.123 0 00-4.049-3.97 12.133 12.133 0 01-3.13-2.695L1.332 0S.643 1.238.39 2.405c.352.428 1.27 1.49 2.34 2.302C1.58 4.167.73 3.75.06 3.4c-.103.765-.063 1.92.043 2.816.726.317 1.961.806 3.219 1.066-1.006.236-2.11.278-2.961.262.15.554.358 1.119.64 1.688.119.263.25.52.39.77.452.125 2.222.383 3.164.171l-2.51.897a27.776 27.776 0 002.544 2.726c2.031-1.092 2.494-1.241 4.018-2.238-2.467 2.008-3.108 2.828-3.8 3.67l-.483.678c-.25.351-.469.725-.65 1.117-.61 1.31-1.47 4.1-1.47 4.1-.154.486.202.842.674.674 0 0 2.79-.861 4.1-1.47.392-.182.766-.4 1.118-.65l.677-.483c.227-.187.453-.37.701-.586 0 0 1.705 2.02 3.458 3.349l.896-2.511c-.211.942.046 2.712.17 3.163.252.142.509.272.772.392.569.28 1.134.49 1.688.64-.016-.853.026-1.956.261-2.962.26 1.258.75 2.493 1.067 3.219.895.106 2.051.146 2.816.043a73.87 73.87 0 01-1.308-2.67c.811 1.07 1.874 1.988 2.302 2.34h-.001z"/>'),"amazon-q":jc('<path fill="currentColor" d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10c1.82 0 3.53-.48 5.01-1.32L19.59 23 21 21.59l-2.32-2.42A9.94 9.94 0 0022 12c0-5.52-4.48-10-10-10zm0 3c3.87 0 7 3.13 7 7s-3.13 7-7 7-7-3.13-7-7 3.13-7 7-7z"/>'),"amazon-q-cli":jc('<path fill="currentColor" d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10c1.82 0 3.53-.48 5.01-1.32L19.59 23 21 21.59l-2.32-2.42A9.94 9.94 0 0022 12c0-5.52-4.48-10-10-10zm0 3c3.87 0 7 3.13 7 7s-3.13 7-7 7-7-3.13-7-7 3.13-7 7-7z"/>'),"amazon-q-ide":jc('<path fill="currentColor" d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10c1.82 0 3.53-.48 5.01-1.32L19.59 23 21 21.59l-2.32-2.42A9.94 9.94 0 0022 12c0-5.52-4.48-10-10-10zm0 3c3.87 0 7 3.13 7 7s-3.13 7-7 7-7-3.13-7-7 3.13-7 7-7z"/>'),aider:jc('<path fill="currentColor" d="M2 4a2 2 0 012-2h16a2 2 0 012 2v16a2 2 0 01-2 2H4a2 2 0 01-2-2V4zm5.3 4.3a1 1 0 011.4 0l3 3a1 1 0 010 1.4l-3 3a1 1 0 01-1.4-1.4L9.6 12 7.3 9.7a1 1 0 010-1.4zM13 15a1 1 0 100 2h4a1 1 0 100-2h-4z"/>'),continue:jc('<path fill="currentColor" d="M3 4l9 8-9 8V4zm10 0l9 8-9 8V4z"/>'),tabby:jc('<path fill="currentColor" d="M4 8l4-6h2L7 8h10l-3-6h2l4 6v10a4 4 0 01-4 4H8a4 4 0 01-4-4V8zm4 4a1.5 1.5 0 100 3 1.5 1.5 0 000-3zm8 0a1.5 1.5 0 100 3 1.5 1.5 0 000-3z"/>'),roo:jc('<path fill="currentColor" d="M12 2C8.13 2 5 5.13 5 9c0 2.38 1.19 4.47 3 5.74V17h2v5h4v-5h2v-2.26c1.81-1.27 3-3.36 3-5.74 0-3.87-3.13-7-7-7zm-2 7.5a1 1 0 11-2 0 1 1 0 012 0zm6 0a1 1 0 11-2 0 1 1 0 012 0z"/>'),"roo-code":jc('<path fill="currentColor" d="M12 2C8.13 2 5 5.13 5 9c0 2.38 1.19 4.47 3 5.74V17h2v5h4v-5h2v-2.26c1.81-1.27 3-3.36 3-5.74 0-3.87-3.13-7-7-7zm-2 7.5a1 1 0 11-2 0 1 1 0 012 0zm6 0a1 1 0 11-2 0 1 1 0 012 0z"/>'),opencode:\`data:image/svg+xml,\${encodeURIComponent('<svg viewBox="6 4.5 12 15" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" clip-rule="evenodd" fill-rule="evenodd" d="M18 19.5H6V4.5H18V19.5ZM15 7.5H9V16.5H15V7.5Z"/></svg>')}\`,"kilo-code":\`data:image/svg+xml,\${encodeURIComponent('<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M0,0v100h100V0H0ZM92.5925926,92.5925926H7.4074074V7.4074074h85.1851852v85.1851852ZM61.1111044,71.9096084h9.2592593v7.4074074h-11.6402116l-5.026455-5.026455v-11.6402116h7.4074074v9.2592593ZM77.7777711,71.9096084h-7.4074074v-9.2592593h-9.2592593v-7.4074074h11.6402116l5.026455,5.026455v11.6402116ZM46.2962963,61.1114207h-7.4074074v-7.4074074h7.4074074v7.4074074ZM22.2222222,53.7040133h7.4074074v16.6666667h16.6666667v7.4074074h-19.047619l-5.026455-5.026455v-19.047619ZM77.7777711,38.8888889v7.4074074h-24.0740741v-7.4074074h8.2781918v-9.2592593h-8.2781918v-7.4074074h10.6591442l5.026455,5.026455v11.6402116h8.3884749ZM29.6296296,30.5555556h9.2592593l7.4074074,7.4074074v8.3333333h-7.4074074v-8.3333333h-9.2592593v8.3333333h-7.4074074v-24.0740741h7.4074074v8.3333333ZM46.2962963,30.5555556h-7.4074074v-8.3333333h7.4074074v8.3333333Z"/></svg>')}\`,crush:jc('<path fill="currentColor" d="M12 1.6l8.1 4.7v9.4L12 20.4 3.9 15.7V6.3L12 1.6zm0 3.1l-5.4 3.1v6.3l5.4 3.1 5.4-3.1V7.8L12 4.7zm-2.1 4.1h4.2v6.4H9.9V8.8z"/>'),antigravity:jc('<path fill="currentColor" d="m19.94,20.59c1.09.82,2.73.27,1.23-1.23-4.5-4.36-3.55-16.36-9.14-16.36S7.39,15,2.89,19.36c-1.64,1.64.14,2.05,1.23,1.23,4.23-2.86,3.95-7.91,7.91-7.91s3.68,5.05,7.91,7.91Z"/>'),augment:jc('<path fill="currentColor" d="M12 0l2.5 9.5L24 12l-9.5 2.5L12 24l-2.5-9.5L0 12l9.5-2.5z"/>'),amp:jc('<path fill="currentColor" d="M13 2L4 14h7l-2 8 9-12h-7l2-8z"/>'),mcp:jc('<path fill="currentColor" d="M14 2a2 2 0 012 2v2h2a2 2 0 012 2v2h-4V8h-4v2H8v4h2v4H8v-2H6a2 2 0 01-2-2v-2H0v-2h4V8a2 2 0 012-2h2V4a2 2 0 012-2h4z"/>')},Cc={feature:"#4ade80",bugfix:"#f87171",refactor:"#a78bfa",test:"#38bdf8",docs:"#fbbf24",setup:"#6b655c",deployment:"#f97316",other:"#9c9588"},Tc=Object.keys(wc);
|
|
34405
|
+
*/const xl=h.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a="",children:s,iconNode:i,...o},l)=>h.createElement("svg",{ref:l,...gl,width:t,height:t,stroke:e,strokeWidth:r?24*Number(n)/Number(t):n,className:ml("lucide",a),...o},[...i.map(([e,t])=>h.createElement(e,t)),...Array.isArray(s)?s:[s]])),yl=(e,t)=>{const n=h.forwardRef(({className:n,...r},a)=>{return h.createElement(xl,{ref:a,iconNode:t,className:ml(\`lucide-\${s=e,s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}\`,n),...r});var s});return n.displayName=\`\${e}\`,n},vl=yl("Brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]]),bl=yl("Bug",[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]]),wl=yl("Calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]]),kl=yl("Camera",[["path",{d:"M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z",key:"1tc9qg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]),Sl=yl("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]),jl=yl("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),Nl=yl("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),Cl=yl("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]),Tl=yl("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),El=yl("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]),Ml=yl("CircleArrowUp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m16 12-4-4-4 4",key:"177agl"}],["path",{d:"M12 16V8",key:"1sbj14"}]]),Pl=yl("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]),Ll=yl("CloudDownload",[["path",{d:"M12 13v8l-4-4",key:"1f5nwf"}],["path",{d:"m12 21 4-4",key:"1lfcce"}],["path",{d:"M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284",key:"ui1hmy"}]]),Dl=yl("CloudUpload",[["path",{d:"M12 13v8",key:"1l5pq0"}],["path",{d:"M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242",key:"1pljnt"}],["path",{d:"m8 17 4-4 4 4",key:"1quai1"}]]),Al=yl("Cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]]),_l=yl("Compass",[["path",{d:"m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z",key:"9ktpf1"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]),zl=yl("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]),Rl=yl("Cpu",[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]]),Fl=yl("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]),Vl=yl("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]),Il=yl("EyeOff",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]),Ol=yl("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),$l=yl("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]),Bl=yl("Filter",[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]]),Hl=yl("Flag",[["path",{d:"M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z",key:"i9b6wo"}],["line",{x1:"4",x2:"4",y1:"22",y2:"15",key:"1cm3nv"}]]),Ul=yl("FolderKanban",[["path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 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",key:"1fr9dc"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M12 10v2",key:"hh53o1"}],["path",{d:"M16 10v6",key:"1d6xys"}]]),Wl=yl("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]),ql=yl("HardDrive",[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["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",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]]),Yl=yl("Image",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]),Kl=yl("Layers",[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]]),Xl=yl("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]),Ql=yl("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]),Zl=yl("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]),Gl=yl("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]),Jl=yl("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]),ec=yl("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]),tc=yl("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]),nc=yl("Pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]),rc=yl("Pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]),ac=yl("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]),sc=yl("Rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]),ic=yl("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]),oc=yl("Save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]),lc=yl("ScrollText",[["path",{d:"M15 12h-5",key:"r7krc0"}],["path",{d:"M15 8h-5",key:"1khuty"}],["path",{d:"M19 17V5a2 2 0 0 0-2-2H4",key:"zz82l3"}],["path",{d:"M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3",key:"1ph1d7"}]]),cc=yl("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),uc=yl("Settings",[["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",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]),dc=yl("Shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]]),hc=yl("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]),fc=yl("Target",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]]),pc=yl("Timer",[["line",{x1:"10",x2:"14",y1:"2",y2:"2",key:"14vaq8"}],["line",{x1:"12",x2:"15",y1:"14",y2:"11",key:"17fdiu"}],["circle",{cx:"12",cy:"14",r:"8",key:"1e1u0o"}]]),mc=yl("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),gc=yl("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),xc=yl("Trophy",[["path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6",key:"17hqa7"}],["path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18",key:"lmptdp"}],["path",{d:"M4 22h16",key:"57wxv0"}],["path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22",key:"1nw9bq"}],["path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22",key:"1np0yb"}],["path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z",key:"u46fv3"}]]),yc=yl("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]),vc=yl("Wrench",[["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",key:"cbrjhi"}]]),bc=yl("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),wc=yl("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),kc={"claude-code":"#d4a04a","claude-desktop":"#d4a04a","claude-cli":"#d4a04a",anthropic:"#d4a04a",codex:"#10a37f","codex-cli":"#10a37f",openai:"#10a37f",cursor:"#00b4d8",copilot:"#6e40c9","github-copilot":"#6e40c9","copilot-cli":"#6e40c9",windsurf:"#38bdf8",trae:"#06b6d4",vscode:"#007ACC","vscode-insiders":"#24bfa5",aider:"#4ade80","kilo-code":"#14b8a6",crush:"#ef4444",continue:"#f97316",cody:"#ff6b6b",tabby:"#a78bfa",roo:"#f472b6","roo-code":"#f472b6",gemini:"#4285f4","gemini-cli":"#4285f4",zed:"#084CCF",cline:"#EAB308","amazon-q":"#01A88D","amazon-q-cli":"#01A88D","amazon-q-ide":"#01A88D",goose:"#FF6F00",jetbrains:"#6B57D2",junie:"#7B68EE",opencode:"#71717A",antigravity:"#E91E63",augment:"#e879f9",amp:"#f87171",mcp:"#91919a"},Sc={"claude-code":"Claude Code","claude-desktop":"Claude Desktop","claude-cli":"Claude CLI",anthropic:"Anthropic",codex:"Codex","codex-cli":"Codex CLI",openai:"OpenAI",cursor:"Cursor",copilot:"GitHub Copilot","github-copilot":"GitHub Copilot","copilot-cli":"Copilot CLI",windsurf:"Windsurf",trae:"Trae",vscode:"VS Code","vscode-insiders":"VS Code Insiders",aider:"Aider","kilo-code":"Kilo Code",crush:"Crush",continue:"Continue",cody:"Sourcegraph Cody",tabby:"TabbyML",roo:"Roo Code","roo-code":"Roo Code",mcp:"MCP Client",gemini:"Gemini","gemini-cli":"Gemini CLI",zed:"Zed",cline:"Cline","amazon-q":"Amazon Q","amazon-q-cli":"Amazon Q CLI","amazon-q-ide":"Amazon Q IDE",goose:"Goose",jetbrains:"JetBrains",junie:"Junie",opencode:"OpenCode",antigravity:"Antigravity",augment:"Augment",amp:"Amp"},jc={"claude-code":"CC","claude-desktop":"CD","claude-cli":"CL",anthropic:"An",codex:"OX","codex-cli":"OX",openai:"OA",cursor:"Cu",copilot:"CP","github-copilot":"CP","copilot-cli":"CP",windsurf:"WS",trae:"Tr",vscode:"VS","vscode-insiders":"VI",aider:"Ai","kilo-code":"Ki",crush:"Cr",continue:"Co",cody:"Cy",tabby:"Tb",roo:"Ro","roo-code":"Ro",mcp:"MC",gemini:"Ge","gemini-cli":"Ge",zed:"Ze",cline:"Cl","amazon-q":"AQ","amazon-q-cli":"AQ","amazon-q-ide":"AQ",goose:"Go",jetbrains:"JB",junie:"Ju",opencode:"OC",antigravity:"AG",augment:"Au",amp:"Am"},Nc=e=>\`data:image/svg+xml,\${encodeURIComponent(\`<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">\${e}</svg>\`)}\`,Cc={"claude-code":\`data:image/svg+xml,\${encodeURIComponent('<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z"></path></svg>')}\`,"claude-desktop":\`data:image/svg+xml,\${encodeURIComponent('<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z"></path></svg>')}\`,"claude-cli":\`data:image/svg+xml,\${encodeURIComponent('<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z"></path></svg>')}\`,anthropic:\`data:image/svg+xml,\${encodeURIComponent('<svg fill="currentColor" fill-rule="evenodd" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M4.709 15.955l4.72-2.647.08-.23-.08-.128H9.2l-.79-.048-2.698-.073-2.339-.097-2.266-.122-.571-.121L0 11.784l.055-.352.48-.321.686.06 1.52.103 2.278.158 1.652.097 2.449.255h.389l.055-.157-.134-.098-.103-.097-2.358-1.596-2.552-1.688-1.336-.972-.724-.491-.364-.462-.158-1.008.656-.722.881.06.225.061.893.686 1.908 1.476 2.491 1.833.365.304.145-.103.019-.073-.164-.274-1.355-2.446-1.446-2.49-.644-1.032-.17-.619a2.97 2.97 0 01-.104-.729L6.283.134 6.696 0l.996.134.42.364.62 1.414 1.002 2.229 1.555 3.03.456.898.243.832.091.255h.158V9.01l.128-1.706.237-2.095.23-2.695.08-.76.376-.91.747-.492.584.28.48.685-.067.444-.286 1.851-.559 2.903-.364 1.942h.212l.243-.242.985-1.306 1.652-2.064.73-.82.85-.904.547-.431h1.033l.76 1.129-.34 1.166-1.064 1.347-.881 1.142-1.264 1.7-.79 1.36.073.11.188-.02 2.856-.606 1.543-.28 1.841-.315.833.388.091.395-.328.807-1.969.486-2.309.462-3.439.813-.042.03.049.061 1.549.146.662.036h1.622l3.02.225.79.522.474.638-.079.485-1.215.62-1.64-.389-3.829-.91-1.312-.329h-.182v.11l1.093 1.068 2.006 1.81 2.509 2.33.127.578-.322.455-.34-.049-2.205-1.657-.851-.747-1.926-1.62h-.128v.17l.444.649 2.345 3.521.122 1.08-.17.353-.608.213-.668-.122-1.374-1.925-1.415-2.167-1.143-1.943-.14.08-.674 7.254-.316.37-.729.28-.607-.461-.322-.747.322-1.476.389-1.924.315-1.53.286-1.9.17-.632-.012-.042-.14.018-1.434 1.967-2.18 2.945-1.726 1.845-.414.164-.717-.37.067-.662.401-.589 2.388-3.036 1.44-1.882.93-1.086-.006-.158h-.055L4.132 18.56l-1.13.146-.487-.456.061-.746.231-.243 1.908-1.312-.006.006z"></path></svg>')}\`,codex:\`data:image/svg+xml,\${encodeURIComponent('<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M22.282 9.821a5.985 5.985 0 0 0-.516-4.91 6.046 6.046 0 0 0-6.51-2.9A6.065 6.065 0 0 0 4.981 4.18a5.985 5.985 0 0 0-3.998 2.9 6.046 6.046 0 0 0 .743 7.097 5.98 5.98 0 0 0 .51 4.911 6.051 6.051 0 0 0 6.515 2.9A5.985 5.985 0 0 0 13.26 24a6.056 6.056 0 0 0 5.772-4.206 5.99 5.99 0 0 0 3.997-2.9 6.056 6.056 0 0 0-.747-7.073zM13.26 22.43a4.476 4.476 0 0 1-2.876-1.04l.141-.081 4.779-2.758a.795.795 0 0 0 .392-.681v-6.737l2.02 1.168a.071.071 0 0 1 .038.052v5.583a4.504 4.504 0 0 1-4.494 4.494zM3.6 18.304a4.47 4.47 0 0 1-.535-3.014l.142.085 4.783 2.759a.771.771 0 0 0 .78 0l5.843-3.369v2.332a.08.08 0 0 1-.033.062L9.74 19.95a4.5 4.5 0 0 1-6.14-1.646zM2.34 7.896a4.485 4.485 0 0 1 2.366-1.973V11.6a.766.766 0 0 0 .388.676l5.815 3.355-2.02 1.168a.076.076 0 0 1-.071 0l-4.83-2.786A4.504 4.504 0 0 1 2.34 7.872zm16.597 3.855l-5.833-3.387L15.119 7.2a.076.076 0 0 1 .071 0l4.83 2.791a4.494 4.494 0 0 1-.676 8.105v-5.678a.79.79 0 0 0-.407-.667zm2.01-3.023l-.141-.085-4.774-2.782a.776.776 0 0 0-.785 0L9.409 9.23V6.897a.066.066 0 0 1 .028-.061l4.83-2.787a4.5 4.5 0 0 1 6.68 4.66zm-12.64 4.135l-2.02-1.164a.08.08 0 0 1-.038-.057V6.075a4.5 4.5 0 0 1 7.375-3.453l-.142.08L8.704 5.46a.795.795 0 0 0-.393.681zm1.097-2.365l2.602-1.5 2.607 1.5v2.999l-2.597 1.5-2.607-1.5z"/></svg>')}\`,openai:\`data:image/svg+xml,\${encodeURIComponent('<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M22.282 9.821a5.985 5.985 0 0 0-.516-4.91 6.046 6.046 0 0 0-6.51-2.9A6.065 6.065 0 0 0 4.981 4.18a5.985 5.985 0 0 0-3.998 2.9 6.046 6.046 0 0 0 .743 7.097 5.98 5.98 0 0 0 .51 4.911 6.051 6.051 0 0 0 6.515 2.9A5.985 5.985 0 0 0 13.26 24a6.056 6.056 0 0 0 5.772-4.206 5.99 5.99 0 0 0 3.997-2.9 6.056 6.056 0 0 0-.747-7.073z"/></svg>')}\`,"codex-cli":\`data:image/svg+xml,\${encodeURIComponent('<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M22.282 9.821a5.985 5.985 0 0 0-.516-4.91 6.046 6.046 0 0 0-6.51-2.9A6.065 6.065 0 0 0 4.981 4.18a5.985 5.985 0 0 0-3.998 2.9 6.046 6.046 0 0 0 .743 7.097 5.98 5.98 0 0 0 .51 4.911 6.051 6.051 0 0 0 6.515 2.9A5.985 5.985 0 0 0 13.26 24a6.056 6.056 0 0 0 5.772-4.206 5.99 5.99 0 0 0 3.997-2.9 6.056 6.056 0 0 0-.747-7.073z"/></svg>')}\`,cursor:Nc('<path fill="currentColor" d="M11.503.131 1.891 5.678a.84.84 0 0 0-.42.726v11.188c0 .3.162.575.42.724l9.609 5.55a1 1 0 0 0 .998 0l9.61-5.55a.84.84 0 0 0 .42-.724V6.404a.84.84 0 0 0-.42-.726L12.497.131a1.01 1.01 0 0 0-.996 0M2.657 6.338h18.55c.263 0 .43.287.297.515L12.23 22.918c-.062.107-.229.064-.229-.06V12.335a.59.59 0 0 0-.295-.51l-9.11-5.257c-.109-.063-.064-.23.061-.23"/>'),copilot:Nc('<path fill="currentColor" d="M9 23l.073-.001a2.53 2.53 0 01-2.347-1.838l-.697-2.433a2.529 2.529 0 00-2.426-1.839h-.497l-.104-.002c-4.485 0-2.935-5.278-1.75-9.225l.162-.525C2.412 3.99 3.883 1 6.25 1h8.86c1.12 0 2.106.745 2.422 1.829l.715 2.453a2.53 2.53 0 002.247 1.823l.147.005.534.001c3.557.115 3.088 3.745 2.156 7.206l-.113.413c-.154.548-.315 1.089-.47 1.607l-.163.525C21.588 20.01 20.116 23 17.75 23h-8.75zm8.22-15.89l-3.856.001a2.526 2.526 0 00-2.35 1.615L9.21 15.04a2.529 2.529 0 01-2.43 1.847l3.853.002c1.056 0 1.992-.661 2.361-1.644l1.796-6.287a2.529 2.529 0 012.43-1.848z"/>'),"github-copilot":Nc('<path fill="currentColor" d="M23.922 16.997C23.061 18.492 18.063 22.02 12 22.02 5.937 22.02.939 18.492.078 16.997A.641.641 0 0 1 0 16.741v-2.869a.883.883 0 0 1 .053-.22c.372-.935 1.347-2.292 2.605-2.656.167-.429.414-1.055.644-1.517a10.098 10.098 0 0 1-.052-1.086c0-1.331.282-2.499 1.132-3.368.397-.406.89-.717 1.474-.952C7.255 2.937 9.248 1.98 11.978 1.98c2.731 0 4.767.957 6.166 2.093.584.235 1.077.546 1.474.952.85.869 1.132 2.037 1.132 3.368 0 .368-.014.733-.052 1.086.23.462.477 1.088.644 1.517 1.258.364 2.233 1.721 2.605 2.656a.841.841 0 0 1 .053.22v2.869a.641.641 0 0 1-.078.256Zm-11.75-5.992h-.344a4.359 4.359 0 0 1-.355.508c-.77.947-1.918 1.492-3.508 1.492-1.725 0-2.989-.359-3.782-1.259a2.137 2.137 0 0 1-.085-.104L4 11.746v6.585c1.435.779 4.514 2.179 8 2.179 3.486 0 6.565-1.4 8-2.179v-6.585l-.098-.104s-.033.045-.085.104c-.793.9-2.057 1.259-3.782 1.259-1.59 0-2.738-.545-3.508-1.492a4.359 4.359 0 0 1-.355-.508Zm2.328 3.25c.549 0 1 .451 1 1v2c0 .549-.451 1-1 1-.549 0-1-.451-1-1v-2c0-.549.451-1 1-1Zm-5 0c.549 0 1 .451 1 1v2c0 .549-.451 1-1 1-.549 0-1-.451-1-1v-2c0-.549.451-1 1-1Zm3.313-6.185c.136 1.057.403 1.913.878 2.497.442.544 1.134.938 2.344.938 1.573 0 2.292-.337 2.657-.751.384-.435.558-1.15.558-2.361 0-1.14-.243-1.847-.705-2.319-.477-.488-1.319-.862-2.824-1.025-1.487-.161-2.192.138-2.533.529-.269.307-.437.808-.438 1.578v.021c0 .265.021.562.063.893Zm-1.626 0c.042-.331.063-.628.063-.894v-.02c-.001-.77-.169-1.271-.438-1.578-.341-.391-1.046-.69-2.533-.529-1.505.163-2.347.537-2.824 1.025-.462.472-.705 1.179-.705 2.319 0 1.211.175 1.926.558 2.361.365.414 1.084.751 2.657.751 1.21 0 1.902-.394 2.344-.938.475-.584.742-1.44.878-2.497Z"/>'),"copilot-cli":Nc('<path fill="currentColor" d="M9 23l.073-.001a2.53 2.53 0 01-2.347-1.838l-.697-2.433a2.529 2.529 0 00-2.426-1.839h-.497l-.104-.002c-4.485 0-2.935-5.278-1.75-9.225l.162-.525C2.412 3.99 3.883 1 6.25 1h8.86c1.12 0 2.106.745 2.422 1.829l.715 2.453a2.53 2.53 0 002.247 1.823l.147.005.534.001c3.557.115 3.088 3.745 2.156 7.206l-.113.413c-.154.548-.315 1.089-.47 1.607l-.163.525C21.588 20.01 20.116 23 17.75 23h-8.75zm8.22-15.89l-3.856.001a2.526 2.526 0 00-2.35 1.615L9.21 15.04a2.529 2.529 0 01-2.43 1.847l3.853.002c1.056 0 1.992-.661 2.361-1.644l1.796-6.287a2.529 2.529 0 012.43-1.848z"/>'),windsurf:Nc('<path fill="currentColor" d="M23.78 5.004h-.228a2.187 2.187 0 00-2.18 2.196v4.912c0 .98-.804 1.775-1.76 1.775a1.818 1.818 0 01-1.472-.773L13.168 5.95a2.197 2.197 0 00-1.81-.95c-1.134 0-2.154.972-2.154 2.173v4.94c0 .98-.797 1.775-1.76 1.775-.57 0-1.136-.289-1.472-.773L.408 5.098C.282 4.918 0 5.007 0 5.228v4.284c0 .216.066.426.188.604l5.475 7.889c.324.466.8.812 1.351.938 1.377.316 2.645-.754 2.645-2.117V11.89c0-.98.787-1.775 1.76-1.775h.002c.586 0 1.135.288 1.472.773l4.972 7.163a2.15 2.15 0 001.81.95c1.158 0 2.151-.973 2.151-2.173v-4.939c0-.98.787-1.775 1.76-1.775h.194c.122 0 .22-.1.22-.222V5.225a.221.221 0 00-.22-.222z"/>'),trae:\`data:image/svg+xml,\${encodeURIComponent('<svg xmlns="http://www.w3.org/2000/svg" width="28" height="21" fill="none" viewBox="0 0 28 21"><g clip-path="url(#logo_svg__a)"><path fill="#fff" d="M28.002 20.846H4v-3.998H0V.846h28.002zM4 16.848h20.002V4.845H4zm10.002-6.062-2.829 2.828-2.828-2.828 2.828-2.829zm8-.002-2.828 2.828-2.829-2.828 2.829-2.829z"></path></g><defs><clipPath id="logo_svg__a"><path fill="#fff" d="M0 .846h28.002v20H0z"></path></clipPath></defs></svg>')}\`,gemini:Nc('<path fill="currentColor" d="M12 0C12 6.627 6.627 12 0 12c6.627 0 12 5.373 12 12 0-6.627 5.373-12 12-12-6.627 0-12-5.373-12-12Z"/>'),"gemini-cli":Nc('<path fill="currentColor" d="M12 0C12 6.627 6.627 12 0 12c6.627 0 12 5.373 12 12 0-6.627 5.373-12 12-12-6.627 0-12-5.373-12-12Z"/>'),vscode:Nc('<path fill="currentColor" d="M23.15 2.587L18.21.21a1.49 1.49 0 0 0-1.705.29l-9.46 8.63-4.12-3.128a1 1 0 0 0-1.276.057L.327 7.261A1 1 0 0 0 .326 8.74L3.899 12 .326 15.26a1 1 0 0 0 .001 1.479L1.65 17.94a1 1 0 0 0 1.276.057l4.12-3.128 9.46 8.63a1.49 1.49 0 0 0 1.704.29l4.942-2.377A1.5 1.5 0 0 0 24 20.06V3.939a1.5 1.5 0 0 0-.85-1.352m-5.146 14.861L10.826 12l7.178-5.448z"/>'),"vscode-insiders":Nc('<path fill="currentColor" d="M23.15 2.587L18.21.21a1.49 1.49 0 0 0-1.705.29l-9.46 8.63-4.12-3.128a1 1 0 0 0-1.276.057L.327 7.261A1 1 0 0 0 .326 8.74L3.899 12 .326 15.26a1 1 0 0 0 .001 1.479L1.65 17.94a1 1 0 0 0 1.276.057l4.12-3.128 9.46 8.63a1.49 1.49 0 0 0 1.704.29l4.942-2.377A1.5 1.5 0 0 0 24 20.06V3.939a1.5 1.5 0 0 0-.85-1.352m-5.146 14.861L10.826 12l7.178-5.448z"/>'),zed:Nc('<path fill="currentColor" d="M2.25 1.5a.75.75 0 0 0-.75.75v16.5H0V2.25A2.25 2.25 0 0 1 2.25 0h20.095c1.002 0 1.504 1.212.795 1.92L10.764 14.298h3.486V12.75h1.5v1.922a1.125 1.125 0 0 1-1.125 1.125H9.264l-2.578 2.578h11.689V9h1.5v9.375a1.5 1.5 0 0 1-1.5 1.5H5.185L2.562 22.5H21.75a.75.75 0 0 0 .75-.75V5.25H24v16.5A2.25 2.25 0 0 1 21.75 24H1.655C.653 24 .151 22.788.86 22.08L13.19 9.75H9.75v1.5h-1.5V9.375A1.125 1.125 0 0 1 9.375 8.25h5.314l2.625-2.625H5.625V15h-1.5V5.625a1.5 1.5 0 0 1 1.5-1.5h13.19L21.438 1.5z"/>'),cline:Nc('<path fill="currentColor" d="M17.035 3.991c2.75 0 4.98 2.24 4.98 5.003v1.667l1.45 2.896a1.01 1.01 0 01-.002.909l-1.448 2.864v1.668c0 2.762-2.23 5.002-4.98 5.002H7.074c-2.751 0-4.98-2.24-4.98-5.002V17.33l-1.48-2.855a1.01 1.01 0 01-.003-.927l1.482-2.887V8.994c0-2.763 2.23-5.003 4.98-5.003h9.962zM8.265 9.6a2.274 2.274 0 00-2.274 2.274v4.042a2.274 2.274 0 004.547 0v-4.042A2.274 2.274 0 008.265 9.6zm7.326 0a2.274 2.274 0 00-2.274 2.274v4.042a2.274 2.274 0 104.548 0v-4.042A2.274 2.274 0 0015.59 9.6z"/><path fill="currentColor" d="M12.054 5.558a2.779 2.779 0 100-5.558 2.779 2.779 0 000 5.558z"/>'),jetbrains:Nc('<path fill="currentColor" d="M2.345 23.997A2.347 2.347 0 0 1 0 21.652V10.988C0 9.665.535 8.37 1.473 7.433l5.965-5.961A5.01 5.01 0 0 1 10.989 0h10.666A2.347 2.347 0 0 1 24 2.345v10.664a5.056 5.056 0 0 1-1.473 3.554l-5.965 5.965A5.017 5.017 0 0 1 13.007 24v-.003H2.345Zm8.969-6.854H5.486v1.371h5.828v-1.371ZM3.963 6.514h13.523v13.519l4.257-4.257a3.936 3.936 0 0 0 1.146-2.767V2.345c0-.678-.552-1.234-1.234-1.234H10.989a3.897 3.897 0 0 0-2.767 1.145L3.963 6.514Zm-.192.192L2.256 8.22a3.944 3.944 0 0 0-1.145 2.768v10.664c0 .678.552 1.234 1.234 1.234h10.666a3.9 3.9 0 0 0 2.767-1.146l1.512-1.511H3.771V6.706Z"/>'),junie:Nc('<path fill="currentColor" d="M2.345 23.997A2.347 2.347 0 0 1 0 21.652V10.988C0 9.665.535 8.37 1.473 7.433l5.965-5.961A5.01 5.01 0 0 1 10.989 0h10.666A2.347 2.347 0 0 1 24 2.345v10.664a5.056 5.056 0 0 1-1.473 3.554l-5.965 5.965A5.017 5.017 0 0 1 13.007 24v-.003H2.345Zm8.969-6.854H5.486v1.371h5.828v-1.371ZM3.963 6.514h13.523v13.519l4.257-4.257a3.936 3.936 0 0 0 1.146-2.767V2.345c0-.678-.552-1.234-1.234-1.234H10.989a3.897 3.897 0 0 0-2.767 1.145L3.963 6.514Zm-.192.192L2.256 8.22a3.944 3.944 0 0 0-1.145 2.768v10.664c0 .678.552 1.234 1.234 1.234h10.666a3.9 3.9 0 0 0 2.767-1.146l1.512-1.511H3.771V6.706Z"/>'),cody:Nc('<path fill="currentColor" d="M17.897 3.84a2.38 2.38 0 1 1 3.09 3.623l-3.525 3.006-2.59-.919-.967-.342-1.625-.576 1.312-1.12.78-.665 3.525-3.007zm-8.27 13.313l.78-.665 1.312-1.12-1.624-.575-.967-.344-2.59-.918-3.525 3.007a2.38 2.38 0 1 0 3.09 3.622l3.525-3.007zM8.724 7.37l2.592.92 2.09-1.784-.84-4.556a2.38 2.38 0 1 0-4.683.865l.841 4.555zm6.554 9.262l-2.592-.92-2.091 1.784.842 4.557a2.38 2.38 0 0 0 4.682-.866l-.841-4.555zm8.186-.564a2.38 2.38 0 0 0-1.449-3.04l-4.365-1.55-.967-.342-1.625-.576-.966-.343-2.59-.92-.967-.342-1.624-.576-.967-.343-4.366-1.55a2.38 2.38 0 1 0-1.591 4.488l4.366 1.55.966.342 1.625.576.965.343 2.591.92.967.342 1.624.577.966.342 4.367 1.55a2.38 2.38 0 0 0 3.04-1.447"/>'),goose:Nc('<path fill="currentColor" d="M21.595 23.61c1.167-.254 2.405-.944 2.405-.944l-2.167-1.784a12.124 12.124 0 01-2.695-3.131 12.127 12.127 0 00-3.97-4.049l-.794-.462a1.115 1.115 0 01-.488-.815.844.844 0 01.154-.575c.413-.582 2.548-3.115 2.94-3.44.503-.416 1.065-.762 1.586-1.159.074-.056.148-.112.221-.17.003-.002.007-.004.009-.007.167-.131.325-.272.45-.438.453-.524.563-.988.59-1.193-.061-.197-.244-.639-.753-1.148.319.02.705.272 1.056.569.235-.376.481-.773.727-1.171.165-.266-.08-.465-.086-.471h-.001V3.22c-.007-.007-.206-.25-.471-.086-.567.35-1.134.702-1.639 1.021 0 0-.597-.012-1.305.599a2.464 2.464 0 00-.438.45l-.007.009c-.058.072-.114.147-.17.221-.397.521-.743 1.083-1.16 1.587-.323.391-2.857 2.526-3.44 2.94a.842.842 0 01-.574.153 1.115 1.115 0 01-.815-.488l-.462-.794a12.123 12.123 0 00-4.049-3.97 12.133 12.133 0 01-3.13-2.695L1.332 0S.643 1.238.39 2.405c.352.428 1.27 1.49 2.34 2.302C1.58 4.167.73 3.75.06 3.4c-.103.765-.063 1.92.043 2.816.726.317 1.961.806 3.219 1.066-1.006.236-2.11.278-2.961.262.15.554.358 1.119.64 1.688.119.263.25.52.39.77.452.125 2.222.383 3.164.171l-2.51.897a27.776 27.776 0 002.544 2.726c2.031-1.092 2.494-1.241 4.018-2.238-2.467 2.008-3.108 2.828-3.8 3.67l-.483.678c-.25.351-.469.725-.65 1.117-.61 1.31-1.47 4.1-1.47 4.1-.154.486.202.842.674.674 0 0 2.79-.861 4.1-1.47.392-.182.766-.4 1.118-.65l.677-.483c.227-.187.453-.37.701-.586 0 0 1.705 2.02 3.458 3.349l.896-2.511c-.211.942.046 2.712.17 3.163.252.142.509.272.772.392.569.28 1.134.49 1.688.64-.016-.853.026-1.956.261-2.962.26 1.258.75 2.493 1.067 3.219.895.106 2.051.146 2.816.043a73.87 73.87 0 01-1.308-2.67c.811 1.07 1.874 1.988 2.302 2.34h-.001z"/>'),"amazon-q":Nc('<path fill="currentColor" d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10c1.82 0 3.53-.48 5.01-1.32L19.59 23 21 21.59l-2.32-2.42A9.94 9.94 0 0022 12c0-5.52-4.48-10-10-10zm0 3c3.87 0 7 3.13 7 7s-3.13 7-7 7-7-3.13-7-7 3.13-7 7-7z"/>'),"amazon-q-cli":Nc('<path fill="currentColor" d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10c1.82 0 3.53-.48 5.01-1.32L19.59 23 21 21.59l-2.32-2.42A9.94 9.94 0 0022 12c0-5.52-4.48-10-10-10zm0 3c3.87 0 7 3.13 7 7s-3.13 7-7 7-7-3.13-7-7 3.13-7 7-7z"/>'),"amazon-q-ide":Nc('<path fill="currentColor" d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10c1.82 0 3.53-.48 5.01-1.32L19.59 23 21 21.59l-2.32-2.42A9.94 9.94 0 0022 12c0-5.52-4.48-10-10-10zm0 3c3.87 0 7 3.13 7 7s-3.13 7-7 7-7-3.13-7-7 3.13-7 7-7z"/>'),aider:Nc('<path fill="currentColor" d="M2 4a2 2 0 012-2h16a2 2 0 012 2v16a2 2 0 01-2 2H4a2 2 0 01-2-2V4zm5.3 4.3a1 1 0 011.4 0l3 3a1 1 0 010 1.4l-3 3a1 1 0 01-1.4-1.4L9.6 12 7.3 9.7a1 1 0 010-1.4zM13 15a1 1 0 100 2h4a1 1 0 100-2h-4z"/>'),continue:Nc('<path fill="currentColor" d="M3 4l9 8-9 8V4zm10 0l9 8-9 8V4z"/>'),tabby:Nc('<path fill="currentColor" d="M4 8l4-6h2L7 8h10l-3-6h2l4 6v10a4 4 0 01-4 4H8a4 4 0 01-4-4V8zm4 4a1.5 1.5 0 100 3 1.5 1.5 0 000-3zm8 0a1.5 1.5 0 100 3 1.5 1.5 0 000-3z"/>'),roo:Nc('<path fill="currentColor" d="M12 2C8.13 2 5 5.13 5 9c0 2.38 1.19 4.47 3 5.74V17h2v5h4v-5h2v-2.26c1.81-1.27 3-3.36 3-5.74 0-3.87-3.13-7-7-7zm-2 7.5a1 1 0 11-2 0 1 1 0 012 0zm6 0a1 1 0 11-2 0 1 1 0 012 0z"/>'),"roo-code":Nc('<path fill="currentColor" d="M12 2C8.13 2 5 5.13 5 9c0 2.38 1.19 4.47 3 5.74V17h2v5h4v-5h2v-2.26c1.81-1.27 3-3.36 3-5.74 0-3.87-3.13-7-7-7zm-2 7.5a1 1 0 11-2 0 1 1 0 012 0zm6 0a1 1 0 11-2 0 1 1 0 012 0z"/>'),opencode:\`data:image/svg+xml,\${encodeURIComponent('<svg viewBox="6 4.5 12 15" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" clip-rule="evenodd" fill-rule="evenodd" d="M18 19.5H6V4.5H18V19.5ZM15 7.5H9V16.5H15V7.5Z"/></svg>')}\`,"kilo-code":\`data:image/svg+xml,\${encodeURIComponent('<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M0,0v100h100V0H0ZM92.5925926,92.5925926H7.4074074V7.4074074h85.1851852v85.1851852ZM61.1111044,71.9096084h9.2592593v7.4074074h-11.6402116l-5.026455-5.026455v-11.6402116h7.4074074v9.2592593ZM77.7777711,71.9096084h-7.4074074v-9.2592593h-9.2592593v-7.4074074h11.6402116l5.026455,5.026455v11.6402116ZM46.2962963,61.1114207h-7.4074074v-7.4074074h7.4074074v7.4074074ZM22.2222222,53.7040133h7.4074074v16.6666667h16.6666667v7.4074074h-19.047619l-5.026455-5.026455v-19.047619ZM77.7777711,38.8888889v7.4074074h-24.0740741v-7.4074074h8.2781918v-9.2592593h-8.2781918v-7.4074074h10.6591442l5.026455,5.026455v11.6402116h8.3884749ZM29.6296296,30.5555556h9.2592593l7.4074074,7.4074074v8.3333333h-7.4074074v-8.3333333h-9.2592593v8.3333333h-7.4074074v-24.0740741h7.4074074v8.3333333ZM46.2962963,30.5555556h-7.4074074v-8.3333333h7.4074074v8.3333333Z"/></svg>')}\`,crush:Nc('<path fill="currentColor" d="M12 1.6l8.1 4.7v9.4L12 20.4 3.9 15.7V6.3L12 1.6zm0 3.1l-5.4 3.1v6.3l5.4 3.1 5.4-3.1V7.8L12 4.7zm-2.1 4.1h4.2v6.4H9.9V8.8z"/>'),antigravity:Nc('<path fill="currentColor" d="m19.94,20.59c1.09.82,2.73.27,1.23-1.23-4.5-4.36-3.55-16.36-9.14-16.36S7.39,15,2.89,19.36c-1.64,1.64.14,2.05,1.23,1.23,4.23-2.86,3.95-7.91,7.91-7.91s3.68,5.05,7.91,7.91Z"/>'),augment:Nc('<path fill="currentColor" d="M12 0l2.5 9.5L24 12l-9.5 2.5L12 24l-2.5-9.5L0 12l9.5-2.5z"/>'),amp:Nc('<path fill="currentColor" d="M13 2L4 14h7l-2 8 9-12h-7l2-8z"/>'),mcp:Nc('<path fill="currentColor" d="M14 2a2 2 0 012 2v2h2a2 2 0 012 2v2h-4V8h-4v2H8v4h2v4H8v-2H6a2 2 0 01-2-2v-2H0v-2h4V8a2 2 0 012-2h2V4a2 2 0 012-2h4z"/>')},Tc={feature:"#4ade80",bugfix:"#f87171",refactor:"#a78bfa",test:"#38bdf8",docs:"#fbbf24",setup:"#6b655c",deployment:"#f97316",other:"#9c9588"},Ec=Object.keys(kc);
|
|
34404
34406
|
/**
|
|
34405
34407
|
* @license lucide-react v0.468.0 - ISC
|
|
34406
34408
|
*
|
|
34407
34409
|
* This source code is licensed under the ISC license.
|
|
34408
34410
|
* See the LICENSE file in the root directory of this source tree.
|
|
34409
|
-
*/function Ec(e){if(wc[e])return e;return Tc.filter(t=>e.startsWith(t)).sort((e,t)=>t.length-e.length)[0]??e}var Mc=E(),Pc=new Map;function Lc(e){let t=Pc.get(e);return void 0===t&&(t=new Date(e).getTime(),Pc.set(e,t)),t}function Dc(e){if(0===e.length)return 0;const t=new Set;for(const i of e)i.started_at&&t.add(i.started_at.slice(0,10));const n=[...t].sort().reverse();if(0===n.length)return 0;const r=(new Date).toISOString().slice(0,10),a=new Date(Date.now()-864e5).toISOString().slice(0,10);if(n[0]!==r&&n[0]!==a)return 0;let s=1;for(let i=1;i<n.length;i++){const e=new Date(n[i-1]),t=new Date(n[i]);if(1!==(e.getTime()-t.getTime())/864e5)break;s++}return s}function Ac(e){const t=e.filter(e=>e.session.evaluation);if(0===t.length)return null;let n=0,r=0,a=0,s=0,i=0,o=0;const l={};for(const u of t){const e=u.session.evaluation;n+=e.prompt_quality,r+=e.context_provided,a+=e.independence_level,s+=e.scope_quality,i+=e.tools_leveraged,o+=e.iteration_count,l[e.task_outcome]=(l[e.task_outcome]??0)+1}const c=t.length;return{prompt_quality:Math.round(n/c*10)/10,context_provided:Math.round(r/c*10)/10,independence_level:Math.round(a/c*10)/10,scope_quality:Math.round(s/c*10)/10,tools_leveraged:Math.round(i/c),total_iterations:o,outcomes:l,session_count:c}}function _c({sessions:e,timeScale:t,effectiveTime:n,isLive:r,onDayClick:a,highlightDate:s}){const i="day"===t||"24h"===t||"12h"===t||"6h"===t,l=new Date(n).toISOString().slice(0,10),c=h.useMemo(()=>i?function(e,t){const n=new Date(\`\${t}T00:00:00\`).getTime(),r=n+864e5,a=[];for(let s=0;s<24;s++)a.push({hour:s,minutes:0});for(const s of e){const e=Lc(s.started_at),t=Lc(s.ended_at),i=1e3*(s.duration_seconds??0),o=i>0&&t-e>i+6e5?e+i:t;if(o<n||e>r)continue;const l=Math.max(e,n),c=Math.min(o,r);for(let r=0;r<24;r++){const e=n+36e5*r,t=e+36e5,s=Math.max(l,e),i=Math.min(c,t);i>s&&(a[r].minutes+=(i-s)/6e4)}}return a}(e,l):[],[e,l,i]),u=h.useMemo(()=>i?[]:function(e,t){const n=new Date,r=[];for(let a=t-1;a>=0;a--){const t=new Date(n);t.setDate(t.getDate()-a);const s=t.toISOString().slice(0,10);let i=0;for(const n of e){const e=n.started_at?.slice(0,10);e&&e===s&&(i+=n.duration_seconds)}r.push({date:s,hours:i/3600})}return r}(e,7),[e,i]),d=i?\`Hourly \u2014 \${new Date(n).toLocaleDateString([],{month:"short",day:"numeric"})}\`:"Last 7 Days";if(i){const e=Math.max(...c.map(e=>e.minutes),1);return o.jsxs("div",{className:"mb-8 p-5 rounded-2xl bg-bg-surface-1/50 border border-border/50",children:[o.jsxs("div",{className:"flex items-center justify-between mb-4 px-1",children:[o.jsx("div",{className:"text-xs text-text-muted uppercase tracking-widest font-bold",children:d}),o.jsxs("div",{className:"text-[10px] text-text-muted font-mono bg-bg-surface-2 px-2 py-0.5 rounded",children:[e.toFixed(0),"m peak"]})]}),o.jsx("div",{className:"flex items-end gap-[3px] h-16",children:c.map((t,n)=>{const r=e>0?t.minutes/e*100:0;return o.jsxs("div",{className:"flex-1 flex flex-col items-center justify-end h-full group relative",children:[o.jsx("div",{className:"absolute -top-10 left-1/2 -translate-x-1/2 opacity-0 group-hover:opacity-100 transition-opacity z-20 pointer-events-none",children:o.jsxs("div",{className:"bg-bg-surface-3 text-text-primary text-[10px] font-mono px-2 py-1.5 rounded-lg shadow-xl whitespace-nowrap border border-border flex flex-col items-center",children:[o.jsxs("span",{className:"font-bold",children:[t.hour,":00"]}),o.jsxs("span",{className:"text-accent",children:[t.minutes.toFixed(0),"m active"]}),o.jsx("div",{className:"absolute -bottom-1 left-1/2 -translate-x-1/2 w-2 h-2 bg-bg-surface-3 border-r border-b border-border rotate-45"})]})}),o.jsx(pl.div,{initial:{height:0},animate:{height:\`\${Math.max(r,t.minutes>0?8:0)}%\`},transition:{delay:.01*n,duration:.5},className:"w-full rounded-t-sm transition-all duration-300 group-hover:bg-accent relative overflow-hidden",style:{minHeight:t.minutes>0?"4px":"0px",backgroundColor:t.minutes>0?\`rgba(var(--accent-rgb), \${.4+t.minutes/e*.6})\`:"var(--color-bg-surface-2)"},children:t.minutes>.5*e&&o.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-transparent to-white/10"})})]},t.hour)})}),o.jsx("div",{className:"flex gap-[3px] mt-2 border-t border-border/30 pt-2",children:c.map(e=>o.jsx("div",{className:"flex-1 text-center",children:e.hour%6==0&&o.jsx("span",{className:"text-[9px] text-text-muted font-bold font-mono uppercase",children:0===e.hour?"12a":e.hour<12?\`\${e.hour}a\`:12===e.hour?"12p":e.hour-12+"p"})},e.hour))})]})}const f=Math.max(...u.map(e=>e.hours),.1);return o.jsxs("div",{className:"mb-8 p-5 rounded-2xl bg-bg-surface-1/50 border border-border/50",children:[o.jsxs("div",{className:"flex items-center justify-between mb-4 px-1",children:[o.jsx("div",{className:"text-xs text-text-muted uppercase tracking-widest font-bold",children:d}),o.jsx("div",{className:"text-[10px] text-text-muted font-mono bg-bg-surface-2 px-2 py-0.5 rounded",children:"Last 7 days"})]}),o.jsx("div",{className:"flex items-end gap-2 h-16",children:u.map((e,t)=>{const n=f>0?e.hours/f*100:0,r=e.date===s;return o.jsxs("div",{className:"flex-1 flex flex-col items-center justify-end h-full group relative",children:[o.jsx("div",{className:"absolute -top-10 left-1/2 -translate-x-1/2 opacity-0 group-hover:opacity-100 transition-opacity z-20 pointer-events-none",children:o.jsxs("div",{className:"bg-bg-surface-3 text-text-primary text-[10px] font-mono px-2 py-1.5 rounded-lg shadow-xl whitespace-nowrap border border-border flex flex-col items-center",children:[o.jsx("span",{className:"font-bold",children:e.date}),o.jsxs("span",{className:"text-accent",children:[e.hours.toFixed(1),"h active"]}),o.jsx("div",{className:"absolute -bottom-1 left-1/2 -translate-x-1/2 w-2 h-2 bg-bg-surface-3 border-r border-b border-border rotate-45"})]})}),o.jsx(pl.div,{initial:{height:0},animate:{height:\`\${Math.max(n,e.hours>0?8:0)}%\`},transition:{delay:.05*t,duration:.5},className:"w-full rounded-t-md cursor-pointer transition-all duration-300 group-hover:scale-x-110 origin-bottom "+(r?"ring-2 ring-accent ring-offset-2 ring-offset-bg-base":""),style:{minHeight:e.hours>0?"4px":"0px",backgroundColor:r?"var(--color-accent-bright)":e.hours>0?\`rgba(var(--accent-rgb), \${.4+e.hours/f*.6})\`:"var(--color-bg-surface-2)"},onClick:()=>a?.(e.date)})]},e.date)})}),o.jsx("div",{className:"flex gap-2 mt-2 border-t border-border/30 pt-2",children:u.map(e=>o.jsx("div",{className:"flex-1 text-center",children:o.jsx("span",{className:"text-[10px] text-text-muted font-bold uppercase tracking-tighter",children:new Date(e.date+"T12:00:00").toLocaleDateString([],{weekday:"short"})})},e.date))})]})}var zc=[{key:"simple",label:"Simple",color:"#34d399"},{key:"medium",label:"Medium",color:"#fbbf24"},{key:"complex",label:"Complex",color:"#f87171"}];function Rc({data:e}){const t=e.simple+e.medium+e.complex;if(0===t)return null;const n=Math.max(e.simple,e.medium,e.complex);return o.jsxs(pl.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.15},className:"rounded-xl bg-bg-surface-1 border border-border/50 p-4",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[o.jsx("div",{className:"p-1.5 rounded-lg bg-bg-surface-2",children:o.jsx(Yl,{className:"w-3.5 h-3.5 text-text-muted"})}),o.jsx("h2",{className:"text-sm font-bold text-text-muted uppercase tracking-widest",children:"Complexity"})]}),o.jsx("div",{className:"space-y-3",children:zc.map((r,a)=>{const s=e[r.key],i=n>0?s/n*100:0,l=t>0?(s/t*100).toFixed(0):"0";return o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("span",{className:"text-xs text-text-secondary font-medium w-16 text-right shrink-0",children:r.label}),o.jsx("div",{className:"flex-1 h-5 rounded bg-bg-surface-2/50 overflow-hidden",children:o.jsx(pl.div,{className:"h-full rounded",style:{backgroundColor:r.color},initial:{width:0},animate:{width:\`\${i}%\`},transition:{duration:.6,delay:.08*a,ease:[.22,1,.36,1]}})}),o.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[o.jsx("span",{className:"text-xs text-text-primary font-mono font-bold w-6 text-right",children:s}),o.jsxs("span",{className:"text-[10px] text-text-muted/70 font-mono w-8 text-right",children:[l,"%"]})]})]},r.key)})}),o.jsx("div",{className:"mt-4 flex h-2 rounded-full overflow-hidden bg-bg-surface-2/30",children:zc.map(n=>{const r=e[n.key],a=t>0?r/t*100:0;return 0===a?null:o.jsx(pl.div,{className:"h-full",style:{backgroundColor:n.color},initial:{width:0},animate:{width:\`\${a}%\`},transition:{duration:.8,ease:[.22,1,.36,1]}},n.key)})})]})}var Fc=["1h","3h","6h","12h"],Vc=["day","week","month"],Ic=["1h","3h","6h","12h","24h","day","7d","week","30d","month"],Oc={day:"24h",week:"7d",month:"30d"},$c={"24h":"day","7d":"week","30d":"month"};function Bc(e){return"day"===e||"week"===e||"month"===e}var Hc={"1h":36e5,"3h":108e5,"6h":216e5,"12h":432e5,"24h":864e5,"7d":6048e5,"30d":2592e6},Uc={"1h":"1 Hour","3h":"3 Hours","6h":"6 Hours","12h":"12 Hours","24h":"24 Hours",day:"Day","7d":"7 Days",week:"Week","30d":"30 Days",month:"Month"};function Wc(e,t){const n=Hc[e];if(void 0!==n)return{start:t-n,end:t};const r=new Date(t);if("day"===e){const e=new Date(r.getFullYear(),r.getMonth(),r.getDate()).getTime();return{start:e,end:e+864e5}}if("week"===e){const e=r.getDay(),t=0===e?-6:1-e,n=new Date(r.getFullYear(),r.getMonth(),r.getDate()+t).getTime();return{start:n,end:n+6048e5}}return{start:new Date(r.getFullYear(),r.getMonth(),1).getTime(),end:new Date(r.getFullYear(),r.getMonth()+1,1).getTime()}}function qc(e,t,n){const r=Hc[e];if(void 0!==r)return t+n*r;const a=new Date(t);return"day"===e?new Date(a.getFullYear(),a.getMonth(),a.getDate()+n,12).getTime():"week"===e?new Date(a.getFullYear(),a.getMonth(),a.getDate()+7*n,12).getTime():new Date(a.getFullYear(),a.getMonth()+n,Math.min(a.getDate(),28),12).getTime()}function Yc(e,t){return Bc(e)?function(e,t){if(!Bc(e))return!1;const n=Wc(e,t),r=Date.now();return r>=n.start&&r<n.end}(e,t):t>=Date.now()-6e4}function Kc({label:e,value:t,suffix:n,decimals:r=0,icon:a,delay:s=0,variant:i="default",clickable:l=!1,selected:c=!1,onClick:u,subtitle:d}){const f=h.useRef(null),p=h.useRef(0);h.useEffect(()=>{f.current&&t!==p.current&&(!function(e,t,n){let r=null;requestAnimationFrame(function a(s){r||(r=s);const i=Math.min((s-r)/800,1),o=1-Math.pow(1-i,4),l=t*o;e.textContent=n>0?l.toFixed(n):String(Math.round(l)),i<1&&requestAnimationFrame(a)})}(f.current,t,r),p.current=t)},[t,r]);const m="accent"===i;return o.jsxs(pl.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:{delay:s},onClick:l&&t>0?u:void 0,className:\`px-3 py-2 rounded-lg border flex items-center gap-2.5 group transition-all duration-300 \${m?"shrink-0 bg-bg-surface-1 border-border/50 hover:border-accent/30":"flex-1 min-w-[120px] bg-bg-surface-1 border-border/50 hover:border-accent/30"} \${l&&t>0?"cursor-pointer":""} \${c?"border-accent/50 bg-accent/5":""}\`,children:[o.jsx("div",{className:"p-1.5 rounded-md transition-colors "+(c?"bg-accent/15":"bg-bg-surface-2 group-hover:bg-accent/10"),children:o.jsx(a,{className:"w-3.5 h-3.5 transition-colors "+(c?"text-accent":"text-text-muted group-hover:text-accent")})}),o.jsxs("div",{className:"flex flex-col min-w-0",children:[o.jsxs("div",{className:"flex items-baseline gap-0.5",children:[o.jsx("span",{ref:f,className:"text-lg font-bold text-text-primary tracking-tight leading-none",children:r>0?t.toFixed(r):Math.round(t)}),n&&o.jsx("span",{className:"text-[10px] text-text-muted font-medium",children:n})]}),o.jsx("span",{className:"text-[9px] font-mono text-text-muted uppercase tracking-wider leading-none mt-0.5",children:e}),d&&o.jsx("span",{className:"text-[8px] text-text-muted/50 leading-none mt-0.5 truncate",children:d})]})]})}function Xc({totalHours:e,coveredHours:t,aiMultiplier:n,featuresShipped:r,bugsFixed:a,complexSolved:s,currentStreak:i,totalMilestones:l,selectedCard:c,onCardClick:u}){const d=e=>{u?.(c===e?null:e)};return o.jsxs("div",{className:"flex gap-2 mb-4",children:[o.jsxs("div",{className:"grid grid-cols-3 lg:grid-cols-7 gap-2 flex-1",children:[o.jsx(Kc,{label:"User Time",value:t<1/60?0:t<1?Math.round(60*t):t,suffix:t<1?"min":"hrs",decimals:t>=1?1:0,icon:Pl,delay:.1,clickable:!0,selected:"activeTime"===c,onClick:()=>d("activeTime")}),o.jsx(Kc,{label:"AI Time",value:e<1?Math.round(60*e):e,suffix:e<1?"min":"hrs",decimals:e<1?0:1,icon:fc,delay:.12,clickable:!0,selected:"aiTime"===c,onClick:()=>d("aiTime")}),o.jsx(Kc,{label:"Multiplier",value:n,suffix:"x",decimals:1,icon:Yl,delay:.15,clickable:!0,selected:"parallel"===c,onClick:()=>d("parallel")}),o.jsx(Kc,{label:"Milestones",value:l,icon:hc,delay:.2,clickable:!0,selected:"milestones"===c,onClick:()=>d("milestones")}),o.jsx(Kc,{label:"Features",value:r,icon:ac,delay:.25,clickable:!0,selected:"features"===c,onClick:()=>d("features")}),o.jsx(Kc,{label:"Bugs Fixed",value:a,icon:bl,delay:.3,clickable:!0,selected:"bugs"===c,onClick:()=>d("bugs")}),o.jsx(Kc,{label:"Complex",value:s,icon:vl,delay:.35,clickable:!0,selected:"complex"===c,onClick:()=>d("complex")})]}),o.jsx("div",{className:"w-px bg-border/30 self-stretch my-1"}),o.jsx(Kc,{label:"Streak",value:i,suffix:"days",icon:bc,delay:.45,variant:"accent",clickable:!0,selected:"streak"===c,onClick:()=>d("streak")})]})}var Qc={milestones:{title:"All Milestones",icon:hc,filter:()=>!0,emptyText:"No milestones in this time window.",accentColor:"#60a5fa"},features:{title:"Features Shipped",icon:ac,filter:e=>"feature"===e.category,emptyText:"No features shipped in this time window.",accentColor:"#4ade80"},bugs:{title:"Bugs Fixed",icon:bl,filter:e=>"bugfix"===e.category,emptyText:"No bugs fixed in this time window.",accentColor:"#f87171"},complex:{title:"Complex Tasks",icon:vl,filter:e=>"complex"===e.complexity,emptyText:"No complex tasks in this time window.",accentColor:"#a78bfa"}},Zc={feature:"bg-success/10 text-success border-success/20",bugfix:"bg-error/10 text-error border-error/20",refactor:"bg-purple/10 text-purple border-purple/20",test:"bg-blue/10 text-blue border-blue/20",docs:"bg-accent/10 text-accent border-accent/20",setup:"bg-text-muted/10 text-text-muted border-text-muted/20",deployment:"bg-emerald/10 text-emerald border-emerald/20"};function Gc(e){const t=new Date(e),n=(new Date).getTime()-t.getTime(),r=Math.floor(n/6e4);if(r<1)return"just now";if(r<60)return\`\${r}m ago\`;const a=Math.floor(r/60);if(a<24)return\`\${a}h ago\`;const s=Math.floor(a/24);return 1===s?"yesterday":s<7?\`\${s}d ago\`:t.toLocaleDateString([],{month:"short",day:"numeric"})}function Jc({type:e,milestones:t,showPublic:n=!1,onClose:r}){h.useEffect(()=>{if(e)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[e]);const[a,s]=h.useState(25),i=h.useRef(null);h.useEffect(()=>{const e=i.current;if(!e)return;const t=new IntersectionObserver(([e])=>{e?.isIntersecting&&s(e=>e+25)},{rootMargin:"200px"});return t.observe(e),()=>t.disconnect()},[e,a]),h.useEffect(()=>{s(25)},[e]);if(!e||!("features"===e||"bugs"===e||"complex"===e||"milestones"===e))return null;const l=Qc[e],c=l.icon,u=t.filter(l.filter).sort((e,t)=>new Date(t.created_at).getTime()-new Date(e.created_at).getTime()),d=u.slice(0,a),f=a<u.length,p=new Map;for(const o of d){const e=new Date(o.created_at).toLocaleDateString([],{weekday:"short",month:"short",day:"numeric"}),t=p.get(e);t?t.push(o):p.set(e,[o])}return o.jsx(Qi,{children:e&&o.jsxs(o.Fragment,{children:[o.jsx(pl.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"fixed inset-0 bg-black/40 backdrop-blur-sm z-40",onClick:r}),o.jsxs(pl.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:30,stiffness:300},className:"fixed top-0 right-0 h-full w-full max-w-md bg-bg-base border-l border-border/50 z-50 flex flex-col shadow-2xl",children:[o.jsxs("div",{className:"flex items-center gap-3 px-5 py-4 border-b border-border/50",children:[o.jsx("div",{className:"p-2 rounded-lg",style:{backgroundColor:\`\${l.accentColor}15\`},children:o.jsx(c,{className:"w-4 h-4",style:{color:l.accentColor}})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("h2",{className:"text-sm font-bold text-text-primary",children:l.title}),o.jsxs("span",{className:"text-[10px] font-mono text-text-muted",children:[u.length," ",1===u.length?"item":"items"," in window"]})]}),o.jsx("button",{onClick:r,className:"p-1.5 rounded-md hover:bg-bg-surface-2 text-text-muted hover:text-text-primary transition-colors",children:o.jsx(vc,{className:"w-4 h-4"})})]}),o.jsx("div",{className:"flex-1 overflow-y-auto overscroll-contain px-5 py-4",children:0===u.length?o.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[o.jsx(dc,{className:"w-8 h-8 text-text-muted/30 mb-3"}),o.jsx("p",{className:"text-sm text-text-muted",children:l.emptyText})]}):o.jsxs("div",{className:"space-y-5",children:[[...p.entries()].map(([t,r])=>o.jsxs("div",{children:[o.jsx("div",{className:"text-[10px] font-mono text-text-muted uppercase tracking-wider mb-2 px-1",children:t}),o.jsx("div",{className:"space-y-1",children:r.map((t,r)=>{const a=Cc[t.category]??"#9c9588",s=Zc[t.category]??"bg-bg-surface-2 text-text-secondary border-border",i=Ec(t.client),l=Sc[i]??i.slice(0,2).toUpperCase(),c=wc[i]??"#91919a",u="cursor"===i?"var(--text-primary)":c,d=Nc[i],h=n?t.title:t.private_title||t.title,f="complex"===t.complexity;return o.jsxs(pl.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},transition:{duration:.2,delay:.03*r},className:"flex items-start gap-2.5 py-2 px-2 rounded-lg hover:bg-bg-surface-1 transition-colors group",children:[o.jsx("div",{className:"w-2 h-2 rounded-full flex-shrink-0 mt-1.5",style:{backgroundColor:a}}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("p",{className:"text-sm text-text-secondary group-hover:text-text-primary transition-colors leading-snug",children:h}),o.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[("complex"===e||"milestones"===e)&&o.jsx("span",{className:\`text-[8px] uppercase tracking-wider font-bold px-1.5 py-0.5 rounded-full border \${s}\`,children:t.category}),f&&"complex"!==e&&o.jsxs("span",{className:"flex items-center gap-0.5 text-[8px] uppercase tracking-wider font-bold px-1.5 py-0.5 rounded-full border bg-purple/10 text-purple border-purple/20",children:[o.jsx(vl,{className:"w-2 h-2"}),"complex"]}),o.jsx("span",{className:"text-[10px] text-text-muted font-mono",children:Gc(t.created_at)}),t.languages.length>0&&o.jsx("span",{className:"text-[9px] text-text-muted font-mono",children:t.languages.join(", ")}),o.jsx("div",{className:"w-4 h-4 rounded flex items-center justify-center text-[7px] font-bold font-mono flex-shrink-0 ml-auto",style:{backgroundColor:\`\${c}15\`,color:c,border:\`1px solid \${c}20\`},children:d?o.jsx("div",{className:"w-2.5 h-2.5",style:{backgroundColor:u,maskImage:\`url(\${d})\`,maskSize:"contain",maskRepeat:"no-repeat",maskPosition:"center",WebkitMaskImage:\`url(\${d})\`,WebkitMaskSize:"contain",WebkitMaskRepeat:"no-repeat",WebkitMaskPosition:"center"}}):l})]})]})]},t.id)})})]},t)),f&&o.jsx("div",{ref:i,className:"py-2 text-center",children:o.jsxs("span",{className:"text-[10px] text-text-muted font-mono",children:["Showing ",d.length," of ",u.length,"..."]})})]})})]})]})})}function eu(e){return"activeTime"===e||"aiTime"===e||"parallel"===e||"streak"===e}var tu={activeTime:{title:"User Time",icon:Pl,accentColor:"#60a5fa"},aiTime:{title:"AI Time",icon:fc,accentColor:"#4ade80"},parallel:{title:"Multiplier",icon:Yl,accentColor:"#a78bfa"},streak:{title:"Streak",icon:bc,accentColor:"#facc15"}};function nu(e){if(e<60)return\`\${Math.round(e)}s\`;if(e<3600)return\`\${Math.round(e/60)}m\`;const t=Math.floor(e/3600),n=Math.round(e%3600/60);return n>0?\`\${t}h \${n}m\`:\`\${t}h\`}function ru(e){return e<1/60?"< 1 min":e<1?\`\${Math.round(60*e)} min\`:\`\${e.toFixed(1)} hrs\`}function au(e){if(0===e.length)return[];const t=[];for(const s of e){const e=Lc(s.started_at),n=Lc(s.ended_at);n<=e||(t.push({time:e,delta:1}),t.push({time:n,delta:-1}))}t.sort((e,t)=>e.time-t.time||e.delta-t.delta);const n=[];let r=0,a=0;for(const s of t){const e=r>0;r+=s.delta,!e&&r>0?a=s.time:e&&0===r&&n.push({start:a,end:s.time})}return n}function su({children:e}){return o.jsx("div",{className:"px-3 py-2.5 rounded-lg bg-bg-surface-1 border border-border/50 text-xs text-text-secondary leading-relaxed",children:e})}function iu({label:e,value:t}){return o.jsxs("div",{className:"flex items-center justify-between py-1.5 px-1",children:[o.jsx("span",{className:"text-xs text-text-muted",children:e}),o.jsx("span",{className:"text-xs font-mono font-bold text-text-primary",children:t})]})}function ou({type:e,sessions:t,allSessions:n,currentStreak:r=0,stats:a,showPublic:s=!1,onClose:i}){if(h.useEffect(()=>{if(e&&eu(e))return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[e]),!e||!eu(e))return null;const l=tu[e],c=l.icon,u=[...t].sort((e,t)=>Lc(t.started_at)-Lc(e.started_at));return o.jsx(Qi,{children:e&&o.jsxs(o.Fragment,{children:[o.jsx(pl.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"fixed inset-0 bg-black/40 backdrop-blur-sm z-40",onClick:i}),o.jsxs(pl.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:30,stiffness:300},className:"fixed top-0 right-0 h-full w-full max-w-md bg-bg-base border-l border-border/50 z-50 flex flex-col shadow-2xl",children:[o.jsxs("div",{className:"flex items-center gap-3 px-5 py-4 border-b border-border/50",children:[o.jsx("div",{className:"p-2 rounded-lg",style:{backgroundColor:\`\${l.accentColor}15\`},children:o.jsx(c,{className:"w-4 h-4",style:{color:l.accentColor}})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("h2",{className:"text-sm font-bold text-text-primary",children:l.title}),o.jsx("span",{className:"text-[10px] font-mono text-text-muted",children:"streak"===e?\`\${r} day\${1===r?"":"s"} consecutive\`:\`\${t.length} sessions in window\`})]}),o.jsx("button",{onClick:i,className:"p-1.5 rounded-md hover:bg-bg-surface-2 text-text-muted hover:text-text-primary transition-colors",children:o.jsx(vc,{className:"w-4 h-4"})})]}),o.jsxs("div",{className:"flex-1 overflow-y-auto overscroll-contain px-5 py-4 space-y-4",children:["activeTime"===e&&o.jsx(lu,{stats:a,sessions:t}),"aiTime"===e&&o.jsx(cu,{stats:a,sessions:u,showPublic:s}),"parallel"===e&&o.jsx(uu,{stats:a,sessions:u,showPublic:s}),"streak"===e&&o.jsx(du,{allSessions:n??t,currentStreak:r})]})]})]})})}function lu({stats:e,sessions:t}){const n=au(t);return o.jsxs(o.Fragment,{children:[o.jsx(su,{children:"Real wall-clock time where at least one AI session was running. Gaps between sessions (breaks, thinking, context switches) are excluded."}),o.jsxs("div",{className:"rounded-lg border border-border/50 bg-bg-surface-1 divide-y divide-border/30",children:[o.jsx(iu,{label:"User time",value:ru(e.coveredHours)}),o.jsx(iu,{label:"AI time",value:ru(e.totalHours)}),o.jsx(iu,{label:"Active periods",value:String(n.length)}),o.jsx(iu,{label:"Sessions",value:String(t.length)})]}),n.length>0&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"text-[10px] font-mono text-text-muted uppercase tracking-wider px-1 pt-2",children:"Active Periods"}),o.jsx("div",{className:"space-y-1",children:n.map((e,t)=>{const n=(e.end-e.start)/6e4;return o.jsxs(pl.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},transition:{duration:.2,delay:.02*t},className:"flex items-center gap-3 py-2 px-2 rounded-lg hover:bg-bg-surface-1 transition-colors",children:[o.jsx("div",{className:"w-2 h-2 rounded-full bg-accent/60 flex-shrink-0"}),o.jsxs("span",{className:"text-xs font-mono text-text-secondary flex-1",children:[new Date(e.start).toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0})," \u2192 ",new Date(e.end).toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0})]}),o.jsx("span",{className:"text-xs font-mono font-bold text-text-primary",children:n<1?"< 1m":n<60?\`\${Math.round(n)}m\`:\`\${(n/60).toFixed(1)}h\`})]},t)})})]})]})}function cu({stats:e,sessions:t,showPublic:n}){return o.jsxs(o.Fragment,{children:[o.jsx(su,{children:"Total accumulated AI session duration. When multiple sessions run in parallel, their durations add up \u2014 so AI Time can exceed User Time."}),o.jsxs("div",{className:"rounded-lg border border-border/50 bg-bg-surface-1 divide-y divide-border/30",children:[o.jsx(iu,{label:"AI time",value:ru(e.totalHours)}),o.jsx(iu,{label:"User time",value:ru(e.coveredHours)}),o.jsx(iu,{label:"Multiplier",value:\`\${e.aiMultiplier.toFixed(1)}x\`}),o.jsx(iu,{label:"Sessions",value:String(t.length)})]}),o.jsx(fu,{sessions:t,showPublic:n})]})}function uu({stats:e,sessions:t,showPublic:n}){return o.jsxs(o.Fragment,{children:[o.jsx(su,{children:"Your AI multiplier \u2014 AI Time divided by User Time. Higher means more parallelization. You're running more AI sessions simultaneously."}),o.jsxs("div",{className:"rounded-lg border border-border/50 bg-bg-surface-1 divide-y divide-border/30",children:[o.jsx(iu,{label:"Multiplier",value:\`\${e.aiMultiplier.toFixed(1)}x\`}),o.jsx(iu,{label:"Peak concurrent",value:String(e.peakConcurrency)}),o.jsx(iu,{label:"Calculation",value:\`\${ru(e.totalHours)} \xF7 \${ru(e.coveredHours)}\`}),o.jsx(iu,{label:"Sessions",value:String(t.length)})]}),o.jsx(fu,{sessions:t,showPublic:n})]})}function du({allSessions:e,currentStreak:t}){const n=function(e){const t=new Map;for(const n of e){const e=new Date(Lc(n.started_at)),r=\`\${e.getFullYear()}-\${String(e.getMonth()+1).padStart(2,"0")}-\${String(e.getDate()).padStart(2,"0")}\`,a=t.get(r);a?a.push(n):t.set(r,[n])}return[...t.entries()].sort((e,t)=>t[0].localeCompare(e[0])).map(([e,t])=>{const n=new Date(e+"T12:00:00").toLocaleDateString([],{weekday:"short",month:"short",day:"numeric"}),r=t.reduce((e,t)=>e+t.duration_seconds,0),a=au(t).reduce((e,t)=>e+(t.end-t.start),0)/1e3,s=a>0?r/a:0;return{date:e,label:n,count:t.length,gainedSeconds:r,spentSeconds:a,boost:s}})}(e),r=new Set,a=new Date;for(let s=0;s<t;s++){const e=new Date(a);e.setDate(e.getDate()-s),r.add(\`\${e.getFullYear()}-\${String(e.getMonth()+1).padStart(2,"0")}-\${String(e.getDate()).padStart(2,"0")}\`)}return o.jsxs(o.Fragment,{children:[o.jsx(su,{children:"Consecutive days with at least one AI session. Keep using AI daily to grow your streak!"}),o.jsxs("div",{className:"rounded-lg border border-border/50 bg-bg-surface-1 divide-y divide-border/30",children:[o.jsx(iu,{label:"Current streak",value:\`\${t} day\${1===t?"":"s"}\`}),o.jsx(iu,{label:"Total active days",value:String(n.length)}),o.jsx(iu,{label:"Total sessions",value:String(e.length)})]}),n.length>0&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"text-[10px] font-mono text-text-muted uppercase tracking-wider px-1 pt-2",children:"Active Days"}),o.jsx("div",{className:"space-y-1",children:n.map((e,t)=>{const n=r.has(e.date);return o.jsxs(pl.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},transition:{duration:.2,delay:Math.min(.02*t,.6)},className:"flex items-center gap-2 py-2 px-2 rounded-lg hover:bg-bg-surface-1 transition-colors",children:[n?o.jsx(bc,{className:"w-3 h-3 flex-shrink-0",style:{color:"#facc15"}}):o.jsx(wl,{className:"w-3 h-3 flex-shrink-0 text-text-muted"}),o.jsx("span",{className:"text-xs font-mono flex-1 min-w-0 "+(n?"text-text-primary":"text-text-secondary"),children:e.label}),o.jsx("span",{className:"text-[10px] text-text-muted font-mono whitespace-nowrap",title:"User time",children:nu(e.spentSeconds)}),o.jsx("span",{className:"text-[10px] text-text-muted",children:"/"}),o.jsx("span",{className:"text-[10px] font-mono font-bold text-text-primary whitespace-nowrap",title:"AI time",children:nu(e.gainedSeconds)}),e.boost>0&&o.jsxs("span",{className:"text-[10px] font-mono font-bold whitespace-nowrap",style:{color:"#a78bfa"},title:"Multiplier",children:[e.boost.toFixed(1),"x"]})]},e.date)})})]})]})}var hu=25;function fu({sessions:e,showPublic:t}){const[n,r]=h.useState(hu),a=h.useRef(null);if(h.useEffect(()=>{const e=a.current;if(!e)return;const t=new IntersectionObserver(([e])=>{e?.isIntersecting&&r(e=>e+hu)},{rootMargin:"200px"});return t.observe(e),()=>t.disconnect()},[e,n]),h.useEffect(()=>{r(hu)},[e.length]),0===e.length)return null;const s=e.slice(0,n),i=n<e.length;return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"text-[10px] font-mono text-text-muted uppercase tracking-wider px-1 pt-2",children:"Sessions"}),o.jsxs("div",{className:"space-y-1",children:[s.map((e,n)=>{const r=Ec(e.client),a=Sc[r]??r.slice(0,2).toUpperCase(),s=wc[r]??"#91919a",i="cursor"===r?"var(--text-primary)":s,l=Nc[r],c=t?e.title??"Untitled":e.private_title||e.title||"Untitled";return o.jsxs(pl.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},transition:{duration:.2,delay:Math.min(.02*n,.6)},className:"flex items-start gap-2.5 py-2 px-2 rounded-lg hover:bg-bg-surface-1 transition-colors group",children:[o.jsx("div",{className:"w-5 h-5 rounded flex items-center justify-center text-[7px] font-bold font-mono flex-shrink-0 mt-0.5",style:{backgroundColor:\`\${s}15\`,color:s,border:\`1px solid \${s}20\`},children:l?o.jsx("div",{className:"w-3 h-3",style:{backgroundColor:i,maskImage:\`url(\${l})\`,maskSize:"contain",maskRepeat:"no-repeat",maskPosition:"center",WebkitMaskImage:\`url(\${l})\`,WebkitMaskSize:"contain",WebkitMaskRepeat:"no-repeat",WebkitMaskPosition:"center"}}):a}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("p",{className:"text-sm text-text-secondary group-hover:text-text-primary transition-colors leading-snug truncate",children:c}),o.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[o.jsx("span",{className:"text-[10px] font-mono text-text-muted",children:nu(e.duration_seconds)}),o.jsx("span",{className:"text-[10px] text-text-muted",children:(u=e.started_at,new Date(u).toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0}))}),e.project&&o.jsx("span",{className:"text-[10px] text-text-muted font-mono truncate",children:e.project})]})]})]},e.session_id);var u}),i&&o.jsx("div",{ref:a,className:"py-2 text-center",children:o.jsxs("span",{className:"text-[10px] text-text-muted font-mono",children:["Showing ",s.length," of ",e.length,"..."]})})]})]})}var pu=[{id:"sessions",label:"Sessions"},{id:"insights",label:"Insights"}];function mu({activeTab:e,onTabChange:t,externalLinks:n,showSettings:r=!0}){return o.jsxs("div",{className:"flex items-center gap-0.5 p-0.5 rounded-lg bg-bg-surface-1 border border-border/40",children:[pu.map(({id:n,label:r})=>{const a=e===n;return o.jsx("button",{onClick:()=>t(n),className:\`\\n px-3 py-1 rounded-md text-xs font-medium transition-all duration-150\\n \${a?"bg-bg-surface-2 text-text-primary shadow-sm":"text-text-muted hover:text-text-primary"}\\n \`,children:r},n)}),r&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"w-px h-4 bg-border/60 mx-1"}),o.jsxs("button",{onClick:()=>t("settings"),className:\`\\n flex items-center gap-1 px-2.5 py-1 rounded-md text-xs font-medium transition-all duration-150\\n \${"settings"===e?"bg-bg-surface-2 text-text-primary shadow-sm":"text-text-muted hover:text-text-primary"}\\n \`,children:[o.jsx(cc,{className:"w-3 h-3"}),"Settings"]})]}),n&&n.length>0&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"w-px h-4 bg-border/60 mx-1"}),n.map(({label:e,href:t})=>o.jsxs("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 px-2.5 py-1 rounded-md text-xs font-mono tracking-wide text-text-muted hover:text-accent transition-colors duration-150",children:[e,o.jsx(Fl,{className:"w-2.5 h-2.5 opacity-50"})]},t))]})]})}function gu({label:e,active:t,onClick:n}){return o.jsx("button",{onClick:n,className:"text-[10px] font-bold uppercase tracking-wider px-3 py-1.5 rounded-full transition-all duration-200 cursor-pointer border "+(t?"bg-accent text-bg-base border-accent scale-105":"bg-bg-surface-1 border-border text-text-muted hover:text-text-primary hover:border-text-muted/50"),style:t?{boxShadow:"0 2px 10px rgba(var(--accent-rgb), 0.4)"}:void 0,children:e})}function xu({sessions:e,filters:t,onFilterChange:n}){const r=h.useMemo(()=>[...new Set(e.map(e=>e.client))].sort(),[e]),a=h.useMemo(()=>[...new Set(e.flatMap(e=>e.languages))].sort(),[e]),s=h.useMemo(()=>[...new Set(e.map(e=>e.project).filter(e=>{if(!e)return!1;const t=e.trim().toLowerCase();return!["untitled","mcp","unknown","default","none"].includes(t)}))].sort(),[e]);return r.length>0||a.length>0||s.length>0?o.jsxs("div",{className:"flex flex-wrap items-center gap-2 px-1",children:[o.jsx(gu,{label:"All",active:"all"===t.client&&"all"===t.language&&"all"===t.project,onClick:()=>{n("client","all"),n("language","all"),n("project","all")}}),r.map(e=>o.jsx(gu,{label:kc[e]??e,active:t.client===e,onClick:()=>n("client",t.client===e?"all":e)},e)),a.map(e=>o.jsx(gu,{label:e,active:t.language===e,onClick:()=>n("language",t.language===e?"all":e)},e)),s.map(e=>o.jsx(gu,{label:e,active:t.project===e,onClick:()=>n("project",t.project===e?"all":e)},e))]}):null}function yu({onDelete:e,size:t="md",className:n=""}){const[r,a]=h.useState(!1),s=h.useRef(void 0);h.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]);const i=t=>{t.stopPropagation(),s.current&&clearTimeout(s.current),a(!1),e()},l=e=>{e.stopPropagation(),s.current&&clearTimeout(s.current),a(!1)},c="sm"===t?"w-3 h-3":"w-3.5 h-3.5",u="sm"===t?"p-1":"p-1.5";return r?o.jsxs("span",{className:\`inline-flex items-center gap-0.5 \${n}\`,onClick:e=>e.stopPropagation(),children:[o.jsx("button",{onClick:i,className:\`\${u} rounded-lg transition-all bg-error/15 text-error hover:bg-error/25\`,title:"Confirm delete",children:o.jsx(jl,{className:c})}),o.jsx("button",{onClick:l,className:\`\${u} rounded-lg transition-all text-text-muted hover:bg-bg-surface-2\`,title:"Cancel",children:o.jsx(vc,{className:c})})]}):o.jsx("button",{onClick:e=>{e.stopPropagation(),a(!0),s.current=setTimeout(()=>a(!1),5e3)},className:\`\${u} rounded-lg transition-all text-text-muted hover:text-error/70 hover:bg-error/5 \${n}\`,title:"Delete",children:o.jsx(pc,{className:c})})}function vu({text:e,words:t}){if(!t?.length||!e)return o.jsx(o.Fragment,{children:e});const n=t.map(e=>e.replace(/[.*+?^\${}()|[\\]\\\\]/g,"\\\\$&")),r=new RegExp(\`(\${n.join("|")})\`,"gi"),a=e.split(r);return o.jsx(o.Fragment,{children:a.map((e,t)=>t%2==1?o.jsx("mark",{className:"bg-accent/30 text-inherit rounded-sm px-px",children:e},t):o.jsx("span",{children:e},t))})}function bu(e,t){const n=e=>new Date(e).toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0});return\`\${n(e)} \u2014 \${n(t)}\`}function wu(e){if(e<60)return\`\${e}s\`;const t=Math.round(e/60);if(t<60)return\`\${t}m\`;const n=Math.floor(t/60),r=t%60;return r>0?\`\${n}h \${r}m\`:\`\${n}h\`}var ku={feature:"bg-success/15 text-success border-success/30",bugfix:"bg-error/15 text-error border-error/30",refactor:"bg-purple/15 text-purple border-purple/30",test:"bg-blue/15 text-blue border-blue/30",docs:"bg-accent/15 text-accent border-accent/30",setup:"bg-text-muted/15 text-text-muted border-text-muted/20",deployment:"bg-emerald/15 text-emerald border-emerald/30"};function Su({category:e}){const t=ku[e]??"bg-bg-surface-2 text-text-secondary border-border";return o.jsx("span",{className:\`text-[10px] px-1.5 py-0.5 rounded-full border font-bold uppercase tracking-wider \${t}\`,children:e})}function ju(e){const t="string"==typeof e?JSON.parse(e):e,n=[t.prompt_quality,t.context_provided,t.scope_quality,t.independence_level].filter(e=>"number"==typeof e);return n.length>0?n.reduce((e,t)=>e+t,0)/n.length:0}function Nu(e){return e>=5?"text-text-secondary":e>=4?"text-amber-500":e>=3?"text-orange-500":"text-error"}function Cu({score:e,decimal:t}){const n=e>=5,r=t?e.toFixed(1):String(Math.round(e)),a=r.endsWith(".0")?r.slice(0,-2):r;return o.jsxs("span",{className:"text-[10px] font-mono "+(n?"":"font-bold"),title:\`\${e.toFixed(1)}/5\`,children:[o.jsx("span",{className:Nu(e),children:a}),o.jsx("span",{className:"text-text-muted/50",children:"/5"})]})}function Tu({model:e}){return e?o.jsx("div",{className:"flex flex-wrap items-center gap-4",children:o.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] whitespace-nowrap",children:[o.jsx(Rl,{className:"w-3 h-3 text-text-muted/50 flex-shrink-0"}),o.jsx("span",{className:"text-text-secondary",children:"Model"}),o.jsx("span",{className:"text-text-secondary font-mono font-bold ml-0.5",children:e})]})}):null}function Eu({evaluation:e,showPublic:t=!1,model:n}){const r=!!n,a=[{label:"Prompt",value:e.prompt_quality,reason:e.prompt_quality_reason,Icon:ec},{label:"Context",value:e.context_provided,reason:e.context_provided_reason,Icon:Ol},{label:"Scope",value:e.scope_quality,reason:e.scope_quality_reason,Icon:hc},{label:"Independence",value:e.independence_level,reason:e.independence_level_reason,Icon:_l}],s=a.some(e=>e.reason)||e.task_outcome_reason;return o.jsxs("div",{className:"px-2.5 py-2 bg-bg-surface-2/30 rounded-md mb-2",children:[o.jsxs("div",{className:"flex flex-wrap items-center gap-x-5 gap-y-2",children:[a.map(({label:e,value:t,Icon:n})=>o.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] whitespace-nowrap",children:[o.jsx(n,{className:"w-3 h-3 text-text-muted/60 flex-shrink-0"}),o.jsx("span",{className:"text-text-secondary whitespace-nowrap",children:e}),o.jsx(Cu,{score:t})]},e)),r&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"hidden md:block h-3.5 w-px bg-border/30"}),o.jsx(Tu,{model:n})]}),o.jsx("div",{className:"hidden md:block h-3.5 w-px bg-border/30"}),o.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] whitespace-nowrap",children:[o.jsx(rc,{className:"w-3 h-3 text-text-muted/50"}),o.jsx("span",{className:"text-text-muted",children:"Iterations"}),o.jsx("span",{className:"text-text-secondary font-mono font-bold ml-0.5",children:e.iteration_count})]}),o.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] whitespace-nowrap",children:[o.jsx(yc,{className:"w-3 h-3 text-text-muted/50"}),o.jsx("span",{className:"text-text-muted",children:"Tools"}),o.jsx("span",{className:"text-text-secondary font-mono font-bold ml-0.5",children:e.tools_leveraged})]})]}),!t&&s&&o.jsx("div",{className:"mt-2 pt-2 border-t border-border/15",children:o.jsxs("div",{className:"grid grid-cols-[86px_minmax(0,1fr)] gap-x-2 gap-y-1 text-[10px]",children:[a.filter(e=>e.reason).map(({label:e,value:t,reason:n})=>o.jsxs("div",{className:"contents",children:[o.jsxs("span",{className:\`\${Nu(t)} font-bold text-right\`,children:[e,":"]}),o.jsx("span",{className:"text-text-secondary leading-relaxed",children:n})]},e)),e.task_outcome_reason&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"col-span-2 border-t border-border/15 mt-0.5 mb-0.5"}),o.jsx("span",{className:"text-text-secondary font-bold text-right",children:"Outcome:"}),o.jsx("span",{className:"text-text-secondary leading-relaxed",children:e.task_outcome_reason})]})]})})]})}function Mu({prompt:e,imageCount:t,images:n}){const[r,a]=h.useState(!1),s=e.length>300,i=s&&!r?e.slice(0,300)+"\u2026":e,l=t??n?.length??0;return o.jsxs("div",{className:"px-2.5 py-2 bg-bg-surface-2/20 rounded-md mb-2 border border-border/10",children:[o.jsxs("div",{className:"flex items-center gap-1.5 mb-1.5",children:[o.jsx(ec,{className:"w-3 h-3 text-text-muted/50"}),o.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-text-muted",children:"Prompt"}),l>0&&o.jsxs("span",{className:"inline-flex items-center gap-0.5 text-[10px] text-text-muted bg-bg-surface-2 px-1.5 py-0.5 rounded-full border border-border/20",children:[o.jsx(ql,{className:"w-2.5 h-2.5"}),l]})]}),o.jsx("p",{className:"text-[11px] text-text-secondary leading-relaxed whitespace-pre-wrap break-words",children:i}),s&&o.jsx("button",{onClick:()=>a(!r),className:"text-[10px] text-accent hover:text-accent/80 mt-1 font-medium",children:r?"Show less":"Show more"}),n&&n.length>0&&o.jsx("div",{className:"mt-2 pt-1.5 border-t border-border/10 space-y-1",children:n.map((e,t)=>o.jsxs("div",{className:"flex items-start gap-1.5",children:[o.jsx(ql,{className:"w-3 h-3 text-text-muted/50 flex-shrink-0 mt-0.5"}),o.jsx("span",{className:"text-[10px] text-text-secondary leading-relaxed",children:e.description})]},t))})]})}var Pu=h.memo(function({session:e,milestones:t,defaultExpanded:n=!1,externalShowPublic:r,contextLabel:a,hideClientAvatar:s=!1,hideProject:i=!1,showFullDate:l=!1,highlightWords:c,onDeleteSession:u,onDeleteMilestone:d}){const[f,p]=h.useState(n),[m,g]=h.useState(!1),x=r??m,y=g,v=Ec(e.client),b=wc[v]??"#91919a",w="cursor"===v,k=w?"var(--text-primary)":b,S=w?{backgroundColor:"var(--bg-surface-2)",color:"var(--text-primary)",border:"1px solid var(--border)"}:{backgroundColor:\`\${b}15\`,color:b,border:\`1px solid \${b}30\`},j=Sc[v]??v.slice(0,2).toUpperCase(),N=Nc[v],C=t.length>0||!!e.evaluation||!!e.model||!!e.prompt,T=e.project?.trim()||"",E=!T||["untitled","mcp","unknown","default","none","null","undefined"].includes(T.toLowerCase()),M=t[0],P=E&&M?M.title:T,L=E&&M?M.private_title||M.title:T;let D=e.private_title||e.title||L||"Untitled Session",A=e.title||P||"Untitled Session";const _=D!==A&&void 0===r,z=!!u||C||_,R=a?.replace(/^\\s*prompt\\s*/i,"").trim();return o.jsxs("div",{className:"group/card mb-2 rounded-xl border transition-all duration-200 "+(f?"bg-bg-surface-1 border-accent/35 shadow-md":"bg-bg-surface-1/35 border-border/50 hover:border-accent/30"),children:[o.jsxs("div",{className:"flex items-center",children:[o.jsxs("button",{className:"flex-1 flex items-center gap-3 px-3.5 py-2.5 text-left min-w-0",onClick:()=>C&&p(!f),style:{cursor:C?"pointer":"default"},children:[!s&&o.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center text-[11px] font-black font-mono flex-shrink-0 shadow-sm",style:S,title:kc[v]??v,children:N?o.jsx("div",{className:"w-4 h-4",style:{backgroundColor:k,maskImage:\`url(\${N})\`,maskSize:"contain",maskRepeat:"no-repeat",maskPosition:"center",WebkitMaskImage:\`url(\${N})\`,WebkitMaskSize:"contain",WebkitMaskRepeat:"no-repeat",WebkitMaskPosition:"center"}}):j}),o.jsxs("div",{className:"flex-1 min-w-0 space-y-1",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[a&&o.jsx("span",{className:"inline-flex items-center rounded-md border border-accent/20 bg-accent/10 px-1.5 py-0.5 text-[9px] font-bold uppercase tracking-wider text-accent/90",children:R||a}),o.jsx("div",{className:"flex items-center gap-1.5 min-w-0",children:o.jsx(Qi,{mode:"wait",children:o.jsxs(pl.div,{initial:{opacity:0,x:-5},animate:{opacity:1,x:0},exit:{opacity:0,x:5},transition:{duration:.1},className:"flex items-center gap-1.5 min-w-0",children:[x?o.jsx(uc,{className:"w-3 h-3 text-success/70 flex-shrink-0"}):o.jsx(Ql,{className:"w-3 h-3 text-accent/70 flex-shrink-0"}),o.jsx("span",{className:"text-[15px] font-semibold truncate text-text-primary tracking-tight leading-tight",children:o.jsx(vu,{text:x?A:D,words:c})})]},x?"public":"private")})})]}),o.jsxs("div",{className:"flex items-center gap-3.5 text-[11px] text-text-secondary font-medium",children:[o.jsxs("span",{className:"flex items-center gap-1.5",children:[o.jsx(Pl,{className:"w-3 h-3 opacity-75"}),wu(e.duration_seconds)]}),o.jsxs("span",{className:"text-text-secondary/80 font-mono tracking-tight",children:[l&&\`\${new Date(e.started_at).toLocaleDateString([],{month:"short",day:"numeric"})} \xB7 \`,bu(e.started_at,e.ended_at).split(" \u2014 ")[0]]}),!x&&!E&&!i&&o.jsxs("span",{className:"flex items-center gap-1 text-text-secondary/85",title:\`Project: \${T}\`,children:[o.jsx(Hl,{className:"w-2.5 h-2.5 opacity-70"}),o.jsx("span",{className:"max-w-[130px] truncate",children:T})]}),t.length>0&&o.jsxs("span",{className:"flex items-center gap-1 text-text-secondary/85",title:\`\${t.length} milestone\${1!==t.length?"s":""}\`,children:[o.jsx(Bl,{className:"w-2.5 h-2.5 opacity-70"}),t.length]}),e.evaluation&&o.jsx(Cu,{score:ju(e.evaluation),decimal:!0})]})]})]}),z&&o.jsxs("div",{className:"flex items-center px-2.5 gap-1.5 border-l border-border/30 h-9 self-center",children:[u&&o.jsx(yu,{onDelete:()=>u(e.session_id),className:"opacity-0 group-hover/card:opacity-100 focus-within:opacity-100"}),_&&o.jsx("button",{onClick:e=>{e.stopPropagation(),y(!x)},className:"p-1.5 rounded-lg transition-all "+(x?"bg-success/10 text-success":"text-text-secondary hover:text-text-primary hover:bg-bg-surface-2"),title:x?"Public title shown":"Private title shown","aria-label":x?"Show private title":"Show public title",children:x?o.jsx(Il,{className:"w-3.5 h-3.5"}):o.jsx(Vl,{className:"w-3.5 h-3.5"})}),C&&o.jsx("button",{onClick:()=>p(!f),className:"p-1.5 rounded-lg transition-all "+(f?"text-accent bg-accent/8":"text-text-secondary hover:text-text-primary hover:bg-bg-surface-2"),title:f?"Collapse details":"Expand details","aria-label":f?"Collapse details":"Expand details",children:o.jsx(Nl,{className:"w-4 h-4 transition-transform duration-200 "+(f?"rotate-180":"")})})]})]}),o.jsx(Qi,{children:f&&C&&o.jsx(pl.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},className:"overflow-hidden",children:o.jsxs("div",{className:"px-3.5 pb-3.5 pt-1.5 space-y-2",children:[o.jsx("div",{className:"h-px bg-border/20 mb-2 mx-1"}),!x&&e.prompt&&o.jsx(Mu,{prompt:e.prompt,imageCount:e.prompt_image_count,images:e.prompt_images}),e.evaluation&&o.jsx(Eu,{evaluation:e.evaluation,showPublic:x,model:e.model}),!e.evaluation&&o.jsx(Tu,{model:e.model}),t.length>0&&o.jsx("div",{className:"space-y-0.5",children:t.map(e=>{const t=x?e.title:e.private_title||e.title,n=function(e){if(!e||e<=0)return"";if(e<60)return\`\${e}m\`;const t=Math.floor(e/60),n=e%60;return n>0?\`\${t}h \${n}m\`:\`\${t}h\`}(e.duration_minutes);return o.jsxs("div",{className:"group flex items-center gap-2 p-1.5 rounded-md hover:bg-bg-surface-2/40 transition-colors",children:[o.jsx("div",{className:"w-1.5 h-1.5 rounded-full flex-shrink-0",style:{backgroundColor:Cc[e.category]??"#9c9588"}}),o.jsx("div",{className:"flex-1 min-w-0",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-xs font-medium text-text-secondary group-hover:text-text-primary truncate",children:o.jsx(vu,{text:t,words:c})}),o.jsx(Su,{category:e.category})]})}),n&&o.jsx("span",{className:"text-[10px] text-text-muted font-mono",children:n}),d&&o.jsx(yu,{onDelete:()=>d(e.id),size:"sm",className:"opacity-0 group-hover:opacity-100"})]},e.id)})})]})})})]})});function Lu(e){if(e<60)return\`\${e}s\`;const t=Math.round(e/60);if(t<60)return\`\${t}m\`;const n=Math.floor(t/60),r=t%60;return r>0?\`\${n}h \${r}m\`:\`\${n}h\`}function Du({score:e,decimal:t}){const n=e>=5,r=n?"text-text-secondary":e>=4?"text-amber-500":e>=3?"text-orange-500":"text-error",a=t?e.toFixed(1):String(Math.round(e)),s=a.endsWith(".0")?a.slice(0,-2):a;return o.jsxs("span",{className:"text-[10px] font-mono "+(n?"":"font-bold"),title:\`\${e.toFixed(1)}/5\`,children:[o.jsx("span",{className:r,children:s}),o.jsx("span",{className:"text-text-muted/50",children:"/5"})]})}var Au=h.memo(function({group:e,defaultExpanded:t,globalShowPublic:n,showFullDate:r,highlightWords:a,onDeleteSession:s,onDeleteMilestone:i,onDeleteConversation:l}){const[c,u]=h.useState(t),[d,f]=h.useState(!1),p=n||d;if(1===e.sessions.length){const l=e.sessions[0];return o.jsx(Pu,{session:l.session,milestones:l.milestones,defaultExpanded:t&&l.milestones.length>0,externalShowPublic:n||void 0,showFullDate:r,highlightWords:a,onDeleteSession:s,onDeleteMilestone:i})}const m=Ec(e.sessions[0].session.client),g=wc[m]??"#91919a",x="cursor"===m,y=x?"var(--text-primary)":g,v=x?{backgroundColor:"var(--bg-surface-2)",color:"var(--text-primary)",border:"1px solid var(--border)"}:{backgroundColor:\`\${g}15\`,color:g,border:\`1px solid \${g}30\`},b=Sc[m]??m.slice(0,2).toUpperCase(),w=Nc[m],k=e.aggregateEval,S=k?(k.prompt_quality+k.context_provided+k.scope_quality+k.independence_level)/4:0,j=e.sessions[0].session,N=j.private_title||j.title||j.project||"Conversation",C=j.title||j.project||"Conversation",T=N!==C&&!n,E=j.project?.trim()||"",M=!!E&&!["untitled","mcp","unknown","default","none","null","undefined"].includes(E.toLowerCase());return o.jsxs("div",{className:"group/conv mb-2 rounded-xl border transition-all duration-200 "+(c?"bg-bg-surface-1 border-accent/35 shadow-md":"bg-bg-surface-1/35 border-border/50 hover:border-accent/30"),children:[o.jsxs("div",{className:"flex items-center",children:[o.jsxs("button",{className:"flex-1 flex items-center gap-3 px-3.5 py-2.5 text-left min-w-0",onClick:()=>u(!c),children:[o.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center text-[11px] font-black font-mono flex-shrink-0 shadow-sm",style:v,title:kc[m]??m,children:w?o.jsx("div",{className:"w-4 h-4",style:{backgroundColor:y,maskImage:\`url(\${w})\`,maskSize:"contain",maskRepeat:"no-repeat",maskPosition:"center",WebkitMaskImage:\`url(\${w})\`,WebkitMaskSize:"contain",WebkitMaskRepeat:"no-repeat",WebkitMaskPosition:"center"}}):b}),o.jsxs("div",{className:"flex-1 min-w-0 space-y-1",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"flex items-center gap-1.5 min-w-0",children:o.jsx(Qi,{mode:"wait",children:o.jsxs(pl.div,{initial:{opacity:0,x:-5},animate:{opacity:1,x:0},exit:{opacity:0,x:5},transition:{duration:.1},className:"flex items-center gap-1.5 min-w-0",children:[p?o.jsx(uc,{className:"w-3 h-3 text-success/70 flex-shrink-0"}):o.jsx(Ql,{className:"w-3 h-3 text-accent/70 flex-shrink-0"}),o.jsx("span",{className:"text-[15px] font-semibold truncate text-text-primary tracking-tight leading-tight",children:o.jsx(vu,{text:p?C:N,words:a})})]},p?"public":"private")})}),o.jsxs("span",{className:"text-[10px] font-bold text-accent/90 bg-accent/10 px-1.5 py-0.5 rounded border border-accent/20 flex-shrink-0",children:[e.sessions.length," prompts"]})]}),o.jsxs("div",{className:"flex items-center gap-3.5 text-[11px] text-text-secondary font-medium",children:[o.jsxs("span",{className:"flex items-center gap-1.5",children:[o.jsx(Pl,{className:"w-3 h-3 opacity-75"}),Lu(e.totalDuration)]}),o.jsxs("span",{className:"text-text-secondary/80 font-mono tracking-tight",children:[r&&\`\${new Date(e.lastSessionAt).toLocaleDateString([],{month:"short",day:"numeric"})} \xB7 \`,(P=e.lastSessionAt,new Date(P).toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0}))]}),!p&&M&&o.jsxs("span",{className:"flex items-center gap-1 text-text-secondary/85",title:\`Project: \${E}\`,children:[o.jsx(Hl,{className:"w-2.5 h-2.5 opacity-70"}),o.jsx("span",{className:"max-w-[130px] truncate",children:E})]}),e.totalMilestones>0&&o.jsxs("span",{className:"flex items-center gap-1 text-text-secondary/85",title:\`\${e.totalMilestones} milestone\${1!==e.totalMilestones?"s":""}\`,children:[o.jsx(Bl,{className:"w-2.5 h-2.5 opacity-70"}),e.totalMilestones]}),k&&o.jsx(Du,{score:S,decimal:!0})]})]})]}),o.jsxs("div",{className:"flex items-center px-2.5 gap-1.5 border-l border-border/30 h-9 self-center",children:[l&&e.conversationId&&o.jsx(yu,{onDelete:()=>l(e.conversationId),className:"opacity-0 group-hover/conv:opacity-100 focus-within:opacity-100"}),T&&o.jsx("button",{onClick:e=>{e.stopPropagation(),f(!d)},className:"p-1.5 rounded-lg transition-all "+(p?"bg-success/10 text-success":"text-text-secondary hover:text-text-primary hover:bg-bg-surface-2"),title:p?"Public title shown":"Private title shown","aria-label":p?"Show private title":"Show public title",children:p?o.jsx(Il,{className:"w-3.5 h-3.5"}):o.jsx(Vl,{className:"w-3.5 h-3.5"})}),o.jsx("button",{onClick:()=>u(!c),className:"p-1.5 rounded-lg transition-all "+(c?"text-accent bg-accent/8":"text-text-secondary hover:text-text-primary hover:bg-bg-surface-2"),title:c?"Collapse conversation":"Expand conversation","aria-label":c?"Collapse conversation":"Expand conversation",children:o.jsx(Nl,{className:"w-4 h-4 transition-transform duration-200 "+(c?"rotate-180":"")})})]})]}),o.jsx(Qi,{children:c&&o.jsx(pl.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},className:"overflow-hidden",children:o.jsxs("div",{className:"px-3.5 pb-2.5 relative",children:[o.jsx("div",{className:"absolute left-[1.75rem] top-0 bottom-2 w-px",style:{backgroundColor:\`\${g}25\`}}),o.jsx("div",{className:"space-y-1 pl-10",children:e.sessions.map(e=>o.jsxs("div",{className:"relative",children:[o.jsx("div",{className:"absolute -left-7 top-5 w-2 h-2 rounded-full border-2",style:{backgroundColor:g,borderColor:\`\${g}40\`}}),o.jsx(Pu,{session:e.session,milestones:e.milestones,defaultExpanded:!1,externalShowPublic:p||void 0,hideClientAvatar:!0,hideProject:!0,showFullDate:r,highlightWords:a,onDeleteSession:s,onDeleteMilestone:i})]},e.session.session_id))})]})})})]});var P});function _u({sessions:e,milestones:t,filters:n,globalShowPublic:r,showFullDate:a,highlightWords:s,outsideWindowCounts:i,onNavigateNewer:l,onNavigateOlder:c,onDeleteSession:u,onDeleteConversation:d,onDeleteMilestone:f}){const p=h.useMemo(()=>e.filter(e=>("all"===n.client||e.client===n.client)&&(!("all"!==n.language&&!e.languages.includes(n.language))&&("all"===n.project||(e.project??"")===n.project))),[e,n]),m=h.useMemo(()=>"all"===n.category?t:t.filter(e=>e.category===n.category),[t,n.category]),g=h.useMemo(()=>{const e=function(e,t){const n=new Map;for(const a of t){const e=n.get(a.session_id);e?e.push(a):n.set(a.session_id,[a])}const r=e.map(e=>({session:e,milestones:n.get(e.session_id)??[]}));return r.sort((e,t)=>Lc(t.session.started_at)-Lc(e.session.started_at)),r}(p,m);return function(e){const t=new Map,n=[];for(const a of e){const e=a.session.conversation_id;if(e){const n=t.get(e);n?n.push(a):t.set(e,[a])}else n.push(a)}const r=[];for(const[a,s]of t){s.sort((e,t)=>Lc(t.session.started_at)-Lc(e.session.started_at));const e=s.reduce((e,t)=>e+t.session.duration_seconds,0),t=s.reduce((e,t)=>e+t.milestones.length,0),n=s[s.length-1].session.started_at,i=s[0].session.ended_at,o=s[0].session.started_at;r.push({conversationId:a,sessions:s,aggregateEval:Ac(s),totalDuration:e,totalMilestones:t,startedAt:n,endedAt:i,lastSessionAt:o})}for(const a of n)r.push({conversationId:null,sessions:[a],aggregateEval:a.session.evaluation?Ac([a]):null,totalDuration:a.session.duration_seconds,totalMilestones:a.milestones.length,startedAt:a.session.started_at,endedAt:a.session.ended_at,lastSessionAt:a.session.started_at});return r.sort((e,t)=>Lc(t.lastSessionAt)-Lc(e.lastSessionAt)),r}(e)},[p,m]),[x,y]=h.useState(25),v=h.useRef(null);if(h.useEffect(()=>{y(25)},[g]),h.useEffect(()=>{const e=v.current;if(!e)return;const t=new IntersectionObserver(([e])=>{e?.isIntersecting&&y(e=>e+25)},{rootMargin:"200px"});return t.observe(e),()=>t.disconnect()},[g,x]),0===g.length){const e=i&&i.before>0,t=i&&i.after>0;return o.jsxs("div",{className:"text-center text-text-muted py-8 text-sm mb-4 space-y-3",children:[t&&o.jsxs("button",{onClick:l,className:"flex flex-col items-center gap-0.5 mx-auto text-[11px] text-text-muted/60 hover:text-accent transition-colors group",children:[o.jsx(El,{className:"w-3.5 h-3.5"}),o.jsxs("span",{children:[i.after," newer session",1!==i.after?"s":""]}),i.newerLabel&&o.jsx("span",{className:"text-[10px] opacity-70 group-hover:opacity-100",children:i.newerLabel})]}),o.jsx("div",{children:"No sessions in this window"}),e&&o.jsxs("button",{onClick:c,className:"flex flex-col items-center gap-0.5 mx-auto text-[11px] text-text-muted/60 hover:text-accent transition-colors group",children:[i.olderLabel&&o.jsx("span",{className:"text-[10px] opacity-70 group-hover:opacity-100",children:i.olderLabel}),o.jsxs("span",{children:[i.before," older session",1!==i.before?"s":""]}),o.jsx(Nl,{className:"w-3.5 h-3.5"})]})]})}const b=x<g.length,w=b?g.slice(0,x):g;return o.jsxs("div",{className:"space-y-2 mb-4",children:[i&&i.after>0&&o.jsxs("button",{onClick:l,className:"flex flex-col items-center gap-0.5 w-full text-[11px] text-text-muted/60 hover:text-accent py-1.5 transition-colors group",children:[o.jsx(El,{className:"w-3.5 h-3.5"}),o.jsxs("span",{children:[i.after," newer session",1!==i.after?"s":""]}),i.newerLabel&&o.jsx("span",{className:"text-[10px] opacity-70 group-hover:opacity-100",children:i.newerLabel})]}),w.map(e=>o.jsx(Au,{group:e,defaultExpanded:!1,globalShowPublic:r,showFullDate:a,highlightWords:s,onDeleteSession:u,onDeleteMilestone:f,onDeleteConversation:d},e.conversationId??e.sessions[0].session.session_id)),b&&o.jsx("div",{ref:v,className:"h-px"}),g.length>25&&o.jsxs("div",{className:"flex items-center justify-center gap-3 py-2 text-[11px] text-text-muted",children:[o.jsxs("span",{children:["Showing ",Math.min(x,g.length)," of ",g.length," conversations"]}),b&&o.jsx("button",{onClick:()=>y(g.length),className:"text-accent hover:text-accent/80 font-semibold transition-colors",children:"Show all"})]}),i&&i.before>0&&o.jsxs("button",{onClick:c,className:"flex flex-col items-center gap-0.5 w-full text-[11px] text-text-muted/60 hover:text-accent py-1.5 transition-colors group",children:[i.olderLabel&&o.jsx("span",{className:"text-[10px] opacity-70 group-hover:opacity-100",children:i.olderLabel}),o.jsxs("span",{children:[i.before," older session",1!==i.before?"s":""]}),o.jsx(Nl,{className:"w-3.5 h-3.5"})]})]})}var zu={accent:{border:"border-accent/20",bg:"bg-[var(--accent-alpha)]",dot:"bg-accent"},success:{border:"border-success/20",bg:"bg-success/10",dot:"bg-success"},muted:{border:"border-border",bg:"bg-bg-surface-2/50",dot:"bg-text-muted"}};function Ru({label:e,color:t="accent",dot:n=!1,icon:r,glow:a=!1,className:s="","data-testid":i}){const l=zu[t];return o.jsxs("div",{"data-testid":i,className:\`inline-flex items-center gap-2 px-3 py-1 rounded-full border \${l.border} \${l.bg} \${s}\`,style:a?{boxShadow:"0 0 10px rgba(var(--accent-rgb), 0.1)"}:void 0,children:[n&&o.jsx("span",{className:\`w-1.5 h-1.5 rounded-full \${l.dot} animate-pulse\`}),r,o.jsx("span",{className:"text-[10px] font-mono text-text-secondary tracking-widest uppercase",children:e})]})}var Fu={"1h":{visibleDuration:36e5,majorTickInterval:9e5,minorTickInterval:3e5,labelFormat:e=>e.toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0})},"3h":{visibleDuration:108e5,majorTickInterval:18e5,minorTickInterval:6e5,labelFormat:e=>e.toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0})},"6h":{visibleDuration:216e5,majorTickInterval:36e5,minorTickInterval:9e5,labelFormat:e=>e.toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0})},"12h":{visibleDuration:432e5,majorTickInterval:72e5,minorTickInterval:18e5,labelFormat:e=>e.toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0})},"24h":{visibleDuration:864e5,majorTickInterval:144e5,minorTickInterval:36e5,labelFormat:e=>e.toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0})},day:{visibleDuration:864e5,majorTickInterval:144e5,minorTickInterval:36e5,labelFormat:e=>e.toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0})},"7d":{visibleDuration:6048e5,majorTickInterval:864e5,minorTickInterval:216e5,labelFormat:e=>e.toLocaleDateString([],{weekday:"short",month:"short",day:"numeric"})},week:{visibleDuration:6048e5,majorTickInterval:864e5,minorTickInterval:216e5,labelFormat:e=>e.toLocaleDateString([],{weekday:"short",month:"short",day:"numeric"})},"30d":{visibleDuration:2592e6,majorTickInterval:6048e5,minorTickInterval:864e5,labelFormat:e=>e.toLocaleDateString([],{month:"short",day:"numeric"})},month:{visibleDuration:2592e6,majorTickInterval:6048e5,minorTickInterval:864e5,labelFormat:e=>e.toLocaleDateString([],{month:"short",day:"numeric"})}};function Vu(e){if(e<60)return\`\${e}s\`;const t=Math.round(e/60);if(t<60)return\`\${t}m\`;const n=Math.floor(t/60),r=t%60;return r>0?\`\${n}h \${r}m\`:\`\${n}h\`}function Iu({value:e,onChange:t,scale:n,window:r,sessions:a=[],milestones:s=[],showPublic:i=!1}){const l=h.useRef(null),[c,u]=h.useState(0),d=void 0!==r;h.useEffect(()=>{if(!l.current)return;const e=new ResizeObserver(e=>{for(const t of e)u(t.contentRect.width)});return e.observe(l.current),u(l.current.getBoundingClientRect().width),()=>e.disconnect()},[]);const f=Fu[n],p=d?r.end-r.start:f.visibleDuration,m=d?r.end:e,g=d?r.start:e-f.visibleDuration,x=c>0?c/p:0,[y,v]=h.useState(!1),[b,w]=h.useState(0),k=h.useRef(0),S=h.useRef(0),j=h.useRef(null);h.useEffect(()=>()=>{j.current&&clearTimeout(j.current)},[]);const N=h.useCallback(e=>{v(!0),k.current=e.clientX,S.current=0,w(0),e.currentTarget.setPointerCapture(e.pointerId)},[]),C=h.useCallback(n=>{if(!y||0===x)return;const r=n.clientX-k.current;k.current=n.clientX,S.current+=r,w(e=>e+r),j.current||(j.current=setTimeout(()=>{j.current=null;const n=S.current;S.current=0,w(0);const r=e+-n/x,a=d?Math.max(Math.min(r,m),g):Math.min(r,Date.now());t(a)},80))},[y,x,e,m,g,d,t]),T=h.useCallback(()=>{if(v(!1),j.current&&(clearTimeout(j.current),j.current=null),0!==S.current&&x>0){const n=e+-S.current/x,r=d?Math.max(Math.min(n,m),g):Math.min(n,Date.now());S.current=0,t(r)}w(0)},[e,m,g,d,x,t]),E=h.useMemo(()=>{if(!c||0===x)return[];const e=g-f.majorTickInterval,t=m+f.majorTickInterval,n=[];for(let r=Math.ceil(e/f.majorTickInterval)*f.majorTickInterval;r<=t;r+=f.majorTickInterval)n.push({type:"major",time:r,position:(r-m)*x,label:f.labelFormat(new Date(r))});for(let r=Math.ceil(e/f.minorTickInterval)*f.minorTickInterval;r<=t;r+=f.minorTickInterval)r%f.majorTickInterval!==0&&n.push({type:"minor",time:r,position:(r-m)*x});return n},[g,m,c,x,f]),M=h.useMemo(()=>a.map(e=>({session:e,start:Lc(e.started_at),end:Lc(e.ended_at)})),[a]),P=h.useMemo(()=>{if(!c||0===x)return[];const e=M.filter(e=>e.start<=m&&e.end>=g).map(e=>({session:e.session,leftOffset:(Math.max(e.start,g)-m)*x,width:(Math.min(e.end,m)-Math.max(e.start,g))*x}));return e.length>100?(e.sort((e,t)=>t.width-e.width),e.slice(0,100)):e},[M,g,m,c,x]),L=h.useMemo(()=>s.map(e=>({milestone:e,time:Lc(e.created_at)})).sort((e,t)=>e.time-t.time),[s]),D=h.useMemo(()=>{if(!c||0===x||!L.length)return[];let e=0,t=L.length;for(;e<t;){const n=e+t>>1;L[n].time<g?e=n+1:t=n}const n=e;for(t=L.length;e<t;){const n=e+t>>1;L[n].time<=m?e=n+1:t=n}const r=e,a=[];for(let s=n;s<r;s++){const e=L[s];a.push({...e,offset:(e.time-m)*x})}return a},[L,g,m,c,x]),A=h.useMemo(()=>{if(!c||0===x)return null;const e=Date.now();return e<g||e>m?null:(e-m)*x},[g,m,c,x]),[_,z]=h.useState(null),R=h.useRef(e);return h.useEffect(()=>{_&&Math.abs(e-R.current)>1e3&&z(null),R.current=e},[e,_]),o.jsxs("div",{className:"relative h-16",children:[o.jsxs("div",{"data-testid":"time-scrubber",className:"absolute inset-0 bg-transparent border-t border-border/50 overflow-hidden select-none touch-none cursor-grab active:cursor-grabbing",ref:l,onPointerDown:N,onPointerMove:C,onPointerUp:T,style:{touchAction:"none"},children:[null!==A&&o.jsx("div",{className:"absolute top-0 bottom-0 w-[2px] bg-accent/50 z-30",style:{right:-A}}),null!==A&&A<-1&&o.jsx("div",{className:"absolute top-0 bottom-0 bg-bg-base/30 z-20",style:{right:0,width:-A}}),o.jsxs("div",{className:"absolute right-0 top-0 bottom-0 w-0 pointer-events-none",style:b?{transform:\`translateX(\${b}px)\`,willChange:"transform"}:void 0,children:[E.map(e=>o.jsx("div",{className:"absolute top-0 border-l "+("major"===e.type?"border-border/60":"border-border/30"),style:{left:e.position,height:"major"===e.type?"100%":"35%",bottom:0},children:"major"===e.type&&e.label&&o.jsx("span",{className:"absolute top-2 left-2 text-[9px] font-bold text-text-muted uppercase tracking-wider whitespace-nowrap bg-bg-surface-1/80 px-1 py-0.5 rounded",children:e.label})},e.time)),P.map(e=>o.jsx("div",{className:"absolute bottom-0 rounded-t-md pointer-events-auto cursor-pointer hover:opacity-80",style:{left:e.leftOffset,width:Math.max(e.width,3),height:"45%",backgroundColor:"rgba(var(--accent-rgb), 0.15)",borderTop:"2px solid rgba(var(--accent-rgb), 0.5)",boxShadow:"inset 0 1px 10px rgba(var(--accent-rgb), 0.05)"},onMouseEnter:t=>{const n=t.currentTarget.getBoundingClientRect();z({type:"session",data:e.session,x:n.left+n.width/2,y:n.top})},onMouseLeave:()=>z(null)},e.session.session_id)),D.map((e,n)=>o.jsx("div",{className:"absolute bottom-2 pointer-events-auto cursor-pointer z-40 transition-transform hover:scale-125",style:{left:e.offset,transform:"translateX(-50%)"},onMouseEnter:t=>{const n=t.currentTarget.getBoundingClientRect();z({type:"milestone",data:e.milestone,x:n.left+n.width/2,y:n.top})},onMouseLeave:()=>z(null),onClick:n=>{n.stopPropagation(),t(e.time)},children:o.jsx("div",{className:"w-3.5 h-3.5 rounded-full border-2 border-bg-surface-1 shadow-lg",style:{backgroundColor:Cc[e.milestone.category]??"#9c9588",boxShadow:\`0 0 10px \${Cc[e.milestone.category]}50\`}})},n))]})]}),_&&Mc.createPortal(o.jsx("div",{className:"fixed z-[9999] pointer-events-none",style:{left:_.x,top:_.y,transform:"translate(-50%, -100%)"},children:o.jsxs("div",{className:"mb-3 bg-bg-surface-3/95 backdrop-blur-md text-text-primary rounded-xl shadow-2xl px-3 py-2.5 text-[11px] min-w-[180px] max-w-[280px] border border-border/50 animate-in fade-in zoom-in-95 duration-200",children:["session"===_.type?o.jsx(Ou,{session:_.data,showPublic:i}):o.jsx($u,{milestone:_.data,showPublic:i}),o.jsx("div",{className:"absolute -bottom-1.5 left-1/2 -translate-x-1/2 w-3 h-3 bg-bg-surface-3/95 border-r border-b border-border/50 rotate-45"})]})}),document.body)]})}function Ou({session:e,showPublic:t}){const n=kc[e.client]??e.client,r=t?e.title||e.project||\`\${n} Session\`:e.private_title||e.title||e.project||\`\${n} Session\`;return o.jsxs("div",{className:"flex flex-col gap-1",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("span",{className:"font-bold text-xs text-accent uppercase tracking-widest",children:n}),o.jsx("span",{className:"text-[10px] text-text-muted font-mono",children:Vu(e.duration_seconds)})]}),o.jsx("div",{className:"h-px bg-border/50 my-0.5"}),o.jsx("div",{className:"text-text-primary font-medium",children:r}),o.jsx("div",{className:"text-text-secondary capitalize text-[10px]",children:e.task_type})]})}function $u({milestone:e,showPublic:t}){const n=t?e.title:e.private_title??e.title;return o.jsxs("div",{className:"flex flex-col gap-1",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("span",{className:"font-bold text-[10px] uppercase tracking-widest",style:{color:Cc[e.category]??"#9c9588"},children:e.category}),e.complexity&&o.jsx("span",{className:"text-[9px] font-mono text-text-muted font-bold border border-border/50 px-1 rounded uppercase",children:e.complexity})]}),o.jsx("div",{className:"h-px bg-border/50 my-0.5"}),o.jsx("div",{className:"font-bold text-xs break-words text-text-primary",children:n}),!t&&e.private_title&&o.jsxs("div",{className:"text-[10px] text-text-muted italic opacity-70",children:["Public: ",e.title]})]})}function Bu(e,t){const n=e.trim();if(!n)return null;const r=new Date(t),a=n.match(/^(\\d{1,2}):(\\d{2})(?::(\\d{2}))?\\s*(AM|PM)$/i);if(a){let e=parseInt(a[1],10);const t=parseInt(a[2],10),n=a[3]?parseInt(a[3],10):0,s=a[4].toUpperCase();return e<1||e>12||t>59||n>59?null:("AM"===s&&12===e&&(e=0),"PM"===s&&12!==e&&(e+=12),r.setHours(e,t,n,0),r.getTime())}const s=n.match(/^(\\d{1,2}):(\\d{2})(?::(\\d{2}))?$/);if(s){const e=parseInt(s[1],10),t=parseInt(s[2],10),n=s[3]?parseInt(s[3],10):0;return e>23||t>59||n>59?null:(r.setHours(e,t,n,0),r.getTime())}return null}function Hu({value:e,onChange:t,scale:n,onScaleChange:r,sessions:a,showPublic:s=!1}){const i=null===e,l=Bc(n),[c,u]=h.useState(Date.now());h.useEffect(()=>{if(!i)return;const e=setInterval(()=>u(Date.now()),1e3);return()=>clearInterval(e)},[i]);const d=i?c:e,f=Wc(n,d),p=h.useMemo(()=>{const{start:e,end:t}=f,n=e=>new Date(e).toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0}),r=e=>new Date(e).toLocaleDateString([],{weekday:"short",month:"short",day:"numeric"}),a=new Date(e).toDateString()===new Date(t-1).toDateString();return i?a?\`\${n(e)} \u2013 Now\`:\`\${r(e)}, \${n(e)} \u2013 Now\`:a?\`\${n(e)} \u2013 \${n(t)}\`:\`\${r(e)}, \${n(e)} \u2013 \${r(t)}, \${n(t)}\`},[f,i]),[m,g]=h.useState(!1),[x,y]=h.useState(""),v=h.useRef(null),b=h.useRef(!1),w=h.useRef(""),k=h.useRef(!1),S=h.useRef(0),j=h.useCallback(e=>{if(l){if(e>=Date.now()-2e3)return void t(null);const a=Oc[n];return a&&r(a),void t(e)}const a=Date.now();if(e>=a-2e3)return k.current=!0,S.current=a,void t(null);k.current&&a-S.current<300||k.current&&e>=a-1e4&&e<=a+2e3?t(null):(k.current=!1,t(e))},[t,r,l,n]),N=e=>{const r=qc(n,d,e);Yc(n,r)?t(null):t(r)},C=()=>{b.current=i,t(d);const e=new Date(d).toLocaleTimeString([],{hour12:!0,hour:"2-digit",minute:"2-digit",second:"2-digit"});w.current=e,y(e),g(!0),requestAnimationFrame(()=>v.current?.select())},T=()=>{if(g(!1),b.current&&x===w.current)return void t(null);const e=Bu(x,d);null!==e&&t(Math.min(e,Date.now()))},E=e=>{if(l){const t=-1===e?"Previous":"Next";return"day"===n?\`\${t} Day\`:"week"===n?\`\${t} Week\`:\`\${t} Month\`}return\`\${-1===e?"Back":"Forward"} \${Uc[n].toLowerCase()}\`};return o.jsxs("div",{"data-testid":"time-travel-panel",className:"flex flex-col bg-bg-surface-1 border border-border/50 rounded-2xl overflow-hidden mb-8 shadow-sm",children:[o.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between px-6 py-3 border-b border-border/50 gap-4",children:[o.jsxs("div",{className:"flex flex-col items-start gap-0.5",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsxs("div",{className:"flex items-center gap-2 h-8",children:[m?o.jsx("input",{ref:v,type:"text",value:x,onChange:e=>y(e.target.value),onBlur:T,onKeyDown:e=>{if("Enter"===e.key)return void T();if("Escape"===e.key)return e.preventDefault(),g(!1),void(b.current&&t(null));if("ArrowUp"!==e.key&&"ArrowDown"!==e.key)return;e.preventDefault();const n=v.current;if(!n)return;const r=n.selectionStart??0,a="ArrowUp"===e.key?1:-1,s=Bu(x,d);if(null===s)return;const i=x.indexOf(":"),o=x.indexOf(":",i+1),l=x.lastIndexOf(" ");let c;c=r<=i?36e5*a:o>-1&&r<=o?6e4*a:l>-1&&r<=l?1e3*a:12*a*36e5;const u=Math.min(s+c,Date.now()),h=new Date(u).toLocaleTimeString([],{hour12:!0,hour:"2-digit",minute:"2-digit",second:"2-digit"});y(h),t(u),requestAnimationFrame(()=>{n&&n.setSelectionRange(r,r)})},className:"text-xl font-mono font-bold tracking-tight bg-bg-surface-2 border rounded-lg px-2 -ml-2 w-[155px] outline-none text-text-primary "+(i?"border-accent":"border-history"),style:{boxShadow:i?"0 0 10px rgba(var(--accent-rgb), 0.2)":"0 0 10px rgba(var(--history-rgb), 0.2)"}}):o.jsxs("button",{onClick:C,className:"group flex items-center gap-2 hover:bg-bg-surface-2/50 rounded-lg px-2 -ml-2 py-1 transition-all cursor-text",title:"Click to edit time",children:[o.jsx(Pl,{className:"w-5 h-5 "+(i?"text-text-muted":"text-history")}),o.jsx("span",{"data-testid":"time-display",className:"text-xl font-mono font-bold tracking-tight tabular-nums "+(i?"text-text-primary":"text-history"),children:new Date(d).toLocaleTimeString([],{hour12:!0,hour:"2-digit",minute:"2-digit",second:"2-digit"})})]}),o.jsx("button",{onClick:m?T:C,className:"p-1.5 rounded-lg transition-colors flex-shrink-0 "+(m?i?"bg-accent text-bg-base hover:bg-accent-bright":"bg-history text-white hover:brightness-110":"text-text-muted hover:text-text-primary hover:bg-bg-surface-2"),title:m?"Confirm time":"Edit time",children:o.jsx(tc,{className:"w-3.5 h-3.5"})})]}),i?o.jsx(Ru,{label:"Live",color:"success",dot:!0,glow:!0,"data-testid":"live-badge"}):o.jsxs(o.Fragment,{children:[o.jsx(Ru,{label:"History",color:"muted","data-testid":"history-badge"}),o.jsxs("button",{"data-testid":"go-live-button",onClick:()=>t(null),className:"group flex items-center gap-1.5 px-3 py-1.5 text-[10px] font-bold uppercase tracking-widest bg-history/10 hover:bg-history text-history hover:text-white rounded-xl transition-all border border-history/20",children:[o.jsx(sc,{className:"w-3 h-3 group-hover:-rotate-90 transition-transform duration-500"}),"Live"]})]})]}),o.jsxs("div",{className:"flex items-center gap-2 text-sm text-text-secondary font-medium px-0.5",children:[o.jsx(wl,{className:"w-3.5 h-3.5 text-text-muted"}),o.jsx("span",{"data-testid":"date-display",children:new Date(d).toLocaleDateString([],{weekday:"short",month:"long",day:"numeric",year:"numeric"})}),o.jsx("span",{className:"text-text-muted",children:"\xB7"}),o.jsx("span",{"data-testid":"period-label",className:"text-text-muted text-xs tabular-nums",children:p})]})]}),o.jsxs("div",{className:"flex flex-col sm:flex-row items-center gap-4",children:[o.jsxs("div",{className:"flex items-center bg-bg-surface-2/50 border border-border/50 rounded-xl p-1 shadow-inner",children:[Fc.map(e=>o.jsx("button",{"data-testid":\`scale-\${e}\`,onClick:()=>r(e),className:"px-3 py-1.5 text-[10px] font-bold uppercase tracking-wider rounded-lg transition-all "+(n===e?"bg-bg-surface-3 text-text-primary shadow-sm":"text-text-muted hover:text-text-primary hover:bg-bg-surface-2"),title:Uc[e],children:e},e)),o.jsx("div",{className:"w-px h-5 bg-border/50 mx-1"}),Vc.map(e=>{const t=n===e||$c[n]===e;return o.jsx("button",{"data-testid":\`scale-\${e}\`,onClick:()=>r(e),className:"px-3 py-1.5 text-[10px] font-bold uppercase tracking-wider rounded-lg transition-all "+(t?"bg-bg-surface-3 text-text-primary shadow-sm":"text-text-muted hover:text-text-primary hover:bg-bg-surface-2"),title:Uc[e],children:e},e)})]}),o.jsx("div",{className:"flex items-center gap-2",children:o.jsxs("div",{className:"flex items-center gap-1 bg-bg-surface-2/50 border border-border/50 rounded-xl p-1",children:[o.jsx("button",{onClick:()=>N(-1),className:"p-2 text-text-muted hover:text-text-primary hover:bg-bg-surface-2 rounded-lg transition-colors",title:E(-1),children:o.jsx(Cl,{className:"w-4 h-4"})}),o.jsx("button",{onClick:()=>N(1),className:"p-2 text-text-muted hover:text-text-primary hover:bg-bg-surface-2 rounded-lg transition-colors disabled:opacity-20 disabled:cursor-not-allowed",title:E(1),disabled:i||d>=Date.now()-1e3,children:o.jsx(Tl,{className:"w-4 h-4"})})]})})]})]}),o.jsx(Iu,{value:d,onChange:j,scale:n,window:l?f:void 0,sessions:a,milestones:void 0,showPublic:s})]})}function Uu({children:e}){return o.jsx("span",{className:"text-text-primary font-medium",children:e})}function Wu(e){return e.reduce((e,t)=>e+t.duration_seconds,0)/3600}function qu(e,t){const n=e.filter(e=>null!=e.evaluation);if(n.length<2)return null;return n.reduce((e,n)=>e+n.evaluation[t],0)/n.length}function Yu(e,t,n,r,a,s){var i;const l=[],c=a-(s-a),u=a,d=function(e,t,n){return e.filter(e=>{const r=new Date(e.started_at).getTime();return r>=t&&r<=n})}(n,c,u),h=function(e,t,n){return e.filter(e=>{const r=new Date(e.created_at).getTime();return r>=t&&r<=n})}(r,c,u),f=Wu(e),p=Wu(d),m=qu(e,"prompt_quality"),g=qu(d,"prompt_quality");if(null!==m&&null!==g&&m>g+.3&&l.push({priority:10,node:o.jsxs("span",{children:["Your prompt quality improved from ",o.jsx(Uu,{children:g.toFixed(1)})," to"," ",o.jsx(Uu,{children:m.toFixed(1)})," \u2014 clearer prompts mean faster results."]})}),d.length>0&&e.length>0){const e=t.length/Math.max(f,.1),n=h.length/Math.max(p,.1);e>1.2*n&&t.length>=2&&l.push({priority:9,node:o.jsxs("span",{children:["You're shipping ",o.jsxs(Uu,{children:[Math.round(100*(e/n-1)),"% faster"]})," ","this period \u2014 great momentum."]})})}const x=t.filter(e=>"complex"===e.complexity).length,y=h.filter(e=>"complex"===e.complexity).length;x>y&&x>=2&&l.push({priority:8,node:o.jsxs("span",{children:[o.jsx(Uu,{children:x})," complex ",1===x?"task":"tasks"," this period vs"," ",o.jsx(Uu,{children:y})," before \u2014 you're taking on harder problems."]})});const v=e.filter(e=>null!=e.evaluation),b=v.filter(e=>"completed"===e.evaluation.task_outcome&&e.evaluation.iteration_count<=3);if(v.length>=3&&b.length>0){const e=Math.round(b.length/v.length*100);e>=50&&l.push({priority:7,node:o.jsxs("span",{children:[o.jsxs(Uu,{children:[e,"%"]})," of your sessions completed in 3 or fewer turns \u2014 efficient prompting."]})})}const w=function(e){if(0===e.length)return null;const t={};for(const a of e){const e=a.task_type||"coding";t[e]=(t[e]??0)+a.duration_seconds}const n=e.reduce((e,t)=>e+t.duration_seconds,0),r=Object.entries(t).sort((e,t)=>t[1]-e[1])[0];return r&&0!==n?{type:r[0],pct:Math.round(r[1]/n*100)}:null}(e);if(w&&w.pct>=60&&e.length>=2){const e={coding:"building",debugging:"debugging",testing:"testing",planning:"planning",reviewing:"reviewing",documenting:"documenting",refactoring:"refactoring",research:"researching",analysis:"analyzing"}[w.type]??w.type;l.push({priority:6,node:o.jsxs("span",{children:["Deep focus: ",o.jsxs(Uu,{children:[w.pct,"%"]})," of your time spent ",e,"."]})})}const k={};for(const o of e)o.client&&(k[i=o.client]??(k[i]=[])).push(o);const S=Object.entries(k).filter(([,e])=>e.length>=2);if(S.length>=2){const e=S.map(([e,n])=>{const r=Wu(n),a=new Set(n.map(e=>e.session_id)),s=t.filter(e=>a.has(e.session_id));return{name:e,rate:s.length/Math.max(r,.1),count:s.length}}).filter(e=>e.count>0);if(e.length>=2){e.sort((e,t)=>t.rate-e.rate);const t=e[0],n=kc[t.name]??t.name;l.push({priority:5,node:o.jsxs("span",{children:[o.jsx(Uu,{children:n})," is your most productive tool this period \u2014 ",t.count," ",1===t.count?"milestone":"milestones"," shipped."]})})}}const j=qu(e,"context_provided");if(null!==j&&j<3.5&&l.push({priority:4,node:o.jsxs("span",{children:["Tip: Your context score averages ",o.jsxs(Uu,{children:[j.toFixed(1),"/5"]})," \u2014 try including specific files and error messages for faster results."]})}),v.length>=3){const e=v.filter(e=>"completed"===e.evaluation.task_outcome).length,t=Math.round(e/v.length*100);100===t?l.push({priority:3,node:o.jsxs("span",{children:[o.jsx(Uu,{children:"100%"})," completion rate \u2014 every task landed."]})}):t<70&&l.push({priority:4,node:o.jsxs("span",{children:[o.jsxs(Uu,{children:[t,"%"]})," completion rate \u2014 try breaking tasks into smaller, well-scoped pieces."]})})}return p>0&&f>1.5*p&&f>=1&&l.push({priority:2,node:o.jsxs("span",{children:[o.jsxs(Uu,{children:[Math.round(100*(f/p-1)),"% more"]})," AI-paired time this period \u2014 you're leaning in."]})}),0===e.length&&l.push({priority:1,node:o.jsx("span",{className:"text-text-muted",children:"No sessions in this window. Start coding with AI to see insights here."})}),l.sort((e,t)=>t.priority-e.priority)}function Ku({sessions:e,milestones:t,windowStart:n,windowEnd:r,allSessions:a,allMilestones:s}){const i=h.useMemo(()=>{const i=Yu(e,t,a??e,s??t,n,r);return i[0]?.node??null},[e,t,a,s,n,r]);return i?o.jsx(pl.div,{initial:{opacity:0},animate:{opacity:1},className:"rounded-xl bg-bg-surface-1 border border-border/50 px-4 py-3",children:o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx(dc,{className:"w-4 h-4 text-accent flex-shrink-0 mt-0.5"}),o.jsx("p",{className:"text-sm text-text-secondary leading-relaxed",children:i})]})}):null}function Xu(e){return e>=5?"var(--color-text-muted)":e>=4?"#f59e0b":e>=3?"#f97316":"var(--color-error)"}function Qu({sessions:e}){const{scores:t,summaryLine:n}=h.useMemo(()=>{const t=e.filter(e=>null!=e.evaluation);if(0===t.length)return{scores:null,summaryLine:null};let n=0,r=0,a=0,s=0,i=0,o=0;for(const e of t){const t=e.evaluation;n+=t.prompt_quality,r+=t.context_provided,a+=t.independence_level,s+=t.scope_quality,o+=t.iteration_count,"completed"===t.task_outcome&&i++}const l=t.length,c=Math.round(i/l*100);return{scores:[{label:"Prompt Quality",value:n/l,max:5},{label:"Context",value:r/l,max:5},{label:"Independence",value:a/l,max:5},{label:"Scope",value:s/l,max:5},{label:"Completion",value:c/20,max:5}],summaryLine:\`\${l} session\${1===l?"":"s"} evaluated \xB7 \${c}% completed \xB7 avg \${(o/l).toFixed(1)} iterations\`}},[e]);return o.jsxs(pl.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.1},className:"rounded-xl bg-bg-surface-1 border border-border/50 p-4",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[o.jsx("div",{className:"p-1.5 rounded-lg bg-bg-surface-2",children:o.jsx(hc,{className:"w-3.5 h-3.5 text-text-muted"})}),o.jsx("h2",{className:"text-sm font-bold text-text-muted uppercase tracking-widest",children:"AI Proficiency"})]}),null===t?o.jsx("p",{className:"text-xs text-text-muted py-2",children:"No evaluation data yet"}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"space-y-3",children:t.map((e,t)=>{const n=e.value/e.max*100,r="Completion"===e.label?\`\${Math.round(n)}%\`:e.value>=5?"5/5":\`\${e.value.toFixed(1)}/5\`,a=e.value>=e.max;return o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("span",{className:"text-xs text-text-secondary font-medium w-28 text-right shrink-0",children:e.label}),o.jsx("div",{className:"flex-1 h-1.5 rounded-full bg-bg-surface-2/50 overflow-hidden",children:o.jsx(pl.div,{className:"h-full rounded-full",style:{backgroundColor:Xu(e.value)},initial:{width:0},animate:{width:\`\${n}%\`},transition:{duration:.6,delay:.05*t,ease:[.22,1,.36,1]}})}),o.jsx("span",{className:"text-xs font-mono w-10 text-right shrink-0 "+(a?"text-text-muted":"font-bold"),style:a?void 0:{color:Xu(e.value)},children:r})]},e.label)})}),o.jsx("p",{className:"text-[10px] text-text-muted mt-4 px-1 font-mono",children:n})]})]})}var Zu=["Output","Efficiency","Prompts","Consistency","Breadth"];function Gu(e,t,n,r,a){const s=2*Math.PI*e/5-Math.PI/2;return[n+a*t*Math.cos(s),r+a*t*Math.sin(s)]}function Ju(e,t,n,r){const a=[];for(let s=0;s<5;s++){const[i,o]=Gu(s,e,t,n,r);a.push(\`\${i},\${o}\`)}return a.join(" ")}function ed({sessions:e,milestones:t,streak:n}){const{values:r,hasEvalData:a}=h.useMemo(()=>{const r={simple:1,medium:2,complex:4};let a=0;for(const e of t)a+=r[e.complexity]??1;const s=Math.min(1,a/10),i=e.reduce((e,t)=>e+t.files_touched,0),o=e.reduce((e,t)=>e+t.duration_seconds,0)/3600,l=Math.min(1,i/Math.max(o,1)/20),c=e.filter(e=>null!=e.evaluation);let u=0;const d=c.length>0;if(d){u=c.reduce((e,t)=>e+t.evaluation.prompt_quality,0)/c.length/5}const h=Math.min(1,n/14),f=new Set;for(const t of e)for(const e of t.languages)f.add(e);return{values:[s,l,u,h,Math.min(1,f.size/5)],hasEvalData:d}},[e,t,n]),s=100,i=100,l=[];for(let o=0;o<5;o++){const e=Math.max(r[o],.02),[t,n]=Gu(o,e,s,i,70);l.push(\`\${t},\${n}\`)}const c=l.join(" ");return o.jsxs(pl.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.15},className:"rounded-xl bg-bg-surface-1 border border-border/50 p-4",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[o.jsx("div",{className:"p-1.5 rounded-lg bg-bg-surface-2",children:o.jsx(vl,{className:"w-3.5 h-3.5 text-text-muted"})}),o.jsx("h2",{className:"text-sm font-bold text-text-muted uppercase tracking-widest",children:"Skill Profile"})]}),o.jsx("div",{className:"flex justify-center",children:o.jsxs("svg",{viewBox:"0 0 200 200",width:200,height:200,className:"overflow-visible",children:[[.33,.66,1].map(e=>o.jsx("polygon",{points:Ju(e,s,i,70),fill:"none",stroke:"var(--color-bg-surface-3)",strokeWidth:.5,opacity:.6},e)),Array.from({length:5}).map((e,t)=>{const[n,r]=Gu(t,1,s,i,70);return o.jsx("line",{x1:s,y1:i,x2:n,y2:r,stroke:"var(--color-bg-surface-3)",strokeWidth:.5,opacity:.4},\`axis-\${t}\`)}),o.jsx(pl.polygon,{points:c,fill:"var(--color-accent)",fillOpacity:.2,stroke:"var(--color-accent)",strokeWidth:1.5,strokeLinejoin:"round",initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},transition:{duration:.6,ease:[.22,1,.36,1]},style:{transformOrigin:"100px 100px"}}),r.map((e,t)=>{const n=Math.max(e,.02),[r,l]=Gu(t,n,s,i,70),c=2===t&&!a;return o.jsx("circle",{cx:r,cy:l,r:2.5,fill:c?"var(--color-text-muted)":"var(--color-accent-bright)",opacity:c?.4:1},\`point-\${t}\`)}),Zu.map((e,t)=>{const n=function(e,t,n,r){const[a,s]=Gu(e,1.28,t,n,r);let i="middle";return 1!==e&&2!==e||(i="start"),3!==e&&4!==e||(i="end"),{x:a,y:s,anchor:i}}(t,s,i,70),r=2===t&&!a;return o.jsx("text",{x:n.x,y:n.y,textAnchor:n.anchor,dominantBaseline:"central",className:"text-[9px] font-medium",fill:r?"var(--color-text-muted)":"var(--color-text-secondary)",opacity:r?.5:1,children:e},e)})]})}),o.jsx("div",{className:"flex justify-center gap-3 mt-2 flex-wrap",children:Zu.map((e,t)=>{const n=2===t&&!a,s=Math.round(100*r[t]);return o.jsxs("span",{className:"text-[10px] font-mono "+(n?"text-text-muted/50":"text-text-muted"),children:[s,"%"]},e)})})]})}var td={coding:"#b4f82c",debugging:"#f87171",testing:"#60a5fa",planning:"#a78bfa",reviewing:"#34d399",documenting:"#fbbf24",learning:"#f472b6",deployment:"#fb923c",devops:"#e879f9",research:"#22d3ee",migration:"#facc15",design:"#c084fc",data:"#2dd4bf",security:"#f43f5e",configuration:"#a3e635",other:"#94a3b8"};function nd(e){if(e<60)return"<1m";const t=Math.round(e/60);if(t<60)return\`\${t}m\`;return\`\${(e/3600).toFixed(1)}h\`}function rd({byTaskType:e}){const t=Object.entries(e).filter(([,e])=>e>0).sort((e,t)=>t[1]-e[1]);if(0===t.length)return null;const n=t[0][1];return o.jsxs("div",{className:"rounded-xl bg-bg-surface-1 border border-border/50 p-4 mb-8",children:[o.jsx("h2",{className:"text-sm font-bold text-text-muted uppercase tracking-widest mb-4 px-1",children:"Task Types"}),o.jsx("div",{className:"space-y-2.5",children:t.map(([e,t],r)=>{const a=td[e]??td.other,s=t/n*100;return o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("span",{className:"text-xs text-text-secondary font-medium w-24 text-right shrink-0",children:(i=e,i.charAt(0).toUpperCase()+i.slice(1))}),o.jsx("div",{className:"flex-1 h-5 rounded bg-bg-surface-2/50 overflow-hidden",children:o.jsx(pl.div,{className:"h-full rounded",style:{backgroundColor:a},initial:{width:0},animate:{width:\`\${s}%\`},transition:{duration:.6,delay:.05*r,ease:[.22,1,.36,1]}})}),o.jsx("span",{className:"text-xs text-text-muted font-mono w-12 text-right shrink-0",children:nd(t)})]},e);var i})})]})}var ad=["#b4f82c","#60a5fa","#f87171","#a78bfa","#fbbf24","#34d399","#f472b6","#22d3ee"];function sd(e){if(e<60)return"<1m";const t=Math.round(e/60);if(t<60)return\`\${t}m\`;return\`\${(e/3600).toFixed(1)}h\`}function id({sessions:e,byProject:t}){const[n,r]=h.useState("user"),[a,s]=h.useState(!1),i=h.useMemo(()=>{const t=[];for(const o of e){if(!o.project)continue;const e=new Date(o.started_at).getTime(),n=new Date(o.ended_at).getTime();n<=e||(t.push({time:e,project:o.project,delta:1}),t.push({time:n,project:o.project,delta:-1}))}t.sort((e,t)=>e.time-t.time||e.delta-t.delta);const n={},r={};let a=0,s=0;for(const e of t){if(a>0&&e.time>s){const t=e.time-s,a=Object.keys(r).filter(e=>r[e]>0),i=a.length;if(i>0){const e=t/i;for(const t of a)n[t]=(n[t]??0)+e}}s=e.time,r[e.project]=(r[e.project]??0)+e.delta,0===r[e.project]&&delete r[e.project],a=Object.values(r).reduce((e,t)=>e+t,0)}const i={};for(const[e,o]of Object.entries(n))o>0&&(i[e]=o/1e3);return i},[e]),l="user"===n?i:t,c=h.useMemo(()=>function(e){const t=Object.entries(e).filter(([,e])=>e>0).sort((e,t)=>t[1]-e[1]);if(0===t.length)return[];const n=t.reduce((e,[,t])=>e+t,0);let r,a=0;t.length<=6?r=t:(r=t.slice(0,6),a=t.slice(6).reduce((e,[,t])=>e+t,0));const s=r.map(([e,t],r)=>({name:e,seconds:t,color:ad[r%ad.length],percentage:t/n*100}));return a>0&&s.push({name:"Other",seconds:a,color:"#64748b",percentage:a/n*100}),s}(l),[l]);if(0===c.length)return null;const u=c.reduce((e,t)=>e+t.seconds,0),d=140,f=2*Math.PI*52;let p=0;const m=c.map(e=>{const t=e.percentage/100*f,n=f-t,r=.25*f-p;return p+=t,{...e,dashLength:t,gap:n,offset:r}}),g={user:"User Time",ai:"AI Time"};return o.jsxs(pl.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.1},className:"rounded-xl bg-bg-surface-1 border border-border/50 p-4",children:[o.jsxs("div",{className:"flex items-center justify-between mb-4 px-1",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"p-1.5 rounded-lg bg-bg-surface-2",children:o.jsx(Hl,{className:"w-3.5 h-3.5 text-text-muted"})}),o.jsx("h2",{className:"text-sm font-bold text-text-muted uppercase tracking-widest",children:"Project Allocation"})]}),o.jsxs("div",{className:"relative",children:[o.jsxs("button",{onClick:()=>s(e=>!e),className:"inline-flex items-center gap-1 px-2 py-1 rounded-md border border-border/50 bg-bg-surface-2 text-[11px] text-text-secondary font-medium hover:border-text-muted/50 transition-colors",children:[g[n],o.jsx(Nl,{className:"w-3 h-3 text-text-muted"})]}),a&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>s(!1)}),o.jsx("div",{className:"absolute right-0 top-full mt-1 z-20 min-w-[120px] rounded-lg border border-border/50 bg-bg-surface-1 shadow-lg py-1",children:Object.entries(g).map(([e,t])=>o.jsx("button",{onClick:()=>{r(e),s(!1)},className:"w-full text-left px-3 py-1.5 text-xs transition-colors "+(e===n?"text-accent bg-accent/10 font-medium":"text-text-secondary hover:bg-bg-surface-2"),children:t},e))})]})]})]}),o.jsxs("div",{className:"flex flex-col sm:flex-row items-center gap-6",children:[o.jsxs("div",{className:"relative shrink-0",style:{width:d,height:d},children:[o.jsxs("svg",{width:d,height:d,viewBox:"0 0 140 140",children:[o.jsx("circle",{cx:70,cy:70,r:52,fill:"none",stroke:"var(--color-bg-surface-2, #1e293b)",strokeWidth:18,opacity:.3}),m.map((e,t)=>o.jsx(pl.circle,{cx:70,cy:70,r:52,fill:"none",stroke:e.color,strokeWidth:18,strokeDasharray:\`\${e.dashLength} \${e.gap}\`,strokeDashoffset:e.offset,strokeLinecap:"butt",initial:{opacity:0},animate:{opacity:1},transition:{duration:.5,delay:.1+.08*t,ease:[.22,1,.36,1]}},\`\${n}-\${e.name}\`))]}),o.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[o.jsx("span",{className:"text-lg font-bold text-text-primary leading-none",children:c.length}),o.jsx("span",{className:"text-[10px] text-text-muted mt-0.5",children:1===c.length?"project":"projects"})]})]}),o.jsx("div",{className:"flex-1 min-w-0 space-y-1.5 w-full",children:c.map((e,t)=>o.jsxs(pl.div,{className:"flex items-center gap-2.5",initial:{opacity:0,x:-8},animate:{opacity:1,x:0},transition:{duration:.4,delay:.15+.06*t,ease:[.22,1,.36,1]},children:[o.jsx("span",{className:"w-2.5 h-2.5 rounded-full shrink-0",style:{backgroundColor:e.color}}),o.jsx("span",{className:"text-xs text-text-secondary font-medium truncate flex-1 min-w-0",children:e.name}),o.jsx("span",{className:"text-[10px] text-text-muted font-mono shrink-0",children:sd(e.seconds)}),o.jsxs("span",{className:"text-[10px] text-text-muted/70 font-mono w-10 text-right shrink-0",children:[e.percentage.toFixed(0),"%"]})]},e.name))})]}),o.jsx("div",{className:"mt-4 flex h-2 rounded-full overflow-hidden bg-bg-surface-2/30",children:c.map(e=>{const t=u>0?e.seconds/u*100:0;return 0===t?null:o.jsx(pl.div,{className:"h-full",style:{backgroundColor:e.color},initial:{width:0},animate:{width:\`\${t}%\`},transition:{duration:.8,ease:[.22,1,.36,1]}},e.name)})})]})}var od={feature:"bg-success/10 text-success border-success/20",bugfix:"bg-error/10 text-error border-error/20",refactor:"bg-purple/10 text-purple border-purple/20",test:"bg-blue/10 text-blue border-blue/20",docs:"bg-accent/10 text-accent border-accent/20",setup:"bg-text-muted/10 text-text-muted border-text-muted/20",deployment:"bg-emerald/10 text-emerald border-emerald/20"};function ld(e){const t=Date.now()-new Date(e).getTime(),n=Math.floor(t/6e4);if(n<1)return"just now";if(n<60)return\`\${n}m ago\`;const r=Math.floor(n/60);if(r<24)return\`\${r}h ago\`;const a=Math.floor(r/24);return 1===a?"yesterday":a<7?\`\${a}d ago\`:new Date(e).toLocaleDateString([],{month:"short",day:"numeric"})}function cd({milestones:e,showPublic:t=!1}){const n=[...e].sort((e,t)=>new Date(t.created_at).getTime()-new Date(e.created_at).getTime()).slice(0,8);return o.jsxs(pl.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{duration:.35,ease:[.22,1,.36,1]},className:"rounded-xl bg-bg-surface-1 border border-border/50 p-4",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-3 px-1",children:[o.jsx(gc,{className:"w-4 h-4 text-accent"}),o.jsx("h2",{className:"text-sm font-bold text-text-muted uppercase tracking-widest",children:"Recent Achievements"}),o.jsxs("span",{className:"text-[10px] text-text-muted font-mono bg-bg-surface-2 px-2 py-0.5 rounded ml-auto",children:[e.length," total"]})]}),0===n.length?o.jsx("div",{className:"text-sm text-text-muted text-center py-6",children:"No milestones yet \u2014 complete your first session!"}):o.jsx("div",{className:"space-y-0.5",children:n.map((e,n)=>{const r=Cc[e.category]??"#9c9588",a=od[e.category]??"bg-bg-surface-2 text-text-secondary border-border",s=Sc[e.client]??e.client.slice(0,2).toUpperCase(),i=wc[e.client]??"#91919a",l=t?e.title:e.private_title||e.title,c="complex"===e.complexity;return o.jsxs(pl.div,{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},transition:{duration:.25,delay:.04*n},className:"flex items-center gap-3 py-2 px-2 rounded-lg hover:bg-bg-surface-2/40 transition-colors",children:[o.jsx("div",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:r}}),o.jsx("span",{className:"text-sm font-medium text-text-secondary hover:text-text-primary truncate flex-1 min-w-0",children:l}),o.jsx("span",{className:\`text-[9px] uppercase tracking-wider font-bold px-1.5 py-0.5 rounded-full border flex-shrink-0 \${a}\`,children:e.category}),c&&o.jsxs("span",{className:"flex items-center gap-0.5 text-[9px] uppercase tracking-wider font-bold px-1.5 py-0.5 rounded-full border bg-purple/10 text-purple border-purple/20 flex-shrink-0",children:[o.jsx(vl,{className:"w-2.5 h-2.5"}),"complex"]}),o.jsx("span",{className:"text-[10px] text-text-muted font-mono flex-shrink-0",children:ld(e.created_at)}),o.jsx("div",{className:"w-5 h-5 rounded flex items-center justify-center text-[8px] font-bold font-mono flex-shrink-0",style:{backgroundColor:\`\${i}15\`,color:i,border:\`1px solid \${i}20\`},children:s})]},e.id)})})]})}function ud(e){const t=e/3600;return t<1?\`\${Math.round(60*t)}m\`:\`\${t.toFixed(1)}h\`}function dd(e,t){return Object.entries(e).sort((e,t)=>t[1]-e[1]).slice(0,t)}function hd({label:e,children:t}){return o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("span",{className:"text-[10px] text-text-muted uppercase tracking-widest font-bold whitespace-nowrap",children:e}),o.jsx("div",{className:"flex items-center gap-1.5 overflow-x-auto pb-1 no-scrollbar",children:t})]})}function fd({stats:e}){const t=dd(e.byClient,4),n=dd(e.byLanguage,4);return 0===t.length&&0===n.length?null:o.jsxs("div",{className:"flex flex-col gap-4 mb-8 p-4 rounded-xl bg-bg-surface-1/30 border border-border/50",children:[t.length>0&&o.jsx(hd,{label:"Top Clients",children:t.map(([e,t])=>{const n=wc[e];return o.jsxs("span",{className:"text-[11px] font-mono px-2.5 py-1 rounded-full bg-bg-surface-1 border border-border hover:border-accent/40 transition-colors shadow-sm whitespace-nowrap group cursor-default",style:n?{borderLeftWidth:"3px",borderLeftColor:n}:void 0,title:ud(t),children:[kc[e]??e,o.jsx("span",{className:"ml-1.5 text-text-muted opacity-0 group-hover:opacity-100 transition-opacity",children:ud(t)})]},e)})}),n.length>0&&o.jsx(hd,{label:"Languages",children:n.map(([e,t])=>o.jsxs("span",{className:"text-[11px] font-mono px-2.5 py-1 rounded-full bg-bg-surface-1 border border-border hover:border-accent/40 transition-colors shadow-sm whitespace-nowrap group cursor-default",title:ud(t),children:[e,o.jsx("span",{className:"ml-1.5 text-text-muted opacity-0 group-hover:opacity-100 transition-opacity",children:ud(t)})]},e))})]})}function pd(e,t,n){try{const n="undefined"!=typeof window?localStorage.getItem(e):null;if(n&&t.includes(n))return n}catch{}return n}function md(e,t){try{localStorage.setItem(e,t)}catch{}}function gd({sessions:e,milestones:t,onDeleteSession:n,onDeleteConversation:r,onDeleteMilestone:a,defaultTimeScale:s="day",activeTab:i,onActiveTabChange:l}){const[c,u]=h.useState(null),[d,f]=h.useState(()=>pd("useai-time-scale",Ic,s)),[p,m]=h.useState({category:"all",client:"all",project:"all",language:"all"}),[g,x]=h.useState(()=>pd("useai-active-tab",["sessions","insights"],"sessions")),[y,v]=h.useState(null),[b,w]=h.useState(!1),[k,S]=h.useState(!1),j=void 0!==i,N=i??g,C=h.useCallback(e=>{l?l(e):(md("useai-active-tab",e),x(e))},[l]),T=h.useCallback(e=>{md("useai-time-scale",e),f(e)},[]),E=h.useCallback((e,t)=>{m(n=>({...n,[e]:t}))},[]);h.useEffect(()=>{if(null===c){const e=$c[d];e&&T(e)}},[c,d,T]);const M=null===c,P=c??Date.now(),{start:L,end:D}=Wc(d,P),A=h.useMemo(()=>function(e,t,n){return e.filter(e=>{const r=Lc(e.started_at),a=Lc(e.ended_at);return r<=n&&a>=t})}(e,L,D),[e,L,D]),_=h.useMemo(()=>function(e,t,n){return e.filter(e=>{const r=Lc(e.created_at);return r>=t&&r<=n})}(t,L,D),[t,L,D]),z=h.useMemo(()=>function(e,t=[]){let n=0,r=0;const a={},s={},i={},o={};for(const x of e){n+=x.duration_seconds,r+=x.files_touched,a[x.client]=(a[x.client]??0)+x.duration_seconds;for(const e of x.languages)s[e]=(s[e]??0)+x.duration_seconds;i[x.task_type]=(i[x.task_type]??0)+x.duration_seconds,x.project&&(o[x.project]=(o[x.project]??0)+x.duration_seconds)}let l=0,c=0,u=0,d=0;if(e.length>0){let t=1/0,r=-1/0;const a=[];for(const n of e){const e=Lc(n.started_at),s=Lc(n.ended_at),i=1e3*(n.duration_seconds??0),o=i>0&&s-e>i+6e5?e+i:s;e<t&&(t=e),o>r&&(r=o),a.push({time:e,delta:1}),a.push({time:o,delta:-1})}l=(r-t)/36e5,a.sort((e,t)=>e.time-t.time||e.delta-t.delta);let s=0,i=0,o=0;for(const e of a){const t=s>0;s+=e.delta,s>d&&(d=s),!t&&s>0?o=e.time:t&&0===s&&(i+=e.time-o)}c=i/36e5,u=c>0?n/3600/c:0}const h=function(e){let t=0,n=0,r=0;for(const a of e)"feature"===a.category&&t++,"bugfix"===a.category&&n++,"complex"===a.complexity&&r++;return{featuresShipped:t,bugsFixed:n,complexSolved:r}}(t),f=e.filter(e=>e.evaluation&&"object"==typeof e.evaluation),p=f.filter(e=>"completed"===e.evaluation.task_outcome).length,m=f.length>0?Math.round(p/f.length*100):0,g=Object.keys(o).length;return{totalHours:n/3600,totalSessions:e.length,actualSpanHours:l,coveredHours:c,aiMultiplier:u,peakConcurrency:d,currentStreak:Dc(e),filesTouched:Math.round(r),...h,totalMilestones:t.length,completionRate:m,activeProjects:g,byClient:a,byLanguage:s,byTaskType:i,byProject:o}}(A,_),[A,_]),R=h.useMemo(()=>Dc(e),[e]),F=h.useMemo(()=>{const t=function(e,t,n){let r=0,a=0;for(const s of e){const e=Lc(s.ended_at),i=Lc(s.started_at);e<t?r++:i>n&&a++}return{before:r,after:a}}(e,L,D);if(M&&0===t.before)return;const n=Uc[d],r=e=>new Date(e).toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0}),a=Bc(d)||D-L>=864e5?e=>\`\${new Date(e).toLocaleDateString([],{month:"short",day:"numeric"})} \${r(e)}\`:r,s=qc(d,P,-1),i=Wc(d,s),o=\`View prev \${n} \xB7 \${a(i.start)} \u2013 \${a(i.end)}\`;if(M)return{before:t.before,after:0,olderLabel:o};const l=qc(d,P,1),c=Wc(d,l);return{...t,newerLabel:\`View next \${n} \xB7 \${a(c.start)} \u2013 \${a(c.end)}\`,olderLabel:o}},[e,L,D,P,M,d]),V=h.useCallback(()=>{const e=qc(d,P,1);Yc(d,e)?u(null):u(e)},[P,d]),I=h.useCallback(()=>{const e=qc(d,P,-1);u(e)},[P,d]),O=h.useMemo(()=>{if(!M)return new Date(P).toISOString().slice(0,10)},[M,P]),$=h.useMemo(()=>{let e=0,t=0,n=0;for(const r of _)"simple"===r.complexity?e++:"medium"===r.complexity?t++:"complex"===r.complexity&&n++;return{simple:e,medium:t,complex:n}},[_]),B=h.useCallback(e=>{const t=new Date(\`\${e}T12:00:00\`).getTime();u(t),T("day")},[T]),H="all"!==p.client||"all"!==p.language||"all"!==p.project;return o.jsxs("div",{className:"space-y-3",children:[o.jsx(Hu,{value:c,onChange:u,scale:d,onScaleChange:T,sessions:e,milestones:t,showPublic:b}),o.jsx(Xc,{totalHours:z.totalHours,totalSessions:z.totalSessions,actualSpanHours:z.actualSpanHours,coveredHours:z.coveredHours,aiMultiplier:z.aiMultiplier,peakConcurrency:z.peakConcurrency,currentStreak:R,filesTouched:z.filesTouched,featuresShipped:z.featuresShipped,bugsFixed:z.bugsFixed,complexSolved:z.complexSolved,totalMilestones:z.totalMilestones,completionRate:z.completionRate,activeProjects:z.activeProjects,selectedCard:y,onCardClick:v}),o.jsx(Jc,{type:y,milestones:_,showPublic:b,onClose:()=>v(null)}),o.jsx(ou,{type:y,sessions:A,allSessions:e,currentStreak:R,stats:{totalHours:z.totalHours,coveredHours:z.coveredHours,aiMultiplier:z.aiMultiplier,peakConcurrency:z.peakConcurrency},showPublic:b,onClose:()=>v(null)}),!j&&o.jsx(mu,{activeTab:N,onTabChange:C}),"sessions"===N&&o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex items-center justify-between px-1 pt-0.5",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("h2",{className:"text-sm font-bold text-text-muted uppercase tracking-widest",children:"Activity Feed"}),o.jsxs("span",{className:"text-[10px] text-text-muted font-mono bg-bg-surface-2 px-2 py-0.5 rounded",children:[A.length," Sessions"]})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsxs("button",{onClick:()=>w(e=>!e),className:"inline-flex items-center gap-1.5 px-2.5 py-1.5 rounded-md border transition-all duration-200 "+(b?"bg-success/10 border-success/30 text-success":"bg-bg-surface-1 border-border/50 text-text-muted hover:text-text-primary hover:border-text-muted/50"),title:b?"Showing public titles":"Showing private titles","aria-label":b?"Switch to private titles":"Switch to public titles",children:[b?o.jsx(Il,{className:"w-3.5 h-3.5"}):o.jsx(Vl,{className:"w-3.5 h-3.5"}),o.jsx("span",{className:"hidden sm:inline text-xs font-medium",children:b?"Public":"Private"})]}),o.jsxs("button",{onClick:()=>S(e=>!e),className:"inline-flex items-center gap-1.5 px-2.5 py-1.5 rounded-md border transition-all duration-200 "+(k||H?"bg-accent/10 border-accent/30 text-accent":"bg-bg-surface-1 border-border/50 text-text-muted hover:text-text-primary hover:border-text-muted/50"),title:k?"Hide filters":"Show filters","aria-label":k?"Hide filters":"Show filters",children:[o.jsx($l,{className:"w-3.5 h-3.5"}),o.jsx("span",{className:"hidden sm:inline text-xs font-medium",children:"Filters"})]})]})]}),k&&o.jsx(xu,{sessions:A,filters:p,onFilterChange:E}),o.jsx(_u,{sessions:A,milestones:_,filters:p,globalShowPublic:b,showFullDate:"week"===d||"7d"===d||"month"===d||"30d"===d,outsideWindowCounts:F,onNavigateNewer:V,onNavigateOlder:I,onDeleteSession:n,onDeleteConversation:r,onDeleteMilestone:a})]}),"insights"===N&&o.jsxs("div",{className:"space-y-4 pt-2",children:[o.jsx(Ku,{sessions:A,milestones:_,isLive:M,windowStart:L,windowEnd:D,allSessions:e,allMilestones:t}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsx(Qu,{sessions:A}),o.jsx(ed,{sessions:A,milestones:_,streak:R})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsx(Rc,{data:$}),o.jsx(id,{sessions:A,byProject:z.byProject})]}),o.jsx(rd,{byTaskType:z.byTaskType}),o.jsx(_c,{sessions:e,timeScale:d,effectiveTime:P,isLive:M,onDayClick:B,highlightDate:O}),o.jsx(cd,{milestones:_,showPublic:b}),o.jsx(fd,{stats:z})]})]})}function xd({className:e}){return o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 611.54 143.47",className:e,children:[o.jsxs("g",{fill:"var(--text-primary)",children:[o.jsx("path",{d:"M21.4,121.85c-4.57-4.57-6.85-10.02-6.85-16.37V17.23c0-3.1,1.55-4.65,4.64-4.65h25.55c3.1,0,4.65,1.55,4.65,4.65v76.64c0,3.25,1.12,6,3.37,8.25,2.24,2.25,4.99,3.37,8.25,3.37h27.87c3.25,0,6-1.12,8.25-3.37,2.24-2.24,3.37-4.99,3.37-8.25V17.23c0-3.1,1.55-4.65,4.64-4.65h25.55c3.1,0,4.65,1.55,4.65,4.65v88.25c0,6.35-2.29,11.81-6.85,16.37-4.57,4.57-10.03,6.85-16.37,6.85H37.78c-6.35,0-11.81-2.28-16.37-6.85Z"}),o.jsx("path",{d:"M146.93,124.06v-13.93c0-3.1,1.55-4.65,4.64-4.65h69.67c3.25,0,6-1.12,8.25-3.37,2.24-2.24,3.37-4.99,3.37-8.25s-1.12-6-3.37-8.25c-2.25-2.24-4.99-3.37-8.25-3.37h-51.09c-6.35,0-11.81-2.28-16.37-6.85-4.57-4.57-6.85-10.02-6.85-16.37v-23.22c0-6.35,2.28-11.81,6.85-16.37,4.56-4.57,10.02-6.85,16.37-6.85h92.9c3.1,0,4.65,1.55,4.65,4.65v13.94c0,3.1-1.55,4.65-4.65,4.65h-69.67c-3.25,0-6,1.12-8.25,3.37-2.25,2.25-3.37,4.99-3.37,8.25s1.12,6,3.37,8.25c2.24,2.25,4.99,3.37,8.25,3.37h51.09c6.35,0,11.8,2.29,16.37,6.85,4.57,4.57,6.85,10.03,6.85,16.37v23.22c0,6.35-2.29,11.81-6.85,16.37-4.57,4.57-10.03,6.85-16.37,6.85h-92.9c-3.1,0-4.64-1.55-4.64-4.65Z"}),o.jsx("path",{d:"M286.16,121.85c-4.57-4.57-6.85-10.02-6.85-16.37V35.81c0-6.35,2.28-11.81,6.85-16.37,4.56-4.57,10.02-6.85,16.37-6.85h74.32c6.35,0,11.8,2.29,16.37,6.85,4.57,4.57,6.85,10.03,6.85,16.37v23.22c0,6.35-2.29,11.81-6.85,16.37-4.57,4.57-10.03,6.85-16.37,6.85h-62.71v11.61c0,3.25,1.12,6,3.37,8.25,2.24,2.25,4.99,3.37,8.25,3.37h69.67c3.1,0,4.65,1.55,4.65,4.65v13.93c0,3.1-1.55,4.65-4.65,4.65h-92.9c-6.35,0-11.81-2.28-16.37-6.85ZM361.87,55.66c2.24-2.24,3.37-4.99,3.37-8.25s-1.12-6-3.37-8.25c-2.25-2.24-4.99-3.37-8.25-3.37h-27.87c-3.25,0-6,1.12-8.25,3.37-2.25,2.25-3.37,4.99-3.37,8.25v11.61h39.48c3.25,0,6-1.12,8.25-3.37Z"})]}),o.jsxs("g",{fill:"var(--accent)",children:[o.jsx("path",{d:"M432.08,126.44c-4.76-4.76-7.14-10.44-7.14-17.06v-24.2c0-6.61,2.38-12.3,7.14-17.06,4.76-4.76,10.44-7.14,17.06-7.14h65.34v-12.1c0-3.39-1.17-6.25-3.51-8.59-2.34-2.34-5.2-3.51-8.59-3.51h-72.6c-3.23,0-4.84-1.61-4.84-4.84v-14.52c0-3.23,1.61-4.84,4.84-4.84h96.8c6.61,0,12.3,2.38,17.06,7.14,4.76,4.76,7.14,10.45,7.14,17.06v72.6c0,6.62-2.38,12.3-7.14,17.06-4.76,4.76-10.45,7.14-17.06,7.14h-77.44c-6.62,0-12.3-2.38-17.06-7.14ZM510.97,105.87c2.34-2.34,3.51-5.2,3.51-8.59v-12.1h-41.14c-3.39,0-6.25,1.17-8.59,3.51-2.34,2.34-3.51,5.2-3.51,8.59s1.17,6.25,3.51,8.59c2.34,2.34,5.2,3.51,8.59,3.51h29.04c3.39,0,6.25-1.17,8.59-3.51Z"}),o.jsx("path",{d:"M562.87,128.74V17.42c0-3.23,1.61-4.84,4.84-4.84h26.62c3.23,0,4.84,1.61,4.84,4.84v111.32c0,3.23-1.61,4.84-4.84,4.84h-26.62c-3.23,0-4.84-1.61-4.84-4.84Z"})]})]})}var yd={category:"all",client:"all",project:"all",language:"all"};function vd({open:e,onClose:t,sessions:n,milestones:r,onDeleteSession:a,onDeleteConversation:s,onDeleteMilestone:i}){const[l,c]=h.useState(""),[u,d]=h.useState(""),[f,p]=h.useState(!1),m=h.useRef(null);h.useEffect(()=>{e&&(c(""),d(""),requestAnimationFrame(()=>m.current?.focus()))},[e]),h.useEffect(()=>{if(!e)return;const t=document.documentElement;return t.style.overflow="hidden",document.body.style.overflow="hidden",()=>{t.style.overflow="",document.body.style.overflow=""}},[e]),h.useEffect(()=>{if(!e)return;const n=e=>{"Escape"===e.key&&t()};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[e,t]),h.useEffect(()=>{const e=setTimeout(()=>d(l),250);return()=>clearTimeout(e)},[l]);const g=h.useMemo(()=>{const e=new Map;for(const t of r){const n=e.get(t.session_id);n?n.push(t):e.set(t.session_id,[t])}return e},[r]),{filteredSessions:x,filteredMilestones:y,highlightWords:v}=h.useMemo(()=>{const e=u.trim().toLowerCase();if(!e)return{filteredSessions:[],filteredMilestones:[],highlightWords:[]};const t=e.split(/\\s+/),a=n.filter(e=>function(e,t,n,r){const a=(r?[e.title,e.client,e.task_type,...e.languages,...t.map(e=>e.title)]:[e.private_title,e.title,e.client,e.task_type,...e.languages,...t.map(e=>e.private_title),...t.map(e=>e.title)]).filter(Boolean).join(" ").toLowerCase();return n.every(e=>a.includes(e))}(e,g.get(e.session_id)??[],t,f)),s=new Set(a.map(e=>e.session_id));return{filteredSessions:a,filteredMilestones:r.filter(e=>s.has(e.session_id)),highlightWords:t}},[n,r,g,u,f]),b=u.trim().length>0;return o.jsx(Qi,{children:e&&o.jsxs(o.Fragment,{children:[o.jsx(pl.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},className:"fixed inset-0 bg-black/40 backdrop-blur-sm z-[60]",onClick:t}),o.jsx(pl.div,{initial:{opacity:0,scale:.96},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.96},transition:{duration:.15},className:"fixed inset-0 z-[61] flex items-start justify-center pt-[10vh] px-4 pointer-events-none",children:o.jsxs("div",{className:"w-full max-w-2xl bg-bg-base border border-border/50 rounded-xl shadow-2xl flex flex-col max-h-[75vh] pointer-events-auto",onClick:e=>e.stopPropagation(),children:[o.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-border/50",children:[o.jsx(lc,{className:"w-4 h-4 text-text-muted flex-shrink-0"}),o.jsx("input",{ref:m,type:"text",value:l,onChange:e=>c(e.target.value),placeholder:f?"Search public titles...":"Search all sessions and milestones...",className:"flex-1 bg-transparent text-sm text-text-primary placeholder:text-text-muted/50 outline-none"}),l&&o.jsx("button",{onClick:()=>{c(""),m.current?.focus()},className:"p-1 rounded-md hover:bg-bg-surface-2 text-text-muted hover:text-text-primary transition-colors",children:o.jsx(vc,{className:"w-3.5 h-3.5"})}),o.jsx("button",{onClick:()=>p(e=>!e),className:"p-1.5 rounded-md border transition-all duration-200 flex-shrink-0 "+(f?"bg-success/10 border-success/30 text-success":"bg-bg-surface-1 border-border/50 text-text-muted hover:text-text-primary hover:border-text-muted/50"),title:f?"Searching public titles":"Searching private titles",children:f?o.jsx(Il,{className:"w-3.5 h-3.5"}):o.jsx(Vl,{className:"w-3.5 h-3.5"})}),o.jsx("kbd",{className:"hidden sm:inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded border border-border bg-bg-surface-1 text-[10px] font-mono text-text-muted",children:"esc"})]}),o.jsx("div",{className:"flex-1 overflow-y-auto overscroll-none px-4 py-3",children:b?0===x.length?o.jsxs("div",{className:"text-center py-12 text-sm text-text-muted/60",children:["No results for \u201C",u.trim(),"\u201D"]}):o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"text-[10px] font-mono text-text-muted uppercase tracking-wider mb-3 px-1",children:[x.length," result",1!==x.length?"s":""]}),o.jsx(_u,{sessions:x,milestones:y,filters:yd,globalShowPublic:f||void 0,showFullDate:!0,highlightWords:v,onDeleteSession:a,onDeleteConversation:s,onDeleteMilestone:i})]}):o.jsx("div",{className:"text-center py-12 text-sm text-text-muted/60",children:"Type to search across all sessions"})})]})})]})})}let bd=new Set;const wd=(kd=(e,t)=>({sessions:[],milestones:[],config:null,health:null,updateInfo:null,loading:!0,timeTravelTime:null,timeScale:(()=>{try{const e=localStorage.getItem("useai-time-scale"),t=[...Ic];if(e&&t.includes(e))return e}catch{}return"day"})(),filters:{category:"all",client:"all",project:"all",language:"all"},activeTab:(()=>{try{const e=localStorage.getItem("useai-active-tab");if("sessions"===e||"insights"===e||"settings"===e||"logs"===e)return e}catch{}return"sessions"})(),loadAll:async()=>{try{const[t,n,r]=await Promise.all([_("/api/local/sessions"),_("/api/local/milestones"),V()]);e({sessions:bd.size>0?t.filter(e=>!bd.has(e.session_id)):t,milestones:bd.size>0?n.filter(e=>!bd.has(e.session_id)):n,config:r,loading:!1})}catch{e({loading:!1})}},loadHealth:async()=>{try{const t=await _("/health");e({health:t})}catch{}},loadUpdateCheck:async()=>{try{const t=await _("/api/local/update-check");e({updateInfo:t})}catch{}},setTimeTravelTime:t=>e({timeTravelTime:t}),setTimeScale:t=>{try{localStorage.setItem("useai-time-scale",t)}catch{}e({timeScale:t})},setFilter:(t,n)=>e(e=>({filters:{...e.filters,[t]:n}})),setActiveTab:t=>{try{localStorage.setItem("useai-active-tab",t)}catch{}e({activeTab:t})},deleteSession:async n=>{bd.add(n),e({sessions:t().sessions.filter(e=>e.session_id!==n),milestones:t().milestones.filter(e=>e.session_id!==n)});try{await function(e){return F(\`/api/local/sessions/\${encodeURIComponent(e)}\`)}(n)}catch(r){console.error("Failed to delete session:",n,r),t().loadAll()}finally{bd.delete(n)}},deleteConversation:async n=>{const r=new Set(t().sessions.filter(e=>e.conversation_id===n).map(e=>e.session_id));for(const e of r)bd.add(e);e({sessions:t().sessions.filter(e=>e.conversation_id!==n),milestones:t().milestones.filter(e=>!r.has(e.session_id))});try{await function(e){return F(\`/api/local/conversations/\${encodeURIComponent(e)}\`)}(n)}catch(a){console.error("Failed to delete conversation:",n,a),t().loadAll()}finally{for(const e of r)bd.delete(e)}},deleteMilestone:async n=>{e({milestones:t().milestones.filter(e=>e.id!==n)});try{await function(e){return F(\`/api/local/milestones/\${encodeURIComponent(e)}\`)}(n)}catch(r){console.error("Failed to delete milestone:",n,r),t().loadAll()}}}))?A(kd):A;var kd;const Sd=/^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/;function jd(e){if(!e)return"Never synced";const t=Date.now()-new Date(e).getTime(),n=Math.floor(t/6e4);if(n<1)return"Just now";if(n<60)return\`\${n}m ago\`;const r=Math.floor(n/60);if(r<24)return\`\${r}h ago\`;return\`\${Math.floor(r/24)}d ago\`}function Nd({config:e,onRefresh:t}){const n=!!e.username,[r,a]=h.useState(!n),[s,i]=h.useState(e.username??""),[l,c]=h.useState("idle"),[u,d]=h.useState(),[f,p]=h.useState(!1),m=h.useRef(void 0),g=h.useRef(void 0);h.useEffect(()=>{e.username&&(a(!1),i(e.username))},[e.username]);const x=h.useCallback(t=>{const n=function(e){return e.toLowerCase().replace(/[^a-z0-9-]/g,"")}(t);if(i(n),d(void 0),m.current&&clearTimeout(m.current),g.current&&g.current.abort(),!n)return void c("idle");const r=function(e){return 0===e.length?{valid:!1}:e.length<3?{valid:!1,reason:"At least 3 characters"}:e.length>32?{valid:!1,reason:"At most 32 characters"}:Sd.test(e)?{valid:!0}:{valid:!1,reason:"No leading/trailing hyphens"}}(n);if(!r.valid)return c("invalid"),void d(r.reason);n!==e.username?(c("checking"),m.current=setTimeout(async()=>{g.current=new AbortController;try{const e=await async function(e){return _(\`/api/local/users/check-username/\${encodeURIComponent(e)}\`)}(n);e.available?(c("available"),d(void 0)):(c("taken"),d(e.reason))}catch{c("invalid"),d("Check failed")}},400)):c("idle")},[e.username]),y=h.useCallback(async()=>{if("available"===l){p(!0);try{await async function(e){return R("/api/local/users/me",{username:e})}(s),t()}catch(e){c("invalid"),d(e.message)}finally{p(!1)}}},[s,l,t]),v=h.useCallback(()=>{a(!1),i(e.username??""),c("idle"),d(void 0)},[e.username]),b=h.useCallback(()=>{a(!0),i(e.username??""),c("idle"),d(void 0)},[e.username]);return!r&&n?o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Kl,{className:"w-3.5 h-3.5 text-text-muted"}),o.jsxs("a",{href:\`https://useai.dev/\${e.username}\`,target:"_blank",rel:"noopener noreferrer",className:"text-xs font-bold text-accent hover:text-accent-bright transition-colors",children:["useai.dev/",e.username]}),o.jsx("button",{onClick:b,className:"p-1 rounded hover:bg-bg-surface-2 text-text-muted hover:text-text-primary transition-colors cursor-pointer",title:"Edit username",children:o.jsx(nc,{className:"w-3 h-3"})})]}):o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-xs text-text-muted whitespace-nowrap",children:"useai.dev/"}),o.jsx("div",{className:"flex items-center bg-bg-base border border-border rounded-lg overflow-hidden focus-within:border-accent/50 transition-all",children:o.jsx("input",{type:"text",placeholder:"username",value:s,onChange:e=>x(e.target.value),onKeyDown:e=>"Enter"===e.key&&y(),autoFocus:r,maxLength:32,className:"px-2 py-1.5 text-xs bg-transparent text-text-primary outline-none w-28 placeholder:text-text-muted/50"})}),o.jsxs("div",{className:"w-4 h-4 flex items-center justify-center",children:["checking"===l&&o.jsx(Xl,{className:"w-3.5 h-3.5 text-text-muted animate-spin"}),"available"===l&&o.jsx(jl,{className:"w-3.5 h-3.5 text-success"}),("taken"===l||"invalid"===l)&&s.length>0&&o.jsx(vc,{className:"w-3.5 h-3.5 text-error"})]}),o.jsx("button",{onClick:y,disabled:"available"!==l||f,className:"px-3 py-1.5 bg-accent hover:bg-accent-bright text-bg-base text-[10px] font-bold uppercase tracking-wider rounded-lg transition-colors disabled:opacity-30 cursor-pointer",children:f?"...":n?"Save":"Claim"}),n&&o.jsx("button",{onClick:v,className:"px-2 py-1.5 text-[10px] font-bold uppercase tracking-wider text-text-muted hover:text-text-primary transition-colors cursor-pointer",children:"Cancel"}),u&&o.jsx("span",{className:"text-[10px] text-error/80 truncate max-w-[140px]",title:u,children:u})]})}const Cd=h.forwardRef(function({config:e,onRefresh:t,onTabChange:n},r){const[a,s]=h.useState(!1),[i,l]=h.useState(""),[c,u]=h.useState(""),[d,f]=h.useState("email"),[p,m]=h.useState(!1),[g,x]=h.useState(null),y=h.useRef(null);h.useImperativeHandle(r,()=>({open:()=>s(!0)})),h.useEffect(()=>{if(!a)return;const e=e=>{y.current&&!y.current.contains(e.target)&&s(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[a]),h.useEffect(()=>{if(!a)return;const e=e=>{"Escape"===e.key&&s(!1)};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[a]);const v=h.useCallback(async()=>{if(i.includes("@")){m(!0),x(null);try{await function(e){return z("/api/local/auth/send-otp",{email:e})}(i),f("otp")}catch(e){x(e.message)}finally{m(!1)}}},[i]),b=h.useCallback(async()=>{if(/^\\d{6}$/.test(c)){m(!0),x(null);try{await async function(e,t){return z("/api/local/auth/verify-otp",{email:e,code:t})}(i,c),t(),s(!1)}catch(e){x(e.message)}finally{m(!1)}}},[i,c,t]),w=h.useCallback(async()=>{m(!0),x(null);try{const e=await async function(){return z("/api/local/sync")}();e.success?(x("Synced!"),t(),setTimeout(()=>x(null),3e3)):x(e.error??"Sync failed")}catch(e){x(e.message)}finally{m(!1)}},[t]),k=h.useCallback(async()=>{await async function(){return z("/api/local/auth/logout")}(),t(),s(!1)},[t]);if(!e)return null;const S=e.authenticated;return o.jsxs("div",{className:"relative",ref:y,children:[S?o.jsxs("button",{onClick:()=>s(e=>!e),className:"flex items-center gap-1.5 rounded-full transition-colors cursor-pointer hover:opacity-80",children:[o.jsxs("div",{className:"relative w-7 h-7 rounded-full bg-accent/15 border border-accent/30 flex items-center justify-center",children:[o.jsx("span",{className:"text-xs font-bold text-accent leading-none",children:(e.email?.[0]??"?").toUpperCase()}),o.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 w-2.5 h-2.5 rounded-full border-2 border-bg-base "+(e.last_sync_at?"bg-success":"bg-warning")})]}),o.jsx(Nl,{className:"w-3 h-3 text-text-muted transition-transform "+(a?"rotate-180":"")})]}):o.jsxs("button",{onClick:()=>s(e=>!e),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-md bg-accent hover:bg-accent-bright text-bg-base text-xs font-bold tracking-wide transition-colors cursor-pointer",children:[o.jsx(xc,{className:"w-3 h-3"}),"Sign in"]}),a&&o.jsx("div",{className:"absolute right-0 top-full mt-2 z-50 w-80 rounded-lg bg-bg-surface-1 border border-border shadow-lg",children:S?o.jsxs("div",{children:[o.jsx("div",{className:"px-4 pt-3 pb-2",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"w-8 h-8 rounded-full bg-accent/10 flex items-center justify-center border border-accent/20 shrink-0",children:o.jsx("span",{className:"text-sm font-bold text-accent",children:(e.email?.[0]??"?").toUpperCase()})}),o.jsx("div",{className:"flex flex-col min-w-0",children:o.jsx("span",{className:"text-xs font-bold text-text-primary truncate",children:e.email})})]})}),o.jsx("div",{className:"px-4 py-2 border-t border-border/50",children:o.jsx(Nd,{config:e,onRefresh:t})}),o.jsx("div",{className:"px-4 py-2 border-t border-border/50",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("span",{className:"text-[10px] text-text-muted font-mono uppercase tracking-tighter",children:["Last sync: ",jd(e.last_sync_at)]}),o.jsxs("div",{className:"flex items-center gap-2",children:[g&&o.jsx("span",{className:"text-[10px] font-bold uppercase tracking-widest "+("Synced!"===g?"text-success":"text-error"),children:g}),o.jsxs("button",{onClick:w,disabled:p,className:"flex items-center gap-1.5 px-2.5 py-1 bg-accent hover:bg-accent-bright text-bg-base text-[10px] font-bold uppercase tracking-wider rounded-md transition-colors disabled:opacity-50 cursor-pointer",children:[o.jsx(rc,{className:"w-3 h-3 "+(p?"animate-spin":"")}),p?"...":"Sync"]})]})]})}),o.jsxs("div",{className:"px-4 py-2 border-t border-border/50 space-y-0.5",children:[o.jsxs("button",{onClick:()=>{n?.("logs"),s(!1)},className:"flex items-center gap-2 w-full px-2 py-1.5 rounded-md text-xs text-text-muted hover:text-text-primary hover:bg-bg-surface-2 transition-colors cursor-pointer",children:[o.jsx(oc,{className:"w-3.5 h-3.5"}),"Sync logs"]}),o.jsxs("button",{onClick:k,className:"flex items-center gap-2 w-full px-2 py-1.5 rounded-md text-xs text-text-muted hover:text-error hover:bg-error/10 transition-colors cursor-pointer",children:[o.jsx(Gl,{className:"w-3.5 h-3.5"}),"Sign out"]})]})]}):o.jsxs("div",{className:"p-4",children:[o.jsx("p",{className:"text-xs font-bold text-text-secondary uppercase tracking-widest mb-3",children:"Sign in to sync"}),g&&o.jsx("p",{className:"text-[10px] font-bold text-error uppercase tracking-widest mb-2",children:g}),"email"===d?o.jsxs("div",{className:"flex items-center bg-bg-base border border-border rounded-lg overflow-hidden focus-within:border-accent/50 focus-within:ring-1 focus-within:ring-accent/50 transition-all",children:[o.jsx("div",{className:"pl-3 py-2",children:o.jsx(Jl,{className:"w-3.5 h-3.5 text-text-muted"})}),o.jsx("input",{type:"email",placeholder:"you@email.com",value:i,onChange:e=>l(e.target.value),onKeyDown:e=>"Enter"===e.key&&v(),autoFocus:!0,className:"px-3 py-2 text-xs bg-transparent text-text-primary outline-none flex-1 placeholder:text-text-muted/50"}),o.jsx("button",{onClick:v,disabled:p||!i.includes("@"),className:"px-4 py-2 bg-bg-surface-2 hover:bg-bg-surface-3 text-text-primary text-[10px] font-bold uppercase tracking-wider transition-colors disabled:opacity-50 cursor-pointer border-l border-border",children:p?"...":"Send"})]}):o.jsxs("div",{className:"flex items-center bg-bg-base border border-border rounded-lg overflow-hidden focus-within:border-accent/50 focus-within:ring-1 focus-within:ring-accent/50 transition-all",children:[o.jsx("input",{type:"text",maxLength:6,placeholder:"000000",inputMode:"numeric",autoComplete:"one-time-code",value:c,onChange:e=>u(e.target.value),onKeyDown:e=>"Enter"===e.key&&b(),autoFocus:!0,className:"px-4 py-2 text-xs bg-transparent text-text-primary text-center font-mono tracking-widest outline-none flex-1 placeholder:text-text-muted/50"}),o.jsx("button",{onClick:b,disabled:p||6!==c.length,className:"px-4 py-2 bg-accent hover:bg-accent-bright text-bg-base text-[10px] font-bold uppercase tracking-wider transition-colors disabled:opacity-50 cursor-pointer",children:p?"...":"Verify"})]})]})})]})}),Td="npx -y @devness/useai update";function Ed({updateInfo:e}){const[t,n]=h.useState(!1),[r,a]=h.useState(!1);return o.jsxs("div",{className:"relative",children:[o.jsxs("button",{onClick:()=>n(e=>!e),className:"flex items-center gap-1.5 px-2.5 py-1 rounded-full bg-accent/10 border border-accent/20 text-xs font-medium text-accent hover:bg-accent/15 transition-colors",children:[o.jsx(Ml,{className:"w-3 h-3"}),"v",e.latest," available"]}),t&&o.jsxs("div",{className:"absolute right-0 top-full mt-2 z-50 w-72 rounded-lg bg-bg-surface-1 border border-border shadow-lg p-3 space-y-2",children:[o.jsxs("p",{className:"text-xs text-text-muted",children:["Update from ",o.jsxs("span",{className:"font-mono text-text-secondary",children:["v",e.current]})," to ",o.jsxs("span",{className:"font-mono text-accent",children:["v",e.latest]})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("code",{className:"flex-1 text-[11px] font-mono bg-bg-base px-2 py-1.5 rounded border border-border text-text-secondary truncate",children:Td}),o.jsx("button",{onClick:async()=>{try{await navigator.clipboard.writeText(Td),a(!0),setTimeout(()=>a(!1),2e3)}catch{}},className:"p-1.5 rounded-md border border-border bg-bg-base text-text-muted hover:text-text-primary hover:border-text-muted/50 transition-colors shrink-0",title:"Copy command",children:r?o.jsx(jl,{className:"w-3.5 h-3.5 text-success"}):o.jsx(zl,{className:"w-3.5 h-3.5"})})]})]})]})}function Md({health:e,updateInfo:t,onSearchOpen:n,activeTab:r,onTabChange:a,config:s,onRefresh:i}){const l=h.useRef(null),c=h.useMemo(()=>{if(s?.username)return[{label:"Leaderboard",href:"https://useai.dev/leaderboard"},{label:"Profile",href:\`https://useai.dev/\${s.username}\`}]},[s?.username]);return o.jsx("header",{className:"sticky top-0 z-50 bg-bg-base/80 backdrop-blur-md border-b border-border mb-6",children:o.jsxs("div",{className:"max-w-[1240px] mx-auto px-4 sm:px-6 py-3 flex items-center justify-between relative",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(xd,{className:"h-6"}),e&&e.active_sessions>0&&o.jsx(Ru,{label:\`\${e.active_sessions} active session\${1!==e.active_sessions?"s":""}\`,color:"success",dot:!0})]}),o.jsx("div",{className:"absolute left-1/2 -translate-x-1/2",children:o.jsx(mu,{activeTab:r,onTabChange:a,externalLinks:c})}),o.jsxs("div",{className:"flex items-center gap-4",children:[s?.authenticated&&!s?.username&&o.jsxs("button",{onClick:()=>l.current?.open(),className:"flex items-center gap-1.5 px-2.5 py-1 rounded-full bg-accent/10 border border-accent/25 text-[11px] font-medium text-accent hover:bg-accent/15 transition-colors cursor-pointer",children:[o.jsx(dc,{className:"w-3 h-3"}),"Claim your username"]}),n&&o.jsxs("button",{onClick:n,className:"flex items-center gap-2 px-2.5 py-1.5 rounded-md border border-border/50 bg-bg-surface-1 text-text-muted hover:text-text-primary hover:border-text-muted/50 transition-colors text-xs",children:[o.jsx(lc,{className:"w-3 h-3"}),o.jsx("span",{className:"hidden sm:inline",children:"Search"}),o.jsx("kbd",{className:"hidden sm:inline-flex items-center px-1 py-0.5 rounded border border-border bg-bg-base text-[9px] font-mono leading-none",children:"\u2318K"})]}),t?.update_available&&o.jsx(Ed,{updateInfo:t}),o.jsx(Cd,{ref:l,config:s,onRefresh:i,onTabChange:a})]})]})})}function Pd({label:e,description:t,checked:n,onChange:r,warning:a,disabled:s}){return o.jsxs("label",{className:"flex items-start justify-between gap-3 py-2 group "+(s?"cursor-default opacity-60":"cursor-pointer"),children:[o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("div",{className:"text-xs font-medium text-text-primary",children:e}),o.jsx("div",{className:"text-[11px] text-text-muted leading-relaxed mt-0.5",children:t}),a&&n&&o.jsxs("div",{className:"flex items-center gap-1 mt-1 text-[11px] text-warning",children:[o.jsx(mc,{className:"w-3 h-3 shrink-0"}),a]})]}),o.jsx("button",{role:"switch","aria-checked":n,disabled:s,onClick:()=>!s&&r(!n),className:\`\\n relative inline-flex h-5 w-9 shrink-0 rounded-full border-2 border-transparent transition-colors duration-200\\n \${n?"bg-text-muted":"bg-bg-surface-2"}\\n \${s?"cursor-not-allowed":""}\\n \`,children:o.jsx("span",{className:\`\\n pointer-events-none inline-block h-4 w-4 rounded-full bg-white shadow-sm transition-transform duration-200\\n \${n?"translate-x-4":"translate-x-0"}\\n \`})})]})}function Ld({label:e,description:t,value:n,options:r,onChange:a}){return o.jsxs("div",{className:"flex items-start justify-between gap-3 py-2",children:[o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("div",{className:"text-xs font-medium text-text-primary",children:e}),o.jsx("div",{className:"text-[11px] text-text-muted leading-relaxed mt-0.5",children:t})]}),o.jsxs("div",{className:"relative",children:[o.jsx("select",{value:n,onChange:e=>a(e.target.value),className:"appearance-none bg-bg-surface-2 border border-border/50 rounded-md px-2.5 py-1 pr-7 text-xs text-text-primary cursor-pointer hover:border-border transition-colors",children:r.map(e=>o.jsx("option",{value:e.value,children:e.label},e.value))}),o.jsx(Nl,{className:"absolute right-1.5 top-1/2 -translate-y-1/2 w-3 h-3 text-text-muted pointer-events-none"})]})]})}function Dd({onTabChange:e}){const[t,n]=h.useState(null),[r,a]=h.useState(null),[s,i]=h.useState("idle"),[l,c]=h.useState(null),[u,d]=h.useState(null),[f,p]=h.useState([]);h.useEffect(()=>{_("/api/local/config/full").then(e=>{n(e),a(structuredClone(e)),e.authenticated&&_("/api/local/orgs").then(e=>{Array.isArray(e)&&p(e.filter(e=>e?.org?.id))}).catch(()=>{})}).catch(e=>d(e.message))},[]);const m=!(!t||!r)&&(g=t,x=r,!(JSON.stringify(g)===JSON.stringify(x)));var g,x;const y=h.useCallback(async()=>{if(r&&t){i("saving"),c(null);try{const t=await(e={capture:r.capture,sync:r.sync,evaluation_framework:r.evaluation_framework},R("/api/local/config",e)),{instructions_updated:s,...o}=t;n(o),a(structuredClone(o)),c(s??[]),i("saved"),setTimeout(()=>i("idle"),3e3)}catch{i("error"),setTimeout(()=>i("idle"),3e3)}var e}},[r,t]),v=h.useCallback(()=>{t&&a(structuredClone(t))},[t]),b=h.useCallback(e=>{a(t=>t?{...t,capture:{...t.capture,...e}}:t)},[]),w=h.useCallback(e=>{a(t=>t?{...t,sync:{...t.sync,...e}}:t)},[]),k=h.useCallback(e=>{a(t=>t?{...t,evaluation_framework:e}:t)},[]);return u?o.jsx("div",{className:"max-w-xl mx-auto mt-12 text-center",children:o.jsxs("div",{className:"text-sm text-danger",children:["Failed to load config: ",u]})}):r?o.jsxs("div",{className:"max-w-xl mx-auto pt-2 pb-12 space-y-5",children:[o.jsxs("section",{className:"bg-bg-surface-1 border border-border/50 rounded-xl p-4",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[o.jsx(kl,{className:"w-4 h-4 text-text-muted"}),o.jsx("h2",{className:"text-xs font-bold text-text-muted uppercase tracking-widest",children:"Capture"})]}),o.jsx("p",{className:"text-[11px] text-text-muted mb-3",children:"What data to record locally for each session. All data stays on your machine unless you enable Cloud Sync."}),o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-1.5 mb-1.5 px-0.5",children:[o.jsx(Wl,{className:"w-3 h-3 text-emerald-500"}),o.jsx("span",{className:"text-[10px] font-semibold text-emerald-500 uppercase tracking-wider",children:"Local only \u2014 never synced"})]}),o.jsxs("div",{className:"divide-y divide-border/30 rounded-lg border border-emerald-500/15 bg-emerald-500/[0.03] px-3",children:[o.jsx(Pd,{label:"Prompts",description:"Record prompt text and word count",checked:r.capture.prompt,onChange:e=>b({prompt:e})}),o.jsx(Pd,{label:"Prompt images",description:"Record image descriptions from prompts",checked:r.capture.prompt_images,onChange:e=>b({prompt_images:e})}),o.jsx(Ld,{label:"Evaluation reasons",description:"When to include reason text for each score",value:r.capture.evaluation_reasons,options:[{value:"all",label:"All scores"},{value:"below_perfect",label:"Below perfect only"},{value:"none",label:"None"}],onChange:e=>b({evaluation_reasons:e})})]})]}),o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-1.5 mb-1.5 px-0.5",children:[o.jsx(Dl,{className:"w-3 h-3 text-blue-400"}),o.jsx("span",{className:"text-[10px] font-semibold text-blue-400 uppercase tracking-wider",children:"Synced when Cloud Sync is enabled"})]}),o.jsxs("div",{className:"divide-y divide-border/30 rounded-lg border border-blue-400/15 bg-blue-400/[0.03] px-3",children:[o.jsx(Pd,{label:"Evaluation scores",description:"Record session quality scores \u2014 included in stats sync",checked:r.capture.evaluation,onChange:e=>b({evaluation:e})}),o.jsx(Pd,{label:"Milestones",description:"Record accomplishments \u2014 included in titles & milestones sync",checked:r.capture.milestones,onChange:e=>b({milestones:e})})]})]})]})]}),o.jsxs("section",{className:"bg-bg-surface-1 border border-border/50 rounded-xl p-4",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[o.jsx(Sl,{className:"w-4 h-4 text-text-muted"}),o.jsx("h2",{className:"text-xs font-bold text-text-muted uppercase tracking-widest",children:"Evaluation"})]}),o.jsx("p",{className:"text-[11px] text-text-muted mb-3",children:"How sessions are scored."}),o.jsx(Ld,{label:"Framework",description:"Scoring method used for session evaluations",value:r.evaluation_framework,options:[{value:"space",label:"SPACE (weighted)"},{value:"raw",label:"Raw (equal weight)"}],onChange:k})]}),o.jsxs("section",{className:"bg-bg-surface-1 border border-border/50 rounded-xl p-4",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[o.jsx(Al,{className:"w-4 h-4 text-text-muted"}),o.jsx("h2",{className:"text-xs font-bold text-text-muted uppercase tracking-widest",children:"Cloud Sync"})]}),o.jsxs("p",{className:"text-[11px] text-text-muted mb-3",children:["Sync session data to useai.dev for leaderboards and public profiles.",!r.authenticated&&" Login first to enable sync."]}),o.jsxs("div",{className:"divide-y divide-border/30",children:[o.jsx(Pd,{label:"Auto-sync",description:"Automatically sync data on a schedule",checked:r.sync.enabled,onChange:e=>w({enabled:e})}),r.sync.enabled&&o.jsxs("div",{className:"space-y-3 pt-2",children:[o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-1.5 mb-1.5 px-0.5",children:[o.jsx(Ul,{className:"w-3 h-3 text-amber-400"}),o.jsx("span",{className:"text-[10px] font-semibold text-amber-400 uppercase tracking-wider",children:"Public \u2014 visible on your profile"})]}),o.jsx("div",{className:"divide-y divide-border/30 rounded-lg border border-amber-400/15 bg-amber-400/[0.03] px-3",children:o.jsx(Pd,{label:"Sync my stats",description:"Hours, languages, task types, streaks, evaluation scores \u2014 always included with sync",checked:!0,onChange:()=>{},disabled:!0})})]}),o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-1.5 mb-1.5 px-0.5",children:[o.jsx(Ql,{className:"w-3 h-3 text-emerald-500"}),o.jsxs("span",{className:"text-[10px] font-semibold text-emerald-500 uppercase tracking-wider",children:["Private \u2014 visible to you",f.length>0?" & your organization":""]})]}),o.jsxs("div",{className:"divide-y divide-border/30 rounded-lg border border-emerald-500/15 bg-emerald-500/[0.03] px-3",children:[o.jsx(Pd,{label:"Sync titles & milestones",description:"Session titles, project names, and milestones"+(f.length>0?" \u2014 also visible to org admins":""),checked:r.sync.include_details,onChange:e=>w({include_details:e})}),f.length>0&&o.jsxs("div",{className:"py-2",children:[o.jsx("div",{className:"text-[10px] text-text-muted mb-1",children:"Your organizations:"}),o.jsx("div",{className:"flex flex-wrap gap-1.5",children:f.map(e=>o.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full bg-emerald-500/10 text-[10px] font-medium text-emerald-400",children:[e.org.name,o.jsx("span",{className:"text-emerald-400/50",children:e.role})]},e.org.id))})]})]})]}),o.jsx("div",{className:"divide-y divide-border/30",children:o.jsx(Ld,{label:"Sync interval",description:"How often to sync data",value:String(r.sync.interval_hours),options:[{value:"0.25",label:"Every 15 minutes"},{value:"0.5",label:"Every 30 minutes"},{value:"1",label:"Every hour"},{value:"2",label:"Every 2 hours"},{value:"3",label:"Every 3 hours"},{value:"6",label:"Every 6 hours"},{value:"12",label:"Every 12 hours"},{value:"24",label:"Every 24 hours"}],onChange:e=>w({interval_hours:Number(e)})})})]})]})]}),o.jsxs("section",{className:"bg-bg-surface-1 border border-border/50 rounded-xl p-4",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[o.jsx(oc,{className:"w-4 h-4 text-text-muted"}),o.jsx("h2",{className:"text-xs font-bold text-text-muted uppercase tracking-widest",children:"Sync Logs"})]}),o.jsx("p",{className:"text-[11px] text-text-muted mb-3",children:"View a log of all sync, login, and cloud pull events."}),o.jsxs("button",{onClick:()=>e?.("logs"),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-medium bg-bg-surface-2 border border-border/50 text-text-primary hover:bg-bg-surface-3 transition-colors",children:[o.jsx(oc,{className:"w-3 h-3"}),"View sync logs"]})]}),m&&o.jsxs("div",{className:"sticky bottom-4 flex items-center justify-between gap-3 bg-bg-surface-1 border border-border/50 rounded-xl px-4 py-3 shadow-lg",children:[o.jsx("div",{className:"text-xs text-text-muted",children:"saved"===s&&l?\`Saved. Updated instructions in \${l.length} tool\${1!==l.length?"s":""}: \${l.join(", ")||"none installed"}\`:"error"===s?"Failed to save. Try again.":"You have unsaved changes"}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("button",{onClick:v,disabled:"saving"===s,className:"px-3 py-1.5 rounded-md text-xs font-medium text-text-muted hover:text-text-primary border border-border/50 hover:border-border transition-colors disabled:opacity-50",children:"Discard"}),o.jsxs("button",{onClick:y,disabled:"saving"===s,className:"flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-medium bg-accent text-bg-base hover:bg-accent/90 transition-colors disabled:opacity-50",children:["saving"===s?o.jsx(Xl,{className:"w-3 h-3 animate-spin"}):"saved"===s?o.jsx(jl,{className:"w-3 h-3"}):o.jsx(ic,{className:"w-3 h-3"}),"saving"===s?"Saving...":"saved"===s?"Saved":"Save"]})]})]})]}):o.jsx("div",{className:"max-w-xl mx-auto mt-12 text-center",children:o.jsx("div",{className:"text-sm text-text-muted",children:"Loading settings..."})})}const Ad={sync:"Sync",auto_sync:"Auto Sync",login:"Login",logout:"Logout",cloud_pull:"Cloud Pull"},_d={sync:Dl,auto_sync:Pl,login:Zl,logout:Gl,cloud_pull:Ll},zd={success:"text-emerald-400",error:"text-red-400",info:"text-blue-400"},Rd={success:"bg-emerald-400",error:"bg-red-400",info:"bg-blue-400"};function Fd(e){const t=new Date(e),n=(new Date).getTime()-t.getTime(),r=Math.floor(n/6e4);if(r<1)return"just now";if(r<60)return\`\${r}m ago\`;const a=Math.floor(r/60);if(a<24)return\`\${a}h ago\`;const s=Math.floor(a/24);return s<7?\`\${s}d ago\`:t.toLocaleDateString(void 0,{month:"short",day:"numeric"})}function Vd({entry:e}){const[t,n]=h.useState(!1),r=_d[e.event],a=e.details&&Object.keys(e.details).length>0;return o.jsxs("div",{className:"group",children:[o.jsxs("button",{onClick:()=>a&&n(!t),className:"w-full flex items-start gap-2.5 px-3 py-2 text-left transition-colors "+(a?"hover:bg-bg-surface-2/50 cursor-pointer":"cursor-default"),children:[o.jsx("div",{className:\`mt-0.5 shrink-0 \${zd[e.status]}\`,children:o.jsx(r,{className:"w-3.5 h-3.5"})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("div",{className:"flex items-center gap-2",children:o.jsx("span",{className:"text-xs font-medium text-text-primary truncate",children:e.message})}),o.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[o.jsxs("span",{className:"flex items-center gap-1",children:[o.jsx("span",{className:\`w-1.5 h-1.5 rounded-full \${Rd[e.status]}\`}),o.jsx("span",{className:"text-[10px] text-text-muted",children:Ad[e.event]})]}),o.jsx("span",{className:"text-[10px] text-text-muted/60",children:Fd(e.timestamp)})]})]}),a&&o.jsx("div",{className:"mt-0.5 shrink-0 text-text-muted/40",children:t?o.jsx(Nl,{className:"w-3 h-3"}):o.jsx(Tl,{className:"w-3 h-3"})})]}),t&&a&&o.jsx("div",{className:"px-3 pb-2 pl-9",children:o.jsx("div",{className:"bg-bg-surface-2/60 rounded-md px-2.5 py-1.5 space-y-0.5",children:Object.entries(e.details).map(([e,t])=>o.jsxs("div",{className:"flex items-center justify-between gap-4 text-[10px]",children:[o.jsx("span",{className:"text-text-muted",children:e.replace(/_/g," ")}),o.jsx("span",{className:"text-text-primary font-mono",children:"string"==typeof t?t:JSON.stringify(t)})]},e))})})]})}function Id(){const[e,t]=h.useState([]),[n,r]=h.useState(!0),[a,s]=h.useState(null),[i,l]=h.useState("all"),c=()=>{r(!0),_("/api/local/logs").then(e=>{t(e),s(null)}).catch(e=>s(e.message)).finally(()=>r(!1))};h.useEffect(()=>{c()},[]);const u=[..."all"===i?e:e.filter(e=>e.event===i)].reverse();return a?o.jsx("div",{className:"max-w-xl mx-auto mt-12 text-center",children:o.jsxs("div",{className:"text-sm text-danger",children:["Failed to load logs: ",a]})}):o.jsxs("div",{className:"max-w-xl mx-auto pt-2 pb-12 space-y-4",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:["all","sync","auto_sync","login","logout","cloud_pull"].map(e=>o.jsx("button",{onClick:()=>l(e),className:"px-2 py-0.5 rounded-md text-[11px] font-medium transition-colors "+(i===e?"bg-bg-surface-2 text-text-primary":"text-text-muted hover:text-text-primary"),children:"all"===e?"All":Ad[e]},e))}),o.jsx("button",{onClick:c,disabled:n,className:"p-1.5 rounded-md text-text-muted hover:text-text-primary hover:bg-bg-surface-2 transition-colors disabled:opacity-50",title:"Refresh",children:o.jsx(rc,{className:"w-3.5 h-3.5 "+(n?"animate-spin":"")})})]}),o.jsx("section",{className:"bg-bg-surface-1 border border-border/50 rounded-xl overflow-hidden",children:n&&0===e.length?o.jsx("div",{className:"py-12 text-center text-sm text-text-muted",children:"Loading logs..."}):0===u.length?o.jsxs("div",{className:"py-12 text-center",children:[o.jsx("div",{className:"text-sm text-text-muted",children:"No log entries yet"}),o.jsx("div",{className:"text-[11px] text-text-muted/60 mt-1",children:"Sync, login, or pull from cloud to see activity here"})]}):o.jsx("div",{className:"divide-y divide-border/30",children:u.map(e=>o.jsx(Vd,{entry:e},e.id))})})]})}function Od(){const{sessions:e,milestones:t,config:n,health:r,updateInfo:a,loading:s,loadAll:i,loadHealth:l,loadUpdateCheck:c,deleteSession:u,deleteConversation:d,deleteMilestone:f,activeTab:p,setActiveTab:m}=wd();h.useEffect(()=>{i(),l(),c()},[i,l,c]),h.useEffect(()=>{const e=setInterval(l,3e4),t=setInterval(i,3e4);return()=>{clearInterval(e),clearInterval(t)}},[i,l]);const[g,x]=h.useState(!1);return h.useEffect(()=>{const e=e=>{(e.metaKey||e.ctrlKey)&&"k"===e.key&&(e.preventDefault(),x(e=>!e))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[]),s?o.jsx("div",{className:"min-h-screen flex items-center justify-center",children:o.jsx("div",{className:"text-text-muted text-sm",children:"Loading..."})}):o.jsxs("div",{className:"min-h-screen bg-bg-base selection:bg-accent/30 selection:text-text-primary",children:[o.jsx(Md,{health:r,updateInfo:a,onSearchOpen:()=>x(!0),activeTab:p,onTabChange:m,config:n,onRefresh:i}),o.jsx("div",{className:"max-w-[1240px] mx-auto px-4 sm:px-6 pb-6",children:"settings"===p?o.jsx(Dd,{onTabChange:m}):"logs"===p?o.jsx(Id,{}):o.jsxs(o.Fragment,{children:[o.jsx(vd,{open:g,onClose:()=>x(!1),sessions:e,milestones:t,onDeleteSession:u,onDeleteConversation:d,onDeleteMilestone:f}),o.jsx(gd,{sessions:e,milestones:t,onDeleteSession:u,onDeleteConversation:d,onDeleteMilestone:f,activeTab:p,onActiveTabChange:m})]})})]})}P.createRoot(document.getElementById("root")).render(o.jsx(h.StrictMode,{children:o.jsx(Od,{})}));</script>
|
|
34410
|
-
<style rel="stylesheet" crossorigin>/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial}}}@layer theme{:root,:host{--font-sans:"Inter",system-ui,-apple-system,sans-serif;--font-mono:"Geist Mono","JetBrains Mono","SF Mono","Fira Code",ui-monospace,monospace;--color-red-400:oklch(70.4% .191 22.216);--color-orange-500:oklch(70.5% .213 47.604);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-blue-400:oklch(70.7% .165 254.624);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-md:28rem;--container-xl:36rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-black:900;--tracking-tighter:-.05em;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--leading-snug:1.375;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--blur-sm:8px;--blur-md:12px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-bg-base:var(--bg-base);--color-bg-surface-1:var(--bg-surface-1);--color-bg-surface-2:var(--bg-surface-2);--color-bg-surface-3:var(--bg-surface-3);--color-text-primary:var(--text-primary);--color-text-secondary:var(--text-secondary);--color-text-muted:var(--text-muted);--color-accent:var(--accent);--color-accent-bright:var(--accent-bright);--color-success:var(--success);--color-error:var(--error);--color-history:var(--history);--color-border:var(--border);--color-purple:#8b5cf6;--color-blue:#3b82f6;--color-emerald:#34d399}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--color-border)}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.-top-10{top:calc(var(--spacing)*-10)}.top-0{top:calc(var(--spacing)*0)}.top-1\\/2{top:50%}.top-2{top:calc(var(--spacing)*2)}.top-5{top:calc(var(--spacing)*5)}.top-full{top:100%}.-right-0\\.5{right:calc(var(--spacing)*-.5)}.right-0{right:calc(var(--spacing)*0)}.right-1\\.5{right:calc(var(--spacing)*1.5)}.-bottom-0\\.5{bottom:calc(var(--spacing)*-.5)}.-bottom-1{bottom:calc(var(--spacing)*-1)}.-bottom-1\\.5{bottom:calc(var(--spacing)*-1.5)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-2{bottom:calc(var(--spacing)*2)}.bottom-4{bottom:calc(var(--spacing)*4)}.-left-7{left:calc(var(--spacing)*-7)}.left-1\\/2{left:50%}.left-2{left:calc(var(--spacing)*2)}.left-\\[1\\.75rem\\]{left:1.75rem}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\\[60\\]{z-index:60}.z-\\[61\\]{z-index:61}.z-\\[9999\\]{z-index:9999}.col-span-2{grid-column:span 2/span 2}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-auto{margin-inline:auto}.my-0\\.5{margin-block:calc(var(--spacing)*.5)}.my-1{margin-block:calc(var(--spacing)*1)}.ms-1{margin-inline-start:calc(var(--spacing)*1)}.ms-2{margin-inline-start:calc(var(--spacing)*2)}.ms-3{margin-inline-start:calc(var(--spacing)*3)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-1\\.5{margin-top:calc(var(--spacing)*1.5)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-12{margin-top:calc(var(--spacing)*12)}.mb-0\\.5{margin-bottom:calc(var(--spacing)*.5)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-1\\.5{margin-bottom:calc(var(--spacing)*1.5)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.-ml-2{margin-left:calc(var(--spacing)*-2)}.ml-0\\.5{margin-left:calc(var(--spacing)*.5)}.ml-1\\.5{margin-left:calc(var(--spacing)*1.5)}.ml-auto{margin-left:auto}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.h-1\\.5{height:calc(var(--spacing)*1.5)}.h-2{height:calc(var(--spacing)*2)}.h-2\\.5{height:calc(var(--spacing)*2.5)}.h-3{height:calc(var(--spacing)*3)}.h-3\\.5{height:calc(var(--spacing)*3.5)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-7{height:calc(var(--spacing)*7)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-16{height:calc(var(--spacing)*16)}.h-full{height:100%}.h-px{height:1px}.max-h-\\[75vh\\]{max-height:75vh}.min-h-screen{min-height:100vh}.w-0{width:calc(var(--spacing)*0)}.w-1\\.5{width:calc(var(--spacing)*1.5)}.w-2{width:calc(var(--spacing)*2)}.w-2\\.5{width:calc(var(--spacing)*2.5)}.w-3{width:calc(var(--spacing)*3)}.w-3\\.5{width:calc(var(--spacing)*3.5)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-7{width:calc(var(--spacing)*7)}.w-8{width:calc(var(--spacing)*8)}.w-9{width:calc(var(--spacing)*9)}.w-10{width:calc(var(--spacing)*10)}.w-12{width:calc(var(--spacing)*12)}.w-16{width:calc(var(--spacing)*16)}.w-24{width:calc(var(--spacing)*24)}.w-28{width:calc(var(--spacing)*28)}.w-72{width:calc(var(--spacing)*72)}.w-80{width:calc(var(--spacing)*80)}.w-\\[2px\\]{width:2px}.w-\\[155px\\]{width:155px}.w-full{width:100%}.w-px{width:1px}.max-w-2xl{max-width:var(--container-2xl)}.max-w-\\[130px\\]{max-width:130px}.max-w-\\[140px\\]{max-width:140px}.max-w-\\[280px\\]{max-width:280px}.max-w-\\[1240px\\]{max-width:1240px}.max-w-md{max-width:var(--container-md)}.max-w-xl{max-width:var(--container-xl)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\\[100px\\]{min-width:100px}.min-w-\\[120px\\]{min-width:120px}.min-w-\\[180px\\]{min-width:180px}.flex-1{flex:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.grow{flex-grow:1}.origin-bottom{transform-origin:bottom}.-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-0{--tw-translate-x:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-4{--tw-translate-x:calc(var(--spacing)*4);translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.scale-105{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x)var(--tw-scale-y)}.rotate-45{rotate:45deg}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.touch-none{touch-action:none}.appearance-none{appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-\\[86px_minmax\\(0\\,1fr\\)\\]{grid-template-columns:86px minmax(0,1fr)}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-2\\.5{gap:calc(var(--spacing)*2.5)}.gap-3{gap:calc(var(--spacing)*3)}.gap-3\\.5{gap:calc(var(--spacing)*3.5)}.gap-4{gap:calc(var(--spacing)*4)}.gap-6{gap:calc(var(--spacing)*6)}.gap-\\[3px\\]{gap:3px}:where(.space-y-0\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*5)*calc(1 - var(--tw-space-y-reverse)))}.gap-x-2{column-gap:calc(var(--spacing)*2)}.gap-x-5{column-gap:calc(var(--spacing)*5)}.gap-y-1{row-gap:calc(var(--spacing)*1)}.gap-y-2{row-gap:calc(var(--spacing)*2)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px*var(--tw-divide-y-reverse));border-bottom-width:calc(1px*calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-border\\/30>:not(:last-child)){border-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){:where(.divide-border\\/30>:not(:last-child)){border-color:color-mix(in oklab,var(--color-border)30%,transparent)}}.self-center{align-self:center}.self-stretch{align-self:stretch}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.overscroll-none{overscroll-behavior:none}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-t-md{border-top-left-radius:var(--radius-md);border-top-right-radius:var(--radius-md)}.rounded-t-sm{border-top-left-radius:var(--radius-sm);border-top-right-radius:var(--radius-sm)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-accent,.border-accent\\/20{border-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.border-accent\\/20{border-color:color-mix(in oklab,var(--color-accent)20%,transparent)}}.border-accent\\/25{border-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.border-accent\\/25{border-color:color-mix(in oklab,var(--color-accent)25%,transparent)}}.border-accent\\/30{border-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.border-accent\\/30{border-color:color-mix(in oklab,var(--color-accent)30%,transparent)}}.border-accent\\/35{border-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.border-accent\\/35{border-color:color-mix(in oklab,var(--color-accent)35%,transparent)}}.border-accent\\/50{border-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.border-accent\\/50{border-color:color-mix(in oklab,var(--color-accent)50%,transparent)}}.border-amber-400\\/15{border-color:#fcbb0026}@supports (color:color-mix(in lab,red,red)){.border-amber-400\\/15{border-color:color-mix(in oklab,var(--color-amber-400)15%,transparent)}}.border-bg-base{border-color:var(--color-bg-base)}.border-bg-surface-1{border-color:var(--color-bg-surface-1)}.border-blue-400\\/15{border-color:#54a2ff26}@supports (color:color-mix(in lab,red,red)){.border-blue-400\\/15{border-color:color-mix(in oklab,var(--color-blue-400)15%,transparent)}}.border-blue\\/20{border-color:#3b82f633}@supports (color:color-mix(in lab,red,red)){.border-blue\\/20{border-color:color-mix(in oklab,var(--color-blue)20%,transparent)}}.border-blue\\/30{border-color:#3b82f64d}@supports (color:color-mix(in lab,red,red)){.border-blue\\/30{border-color:color-mix(in oklab,var(--color-blue)30%,transparent)}}.border-border,.border-border\\/10{border-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.border-border\\/10{border-color:color-mix(in oklab,var(--color-border)10%,transparent)}}.border-border\\/15{border-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.border-border\\/15{border-color:color-mix(in oklab,var(--color-border)15%,transparent)}}.border-border\\/20{border-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.border-border\\/20{border-color:color-mix(in oklab,var(--color-border)20%,transparent)}}.border-border\\/30{border-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.border-border\\/30{border-color:color-mix(in oklab,var(--color-border)30%,transparent)}}.border-border\\/40{border-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.border-border\\/40{border-color:color-mix(in oklab,var(--color-border)40%,transparent)}}.border-border\\/50{border-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.border-border\\/50{border-color:color-mix(in oklab,var(--color-border)50%,transparent)}}.border-border\\/60{border-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.border-border\\/60{border-color:color-mix(in oklab,var(--color-border)60%,transparent)}}.border-emerald-500\\/15{border-color:#00bb7f26}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\\/15{border-color:color-mix(in oklab,var(--color-emerald-500)15%,transparent)}}.border-emerald\\/20{border-color:#34d39933}@supports (color:color-mix(in lab,red,red)){.border-emerald\\/20{border-color:color-mix(in oklab,var(--color-emerald)20%,transparent)}}.border-emerald\\/30{border-color:#34d3994d}@supports (color:color-mix(in lab,red,red)){.border-emerald\\/30{border-color:color-mix(in oklab,var(--color-emerald)30%,transparent)}}.border-error\\/20{border-color:var(--color-error)}@supports (color:color-mix(in lab,red,red)){.border-error\\/20{border-color:color-mix(in oklab,var(--color-error)20%,transparent)}}.border-error\\/30{border-color:var(--color-error)}@supports (color:color-mix(in lab,red,red)){.border-error\\/30{border-color:color-mix(in oklab,var(--color-error)30%,transparent)}}.border-history,.border-history\\/20{border-color:var(--color-history)}@supports (color:color-mix(in lab,red,red)){.border-history\\/20{border-color:color-mix(in oklab,var(--color-history)20%,transparent)}}.border-purple\\/20{border-color:#8b5cf633}@supports (color:color-mix(in lab,red,red)){.border-purple\\/20{border-color:color-mix(in oklab,var(--color-purple)20%,transparent)}}.border-purple\\/30{border-color:#8b5cf64d}@supports (color:color-mix(in lab,red,red)){.border-purple\\/30{border-color:color-mix(in oklab,var(--color-purple)30%,transparent)}}.border-success\\/20{border-color:var(--color-success)}@supports (color:color-mix(in lab,red,red)){.border-success\\/20{border-color:color-mix(in oklab,var(--color-success)20%,transparent)}}.border-success\\/30{border-color:var(--color-success)}@supports (color:color-mix(in lab,red,red)){.border-success\\/30{border-color:color-mix(in oklab,var(--color-success)30%,transparent)}}.border-text-muted\\/20{border-color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.border-text-muted\\/20{border-color:color-mix(in oklab,var(--color-text-muted)20%,transparent)}}.border-transparent{border-color:#0000}.bg-\\[var\\(--accent-alpha\\)\\]{background-color:var(--accent-alpha)}.bg-accent,.bg-accent\\/5{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.bg-accent\\/5{background-color:color-mix(in oklab,var(--color-accent)5%,transparent)}}.bg-accent\\/8{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.bg-accent\\/8{background-color:color-mix(in oklab,var(--color-accent)8%,transparent)}}.bg-accent\\/10{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.bg-accent\\/10{background-color:color-mix(in oklab,var(--color-accent)10%,transparent)}}.bg-accent\\/15{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.bg-accent\\/15{background-color:color-mix(in oklab,var(--color-accent)15%,transparent)}}.bg-accent\\/30{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.bg-accent\\/30{background-color:color-mix(in oklab,var(--color-accent)30%,transparent)}}.bg-accent\\/50{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.bg-accent\\/50{background-color:color-mix(in oklab,var(--color-accent)50%,transparent)}}.bg-accent\\/60{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.bg-accent\\/60{background-color:color-mix(in oklab,var(--color-accent)60%,transparent)}}.bg-amber-400\\/\\[0\\.03\\]{background-color:#fcbb0008}@supports (color:color-mix(in lab,red,red)){.bg-amber-400\\/\\[0\\.03\\]{background-color:color-mix(in oklab,var(--color-amber-400)3%,transparent)}}.bg-bg-base,.bg-bg-base\\/30{background-color:var(--color-bg-base)}@supports (color:color-mix(in lab,red,red)){.bg-bg-base\\/30{background-color:color-mix(in oklab,var(--color-bg-base)30%,transparent)}}.bg-bg-base\\/80{background-color:var(--color-bg-base)}@supports (color:color-mix(in lab,red,red)){.bg-bg-base\\/80{background-color:color-mix(in oklab,var(--color-bg-base)80%,transparent)}}.bg-bg-surface-1,.bg-bg-surface-1\\/30{background-color:var(--color-bg-surface-1)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-1\\/30{background-color:color-mix(in oklab,var(--color-bg-surface-1)30%,transparent)}}.bg-bg-surface-1\\/35{background-color:var(--color-bg-surface-1)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-1\\/35{background-color:color-mix(in oklab,var(--color-bg-surface-1)35%,transparent)}}.bg-bg-surface-1\\/50{background-color:var(--color-bg-surface-1)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-1\\/50{background-color:color-mix(in oklab,var(--color-bg-surface-1)50%,transparent)}}.bg-bg-surface-1\\/80{background-color:var(--color-bg-surface-1)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-1\\/80{background-color:color-mix(in oklab,var(--color-bg-surface-1)80%,transparent)}}.bg-bg-surface-2,.bg-bg-surface-2\\/20{background-color:var(--color-bg-surface-2)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-2\\/20{background-color:color-mix(in oklab,var(--color-bg-surface-2)20%,transparent)}}.bg-bg-surface-2\\/30{background-color:var(--color-bg-surface-2)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-2\\/30{background-color:color-mix(in oklab,var(--color-bg-surface-2)30%,transparent)}}.bg-bg-surface-2\\/50{background-color:var(--color-bg-surface-2)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-2\\/50{background-color:color-mix(in oklab,var(--color-bg-surface-2)50%,transparent)}}.bg-bg-surface-2\\/60{background-color:var(--color-bg-surface-2)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-2\\/60{background-color:color-mix(in oklab,var(--color-bg-surface-2)60%,transparent)}}.bg-bg-surface-3,.bg-bg-surface-3\\/95{background-color:var(--color-bg-surface-3)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-3\\/95{background-color:color-mix(in oklab,var(--color-bg-surface-3)95%,transparent)}}.bg-black{background-color:var(--color-black)}.bg-black\\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.bg-black\\/40{background-color:color-mix(in oklab,var(--color-black)40%,transparent)}}.bg-blue-400{background-color:var(--color-blue-400)}.bg-blue-400\\/\\[0\\.03\\]{background-color:#54a2ff08}@supports (color:color-mix(in lab,red,red)){.bg-blue-400\\/\\[0\\.03\\]{background-color:color-mix(in oklab,var(--color-blue-400)3%,transparent)}}.bg-blue\\/10{background-color:#3b82f61a}@supports (color:color-mix(in lab,red,red)){.bg-blue\\/10{background-color:color-mix(in oklab,var(--color-blue)10%,transparent)}}.bg-blue\\/15{background-color:#3b82f626}@supports (color:color-mix(in lab,red,red)){.bg-blue\\/15{background-color:color-mix(in oklab,var(--color-blue)15%,transparent)}}.bg-border\\/20{background-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.bg-border\\/20{background-color:color-mix(in oklab,var(--color-border)20%,transparent)}}.bg-border\\/30{background-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.bg-border\\/30{background-color:color-mix(in oklab,var(--color-border)30%,transparent)}}.bg-border\\/50{background-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.bg-border\\/50{background-color:color-mix(in oklab,var(--color-border)50%,transparent)}}.bg-border\\/60{background-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.bg-border\\/60{background-color:color-mix(in oklab,var(--color-border)60%,transparent)}}.bg-emerald-400{background-color:var(--color-emerald-400)}.bg-emerald-500\\/10{background-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\\/10{background-color:color-mix(in oklab,var(--color-emerald-500)10%,transparent)}}.bg-emerald-500\\/\\[0\\.03\\]{background-color:#00bb7f08}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\\/\\[0\\.03\\]{background-color:color-mix(in oklab,var(--color-emerald-500)3%,transparent)}}.bg-emerald\\/10{background-color:#34d3991a}@supports (color:color-mix(in lab,red,red)){.bg-emerald\\/10{background-color:color-mix(in oklab,var(--color-emerald)10%,transparent)}}.bg-emerald\\/15{background-color:#34d39926}@supports (color:color-mix(in lab,red,red)){.bg-emerald\\/15{background-color:color-mix(in oklab,var(--color-emerald)15%,transparent)}}.bg-error\\/10{background-color:var(--color-error)}@supports (color:color-mix(in lab,red,red)){.bg-error\\/10{background-color:color-mix(in oklab,var(--color-error)10%,transparent)}}.bg-error\\/15{background-color:var(--color-error)}@supports (color:color-mix(in lab,red,red)){.bg-error\\/15{background-color:color-mix(in oklab,var(--color-error)15%,transparent)}}.bg-history,.bg-history\\/10{background-color:var(--color-history)}@supports (color:color-mix(in lab,red,red)){.bg-history\\/10{background-color:color-mix(in oklab,var(--color-history)10%,transparent)}}.bg-purple\\/10{background-color:#8b5cf61a}@supports (color:color-mix(in lab,red,red)){.bg-purple\\/10{background-color:color-mix(in oklab,var(--color-purple)10%,transparent)}}.bg-purple\\/15{background-color:#8b5cf626}@supports (color:color-mix(in lab,red,red)){.bg-purple\\/15{background-color:color-mix(in oklab,var(--color-purple)15%,transparent)}}.bg-red-400{background-color:var(--color-red-400)}.bg-success,.bg-success\\/10{background-color:var(--color-success)}@supports (color:color-mix(in lab,red,red)){.bg-success\\/10{background-color:color-mix(in oklab,var(--color-success)10%,transparent)}}.bg-success\\/15{background-color:var(--color-success)}@supports (color:color-mix(in lab,red,red)){.bg-success\\/15{background-color:color-mix(in oklab,var(--color-success)15%,transparent)}}.bg-text-muted,.bg-text-muted\\/10{background-color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.bg-text-muted\\/10{background-color:color-mix(in oklab,var(--color-text-muted)10%,transparent)}}.bg-text-muted\\/15{background-color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.bg-text-muted\\/15{background-color:color-mix(in oklab,var(--color-text-muted)15%,transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-gradient-to-t{--tw-gradient-position:to top in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-transparent{--tw-gradient-from:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-white\\/10{--tw-gradient-to:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.to-white\\/10{--tw-gradient-to:color-mix(in oklab,var(--color-white)10%,transparent)}}.to-white\\/10{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.p-0\\.5{padding:calc(var(--spacing)*.5)}.p-1{padding:calc(var(--spacing)*1)}.p-1\\.5{padding:calc(var(--spacing)*1.5)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.px-0\\.5{padding-inline:calc(var(--spacing)*.5)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-1\\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-3\\.5{padding-inline:calc(var(--spacing)*3.5)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-5{padding-inline:calc(var(--spacing)*5)}.px-6{padding-inline:calc(var(--spacing)*6)}.px-px{padding-inline:1px}.py-0\\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-6{padding-block:calc(var(--spacing)*6)}.py-8{padding-block:calc(var(--spacing)*8)}.py-12{padding-block:calc(var(--spacing)*12)}.py-16{padding-block:calc(var(--spacing)*16)}.pt-0\\.5{padding-top:calc(var(--spacing)*.5)}.pt-1\\.5{padding-top:calc(var(--spacing)*1.5)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-3{padding-top:calc(var(--spacing)*3)}.pt-\\[10vh\\]{padding-top:10vh}.pr-7{padding-right:calc(var(--spacing)*7)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-2\\.5{padding-bottom:calc(var(--spacing)*2.5)}.pb-3\\.5{padding-bottom:calc(var(--spacing)*3.5)}.pb-6{padding-bottom:calc(var(--spacing)*6)}.pb-12{padding-bottom:calc(var(--spacing)*12)}.pl-3{padding-left:calc(var(--spacing)*3)}.pl-9{padding-left:calc(var(--spacing)*9)}.pl-10{padding-left:calc(var(--spacing)*10)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[7px\\]{font-size:7px}.text-\\[8px\\]{font-size:8px}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[15px\\]{font-size:15px}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-tighter{--tw-tracking:var(--tracking-tighter);letter-spacing:var(--tracking-tighter)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.break-words{overflow-wrap:break-word}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-accent,.text-accent\\/70{color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.text-accent\\/70{color:color-mix(in oklab,var(--color-accent)70%,transparent)}}.text-accent\\/90{color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.text-accent\\/90{color:color-mix(in oklab,var(--color-accent)90%,transparent)}}.text-amber-400{color:var(--color-amber-400)}.text-amber-500{color:var(--color-amber-500)}.text-bg-base{color:var(--color-bg-base)}.text-blue{color:var(--color-blue)}.text-blue-400{color:var(--color-blue-400)}.text-emerald{color:var(--color-emerald)}.text-emerald-400{color:var(--color-emerald-400)}.text-emerald-400\\/50{color:#00d29480}@supports (color:color-mix(in lab,red,red)){.text-emerald-400\\/50{color:color-mix(in oklab,var(--color-emerald-400)50%,transparent)}}.text-emerald-500{color:var(--color-emerald-500)}.text-error,.text-error\\/80{color:var(--color-error)}@supports (color:color-mix(in lab,red,red)){.text-error\\/80{color:color-mix(in oklab,var(--color-error)80%,transparent)}}.text-history{color:var(--color-history)}.text-inherit{color:inherit}.text-orange-500{color:var(--color-orange-500)}.text-purple{color:var(--color-purple)}.text-red-400{color:var(--color-red-400)}.text-success,.text-success\\/70{color:var(--color-success)}@supports (color:color-mix(in lab,red,red)){.text-success\\/70{color:color-mix(in oklab,var(--color-success)70%,transparent)}}.text-text-muted,.text-text-muted\\/30{color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.text-text-muted\\/30{color:color-mix(in oklab,var(--color-text-muted)30%,transparent)}}.text-text-muted\\/40{color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.text-text-muted\\/40{color:color-mix(in oklab,var(--color-text-muted)40%,transparent)}}.text-text-muted\\/50{color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.text-text-muted\\/50{color:color-mix(in oklab,var(--color-text-muted)50%,transparent)}}.text-text-muted\\/60{color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.text-text-muted\\/60{color:color-mix(in oklab,var(--color-text-muted)60%,transparent)}}.text-text-muted\\/70{color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.text-text-muted\\/70{color:color-mix(in oklab,var(--color-text-muted)70%,transparent)}}.text-text-primary{color:var(--color-text-primary)}.text-text-secondary,.text-text-secondary\\/80{color:var(--color-text-secondary)}@supports (color:color-mix(in lab,red,red)){.text-text-secondary\\/80{color:color-mix(in oklab,var(--color-text-secondary)80%,transparent)}}.text-text-secondary\\/85{color:var(--color-text-secondary)}@supports (color:color-mix(in lab,red,red)){.text-text-secondary\\/85{color:color-mix(in oklab,var(--color-text-secondary)85%,transparent)}}.text-white{color:var(--color-white)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-accent{--tw-ring-color:var(--color-accent)}.ring-offset-2{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.ring-offset-bg-base{--tw-ring-offset-color:var(--color-bg-base)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.\\[daemon\\:err\\]{daemon:err}@media(hover:hover){.group-hover\\:scale-x-110:is(:where(.group):hover *){--tw-scale-x:110%;scale:var(--tw-scale-x)var(--tw-scale-y)}.group-hover\\:-rotate-90:is(:where(.group):hover *){rotate:-90deg}.group-hover\\:bg-accent:is(:where(.group):hover *),.group-hover\\:bg-accent\\/10:is(:where(.group):hover *){background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.group-hover\\:bg-accent\\/10:is(:where(.group):hover *){background-color:color-mix(in oklab,var(--color-accent)10%,transparent)}}.group-hover\\:text-accent:is(:where(.group):hover *){color:var(--color-accent)}.group-hover\\:text-text-primary:is(:where(.group):hover *){color:var(--color-text-primary)}.group-hover\\:opacity-100:is(:where(.group):hover *),.group-hover\\/card\\:opacity-100:is(:where(.group\\/card):hover *),.group-hover\\/conv\\:opacity-100:is(:where(.group\\/conv):hover *){opacity:1}}.selection\\:bg-accent\\/30 ::selection{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.selection\\:bg-accent\\/30 ::selection{background-color:color-mix(in oklab,var(--color-accent)30%,transparent)}}.selection\\:bg-accent\\/30::selection{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.selection\\:bg-accent\\/30::selection{background-color:color-mix(in oklab,var(--color-accent)30%,transparent)}}.selection\\:text-text-primary ::selection{color:var(--color-text-primary)}.selection\\:text-text-primary::selection{color:var(--color-text-primary)}.placeholder\\:text-text-muted\\/50::placeholder{color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.placeholder\\:text-text-muted\\/50::placeholder{color:color-mix(in oklab,var(--color-text-muted)50%,transparent)}}.focus-within\\:border-accent\\/50:focus-within{border-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.focus-within\\:border-accent\\/50:focus-within{border-color:color-mix(in oklab,var(--color-accent)50%,transparent)}}.focus-within\\:opacity-100:focus-within{opacity:1}.focus-within\\:ring-1:focus-within{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-within\\:ring-accent\\/50:focus-within{--tw-ring-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.focus-within\\:ring-accent\\/50:focus-within{--tw-ring-color:color-mix(in oklab,var(--color-accent)50%,transparent)}}@media(hover:hover){.hover\\:scale-125:hover{--tw-scale-x:125%;--tw-scale-y:125%;--tw-scale-z:125%;scale:var(--tw-scale-x)var(--tw-scale-y)}.hover\\:border-accent\\/30:hover{border-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.hover\\:border-accent\\/30:hover{border-color:color-mix(in oklab,var(--color-accent)30%,transparent)}}.hover\\:border-accent\\/40:hover{border-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.hover\\:border-accent\\/40:hover{border-color:color-mix(in oklab,var(--color-accent)40%,transparent)}}.hover\\:border-border:hover{border-color:var(--color-border)}.hover\\:border-text-muted\\/50:hover{border-color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.hover\\:border-text-muted\\/50:hover{border-color:color-mix(in oklab,var(--color-text-muted)50%,transparent)}}.hover\\:bg-accent-bright:hover{background-color:var(--color-accent-bright)}.hover\\:bg-accent\\/15:hover{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-accent\\/15:hover{background-color:color-mix(in oklab,var(--color-accent)15%,transparent)}}.hover\\:bg-accent\\/90:hover{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-accent\\/90:hover{background-color:color-mix(in oklab,var(--color-accent)90%,transparent)}}.hover\\:bg-bg-surface-1:hover{background-color:var(--color-bg-surface-1)}.hover\\:bg-bg-surface-2:hover,.hover\\:bg-bg-surface-2\\/40:hover{background-color:var(--color-bg-surface-2)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-bg-surface-2\\/40:hover{background-color:color-mix(in oklab,var(--color-bg-surface-2)40%,transparent)}}.hover\\:bg-bg-surface-2\\/50:hover{background-color:var(--color-bg-surface-2)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-bg-surface-2\\/50:hover{background-color:color-mix(in oklab,var(--color-bg-surface-2)50%,transparent)}}.hover\\:bg-bg-surface-3:hover{background-color:var(--color-bg-surface-3)}.hover\\:bg-error\\/5:hover{background-color:var(--color-error)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-error\\/5:hover{background-color:color-mix(in oklab,var(--color-error)5%,transparent)}}.hover\\:bg-error\\/10:hover{background-color:var(--color-error)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-error\\/10:hover{background-color:color-mix(in oklab,var(--color-error)10%,transparent)}}.hover\\:bg-error\\/25:hover{background-color:var(--color-error)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-error\\/25:hover{background-color:color-mix(in oklab,var(--color-error)25%,transparent)}}.hover\\:bg-history:hover{background-color:var(--color-history)}.hover\\:text-accent:hover{color:var(--color-accent)}.hover\\:text-accent-bright:hover{color:var(--color-accent-bright)}.hover\\:text-accent\\/80:hover{color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.hover\\:text-accent\\/80:hover{color:color-mix(in oklab,var(--color-accent)80%,transparent)}}.hover\\:text-error:hover,.hover\\:text-error\\/70:hover{color:var(--color-error)}@supports (color:color-mix(in lab,red,red)){.hover\\:text-error\\/70:hover{color:color-mix(in oklab,var(--color-error)70%,transparent)}}.hover\\:text-text-primary:hover{color:var(--color-text-primary)}.hover\\:text-white:hover{color:var(--color-white)}.hover\\:opacity-80:hover{opacity:.8}.hover\\:brightness-110:hover{--tw-brightness:brightness(110%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}}.active\\:cursor-grabbing:active{cursor:grabbing}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-20:disabled{opacity:.2}.disabled\\:opacity-30:disabled{opacity:.3}.disabled\\:opacity-50:disabled{opacity:.5}@media(min-width:40rem){.sm\\:inline{display:inline}.sm\\:inline-flex{display:inline-flex}.sm\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\\:flex-row{flex-direction:row}.sm\\:px-6{padding-inline:calc(var(--spacing)*6)}}@media(min-width:48rem){.md\\:block{display:block}.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\\:flex-row{flex-direction:row}.md\\:items-center{align-items:center}}@media(min-width:64rem){.lg\\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.lg\\:grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}}}:root{--text-primary:#fafafa;--text-secondary:#a1a1aa;--text-muted:#71717a;--accent:#b4f82c;--accent-bright:#d4fc6e;--accent-dim:#4d7c0f;--accent-rgb:180,248,44;--success:#b4f82c;--error:#ef4444;--streak:#f59e0b;--streak-bg:#f59e0b0f;--streak-border:#f59e0b33;--streak-muted:#f59e0b80;--history:#60a5fa;--history-rgb:96,165,250;--glass-border:#ffffff0d;--grid-color:#ffffff14;--glow-opacity:.15;--glow-blue:#3b82f626;--shadow-glow:rgba(var(--accent-rgb),.1);--accent-alpha:rgba(var(--accent-rgb),.05)}@media(prefers-color-scheme:light){:root{--text-primary:#09090b;--text-secondary:#52525b;--text-muted:#5f6068;--accent:#65a30d;--accent-bright:#84cc16;--accent-dim:#f7fee7;--accent-rgb:101,163,13;--success:#65a30d;--error:#dc2626;--streak:#b45309;--streak-bg:#b453090f;--streak-border:#b4530933;--streak-muted:#b4530980;--history:#2563eb;--history-rgb:37,99,235;--glass-border:#0000000d;--grid-color:#0000000a;--glow-opacity:.25;--glow-blue:#3b82f640;--shadow-glow:#00000014;--accent-alpha:rgba(var(--accent-rgb),.15)}}::selection{background-color:rgba(var(--accent-rgb),.3);color:var(--accent-bright)}.glass-card{background:var(--glass-bg);-webkit-backdrop-filter:blur(12px);border:1px solid var(--glass-border);box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f}.glass-panel{background:var(--glass-bg);-webkit-backdrop-filter:blur(20px);border:1px solid var(--glass-border);will-change:transform,backdrop-filter;transform:translateZ(0);box-shadow:0 8px 32px #0000004d,inset 0 0 0 1px #ffffff0d}.hud-border{background:var(--bg-surface-1);position:relative}.hud-border:before{content:"";border:1px solid rgba(var(--accent-rgb),.2);pointer-events:none;border-radius:inherit;position:absolute;inset:0;-webkit-mask-image:linear-gradient(#000,#0000);mask-image:linear-gradient(#000,#0000)}.hud-border:after{content:"";border-top:2px solid var(--accent);border-left:2px solid var(--accent);border-top-left-radius:inherit;width:10px;height:10px;position:absolute;top:-1px;left:-1px}.gradient-text{background:linear-gradient(135deg,var(--text-primary),var(--text-secondary));-webkit-text-fill-color:transparent;-webkit-background-clip:text;background-clip:text}.gradient-text-accent{background:linear-gradient(135deg,var(--accent),var(--accent-bright));-webkit-text-fill-color:transparent;text-shadow:0 0 20px rgba(var(--accent-rgb),.4);-webkit-background-clip:text;background-clip:text}.subtle-glow{position:relative}.subtle-glow:after{content:"";background:linear-gradient(45deg,transparent,rgba(var(--accent-rgb),.1),transparent);border-radius:inherit;z-index:-1;pointer-events:none;position:absolute;inset:-1px}:root{--bg-base:#040405;--bg-surface-1:#0e0e11;--bg-surface-2:#18181b;--bg-surface-3:#27272a;--border:#ffffff14;--border-accent:rgba(var(--accent-rgb),.3);--glass-bg:#0e0e1199}@media(prefers-color-scheme:light){:root{--bg-base:#fafafa;--bg-surface-1:#fff;--bg-surface-2:#f4f4f5;--bg-surface-3:#e4e4e7;--border:#e4e4e7;--border-accent:rgba(var(--accent-rgb),.4);--glass-bg:#ffffffb3}}::-webkit-scrollbar{width:5px;height:5px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:var(--color-bg-surface-3);border-radius:10px}::-webkit-scrollbar-thumb:hover{background:var(--color-text-muted)}body{font-family:var(--font-sans);background:var(--color-bg-base);color:var(--color-text-primary);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;min-height:100vh;margin:0;line-height:1.6}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}</style>
|
|
34411
|
+
*/function Mc(e){if(kc[e])return e;return Ec.filter(t=>e.startsWith(t)).sort((e,t)=>t.length-e.length)[0]??e}var Pc=E(),Lc=new Map;function Dc(e){let t=Lc.get(e);return void 0===t&&(t=new Date(e).getTime(),Lc.set(e,t)),t}function Ac(e){if(0===e.length)return 0;const t=new Set;for(const i of e)i.started_at&&t.add(i.started_at.slice(0,10));const n=[...t].sort().reverse();if(0===n.length)return 0;const r=(new Date).toISOString().slice(0,10),a=new Date(Date.now()-864e5).toISOString().slice(0,10);if(n[0]!==r&&n[0]!==a)return 0;let s=1;for(let i=1;i<n.length;i++){const e=new Date(n[i-1]),t=new Date(n[i]);if(1!==(e.getTime()-t.getTime())/864e5)break;s++}return s}function _c(e){const t=e.filter(e=>e.session.evaluation);if(0===t.length)return null;let n=0,r=0,a=0,s=0,i=0,o=0;const l={};for(const u of t){const e=u.session.evaluation;n+=e.prompt_quality,r+=e.context_provided,a+=e.independence_level,s+=e.scope_quality,i+=e.tools_leveraged,o+=e.iteration_count,l[e.task_outcome]=(l[e.task_outcome]??0)+1}const c=t.length;return{prompt_quality:Math.round(n/c*10)/10,context_provided:Math.round(r/c*10)/10,independence_level:Math.round(a/c*10)/10,scope_quality:Math.round(s/c*10)/10,tools_leveraged:Math.round(i/c),total_iterations:o,outcomes:l,session_count:c}}function zc({sessions:e,timeScale:t,effectiveTime:n,isLive:r,onDayClick:a,highlightDate:s}){const i="day"===t||"24h"===t||"12h"===t||"6h"===t,l=new Date(n).toISOString().slice(0,10),c=h.useMemo(()=>i?function(e,t){const n=new Date(\`\${t}T00:00:00\`).getTime(),r=n+864e5,a=[];for(let s=0;s<24;s++)a.push({hour:s,minutes:0});for(const s of e){const e=Dc(s.started_at),t=Dc(s.ended_at),i=1e3*(s.duration_seconds??0),o=i>0&&t-e>i+6e5?e+i:t;if(o<n||e>r)continue;const l=Math.max(e,n),c=Math.min(o,r);for(let r=0;r<24;r++){const e=n+36e5*r,t=e+36e5,s=Math.max(l,e),i=Math.min(c,t);i>s&&(a[r].minutes+=(i-s)/6e4)}}return a}(e,l):[],[e,l,i]),u=h.useMemo(()=>i?[]:function(e,t){const n=new Date,r=[];for(let a=t-1;a>=0;a--){const t=new Date(n);t.setDate(t.getDate()-a);const s=t.toISOString().slice(0,10);let i=0;for(const n of e){const e=n.started_at?.slice(0,10);e&&e===s&&(i+=n.duration_seconds)}r.push({date:s,hours:i/3600})}return r}(e,7),[e,i]),d=i?\`Hourly \u2014 \${new Date(n).toLocaleDateString([],{month:"short",day:"numeric"})}\`:"Last 7 Days";if(i){const e=Math.max(...c.map(e=>e.minutes),1);return o.jsxs("div",{className:"mb-8 p-5 rounded-2xl bg-bg-surface-1/50 border border-border/50",children:[o.jsxs("div",{className:"flex items-center justify-between mb-4 px-1",children:[o.jsx("div",{className:"text-xs text-text-muted uppercase tracking-widest font-bold",children:d}),o.jsxs("div",{className:"text-[10px] text-text-muted font-mono bg-bg-surface-2 px-2 py-0.5 rounded",children:[e.toFixed(0),"m peak"]})]}),o.jsx("div",{className:"flex items-end gap-[3px] h-16",children:c.map((t,n)=>{const r=e>0?t.minutes/e*100:0;return o.jsxs("div",{className:"flex-1 flex flex-col items-center justify-end h-full group relative",children:[o.jsx("div",{className:"absolute -top-10 left-1/2 -translate-x-1/2 opacity-0 group-hover:opacity-100 transition-opacity z-20 pointer-events-none",children:o.jsxs("div",{className:"bg-bg-surface-3 text-text-primary text-[10px] font-mono px-2 py-1.5 rounded-lg shadow-xl whitespace-nowrap border border-border flex flex-col items-center",children:[o.jsxs("span",{className:"font-bold",children:[t.hour,":00"]}),o.jsxs("span",{className:"text-accent",children:[t.minutes.toFixed(0),"m active"]}),o.jsx("div",{className:"absolute -bottom-1 left-1/2 -translate-x-1/2 w-2 h-2 bg-bg-surface-3 border-r border-b border-border rotate-45"})]})}),o.jsx(pl.div,{initial:{height:0},animate:{height:\`\${Math.max(r,t.minutes>0?8:0)}%\`},transition:{delay:.01*n,duration:.5},className:"w-full rounded-t-sm transition-all duration-300 group-hover:bg-accent relative overflow-hidden",style:{minHeight:t.minutes>0?"4px":"0px",backgroundColor:t.minutes>0?\`rgba(var(--accent-rgb), \${.4+t.minutes/e*.6})\`:"var(--color-bg-surface-2)"},children:t.minutes>.5*e&&o.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-transparent to-white/10"})})]},t.hour)})}),o.jsx("div",{className:"flex gap-[3px] mt-2 border-t border-border/30 pt-2",children:c.map(e=>o.jsx("div",{className:"flex-1 text-center",children:e.hour%6==0&&o.jsx("span",{className:"text-[9px] text-text-muted font-bold font-mono uppercase",children:0===e.hour?"12a":e.hour<12?\`\${e.hour}a\`:12===e.hour?"12p":e.hour-12+"p"})},e.hour))})]})}const f=Math.max(...u.map(e=>e.hours),.1);return o.jsxs("div",{className:"mb-8 p-5 rounded-2xl bg-bg-surface-1/50 border border-border/50",children:[o.jsxs("div",{className:"flex items-center justify-between mb-4 px-1",children:[o.jsx("div",{className:"text-xs text-text-muted uppercase tracking-widest font-bold",children:d}),o.jsx("div",{className:"text-[10px] text-text-muted font-mono bg-bg-surface-2 px-2 py-0.5 rounded",children:"Last 7 days"})]}),o.jsx("div",{className:"flex items-end gap-2 h-16",children:u.map((e,t)=>{const n=f>0?e.hours/f*100:0,r=e.date===s;return o.jsxs("div",{className:"flex-1 flex flex-col items-center justify-end h-full group relative",children:[o.jsx("div",{className:"absolute -top-10 left-1/2 -translate-x-1/2 opacity-0 group-hover:opacity-100 transition-opacity z-20 pointer-events-none",children:o.jsxs("div",{className:"bg-bg-surface-3 text-text-primary text-[10px] font-mono px-2 py-1.5 rounded-lg shadow-xl whitespace-nowrap border border-border flex flex-col items-center",children:[o.jsx("span",{className:"font-bold",children:e.date}),o.jsxs("span",{className:"text-accent",children:[e.hours.toFixed(1),"h active"]}),o.jsx("div",{className:"absolute -bottom-1 left-1/2 -translate-x-1/2 w-2 h-2 bg-bg-surface-3 border-r border-b border-border rotate-45"})]})}),o.jsx(pl.div,{initial:{height:0},animate:{height:\`\${Math.max(n,e.hours>0?8:0)}%\`},transition:{delay:.05*t,duration:.5},className:"w-full rounded-t-md cursor-pointer transition-all duration-300 group-hover:scale-x-110 origin-bottom "+(r?"ring-2 ring-accent ring-offset-2 ring-offset-bg-base":""),style:{minHeight:e.hours>0?"4px":"0px",backgroundColor:r?"var(--color-accent-bright)":e.hours>0?\`rgba(var(--accent-rgb), \${.4+e.hours/f*.6})\`:"var(--color-bg-surface-2)"},onClick:()=>a?.(e.date)})]},e.date)})}),o.jsx("div",{className:"flex gap-2 mt-2 border-t border-border/30 pt-2",children:u.map(e=>o.jsx("div",{className:"flex-1 text-center",children:o.jsx("span",{className:"text-[10px] text-text-muted font-bold uppercase tracking-tighter",children:new Date(e.date+"T12:00:00").toLocaleDateString([],{weekday:"short"})})},e.date))})]})}var Rc=[{key:"simple",label:"Simple",color:"#34d399"},{key:"medium",label:"Medium",color:"#fbbf24"},{key:"complex",label:"Complex",color:"#f87171"}];function Fc({data:e}){const t=e.simple+e.medium+e.complex;if(0===t)return null;const n=Math.max(e.simple,e.medium,e.complex);return o.jsxs(pl.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.15},className:"rounded-xl bg-bg-surface-1 border border-border/50 p-4",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[o.jsx("div",{className:"p-1.5 rounded-lg bg-bg-surface-2",children:o.jsx(Kl,{className:"w-3.5 h-3.5 text-text-muted"})}),o.jsx("h2",{className:"text-sm font-bold text-text-muted uppercase tracking-widest",children:"Complexity"})]}),o.jsx("div",{className:"space-y-3",children:Rc.map((r,a)=>{const s=e[r.key],i=n>0?s/n*100:0,l=t>0?(s/t*100).toFixed(0):"0";return o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("span",{className:"text-xs text-text-secondary font-medium w-16 text-right shrink-0",children:r.label}),o.jsx("div",{className:"flex-1 h-5 rounded bg-bg-surface-2/50 overflow-hidden",children:o.jsx(pl.div,{className:"h-full rounded",style:{backgroundColor:r.color},initial:{width:0},animate:{width:\`\${i}%\`},transition:{duration:.6,delay:.08*a,ease:[.22,1,.36,1]}})}),o.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[o.jsx("span",{className:"text-xs text-text-primary font-mono font-bold w-6 text-right",children:s}),o.jsxs("span",{className:"text-[10px] text-text-muted/70 font-mono w-8 text-right",children:[l,"%"]})]})]},r.key)})}),o.jsx("div",{className:"mt-4 flex h-2 rounded-full overflow-hidden bg-bg-surface-2/30",children:Rc.map(n=>{const r=e[n.key],a=t>0?r/t*100:0;return 0===a?null:o.jsx(pl.div,{className:"h-full",style:{backgroundColor:n.color},initial:{width:0},animate:{width:\`\${a}%\`},transition:{duration:.8,ease:[.22,1,.36,1]}},n.key)})})]})}var Vc=["1h","3h","6h","12h"],Ic=["day","week","month"],Oc=["1h","3h","6h","12h","24h","day","7d","week","30d","month"],$c={day:"24h",week:"7d",month:"30d"},Bc={"24h":"day","7d":"week","30d":"month"};function Hc(e){return"day"===e||"week"===e||"month"===e}var Uc={"1h":36e5,"3h":108e5,"6h":216e5,"12h":432e5,"24h":864e5,"7d":6048e5,"30d":2592e6},Wc={"1h":"1 Hour","3h":"3 Hours","6h":"6 Hours","12h":"12 Hours","24h":"24 Hours",day:"Day","7d":"7 Days",week:"Week","30d":"30 Days",month:"Month"};function qc(e,t){const n=Uc[e];if(void 0!==n)return{start:t-n,end:t};const r=new Date(t);if("day"===e){const e=new Date(r.getFullYear(),r.getMonth(),r.getDate()).getTime();return{start:e,end:e+864e5}}if("week"===e){const e=r.getDay(),t=0===e?-6:1-e,n=new Date(r.getFullYear(),r.getMonth(),r.getDate()+t).getTime();return{start:n,end:n+6048e5}}return{start:new Date(r.getFullYear(),r.getMonth(),1).getTime(),end:new Date(r.getFullYear(),r.getMonth()+1,1).getTime()}}function Yc(e,t,n){const r=Uc[e];if(void 0!==r)return t+n*r;const a=new Date(t);return"day"===e?new Date(a.getFullYear(),a.getMonth(),a.getDate()+n,12).getTime():"week"===e?new Date(a.getFullYear(),a.getMonth(),a.getDate()+7*n,12).getTime():new Date(a.getFullYear(),a.getMonth()+n,Math.min(a.getDate(),28),12).getTime()}function Kc(e,t){return Hc(e)?function(e,t){if(!Hc(e))return!1;const n=qc(e,t),r=Date.now();return r>=n.start&&r<n.end}(e,t):t>=Date.now()-6e4}function Xc({label:e,value:t,suffix:n,decimals:r=0,icon:a,delay:s=0,variant:i="default",clickable:l=!1,selected:c=!1,onClick:u,subtitle:d}){const f=h.useRef(null),p=h.useRef(0);h.useEffect(()=>{f.current&&t!==p.current&&(!function(e,t,n){let r=null;requestAnimationFrame(function a(s){r||(r=s);const i=Math.min((s-r)/800,1),o=1-Math.pow(1-i,4),l=t*o;e.textContent=n>0?l.toFixed(n):String(Math.round(l)),i<1&&requestAnimationFrame(a)})}(f.current,t,r),p.current=t)},[t,r]);const m="accent"===i;return o.jsxs(pl.div,{initial:{opacity:0,y:6},animate:{opacity:1,y:0},transition:{delay:s},onClick:l&&t>0?u:void 0,className:\`px-3 py-2 rounded-lg border flex items-center gap-2.5 group transition-all duration-300 \${m?"shrink-0 bg-bg-surface-1 border-border/50 hover:border-accent/30":"flex-1 min-w-[120px] bg-bg-surface-1 border-border/50 hover:border-accent/30"} \${l&&t>0?"cursor-pointer":""} \${c?"border-accent/50 bg-accent/5":""}\`,children:[o.jsx("div",{className:"p-1.5 rounded-md transition-colors "+(c?"bg-accent/15":"bg-bg-surface-2 group-hover:bg-accent/10"),children:o.jsx(a,{className:"w-3.5 h-3.5 transition-colors "+(c?"text-accent":"text-text-muted group-hover:text-accent")})}),o.jsxs("div",{className:"flex flex-col min-w-0",children:[o.jsxs("div",{className:"flex items-baseline gap-0.5",children:[o.jsx("span",{ref:f,className:"text-lg font-bold text-text-primary tracking-tight leading-none",children:r>0?t.toFixed(r):Math.round(t)}),n&&o.jsx("span",{className:"text-[10px] text-text-muted font-medium",children:n})]}),o.jsx("span",{className:"text-[9px] font-mono text-text-muted uppercase tracking-wider leading-none mt-0.5",children:e}),d&&o.jsx("span",{className:"text-[8px] text-text-muted/50 leading-none mt-0.5 truncate",children:d})]})]})}function Qc({totalHours:e,coveredHours:t,aiMultiplier:n,featuresShipped:r,bugsFixed:a,complexSolved:s,currentStreak:i,totalMilestones:l,selectedCard:c,onCardClick:u}){const d=e=>{u?.(c===e?null:e)};return o.jsxs("div",{className:"flex gap-2 mb-4",children:[o.jsxs("div",{className:"grid grid-cols-3 lg:grid-cols-7 gap-2 flex-1",children:[o.jsx(Xc,{label:"User Time",value:t<1/60?0:t<1?Math.round(60*t):t,suffix:t<1?"min":"hrs",decimals:t>=1?1:0,icon:Pl,delay:.1,clickable:!0,selected:"activeTime"===c,onClick:()=>d("activeTime")}),o.jsx(Xc,{label:"AI Time",value:e<1?Math.round(60*e):e,suffix:e<1?"min":"hrs",decimals:e<1?0:1,icon:pc,delay:.12,clickable:!0,selected:"aiTime"===c,onClick:()=>d("aiTime")}),o.jsx(Xc,{label:"Multiplier",value:n,suffix:"x",decimals:1,icon:Kl,delay:.15,clickable:!0,selected:"parallel"===c,onClick:()=>d("parallel")}),o.jsx(Xc,{label:"Milestones",value:l,icon:fc,delay:.2,clickable:!0,selected:"milestones"===c,onClick:()=>d("milestones")}),o.jsx(Xc,{label:"Features",value:r,icon:sc,delay:.25,clickable:!0,selected:"features"===c,onClick:()=>d("features")}),o.jsx(Xc,{label:"Bugs Fixed",value:a,icon:bl,delay:.3,clickable:!0,selected:"bugs"===c,onClick:()=>d("bugs")}),o.jsx(Xc,{label:"Complex",value:s,icon:vl,delay:.35,clickable:!0,selected:"complex"===c,onClick:()=>d("complex")})]}),o.jsx("div",{className:"w-px bg-border/30 self-stretch my-1"}),o.jsx(Xc,{label:"Streak",value:i,suffix:"days",icon:wc,delay:.45,variant:"accent",clickable:!0,selected:"streak"===c,onClick:()=>d("streak")})]})}var Zc={milestones:{title:"All Milestones",icon:fc,filter:()=>!0,emptyText:"No milestones in this time window.",accentColor:"#60a5fa"},features:{title:"Features Shipped",icon:sc,filter:e=>"feature"===e.category,emptyText:"No features shipped in this time window.",accentColor:"#4ade80"},bugs:{title:"Bugs Fixed",icon:bl,filter:e=>"bugfix"===e.category,emptyText:"No bugs fixed in this time window.",accentColor:"#f87171"},complex:{title:"Complex Tasks",icon:vl,filter:e=>"complex"===e.complexity,emptyText:"No complex tasks in this time window.",accentColor:"#a78bfa"}},Gc={feature:"bg-success/10 text-success border-success/20",bugfix:"bg-error/10 text-error border-error/20",refactor:"bg-purple/10 text-purple border-purple/20",test:"bg-blue/10 text-blue border-blue/20",docs:"bg-accent/10 text-accent border-accent/20",setup:"bg-text-muted/10 text-text-muted border-text-muted/20",deployment:"bg-emerald/10 text-emerald border-emerald/20"};function Jc(e){const t=new Date(e),n=(new Date).getTime()-t.getTime(),r=Math.floor(n/6e4);if(r<1)return"just now";if(r<60)return\`\${r}m ago\`;const a=Math.floor(r/60);if(a<24)return\`\${a}h ago\`;const s=Math.floor(a/24);return 1===s?"yesterday":s<7?\`\${s}d ago\`:t.toLocaleDateString([],{month:"short",day:"numeric"})}function eu({type:e,milestones:t,showPublic:n=!1,onClose:r}){h.useEffect(()=>{if(e)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[e]);const[a,s]=h.useState(25),i=h.useRef(null);h.useEffect(()=>{const e=i.current;if(!e)return;const t=new IntersectionObserver(([e])=>{e?.isIntersecting&&s(e=>e+25)},{rootMargin:"200px"});return t.observe(e),()=>t.disconnect()},[e,a]),h.useEffect(()=>{s(25)},[e]);if(!e||!("features"===e||"bugs"===e||"complex"===e||"milestones"===e))return null;const l=Zc[e],c=l.icon,u=t.filter(l.filter).sort((e,t)=>new Date(t.created_at).getTime()-new Date(e.created_at).getTime()),d=u.slice(0,a),f=a<u.length,p=new Map;for(const o of d){const e=new Date(o.created_at).toLocaleDateString([],{weekday:"short",month:"short",day:"numeric"}),t=p.get(e);t?t.push(o):p.set(e,[o])}return o.jsx(Qi,{children:e&&o.jsxs(o.Fragment,{children:[o.jsx(pl.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"fixed inset-0 bg-black/40 backdrop-blur-sm z-40",onClick:r}),o.jsxs(pl.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:30,stiffness:300},className:"fixed top-0 right-0 h-full w-full max-w-md bg-bg-base border-l border-border/50 z-50 flex flex-col shadow-2xl",children:[o.jsxs("div",{className:"flex items-center gap-3 px-5 py-4 border-b border-border/50",children:[o.jsx("div",{className:"p-2 rounded-lg",style:{backgroundColor:\`\${l.accentColor}15\`},children:o.jsx(c,{className:"w-4 h-4",style:{color:l.accentColor}})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("h2",{className:"text-sm font-bold text-text-primary",children:l.title}),o.jsxs("span",{className:"text-[10px] font-mono text-text-muted",children:[u.length," ",1===u.length?"item":"items"," in window"]})]}),o.jsx("button",{onClick:r,className:"p-1.5 rounded-md hover:bg-bg-surface-2 text-text-muted hover:text-text-primary transition-colors",children:o.jsx(bc,{className:"w-4 h-4"})})]}),o.jsx("div",{className:"flex-1 overflow-y-auto overscroll-contain px-5 py-4",children:0===u.length?o.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[o.jsx(hc,{className:"w-8 h-8 text-text-muted/30 mb-3"}),o.jsx("p",{className:"text-sm text-text-muted",children:l.emptyText})]}):o.jsxs("div",{className:"space-y-5",children:[[...p.entries()].map(([t,r])=>o.jsxs("div",{children:[o.jsx("div",{className:"text-[10px] font-mono text-text-muted uppercase tracking-wider mb-2 px-1",children:t}),o.jsx("div",{className:"space-y-1",children:r.map((t,r)=>{const a=Tc[t.category]??"#9c9588",s=Gc[t.category]??"bg-bg-surface-2 text-text-secondary border-border",i=Mc(t.client),l=jc[i]??i.slice(0,2).toUpperCase(),c=kc[i]??"#91919a",u="cursor"===i?"var(--text-primary)":c,d=Cc[i],h=n?t.title:t.private_title||t.title,f="complex"===t.complexity;return o.jsxs(pl.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},transition:{duration:.2,delay:.03*r},className:"flex items-start gap-2.5 py-2 px-2 rounded-lg hover:bg-bg-surface-1 transition-colors group",children:[o.jsx("div",{className:"w-2 h-2 rounded-full flex-shrink-0 mt-1.5",style:{backgroundColor:a}}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("p",{className:"text-sm text-text-secondary group-hover:text-text-primary transition-colors leading-snug",children:h}),o.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[("complex"===e||"milestones"===e)&&o.jsx("span",{className:\`text-[8px] uppercase tracking-wider font-bold px-1.5 py-0.5 rounded-full border \${s}\`,children:t.category}),f&&"complex"!==e&&o.jsxs("span",{className:"flex items-center gap-0.5 text-[8px] uppercase tracking-wider font-bold px-1.5 py-0.5 rounded-full border bg-purple/10 text-purple border-purple/20",children:[o.jsx(vl,{className:"w-2 h-2"}),"complex"]}),o.jsx("span",{className:"text-[10px] text-text-muted font-mono",children:Jc(t.created_at)}),t.languages.length>0&&o.jsx("span",{className:"text-[9px] text-text-muted font-mono",children:t.languages.join(", ")}),o.jsx("div",{className:"w-4 h-4 rounded flex items-center justify-center text-[7px] font-bold font-mono flex-shrink-0 ml-auto",style:{backgroundColor:\`\${c}15\`,color:c,border:\`1px solid \${c}20\`},children:d?o.jsx("div",{className:"w-2.5 h-2.5",style:{backgroundColor:u,maskImage:\`url(\${d})\`,maskSize:"contain",maskRepeat:"no-repeat",maskPosition:"center",WebkitMaskImage:\`url(\${d})\`,WebkitMaskSize:"contain",WebkitMaskRepeat:"no-repeat",WebkitMaskPosition:"center"}}):l})]})]})]},t.id)})})]},t)),f&&o.jsx("div",{ref:i,className:"py-2 text-center",children:o.jsxs("span",{className:"text-[10px] text-text-muted font-mono",children:["Showing ",d.length," of ",u.length,"..."]})})]})})]})]})})}function tu(e){return"activeTime"===e||"aiTime"===e||"parallel"===e||"streak"===e}var nu={activeTime:{title:"User Time",icon:Pl,accentColor:"#60a5fa"},aiTime:{title:"AI Time",icon:pc,accentColor:"#4ade80"},parallel:{title:"Multiplier",icon:Kl,accentColor:"#a78bfa"},streak:{title:"Streak",icon:wc,accentColor:"#facc15"}};function ru(e){if(e<60)return\`\${Math.round(e)}s\`;if(e<3600)return\`\${Math.round(e/60)}m\`;const t=Math.floor(e/3600),n=Math.round(e%3600/60);return n>0?\`\${t}h \${n}m\`:\`\${t}h\`}function au(e){return e<1/60?"< 1 min":e<1?\`\${Math.round(60*e)} min\`:\`\${e.toFixed(1)} hrs\`}function su(e){if(0===e.length)return[];const t=[];for(const s of e){const e=Dc(s.started_at),n=Dc(s.ended_at);n<=e||(t.push({time:e,delta:1}),t.push({time:n,delta:-1}))}t.sort((e,t)=>e.time-t.time||e.delta-t.delta);const n=[];let r=0,a=0;for(const s of t){const e=r>0;r+=s.delta,!e&&r>0?a=s.time:e&&0===r&&n.push({start:a,end:s.time})}return n}function iu({children:e}){return o.jsx("div",{className:"px-3 py-2.5 rounded-lg bg-bg-surface-1 border border-border/50 text-xs text-text-secondary leading-relaxed",children:e})}function ou({label:e,value:t}){return o.jsxs("div",{className:"flex items-center justify-between py-1.5 px-1",children:[o.jsx("span",{className:"text-xs text-text-muted",children:e}),o.jsx("span",{className:"text-xs font-mono font-bold text-text-primary",children:t})]})}function lu({type:e,sessions:t,allSessions:n,currentStreak:r=0,stats:a,showPublic:s=!1,onClose:i}){if(h.useEffect(()=>{if(e&&tu(e))return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[e]),!e||!tu(e))return null;const l=nu[e],c=l.icon,u=[...t].sort((e,t)=>Dc(t.started_at)-Dc(e.started_at));return o.jsx(Qi,{children:e&&o.jsxs(o.Fragment,{children:[o.jsx(pl.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"fixed inset-0 bg-black/40 backdrop-blur-sm z-40",onClick:i}),o.jsxs(pl.div,{initial:{x:"100%"},animate:{x:0},exit:{x:"100%"},transition:{type:"spring",damping:30,stiffness:300},className:"fixed top-0 right-0 h-full w-full max-w-md bg-bg-base border-l border-border/50 z-50 flex flex-col shadow-2xl",children:[o.jsxs("div",{className:"flex items-center gap-3 px-5 py-4 border-b border-border/50",children:[o.jsx("div",{className:"p-2 rounded-lg",style:{backgroundColor:\`\${l.accentColor}15\`},children:o.jsx(c,{className:"w-4 h-4",style:{color:l.accentColor}})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("h2",{className:"text-sm font-bold text-text-primary",children:l.title}),o.jsx("span",{className:"text-[10px] font-mono text-text-muted",children:"streak"===e?\`\${r} day\${1===r?"":"s"} consecutive\`:\`\${t.length} sessions in window\`})]}),o.jsx("button",{onClick:i,className:"p-1.5 rounded-md hover:bg-bg-surface-2 text-text-muted hover:text-text-primary transition-colors",children:o.jsx(bc,{className:"w-4 h-4"})})]}),o.jsxs("div",{className:"flex-1 overflow-y-auto overscroll-contain px-5 py-4 space-y-4",children:["activeTime"===e&&o.jsx(cu,{stats:a,sessions:t}),"aiTime"===e&&o.jsx(uu,{stats:a,sessions:u,showPublic:s}),"parallel"===e&&o.jsx(du,{stats:a,sessions:u,showPublic:s}),"streak"===e&&o.jsx(hu,{allSessions:n??t,currentStreak:r})]})]})]})})}function cu({stats:e,sessions:t}){const n=su(t);return o.jsxs(o.Fragment,{children:[o.jsx(iu,{children:"Real wall-clock time where at least one AI session was running. Gaps between sessions (breaks, thinking, context switches) are excluded."}),o.jsxs("div",{className:"rounded-lg border border-border/50 bg-bg-surface-1 divide-y divide-border/30",children:[o.jsx(ou,{label:"User time",value:au(e.coveredHours)}),o.jsx(ou,{label:"AI time",value:au(e.totalHours)}),o.jsx(ou,{label:"Active periods",value:String(n.length)}),o.jsx(ou,{label:"Sessions",value:String(t.length)})]}),n.length>0&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"text-[10px] font-mono text-text-muted uppercase tracking-wider px-1 pt-2",children:"Active Periods"}),o.jsx("div",{className:"space-y-1",children:n.map((e,t)=>{const n=(e.end-e.start)/6e4;return o.jsxs(pl.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},transition:{duration:.2,delay:.02*t},className:"flex items-center gap-3 py-2 px-2 rounded-lg hover:bg-bg-surface-1 transition-colors",children:[o.jsx("div",{className:"w-2 h-2 rounded-full bg-accent/60 flex-shrink-0"}),o.jsxs("span",{className:"text-xs font-mono text-text-secondary flex-1",children:[new Date(e.start).toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0})," \u2192 ",new Date(e.end).toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0})]}),o.jsx("span",{className:"text-xs font-mono font-bold text-text-primary",children:n<1?"< 1m":n<60?\`\${Math.round(n)}m\`:\`\${(n/60).toFixed(1)}h\`})]},t)})})]})]})}function uu({stats:e,sessions:t,showPublic:n}){return o.jsxs(o.Fragment,{children:[o.jsx(iu,{children:"Total accumulated AI session duration. When multiple sessions run in parallel, their durations add up \u2014 so AI Time can exceed User Time."}),o.jsxs("div",{className:"rounded-lg border border-border/50 bg-bg-surface-1 divide-y divide-border/30",children:[o.jsx(ou,{label:"AI time",value:au(e.totalHours)}),o.jsx(ou,{label:"User time",value:au(e.coveredHours)}),o.jsx(ou,{label:"Multiplier",value:\`\${e.aiMultiplier.toFixed(1)}x\`}),o.jsx(ou,{label:"Sessions",value:String(t.length)})]}),o.jsx(pu,{sessions:t,showPublic:n})]})}function du({stats:e,sessions:t,showPublic:n}){return o.jsxs(o.Fragment,{children:[o.jsx(iu,{children:"Your AI multiplier \u2014 AI Time divided by User Time. Higher means more parallelization. You're running more AI sessions simultaneously."}),o.jsxs("div",{className:"rounded-lg border border-border/50 bg-bg-surface-1 divide-y divide-border/30",children:[o.jsx(ou,{label:"Multiplier",value:\`\${e.aiMultiplier.toFixed(1)}x\`}),o.jsx(ou,{label:"Peak concurrent",value:String(e.peakConcurrency)}),o.jsx(ou,{label:"Calculation",value:\`\${au(e.totalHours)} \xF7 \${au(e.coveredHours)}\`}),o.jsx(ou,{label:"Sessions",value:String(t.length)})]}),o.jsx(pu,{sessions:t,showPublic:n})]})}function hu({allSessions:e,currentStreak:t}){const n=function(e){const t=new Map;for(const n of e){const e=new Date(Dc(n.started_at)),r=\`\${e.getFullYear()}-\${String(e.getMonth()+1).padStart(2,"0")}-\${String(e.getDate()).padStart(2,"0")}\`,a=t.get(r);a?a.push(n):t.set(r,[n])}return[...t.entries()].sort((e,t)=>t[0].localeCompare(e[0])).map(([e,t])=>{const n=new Date(e+"T12:00:00").toLocaleDateString([],{weekday:"short",month:"short",day:"numeric"}),r=t.reduce((e,t)=>e+t.duration_seconds,0),a=su(t).reduce((e,t)=>e+(t.end-t.start),0)/1e3,s=a>0?r/a:0;return{date:e,label:n,count:t.length,gainedSeconds:r,spentSeconds:a,boost:s}})}(e),r=new Set,a=new Date;for(let s=0;s<t;s++){const e=new Date(a);e.setDate(e.getDate()-s),r.add(\`\${e.getFullYear()}-\${String(e.getMonth()+1).padStart(2,"0")}-\${String(e.getDate()).padStart(2,"0")}\`)}return o.jsxs(o.Fragment,{children:[o.jsx(iu,{children:"Consecutive days with at least one AI session. Keep using AI daily to grow your streak!"}),o.jsxs("div",{className:"rounded-lg border border-border/50 bg-bg-surface-1 divide-y divide-border/30",children:[o.jsx(ou,{label:"Current streak",value:\`\${t} day\${1===t?"":"s"}\`}),o.jsx(ou,{label:"Total active days",value:String(n.length)}),o.jsx(ou,{label:"Total sessions",value:String(e.length)})]}),n.length>0&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"text-[10px] font-mono text-text-muted uppercase tracking-wider px-1 pt-2",children:"Active Days"}),o.jsx("div",{className:"space-y-1",children:n.map((e,t)=>{const n=r.has(e.date);return o.jsxs(pl.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},transition:{duration:.2,delay:Math.min(.02*t,.6)},className:"flex items-center gap-2 py-2 px-2 rounded-lg hover:bg-bg-surface-1 transition-colors",children:[n?o.jsx(wc,{className:"w-3 h-3 flex-shrink-0",style:{color:"#facc15"}}):o.jsx(wl,{className:"w-3 h-3 flex-shrink-0 text-text-muted"}),o.jsx("span",{className:"text-xs font-mono flex-1 min-w-0 "+(n?"text-text-primary":"text-text-secondary"),children:e.label}),o.jsx("span",{className:"text-[10px] text-text-muted font-mono whitespace-nowrap",title:"User time",children:ru(e.spentSeconds)}),o.jsx("span",{className:"text-[10px] text-text-muted",children:"/"}),o.jsx("span",{className:"text-[10px] font-mono font-bold text-text-primary whitespace-nowrap",title:"AI time",children:ru(e.gainedSeconds)}),e.boost>0&&o.jsxs("span",{className:"text-[10px] font-mono font-bold whitespace-nowrap",style:{color:"#a78bfa"},title:"Multiplier",children:[e.boost.toFixed(1),"x"]})]},e.date)})})]})]})}var fu=25;function pu({sessions:e,showPublic:t}){const[n,r]=h.useState(fu),a=h.useRef(null);if(h.useEffect(()=>{const e=a.current;if(!e)return;const t=new IntersectionObserver(([e])=>{e?.isIntersecting&&r(e=>e+fu)},{rootMargin:"200px"});return t.observe(e),()=>t.disconnect()},[e,n]),h.useEffect(()=>{r(fu)},[e.length]),0===e.length)return null;const s=e.slice(0,n),i=n<e.length;return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"text-[10px] font-mono text-text-muted uppercase tracking-wider px-1 pt-2",children:"Sessions"}),o.jsxs("div",{className:"space-y-1",children:[s.map((e,n)=>{const r=Mc(e.client),a=jc[r]??r.slice(0,2).toUpperCase(),s=kc[r]??"#91919a",i="cursor"===r?"var(--text-primary)":s,l=Cc[r],c=t?e.title??"Untitled":e.private_title||e.title||"Untitled";return o.jsxs(pl.div,{initial:{opacity:0,y:4},animate:{opacity:1,y:0},transition:{duration:.2,delay:Math.min(.02*n,.6)},className:"flex items-start gap-2.5 py-2 px-2 rounded-lg hover:bg-bg-surface-1 transition-colors group",children:[o.jsx("div",{className:"w-5 h-5 rounded flex items-center justify-center text-[7px] font-bold font-mono flex-shrink-0 mt-0.5",style:{backgroundColor:\`\${s}15\`,color:s,border:\`1px solid \${s}20\`},children:l?o.jsx("div",{className:"w-3 h-3",style:{backgroundColor:i,maskImage:\`url(\${l})\`,maskSize:"contain",maskRepeat:"no-repeat",maskPosition:"center",WebkitMaskImage:\`url(\${l})\`,WebkitMaskSize:"contain",WebkitMaskRepeat:"no-repeat",WebkitMaskPosition:"center"}}):a}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("p",{className:"text-sm text-text-secondary group-hover:text-text-primary transition-colors leading-snug truncate",children:c}),o.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[o.jsx("span",{className:"text-[10px] font-mono text-text-muted",children:ru(e.duration_seconds)}),o.jsx("span",{className:"text-[10px] text-text-muted",children:(u=e.started_at,new Date(u).toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0}))}),e.project&&o.jsx("span",{className:"text-[10px] text-text-muted font-mono truncate",children:e.project})]})]})]},e.session_id);var u}),i&&o.jsx("div",{ref:a,className:"py-2 text-center",children:o.jsxs("span",{className:"text-[10px] text-text-muted font-mono",children:["Showing ",s.length," of ",e.length,"..."]})})]})]})}var mu=[{id:"sessions",label:"Sessions"},{id:"insights",label:"Insights"}];function gu({activeTab:e,onTabChange:t,externalLinks:n,showSettings:r=!0}){return o.jsxs("div",{className:"flex items-center gap-0.5 p-0.5 rounded-lg bg-bg-surface-1 border border-border/40",children:[mu.map(({id:n,label:r})=>{const a=e===n;return o.jsx("button",{onClick:()=>t(n),className:\`\\n px-3 py-1 rounded-md text-xs font-medium transition-all duration-150\\n \${a?"bg-bg-surface-2 text-text-primary shadow-sm":"text-text-muted hover:text-text-primary"}\\n \`,children:r},n)}),r&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"w-px h-4 bg-border/60 mx-1"}),o.jsxs("button",{onClick:()=>t("settings"),className:\`\\n flex items-center gap-1 px-2.5 py-1 rounded-md text-xs font-medium transition-all duration-150\\n \${"settings"===e?"bg-bg-surface-2 text-text-primary shadow-sm":"text-text-muted hover:text-text-primary"}\\n \`,children:[o.jsx(uc,{className:"w-3 h-3"}),"Settings"]})]}),n&&n.length>0&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"w-px h-4 bg-border/60 mx-1"}),n.map(({label:e,href:t})=>o.jsxs("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 px-2.5 py-1 rounded-md text-xs font-mono tracking-wide text-text-muted hover:text-accent transition-colors duration-150",children:[e,o.jsx(Vl,{className:"w-2.5 h-2.5 opacity-50"})]},t))]})]})}function xu({label:e,active:t,onClick:n}){return o.jsx("button",{onClick:n,className:"text-[10px] font-bold uppercase tracking-wider px-3 py-1.5 rounded-full transition-all duration-200 cursor-pointer border "+(t?"bg-accent text-bg-base border-accent scale-105":"bg-bg-surface-1 border-border text-text-muted hover:text-text-primary hover:border-text-muted/50"),style:t?{boxShadow:"0 2px 10px rgba(var(--accent-rgb), 0.4)"}:void 0,children:e})}function yu({sessions:e,filters:t,onFilterChange:n}){const r=h.useMemo(()=>[...new Set(e.map(e=>e.client))].sort(),[e]),a=h.useMemo(()=>[...new Set(e.flatMap(e=>e.languages))].sort(),[e]),s=h.useMemo(()=>[...new Set(e.map(e=>e.project).filter(e=>{if(!e)return!1;const t=e.trim().toLowerCase();return!["untitled","mcp","unknown","default","none"].includes(t)}))].sort(),[e]);return r.length>0||a.length>0||s.length>0?o.jsxs("div",{className:"flex flex-wrap items-center gap-2 px-1",children:[o.jsx(xu,{label:"All",active:"all"===t.client&&"all"===t.language&&"all"===t.project,onClick:()=>{n("client","all"),n("language","all"),n("project","all")}}),r.map(e=>o.jsx(xu,{label:Sc[e]??e,active:t.client===e,onClick:()=>n("client",t.client===e?"all":e)},e)),a.map(e=>o.jsx(xu,{label:e,active:t.language===e,onClick:()=>n("language",t.language===e?"all":e)},e)),s.map(e=>o.jsx(xu,{label:e,active:t.project===e,onClick:()=>n("project",t.project===e?"all":e)},e))]}):null}function vu({onDelete:e,size:t="md",className:n=""}){const[r,a]=h.useState(!1),s=h.useRef(void 0);h.useEffect(()=>()=>{s.current&&clearTimeout(s.current)},[]);const i=t=>{t.stopPropagation(),s.current&&clearTimeout(s.current),a(!1),e()},l=e=>{e.stopPropagation(),s.current&&clearTimeout(s.current),a(!1)},c="sm"===t?"w-3 h-3":"w-3.5 h-3.5",u="sm"===t?"p-1":"p-1.5";return r?o.jsxs("span",{className:\`inline-flex items-center gap-0.5 \${n}\`,onClick:e=>e.stopPropagation(),children:[o.jsx("button",{onClick:i,className:\`\${u} rounded-lg transition-all bg-error/15 text-error hover:bg-error/25\`,title:"Confirm delete",children:o.jsx(jl,{className:c})}),o.jsx("button",{onClick:l,className:\`\${u} rounded-lg transition-all text-text-muted hover:bg-bg-surface-2\`,title:"Cancel",children:o.jsx(bc,{className:c})})]}):o.jsx("button",{onClick:e=>{e.stopPropagation(),a(!0),s.current=setTimeout(()=>a(!1),5e3)},className:\`\${u} rounded-lg transition-all text-text-muted hover:text-error/70 hover:bg-error/5 \${n}\`,title:"Delete",children:o.jsx(mc,{className:c})})}function bu({text:e,words:t}){if(!t?.length||!e)return o.jsx(o.Fragment,{children:e});const n=t.map(e=>e.replace(/[.*+?^\${}()|[\\]\\\\]/g,"\\\\$&")),r=new RegExp(\`(\${n.join("|")})\`,"gi"),a=e.split(r);return o.jsx(o.Fragment,{children:a.map((e,t)=>t%2==1?o.jsx("mark",{className:"bg-accent/30 text-inherit rounded-sm px-px",children:e},t):o.jsx("span",{children:e},t))})}function wu(e,t){const n=e=>new Date(e).toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0});return\`\${n(e)} \u2014 \${n(t)}\`}function ku(e){if(e<60)return\`\${e}s\`;const t=Math.round(e/60);if(t<60)return\`\${t}m\`;const n=Math.floor(t/60),r=t%60;return r>0?\`\${n}h \${r}m\`:\`\${n}h\`}var Su={feature:"bg-success/15 text-success border-success/30",bugfix:"bg-error/15 text-error border-error/30",refactor:"bg-purple/15 text-purple border-purple/30",test:"bg-blue/15 text-blue border-blue/30",docs:"bg-accent/15 text-accent border-accent/30",setup:"bg-text-muted/15 text-text-muted border-text-muted/20",deployment:"bg-emerald/15 text-emerald border-emerald/30"};function ju({category:e}){const t=Su[e]??"bg-bg-surface-2 text-text-secondary border-border";return o.jsx("span",{className:\`text-[10px] px-1.5 py-0.5 rounded-full border font-bold uppercase tracking-wider \${t}\`,children:e})}function Nu(e){const t="string"==typeof e?JSON.parse(e):e,n=[t.prompt_quality,t.context_provided,t.scope_quality,t.independence_level].filter(e=>"number"==typeof e);return n.length>0?n.reduce((e,t)=>e+t,0)/n.length:0}function Cu(e){return e>=5?"text-text-secondary":e>=4?"text-amber-500":e>=3?"text-orange-500":"text-error"}function Tu({score:e,decimal:t}){const n=e>=5,r=t?e.toFixed(1):String(Math.round(e)),a=r.endsWith(".0")?r.slice(0,-2):r;return o.jsxs("span",{className:"text-[10px] font-mono "+(n?"":"font-bold"),title:\`\${e.toFixed(1)}/5\`,children:[o.jsx("span",{className:Cu(e),children:a}),o.jsx("span",{className:"text-text-muted/50",children:"/5"})]})}function Eu({model:e}){return e?o.jsx("div",{className:"flex flex-wrap items-center gap-4",children:o.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] whitespace-nowrap",children:[o.jsx(Rl,{className:"w-3 h-3 text-text-muted/50 flex-shrink-0"}),o.jsx("span",{className:"text-text-secondary",children:"Model"}),o.jsx("span",{className:"text-text-secondary font-mono font-bold ml-0.5",children:e})]})}):null}function Mu({evaluation:e,showPublic:t=!1,model:n}){const r=!!n,a=[{label:"Prompt",value:e.prompt_quality,reason:e.prompt_quality_reason,Icon:tc},{label:"Context",value:e.context_provided,reason:e.context_provided_reason,Icon:$l},{label:"Scope",value:e.scope_quality,reason:e.scope_quality_reason,Icon:fc},{label:"Independence",value:e.independence_level,reason:e.independence_level_reason,Icon:_l}],s=a.some(e=>e.reason)||e.task_outcome_reason;return o.jsxs("div",{className:"px-2.5 py-2 bg-bg-surface-2/30 rounded-md mb-2",children:[o.jsxs("div",{className:"flex flex-wrap items-center gap-x-5 gap-y-2",children:[a.map(({label:e,value:t,Icon:n})=>o.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] whitespace-nowrap",children:[o.jsx(n,{className:"w-3 h-3 text-text-muted/60 flex-shrink-0"}),o.jsx("span",{className:"text-text-secondary whitespace-nowrap",children:e}),o.jsx(Tu,{score:t})]},e)),r&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"hidden md:block h-3.5 w-px bg-border/30"}),o.jsx(Eu,{model:n})]}),o.jsx("div",{className:"hidden md:block h-3.5 w-px bg-border/30"}),o.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] whitespace-nowrap",children:[o.jsx(ac,{className:"w-3 h-3 text-text-muted/50"}),o.jsx("span",{className:"text-text-muted",children:"Iterations"}),o.jsx("span",{className:"text-text-secondary font-mono font-bold ml-0.5",children:e.iteration_count})]}),o.jsxs("div",{className:"flex items-center gap-1.5 text-[10px] whitespace-nowrap",children:[o.jsx(vc,{className:"w-3 h-3 text-text-muted/50"}),o.jsx("span",{className:"text-text-muted",children:"Tools"}),o.jsx("span",{className:"text-text-secondary font-mono font-bold ml-0.5",children:e.tools_leveraged})]})]}),!t&&s&&o.jsx("div",{className:"mt-2 pt-2 border-t border-border/15",children:o.jsxs("div",{className:"grid grid-cols-[86px_minmax(0,1fr)] gap-x-2 gap-y-1 text-[10px]",children:[a.filter(e=>e.reason).map(({label:e,value:t,reason:n})=>o.jsxs("div",{className:"contents",children:[o.jsxs("span",{className:\`\${Cu(t)} font-bold text-right\`,children:[e,":"]}),o.jsx("span",{className:"text-text-secondary leading-relaxed",children:n})]},e)),e.task_outcome_reason&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"col-span-2 border-t border-border/15 mt-0.5 mb-0.5"}),o.jsx("span",{className:"text-text-secondary font-bold text-right",children:"Outcome:"}),o.jsx("span",{className:"text-text-secondary leading-relaxed",children:e.task_outcome_reason})]})]})})]})}function Pu({prompt:e,imageCount:t,images:n}){const[r,a]=h.useState(!1),s=e.length>300,i=s&&!r?e.slice(0,300)+"\u2026":e,l=t??n?.length??0;return o.jsxs("div",{className:"px-2.5 py-2 bg-bg-surface-2/20 rounded-md mb-2 border border-border/10",children:[o.jsxs("div",{className:"flex items-center gap-1.5 mb-1.5",children:[o.jsx(tc,{className:"w-3 h-3 text-text-muted/50"}),o.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wider text-text-muted",children:"Prompt"}),l>0&&o.jsxs("span",{className:"inline-flex items-center gap-0.5 text-[10px] text-text-muted bg-bg-surface-2 px-1.5 py-0.5 rounded-full border border-border/20",children:[o.jsx(Yl,{className:"w-2.5 h-2.5"}),l]})]}),o.jsx("p",{className:"text-[11px] text-text-secondary leading-relaxed whitespace-pre-wrap break-words",children:i}),s&&o.jsx("button",{onClick:()=>a(!r),className:"text-[10px] text-accent hover:text-accent/80 mt-1 font-medium",children:r?"Show less":"Show more"}),n&&n.length>0&&o.jsx("div",{className:"mt-2 pt-1.5 border-t border-border/10 space-y-1",children:n.map((e,t)=>o.jsxs("div",{className:"flex items-start gap-1.5",children:[o.jsx(Yl,{className:"w-3 h-3 text-text-muted/50 flex-shrink-0 mt-0.5"}),o.jsx("span",{className:"text-[10px] text-text-secondary leading-relaxed",children:e.description})]},t))})]})}var Lu=h.memo(function({session:e,milestones:t,defaultExpanded:n=!1,externalShowPublic:r,contextLabel:a,hideClientAvatar:s=!1,hideProject:i=!1,showFullDate:l=!1,highlightWords:c,onDeleteSession:u,onDeleteMilestone:d}){const[f,p]=h.useState(n),[m,g]=h.useState(!1),x=r??m,y=g,v=Mc(e.client),b=kc[v]??"#91919a",w="cursor"===v,k=w?"var(--text-primary)":b,S=w?{backgroundColor:"var(--bg-surface-2)",color:"var(--text-primary)",border:"1px solid var(--border)"}:{backgroundColor:\`\${b}15\`,color:b,border:\`1px solid \${b}30\`},j=jc[v]??v.slice(0,2).toUpperCase(),N=Cc[v],C=t.length>0||!!e.evaluation||!!e.model||!!e.prompt,T=e.project?.trim()||"",E=!T||["untitled","mcp","unknown","default","none","null","undefined"].includes(T.toLowerCase()),M=t[0],P=E&&M?M.title:T,L=E&&M?M.private_title||M.title:T;let D=e.private_title||e.title||L||"Untitled Session",A=e.title||P||"Untitled Session";const _=D!==A&&void 0===r,z=!!u||C||_,R=a?.replace(/^\\s*prompt\\s*/i,"").trim();return o.jsxs("div",{className:"group/card mb-2 rounded-xl border transition-all duration-200 "+(f?"bg-bg-surface-1 border-accent/35 shadow-md":"bg-bg-surface-1/35 border-border/50 hover:border-accent/30"),children:[o.jsxs("div",{className:"flex items-center",children:[o.jsxs("button",{className:"flex-1 flex items-center gap-3 px-3.5 py-2.5 text-left min-w-0",onClick:()=>C&&p(!f),style:{cursor:C?"pointer":"default"},children:[!s&&o.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center text-[11px] font-black font-mono flex-shrink-0 shadow-sm",style:S,title:Sc[v]??v,children:N?o.jsx("div",{className:"w-4 h-4",style:{backgroundColor:k,maskImage:\`url(\${N})\`,maskSize:"contain",maskRepeat:"no-repeat",maskPosition:"center",WebkitMaskImage:\`url(\${N})\`,WebkitMaskSize:"contain",WebkitMaskRepeat:"no-repeat",WebkitMaskPosition:"center"}}):j}),o.jsxs("div",{className:"flex-1 min-w-0 space-y-1",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[a&&o.jsx("span",{className:"inline-flex items-center rounded-md border border-accent/20 bg-accent/10 px-1.5 py-0.5 text-[9px] font-bold uppercase tracking-wider text-accent/90",children:R||a}),o.jsx("div",{className:"flex items-center gap-1.5 min-w-0",children:o.jsx(Qi,{mode:"wait",children:o.jsxs(pl.div,{initial:{opacity:0,x:-5},animate:{opacity:1,x:0},exit:{opacity:0,x:5},transition:{duration:.1},className:"flex items-center gap-1.5 min-w-0",children:[x?o.jsx(dc,{className:"w-3 h-3 text-success/70 flex-shrink-0"}):o.jsx(Zl,{className:"w-3 h-3 text-accent/70 flex-shrink-0"}),o.jsx("span",{className:"text-[15px] font-semibold truncate text-text-primary tracking-tight leading-tight",children:o.jsx(bu,{text:x?A:D,words:c})})]},x?"public":"private")})})]}),o.jsxs("div",{className:"flex items-center gap-3.5 text-[11px] text-text-secondary font-medium",children:[o.jsxs("span",{className:"flex items-center gap-1.5",children:[o.jsx(Pl,{className:"w-3 h-3 opacity-75"}),ku(e.duration_seconds)]}),o.jsxs("span",{className:"text-text-secondary/80 font-mono tracking-tight",children:[l&&\`\${new Date(e.started_at).toLocaleDateString([],{month:"short",day:"numeric"})} \xB7 \`,wu(e.started_at,e.ended_at).split(" \u2014 ")[0]]}),!x&&!E&&!i&&o.jsxs("span",{className:"flex items-center gap-1 text-text-secondary/85",title:\`Project: \${T}\`,children:[o.jsx(Ul,{className:"w-2.5 h-2.5 opacity-70"}),o.jsx("span",{className:"max-w-[130px] truncate",children:T})]}),t.length>0&&o.jsxs("span",{className:"flex items-center gap-1 text-text-secondary/85",title:\`\${t.length} milestone\${1!==t.length?"s":""}\`,children:[o.jsx(Hl,{className:"w-2.5 h-2.5 opacity-70"}),t.length]}),e.evaluation&&o.jsx(Tu,{score:Nu(e.evaluation),decimal:!0})]})]})]}),z&&o.jsxs("div",{className:"flex items-center px-2.5 gap-1.5 border-l border-border/30 h-9 self-center",children:[u&&o.jsx(vu,{onDelete:()=>u(e.session_id),className:"opacity-0 group-hover/card:opacity-100 focus-within:opacity-100"}),_&&o.jsx("button",{onClick:e=>{e.stopPropagation(),y(!x)},className:"p-1.5 rounded-lg transition-all "+(x?"bg-success/10 text-success":"text-text-secondary hover:text-text-primary hover:bg-bg-surface-2"),title:x?"Public title shown":"Private title shown","aria-label":x?"Show private title":"Show public title",children:x?o.jsx(Ol,{className:"w-3.5 h-3.5"}):o.jsx(Il,{className:"w-3.5 h-3.5"})}),C&&o.jsx("button",{onClick:()=>p(!f),className:"p-1.5 rounded-lg transition-all "+(f?"text-accent bg-accent/8":"text-text-secondary hover:text-text-primary hover:bg-bg-surface-2"),title:f?"Collapse details":"Expand details","aria-label":f?"Collapse details":"Expand details",children:o.jsx(Nl,{className:"w-4 h-4 transition-transform duration-200 "+(f?"rotate-180":"")})})]})]}),o.jsx(Qi,{children:f&&C&&o.jsx(pl.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},className:"overflow-hidden",children:o.jsxs("div",{className:"px-3.5 pb-3.5 pt-1.5 space-y-2",children:[o.jsx("div",{className:"h-px bg-border/20 mb-2 mx-1"}),!x&&e.prompt&&o.jsx(Pu,{prompt:e.prompt,imageCount:e.prompt_image_count,images:e.prompt_images}),e.evaluation&&o.jsx(Mu,{evaluation:e.evaluation,showPublic:x,model:e.model}),!e.evaluation&&o.jsx(Eu,{model:e.model}),t.length>0&&o.jsx("div",{className:"space-y-0.5",children:t.map(e=>{const t=x?e.title:e.private_title||e.title,n=function(e){if(!e||e<=0)return"";if(e<60)return\`\${e}m\`;const t=Math.floor(e/60),n=e%60;return n>0?\`\${t}h \${n}m\`:\`\${t}h\`}(e.duration_minutes);return o.jsxs("div",{className:"group flex items-center gap-2 p-1.5 rounded-md hover:bg-bg-surface-2/40 transition-colors",children:[o.jsx("div",{className:"w-1.5 h-1.5 rounded-full flex-shrink-0",style:{backgroundColor:Tc[e.category]??"#9c9588"}}),o.jsx("div",{className:"flex-1 min-w-0",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-xs font-medium text-text-secondary group-hover:text-text-primary truncate",children:o.jsx(bu,{text:t,words:c})}),o.jsx(ju,{category:e.category})]})}),n&&o.jsx("span",{className:"text-[10px] text-text-muted font-mono",children:n}),d&&o.jsx(vu,{onDelete:()=>d(e.id),size:"sm",className:"opacity-0 group-hover:opacity-100"})]},e.id)})})]})})})]})});function Du(e){if(e<60)return\`\${e}s\`;const t=Math.round(e/60);if(t<60)return\`\${t}m\`;const n=Math.floor(t/60),r=t%60;return r>0?\`\${n}h \${r}m\`:\`\${n}h\`}function Au({score:e,decimal:t}){const n=e>=5,r=n?"text-text-secondary":e>=4?"text-amber-500":e>=3?"text-orange-500":"text-error",a=t?e.toFixed(1):String(Math.round(e)),s=a.endsWith(".0")?a.slice(0,-2):a;return o.jsxs("span",{className:"text-[10px] font-mono "+(n?"":"font-bold"),title:\`\${e.toFixed(1)}/5\`,children:[o.jsx("span",{className:r,children:s}),o.jsx("span",{className:"text-text-muted/50",children:"/5"})]})}var _u=h.memo(function({group:e,defaultExpanded:t,globalShowPublic:n,showFullDate:r,highlightWords:a,onDeleteSession:s,onDeleteMilestone:i,onDeleteConversation:l}){const[c,u]=h.useState(t),[d,f]=h.useState(!1),p=n||d;if(1===e.sessions.length){const l=e.sessions[0];return o.jsx(Lu,{session:l.session,milestones:l.milestones,defaultExpanded:t&&l.milestones.length>0,externalShowPublic:n||void 0,showFullDate:r,highlightWords:a,onDeleteSession:s,onDeleteMilestone:i})}const m=Mc(e.sessions[0].session.client),g=kc[m]??"#91919a",x="cursor"===m,y=x?"var(--text-primary)":g,v=x?{backgroundColor:"var(--bg-surface-2)",color:"var(--text-primary)",border:"1px solid var(--border)"}:{backgroundColor:\`\${g}15\`,color:g,border:\`1px solid \${g}30\`},b=jc[m]??m.slice(0,2).toUpperCase(),w=Cc[m],k=e.aggregateEval,S=k?(k.prompt_quality+k.context_provided+k.scope_quality+k.independence_level)/4:0,j=e.sessions[0].session,N=j.private_title||j.title||j.project||"Conversation",C=j.title||j.project||"Conversation",T=N!==C&&!n,E=j.project?.trim()||"",M=!!E&&!["untitled","mcp","unknown","default","none","null","undefined"].includes(E.toLowerCase());return o.jsxs("div",{className:"group/conv mb-2 rounded-xl border transition-all duration-200 "+(c?"bg-bg-surface-1 border-accent/35 shadow-md":"bg-bg-surface-1/35 border-border/50 hover:border-accent/30"),children:[o.jsxs("div",{className:"flex items-center",children:[o.jsxs("button",{className:"flex-1 flex items-center gap-3 px-3.5 py-2.5 text-left min-w-0",onClick:()=>u(!c),children:[o.jsx("div",{className:"w-8 h-8 rounded-lg flex items-center justify-center text-[11px] font-black font-mono flex-shrink-0 shadow-sm",style:v,title:Sc[m]??m,children:w?o.jsx("div",{className:"w-4 h-4",style:{backgroundColor:y,maskImage:\`url(\${w})\`,maskSize:"contain",maskRepeat:"no-repeat",maskPosition:"center",WebkitMaskImage:\`url(\${w})\`,WebkitMaskSize:"contain",WebkitMaskRepeat:"no-repeat",WebkitMaskPosition:"center"}}):b}),o.jsxs("div",{className:"flex-1 min-w-0 space-y-1",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"flex items-center gap-1.5 min-w-0",children:o.jsx(Qi,{mode:"wait",children:o.jsxs(pl.div,{initial:{opacity:0,x:-5},animate:{opacity:1,x:0},exit:{opacity:0,x:5},transition:{duration:.1},className:"flex items-center gap-1.5 min-w-0",children:[p?o.jsx(dc,{className:"w-3 h-3 text-success/70 flex-shrink-0"}):o.jsx(Zl,{className:"w-3 h-3 text-accent/70 flex-shrink-0"}),o.jsx("span",{className:"text-[15px] font-semibold truncate text-text-primary tracking-tight leading-tight",children:o.jsx(bu,{text:p?C:N,words:a})})]},p?"public":"private")})}),o.jsxs("span",{className:"text-[10px] font-bold text-accent/90 bg-accent/10 px-1.5 py-0.5 rounded border border-accent/20 flex-shrink-0",children:[e.sessions.length," prompts"]})]}),o.jsxs("div",{className:"flex items-center gap-3.5 text-[11px] text-text-secondary font-medium",children:[o.jsxs("span",{className:"flex items-center gap-1.5",children:[o.jsx(Pl,{className:"w-3 h-3 opacity-75"}),Du(e.totalDuration)]}),o.jsxs("span",{className:"text-text-secondary/80 font-mono tracking-tight",children:[r&&\`\${new Date(e.lastSessionAt).toLocaleDateString([],{month:"short",day:"numeric"})} \xB7 \`,(P=e.lastSessionAt,new Date(P).toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0}))]}),!p&&M&&o.jsxs("span",{className:"flex items-center gap-1 text-text-secondary/85",title:\`Project: \${E}\`,children:[o.jsx(Ul,{className:"w-2.5 h-2.5 opacity-70"}),o.jsx("span",{className:"max-w-[130px] truncate",children:E})]}),e.totalMilestones>0&&o.jsxs("span",{className:"flex items-center gap-1 text-text-secondary/85",title:\`\${e.totalMilestones} milestone\${1!==e.totalMilestones?"s":""}\`,children:[o.jsx(Hl,{className:"w-2.5 h-2.5 opacity-70"}),e.totalMilestones]}),k&&o.jsx(Au,{score:S,decimal:!0})]})]})]}),o.jsxs("div",{className:"flex items-center px-2.5 gap-1.5 border-l border-border/30 h-9 self-center",children:[l&&e.conversationId&&o.jsx(vu,{onDelete:()=>l(e.conversationId),className:"opacity-0 group-hover/conv:opacity-100 focus-within:opacity-100"}),T&&o.jsx("button",{onClick:e=>{e.stopPropagation(),f(!d)},className:"p-1.5 rounded-lg transition-all "+(p?"bg-success/10 text-success":"text-text-secondary hover:text-text-primary hover:bg-bg-surface-2"),title:p?"Public title shown":"Private title shown","aria-label":p?"Show private title":"Show public title",children:p?o.jsx(Ol,{className:"w-3.5 h-3.5"}):o.jsx(Il,{className:"w-3.5 h-3.5"})}),o.jsx("button",{onClick:()=>u(!c),className:"p-1.5 rounded-lg transition-all "+(c?"text-accent bg-accent/8":"text-text-secondary hover:text-text-primary hover:bg-bg-surface-2"),title:c?"Collapse conversation":"Expand conversation","aria-label":c?"Collapse conversation":"Expand conversation",children:o.jsx(Nl,{className:"w-4 h-4 transition-transform duration-200 "+(c?"rotate-180":"")})})]})]}),o.jsx(Qi,{children:c&&o.jsx(pl.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.2},className:"overflow-hidden",children:o.jsxs("div",{className:"px-3.5 pb-2.5 relative",children:[o.jsx("div",{className:"absolute left-[1.75rem] top-0 bottom-2 w-px",style:{backgroundColor:\`\${g}25\`}}),o.jsx("div",{className:"space-y-1 pl-10",children:e.sessions.map(e=>o.jsxs("div",{className:"relative",children:[o.jsx("div",{className:"absolute -left-7 top-5 w-2 h-2 rounded-full border-2",style:{backgroundColor:g,borderColor:\`\${g}40\`}}),o.jsx(Lu,{session:e.session,milestones:e.milestones,defaultExpanded:!1,externalShowPublic:p||void 0,hideClientAvatar:!0,hideProject:!0,showFullDate:r,highlightWords:a,onDeleteSession:s,onDeleteMilestone:i})]},e.session.session_id))})]})})})]});var P});function zu({sessions:e,milestones:t,filters:n,globalShowPublic:r,showFullDate:a,highlightWords:s,outsideWindowCounts:i,onNavigateNewer:l,onNavigateOlder:c,onDeleteSession:u,onDeleteConversation:d,onDeleteMilestone:f}){const p=h.useMemo(()=>e.filter(e=>("all"===n.client||e.client===n.client)&&(!("all"!==n.language&&!e.languages.includes(n.language))&&("all"===n.project||(e.project??"")===n.project))),[e,n]),m=h.useMemo(()=>"all"===n.category?t:t.filter(e=>e.category===n.category),[t,n.category]),g=h.useMemo(()=>{const e=function(e,t){const n=new Map;for(const a of t){const e=n.get(a.session_id);e?e.push(a):n.set(a.session_id,[a])}const r=e.map(e=>({session:e,milestones:n.get(e.session_id)??[]}));return r.sort((e,t)=>Dc(t.session.started_at)-Dc(e.session.started_at)),r}(p,m);return function(e){const t=new Map,n=[];for(const a of e){const e=a.session.conversation_id;if(e){const n=t.get(e);n?n.push(a):t.set(e,[a])}else n.push(a)}const r=[];for(const[a,s]of t){s.sort((e,t)=>Dc(t.session.started_at)-Dc(e.session.started_at));const e=s.reduce((e,t)=>e+t.session.duration_seconds,0),t=s.reduce((e,t)=>e+t.milestones.length,0),n=s[s.length-1].session.started_at,i=s[0].session.ended_at,o=s[0].session.started_at;r.push({conversationId:a,sessions:s,aggregateEval:_c(s),totalDuration:e,totalMilestones:t,startedAt:n,endedAt:i,lastSessionAt:o})}for(const a of n)r.push({conversationId:null,sessions:[a],aggregateEval:a.session.evaluation?_c([a]):null,totalDuration:a.session.duration_seconds,totalMilestones:a.milestones.length,startedAt:a.session.started_at,endedAt:a.session.ended_at,lastSessionAt:a.session.started_at});return r.sort((e,t)=>Dc(t.lastSessionAt)-Dc(e.lastSessionAt)),r}(e)},[p,m]),[x,y]=h.useState(25),v=h.useRef(null);if(h.useEffect(()=>{y(25)},[g]),h.useEffect(()=>{const e=v.current;if(!e)return;const t=new IntersectionObserver(([e])=>{e?.isIntersecting&&y(e=>e+25)},{rootMargin:"200px"});return t.observe(e),()=>t.disconnect()},[g,x]),0===g.length){const e=i&&i.before>0,t=i&&i.after>0;return o.jsxs("div",{className:"text-center text-text-muted py-8 text-sm mb-4 space-y-3",children:[t&&o.jsxs("button",{onClick:l,className:"flex flex-col items-center gap-0.5 mx-auto text-[11px] text-text-muted/60 hover:text-accent transition-colors group",children:[o.jsx(El,{className:"w-3.5 h-3.5"}),o.jsxs("span",{children:[i.after," newer session",1!==i.after?"s":""]}),i.newerLabel&&o.jsx("span",{className:"text-[10px] opacity-70 group-hover:opacity-100",children:i.newerLabel})]}),o.jsx("div",{children:"No sessions in this window"}),e&&o.jsxs("button",{onClick:c,className:"flex flex-col items-center gap-0.5 mx-auto text-[11px] text-text-muted/60 hover:text-accent transition-colors group",children:[i.olderLabel&&o.jsx("span",{className:"text-[10px] opacity-70 group-hover:opacity-100",children:i.olderLabel}),o.jsxs("span",{children:[i.before," older session",1!==i.before?"s":""]}),o.jsx(Nl,{className:"w-3.5 h-3.5"})]})]})}const b=x<g.length,w=b?g.slice(0,x):g;return o.jsxs("div",{className:"space-y-2 mb-4",children:[i&&i.after>0&&o.jsxs("button",{onClick:l,className:"flex flex-col items-center gap-0.5 w-full text-[11px] text-text-muted/60 hover:text-accent py-1.5 transition-colors group",children:[o.jsx(El,{className:"w-3.5 h-3.5"}),o.jsxs("span",{children:[i.after," newer session",1!==i.after?"s":""]}),i.newerLabel&&o.jsx("span",{className:"text-[10px] opacity-70 group-hover:opacity-100",children:i.newerLabel})]}),w.map(e=>o.jsx(_u,{group:e,defaultExpanded:!1,globalShowPublic:r,showFullDate:a,highlightWords:s,onDeleteSession:u,onDeleteMilestone:f,onDeleteConversation:d},e.conversationId??e.sessions[0].session.session_id)),b&&o.jsx("div",{ref:v,className:"h-px"}),g.length>25&&o.jsxs("div",{className:"flex items-center justify-center gap-3 py-2 text-[11px] text-text-muted",children:[o.jsxs("span",{children:["Showing ",Math.min(x,g.length)," of ",g.length," conversations"]}),b&&o.jsx("button",{onClick:()=>y(g.length),className:"text-accent hover:text-accent/80 font-semibold transition-colors",children:"Show all"})]}),i&&i.before>0&&o.jsxs("button",{onClick:c,className:"flex flex-col items-center gap-0.5 w-full text-[11px] text-text-muted/60 hover:text-accent py-1.5 transition-colors group",children:[i.olderLabel&&o.jsx("span",{className:"text-[10px] opacity-70 group-hover:opacity-100",children:i.olderLabel}),o.jsxs("span",{children:[i.before," older session",1!==i.before?"s":""]}),o.jsx(Nl,{className:"w-3.5 h-3.5"})]})]})}var Ru={accent:{border:"border-accent/20",bg:"bg-[var(--accent-alpha)]",dot:"bg-accent"},success:{border:"border-success/20",bg:"bg-success/10",dot:"bg-success"},muted:{border:"border-border",bg:"bg-bg-surface-2/50",dot:"bg-text-muted"}};function Fu({label:e,color:t="accent",dot:n=!1,icon:r,glow:a=!1,className:s="","data-testid":i}){const l=Ru[t];return o.jsxs("div",{"data-testid":i,className:\`inline-flex items-center gap-2 px-3 py-1 rounded-full border \${l.border} \${l.bg} \${s}\`,style:a?{boxShadow:"0 0 10px rgba(var(--accent-rgb), 0.1)"}:void 0,children:[n&&o.jsx("span",{className:\`w-1.5 h-1.5 rounded-full \${l.dot} animate-pulse\`}),r,o.jsx("span",{className:"text-[10px] font-mono text-text-secondary tracking-widest uppercase",children:e})]})}var Vu={"1h":{visibleDuration:36e5,majorTickInterval:9e5,minorTickInterval:3e5,labelFormat:e=>e.toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0})},"3h":{visibleDuration:108e5,majorTickInterval:18e5,minorTickInterval:6e5,labelFormat:e=>e.toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0})},"6h":{visibleDuration:216e5,majorTickInterval:36e5,minorTickInterval:9e5,labelFormat:e=>e.toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0})},"12h":{visibleDuration:432e5,majorTickInterval:72e5,minorTickInterval:18e5,labelFormat:e=>e.toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0})},"24h":{visibleDuration:864e5,majorTickInterval:144e5,minorTickInterval:36e5,labelFormat:e=>e.toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0})},day:{visibleDuration:864e5,majorTickInterval:144e5,minorTickInterval:36e5,labelFormat:e=>e.toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0})},"7d":{visibleDuration:6048e5,majorTickInterval:864e5,minorTickInterval:216e5,labelFormat:e=>e.toLocaleDateString([],{weekday:"short",month:"short",day:"numeric"})},week:{visibleDuration:6048e5,majorTickInterval:864e5,minorTickInterval:216e5,labelFormat:e=>e.toLocaleDateString([],{weekday:"short",month:"short",day:"numeric"})},"30d":{visibleDuration:2592e6,majorTickInterval:6048e5,minorTickInterval:864e5,labelFormat:e=>e.toLocaleDateString([],{month:"short",day:"numeric"})},month:{visibleDuration:2592e6,majorTickInterval:6048e5,minorTickInterval:864e5,labelFormat:e=>e.toLocaleDateString([],{month:"short",day:"numeric"})}};function Iu(e){if(e<60)return\`\${e}s\`;const t=Math.round(e/60);if(t<60)return\`\${t}m\`;const n=Math.floor(t/60),r=t%60;return r>0?\`\${n}h \${r}m\`:\`\${n}h\`}function Ou({value:e,onChange:t,scale:n,window:r,sessions:a=[],milestones:s=[],showPublic:i=!1}){const l=h.useRef(null),[c,u]=h.useState(0),d=void 0!==r;h.useEffect(()=>{if(!l.current)return;const e=new ResizeObserver(e=>{for(const t of e)u(t.contentRect.width)});return e.observe(l.current),u(l.current.getBoundingClientRect().width),()=>e.disconnect()},[]);const f=Vu[n],p=d?r.end-r.start:f.visibleDuration,m=d?r.end:e,g=d?r.start:e-f.visibleDuration,x=c>0?c/p:0,[y,v]=h.useState(!1),[b,w]=h.useState(0),k=h.useRef(0),S=h.useRef(0),j=h.useRef(null);h.useEffect(()=>()=>{j.current&&clearTimeout(j.current)},[]);const N=h.useCallback(e=>{v(!0),k.current=e.clientX,S.current=0,w(0),e.currentTarget.setPointerCapture(e.pointerId)},[]),C=h.useCallback(n=>{if(!y||0===x)return;const r=n.clientX-k.current;k.current=n.clientX,S.current+=r,w(e=>e+r),j.current||(j.current=setTimeout(()=>{j.current=null;const n=S.current;S.current=0,w(0);const r=e+-n/x,a=d?Math.max(Math.min(r,m),g):Math.min(r,Date.now());t(a)},80))},[y,x,e,m,g,d,t]),T=h.useCallback(()=>{if(v(!1),j.current&&(clearTimeout(j.current),j.current=null),0!==S.current&&x>0){const n=e+-S.current/x,r=d?Math.max(Math.min(n,m),g):Math.min(n,Date.now());S.current=0,t(r)}w(0)},[e,m,g,d,x,t]),E=h.useMemo(()=>{if(!c||0===x)return[];const e=g-f.majorTickInterval,t=m+f.majorTickInterval,n=[];for(let r=Math.ceil(e/f.majorTickInterval)*f.majorTickInterval;r<=t;r+=f.majorTickInterval)n.push({type:"major",time:r,position:(r-m)*x,label:f.labelFormat(new Date(r))});for(let r=Math.ceil(e/f.minorTickInterval)*f.minorTickInterval;r<=t;r+=f.minorTickInterval)r%f.majorTickInterval!==0&&n.push({type:"minor",time:r,position:(r-m)*x});return n},[g,m,c,x,f]),M=h.useMemo(()=>a.map(e=>({session:e,start:Dc(e.started_at),end:Dc(e.ended_at)})),[a]),P=h.useMemo(()=>{if(!c||0===x)return[];const e=M.filter(e=>e.start<=m&&e.end>=g).map(e=>({session:e.session,leftOffset:(Math.max(e.start,g)-m)*x,width:(Math.min(e.end,m)-Math.max(e.start,g))*x}));return e.length>100?(e.sort((e,t)=>t.width-e.width),e.slice(0,100)):e},[M,g,m,c,x]),L=h.useMemo(()=>s.map(e=>({milestone:e,time:Dc(e.created_at)})).sort((e,t)=>e.time-t.time),[s]),D=h.useMemo(()=>{if(!c||0===x||!L.length)return[];let e=0,t=L.length;for(;e<t;){const n=e+t>>1;L[n].time<g?e=n+1:t=n}const n=e;for(t=L.length;e<t;){const n=e+t>>1;L[n].time<=m?e=n+1:t=n}const r=e,a=[];for(let s=n;s<r;s++){const e=L[s];a.push({...e,offset:(e.time-m)*x})}return a},[L,g,m,c,x]),A=h.useMemo(()=>{if(!c||0===x)return null;const e=Date.now();return e<g||e>m?null:(e-m)*x},[g,m,c,x]),[_,z]=h.useState(null),R=h.useRef(e);return h.useEffect(()=>{_&&Math.abs(e-R.current)>1e3&&z(null),R.current=e},[e,_]),o.jsxs("div",{className:"relative h-16",children:[o.jsxs("div",{"data-testid":"time-scrubber",className:"absolute inset-0 bg-transparent border-t border-border/50 overflow-hidden select-none touch-none cursor-grab active:cursor-grabbing",ref:l,onPointerDown:N,onPointerMove:C,onPointerUp:T,style:{touchAction:"none"},children:[null!==A&&o.jsx("div",{className:"absolute top-0 bottom-0 w-[2px] bg-accent/50 z-30",style:{right:-A}}),null!==A&&A<-1&&o.jsx("div",{className:"absolute top-0 bottom-0 bg-bg-base/30 z-20",style:{right:0,width:-A}}),o.jsxs("div",{className:"absolute right-0 top-0 bottom-0 w-0 pointer-events-none",style:b?{transform:\`translateX(\${b}px)\`,willChange:"transform"}:void 0,children:[E.map(e=>o.jsx("div",{className:"absolute top-0 border-l "+("major"===e.type?"border-border/60":"border-border/30"),style:{left:e.position,height:"major"===e.type?"100%":"35%",bottom:0},children:"major"===e.type&&e.label&&o.jsx("span",{className:"absolute top-2 left-2 text-[9px] font-bold text-text-muted uppercase tracking-wider whitespace-nowrap bg-bg-surface-1/80 px-1 py-0.5 rounded",children:e.label})},e.time)),P.map(e=>o.jsx("div",{className:"absolute bottom-0 rounded-t-md pointer-events-auto cursor-pointer hover:opacity-80",style:{left:e.leftOffset,width:Math.max(e.width,3),height:"45%",backgroundColor:"rgba(var(--accent-rgb), 0.15)",borderTop:"2px solid rgba(var(--accent-rgb), 0.5)",boxShadow:"inset 0 1px 10px rgba(var(--accent-rgb), 0.05)"},onMouseEnter:t=>{const n=t.currentTarget.getBoundingClientRect();z({type:"session",data:e.session,x:n.left+n.width/2,y:n.top})},onMouseLeave:()=>z(null)},e.session.session_id)),D.map((e,n)=>o.jsx("div",{className:"absolute bottom-2 pointer-events-auto cursor-pointer z-40 transition-transform hover:scale-125",style:{left:e.offset,transform:"translateX(-50%)"},onMouseEnter:t=>{const n=t.currentTarget.getBoundingClientRect();z({type:"milestone",data:e.milestone,x:n.left+n.width/2,y:n.top})},onMouseLeave:()=>z(null),onClick:n=>{n.stopPropagation(),t(e.time)},children:o.jsx("div",{className:"w-3.5 h-3.5 rounded-full border-2 border-bg-surface-1 shadow-lg",style:{backgroundColor:Tc[e.milestone.category]??"#9c9588",boxShadow:\`0 0 10px \${Tc[e.milestone.category]}50\`}})},n))]})]}),_&&Pc.createPortal(o.jsx("div",{className:"fixed z-[9999] pointer-events-none",style:{left:_.x,top:_.y,transform:"translate(-50%, -100%)"},children:o.jsxs("div",{className:"mb-3 bg-bg-surface-3/95 backdrop-blur-md text-text-primary rounded-xl shadow-2xl px-3 py-2.5 text-[11px] min-w-[180px] max-w-[280px] border border-border/50 animate-in fade-in zoom-in-95 duration-200",children:["session"===_.type?o.jsx($u,{session:_.data,showPublic:i}):o.jsx(Bu,{milestone:_.data,showPublic:i}),o.jsx("div",{className:"absolute -bottom-1.5 left-1/2 -translate-x-1/2 w-3 h-3 bg-bg-surface-3/95 border-r border-b border-border/50 rotate-45"})]})}),document.body)]})}function $u({session:e,showPublic:t}){const n=Sc[e.client]??e.client,r=t?e.title||e.project||\`\${n} Session\`:e.private_title||e.title||e.project||\`\${n} Session\`;return o.jsxs("div",{className:"flex flex-col gap-1",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("span",{className:"font-bold text-xs text-accent uppercase tracking-widest",children:n}),o.jsx("span",{className:"text-[10px] text-text-muted font-mono",children:Iu(e.duration_seconds)})]}),o.jsx("div",{className:"h-px bg-border/50 my-0.5"}),o.jsx("div",{className:"text-text-primary font-medium",children:r}),o.jsx("div",{className:"text-text-secondary capitalize text-[10px]",children:e.task_type})]})}function Bu({milestone:e,showPublic:t}){const n=t?e.title:e.private_title??e.title;return o.jsxs("div",{className:"flex flex-col gap-1",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("span",{className:"font-bold text-[10px] uppercase tracking-widest",style:{color:Tc[e.category]??"#9c9588"},children:e.category}),e.complexity&&o.jsx("span",{className:"text-[9px] font-mono text-text-muted font-bold border border-border/50 px-1 rounded uppercase",children:e.complexity})]}),o.jsx("div",{className:"h-px bg-border/50 my-0.5"}),o.jsx("div",{className:"font-bold text-xs break-words text-text-primary",children:n}),!t&&e.private_title&&o.jsxs("div",{className:"text-[10px] text-text-muted italic opacity-70",children:["Public: ",e.title]})]})}function Hu(e,t){const n=e.trim();if(!n)return null;const r=new Date(t),a=n.match(/^(\\d{1,2}):(\\d{2})(?::(\\d{2}))?\\s*(AM|PM)$/i);if(a){let e=parseInt(a[1],10);const t=parseInt(a[2],10),n=a[3]?parseInt(a[3],10):0,s=a[4].toUpperCase();return e<1||e>12||t>59||n>59?null:("AM"===s&&12===e&&(e=0),"PM"===s&&12!==e&&(e+=12),r.setHours(e,t,n,0),r.getTime())}const s=n.match(/^(\\d{1,2}):(\\d{2})(?::(\\d{2}))?$/);if(s){const e=parseInt(s[1],10),t=parseInt(s[2],10),n=s[3]?parseInt(s[3],10):0;return e>23||t>59||n>59?null:(r.setHours(e,t,n,0),r.getTime())}return null}function Uu({value:e,onChange:t,scale:n,onScaleChange:r,sessions:a,showPublic:s=!1}){const i=null===e,l=Hc(n),[c,u]=h.useState(Date.now());h.useEffect(()=>{if(!i)return;const e=setInterval(()=>u(Date.now()),1e3);return()=>clearInterval(e)},[i]);const d=i?c:e,f=qc(n,d),p=h.useMemo(()=>{const{start:e,end:t}=f,n=e=>new Date(e).toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0}),r=e=>new Date(e).toLocaleDateString([],{weekday:"short",month:"short",day:"numeric"}),a=new Date(e).toDateString()===new Date(t-1).toDateString();return i?a?\`\${n(e)} \u2013 Now\`:\`\${r(e)}, \${n(e)} \u2013 Now\`:a?\`\${n(e)} \u2013 \${n(t)}\`:\`\${r(e)}, \${n(e)} \u2013 \${r(t)}, \${n(t)}\`},[f,i]),[m,g]=h.useState(!1),[x,y]=h.useState(""),v=h.useRef(null),b=h.useRef(!1),w=h.useRef(""),k=h.useRef(!1),S=h.useRef(0),j=h.useCallback(e=>{if(l){if(e>=Date.now()-2e3)return void t(null);const a=$c[n];return a&&r(a),void t(e)}const a=Date.now();if(e>=a-2e3)return k.current=!0,S.current=a,void t(null);k.current&&a-S.current<300||k.current&&e>=a-1e4&&e<=a+2e3?t(null):(k.current=!1,t(e))},[t,r,l,n]),N=e=>{const r=Yc(n,d,e);Kc(n,r)?t(null):t(r)},C=()=>{b.current=i,t(d);const e=new Date(d).toLocaleTimeString([],{hour12:!0,hour:"2-digit",minute:"2-digit",second:"2-digit"});w.current=e,y(e),g(!0),requestAnimationFrame(()=>v.current?.select())},T=()=>{if(g(!1),b.current&&x===w.current)return void t(null);const e=Hu(x,d);null!==e&&t(Math.min(e,Date.now()))},E=e=>{if(l){const t=-1===e?"Previous":"Next";return"day"===n?\`\${t} Day\`:"week"===n?\`\${t} Week\`:\`\${t} Month\`}return\`\${-1===e?"Back":"Forward"} \${Wc[n].toLowerCase()}\`};return o.jsxs("div",{"data-testid":"time-travel-panel",className:"flex flex-col bg-bg-surface-1 border border-border/50 rounded-2xl overflow-hidden mb-8 shadow-sm",children:[o.jsxs("div",{className:"flex flex-col md:flex-row md:items-center justify-between px-6 py-3 border-b border-border/50 gap-4",children:[o.jsxs("div",{className:"flex flex-col items-start gap-0.5",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsxs("div",{className:"flex items-center gap-2 h-8",children:[m?o.jsx("input",{ref:v,type:"text",value:x,onChange:e=>y(e.target.value),onBlur:T,onKeyDown:e=>{if("Enter"===e.key)return void T();if("Escape"===e.key)return e.preventDefault(),g(!1),void(b.current&&t(null));if("ArrowUp"!==e.key&&"ArrowDown"!==e.key)return;e.preventDefault();const n=v.current;if(!n)return;const r=n.selectionStart??0,a="ArrowUp"===e.key?1:-1,s=Hu(x,d);if(null===s)return;const i=x.indexOf(":"),o=x.indexOf(":",i+1),l=x.lastIndexOf(" ");let c;c=r<=i?36e5*a:o>-1&&r<=o?6e4*a:l>-1&&r<=l?1e3*a:12*a*36e5;const u=Math.min(s+c,Date.now()),h=new Date(u).toLocaleTimeString([],{hour12:!0,hour:"2-digit",minute:"2-digit",second:"2-digit"});y(h),t(u),requestAnimationFrame(()=>{n&&n.setSelectionRange(r,r)})},className:"text-xl font-mono font-bold tracking-tight bg-bg-surface-2 border rounded-lg px-2 -ml-2 w-[155px] outline-none text-text-primary "+(i?"border-accent":"border-history"),style:{boxShadow:i?"0 0 10px rgba(var(--accent-rgb), 0.2)":"0 0 10px rgba(var(--history-rgb), 0.2)"}}):o.jsxs("button",{onClick:C,className:"group flex items-center gap-2 hover:bg-bg-surface-2/50 rounded-lg px-2 -ml-2 py-1 transition-all cursor-text",title:"Click to edit time",children:[o.jsx(Pl,{className:"w-5 h-5 "+(i?"text-text-muted":"text-history")}),o.jsx("span",{"data-testid":"time-display",className:"text-xl font-mono font-bold tracking-tight tabular-nums "+(i?"text-text-primary":"text-history"),children:new Date(d).toLocaleTimeString([],{hour12:!0,hour:"2-digit",minute:"2-digit",second:"2-digit"})})]}),o.jsx("button",{onClick:m?T:C,className:"p-1.5 rounded-lg transition-colors flex-shrink-0 "+(m?i?"bg-accent text-bg-base hover:bg-accent-bright":"bg-history text-white hover:brightness-110":"text-text-muted hover:text-text-primary hover:bg-bg-surface-2"),title:m?"Confirm time":"Edit time",children:o.jsx(nc,{className:"w-3.5 h-3.5"})})]}),i?o.jsx(Fu,{label:"Live",color:"success",dot:!0,glow:!0,"data-testid":"live-badge"}):o.jsxs(o.Fragment,{children:[o.jsx(Fu,{label:"History",color:"muted","data-testid":"history-badge"}),o.jsxs("button",{"data-testid":"go-live-button",onClick:()=>t(null),className:"group flex items-center gap-1.5 px-3 py-1.5 text-[10px] font-bold uppercase tracking-widest bg-history/10 hover:bg-history text-history hover:text-white rounded-xl transition-all border border-history/20",children:[o.jsx(ic,{className:"w-3 h-3 group-hover:-rotate-90 transition-transform duration-500"}),"Live"]})]})]}),o.jsxs("div",{className:"flex items-center gap-2 text-sm text-text-secondary font-medium px-0.5",children:[o.jsx(wl,{className:"w-3.5 h-3.5 text-text-muted"}),o.jsx("span",{"data-testid":"date-display",children:new Date(d).toLocaleDateString([],{weekday:"short",month:"long",day:"numeric",year:"numeric"})}),o.jsx("span",{className:"text-text-muted",children:"\xB7"}),o.jsx("span",{"data-testid":"period-label",className:"text-text-muted text-xs tabular-nums",children:p})]})]}),o.jsxs("div",{className:"flex flex-col sm:flex-row items-center gap-4",children:[o.jsxs("div",{className:"flex items-center bg-bg-surface-2/50 border border-border/50 rounded-xl p-1 shadow-inner",children:[Vc.map(e=>o.jsx("button",{"data-testid":\`scale-\${e}\`,onClick:()=>r(e),className:"px-3 py-1.5 text-[10px] font-bold uppercase tracking-wider rounded-lg transition-all "+(n===e?"bg-bg-surface-3 text-text-primary shadow-sm":"text-text-muted hover:text-text-primary hover:bg-bg-surface-2"),title:Wc[e],children:e},e)),o.jsx("div",{className:"w-px h-5 bg-border/50 mx-1"}),Ic.map(e=>{const t=n===e||Bc[n]===e;return o.jsx("button",{"data-testid":\`scale-\${e}\`,onClick:()=>r(e),className:"px-3 py-1.5 text-[10px] font-bold uppercase tracking-wider rounded-lg transition-all "+(t?"bg-bg-surface-3 text-text-primary shadow-sm":"text-text-muted hover:text-text-primary hover:bg-bg-surface-2"),title:Wc[e],children:e},e)})]}),o.jsx("div",{className:"flex items-center gap-2",children:o.jsxs("div",{className:"flex items-center gap-1 bg-bg-surface-2/50 border border-border/50 rounded-xl p-1",children:[o.jsx("button",{onClick:()=>N(-1),className:"p-2 text-text-muted hover:text-text-primary hover:bg-bg-surface-2 rounded-lg transition-colors",title:E(-1),children:o.jsx(Cl,{className:"w-4 h-4"})}),o.jsx("button",{onClick:()=>N(1),className:"p-2 text-text-muted hover:text-text-primary hover:bg-bg-surface-2 rounded-lg transition-colors disabled:opacity-20 disabled:cursor-not-allowed",title:E(1),disabled:i||d>=Date.now()-1e3,children:o.jsx(Tl,{className:"w-4 h-4"})})]})})]})]}),o.jsx(Ou,{value:d,onChange:j,scale:n,window:l?f:void 0,sessions:a,milestones:void 0,showPublic:s})]})}function Wu({children:e}){return o.jsx("span",{className:"text-text-primary font-medium",children:e})}function qu(e){return e.reduce((e,t)=>e+t.duration_seconds,0)/3600}function Yu(e,t){const n=e.filter(e=>null!=e.evaluation);if(n.length<2)return null;return n.reduce((e,n)=>e+n.evaluation[t],0)/n.length}function Ku(e,t,n,r,a,s){var i;const l=[],c=a-(s-a),u=a,d=function(e,t,n){return e.filter(e=>{const r=new Date(e.started_at).getTime();return r>=t&&r<=n})}(n,c,u),h=function(e,t,n){return e.filter(e=>{const r=new Date(e.created_at).getTime();return r>=t&&r<=n})}(r,c,u),f=qu(e),p=qu(d),m=Yu(e,"prompt_quality"),g=Yu(d,"prompt_quality");if(null!==m&&null!==g&&m>g+.3&&l.push({priority:10,node:o.jsxs("span",{children:["Your prompt quality improved from ",o.jsx(Wu,{children:g.toFixed(1)})," to"," ",o.jsx(Wu,{children:m.toFixed(1)})," \u2014 clearer prompts mean faster results."]})}),d.length>0&&e.length>0){const e=t.length/Math.max(f,.1),n=h.length/Math.max(p,.1);e>1.2*n&&t.length>=2&&l.push({priority:9,node:o.jsxs("span",{children:["You're shipping ",o.jsxs(Wu,{children:[Math.round(100*(e/n-1)),"% faster"]})," ","this period \u2014 great momentum."]})})}const x=t.filter(e=>"complex"===e.complexity).length,y=h.filter(e=>"complex"===e.complexity).length;x>y&&x>=2&&l.push({priority:8,node:o.jsxs("span",{children:[o.jsx(Wu,{children:x})," complex ",1===x?"task":"tasks"," this period vs"," ",o.jsx(Wu,{children:y})," before \u2014 you're taking on harder problems."]})});const v=e.filter(e=>null!=e.evaluation),b=v.filter(e=>"completed"===e.evaluation.task_outcome&&e.evaluation.iteration_count<=3);if(v.length>=3&&b.length>0){const e=Math.round(b.length/v.length*100);e>=50&&l.push({priority:7,node:o.jsxs("span",{children:[o.jsxs(Wu,{children:[e,"%"]})," of your sessions completed in 3 or fewer turns \u2014 efficient prompting."]})})}const w=function(e){if(0===e.length)return null;const t={};for(const a of e){const e=a.task_type||"coding";t[e]=(t[e]??0)+a.duration_seconds}const n=e.reduce((e,t)=>e+t.duration_seconds,0),r=Object.entries(t).sort((e,t)=>t[1]-e[1])[0];return r&&0!==n?{type:r[0],pct:Math.round(r[1]/n*100)}:null}(e);if(w&&w.pct>=60&&e.length>=2){const e={coding:"building",debugging:"debugging",testing:"testing",planning:"planning",reviewing:"reviewing",documenting:"documenting",refactoring:"refactoring",research:"researching",analysis:"analyzing"}[w.type]??w.type;l.push({priority:6,node:o.jsxs("span",{children:["Deep focus: ",o.jsxs(Wu,{children:[w.pct,"%"]})," of your time spent ",e,"."]})})}const k={};for(const o of e)o.client&&(k[i=o.client]??(k[i]=[])).push(o);const S=Object.entries(k).filter(([,e])=>e.length>=2);if(S.length>=2){const e=S.map(([e,n])=>{const r=qu(n),a=new Set(n.map(e=>e.session_id)),s=t.filter(e=>a.has(e.session_id));return{name:e,rate:s.length/Math.max(r,.1),count:s.length}}).filter(e=>e.count>0);if(e.length>=2){e.sort((e,t)=>t.rate-e.rate);const t=e[0],n=Sc[t.name]??t.name;l.push({priority:5,node:o.jsxs("span",{children:[o.jsx(Wu,{children:n})," is your most productive tool this period \u2014 ",t.count," ",1===t.count?"milestone":"milestones"," shipped."]})})}}const j=Yu(e,"context_provided");if(null!==j&&j<3.5&&l.push({priority:4,node:o.jsxs("span",{children:["Tip: Your context score averages ",o.jsxs(Wu,{children:[j.toFixed(1),"/5"]})," \u2014 try including specific files and error messages for faster results."]})}),v.length>=3){const e=v.filter(e=>"completed"===e.evaluation.task_outcome).length,t=Math.round(e/v.length*100);100===t?l.push({priority:3,node:o.jsxs("span",{children:[o.jsx(Wu,{children:"100%"})," completion rate \u2014 every task landed."]})}):t<70&&l.push({priority:4,node:o.jsxs("span",{children:[o.jsxs(Wu,{children:[t,"%"]})," completion rate \u2014 try breaking tasks into smaller, well-scoped pieces."]})})}return p>0&&f>1.5*p&&f>=1&&l.push({priority:2,node:o.jsxs("span",{children:[o.jsxs(Wu,{children:[Math.round(100*(f/p-1)),"% more"]})," AI-paired time this period \u2014 you're leaning in."]})}),0===e.length&&l.push({priority:1,node:o.jsx("span",{className:"text-text-muted",children:"No sessions in this window. Start coding with AI to see insights here."})}),l.sort((e,t)=>t.priority-e.priority)}function Xu({sessions:e,milestones:t,windowStart:n,windowEnd:r,allSessions:a,allMilestones:s}){const i=h.useMemo(()=>{const i=Ku(e,t,a??e,s??t,n,r);return i[0]?.node??null},[e,t,a,s,n,r]);return i?o.jsx(pl.div,{initial:{opacity:0},animate:{opacity:1},className:"rounded-xl bg-bg-surface-1 border border-border/50 px-4 py-3",children:o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx(hc,{className:"w-4 h-4 text-accent flex-shrink-0 mt-0.5"}),o.jsx("p",{className:"text-sm text-text-secondary leading-relaxed",children:i})]})}):null}function Qu(e){return e>=5?"var(--color-text-muted)":e>=4?"#f59e0b":e>=3?"#f97316":"var(--color-error)"}function Zu({sessions:e}){const{scores:t,summaryLine:n}=h.useMemo(()=>{const t=e.filter(e=>null!=e.evaluation);if(0===t.length)return{scores:null,summaryLine:null};let n=0,r=0,a=0,s=0,i=0,o=0;for(const e of t){const t=e.evaluation;n+=t.prompt_quality,r+=t.context_provided,a+=t.independence_level,s+=t.scope_quality,o+=t.iteration_count,"completed"===t.task_outcome&&i++}const l=t.length,c=Math.round(i/l*100);return{scores:[{label:"Prompt Quality",value:n/l,max:5},{label:"Context",value:r/l,max:5},{label:"Independence",value:a/l,max:5},{label:"Scope",value:s/l,max:5},{label:"Completion",value:c/20,max:5}],summaryLine:\`\${l} session\${1===l?"":"s"} evaluated \xB7 \${c}% completed \xB7 avg \${(o/l).toFixed(1)} iterations\`}},[e]);return o.jsxs(pl.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.1},className:"rounded-xl bg-bg-surface-1 border border-border/50 p-4",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[o.jsx("div",{className:"p-1.5 rounded-lg bg-bg-surface-2",children:o.jsx(fc,{className:"w-3.5 h-3.5 text-text-muted"})}),o.jsx("h2",{className:"text-sm font-bold text-text-muted uppercase tracking-widest",children:"AI Proficiency"})]}),null===t?o.jsx("p",{className:"text-xs text-text-muted py-2",children:"No evaluation data yet"}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"space-y-3",children:t.map((e,t)=>{const n=e.value/e.max*100,r="Completion"===e.label?\`\${Math.round(n)}%\`:e.value>=5?"5/5":\`\${e.value.toFixed(1)}/5\`,a=e.value>=e.max;return o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("span",{className:"text-xs text-text-secondary font-medium w-28 text-right shrink-0",children:e.label}),o.jsx("div",{className:"flex-1 h-1.5 rounded-full bg-bg-surface-2/50 overflow-hidden",children:o.jsx(pl.div,{className:"h-full rounded-full",style:{backgroundColor:Qu(e.value)},initial:{width:0},animate:{width:\`\${n}%\`},transition:{duration:.6,delay:.05*t,ease:[.22,1,.36,1]}})}),o.jsx("span",{className:"text-xs font-mono w-10 text-right shrink-0 "+(a?"text-text-muted":"font-bold"),style:a?void 0:{color:Qu(e.value)},children:r})]},e.label)})}),o.jsx("p",{className:"text-[10px] text-text-muted mt-4 px-1 font-mono",children:n})]})]})}var Gu=["Output","Efficiency","Prompts","Consistency","Breadth"];function Ju(e,t,n,r,a){const s=2*Math.PI*e/5-Math.PI/2;return[n+a*t*Math.cos(s),r+a*t*Math.sin(s)]}function ed(e,t,n,r){const a=[];for(let s=0;s<5;s++){const[i,o]=Ju(s,e,t,n,r);a.push(\`\${i},\${o}\`)}return a.join(" ")}function td({sessions:e,milestones:t,streak:n}){const{values:r,hasEvalData:a}=h.useMemo(()=>{const r={simple:1,medium:2,complex:4};let a=0;for(const e of t)a+=r[e.complexity]??1;const s=Math.min(1,a/10),i=e.reduce((e,t)=>e+t.files_touched,0),o=e.reduce((e,t)=>e+t.duration_seconds,0)/3600,l=Math.min(1,i/Math.max(o,1)/20),c=e.filter(e=>null!=e.evaluation);let u=0;const d=c.length>0;if(d){u=c.reduce((e,t)=>e+t.evaluation.prompt_quality,0)/c.length/5}const h=Math.min(1,n/14),f=new Set;for(const t of e)for(const e of t.languages)f.add(e);return{values:[s,l,u,h,Math.min(1,f.size/5)],hasEvalData:d}},[e,t,n]),s=100,i=100,l=[];for(let o=0;o<5;o++){const e=Math.max(r[o],.02),[t,n]=Ju(o,e,s,i,70);l.push(\`\${t},\${n}\`)}const c=l.join(" ");return o.jsxs(pl.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.15},className:"rounded-xl bg-bg-surface-1 border border-border/50 p-4",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[o.jsx("div",{className:"p-1.5 rounded-lg bg-bg-surface-2",children:o.jsx(vl,{className:"w-3.5 h-3.5 text-text-muted"})}),o.jsx("h2",{className:"text-sm font-bold text-text-muted uppercase tracking-widest",children:"Skill Profile"})]}),o.jsx("div",{className:"flex justify-center",children:o.jsxs("svg",{viewBox:"0 0 200 200",width:200,height:200,className:"overflow-visible",children:[[.33,.66,1].map(e=>o.jsx("polygon",{points:ed(e,s,i,70),fill:"none",stroke:"var(--color-bg-surface-3)",strokeWidth:.5,opacity:.6},e)),Array.from({length:5}).map((e,t)=>{const[n,r]=Ju(t,1,s,i,70);return o.jsx("line",{x1:s,y1:i,x2:n,y2:r,stroke:"var(--color-bg-surface-3)",strokeWidth:.5,opacity:.4},\`axis-\${t}\`)}),o.jsx(pl.polygon,{points:c,fill:"var(--color-accent)",fillOpacity:.2,stroke:"var(--color-accent)",strokeWidth:1.5,strokeLinejoin:"round",initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},transition:{duration:.6,ease:[.22,1,.36,1]},style:{transformOrigin:"100px 100px"}}),r.map((e,t)=>{const n=Math.max(e,.02),[r,l]=Ju(t,n,s,i,70),c=2===t&&!a;return o.jsx("circle",{cx:r,cy:l,r:2.5,fill:c?"var(--color-text-muted)":"var(--color-accent-bright)",opacity:c?.4:1},\`point-\${t}\`)}),Gu.map((e,t)=>{const n=function(e,t,n,r){const[a,s]=Ju(e,1.28,t,n,r);let i="middle";return 1!==e&&2!==e||(i="start"),3!==e&&4!==e||(i="end"),{x:a,y:s,anchor:i}}(t,s,i,70),r=2===t&&!a;return o.jsx("text",{x:n.x,y:n.y,textAnchor:n.anchor,dominantBaseline:"central",className:"text-[9px] font-medium",fill:r?"var(--color-text-muted)":"var(--color-text-secondary)",opacity:r?.5:1,children:e},e)})]})}),o.jsx("div",{className:"flex justify-center gap-3 mt-2 flex-wrap",children:Gu.map((e,t)=>{const n=2===t&&!a,s=Math.round(100*r[t]);return o.jsxs("span",{className:"text-[10px] font-mono "+(n?"text-text-muted/50":"text-text-muted"),children:[s,"%"]},e)})})]})}var nd={coding:"#b4f82c",debugging:"#f87171",testing:"#60a5fa",planning:"#a78bfa",reviewing:"#34d399",documenting:"#fbbf24",learning:"#f472b6",deployment:"#fb923c",devops:"#e879f9",research:"#22d3ee",migration:"#facc15",design:"#c084fc",data:"#2dd4bf",security:"#f43f5e",configuration:"#a3e635",other:"#94a3b8"};function rd(e){if(e<60)return"<1m";const t=Math.round(e/60);if(t<60)return\`\${t}m\`;return\`\${(e/3600).toFixed(1)}h\`}function ad({byTaskType:e}){const t=Object.entries(e).filter(([,e])=>e>0).sort((e,t)=>t[1]-e[1]);if(0===t.length)return null;const n=t[0][1];return o.jsxs("div",{className:"rounded-xl bg-bg-surface-1 border border-border/50 p-4 mb-8",children:[o.jsx("h2",{className:"text-sm font-bold text-text-muted uppercase tracking-widest mb-4 px-1",children:"Task Types"}),o.jsx("div",{className:"space-y-2.5",children:t.map(([e,t],r)=>{const a=nd[e]??nd.other,s=t/n*100;return o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("span",{className:"text-xs text-text-secondary font-medium w-24 text-right shrink-0",children:(i=e,i.charAt(0).toUpperCase()+i.slice(1))}),o.jsx("div",{className:"flex-1 h-5 rounded bg-bg-surface-2/50 overflow-hidden",children:o.jsx(pl.div,{className:"h-full rounded",style:{backgroundColor:a},initial:{width:0},animate:{width:\`\${s}%\`},transition:{duration:.6,delay:.05*r,ease:[.22,1,.36,1]}})}),o.jsx("span",{className:"text-xs text-text-muted font-mono w-12 text-right shrink-0",children:rd(t)})]},e);var i})})]})}var sd=["#b4f82c","#60a5fa","#f87171","#a78bfa","#fbbf24","#34d399","#f472b6","#22d3ee"];function id(e){if(e<60)return"<1m";const t=Math.round(e/60);if(t<60)return\`\${t}m\`;return\`\${(e/3600).toFixed(1)}h\`}function od({sessions:e,byProject:t}){const[n,r]=h.useState("user"),[a,s]=h.useState(!1),i=h.useMemo(()=>{const t=[];for(const o of e){if(!o.project)continue;const e=new Date(o.started_at).getTime(),n=new Date(o.ended_at).getTime();n<=e||(t.push({time:e,project:o.project,delta:1}),t.push({time:n,project:o.project,delta:-1}))}t.sort((e,t)=>e.time-t.time||e.delta-t.delta);const n={},r={};let a=0,s=0;for(const e of t){if(a>0&&e.time>s){const t=e.time-s,a=Object.keys(r).filter(e=>r[e]>0),i=a.length;if(i>0){const e=t/i;for(const t of a)n[t]=(n[t]??0)+e}}s=e.time,r[e.project]=(r[e.project]??0)+e.delta,0===r[e.project]&&delete r[e.project],a=Object.values(r).reduce((e,t)=>e+t,0)}const i={};for(const[e,o]of Object.entries(n))o>0&&(i[e]=o/1e3);return i},[e]),l="user"===n?i:t,c=h.useMemo(()=>function(e){const t=Object.entries(e).filter(([,e])=>e>0).sort((e,t)=>t[1]-e[1]);if(0===t.length)return[];const n=t.reduce((e,[,t])=>e+t,0);let r,a=0;t.length<=6?r=t:(r=t.slice(0,6),a=t.slice(6).reduce((e,[,t])=>e+t,0));const s=r.map(([e,t],r)=>({name:e,seconds:t,color:sd[r%sd.length],percentage:t/n*100}));return a>0&&s.push({name:"Other",seconds:a,color:"#64748b",percentage:a/n*100}),s}(l),[l]);if(0===c.length)return null;const u=c.reduce((e,t)=>e+t.seconds,0),d=140,f=2*Math.PI*52;let p=0;const m=c.map(e=>{const t=e.percentage/100*f,n=f-t,r=.25*f-p;return p+=t,{...e,dashLength:t,gap:n,offset:r}}),g={user:"User Time",ai:"AI Time"};return o.jsxs(pl.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{delay:.1},className:"rounded-xl bg-bg-surface-1 border border-border/50 p-4",children:[o.jsxs("div",{className:"flex items-center justify-between mb-4 px-1",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"p-1.5 rounded-lg bg-bg-surface-2",children:o.jsx(Ul,{className:"w-3.5 h-3.5 text-text-muted"})}),o.jsx("h2",{className:"text-sm font-bold text-text-muted uppercase tracking-widest",children:"Project Allocation"})]}),o.jsxs("div",{className:"relative",children:[o.jsxs("button",{onClick:()=>s(e=>!e),className:"inline-flex items-center gap-1 px-2 py-1 rounded-md border border-border/50 bg-bg-surface-2 text-[11px] text-text-secondary font-medium hover:border-text-muted/50 transition-colors",children:[g[n],o.jsx(Nl,{className:"w-3 h-3 text-text-muted"})]}),a&&o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"fixed inset-0 z-10",onClick:()=>s(!1)}),o.jsx("div",{className:"absolute right-0 top-full mt-1 z-20 min-w-[120px] rounded-lg border border-border/50 bg-bg-surface-1 shadow-lg py-1",children:Object.entries(g).map(([e,t])=>o.jsx("button",{onClick:()=>{r(e),s(!1)},className:"w-full text-left px-3 py-1.5 text-xs transition-colors "+(e===n?"text-accent bg-accent/10 font-medium":"text-text-secondary hover:bg-bg-surface-2"),children:t},e))})]})]})]}),o.jsxs("div",{className:"flex flex-col sm:flex-row items-center gap-6",children:[o.jsxs("div",{className:"relative shrink-0",style:{width:d,height:d},children:[o.jsxs("svg",{width:d,height:d,viewBox:"0 0 140 140",children:[o.jsx("circle",{cx:70,cy:70,r:52,fill:"none",stroke:"var(--color-bg-surface-2, #1e293b)",strokeWidth:18,opacity:.3}),m.map((e,t)=>o.jsx(pl.circle,{cx:70,cy:70,r:52,fill:"none",stroke:e.color,strokeWidth:18,strokeDasharray:\`\${e.dashLength} \${e.gap}\`,strokeDashoffset:e.offset,strokeLinecap:"butt",initial:{opacity:0},animate:{opacity:1},transition:{duration:.5,delay:.1+.08*t,ease:[.22,1,.36,1]}},\`\${n}-\${e.name}\`))]}),o.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[o.jsx("span",{className:"text-lg font-bold text-text-primary leading-none",children:c.length}),o.jsx("span",{className:"text-[10px] text-text-muted mt-0.5",children:1===c.length?"project":"projects"})]})]}),o.jsx("div",{className:"flex-1 min-w-0 space-y-1.5 w-full",children:c.map((e,t)=>o.jsxs(pl.div,{className:"flex items-center gap-2.5",initial:{opacity:0,x:-8},animate:{opacity:1,x:0},transition:{duration:.4,delay:.15+.06*t,ease:[.22,1,.36,1]},children:[o.jsx("span",{className:"w-2.5 h-2.5 rounded-full shrink-0",style:{backgroundColor:e.color}}),o.jsx("span",{className:"text-xs text-text-secondary font-medium truncate flex-1 min-w-0",children:e.name}),o.jsx("span",{className:"text-[10px] text-text-muted font-mono shrink-0",children:id(e.seconds)}),o.jsxs("span",{className:"text-[10px] text-text-muted/70 font-mono w-10 text-right shrink-0",children:[e.percentage.toFixed(0),"%"]})]},e.name))})]}),o.jsx("div",{className:"mt-4 flex h-2 rounded-full overflow-hidden bg-bg-surface-2/30",children:c.map(e=>{const t=u>0?e.seconds/u*100:0;return 0===t?null:o.jsx(pl.div,{className:"h-full",style:{backgroundColor:e.color},initial:{width:0},animate:{width:\`\${t}%\`},transition:{duration:.8,ease:[.22,1,.36,1]}},e.name)})})]})}var ld={feature:"bg-success/10 text-success border-success/20",bugfix:"bg-error/10 text-error border-error/20",refactor:"bg-purple/10 text-purple border-purple/20",test:"bg-blue/10 text-blue border-blue/20",docs:"bg-accent/10 text-accent border-accent/20",setup:"bg-text-muted/10 text-text-muted border-text-muted/20",deployment:"bg-emerald/10 text-emerald border-emerald/20"};function cd(e){const t=Date.now()-new Date(e).getTime(),n=Math.floor(t/6e4);if(n<1)return"just now";if(n<60)return\`\${n}m ago\`;const r=Math.floor(n/60);if(r<24)return\`\${r}h ago\`;const a=Math.floor(r/24);return 1===a?"yesterday":a<7?\`\${a}d ago\`:new Date(e).toLocaleDateString([],{month:"short",day:"numeric"})}function ud({milestones:e,showPublic:t=!1}){const n=[...e].sort((e,t)=>new Date(t.created_at).getTime()-new Date(e.created_at).getTime()).slice(0,8);return o.jsxs(pl.div,{initial:{opacity:0,y:12},animate:{opacity:1,y:0},transition:{duration:.35,ease:[.22,1,.36,1]},className:"rounded-xl bg-bg-surface-1 border border-border/50 p-4",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-3 px-1",children:[o.jsx(xc,{className:"w-4 h-4 text-accent"}),o.jsx("h2",{className:"text-sm font-bold text-text-muted uppercase tracking-widest",children:"Recent Achievements"}),o.jsxs("span",{className:"text-[10px] text-text-muted font-mono bg-bg-surface-2 px-2 py-0.5 rounded ml-auto",children:[e.length," total"]})]}),0===n.length?o.jsx("div",{className:"text-sm text-text-muted text-center py-6",children:"No milestones yet \u2014 complete your first session!"}):o.jsx("div",{className:"space-y-0.5",children:n.map((e,n)=>{const r=Tc[e.category]??"#9c9588",a=ld[e.category]??"bg-bg-surface-2 text-text-secondary border-border",s=jc[e.client]??e.client.slice(0,2).toUpperCase(),i=kc[e.client]??"#91919a",l=t?e.title:e.private_title||e.title,c="complex"===e.complexity;return o.jsxs(pl.div,{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},transition:{duration:.25,delay:.04*n},className:"flex items-center gap-3 py-2 px-2 rounded-lg hover:bg-bg-surface-2/40 transition-colors",children:[o.jsx("div",{className:"w-2 h-2 rounded-full flex-shrink-0",style:{backgroundColor:r}}),o.jsx("span",{className:"text-sm font-medium text-text-secondary hover:text-text-primary truncate flex-1 min-w-0",children:l}),o.jsx("span",{className:\`text-[9px] uppercase tracking-wider font-bold px-1.5 py-0.5 rounded-full border flex-shrink-0 \${a}\`,children:e.category}),c&&o.jsxs("span",{className:"flex items-center gap-0.5 text-[9px] uppercase tracking-wider font-bold px-1.5 py-0.5 rounded-full border bg-purple/10 text-purple border-purple/20 flex-shrink-0",children:[o.jsx(vl,{className:"w-2.5 h-2.5"}),"complex"]}),o.jsx("span",{className:"text-[10px] text-text-muted font-mono flex-shrink-0",children:cd(e.created_at)}),o.jsx("div",{className:"w-5 h-5 rounded flex items-center justify-center text-[8px] font-bold font-mono flex-shrink-0",style:{backgroundColor:\`\${i}15\`,color:i,border:\`1px solid \${i}20\`},children:s})]},e.id)})})]})}function dd(e){const t=e/3600;return t<1?\`\${Math.round(60*t)}m\`:\`\${t.toFixed(1)}h\`}function hd(e,t){return Object.entries(e).sort((e,t)=>t[1]-e[1]).slice(0,t)}function fd({label:e,children:t}){return o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx("span",{className:"text-[10px] text-text-muted uppercase tracking-widest font-bold whitespace-nowrap",children:e}),o.jsx("div",{className:"flex items-center gap-1.5 overflow-x-auto pb-1 no-scrollbar",children:t})]})}function pd({stats:e}){const t=hd(e.byClient,4),n=hd(e.byLanguage,4);return 0===t.length&&0===n.length?null:o.jsxs("div",{className:"flex flex-col gap-4 mb-8 p-4 rounded-xl bg-bg-surface-1/30 border border-border/50",children:[t.length>0&&o.jsx(fd,{label:"Top Clients",children:t.map(([e,t])=>{const n=kc[e];return o.jsxs("span",{className:"text-[11px] font-mono px-2.5 py-1 rounded-full bg-bg-surface-1 border border-border hover:border-accent/40 transition-colors shadow-sm whitespace-nowrap group cursor-default",style:n?{borderLeftWidth:"3px",borderLeftColor:n}:void 0,title:dd(t),children:[Sc[e]??e,o.jsx("span",{className:"ml-1.5 text-text-muted opacity-0 group-hover:opacity-100 transition-opacity",children:dd(t)})]},e)})}),n.length>0&&o.jsx(fd,{label:"Languages",children:n.map(([e,t])=>o.jsxs("span",{className:"text-[11px] font-mono px-2.5 py-1 rounded-full bg-bg-surface-1 border border-border hover:border-accent/40 transition-colors shadow-sm whitespace-nowrap group cursor-default",title:dd(t),children:[e,o.jsx("span",{className:"ml-1.5 text-text-muted opacity-0 group-hover:opacity-100 transition-opacity",children:dd(t)})]},e))})]})}function md(e,t,n){try{const n="undefined"!=typeof window?localStorage.getItem(e):null;if(n&&t.includes(n))return n}catch{}return n}function gd(e,t){try{localStorage.setItem(e,t)}catch{}}function xd({sessions:e,milestones:t,onDeleteSession:n,onDeleteConversation:r,onDeleteMilestone:a,defaultTimeScale:s="day",activeTab:i,onActiveTabChange:l}){const[c,u]=h.useState(null),[d,f]=h.useState(()=>md("useai-time-scale",Oc,s)),[p,m]=h.useState({category:"all",client:"all",project:"all",language:"all"}),[g,x]=h.useState(()=>md("useai-active-tab",["sessions","insights"],"sessions")),[y,v]=h.useState(null),[b,w]=h.useState(!1),[k,S]=h.useState(!1),j=void 0!==i,N=i??g,C=h.useCallback(e=>{l?l(e):(gd("useai-active-tab",e),x(e))},[l]),T=h.useCallback(e=>{gd("useai-time-scale",e),f(e)},[]),E=h.useCallback((e,t)=>{m(n=>({...n,[e]:t}))},[]);h.useEffect(()=>{if(null===c){const e=Bc[d];e&&T(e)}},[c,d,T]);const M=null===c,P=c??Date.now(),{start:L,end:D}=qc(d,P),A=h.useMemo(()=>function(e,t,n){return e.filter(e=>{const r=Dc(e.started_at),a=Dc(e.ended_at);return r<=n&&a>=t})}(e,L,D),[e,L,D]),_=h.useMemo(()=>function(e,t,n){return e.filter(e=>{const r=Dc(e.created_at);return r>=t&&r<=n})}(t,L,D),[t,L,D]),z=h.useMemo(()=>function(e,t=[]){let n=0,r=0;const a={},s={},i={},o={};for(const x of e){n+=x.duration_seconds,r+=x.files_touched,a[x.client]=(a[x.client]??0)+x.duration_seconds;for(const e of x.languages)s[e]=(s[e]??0)+x.duration_seconds;i[x.task_type]=(i[x.task_type]??0)+x.duration_seconds,x.project&&(o[x.project]=(o[x.project]??0)+x.duration_seconds)}let l=0,c=0,u=0,d=0;if(e.length>0){let t=1/0,r=-1/0;const a=[];for(const n of e){const e=Dc(n.started_at),s=Dc(n.ended_at),i=1e3*(n.duration_seconds??0),o=i>0&&s-e>i+6e5?e+i:s;e<t&&(t=e),o>r&&(r=o),a.push({time:e,delta:1}),a.push({time:o,delta:-1})}l=(r-t)/36e5,a.sort((e,t)=>e.time-t.time||e.delta-t.delta);let s=0,i=0,o=0;for(const e of a){const t=s>0;s+=e.delta,s>d&&(d=s),!t&&s>0?o=e.time:t&&0===s&&(i+=e.time-o)}c=i/36e5,u=c>0?n/3600/c:0}const h=function(e){let t=0,n=0,r=0;for(const a of e)"feature"===a.category&&t++,"bugfix"===a.category&&n++,"complex"===a.complexity&&r++;return{featuresShipped:t,bugsFixed:n,complexSolved:r}}(t),f=e.filter(e=>e.evaluation&&"object"==typeof e.evaluation),p=f.filter(e=>"completed"===e.evaluation.task_outcome).length,m=f.length>0?Math.round(p/f.length*100):0,g=Object.keys(o).length;return{totalHours:n/3600,totalSessions:e.length,actualSpanHours:l,coveredHours:c,aiMultiplier:u,peakConcurrency:d,currentStreak:Ac(e),filesTouched:Math.round(r),...h,totalMilestones:t.length,completionRate:m,activeProjects:g,byClient:a,byLanguage:s,byTaskType:i,byProject:o}}(A,_),[A,_]),R=h.useMemo(()=>Ac(e),[e]),F=h.useMemo(()=>{const t=function(e,t,n){let r=0,a=0;for(const s of e){const e=Dc(s.ended_at),i=Dc(s.started_at);e<t?r++:i>n&&a++}return{before:r,after:a}}(e,L,D);if(M&&0===t.before)return;const n=Wc[d],r=e=>new Date(e).toLocaleTimeString([],{hour:"numeric",minute:"2-digit",hour12:!0}),a=Hc(d)||D-L>=864e5?e=>\`\${new Date(e).toLocaleDateString([],{month:"short",day:"numeric"})} \${r(e)}\`:r,s=Yc(d,P,-1),i=qc(d,s),o=\`View prev \${n} \xB7 \${a(i.start)} \u2013 \${a(i.end)}\`;if(M)return{before:t.before,after:0,olderLabel:o};const l=Yc(d,P,1),c=qc(d,l);return{...t,newerLabel:\`View next \${n} \xB7 \${a(c.start)} \u2013 \${a(c.end)}\`,olderLabel:o}},[e,L,D,P,M,d]),V=h.useCallback(()=>{const e=Yc(d,P,1);Kc(d,e)?u(null):u(e)},[P,d]),I=h.useCallback(()=>{const e=Yc(d,P,-1);u(e)},[P,d]),O=h.useMemo(()=>{if(!M)return new Date(P).toISOString().slice(0,10)},[M,P]),$=h.useMemo(()=>{let e=0,t=0,n=0;for(const r of _)"simple"===r.complexity?e++:"medium"===r.complexity?t++:"complex"===r.complexity&&n++;return{simple:e,medium:t,complex:n}},[_]),B=h.useCallback(e=>{const t=new Date(\`\${e}T12:00:00\`).getTime();u(t),T("day")},[T]),H="all"!==p.client||"all"!==p.language||"all"!==p.project;return o.jsxs("div",{className:"space-y-3",children:[o.jsx(Uu,{value:c,onChange:u,scale:d,onScaleChange:T,sessions:e,milestones:t,showPublic:b}),o.jsx(Qc,{totalHours:z.totalHours,totalSessions:z.totalSessions,actualSpanHours:z.actualSpanHours,coveredHours:z.coveredHours,aiMultiplier:z.aiMultiplier,peakConcurrency:z.peakConcurrency,currentStreak:R,filesTouched:z.filesTouched,featuresShipped:z.featuresShipped,bugsFixed:z.bugsFixed,complexSolved:z.complexSolved,totalMilestones:z.totalMilestones,completionRate:z.completionRate,activeProjects:z.activeProjects,selectedCard:y,onCardClick:v}),o.jsx(eu,{type:y,milestones:_,showPublic:b,onClose:()=>v(null)}),o.jsx(lu,{type:y,sessions:A,allSessions:e,currentStreak:R,stats:{totalHours:z.totalHours,coveredHours:z.coveredHours,aiMultiplier:z.aiMultiplier,peakConcurrency:z.peakConcurrency},showPublic:b,onClose:()=>v(null)}),!j&&o.jsx(gu,{activeTab:N,onTabChange:C}),"sessions"===N&&o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{className:"flex items-center justify-between px-1 pt-0.5",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("h2",{className:"text-sm font-bold text-text-muted uppercase tracking-widest",children:"Activity Feed"}),o.jsxs("span",{className:"text-[10px] text-text-muted font-mono bg-bg-surface-2 px-2 py-0.5 rounded",children:[A.length," Sessions"]})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsxs("button",{onClick:()=>w(e=>!e),className:"inline-flex items-center gap-1.5 px-2.5 py-1.5 rounded-md border transition-all duration-200 "+(b?"bg-success/10 border-success/30 text-success":"bg-bg-surface-1 border-border/50 text-text-muted hover:text-text-primary hover:border-text-muted/50"),title:b?"Showing public titles":"Showing private titles","aria-label":b?"Switch to private titles":"Switch to public titles",children:[b?o.jsx(Ol,{className:"w-3.5 h-3.5"}):o.jsx(Il,{className:"w-3.5 h-3.5"}),o.jsx("span",{className:"hidden sm:inline text-xs font-medium",children:b?"Public":"Private"})]}),o.jsxs("button",{onClick:()=>S(e=>!e),className:"inline-flex items-center gap-1.5 px-2.5 py-1.5 rounded-md border transition-all duration-200 "+(k||H?"bg-accent/10 border-accent/30 text-accent":"bg-bg-surface-1 border-border/50 text-text-muted hover:text-text-primary hover:border-text-muted/50"),title:k?"Hide filters":"Show filters","aria-label":k?"Hide filters":"Show filters",children:[o.jsx(Bl,{className:"w-3.5 h-3.5"}),o.jsx("span",{className:"hidden sm:inline text-xs font-medium",children:"Filters"})]})]})]}),k&&o.jsx(yu,{sessions:A,filters:p,onFilterChange:E}),o.jsx(zu,{sessions:A,milestones:_,filters:p,globalShowPublic:b,showFullDate:"week"===d||"7d"===d||"month"===d||"30d"===d,outsideWindowCounts:F,onNavigateNewer:V,onNavigateOlder:I,onDeleteSession:n,onDeleteConversation:r,onDeleteMilestone:a})]}),"insights"===N&&o.jsxs("div",{className:"space-y-4 pt-2",children:[o.jsx(Xu,{sessions:A,milestones:_,isLive:M,windowStart:L,windowEnd:D,allSessions:e,allMilestones:t}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsx(Zu,{sessions:A}),o.jsx(td,{sessions:A,milestones:_,streak:R})]}),o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsx(Fc,{data:$}),o.jsx(od,{sessions:A,byProject:z.byProject})]}),o.jsx(ad,{byTaskType:z.byTaskType}),o.jsx(zc,{sessions:e,timeScale:d,effectiveTime:P,isLive:M,onDayClick:B,highlightDate:O}),o.jsx(ud,{milestones:_,showPublic:b}),o.jsx(pd,{stats:z})]})]})}function yd({className:e}){return o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 611.54 143.47",className:e,children:[o.jsxs("g",{fill:"var(--text-primary)",children:[o.jsx("path",{d:"M21.4,121.85c-4.57-4.57-6.85-10.02-6.85-16.37V17.23c0-3.1,1.55-4.65,4.64-4.65h25.55c3.1,0,4.65,1.55,4.65,4.65v76.64c0,3.25,1.12,6,3.37,8.25,2.24,2.25,4.99,3.37,8.25,3.37h27.87c3.25,0,6-1.12,8.25-3.37,2.24-2.24,3.37-4.99,3.37-8.25V17.23c0-3.1,1.55-4.65,4.64-4.65h25.55c3.1,0,4.65,1.55,4.65,4.65v88.25c0,6.35-2.29,11.81-6.85,16.37-4.57,4.57-10.03,6.85-16.37,6.85H37.78c-6.35,0-11.81-2.28-16.37-6.85Z"}),o.jsx("path",{d:"M146.93,124.06v-13.93c0-3.1,1.55-4.65,4.64-4.65h69.67c3.25,0,6-1.12,8.25-3.37,2.24-2.24,3.37-4.99,3.37-8.25s-1.12-6-3.37-8.25c-2.25-2.24-4.99-3.37-8.25-3.37h-51.09c-6.35,0-11.81-2.28-16.37-6.85-4.57-4.57-6.85-10.02-6.85-16.37v-23.22c0-6.35,2.28-11.81,6.85-16.37,4.56-4.57,10.02-6.85,16.37-6.85h92.9c3.1,0,4.65,1.55,4.65,4.65v13.94c0,3.1-1.55,4.65-4.65,4.65h-69.67c-3.25,0-6,1.12-8.25,3.37-2.25,2.25-3.37,4.99-3.37,8.25s1.12,6,3.37,8.25c2.24,2.25,4.99,3.37,8.25,3.37h51.09c6.35,0,11.8,2.29,16.37,6.85,4.57,4.57,6.85,10.03,6.85,16.37v23.22c0,6.35-2.29,11.81-6.85,16.37-4.57,4.57-10.03,6.85-16.37,6.85h-92.9c-3.1,0-4.64-1.55-4.64-4.65Z"}),o.jsx("path",{d:"M286.16,121.85c-4.57-4.57-6.85-10.02-6.85-16.37V35.81c0-6.35,2.28-11.81,6.85-16.37,4.56-4.57,10.02-6.85,16.37-6.85h74.32c6.35,0,11.8,2.29,16.37,6.85,4.57,4.57,6.85,10.03,6.85,16.37v23.22c0,6.35-2.29,11.81-6.85,16.37-4.57,4.57-10.03,6.85-16.37,6.85h-62.71v11.61c0,3.25,1.12,6,3.37,8.25,2.24,2.25,4.99,3.37,8.25,3.37h69.67c3.1,0,4.65,1.55,4.65,4.65v13.93c0,3.1-1.55,4.65-4.65,4.65h-92.9c-6.35,0-11.81-2.28-16.37-6.85ZM361.87,55.66c2.24-2.24,3.37-4.99,3.37-8.25s-1.12-6-3.37-8.25c-2.25-2.24-4.99-3.37-8.25-3.37h-27.87c-3.25,0-6,1.12-8.25,3.37-2.25,2.25-3.37,4.99-3.37,8.25v11.61h39.48c3.25,0,6-1.12,8.25-3.37Z"})]}),o.jsxs("g",{fill:"var(--accent)",children:[o.jsx("path",{d:"M432.08,126.44c-4.76-4.76-7.14-10.44-7.14-17.06v-24.2c0-6.61,2.38-12.3,7.14-17.06,4.76-4.76,10.44-7.14,17.06-7.14h65.34v-12.1c0-3.39-1.17-6.25-3.51-8.59-2.34-2.34-5.2-3.51-8.59-3.51h-72.6c-3.23,0-4.84-1.61-4.84-4.84v-14.52c0-3.23,1.61-4.84,4.84-4.84h96.8c6.61,0,12.3,2.38,17.06,7.14,4.76,4.76,7.14,10.45,7.14,17.06v72.6c0,6.62-2.38,12.3-7.14,17.06-4.76,4.76-10.45,7.14-17.06,7.14h-77.44c-6.62,0-12.3-2.38-17.06-7.14ZM510.97,105.87c2.34-2.34,3.51-5.2,3.51-8.59v-12.1h-41.14c-3.39,0-6.25,1.17-8.59,3.51-2.34,2.34-3.51,5.2-3.51,8.59s1.17,6.25,3.51,8.59c2.34,2.34,5.2,3.51,8.59,3.51h29.04c3.39,0,6.25-1.17,8.59-3.51Z"}),o.jsx("path",{d:"M562.87,128.74V17.42c0-3.23,1.61-4.84,4.84-4.84h26.62c3.23,0,4.84,1.61,4.84,4.84v111.32c0,3.23-1.61,4.84-4.84,4.84h-26.62c-3.23,0-4.84-1.61-4.84-4.84Z"})]})]})}var vd={category:"all",client:"all",project:"all",language:"all"};function bd({open:e,onClose:t,sessions:n,milestones:r,onDeleteSession:a,onDeleteConversation:s,onDeleteMilestone:i}){const[l,c]=h.useState(""),[u,d]=h.useState(""),[f,p]=h.useState(!1),m=h.useRef(null);h.useEffect(()=>{e&&(c(""),d(""),requestAnimationFrame(()=>m.current?.focus()))},[e]),h.useEffect(()=>{if(!e)return;const t=document.documentElement;return t.style.overflow="hidden",document.body.style.overflow="hidden",()=>{t.style.overflow="",document.body.style.overflow=""}},[e]),h.useEffect(()=>{if(!e)return;const n=e=>{"Escape"===e.key&&t()};return window.addEventListener("keydown",n),()=>window.removeEventListener("keydown",n)},[e,t]),h.useEffect(()=>{const e=setTimeout(()=>d(l),250);return()=>clearTimeout(e)},[l]);const g=h.useMemo(()=>{const e=new Map;for(const t of r){const n=e.get(t.session_id);n?n.push(t):e.set(t.session_id,[t])}return e},[r]),{filteredSessions:x,filteredMilestones:y,highlightWords:v}=h.useMemo(()=>{const e=u.trim().toLowerCase();if(!e)return{filteredSessions:[],filteredMilestones:[],highlightWords:[]};const t=e.split(/\\s+/),a=n.filter(e=>function(e,t,n,r){const a=(r?[e.title,e.client,e.task_type,...e.languages,...t.map(e=>e.title)]:[e.private_title,e.title,e.client,e.task_type,...e.languages,...t.map(e=>e.private_title),...t.map(e=>e.title)]).filter(Boolean).join(" ").toLowerCase();return n.every(e=>a.includes(e))}(e,g.get(e.session_id)??[],t,f)),s=new Set(a.map(e=>e.session_id));return{filteredSessions:a,filteredMilestones:r.filter(e=>s.has(e.session_id)),highlightWords:t}},[n,r,g,u,f]),b=u.trim().length>0;return o.jsx(Qi,{children:e&&o.jsxs(o.Fragment,{children:[o.jsx(pl.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},className:"fixed inset-0 bg-black/40 backdrop-blur-sm z-[60]",onClick:t}),o.jsx(pl.div,{initial:{opacity:0,scale:.96},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.96},transition:{duration:.15},className:"fixed inset-0 z-[61] flex items-start justify-center pt-[10vh] px-4 pointer-events-none",children:o.jsxs("div",{className:"w-full max-w-2xl bg-bg-base border border-border/50 rounded-xl shadow-2xl flex flex-col max-h-[75vh] pointer-events-auto",onClick:e=>e.stopPropagation(),children:[o.jsxs("div",{className:"flex items-center gap-3 px-4 py-3 border-b border-border/50",children:[o.jsx(cc,{className:"w-4 h-4 text-text-muted flex-shrink-0"}),o.jsx("input",{ref:m,type:"text",value:l,onChange:e=>c(e.target.value),placeholder:f?"Search public titles...":"Search all sessions and milestones...",className:"flex-1 bg-transparent text-sm text-text-primary placeholder:text-text-muted/50 outline-none"}),l&&o.jsx("button",{onClick:()=>{c(""),m.current?.focus()},className:"p-1 rounded-md hover:bg-bg-surface-2 text-text-muted hover:text-text-primary transition-colors",children:o.jsx(bc,{className:"w-3.5 h-3.5"})}),o.jsx("button",{onClick:()=>p(e=>!e),className:"p-1.5 rounded-md border transition-all duration-200 flex-shrink-0 "+(f?"bg-success/10 border-success/30 text-success":"bg-bg-surface-1 border-border/50 text-text-muted hover:text-text-primary hover:border-text-muted/50"),title:f?"Searching public titles":"Searching private titles",children:f?o.jsx(Ol,{className:"w-3.5 h-3.5"}):o.jsx(Il,{className:"w-3.5 h-3.5"})}),o.jsx("kbd",{className:"hidden sm:inline-flex items-center gap-0.5 px-1.5 py-0.5 rounded border border-border bg-bg-surface-1 text-[10px] font-mono text-text-muted",children:"esc"})]}),o.jsx("div",{className:"flex-1 overflow-y-auto overscroll-none px-4 py-3",children:b?0===x.length?o.jsxs("div",{className:"text-center py-12 text-sm text-text-muted/60",children:["No results for \u201C",u.trim(),"\u201D"]}):o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"text-[10px] font-mono text-text-muted uppercase tracking-wider mb-3 px-1",children:[x.length," result",1!==x.length?"s":""]}),o.jsx(zu,{sessions:x,milestones:y,filters:vd,globalShowPublic:f||void 0,showFullDate:!0,highlightWords:v,onDeleteSession:a,onDeleteConversation:s,onDeleteMilestone:i})]}):o.jsx("div",{className:"text-center py-12 text-sm text-text-muted/60",children:"Type to search across all sessions"})})]})})]})})}let wd=new Set;const kd=(Sd=(e,t)=>({sessions:[],milestones:[],config:null,health:null,updateInfo:null,loading:!0,timeTravelTime:null,timeScale:(()=>{try{const e=localStorage.getItem("useai-time-scale"),t=[...Oc];if(e&&t.includes(e))return e}catch{}return"day"})(),filters:{category:"all",client:"all",project:"all",language:"all"},activeTab:(()=>{try{const e=localStorage.getItem("useai-active-tab");if("sessions"===e||"insights"===e||"settings"===e||"logs"===e)return e}catch{}return"sessions"})(),loadAll:async()=>{try{const[t,n,r]=await Promise.all([_("/api/local/sessions"),_("/api/local/milestones"),V()]);e({sessions:wd.size>0?t.filter(e=>!wd.has(e.session_id)):t,milestones:wd.size>0?n.filter(e=>!wd.has(e.session_id)):n,config:r,loading:!1})}catch{e({loading:!1})}},loadHealth:async()=>{try{const t=await _("/health");e({health:t})}catch{}},loadUpdateCheck:async()=>{try{const t=await _("/api/local/update-check");e({updateInfo:t})}catch{}},setTimeTravelTime:t=>e({timeTravelTime:t}),setTimeScale:t=>{try{localStorage.setItem("useai-time-scale",t)}catch{}e({timeScale:t})},setFilter:(t,n)=>e(e=>({filters:{...e.filters,[t]:n}})),setActiveTab:t=>{try{localStorage.setItem("useai-active-tab",t)}catch{}e({activeTab:t})},deleteSession:async n=>{wd.add(n),e({sessions:t().sessions.filter(e=>e.session_id!==n),milestones:t().milestones.filter(e=>e.session_id!==n)});try{await function(e){return F(\`/api/local/sessions/\${encodeURIComponent(e)}\`)}(n)}catch(r){console.error("Failed to delete session:",n,r),t().loadAll()}finally{wd.delete(n)}},deleteConversation:async n=>{const r=new Set(t().sessions.filter(e=>e.conversation_id===n).map(e=>e.session_id));for(const e of r)wd.add(e);e({sessions:t().sessions.filter(e=>e.conversation_id!==n),milestones:t().milestones.filter(e=>!r.has(e.session_id))});try{await function(e){return F(\`/api/local/conversations/\${encodeURIComponent(e)}\`)}(n)}catch(a){console.error("Failed to delete conversation:",n,a),t().loadAll()}finally{for(const e of r)wd.delete(e)}},deleteMilestone:async n=>{e({milestones:t().milestones.filter(e=>e.id!==n)});try{await function(e){return F(\`/api/local/milestones/\${encodeURIComponent(e)}\`)}(n)}catch(r){console.error("Failed to delete milestone:",n,r),t().loadAll()}}}))?A(Sd):A;var Sd;const jd=/^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/;function Nd(e){if(!e)return"Never synced";const t=Date.now()-new Date(e).getTime(),n=Math.floor(t/6e4);if(n<1)return"Just now";if(n<60)return\`\${n}m ago\`;const r=Math.floor(n/60);if(r<24)return\`\${r}h ago\`;return\`\${Math.floor(r/24)}d ago\`}function Cd({config:e,onRefresh:t}){const n=!!e.username,[r,a]=h.useState(!n),[s,i]=h.useState(e.username??""),[l,c]=h.useState("idle"),[u,d]=h.useState(),[f,p]=h.useState(!1),m=h.useRef(void 0),g=h.useRef(void 0);h.useEffect(()=>{e.username&&(a(!1),i(e.username))},[e.username]);const x=h.useCallback(t=>{const n=function(e){return e.toLowerCase().replace(/[^a-z0-9-]/g,"")}(t);if(i(n),d(void 0),m.current&&clearTimeout(m.current),g.current&&g.current.abort(),!n)return void c("idle");const r=function(e){return 0===e.length?{valid:!1}:e.length<3?{valid:!1,reason:"At least 3 characters"}:e.length>32?{valid:!1,reason:"At most 32 characters"}:jd.test(e)?{valid:!0}:{valid:!1,reason:"No leading/trailing hyphens"}}(n);if(!r.valid)return c("invalid"),void d(r.reason);n!==e.username?(c("checking"),m.current=setTimeout(async()=>{g.current=new AbortController;try{const e=await async function(e){return _(\`/api/local/users/check-username/\${encodeURIComponent(e)}\`)}(n);e.available?(c("available"),d(void 0)):(c("taken"),d(e.reason))}catch{c("invalid"),d("Check failed")}},400)):c("idle")},[e.username]),y=h.useCallback(async()=>{if("available"===l){p(!0);try{await async function(e){return R("/api/local/users/me",{username:e})}(s),t()}catch(e){c("invalid"),d(e.message)}finally{p(!1)}}},[s,l,t]),v=h.useCallback(()=>{a(!1),i(e.username??""),c("idle"),d(void 0)},[e.username]),b=h.useCallback(()=>{a(!0),i(e.username??""),c("idle"),d(void 0)},[e.username]);return!r&&n?o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Xl,{className:"w-3.5 h-3.5 text-text-muted"}),o.jsxs("a",{href:\`https://useai.dev/\${e.username}\`,target:"_blank",rel:"noopener noreferrer",className:"text-xs font-bold text-accent hover:text-accent-bright transition-colors",children:["useai.dev/",e.username]}),o.jsx("button",{onClick:b,className:"p-1 rounded hover:bg-bg-surface-2 text-text-muted hover:text-text-primary transition-colors cursor-pointer",title:"Edit username",children:o.jsx(rc,{className:"w-3 h-3"})})]}):o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"text-xs text-text-muted whitespace-nowrap",children:"useai.dev/"}),o.jsx("div",{className:"flex items-center bg-bg-base border border-border rounded-lg overflow-hidden focus-within:border-accent/50 transition-all",children:o.jsx("input",{type:"text",placeholder:"username",value:s,onChange:e=>x(e.target.value),onKeyDown:e=>"Enter"===e.key&&y(),autoFocus:r,maxLength:32,className:"px-2 py-1.5 text-xs bg-transparent text-text-primary outline-none w-28 placeholder:text-text-muted/50"})}),o.jsxs("div",{className:"w-4 h-4 flex items-center justify-center",children:["checking"===l&&o.jsx(Ql,{className:"w-3.5 h-3.5 text-text-muted animate-spin"}),"available"===l&&o.jsx(jl,{className:"w-3.5 h-3.5 text-success"}),("taken"===l||"invalid"===l)&&s.length>0&&o.jsx(bc,{className:"w-3.5 h-3.5 text-error"})]}),o.jsx("button",{onClick:y,disabled:"available"!==l||f,className:"px-3 py-1.5 bg-accent hover:bg-accent-bright text-bg-base text-[10px] font-bold uppercase tracking-wider rounded-lg transition-colors disabled:opacity-30 cursor-pointer",children:f?"...":n?"Save":"Claim"}),n&&o.jsx("button",{onClick:v,className:"px-2 py-1.5 text-[10px] font-bold uppercase tracking-wider text-text-muted hover:text-text-primary transition-colors cursor-pointer",children:"Cancel"}),u&&o.jsx("span",{className:"text-[10px] text-error/80 truncate max-w-[140px]",title:u,children:u})]})}const Td=h.forwardRef(function({config:e,onRefresh:t,onTabChange:n},r){const[a,s]=h.useState(!1),[i,l]=h.useState(""),[c,u]=h.useState(""),[d,f]=h.useState("email"),[p,m]=h.useState(!1),[g,x]=h.useState(null),y=h.useRef(null);h.useImperativeHandle(r,()=>({open:()=>s(!0)})),h.useEffect(()=>{if(!a)return;const e=e=>{y.current&&!y.current.contains(e.target)&&s(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[a]),h.useEffect(()=>{if(!a)return;const e=e=>{"Escape"===e.key&&s(!1)};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[a]);const v=h.useCallback(async()=>{if(i.includes("@")){m(!0),x(null);try{await function(e){return z("/api/local/auth/send-otp",{email:e})}(i),f("otp")}catch(e){x(e.message)}finally{m(!1)}}},[i]),b=h.useCallback(async()=>{if(/^\\d{6}$/.test(c)){m(!0),x(null);try{await async function(e,t){return z("/api/local/auth/verify-otp",{email:e,code:t})}(i,c),t(),s(!1)}catch(e){x(e.message)}finally{m(!1)}}},[i,c,t]),w=h.useCallback(async()=>{m(!0),x(null);try{const e=await async function(){return z("/api/local/sync")}();e.success?(x("Synced!"),t(),setTimeout(()=>x(null),3e3)):x(e.error??"Sync failed")}catch(e){x(e.message)}finally{m(!1)}},[t]),k=h.useCallback(async()=>{await async function(){return z("/api/local/auth/logout")}(),t(),s(!1)},[t]);if(!e)return null;const S=e.authenticated;return o.jsxs("div",{className:"relative",ref:y,children:[S?o.jsxs("button",{onClick:()=>s(e=>!e),className:"flex items-center gap-1.5 rounded-full transition-colors cursor-pointer hover:opacity-80",children:[o.jsxs("div",{className:"relative w-7 h-7 rounded-full bg-accent/15 border border-accent/30 flex items-center justify-center",children:[o.jsx("span",{className:"text-xs font-bold text-accent leading-none",children:(e.email?.[0]??"?").toUpperCase()}),o.jsx("div",{className:"absolute -bottom-0.5 -right-0.5 w-2.5 h-2.5 rounded-full border-2 border-bg-base "+(e.last_sync_at?"bg-success":"bg-warning")})]}),o.jsx(Nl,{className:"w-3 h-3 text-text-muted transition-transform "+(a?"rotate-180":"")})]}):o.jsxs("button",{onClick:()=>s(e=>!e),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-md bg-accent hover:bg-accent-bright text-bg-base text-xs font-bold tracking-wide transition-colors cursor-pointer",children:[o.jsx(yc,{className:"w-3 h-3"}),"Sign in"]}),a&&o.jsx("div",{className:"absolute right-0 top-full mt-2 z-50 w-80 rounded-lg bg-bg-surface-1 border border-border shadow-lg",children:S?o.jsxs("div",{children:[o.jsx("div",{className:"px-4 pt-3 pb-2",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("div",{className:"w-8 h-8 rounded-full bg-accent/10 flex items-center justify-center border border-accent/20 shrink-0",children:o.jsx("span",{className:"text-sm font-bold text-accent",children:(e.email?.[0]??"?").toUpperCase()})}),o.jsx("div",{className:"flex flex-col min-w-0",children:o.jsx("span",{className:"text-xs font-bold text-text-primary truncate",children:e.email})})]})}),o.jsx("div",{className:"px-4 py-2 border-t border-border/50",children:o.jsx(Cd,{config:e,onRefresh:t})}),o.jsx("div",{className:"px-4 py-2 border-t border-border/50",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("span",{className:"text-[10px] text-text-muted font-mono uppercase tracking-tighter",children:["Last sync: ",Nd(e.last_sync_at)]}),o.jsxs("div",{className:"flex items-center gap-2",children:[g&&o.jsx("span",{className:"text-[10px] font-bold uppercase tracking-widest "+("Synced!"===g?"text-success":"text-error"),children:g}),o.jsxs("button",{onClick:w,disabled:p,className:"flex items-center gap-1.5 px-2.5 py-1 bg-accent hover:bg-accent-bright text-bg-base text-[10px] font-bold uppercase tracking-wider rounded-md transition-colors disabled:opacity-50 cursor-pointer",children:[o.jsx(ac,{className:"w-3 h-3 "+(p?"animate-spin":"")}),p?"...":"Sync"]})]})]})}),o.jsxs("div",{className:"px-4 py-2 border-t border-border/50 space-y-0.5",children:[o.jsxs("button",{onClick:()=>{n?.("logs"),s(!1)},className:"flex items-center gap-2 w-full px-2 py-1.5 rounded-md text-xs text-text-muted hover:text-text-primary hover:bg-bg-surface-2 transition-colors cursor-pointer",children:[o.jsx(lc,{className:"w-3.5 h-3.5"}),"Sync logs"]}),o.jsxs("button",{onClick:k,className:"flex items-center gap-2 w-full px-2 py-1.5 rounded-md text-xs text-text-muted hover:text-error hover:bg-error/10 transition-colors cursor-pointer",children:[o.jsx(Jl,{className:"w-3.5 h-3.5"}),"Sign out"]})]})]}):o.jsxs("div",{className:"p-4",children:[o.jsx("p",{className:"text-xs font-bold text-text-secondary uppercase tracking-widest mb-3",children:"Sign in to sync"}),g&&o.jsx("p",{className:"text-[10px] font-bold text-error uppercase tracking-widest mb-2",children:g}),"email"===d?o.jsxs("div",{className:"flex items-center bg-bg-base border border-border rounded-lg overflow-hidden focus-within:border-accent/50 focus-within:ring-1 focus-within:ring-accent/50 transition-all",children:[o.jsx("div",{className:"pl-3 py-2",children:o.jsx(ec,{className:"w-3.5 h-3.5 text-text-muted"})}),o.jsx("input",{type:"email",placeholder:"you@email.com",value:i,onChange:e=>l(e.target.value),onKeyDown:e=>"Enter"===e.key&&v(),autoFocus:!0,className:"px-3 py-2 text-xs bg-transparent text-text-primary outline-none flex-1 placeholder:text-text-muted/50"}),o.jsx("button",{onClick:v,disabled:p||!i.includes("@"),className:"px-4 py-2 bg-bg-surface-2 hover:bg-bg-surface-3 text-text-primary text-[10px] font-bold uppercase tracking-wider transition-colors disabled:opacity-50 cursor-pointer border-l border-border",children:p?"...":"Send"})]}):o.jsxs("div",{className:"flex items-center bg-bg-base border border-border rounded-lg overflow-hidden focus-within:border-accent/50 focus-within:ring-1 focus-within:ring-accent/50 transition-all",children:[o.jsx("input",{type:"text",maxLength:6,placeholder:"000000",inputMode:"numeric",autoComplete:"one-time-code",value:c,onChange:e=>u(e.target.value),onKeyDown:e=>"Enter"===e.key&&b(),autoFocus:!0,className:"px-4 py-2 text-xs bg-transparent text-text-primary text-center font-mono tracking-widest outline-none flex-1 placeholder:text-text-muted/50"}),o.jsx("button",{onClick:b,disabled:p||6!==c.length,className:"px-4 py-2 bg-accent hover:bg-accent-bright text-bg-base text-[10px] font-bold uppercase tracking-wider transition-colors disabled:opacity-50 cursor-pointer",children:p?"...":"Verify"})]})]})})]})}),Ed="npx -y @devness/useai update";function Md({updateInfo:e}){const[t,n]=h.useState(!1),[r,a]=h.useState(!1);return o.jsxs("div",{className:"relative",children:[o.jsxs("button",{onClick:()=>n(e=>!e),className:"flex items-center gap-1.5 px-2.5 py-1 rounded-full bg-accent/10 border border-accent/20 text-xs font-medium text-accent hover:bg-accent/15 transition-colors",children:[o.jsx(Ml,{className:"w-3 h-3"}),"v",e.latest," available"]}),t&&o.jsxs("div",{className:"absolute right-0 top-full mt-2 z-50 w-72 rounded-lg bg-bg-surface-1 border border-border shadow-lg p-3 space-y-2",children:[o.jsxs("p",{className:"text-xs text-text-muted",children:["Update from ",o.jsxs("span",{className:"font-mono text-text-secondary",children:["v",e.current]})," to ",o.jsxs("span",{className:"font-mono text-accent",children:["v",e.latest]})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("code",{className:"flex-1 text-[11px] font-mono bg-bg-base px-2 py-1.5 rounded border border-border text-text-secondary truncate",children:Ed}),o.jsx("button",{onClick:async()=>{try{await navigator.clipboard.writeText(Ed),a(!0),setTimeout(()=>a(!1),2e3)}catch{}},className:"p-1.5 rounded-md border border-border bg-bg-base text-text-muted hover:text-text-primary hover:border-text-muted/50 transition-colors shrink-0",title:"Copy command",children:r?o.jsx(jl,{className:"w-3.5 h-3.5 text-success"}):o.jsx(zl,{className:"w-3.5 h-3.5"})})]})]})]})}function Pd({health:e,updateInfo:t,onSearchOpen:n,activeTab:r,onTabChange:a,config:s,onRefresh:i}){const l=h.useRef(null),c=h.useMemo(()=>{if(s?.username)return[{label:"Leaderboard",href:"https://useai.dev/leaderboard"},{label:"Profile",href:\`https://useai.dev/\${s.username}\`}]},[s?.username]);return o.jsx("header",{className:"sticky top-0 z-50 bg-bg-base/80 backdrop-blur-md border-b border-border mb-6",children:o.jsxs("div",{className:"max-w-[1240px] mx-auto px-4 sm:px-6 py-3 flex items-center justify-between relative",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(yd,{className:"h-6"}),e&&e.active_sessions>0&&o.jsx(Fu,{label:\`\${e.active_sessions} active session\${1!==e.active_sessions?"s":""}\`,color:"success",dot:!0})]}),o.jsx("div",{className:"absolute left-1/2 -translate-x-1/2",children:o.jsx(gu,{activeTab:r,onTabChange:a,externalLinks:c})}),o.jsxs("div",{className:"flex items-center gap-4",children:[s?.authenticated&&!s?.username&&o.jsxs("button",{onClick:()=>l.current?.open(),className:"flex items-center gap-1.5 px-2.5 py-1 rounded-full bg-accent/10 border border-accent/25 text-[11px] font-medium text-accent hover:bg-accent/15 transition-colors cursor-pointer",children:[o.jsx(hc,{className:"w-3 h-3"}),"Claim your username"]}),n&&o.jsxs("button",{onClick:n,className:"flex items-center gap-2 px-2.5 py-1.5 rounded-md border border-border/50 bg-bg-surface-1 text-text-muted hover:text-text-primary hover:border-text-muted/50 transition-colors text-xs",children:[o.jsx(cc,{className:"w-3 h-3"}),o.jsx("span",{className:"hidden sm:inline",children:"Search"}),o.jsx("kbd",{className:"hidden sm:inline-flex items-center px-1 py-0.5 rounded border border-border bg-bg-base text-[9px] font-mono leading-none",children:"\u2318K"})]}),t?.update_available&&o.jsx(Md,{updateInfo:t}),o.jsx(Td,{ref:l,config:s,onRefresh:i,onTabChange:a})]})]})})}function Ld({label:e,description:t,checked:n,onChange:r,warning:a,disabled:s}){return o.jsxs("label",{className:"flex items-start justify-between gap-3 py-2 group "+(s?"cursor-default opacity-60":"cursor-pointer"),children:[o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("div",{className:"text-xs font-medium text-text-primary",children:e}),o.jsx("div",{className:"text-[11px] text-text-muted leading-relaxed mt-0.5",children:t}),a&&n&&o.jsxs("div",{className:"flex items-center gap-1 mt-1 text-[11px] text-warning",children:[o.jsx(gc,{className:"w-3 h-3 shrink-0"}),a]})]}),o.jsx("button",{role:"switch","aria-checked":n,disabled:s,onClick:()=>!s&&r(!n),className:\`\\n relative inline-flex h-5 w-9 shrink-0 rounded-full border-2 border-transparent transition-colors duration-200\\n \${n?"bg-text-muted":"bg-bg-surface-2"}\\n \${s?"cursor-not-allowed":""}\\n \`,children:o.jsx("span",{className:\`\\n pointer-events-none inline-block h-4 w-4 rounded-full bg-white shadow-sm transition-transform duration-200\\n \${n?"translate-x-4":"translate-x-0"}\\n \`})})]})}function Dd({label:e,description:t,value:n,options:r,onChange:a}){return o.jsxs("div",{className:"flex items-start justify-between gap-3 py-2",children:[o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("div",{className:"text-xs font-medium text-text-primary",children:e}),o.jsx("div",{className:"text-[11px] text-text-muted leading-relaxed mt-0.5",children:t})]}),o.jsxs("div",{className:"relative",children:[o.jsx("select",{value:n,onChange:e=>a(e.target.value),className:"appearance-none bg-bg-surface-2 border border-border/50 rounded-md px-2.5 py-1 pr-7 text-xs text-text-primary cursor-pointer hover:border-border transition-colors",children:r.map(e=>o.jsx("option",{value:e.value,children:e.label},e.value))}),o.jsx(Nl,{className:"absolute right-1.5 top-1/2 -translate-y-1/2 w-3 h-3 text-text-muted pointer-events-none"})]})]})}function Ad({onTabChange:e}){const[t,n]=h.useState(null),[r,a]=h.useState(null),[s,i]=h.useState("idle"),[l,c]=h.useState(null),[u,d]=h.useState(null),[f,p]=h.useState([]);h.useEffect(()=>{_("/api/local/config/full").then(e=>{n(e),a(structuredClone(e)),e.authenticated&&_("/api/local/orgs").then(e=>{Array.isArray(e)&&p(e.filter(e=>e?.org?.id))}).catch(()=>{})}).catch(e=>d(e.message))},[]);const m=!(!t||!r)&&(g=t,x=r,!(JSON.stringify(g)===JSON.stringify(x)));var g,x;const y=h.useCallback(async()=>{if(r&&t){i("saving"),c(null);try{const t=await(e={capture:r.capture,sync:r.sync,evaluation_framework:r.evaluation_framework},R("/api/local/config",e)),{instructions_updated:s,...o}=t;n(o),a(structuredClone(o)),c(s??[]),i("saved"),setTimeout(()=>i("idle"),3e3)}catch{i("error"),setTimeout(()=>i("idle"),3e3)}var e}},[r,t]),v=h.useCallback(()=>{t&&a(structuredClone(t))},[t]),b=h.useCallback(e=>{a(t=>t?{...t,capture:{...t.capture,...e}}:t)},[]),w=h.useCallback(e=>{a(t=>t?{...t,sync:{...t.sync,...e}}:t)},[]),k=h.useCallback(e=>{a(t=>t?{...t,evaluation_framework:e}:t)},[]);return u?o.jsx("div",{className:"max-w-xl mx-auto mt-12 text-center",children:o.jsxs("div",{className:"text-sm text-danger",children:["Failed to load config: ",u]})}):r?o.jsxs("div",{className:"max-w-xl mx-auto pt-2 pb-12 space-y-5",children:[o.jsxs("section",{className:"bg-bg-surface-1 border border-border/50 rounded-xl p-4",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[o.jsx(kl,{className:"w-4 h-4 text-text-muted"}),o.jsx("h2",{className:"text-xs font-bold text-text-muted uppercase tracking-widest",children:"Capture"})]}),o.jsx("p",{className:"text-[11px] text-text-muted mb-3",children:"What data to record locally for each session. All data stays on your machine unless you enable Cloud Sync."}),o.jsxs("div",{className:"space-y-3",children:[o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-1.5 mb-1.5 px-0.5",children:[o.jsx(ql,{className:"w-3 h-3 text-emerald-500"}),o.jsx("span",{className:"text-[10px] font-semibold text-emerald-500 uppercase tracking-wider",children:"Local only \u2014 never synced"})]}),o.jsxs("div",{className:"divide-y divide-border/30 rounded-lg border border-emerald-500/15 bg-emerald-500/[0.03] px-3",children:[o.jsx(Ld,{label:"Prompts",description:"Record prompt text and word count",checked:r.capture.prompt,onChange:e=>b({prompt:e})}),o.jsx(Ld,{label:"Prompt images",description:"Record image descriptions from prompts",checked:r.capture.prompt_images,onChange:e=>b({prompt_images:e})}),o.jsx(Dd,{label:"Evaluation reasons",description:"When to include reason text for each score",value:r.capture.evaluation_reasons,options:[{value:"all",label:"All scores"},{value:"below_perfect",label:"Below perfect only"},{value:"none",label:"None"}],onChange:e=>b({evaluation_reasons:e})})]})]}),o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-1.5 mb-1.5 px-0.5",children:[o.jsx(Dl,{className:"w-3 h-3 text-blue-400"}),o.jsx("span",{className:"text-[10px] font-semibold text-blue-400 uppercase tracking-wider",children:"Synced when Cloud Sync is enabled"})]}),o.jsxs("div",{className:"divide-y divide-border/30 rounded-lg border border-blue-400/15 bg-blue-400/[0.03] px-3",children:[o.jsx(Ld,{label:"Evaluation scores",description:"Record session quality scores \u2014 included in stats sync",checked:r.capture.evaluation,onChange:e=>b({evaluation:e})}),o.jsx(Ld,{label:"Milestones",description:"Record accomplishments \u2014 included in titles & milestones sync",checked:r.capture.milestones,onChange:e=>b({milestones:e})})]})]})]})]}),o.jsxs("section",{className:"bg-bg-surface-1 border border-border/50 rounded-xl p-4",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[o.jsx(Sl,{className:"w-4 h-4 text-text-muted"}),o.jsx("h2",{className:"text-xs font-bold text-text-muted uppercase tracking-widest",children:"Evaluation"})]}),o.jsx("p",{className:"text-[11px] text-text-muted mb-3",children:"How sessions are scored."}),o.jsx(Dd,{label:"Framework",description:"Scoring method used for session evaluations",value:r.evaluation_framework,options:[{value:"space",label:"SPACE (weighted)"},{value:"raw",label:"Raw (equal weight)"}],onChange:k})]}),o.jsxs("section",{className:"bg-bg-surface-1 border border-border/50 rounded-xl p-4",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[o.jsx(Al,{className:"w-4 h-4 text-text-muted"}),o.jsx("h2",{className:"text-xs font-bold text-text-muted uppercase tracking-widest",children:"Cloud Sync"})]}),o.jsxs("p",{className:"text-[11px] text-text-muted mb-3",children:["Sync session data to useai.dev for leaderboards and public profiles.",!r.authenticated&&" Login first to enable sync."]}),o.jsxs("div",{className:"divide-y divide-border/30",children:[o.jsx(Ld,{label:"Auto-sync",description:"Automatically sync data on a schedule",checked:r.sync.enabled,onChange:e=>w({enabled:e})}),r.sync.enabled&&o.jsxs("div",{className:"space-y-3 pt-2",children:[o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-1.5 mb-1.5 px-0.5",children:[o.jsx(Wl,{className:"w-3 h-3 text-amber-400"}),o.jsx("span",{className:"text-[10px] font-semibold text-amber-400 uppercase tracking-wider",children:"Public \u2014 visible on your profile"})]}),o.jsx("div",{className:"divide-y divide-border/30 rounded-lg border border-amber-400/15 bg-amber-400/[0.03] px-3",children:o.jsx(Ld,{label:"Sync my stats",description:"Hours, languages, task types, streaks, evaluation scores \u2014 always included with sync",checked:!0,onChange:()=>{},disabled:!0})})]}),o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-1.5 mb-1.5 px-0.5",children:[o.jsx(Zl,{className:"w-3 h-3 text-emerald-500"}),o.jsxs("span",{className:"text-[10px] font-semibold text-emerald-500 uppercase tracking-wider",children:["Private \u2014 visible to you",f.length>0?" & your organization":""]})]}),o.jsxs("div",{className:"divide-y divide-border/30 rounded-lg border border-emerald-500/15 bg-emerald-500/[0.03] px-3",children:[o.jsx(Ld,{label:"Sync titles & milestones",description:"Session titles, project names, and milestones"+(f.length>0?" \u2014 also visible to org admins":""),checked:r.sync.include_details,onChange:e=>w({include_details:e})}),f.length>0&&o.jsxs("div",{className:"py-2",children:[o.jsx("div",{className:"text-[10px] text-text-muted mb-1",children:"Your organizations:"}),o.jsx("div",{className:"flex flex-wrap gap-1.5",children:f.map(e=>o.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full bg-emerald-500/10 text-[10px] font-medium text-emerald-400",children:[e.org.name,o.jsx("span",{className:"text-emerald-400/50",children:e.role})]},e.org.id))})]})]})]}),o.jsx("div",{className:"divide-y divide-border/30",children:o.jsx(Dd,{label:"Sync interval",description:"How often to sync data",value:String(r.sync.interval_hours),options:[{value:"0.25",label:"Every 15 minutes"},{value:"0.5",label:"Every 30 minutes"},{value:"1",label:"Every hour"},{value:"2",label:"Every 2 hours"},{value:"3",label:"Every 3 hours"},{value:"6",label:"Every 6 hours"},{value:"12",label:"Every 12 hours"},{value:"24",label:"Every 24 hours"}],onChange:e=>w({interval_hours:Number(e)})})})]})]})]}),o.jsxs("section",{className:"bg-bg-surface-1 border border-border/50 rounded-xl p-4",children:[o.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[o.jsx(lc,{className:"w-4 h-4 text-text-muted"}),o.jsx("h2",{className:"text-xs font-bold text-text-muted uppercase tracking-widest",children:"Sync Logs"})]}),o.jsx("p",{className:"text-[11px] text-text-muted mb-3",children:"View a log of all sync, login, and cloud pull events."}),o.jsxs("button",{onClick:()=>e?.("logs"),className:"flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-medium bg-bg-surface-2 border border-border/50 text-text-primary hover:bg-bg-surface-3 transition-colors",children:[o.jsx(lc,{className:"w-3 h-3"}),"View sync logs"]})]}),m&&o.jsxs("div",{className:"sticky bottom-4 flex items-center justify-between gap-3 bg-bg-surface-1 border border-border/50 rounded-xl px-4 py-3 shadow-lg",children:[o.jsx("div",{className:"text-xs text-text-muted",children:"saved"===s&&l?\`Saved. Updated instructions in \${l.length} tool\${1!==l.length?"s":""}: \${l.join(", ")||"none installed"}\`:"error"===s?"Failed to save. Try again.":"You have unsaved changes"}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("button",{onClick:v,disabled:"saving"===s,className:"px-3 py-1.5 rounded-md text-xs font-medium text-text-muted hover:text-text-primary border border-border/50 hover:border-border transition-colors disabled:opacity-50",children:"Discard"}),o.jsxs("button",{onClick:y,disabled:"saving"===s,className:"flex items-center gap-1.5 px-3 py-1.5 rounded-md text-xs font-medium bg-accent text-bg-base hover:bg-accent/90 transition-colors disabled:opacity-50",children:["saving"===s?o.jsx(Ql,{className:"w-3 h-3 animate-spin"}):"saved"===s?o.jsx(jl,{className:"w-3 h-3"}):o.jsx(oc,{className:"w-3 h-3"}),"saving"===s?"Saving...":"saved"===s?"Saved":"Save"]})]})]})]}):o.jsx("div",{className:"max-w-xl mx-auto mt-12 text-center",children:o.jsx("div",{className:"text-sm text-text-muted",children:"Loading settings..."})})}const _d={sync:"Sync",auto_sync:"Auto Sync",login:"Login",logout:"Logout",cloud_pull:"Cloud Pull"},zd={sync:Dl,auto_sync:Pl,login:Gl,logout:Jl,cloud_pull:Ll},Rd={success:"text-emerald-400",error:"text-red-400",info:"text-blue-400"},Fd={success:"bg-emerald-400",error:"bg-red-400",info:"bg-blue-400"};function Vd(e){const t=new Date(e),n=(new Date).getTime()-t.getTime(),r=Math.floor(n/6e4);if(r<1)return"just now";if(r<60)return\`\${r}m ago\`;const a=Math.floor(r/60);if(a<24)return\`\${a}h ago\`;const s=Math.floor(a/24);return s<7?\`\${s}d ago\`:t.toLocaleDateString(void 0,{month:"short",day:"numeric"})}function Id({entry:e}){const[t,n]=h.useState(!1),[r,a]=h.useState(!1),[s,i]=h.useState(!1),l=zd[e.event],c=e.details&&Object.keys(e.details).length>0||!!e.payload;return o.jsxs("div",{className:"group",children:[o.jsxs("button",{onClick:()=>c&&n(!t),className:"w-full flex items-start gap-2.5 px-3 py-2 text-left transition-colors "+(c?"hover:bg-bg-surface-2/50 cursor-pointer":"cursor-default"),children:[o.jsx("div",{className:\`mt-0.5 shrink-0 \${Rd[e.status]}\`,children:o.jsx(l,{className:"w-3.5 h-3.5"})}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("div",{className:"flex items-center gap-2",children:o.jsx("span",{className:"text-xs font-medium text-text-primary truncate",children:e.message})}),o.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[o.jsxs("span",{className:"flex items-center gap-1",children:[o.jsx("span",{className:\`w-1.5 h-1.5 rounded-full \${Fd[e.status]}\`}),o.jsx("span",{className:"text-[10px] text-text-muted",children:_d[e.event]})]}),o.jsx("span",{className:"text-[10px] text-text-muted/60",children:Vd(e.timestamp)}),e.payload&&o.jsxs("span",{className:"text-[10px] text-accent/60 font-mono",children:[e.payload.method," ",new URL(e.payload.endpoint).pathname]})]})]}),c&&o.jsx("div",{className:"mt-0.5 shrink-0 text-text-muted/40",children:t?o.jsx(Nl,{className:"w-3 h-3"}):o.jsx(Tl,{className:"w-3 h-3"})})]}),t&&o.jsxs("div",{className:"px-3 pb-2 pl-9 space-y-1.5",children:[e.details&&Object.keys(e.details).length>0&&o.jsx("div",{className:"bg-bg-surface-2/60 rounded-md px-2.5 py-1.5 space-y-0.5",children:Object.entries(e.details).map(([e,t])=>o.jsxs("div",{className:"flex items-center justify-between gap-4 text-[10px]",children:[o.jsx("span",{className:"text-text-muted",children:e.replace(/_/g," ")}),o.jsx("span",{className:"text-text-primary font-mono",children:"string"==typeof t?t:JSON.stringify(t)})]},e))}),e.payload&&o.jsxs("div",{children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsxs("button",{onClick:e=>{e.stopPropagation(),a(!r)},className:"flex items-center gap-1.5 text-[10px] font-medium text-accent/70 hover:text-accent transition-colors",children:[o.jsx(Ol,{className:"w-3 h-3"}),r?"Hide":"View"," exact data sent"]}),r&&o.jsxs(o.Fragment,{children:[o.jsxs("button",{onClick:t=>{t.stopPropagation(),navigator.clipboard.writeText(JSON.stringify(e.payload.body,null,2)),i(!0),setTimeout(()=>i(!1),2e3)},className:"flex items-center gap-1 text-[10px] font-medium text-text-muted hover:text-text-primary transition-colors",title:"Copy to clipboard",children:[s?o.jsx(jl,{className:"w-3 h-3 text-emerald-400"}):o.jsx(zl,{className:"w-3 h-3"}),s?"Copied":"Copy"]}),o.jsxs("button",{onClick:t=>{t.stopPropagation();const n=new Blob([JSON.stringify(e.payload.body,null,2)],{type:"application/json"}),r=URL.createObjectURL(n),a=document.createElement("a");a.href=r,a.download=\`log-\${e.event}-\${new Date(e.timestamp).toISOString().slice(0,19).replace(/:/g,"-")}.json\`,a.click(),URL.revokeObjectURL(r)},className:"flex items-center gap-1 text-[10px] font-medium text-text-muted hover:text-text-primary transition-colors",title:"Download as JSON",children:[o.jsx(Fl,{className:"w-3 h-3"}),"Download"]})]})]}),r&&o.jsx("pre",{className:"mt-1 bg-bg-base border border-border/40 rounded-md px-2.5 py-2 text-[10px] font-mono text-text-secondary overflow-x-auto max-h-80 overflow-y-auto whitespace-pre-wrap break-all leading-relaxed",children:JSON.stringify(e.payload.body,null,2)})]})]})]})}function Od(){const[e,t]=h.useState([]),[n,r]=h.useState(!0),[a,s]=h.useState(null),[i,l]=h.useState("all"),c=()=>{r(!0),_("/api/local/logs").then(e=>{t(e),s(null)}).catch(e=>s(e.message)).finally(()=>r(!1))};h.useEffect(()=>{c()},[]);const u=[..."all"===i?e:e.filter(e=>e.event===i)].reverse();return a?o.jsx("div",{className:"max-w-xl mx-auto mt-12 text-center",children:o.jsxs("div",{className:"text-sm text-danger",children:["Failed to load logs: ",a]})}):o.jsxs("div",{className:"max-w-xl mx-auto pt-2 pb-12 space-y-4",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:["all","sync","auto_sync","login","logout","cloud_pull"].map(e=>o.jsx("button",{onClick:()=>l(e),className:"px-2 py-0.5 rounded-md text-[11px] font-medium transition-colors "+(i===e?"bg-bg-surface-2 text-text-primary":"text-text-muted hover:text-text-primary"),children:"all"===e?"All":_d[e]},e))}),o.jsx("button",{onClick:c,disabled:n,className:"p-1.5 rounded-md text-text-muted hover:text-text-primary hover:bg-bg-surface-2 transition-colors disabled:opacity-50",title:"Refresh",children:o.jsx(ac,{className:"w-3.5 h-3.5 "+(n?"animate-spin":"")})})]}),o.jsx("section",{className:"bg-bg-surface-1 border border-border/50 rounded-xl overflow-hidden",children:n&&0===e.length?o.jsx("div",{className:"py-12 text-center text-sm text-text-muted",children:"Loading logs..."}):0===u.length?o.jsxs("div",{className:"py-12 text-center",children:[o.jsx("div",{className:"text-sm text-text-muted",children:"No log entries yet"}),o.jsx("div",{className:"text-[11px] text-text-muted/60 mt-1",children:"Sync, login, or pull from cloud to see activity here"})]}):o.jsx("div",{className:"divide-y divide-border/30",children:u.map(e=>o.jsx(Id,{entry:e},e.id))})})]})}function $d(){const{sessions:e,milestones:t,config:n,health:r,updateInfo:a,loading:s,loadAll:i,loadHealth:l,loadUpdateCheck:c,deleteSession:u,deleteConversation:d,deleteMilestone:f,activeTab:p,setActiveTab:m}=kd();h.useEffect(()=>{i(),l(),c()},[i,l,c]),h.useEffect(()=>{const e=setInterval(l,3e4),t=setInterval(i,3e4);return()=>{clearInterval(e),clearInterval(t)}},[i,l]);const[g,x]=h.useState(!1);return h.useEffect(()=>{const e=e=>{(e.metaKey||e.ctrlKey)&&"k"===e.key&&(e.preventDefault(),x(e=>!e))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[]),s?o.jsx("div",{className:"min-h-screen flex items-center justify-center",children:o.jsx("div",{className:"text-text-muted text-sm",children:"Loading..."})}):o.jsxs("div",{className:"min-h-screen bg-bg-base selection:bg-accent/30 selection:text-text-primary",children:[o.jsx(Pd,{health:r,updateInfo:a,onSearchOpen:()=>x(!0),activeTab:p,onTabChange:m,config:n,onRefresh:i}),o.jsx("div",{className:"max-w-[1240px] mx-auto px-4 sm:px-6 pb-6",children:"settings"===p?o.jsx(Ad,{onTabChange:m}):"logs"===p?o.jsx(Od,{}):o.jsxs(o.Fragment,{children:[o.jsx(bd,{open:g,onClose:()=>x(!1),sessions:e,milestones:t,onDeleteSession:u,onDeleteConversation:d,onDeleteMilestone:f}),o.jsx(xd,{sessions:e,milestones:t,onDeleteSession:u,onDeleteConversation:d,onDeleteMilestone:f,activeTab:p,onActiveTabChange:m})]})})]})}P.createRoot(document.getElementById("root")).render(o.jsx(h.StrictMode,{children:o.jsx($d,{})}));</script>
|
|
34412
|
+
<style rel="stylesheet" crossorigin>/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial}}}@layer theme{:root,:host{--font-sans:"Inter",system-ui,-apple-system,sans-serif;--font-mono:"Geist Mono","JetBrains Mono","SF Mono","Fira Code",ui-monospace,monospace;--color-red-400:oklch(70.4% .191 22.216);--color-orange-500:oklch(70.5% .213 47.604);--color-amber-400:oklch(82.8% .189 84.429);--color-amber-500:oklch(76.9% .188 70.08);--color-emerald-400:oklch(76.5% .177 163.223);--color-emerald-500:oklch(69.6% .17 162.48);--color-blue-400:oklch(70.7% .165 254.624);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-md:28rem;--container-xl:36rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:calc(1/.75);--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75/1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75/1.25);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--font-weight-black:900;--tracking-tighter:-.05em;--tracking-tight:-.025em;--tracking-wide:.025em;--tracking-wider:.05em;--tracking-widest:.1em;--leading-tight:1.25;--leading-snug:1.375;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--radius-2xl:1rem;--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--blur-sm:8px;--blur-md:12px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-bg-base:var(--bg-base);--color-bg-surface-1:var(--bg-surface-1);--color-bg-surface-2:var(--bg-surface-2);--color-bg-surface-3:var(--bg-surface-3);--color-text-primary:var(--text-primary);--color-text-secondary:var(--text-secondary);--color-text-muted:var(--text-muted);--color-accent:var(--accent);--color-accent-bright:var(--accent-bright);--color-success:var(--success);--color-error:var(--error);--color-history:var(--history);--color-border:var(--border);--color-purple:#8b5cf6;--color-blue:#3b82f6;--color-emerald:#34d399}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}*{border-color:var(--color-border)}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.inset-0{inset:calc(var(--spacing)*0)}.-top-10{top:calc(var(--spacing)*-10)}.top-0{top:calc(var(--spacing)*0)}.top-1\\/2{top:50%}.top-2{top:calc(var(--spacing)*2)}.top-5{top:calc(var(--spacing)*5)}.top-full{top:100%}.-right-0\\.5{right:calc(var(--spacing)*-.5)}.right-0{right:calc(var(--spacing)*0)}.right-1\\.5{right:calc(var(--spacing)*1.5)}.-bottom-0\\.5{bottom:calc(var(--spacing)*-.5)}.-bottom-1{bottom:calc(var(--spacing)*-1)}.-bottom-1\\.5{bottom:calc(var(--spacing)*-1.5)}.bottom-0{bottom:calc(var(--spacing)*0)}.bottom-2{bottom:calc(var(--spacing)*2)}.bottom-4{bottom:calc(var(--spacing)*4)}.-left-7{left:calc(var(--spacing)*-7)}.left-1\\/2{left:50%}.left-2{left:calc(var(--spacing)*2)}.left-\\[1\\.75rem\\]{left:1.75rem}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\\[60\\]{z-index:60}.z-\\[61\\]{z-index:61}.z-\\[9999\\]{z-index:9999}.col-span-2{grid-column:span 2/span 2}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.mx-1{margin-inline:calc(var(--spacing)*1)}.mx-auto{margin-inline:auto}.my-0\\.5{margin-block:calc(var(--spacing)*.5)}.my-1{margin-block:calc(var(--spacing)*1)}.ms-1{margin-inline-start:calc(var(--spacing)*1)}.ms-2{margin-inline-start:calc(var(--spacing)*2)}.ms-3{margin-inline-start:calc(var(--spacing)*3)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-1\\.5{margin-top:calc(var(--spacing)*1.5)}.mt-2{margin-top:calc(var(--spacing)*2)}.mt-4{margin-top:calc(var(--spacing)*4)}.mt-12{margin-top:calc(var(--spacing)*12)}.mb-0\\.5{margin-bottom:calc(var(--spacing)*.5)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-1\\.5{margin-bottom:calc(var(--spacing)*1.5)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-3{margin-bottom:calc(var(--spacing)*3)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.mb-8{margin-bottom:calc(var(--spacing)*8)}.-ml-2{margin-left:calc(var(--spacing)*-2)}.ml-0\\.5{margin-left:calc(var(--spacing)*.5)}.ml-1\\.5{margin-left:calc(var(--spacing)*1.5)}.ml-auto{margin-left:auto}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.h-1\\.5{height:calc(var(--spacing)*1.5)}.h-2{height:calc(var(--spacing)*2)}.h-2\\.5{height:calc(var(--spacing)*2.5)}.h-3{height:calc(var(--spacing)*3)}.h-3\\.5{height:calc(var(--spacing)*3.5)}.h-4{height:calc(var(--spacing)*4)}.h-5{height:calc(var(--spacing)*5)}.h-6{height:calc(var(--spacing)*6)}.h-7{height:calc(var(--spacing)*7)}.h-8{height:calc(var(--spacing)*8)}.h-9{height:calc(var(--spacing)*9)}.h-16{height:calc(var(--spacing)*16)}.h-full{height:100%}.h-px{height:1px}.max-h-80{max-height:calc(var(--spacing)*80)}.max-h-\\[75vh\\]{max-height:75vh}.min-h-screen{min-height:100vh}.w-0{width:calc(var(--spacing)*0)}.w-1\\.5{width:calc(var(--spacing)*1.5)}.w-2{width:calc(var(--spacing)*2)}.w-2\\.5{width:calc(var(--spacing)*2.5)}.w-3{width:calc(var(--spacing)*3)}.w-3\\.5{width:calc(var(--spacing)*3.5)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-6{width:calc(var(--spacing)*6)}.w-7{width:calc(var(--spacing)*7)}.w-8{width:calc(var(--spacing)*8)}.w-9{width:calc(var(--spacing)*9)}.w-10{width:calc(var(--spacing)*10)}.w-12{width:calc(var(--spacing)*12)}.w-16{width:calc(var(--spacing)*16)}.w-24{width:calc(var(--spacing)*24)}.w-28{width:calc(var(--spacing)*28)}.w-72{width:calc(var(--spacing)*72)}.w-80{width:calc(var(--spacing)*80)}.w-\\[2px\\]{width:2px}.w-\\[155px\\]{width:155px}.w-full{width:100%}.w-px{width:1px}.max-w-2xl{max-width:var(--container-2xl)}.max-w-\\[130px\\]{max-width:130px}.max-w-\\[140px\\]{max-width:140px}.max-w-\\[280px\\]{max-width:280px}.max-w-\\[1240px\\]{max-width:1240px}.max-w-md{max-width:var(--container-md)}.max-w-xl{max-width:var(--container-xl)}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\\[100px\\]{min-width:100px}.min-w-\\[120px\\]{min-width:120px}.min-w-\\[180px\\]{min-width:180px}.flex-1{flex:1}.flex-shrink-0,.shrink-0{flex-shrink:0}.grow{flex-grow:1}.origin-bottom{transform-origin:bottom}.-translate-x-1\\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-0{--tw-translate-x:calc(var(--spacing)*0);translate:var(--tw-translate-x)var(--tw-translate-y)}.translate-x-4{--tw-translate-x:calc(var(--spacing)*4);translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y)}.scale-105{--tw-scale-x:105%;--tw-scale-y:105%;--tw-scale-z:105%;scale:var(--tw-scale-x)var(--tw-scale-y)}.rotate-45{rotate:45deg}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-default{cursor:default}.cursor-grab{cursor:grab}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.touch-none{touch-action:none}.appearance-none{appearance:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-\\[86px_minmax\\(0\\,1fr\\)\\]{grid-template-columns:86px minmax(0,1fr)}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-2\\.5{gap:calc(var(--spacing)*2.5)}.gap-3{gap:calc(var(--spacing)*3)}.gap-3\\.5{gap:calc(var(--spacing)*3.5)}.gap-4{gap:calc(var(--spacing)*4)}.gap-6{gap:calc(var(--spacing)*6)}.gap-\\[3px\\]{gap:3px}:where(.space-y-0\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*1.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*1.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2\\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*2.5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*2.5)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*3)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*3)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*4)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*4)*calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing)*5)*var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing)*5)*calc(1 - var(--tw-space-y-reverse)))}.gap-x-2{column-gap:calc(var(--spacing)*2)}.gap-x-5{column-gap:calc(var(--spacing)*5)}.gap-y-1{row-gap:calc(var(--spacing)*1)}.gap-y-2{row-gap:calc(var(--spacing)*2)}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px*var(--tw-divide-y-reverse));border-bottom-width:calc(1px*calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-border\\/30>:not(:last-child)){border-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){:where(.divide-border\\/30>:not(:last-child)){border-color:color-mix(in oklab,var(--color-border)30%,transparent)}}.self-center{align-self:center}.self-stretch{align-self:stretch}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.overscroll-none{overscroll-behavior:none}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-t-md{border-top-left-radius:var(--radius-md);border-top-right-radius:var(--radius-md)}.rounded-t-sm{border-top-left-radius:var(--radius-sm);border-top-right-radius:var(--radius-sm)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-accent,.border-accent\\/20{border-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.border-accent\\/20{border-color:color-mix(in oklab,var(--color-accent)20%,transparent)}}.border-accent\\/25{border-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.border-accent\\/25{border-color:color-mix(in oklab,var(--color-accent)25%,transparent)}}.border-accent\\/30{border-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.border-accent\\/30{border-color:color-mix(in oklab,var(--color-accent)30%,transparent)}}.border-accent\\/35{border-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.border-accent\\/35{border-color:color-mix(in oklab,var(--color-accent)35%,transparent)}}.border-accent\\/50{border-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.border-accent\\/50{border-color:color-mix(in oklab,var(--color-accent)50%,transparent)}}.border-amber-400\\/15{border-color:#fcbb0026}@supports (color:color-mix(in lab,red,red)){.border-amber-400\\/15{border-color:color-mix(in oklab,var(--color-amber-400)15%,transparent)}}.border-bg-base{border-color:var(--color-bg-base)}.border-bg-surface-1{border-color:var(--color-bg-surface-1)}.border-blue-400\\/15{border-color:#54a2ff26}@supports (color:color-mix(in lab,red,red)){.border-blue-400\\/15{border-color:color-mix(in oklab,var(--color-blue-400)15%,transparent)}}.border-blue\\/20{border-color:#3b82f633}@supports (color:color-mix(in lab,red,red)){.border-blue\\/20{border-color:color-mix(in oklab,var(--color-blue)20%,transparent)}}.border-blue\\/30{border-color:#3b82f64d}@supports (color:color-mix(in lab,red,red)){.border-blue\\/30{border-color:color-mix(in oklab,var(--color-blue)30%,transparent)}}.border-border,.border-border\\/10{border-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.border-border\\/10{border-color:color-mix(in oklab,var(--color-border)10%,transparent)}}.border-border\\/15{border-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.border-border\\/15{border-color:color-mix(in oklab,var(--color-border)15%,transparent)}}.border-border\\/20{border-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.border-border\\/20{border-color:color-mix(in oklab,var(--color-border)20%,transparent)}}.border-border\\/30{border-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.border-border\\/30{border-color:color-mix(in oklab,var(--color-border)30%,transparent)}}.border-border\\/40{border-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.border-border\\/40{border-color:color-mix(in oklab,var(--color-border)40%,transparent)}}.border-border\\/50{border-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.border-border\\/50{border-color:color-mix(in oklab,var(--color-border)50%,transparent)}}.border-border\\/60{border-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.border-border\\/60{border-color:color-mix(in oklab,var(--color-border)60%,transparent)}}.border-emerald-500\\/15{border-color:#00bb7f26}@supports (color:color-mix(in lab,red,red)){.border-emerald-500\\/15{border-color:color-mix(in oklab,var(--color-emerald-500)15%,transparent)}}.border-emerald\\/20{border-color:#34d39933}@supports (color:color-mix(in lab,red,red)){.border-emerald\\/20{border-color:color-mix(in oklab,var(--color-emerald)20%,transparent)}}.border-emerald\\/30{border-color:#34d3994d}@supports (color:color-mix(in lab,red,red)){.border-emerald\\/30{border-color:color-mix(in oklab,var(--color-emerald)30%,transparent)}}.border-error\\/20{border-color:var(--color-error)}@supports (color:color-mix(in lab,red,red)){.border-error\\/20{border-color:color-mix(in oklab,var(--color-error)20%,transparent)}}.border-error\\/30{border-color:var(--color-error)}@supports (color:color-mix(in lab,red,red)){.border-error\\/30{border-color:color-mix(in oklab,var(--color-error)30%,transparent)}}.border-history,.border-history\\/20{border-color:var(--color-history)}@supports (color:color-mix(in lab,red,red)){.border-history\\/20{border-color:color-mix(in oklab,var(--color-history)20%,transparent)}}.border-purple\\/20{border-color:#8b5cf633}@supports (color:color-mix(in lab,red,red)){.border-purple\\/20{border-color:color-mix(in oklab,var(--color-purple)20%,transparent)}}.border-purple\\/30{border-color:#8b5cf64d}@supports (color:color-mix(in lab,red,red)){.border-purple\\/30{border-color:color-mix(in oklab,var(--color-purple)30%,transparent)}}.border-success\\/20{border-color:var(--color-success)}@supports (color:color-mix(in lab,red,red)){.border-success\\/20{border-color:color-mix(in oklab,var(--color-success)20%,transparent)}}.border-success\\/30{border-color:var(--color-success)}@supports (color:color-mix(in lab,red,red)){.border-success\\/30{border-color:color-mix(in oklab,var(--color-success)30%,transparent)}}.border-text-muted\\/20{border-color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.border-text-muted\\/20{border-color:color-mix(in oklab,var(--color-text-muted)20%,transparent)}}.border-transparent{border-color:#0000}.bg-\\[var\\(--accent-alpha\\)\\]{background-color:var(--accent-alpha)}.bg-accent,.bg-accent\\/5{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.bg-accent\\/5{background-color:color-mix(in oklab,var(--color-accent)5%,transparent)}}.bg-accent\\/8{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.bg-accent\\/8{background-color:color-mix(in oklab,var(--color-accent)8%,transparent)}}.bg-accent\\/10{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.bg-accent\\/10{background-color:color-mix(in oklab,var(--color-accent)10%,transparent)}}.bg-accent\\/15{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.bg-accent\\/15{background-color:color-mix(in oklab,var(--color-accent)15%,transparent)}}.bg-accent\\/30{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.bg-accent\\/30{background-color:color-mix(in oklab,var(--color-accent)30%,transparent)}}.bg-accent\\/50{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.bg-accent\\/50{background-color:color-mix(in oklab,var(--color-accent)50%,transparent)}}.bg-accent\\/60{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.bg-accent\\/60{background-color:color-mix(in oklab,var(--color-accent)60%,transparent)}}.bg-amber-400\\/\\[0\\.03\\]{background-color:#fcbb0008}@supports (color:color-mix(in lab,red,red)){.bg-amber-400\\/\\[0\\.03\\]{background-color:color-mix(in oklab,var(--color-amber-400)3%,transparent)}}.bg-bg-base,.bg-bg-base\\/30{background-color:var(--color-bg-base)}@supports (color:color-mix(in lab,red,red)){.bg-bg-base\\/30{background-color:color-mix(in oklab,var(--color-bg-base)30%,transparent)}}.bg-bg-base\\/80{background-color:var(--color-bg-base)}@supports (color:color-mix(in lab,red,red)){.bg-bg-base\\/80{background-color:color-mix(in oklab,var(--color-bg-base)80%,transparent)}}.bg-bg-surface-1,.bg-bg-surface-1\\/30{background-color:var(--color-bg-surface-1)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-1\\/30{background-color:color-mix(in oklab,var(--color-bg-surface-1)30%,transparent)}}.bg-bg-surface-1\\/35{background-color:var(--color-bg-surface-1)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-1\\/35{background-color:color-mix(in oklab,var(--color-bg-surface-1)35%,transparent)}}.bg-bg-surface-1\\/50{background-color:var(--color-bg-surface-1)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-1\\/50{background-color:color-mix(in oklab,var(--color-bg-surface-1)50%,transparent)}}.bg-bg-surface-1\\/80{background-color:var(--color-bg-surface-1)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-1\\/80{background-color:color-mix(in oklab,var(--color-bg-surface-1)80%,transparent)}}.bg-bg-surface-2,.bg-bg-surface-2\\/20{background-color:var(--color-bg-surface-2)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-2\\/20{background-color:color-mix(in oklab,var(--color-bg-surface-2)20%,transparent)}}.bg-bg-surface-2\\/30{background-color:var(--color-bg-surface-2)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-2\\/30{background-color:color-mix(in oklab,var(--color-bg-surface-2)30%,transparent)}}.bg-bg-surface-2\\/50{background-color:var(--color-bg-surface-2)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-2\\/50{background-color:color-mix(in oklab,var(--color-bg-surface-2)50%,transparent)}}.bg-bg-surface-2\\/60{background-color:var(--color-bg-surface-2)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-2\\/60{background-color:color-mix(in oklab,var(--color-bg-surface-2)60%,transparent)}}.bg-bg-surface-3,.bg-bg-surface-3\\/95{background-color:var(--color-bg-surface-3)}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface-3\\/95{background-color:color-mix(in oklab,var(--color-bg-surface-3)95%,transparent)}}.bg-black{background-color:var(--color-black)}.bg-black\\/40{background-color:#0006}@supports (color:color-mix(in lab,red,red)){.bg-black\\/40{background-color:color-mix(in oklab,var(--color-black)40%,transparent)}}.bg-blue-400{background-color:var(--color-blue-400)}.bg-blue-400\\/\\[0\\.03\\]{background-color:#54a2ff08}@supports (color:color-mix(in lab,red,red)){.bg-blue-400\\/\\[0\\.03\\]{background-color:color-mix(in oklab,var(--color-blue-400)3%,transparent)}}.bg-blue\\/10{background-color:#3b82f61a}@supports (color:color-mix(in lab,red,red)){.bg-blue\\/10{background-color:color-mix(in oklab,var(--color-blue)10%,transparent)}}.bg-blue\\/15{background-color:#3b82f626}@supports (color:color-mix(in lab,red,red)){.bg-blue\\/15{background-color:color-mix(in oklab,var(--color-blue)15%,transparent)}}.bg-border\\/20{background-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.bg-border\\/20{background-color:color-mix(in oklab,var(--color-border)20%,transparent)}}.bg-border\\/30{background-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.bg-border\\/30{background-color:color-mix(in oklab,var(--color-border)30%,transparent)}}.bg-border\\/50{background-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.bg-border\\/50{background-color:color-mix(in oklab,var(--color-border)50%,transparent)}}.bg-border\\/60{background-color:var(--color-border)}@supports (color:color-mix(in lab,red,red)){.bg-border\\/60{background-color:color-mix(in oklab,var(--color-border)60%,transparent)}}.bg-emerald-400{background-color:var(--color-emerald-400)}.bg-emerald-500\\/10{background-color:#00bb7f1a}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\\/10{background-color:color-mix(in oklab,var(--color-emerald-500)10%,transparent)}}.bg-emerald-500\\/\\[0\\.03\\]{background-color:#00bb7f08}@supports (color:color-mix(in lab,red,red)){.bg-emerald-500\\/\\[0\\.03\\]{background-color:color-mix(in oklab,var(--color-emerald-500)3%,transparent)}}.bg-emerald\\/10{background-color:#34d3991a}@supports (color:color-mix(in lab,red,red)){.bg-emerald\\/10{background-color:color-mix(in oklab,var(--color-emerald)10%,transparent)}}.bg-emerald\\/15{background-color:#34d39926}@supports (color:color-mix(in lab,red,red)){.bg-emerald\\/15{background-color:color-mix(in oklab,var(--color-emerald)15%,transparent)}}.bg-error\\/10{background-color:var(--color-error)}@supports (color:color-mix(in lab,red,red)){.bg-error\\/10{background-color:color-mix(in oklab,var(--color-error)10%,transparent)}}.bg-error\\/15{background-color:var(--color-error)}@supports (color:color-mix(in lab,red,red)){.bg-error\\/15{background-color:color-mix(in oklab,var(--color-error)15%,transparent)}}.bg-history,.bg-history\\/10{background-color:var(--color-history)}@supports (color:color-mix(in lab,red,red)){.bg-history\\/10{background-color:color-mix(in oklab,var(--color-history)10%,transparent)}}.bg-purple\\/10{background-color:#8b5cf61a}@supports (color:color-mix(in lab,red,red)){.bg-purple\\/10{background-color:color-mix(in oklab,var(--color-purple)10%,transparent)}}.bg-purple\\/15{background-color:#8b5cf626}@supports (color:color-mix(in lab,red,red)){.bg-purple\\/15{background-color:color-mix(in oklab,var(--color-purple)15%,transparent)}}.bg-red-400{background-color:var(--color-red-400)}.bg-success,.bg-success\\/10{background-color:var(--color-success)}@supports (color:color-mix(in lab,red,red)){.bg-success\\/10{background-color:color-mix(in oklab,var(--color-success)10%,transparent)}}.bg-success\\/15{background-color:var(--color-success)}@supports (color:color-mix(in lab,red,red)){.bg-success\\/15{background-color:color-mix(in oklab,var(--color-success)15%,transparent)}}.bg-text-muted,.bg-text-muted\\/10{background-color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.bg-text-muted\\/10{background-color:color-mix(in oklab,var(--color-text-muted)10%,transparent)}}.bg-text-muted\\/15{background-color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.bg-text-muted\\/15{background-color:color-mix(in oklab,var(--color-text-muted)15%,transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-gradient-to-t{--tw-gradient-position:to top in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.from-transparent{--tw-gradient-from:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.to-white\\/10{--tw-gradient-to:#ffffff1a}@supports (color:color-mix(in lab,red,red)){.to-white\\/10{--tw-gradient-to:color-mix(in oklab,var(--color-white)10%,transparent)}}.to-white\\/10{--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position))}.p-0\\.5{padding:calc(var(--spacing)*.5)}.p-1{padding:calc(var(--spacing)*1)}.p-1\\.5{padding:calc(var(--spacing)*1.5)}.p-2{padding:calc(var(--spacing)*2)}.p-3{padding:calc(var(--spacing)*3)}.p-4{padding:calc(var(--spacing)*4)}.p-5{padding:calc(var(--spacing)*5)}.px-0\\.5{padding-inline:calc(var(--spacing)*.5)}.px-1{padding-inline:calc(var(--spacing)*1)}.px-1\\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-2\\.5{padding-inline:calc(var(--spacing)*2.5)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-3\\.5{padding-inline:calc(var(--spacing)*3.5)}.px-4{padding-inline:calc(var(--spacing)*4)}.px-5{padding-inline:calc(var(--spacing)*5)}.px-6{padding-inline:calc(var(--spacing)*6)}.px-px{padding-inline:1px}.py-0\\.5{padding-block:calc(var(--spacing)*.5)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-2\\.5{padding-block:calc(var(--spacing)*2.5)}.py-3{padding-block:calc(var(--spacing)*3)}.py-4{padding-block:calc(var(--spacing)*4)}.py-6{padding-block:calc(var(--spacing)*6)}.py-8{padding-block:calc(var(--spacing)*8)}.py-12{padding-block:calc(var(--spacing)*12)}.py-16{padding-block:calc(var(--spacing)*16)}.pt-0\\.5{padding-top:calc(var(--spacing)*.5)}.pt-1\\.5{padding-top:calc(var(--spacing)*1.5)}.pt-2{padding-top:calc(var(--spacing)*2)}.pt-3{padding-top:calc(var(--spacing)*3)}.pt-\\[10vh\\]{padding-top:10vh}.pr-7{padding-right:calc(var(--spacing)*7)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.pb-2{padding-bottom:calc(var(--spacing)*2)}.pb-2\\.5{padding-bottom:calc(var(--spacing)*2.5)}.pb-3\\.5{padding-bottom:calc(var(--spacing)*3.5)}.pb-6{padding-bottom:calc(var(--spacing)*6)}.pb-12{padding-bottom:calc(var(--spacing)*12)}.pl-3{padding-left:calc(var(--spacing)*3)}.pl-9{padding-left:calc(var(--spacing)*9)}.pl-10{padding-left:calc(var(--spacing)*10)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-mono{font-family:var(--font-mono)}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\\[7px\\]{font-size:7px}.text-\\[8px\\]{font-size:8px}.text-\\[9px\\]{font-size:9px}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[15px\\]{font-size:15px}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-black{--tw-font-weight:var(--font-weight-black);font-weight:var(--font-weight-black)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-tight{--tw-tracking:var(--tracking-tight);letter-spacing:var(--tracking-tight)}.tracking-tighter{--tw-tracking:var(--tracking-tighter);letter-spacing:var(--tracking-tighter)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.tracking-widest{--tw-tracking:var(--tracking-widest);letter-spacing:var(--tracking-widest)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.text-accent,.text-accent\\/60{color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.text-accent\\/60{color:color-mix(in oklab,var(--color-accent)60%,transparent)}}.text-accent\\/70{color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.text-accent\\/70{color:color-mix(in oklab,var(--color-accent)70%,transparent)}}.text-accent\\/90{color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.text-accent\\/90{color:color-mix(in oklab,var(--color-accent)90%,transparent)}}.text-amber-400{color:var(--color-amber-400)}.text-amber-500{color:var(--color-amber-500)}.text-bg-base{color:var(--color-bg-base)}.text-blue{color:var(--color-blue)}.text-blue-400{color:var(--color-blue-400)}.text-emerald{color:var(--color-emerald)}.text-emerald-400{color:var(--color-emerald-400)}.text-emerald-400\\/50{color:#00d29480}@supports (color:color-mix(in lab,red,red)){.text-emerald-400\\/50{color:color-mix(in oklab,var(--color-emerald-400)50%,transparent)}}.text-emerald-500{color:var(--color-emerald-500)}.text-error,.text-error\\/80{color:var(--color-error)}@supports (color:color-mix(in lab,red,red)){.text-error\\/80{color:color-mix(in oklab,var(--color-error)80%,transparent)}}.text-history{color:var(--color-history)}.text-inherit{color:inherit}.text-orange-500{color:var(--color-orange-500)}.text-purple{color:var(--color-purple)}.text-red-400{color:var(--color-red-400)}.text-success,.text-success\\/70{color:var(--color-success)}@supports (color:color-mix(in lab,red,red)){.text-success\\/70{color:color-mix(in oklab,var(--color-success)70%,transparent)}}.text-text-muted,.text-text-muted\\/30{color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.text-text-muted\\/30{color:color-mix(in oklab,var(--color-text-muted)30%,transparent)}}.text-text-muted\\/40{color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.text-text-muted\\/40{color:color-mix(in oklab,var(--color-text-muted)40%,transparent)}}.text-text-muted\\/50{color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.text-text-muted\\/50{color:color-mix(in oklab,var(--color-text-muted)50%,transparent)}}.text-text-muted\\/60{color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.text-text-muted\\/60{color:color-mix(in oklab,var(--color-text-muted)60%,transparent)}}.text-text-muted\\/70{color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.text-text-muted\\/70{color:color-mix(in oklab,var(--color-text-muted)70%,transparent)}}.text-text-primary{color:var(--color-text-primary)}.text-text-secondary,.text-text-secondary\\/80{color:var(--color-text-secondary)}@supports (color:color-mix(in lab,red,red)){.text-text-secondary\\/80{color:color-mix(in oklab,var(--color-text-secondary)80%,transparent)}}.text-text-secondary\\/85{color:var(--color-text-secondary)}@supports (color:color-mix(in lab,red,red)){.text-text-secondary\\/85{color:color-mix(in oklab,var(--color-text-secondary)85%,transparent)}}.text-white{color:var(--color-white)}.capitalize{text-transform:capitalize}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-accent{--tw-ring-color:var(--color-accent)}.ring-offset-2{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color)}.ring-offset-bg-base{--tw-ring-offset-color:var(--color-bg-base)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.backdrop-blur-md{--tw-backdrop-blur:blur(var(--blur-md));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.duration-500{--tw-duration:.5s;transition-duration:.5s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.\\[daemon\\:err\\]{daemon:err}@media(hover:hover){.group-hover\\:scale-x-110:is(:where(.group):hover *){--tw-scale-x:110%;scale:var(--tw-scale-x)var(--tw-scale-y)}.group-hover\\:-rotate-90:is(:where(.group):hover *){rotate:-90deg}.group-hover\\:bg-accent:is(:where(.group):hover *),.group-hover\\:bg-accent\\/10:is(:where(.group):hover *){background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.group-hover\\:bg-accent\\/10:is(:where(.group):hover *){background-color:color-mix(in oklab,var(--color-accent)10%,transparent)}}.group-hover\\:text-accent:is(:where(.group):hover *){color:var(--color-accent)}.group-hover\\:text-text-primary:is(:where(.group):hover *){color:var(--color-text-primary)}.group-hover\\:opacity-100:is(:where(.group):hover *),.group-hover\\/card\\:opacity-100:is(:where(.group\\/card):hover *),.group-hover\\/conv\\:opacity-100:is(:where(.group\\/conv):hover *){opacity:1}}.selection\\:bg-accent\\/30 ::selection{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.selection\\:bg-accent\\/30 ::selection{background-color:color-mix(in oklab,var(--color-accent)30%,transparent)}}.selection\\:bg-accent\\/30::selection{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.selection\\:bg-accent\\/30::selection{background-color:color-mix(in oklab,var(--color-accent)30%,transparent)}}.selection\\:text-text-primary ::selection{color:var(--color-text-primary)}.selection\\:text-text-primary::selection{color:var(--color-text-primary)}.placeholder\\:text-text-muted\\/50::placeholder{color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.placeholder\\:text-text-muted\\/50::placeholder{color:color-mix(in oklab,var(--color-text-muted)50%,transparent)}}.focus-within\\:border-accent\\/50:focus-within{border-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.focus-within\\:border-accent\\/50:focus-within{border-color:color-mix(in oklab,var(--color-accent)50%,transparent)}}.focus-within\\:opacity-100:focus-within{opacity:1}.focus-within\\:ring-1:focus-within{--tw-ring-shadow:var(--tw-ring-inset,)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.focus-within\\:ring-accent\\/50:focus-within{--tw-ring-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.focus-within\\:ring-accent\\/50:focus-within{--tw-ring-color:color-mix(in oklab,var(--color-accent)50%,transparent)}}@media(hover:hover){.hover\\:scale-125:hover{--tw-scale-x:125%;--tw-scale-y:125%;--tw-scale-z:125%;scale:var(--tw-scale-x)var(--tw-scale-y)}.hover\\:border-accent\\/30:hover{border-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.hover\\:border-accent\\/30:hover{border-color:color-mix(in oklab,var(--color-accent)30%,transparent)}}.hover\\:border-accent\\/40:hover{border-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.hover\\:border-accent\\/40:hover{border-color:color-mix(in oklab,var(--color-accent)40%,transparent)}}.hover\\:border-border:hover{border-color:var(--color-border)}.hover\\:border-text-muted\\/50:hover{border-color:var(--color-text-muted)}@supports (color:color-mix(in lab,red,red)){.hover\\:border-text-muted\\/50:hover{border-color:color-mix(in oklab,var(--color-text-muted)50%,transparent)}}.hover\\:bg-accent-bright:hover{background-color:var(--color-accent-bright)}.hover\\:bg-accent\\/15:hover{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-accent\\/15:hover{background-color:color-mix(in oklab,var(--color-accent)15%,transparent)}}.hover\\:bg-accent\\/90:hover{background-color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-accent\\/90:hover{background-color:color-mix(in oklab,var(--color-accent)90%,transparent)}}.hover\\:bg-bg-surface-1:hover{background-color:var(--color-bg-surface-1)}.hover\\:bg-bg-surface-2:hover,.hover\\:bg-bg-surface-2\\/40:hover{background-color:var(--color-bg-surface-2)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-bg-surface-2\\/40:hover{background-color:color-mix(in oklab,var(--color-bg-surface-2)40%,transparent)}}.hover\\:bg-bg-surface-2\\/50:hover{background-color:var(--color-bg-surface-2)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-bg-surface-2\\/50:hover{background-color:color-mix(in oklab,var(--color-bg-surface-2)50%,transparent)}}.hover\\:bg-bg-surface-3:hover{background-color:var(--color-bg-surface-3)}.hover\\:bg-error\\/5:hover{background-color:var(--color-error)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-error\\/5:hover{background-color:color-mix(in oklab,var(--color-error)5%,transparent)}}.hover\\:bg-error\\/10:hover{background-color:var(--color-error)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-error\\/10:hover{background-color:color-mix(in oklab,var(--color-error)10%,transparent)}}.hover\\:bg-error\\/25:hover{background-color:var(--color-error)}@supports (color:color-mix(in lab,red,red)){.hover\\:bg-error\\/25:hover{background-color:color-mix(in oklab,var(--color-error)25%,transparent)}}.hover\\:bg-history:hover{background-color:var(--color-history)}.hover\\:text-accent:hover{color:var(--color-accent)}.hover\\:text-accent-bright:hover{color:var(--color-accent-bright)}.hover\\:text-accent\\/80:hover{color:var(--color-accent)}@supports (color:color-mix(in lab,red,red)){.hover\\:text-accent\\/80:hover{color:color-mix(in oklab,var(--color-accent)80%,transparent)}}.hover\\:text-error:hover,.hover\\:text-error\\/70:hover{color:var(--color-error)}@supports (color:color-mix(in lab,red,red)){.hover\\:text-error\\/70:hover{color:color-mix(in oklab,var(--color-error)70%,transparent)}}.hover\\:text-text-primary:hover{color:var(--color-text-primary)}.hover\\:text-white:hover{color:var(--color-white)}.hover\\:opacity-80:hover{opacity:.8}.hover\\:brightness-110:hover{--tw-brightness:brightness(110%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}}.active\\:cursor-grabbing:active{cursor:grabbing}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-20:disabled{opacity:.2}.disabled\\:opacity-30:disabled{opacity:.3}.disabled\\:opacity-50:disabled{opacity:.5}@media(min-width:40rem){.sm\\:inline{display:inline}.sm\\:inline-flex{display:inline-flex}.sm\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\\:flex-row{flex-direction:row}.sm\\:px-6{padding-inline:calc(var(--spacing)*6)}}@media(min-width:48rem){.md\\:block{display:block}.md\\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\\:flex-row{flex-direction:row}.md\\:items-center{align-items:center}}@media(min-width:64rem){.lg\\:grid-cols-5{grid-template-columns:repeat(5,minmax(0,1fr))}.lg\\:grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}}}:root{--text-primary:#fafafa;--text-secondary:#a1a1aa;--text-muted:#71717a;--accent:#b4f82c;--accent-bright:#d4fc6e;--accent-dim:#4d7c0f;--accent-rgb:180,248,44;--success:#b4f82c;--error:#ef4444;--streak:#f59e0b;--streak-bg:#f59e0b0f;--streak-border:#f59e0b33;--streak-muted:#f59e0b80;--history:#60a5fa;--history-rgb:96,165,250;--glass-border:#ffffff0d;--grid-color:#ffffff14;--glow-opacity:.15;--glow-blue:#3b82f626;--shadow-glow:rgba(var(--accent-rgb),.1);--accent-alpha:rgba(var(--accent-rgb),.05)}@media(prefers-color-scheme:light){:root{--text-primary:#09090b;--text-secondary:#52525b;--text-muted:#5f6068;--accent:#65a30d;--accent-bright:#84cc16;--accent-dim:#f7fee7;--accent-rgb:101,163,13;--success:#65a30d;--error:#dc2626;--streak:#b45309;--streak-bg:#b453090f;--streak-border:#b4530933;--streak-muted:#b4530980;--history:#2563eb;--history-rgb:37,99,235;--glass-border:#0000000d;--grid-color:#0000000a;--glow-opacity:.25;--glow-blue:#3b82f640;--shadow-glow:#00000014;--accent-alpha:rgba(var(--accent-rgb),.15)}}::selection{background-color:rgba(var(--accent-rgb),.3);color:var(--accent-bright)}.glass-card{background:var(--glass-bg);-webkit-backdrop-filter:blur(12px);border:1px solid var(--glass-border);box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -1px #0000000f}.glass-panel{background:var(--glass-bg);-webkit-backdrop-filter:blur(20px);border:1px solid var(--glass-border);will-change:transform,backdrop-filter;transform:translateZ(0);box-shadow:0 8px 32px #0000004d,inset 0 0 0 1px #ffffff0d}.hud-border{background:var(--bg-surface-1);position:relative}.hud-border:before{content:"";border:1px solid rgba(var(--accent-rgb),.2);pointer-events:none;border-radius:inherit;position:absolute;inset:0;-webkit-mask-image:linear-gradient(#000,#0000);mask-image:linear-gradient(#000,#0000)}.hud-border:after{content:"";border-top:2px solid var(--accent);border-left:2px solid var(--accent);border-top-left-radius:inherit;width:10px;height:10px;position:absolute;top:-1px;left:-1px}.gradient-text{background:linear-gradient(135deg,var(--text-primary),var(--text-secondary));-webkit-text-fill-color:transparent;-webkit-background-clip:text;background-clip:text}.gradient-text-accent{background:linear-gradient(135deg,var(--accent),var(--accent-bright));-webkit-text-fill-color:transparent;text-shadow:0 0 20px rgba(var(--accent-rgb),.4);-webkit-background-clip:text;background-clip:text}.subtle-glow{position:relative}.subtle-glow:after{content:"";background:linear-gradient(45deg,transparent,rgba(var(--accent-rgb),.1),transparent);border-radius:inherit;z-index:-1;pointer-events:none;position:absolute;inset:-1px}:root{--bg-base:#040405;--bg-surface-1:#0e0e11;--bg-surface-2:#18181b;--bg-surface-3:#27272a;--border:#ffffff14;--border-accent:rgba(var(--accent-rgb),.3);--glass-bg:#0e0e1199}@media(prefers-color-scheme:light){:root{--bg-base:#fafafa;--bg-surface-1:#fff;--bg-surface-2:#f4f4f5;--bg-surface-3:#e4e4e7;--border:#e4e4e7;--border-accent:rgba(var(--accent-rgb),.4);--glass-bg:#ffffffb3}}::-webkit-scrollbar{width:5px;height:5px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:var(--color-bg-surface-3);border-radius:10px}::-webkit-scrollbar-thumb:hover{background:var(--color-text-muted)}body{font-family:var(--font-sans);background:var(--color-bg-base);color:var(--color-text-primary);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;min-height:100vh;margin:0;line-height:1.6}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(360deg)}}@keyframes pulse{50%{opacity:.5}}</style>
|
|
34411
34413
|
</head>
|
|
34412
34414
|
<body>
|
|
34413
34415
|
<div id="root"></div>
|
|
@@ -34442,7 +34444,7 @@ var init_sync_log = __esm({
|
|
|
34442
34444
|
"src/dashboard/sync-log.ts"() {
|
|
34443
34445
|
"use strict";
|
|
34444
34446
|
init_dist();
|
|
34445
|
-
MAX_ENTRIES =
|
|
34447
|
+
MAX_ENTRIES = 500;
|
|
34446
34448
|
}
|
|
34447
34449
|
});
|
|
34448
34450
|
|
|
@@ -34552,6 +34554,7 @@ var init_reconcile = __esm({
|
|
|
34552
34554
|
});
|
|
34553
34555
|
|
|
34554
34556
|
// src/dashboard/local-api.ts
|
|
34557
|
+
import { createHash as createHash4 } from "crypto";
|
|
34555
34558
|
import { existsSync as existsSync10, unlinkSync as unlinkSync4 } from "fs";
|
|
34556
34559
|
import { join as join9 } from "path";
|
|
34557
34560
|
function json(res, status, data) {
|
|
@@ -34730,6 +34733,14 @@ async function handleLocalConfigUpdate(req, res) {
|
|
|
34730
34733
|
function setOnConfigUpdated(cb) {
|
|
34731
34734
|
_onConfigUpdated = cb;
|
|
34732
34735
|
}
|
|
34736
|
+
function hashSessionIds(sessions2) {
|
|
34737
|
+
const ids = sessions2.map((s) => s.session_id).sort();
|
|
34738
|
+
return createHash4("sha256").update(ids.join(",")).digest("hex");
|
|
34739
|
+
}
|
|
34740
|
+
function hashSyncConfig(config2) {
|
|
34741
|
+
const relevant = { include_details: config2.sync.include_details, include_stats: config2.sync.include_stats };
|
|
34742
|
+
return createHash4("sha256").update(JSON.stringify(relevant)).digest("hex");
|
|
34743
|
+
}
|
|
34733
34744
|
async function performSync(eventType = "sync") {
|
|
34734
34745
|
const raw = readJson(CONFIG_FILE, {});
|
|
34735
34746
|
const config2 = migrateConfig(raw);
|
|
@@ -34751,7 +34762,19 @@ async function performSync(eventType = "sync") {
|
|
|
34751
34762
|
if (arr) arr.push(s);
|
|
34752
34763
|
else byDate.set(date3, [s]);
|
|
34753
34764
|
}
|
|
34765
|
+
const syncState = readJson(SYNC_STATE_FILE, { dates: {}, config_hash: "" });
|
|
34766
|
+
const currentConfigHash = hashSyncConfig(config2);
|
|
34767
|
+
const configChanged = syncState.config_hash !== currentConfigHash;
|
|
34768
|
+
let datesSynced = 0;
|
|
34769
|
+
let datesSkipped = 0;
|
|
34770
|
+
let sessionsSynced = 0;
|
|
34754
34771
|
for (const [date3, daySessions] of byDate) {
|
|
34772
|
+
const dateHash = hashSessionIds(daySessions);
|
|
34773
|
+
const prev = syncState.dates[date3];
|
|
34774
|
+
if (!configChanged && prev && prev.hash === dateHash && prev.count === daySessions.length) {
|
|
34775
|
+
datesSkipped++;
|
|
34776
|
+
continue;
|
|
34777
|
+
}
|
|
34755
34778
|
let totalSeconds = 0;
|
|
34756
34779
|
const clients = {};
|
|
34757
34780
|
const taskTypes = {};
|
|
@@ -34777,6 +34800,13 @@ async function performSync(eventType = "sync") {
|
|
|
34777
34800
|
}),
|
|
34778
34801
|
sync_signature: ""
|
|
34779
34802
|
};
|
|
34803
|
+
addLogEntry({
|
|
34804
|
+
event: eventType,
|
|
34805
|
+
status: "info",
|
|
34806
|
+
message: `Sending ${daySessions.length} session${daySessions.length !== 1 ? "s" : ""} for ${date3}`,
|
|
34807
|
+
details: { date: date3, sessions_synced: daySessions.length },
|
|
34808
|
+
payload: { endpoint: `${USEAI_API}/api/sync`, method: "POST", body: payload }
|
|
34809
|
+
});
|
|
34780
34810
|
const sessionsRes = await fetch(`${USEAI_API}/api/sync`, {
|
|
34781
34811
|
method: "POST",
|
|
34782
34812
|
headers,
|
|
@@ -34786,8 +34816,13 @@ async function performSync(eventType = "sync") {
|
|
|
34786
34816
|
const errBody = await sessionsRes.text();
|
|
34787
34817
|
const error2 = `Sessions sync failed (${date3}): ${sessionsRes.status} ${errBody}`;
|
|
34788
34818
|
addLogEntry({ event: eventType, status: "error", message: error2, details: { error: error2 } });
|
|
34819
|
+
syncState.config_hash = currentConfigHash;
|
|
34820
|
+
writeJson(SYNC_STATE_FILE, syncState);
|
|
34789
34821
|
return { success: false, error: error2 };
|
|
34790
34822
|
}
|
|
34823
|
+
syncState.dates[date3] = { hash: dateHash, count: daySessions.length, synced_at: (/* @__PURE__ */ new Date()).toISOString() };
|
|
34824
|
+
datesSynced++;
|
|
34825
|
+
sessionsSynced += daySessions.length;
|
|
34791
34826
|
}
|
|
34792
34827
|
let milestonesPublished = 0;
|
|
34793
34828
|
if (config2.sync.include_details) {
|
|
@@ -34797,10 +34832,18 @@ async function performSync(eventType = "sync") {
|
|
|
34797
34832
|
if (unpublished.length > 0) {
|
|
34798
34833
|
for (let i = 0; i < unpublished.length; i += MILESTONE_CHUNK) {
|
|
34799
34834
|
const chunk = unpublished.slice(i, i + MILESTONE_CHUNK);
|
|
34835
|
+
const milestonePayload = { milestones: chunk };
|
|
34836
|
+
addLogEntry({
|
|
34837
|
+
event: eventType,
|
|
34838
|
+
status: "info",
|
|
34839
|
+
message: `Publishing ${chunk.length} milestone${chunk.length !== 1 ? "s" : ""} (batch ${Math.floor(i / MILESTONE_CHUNK) + 1})`,
|
|
34840
|
+
details: { milestones_published: chunk.length },
|
|
34841
|
+
payload: { endpoint: `${USEAI_API}/api/publish`, method: "POST", body: milestonePayload }
|
|
34842
|
+
});
|
|
34800
34843
|
const milestonesRes = await fetch(`${USEAI_API}/api/publish`, {
|
|
34801
34844
|
method: "POST",
|
|
34802
34845
|
headers,
|
|
34803
|
-
body: JSON.stringify(
|
|
34846
|
+
body: JSON.stringify(milestonePayload)
|
|
34804
34847
|
});
|
|
34805
34848
|
if (!milestonesRes.ok) {
|
|
34806
34849
|
const errBody = await milestonesRes.text();
|
|
@@ -34818,16 +34861,23 @@ async function performSync(eventType = "sync") {
|
|
|
34818
34861
|
writeJson(MILESTONES_FILE, updated);
|
|
34819
34862
|
}
|
|
34820
34863
|
}
|
|
34864
|
+
syncState.config_hash = currentConfigHash;
|
|
34865
|
+
writeJson(SYNC_STATE_FILE, syncState);
|
|
34821
34866
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
34822
34867
|
config2.last_sync_at = now;
|
|
34823
34868
|
writeJson(CONFIG_FILE, config2);
|
|
34869
|
+
const parts = [];
|
|
34870
|
+
if (datesSynced > 0) parts.push(`${sessionsSynced} session${sessionsSynced !== 1 ? "s" : ""} across ${datesSynced} date${datesSynced !== 1 ? "s" : ""}`);
|
|
34871
|
+
if (datesSkipped > 0) parts.push(`${datesSkipped} date${datesSkipped !== 1 ? "s" : ""} unchanged`);
|
|
34872
|
+
if (milestonesPublished > 0) parts.push(`${milestonesPublished} milestone${milestonesPublished !== 1 ? "s" : ""}`);
|
|
34824
34873
|
addLogEntry({
|
|
34825
34874
|
event: eventType,
|
|
34826
34875
|
status: "success",
|
|
34827
|
-
message:
|
|
34876
|
+
message: parts.length > 0 ? `Synced: ${parts.join(", ")}` : "Nothing to sync \u2014 all up to date",
|
|
34828
34877
|
details: {
|
|
34829
|
-
sessions_synced:
|
|
34830
|
-
dates_synced:
|
|
34878
|
+
sessions_synced: sessionsSynced,
|
|
34879
|
+
dates_synced: datesSynced,
|
|
34880
|
+
dates_skipped: datesSkipped,
|
|
34831
34881
|
milestones_published: milestonesPublished
|
|
34832
34882
|
}
|
|
34833
34883
|
});
|
|
@@ -35171,7 +35221,7 @@ __export(daemon_exports, {
|
|
|
35171
35221
|
startDaemon: () => startDaemon
|
|
35172
35222
|
});
|
|
35173
35223
|
import { createServer } from "http";
|
|
35174
|
-
import { createHash as
|
|
35224
|
+
import { createHash as createHash5, randomUUID as randomUUID4 } from "crypto";
|
|
35175
35225
|
import { existsSync as existsSync11, readdirSync as readdirSync2, readFileSync as readFileSync7, appendFileSync as appendFileSync2, renameSync as renameSync3, writeFileSync as writeFileSync6, unlinkSync as unlinkSync5, statSync } from "fs";
|
|
35176
35226
|
import { join as join10 } from "path";
|
|
35177
35227
|
function getActiveUseaiSessionIds() {
|
|
@@ -35245,7 +35295,7 @@ function sealOrphanFile(sessionId) {
|
|
|
35245
35295
|
chain_end_hash: endRecord.hash
|
|
35246
35296
|
});
|
|
35247
35297
|
const sealSignature = signHash(
|
|
35248
|
-
|
|
35298
|
+
createHash5("sha256").update(sealData).digest("hex"),
|
|
35249
35299
|
daemonSigningKey
|
|
35250
35300
|
);
|
|
35251
35301
|
appendFileSync2(filePath, JSON.stringify(
|
|
@@ -35439,7 +35489,7 @@ function autoSealSession(active) {
|
|
|
35439
35489
|
chain_end_hash: endRecord.hash
|
|
35440
35490
|
});
|
|
35441
35491
|
const sealSignature = signHash(
|
|
35442
|
-
|
|
35492
|
+
createHash5("sha256").update(sealData).digest("hex"),
|
|
35443
35493
|
session2.signingKey
|
|
35444
35494
|
);
|
|
35445
35495
|
session2.appendToChain("session_seal", {
|
|
@@ -35887,7 +35937,7 @@ function recoverEndSession(staleMcpSessionId, args, rpcId, res) {
|
|
|
35887
35937
|
chain_end_hash: endRecord.hash
|
|
35888
35938
|
});
|
|
35889
35939
|
const sealSignature = signHash(
|
|
35890
|
-
|
|
35940
|
+
createHash5("sha256").update(sealData).digest("hex"),
|
|
35891
35941
|
daemonSigningKey
|
|
35892
35942
|
);
|
|
35893
35943
|
appendFileSync2(activePath, JSON.stringify(
|
|
@@ -36072,7 +36122,6 @@ async function startDaemon(port) {
|
|
|
36072
36122
|
return;
|
|
36073
36123
|
}
|
|
36074
36124
|
if (url.pathname.startsWith("/api/local/") && req.method === "GET") {
|
|
36075
|
-
console.error(`[debug] GET local route: ${url.pathname}`);
|
|
36076
36125
|
if (url.pathname === "/api/local/stats") {
|
|
36077
36126
|
handleLocalStats(req, res);
|
|
36078
36127
|
return;
|