ralph-wiggum-ui 0.1.3 → 0.1.5

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.
@@ -1 +1 @@
1
- {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/run.ts"],"names":[],"mappings":"AAAA;;GAEG;AAqBH,UAAU,UAAU;IAClB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,wBAAsB,UAAU,CAC9B,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,OAAO,EAAE,UAAU,GAClB,OAAO,CAAC,IAAI,CAAC,CA4Gf"}
1
+ {"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/run.ts"],"names":[],"mappings":"AAAA;;GAEG;AAqBH,UAAU,UAAU;IAClB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAuFD,wBAAsB,UAAU,CAC9B,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,OAAO,EAAE,UAAU,GAClB,OAAO,CAAC,IAAI,CAAC,CA4Gf"}
@@ -5,6 +5,70 @@ import chalk from 'chalk';
5
5
  import { spawn } from 'child_process';
6
6
  import { readFileSync } from 'fs';
7
7
  import { runOperationalPreflightChecks, getNextTask, getTasksByStatus, markTaskInProgress, markTaskCompleted, markTaskFailed, loadConfig, createLogWriter, cleanupOldLogs, appendProgressEntry, getRalphFilePath, PROMPT_FILE, TASK_COMPLETION_TAG, } from '../../lib/index.js';
8
+ function parseClaudeStreamJson(json) {
9
+ if (!json || typeof json !== 'object') {
10
+ return null;
11
+ }
12
+ const obj = json;
13
+ // Handle assistant messages with text content
14
+ if (obj.type === 'assistant' && obj.message) {
15
+ const message = obj.message;
16
+ if (message.content && Array.isArray(message.content)) {
17
+ const textContent = message.content
18
+ .filter((c) => c && typeof c === 'object' && c.type === 'text')
19
+ .map((c) => c.text)
20
+ .filter((t) => typeof t === 'string')
21
+ .join('\n');
22
+ if (textContent) {
23
+ return { type: 'text', content: textContent };
24
+ }
25
+ }
26
+ }
27
+ // Handle content_block_delta (streaming text)
28
+ if (obj.type === 'content_block_delta' && obj.delta) {
29
+ const delta = obj.delta;
30
+ if (delta.type === 'text_delta' && typeof delta.text === 'string') {
31
+ return { type: 'text', content: delta.text };
32
+ }
33
+ }
34
+ // Handle tool use events
35
+ if (obj.type === 'assistant' && obj.message) {
36
+ const message = obj.message;
37
+ if (message.content && Array.isArray(message.content)) {
38
+ const toolUses = message.content.filter((c) => c && typeof c === 'object' && c.type === 'tool_use');
39
+ if (toolUses.length > 0) {
40
+ const toolInfo = toolUses.map((t) => {
41
+ const tool = t;
42
+ return `[Tool: ${tool.name}]`;
43
+ }).join(', ');
44
+ return { type: 'tool_use', content: toolInfo };
45
+ }
46
+ }
47
+ }
48
+ // Handle tool results (user messages with tool_result)
49
+ if (obj.type === 'user' && obj.message) {
50
+ const message = obj.message;
51
+ if (message.content && Array.isArray(message.content)) {
52
+ const toolResults = message.content.filter((c) => c && typeof c === 'object' && c.type === 'tool_result');
53
+ if (toolResults.length > 0) {
54
+ // For tool results, just note that a result was received
55
+ return { type: 'tool_result', content: '[Tool result received]' };
56
+ }
57
+ }
58
+ }
59
+ // Handle result type messages
60
+ if (obj.type === 'result' && obj.result) {
61
+ const result = obj.result;
62
+ if (typeof result === 'string') {
63
+ return { type: 'text', content: result };
64
+ }
65
+ }
66
+ // Handle system messages
67
+ if (obj.type === 'system' && typeof obj.message === 'string') {
68
+ return { type: 'system', content: obj.message };
69
+ }
70
+ return null;
71
+ }
8
72
  export async function runCommand(countArg, options) {
9
73
  const cwd = process.cwd();
10
74
  // Run pre-flight checks
@@ -124,22 +188,27 @@ async function runTaskWithClaude(cwd, _config, logWriter) {
124
188
  child.stdout.on('data', (data) => {
125
189
  const text = data.toString();
126
190
  output += text;
127
- // Log the output (parse JSON stream if possible)
128
- try {
129
- const lines = text.split('\n').filter((line) => line.trim());
130
- for (const line of lines) {
131
- const parsed = JSON.parse(line);
132
- if (parsed.type === 'content' && parsed.content) {
133
- logWriter.write(`> ${parsed.content}`);
134
- console.log(chalk.dim(` > ${truncate(parsed.content, 70)}`));
191
+ // Parse JSON stream and emit formatted logs
192
+ const lines = text.split('\n').filter((line) => line.trim());
193
+ for (const line of lines) {
194
+ try {
195
+ const jsonObj = JSON.parse(line);
196
+ const parsed = parseClaudeStreamJson(jsonObj);
197
+ if (parsed && parsed.content) {
198
+ // Only log meaningful content, skip tool results which can be verbose
199
+ if (parsed.type !== 'tool_result') {
200
+ logWriter.write(parsed.content);
201
+ console.log(chalk.dim(` > ${truncate(parsed.content, 70)}`));
202
+ }
135
203
  }
136
204
  }
137
- }
138
- catch {
139
- // Not JSON, just log raw
140
- const trimmed = text.trim();
141
- if (trimmed) {
142
- logWriter.write(`> ${trimmed}`);
205
+ catch {
206
+ // Not valid JSON, log raw text if it looks meaningful
207
+ const trimmed = line.trim();
208
+ // Skip logging raw JSON that failed to parse
209
+ if (trimmed && !trimmed.startsWith('{') && !trimmed.startsWith('[')) {
210
+ logWriter.write(trimmed);
211
+ }
143
212
  }
144
213
  }
145
214
  // Check for completion tag
@@ -1 +1 @@
1
- {"version":3,"file":"run.js","sourceRoot":"","sources":["../../../src/cli/commands/run.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,EACL,6BAA6B,EAC7B,WAAW,EACX,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,cAAc,EACd,UAAU,EACV,eAAe,EACf,cAAc,EACd,mBAAmB,EACnB,gBAAgB,EAChB,WAAW,EACX,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAO5B,MAAM,CAAC,KAAK,UAAU,UA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AAE,CAAC;QACnC,OAAO,UAAU,CAAC;IACpB,CAAC;IACD,OAAO,UAAU,CAAC,SAAS,CAAC,CAAC,EAAE,SAAS,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC;AACxD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../src/server/runner.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,WAAW,CAAC;AAcnD,OAAO,KAAK,EACV,MAAM,EACN,cAAc,EACd,eAAe,EAGhB,MAAM,mBAAmB,CAAC;AAE3B,MAAM,WAAW,UAAU;IACzB,KAAK,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,CAAC;IACrC,IAAI,IAAI,IAAI,CAAC;IACb,SAAS,IAAI,OAAO,CAAC;IACrB,QAAQ,IAAI,eAAe,CAAC;CAC7B;AAED,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,EACf,EAAE,EAAE,YAAY,GACf,UAAU,CAySZ"}
1
+ {"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../../src/server/runner.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,WAAW,CAAC;AAcnD,OAAO,KAAK,EACV,MAAM,EACN,cAAc,EACd,eAAe,EAGhB,MAAM,mBAAmB,CAAC;AAuF3B,MAAM,WAAW,UAAU;IACzB,KAAK,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,CAAC;IACrC,IAAI,IAAI,IAAI,CAAC;IACb,SAAS,IAAI,OAAO,CAAC;IACrB,QAAQ,IAAI,eAAe,CAAC;CAC7B;AAED,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,EACf,EAAE,EAAE,YAAY,GACf,UAAU,CA+SZ"}
@@ -6,6 +6,70 @@
6
6
  import { spawn } from 'child_process';
7
7
  import { readFileSync } from 'fs';
8
8
  import { getNextTask, getTasksByStatus, markTaskInProgress, markTaskCompleted, markTaskFailed, createLogWriter, cleanupOldLogs, appendProgressEntry, getRalphFilePath, PROMPT_FILE, TASK_COMPLETION_TAG, } from '../lib/index.js';
9
+ function parseClaudeStreamJson(json) {
10
+ if (!json || typeof json !== 'object') {
11
+ return null;
12
+ }
13
+ const obj = json;
14
+ // Handle assistant messages with text content
15
+ if (obj.type === 'assistant' && obj.message) {
16
+ const message = obj.message;
17
+ if (message.content && Array.isArray(message.content)) {
18
+ const textContent = message.content
19
+ .filter((c) => c && typeof c === 'object' && c.type === 'text')
20
+ .map((c) => c.text)
21
+ .filter((t) => typeof t === 'string')
22
+ .join('\n');
23
+ if (textContent) {
24
+ return { type: 'text', content: textContent };
25
+ }
26
+ }
27
+ }
28
+ // Handle content_block_delta (streaming text)
29
+ if (obj.type === 'content_block_delta' && obj.delta) {
30
+ const delta = obj.delta;
31
+ if (delta.type === 'text_delta' && typeof delta.text === 'string') {
32
+ return { type: 'text', content: delta.text };
33
+ }
34
+ }
35
+ // Handle tool use events
36
+ if (obj.type === 'assistant' && obj.message) {
37
+ const message = obj.message;
38
+ if (message.content && Array.isArray(message.content)) {
39
+ const toolUses = message.content.filter((c) => c && typeof c === 'object' && c.type === 'tool_use');
40
+ if (toolUses.length > 0) {
41
+ const toolInfo = toolUses.map((t) => {
42
+ const tool = t;
43
+ return `[Tool: ${tool.name}]`;
44
+ }).join(', ');
45
+ return { type: 'tool_use', content: toolInfo };
46
+ }
47
+ }
48
+ }
49
+ // Handle tool results (user messages with tool_result)
50
+ if (obj.type === 'user' && obj.message) {
51
+ const message = obj.message;
52
+ if (message.content && Array.isArray(message.content)) {
53
+ const toolResults = message.content.filter((c) => c && typeof c === 'object' && c.type === 'tool_result');
54
+ if (toolResults.length > 0) {
55
+ // For tool results, just note that a result was received
56
+ return { type: 'tool_result', content: '[Tool result received]' };
57
+ }
58
+ }
59
+ }
60
+ // Handle result type messages
61
+ if (obj.type === 'result' && obj.result) {
62
+ const result = obj.result;
63
+ if (typeof result === 'string') {
64
+ return { type: 'text', content: result };
65
+ }
66
+ }
67
+ // Handle system messages
68
+ if (obj.type === 'system' && typeof obj.message === 'string') {
69
+ return { type: 'system', content: obj.message };
70
+ }
71
+ return null;
72
+ }
9
73
  export function createTaskRunner(cwd, _config, io) {
10
74
  let state = {
11
75
  totalTasks: 0,
@@ -63,23 +127,28 @@ export function createTaskRunner(cwd, _config, io) {
63
127
  child.stdout.on('data', (data) => {
64
128
  const text = data.toString();
65
129
  output += text;
66
- // Parse JSON stream and emit logs
67
- try {
68
- const lines = text.split('\n').filter((line) => line.trim());
69
- for (const line of lines) {
70
- const parsed = JSON.parse(line);
71
- if (parsed.type === 'content' && parsed.content) {
72
- emitLog(task.id, parsed.content);
73
- logWriter.write(`> ${parsed.content}`);
130
+ // Parse JSON stream and emit formatted logs
131
+ const lines = text.split('\n').filter((line) => line.trim());
132
+ for (const line of lines) {
133
+ try {
134
+ const jsonObj = JSON.parse(line);
135
+ const parsed = parseClaudeStreamJson(jsonObj);
136
+ if (parsed && parsed.content) {
137
+ // Only log meaningful content, skip tool results which can be verbose
138
+ if (parsed.type !== 'tool_result') {
139
+ emitLog(task.id, parsed.content);
140
+ logWriter.write(parsed.content);
141
+ }
74
142
  }
75
143
  }
76
- }
77
- catch {
78
- // Not JSON, log raw
79
- const trimmed = text.trim();
80
- if (trimmed) {
81
- emitLog(task.id, trimmed);
82
- logWriter.write(`> ${trimmed}`);
144
+ catch {
145
+ // Not valid JSON, log raw text if it looks meaningful
146
+ const trimmed = line.trim();
147
+ // Skip logging raw JSON that failed to parse
148
+ if (trimmed && !trimmed.startsWith('{') && !trimmed.startsWith('[')) {
149
+ emitLog(task.id, trimmed);
150
+ logWriter.write(trimmed);
151
+ }
83
152
  }
84
153
  }
85
154
  // Check for completion tag
@@ -1 +1 @@
1
- {"version":3,"file":"runner.js","sourceRoot":"","sources":["../../src/server/runner.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;AACJ,CAAC"}
@@ -131,7 +131,7 @@ Error generating stack: `+o.message+`
131
131
  *
132
132
  * This source code is licensed under the ISC license.
133
133
  * See the LICENSE file in the root directory of this source tree.
134
- */const iy=Ae("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"}]]),oy="/api";async function Ze(e,t){const r=await(await fetch(`${oy}${e}`,{...t,headers:{"Content-Type":"application/json",...t==null?void 0:t.headers}})).json();if(!r.success)throw new Error(r.error||"Request failed");return r.data}const Rt={getStatus:()=>Ze("/status"),getTasks:()=>Ze("/tasks"),createTask:e=>Ze("/tasks",{method:"POST",body:JSON.stringify(e)}),updateTask:(e,t)=>Ze(`/tasks/${e}`,{method:"PUT",body:JSON.stringify(t)}),deleteTask:e=>Ze(`/tasks/${e}`,{method:"DELETE"}),reorderTasks:e=>Ze("/tasks/reorder",{method:"POST",body:JSON.stringify({taskIds:e})}),startRun:e=>Ze("/run",{method:"POST",body:JSON.stringify(e)}),stopRun:()=>Ze("/run/stop",{method:"POST"}),getRunStatus:()=>Ze("/run/status"),getLogs:()=>Ze("/logs"),getLog:e=>Ze(`/logs/${e}`)};function sy({project:e,branch:t,isConnected:n,onAddTask:r,onToggleLogs:i,isLogsOpen:o,isRunning:s,pendingCount:l}){const[u,a]=v.useState(!1),d=async()=>{a(!0);try{await Rt.startRun({count:1})}catch(m){console.error("Failed to start task:",m)}finally{a(!1)}},f=async()=>{a(!0);try{await Rt.startRun({all:!0})}catch(m){console.error("Failed to start AFK mode:",m)}finally{a(!1)}};return y.jsx("header",{className:"bg-ralph-card border-b border-ralph-border px-4 py-3",children:y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsxs("div",{className:"flex items-center gap-4",children:[y.jsx("h1",{className:"text-xl font-bold flex items-center gap-2",children:y.jsx("span",{children:"Ralph Wiggum UI"})}),y.jsxs("div",{className:"flex items-center gap-2 text-ralph-muted text-sm",children:[y.jsx("span",{className:"px-2 py-1 bg-ralph-bg rounded",children:e}),y.jsxs("span",{className:"flex items-center gap-1 px-2 py-1 bg-ralph-bg rounded",children:[y.jsx(Gv,{size:14}),t]})]})]}),y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsxs("div",{className:`flex items-center gap-1 text-sm ${n?"text-ralph-success":"text-ralph-danger"}`,children:[n?y.jsx(ry,{size:16}):y.jsx(ny,{size:16}),y.jsx("span",{children:n?"Connected":"Disconnected"})]}),y.jsxs("button",{onClick:i,className:`flex items-center gap-2 px-3 py-2 rounded transition-colors ${o?"bg-ralph-accent text-white":"bg-ralph-bg hover:bg-ralph-border"}`,children:[y.jsx(ty,{size:16}),y.jsx("span",{children:"Logs"})]}),y.jsxs("button",{onClick:r,className:"flex items-center gap-2 px-3 py-2 bg-ralph-accent hover:bg-ralph-accent/80 text-white rounded transition-colors",children:[y.jsx(ey,{size:16}),y.jsx("span",{children:"Add Task"})]}),!s&&l>0&&y.jsxs(y.Fragment,{children:[y.jsxs("button",{onClick:d,disabled:u,className:"flex items-center gap-2 px-3 py-2 bg-ralph-success hover:bg-ralph-success/80 text-white rounded transition-colors disabled:opacity-50",children:[y.jsx(fp,{size:16}),y.jsx("span",{children:"Run Next"})]}),l>1&&y.jsxs("button",{onClick:f,disabled:u,className:"flex items-center gap-2 px-3 py-2 bg-ralph-warning hover:bg-ralph-warning/80 text-white rounded transition-colors disabled:opacity-50",title:`Run all ${l} pending tasks`,children:[y.jsx(iy,{size:16}),y.jsxs("span",{children:["AFK Mode (",l,")"]})]})]})]})]})})}function ly({id:e,title:t,count:n,children:r}){const{setNodeRef:i,isOver:o}=ip({id:e}),s=()=>{switch(e){case"pending":return"border-ralph-muted/30";case"in_progress":return"border-ralph-warning/30";case"completed":return"border-ralph-success/30";default:return"border-ralph-border"}},l=()=>{switch(e){case"pending":return"text-ralph-muted";case"in_progress":return"text-ralph-warning";case"completed":return"text-ralph-success";default:return"text-ralph-text"}};return y.jsxs("div",{ref:i,className:`flex-1 min-w-[300px] max-w-[400px] flex flex-col bg-ralph-card rounded-lg border-2 ${s()} ${o?"ring-2 ring-ralph-accent":""}`,children:[y.jsx("div",{className:"px-4 py-3 border-b border-ralph-border",children:y.jsxs("h2",{className:`font-semibold flex items-center gap-2 ${l()}`,children:[y.jsx("span",{children:t}),y.jsx("span",{className:"text-xs bg-ralph-bg px-2 py-0.5 rounded-full",children:n})]})}),y.jsx("div",{className:"flex-1 p-3 overflow-y-auto space-y-3",children:r})]})}function uy({task:e,onDelete:t}){const{attributes:n,listeners:r,setNodeRef:i,transform:o,transition:s,isDragging:l}=Hv({id:e.id}),u={transform:ui.Transform.toString(o),transition:s},a=()=>e.status==="failed"?y.jsxs("span",{className:"flex items-center gap-1 text-xs text-ralph-danger bg-ralph-danger/20 px-2 py-0.5 rounded",children:[y.jsx(qv,{size:12}),"Failed"]}):e.status==="completed"?y.jsxs("span",{className:"flex items-center gap-1 text-xs text-ralph-success bg-ralph-success/20 px-2 py-0.5 rounded",children:[y.jsx(Xv,{size:12}),"Done"]}):null;return y.jsx("div",{ref:i,style:u,className:`bg-ralph-bg border border-ralph-border rounded-lg p-3 group ${l?"opacity-50 ring-2 ring-ralph-accent":""}`,children:y.jsxs("div",{className:"flex items-start gap-2",children:[y.jsx("button",{...n,...r,className:"mt-1 text-ralph-muted hover:text-ralph-text cursor-grab",children:y.jsx(Jv,{size:16})}),y.jsxs("div",{className:"flex-1 min-w-0",children:[y.jsxs("div",{className:"flex items-start justify-between gap-2",children:[y.jsxs("div",{className:"flex-1",children:[y.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[y.jsx("span",{className:"text-xs text-ralph-muted font-mono",children:e.id}),a()]}),y.jsx("h3",{className:"font-medium text-sm text-ralph-text",children:e.title})]}),y.jsx("button",{onClick:d=>{d.stopPropagation(),t()},className:"opacity-0 group-hover:opacity-100 text-ralph-muted hover:text-ralph-danger transition-opacity",children:y.jsx(dp,{size:14})})]}),e.description&&y.jsx("p",{className:"text-xs text-ralph-muted mt-2 line-clamp-2",children:e.description}),e.acceptanceCriteria.length>0&&y.jsxs("div",{className:"mt-2 text-xs text-ralph-muted",children:[e.acceptanceCriteria.length," criteria"]}),e.notes&&y.jsx("div",{className:"mt-2 text-xs text-ralph-warning bg-ralph-warning/10 px-2 py-1 rounded",children:e.notes})]})]})})}function ay({onAdd:e,onClose:t}){const[n,r]=v.useState(""),[i,o]=v.useState(""),[s,l]=v.useState(""),[u,a]=v.useState(!1),d=async f=>{if(f.preventDefault(),!n.trim())return;a(!0);const m=s.split(`
134
+ */const iy=Ae("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"}]]),oy="/api";async function Ze(e,t){const r=await(await fetch(`${oy}${e}`,{...t,headers:{"Content-Type":"application/json",...t==null?void 0:t.headers}})).json();if(!r.success)throw new Error(r.error||"Request failed");return r.data}const Rt={getStatus:()=>Ze("/status"),getTasks:()=>Ze("/tasks"),createTask:e=>Ze("/tasks",{method:"POST",body:JSON.stringify(e)}),updateTask:(e,t)=>Ze(`/tasks/${e}`,{method:"PUT",body:JSON.stringify(t)}),deleteTask:e=>Ze(`/tasks/${e}`,{method:"DELETE"}),reorderTasks:e=>Ze("/tasks/reorder",{method:"POST",body:JSON.stringify({taskIds:e})}),startRun:e=>Ze("/run",{method:"POST",body:JSON.stringify(e)}),stopRun:()=>Ze("/run/stop",{method:"POST"}),getRunStatus:()=>Ze("/run/status"),getLogs:()=>Ze("/logs"),getLog:e=>Ze(`/logs/${e}`)};function sy({project:e,branch:t,isConnected:n,onAddTask:r,onToggleLogs:i,isLogsOpen:o,isRunning:s,pendingCount:l}){const[u,a]=v.useState(!1),d=async()=>{a(!0);try{await Rt.startRun({count:1})}catch(m){console.error("Failed to start task:",m)}finally{a(!1)}},f=async()=>{a(!0);try{await Rt.startRun({all:!0})}catch(m){console.error("Failed to start AFK mode:",m)}finally{a(!1)}};return y.jsx("header",{className:"bg-ralph-card border-b border-ralph-border px-4 py-3",children:y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsxs("div",{className:"flex items-center gap-4",children:[y.jsx("h1",{className:"text-xl font-bold flex items-center gap-2",children:y.jsx("span",{children:"Ralph Wiggum UI"})}),y.jsxs("div",{className:"flex items-center gap-2 text-ralph-muted text-sm",children:[y.jsx("span",{className:"px-2 py-1 bg-ralph-bg rounded",children:e}),y.jsxs("span",{className:"flex items-center gap-1 px-2 py-1 bg-ralph-bg rounded",children:[y.jsx(Gv,{size:14}),t]})]})]}),y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsxs("div",{className:`flex items-center gap-1 text-sm ${n?"text-ralph-success":"text-ralph-danger"}`,children:[n?y.jsx(ry,{size:16}):y.jsx(ny,{size:16}),y.jsx("span",{children:n?"Connected":"Disconnected"})]}),y.jsxs("button",{onClick:i,className:`flex items-center gap-2 px-3 py-2 rounded transition-colors ${o?"bg-ralph-accent text-white":"bg-ralph-bg hover:bg-ralph-border"}`,children:[y.jsx(ty,{size:16}),y.jsx("span",{children:"Logs"})]}),y.jsxs("button",{onClick:r,className:"flex items-center gap-2 px-3 py-2 bg-ralph-accent hover:bg-ralph-accent/80 text-white rounded transition-colors",children:[y.jsx(ey,{size:16}),y.jsx("span",{children:"Add Task"})]}),!s&&l>0&&y.jsxs(y.Fragment,{children:[y.jsxs("button",{onClick:d,disabled:u,className:"flex items-center gap-2 px-3 py-2 bg-ralph-success hover:bg-ralph-success/80 text-white rounded transition-colors disabled:opacity-50",children:[y.jsx(fp,{size:16}),y.jsx("span",{children:"Run Next"})]}),l>1&&y.jsxs("button",{onClick:f,disabled:u,className:"flex items-center gap-2 px-3 py-2 bg-ralph-warning hover:bg-ralph-warning/80 text-white rounded transition-colors disabled:opacity-50",title:`Run all ${l} pending tasks`,children:[y.jsx(iy,{size:16}),y.jsxs("span",{children:["AFK Mode (",l,")"]})]})]})]})]})})}function ly({id:e,title:t,count:n,children:r}){const{setNodeRef:i,isOver:o}=ip({id:e}),s=()=>{switch(e){case"pending":return"border-ralph-muted/30";case"in_progress":return"border-ralph-warning/30";case"completed":return"border-ralph-success/30";case"failed":return"border-ralph-danger/30";default:return"border-ralph-border"}},l=()=>{switch(e){case"pending":return"text-ralph-muted";case"in_progress":return"text-ralph-warning";case"completed":return"text-ralph-success";case"failed":return"text-ralph-danger";default:return"text-ralph-text"}};return y.jsxs("div",{ref:i,className:`flex-1 min-w-[300px] max-w-[400px] flex flex-col bg-ralph-card rounded-lg border-2 ${s()} ${o?"ring-2 ring-ralph-accent":""}`,children:[y.jsx("div",{className:"px-4 py-3 border-b border-ralph-border",children:y.jsxs("h2",{className:`font-semibold flex items-center gap-2 ${l()}`,children:[y.jsx("span",{children:t}),y.jsx("span",{className:"text-xs bg-ralph-bg px-2 py-0.5 rounded-full",children:n})]})}),y.jsx("div",{className:"flex-1 p-3 overflow-y-auto space-y-3",children:r})]})}function uy({task:e,onDelete:t}){const{attributes:n,listeners:r,setNodeRef:i,transform:o,transition:s,isDragging:l}=Hv({id:e.id}),u={transform:ui.Transform.toString(o),transition:s},a=()=>e.status==="failed"?y.jsxs("span",{className:"flex items-center gap-1 text-xs text-ralph-danger bg-ralph-danger/20 px-2 py-0.5 rounded",children:[y.jsx(qv,{size:12}),"Failed"]}):e.status==="completed"?y.jsxs("span",{className:"flex items-center gap-1 text-xs text-ralph-success bg-ralph-success/20 px-2 py-0.5 rounded",children:[y.jsx(Xv,{size:12}),"Done"]}):null;return y.jsx("div",{ref:i,style:u,className:`bg-ralph-bg border border-ralph-border rounded-lg p-3 group ${l?"opacity-50 ring-2 ring-ralph-accent":""}`,children:y.jsxs("div",{className:"flex items-start gap-2",children:[y.jsx("button",{...n,...r,className:"mt-1 text-ralph-muted hover:text-ralph-text cursor-grab",children:y.jsx(Jv,{size:16})}),y.jsxs("div",{className:"flex-1 min-w-0",children:[y.jsxs("div",{className:"flex items-start justify-between gap-2",children:[y.jsxs("div",{className:"flex-1",children:[y.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[y.jsx("span",{className:"text-xs text-ralph-muted font-mono",children:e.id}),a()]}),y.jsx("h3",{className:"font-medium text-sm text-ralph-text",children:e.title})]}),y.jsx("button",{onClick:d=>{d.stopPropagation(),t()},className:"opacity-0 group-hover:opacity-100 text-ralph-muted hover:text-ralph-danger transition-opacity",children:y.jsx(dp,{size:14})})]}),e.description&&y.jsx("p",{className:"text-xs text-ralph-muted mt-2 line-clamp-2",children:e.description}),e.acceptanceCriteria.length>0&&y.jsxs("div",{className:"mt-2 text-xs text-ralph-muted",children:[e.acceptanceCriteria.length," criteria"]}),e.notes&&y.jsx("div",{className:"mt-2 text-xs text-ralph-warning bg-ralph-warning/10 px-2 py-1 rounded",children:e.notes})]})]})})}function ay({onAdd:e,onClose:t}){const[n,r]=v.useState(""),[i,o]=v.useState(""),[s,l]=v.useState(""),[u,a]=v.useState(!1),d=async f=>{if(f.preventDefault(),!n.trim())return;a(!0);const m=s.split(`
135
135
  `).map(g=>g.trim()).filter(g=>g.length>0);await e({title:n.trim(),description:i.trim()||void 0,acceptanceCriteria:m.length>0?m:void 0}),a(!1)};return y.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:y.jsxs("div",{className:"bg-ralph-card border border-ralph-border rounded-lg w-full max-w-lg mx-4",children:[y.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-ralph-border",children:[y.jsx("h2",{className:"font-semibold",children:"Add New Task"}),y.jsx("button",{onClick:t,className:"text-ralph-muted hover:text-ralph-text",children:y.jsx(pp,{size:20})})]}),y.jsxs("form",{onSubmit:d,className:"p-4 space-y-4",children:[y.jsxs("div",{children:[y.jsx("label",{className:"block text-sm font-medium mb-1",children:"Title *"}),y.jsx("input",{type:"text",value:n,onChange:f=>r(f.target.value),placeholder:"What needs to be done?",className:"w-full px-3 py-2 bg-ralph-bg border border-ralph-border rounded focus:outline-none focus:ring-2 focus:ring-ralph-accent",autoFocus:!0})]}),y.jsxs("div",{children:[y.jsx("label",{className:"block text-sm font-medium mb-1",children:"Description"}),y.jsx("textarea",{value:i,onChange:f=>o(f.target.value),placeholder:"Optional details about the task...",rows:3,className:"w-full px-3 py-2 bg-ralph-bg border border-ralph-border rounded focus:outline-none focus:ring-2 focus:ring-ralph-accent resize-none"})]}),y.jsxs("div",{children:[y.jsxs("label",{className:"block text-sm font-medium mb-1",children:["Acceptance Criteria",y.jsx("span",{className:"text-ralph-muted font-normal ml-1",children:"(one per line)"})]}),y.jsx("textarea",{value:s,onChange:f=>l(f.target.value),placeholder:`Tests pass
136
136
  No TypeScript errors
137
- Documentation updated`,rows:4,className:"w-full px-3 py-2 bg-ralph-bg border border-ralph-border rounded focus:outline-none focus:ring-2 focus:ring-ralph-accent resize-none font-mono text-sm"})]}),y.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[y.jsx("button",{type:"button",onClick:t,className:"px-4 py-2 text-ralph-muted hover:text-ralph-text transition-colors",children:"Cancel"}),y.jsx("button",{type:"submit",disabled:!n.trim()||u,className:"px-4 py-2 bg-ralph-accent hover:bg-ralph-accent/80 text-white rounded transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:u?"Adding...":"Add Task"})]})]})]})})}function cy({logs:e,onClear:t,onClose:n}){const r=v.useRef(null);v.useEffect(()=>{r.current&&(r.current.scrollTop=r.current.scrollHeight)},[e]);const i=o=>new Date(o).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"});return y.jsxs("div",{className:"w-96 border-l border-ralph-border bg-ralph-card flex flex-col",children:[y.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-ralph-border",children:[y.jsx("h3",{className:"font-semibold",children:"Live Logs"}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("button",{onClick:t,className:"text-ralph-muted hover:text-ralph-text",title:"Clear logs",children:y.jsx(dp,{size:16})}),y.jsx("button",{onClick:n,className:"text-ralph-muted hover:text-ralph-text",children:y.jsx(pp,{size:16})})]})]}),y.jsx("div",{ref:r,className:"flex-1 overflow-y-auto p-3 font-mono text-xs",children:e.length===0?y.jsx("div",{className:"text-ralph-muted text-center py-8",children:"No logs yet. Start running a task to see output."}):y.jsx("div",{className:"space-y-1",children:e.map((o,s)=>y.jsxs("div",{className:"flex gap-2",children:[y.jsxs("span",{className:"text-ralph-muted shrink-0",children:["[",i(o.timestamp),"]"]}),y.jsx("span",{className:"text-ralph-text break-all",children:o.message})]},s))})})]})}function fy({progress:e}){const[t,n]=v.useState(!1),r=async()=>{n(!0);try{await Rt.stopRun()}catch(s){console.error("Failed to stop:",s)}finally{n(!1)}},i=()=>{const s=Date.now()-e.startTime,l=Math.floor(s/1e3),u=Math.floor(l/60),a=Math.floor(u/60);return a>0?`${a}h ${u%60}m`:u>0?`${u}m ${l%60}s`:`${l}s`},o=e.totalTasks>0?Math.round(e.completedTasks/e.totalTasks*100):0;return y.jsxs("div",{className:"fixed bottom-4 right-4 bg-ralph-card border border-ralph-border rounded-lg shadow-lg p-4 w-80",children:[y.jsxs("div",{className:"flex items-center justify-between mb-3",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(Zv,{className:"animate-spin text-ralph-accent",size:18}),y.jsx("span",{className:"font-semibold",children:"AFK Mode Running"})]}),y.jsxs("button",{onClick:r,disabled:t,className:"flex items-center gap-1 px-2 py-1 bg-ralph-danger/20 hover:bg-ralph-danger/30 text-ralph-danger rounded text-sm transition-colors disabled:opacity-50",children:[y.jsx(kc,{size:14}),t?"Stopping...":"Stop"]})]}),e.currentTask&&y.jsxs("div",{className:"mb-3 text-sm",children:[y.jsx("div",{className:"text-ralph-muted mb-1",children:"Current task:"}),y.jsxs("div",{className:"text-ralph-text truncate",children:[y.jsxs("span",{className:"text-ralph-muted font-mono",children:[e.currentTask.id,":"]})," ",e.currentTask.title]})]}),y.jsxs("div",{className:"mb-2",children:[y.jsxs("div",{className:"flex items-center justify-between text-sm mb-1",children:[y.jsxs("span",{className:"text-ralph-muted",children:[e.completedTasks," / ",e.totalTasks," tasks"]}),y.jsx("span",{className:"text-ralph-muted",children:i()})]}),y.jsx("div",{className:"h-2 bg-ralph-bg rounded-full overflow-hidden",children:y.jsx("div",{className:"h-full bg-ralph-accent transition-all duration-300",style:{width:`${o}%`}})})]}),y.jsxs("div",{className:"flex items-center gap-2 text-xs text-ralph-muted",children:[y.jsx(fp,{size:12,className:"text-ralph-success"}),y.jsxs("span",{children:[e.results.filter(s=>s.success).length," passed"]}),e.results.some(s=>!s.success)&&y.jsxs(y.Fragment,{children:[y.jsx("span",{className:"text-ralph-border",children:"|"}),y.jsx(kc,{size:12,className:"text-ralph-danger"}),y.jsxs("span",{children:[e.results.filter(s=>!s.success).length," failed"]})]})]})]})}const yt=Object.create(null);yt.open="0";yt.close="1";yt.ping="2";yt.pong="3";yt.message="4";yt.upgrade="5";yt.noop="6";const eo=Object.create(null);Object.keys(yt).forEach(e=>{eo[yt[e]]=e});const zl={type:"error",data:"parser error"},hp=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",mp=typeof ArrayBuffer=="function",gp=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,$u=({type:e,data:t},n,r)=>hp&&t instanceof Blob?n?r(t):Ec(t,r):mp&&(t instanceof ArrayBuffer||gp(t))?n?r(t):Ec(new Blob([t]),r):r(yt[e]+(t||"")),Ec=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Cc(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Ms;function dy(e,t){if(hp&&e.data instanceof Blob)return e.data.arrayBuffer().then(Cc).then(t);if(mp&&(e.data instanceof ArrayBuffer||gp(e.data)))return t(Cc(e.data));$u(e,!1,n=>{Ms||(Ms=new TextEncoder),t(Ms.encode(n))})}const _c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Lr=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<_c.length;e++)Lr[_c.charCodeAt(e)]=e;const py=e=>{let t=e.length*.75,n=e.length,r,i=0,o,s,l,u;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const a=new ArrayBuffer(t),d=new Uint8Array(a);for(r=0;r<n;r+=4)o=Lr[e.charCodeAt(r)],s=Lr[e.charCodeAt(r+1)],l=Lr[e.charCodeAt(r+2)],u=Lr[e.charCodeAt(r+3)],d[i++]=o<<2|s>>4,d[i++]=(s&15)<<4|l>>2,d[i++]=(l&3)<<6|u&63;return a},hy=typeof ArrayBuffer=="function",Vu=(e,t)=>{if(typeof e!="string")return{type:"message",data:vp(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:my(e.substring(1),t)}:eo[n]?e.length>1?{type:eo[n],data:e.substring(1)}:{type:eo[n]}:zl},my=(e,t)=>{if(hy){const n=py(e);return vp(n,t)}else return{base64:!0,data:e}},vp=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},yp="",gy=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,s)=>{$u(o,!1,l=>{r[s]=l,++i===n&&t(r.join(yp))})})},vy=(e,t)=>{const n=e.split(yp),r=[];for(let i=0;i<n.length;i++){const o=Vu(n[i],t);if(r.push(o),o.type==="error")break}return r};function yy(){return new TransformStream({transform(e,t){dy(e,n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const o=new DataView(i.buffer);o.setUint8(0,126),o.setUint16(1,r)}else{i=new Uint8Array(9);const o=new DataView(i.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let zs;function Bi(e){return e.reduce((t,n)=>t+n.length,0)}function Fi(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function wy(e,t){zs||(zs=new TextDecoder);const n=[];let r=0,i=-1,o=!1;return new TransformStream({transform(s,l){for(n.push(s);;){if(r===0){if(Bi(n)<1)break;const u=Fi(n,1);o=(u[0]&128)===128,i=u[0]&127,i<126?r=3:i===126?r=1:r=2}else if(r===1){if(Bi(n)<2)break;const u=Fi(n,2);i=new DataView(u.buffer,u.byteOffset,u.length).getUint16(0),r=3}else if(r===2){if(Bi(n)<8)break;const u=Fi(n,8),a=new DataView(u.buffer,u.byteOffset,u.length),d=a.getUint32(0);if(d>Math.pow(2,21)-1){l.enqueue(zl);break}i=d*Math.pow(2,32)+a.getUint32(4),r=3}else{if(Bi(n)<i)break;const u=Fi(n,i);l.enqueue(Vu(o?u:zs.decode(u),t)),r=0}if(i===0||i>e){l.enqueue(zl);break}}}})}const wp=4;function ne(e){if(e)return xy(e)}function xy(e){for(var t in ne.prototype)e[t]=ne.prototype[t];return e}ne.prototype.on=ne.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};ne.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};ne.prototype.off=ne.prototype.removeListener=ne.prototype.removeAllListeners=ne.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this};ne.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this};ne.prototype.emitReserved=ne.prototype.emit;ne.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};ne.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Zo=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Ke=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Sy="arraybuffer";function xp(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const ky=Ke.setTimeout,Ey=Ke.clearTimeout;function es(e,t){t.useNativeTimers?(e.setTimeoutFn=ky.bind(Ke),e.clearTimeoutFn=Ey.bind(Ke)):(e.setTimeoutFn=Ke.setTimeout.bind(Ke),e.clearTimeoutFn=Ke.clearTimeout.bind(Ke))}const Cy=1.33;function _y(e){return typeof e=="string"?Ny(e):Math.ceil((e.byteLength||e.size)*Cy)}function Ny(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function Sp(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Ry(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function Ty(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let o=n[r].split("=");t[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return t}class Dy extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Hu extends ne{constructor(t){super(),this.writable=!1,es(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new Dy(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=Vu(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=Ry(t);return n.length?"?"+n:""}}class Oy extends Hu{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};vy(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,gy(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=Sp()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let kp=!1;try{kp=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Ly=kp;function Py(){}class Ay extends Oy{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class gt extends ne{constructor(t,n,r){super(),this.createRequest=t,es(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=xp(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=gt.requestsCount++,gt.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Py,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete gt.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}gt.requestsCount=0;gt.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Nc);else if(typeof addEventListener=="function"){const e="onpagehide"in Ke?"pagehide":"unload";addEventListener(e,Nc,!1)}}function Nc(){for(let e in gt.requests)gt.requests.hasOwnProperty(e)&&gt.requests[e].abort()}const My=function(){const e=Ep({xdomain:!1});return e&&e.responseType!==null}();class zy extends Ay{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=My&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new gt(Ep,this.uri(),t)}}function Ep(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||Ly))return new XMLHttpRequest}catch{}if(!t)try{return new Ke[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Cp=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Iy extends Hu{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=Cp?{}:xp(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;$u(r,this.supportsBinary,o=>{try{this.doWrite(r,o)}catch{}i&&Zo(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=Sp()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Is=Ke.WebSocket||Ke.MozWebSocket;class jy extends Iy{createSocket(t,n,r){return Cp?new Is(t,n,r):n?new Is(t,n):new Is(t)}doWrite(t,n){this.ws.send(n)}}class by extends Hu{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=wy(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=yy();i.readable.pipeTo(t.writable),this._writer=i.writable.getWriter();const o=()=>{r.read().then(({done:l,value:u})=>{l||(this.onPacket(u),o())}).catch(l=>{})};o();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this._writer.write(s).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;this._writer.write(r).then(()=>{i&&Zo(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const By={websocket:jy,webtransport:by,polling:zy},Fy=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Uy=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Il(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=Fy.exec(e||""),o={},s=14;for(;s--;)o[Uy[s]]=i[s]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=$y(o,o.path),o.queryKey=Vy(o,o.query),o}function $y(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Vy(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}const jl=typeof addEventListener=="function"&&typeof removeEventListener=="function",to=[];jl&&addEventListener("offline",()=>{to.forEach(e=>e())},!1);class sn extends ne{constructor(t,n){if(super(),this.binaryType=Sy,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=Il(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=Il(n.host).host);es(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const i=r.prototype.name;this.transports.push(i),this._transportsByName[i]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Ty(this.opts.query)),jl&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},to.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=wp,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&sn.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",sn.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=_y(i)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Zo(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(sn.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),jl&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=to.indexOf(this._offlineEventListener);r!==-1&&to.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}sn.protocol=wp;class Hy extends sn{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;sn.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",f=>{if(!r)if(f.type==="pong"&&f.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;sn.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(d(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,d(),n.close(),n=null)}const s=f=>{const m=new Error("probe error: "+f);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function l(){s("transport closed")}function u(){s("socket closed")}function a(f){n&&f.name!==n.name&&o()}const d=()=>{n.removeListener("open",i),n.removeListener("error",s),n.removeListener("close",l),this.off("close",u),this.off("upgrading",a)};n.once("open",i),n.once("error",s),n.once("close",l),this.once("close",u),this.once("upgrading",a),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let Wy=class extends Hy{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(i=>By[i]).filter(i=>!!i)),super(t,r)}};function Qy(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=Il(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const o=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+o+":"+r.port+t,r.href=r.protocol+"://"+o+(n&&n.port===r.port?"":":"+r.port),r}const Ky=typeof ArrayBuffer=="function",Yy=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,_p=Object.prototype.toString,qy=typeof Blob=="function"||typeof Blob<"u"&&_p.call(Blob)==="[object BlobConstructor]",Xy=typeof File=="function"||typeof File<"u"&&_p.call(File)==="[object FileConstructor]";function Wu(e){return Ky&&(e instanceof ArrayBuffer||Yy(e))||qy&&e instanceof Blob||Xy&&e instanceof File}function no(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(no(e[n]))return!0;return!1}if(Wu(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return no(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&no(e[n]))return!0;return!1}function Gy(e){const t=[],n=e.data,r=e;return r.data=bl(n,t),r.attachments=t.length,{packet:r,buffers:t}}function bl(e,t){if(!e)return e;if(Wu(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=bl(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=bl(e[r],t));return n}return e}function Jy(e,t){return e.data=Bl(e.data,t),delete e.attachments,e}function Bl(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Bl(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Bl(e[n],t));return e}const Np=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Zy=5;var z;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(z||(z={}));class e0{constructor(t){this.replacer=t}encode(t){return(t.type===z.EVENT||t.type===z.ACK)&&no(t)?this.encodeAsBinary({type:t.type===z.EVENT?z.BINARY_EVENT:z.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===z.BINARY_EVENT||t.type===z.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=Gy(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}class Qu extends ne{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===z.BINARY_EVENT;r||n.type===z.BINARY_ACK?(n.type=r?z.EVENT:z.ACK,this.reconstructor=new t0(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Wu(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(z[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===z.BINARY_EVENT||r.type===z.BINARY_ACK){const o=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const s=t.substring(o,n);if(s!=Number(s)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(s)}if(t.charAt(n+1)==="/"){const o=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(o,n)}else r.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const o=n+1;for(;++n;){const s=t.charAt(n);if(s==null||Number(s)!=s){--n;break}if(n===t.length)break}r.id=Number(t.substring(o,n+1))}if(t.charAt(++n)){const o=this.tryParse(t.substr(n));if(Qu.isPayloadValid(r.type,o))r.data=o;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case z.CONNECT:return Ao(n);case z.DISCONNECT:return n===void 0;case z.CONNECT_ERROR:return typeof n=="string"||Ao(n);case z.EVENT:case z.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Np.indexOf(n[0])===-1);case z.ACK:case z.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class t0{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=Jy(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function n0(e){return typeof e=="string"}const r0=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function i0(e){return e===void 0||r0(e)}function Ao(e){return Object.prototype.toString.call(e)==="[object Object]"}function o0(e,t){switch(e){case z.CONNECT:return t===void 0||Ao(t);case z.DISCONNECT:return t===void 0;case z.EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&Np.indexOf(t[0])===-1);case z.ACK:return Array.isArray(t);case z.CONNECT_ERROR:return typeof t=="string"||Ao(t);default:return!1}}function s0(e){return n0(e.nsp)&&i0(e.id)&&o0(e.type,e.data)}const l0=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Qu,Encoder:e0,get PacketType(){return z},isPacketValid:s0,protocol:Zy},Symbol.toStringTag,{value:"Module"}));function nt(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const u0=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Rp extends ne{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[nt(t,"open",this.onopen.bind(this)),nt(t,"packet",this.onpacket.bind(this)),nt(t,"error",this.onerror.bind(this)),nt(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,i,o;if(u0.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const s={type:z.EVENT,data:n};if(s.options={},s.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const d=this.ids++,f=n.pop();this._registerAckCallback(d,f),s.id=d}const l=(i=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||i===void 0?void 0:i.writable,u=this.connected&&!(!((o=this.io.engine)===null||o===void 0)&&o._hasPingExpired());return this.flags.volatile&&!l||(u?(this.notifyOutgoingListeners(s),this.packet(s)):this.sendBuffer.push(s)),this.flags={},this}_registerAckCallback(t,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let l=0;l<this.sendBuffer.length;l++)this.sendBuffer[l].id===t&&this.sendBuffer.splice(l,1);n.call(this,new Error("operation has timed out"))},i),s=(...l)=>{this.io.clearTimeoutFn(o),n.apply(this,l)};s.withError=!0,this.acks[t]=s}emitWithAck(t,...n){return new Promise((r,i)=>{const o=(s,l)=>s?i(s):r(l);o.withError=!0,n.push(o),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...o)=>(this._queue[0],i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...o)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:z.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case z.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case z.EVENT:case z.BINARY_EVENT:this.onevent(t);break;case z.ACK:case z.BINARY_ACK:this.onack(t);break;case z.DISCONNECT:this.ondisconnect();break;case z.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:z.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:z.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function dr(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}dr.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};dr.prototype.reset=function(){this.attempts=0};dr.prototype.setMin=function(e){this.ms=e};dr.prototype.setMax=function(e){this.max=e};dr.prototype.setJitter=function(e){this.jitter=e};class Fl extends ne{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,es(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new dr({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||l0;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Wy(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=nt(n,"open",function(){r.onopen(),t&&t()}),o=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},s=nt(n,"error",o);if(this._timeout!==!1){const l=this._timeout,u=this.setTimeoutFn(()=>{i(),o(new Error("timeout")),n.close()},l);this.opts.autoUnref&&u.unref(),this.subs.push(()=>{this.clearTimeoutFn(u)})}return this.subs.push(i),this.subs.push(s),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(nt(t,"ping",this.onping.bind(this)),nt(t,"data",this.ondata.bind(this)),nt(t,"error",this.onerror.bind(this)),nt(t,"close",this.onclose.bind(this)),nt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Zo(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new Rp(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Nr={};function ro(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Qy(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,s=Nr[i]&&o in Nr[i].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||s;let u;return l?u=new Fl(r,t):(Nr[i]||(Nr[i]=new Fl(r,t)),u=Nr[i]),n.query&&!t.query&&(t.query=n.queryKey),u.socket(n.path,t)}Object.assign(ro,{Manager:Fl,Socket:Rp,io:ro,connect:ro});function a0(){const[e,t]=v.useState(null),[n,r]=v.useState(!1),[i,o]=v.useState(null),[s,l]=v.useState([]);v.useEffect(()=>{const g=ro({transports:["websocket","polling"]});return g.on("connect",()=>{r(!0)}),g.on("disconnect",()=>{r(!1)}),g.on("connected",S=>{o(S.taskRunner)}),g.on("afk_progress",S=>{o(S)}),g.on("task_log",S=>{l(x=>[...x.slice(-499),S])}),t(g),()=>{g.close()}},[]);const u=v.useCallback(()=>{l([])},[]),a=v.useCallback(g=>(e==null||e.on("task_created",g),()=>{e==null||e.off("task_created",g)}),[e]),d=v.useCallback(g=>(e==null||e.on("task_updated",g),()=>{e==null||e.off("task_updated",g)}),[e]),f=v.useCallback(g=>(e==null||e.on("task_deleted",g),()=>{e==null||e.off("task_deleted",g)}),[e]),m=v.useCallback(g=>(e==null||e.on("tasks_reordered",g),()=>{e==null||e.off("tasks_reordered",g)}),[e]);return{isConnected:n,afkProgress:i,logs:s,clearLogs:u,onTaskCreated:a,onTaskUpdated:d,onTaskDeleted:f,onTasksReordered:m}}const Rc=[{id:"pending",title:"Backlog"},{id:"in_progress",title:"In Progress"},{id:"completed",title:"Completed"}];function c0(){const[e,t]=v.useState([]),[n,r]=v.useState(null),[i,o]=v.useState(!1),[s,l]=v.useState(!1),[u,a]=v.useState(!0),[d,f]=v.useState(null),{isConnected:m,afkProgress:g,logs:S,clearLogs:x,onTaskCreated:T,onTaskUpdated:p,onTaskDeleted:c}=a0();v.useEffect(()=>{(async()=>{try{a(!0);const[D,R]=await Promise.all([Rt.getTasks(),Rt.getStatus()]);t(D),r(R),f(null)}catch(D){f(D instanceof Error?D.message:"Failed to load data")}finally{a(!1)}})()},[]),v.useEffect(()=>{const k=T(A=>{t(V=>[...V,A])}),D=p(A=>{t(V=>V.map($=>$.id===A.id?A:$))}),R=c(({id:A})=>{t(V=>V.filter($=>$.id!==A))});return()=>{k(),D(),R()}},[T,p,c]),v.useEffect(()=>{(async()=>{try{const D=await Rt.getStatus();r(D)}catch{}})()},[e]);const h=v.useCallback(async k=>{try{await Rt.createTask(k),o(!1)}catch(D){f(D instanceof Error?D.message:"Failed to create task")}},[]),w=v.useCallback(async(k,D)=>{try{await Rt.updateTask(k,{status:D})}catch(R){f(R instanceof Error?R.message:"Failed to update task")}},[]),E=v.useCallback(async k=>{try{await Rt.deleteTask(k)}catch(D){f(D instanceof Error?D.message:"Failed to delete task")}},[]),N=v.useCallback(async k=>{const{active:D,over:R}=k;if(!R)return;const A=D.id,V=R.id;if(Rc.some($=>$.id===V)){const $=V,he=e.find(wt=>wt.id===A);he&&he.status!==$&&await w(A,$)}},[e,w]),_=k=>e.filter(D=>D.status===k).sort((D,R)=>D.priority-R.priority);return u?y.jsx("div",{className:"min-h-screen flex items-center justify-center",children:y.jsx("div",{className:"text-ralph-muted",children:"Loading..."})}):y.jsxs("div",{className:"min-h-screen flex flex-col bg-ralph-bg",children:[y.jsx(sy,{project:(n==null?void 0:n.project)||"Unknown Project",branch:(n==null?void 0:n.branch)||"main",isConnected:m,onAddTask:()=>o(!0),onToggleLogs:()=>l(!s),isLogsOpen:s,isRunning:(g==null?void 0:g.status)==="running",pendingCount:(n==null?void 0:n.pendingTasks)||0}),d&&y.jsxs("div",{className:"bg-ralph-danger/20 border border-ralph-danger text-ralph-danger px-4 py-2 mx-4 mt-4 rounded",children:[d,y.jsx("button",{onClick:()=>f(null),className:"ml-4 underline",children:"Dismiss"})]}),y.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[y.jsx("main",{className:"flex-1 p-4 overflow-hidden",children:y.jsx(_v,{collisionDetection:Ng,onDragEnd:N,children:y.jsx("div",{className:"flex gap-4 h-full",children:Rc.map(k=>{const D=_(k.id);return y.jsx(ly,{id:k.id,title:k.title,count:D.length,children:y.jsx(jv,{items:D.map(R=>R.id),strategy:zv,children:D.map(R=>y.jsx(uy,{task:R,onDelete:()=>E(R.id)},R.id))})},k.id)})})})}),s&&y.jsx(cy,{logs:S,onClear:x,onClose:()=>l(!1)})]}),g&&g.status==="running"&&y.jsx(fy,{progress:g}),i&&y.jsx(ay,{onAdd:h,onClose:()=>o(!1)})]})}js.createRoot(document.getElementById("root")).render(y.jsx(ke.StrictMode,{children:y.jsx(c0,{})}));
137
+ Documentation updated`,rows:4,className:"w-full px-3 py-2 bg-ralph-bg border border-ralph-border rounded focus:outline-none focus:ring-2 focus:ring-ralph-accent resize-none font-mono text-sm"})]}),y.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[y.jsx("button",{type:"button",onClick:t,className:"px-4 py-2 text-ralph-muted hover:text-ralph-text transition-colors",children:"Cancel"}),y.jsx("button",{type:"submit",disabled:!n.trim()||u,className:"px-4 py-2 bg-ralph-accent hover:bg-ralph-accent/80 text-white rounded transition-colors disabled:opacity-50 disabled:cursor-not-allowed",children:u?"Adding...":"Add Task"})]})]})]})})}function cy({logs:e,onClear:t,onClose:n}){const r=v.useRef(null);v.useEffect(()=>{r.current&&(r.current.scrollTop=r.current.scrollHeight)},[e]);const i=o=>new Date(o).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"});return y.jsxs("div",{className:"w-96 border-l border-ralph-border bg-ralph-card flex flex-col",children:[y.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-ralph-border",children:[y.jsx("h3",{className:"font-semibold",children:"Live Logs"}),y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("button",{onClick:t,className:"text-ralph-muted hover:text-ralph-text",title:"Clear logs",children:y.jsx(dp,{size:16})}),y.jsx("button",{onClick:n,className:"text-ralph-muted hover:text-ralph-text",children:y.jsx(pp,{size:16})})]})]}),y.jsx("div",{ref:r,className:"flex-1 overflow-y-auto p-3 font-mono text-xs",children:e.length===0?y.jsx("div",{className:"text-ralph-muted text-center py-8",children:"No logs yet. Start running a task to see output."}):y.jsx("div",{className:"space-y-1",children:e.map((o,s)=>y.jsxs("div",{className:"flex gap-2",children:[y.jsxs("span",{className:"text-ralph-muted shrink-0",children:["[",i(o.timestamp),"]"]}),y.jsx("span",{className:"text-ralph-text break-all",children:o.message})]},s))})})]})}function fy({progress:e}){const[t,n]=v.useState(!1),r=async()=>{n(!0);try{await Rt.stopRun()}catch(s){console.error("Failed to stop:",s)}finally{n(!1)}},i=()=>{const s=Date.now()-e.startTime,l=Math.floor(s/1e3),u=Math.floor(l/60),a=Math.floor(u/60);return a>0?`${a}h ${u%60}m`:u>0?`${u}m ${l%60}s`:`${l}s`},o=e.totalTasks>0?Math.round(e.completedTasks/e.totalTasks*100):0;return y.jsxs("div",{className:"fixed bottom-4 right-4 bg-ralph-card border border-ralph-border rounded-lg shadow-lg p-4 w-80",children:[y.jsxs("div",{className:"flex items-center justify-between mb-3",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx(Zv,{className:"animate-spin text-ralph-accent",size:18}),y.jsx("span",{className:"font-semibold",children:"AFK Mode Running"})]}),y.jsxs("button",{onClick:r,disabled:t,className:"flex items-center gap-1 px-2 py-1 bg-ralph-danger/20 hover:bg-ralph-danger/30 text-ralph-danger rounded text-sm transition-colors disabled:opacity-50",children:[y.jsx(kc,{size:14}),t?"Stopping...":"Stop"]})]}),e.currentTask&&y.jsxs("div",{className:"mb-3 text-sm",children:[y.jsx("div",{className:"text-ralph-muted mb-1",children:"Current task:"}),y.jsxs("div",{className:"text-ralph-text truncate",children:[y.jsxs("span",{className:"text-ralph-muted font-mono",children:[e.currentTask.id,":"]})," ",e.currentTask.title]})]}),y.jsxs("div",{className:"mb-2",children:[y.jsxs("div",{className:"flex items-center justify-between text-sm mb-1",children:[y.jsxs("span",{className:"text-ralph-muted",children:[e.completedTasks," / ",e.totalTasks," tasks"]}),y.jsx("span",{className:"text-ralph-muted",children:i()})]}),y.jsx("div",{className:"h-2 bg-ralph-bg rounded-full overflow-hidden",children:y.jsx("div",{className:"h-full bg-ralph-accent transition-all duration-300",style:{width:`${o}%`}})})]}),y.jsxs("div",{className:"flex items-center gap-2 text-xs text-ralph-muted",children:[y.jsx(fp,{size:12,className:"text-ralph-success"}),y.jsxs("span",{children:[e.results.filter(s=>s.success).length," passed"]}),e.results.some(s=>!s.success)&&y.jsxs(y.Fragment,{children:[y.jsx("span",{className:"text-ralph-border",children:"|"}),y.jsx(kc,{size:12,className:"text-ralph-danger"}),y.jsxs("span",{children:[e.results.filter(s=>!s.success).length," failed"]})]})]})]})}const yt=Object.create(null);yt.open="0";yt.close="1";yt.ping="2";yt.pong="3";yt.message="4";yt.upgrade="5";yt.noop="6";const eo=Object.create(null);Object.keys(yt).forEach(e=>{eo[yt[e]]=e});const zl={type:"error",data:"parser error"},hp=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",mp=typeof ArrayBuffer=="function",gp=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,$u=({type:e,data:t},n,r)=>hp&&t instanceof Blob?n?r(t):Ec(t,r):mp&&(t instanceof ArrayBuffer||gp(t))?n?r(t):Ec(new Blob([t]),r):r(yt[e]+(t||"")),Ec=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Cc(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Ms;function dy(e,t){if(hp&&e.data instanceof Blob)return e.data.arrayBuffer().then(Cc).then(t);if(mp&&(e.data instanceof ArrayBuffer||gp(e.data)))return t(Cc(e.data));$u(e,!1,n=>{Ms||(Ms=new TextEncoder),t(Ms.encode(n))})}const _c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Lr=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<_c.length;e++)Lr[_c.charCodeAt(e)]=e;const py=e=>{let t=e.length*.75,n=e.length,r,i=0,o,s,l,u;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const a=new ArrayBuffer(t),d=new Uint8Array(a);for(r=0;r<n;r+=4)o=Lr[e.charCodeAt(r)],s=Lr[e.charCodeAt(r+1)],l=Lr[e.charCodeAt(r+2)],u=Lr[e.charCodeAt(r+3)],d[i++]=o<<2|s>>4,d[i++]=(s&15)<<4|l>>2,d[i++]=(l&3)<<6|u&63;return a},hy=typeof ArrayBuffer=="function",Vu=(e,t)=>{if(typeof e!="string")return{type:"message",data:vp(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:my(e.substring(1),t)}:eo[n]?e.length>1?{type:eo[n],data:e.substring(1)}:{type:eo[n]}:zl},my=(e,t)=>{if(hy){const n=py(e);return vp(n,t)}else return{base64:!0,data:e}},vp=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},yp="",gy=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((o,s)=>{$u(o,!1,l=>{r[s]=l,++i===n&&t(r.join(yp))})})},vy=(e,t)=>{const n=e.split(yp),r=[];for(let i=0;i<n.length;i++){const o=Vu(n[i],t);if(r.push(o),o.type==="error")break}return r};function yy(){return new TransformStream({transform(e,t){dy(e,n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const o=new DataView(i.buffer);o.setUint8(0,126),o.setUint16(1,r)}else{i=new Uint8Array(9);const o=new DataView(i.buffer);o.setUint8(0,127),o.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let zs;function Bi(e){return e.reduce((t,n)=>t+n.length,0)}function Fi(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function wy(e,t){zs||(zs=new TextDecoder);const n=[];let r=0,i=-1,o=!1;return new TransformStream({transform(s,l){for(n.push(s);;){if(r===0){if(Bi(n)<1)break;const u=Fi(n,1);o=(u[0]&128)===128,i=u[0]&127,i<126?r=3:i===126?r=1:r=2}else if(r===1){if(Bi(n)<2)break;const u=Fi(n,2);i=new DataView(u.buffer,u.byteOffset,u.length).getUint16(0),r=3}else if(r===2){if(Bi(n)<8)break;const u=Fi(n,8),a=new DataView(u.buffer,u.byteOffset,u.length),d=a.getUint32(0);if(d>Math.pow(2,21)-1){l.enqueue(zl);break}i=d*Math.pow(2,32)+a.getUint32(4),r=3}else{if(Bi(n)<i)break;const u=Fi(n,i);l.enqueue(Vu(o?u:zs.decode(u),t)),r=0}if(i===0||i>e){l.enqueue(zl);break}}}})}const wp=4;function ne(e){if(e)return xy(e)}function xy(e){for(var t in ne.prototype)e[t]=ne.prototype[t];return e}ne.prototype.on=ne.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};ne.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};ne.prototype.off=ne.prototype.removeListener=ne.prototype.removeAllListeners=ne.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this};ne.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this};ne.prototype.emitReserved=ne.prototype.emit;ne.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};ne.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Zo=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Ke=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),Sy="arraybuffer";function xp(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const ky=Ke.setTimeout,Ey=Ke.clearTimeout;function es(e,t){t.useNativeTimers?(e.setTimeoutFn=ky.bind(Ke),e.clearTimeoutFn=Ey.bind(Ke)):(e.setTimeoutFn=Ke.setTimeout.bind(Ke),e.clearTimeoutFn=Ke.clearTimeout.bind(Ke))}const Cy=1.33;function _y(e){return typeof e=="string"?Ny(e):Math.ceil((e.byteLength||e.size)*Cy)}function Ny(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function Sp(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Ry(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function Ty(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let o=n[r].split("=");t[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return t}class Dy extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Hu extends ne{constructor(t){super(),this.writable=!1,es(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new Dy(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=Vu(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=Ry(t);return n.length?"?"+n:""}}class Oy extends Hu{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};vy(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,gy(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=Sp()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let kp=!1;try{kp=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Ly=kp;function Py(){}class Ay extends Oy{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(i,o)=>{this.onError("xhr post error",i,o)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class gt extends ne{constructor(t,n,r){super(),this.createRequest=t,es(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=xp(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this._opts.extraHeaders[i])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var i;r.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document<"u"&&(this._index=gt.requestsCount++,gt.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Py,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete gt.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}gt.requestsCount=0;gt.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Nc);else if(typeof addEventListener=="function"){const e="onpagehide"in Ke?"pagehide":"unload";addEventListener(e,Nc,!1)}}function Nc(){for(let e in gt.requests)gt.requests.hasOwnProperty(e)&&gt.requests[e].abort()}const My=function(){const e=Ep({xdomain:!1});return e&&e.responseType!==null}();class zy extends Ay{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=My&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new gt(Ep,this.uri(),t)}}function Ep(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||Ly))return new XMLHttpRequest}catch{}if(!t)try{return new Ke[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Cp=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Iy extends Hu{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=Cp?{}:xp(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;$u(r,this.supportsBinary,o=>{try{this.doWrite(r,o)}catch{}i&&Zo(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=Sp()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Is=Ke.WebSocket||Ke.MozWebSocket;class jy extends Iy{createSocket(t,n,r){return Cp?new Is(t,n,r):n?new Is(t,n):new Is(t)}doWrite(t,n){this.ws.send(n)}}class by extends Hu{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=wy(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=yy();i.readable.pipeTo(t.writable),this._writer=i.writable.getWriter();const o=()=>{r.read().then(({done:l,value:u})=>{l||(this.onPacket(u),o())}).catch(l=>{})};o();const s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this._writer.write(s).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],i=n===t.length-1;this._writer.write(r).then(()=>{i&&Zo(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const By={websocket:jy,webtransport:by,polling:zy},Fy=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Uy=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Il(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let i=Fy.exec(e||""),o={},s=14;for(;s--;)o[Uy[s]]=i[s]||"";return n!=-1&&r!=-1&&(o.source=t,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=$y(o,o.path),o.queryKey=Vy(o,o.query),o}function $y(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function Vy(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,o){i&&(n[i]=o)}),n}const jl=typeof addEventListener=="function"&&typeof removeEventListener=="function",to=[];jl&&addEventListener("offline",()=>{to.forEach(e=>e())},!1);class sn extends ne{constructor(t,n){if(super(),this.binaryType=Sy,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=Il(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=Il(n.host).host);es(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const i=r.prototype.name;this.transports.push(i),this._transportsByName[i]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=Ty(this.opts.query)),jl&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},to.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=wp,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&sn.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",sn.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const i=this.writeBuffer[r].data;if(i&&(n+=_y(i)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Zo(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const o={type:t,data:n,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(sn.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),jl&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=to.indexOf(this._offlineEventListener);r!==-1&&to.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}sn.protocol=wp;class Hy extends sn{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;sn.priorWebsocketSuccess=!1;const i=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",f=>{if(!r)if(f.type==="pong"&&f.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;sn.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(d(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const m=new Error("probe error");m.transport=n.name,this.emitReserved("upgradeError",m)}}))};function o(){r||(r=!0,d(),n.close(),n=null)}const s=f=>{const m=new Error("probe error: "+f);m.transport=n.name,o(),this.emitReserved("upgradeError",m)};function l(){s("transport closed")}function u(){s("socket closed")}function a(f){n&&f.name!==n.name&&o()}const d=()=>{n.removeListener("open",i),n.removeListener("error",s),n.removeListener("close",l),this.off("close",u),this.off("upgrading",a)};n.once("open",i),n.once("error",s),n.once("close",l),this.once("close",u),this.once("upgrading",a),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let Wy=class extends Hy{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(i=>By[i]).filter(i=>!!i)),super(t,r)}};function Qy(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=Il(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const o=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+o+":"+r.port+t,r.href=r.protocol+"://"+o+(n&&n.port===r.port?"":":"+r.port),r}const Ky=typeof ArrayBuffer=="function",Yy=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,_p=Object.prototype.toString,qy=typeof Blob=="function"||typeof Blob<"u"&&_p.call(Blob)==="[object BlobConstructor]",Xy=typeof File=="function"||typeof File<"u"&&_p.call(File)==="[object FileConstructor]";function Wu(e){return Ky&&(e instanceof ArrayBuffer||Yy(e))||qy&&e instanceof Blob||Xy&&e instanceof File}function no(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(no(e[n]))return!0;return!1}if(Wu(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return no(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&no(e[n]))return!0;return!1}function Gy(e){const t=[],n=e.data,r=e;return r.data=bl(n,t),r.attachments=t.length,{packet:r,buffers:t}}function bl(e,t){if(!e)return e;if(Wu(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=bl(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=bl(e[r],t));return n}return e}function Jy(e,t){return e.data=Bl(e.data,t),delete e.attachments,e}function Bl(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Bl(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Bl(e[n],t));return e}const Np=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Zy=5;var z;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(z||(z={}));class e0{constructor(t){this.replacer=t}encode(t){return(t.type===z.EVENT||t.type===z.ACK)&&no(t)?this.encodeAsBinary({type:t.type===z.EVENT?z.BINARY_EVENT:z.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===z.BINARY_EVENT||t.type===z.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=Gy(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}class Qu extends ne{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===z.BINARY_EVENT;r||n.type===z.BINARY_ACK?(n.type=r?z.EVENT:z.ACK,this.reconstructor=new t0(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Wu(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(z[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===z.BINARY_EVENT||r.type===z.BINARY_ACK){const o=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const s=t.substring(o,n);if(s!=Number(s)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(s)}if(t.charAt(n+1)==="/"){const o=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(o,n)}else r.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const o=n+1;for(;++n;){const s=t.charAt(n);if(s==null||Number(s)!=s){--n;break}if(n===t.length)break}r.id=Number(t.substring(o,n+1))}if(t.charAt(++n)){const o=this.tryParse(t.substr(n));if(Qu.isPayloadValid(r.type,o))r.data=o;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case z.CONNECT:return Ao(n);case z.DISCONNECT:return n===void 0;case z.CONNECT_ERROR:return typeof n=="string"||Ao(n);case z.EVENT:case z.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Np.indexOf(n[0])===-1);case z.ACK:case z.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class t0{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=Jy(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function n0(e){return typeof e=="string"}const r0=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function i0(e){return e===void 0||r0(e)}function Ao(e){return Object.prototype.toString.call(e)==="[object Object]"}function o0(e,t){switch(e){case z.CONNECT:return t===void 0||Ao(t);case z.DISCONNECT:return t===void 0;case z.EVENT:return Array.isArray(t)&&(typeof t[0]=="number"||typeof t[0]=="string"&&Np.indexOf(t[0])===-1);case z.ACK:return Array.isArray(t);case z.CONNECT_ERROR:return typeof t=="string"||Ao(t);default:return!1}}function s0(e){return n0(e.nsp)&&i0(e.id)&&o0(e.type,e.data)}const l0=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Qu,Encoder:e0,get PacketType(){return z},isPacketValid:s0,protocol:Zy},Symbol.toStringTag,{value:"Module"}));function nt(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const u0=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Rp extends ne{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[nt(t,"open",this.onopen.bind(this)),nt(t,"packet",this.onpacket.bind(this)),nt(t,"error",this.onerror.bind(this)),nt(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,i,o;if(u0.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const s={type:z.EVENT,data:n};if(s.options={},s.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const d=this.ids++,f=n.pop();this._registerAckCallback(d,f),s.id=d}const l=(i=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||i===void 0?void 0:i.writable,u=this.connected&&!(!((o=this.io.engine)===null||o===void 0)&&o._hasPingExpired());return this.flags.volatile&&!l||(u?(this.notifyOutgoingListeners(s),this.packet(s)):this.sendBuffer.push(s)),this.flags={},this}_registerAckCallback(t,n){var r;const i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const o=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let l=0;l<this.sendBuffer.length;l++)this.sendBuffer[l].id===t&&this.sendBuffer.splice(l,1);n.call(this,new Error("operation has timed out"))},i),s=(...l)=>{this.io.clearTimeoutFn(o),n.apply(this,l)};s.withError=!0,this.acks[t]=s}emitWithAck(t,...n){return new Promise((r,i)=>{const o=(s,l)=>s?i(s):r(l);o.withError=!0,n.push(o),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...o)=>(this._queue[0],i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...o)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:z.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case z.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case z.EVENT:case z.BINARY_EVENT:this.onevent(t);break;case z.ACK:case z.BINARY_ACK:this.onack(t);break;case z.DISCONNECT:this.ondisconnect();break;case z.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...i){r||(r=!0,n.packet({type:z.ACK,id:t,data:i}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:z.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function dr(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}dr.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};dr.prototype.reset=function(){this.attempts=0};dr.prototype.setMin=function(e){this.ms=e};dr.prototype.setMax=function(e){this.max=e};dr.prototype.setJitter=function(e){this.jitter=e};class Fl extends ne{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,es(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new dr({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||l0;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Wy(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=nt(n,"open",function(){r.onopen(),t&&t()}),o=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},s=nt(n,"error",o);if(this._timeout!==!1){const l=this._timeout,u=this.setTimeoutFn(()=>{i(),o(new Error("timeout")),n.close()},l);this.opts.autoUnref&&u.unref(),this.subs.push(()=>{this.clearTimeoutFn(u)})}return this.subs.push(i),this.subs.push(s),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(nt(t,"ping",this.onping.bind(this)),nt(t,"data",this.ondata.bind(this)),nt(t,"error",this.onerror.bind(this)),nt(t,"close",this.onclose.bind(this)),nt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Zo(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new Rp(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Nr={};function ro(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=Qy(e,t.path||"/socket.io"),r=n.source,i=n.id,o=n.path,s=Nr[i]&&o in Nr[i].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||s;let u;return l?u=new Fl(r,t):(Nr[i]||(Nr[i]=new Fl(r,t)),u=Nr[i]),n.query&&!t.query&&(t.query=n.queryKey),u.socket(n.path,t)}Object.assign(ro,{Manager:Fl,Socket:Rp,io:ro,connect:ro});function a0(){const[e,t]=v.useState(null),[n,r]=v.useState(!1),[i,o]=v.useState(null),[s,l]=v.useState([]);v.useEffect(()=>{const g=ro({transports:["websocket","polling"]});return g.on("connect",()=>{r(!0)}),g.on("disconnect",()=>{r(!1)}),g.on("connected",S=>{o(S.taskRunner)}),g.on("afk_progress",S=>{o(S)}),g.on("task_log",S=>{l(x=>[...x.slice(-499),S])}),t(g),()=>{g.close()}},[]);const u=v.useCallback(()=>{l([])},[]),a=v.useCallback(g=>(e==null||e.on("task_created",g),()=>{e==null||e.off("task_created",g)}),[e]),d=v.useCallback(g=>(e==null||e.on("task_updated",g),()=>{e==null||e.off("task_updated",g)}),[e]),f=v.useCallback(g=>(e==null||e.on("task_deleted",g),()=>{e==null||e.off("task_deleted",g)}),[e]),m=v.useCallback(g=>(e==null||e.on("tasks_reordered",g),()=>{e==null||e.off("tasks_reordered",g)}),[e]);return{isConnected:n,afkProgress:i,logs:s,clearLogs:u,onTaskCreated:a,onTaskUpdated:d,onTaskDeleted:f,onTasksReordered:m}}const Rc=[{id:"pending",title:"Backlog"},{id:"in_progress",title:"In Progress"},{id:"completed",title:"Completed"},{id:"failed",title:"Failed"}];function c0(){const[e,t]=v.useState([]),[n,r]=v.useState(null),[i,o]=v.useState(!1),[s,l]=v.useState(!1),[u,a]=v.useState(!0),[d,f]=v.useState(null),{isConnected:m,afkProgress:g,logs:S,clearLogs:x,onTaskCreated:T,onTaskUpdated:p,onTaskDeleted:c}=a0();v.useEffect(()=>{(async()=>{try{a(!0);const[D,R]=await Promise.all([Rt.getTasks(),Rt.getStatus()]);t(D),r(R),f(null)}catch(D){f(D instanceof Error?D.message:"Failed to load data")}finally{a(!1)}})()},[]),v.useEffect(()=>{const k=T(A=>{t(V=>[...V,A])}),D=p(A=>{t(V=>V.map($=>$.id===A.id?A:$))}),R=c(({id:A})=>{t(V=>V.filter($=>$.id!==A))});return()=>{k(),D(),R()}},[T,p,c]),v.useEffect(()=>{(async()=>{try{const D=await Rt.getStatus();r(D)}catch{}})()},[e]);const h=v.useCallback(async k=>{try{await Rt.createTask(k),o(!1)}catch(D){f(D instanceof Error?D.message:"Failed to create task")}},[]),w=v.useCallback(async(k,D)=>{try{await Rt.updateTask(k,{status:D})}catch(R){f(R instanceof Error?R.message:"Failed to update task")}},[]),E=v.useCallback(async k=>{try{await Rt.deleteTask(k)}catch(D){f(D instanceof Error?D.message:"Failed to delete task")}},[]),N=v.useCallback(async k=>{const{active:D,over:R}=k;if(!R)return;const A=D.id,V=R.id;if(Rc.some($=>$.id===V)){const $=V,he=e.find(wt=>wt.id===A);he&&he.status!==$&&await w(A,$)}},[e,w]),_=k=>e.filter(D=>D.status===k).sort((D,R)=>D.priority-R.priority);return u?y.jsx("div",{className:"min-h-screen flex items-center justify-center",children:y.jsx("div",{className:"text-ralph-muted",children:"Loading..."})}):y.jsxs("div",{className:"min-h-screen flex flex-col bg-ralph-bg",children:[y.jsx(sy,{project:(n==null?void 0:n.project)||"Unknown Project",branch:(n==null?void 0:n.branch)||"main",isConnected:m,onAddTask:()=>o(!0),onToggleLogs:()=>l(!s),isLogsOpen:s,isRunning:(g==null?void 0:g.status)==="running",pendingCount:(n==null?void 0:n.pendingTasks)||0}),d&&y.jsxs("div",{className:"bg-ralph-danger/20 border border-ralph-danger text-ralph-danger px-4 py-2 mx-4 mt-4 rounded",children:[d,y.jsx("button",{onClick:()=>f(null),className:"ml-4 underline",children:"Dismiss"})]}),y.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[y.jsx("main",{className:"flex-1 p-4 overflow-hidden",children:y.jsx(_v,{collisionDetection:Ng,onDragEnd:N,children:y.jsx("div",{className:"flex gap-4 h-full",children:Rc.map(k=>{const D=_(k.id);return y.jsx(ly,{id:k.id,title:k.title,count:D.length,children:y.jsx(jv,{items:D.map(R=>R.id),strategy:zv,children:D.map(R=>y.jsx(uy,{task:R,onDelete:()=>E(R.id)},R.id))})},k.id)})})})}),s&&y.jsx(cy,{logs:S,onClear:x,onClose:()=>l(!1)})]}),g&&g.status==="running"&&y.jsx(fy,{progress:g}),i&&y.jsx(ay,{onAdd:h,onClose:()=>o(!1)})]})}js.createRoot(document.getElementById("root")).render(y.jsx(ke.StrictMode,{children:y.jsx(c0,{})}));
@@ -1 +1 @@
1
- *,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}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;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.fixed{position:fixed}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-4{bottom:1rem}.right-4{right:1rem}.z-50{z-index:50}.mx-4{margin-left:1rem;margin-right:1rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.ml-1{margin-left:.25rem}.ml-4{margin-left:1rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.flex{display:flex}.h-2{height:.5rem}.h-full{height:100%}.min-h-screen{min-height:100vh}.w-80{width:20rem}.w-96{width:24rem}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-\[300px\]{min-width:300px}.max-w-\[400px\]{max-width:400px}.max-w-lg{max-width:32rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-grab{cursor:grab}.resize-none{resize:none}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-ralph-border{--tw-border-opacity: 1;border-color:rgb(51 65 85 / var(--tw-border-opacity, 1))}.border-ralph-danger{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.border-ralph-muted\/30{border-color:#94a3b84d}.border-ralph-success\/30{border-color:#22c55e4d}.border-ralph-warning\/30{border-color:#f59e0b4d}.bg-black\/50{background-color:#00000080}.bg-ralph-accent{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-ralph-bg{--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity, 1))}.bg-ralph-card{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity, 1))}.bg-ralph-danger\/20{background-color:#ef444433}.bg-ralph-success{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-ralph-success\/20{background-color:#22c55e33}.bg-ralph-warning{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity, 1))}.bg-ralph-warning\/10{background-color:#f59e0b1a}.p-3{padding:.75rem}.p-4{padding:1rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pt-2{padding-top:.5rem}.text-center{text-align:center}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.text-ralph-accent{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-ralph-border{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.text-ralph-danger{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-ralph-muted{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.text-ralph-success{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-ralph-text{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity, 1))}.text-ralph-warning{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-50{opacity:.5}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-ralph-accent{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity, 1))}.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)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}body{margin:0;background-color:#0f172a;color:#e2e8f0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:#1e293b}::-webkit-scrollbar-thumb{background:#475569;border-radius:4px}::-webkit-scrollbar-thumb:hover{background:#64748b}.hover\:bg-ralph-accent\/80:hover{background-color:#3b82f6cc}.hover\:bg-ralph-border:hover{--tw-bg-opacity: 1;background-color:rgb(51 65 85 / var(--tw-bg-opacity, 1))}.hover\:bg-ralph-danger\/30:hover{background-color:#ef44444d}.hover\:bg-ralph-success\/80:hover{background-color:#22c55ecc}.hover\:bg-ralph-warning\/80:hover{background-color:#f59e0bcc}.hover\:text-ralph-danger:hover{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.hover\:text-ralph-text:hover{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity, 1))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-ralph-accent:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity, 1))}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:opacity-100{opacity:1}
1
+ *,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}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;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.fixed{position:fixed}.inset-0{top:0;right:0;bottom:0;left:0}.bottom-4{bottom:1rem}.right-4{right:1rem}.z-50{z-index:50}.mx-4{margin-left:1rem;margin-right:1rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.ml-1{margin-left:.25rem}.ml-4{margin-left:1rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.line-clamp-2{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.block{display:block}.flex{display:flex}.h-2{height:.5rem}.h-full{height:100%}.min-h-screen{min-height:100vh}.w-80{width:20rem}.w-96{width:24rem}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-\[300px\]{min-width:300px}.max-w-\[400px\]{max-width:400px}.max-w-lg{max-width:32rem}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-grab{cursor:grab}.resize-none{resize:none}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.border{border-width:1px}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-ralph-border{--tw-border-opacity: 1;border-color:rgb(51 65 85 / var(--tw-border-opacity, 1))}.border-ralph-danger{--tw-border-opacity: 1;border-color:rgb(239 68 68 / var(--tw-border-opacity, 1))}.border-ralph-danger\/30{border-color:#ef44444d}.border-ralph-muted\/30{border-color:#94a3b84d}.border-ralph-success\/30{border-color:#22c55e4d}.border-ralph-warning\/30{border-color:#f59e0b4d}.bg-black\/50{background-color:#00000080}.bg-ralph-accent{--tw-bg-opacity: 1;background-color:rgb(59 130 246 / var(--tw-bg-opacity, 1))}.bg-ralph-bg{--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity, 1))}.bg-ralph-card{--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity, 1))}.bg-ralph-danger\/20{background-color:#ef444433}.bg-ralph-success{--tw-bg-opacity: 1;background-color:rgb(34 197 94 / var(--tw-bg-opacity, 1))}.bg-ralph-success\/20{background-color:#22c55e33}.bg-ralph-warning{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity, 1))}.bg-ralph-warning\/10{background-color:#f59e0b1a}.p-3{padding:.75rem}.p-4{padding:1rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pt-2{padding-top:.5rem}.text-center{text-align:center}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.text-ralph-accent{--tw-text-opacity: 1;color:rgb(59 130 246 / var(--tw-text-opacity, 1))}.text-ralph-border{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.text-ralph-danger{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-ralph-muted{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.text-ralph-success{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity, 1))}.text-ralph-text{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity, 1))}.text-ralph-warning{--tw-text-opacity: 1;color:rgb(245 158 11 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.underline{text-decoration-line:underline}.opacity-0{opacity:0}.opacity-50{opacity:.5}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.ring-2{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.ring-ralph-accent{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity, 1))}.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)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}body{margin:0;background-color:#0f172a;color:#e2e8f0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,Menlo,Monaco,Consolas,Courier New,monospace}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:#1e293b}::-webkit-scrollbar-thumb{background:#475569;border-radius:4px}::-webkit-scrollbar-thumb:hover{background:#64748b}.hover\:bg-ralph-accent\/80:hover{background-color:#3b82f6cc}.hover\:bg-ralph-border:hover{--tw-bg-opacity: 1;background-color:rgb(51 65 85 / var(--tw-bg-opacity, 1))}.hover\:bg-ralph-danger\/30:hover{background-color:#ef44444d}.hover\:bg-ralph-success\/80:hover{background-color:#22c55ecc}.hover\:bg-ralph-warning\/80:hover{background-color:#f59e0bcc}.hover\:text-ralph-danger:hover{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.hover\:text-ralph-text:hover{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity, 1))}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.focus\:ring-ralph-accent:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(59 130 246 / var(--tw-ring-opacity, 1))}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group:hover .group-hover\:opacity-100{opacity:1}
@@ -5,8 +5,8 @@
5
5
  <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>Ralph Wiggum UI</title>
8
- <script type="module" crossorigin src="/assets/index-DBOjIoHW.js"></script>
9
- <link rel="stylesheet" crossorigin href="/assets/index-mu6cQFl4.css">
8
+ <script type="module" crossorigin src="/assets/index-BXGmdDew.js"></script>
9
+ <link rel="stylesheet" crossorigin href="/assets/index-DLUPqbyH.css">
10
10
  </head>
11
11
  <body>
12
12
  <div id="root"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ralph-wiggum-ui",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "A visual Kanban UI for autonomous AI coding with Claude Code",
5
5
  "keywords": [
6
6
  "claude",