ralph-wiggum-ui 0.1.2 → 0.1.4

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":"serve.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/serve.ts"],"names":[],"mappings":"AAAA;;GAEG;AAUH,UAAU,YAAY;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,wBAAsB,YAAY,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAyDvE"}
1
+ {"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/serve.ts"],"names":[],"mappings":"AAAA;;GAEG;AAUH,UAAU,YAAY;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,wBAAsB,YAAY,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAqDvE"}
@@ -23,7 +23,7 @@ export async function serveCommand(options) {
23
23
  console.log(chalk.dim('Starting web server...'));
24
24
  try {
25
25
  const server = createServer(cwd, config);
26
- server.listen(port, () => {
26
+ server.httpServer.listen(port, () => {
27
27
  const url = `http://localhost:${port}`;
28
28
  console.log(chalk.green(`\n✓ Server running at ${chalk.cyan(url)}\n`));
29
29
  console.log(chalk.dim(' Press Ctrl+C to stop\n'));
@@ -35,18 +35,14 @@ export async function serveCommand(options) {
35
35
  }
36
36
  });
37
37
  // Handle graceful shutdown
38
- process.on('SIGINT', () => {
38
+ const shutdown = async () => {
39
39
  console.log(chalk.dim('\n\nShutting down...'));
40
- server.close(() => {
41
- console.log(chalk.green('Server stopped.'));
42
- process.exit(0);
43
- });
44
- });
45
- process.on('SIGTERM', () => {
46
- server.close(() => {
47
- process.exit(0);
48
- });
49
- });
40
+ await server.close();
41
+ console.log(chalk.green('Server stopped.'));
42
+ process.exit(0);
43
+ };
44
+ process.on('SIGINT', shutdown);
45
+ process.on('SIGTERM', shutdown);
50
46
  }
51
47
  catch (error) {
52
48
  const message = error instanceof Error ? error.message : 'Unknown error';
@@ -1 +1 @@
1
- {"version":3,"file":"serve.js","sourceRoot":"","sources":["../../../src/cli/commands/serve.ts"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"serve.js","sourceRoot":"","sources":["../../../src/cli/commands/serve.ts"],"names":[],"mappings":"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"}
@@ -11,5 +11,10 @@ export interface ServerContext {
11
11
  io: SocketServer;
12
12
  taskRunner: TaskRunner;
13
13
  }
14
- export declare function createServer(cwd: string, config: Config): HttpServer;
14
+ export interface ServerInstance {
15
+ httpServer: HttpServer;
16
+ io: SocketServer;
17
+ close: () => Promise<void>;
18
+ }
19
+ export declare function createServer(cwd: string, config: Config): ServerInstance;
15
20
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAoC,MAAM,IAAI,UAAU,EAAE,MAAM,MAAM,CAAC;AAC9E,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,WAAW,CAAC;AAKnD,OAAO,EAAoB,UAAU,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAKhD,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,YAAY,CAAC;IACjB,UAAU,EAAE,UAAU,CAAC;CACxB;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,UAAU,CAuDpE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,EAAoC,MAAM,IAAI,UAAU,EAAE,MAAM,MAAM,CAAC;AAC9E,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,WAAW,CAAC;AAKnD,OAAO,EAAoB,UAAU,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAKhD,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,YAAY,CAAC;IACjB,UAAU,EAAE,UAAU,CAAC;CACxB;AAED,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,UAAU,CAAC;IACvB,EAAE,EAAE,YAAY,CAAC;IACjB,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5B;AAED,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,cAAc,CAmExE"}
@@ -54,6 +54,18 @@ export function createServer(cwd, config) {
54
54
  console.log(`Client disconnected: ${socket.id}`);
55
55
  });
56
56
  });
57
- return httpServer;
57
+ // Return server instance with close method
58
+ return {
59
+ httpServer,
60
+ io,
61
+ close: async () => {
62
+ // Close all socket connections
63
+ io.close();
64
+ // Close HTTP server
65
+ return new Promise((resolve) => {
66
+ httpServer.close(() => resolve());
67
+ });
68
+ },
69
+ };
58
70
  }
59
71
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,OAAO,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,YAAY,IAAI,gBAAgB,EAAwB,MAAM,MAAM,CAAC;AAC9E,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,WAAW,CAAC;AACnD,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAc,MAAM,aAAa,CAAC;AAG3D,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAStC,MAAM,UAAU,YAAY,CAAC,GAAW,EAAE,MAAc;IACtD,MAAM,GAAG,GAAG,OAAO,EAAE,CAAC;IACtB,MAAM,UAAU,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC;IAEzC,kBAAkB;IAClB,MAAM,EAAE,GAAG,IAAI,YAAY,CAAC,UAAU,EAAE;QACtC,IAAI,EAAE;YACJ,MAAM,EAAE,GAAG;YACX,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC;SACzB;KACF,CAAC,CAAC;IAEH,qBAAqB;IACrB,MAAM,UAAU,GAAG,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;IAErD,iBAAiB;IACjB,MAAM,OAAO,GAAkB;QAC7B,GAAG;QACH,MAAM;QACN,EAAE;QACF,UAAU;KACX,CAAC;IAEF,aAAa;IACb,GAAG,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;IAChB,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;IAExB,aAAa;IACb,GAAG,CAAC,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC;IAE1C,oCAAoC;IACpC,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;IAC7D,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;IAEpC,eAAe;IACf,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE;QACzB,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC,CAAC;IAC/C,CAAC,CAAC,CAAC;IAEH,gCAAgC;IAChC,EAAE,CAAC,EAAE,CAAC,YAAY,EAAE,CAAC,MAAM,EAAE,EAAE;QAC7B,OAAO,CAAC,GAAG,CAAC,qBAAqB,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC;QAE9C,gCAAgC;QAChC,MAAM,CAAC,IAAI,CAAC,WAAW,EAAE;YACvB,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,UAAU,EAAE,UAAU,CAAC,QAAQ,EAAE;SAClC,CAAC,CAAC;QAEH,MAAM,CAAC,EAAE,CAAC,YAAY,EAAE,GAAG,EAAE;YAC3B,OAAO,CAAC,GAAG,CAAC,wBAAwB,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC;QACnD,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,UAAU,CAAC;AACpB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/server/index.ts"],"names":[],"mappings":"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"}
@@ -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.2",
3
+ "version": "0.1.4",
4
4
  "description": "A visual Kanban UI for autonomous AI coding with Claude Code",
5
5
  "keywords": [
6
6
  "claude",